diff --git a/resources/AboveTags/__resource.lua b/resources/AboveTags/__resource.lua new file mode 100644 index 000000000..3a54fbb90 --- /dev/null +++ b/resources/AboveTags/__resource.lua @@ -0,0 +1,3 @@ +resource_manifest_version '05cfa83c-a124-4cfa-a768-c24a5811d8f9' + +client_script 'client.lua' \ No newline at end of file diff --git a/resources/AboveTags/client.lua b/resources/AboveTags/client.lua new file mode 100644 index 000000000..93e7ced36 --- /dev/null +++ b/resources/AboveTags/client.lua @@ -0,0 +1,61 @@ +-- FiveM Above Head ID/Name Client Script + +local showPlayerBlips = false +local ignorePlayerNameDistance = false +local disPlayerNames = 12.5 +local playerSource = 0 + +function DrawText3D(x,y,z, text) -- some useful function, use it if you want! + local onScreen,_x,_y=World3dToScreen2d(x,y,z) + local px,py,pz=table.unpack(GetGameplayCamCoords()) + local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1) + + local scale = (1/dist)*2 + local fov = (1/GetGameplayCamFov())*100 + local scale = scale*fov + + if onScreen then + SetTextScale(0.0*scale, 0.55*scale) + SetTextFont(4) + SetTextProportional(1) + -- SetTextScale(0.0, 0.55) + SetTextColour(255, 255, 255, 255) + SetTextDropshadow(0, 0, 0, 0, 255) + SetTextEdge(2, 0, 0, 0, 225) + SetTextDropShadow() + SetTextOutline() + SetTextEntry("STRING") + SetTextCentre(1) + AddTextComponentString(text) + DrawText(_x,_y) + end +end + +Citizen.CreateThread(function() + while true do + for i=0,99 do + N_0x31698aa80e0223f8(i) + end + for id = 0, 31 do + if ((NetworkIsPlayerActive( id )) and GetPlayerPed( id ) ~= GetPlayerPed( -1 )) then + ped = GetPlayerPed( id ) + blip = GetBlipFromEntity( ped ) + + x1, y1, z1 = table.unpack( GetEntityCoords( GetPlayerPed( -1 ), true ) ) + x2, y2, z2 = table.unpack( GetEntityCoords( GetPlayerPed( id ), true ) ) + distance = math.floor(GetDistanceBetweenCoords(x1, y1, z1, x2, y2, z2, true)) + + if(ignorePlayerNameDistance) then + DrawText3D(x2, y2, z2+1, GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50)) + end + + if ((distance < disPlayerNames)) then + if not (ignorePlayerNameDistance) then + DrawText3D(x2, y2, z2+1, GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50)) + end + end + end + end + Citizen.Wait(0) + end +end) \ No newline at end of file diff --git a/resources/AboveTags/testforafk.lua b/resources/AboveTags/testforafk.lua new file mode 100644 index 000000000..92d0e9a19 --- /dev/null +++ b/resources/AboveTags/testforafk.lua @@ -0,0 +1,91 @@ +-- FiveM Above Head ID/Name Client Script + +local showPlayerBlips = false +local ignorePlayerNameDistance = false +local disPlayerNames = 12.5 +local playerSource = 0 + +function DrawText3D(x,y,z, text) -- some useful function, use it if you want! + local onScreen,_x,_y=World3dToScreen2d(x,y,z) + local px,py,pz=table.unpack(GetGameplayCamCoords()) + local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1) + + local scale = (1/dist)*2 + local fov = (1/GetGameplayCamFov())*100 + local scale = scale*fov + + if onScreen then + SetTextScale(0.0*scale, 0.55*scale) + SetTextFont(4) + SetTextProportional(1) + -- SetTextScale(0.0, 0.55) + SetTextColour(255, 255, 255, 255) + SetTextDropshadow(0, 0, 0, 0, 255) + SetTextEdge(2, 0, 0, 0, 225) + SetTextDropShadow() + SetTextOutline() + SetTextEntry("STRING") + SetTextCentre(1) + AddTextComponentString(text) + DrawText(_x,_y) + end +end + +Citizen.CreateThread(function() + while true do + for i=0,99 do + N_0x31698aa80e0223f8(i) + end + for id = 0, 31 do + if ((NetworkIsPlayerActive( id )) and GetPlayerPed( id ) ~= GetPlayerPed( -1 )) then + ped = GetPlayerPed( id ) + blip = GetBlipFromEntity( ped ) + + x1, y1, z1 = table.unpack( GetEntityCoords( GetPlayerPed( -1 ), true ) ) + x2, y2, z2 = table.unpack( GetEntityCoords( GetPlayerPed( id ), true ) ) + distance = math.floor(GetDistanceBetweenCoords(x1, y1, z1, x2, y2, z2, true)) + + if(ignorePlayerNameDistance) and (isafk == false) then + DrawText3D(x2, y2, z2+1, GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50)) + end + + elseif(ignorePlayerNameDistance) and (isafk == true) then + DrawText3D(x2, y2, z2+1, "~r~[AFK] ~w~" .. GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50)) + end + + if ((distance < disPlayerNames)) and (isafk == false) then + if not (ignorePlayerNameDistance) then + DrawText3D(x2, y2, z2+1, GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50)) + end + end + elseif ((distance < disPlayerNames)) and (isafk == true) then + if not (ignorePlayerNameDistance) then + DrawText3D(x2, y2, z2+1, "~r~[AFK] ~w~" .. GetPlayerServerId(id) .. "~r~ | ~w~" .. string.sub(GetPlayerName(id), 1, 50)) + end + end + end + end + Citizen.Wait(0) + end +end) + +function toggleAFK() + if(isafk == nil) then + isafk = true + end + + if(isafk == true) then + isafk = false + end + + if(isafk == false) then + isafk = true + end +end + +RegisterCommand('afk', function() + toggleAFK() +end, false) + +--Register the /afk command +TriggerEvent('chat:addSuggestion', '/afk', 'Toggle AFK above your nametag.') \ No newline at end of file diff --git a/resources/Animated-Banners/__resource.lua b/resources/Animated-Banners/__resource.lua new file mode 100644 index 000000000..36ba01bdb --- /dev/null +++ b/resources/Animated-Banners/__resource.lua @@ -0,0 +1,2 @@ +resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937" +this_is_a_map 'yes' diff --git a/resources/Animated-Banners/change_texture.txt b/resources/Animated-Banners/change_texture.txt new file mode 100644 index 000000000..95eccae96 --- /dev/null +++ b/resources/Animated-Banners/change_texture.txt @@ -0,0 +1,2 @@ +use openiv to edit ytd "lafa2k_animation.ytd" file. +mods\update\x64\dlcpacks\lafa2k_animated\dlc.rpf\x64\levels\gta5\lafa2k_animated\props.rpf\ \ No newline at end of file diff --git a/resources/Animated-Banners/lafa2k_animatedbanner.oiv b/resources/Animated-Banners/lafa2k_animatedbanner.oiv new file mode 100644 index 000000000..af2ff09cf Binary files /dev/null and b/resources/Animated-Banners/lafa2k_animatedbanner.oiv differ diff --git a/resources/Animated-Banners/stream/_manifest.ymf b/resources/Animated-Banners/stream/_manifest.ymf new file mode 100644 index 000000000..dff7514c6 Binary files /dev/null and b/resources/Animated-Banners/stream/_manifest.ymf differ diff --git a/resources/Animated-Banners/stream/aniscroll.ycd b/resources/Animated-Banners/stream/aniscroll.ycd new file mode 100644 index 000000000..3c366fa89 Binary files /dev/null and b/resources/Animated-Banners/stream/aniscroll.ycd differ diff --git a/resources/Animated-Banners/stream/cyberscroll.ytyp b/resources/Animated-Banners/stream/cyberscroll.ytyp new file mode 100644 index 000000000..a9ba79b46 Binary files /dev/null and b/resources/Animated-Banners/stream/cyberscroll.ytyp differ diff --git a/resources/Animated-Banners/stream/lafa2k_animation.ydr b/resources/Animated-Banners/stream/lafa2k_animation.ydr new file mode 100644 index 000000000..c4f707829 --- /dev/null +++ b/resources/Animated-Banners/stream/lafa2k_animation.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cec9ac3c809160a6c90617c041557e8b930b622e42812bdc510e471019a613d1 +size 1780 diff --git a/resources/Animated-Banners/stream/lafa2k_animation.ymap b/resources/Animated-Banners/stream/lafa2k_animation.ymap new file mode 100644 index 000000000..68bb1037d --- /dev/null +++ b/resources/Animated-Banners/stream/lafa2k_animation.ymap @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a68eec38d5063890d2ba8e39eb282e4f4ae89170ed7d2694479abdee42dc6d18 +size 1247 diff --git a/resources/Animated-Banners/stream/lafa2k_animation.ytd b/resources/Animated-Banners/stream/lafa2k_animation.ytd new file mode 100644 index 000000000..22d53336d --- /dev/null +++ b/resources/Animated-Banners/stream/lafa2k_animation.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f16defe5b59e3378698752d39d4869d793e0afd9eda908332e1d43aab11cd2f1 +size 1039985 diff --git a/resources/Animated-Banners/stream/lafa2k_noanimated.ydr b/resources/Animated-Banners/stream/lafa2k_noanimated.ydr new file mode 100644 index 000000000..cd7538df1 --- /dev/null +++ b/resources/Animated-Banners/stream/lafa2k_noanimated.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e891c7689e84218d78a3e961121d8193af7986bd678515c2ad787b391d7317d +size 524 diff --git a/resources/Announcer/__resource.lua b/resources/Announcer/__resource.lua new file mode 100644 index 000000000..5972b0d2b --- /dev/null +++ b/resources/Announcer/__resource.lua @@ -0,0 +1,9 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +title 'Auto Announcements' +author 'Rage_YouTube' + +client_scripts { + 'config.lua', + 'client.lua' +} \ No newline at end of file diff --git a/resources/Announcer/client.lua b/resources/Announcer/client.lua new file mode 100644 index 000000000..5449abf0e --- /dev/null +++ b/resources/Announcer/client.lua @@ -0,0 +1,18 @@ +--============================================================ +-- Please do not touch or edit any of this code, unless your = +-- smarter than me and know what your doing. Thanks <3 ======= +--============================================================ + +local delay = config.delay * 60000 +local prefix = config.prefix +local messages = config.messages + +Citizen.CreateThread(function() + while true do + for a = 1, #config.messages do + TriggerEvent('chat:addMessage', {args = { prefix .. messages[a] }}) + Citizen.Wait(delay) + end + Citizen.Wait(0) + end +end) \ No newline at end of file diff --git a/resources/Announcer/config.lua b/resources/Announcer/config.lua new file mode 100644 index 000000000..20e0428bc --- /dev/null +++ b/resources/Announcer/config.lua @@ -0,0 +1,24 @@ +config = {} + +-- The delay is in minutes, so 10 will be 10 minutes. +config.delay = 10 + +-- If you understand color coding in text, you will know what the ^[NumberHere] is for, otherwise refer to the guide on the page. +config.prefix = '^*^8[Announcement] ^7' + +--=================================================================== +-- Add any message you want within the '' This is an unlimited list = +-- so you can add as many messages as you want, make sure =========== +-- to use , after '' before the last message on the list. =========== +--=================================================================== +config.messages = { + 'CAD is a requirement on our server! You can join by heading to: cad.elite-gaming.co.uk', + 'Join our discord for news and updates by using /discord! (discord.gg/2XvwvgR)', + 'Any suggestions are welcome to be shared at our Elite Gaming RP discord server!', + 'Want to apply for a job? Head over to: forum.elite-gaming.co.uk and apply for a role today!', + 'Did you know we have over 50+ add-on interiors around the map!', + 'Need help around the server? Head over to our discord to access the #server-faq channel which has useful guides!', + 'The AOP can be found next to the minimap, which shows where the Area Of Patrol is currently located.' + 'Server Status can be found on our discord through Elite Bot!' + 'We have move EGRP into the main EGUK discord. Make sure to join the EGUK discord through: discord.gg/2XvwvgR' +} \ No newline at end of file diff --git a/resources/AntiPG/client.lua b/resources/AntiPG/client.lua new file mode 100644 index 000000000..1a747beef --- /dev/null +++ b/resources/AntiPG/client.lua @@ -0,0 +1,162 @@ +local vehicle = nil +local isDriver = false +local fTractionLossMult = nil +local isModed = false +local class = nil +local isBlacklisted = false + +local classMod = { + [0]= 2.51, -- Compacts + [1] = 2.51, --Sedans + [2] = 1.01, --SUVs + [3] = 2.51, --Coupes + [4] = 2.501, --Muscle + [5] = 2.51, --Sports Classics + [6] = 2.51, --Sports + [7] = 2.51, --Super + [8] = 1.51, --Motorcycles + [9] = 0, --Off-road + [10] = 0, --Industrial + [11] = 0, --Utility + [12] = 2.21, --Vans + [13] = 0, --Cycles + [14] = 0, --Boats + [15] = 0, --Helicopters + [16] = 0, --Planes + [17] = 0, --Service + [18] = 2.21, --Emergency + [19] = 0, --Military + [20] = 2.21, --Commercial + [21] = 0 --Trains +} + +local blackListed = { + 788045382, --"sanchez" + -1453280962,--"sanchez2" + 1753414259, --"enduro" + 2035069708, --"esskey" + 86520421, --"bf400" + -- Here you can add some vehicles hash +} + +Citizen.CreateThread(function() + while true do + local ped = GetPlayerPed(-1) + if IsPedInAnyVehicle(ped, false) then + if vehicle == nil then + vehicle = GetVehiclePedIsUsing(ped) + if GetPedInVehicleSeat(vehicle, -1) == ped then + isDriver = true + if DecorExistOn(vehicle, 'fTractionLossMult') then + fTractionLossMult = DecorGetFloat(vehicle, 'fTractionLossMult') + --print("Default value: "..fTractionLossMult) + else + fTractionLossMult = GetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fTractionLossMult') + DecorRegister('fTractionLossMult', 1) + DecorSetFloat(vehicle,'fTractionLossMult', fTractionLossMult) + --print("Default value: "..fTractionLossMult) + end + class = GetVehicleClass(vehicle) + isBlacklisted = isModelBlacklisted(GetEntityModel(vehicle)) + end + end + else + if vehicle ~= nil then + if DoesEntityExist(vehicle) then + setTractionLost (fTractionLossMult) + end + Citizen.Wait(1000) + vehicle = nil + isDriver = false + fTractionLossMult = nil + isModed = false + class = nil + isBlacklisted = false + end + end + Citizen.Wait(2000) + end +end) + +Citizen.CreateThread(function() + while true do + if isBlacklisted == false then + if vehicle ~= nil and isDriver == true then + local speed = GetEntitySpeed(vehicle)*3.6 + if not pointingRoad(vehicle) then + if groundAsphalt() or speed <= 35.0 then + if isModed == true then + isModed = false + setTractionLost (fTractionLossMult) + end + else + if isModed == false and speed > 35.0 then + isModed = true + setTractionLost (fTractionLossMult + classMod[class]) + end + end + else + if isModed == true then + isModed = false + setTractionLost (fTractionLossMult) + end + end + end + end + Citizen.Wait(500) + end +end) + +function setTractionLost (value) + if isBlacklisted == false and vehicle ~= nil and value ~= nil then + SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fTractionLossMult', value) + --print("fTractionLossMult: "..value) + end +end + +function isModelBlacklisted(model) + local found = false + for i = 1, #blackListed do + if blackListed[i] == model then + found = true + break + end + end + return found +end + +function groundAsphalt() + local ped = PlayerPedId() + + local playerCoord = GetEntityCoords(ped) + local target = GetOffsetFromEntityInWorldCoords(ped, vector3(0,2,-3)) + local testRay = StartShapeTestRay(playerCoord, target, 17, ped, 7) -- This 7 is entirely cargo cult. No idea what it does. + local _, hit, hitLocation, surfaceNormal, material, _ = GetShapeTestResultEx(testRay) + + if hit then + --print (material) + if material == 282940568 then + return true + else + return false + end + else + return false + end +end + +function pointingRoad(veh) + local pos = GetEntityCoords(veh, true) + if IsPointOnRoad(pos.x,pos.y,pos.z-1,false) then + return true + end + local pos2 = GetOffsetFromEntityInWorldCoords(veh, 1.5, 0, 0) + local pos3 = GetOffsetFromEntityInWorldCoords(veh, -1.5, 0, 0) + if IsPointOnRoad(pos2.x,pos2.y,pos2.z-1,false) then + return true + end + if IsPointOnRoad(pos3.x,pos3.y,pos3.z,false) then + return true + end + return false +end diff --git a/resources/AntiPG/fxmanifest.lua b/resources/AntiPG/fxmanifest.lua new file mode 100644 index 000000000..31220cd36 --- /dev/null +++ b/resources/AntiPG/fxmanifest.lua @@ -0,0 +1,9 @@ +fx_version 'bodacious' +game 'gta5' +description 'AntiPowerGaming - CFX.RE release' +author 'Sosa#2021' + +client_scripts { + 'client.lua' +} + diff --git a/resources/BusinessAds/__resource.lua b/resources/BusinessAds/__resource.lua new file mode 100644 index 000000000..4bb20a462 --- /dev/null +++ b/resources/BusinessAds/__resource.lua @@ -0,0 +1,2 @@ +client_script 'client.lua' +server_script 'server.lua' \ No newline at end of file diff --git a/resources/BusinessAds/client.lua b/resources/BusinessAds/client.lua new file mode 100644 index 000000000..867d058a0 --- /dev/null +++ b/resources/BusinessAds/client.lua @@ -0,0 +1,493 @@ +RegisterNetEvent("TrafficAlert") +AddEventHandler("TrafficAlert",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncTrafficAlert', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayTrafficAlert') +AddEventHandler('DisplayTrafficAlert',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_LS_TOURIST_BOARD", "CHAR_LS_TOURIST_BOARD", true, 1, "~y~LS Traffic~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("AmmuAd") +AddEventHandler("AmmuAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncAmmuAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayAmmuAd') +AddEventHandler('DisplayAmmuAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_AMMUNATION", "CHAR_AMMUNATION", true, 1, "~y~Ammunation~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("AmmuAd") +AddEventHandler("AmmuAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncAmmuAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayAmmuAd') +AddEventHandler('DisplayAmmuAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_AMMUNATION", "CHAR_AMMUNATION", true, 1, "~y~Ammunation~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("FleecaAd") +AddEventHandler("FleecaAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncFleecaAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayFleecaAd') +AddEventHandler('DisplayFleecaAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_BANK_FLEECA", "CHAR_BANK_FLEECA", true, 1, "~y~Fleeca Bank~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("MBankAd") +AddEventHandler("MBankAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncMBankAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayMBankAd') +AddEventHandler('DisplayMBankAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_BANK_MAZE", "CHAR_BANK_MAZE", true, 1, "~y~Maze Bank~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("LMotorsAd") +AddEventHandler("LMotorsAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncLMotorsAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayLMotorsAd') +AddEventHandler('DisplayLMotorsAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_CARSITE", "CHAR_CARSITE", true, 1, "~y~Legendary Motorsports~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("SAMotorsAd") +AddEventHandler("SAMotorsAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncSAMotorsAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplaySAMotorsAd') +AddEventHandler('DisplaySAMotorsAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_CARSITE2", "CHAR_CARSITE2", true, 1, "~y~San Andreas Motorsports~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("LSCustomsAd") +AddEventHandler("LSCustomsAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncLSCustomsAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayLSCustomsAd') +AddEventHandler('DisplayLSCustomsAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_LS_CUSTOMS", "CHAR_LS_CUSTOMS", true, 1, "~y~LS Customs~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("CabAd") +AddEventHandler("CabAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncCabAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayCabAd') +AddEventHandler('DisplayCabAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_TAXI", "CHAR_TAXI", true, 1, "~y~Downtown Cab Co.~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("FBAd") +AddEventHandler("FBAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncFBAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayFBAd') +AddEventHandler('DisplayFBAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_FACEBOOK", "CHAR_FACEBOOK", true, 1, "~y~Facebook~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("247Ad") +AddEventHandler("247Ad",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('Sync247Ad', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('Display247Ad') +AddEventHandler('Display247Ad',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_PROPERTY_WEED_SHOP", "CHAR_PROPERTY_WEED_SHOP", true, 1, "~y~247 Store~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("YoutubeAd") +AddEventHandler("YoutubeAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncYoutubeAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayYoutubeAd') +AddEventHandler('DisplayYoutubeAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_YOUTUBE", "CHAR_YOUTUBE", true, 1, "~y~Youtube~s~", ""); +DrawNotification(false, true); + +end) + +RegisterNetEvent("MilitaryAd") +AddEventHandler("MilitaryAd",function() + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + local input = true + Citizen.CreateThread(function() + while input do + if input == true then + HideHudAndRadarThisFrame() + if UpdateOnscreenKeyboard() == 3 then + input = false + elseif UpdateOnscreenKeyboard() == 1 then + local inputText = GetOnscreenKeyboardResult() + if string.len(inputText) > 0 then + TriggerServerEvent('SyncMilitaryAd', inputText) + input = false + else + DisplayOnscreenKeyboard(false, "FMMC_KEY_TIP8", "", "", "", "", "", 150) + end + elseif UpdateOnscreenKeyboard() == 2 then + input = false + end + end + Citizen.Wait(0) + end + +end) +end) + +RegisterNetEvent('DisplayMilitaryAd') +AddEventHandler('DisplayMilitaryAd',function(inputText) + +SetNotificationTextEntry("STRING"); +AddTextComponentString(inputText); +SetNotificationMessage("CHAR_MP_MERRYWEATHER", "CHAR_MP_MERRYWEATHER", true, 1, "~y~SA Military~s~", ""); +DrawNotification(false, true); + +end) \ No newline at end of file diff --git a/resources/BusinessAds/server.lua b/resources/BusinessAds/server.lua new file mode 100644 index 000000000..ce36c8079 --- /dev/null +++ b/resources/BusinessAds/server.lua @@ -0,0 +1,142 @@ +RegisterServerEvent("SyncTrafficAlert") +AddEventHandler('SyncTrafficAlert', function(inputText) +TriggerClientEvent('DisplayTrafficAlert', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad traffic" then + CancelEvent() + TriggerClientEvent("TrafficAlert", from) + end +end) + +RegisterServerEvent("SyncAmmuAd") +AddEventHandler('SyncAmmuAd', function(inputText) +TriggerClientEvent('DisplayAmmuAd', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad ammunation" then + CancelEvent() + TriggerClientEvent("AmmuAd", from) + end +end) + +RegisterServerEvent("SyncFleecaAd") +AddEventHandler('SyncFleecaAd', function(inputText) +TriggerClientEvent('DisplayFleecaAd', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad fleeca" then + CancelEvent() + TriggerClientEvent("FleecaAd", from) + end +end) + +RegisterServerEvent("SyncMBankAd") +AddEventHandler('SyncMBankAd', function(inputText) +TriggerClientEvent('DisplayMBankAd', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad mazebank" then + CancelEvent() + TriggerClientEvent("MBankAd", from) + end +end) + +RegisterServerEvent("SyncLMotorsAd") +AddEventHandler('SyncLMotorsAd', function(inputText) +TriggerClientEvent('DisplayLMotorsAd', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad lmotors" then + CancelEvent() + TriggerClientEvent("LMotorsAd", from) + end +end) + +RegisterServerEvent("SyncSAMotorsAd") +AddEventHandler('SyncSAMotorsAd', function(inputText) +TriggerClientEvent('DisplaySAMotorsAd', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad samotors" then + CancelEvent() + TriggerClientEvent("SAMotorsAd", from) + end +end) + +RegisterServerEvent("SyncLSCustomsAd") +AddEventHandler('SyncLSCustomsAd', function(inputText) +TriggerClientEvent('DisplayLSCustomsAd', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad lscustoms" then + CancelEvent() + TriggerClientEvent("LSCustomsAd", from) + end +end) + +RegisterServerEvent("SyncCabAd") +AddEventHandler('SyncCabAd', function(inputText) +TriggerClientEvent('DisplayCabAd', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad taxi" then + CancelEvent() + TriggerClientEvent("CabAd", from) + end +end) + +RegisterServerEvent("Sync247Ad") +AddEventHandler('Sync247Ad', function(inputText) +TriggerClientEvent('Display247Ad', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad 247" then + CancelEvent() + TriggerClientEvent("247Ad", from) + end +end) + +RegisterServerEvent("SyncYoutubeAd") +AddEventHandler('SyncYoutubeAd', function(inputText) +TriggerClientEvent('DisplayYoutubeAd', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad youtube" then + CancelEvent() + TriggerClientEvent("YoutubeAd", from) + end +end) + +RegisterServerEvent("SyncMilitaryAd") +AddEventHandler('SyncMilitaryAd', function(inputText) +TriggerClientEvent('DisplayMilitaryAd', -1, inputText) +end) + + +AddEventHandler('chatMessage', function(from, name, message) + if message == "/ad military" then + CancelEvent() + TriggerClientEvent("MilitaryAd", from) + end +end) \ No newline at end of file diff --git a/resources/CalmAI/.gitattributes b/resources/CalmAI/.gitattributes new file mode 100644 index 000000000..dfe077042 --- /dev/null +++ b/resources/CalmAI/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/resources/CalmAI/LICENSE b/resources/CalmAI/LICENSE new file mode 100644 index 000000000..97d5eea7f --- /dev/null +++ b/resources/CalmAI/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jordan.#2139 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/resources/CalmAI/README.md b/resources/CalmAI/README.md new file mode 100644 index 000000000..283b7caa1 --- /dev/null +++ b/resources/CalmAI/README.md @@ -0,0 +1,29 @@ +# Calm-AI V3 +## What is it? +Essentially Calm-AI V3 is a script that takes the old Calm-AI by NickThe0ne but improves it by adding a feature that lets you control the amount of AI around you as well all in a nice config file. This script is 100% standalone and requires minimal configuration. You can configure the AI density(amount of AI) in the `config.lua` and manage the AI relationships in the `relationships.dat` file. This script also allows for the disabling of AI dispatching as a whole. + +### Configuration +``` +------------------------------------------------------------- +-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 -- +------------------------------------------------------------- + +------------------------------------------------------- +-- CONFIG YOUR PERIPHERALS HERE! -- +------------------------------------------------------- +Config = { + VehDensity = 1, -- How many vehicles are driving (10 - 1) | The lower the number the less cars + PedDensity = 1, -- How many AI are around (10 - 1) | The lower the number the less AI + RanVehDensity = 1, -- How many Random Cars (10 - 1) | The lower the number the less cars + ParkCarDensity = 1, -- How many parked cars (10 - 1) | The lower the number the less cars + ScenePedDensity = 1, -- How many AI doing emotes (scenarios) (10 - 1) | The lower the number the less AI + DispatchDead = true, -- Do you want AI to dispatch? True = No | False = Yes + } + -------------------------- + -- ^^^ DO THAT HERE ^^^ -- + -------------------------- +``` +# Acknowledgments +- NickThe0ne- Inital Calm-AI Release +# TJH Development Discord +[![Developer Discord](https://discordapp.com/api/guilds/696266949348425739/widget.png?style=banner4)](https://discord.com/invite/x7cYjg5) diff --git a/resources/CalmAI/client.lua b/resources/CalmAI/client.lua new file mode 100644 index 000000000..3e26dcba7 --- /dev/null +++ b/resources/CalmAI/client.lua @@ -0,0 +1,49 @@ +------------------------------------------------------------- +-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 -- +------------------------------------------------------------- +---------------------------------------------------------------------------------------------- + -- !WARNING! !WARNING! !WARNING! !WARNING! !WARNING! -- + -- DO NOT TOUCH THIS FILE OR YOU /WILL/ FUCK SHIT UP! EDIT THE CONFIG.LUA -- +-- DO NOT BE STUPID AND WHINE TO ME ABOUT THIS BEING BROKEN IF YOU TOUCHED THE LINES BELOW. -- +---------------------------------------------------------------------------------------------- + +SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_HILLBILLY"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_BALLAS"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_MEXICAN"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_FAMILY"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_MARABUNTE"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("AMBIENT_GANG_SALVA"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("GANG_1"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("GANG_2"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("GANG_9"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("GANG_10"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("FIREMAN"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("MEDIC"), GetHashKey('PLAYER')) +SetRelationshipBetweenGroups(1, GetHashKey("COP"), GetHashKey('PLAYER')) + +Citizen.CreateThread(function() + while true do + Citizen.Wait(0) + SetVehicleDensityMultiplierThisFrame(Config.VehDensity) + SetPedDensityMultiplierThisFrame(Config.PedDensity) + SetRandomVehicleDensityMultiplierThisFrame(Config.RanVehDensity) + SetParkedVehicleDensityMultiplierThisFrame(Config.ParkCarDensity) + SetScenarioPedDensityMultiplierThisFrame(Config.ScenePedDensity, Config.ScenePedDensity) + end +end) + + Citizen.CreateThread(function() + if Config.DispatchDead then + while true do + Wait(0) + for i = 1, 12 do + EnableDispatchService(i, false) + end + SetPlayerWantedLevel(PlayerId(), 0, false) + SetPlayerWantedLevelNow(PlayerId(), false) + SetPlayerWantedLevelNoDrop(PlayerId(), 0, false) + end + else + end + end) + \ No newline at end of file diff --git a/resources/CalmAI/config.lua b/resources/CalmAI/config.lua new file mode 100644 index 000000000..fd39052e5 --- /dev/null +++ b/resources/CalmAI/config.lua @@ -0,0 +1,18 @@ +------------------------------------------------------------- +-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 -- +------------------------------------------------------------- + +------------------------------------------------------- +-- CONFIG YOUR PERIPHERALS HERE! -- +------------------------------------------------------- +Config = { + VehDensity = 0.90, -- How many vehicles are driving (0.0 - 1.0) | The lower the number the less cars + PedDensity = 0.85, -- How many AI are around (0.0 - 1.0) | The lower the number the less AI + RanVehDensity = 0.85, -- How many Random Cars (0.0 - 1.0) | The lower the number the less cars + ParkCarDensity = 0.90, -- How many parked cars (0.0 - 1.0) | The lower the number the less cars + ScenePedDensity = 0.35, -- How many AI doing emotes (scenarios) (0.0 - 1.0) | The lower the number the less AI + DispatchDead = true, -- Do you want AI to dispatch? True = No | False = Yes + } + -------------------------- + -- ^^^ DO THAT HERE ^^^ -- + -------------------------- diff --git a/resources/CalmAI/events.meta b/resources/CalmAI/events.meta new file mode 100644 index 000000000..785733797 --- /dev/null +++ b/resources/CalmAI/events.meta @@ -0,0 +1,6489 @@ + + + + + + + + + RESPONSE_TASK_GUN_AIMED_AT + + + RESPONSE_TASK_TURN_TO_FACE + + + + RESPONSE_POLICE_TASK_WANTED + + + RESPONSE_SWAT_TASK_WANTED + + + RESPONSE_TASK_CROUCH + + + + RESPONSE_TASK_COWER + + + RESPONSE_TASK_WALK_ROUND_FIRE + + + RESPONSE_TASK_HANDS_UP + + + RESPONSE_TASK_LEAVE_CAR_AND_FLEE + + + RESPONSE_TASK_COMBAT + + + RESPONSE_TASK_THREAT + + + RESPONSE_TASK_FLEE + + + + RESPONSE_TASK_SCENARIO_FLEE + + + + RESPONSE_TASK_FLY_AWAY + + + + RESPONSE_TASK_WALK_ROUND_ENTITY + + + RESPONSE_TASK_HEAD_TRACK + + + RESPONSE_TASK_SHOCKING_EVENT_GOTO + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + RESPONSE_TASK_SHOCKING_EVENT_WATCH + + + RESPONSE_TASK_EVASIVE_STEP + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + RESPONSE_TASK_ESCAPE_BLAST + + + RESPONSE_TASK_AGITATED + + + RESPONSE_TASK_EXPLOSION + + + RESPONSE_TASK_DUCK_AND_COVER + + + RESPONSE_TASK_SHOCKING_EVENT_REACT_TO_AIRCRAFT + + + RESPONSE_TASK_SHOCKING_EVENT_REACT + + + RESPONSE_TASK_SHOCKING_EVENT_BACK_AWAY + + + RESPONSE_TASK_SHOCKING_EVENT_STOP_AND_STARE + + + RESPONSE_TASK_SHARK_ATTACK + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + RESPONSE_TASK_GROWL_AND_FLEE + + + RESPONSE_TASK_WALK_AWAY + + + RESPONSE_TASK_AGGRESSIVE_RUBBERNECK + + + RESPONSE_TASK_SHOCKING_NICE_CAR + + + RESPONSE_TASK_FRIENDLY_NEAR_MISS + + + RESPONSE_TASK_FRIENDLY_AIMED_AT + + + RESPONSE_TASK_DEFER_TO_SCENARIO_POINT_FLAGS + + + RESPONSE_TASK_SHOCKING_EVENT_THREAT_RESPONSE + + + RESPONSE_TASK_PLAYER_DEATH + + + + + DEFAULT_RESPONSE_EXPLOSION + EVENT_EXPLOSION + + + RESPONSE_TASK_EXPLOSION + + + + + + + ValidOnFoot NotValidInComplexScenario + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidOnlyInComplexScenario + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + COP_RESPONSE_EXPLOSION + EVENT_EXPLOSION + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + FAMILY_RESPONSE_EXPLOSION + EVENT_EXPLOSION + + + RESPONSE_TASK_EXPLOSION + + + + + + + ValidOnFoot NotValidInComplexScenario ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidOnlyInComplexScenario ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + TURN_TO_FACE_RESPONSE_MUGGING + EVENT_SHOCKING_MUGGING + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + INVESTIGATE_RESPONSE_MUGGING + EVENT_SHOCKING_MUGGING + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_MUGGING + EVENT_SHOCKING_MUGGING + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOT_FIRED + EVENT_SHOT_FIRED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli InvalidIfFriendlyWithTarget + + + + + GANG_RESPONSE_SHOT_FIRED + EVENT_SHOT_FIRED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle + + + + + FIREMAN_RESPONSE_SHOT_FIRED + EVENT_SHOT_FIRED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidInHeli + + + + + MEDIC_RESPONSE_SHOT_FIRED + EVENT_SHOT_FIRED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + FAMILY_RESPONSE_SHOT_FIRED + EVENT_SHOT_FIRED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + FISH_RESPONSE_FLEE + EVENT_ENCROACHING_PED + + + RESPONSE_TASK_SCENARIO_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + DisableCover + + + + + SHARK_ATTACK_ENCROACHING + EVENT_ENCROACHING_PED + + + RESPONSE_TASK_SHARK_ATTACK + + + + + + + ValidOnFoot NotValidInComplexScenario InvalidIfThereAreAttackingSharks InvalidIfSourceIsAnAnimal + + + + + SHARK_ATTACK_HATE + EVENT_ACQUAINTANCE_PED_HATE + + + RESPONSE_TASK_SHARK_ATTACK + + + + + + + ValidOnFoot NotValidInComplexScenario InvalidIfThereAreAttackingSharks InvalidIfSourceIsAnAnimal + + + + + FLEE_RESPONSE_ENCROACHMENT + EVENT_ENCROACHING_PED + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + WALK_AWAY_RESPONSE_ENCROACHMENT + EVENT_ENCROACHING_PED + + + RESPONSE_TASK_WALK_AWAY + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + GULL_RESPONSE_FLEE + EVENT_ENCROACHING_PED + + + RESPONSE_TASK_FLY_AWAY + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + GULL_RESPONSE_EXPLOSION + EVENT_EXPLOSION + + + RESPONSE_TASK_FLY_AWAY + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + GULL_RESPONSE_GUNSHOT + EVENT_SHOT_FIRED + + + RESPONSE_TASK_FLY_AWAY + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + HEN_RESPONSE_FLEE + EVENT_ENCROACHING_PED + + + RESPONSE_TASK_SCENARIO_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + DisableCover + + + + + RAT_RESPONSE_FLEE + EVENT_ENCROACHING_PED + + + RESPONSE_TASK_SCENARIO_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + DisableCover + + + + + FLEE_RESPONSE_DAMAGE + EVENT_DAMAGE + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + FLEE_RESPONSE_FOOT_STEP_HEARD + EVENT_FOOT_STEP_HEARD + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + FLEE_RESPONSE_EXPLOSION + EVENT_EXPLOSION + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + FLEE_RESPONSE_SHOCKING_EXPLOSION + EVENT_SHOCKING_EXPLOSION + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + FLEE_RESPONSE_CAR_CRASH + EVENT_SHOCKING_CAR_CRASH + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + DOG_RESPONSE_CAR_CRASH + EVENT_SHOCKING_CAR_CRASH + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + + + DOG_RESPONSE_INJURED_PED + EVENT_SHOCKING_INJURED_PED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfSource ValidOnlyIfFriendlyWithTarget InvalidIfSourceEntityIsOtherEntity + + + + + DOG_RESPONSE_SEEN_PED_KILLED + EVENT_SHOCKING_SEEN_PED_KILLED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfSource ValidOnlyIfFriendlyWithTarget InvalidIfSourceEntityIsOtherEntity + + + + + FLEE_RESPONSE_SEEN_PED_RUN_OVER + EVENT_SHOCKING_PED_RUN_OVER + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + FLEE_RESPONSE_INJURED_PED + EVENT_SHOCKING_INJURED_PED + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + FLEE_RESPONSE_HELICOPTER + EVENT_SHOCKING_HELICOPTER_OVERHEAD + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + FLEE_RESPONSE_PLANE + EVENT_SHOCKING_PLANE_FLY_BY + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + FLEE_RESPONSE_SHOT_FIRED + EVENT_SHOT_FIRED + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + FLEE_RESPONSE_SHOT_FIRED_WHIZZED_BY + EVENT_SHOT_FIRED_WHIZZED_BY + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + FLEE_RESPONSE_SHOT_FIRED_BULLET_IMPACT + EVENT_SHOT_FIRED_BULLET_IMPACT + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + COMBAT_RESPONSE_FOOT_STEP_HEARD + EVENT_FOOT_STEP_HEARD + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + GROWL_RESPONSE_SHOT_FIRED + EVENT_SHOT_FIRED + + + RESPONSE_TASK_GROWL_AND_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + GROWL_RESPONSE_SHOT_FIRED_WHIZZED_BY + EVENT_SHOT_FIRED_WHIZZED_BY + + + RESPONSE_TASK_GROWL_AND_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + GROWL_RESPONSE_SHOT_FIRED_BULLET_IMPACT + EVENT_SHOT_FIRED_BULLET_IMPACT + + + RESPONSE_TASK_GROWL_AND_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + COMBAT_RESPONSE_ENCROACHMENT + EVENT_ENCROACHING_PED + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + GROWL_RESPONSE_HORN + EVENT_SHOCKING_HORN_SOUNDED + + + RESPONSE_TASK_GROWL_AND_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_DAMAGE + EVENT_DAMAGE + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_CAR_CRASH + EVENT_SHOCKING_CAR_CRASH + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_HORN + EVENT_SHOCKING_HORN_SOUNDED + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_INJURED_PED + EVENT_SHOCKING_INJURED_PED + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_HELICOPTER + EVENT_SHOCKING_HELICOPTER_OVERHEAD + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_PLANE + EVENT_SHOCKING_PLANE_FLY_BY + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_SHOCKING_EXPLOSION + EVENT_SHOCKING_EXPLOSION + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_SEEN_PED_RUN_OVER + EVENT_SHOCKING_PED_RUN_OVER + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_EXPLOSION + EVENT_EXPLOSION + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_SHOT_FIRED + EVENT_SHOT_FIRED + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_SHOT_FIRED_WHIZZED_BY + EVENT_SHOT_FIRED_WHIZZED_BY + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_SHOT_FIRED_BULLET_IMPACT + EVENT_SHOT_FIRED_BULLET_IMPACT + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + EXHAUSTED_FLEE_RESPONSE_SHOCKING_MELEE_ACTION + EVENT_SHOCKING_SEEN_MELEE_ACTION + + + RESPONSE_TASK_EXHAUSTED_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + HORSE_FLEE_RESPONSE_DAMAGE + EVENT_DAMAGE + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot InvalidIfHasARider NotValidInComplexScenario + + + + + HORSE_FLEE_RESPONSE_EXPLOSION + EVENT_EXPLOSION + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot InvalidIfHasARider NotValidInComplexScenario + + + + + HORSE_FLEE_RESPONSE_SHOT_FIRED + EVENT_SHOT_FIRED + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot InvalidIfHasARider NotValidInComplexScenario + + + + + HORSE_FLEE_RESPONSE_SHOT_FIRED_WHIZZED_BY + EVENT_SHOT_FIRED_WHIZZED_BY + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot InvalidIfHasARider NotValidInComplexScenario + + + + + HORSE_FLEE_RESPONSE_SHOT_FIRED_BULLET_IMPACT + EVENT_SHOT_FIRED_BULLET_IMPACT + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot InvalidIfHasARider NotValidInComplexScenario + + + + + HORSE_FLEE_RESPONSE_SHOCKING_MELEE_ACTION + EVENT_SHOCKING_SEEN_MELEE_ACTION + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot InvalidIfHasARider NotValidInComplexScenario + + + + + DEFAULT_RESPONSE_HATE + EVENT_ACQUAINTANCE_PED_HATE + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle + + + + + DEFAULT_RESPONSE_WANTED + EVENT_ACQUAINTANCE_PED_WANTED + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot ValidInCar ValidInHeli ValidOnBicycle + + + + + DEFAULT_RESPONSE_INJURED_CRY_FOR_HELP + EVENT_INJURED_CRY_FOR_HELP + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + + + DEFAULT_RESPONSE_CRIME_CRY_FOR_HELP + EVENT_CRIME_CRY_FOR_HELP + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInHeli + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidOnlyIfSourceIsNotThreatening + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnlyIfSourceIsThreatening + + + + + GANG_RESPONSE_CRIME_CRY_FOR_HELP + EVENT_CRIME_CRY_FOR_HELP + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + COP_RESPONSE_SHOCKING_CAR_ALARM + EVENT_SHOCKING_CAR_ALARM + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle ValidInHeli + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli ValidOnFoot ValidOnBicycle + + + + + COP_RESPONSE_PROPERTY_DAMAGE + EVENT_SHOCKING_PROPERTY_DAMAGE + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidOnBicycle ValidInCar + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle ValidInCar + + + + + COP_RESPONSE_CRIME_CRY_FOR_HELP + EVENT_CRIME_CRY_FOR_HELP + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot ValidInCar + + + + + COP_RESPONSE_WANTED + EVENT_ACQUAINTANCE_PED_WANTED + + + RESPONSE_POLICE_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_WANTED + EVENT_ACQUAINTANCE_PED_WANTED + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_DAMAGE + EVENT_DAMAGE + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_SHOT_FIRED + EVENT_SHOT_FIRED + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_SHOT_FIRED_WHIZZED_BY + EVENT_SHOT_FIRED_WHIZZED_BY + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_SHOT_FIRED_BULLET_IMPACT + EVENT_SHOT_FIRED_BULLET_IMPACT + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_GUN_AIMED_AT + EVENT_GUN_AIMED_AT + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_SHOUT_TARGET_POSITION + EVENT_SHOUT_TARGET_POSITION + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_MELEE + EVENT_MELEE_ACTION + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_VEHICLE_DAMAGE_WEAPON + EVENT_VEHICLE_DAMAGE_WEAPON + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_DRAGGED_OUT_CAR + EVENT_DRAGGED_OUT_CAR + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidOnFoot ValidInCar ValidInHeli + + + + + SWAT_RESPONSE_PED_ENTERED_MY_VEHICLE + EVENT_PED_ENTERED_MY_VEHICLE + + + RESPONSE_SWAT_TASK_WANTED + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_VEHICLE_DAMAGE_WEAPON + EVENT_VEHICLE_DAMAGE_WEAPON + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot ValidInCar ValidInHeli ValidOnBicycle + + + + + FAMILY_RESPONSE_VEHICLE_DAMAGE_WEAPON + EVENT_VEHICLE_DAMAGE_WEAPON + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle + + + + + DEFAULT_RESPONSE_VEHICLE_ON_FIRE + EVENT_VEHICLE_ON_FIRE + + + RESPONSE_TASK_LEAVE_CAR_AND_FLEE + + + + + + + ValidInCar ValidOnBicycle + + + + + DEFAULT_RESPONSE_GUN_AIMED_AT + EVENT_GUN_AIMED_AT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HANDS_UP + + + + + + + ValidOnFoot + + + RESPONSE_TASK_GUN_AIMED_AT + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_NON_VIOLENT_WEAPON_AIMED_AT + EVENT_SHOCKING_NON_VIOLENT_WEAPON_AIMED_AT + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + TURN_TO_FACE_RESPONSE_SHOCKING_NON_VIOLENT_WEAPON_AIMED_AT + EVENT_SHOCKING_NON_VIOLENT_WEAPON_AIMED_AT + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_GUN_AIMED_AT + EVENT_GUN_AIMED_AT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOT_FIRED_BULLET_IMPACT + EVENT_SHOT_FIRED_BULLET_IMPACT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli InvalidIfFriendlyWithTarget + + + + + FIREMAN_RESPONSE_SHOT_FIRED_BULLET_IMPACT + EVENT_SHOT_FIRED_BULLET_IMPACT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidInHeli + + + + + MEDIC_RESPONSE_SHOT_FIRED_BULLET_IMPACT + EVENT_SHOT_FIRED_BULLET_IMPACT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidInHeli + + + + + FRIENDLY_RESPONSE_GUN_AIMED_AT + EVENT_FRIENDLY_AIMED_AT + + + RESPONSE_TASK_FRIENDLY_AIMED_AT + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + FAMILY_RESPONSE_FRIENDLY_AIMED_AT + EVENT_FRIENDLY_AIMED_AT + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidInCar ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + DEFAULT_RESPONSE_SHOUT_TARGET_POSITION + EVENT_SHOUT_TARGET_POSITION + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot ValidInCar ValidInHeli ValidOnBicycle + + + + + DEFAULT_RESPONSE_DAMAGE + EVENT_DAMAGE + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot ValidInCar ValidInHeli ValidOnBicycle + + + + + FAMILY_RESPONSE_DAMAGE + EVENT_DAMAGE + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + DEFAULT_RESPONSE_SHOT_FIRED_WHIZZED_BY + EVENT_SHOT_FIRED_WHIZZED_BY + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli InvalidIfFriendlyWithTarget + + + + + FIREMAN_RESPONSE_SHOT_FIRED_WHIZZED_BY + EVENT_SHOT_FIRED_WHIZZED_BY + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidInHeli + + + + + MEDIC_RESPONSE_SHOT_FIRED_WHIZZED_BY + EVENT_SHOT_FIRED_WHIZZED_BY + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidInHeli + + + + + GANG_RESPONSE_SHOT_FIRED_WHIZZED_BY + EVENT_SHOT_FIRED_WHIZZED_BY + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle + + + + + FRIENDLY_RESPONSE_TASK_NEAR_MISS + EVENT_FRIENDLY_FIRE_NEAR_MISS + + + RESPONSE_TASK_FRIENDLY_NEAR_MISS + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + FAMILY_RESPONSE_FRIENDLY_FIRE_NEAR_MISS + EVENT_FRIENDLY_FIRE_NEAR_MISS + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + DEFAULT_RESPONSE_MELEE + EVENT_MELEE_ACTION + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + FAMILY_RESPONSE_MELEE_ACTION + EVENT_MELEE_ACTION + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + FLEE_RESPONSE_SHOCKING_MELEE_ACTION + EVENT_SHOCKING_SEEN_MELEE_ACTION + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + DEFAULT_RESPONSE_POTENTIAL_WALK_INTO_FIRE + EVENT_POTENTIAL_WALK_INTO_FIRE + + + RESPONSE_TASK_WALK_ROUND_FIRE + + + + + + + ValidOnFoot + + + + + DEFAULT_RESPONSE_EVENT_DRAGGED_OUT_CAR + EVENT_DRAGGED_OUT_CAR + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + + + DEFAULT_RESPONSE_EVENT_PED_ENTERED_MY_VEHICLE + EVENT_PED_ENTERED_MY_VEHICLE + + + RESPONSE_TASK_LEAVE_CAR_AND_FLEE + + + + + + + ValidInCar + + + + + DEFAULT_RESPONSE_POTENTIAL_WALK_INTO_VEHICLE + EVENT_POTENTIAL_WALK_INTO_VEHICLE + + + RESPONSE_TASK_WALK_ROUND_ENTITY + + + + + + + ValidOnFoot + + + + + DEFAULT_RESPONSE_POTENTIAL_GET_RUN_OVER + EVENT_POTENTIAL_GET_RUN_OVER + + + RESPONSE_TASK_EVASIVE_STEP + + + + + + + ValidOnFoot NotValidInComplexScenario + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidOnlyInComplexScenario + + + + + DEFAULT_RESPONSE_OBJECT_COLLISION + EVENT_OBJECT_COLLISION + + + RESPONSE_TASK_WALK_ROUND_ENTITY + + + + + + + ValidOnFoot + + + + + DEFAULT_RESPONSE_SHOCKING_CAR_CHASE + EVENT_SHOCKING_CAR_CHASE + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_CAR_CRASH + EVENT_SHOCKING_CAR_CRASH + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_CAR_CRASH + EVENT_SHOCKING_CAR_CRASH + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot InvalidInCrosswalk ValidOnBicycle + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + FAMILY_RESPONSE_SHOCKING_CAR_CRASH + EVENT_SHOCKING_CAR_CRASH + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + DEFAULT_RESPONSE_SHOCKING_BICYCLE_CRASH + EVENT_SHOCKING_BICYCLE_CRASH + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_BICYCLE_CRASH + EVENT_SHOCKING_BICYCLE_CRASH + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot InvalidInCrosswalk ValidOnBicycle + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_CAR_ON_CAR + EVENT_SHOCKING_CAR_ON_CAR + + + RESPONSE_TASK_FLEE + + + + + ValidOnFoot + + + + + DEFAULT_RESPONSE_SHOCKING_CAR_PILE_UP + EVENT_SHOCKING_CAR_PILE_UP + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_CAR_PILE_UP + EVENT_SHOCKING_CAR_PILE_UP + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_DEAD_BODY + EVENT_SHOCKING_DEAD_BODY + + + RESPONSE_TASK_SHOCKING_EVENT_GOTO + + + + + + + ValidOnFoot InvalidInCrosswalk InvalidWhenAfraid NotValidInComplexScenario + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_AGGRESSIVE_RUBBERNECK + + + + + + + ValidInCar + + + + + OFFDUTY_EMT_RESPONSE_DEAD_BODY + EVENT_SHOCKING_DEAD_BODY + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar + + + + + DEFAULT_RESPONSE_SHOCKING_PED_KILLED + EVENT_SHOCKING_SEEN_PED_KILLED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnlyIfFriendlyWithTarget ValidOnlyIfRandom + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot InvalidIfFriendlyWithTarget + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk InvalidIfFriendlyWithTarget ValidOnlyIfRandom + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk InvalidIfFriendlyWithTarget ValidOnlyIfRandom + + + + + COP_RESPONSE_SHOCKING_DEAD_BODY + EVENT_SHOCKING_DEAD_BODY + + + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot ValidInCar + + + + + GANG_RESPONSE_SHOCKING_DEAD_BODY + EVENT_SHOCKING_DEAD_BODY + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli ValidOnBicycle + + + + + FAMILY_RESPONSE_SHOCKING_DEAD_BODY + EVENT_SHOCKING_DEAD_BODY + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + DEFAULT_RESPONSE_SHOCKING_DRIVING_ON_PAVEMENT + EVENT_SHOCKING_DRIVING_ON_PAVEMENT + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_DRIVING_ON_PAVEMENT + EVENT_SHOCKING_DRIVING_ON_PAVEMENT + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidInHeli ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_BICYCLE_ON_PAVEMENT + EVENT_SHOCKING_BICYCLE_ON_PAVEMENT + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot InvalidWhenAfraid ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_BICYCLE_ON_PAVEMENT + EVENT_SHOCKING_BICYCLE_ON_PAVEMENT + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidInHeli ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_EXPLOSION + EVENT_SHOCKING_EXPLOSION + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + FAMILY_RESPONSE_SHOCKING_EXPLOSION + EVENT_SHOCKING_EXPLOSION + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + DEFAULT_RESPONSE_STUDIO_BOMB + EVENT_SHOCKING_STUDIO_BOMB + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle ValidOnlyInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + COP_RESPONSE_STUDIO_BOMB + EVENT_SHOCKING_STUDIO_BOMB + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + SECURITY_RESPONSE_WANTED + EVENT_ACQUAINTANCE_PED_WANTED + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot ValidInCar + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInHeli + + + + + SECURITY_RESPONSE_EXPLOSION + EVENT_EXPLOSION + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + SECURITY_RESPONSE_STUDIO_BOMB + EVENT_SHOCKING_STUDIO_BOMB + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot ValidInCar + + + + + SECURITY_RESPONSE_SHOCKING_INJURED_PED + EVENT_SHOCKING_INJURED_PED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfSource InvalidIfSourceEntityIsOtherEntity InvalidIfTargetDoesNotInfluenceWanted + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot ValidOnlyIfSource ValidOnlyIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyIfSource + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli ValidOnlyIfSource + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli ValidOnlyIfSourceIsInvalid + + + + + SECURITY_RESPONSE_SHOCKING_PED_RUN_OVER + EVENT_SHOCKING_PED_RUN_OVER + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot ValidInCar + + + + + SECURITY_RESPONSE_SHOCKING_DEAD_BODY + EVENT_SHOCKING_DEAD_BODY + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot ValidInCar + + + + + SECURITY_RESPONSE_CRIME_CRY_FOR_HELP + EVENT_CRIME_CRY_FOR_HELP + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot ValidInCar + + + + + SECURITY_RESPONSE_SHOCKING_CAR_CRASH + EVENT_SHOCKING_CAR_CRASH + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot + + + + + COP_RESPONSE_CAR_CRASH + EVENT_SHOCKING_CAR_CRASH + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar + + + + + SECURITY_RESPONSE_SHOCKING_BICYCLE_CRASH + EVENT_SHOCKING_BICYCLE_CRASH + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot + + + + + SECURITY_RESPONSE_SHOCKING_MAD_DRIVER + EVENT_SHOCKING_MAD_DRIVER + + + RESPONSE_TASK_AGITATED + + + + + + + ValidInCar + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot ValidInCar + + + + + SECURITY_RESPONSE_SHOCKING_MAD_DRIVER_EXTREME + EVENT_SHOCKING_MAD_DRIVER_EXTREME + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidInCar + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot ValidInCar + + + + + SECURITY_RESPONSE_SHOCKING_MAD_DRIVER_BICYCLE + EVENT_SHOCKING_MAD_DRIVER_BICYCLE + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot ValidInCar + + + + + SECURITY_RESPONSE_SHOCKING_PED_KILLED + EVENT_SHOCKING_SEEN_PED_KILLED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot InvalidIfTargetDoesNotInfluenceWanted + + + + + SECURITY_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + EVENT_SHOCKING_SEEN_MELEE_ACTION + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + + + COP_RESPONSE_SEEN_PED_KILLED + EVENT_SHOCKING_SEEN_PED_KILLED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot InvalidIfTargetDoesNotInfluenceWanted + + + + + GANG_RESPONSE_SHOCKING_PED_KILLED + EVENT_SHOCKING_SEEN_PED_KILLED + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidIfFriendlyWithTarget InvalidIfMissionPedInMP + + + RESPONSE_TASK_FLEE + + + + + + + InvalidIfFriendlyWithTarget InvalidIfMissionPedInMP + + + RESPONSE_TASK_COMBAT + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle InvalidIfFriendlyWithTarget ValidOnlyIfMissionPedInMP + + + + + FAMILY_RESPONSE_SHOCKING_SEEN_PED_KILLED + EVENT_SHOCKING_SEEN_PED_KILLED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom InvalidIfFriendlyWithTarget + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom InvalidIfFriendlyWithTarget + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom + + + + + DEFAULT_RESPONSE_SHOCKING_FIRE + EVENT_SHOCKING_FIRE + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_GUN_FIGHT + EVENT_SHOCKING_GUN_FIGHT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_GUN_FIGHT + EVENT_SHOCKING_GUN_FIGHT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_GUNSHOT_FIRED + EVENT_SHOCKING_GUNSHOT_FIRED + + + RESPONSE_TASK_FRIENDLY_NEAR_MISS + + + + + + + ValidOnFoot + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_GUNSHOT_FIRED + EVENT_SHOCKING_GUNSHOT_FIRED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_HELICOPTER_OVERHEAD + EVENT_SHOCKING_HELICOPTER_OVERHEAD + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_HELICOPTER_OVERHEAD + EVENT_SHOCKING_HELICOPTER_OVERHEAD + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_PARACHUTER_OVERHEAD + EVENT_SHOCKING_PARACHUTER_OVERHEAD + + + RESPONSE_TASK_SHOCKING_EVENT_WATCH + + + + + + + ValidOnFoot InvalidInCrosswalk InvalidForStationaryPeds + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk InvalidForStationaryPeds + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyForStationaryPeds + + + + + DEFAULT_RESPONSE_SHOCKING_HORN_SOUNDED + EVENT_SHOCKING_HORN_SOUNDED + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_ENGINE_REVVED + EVENT_SHOCKING_ENGINE_REVVED + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_SIREN + EVENT_SHOCKING_SIREN + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli ValidOnFoot ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_CAR_ALARM + EVENT_SHOCKING_CAR_ALARM + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli ValidOnFoot ValidOnBicycle + + + + + DEFAULT_RESPONSE_PROPERTY_DAMAGE + EVENT_SHOCKING_PROPERTY_DAMAGE + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnBicycle ValidInCar + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle ValidInCar + + + + + GANG_RESPONSE_PROPERTY_DAMAGE + EVENT_SHOCKING_PROPERTY_DAMAGE + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnBicycle ValidInCar + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle ValidInCar + + + + + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + EVENT_SHOCKING_DANGEROUS_ANIMAL + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_THREAT + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_IN_DANGEROUS_VEHICLE + EVENT_SHOCKING_IN_DANGEROUS_VEHICLE + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + + + FLEE_RESPONSE_HORN + EVENT_SHOCKING_HORN_SOUNDED + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + + + DEFAULT_RESPONSE_SHOCKING_INJURED_PED + EVENT_SHOCKING_INJURED_PED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfFriendlyWithTarget ValidOnlyIfSource InvalidIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnlyIfFriendlyWithTarget ValidOnlyIfSource + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle ValidOnlyIfSource InvalidIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsInvalid + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnlyIfSourceIsInvalid + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnBicycle ValidOnFoot ValidOnlyIfSourceIsInvalid + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidIfFriendlyWithTarget ValidOnlyIfSource + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnlyIfSource InvalidIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_AGGRESSIVE_RUBBERNECK + + + + + + + ValidInCar InvalidIfFriendlyWithTarget ValidOnlyIfSource + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSource ValidOnlyIfFriendlyWithTarget ValidOnlyIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidOnlyIfSource ValidOnlyIfFriendlyWithTarget ValidOnlyIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSource ValidOnlyIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnBicycle ValidOnlyIfSource ValidOnlyIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnBicycle ValidOnlyIfSource ValidOnlyIfSourceEntityIsOtherEntity + + + + + MEDIC_RESPONSE_INJURED_PED + EVENT_SHOCKING_INJURED_PED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle ValidOnlyIfSource ValidOnlyIfFriendlyWithTarget + + + + + COP_RESPONSE_SHOCKING_INJURED_PED + EVENT_SHOCKING_INJURED_PED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfSourcePed InvalidIfSourceEntityIsOtherEntity InvalidIfTargetDoesNotInfluenceWanted + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot ValidOnlyIfSource InvalidIfSourcePed InvalidIfSourceEntityIsOtherEntity InvalidIfTargetDoesNotInfluenceWanted + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidOnlyIfSource InvalidIfSourcePed InvalidIfSourceEntityIsOtherEntity InvalidIfTargetDoesNotInfluenceWanted + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot ValidOnlyIfSource ValidOnlyIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidOnlyIfSource ValidOnlyIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnlyIfSource + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInHeli ValidOnlyIfSource + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnlyIfSourceIsInvalid + + + + + GANG_RESPONSE_SHOCKING_INJURED_PED + EVENT_SHOCKING_INJURED_PED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle ValidOnlyIfSource ValidOnlyIfFriendlyWithTarget InvalidIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidOnBicycle ValidOnlyIfSource InvalidIfFriendlyWithTarget InvalidIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidOnBicycle ValidOnlyIfSource InvalidIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSource ValidOnlyIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnBicycle ValidOnlyIfSource ValidOnlyIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle ValidOnlyIfSource ValidOnlyIfSourceEntityIsOtherEntity + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli ValidOnlyIfSource + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli ValidOnlyIfSourceIsInvalid + + + + + FAMILY_RESPONSE_SHOCKING_INJURED_PED + EVENT_SHOCKING_INJURED_PED + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom InvalidIfFriendlyWithTarget + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom InvalidIfFriendlyWithTarget + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom + + + + + DEFAULT_RESPONSE_SHOCKING_MAD_DRIVER + EVENT_SHOCKING_MAD_DRIVER + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidInHeli ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_MAD_DRIVER_EXTREME + EVENT_SHOCKING_MAD_DRIVER_EXTREME + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidInHeli ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_MAD_DRIVER_BICYCLE + EVENT_SHOCKING_MAD_DRIVER_BICYCLE + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidInHeli ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_PED_RUN_OVER + EVENT_SHOCKING_PED_RUN_OVER + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_AGGRESSIVE_RUBBERNECK + + + + + + + ValidInCar + + + + + GANG_RESPONSE_SHOCKING_PED_RUN_OVER + EVENT_SHOCKING_PED_RUN_OVER + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + COP_RESPONSE_SHOCKING_PED_RUN_OVER + EVENT_SHOCKING_PED_RUN_OVER + + + RESPONSE_TASK_SHOCKING_POLICE_INVESTIGATE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_PED_SHOT + EVENT_SHOCKING_PED_SHOT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_SHOCKING_EVENT_THREAT_RESPONSE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_PED_SHOT + EVENT_SHOCKING_PED_SHOT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + RESPONSE_TASK_SHOCKING_EVENT_THREAT_RESPONSE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_PLANE_FLY_BY + EVENT_SHOCKING_PLANE_FLY_BY + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_PLANE_FLY_BY + EVENT_SHOCKING_PLANE_FLY_BY + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_RUNNING_PED + EVENT_SHOCKING_RUNNING_PED + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_RUNNING_STAMPEDE + EVENT_SHOCKING_RUNNING_STAMPEDE + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_SEEN_CAR_STOLEN + EVENT_SHOCKING_SEEN_CAR_STOLEN + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk ValidOnlyIfNoScenarioRadius InvalidIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk ValidOnlyIfOutsideScenarioRadius InvalidIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle ValidOnlyIfOutsideScenarioRadius InvalidIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_DEFER_TO_SCENARIO_POINT_FLAGS + + + + + + + ValidOnFoot InvalidInCrosswalk ValidOnlyIfInsideScenarioRadius ValidOnBicycle InvalidIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk InvalidIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli InvalidIfOtherVehicleIsYourVehicle + + + + + GANG_RESPONSE_SHOCKING_SEEN_CAR_STOLEN + EVENT_SHOCKING_SEEN_CAR_STOLEN + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot InvalidInCrosswalk ValidOnlyIfNoScenarioRadius InvalidIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot InvalidInCrosswalk ValidOnlyIfOutsideScenarioRadius InvalidIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle ValidOnlyIfOutsideScenarioRadius InvalidIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_DEFER_TO_SCENARIO_POINT_FLAGS + + + + + + + ValidOnFoot InvalidInCrosswalk ValidOnlyIfInsideScenarioRadius ValidOnBicycle InvalidIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk InvalidIfOtherVehicleIsYourVehicle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli InvalidIfOtherVehicleIsYourVehicle + + + + + MEDIC_RESPONSE_SHOCKING_SEEN_CAR_STOLEN + EVENT_SHOCKING_SEEN_CAR_STOLEN + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + + + FIRE_RESPONSE_SHOCKING_SEEN_CAR_STOLEN + EVENT_SHOCKING_SEEN_CAR_STOLEN + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + + + DEFAULT_RESPONSE_SHOCKING_SEEN_GANG_FIGHT + EVENT_SHOCKING_SEEN_GANG_FIGHT + + + RESPONSE_TASK_SHOCKING_EVENT_GOTO + + + + + + + ValidOnFoot InvalidInCrosswalk InvalidWhenAfraid NotValidInComplexScenario + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + EVENT_SHOCKING_SEEN_MELEE_ACTION + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + + + AGITATED_RESPONSE_SHOCKING_PED_KNOCKED_INTO + EVENT_SHOCKING_PED_KNOCKED_INTO_BY_PLAYER + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_PED_KNOCKED_INTO + EVENT_SHOCKING_PED_KNOCKED_INTO_BY_PLAYER + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidOnBicycle + + + + + GANG_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + EVENT_SHOCKING_SEEN_MELEE_ACTION + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + FAMILY_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + EVENT_SHOCKING_SEEN_MELEE_ACTION + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom ValidOnlyIfTargetIsInvalidOrFriendly + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidInHeli ValidOnBicycle ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom ValidOnlyIfTargetIsInvalidOrFriendly + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom ValidOnlyIfTargetIsValidAndNotFriendly + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom ValidOnlyIfTargetIsValidAndNotFriendly + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom + + + RESPONSE_TASK_FLEE + + + + + + + ValidInHeli ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom ValidOnlyIfTargetIsValidAndNotFriendly + + + RESPONSE_TASK_FLEE + + + + + + + ValidInHeli ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom ValidOnlyIfTargetIsValidAndNotFriendly + + + RESPONSE_TASK_FLEE + + + + + + + ValidInHeli ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + RESPONSE_TASK_FLEE + + + + + + + ValidInHeli ValidOnlyIfSourceIsAnAnimal ValidOnlyIfRandom + + + + + COP_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + EVENT_SHOCKING_SEEN_MELEE_ACTION + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidInCar + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidOnFoot + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + + + DEFAULT_RESPONSE_SHOCKING_SEEN_CONFRONTATION + EVENT_SHOCKING_SEEN_CONFRONTATION + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot InvalidInCrosswalk InvalidInAnInterior + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnBicycle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInAnInterior + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidInHeli + + + + + GANG_RESPONSE_SHOCKING_SEEN_CONFRONTATION + EVENT_SHOCKING_SEEN_CONFRONTATION + + + RESPONSE_TASK_TURN_TO_FACE + + + + + + + ValidOnFoot InvalidInCrosswalk InvalidInAnInterior + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInCrosswalk + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnlyInAnInterior + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnBicycle ValidInCar ValidInHeli + + + + + DEFAULT_RESPONSE_SHOCKING_SEEN_NICE_CAR + EVENT_SHOCKING_SEEN_NICE_CAR + + + RESPONSE_TASK_SHOCKING_NICE_CAR + + + + + + + ValidOnFoot ValidInCar + + + + + DEFAULT_RESPONSE_SHOCKING_SEEN_VEHICLE_TOWED + EVENT_SHOCKING_SEEN_VEHICLE_TOWED + + + RESPONSE_TASK_LEAVE_CAR_AND_FLEE + + + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + EVENT_SHOCKING_SEEN_WEAPON_THREAT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + RESPONSE_TASK_THREAT + + + + + + + + + + RESPONSE_TASK_SHOCKING_EVENT_STOP_AND_STARE + + + + + + + ValidInCar ValidOnlyForDrivers ValidForTargetOutsideVehicle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidOnlyForDrivers ValidForTargetOutsideVehicle + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnlyForPassengersWithNoDriver + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnlyForPassengersWithDriver ValidForTargetInsideVehicle + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidInCar ValidOnlyForPassengersWithDriver ValidForTargetOutsideVehicle + + + + + DEFAULT_RESPONSE_SHOCKING_SEEN_WEIRD_PED + EVENT_SHOCKING_SEEN_WEIRD_PED + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_SEEN_INSULT + EVENT_SHOCKING_SEEN_INSULT + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + + + DEFAULT_RESPONSE_SHOCKING_VISIBLE_WEAPON + EVENT_SHOCKING_VISIBLE_WEAPON + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot + + + + + GANG_RESPONSE_SHOCKING_VISIBLE_WEAPON + EVENT_SHOCKING_VISIBLE_WEAPON + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot + + + + + GANG_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + EVENT_SHOCKING_SEEN_WEAPON_THREAT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot + + + RESPONSE_TASK_HEAD_TRACK + + + + + + + ValidOnFoot ValidOnBicycle + + + + + FAMILY_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + EVENT_SHOCKING_SEEN_WEAPON_THREAT + + + RESPONSE_TASK_AGITATED + + + + + + + ValidOnFoot ValidInCar ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + DEFAULT_RESPONSE_AGITATED + EVENT_AGITATED + + + RESPONSE_TASK_AGITATED + + + + + ValidOnFoot ValidInCar ValidOnBicycle + + + + + + + DEFAULT_RESPONSE_REQUEST_HELP_WITH_CONFRONTATION + EVENT_REQUEST_HELP_WITH_CONFRONTATION + + + RESPONSE_TASK_AGITATED + + + + + ValidOnFoot ValidOnBicycle + + + + + + + DEFAULT_RESPONSE_SHOCKING_POTENTIAL_BLAST + EVENT_SHOCKING_POTENTIAL_BLAST + + + RESPONSE_TASK_SHOCKING_EVENT_THREAT_RESPONSE + + + + + + + ValidOnFoot + + + RESPONSE_TASK_THREAT + + + + + + + + + + + + DEFAULT_RESPONSE_PLAYER_DEATH + EVENT_PLAYER_DEATH + + + RESPONSE_TASK_PLAYER_DEATH + + + + + ValidOnFoot ValidOnBicycle ValidInCar + + + + + + + CAT_RESPONSE_ENCROACHMENT + EVENT_ENCROACHING_PED + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot InvalidIfSourceIsAnAnimal + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnFoot ValidOnlyIfSourceIsAnAnimal + + + + + GULL_RESPONSE_SHOT_FIRED_WHIZZED_BY + EVENT_SHOT_FIRED_WHIZZED_BY + + + RESPONSE_TASK_FLY_AWAY + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + GULL_RESPONSE_SHOT_FIRED_BULLET_IMPACT + EVENT_SHOT_FIRED_BULLET_IMPACT + + + RESPONSE_TASK_FLY_AWAY + + + + + + + ValidOnFoot NotValidInComplexScenario + + + + + FISH_RESPONSE_EXPLOSION + EVENT_EXPLOSION + + + RESPONSE_TASK_SCENARIO_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + DisableCover + + + + + FISH_RESPONSE_GUNSHOT + EVENT_SHOT_FIRED + + + RESPONSE_TASK_SCENARIO_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + DisableCover + + + + + FISH_RESPONSE_SHOCKING_EXPLOSION + EVENT_SHOCKING_EXPLOSION + + + RESPONSE_TASK_SCENARIO_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + DisableCover + + + + + RABBIT_RESPONSE_FLEE + EVENT_ENCROACHING_PED + + + RESPONSE_TASK_SCENARIO_FLEE + + + + + + + ValidOnFoot NotValidInComplexScenario + DisableCover + + + + + FAMILY_RESPONSE_SHOCKING_PED_SHOT + EVENT_SHOCKING_PED_SHOT + + + RESPONSE_TASK_THREAT + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom ValidOnlyIfFriendlyWithTarget + + + RESPONSE_TASK_SHOCKING_EVENT_HURRY_AWAY + + + + + + + ValidOnFoot ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom InvalidIfFriendlyWithTarget + + + RESPONSE_TASK_FLEE + + + + + + + ValidOnlyIfSourceIsPlayer ValidOnlyIfRandom + + + + + + + PLAYER + + + + + COP + BASE + + COP_RESPONSE_WANTED + DEFAULT_RESPONSE_SHOCKING_EXPLOSION + COP_RESPONSE_STUDIO_BOMB + COP_RESPONSE_SHOCKING_INJURED_PED + COP_RESPONSE_SHOCKING_PED_RUN_OVER + COP_RESPONSE_SHOCKING_DEAD_BODY + COP_RESPONSE_CRIME_CRY_FOR_HELP + COP_RESPONSE_SEEN_PED_KILLED + COP_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + DEFAULT_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + INVESTIGATE_RESPONSE_MUGGING + DEFAULT_RESPONSE_SHOCKING_SIREN + COP_RESPONSE_CAR_CRASH + COP_RESPONSE_SHOCKING_CAR_ALARM + AGITATED_RESPONSE_SHOCKING_PED_KNOCKED_INTO + COP_RESPONSE_PROPERTY_DAMAGE + + + + FIREMAN + + + DEFAULT_RESPONSE_DAMAGE + FIREMAN_RESPONSE_SHOT_FIRED + FIREMAN_RESPONSE_SHOT_FIRED_WHIZZED_BY + FIREMAN_RESPONSE_SHOT_FIRED_BULLET_IMPACT + DEFAULT_RESPONSE_GUN_AIMED_AT + DEFAULT_RESPONSE_HATE + DEFAULT_RESPONSE_VEHICLE_ON_FIRE + DEFAULT_RESPONSE_POTENTIAL_WALK_INTO_FIRE + DEFAULT_RESPONSE_MELEE + DEFAULT_RESPONSE_EVENT_DRAGGED_OUT_CAR + DEFAULT_RESPONSE_EVENT_PED_ENTERED_MY_VEHICLE + DEFAULT_RESPONSE_POTENTIAL_GET_RUN_OVER + DEFAULT_RESPONSE_POTENTIAL_WALK_INTO_VEHICLE + DEFAULT_RESPONSE_OBJECT_COLLISION + DEFAULT_RESPONSE_AGITATED + DEFAULT_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + DEFAULT_RESPONSE_SHOCKING_PED_KILLED + DEFAULT_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + DEFAULT_RESPONSE_MUGGING + DEFAULT_RESPONSE_SHOCKING_SIREN + DEFAULT_RESPONSE_SHOCKING_CAR_ALARM + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + DEFAULT_RESPONSE_VEHICLE_DAMAGE_WEAPON + FIRE_RESPONSE_SHOCKING_SEEN_CAR_STOLEN + + + + MEDIC + + + DEFAULT_RESPONSE_DAMAGE + MEDIC_RESPONSE_SHOT_FIRED + MEDIC_RESPONSE_SHOT_FIRED_WHIZZED_BY + MEDIC_RESPONSE_SHOT_FIRED_BULLET_IMPACT + DEFAULT_RESPONSE_GUN_AIMED_AT + DEFAULT_RESPONSE_HATE + DEFAULT_RESPONSE_VEHICLE_ON_FIRE + DEFAULT_RESPONSE_POTENTIAL_WALK_INTO_FIRE + DEFAULT_RESPONSE_MELEE + DEFAULT_RESPONSE_EVENT_DRAGGED_OUT_CAR + DEFAULT_RESPONSE_EVENT_PED_ENTERED_MY_VEHICLE + DEFAULT_RESPONSE_POTENTIAL_GET_RUN_OVER + DEFAULT_RESPONSE_POTENTIAL_WALK_INTO_VEHICLE + DEFAULT_RESPONSE_OBJECT_COLLISION + DEFAULT_RESPONSE_AGITATED + DEFAULT_RESPONSE_SHOCKING_PED_KILLED + MEDIC_RESPONSE_INJURED_PED + DEFAULT_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + DEFAULT_RESPONSE_MUGGING + DEFAULT_RESPONSE_SHOCKING_SIREN + DEFAULT_RESPONSE_SHOCKING_CAR_ALARM + MEDIC_RESPONSE_SHOCKING_SEEN_CAR_STOLEN + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + DEFAULT_RESPONSE_VEHICLE_DAMAGE_WEAPON + + + + OFFDUTY_EMT + DEFAULT + + FIREMAN_RESPONSE_SHOT_FIRED + FIREMAN_RESPONSE_SHOT_FIRED_WHIZZED_BY + FIREMAN_RESPONSE_SHOT_FIRED_BULLET_IMPACT + OFFDUTY_EMT_RESPONSE_DEAD_BODY + + + + Security + BASE + + SECURITY_RESPONSE_WANTED + SECURITY_RESPONSE_EXPLOSION + DEFAULT_RESPONSE_SHOCKING_EXPLOSION + SECURITY_RESPONSE_STUDIO_BOMB + SECURITY_RESPONSE_SHOCKING_INJURED_PED + SECURITY_RESPONSE_SHOCKING_PED_RUN_OVER + SECURITY_RESPONSE_SHOCKING_DEAD_BODY + SECURITY_RESPONSE_CRIME_CRY_FOR_HELP + SECURITY_RESPONSE_SHOCKING_CAR_CRASH + SECURITY_RESPONSE_SHOCKING_BICYCLE_CRASH + SECURITY_RESPONSE_SHOCKING_MAD_DRIVER + SECURITY_RESPONSE_SHOCKING_MAD_DRIVER_EXTREME + SECURITY_RESPONSE_SHOCKING_MAD_DRIVER_BICYCLE + SECURITY_RESPONSE_SHOCKING_PED_KILLED + SECURITY_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + DEFAULT_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + INVESTIGATE_RESPONSE_MUGGING + DEFAULT_RESPONSE_SHOCKING_SIREN + DEFAULT_RESPONSE_SHOCKING_CAR_ALARM + AGITATED_RESPONSE_SHOCKING_PED_KNOCKED_INTO + COP_RESPONSE_PROPERTY_DAMAGE + + + + SWAT + + + SWAT_RESPONSE_WANTED + SWAT_RESPONSE_DAMAGE + SWAT_RESPONSE_SHOT_FIRED + SWAT_RESPONSE_SHOT_FIRED_WHIZZED_BY + SWAT_RESPONSE_SHOT_FIRED_BULLET_IMPACT + SWAT_RESPONSE_GUN_AIMED_AT + DEFAULT_RESPONSE_VEHICLE_ON_FIRE + DEFAULT_RESPONSE_POTENTIAL_WALK_INTO_FIRE + SWAT_RESPONSE_SHOUT_TARGET_POSITION + SWAT_RESPONSE_MELEE + SWAT_RESPONSE_VEHICLE_DAMAGE_WEAPON + SWAT_RESPONSE_DRAGGED_OUT_CAR + SWAT_RESPONSE_PED_ENTERED_MY_VEHICLE + DEFAULT_RESPONSE_POTENTIAL_WALK_INTO_VEHICLE + DEFAULT_RESPONSE_OBJECT_COLLISION + COP_RESPONSE_CRIME_CRY_FOR_HELP + COP_RESPONSE_SEEN_PED_KILLED + DEFAULT_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + INVESTIGATE_RESPONSE_MUGGING + DEFAULT_RESPONSE_SHOCKING_SIREN + DEFAULT_RESPONSE_SHOCKING_CAR_ALARM + AGITATED_RESPONSE_SHOCKING_PED_KNOCKED_INTO + DEFAULT_RESPONSE_HATE + COP_RESPONSE_PROPERTY_DAMAGE + + + + EMPTY + + + + + BASE + + + DEFAULT_RESPONSE_DAMAGE + DEFAULT_RESPONSE_EXPLOSION + DEFAULT_RESPONSE_SHOT_FIRED + DEFAULT_RESPONSE_SHOT_FIRED_WHIZZED_BY + DEFAULT_RESPONSE_SHOT_FIRED_BULLET_IMPACT + DEFAULT_RESPONSE_GUN_AIMED_AT + DEFAULT_RESPONSE_HATE + DEFAULT_RESPONSE_WANTED + DEFAULT_RESPONSE_VEHICLE_ON_FIRE + DEFAULT_RESPONSE_POTENTIAL_WALK_INTO_FIRE + DEFAULT_RESPONSE_SHOUT_TARGET_POSITION + DEFAULT_RESPONSE_INJURED_CRY_FOR_HELP + DEFAULT_RESPONSE_MELEE + DEFAULT_RESPONSE_VEHICLE_DAMAGE_WEAPON + DEFAULT_RESPONSE_EVENT_DRAGGED_OUT_CAR + DEFAULT_RESPONSE_EVENT_PED_ENTERED_MY_VEHICLE + DEFAULT_RESPONSE_POTENTIAL_GET_RUN_OVER + DEFAULT_RESPONSE_POTENTIAL_WALK_INTO_VEHICLE + DEFAULT_RESPONSE_OBJECT_COLLISION + DEFAULT_RESPONSE_AGITATED + DEFAULT_RESPONSE_REQUEST_HELP_WITH_CONFRONTATION + FRIENDLY_RESPONSE_GUN_AIMED_AT + FRIENDLY_RESPONSE_TASK_NEAR_MISS + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + DEFAULT_RESPONSE_SHOCKING_SIREN + DEFAULT_RESPONSE_SHOCKING_POTENTIAL_BLAST + DEFAULT_RESPONSE_PLAYER_DEATH + COMBAT_RESPONSE_FOOT_STEP_HEARD + + + + DEFAULT + BASE + + DEFAULT_RESPONSE_SHOCKING_ENGINE_REVVED + DEFAULT_RESPONSE_SHOCKING_EXPLOSION + DEFAULT_RESPONSE_SHOCKING_GUN_FIGHT + DEFAULT_RESPONSE_SHOCKING_PED_SHOT + DEFAULT_RESPONSE_SHOCKING_GUNSHOT_FIRED + DEFAULT_RESPONSE_SHOCKING_FIRE + DEFAULT_RESPONSE_SHOCKING_CAR_CHASE + DEFAULT_RESPONSE_SHOCKING_CAR_PILE_UP + DEFAULT_RESPONSE_SHOCKING_CAR_CRASH + DEFAULT_RESPONSE_SHOCKING_BICYCLE_CRASH + DEFAULT_RESPONSE_SHOCKING_CAR_ON_CAR + DEFAULT_RESPONSE_SHOCKING_MAD_DRIVER + DEFAULT_RESPONSE_SHOCKING_MAD_DRIVER_EXTREME + DEFAULT_RESPONSE_SHOCKING_MAD_DRIVER_BICYCLE + DEFAULT_RESPONSE_SHOCKING_DRIVING_ON_PAVEMENT + DEFAULT_RESPONSE_SHOCKING_BICYCLE_ON_PAVEMENT + DEFAULT_RESPONSE_SHOCKING_INJURED_PED + DEFAULT_RESPONSE_SHOCKING_PED_RUN_OVER + DEFAULT_RESPONSE_SHOCKING_SEEN_GANG_FIGHT + DEFAULT_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + DEFAULT_RESPONSE_SHOCKING_SEEN_CONFRONTATION + DEFAULT_RESPONSE_SHOCKING_SEEN_INSULT + DEFAULT_RESPONSE_SHOCKING_SEEN_NICE_CAR + DEFAULT_RESPONSE_SHOCKING_SEEN_VEHICLE_TOWED + DEFAULT_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + DEFAULT_RESPONSE_SHOCKING_SEEN_WEIRD_PED + DEFAULT_RESPONSE_SHOCKING_HELICOPTER_OVERHEAD + DEFAULT_RESPONSE_SHOCKING_PARACHUTER_OVERHEAD + DEFAULT_RESPONSE_SHOCKING_SEEN_CAR_STOLEN + DEFAULT_RESPONSE_SHOCKING_DEAD_BODY + DEFAULT_RESPONSE_SHOCKING_PED_KILLED + DEFAULT_RESPONSE_SHOCKING_PLANE_FLY_BY + DEFAULT_RESPONSE_SHOCKING_HORN_SOUNDED + DEFAULT_RESPONSE_SHOCKING_VISIBLE_WEAPON + DEFAULT_RESPONSE_SHOCKING_RUNNING_PED + DEFAULT_RESPONSE_SHOCKING_RUNNING_STAMPEDE + DEFAULT_RESPONSE_STUDIO_BOMB + DEFAULT_RESPONSE_CRIME_CRY_FOR_HELP + DEFAULT_RESPONSE_MUGGING + DEFAULT_RESPONSE_SHOCKING_NON_VIOLENT_WEAPON_AIMED_AT + DEFAULT_RESPONSE_SHOCKING_SIREN + DEFAULT_RESPONSE_SHOCKING_IN_DANGEROUS_VEHICLE + DEFAULT_RESPONSE_SHOCKING_CAR_ALARM + DEFAULT_RESPONSE_SHOCKING_PED_KNOCKED_INTO + DEFAULT_RESPONSE_PROPERTY_DAMAGE + + + + GANG + BASE + + GANG_RESPONSE_SHOT_FIRED + GANG_RESPONSE_SHOT_FIRED_WHIZZED_BY + GANG_RESPONSE_GUN_AIMED_AT + GANG_RESPONSE_SHOCKING_GUN_FIGHT + GANG_RESPONSE_SHOCKING_GUNSHOT_FIRED + DEFAULT_RESPONSE_SHOCKING_EXPLOSION + GANG_RESPONSE_SHOCKING_PED_SHOT + DEFAULT_RESPONSE_SHOCKING_FIRE + DEFAULT_RESPONSE_SHOCKING_CAR_CHASE + GANG_RESPONSE_SHOCKING_CAR_PILE_UP + GANG_RESPONSE_SHOCKING_CAR_CRASH + GANG_RESPONSE_SHOCKING_BICYCLE_CRASH + DEFAULT_RESPONSE_SHOCKING_CAR_ON_CAR + DEFAULT_RESPONSE_SHOCKING_MAD_DRIVER + DEFAULT_RESPONSE_SHOCKING_MAD_DRIVER_EXTREME + DEFAULT_RESPONSE_SHOCKING_MAD_DRIVER_BICYCLE + GANG_RESPONSE_SHOCKING_DRIVING_ON_PAVEMENT + GANG_RESPONSE_SHOCKING_BICYCLE_ON_PAVEMENT + GANG_RESPONSE_SHOCKING_INJURED_PED + GANG_RESPONSE_SHOCKING_PED_RUN_OVER + GANG_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + GANG_RESPONSE_SHOCKING_SEEN_CONFRONTATION + DEFAULT_RESPONSE_SHOCKING_SEEN_INSULT + DEFAULT_RESPONSE_SHOCKING_SEEN_NICE_CAR + DEFAULT_RESPONSE_SHOCKING_SEEN_VEHICLE_TOWED + GANG_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + GANG_RESPONSE_SHOCKING_HELICOPTER_OVERHEAD + DEFAULT_RESPONSE_SHOCKING_PARACHUTER_OVERHEAD + GANG_RESPONSE_SHOCKING_SEEN_CAR_STOLEN + GANG_RESPONSE_SHOCKING_DEAD_BODY + GANG_RESPONSE_SHOCKING_PLANE_FLY_BY + DEFAULT_RESPONSE_SHOCKING_HORN_SOUNDED + GANG_RESPONSE_SHOCKING_VISIBLE_WEAPON + DEFAULT_RESPONSE_SHOCKING_RUNNING_PED + DEFAULT_RESPONSE_SHOCKING_RUNNING_STAMPEDE + GANG_RESPONSE_CRIME_CRY_FOR_HELP + GANG_RESPONSE_SHOCKING_PED_KILLED + TURN_TO_FACE_RESPONSE_MUGGING + TURN_TO_FACE_RESPONSE_SHOCKING_NON_VIOLENT_WEAPON_AIMED_AT + DEFAULT_RESPONSE_SHOCKING_SIREN + DEFAULT_RESPONSE_SHOCKING_CAR_ALARM + DEFAULT_RESPONSE_SHOCKING_PED_KNOCKED_INTO + GANG_RESPONSE_PROPERTY_DAMAGE + + + + FAMILY + GANG + + FAMILY_RESPONSE_DAMAGE + FAMILY_RESPONSE_EXPLOSION + FAMILY_RESPONSE_FRIENDLY_AIMED_AT + FAMILY_RESPONSE_FRIENDLY_FIRE_NEAR_MISS + FAMILY_RESPONSE_MELEE_ACTION + FAMILY_RESPONSE_SHOCKING_DEAD_BODY + FAMILY_RESPONSE_SHOCKING_EXPLOSION + FAMILY_RESPONSE_SHOCKING_INJURED_PED + FAMILY_RESPONSE_SHOCKING_SEEN_MELEE_ACTION + FAMILY_RESPONSE_SHOCKING_SEEN_PED_KILLED + FAMILY_RESPONSE_SHOCKING_SEEN_WEAPON_THREAT + FAMILY_RESPONSE_SHOCKING_PED_SHOT + FAMILY_RESPONSE_SHOT_FIRED + FAMILY_RESPONSE_VEHICLE_DAMAGE_WEAPON + + + + GULL + + + GULL_RESPONSE_FLEE + GULL_RESPONSE_EXPLOSION + GULL_RESPONSE_GUNSHOT + GULL_RESPONSE_SHOT_FIRED_WHIZZED_BY + GULL_RESPONSE_SHOT_FIRED_BULLET_IMPACT + + + + HEN + + + FLEE_RESPONSE_DAMAGE + FLEE_RESPONSE_EXPLOSION + FLEE_RESPONSE_SHOT_FIRED + FLEE_RESPONSE_SHOT_FIRED_WHIZZED_BY + FLEE_RESPONSE_SHOT_FIRED_BULLET_IMPACT + HEN_RESPONSE_FLEE + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + + + + RAT + + + RAT_RESPONSE_FLEE + + + + FISH + + + FISH_RESPONSE_FLEE + FISH_RESPONSE_EXPLOSION + FISH_RESPONSE_GUNSHOT + FISH_RESPONSE_SHOCKING_EXPLOSION + + + + Shark + + SHARK_ATTACK_ENCROACHING + SHARK_ATTACK_HATE + + + + HORSE + + + HORSE_FLEE_RESPONSE_DAMAGE + HORSE_FLEE_RESPONSE_EXPLOSION + HORSE_FLEE_RESPONSE_SHOT_FIRED + HORSE_FLEE_RESPONSE_SHOT_FIRED_WHIZZED_BY + HORSE_FLEE_RESPONSE_SHOT_FIRED_BULLET_IMPACT + HORSE_FLEE_RESPONSE_SHOCKING_MELEE_ACTION + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + + + + DomesticAnimal + + + EXHAUSTED_FLEE_RESPONSE_DAMAGE + EXHAUSTED_FLEE_RESPONSE_EXPLOSION + EXHAUSTED_FLEE_RESPONSE_SHOT_FIRED + EXHAUSTED_FLEE_RESPONSE_SHOT_FIRED_WHIZZED_BY + EXHAUSTED_FLEE_RESPONSE_SHOT_FIRED_BULLET_IMPACT + EXHAUSTED_FLEE_RESPONSE_SHOCKING_MELEE_ACTION + EXHAUSTED_FLEE_RESPONSE_HORN + EXHAUSTED_FLEE_RESPONSE_CAR_CRASH + EXHAUSTED_FLEE_RESPONSE_SEEN_PED_RUN_OVER + EXHAUSTED_FLEE_RESPONSE_INJURED_PED + EXHAUSTED_FLEE_RESPONSE_SHOCKING_EXPLOSION + EXHAUSTED_FLEE_RESPONSE_HELICOPTER + EXHAUSTED_FLEE_RESPONSE_PLANE + WALK_AWAY_RESPONSE_ENCROACHMENT + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + + + + DOG + + + DEFAULT_RESPONSE_DAMAGE + FLEE_RESPONSE_EXPLOSION + DEFAULT_RESPONSE_SHOT_FIRED + DEFAULT_RESPONSE_SHOT_FIRED_WHIZZED_BY + DEFAULT_RESPONSE_SHOT_FIRED_BULLET_IMPACT + DEFAULT_RESPONSE_HATE + DEFAULT_RESPONSE_AGITATED + DEFAULT_RESPONSE_SHOUT_TARGET_POSITION + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + DOG_RESPONSE_CAR_CRASH + DOG_RESPONSE_INJURED_PED + DOG_RESPONSE_SEEN_PED_KILLED + + + + WildAnimal + + + FLEE_RESPONSE_DAMAGE + FLEE_RESPONSE_CAR_CRASH + FLEE_RESPONSE_EXPLOSION + FLEE_RESPONSE_SHOT_FIRED + FLEE_RESPONSE_SHOT_FIRED_WHIZZED_BY + FLEE_RESPONSE_SHOT_FIRED_BULLET_IMPACT + FLEE_RESPONSE_FOOT_STEP_HEARD + FLEE_RESPONSE_ENCROACHMENT + FLEE_RESPONSE_HORN + FLEE_RESPONSE_SHOCKING_MELEE_ACTION + FLEE_RESPONSE_SEEN_PED_RUN_OVER + FLEE_RESPONSE_INJURED_PED + FLEE_RESPONSE_SHOCKING_EXPLOSION + FLEE_RESPONSE_HELICOPTER + FLEE_RESPONSE_PLANE + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + + + + Cougar + + + DEFAULT_RESPONSE_DAMAGE + FLEE_RESPONSE_EXPLOSION + FLEE_RESPONSE_SHOT_FIRED + FLEE_RESPONSE_SHOT_FIRED_WHIZZED_BY + FLEE_RESPONSE_SHOT_FIRED_BULLET_IMPACT + COMBAT_RESPONSE_FOOT_STEP_HEARD + COMBAT_RESPONSE_ENCROACHMENT + FLEE_RESPONSE_HORN + FLEE_RESPONSE_CAR_CRASH + FLEE_RESPONSE_SHOCKING_EXPLOSION + FLEE_RESPONSE_HELICOPTER + FLEE_RESPONSE_PLANE + DEFAULT_RESPONSE_HATE + + + + SmallAnimal + + + FLEE_RESPONSE_DAMAGE + FLEE_RESPONSE_CAR_CRASH + FLEE_RESPONSE_EXPLOSION + FLEE_RESPONSE_SHOT_FIRED + FLEE_RESPONSE_SHOT_FIRED_WHIZZED_BY + FLEE_RESPONSE_SHOT_FIRED_BULLET_IMPACT + FLEE_RESPONSE_HORN + FLEE_RESPONSE_SHOCKING_MELEE_ACTION + FLEE_RESPONSE_SHOCKING_EXPLOSION + FLEE_RESPONSE_HELICOPTER + FLEE_RESPONSE_PLANE + DEFAULT_RESPONSE_SHOCKING_DANGEROUS_ANIMAL + + + + Cat + SmallAnimal + + CAT_RESPONSE_ENCROACHMENT + + + + Rabbit + SmallAnimal + + FLEE_RESPONSE_FOOT_STEP_HEARD + RABBIT_RESPONSE_FLEE + + + + diff --git a/resources/CalmAI/fxmanifest.lua b/resources/CalmAI/fxmanifest.lua new file mode 100644 index 000000000..62e2f68fe --- /dev/null +++ b/resources/CalmAI/fxmanifest.lua @@ -0,0 +1,30 @@ +------------------------------------------------------------- +-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 -- +------------------------------------------------------------- + +fx_version 'bodacious' +games { 'gta5' } + +-- Define the resource metadata +name 'Calm-AI V3' +description 'A simple reboot that also includes an AI density manager' +author 'Jordan.#2139' +version 'v1.1.0' + + +-- Client Scripts +client_script "config.lua" +client_script "client.lua" + +-- Server Scripts +server_script "config.lua" +server_script "version_check.lua" + +-- Calling Files For The Script +files { + 'events.meta', + 'relationships.dat' +} + +-- Defining the data file +data_file 'FIVEM_LOVES_YOU_4B38E96CC036038F' 'events.meta' \ No newline at end of file diff --git a/resources/CalmAI/relationships.dat b/resources/CalmAI/relationships.dat new file mode 100644 index 000000000..f942d78d7 --- /dev/null +++ b/resources/CalmAI/relationships.dat @@ -0,0 +1,138 @@ +#------------------------------------------------------------- +#-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 -- +#------------------------------------------------------------- + +# Acquaintance options: +# - Hate (More than likley will immediately attack) +# - Dislike (Will tease and talk bad about player but won't immediately attack) +# - Like (Will attempt to interact or greet. Good greetings) +# - Respect (Nuteral) + +# People Options +PLAYER +CIVMALE +CIVFEMALE +COP +SECURITY_GUARD +PRIVATE_SECURITY +FIREMAN +GANG_1 +GANG_2 +GANG_9 +GANG_10 +AMBIENT_GANG_LOST +AMBIENT_GANG_MEXICAN +AMBIENT_GANG_FAMILY +AMBIENT_GANG_BALLAS +AMBIENT_GANG_MARABUNTE +AMBIENT_GANG_CULT +AMBIENT_GANG_SALVA +AMBIENT_GANG_WEICHENG +AMBIENT_GANG_HILLBILLY +DEALER +HATES_PLAYER +HEN +WILD_ANIMAL +SHARK +COUGAR +NO_RELATIONSHIP +SPECIAL +MISSION2 +MISSION3 +MISSION4 +MISSION5 +MISSION6 +MISSION7 +MISSION8 +ARMY +GUARD_DOG +AGGRESSIVE_INVESTIGATE +MEDIC +CAT + +# +PLAYER + Like PLAYER +CIVMALE + Respect CIVMALE + Respect CIVFEMALE +CIVFEMALE + Respect CIVFEMALE + Respect CIVMALE +COP + Respect MEDIC FIREMAN COP + Respect ARMY + Respect PLAYER + Like SECURITY_GUARD +ARMY + Like ARMY + Respect COP +SECURITY_GUARD + Like COP SECURITY_GUARD GUARD_DOG +PRIVATE_SECURITY + Like PRIVATE_SECURITY GUARD_DOG +PRISONER + Like PRISONER + Hate PLAYER +FIREMAN + Respect MEDIC FIREMAN COP + Respect PLAYER +GANG_1 + Respect GANG_1 +GANG_2 + Respect GANG_2 +GANG_9 + Respect GANG_9 +GANG_10 + Respect GANG_10 +HATES_PLAYER + Hate PLAYER + Like HATES_PLAYER AGGRESSIVE_INVESTIGATE +HEN + Dislike PLAYER +AMBIENT_GANG_LOST + Like AMBIENT_GANG_LOST GUARD_DOG +AMBIENT_GANG_MEXICAN + Respect PLAYER + Like AMBIENT_GANG_MEXICAN GUARD_DOG +AMBIENT_GANG_FAMILY + Like AMBIENT_GANG_FAMILY GUARD_DOG +AMBIENT_GANG_BALLAS + Respect PLAYER + Like AMBIENT_GANG_BALLAS GUARD_DOG +AMBIENT_GANG_MARABUNTE + Like AMBIENT_GANG_MARABUNTE GUARD_DOG +AMBIENT_GANG_CULT + Like AMBIENT_GANG_CULT GUARD_DOG +AMBIENT_GANG_SALVA + Like AMBIENT_GANG_SALVA GUARD_DOG +AMBIENT_GANG_WEICHENG + Like AMBIENT_GANG_WEICHENG GUARD_DOG +AMBIENT_GANG_HILLBILLY + Respect PLAYER + Like AMBIENT_GANG_HILLBILLY GUARD_DOG +DOMESTIC_ANIMAL + Hate PLAYER + Like CIVMALE CIVFEMALE COP SECURITY_GUARD DOMESTIC_ANIMAL FIREMAN GANG_1 GANG_2 GANG_9 GANG_10 AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_BALLAS AMBIENT_GANG_FAMILY DEALER HATES_PLAYER +WILD_ANIMAL + Hate PLAYER CIVMALE CIVFEMALE COP SECURITY_GUARD FIREMAN GANG_1 GANG_2 GANG_9 GANG_10 AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_BALLAS AMBIENT_GANG_FAMILY DEALER HATES_PLAYER +DEER + Hate PLAYER CIVMALE CIVFEMALE COP SECURITY_GUARD FIREMAN GANG_1 GANG_2 GANG_9 GANG_10 AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_BALLAS AMBIENT_GANG_FAMILY DEALER HATES_PLAYER + Respect DEER +SHARK + Hate PLAYER +GUARD_DOG + Like GUARD_DOG CIVMALE CIVFEMALE SECURITY_GUARD AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_FAMILY AMBIENT_GANG_BALLAS AMBIENT_GANG_MARABUNTE AMBIENT_GANG_CULT AMBIENT_GANG_SALVA AMBIENT_GANG_WEICHENG AMBIENT_GANG_HILLBILLY PRIVATE_SECURITY +AGGRESSIVE_INVESTIGATE + Hate PLAYER + Like HATES_PLAYER AGGRESSIVE_INVESTIGATE +MEDIC + Respect PLAYER + Like MEDIC + Respect COP ARMY SECURITY_GUARD FIREMAN +COUGAR + Hate PLAYER CIVMALE CIVFEMALE SECURITY_GUARD AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_FAMILY AMBIENT_GANG_BALLAS AMBIENT_GANG_MARABUNTE AMBIENT_GANG_CULT AMBIENT_GANG_SALVA AMBIENT_GANG_WEICHENG AMBIENT_GANG_HILLBILLY PRIVATE_SECURITY COP ARMY PRISONER FIREMAN +CAT + Hate PLAYER + Like CIVMALE CIVFEMALE COP SECURITY_GUARD DOMESTIC_ANIMAL FIREMAN GANG_1 GANG_2 GANG_9 GANG_10 AMBIENT_GANG_LOST AMBIENT_GANG_MEXICAN AMBIENT_GANG_BALLAS AMBIENT_GANG_FAMILY DEALER HATES_PLAYER + diff --git a/resources/CalmAI/version_check.lua.no b/resources/CalmAI/version_check.lua.no new file mode 100644 index 000000000..a906fa727 --- /dev/null +++ b/resources/CalmAI/version_check.lua.no @@ -0,0 +1,61 @@ +------------------------------------------------------------- +-- Calm-AI V3- A Simple FiveM Script, Made By Jordan.#2139 -- +------------------------------------------------------------- +---------------------------------------------------------------------------------------------- + -- !WARNING! !WARNING! !WARNING! !WARNING! !WARNING! -- + -- DO NOT TOUCH THIS FILE OR YOU /WILL/ FUCK SHIT UP! EDIT THE CONFIG.LUA -- +-- DO NOT BE STUPID AND WHINE TO ME ABOUT THIS BEING BROKEN IF YOU TOUCHED THE LINES BELOW. -- +---------------------------------------------------------------------------------------------- + +local label = +[[ + // + || + || + || ______ __ ___ ____ _ _______ + || / ____/___ _/ /___ ___ / | / _/ | | / /__ / + || / / / __ `/ / __ `__ \______/ /| | / / | | / / /_ < + || / /___/ /_/ / / / / / / /_____/ ___ |_/ / | |/ /___/ / + || \____/\__,_/_/_/ /_/ /_/ /_/ |_/___/ |___//____/ + || + || + || Created by Jordan.#2139 + ||]] + +Citizen.CreateThread(function() + local CurrentVersion = GetResourceMetadata(GetCurrentResourceName(), 'version', 0) + if not CurrentVersion then + print('^1Calm-AI V3 Version Check Failed!^7') + end + + function VersionCheckHTTPRequest() + PerformHttpRequest('https://raw.githubusercontent.com/Jordan2139/versions/master/calmv3.json', VersionCheck, 'GET') + end + + function VersionCheck(err, response, headers) + Citizen.Wait(3000) + if err == 200 then + local Data = json.decode(response) + if CurrentVersion ~= Data.NewestVersion then + print( label ) + print(' || \n || Calm-AI V3 is outdated!') + print(' || Current version: ^2' .. Data.NewestVersion .. '^7') + print(' || Your version: ^1' .. CurrentVersion .. '^7') + print(' || Please download the lastest version from ^5' .. Data.DownloadLocation .. '^7') + if Data.Changes ~= '' then + print(' || \n || ^5Changes: ^7' .. Data.Changes .. "\n^0 \\\\\n") + end + else + print( label ) + print(' || ^2Calm-AI V3 is up to date!\n^0 ||\n \\\\\n') + end + else + print( label ) + print(' || ^1There was an error getting the latest version information, if the issue persists contact Jordan.#2139 on Discord.\n^0 ||\n \\\\\n') + end + + SetTimeout(60000000, VersionCheckHTTPRequest) + end + + VersionCheckHTTPRequest() +end) diff --git a/resources/Car-Nitro/README.md b/resources/Car-Nitro/README.md new file mode 100644 index 000000000..fb1e0c418 --- /dev/null +++ b/resources/Car-Nitro/README.md @@ -0,0 +1,34 @@ +Advanced nitro system for FiveM +=============================== + +The most advanced nitro system for FiveM, inspired by the Need for Speed: Underground series. Works out of the box, no configuration is required. + +Features +-------- + +- Torque-based speed modifier +- Exhaust particles +- NOS purge +- Light trails + +- Screen effects +- Fully synced +- Controller support + + + +Controls +-------- + +- **Keyboard**: Hold `INPUT_CHARACTER_WHEEL` (Default: left ALT) +- **Gamepad:** Hold `INPUT_VEH_DUCK` (Default: A on Xbox, X on DualShock) diff --git a/resources/Car-Nitro/client/boost.lua b/resources/Car-Nitro/client/boost.lua new file mode 100644 index 000000000..8b68bf681 --- /dev/null +++ b/resources/Car-Nitro/client/boost.lua @@ -0,0 +1,74 @@ +local vehicles = {} + +function SetNitroBoostScreenEffectsEnabled(enabled) + if enabled then + StopScreenEffect('RaceTurbo') + StartScreenEffect('RaceTurbo', 0, false) + SetTimecycleModifier('rply_motionblur') + ShakeGameplayCam('SKY_DIVING_SHAKE', 0.25) + else + StopGameplayCamShaking(true) + SetTransitionTimecycleModifier('default', 0.35) + end +end + +function IsVehicleNitroBoostEnabled(vehicle) + return vehicles[vehicle] == true +end + +function SetVehicleNitroBoostEnabled(vehicle, enabled) + if IsVehicleNitroBoostEnabled(vehicle) == enabled then + return + end + + if IsPedInVehicle(PlayerPedId(), vehicle) then + SetNitroBoostScreenEffectsEnabled(enabled) + end + + SetVehicleBoostActive(vehicle, enabled) + vehicles[vehicle] = enabled or nil +end + +Citizen.CreateThread(function () + local function BackfireLoop() + -- TODO: Only do this for nearby vehicles. + for vehicle in pairs(vehicles) do + CreateVehicleExhaustBackfire(vehicle, 1.25) + end + end + + while true do + Citizen.Wait(0) + BackfireLoop() + end +end) + +Citizen.CreateThread(function () + local function BoostLoop() + local player = PlayerPedId() + local vehicle = GetVehiclePedIsIn(player) + local driver = GetPedInVehicleSeat(vehicle, -1) + local enabled = IsVehicleNitroBoostEnabled(vehicle) + + if vehicle == 0 or driver ~= player or not enabled then + return + end + + -- TODO: Use better math. The effect of nitro is quite extreme for cars with + -- custom handling, while slow cars have almost no effect from this at all. + -- Also, maybe torque is not the correct setting to change. + if not IsVehicleStopped(vehicle) then + local vehicleModel = GetEntityModel(vehicle) + local currentSpeed = GetEntitySpeed(vehicle) + local maximumSpeed = GetVehicleModelMaxSpeed(vehicleModel) + local multiplier = 2.0 * maximumSpeed / currentSpeed + + SetVehicleEngineTorqueMultiplier(vehicle, multiplier) + end + end + + while true do + Citizen.Wait(0) + BoostLoop() + end +end) diff --git a/resources/Car-Nitro/client/fuel.lua b/resources/Car-Nitro/client/fuel.lua new file mode 100644 index 000000000..3b8b1dec5 --- /dev/null +++ b/resources/Car-Nitro/client/fuel.lua @@ -0,0 +1,81 @@ +local vehicles = {} +local lastNitro = 0 +local nitroCooldown = 2500 -- TODO: per-vehicle cooldown? + +local nitroFuelSize = 2000 +local nitroFuelDrainRate = 10 +local nitroPurgeFuelDrainRate = nitroFuelDrainRate * 2 +local nitroRechargeRate = nitroFuelDrainRate / 2 + +function InitNitroFuel(vehicle) + if not vehicles[vehicle] then + vehicles[vehicle] = nitroFuelSize + end +end + +function DrainNitroFuel(vehicle, purge) + if not purge then + purge = false + end + + if not vehicles[vehicle] then + vehicles[vehicle] = nitroFuelSize + end + + if vehicles[vehicle] > 0 then + if purge then + vehicles[vehicle] = vehicles[vehicle] - nitroFuelDrainRate * 2 + else + vehicles[vehicle] = vehicles[vehicle] - nitroFuelDrainRate + end + lastNitro = GetGameTimer() + end +end + +function RechargeNitroFuel(vehicle) + if not vehicles[vehicle] then + vehicles[vehicle] = nitroFuelSize + end + + if vehicles[vehicle] and vehicles[vehicle] < nitroFuelSize then + vehicles[vehicle] = vehicles[vehicle] + nitroRechargeRate + end +end + +function GetNitroFuelLevel(vehicle) + if vehicles[vehicle] then + return math.max(0, vehicles[vehicle]) + end + + return 0 +end + +function SetNitroFuelLevel(vehicle, level) + vehicles[vehicle] = level +end + +Citizen.CreateThread(function () + local function FuelLoop() + local player = PlayerPedId() + local vehicle = GetVehiclePedIsIn(player) + local driver = GetPedInVehicleSeat(vehicle, -1) + local isRunning = GetIsVehicleEngineRunning(vehicle) + local isBoosting = IsVehicleNitroBoostEnabled(vehicle) + local isPurging = IsVehicleNitroPurgeEnabled(vehicle) + + if vehicle == 0 or driver ~= player or not isRunning then + return + end + + if isRunning then + if isBoosting == false and isPurging == false and GetGameTimer() > lastNitro + nitroCooldown then + RechargeNitroFuel(vehicle) + end + end + end + + while true do + Citizen.Wait(0) + FuelLoop() + end +end) diff --git a/resources/Car-Nitro/client/main.lua b/resources/Car-Nitro/client/main.lua new file mode 100644 index 000000000..f0f07058a --- /dev/null +++ b/resources/Car-Nitro/client/main.lua @@ -0,0 +1,114 @@ +local INPUT_CHARACTER_WHEEL = 19 +local INPUT_VEH_ACCELERATE = 71 +local INPUT_VEH_DUCK = 73 + +local function IsNitroControlPressed() + if not IsInputDisabled(2) then + DisableControlAction(2, INPUT_VEH_DUCK) + return IsDisabledControlPressed(2, INPUT_VEH_DUCK) + end + + return IsControlPressed(0, INPUT_CHARACTER_WHEEL) +end + +local function IsDrivingControlPressed() + return IsControlPressed(0, INPUT_VEH_ACCELERATE) +end + +local function NitroLoop(lastVehicle) + local player = PlayerPedId() + local vehicle = GetVehiclePedIsIn(player) + local driver = GetPedInVehicleSeat(vehicle, -1) + + if lastVehicle ~= 0 and lastVehicle ~= vehicle then + SetVehicleNitroBoostEnabled(lastVehicle, false) + SetVehicleLightTrailEnabled(lastVehicle, false) + SetVehicleNitroPurgeEnabled(lastVehicle, false) + TriggerServerEvent('nitro:__sync', false, false, true) + end + + if vehicle == 0 or driver ~= player then + return 0 + end + + local model = GetEntityModel(vehicle) + + if not IsThisModelACar(model) or IsVehicleElectric(vehicle) then + return 0 + end + + local isEnabled = IsNitroControlPressed() + local isDriving = IsDrivingControlPressed() + local isRunning = GetIsVehicleEngineRunning(vehicle) + local isBoosting = IsVehicleNitroBoostEnabled(vehicle) + local isPurging = IsVehicleNitroPurgeEnabled(vehicle) + local isFueled = GetNitroFuelLevel(vehicle) > 0 + + if isRunning and isEnabled and isFueled then + if isDriving then + if not isBoosting then + SetVehicleNitroBoostEnabled(vehicle, true) + SetVehicleLightTrailEnabled(vehicle, true) + SetVehicleNitroPurgeEnabled(vehicle, false) + TriggerServerEvent('nitro:__sync', true, false, false) + end + else + if not isPurging then + SetVehicleNitroBoostEnabled(vehicle, false) + SetVehicleLightTrailEnabled(vehicle, false) + SetVehicleNitroPurgeEnabled(vehicle, true) + TriggerServerEvent('nitro:__sync', false, true, false) + end + end + elseif isBoosting or isPurging then + SetVehicleNitroBoostEnabled(vehicle, false) + SetVehicleLightTrailEnabled(vehicle, false) + SetVehicleNitroPurgeEnabled(vehicle, false) + TriggerServerEvent('nitro:__sync', false, false, false) + end + + return vehicle +end + +Citizen.CreateThread(function () + local lastVehicle = 0 + + while true do + Citizen.Wait(0) + lastVehicle = NitroLoop(lastVehicle) + end +end) + +RegisterNetEvent('nitro:__update') +AddEventHandler('nitro:__update', function (playerServerId, boostEnabled, purgeEnabled, lastVehicle) + local playerId = GetPlayerFromServerId(playerServerId) + + -- Sometimes, the source player is disconnected from our session. If we don't + -- check for that, their player ID will be -1. GetPlayerPed(-1) is our local + -- player, so the logic to apply nitro sync will apply it to our vehicle when + -- that happens. + -- + -- Say, the source player enables nitro, but is not connected in our session. + -- Nitro is then synced on the vehicle for player -1, which is us, so nitro is + -- activated on our vehicle. However, because we're not actually pressing the + -- nitro key, our client will update the nitro state accordingly, and turn it + -- off. That then syncs to the original source player, who has the exact same + -- network issue as we do. Nitro will be disabled on his vehicle, but he's + -- still pressing the nitro key, so it's being enabled right after. Long story + -- short, this causes an infinite sync loop between all clients as long as at + -- least one player has nitro activated. + -- + -- Therefor, simply check if the source player is connected to our session. If + -- not, ignore the synced state and don't do anything. + if not NetworkIsPlayerConnected(playerId) then + return + end + + local player = GetPlayerPed(playerId) + local vehicle = GetVehiclePedIsIn(player, lastVehicle) + local driver = GetPedInVehicleSeat(vehicle, -1) + + SetVehicleNitroBoostEnabled(vehicle, boostEnabled) + SetVehicleLightTrailEnabled(vehicle, boostEnabled) + SetVehicleNitroPurgeEnabled(vehicle, purgeEnabled) +end) diff --git a/resources/Car-Nitro/client/ptfx.lua b/resources/Car-Nitro/client/ptfx.lua new file mode 100644 index 000000000..6e763011d --- /dev/null +++ b/resources/Car-Nitro/client/ptfx.lua @@ -0,0 +1,82 @@ +-- TODO: Get actual exhaust positions and rotations. This is based on bone +-- positions, but custom exhausts can have different positions or rotations. +function CreateVehicleExhaustBackfire(vehicle, scale) + local exhaustNames = { + "exhaust", "exhaust_2", "exhaust_3", "exhaust_4", + "exhaust_5", "exhaust_6", "exhaust_7", "exhaust_8", + "exhaust_9", "exhaust_10", "exhaust_11", "exhaust_12", + "exhaust_13", "exhaust_14", "exhaust_15", "exhaust_16" + } + + for _, exhaustName in ipairs(exhaustNames) do + local boneIndex = GetEntityBoneIndexByName(vehicle, exhaustName) + + if boneIndex ~= -1 then + local pos = GetWorldPositionOfEntityBone(vehicle, boneIndex) + local off = GetOffsetFromEntityGivenWorldCoords(vehicle, pos.x, pos.y, pos.z) + + UseParticleFxAssetNextCall('core') + StartParticleFxNonLoopedOnEntity('veh_backfire', vehicle, off.x, off.y, off.z, 0.0, 0.0, 0.0, scale, false, false, false) + end + end +end + +function CreateVehiclePurgeSpray(vehicle, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale) + UseParticleFxAssetNextCall('core') + return StartParticleFxLoopedOnEntity('ent_sht_steam', vehicle, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale, false, false, false) +end + +function CreateVehicleLightTrail(vehicle, bone, scale) + UseParticleFxAssetNextCall('core') + local ptfx = StartParticleFxLoopedOnEntityBone('veh_light_red_trail', vehicle, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, bone, scale, false, false, false) + SetParticleFxLoopedEvolution(ptfx, "speed", 1.0, false) + return ptfx +end + +function StopVehicleLightTrail(ptfx, duration) + Citizen.CreateThread(function() + local startTime = GetGameTimer() + local endTime = GetGameTimer() + duration + while GetGameTimer() < endTime do + Citizen.Wait(0) + local now = GetGameTimer() + local scale = (endTime - now) / duration + SetParticleFxLoopedScale(ptfx, scale) + SetParticleFxLoopedAlpha(ptfx, scale) + end + StopParticleFxLooped(ptfx) + end) +end + +-- function CreateVehiclePurgeSpray(vehicle, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale, density, r, g, b) +-- local boneIndex = GetEntityBoneIndexByName(vehicle, 'bonnet') +-- local pos = GetWorldPositionOfEntityBone(vehicle, boneIndex) +-- local off = GetOffsetFromEntityGivenWorldCoords(vehicle, pos.x, pos.y, pos.z) +-- +-- local xOffset = (xOffset or 0) + off.x +-- local yOffset = (yOffset or 0) + off.y +-- local zOffset = (zOffset or 0) + off.z +-- +-- local xRot = xRot or 0 +-- local yRot = yRot or 0 +-- local zRot = zRot or 0 +-- +-- local scale = scale or 0.5 +-- local density = density or 3 +-- +-- local r = (r or 255) / 255 +-- local g = (g or 255) / 255 +-- local b = (b or 255) / 255 +-- +-- local particles = {} +-- +-- for i = 0, density do +-- UseParticleFxAssetNextCall('core') +-- local fx1 = StartParticleFxLoopedOnEntity('ent_sht_steam', vehicle, off.x - 0.5, off.y + 0.05, off.z, 40.0, -20.0, 0.0, 0.5, false, false, false) +-- SetParticleFxLoopedColour(fx1, r, g, b) +-- +-- UseParticleFxAssetNextCall('core') +-- local fx2 = StartParticleFxLoopedOnEntity('ent_sht_steam', vehicle, off.x + 0.5, off.y + 0.05, off.z, 40.0, 20.0, 0.0, 0.5, false, false, false) +-- SetParticleFxLoopedColour(fx2, r, g, b) +-- end +-- end diff --git a/resources/Car-Nitro/client/purge.lua b/resources/Car-Nitro/client/purge.lua new file mode 100644 index 000000000..a1a6d2a9d --- /dev/null +++ b/resources/Car-Nitro/client/purge.lua @@ -0,0 +1,74 @@ +-- local DEFAULT_PURGE_CONFIG = { +-- infernus = { +-- [1] = { +-- scale: 0.5, +-- density: 3, +-- color: { 255, 255, 255 }, +-- position: { 0.0, 0.0, 0.0 }, +-- rotation: { 0.0, 0.0, 0.0 } +-- } +-- } +-- } + +-------------------------------------------------------------------------------- + +-- local modelConfig = {} +-- local entityConfig = {} +-- +-- local function AddVehicleModelNitroPurgeNozzle() end +-- local function RemoveVehicleModelNitroPurgeNozzle() end +-- local function SetVehicleModelNitroPurgeNozzleScale() end +-- local function SetVehicleModelNitroPurgeNozzleDensity() end +-- local function SetVehicleModelNitroPurgeNozzleColor() end +-- local function SetVehicleModelNitroPurgeNozzlePosition() end +-- local function SetVehicleModelNitroPurgeNozzleRotation() end +-- +-- local function AddVehicleNitroPurgeNozzle() end +-- local function RemoveVehicleNitroPurgeNozzle() end +-- local function SetVehicleNitroPurgeNozzleScale() end +-- local function SetVehicleNitroPurgeNozzleDensity() end +-- local function SetVehicleNitroPurgeNozzleColor() end +-- local function SetVehicleNitroPurgeNozzlePosition() end +-- local function SetVehicleNitroPurgeNozzleRotation() end + +-------------------------------------------------------------------------------- + +local vehicles = {} +local particles = {} + +function IsVehicleNitroPurgeEnabled(vehicle) + return vehicles[vehicle] == true +end + +function SetVehicleNitroPurgeEnabled(vehicle, enabled) + if IsVehicleNitroPurgeEnabled(vehicle) == enabled then + return + end + + if enabled then + local bone = GetEntityBoneIndexByName(vehicle, 'bonnet') + local pos = GetWorldPositionOfEntityBone(vehicle, bone) + local off = GetOffsetFromEntityGivenWorldCoords(vehicle, pos.x, pos.y, pos.z) + local ptfxs = {} + + for i=0,3 do + local leftPurge = CreateVehiclePurgeSpray(vehicle, off.x - 0.5, off.y + 0.05, off.z, 40.0, -20.0, 0.0, 0.5) + local rightPurge = CreateVehiclePurgeSpray(vehicle, off.x + 0.5, off.y + 0.05, off.z, 40.0, 20.0, 0.0, 0.5) + + table.insert(ptfxs, leftPurge) + table.insert(ptfxs, rightPurge) + end + + vehicles[vehicle] = true + particles[vehicle] = ptfxs + else + if particles[vehicle] and #particles[vehicle] > 0 then + for _, particleId in ipairs(particles[vehicle]) do + StopParticleFxLooped(particleId) + end + end + + vehicles[vehicle] = nil + particles[vehicle] = nil + end +end diff --git a/resources/Car-Nitro/client/trails.lua b/resources/Car-Nitro/client/trails.lua new file mode 100644 index 000000000..78add36ad --- /dev/null +++ b/resources/Car-Nitro/client/trails.lua @@ -0,0 +1,36 @@ +-- synced by Xinerki :^) + +local vehicles = {} +local particles = {} + +function IsVehicleLightTrailEnabled(vehicle) + return vehicles[vehicle] == true +end + +function SetVehicleLightTrailEnabled(vehicle, enabled) + if IsVehicleLightTrailEnabled(vehicle) == enabled then + return + end + + if enabled then + local ptfxs = {} + + local leftTrail = CreateVehicleLightTrail(vehicle, GetEntityBoneIndexByName(vehicle, "taillight_l"), 1.0) + local rightTrail = CreateVehicleLightTrail(vehicle, GetEntityBoneIndexByName(vehicle, "taillight_r"), 1.0) + + table.insert(ptfxs, leftTrail) + table.insert(ptfxs, rightTrail) + + vehicles[vehicle] = true + particles[vehicle] = ptfxs + else + if particles[vehicle] and #particles[vehicle] > 0 then + for _, particleId in ipairs(particles[vehicle]) do + StopVehicleLightTrail(particleId, 500) + end + end + + vehicles[vehicle] = nil + particles[vehicle] = nil + end +end diff --git a/resources/Car-Nitro/client/utils.lua b/resources/Car-Nitro/client/utils.lua new file mode 100644 index 000000000..69cebe931 --- /dev/null +++ b/resources/Car-Nitro/client/utils.lua @@ -0,0 +1,22 @@ +local ELECTRIC_VEHICLES = { + [GetHashKey('AIRTUG')] = true, + [GetHashKey('CYCLONE')] = true, + [GetHashKey('CADDY')] = true, + [GetHashKey('CADDY2')] = true, + [GetHashKey('CADDY3')] = true, + [GetHashKey('DILETTANTE')] = true, + [GetHashKey('IMORGON')] = true, + [GetHashKey('KHAMEL')] = true, + [GetHashKey('NEON')] = true, + [GetHashKey('RAIDEN')] = true, + [GetHashKey('SURGE')] = true, + [GetHashKey('VOLTIC')] = true, + [GetHashKey('TEZERACT')] = true +} + +-- TODO: Replace with `FLAG_IS_ELECTRIC` from vehicles.meta: +-- https://gtamods.com/wiki/Vehicles.meta +function IsVehicleElectric(vehicle) + local model = GetEntityModel(vehicle) + return ELECTRIC_VEHICLES[model] or false +end diff --git a/resources/Car-Nitro/fxmanifest.lua b/resources/Car-Nitro/fxmanifest.lua new file mode 100644 index 000000000..c87f715e9 --- /dev/null +++ b/resources/Car-Nitro/fxmanifest.lua @@ -0,0 +1,17 @@ +fx_version 'bodacious' +game 'gta5' + +name 'sw-nitro' +description 'The most advanced nitro system for FiveM' +author 'Deltanic - https://github.com/Deltanic/' +url 'https://github.com/swcfx/sw-nitro' + +client_script 'client/utils.lua' +client_script 'client/fuel.lua' +client_script 'client/ptfx.lua' +client_script 'client/boost.lua' +client_script 'client/purge.lua' +client_script 'client/trails.lua' +client_script 'client/main.lua' + +server_script 'server/main.lua' diff --git a/resources/Car-Nitro/server/main.lua b/resources/Car-Nitro/server/main.lua new file mode 100644 index 000000000..fa792f74a --- /dev/null +++ b/resources/Car-Nitro/server/main.lua @@ -0,0 +1,11 @@ +RegisterNetEvent('nitro:__sync') +AddEventHandler('nitro:__sync', function (boostEnabled, purgeEnabled, lastVehicle) + -- Fix for source reference being lost during loop below. + local source = source + + for _, player in ipairs(GetPlayers()) do + if player ~= tostring(source) then + TriggerClientEvent('nitro:__update', player, source, boostEnabled, purgeEnabled, lastVehicle) + end + end +end) diff --git a/resources/CarCleanUp/__resource.lua b/resources/CarCleanUp/__resource.lua new file mode 100644 index 000000000..a6ff08974 --- /dev/null +++ b/resources/CarCleanUp/__resource.lua @@ -0,0 +1 @@ +client_script "client.lua" \ No newline at end of file diff --git a/resources/CarCleanUp/client.lua b/resources/CarCleanUp/client.lua new file mode 100644 index 000000000..00cdb4bac --- /dev/null +++ b/resources/CarCleanUp/client.lua @@ -0,0 +1,10 @@ +Citizen.CreateThread(function() + while true do + Citizen.Wait(1) + car = GetVehiclePedIsIn(GetPlayerPed(-1), false) + + if car then + Citizen.InvokeNative(0xB736A491E64A32CF,Citizen.PointerValueIntInitialized(car)) + end + end +end) \ No newline at end of file diff --git a/resources/CarHud/__resource.lua b/resources/CarHud/__resource.lua new file mode 100644 index 000000000..7f715aa3b --- /dev/null +++ b/resources/CarHud/__resource.lua @@ -0,0 +1,2 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' +client_script 'carhud.lua' \ No newline at end of file diff --git a/resources/CarHud/carhud.lua b/resources/CarHud/carhud.lua new file mode 100644 index 000000000..0a0811733 --- /dev/null +++ b/resources/CarHud/carhud.lua @@ -0,0 +1,154 @@ +-- ################################### +-- +-- C O N F I G +-- +-- ################################### + + + +-- show/hide compoent +local HUD = { + + Speed = 'mph', -- kmh or mph + + DamageSystem = true, + + SpeedIndicator = true, + + ParkIndicator = false, + + Top = true, -- ALL TOP PANAL ( oil, dsc, plate, fluid, ac ) + + Plate = true, -- only if Top is false and you want to keep Plate Number + +} + +-- move all ui +local UI = { + + x = 0.000 , -- Base Screen Coords + x + y = -0.001 , -- Base Screen Coords + -y + +} + + + + + +-- ################################### +-- +-- C O D E +-- +-- ################################### + + + +Citizen.CreateThread(function() + while true do Citizen.Wait(1) + + + local MyPed = GetPlayerPed(-1) + + if(IsPedInAnyVehicle(MyPed, false))then + + local MyPedVeh = GetVehiclePedIsIn(GetPlayerPed(-1),false) + local PlateVeh = GetVehicleNumberPlateText(MyPedVeh) + local VehStopped = IsVehicleStopped(MyPedVeh) + local VehEngineHP = GetVehicleEngineHealth(MyPedVeh) + local VehBodyHP = GetVehicleBodyHealth(MyPedVeh) + local VehBurnout = IsVehicleInBurnout(MyPedVeh) + + if HUD.Speed == 'kmh' then + Speed = GetEntitySpeed(GetVehiclePedIsIn(GetPlayerPed(-1), false)) * 3.6 + elseif HUD.Speed == 'mph' then + Speed = GetEntitySpeed(GetVehiclePedIsIn(GetPlayerPed(-1), false)) * 2.236936 + else + Speed = 0.0 + end + + if HUD.Top then + drawTxt(UI.x + 0.563, UI.y + 1.2624, 1.0,1.0,0.55, "~w~" .. PlateVeh, 255, 255, 255, 255) + drawTxt(UI.x + 0.619, UI.y + 1.245, 1.0,1.0,0.45, "ENG", 114, 219, 165,200) + + if VehBurnout then + drawTxt(UI.x + 0.535, UI.y + 1.266, 1.0,1.0,0.44, "~r~DSC", 255, 255, 255, 200) + else + drawTxt(UI.x + 0.535, UI.y + 1.266, 1.0,1.0,0.44, "DSC", 255, 255, 255, 150) + end + + if (VehEngineHP > 0) and (VehEngineHP < 300) then + drawTxt(UI.x + 0.619, UI.y + 1.266, 1.0,1.0,0.45, "~r~Fluid", 255, 255, 255, 200) + drawTxt(UI.x + 0.514, UI.y + 1.266, 1.0,1.0,0.45, "~r~Oil", 255, 255, 255, 200) + drawTxt(UI.x + 0.645, UI.y + 1.266, 1.0,1.0,0.45, "~r~AC", 255, 255, 255, 200) + drawTxt(UI.x + 0.619, UI.y + 1.245, 1.0,1.0,0.45, "~r~ENG", 255, 255, 255, 200) + elseif VehEngineHP < 1 then + drawRct(UI.x + 0.159, UI.y + 0.809, 0.005, 0,0,0,0,100) -- panel damage + drawTxt(UI.x + 0.619, UI.y + 1.266, 1.0,1.0,0.45, "~r~Fluid", 255, 255, 255, 200) + drawTxt(UI.x + 0.514, UI.y + 1.266, 1.0,1.0,0.45, "~r~Oil", 255, 255, 255, 200) + drawTxt(UI.x + 0.645, UI.y + 1.266, 1.0,1.0,0.45, "~r~AC", 255, 255, 255, 200) + drawTxt(UI.x + 0.619, UI.y + 1.245, 1.0,1.0,0.45, "~r~ENG", 255, 255, 255, 200) + else + drawTxt(UI.x + 0.619, UI.y + 1.266, 1.0,1.0,0.45, "Fluid", 255, 255, 255, 150) + drawTxt(UI.x + 0.514, UI.y + 1.266, 1.0,1.0,0.45, "Oil", 255, 255, 255, 150) + drawTxt(UI.x + 0.645, UI.y + 1.266, 1.0,1.0,0.45, "AC", 255, 255, 255, 150) + drawTxt(UI.x + 0.619, UI.y + 1.245, 1.0,1.0,0.45, "ENG", 87, 158, 113,200) + end + if HUD.ParkIndicator then + if VehStopped then + drawTxt(UI.x + 0.6605, UI.y + 1.262, 1.0,1.0,0.6, "~r~P", 255, 255, 255, 200) + else + drawTxt(UI.x + 0.6605, UI.y + 1.262, 1.0,1.0,0.6, "P", 255, 255, 255, 150) + end + end + else + if HUD.Plate then + drawTxt(UI.x + 0.61, UI.y + 1.385, 1.0,1.0,0.55, "~w~" .. PlateVeh, 255, 255, 255, 255) + end + if HUD.ParkIndicator then + + if VehStopped then + drawTxt(UI.x + 0.643, UI.y + 1.34, 1.0,1.0,0.6, "~r~P", 255, 255, 255, 200) + else + drawTxt(UI.x + 0.643, UI.y + 1.34, 1.0,1.0,0.6, "P", 255, 255, 255, 150) + end + end + end + if HUD.SpeedIndicator then + drawRct(UI.x + 0.11, UI.y + 0.932, 0.046,0.03,0,0,0,150) -- Speed panel + if HUD.Speed == 'kmh' then + drawTxt(UI.x + 0.61, UI.y + 1.42, 1.0,1.0,0.64 , "~w~" .. math.ceil(Speed), 255, 255, 255, 255) + drawTxt(UI.x + 0.633, UI.y + 1.432, 1.0,1.0,0.4, "~w~ km/h", 255, 255, 255, 255) + elseif HUD.Speed == 'mph' then + drawTxt(UI.x + 0.61, UI.y + 1.42, 1.0,1.0,0.64 , "~w~" .. math.ceil(Speed), 255, 255, 255, 255) + drawTxt(UI.x + 0.633, UI.y + 1.432, 1.0,1.0,0.4, "~w~ mph", 255, 255, 255, 255) + else + drawTxt(UI.x + 0.81, UI.y + 1.42, 1.0,1.0,0.64 , [[Carhud ~r~ERROR~w~ ~c~in ~w~HUD Speed~c~ config (something else than ~y~'kmh'~c~ or ~y~'mph'~c~)]], 255, 255, 255, 255) + end + end + + if HUD.DamageSystem then + + end + + + end + end +end) + +function drawTxt(x,y ,width,height,scale, text, r,g,b,a) + SetTextFont(4) + SetTextProportional(0) + SetTextScale(scale, scale) + SetTextColour(r, g, b, a) + SetTextDropShadow(0, 0, 0, 0,255) + SetTextEdge(2, 0, 0, 0, 255) + SetTextDropShadow() + SetTextOutline() + SetTextEntry("STRING") + AddTextComponentString(text) + DrawText(x - width/2, y - height/2 + 0.005) +end + +function drawRct(x,y,width,height,r,g,b,a) + DrawRect(x + width/2, y + height/2, width, height, r, g, b, a) +end diff --git a/resources/CarryPeople/README.md b/resources/CarryPeople/README.md new file mode 100644 index 000000000..edfad4245 --- /dev/null +++ b/resources/CarryPeople/README.md @@ -0,0 +1,6 @@ +# Carry People by Robbster + +Instructions on how to use: +Type /carry close to someone then either person can cancel by again doing /carry + +Feel free to make improvements with PRs diff --git a/resources/CarryPeople/__resource.lua b/resources/CarryPeople/__resource.lua new file mode 100644 index 000000000..674359508 --- /dev/null +++ b/resources/CarryPeople/__resource.lua @@ -0,0 +1,2 @@ +client_script "cl_carry.lua" +server_script "sv_carry.lua" \ No newline at end of file diff --git a/resources/CarryPeople/cl_carry.lua b/resources/CarryPeople/cl_carry.lua new file mode 100644 index 000000000..03d2f0edb --- /dev/null +++ b/resources/CarryPeople/cl_carry.lua @@ -0,0 +1,137 @@ +local carryingBackInProgress = false +local carryAnimNamePlaying = "" +local carryAnimDictPlaying = "" +local carryControlFlagPlaying = 0 + +RegisterCommand("carry",function(source, args) + if not carryingBackInProgress then + local player = PlayerPedId() + lib = 'missfinale_c2mcs_1' + anim1 = 'fin_c2_mcs_1_camman' + lib2 = 'nm' + anim2 = 'firemans_carry' + distans = 0.15 + distans2 = 0.27 + height = 0.63 + spin = 0.0 + length = 100000 + controlFlagMe = 49 + controlFlagTarget = 33 + animFlagTarget = 1 + local closestPlayer = GetClosestPlayer(3) + target = GetPlayerServerId(closestPlayer) + if closestPlayer ~= -1 and closestPlayer ~= nil then + carryingBackInProgress = true + TriggerServerEvent('CarryPeople:sync', closestPlayer, lib,lib2, anim1, anim2, distans, distans2, height,target,length,spin,controlFlagMe,controlFlagTarget,animFlagTarget) + else + drawNativeNotification("No one nearby to carry!") + end + else + carryingBackInProgress = false + ClearPedSecondaryTask(GetPlayerPed(-1)) + DetachEntity(GetPlayerPed(-1), true, false) + local closestPlayer = GetClosestPlayer(3) + target = GetPlayerServerId(closestPlayer) + if target ~= 0 then + TriggerServerEvent("CarryPeople:stop",target) + end + end +end,false) + +RegisterNetEvent('CarryPeople:syncTarget') +AddEventHandler('CarryPeople:syncTarget', function(target, animationLib, animation2, distans, distans2, height, length,spin,controlFlag) + local playerPed = GetPlayerPed(-1) + local targetPed = GetPlayerPed(GetPlayerFromServerId(target)) + carryingBackInProgress = true + RequestAnimDict(animationLib) + + while not HasAnimDictLoaded(animationLib) do + Citizen.Wait(10) + end + if spin == nil then spin = 180.0 end + AttachEntityToEntity(GetPlayerPed(-1), targetPed, 0, distans2, distans, height, 0.5, 0.5, spin, false, false, false, false, 2, false) + if controlFlag == nil then controlFlag = 0 end + TaskPlayAnim(playerPed, animationLib, animation2, 8.0, -8.0, length, controlFlag, 0, false, false, false) + carryAnimNamePlaying = animation2 + carryAnimDictPlaying = animationLib + carryControlFlagPlaying = controlFlag +end) + +RegisterNetEvent('CarryPeople:syncMe') +AddEventHandler('CarryPeople:syncMe', function(animationLib, animation,length,controlFlag,animFlag) + local playerPed = GetPlayerPed(-1) + RequestAnimDict(animationLib) + + while not HasAnimDictLoaded(animationLib) do + Citizen.Wait(10) + end + Wait(500) + if controlFlag == nil then controlFlag = 0 end + TaskPlayAnim(playerPed, animationLib, animation, 8.0, -8.0, length, controlFlag, 0, false, false, false) + carryAnimNamePlaying = animation + carryAnimDictPlaying = animationLib + carryControlFlagPlaying = controlFlag +end) + +RegisterNetEvent('CarryPeople:cl_stop') +AddEventHandler('CarryPeople:cl_stop', function() + carryingBackInProgress = false + ClearPedSecondaryTask(GetPlayerPed(-1)) + DetachEntity(GetPlayerPed(-1), true, false) +end) + +Citizen.CreateThread(function() + while true do + if carryingBackInProgress then + while not IsEntityPlayingAnim(GetPlayerPed(-1), carryAnimDictPlaying, carryAnimNamePlaying, 3) do + TaskPlayAnim(GetPlayerPed(-1), carryAnimDictPlaying, carryAnimNamePlaying, 8.0, -8.0, 100000, carryControlFlagPlaying, 0, false, false, false) + Citizen.Wait(0) + end + end + Wait(0) + end +end) + +function GetPlayers() + local players = {} + + for i = 0, 255 do + if NetworkIsPlayerActive(i) then + table.insert(players, i) + end + end + + return players +end + +function GetClosestPlayer(radius) + local players = GetPlayers() + local closestDistance = -1 + local closestPlayer = -1 + local ply = GetPlayerPed(-1) + local plyCoords = GetEntityCoords(ply, 0) + + for index,value in ipairs(players) do + local target = GetPlayerPed(value) + if(target ~= ply) then + local targetCoords = GetEntityCoords(GetPlayerPed(value), 0) + local distance = GetDistanceBetweenCoords(targetCoords['x'], targetCoords['y'], targetCoords['z'], plyCoords['x'], plyCoords['y'], plyCoords['z'], true) + if(closestDistance == -1 or closestDistance > distance) then + closestPlayer = value + closestDistance = distance + end + end + end + --print("closest player is dist: " .. tostring(closestDistance)) + if closestDistance <= radius then + return closestPlayer + else + return nil + end +end + +function drawNativeNotification(text) + SetTextComponentFormat('STRING') + AddTextComponentString(text) + DisplayHelpTextFromStringLabel(0, 0, 1, -1) +end \ No newline at end of file diff --git a/resources/CarryPeople/sv_carry.lua b/resources/CarryPeople/sv_carry.lua new file mode 100644 index 000000000..79373eff3 --- /dev/null +++ b/resources/CarryPeople/sv_carry.lua @@ -0,0 +1,10 @@ +RegisterServerEvent('CarryPeople:sync') +AddEventHandler('CarryPeople:sync', function(target, animationLib,animationLib2, animation, animation2, distans, distans2, height,targetSrc,length,spin,controlFlagSrc,controlFlagTarget,animFlagTarget) + TriggerClientEvent('CarryPeople:syncTarget', targetSrc, source, animationLib2, animation2, distans, distans2, height, length,spin,controlFlagTarget,animFlagTarget) + TriggerClientEvent('CarryPeople:syncMe', source, animationLib, animation,length,controlFlagSrc,animFlagTarget) +end) + +RegisterServerEvent('CarryPeople:stop') +AddEventHandler('CarryPeople:stop', function(targetSrc) + TriggerClientEvent('CarryPeople:cl_stop', targetSrc) +end) diff --git a/resources/Cayo-TP/LICENSE b/resources/Cayo-TP/LICENSE new file mode 100644 index 000000000..f7b179062 --- /dev/null +++ b/resources/Cayo-TP/LICENSE @@ -0,0 +1,24 @@ +d0p3t - https://www.d0p3t.nl + +Copyright © 2020 + +----- + +THIS PROJECT USES A CUSTOM LICENSE. MAKE SURE TO READ IT BEFORE THINKING ABOUT DOING ANYTHING WITH DOPE_ISLAND_HOPPER. + +----- + +- YOU ARE ALLOWED TO USE DOPE_ISLAND_HOPPER ON AS MANY SERVERS AS YOU WANT. +- _YOU ARE ALSO ALLOWED TO EDIT THIS RESOURCE TO ADD/CHANGE/REMOVE WHATEVER YOU WANT._ (see the exception to this rule in the "credits" section below) +- **YOU ARE HOWEVER _NOT_ ALLOWED TO RE-RELEASE (EDITED OR NON-EDITED) VERSIONS OF THIS RESOURCE WITHOUT WRITTEN PERMISSIONS BY MYSELF (REMCO TROOST / D0P3T). FOR ADDED FEATURES/CHANGES, FEEL FREE TO CREATE A FORK & CREATE A PULL REQUEST.** + +---- + +**Credits** + +Never should you change the credits (for example in the source code comment section) to claim this resource to be your own. 90% of the users will recognize this resource as being dope_island_hopper, so changing the name of it and removing the credits section, is just useless. You're just being extremely rude and nodoby likes you anymore if they find out you're a big fat liar. + +----- + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/resources/Cayo-TP/README.md b/resources/Cayo-TP/README.md new file mode 100644 index 000000000..d494b12dd --- /dev/null +++ b/resources/Cayo-TP/README.md @@ -0,0 +1 @@ +No README here yet. \ No newline at end of file diff --git a/resources/Cayo-TP/client/cutscenes.lua b/resources/Cayo-TP/client/cutscenes.lua new file mode 100644 index 000000000..3e60bd8b3 --- /dev/null +++ b/resources/Cayo-TP/client/cutscenes.lua @@ -0,0 +1,118 @@ +function LoadCutscene(cut, flag1, flag2) + if (not flag1) then + RequestCutscene(cut, 8) + else + RequestCutsceneEx(cut, flag1, flag2) + end + while (not HasThisCutsceneLoaded(cut)) do Wait(0) end + return +end + +local function BeginCutsceneWithPlayer() + local plyrId = PlayerPedId() + local playerClone = ClonePed_2(plyrId, 0.0, false, true, 1) + + SetBlockingOfNonTemporaryEvents(playerClone, true) + SetEntityVisible(playerClone, false, false) + SetEntityInvincible(playerClone, true) + SetEntityCollision(playerClone, false, false) + FreezeEntityPosition(playerClone, true) + SetPedHelmet(playerClone, false) + RemovePedHelmet(playerClone, true) + + SetCutsceneEntityStreamingFlags('MP_1', 0, 1) + RegisterEntityForCutscene(plyrId, 'MP_1', 0, GetEntityModel(plyrId), 64) + + Wait(10) + StartCutscene(0) + Wait(10) + ClonePedToTarget(playerClone, plyrId) + Wait(10) + DeleteEntity(playerClone) + Wait(50) + DoScreenFadeIn(250) + + return playerClone +end + +local function Finish(timer) + local tripped = false + + repeat + Wait(0) + if (timer and (GetCutsceneTime() > timer))then + DoScreenFadeOut(250) + tripped = true + end + + if (GetCutsceneTotalDuration() - GetCutsceneTime() <= 250) then + DoScreenFadeOut(250) + tripped = true + end + until not IsCutscenePlaying() + if (not tripped) then + DoScreenFadeOut(100) + Wait(150) + end + return +end + +local landAnim = {1, 2, 4} +local timings = { + [1] = 9100, + [2] = 17500, + [4] = 25400 +} + +function BeginLeaving(isIsland) + if (isIsland) then + RequestCollisionAtCoord(-2392.838, -2427.619, 43.1663) + + LoadCutscene('hs4_nimb_isd_lsa', 8, 24) + BeginCutsceneWithPlayer() + Finish() + RemoveCutscene() + else + RequestCollisionAtCoord(-1652.79, -3117.5, 13.98) + + LoadCutscene('hs4_lsa_take_nimb2') + BeginCutsceneWithPlayer() + + Finish() + RemoveCutscene() + + if (Config.Cutscenes.long) then + LoadCutscene('hs4_nimb_lsa_isd', 128, 24) + BeginCutsceneWithPlayer() + Finish(165000) + + LoadCutscene('hs4_nimb_lsa_isd', 256, 24) + BeginCutsceneWithPlayer() + Finish(170000) + + LoadCutscene('hs4_nimb_lsa_isd', 512, 24) + BeginCutsceneWithPlayer() + Finish(175200) + RemoveCutscene() + end + end +end + +function BeginLanding(isIsland) + if (isIsland) then + RequestCollisionAtCoord(-1652.79, -3117.5, 13.98) + local flag = landAnim[ math.random( #landAnim ) ] + LoadCutscene('hs4_lsa_land_nimb', flag, 24) + BeginCutsceneWithPlayer() + Finish(timings[flag]) + RemoveCutscene() + else + LoadCutscene('hs4_nimb_lsa_isd_repeat') + + RequestCollisionAtCoord(-2392.838, -2427.619, 43.1663) + BeginCutsceneWithPlayer() + + Finish() + RemoveCutscene() + end +end \ No newline at end of file diff --git a/resources/Cayo-TP/client/dlc_loader.lua b/resources/Cayo-TP/client/dlc_loader.lua new file mode 100644 index 000000000..ecd0f6dea --- /dev/null +++ b/resources/Cayo-TP/client/dlc_loader.lua @@ -0,0 +1,8 @@ +function EnableIsland(enabled) + Citizen.InvokeNative(0x9A9D1BA639675CF1, "HeistIsland", enabled) -- Toggle island gta5 level + Citizen.InvokeNative(0x5E1460624D194A38, enabled) -- Toggle island minimap +end + +function ToggleIslandPathNodes(enabled) + Citizen.InvokeNative(0xF74B1FFA4A15FBEA, enabled) -- Toggle island path nodes +end \ No newline at end of file diff --git a/resources/Cayo-TP/client/main.lua b/resources/Cayo-TP/client/main.lua new file mode 100644 index 000000000..eb8dc159e --- /dev/null +++ b/resources/Cayo-TP/client/main.lua @@ -0,0 +1,274 @@ +local IsOnIsland = false +local IsInSideTeleportLocation = false +local ClosestTeleportLocation = nil +local IsTeleporting = false +local PedCoordinates = vector3(0.0, 0.0, 0.0) + +local IslandBounds = { + x1 = 6093.88, + y1 = -5966.44, + x2 = 3283.17, + y2 = -4199.8 +} + +local Blips = {} + +local function GetFromCoordinate(location) + local coordinate = location.LosSantosCoordinate + local heading = location.LosSantosHeading + if IsOnIsland then + coordinate = location.IslandCoordinate + heading = location.IslandHeading + end + + return coordinate, heading +end + +local function GetToCoordinate(location) + local coordinate = location.IslandCoordinate + local heading = location.IslandHeading + + if IsOnIsland then + coordinate = location.LosSantosCoordinate + heading = location.LosSantosHeading + end + + return coordinate, heading +end + +local function CreateNewBlips() + for _, blip in pairs(Blips) do + RemoveBlip(blip) + end + + Blips = {} + + for _, location in pairs(Config.TeleportLocations) do + local blip = nil + local blipName = Config.Blip.LosSantosName + if not IsOnIsland then + blip = AddBlipForCoord(location.LosSantosCoordinate.x, location.LosSantosCoordinate.y, location.LosSantosCoordinate.z) + else + blip = AddBlipForCoord(location.IslandCoordinate.x, location.IslandCoordinate.y, location.IslandCoordinate.z) + blipName = Config.Blip.IslandName + end + + if blip then + SetBlipAsShortRange(blip, Config.Blip.MinimapOnly) + SetBlipSprite(blip, Config.Blip.Sprite) + SetBlipColour(blip, Config.Blip.Color) + SetBlipScale(blip, Config.Blip.Size) + SetBlipDisplayIndicatorOnBlip(blip, false) + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(blipName) + EndTextCommandSetBlipName(blip) + end + table.insert(Blips, blip) + end +end + +local function DisplayTeleportHelpText() + local key = Config.Control + + if not key or not IsInSideTeleportLocation then + return + end + + local destination = "Cayo Perico" + if IsOnIsland then + destination = "Los Santos" + end + + BeginTextCommandDisplayHelp("DOPE_PERICO_HELP") + AddTextComponentSubstringPlayerName(key.Name) + AddTextComponentSubstringPlayerName(destination) + EndTextCommandDisplayHelp(0, false, false, -1) +end + +local function ShowMarker() + local marker = Config.Marker + local startCoordinate = GetFromCoordinate(ClosestTeleportLocation) + local endCoordinate = GetToCoordinate(ClosestTeleportLocation) + + -- Some config issue + if not marker or not startCoordinate or not endCoordinate then + return + end + + -- Draw marker + DrawMarker( + marker.Type, + startCoordinate.x, + startCoordinate.y, + startCoordinate.z, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + marker.Size, + marker.Size, + marker.Size, + marker.Color.Red, + marker.Color.Green, + marker.Color.Blue, + marker.Color.Alpha, + false, + true, + 2, + nil, + nil, + nil, + false + ) +end + +local function GetClosestLocation() + local closestLocation = Config.TeleportLocations[1] + local closestLocationCoords = GetFromCoordinate(closestLocation) + + for index, location in pairs(Config.TeleportLocations) do + local startCoordinate = GetFromCoordinate(location) + + local distance = #(PedCoordinates - startCoordinate) + local currentClosestDistance = #(PedCoordinates - closestLocationCoords) + + if distance < currentClosestDistance then + closestLocation = location + closestLocationCoords = startCoordinate + end + end + + ClosestTeleportLocation = closestLocation + + local dist = #(PedCoordinates - closestLocationCoords) + if #(PedCoordinates - closestLocationCoords) < Config.DrawDistance then + IsInSideTeleportLocation = true + end +end + +local function IsPointInsideRectangle(x, y, x1, y1, x2, y2) + return (x1 < x and x < x2) and (y1 < y and y < y2) +end + +-- Refresh client's ped coordinates only once 500ms +Citizen.CreateThread( + function() + if IsScreenFadedOut() then + DoScreenFadeIn(500) + end + while true do + PedCoordinates = GetEntityCoords(PlayerPedId(), true) + Wait(500) + end + end +) + +Citizen.CreateThread( + function() + local waitTime = 500 + AddTextEntry("DOPE_PERICO_HELP", "Press ~a~ to teleport to ~a~") + CreateNewBlips() + while true do + Wait(waitTime) + + if not IsInSideTeleportLocation then + GetClosestLocation() + else + local closestLocationCoords = GetFromCoordinate(ClosestTeleportLocation) + + local distance = #(PedCoordinates - closestLocationCoords) + if distance > 20.0 then + IsInSideTeleportLocation = false + waitTime = 500 + else + waitTime = 0 + + if distance < (Config.Marker.Size * Config.ActivationDistanceScaler) then + DisplayTeleportHelpText() + end + ShowMarker() + end + end + end + end +) + +RegisterKeyMapping("+dope_perico", "Teleport to/from Cayo Perico Island", "keyboard", Config.Control.Key) + +RegisterCommand( + "+dope_perico", + function() + if not IsInSideTeleportLocation then + return + end + + local endCoordinate, endHeading = GetToCoordinate(ClosestTeleportLocation) + + if not IsTeleporting then + Citizen.CreateThread( + function() + if not IsPlayerTeleportActive() then + IsTeleporting = true + + local ped = PlayerPedId() + FreezeEntityPosition(ped, true) + if IsScreenFadedIn() then + DoScreenFadeOut(500) + while not IsScreenFadedOut() do + Wait(50) + end + end + + if (Config.Cutscenes.enabled) then BeginLeaving(IsOnIsland) end + + EnableIsland(not IsOnIsland) + + if (Config.Cutscenes.enabled) then BeginLanding(IsOnIsland) end + + StartPlayerTeleport(PlayerId(), endCoordinate.x, endCoordinate.y, endCoordinate.z, endHeading, true, true, false) + + local start = GetGameTimer() + while IsPlayerTeleportActive() do + if GetGameTimer() - start > 20000 then + print("^1Could not teleport. Report this to server administrator(s).^7") + if IsScreenFadedOut() then + DoScreenFadeIn(0) + end + return + end + Wait(500) + end + + SetGameplayCamRelativePitch(0.0, 1.0) + SetGameplayCamRelativeHeading(0.0) + + if IsScreenFadedOut() then + DoScreenFadeIn(1000) + while not IsScreenFadedIn() do + Wait(50) + end + end + + IsTeleporting = false + IsOnIsland = not IsOnIsland + + CreateNewBlips() + ToggleIslandPathNodes(IsOnIsland) + FreezeEntityPosition(ped, false) + end + end + ) + end + end, + false +) + +RegisterCommand( + "-dope_perico", + function() + -- empty to prevent chat message + end, + false +) diff --git a/resources/Cayo-TP/fxmanifest.lua b/resources/Cayo-TP/fxmanifest.lua new file mode 100644 index 000000000..b63be74ab --- /dev/null +++ b/resources/Cayo-TP/fxmanifest.lua @@ -0,0 +1,16 @@ +fx_version "cerulean" +game "gta5" + +author "d0p3t " +description "Conveniently hop between Los Santos and Cayo Perico island" +version "1.0.0" + +client_scripts { + 'shared/config.lua', + 'client/*.lua' +} + +server_scripts { + 'shared/config.lua', + 'server/*.lua' +} diff --git a/resources/Cayo-TP/server/main.lua b/resources/Cayo-TP/server/main.lua new file mode 100644 index 000000000..f0597b4fe --- /dev/null +++ b/resources/Cayo-TP/server/main.lua @@ -0,0 +1,58 @@ +local function VerifyConfig() + local invalid = false + + if not Config then + print("^1Could not find shared/config.lua!^7") + invalid = true + end + + if Config.Debug == nil or not Config.Marker or not Config.DrawDistance or not Config.ActivationDistanceScaler then + print("^1Missing default values Debug, Marker, DrawDistance or ActivationDistanceScaler.^7") + invalid = true + end + + -- Check Config.Control + if not Config.Control.Key or not Config.Control.Name then + print("^1Invalid Control setting.^7") + invalid = true + end + + -- Check Config.TeleportLocations + if not Config.TeleportLocations then + print("^1Could not find TeleportLocations.^7") + invalid = true + else + for index, location in ipairs(Config.TeleportLocations) do + if not location.LosSantosCoordinate or not location.IslandCoordinate then + print("^1Could not find Markers, LosSantosCoordinate or IslandCoordinate in teleport location " .. index .. ".^7") + invalid = true + break + end + + if type(location.LosSantosCoordinate) ~= "vector3" or type(location.IslandCoordinate) ~= "vector3" then + print("^1Invalid type for LosSantosCoordinate or IslandCoordinate in teleport location " .. index .. ". Type must be vector3^7") + invalid = true + break + end + + if not location.LosSantosHeading or not location.IslandHeading then + print("^1Could not find location headings.^7") + invalid = true + end + end + end + + if invalid then + local resource = GetCurrentResourceName() + print("^1You have one or more errors in your configuration file. Please check Config.lua.^7") + print("^3Can't fix this issue yourself? Check the forum topic of" .. resource .. " on the Cfx.re forum.^7") + print("^1Stopping " .. resource .. " ...^7") + StopResource(GetCurrentResourceName()) + end +end + +Citizen.CreateThread( + function() + VerifyConfig() + end +) diff --git a/resources/Cayo-TP/shared/config.lua b/resources/Cayo-TP/shared/config.lua new file mode 100644 index 000000000..cd475c200 --- /dev/null +++ b/resources/Cayo-TP/shared/config.lua @@ -0,0 +1,59 @@ +Config = {} + +Config.Debug = false + +Config.Control = { + Key = "e", + Name = "~INPUT_CONTEXT~" +} + +Config.Cutscenes = { + enabled = true, + long = false +} + +Config.DrawDistance = 20.0 + +Config.ActivationDistanceScaler = 1.2 + +Config.Blip = { + Sprite = 365, + Color = 21, + Size = 1.0, + LosSantosName = "Cayo Perico Island", + IslandName = "Los Santos", + MinimapOnly = true +} + +Config.Marker = { + Type = 23, + Color = { + Red = 255, + Green = 0, + Blue = 0, + Alpha = 255 + }, + Size = 1.0 +} + +-- An array of locations to teleport to/from the island. +Config.TeleportLocations = { + { + LosSantosCoordinate = vector3(3857.16, 4459.48, 0.85), + LosSantosHeading = 357.31, + IslandCoordinate = vector3(4929.47, -5174.01, 1.5), + IslandHeading = 241.13 + }, + { + LosSantosCoordinate = vector3(-1605.7, 5258.76,1.2), + LosSantosHeading = 23.88, + IslandCoordinate = vector3(5094.14,-4655.52, 0.8), + IslandHeading = 70.03 + }, + { + LosSantosCoordinate = vector3(-1016.42, -2468.58, 12.99), + LosSantosHeading = 233.31, + IslandCoordinate = vector3(4425.68,-4487.06, 3.25), + IslandHeading = 200.56 + } +} \ No newline at end of file diff --git a/resources/Chair-Bed-System/LICENSE b/resources/Chair-Bed-System/LICENSE new file mode 100644 index 000000000..e62ec04cd --- /dev/null +++ b/resources/Chair-Bed-System/LICENSE @@ -0,0 +1,674 @@ +GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +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. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/resources/Chair-Bed-System/README.md b/resources/Chair-Bed-System/README.md new file mode 100644 index 000000000..1db41a437 --- /dev/null +++ b/resources/Chair-Bed-System/README.md @@ -0,0 +1,23 @@ +# ChairBedSystem + + +

What do this script do?

+

This script will let you sit or lay on a bed, chair or what ever you want:P +
There is an easy config in the client.lua, where you can add/remove objects.

+

Requirements?

+

- None

+

Video

+

Click on the video below!

+ + + + + +
+

Other Releases

+

- Radargun (Github / FiveM Forum) +
- Healthbar / UI (Github / FiveM Forum) +
- Coords Pack (Github / FiveM Forum) + + \ No newline at end of file diff --git a/resources/Chair-Bed-System/__resource.lua b/resources/Chair-Bed-System/__resource.lua new file mode 100644 index 000000000..9f254121a --- /dev/null +++ b/resources/Chair-Bed-System/__resource.lua @@ -0,0 +1,11 @@ +resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937" + + +client_scripts{ + 'client.lua', + 'config.lua' +} + +server_scripts{ + 'server.lua' +} \ No newline at end of file diff --git a/resources/Chair-Bed-System/client.lua b/resources/Chair-Bed-System/client.lua new file mode 100644 index 000000000..193f2f3d6 --- /dev/null +++ b/resources/Chair-Bed-System/client.lua @@ -0,0 +1,233 @@ +local plyCoords = GetEntityCoords(PlayerPedId()) +local isWithinObject = false +local oElement = {} + +-- // BASIC +local InUse = false +local IsTextInUse = false +local PlyLastPos = 0 + +-- // ANIMATION +local Anim = 'sit' +local AnimScroll = 0 + +-- Fast Thread +CreateThread(function() + while true do + if isWithinObject and oElement.fObject ~= 0 then + local ply = PlayerPedId() + local objectCoords = oElement.fObjectCoords + local distanceDiff = #(objectCoords - plyCoords) + if (distanceDiff < 2.0 and not InUse) then + if (oElement.fObjectIsBed == true) then + + -- // ARROW RIGHT + if IsControlJustPressed(0, 175) then -- right + if (AnimScroll ~= 2) then + AnimScroll = AnimScroll + 1 + end + if AnimScroll == 1 then + Anim = "back" + elseif AnimScroll == 2 then + Anim = "stomach" + end + end + + -- // ARROW LEFT + if IsControlJustPressed(0, 174) then -- left + if (AnimScroll ~= 0) then + AnimScroll = AnimScroll - 1 + end + if AnimScroll == 1 then + Anim = "back" + elseif AnimScroll == 0 then + Anim = "sit" + end + end + + if (Anim == 'sit') then + DrawText3Ds(objectCoords.x, objectCoords.y, objectCoords.z, Config.Text.SitOnBed .. ' | ' .. Config.Text.SwitchBetween) + else + DrawText3Ds(objectCoords.x, objectCoords.y, objectCoords.z, Config.Text.LieOnBed .. ' ~g~' .. Anim .. '~w~ | ' .. Config.Text.SwitchBetween) + end + + if IsControlJustPressed(0, Config.objects.ButtonToLayOnBed) then + TriggerServerEvent('ChairBedSystem:Server:Enter', oElement, oElement.fObjectCoords) + end + else + DrawText3Ds(objectCoords.x, objectCoords.y, objectCoords.z, Config.Text.SitOnChair) + if IsControlJustPressed(0, Config.objects.ButtonToSitOnChair) then + TriggerServerEvent('ChairBedSystem:Server:Enter', oElement, oElement.fObjectCoords) + end + end + end + + if (InUse) then + DrawText3Ds(objectCoords.x, objectCoords.y, objectCoords.z, Config.Text.Standup) + if IsControlJustPressed(0, Config.objects.ButtonToStandUp) then + InUse = false + TriggerServerEvent('ChairBedSystem:Server:Leave', oElement.fObjectCoords) + ClearPedTasksImmediately(ply) + FreezeEntityPosition(ply, false) + + local x, y, z = table.unpack(PlyLastPos) + if GetDistanceBetweenCoords(x, y, z, plyCoords) < 10 then + SetEntityCoords(ply, PlyLastPos) + end + end + end + end + Wait(0) + end +end) + +-- Medium Thread +CreateThread(function() + while true do + plyCoords = GetEntityCoords(PlayerPedId()) + Wait(1000) + end +end) + + +-- Slow Thread +CreateThread(function() + Wait(1500) + while true do + for _, element in pairs(Config.objects.locations) do + local closestObject = GetClosestObjectOfType(plyCoords.x, plyCoords.y, plyCoords.z, 3.0, GetHashKey(element.object), 0, 0, 0) + local coordsObject = GetEntityCoords(closestObject) + local distanceDiff = #(coordsObject - plyCoords) + --if (distanceDiff < 3.00 and closestObject ~= 0) then + --if (distanceDiff < 2.00) then + if (distanceDiff < 2.25 and closestObject ~= 0) then + if (distanceDiff < 2.00) then + oElement = { + fObject = closestObject, + fObjectCoords = coordsObject, + fObjectcX = element.verticalOffsetX, + fObjectcY = element.verticalOffsetY, + fObjectcZ = element.verticalOffsetZ, + fObjectDir = element.direction, + fObjectIsBed = element.bed + } + isWithinObject = true + end + break + else + isWithinObject = false + end + end + Wait(2000) + end +end) + + +-- Healing Thread +CreateThread(function() + while Config.Healing ~= 0 do + Wait(Config.Healing * 1000) + if InUse == true then + if oElement.fObjectIsBed == true then + local ply = PlayerPedId() + local health = GetEntityHealth(ply) + if health <= 199 then + SetEntityHealth(ply, health + 1) + end + end + end + end +end) + +RegisterNetEvent('ChairBedSystem:Client:Animation') +AddEventHandler('ChairBedSystem:Client:Animation', function(v, coords) + local object = v.fObject + local vertx = v.fObjectcX + local verty = v.fObjectcY + local vertz = v.fObjectcZ + local dir = v.fObjectDir + local isBed = v.fObjectIsBed + local objectcoords = coords + + local ped = PlayerPedId() + PlyLastPos = GetEntityCoords(ped) + FreezeEntityPosition(object, true) + FreezeEntityPosition(ped, true) + InUse = true + if isBed == false then + if Config.objects.SitAnimation.dict ~= nil then + SetEntityCoords(ped, objectcoords.x, objectcoords.y, objectcoords.z + 0.5) + SetEntityHeading(ped, GetEntityHeading(object) - 180.0) + local dict = Config.objects.SitAnimation.dict + local anim = Config.objects.SitAnimation.anim + + AnimLoadDict(dict, anim, ped) + else + TaskStartScenarioAtPosition(ped, Config.objects.SitAnimation.anim, objectcoords.x + vertx, objectcoords.y + verty, objectcoords.z - vertz, GetEntityHeading(object) + dir, 0, true, true) + end + else + if Anim == 'back' then + if Config.objects.BedBackAnimation.dict ~= nil then + SetEntityCoords(ped, objectcoords.x, objectcoords.y, objectcoords.z + 0.5) + SetEntityHeading(ped, GetEntityHeading(object) - 180.0) + local dict = Config.objects.BedBackAnimation.dict + local anim = Config.objects.BedBackAnimation.anim + + Animation(dict, anim, ped) + else + TaskStartScenarioAtPosition(ped, Config.objects.BedBackAnimation.anim, objectcoords.x + vertx, objectcoords.y + verty, objectcoords.z - vertz, GetEntityHeading(object) + dir, 0, true, true + ) + end + elseif Anim == 'stomach' then + if Config.objects.BedStomachAnimation.dict ~= nil then + SetEntityCoords(ped, objectcoords.x, objectcoords.y, objectcoords.z + 0.5) + SetEntityHeading(ped, GetEntityHeading(object) - 180.0) + local dict = Config.objects.BedStomachAnimation.dict + local anim = Config.objects.BedStomachAnimation.anim + + Animation(dict, anim, ped) + else + TaskStartScenarioAtPosition(ped, Config.objects.BedStomachAnimation.anim, objectcoords.x + vertx, objectcoords.y + verty, objectcoords.z - vertz, GetEntityHeading(object) + dir, 0, true, true) + end + elseif Anim == 'sit' then + if Config.objects.BedSitAnimation.dict ~= nil then + SetEntityCoords(ped, objectcoords.x, objectcoords.y, objectcoords.z + 0.5) + SetEntityHeading(ped, GetEntityHeading(object) - 180.0) + local dict = Config.objects.BedSitAnimation.dict + local anim = Config.objects.BedSitAnimation.anim + + Animation(dict, anim, ped) + else + TaskStartScenarioAtPosition(ped, Config.objects.BedSitAnimation.anim, objectcoords.x + vertx, objectcoords.y + verty, objectcoords.z - vertz, GetEntityHeading(object) + 180.0, 0, true, true) + end + end + end +end) + + + +function DrawText3Ds(x, y, z, text) + local onScreen, _x, _y = World3dToScreen2d(x, y, z) + + if onScreen then + SetTextScale(0.35, 0.35) + SetTextFont(4) + SetTextProportional(1) + SetTextColour(255, 255, 255, 215) + SetTextEntry("STRING") + SetTextCentre(1) + AddTextComponentString(text) + DrawText(_x, _y) + local factor = (string.len(text)) / 350 + DrawRect(_x, _y + 0.0125, 0.015 + factor, 0.03, 41, 11, 41, 68) + end +end + +function Animation(dict, anim, ped) + RequestAnimDict(dict) + while not HasAnimDictLoaded(dict) do + Citizen.Wait(0) + end + + TaskPlayAnim(ped, dict, anim, 8.0, 1.0, -1, 1, 0, 0, 0, 0) +end diff --git a/resources/Chair-Bed-System/config.lua b/resources/Chair-Bed-System/config.lua new file mode 100644 index 000000000..121b51d16 --- /dev/null +++ b/resources/Chair-Bed-System/config.lua @@ -0,0 +1,44 @@ +Config = {} + +Config.Healing = 1 -- // If this is 0, then its disabled.. Default: 3.. That means, if a person lies in a bed, then he will get 1 health every 3 seconds. + +Config.objects = { + ButtonToSitOnChair = 58, -- // Default: G -- // https://docs.fivem.net/game-references/controls/ + ButtonToLayOnBed = 38, -- // Default: E -- // https://docs.fivem.net/game-references/controls/ + ButtonToStandUp = 23, -- // Default: F -- // https://docs.fivem.net/game-references/controls/ + SitAnimation = {anim='PROP_HUMAN_SEAT_CHAIR_MP_PLAYER'}, + BedBackAnimation = {dict='anim@gangops@morgue@table@', anim='ko_front'}, + BedStomachAnimation = {anim='WORLD_HUMAN_SUNBATHE'}, + BedSitAnimation = {anim='WORLD_HUMAN_PICNIC'}, + locations = { + {object="v_med_bed2", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-1.4, direction=0.0, bed=true}, + {object="v_serv_ct_chair02", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.0, direction=168.0, bed=false}, + {object="prop_off_chair_04", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="prop_off_chair_03", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="prop_off_chair_05", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="v_club_officechair", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="v_ilev_leath_chr", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="v_corp_offchair", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="v_med_emptybed", verticalOffsetX=0.0, verticalOffsetY=0.13, verticalOffsetZ=-0.2, direction=90.0, bed=false}, + {object="Prop_Off_Chair_01", verticalOffsetX=0.0, verticalOffsetY=-0.1, verticalOffsetZ=-0.5, direction=180.0, bed=false}, + {object="hei_prop_heist_off_chair", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="prop_sol_chair", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="v_med_whickerchair1", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="prop_waiting_seat_01", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="v_ret_gc_chair02", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="p_clb_officechair_s", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="v_corp_lazychair", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + {object="prop_wait_bench_01", verticalOffsetX=0.0, verticalOffsetY=0.0, verticalOffsetZ=-0.4, direction=168.0, bed=false}, + } +} + +-- // YOU WILL FIND ALL BUTTONS HERE FOR CODE BELOW;P +-- [[ https://docs.fivem.net/game-references/controls/ ]] + +Config.Text = { + SitOnChair = '~r~G~w~ to sit', + SitOnBed = '~r~E~w~ to sit on the bed', + LieOnBed = '~r~E~w~ to lay on your', + SwitchBetween = 'Switch between with ~r~Arrow left~w~ and ~r~arrow right~w~', + Standup = '~r~F~w~ to stand up!', +} \ No newline at end of file diff --git a/resources/Chair-Bed-System/server.lua b/resources/Chair-Bed-System/server.lua new file mode 100644 index 000000000..ce80a9f73 --- /dev/null +++ b/resources/Chair-Bed-System/server.lua @@ -0,0 +1,39 @@ +-- +-- * Created with PhpStorm +-- * User: Terbium +-- * Date: 05/11/2019 +-- * Time: 02:21 +-- + +local oArray = {} +local oPlayerUse = {} + + +AddEventHandler('playerDropped', function() + local oSource = source + if oPlayerUse[oSource] ~= nil then + oArray[oPlayerUse[oSource]] = nil + oPlayerUse[oSource] = nil + end +end) + + +RegisterServerEvent('ChairBedSystem:Server:Enter') +AddEventHandler('ChairBedSystem:Server:Enter', function(object, objectcoords) + local oSource = source + if oArray[objectcoords] == nil then + oPlayerUse[oSource] = objectcoords + oArray[objectcoords] = true + TriggerClientEvent('ChairBedSystem:Client:Animation', oSource, object, objectcoords) + end +end) + + +RegisterServerEvent('ChairBedSystem:Server:Leave') +AddEventHandler('ChairBedSystem:Server:Leave', function(objectcoords) + local oSource = source + + oPlayerUse[oSource] = nil + oArray[objectcoords] = nil +end) + diff --git a/resources/ChatLog/__resource.lua b/resources/ChatLog/__resource.lua new file mode 100644 index 000000000..182dd4dc8 --- /dev/null +++ b/resources/ChatLog/__resource.lua @@ -0,0 +1,2 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' +server_script "server.lua" diff --git a/resources/ChatLog/server.lua b/resources/ChatLog/server.lua new file mode 100644 index 000000000..1987c004e --- /dev/null +++ b/resources/ChatLog/server.lua @@ -0,0 +1,15 @@ +AddEventHandler('chatMessage', function(source, name, message) + if message == nil or message == '' or message:sub(1, 1) == '/' then return FALSE end + PerformHttpRequest('https://discordapp.com/api/webhooks/547208563680870400/ucatxdILDNy59VSRYYfRY3Qgy1ZjSujraB2hA_-Gy52eUGjF9jVfg5yhue697fMYfTE5', function(err, text, headers) end, 'POST', json.encode({username = name, content = message}), { ['Content-Type'] = 'application/json' }) +end) +function sendToDiscord(name, message) + if message == nil or message == '' or message:sub(1, 1) == '/' then return FALSE end + PerformHttpRequest('https://discordapp.com/api/webhooks/547208563680870400/ucatxdILDNy59VSRYYfRY3Qgy1ZjSujraB2hA_-Gy52eUGjF9jVfg5yhue697fMYfTE5', function(err, text, headers) end, 'POST', json.encode({username = name, content = message}), { ['Content-Type'] = 'application/json' }) +end +AddEventHandler('playerConnecting', function() + sendToDiscord('SYSTEM', GetPlayerName(source) .. ' has joined. ') +end) + +AddEventHandler('playerDropped', function(reason) + sendToDiscord('SYSTEM', GetPlayerName(source) .. ' has left. (' .. reason .. ')') +end) diff --git a/resources/Chevy18/__resource.lua b/resources/Chevy18/__resource.lua new file mode 100644 index 000000000..e85b41837 --- /dev/null +++ b/resources/Chevy18/__resource.lua @@ -0,0 +1,20 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { + 'vehicles.meta', + 'carvariations.meta', + 'carcols.meta', + 'handling.meta', + 'vehiclelayouts.meta', -- Not Required +} + +data_file 'HANDLING_FILE' 'handling.meta' +data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta' +data_file 'CARCOLS_FILE' 'carcols.meta' +data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta' +data_file 'VEHICLE_LAYOUTS_FILE' 'vehiclelayouts.meta' -- Not Required + + +client_script { + 'vehicle_names.lua' -- Not Required +} \ No newline at end of file diff --git a/resources/Chevy18/carcols.meta b/resources/Chevy18/carcols.meta new file mode 100644 index 000000000..2c07fa16f --- /dev/null +++ b/resources/Chevy18/carcols.meta @@ -0,0 +1,756 @@ + + + + + + Chevy18 + + + + + + + VehicleLight_sirenlight + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/Chevy18/carvariations.meta b/resources/Chevy18/carvariations.meta new file mode 100644 index 000000000..c5d7a09c0 --- /dev/null +++ b/resources/Chevy18/carvariations.meta @@ -0,0 +1,35 @@ + + + + + Chevy18 + + + + 156 + 156 + + + + + + + + + + 0_default_modkit + + + + + + TEST + + + + + + + + + \ No newline at end of file diff --git a/resources/Chevy18/stream/Chevy18.yft b/resources/Chevy18/stream/Chevy18.yft new file mode 100644 index 000000000..2120dd9bc --- /dev/null +++ b/resources/Chevy18/stream/Chevy18.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f09bb76f56b48d8dfe764e12823667e124a27abf4a06b180b1613a3616377551 +size 6418584 diff --git a/resources/Chevy18/stream/Chevy18.ytd b/resources/Chevy18/stream/Chevy18.ytd new file mode 100644 index 000000000..353091264 --- /dev/null +++ b/resources/Chevy18/stream/Chevy18.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7116d83856eb72f0fecb854651eddb197adc37d256d07eb342c513f20cb25e9 +size 6106176 diff --git a/resources/Chevy18/stream/Chevy18_hi.yft b/resources/Chevy18/stream/Chevy18_hi.yft new file mode 100644 index 000000000..2e64b5084 --- /dev/null +++ b/resources/Chevy18/stream/Chevy18_hi.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89a6fb2a0094d01dcee7dc48d894225dc8f770b06ac8ff4b3472b77196c83b4e +size 6418745 diff --git a/resources/Chevy18/vehicles.meta b/resources/Chevy18/vehicles.meta new file mode 100644 index 000000000..9e4163acd --- /dev/null +++ b/resources/Chevy18/vehicles.meta @@ -0,0 +1,132 @@ + + + vehshare + + + + Chevy18 + Chevy18 + POLICE + Chevy18 + + null + null + null + null + + null + WINDSOR + LAYOUT_STANDARD + POLICE_COVER_OFFSET_INFO + EXPLOSION_INFO_DEFAULT + + DEFAULT_FOLLOW_VEHICLE_CAMERA + DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA + VEHICLE_BONNET_CAMERA_MID_HIGH + DEFAULT_POV_CAMERA + + + + + + + + + + + + + + + + + + + + + + + + + + + + VFXVEHICLEINFO_CAR_GENERIC + + + + + + + + + + + + + + + + + + + + + + 100.000000 + 200.000000 + 300.000000 + 400.000000 + 500.000000 + 500.000000 + + + + + + + + + + + SWANKNESS_1 + + FLAG_ATTACH_TRAILER_ON_HIGHWAY FLAG_ATTACH_TRAILER_IN_CITY FLAG_HAS_LIVERY FLAG_EXTRAS_ALL FLAG_EXTRAS_STRONG FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE FLAG_NO_RESPRAY FLAG_DONT_SPAWN_IN_CARGEN FLAG_REPORT_CRIME_IF_STANDING_ON + VEHICLE_TYPE_CAR + VPT_FRONT_AND_BACK_PLATES + VDT_GENTAXI + VC_EMERGENCY + VWT_MUSCLE + + boattrailer + trailersmall + trailersmall2 + + + + + + + + + + + + WHEEL_FRONT_RIGHT_CAMERA + WHEEL_FRONT_LEFT_CAMERA + WHEEL_REAR_RIGHT_CAMERA + WHEEL_REAR_LEFT_CAMERA + + + + + + + STD_POLICE_FRONT_LEFT + STD_POLICE_FRONT_RIGHT + STD_POLICE_REAR_LEFT + STD_POLICE_REAR_RIGHT + + + + \ No newline at end of file diff --git a/resources/CinematicCam/README.md b/resources/CinematicCam/README.md new file mode 100644 index 000000000..845b817cb --- /dev/null +++ b/resources/CinematicCam/README.md @@ -0,0 +1,19 @@ +-------------------------------------------------- +---- CINEMATIC CAM FOR FIVEM MADE BY KIMINAZE ---- +-------------------------------------------------- + +**What exactly is the "Cinematic Cam"?** +The Cinematic Cam provides the user with an easy to use "additional" camera, that can be moved freely in the world. Additionally it can be attached to any npc/player/vehicle in the game in order to provide something similar to a "Dashcam" or just for fancy screenshots or videos. +You can set it on a specific position and angle relative to your character and the camera will move with the entity. + +**Features included:** +- complete control using NativeUILua by Frazzle ( [NativeUILua](https://github.com/FrazzIe/NativeUILua) ) +- toggle the camera on / off +- moving and rotating on all axes +- using mouse AND controller input for rotation +- setting precision rotation +- setting field of view and speed of the camera +- applying / removing a filter +- setting filter intensity +- toggle minimap on / off +- attach camera to any npc/player/vehicle entity diff --git a/resources/CinematicCam/__resource.lua b/resources/CinematicCam/__resource.lua new file mode 100644 index 000000000..0fc328a36 --- /dev/null +++ b/resources/CinematicCam/__resource.lua @@ -0,0 +1,9 @@ +resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937" + +dependency 'NativeUI' + +client_scripts { + '@NativeUI/NativeUI.lua', + 'config.lua', + 'client.lua' +} diff --git a/resources/CinematicCam/client.lua b/resources/CinematicCam/client.lua new file mode 100644 index 000000000..365c458bf --- /dev/null +++ b/resources/CinematicCam/client.lua @@ -0,0 +1,624 @@ +-------------------------------------------------- +---- CINEMATIC CAM FOR FIVEM MADE BY KIMINAZE ---- +-------------------------------------------------- + +-------------------------------------------------- +------------------- VARIABLES -------------------- +-------------------------------------------------- + +-- main variables +local cam = nil + +local offsetRotX = 0.0 +local offsetRotY = 0.0 +local offsetRotZ = 0.0 + +local offsetCoords = {} +offsetCoords.x = 0.0 +offsetCoords.y = 0.0 +offsetCoords.z = 0.0 + +local counter = 0 +local precision = 1.0 +local currPrecisionIndex +local precisions = {} +for i = Cfg.minPrecision, Cfg.maxPrecision + 0.01, Cfg.incrPrecision do + table.insert(precisions, tostring(i)) + counter = counter + 1 + if (tostring(i) == "1.0") then + currPrecisionIndex = counter + end +end + +local speed = 1.0 + +local currFilter = 1 +local currFilterIntensity = 10 +local filterInten = {} +for i=0.1, 2.01, 0.1 do table.insert(filterInten, tostring(i)) end + +local freeFly = false + +local isAttached = false +local entity +local camCoords + +local pointEntity = false + +-- menu variables +local _menuPool = NativeUI.CreatePool() +local camMenu + +local itemCamPrecision + +local itemFilter +local itemFilterIntensity + +local itemAttachCam + +local itemPointEntity + +-- print error if no menu access was specified +if (not(Cfg.useButton or Cfg.useCommand)) then + print(Cfg.strings.noAccessError) +end + + + +-------------------------------------------------- +---------------------- LOOP ---------------------- +-------------------------------------------------- +Citizen.CreateThread(function() + local pressedCount = 0 + + camMenu = NativeUI.CreateMenu(Cfg.strings.menuTitle, Cfg.strings.menuSubtitle) + _menuPool:Add(camMenu) + + while true do + Citizen.Wait(1) + + -- process menu + if (_menuPool:IsAnyMenuOpen()) then + _menuPool:ProcessMenus() + end + + -- open / close menu on button press + if (Cfg.useButton) then + if (IsDisabledControlPressed(1, Cfg.controls.controller.openMenu)) then + pressedCount = pressedCount + 1 + elseif (IsDisabledControlJustReleased(1, Cfg.controls.controller.openMenu)) then + pressedCount = 0 + end + if (IsDisabledControlJustReleased(1, Cfg.controls.keyboard.openMenu) or pressedCount >= 60) then + if (pressedCount >= 60) then pressedCount = 0 end + if (camMenu:Visible()) then + camMenu:Visible(false) + else + GenerateCamMenu() + camMenu:Visible(true) + end + end + end + + -- process cam controls if cam exists + if (cam) then + ProcessCamControls() + end + end +end) + +Citizen.CreateThread(function() + while true do + Citizen.Wait(500) + + if (camMenu:Visible() and cam) then + local tempEntity = GetEntityInFrontOfCam() + local txt = "-" + if (DoesEntityExist(tempEntity)) then + txt = tostring(GetEntityModel(tempEntity)) + if (IsEntityAVehicle(tempEntity)) then + txt = GetLabelText(GetDisplayNameFromVehicleModel(GetEntityModel(tempEntity))) + end + end + itemAttachCam:RightLabel(txt) + + if (isAttached and not DoesEntityExist(entity)) then + isAttached = false + + ClearFocus() + + StopCamPointing(cam) + end + end + end +end) + + + +-------------------------------------------------- +---------------------- MENU ---------------------- +-------------------------------------------------- +function GenerateCamMenu() + _menuPool:Remove() + _menuPool = NativeUI.CreatePool() + collectgarbage() + + camMenu = NativeUI.CreateMenu(Cfg.strings.menuTitle, Cfg.strings.menuSubtitle) + _menuPool:Add(camMenu) + + -- add additional control help + --camMenu:AddInstructionButton({GetControlInstructionalButton(1, 38, true), ""}) + --camMenu:AddInstructionButton({GetControlInstructionalButton(1, 44, true), Cfg.strings.ctrlHelpRoll}) + --camMenu:AddInstructionButton({GetControlInstructionalButton(1, 36, true), ""}) + --camMenu:AddInstructionButton({GetControlInstructionalButton(1, 21, true), ""}) + --camMenu:AddInstructionButton({GetControlInstructionalButton(1, 30, true), ""}) + --camMenu:AddInstructionButton({GetControlInstructionalButton(1, 31, true), Cfg.strings.ctrlHelpMove}) + --camMenu:AddInstructionButton({GetControlInstructionalButton(1, 2, true), ""}) + --camMenu:AddInstructionButton({GetControlInstructionalButton(1, 1, true), Cfg.strings.ctrlHelpRotate}) + + local itemToggleCam = NativeUI.CreateCheckboxItem(Cfg.strings.toggleCam, DoesCamExist(cam), Cfg.strings.toggleCamDesc) + camMenu:AddItem(itemToggleCam) + + itemCamPrecision = NativeUI.CreateListItem(Cfg.strings.precision, precisions, currPrecisionIndex, Cfg.strings.precisionDesc) + camMenu:AddItem(itemCamPrecision) + + local submenuFilter = _menuPool:AddSubMenu(camMenu, Cfg.strings.filter, Cfg.strings.filterDesc) + camMenu.Items[#camMenu.Items]:SetLeftBadge(15) + itemFilter = NativeUI.CreateListItem(Cfg.strings.filter, Cfg.filterList, currFilter, Cfg.strings.filterDesc) + submenuFilter:AddItem(itemFilter) + itemFilterIntensity = NativeUI.CreateListItem(Cfg.strings.filterInten, filterInten, currFilterIntensity, Cfg.strings.filterIntenDesc) + submenuFilter:AddItem(itemFilterIntensity) + local itemDelFilter = NativeUI.CreateItem(Cfg.strings.delFilter, Cfg.strings.delFilterDesc) + submenuFilter:AddItem(itemDelFilter) + + local itemShowMap = NativeUI.CreateCheckboxItem(Cfg.strings.showMap, not IsRadarHidden(), Cfg.strings.showMapDesc) + camMenu:AddItem(itemShowMap) + + local itemToggleFreeFlyMode = NativeUI.CreateCheckboxItem(Cfg.strings.freeFly, freeFly, Cfg.strings.freeFlyDesc) + camMenu:AddItem(itemToggleFreeFlyMode) + + itemAttachCam = NativeUI.CreateItem(Cfg.strings.attachCam, Cfg.strings.attachCamDesc) + camMenu:AddItem(itemAttachCam) + + --itemPointEntity = NativeUI.CreateCheckboxItem(Cfg.strings.pointEntity, pointEntity, Cfg.strings.pointEntityDesc) + --camMenu:AddItem(itemPointEntity) + + + itemToggleCam.CheckboxEvent = function(menu, item, checked) + ToggleCam(checked, GetGameplayCamFov()) + end + + itemCamPrecision.OnListChanged = function(menu, item, newindex) + ChangePrecision(newindex) + end + + itemShowMap.CheckboxEvent = function(menu, item, checked) + ToggleUI(checked) + end + + itemToggleFreeFlyMode.CheckboxEvent = function(menu, item, checked) + ToggleFreeFlyMode(checked) + end + + camMenu.OnItemSelect = function(menu, item, index) + if (item == itemAttachCam) then + ToggleAttachMode() + end + end + + --[[itemPointEntity.CheckboxEvent = function(menu, item, checked) + TogglePointing(checked) + end]] + + itemFilter.OnListChanged = function(menu, item, newindex) + ApplyFilter(newindex) + end + + itemFilterIntensity.OnListChanged = function(menu, item, newindex) + ChangeFilterIntensity(newindex) + end + + submenuFilter.OnItemSelect = function(menu, item, index) + if (item == itemDelFilter) then + ResetFilter() + end + end + + + _menuPool:ControlDisablingEnabled(false) + _menuPool:MouseControlsEnabled(false) + + _menuPool:RefreshIndex() +end + + + +-------------------------------------------------- +------------------- FUNCTIONS -------------------- +-------------------------------------------------- + +-- initialize camera +function StartFreeCam(fov) + ClearFocus() + + local playerPed = PlayerPedId() + + cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", GetEntityCoords(playerPed), 0, 0, 0, fov * 1.0) + + SetCamActive(cam, true) + RenderScriptCams(true, false, 0, true, false) + + SetCamAffectsAiming(cam, false) + + if (isAttached and DoesEntityExist(entity)) then + offsetCoords = GetOffsetFromEntityGivenWorldCoords(entity, GetCamCoord(cam)) + + AttachCamToEntity(cam, entity, offsetCoords.x, offsetCoords.y, offsetCoords.z, true) + end +end + +-- destroy camera +function EndFreeCam() + ClearFocus() + + RenderScriptCams(false, false, 0, true, false) + DestroyCam(cam, false) + + offsetRotX = 0.0 + offsetRotY = 0.0 + offsetRotZ = 0.0 + + isAttached = false + + speed = 1.0 + precision = 1.0 + currFov = GetGameplayCamFov() + + cam = nil +end + +-- process camera controls +function ProcessCamControls() + local playerPed = PlayerPedId() + + -- disable 1st person as the 1st person camera can cause some glitches + DisableFirstPersonCamThisFrame() + -- block weapon wheel (reason: scrolling) + BlockWeaponWheelThisFrame() + -- disable character/vehicle controls + for k, v in pairs(Cfg.disabledControls) do + DisableControlAction(0, v, true) + end + + if (isAttached) then + -- calculate new position + offsetCoords = ProcessNewPosition(offsetCoords.x, offsetCoords.y, offsetCoords.z) + + -- focus entity + SetFocusEntity(entity) + + -- set coords + AttachCamToEntity(cam, entity, offsetCoords.x, offsetCoords.y, offsetCoords.z, true) + + -- reset coords of cam if too far from entity + if (Vdist(0.0, 0.0, 0.0, offsetCoords.x, offsetCoords.y, offsetCoords.z) > Cfg.maxDistance) then + AttachCamToEntity(cam, entity, offsetCoords.x, offsetCoords.y, offsetCoords.z, true) + end + + -- set rotation + local entityRot = GetEntityRotation(entity, 2) + SetCamRot(cam, entityRot.x + offsetRotX, entityRot.y + offsetRotY, entityRot.z + offsetRotZ, 2) + else + local camCoords = GetCamCoord(cam) + + -- calculate new position + local newPos = ProcessNewPosition(camCoords.x, camCoords.y, camCoords.z) + + -- focus cam area + SetFocusArea(newPos.x, newPos.y, newPos.z, 0.0, 0.0, 0.0) + + -- set coords of cam + SetCamCoord(cam, newPos.x, newPos.y, newPos.z) + + -- set rotation + SetCamRot(cam, offsetRotX, offsetRotY, offsetRotZ, 2) + end +end + +function ProcessNewPosition(x, y, z) + local _x = x + local _y = y + local _z = z + +--gegenkathete = z +--ankathete = y +--hypotenuse = 1 +--alpha = GetCamRot(cam).x + + -- keyboard + if (IsInputDisabled(0)) then + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.forwards)) then + local multX = Sin(offsetRotZ) + local multY = Cos(offsetRotZ) + local multZ = Sin(offsetRotX) + + _x = _x - (0.1 * speed * multX) + _y = _y + (0.1 * speed * multY) + if (freeFly) then + _z = _z + (0.1 * speed * multZ) + end + end + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.backwards)) then + local multX = Sin(offsetRotZ) + local multY = Cos(offsetRotZ) + local multZ = Sin(offsetRotX) + + _x = _x + (0.1 * speed * multX) + _y = _y - (0.1 * speed * multY) + if (freeFly) then + _z = _z - (0.1 * speed * multZ) + end + end + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.left)) then + local multX = Sin(offsetRotZ + 90.0) + local multY = Cos(offsetRotZ + 90.0) + local multZ = Sin(offsetRotY) + + _x = _x - (0.1 * speed * multX) + _y = _y + (0.1 * speed * multY) + if (freeFly) then + _z = _z + (0.1 * speed * multZ) + end + end + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.right)) then + local multX = Sin(offsetRotZ + 90.0) + local multY = Cos(offsetRotZ + 90.0) + local multZ = Sin(offsetRotY) + + _x = _x + (0.1 * speed * multX) + _y = _y - (0.1 * speed * multY) + if (freeFly) then + _z = _z - (0.1 * speed * multZ) + end + end + + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.up)) then + _z = _z + (0.1 * speed) + end + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.down)) then + _z = _z - (0.1 * speed) + end + + + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.hold)) then + -- hotkeys for speed + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.speedUp)) then + if ((speed + 0.1) < Cfg.maxSpeed) then + speed = speed + 0.1 + else + speed = Cfg.maxSpeed + end + elseif (IsDisabledControlPressed(1, Cfg.controls.keyboard.speedDown)) then + if ((speed - 0.1) > Cfg.minSpeed) then + speed = speed - 0.1 + else + speed = Cfg.minSpeed + end + end + else + -- hotkeys for FoV + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.zoomOut)) then + ChangeFov(1.0) + elseif (IsDisabledControlPressed(1, Cfg.controls.keyboard.zoomIn)) then + ChangeFov(-1.0) + end + end + + -- rotation + offsetRotX = offsetRotX - (GetDisabledControlNormal(1, 2) * precision * 8.0) + offsetRotZ = offsetRotZ - (GetDisabledControlNormal(1, 1) * precision * 8.0) + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.rollLeft)) then + offsetRotY = offsetRotY - precision + end + if (IsDisabledControlPressed(1, Cfg.controls.keyboard.rollRight)) then + offsetRotY = offsetRotY + precision + end + + -- controller + else + local multX = Sin(offsetRotZ) + local multY = Cos(offsetRotZ) + local multZ = Sin(offsetRotX) + _x = _x - (0.1 * speed * multX * GetDisabledControlNormal(1, 32)) + _y = _y + (0.1 * speed * multY * GetDisabledControlNormal(1, 32)) + if (freeFly) then + _z = _z + (0.1 * speed * multZ * GetDisabledControlNormal(1, 32)) + end + + _x = _x + (0.1 * speed * multX * GetDisabledControlNormal(1, 33)) + _y = _y - (0.1 * speed * multY * GetDisabledControlNormal(1, 33)) + if (freeFly) then + _z = _z - (0.1 * speed * multZ * GetDisabledControlNormal(1, 33)) + end + + multX = Sin(offsetRotZ + 90.0) + multY = Cos(offsetRotZ + 90.0) + local multZ = Sin(offsetRotY) + _x = _x - (0.1 * speed * multX * GetDisabledControlNormal(1, 34)) + _y = _y + (0.1 * speed * multY * GetDisabledControlNormal(1, 34)) + if (freeFly) then + _z = _z + (0.1 * speed * multZ * GetDisabledControlNormal(1, 34)) + end + + _x = _x + (0.1 * speed * multX * GetDisabledControlNormal(1, 35)) + _y = _y - (0.1 * speed * multY * GetDisabledControlNormal(1, 35)) + if (freeFly) then + _z = _z - (0.1 * speed * multZ * GetDisabledControlNormal(1, 35)) + end + + -- FoV, Speed, Up/Down Movement + if (GetDisabledControlNormal(1, 228) ~= 0.0) then + if (IsDisabledControlPressed(1, Cfg.controls.controller.holdFov)) then + ChangeFov(GetDisabledControlNormal(1, 228)) + elseif (IsDisabledControlPressed(1, Cfg.controls.controller.holdSpeed)) then + local newSpeed = speed - (0.1 * GetDisabledControlNormal(1, 228)) + if (newSpeed > Cfg.minSpeed) then + speed = newSpeed + else + speed = Cfg.minSpeed + end + else + _z = _z - (0.1 * speed * GetDisabledControlNormal(1, 228)) + end + end + if (GetDisabledControlNormal(1, 229) ~= 0.0) then + if (IsDisabledControlPressed(1, Cfg.controls.controller.holdFov)) then + ChangeFov(- GetDisabledControlNormal(1, 229)) + elseif (IsDisabledControlPressed(1, Cfg.controls.controller.holdSpeed)) then + local newSpeed = speed + (0.1 * GetDisabledControlNormal(1, 229)) + if (newSpeed < Cfg.maxSpeed) then + speed = newSpeed + else + speed = Cfg.maxSpeed + end + else + _z = _z + (0.1 * speed * GetDisabledControlNormal(1, 229)) + end + end + + -- rotation + offsetRotX = offsetRotX - (GetDisabledControlNormal(1, 2) * precision) + offsetRotZ = offsetRotZ - (GetDisabledControlNormal(1, 1) * precision) + if (IsDisabledControlPressed(1, Cfg.controls.controller.rollLeft)) then + offsetRotY = offsetRotY - precision + end + if (IsDisabledControlPressed(1, Cfg.controls.controller.rollRight)) then + offsetRotY = offsetRotY + precision + end + end + + if (offsetRotX > 90.0) then offsetRotX = 90.0 elseif (offsetRotX < -90.0) then offsetRotX = -90.0 end + if (offsetRotY > 90.0) then offsetRotY = 90.0 elseif (offsetRotY < -90.0) then offsetRotY = -90.0 end + if (offsetRotZ > 360.0) then offsetRotZ = offsetRotZ - 360.0 elseif (offsetRotZ < -360.0) then offsetRotZ = offsetRotZ + 360.0 end + + return {x = _x, y = _y, z = _z} +end + +function ToggleCam(flag, fov) + if (flag) then + StartFreeCam(fov) + _menuPool:RefreshIndex() + else + EndFreeCam() + _menuPool:RefreshIndex() + end +end + +function ChangeFov(changeFov) + if (DoesCamExist(cam)) then + local currFov = GetCamFov(cam) + local newFov = currFov + changeFov + + if ((newFov >= Cfg.minFov) and (newFov <= Cfg.maxFov)) then + SetCamFov(cam, newFov) + end + end +end + +function ChangePrecision(newindex) + precision = itemCamPrecision.Items[newindex] + currPrecisionIndex = newindex +end + +function ToggleUI(flag) + DisplayRadar(flag) +end + +function ToggleFreeFlyMode(flag) + freeFly = flag +end + +function GetEntityInFrontOfCam() + local camCoords = GetCamCoord(cam) + local offset = {x = camCoords.x - Sin(offsetRotZ) * 100.0, y = camCoords.y + Cos(offsetRotZ) * 100.0, z = camCoords.z + Sin(offsetRotX) * 100.0} + + local rayHandle = StartShapeTestRay(camCoords.x, camCoords.y, camCoords.z, offset.x, offset.y, offset.z, 10, 0, 0) + local a, b, c, d, entity = GetShapeTestResult(rayHandle) + return entity +end + +function ToggleAttachMode() + if (not isAttached) then + entity = GetEntityInFrontOfCam() + + if (DoesEntityExist(entity)) then + offsetCoords = GetOffsetFromEntityGivenWorldCoords(entity, GetCamCoord(cam)) + + Citizen.Wait(1) + local camCoords = GetCamCoord(cam) + AttachCamToEntity(cam, entity, GetOffsetFromEntityInWorldCoords(entity, camCoords.x, camCoords.y, camCoords.z), true) + + isAttached = true + end + else + ClearFocus() + + DetachCam(cam) + + isAttached = false + end +end + +function TogglePointing(flag) + if (flag and isAttached) then + pointEntity = true + PointCamAtEntity(cam, entity, 0.0, 0.0, 0.0, 1) + else + pointEntity = false + StopCamPointing(cam) + end +end + +function ApplyFilter(filterIndex) + SetTimecycleModifier(Cfg.filterList[filterIndex]) + currFilter = filterIndex +end + +function ChangeFilterIntensity(intensityIndex) + SetTimecycleModifier(Cfg.filterList[currFilter]) + SetTimecycleModifierStrength(tonumber(filterInten[intensityIndex])) + currFilterIntensity = intensityIndex +end + +function ResetFilter() + ClearTimecycleModifier() + itemFilter._Index = 1 + currFilter = 1 + itemFilterIntensity._Index = 10 + currFilterIntensity = 10 +end + + + +-------------------------------------------------- +-------------------- COMMANDS -------------------- +-------------------------------------------------- + +-- register command if specified in config +if (Cfg.useCommand) then + RegisterCommand(Cfg.command, function(source, args, raw) + if (not camMenu:Visible()) then + GenerateCamMenu() + camMenu:Visible(true) + end + end) +end + +--void POINT_CAM_AT_ENTITY(Cam cam, Entity entity, float p2, float p3, float p4, BOOL p5); +--void POINT_CAM_AT_COORD(Cam cam, float x, float y, float z); +--void GET_CAM_MATRIX(Cam camera, Vector3* rightVector, Vector3* forwardVector, Vector3* upVector, Vector3* position); + +--gegenkathete = x +--ankathete = y +--hypotenuse = 1 +--alpha = GetCamRot(cam).z diff --git a/resources/CinematicCam/config.lua b/resources/CinematicCam/config.lua new file mode 100644 index 000000000..22ae28ad8 --- /dev/null +++ b/resources/CinematicCam/config.lua @@ -0,0 +1,872 @@ +-------------------------------------------------- +---- CINEMATIC CAM FOR FIVEM MADE BY KIMINAZE ---- +-------------------------------------------------- + +Cfg = {} + +-- specify, if menu should be accessible via button press +Cfg.useButton = false + +-- specify, if menu should be accessible via chat command +Cfg.useCommand = true +-- specify chat command string +Cfg.command = "cinematic-cam" + +-- Show an extra option to have a completely free to move camera +Cfg.detachOption = true + +-- value in meters +-- default: 5.0 +-- used to prevent e.g. Meta-Gaming and Bug-Abuse (looking through walls etc.) +-- with 10,000 you can basically fly above the whole map from the middle but keep in mind, that LoD-states (Level of Detail) won't change as your character stays at its position +-- this is unused when the camera is detached +Cfg.maxDistance = 5000.0 + +-- min and max speed settings for movement in m/s including increments (should always be above 0.0) +Cfg.minSpeed = 0.1 +Cfg.maxSpeed = 10.0 + +-- min and max precision settings for rotation including increments (should always be above 0.0) +Cfg.minPrecision = 0.1 +Cfg.incrPrecision = 0.1 +Cfg.maxPrecision = 2.0 + +-- min and max FoV settings (should always be in between 1.0f and 130.0f!) +Cfg.minFov = 1.0 +Cfg.maxFov = 130.0 + +-- all strings +Cfg.strings = { + noAccessError = "[ERROR] FreeCam: At least one of the following values must be true! Cfg.useButton, Cfg.useCommand", + + menuTitle = "Cinematic Cam", + menuSubtitle = "Control the Cinematic Camera", + + toggleCam = "Camera active", + toggleCamDesc = "Toggle camera on/off", + + precision = "Camera Precision", + precisionDesc = "Change camera precision movement", + + filter = "Filter", + filterDesc = "Change camera Filter", + + filterInten = "Filter Intensity", + filterIntenDesc = "Change camera Filter Intensity", + + delFilter = "Reset Filter", + delFilterDesc = "Remove filter and reset values", + + showMap = "Show Minimap", + showMapDesc = "Toggle minimap on/off", + + freeFly = "Toggle Free Fly Mode", + freeFlyDesc = "Switch to Free Fly or back to Drone Mode", + + attachCam = "Attach camera to: ", + attachCamDesc = "Attach the camera to an entity in front of it", + + pointEntity = "Point camera at entity", + pointEntityDesc = "Toggle pointing at selected entity", + + ctrlHelpRoll = "Roll Left/Right", + ctrlHelpMove = "Movement", + ctrlHelpRotate = "Rotate" +} + +Cfg.controls = { + keyboard = { + openMenu = 178, -- Delete + hold = 21, -- Shift + speedUp = 15, -- Mouse wheel up -- with hold + speedDown = 14, -- Mouse wheel down -- with hold + + zoomOut = 14, -- Mouse wheel down + zoomIn = 15, -- Mouse wheel up + + forwards = 32, -- W + backwards = 33, -- S + left = 34, -- A + right = 35, -- D + up = 22, -- Space + down = 36, -- Ctrl + + rollLeft = 44, -- Q + rollRight = 38, -- E + }, + controller = { + openMenu = 244, -- Select -- hold for ~1 second + + holdSpeed = 80, -- O / B + holdFov = 21, -- X / A + up = 172, -- D-pad up + down = 173, -- D-pad down + + rollLeft = 37, -- L1 / LB + rollRight = 44, -- R1 / RB + } +} + +-- disables character/vehicle controls when using camera movements +Cfg.disabledControls = { + 30, -- A and D (Character Movement) + 31, -- W and S (Character Movement) + 21, -- LEFT SHIFT + 36, -- LEFT CTRL + 22, -- SPACE + 44, -- Q + 38, -- E + 71, -- W (Vehicle Movement) + 72, -- S (Vehicle Movement) + 59, -- A and D (Vehicle Movement) + 60, -- LEFT SHIFT and LEFT CTRL (Vehicle Movement) + 85, -- Q (Radio Wheel) + 86, -- E (Vehicle Horn) + 15, -- Mouse wheel up + 14, -- Mouse wheel down + 37, -- Controller R1 (PS) / RT (XBOX) + 80, -- Controller O (PS) / B (XBOX) + 228, -- + 229, -- + 172, -- + 173, -- + 37, -- + 44, -- + 178, -- + 244, -- +} + +-- list of available filters ( https://pastebin.com/kVPwMemE ) +Cfg.filterList = { + "None", + "AmbientPUSH", + "AP1_01_B_IntRefRange", + "AP1_01_C_NoFog", + "Bank_HLWD", + "Barry1_Stoned", + "BarryFadeOut", + "baseTONEMAPPING", + "BeastIntro01", + "BeastIntro02", + "BeastLaunch01", + "BeastLaunch02", + "BikerFilter", + "BikerForm01", + "BikerFormFlash", + "Bikers", + "BikersSPLASH", + "blackNwhite", + "BlackOut", + "BleepYellow01", + "BleepYellow02", + "Bloom", + "BloomLight", + "BloomMid", + "buggy_shack", + "buildingTOP", + "BulletTimeDark", + "BulletTimeLight", + "CAMERA_BW", + "CAMERA_secuirity", + "CAMERA_secuirity_FUZZ", + "canyon_mission", + "carMOD_underpass", + "carpark", + "carpark_dt1_02", + "carpark_dt1_03", + "Carpark_MP_exit", + "cashdepot", + "cashdepotEMERGENCY", + "cBank_back", + "cBank_front", + "ch2_tunnel_whitelight", + "CH3_06_water", + "CHOP", + "cinema", + "cinema_001", + "cops", + "CopsSPLASH", + "crane_cam", + "crane_cam_cinematic", + "CrossLine01", + "CrossLine02", + "CS1_railwayB_tunnel", + "CS3_rail_tunnel", + "CUSTOM_streetlight", + "damage", + "DeadlineNeon01", + "default", + "DefaultColorCode", + "DONT_overide_sunpos", + "Dont_tazeme_bro", + "dont_tazeme_bro_b", + "downtown_FIB_cascades_opt", + "DrivingFocusDark", + "DrivingFocusLight", + "DRUG_2_drive", + "Drug_deadman", + "Drug_deadman_blend", + "drug_drive_blend01", + "drug_drive_blend02", + "drug_flying_01", + "drug_flying_02", + "drug_flying_base", + "DRUG_gas_huffin", + "drug_wobbly", + "Drunk", + "dying", + "eatra_bouncelight_beach", + "epsilion", + "exile1_exit", + "exile1_plane", + "ExplosionJosh", + "EXT_FULLAmbientmult_art", + "ext_int_extlight_large", + "EXTRA_bouncelight", + "eyeINtheSKY", + "Facebook_NEW", + "facebook_serveroom", + "FIB_5", + "FIB_6", + "FIB_A", + "FIB_B", + "FIB_interview", + "FIB_interview_optimise", + "FinaleBank", + "FinaleBankexit", + "FinaleBankMid", + "fireDEPT", + "FORdoron_delete", + "Forest", + "fp_vig_black", + "fp_vig_blue", + "fp_vig_brown", + "fp_vig_gray", + "fp_vig_green", + "fp_vig_red", + "FrankilinsHOUSEhills", + "frankilnsAUNTS_new", + "frankilnsAUNTS_SUNdir", + "FRANKLIN", + "FranklinColorCode", + "FranklinColorCodeBasic", + "FranklinColorCodeBright", + "FullAmbientmult_interior", + "gallery_refmod", + "garage", + "gen_bank", + "glasses_black", + "Glasses_BlackOut", + "glasses_blue", + "glasses_brown", + "glasses_Darkblue", + "glasses_green", + "glasses_orange", + "glasses_pink", + "glasses_purple", + "glasses_red", + "glasses_Scuba", + "glasses_VISOR", + "glasses_yellow", + "gorge_reflection_gpu", + "gorge_reflectionoffset", + "gorge_reflectionoffset2", + "graveyard_shootout", + "gunclub", + "gunclubrange", + "gunshop", + "gunstore", + "half_direct", + "hangar_lightsmod", + "Hanger_INTmods", + "heathaze", + "heist_boat", + "heist_boat_engineRoom", + "heist_boat_norain", + "helicamfirst", + "heliGunCam", + "Hicksbar", + "HicksbarNEW", + "hillstunnel", + "Hint_cam", + "hitped", + "hud_def_blur", + "hud_def_blur_switch", + "hud_def_colorgrade", + "hud_def_desat_cold", + "hud_def_desat_cold_kill", + "hud_def_desat_Franklin", + "hud_def_desat_Michael", + "hud_def_desat_Neutral", + "hud_def_desat_switch", + "hud_def_desat_Trevor", + "hud_def_desatcrunch", + "hud_def_flash", + "hud_def_focus", + "hud_def_Franklin", + "hud_def_lensdistortion", + "hud_def_lensdistortion_subtle", + "hud_def_Michael", + "hud_def_Trevor", + "id1_11_tunnel", + "ImpExp_Interior_01", + "impexp_interior_01_lift", + "IMpExt_Interior_02", + "IMpExt_Interior_02_stair_cage", + "InchOrange01", + "InchOrange02", + "InchPickup01", + "InchPickup02", + "InchPurple01", + "InchPurple02", + "int_amb_mult_large", + "int_Barber1", + "int_carmod_small", + "int_carrier_control", + "int_carrier_control_2", + "int_carrier_hanger", + "int_carrier_rear", + "int_carrier_stair", + "int_carshowroom", + "int_chopshop", + "int_clean_extlight_large", + "int_clean_extlight_none", + "int_clean_extlight_small", + "int_ClothesHi", + "int_clotheslow_large", + "int_cluckinfactory_none", + "int_cluckinfactory_small", + "int_ControlTower_none", + "int_ControlTower_small", + "int_dockcontrol_small", + "int_extlght_sm_cntrst", + "int_extlight_large", + "int_extlight_large_fog", + "int_extlight_none", + "int_extlight_none_dark", + "int_extlight_none_dark_fog", + "int_extlight_none_fog", + "int_extlight_small", + "int_extlight_small_clipped", + "int_extlight_small_fog", + "int_Farmhouse_none", + "int_Farmhouse_small", + "int_FranklinAunt_small", + "INT_FullAmbientmult", + "INT_FULLAmbientmult_art", + "INT_FULLAmbientmult_both", + "INT_garage", + "int_GasStation", + "int_hanger_none", + "int_hanger_small", + "int_Hospital2_DM", + "int_Hospital_Blue", + "int_Hospital_BlueB", + "int_hospital_dark", + "int_Hospital_DM", + "int_hospital_small", + "int_lesters", + "int_Lost_none", + "int_Lost_small", + "INT_mall", + "int_methlab_small", + "int_motelroom", + "INT_NO_fogALPHA", + "INT_NoAmbientmult", + "INT_NoAmbientmult_art", + "INT_NoAmbientmult_both", + "INT_NOdirectLight", + "INT_nowaterREF", + "int_office_Lobby", + "int_office_LobbyHall", + "INT_posh_hairdresser", + "INT_smshop", + "INT_smshop_indoor_bloom", + "INT_smshop_inMOD", + "INT_smshop_outdoor_bloom", + "INT_streetlighting", + "int_tattoo", + "int_tattoo_B", + "INT_trailer_cinema", + "int_tunnel_none_dark", + "interior_WATER_lighting", + "introblue", + "jewel_gas", + "jewel_optim", + "jewelry_entrance", + "jewelry_entrance_INT", + "jewelry_entrance_INT_fog", + "Kifflom", + "KT_underpass", + "lab_none", + "lab_none_dark", + "lab_none_dark_fog", + "lab_none_dark_OVR", + "lab_none_exit", + "lab_none_exit_OVR", + "LectroDark", + "LectroLight", + "li", + "LifeInvaderLOD", + "lightning", + "lightning_cloud", + "lightning_strong", + "lightning_weak", + "LightPollutionHills", + "lightpolution", + "LIGHTSreduceFALLOFF", + "LODmult_global_reduce", + "LODmult_global_reduce_NOHD", + "LODmult_HD_orphan_LOD_reduce", + "LODmult_HD_orphan_reduce", + "LODmult_LOD_reduce", + "LODmult_SLOD1_reduce", + "LODmult_SLOD2_reduce", + "LODmult_SLOD3_reduce", + "lodscaler", + "LostTimeDark", + "LostTimeFlash", + "LostTimeLight", + "maxlodscaler", + "metro", + "METRO_platform", + "METRO_Tunnels", + "METRO_Tunnels_entrance", + "MichaelColorCode", + "MichaelColorCodeBasic", + "MichaelColorCodeBright", + "MichaelsDarkroom", + "MichaelsDirectional", + "MichaelsNODirectional", + "micheal", + "micheals_lightsOFF", + "michealspliff", + "michealspliff_blend", + "michealspliff_blend02", + "militarybase_nightlight", + "mineshaft", + "morebloom", + "morgue_dark", + "morgue_dark_ovr", + "Mp_apart_mid", + "mp_bkr_int01_garage", + "mp_bkr_int01_small_rooms", + "mp_bkr_int01_transition", + "mp_bkr_int02_garage", + "mp_bkr_int02_hangout", + "mp_bkr_int02_small_rooms", + "mp_bkr_ware01", + "mp_bkr_ware02_dry", + "mp_bkr_ware02_standard", + "mp_bkr_ware02_upgrade", + "mp_bkr_ware03_basic", + "mp_bkr_ware03_upgrade", + "mp_bkr_ware04", + "mp_bkr_ware05", + "MP_Bull_tost", + "MP_Bull_tost_blend", + "MP_corona_heist", + "MP_corona_heist_blend", + "MP_corona_heist_BW", + "MP_corona_heist_BW_night", + "MP_corona_heist_DOF", + "MP_corona_heist_night", + "MP_corona_heist_night_blend", + "MP_corona_selection", + "MP_corona_switch", + "MP_corona_tournament", + "MP_corona_tournament_DOF", + "MP_death_grade", + "MP_death_grade_blend01", + "MP_death_grade_blend02", + "MP_deathfail_night", + "mp_exec_office_01", + "mp_exec_office_02", + "mp_exec_office_03", + "mp_exec_office_03_blue", + "mp_exec_office_03C", + "mp_exec_office_04", + "mp_exec_office_05", + "mp_exec_office_06", + "mp_exec_warehouse_01", + "MP_Garage_L", + "MP_H_01_Bathroom", + "MP_H_01_Bedroom", + "MP_H_01_New", + "MP_H_01_New_Bathroom", + "MP_H_01_New_Bedroom", + "MP_H_01_New_Study", + "MP_H_01_Study", + "MP_H_02", + "MP_H_04", + "mp_h_05", + "MP_H_06", + "mp_h_07", + "mp_h_08", + "MP_heli_cam", + "mp_imx_intwaremed", + "mp_imx_intwaremed_office", + "mp_imx_mod_int_01", + "MP_intro_logo", + "MP_job_end_night", + "MP_job_load", + "MP_job_load_01", + "MP_job_load_02", + "MP_job_lose", + "MP_job_preload", + "MP_job_preload_blend", + "MP_job_preload_night", + "MP_job_win", + "MP_Killstreak", + "MP_Killstreak_blend", + "mp_lad_day", + "mp_lad_judgment", + "mp_lad_night", + "MP_Loser", + "MP_Loser_blend", + "MP_lowgarage", + "MP_MedGarage", + "MP_Powerplay", + "MP_Powerplay_blend", + "MP_race_finish", + "MP_select", + "Mp_Stilts", + "Mp_Stilts2", + "Mp_Stilts2_bath", + "Mp_Stilts_gym", + "Mp_Stilts_gym2", + "MP_Studio_Lo", + "MPApart_H_01", + "MPApart_H_01_gym", + "MPApartHigh", + "MPApartHigh_palnning", + "mugShot", + "mugShot_lineup", + "Multipayer_spectatorCam", + "multiplayer_ped_fight", + "nervousRON_fog", + "NeutralColorCode", + "NeutralColorCodeBasic", + "NeutralColorCodeBright", + "NeutralColorCodeLight", + "NEW_abattoir", + "new_bank", + "NEW_jewel", + "NEW_jewel_EXIT", + "NEW_lesters", + "new_MP_Garage_L", + "NEW_ornate_bank", + "NEW_ornate_bank_entrance", + "NEW_ornate_bank_office", + "NEW_ornate_bank_safe", + "New_sewers", + "NEW_shrinksOffice", + "NEW_station_unfinished", + "new_stripper_changing", + "NEW_trevorstrailer", + "NEW_tunnels", + "NEW_tunnels_ditch", + "new_tunnels_entrance", + "NEW_tunnels_hole", + "NEW_yellowtunnels", + "NewMicheal", + "NewMicheal_night", + "NewMicheal_upstairs", + "NewMichealgirly", + "NewMichealstoilet", + "NewMichealupstairs", + "nextgen", + "NG_blackout", + "NG_deathfail_BW_base", + "NG_deathfail_BW_blend01", + "NG_deathfail_BW_blend02", + "NG_filmic01", + "NG_filmic02", + "NG_filmic03", + "NG_filmic04", + "NG_filmic05", + "NG_filmic06", + "NG_filmic07", + "NG_filmic08", + "NG_filmic09", + "NG_filmic10", + "NG_filmic11", + "NG_filmic12", + "NG_filmic13", + "NG_filmic14", + "NG_filmic15", + "NG_filmic16", + "NG_filmic17", + "NG_filmic18", + "NG_filmic19", + "NG_filmic20", + "NG_filmic21", + "NG_filmic22", + "NG_filmic23", + "NG_filmic24", + "NG_filmic25", + "NG_filmnoir_BW01", + "NG_filmnoir_BW02", + "NG_first", + "nightvision", + "NO_coronas", + "NO_fog_alpha", + "NO_streetAmbient", + "NO_weather", + "NoAmbientmult", + "NoAmbientmult_interior", + "NOdirectLight", + "NoPedLight", + "NOrain", + "overwater", + "Paleto", + "paleto_nightlight", + "paleto_opt", + "PennedInDark", + "PennedInLight", + "PERSHING_water_reflect", + "phone_cam", + "phone_cam1", + "phone_cam10", + "phone_cam11", + "phone_cam12", + "phone_cam13", + "phone_cam2", + "phone_cam3", + "phone_cam3_REMOVED", + "phone_cam4", + "phone_cam5", + "phone_cam6", + "phone_cam7", + "phone_cam8", + "phone_cam8_REMOVED", + "phone_cam9", + "plane_inside_mode", + "player_transition", + "player_transition_no_scanlines", + "player_transition_scanlines", + "PlayerSwitchNeutralFlash", + "PlayerSwitchPulse", + "plaza_carpark", + "PoliceStation", + "PoliceStationDark", + "polluted", + "poolsidewaterreflection2", + "PORT_heist_underwater", + "powerplant_nightlight", + "powerstation", + "PPFilter", + "PPGreen01", + "PPGreen02", + "PPOrange01", + "PPOrange02", + "PPPink01", + "PPPink02", + "PPPurple01", + "PPPurple02", + "prison_nightlight", + "projector", + "prologue", + "prologue_ending_fog", + "prologue_ext_art_amb", + "prologue_reflection_opt", + "prologue_shootout", + "Prologue_shootout_opt", + "pulse", + "RaceTurboDark", + "RaceTurboFlash", + "RaceTurboLight", + "ranch", + "REDMIST", + "REDMIST_blend", + "ReduceDrawDistance", + "ReduceDrawDistanceMAP", + "ReduceDrawDistanceMission", + "reducelightingcost", + "ReduceSSAO", + "reducewaterREF", + "refit", + "reflection_correct_ambient", + "RemoteSniper", + "resvoire_reflection", + "rply_brightness", + "rply_brightness_neg", + "rply_contrast", + "rply_contrast_neg", + "rply_motionblur", + "rply_saturation", + "rply_saturation_neg", + "rply_vignette", + "rply_vignette_neg", + "SALTONSEA", + "sandyshore_nightlight", + "SAWMILL", + "scanline_cam", + "scanline_cam_cheap", + "scope_zoom_in", + "scope_zoom_out", + "secret_camera", + "services_nightlight", + "shades_pink", + "shades_yellow", + "SheriffStation", + "ship_explosion_underwater", + "ship_lighting", + "Shop247", + "Shop247_none", + "sleeping", + "Sniper", + "SP1_03_drawDistance", + "spectator1", + "spectator10", + "spectator2", + "spectator3", + "spectator4", + "spectator5", + "spectator6", + "spectator7", + "spectator8", + "spectator9", + "StadLobby", + "stc_coroners", + "stc_deviant_bedroom", + "stc_deviant_lounge", + "stc_franklinsHouse", + "stc_trevors", + "stoned", + "stoned_aliens", + "stoned_cutscene", + "stoned_monkeys", + "StreetLighting", + "StreetLightingJunction", + "StreetLightingtraffic", + "STRIP_changing", + "STRIP_nofog", + "STRIP_office", + "STRIP_stage", + "StuntFastDark", + "StuntFastLight", + "StuntSlowDark", + "StuntSlowLight", + "subBASE_water_ref", + "sunglasses", + "superDARK", + "switch_cam_1", + "switch_cam_2", + "telescope", + "TinyGreen01", + "TinyGreen02", + "TinyPink01", + "TinyPink02", + "TinyRacerMoBlur", + "torpedo", + "traffic_skycam", + "trailer_explosion_optimise", + "TREVOR", + "TrevorColorCode", + "TrevorColorCodeBasic", + "TrevorColorCodeBright", + "Trevors_room", + "trevorspliff", + "trevorspliff_blend", + "trevorspliff_blend02", + "Tunnel", + "tunnel_entrance", + "tunnel_entrance_INT", + "TUNNEL_green", + "Tunnel_green1", + "TUNNEL_green_ext", + "tunnel_id1_11", + "TUNNEL_orange", + "TUNNEL_orange_exterior", + "TUNNEL_white", + "TUNNEL_yellow", + "TUNNEL_yellow_ext", + "ufo", + "ufo_deathray", + "underwater", + "underwater_deep", + "underwater_deep_clear", + "v_abattoir", + "V_Abattoir_Cold", + "v_bahama", + "v_cashdepot", + "V_CIA_Facility", + "v_dark", + "V_FIB_IT3", + "V_FIB_IT3_alt", + "V_FIB_IT3_alt5", + "V_FIB_stairs", + "v_foundry", + "v_janitor", + "v_jewel2", + "v_metro", + "V_Metro2", + "V_Metro_station", + "v_michael", + "v_michael_lounge", + "V_Office_smoke", + "V_Office_smoke_ext", + "V_Office_smoke_Fire", + "v_recycle", + "V_recycle_dark", + "V_recycle_light", + "V_recycle_mainroom", + "v_rockclub", + "V_Solomons", + "v_strip3", + "V_strip_nofog", + "V_strip_office", + "v_strpchangerm", + "v_sweat", + "v_sweat_entrance", + "v_sweat_NoDirLight", + "v_torture", + "Vagos", + "vagos_extlight_small", + "VAGOS_new_garage", + "VAGOS_new_hangout", + "VagosSPLASH", + "VC_tunnel_entrance", + "vehicle_subint", + "venice_canal_tunnel", + "vespucci_garage", + "VolticBlur", + "VolticFlash", + "VolticGold", + "WAREHOUSE", + "WATER _lab_cooling", + "WATER_CH2_06_01_03", + "WATER_CH2_06_02", + "WATER_CH2_06_04", + "WATER_cove", + "WATER_hills", + "WATER_ID2_21", + "WATER_lab", + "WATER_militaryPOOP", + "WATER_muddy", + "WATER_port", + "WATER_REF_malibu", + "WATER_refmap_high", + "WATER_refmap_hollywoodlake", + "WATER_refmap_low", + "WATER_refmap_med", + "WATER_refmap_off", + "WATER_refmap_poolside", + "WATER_refmap_silverlake", + "WATER_refmap_venice", + "WATER_refmap_verylow", + "WATER_resevoir", + "WATER_RichmanStuntJump", + "WATER_river", + "WATER_salton", + "WATER_salton_bottom", + "WATER_shore", + "WATER_silty", + "WATER_silverlake", + "whitenightlighting", + "WhiteOut", + "winning_room", + "yacht_DLC", + "yell_tunnel_nodirect", +} diff --git a/resources/Commands/911.lua b/resources/Commands/911.lua new file mode 100644 index 000000000..4ba3d5c14 --- /dev/null +++ b/resources/Commands/911.lua @@ -0,0 +1,19 @@ +AddEventHandler('chatMessage', function(source, name, msg) + sm = stringsplit(msg, " "); + if sm[1] == "/911" then + CancelEvent() + TriggerClientEvent('chatMessage', -1, "📲 911 | " .. name, { 30, 144, 255 }, string.sub(msg,5)) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end diff --git a/resources/Commands/__resource.lua b/resources/Commands/__resource.lua new file mode 100644 index 000000000..ab2fdcd5f --- /dev/null +++ b/resources/Commands/__resource.lua @@ -0,0 +1,9 @@ +description 'Enables use of /ooc for out of character chat.' +server_script 'ooc.lua' +server_script 'dispatch.lua' +server_script 'me.lua' +server_script 'tweet.lua' +server_script 'darkweb.lua' +server_script 'drugdeal.lua' +server_script 'serveradmin.lua' +server_script 'atc.lua' \ No newline at end of file diff --git a/resources/Commands/ad.lua b/resources/Commands/ad.lua new file mode 100644 index 000000000..69cffc709 --- /dev/null +++ b/resources/Commands/ad.lua @@ -0,0 +1,19 @@ +AddEventHandler('chatMessage', function(source, name, msg) + sm = stringsplit(msg, " "); + if sm[1] == "/ad" then + CancelEvent() + TriggerClientEvent('chatMessage', -1, "📡 Advertisement | " .. name, { 255, 255, 51 }, string.sub(msg,5)) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end diff --git a/resources/Commands/atc.lua b/resources/Commands/atc.lua new file mode 100644 index 000000000..7e60e5249 --- /dev/null +++ b/resources/Commands/atc.lua @@ -0,0 +1,19 @@ +AddEventHandler('chatMessage', function(source, name, msg) + sm = stringsplit(msg, " "); + if sm[1] == "/atc" then + CancelEvent() + TriggerClientEvent('chatMessage', -1, "👨â€âœˆï¸ ATC | " .. name, { 255, 140, 0 }, string.sub(msg,6)) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end diff --git a/resources/Commands/darkweb.lua b/resources/Commands/darkweb.lua new file mode 100644 index 000000000..a51c4b621 --- /dev/null +++ b/resources/Commands/darkweb.lua @@ -0,0 +1,19 @@ +AddEventHandler('chatMessage', function(source, name, msg) + sm = stringsplit(msg, " "); + if sm[1] == "/darkweb" then + CancelEvent() + TriggerClientEvent('chatMessage', -1, "👨â€ðŸ’» Dark Web | " .. name, { 0, 0, 0 }, string.sub(msg,10)) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end diff --git a/resources/Commands/dispatch.lua b/resources/Commands/dispatch.lua new file mode 100644 index 000000000..ea7159f91 --- /dev/null +++ b/resources/Commands/dispatch.lua @@ -0,0 +1,19 @@ +AddEventHandler('chatMessage', function(source, name, msg) + sm = stringsplit(msg, " "); + if sm[1] == "/dispatch" then + CancelEvent() + TriggerClientEvent('chatMessage', -1, "📲 Dispatch | " .. name, { 30, 144, 255 }, string.sub(msg,10)) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end diff --git a/resources/Commands/drugdeal.lua b/resources/Commands/drugdeal.lua new file mode 100644 index 000000000..dcfe15341 --- /dev/null +++ b/resources/Commands/drugdeal.lua @@ -0,0 +1,19 @@ +AddEventHandler('chatMessage', function(source, name, msg) + sm = stringsplit(msg, " "); + if sm[1] == "/drugdeal" then + CancelEvent() + TriggerClientEvent('chatMessage', -1, "💊 Drug Deal | " .. name, { 0, 100, 0 }, string.sub(msg,11)) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end diff --git a/resources/Commands/me.lua b/resources/Commands/me.lua new file mode 100644 index 000000000..0b5f0b584 --- /dev/null +++ b/resources/Commands/me.lua @@ -0,0 +1,19 @@ +AddEventHandler('chatMessage', function(source, name, msg) + sm = stringsplit(msg, " "); + if sm[1] == "/me" then + CancelEvent() + TriggerClientEvent('chatMessage', -1, "Me | " .. name, { 255, 0, 0 }, string.sub(msg,5)) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end \ No newline at end of file diff --git a/resources/Commands/ooc.lua b/resources/Commands/ooc.lua new file mode 100644 index 000000000..0b6b27d10 --- /dev/null +++ b/resources/Commands/ooc.lua @@ -0,0 +1,19 @@ +AddEventHandler('chatMessage', function(source, name, msg) + sm = stringsplit(msg, " "); + if sm[1] == "/ooc" then + CancelEvent() + TriggerClientEvent('chatMessage', -1, "OOC | " .. name, { 128, 128, 128 }, string.sub(msg,5)) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end \ No newline at end of file diff --git a/resources/Commands/serveradmin.lua b/resources/Commands/serveradmin.lua new file mode 100644 index 000000000..bf4823bf4 --- /dev/null +++ b/resources/Commands/serveradmin.lua @@ -0,0 +1,19 @@ +AddEventHandler('chatMessage', function(source, name, msg) + sm = stringsplit(msg, " "); + if sm[1] == "/serveradmin" then + CancelEvent() + TriggerClientEvent('chatMessage', -1, "🔧 Server Admin | " .. name, { 255, 0, 0 }, string.sub(msg,14)) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end diff --git a/resources/Commands/tweet.lua b/resources/Commands/tweet.lua new file mode 100644 index 000000000..15cb7e056 --- /dev/null +++ b/resources/Commands/tweet.lua @@ -0,0 +1,19 @@ +AddEventHandler('chatMessage', function(source, name, msg) + sm = stringsplit(msg, " "); + if sm[1] == "/tweet" then + CancelEvent() + TriggerClientEvent('chatMessage', -1, "📶 Tweet | " .. name, { 87, 160, 211 }, string.sub(msg,7)) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end diff --git a/resources/ContainerForklift/.gitignore b/resources/ContainerForklift/.gitignore new file mode 100644 index 000000000..6fd0a376d --- /dev/null +++ b/resources/ContainerForklift/.gitignore @@ -0,0 +1,41 @@ +# Compiled Lua sources +luac.out + +# luarocks build files +*.src.rock +*.zip +*.tar.gz + +# Object files +*.o +*.os +*.ko +*.obj +*.elf + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo +*.def +*.exp + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + diff --git a/resources/ContainerForklift/LICENSE b/resources/ContainerForklift/LICENSE new file mode 100644 index 000000000..f288702d2 --- /dev/null +++ b/resources/ContainerForklift/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +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. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/resources/ContainerForklift/README.md b/resources/ContainerForklift/README.md new file mode 100644 index 000000000..5f1fbe98a --- /dev/null +++ b/resources/ContainerForklift/README.md @@ -0,0 +1 @@ +# ContainerForklift \ No newline at end of file diff --git a/resources/ContainerForklift/client.lua b/resources/ContainerForklift/client.lua new file mode 100644 index 000000000..0d2123905 --- /dev/null +++ b/resources/ContainerForklift/client.lua @@ -0,0 +1,68 @@ +isAttached = false +canSleep = false + +Citizen.CreateThread(function() + AddTextEntry("press_attach_vehicle", "Press ~INPUT_DETONATE~ to pick up this container up") + AddTextEntry("press_detach_vehicle", "Press ~INPUT_DETONATE~ to detach this container") + while true do + Citizen.Wait(10) + local ped = PlayerPedId() + if IsPedInAnyVehicle(ped, false) then + local veh = GetVehiclePedIsIn(ped, false) + if GetEntityModel(veh) == `handler` then -- Hash > Handler + local pedCoords = GetEntityCoords(ped, 0) + local objectId = GetClosestObjectOfType(pedCoords.x, pedCoords.y, pedCoords.z+5.0, 5.0, GetHashKey("prop_contr_03b_ld"), false) + if objectId ~= 0 then + if isAttached then + + if IsEntityAttachedToHandlerFrame(veh, objectId) == false then + isAttached = false + Wait(2000) + end + + DisplayHelpTextThisFrame("press_detach_vehicle") + else + if IsHandlerFrameAboveContainer(veh, objectId) == 1 then + DisplayHelpTextThisFrame("press_attach_vehicle") + end + end + + if IsControlJustPressed(0, 47) then + if isAttached ~= true and IsHandlerFrameAboveContainer(veh, objectId) == 1 then + N_0x6a98c2ecf57fa5d4(veh, objectId) -- // Attach Container to Handler Frame (Thx Indra :3) + isAttached = true + else + DetachContainerFromHandlerFrame(veh) + isAttached = false + Wait(2000) + end + end + canSleep = false + else + if not isAttached then + canSleep = true + end + end + end + end + if canSleep then + Citizen.Wait(2000) + end + end +end) + +RegisterCommand('handler', function(source, args, rawCommand) + local myPed = PlayerPedId() + local vehicle = GetHashKey('Handler') + + RequestModel(vehicle) + + while not HasModelLoaded(vehicle) do + Wait(1) + end + + local coords = GetOffsetFromEntityInWorldCoords(GetPlayerPed(-1), 0, 5.0, 0) + local spawned_car = CreateVehicle(vehicle, coords, 64.55118,116.613,78.69622, true, false) + SetVehicleOnGroundProperly(spawned_car) + SetPedIntoVehicle(myPed, spawned_car, - 1) +end) \ No newline at end of file diff --git a/resources/ContainerForklift/fxmanifest.lua b/resources/ContainerForklift/fxmanifest.lua new file mode 100644 index 000000000..1eb2bd707 --- /dev/null +++ b/resources/ContainerForklift/fxmanifest.lua @@ -0,0 +1,7 @@ +fx_version 'adamant' +author 'terbium' +game "gta5" + +client_scripts { + 'client.lua' +} \ No newline at end of file diff --git a/resources/Crouch/__resource.lua b/resources/Crouch/__resource.lua new file mode 100644 index 000000000..ac74d64b9 --- /dev/null +++ b/resources/Crouch/__resource.lua @@ -0,0 +1,9 @@ +-- Crouch script written by WolfKnight +-- Made for AfterLifeRP +-- Version 1.0.1 + +-- Set the resource manifest +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +-- Add a client script +client_script 'client.lua' \ No newline at end of file diff --git a/resources/Crouch/client.lua b/resources/Crouch/client.lua new file mode 100644 index 000000000..55fb23134 --- /dev/null +++ b/resources/Crouch/client.lua @@ -0,0 +1,31 @@ +local crouched = false + +Citizen.CreateThread( function() + while true do + Citizen.Wait( 1 ) + + local ped = GetPlayerPed( -1 ) + + if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then + DisableControlAction( 0, 36, true ) -- INPUT_DUCK + + if ( not IsPauseMenuActive() ) then + if ( IsDisabledControlJustPressed( 0, 36 ) ) then + RequestAnimSet( "move_ped_crouched" ) + + while ( not HasAnimSetLoaded( "move_ped_crouched" ) ) do + Citizen.Wait( 100 ) + end + + if ( crouched == true ) then + ResetPedMovementClipset( ped, 0 ) + crouched = false + elseif ( crouched == false ) then + SetPedMovementClipset( ped, "move_ped_crouched", 0.25 ) + crouched = true + end + end + end + end + end +end ) \ No newline at end of file diff --git a/resources/Cruise-Control/__resource.lua b/resources/Cruise-Control/__resource.lua new file mode 100644 index 000000000..f6508ed64 --- /dev/null +++ b/resources/Cruise-Control/__resource.lua @@ -0,0 +1,6 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +client_scripts { + 'config.lua', + 'client.lua' +} \ No newline at end of file diff --git a/resources/Cruise-Control/client.lua b/resources/Cruise-Control/client.lua new file mode 100644 index 000000000..166ccc74f --- /dev/null +++ b/resources/Cruise-Control/client.lua @@ -0,0 +1,297 @@ + + +tc = false +Citizen.CreateThread(function() + if Config.TCon == true then + while true do + Wait(20) + playerped = GetPlayerPed(-1) + if IsPedSittingInAnyVehicle(playerped) then + local veh = GetVehiclePedIsIn(playerped,false) + if playerped == GetPedInVehicleSeat(veh,-1) then + if IsControlPressed(0,Config.TCkey) then + tc = true + TC() + end + end + end + end + end +end) + + +cruse = false +Citizen.CreateThread(function() + if Config.CCon == true then + while true do + Wait(20) + local playerped = GetPlayerPed(-1) + if IsPedSittingInAnyVehicle(playerped) then + local veh = GetVehiclePedIsIn(playerped,false) + if playerped == GetPedInVehicleSeat(veh,-1) then + if IsControlPressed(0,Config.CCkey) then + cruse = true + Cruse() + end + end + else + Wait(2500) + end + end + end +end) + + + +function TC() + if not HasStreamedTextureDictLoaded('cctcimages') then + RequestStreamedTextureDict('cctcimages', true) + while not HasStreamedTextureDictLoaded('cctcimages') do + Wait(0) + end + end +playerped = GetPlayerPed(-1) +local veh = GetVehiclePedIsIn(playerped,false) +local drivebias = GetVehicleHandlingFloat(veh,"CHandlingData", "fDriveBiasFront") + +oldvalue = GetVehicleHandlingFloat(vehicle,'CHandlingData','fLowSpeedTractionLossMult') +repeat +Wait(0) +if IsPedGettingIntoAVehicle(playerped) then +Wait(2000) +veh = GetVehiclePedIsIn(playerped,false) +drivebias = GetVehicleHandlingFloat(veh,"CHandlingData", "fDriveBiasFront") +oldvalue = GetVehicleHandlingFloat(vehicle,'CHandlingData','fLowSpeedTractionLossMult') +end + + +if IsPedInAnyVehicle(playerped) then + if tcacting == true then + -- SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',newvalue5) + --SetVehicleEngineTorqueMultiplier(veh, var1) + else + SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',oldvalue) + SetVehicleEngineTorqueMultiplier(veh, 1.0) + end +var1 = 1.0 +mod1 = 0.0 +newvalue5 = oldvalue + +tcacting = false + + +wh1 = GetVehicleWheelSpeed(veh,0) +wh1 = (GetVehicleWheelSpeed(veh,1) + wh1) / 2 +wh2 = (GetVehicleWheelSpeed(veh,1) + wh1) / 2 +wh3 = GetVehicleWheelSpeed(veh,2) +wh4 = GetVehicleWheelSpeed(veh,3) +throttle = 0.0 +wheelave = (GetVehicleWheelSpeed(veh,0) + GetVehicleWheelSpeed(veh,1) + GetVehicleWheelSpeed(veh,2) + GetVehicleWheelSpeed(veh,3)) / 4 +if Config.OnScreendisplayTC == true then +DrawRect(UITC.x + 0.01 ,UITC.y + 0.04 ,0.05,0.01,0,0,0,255) +end +steerang = GetVehicleSteeringAngle(veh) + if steerang > 1 then + mod1 = steerang / 20 + elseif steerang < -1.0 then + steerang = steerang - steerang*2 + mod1 = steerang / 20 + end + if wh1 > (wheelave + 0.05 + mod1) then + var1 = 1.0 / ((wh1 - (wheelave + 0.00 + mod1) )- 0.04) *Config.action + newvalue5 = oldvalue * var1 + tcacting = true + elseif wh2 > (wheelave + 0.05 + mod1) then + var1 = 1.0 / ((wh2 - (wheelave + 0.00 + mod1) )- 0.04) *Config.action + newvalue5 = oldvalue * var1 + tcacting = true + elseif wh3 > (wheelave + 0.05 + mod1) then + var1 = 1.0 / ((wh3 - (wheelave + 0.00 + mod1) )- 0.04) *Config.action + newvalue5 = oldvalue * var1 + tcacting = true + elseif wh4 > (wheelave + 0.05 + mod1) then + var1 = 1.0 / ((wh4 - (wheelave + 0.00 + mod1) )- 0.04) *Config.action + newvalue5 = oldvalue * var1 + tcacting = true + end + if tcacting == true then + if newvalue5 > 0.0 and newvalue5 < oldvalue then + SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',newvalue5) + newvalue5 = oldvalue * var1 + elseif newvalue5 > oldvalue then + newvalue5 = oldvalue * var1 + SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',newvalue5) + elseif newvalue5 < 0.0 then + newvalue5 = 0.01 + SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',newvalue5) + end + if var1 < 1.0 then + SetVehicleEngineTorqueMultiplier(veh, var1) + if var1 < 0.98 then + drawbox(UITC.x - 0.01 ,UITC.y + 0.04,0,255) + end + if var1 < 0.7 then + drawbox(UITC.x - 0.00 ,UITC.y + 0.04 ,100,200) + end + if var1 < 0.5 then + drawbox(UITC.x + 0.01 ,UITC.y + 0.04 ,150,200) + end + if var1 < 0.3 then + drawbox(UITC.x + 0.02 ,UITC.y + 0.04 ,150,100) + end + if var1 < 0.2 then + drawbox(UITC.x + 0.03 ,UITC.y + 0.04,233,0) + end + else + var1 = 1.0 + SetVehicleEngineTorqueMultiplier(veh, var1) + end + + end + if Config.OnScreenTextTC then + drawTxta(UITC.x - 0.0 ,UITC.y + 0.0 ,0.55,"~w~TC ~g~ON", 255,50,0,255) + end + if Config.SimpleTCimmage then + if tcacting == true then + DrawSprite('cctcimages','SRTC1',UITC.x + 0.04 ,UITC.y + 0.02,0.014,0.024,0.0,255,255,255,200) +else + DrawSprite('cctcimages','SRTC2',UITC.x + 0.04 ,UITC.y + 0.02,0.014,0.024,0.0,255,255,255,200) + end + end + if Config.Watermark then + drawTxtb(UITC.x - 0.01 ,UITC.y + 0.041 ,0.27,"By DOJSRC", 255,255,255,255) + end + if IsControlJustPressed(0,Config.TCkey) or IsControlJustPressed(0,Config.TCkey) then + SetVehicleMaxSpeed(veh,300.0) + tc = false + elseif IsPedInAnyVehicle(playerped,true) == false and Config.enableTCtoggle == false then + tc = false + end +end +until tc == false +SetVehicleHandlingField(vehicle,'CHandlingData','fLowSpeedTractionLossMult',oldvalue) +Wait(500) +end + +function drawbox(x,y,r,g) + if Config.OnScreendisplayTC == true then + + DrawRect(x,y,0.01,0.01,r,g,0,255) + end +end + +function Cruse() + if not HasStreamedTextureDictLoaded('cctcimages') then + RequestStreamedTextureDict('cctcimages', true) + while not HasStreamedTextureDictLoaded('cctcimages') do + Wait(0) + end + end +print"starting CC" + local playerped = PlayerPedId() + local veh = GetVehiclePedIsIn(playerped, false) + local vel = GetVehicleWheelSpeed(veh, 1) + + if vel > Config.Minspeed and vel < Config.Maxspeed then + local speed = vel * 2.237 + repeat + Wait(0) + local vel2 = GetVehicleWheelSpeed(veh, 1) + if vel2 < 0.001 then + vel2 = 0.01 + end + + local diff = vel + 0.2 - vel2 + local throttle = 0.2 + if diff > 1.0 then + throttle = 1.0 + else + throttle = diff + end + + if not IsControlPressed(0, 76) and throttle > 0.01 then + SetControlNormal(0, 71, throttle) + end + + if throttle < 0.001 then + throttle = 0.0 + end + + local curspeed = GetVehicleWheelSpeed(veh, 1) * 2.237 + speed = vel * 2.237 + + if Config.OnScreenTextCC then + drawTxta(UI.x, UI.y - 0.12, 0.45, "~r~Target Speed: ~w~" ..(round(speed,1)).. " MPH", 255, 50, 0, 255) + drawTxta(UI.x, UI.y - 0.095, 0.45, "~r~Current speed: ~w~" ..round(curspeed,1).. " MPH", 255, 50, 0, 255) + drawTxta(UI.x, UI.y - 0.07, 0.45, "~r~Throttle %: ~w~" ..round((throttle*100)), 255, 50, 0, 255) + end + if Config.OnScreendisplayCC then + local sr = toint((throttle*255)) - 10 + local sg = 255 - sr + 10 + sg = toint(sg) + DrawRect(UI.x + 0.06, UI.y - 0.03, throttle/12, 0.01, sr, sg, 0, 255) + end + if Config.Watermark2 then + drawTxtb(UI.x + 0.01 ,UI.y - 0.03 ,0.27,"By DOJSRC", 255,255,255,255) + end + if Config.SimpleCCimmage then + DrawSprite('cctcimages','SRCC1',UI.x - 0.0 ,UI.y - 0.01,0.023,0.04,0.0,255,255,255,200) + end + + + if IsControlPressed(0, Config.CCkey) and GetVehicleWheelSpeed(veh,1) < Config.Maxspeed then + vel = GetVehicleWheelSpeed(veh,1) + end + + if IsControlJustPressed(0, 8) or IsControlJustPressed(0, Config.CCkey) then + SetVehicleMaxSpeed(veh, 300.0) + cruse = false + elseif IsPedInAnyVehicle(playerped,true) == false then + cruse = false + end + until cruse == false + Wait(500) + end + end + +function round(num, numDecimalPlaces) + local mult = 10^(numDecimalPlaces or 0) + if num >= 0 then return math.floor(num * mult + 0.5) / mult + else return math.ceil(num * mult - 0.5) / mult end +end + +function toint(n) + local s = tostring(n) + local i, j = s:find('%.') + if i then + return tonumber(s:sub(1, i-1)) + else + return n + end +end + + +function drawTxta(x, y, scale, text, r, g, b, a) + SetTextFont(4) + SetTextProportional(0) + SetTextScale(scale, scale) + SetTextColour(r, g, b, a) + SetTextDropShadow(0, 0, 0, 0,255) + SetTextEdge(1, 0, 0, 0, 255) + SetTextDropShadow() + SetTextOutline() + SetTextEntry("STRING") + AddTextComponentString(text) + DrawText(x, y) + +end + +function drawTxtb(x, y, scale, text, r, g, b, a) + SetTextFont(4) + SetTextProportional(0) + SetTextScale(scale, scale) + SetTextColour(r, g, b, a) + SetTextEntry("STRING") + AddTextComponentString(text) + DrawText(x, y) +end diff --git a/resources/Cruise-Control/config.lua b/resources/Cruise-Control/config.lua new file mode 100644 index 000000000..5ba0deae7 --- /dev/null +++ b/resources/Cruise-Control/config.lua @@ -0,0 +1,46 @@ +Config = {} + +Config.TCon = false --- Enable/Disable Traction Control + +Config.CCon = true --- Enable/Disable Cruise Control + +Config.TCkey = 20 --- Traction Control Key (Default Z) // https://docs.fivem.net/game-references/controls/ + +Config.CCkey = 246 --- Cruise Control Key (Default Y) // https://docs.fivem.net/game-references/controls/ + +Config.Maxspeed = 68.0 --- In meters per second 34 = 75mph + +Config.Minspeed = 5.0 --- In meters per second 0.1 = 0.2mph + +Config.action = 0.2 --- How much the TC wil try to stop you sliding Lower = more help + +Config.OnScreenTextCC = true --- Enable/Disable On-Screen text + +Config.OnScreendisplayCC = false --- Enable/Disable On-Screen display/colours + +Config.SimpleCCimmage = false --- a small symbol + +Config.OnScreenTextTC = false --- Enable/Disable On-Screen text + +Config.OnScreendisplayTC = false --- Enable/Disable On-Screen display/colours + +Config.SimpleTCimmage = false --- a small symbol + +Config.Watermark = false --- Enable/Disable Watermark + +Config.Watermark2 = false --- Enable/Disable Watermark + +Config.enableTCtoggle = false + + UITC = { + + x = 0.20 , -- Traction Control Screen Coords 0.0-1.0 left to right + y = 0.720 , -- Traction Control Screen Coords 0.0-1.0 = top to bottom + +} + UI = { + + x = 0.015 , -- Cruise Control Screen Coords 0.0-1.0 left to right + y = 0.84 , -- Cruise Control Screen Coords 0.0-1.0 = top to bottom + +} diff --git a/resources/Cruise-Control/stream/cctcimages.ytd b/resources/Cruise-Control/stream/cctcimages.ytd new file mode 100644 index 000000000..495e5aa14 --- /dev/null +++ b/resources/Cruise-Control/stream/cctcimages.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:720232180a8b41ca48c81819886441d663b7a1a09d12b771654143e4e923a55c +size 5315 diff --git a/resources/Custom-Commands/__resource.lua b/resources/Custom-Commands/__resource.lua new file mode 100644 index 000000000..f7ed46d88 --- /dev/null +++ b/resources/Custom-Commands/__resource.lua @@ -0,0 +1,9 @@ +----------------------------------------------------------------- +----------------------------------------------------------------- +--------------------Made by ServerCopMug#0392-------------------- +----------------Customizable-Response-Commands------------------- +----------------------------------------------------------------- + +----DON'T NEED TO TOUCH THIS--- + +client_script "client.lua" \ No newline at end of file diff --git a/resources/Custom-Commands/client.lua b/resources/Custom-Commands/client.lua new file mode 100644 index 000000000..51610572d --- /dev/null +++ b/resources/Custom-Commands/client.lua @@ -0,0 +1,44 @@ +----------------------------------------------------------------- +----------------------------------------------------------------- +--------------------Made by ServerCopMug#0392-------------------- +----------------Customizable-Response-Commands------------------- +----------------------------------------------------------------- + + +--------**To add more links copy and paste the lines below**-------- +--------**To change the colors of the message follow this page: https://forum.cfx.re/t/chat-formatting-colors-bold-underline/67641**-------- + +--------------------RESPONSE COMMANDS-------------------------- + +RegisterCommand("discord", function(source, args, rawCommand) -------- replace "discord" with any other command you want **DON'T INCLUDE /** + TriggerEvent("chatMessage", "^*^8[Our Discord:] ^7https://discord.gg/2XvwvgR") ------- change message in the "" +end) + +--RegisterCommand("cad", function(source, args, rawCommand) ------- replace "cad" with any other command you want DON'T INCLUDE / +-- TriggerEvent("chatMessage", "^*^8[Our CAD:] ^7https://cad.elite-gaming.co.uk/") ------- change message in the "" +--end) + +RegisterCommand("website", function(source, args, rawCommand) ------- replace "website" with any other command you want DON'T INCLUDE / + TriggerEvent("chatMessage", "^*^8[Our Website:] ^7https://elite-gaming.co.uk/") ------- change message in the "" +end) + +RegisterCommand("forum", function(source, args, rawCommand) ------- replace "website" with any other command you want DON'T INCLUDE / + TriggerEvent("chatMessage", "^*^8[Our Forum:] ^7https://forum.elite-gaming.co.uk/") ------- change message in the "" +end) + +--RegisterCommand("commands", function(source, args, rawCommand) ------- replace "commands" with any other command you want DON'T INCLUDE / +-- TriggerEvent("chatMessage", "^*^8[Commands:] ^7/website, /cad, /discord, /cars, /info, /help") ------- change message in the "" +--end) + +--RegisterCommand("cars", function(source, args, rawCommand) ------- replace "cars" with any other command you want DON'T INCLUDE / +-- TriggerEvent("chatMessage", "^*^8[Custom Car Spawn Codes:] ^7CAR1, CAR2, CAR3, CAR4, CAR5") ------- change message in the "" +--end) + +--RegisterCommand("info", function(source, args, rawCommand) ------- replace "info" with any other command you want DON'T INCLUDE / +-- TriggerEvent("chatMessage", "^*^8[Server Info:] ^7Some server info...") ------- change message in the "" +--end) + +--RegisterCommand("help", function(source, args, rawCommand) ------- replace "help" with any other command you want DON'T INCLUDE / +-- TriggerEvent("chatMessage", "^*^8[Help:] ^7Some help...") ------- change message in the "" +--end) + diff --git a/resources/DeathCam/__resource.lua b/resources/DeathCam/__resource.lua new file mode 100644 index 000000000..45e1666c5 --- /dev/null +++ b/resources/DeathCam/__resource.lua @@ -0,0 +1,6 @@ +resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937" + +client_scripts { + 'config.lua', + 'client.lua' +} diff --git a/resources/DeathCam/client.lua b/resources/DeathCam/client.lua new file mode 100644 index 000000000..2469ae67b --- /dev/null +++ b/resources/DeathCam/client.lua @@ -0,0 +1,164 @@ +-------------------------------------------------- +------ DEATH CAM FOR FIVEM MADE BY KIMINAZE ------ +------ This script does let you control the ------ +------ camera after you have died. ------ +-------------------------------------------------- + +-------------------------------------------------- +------------------- VARIABLES -------------------- +-------------------------------------------------- + +-- main variables +local cam = nil + +local isDead = false + +local angleY = 0.0 +local angleZ = 0.0 + + +-------------------------------------------------- +---------------------- LOOP ---------------------- +-------------------------------------------------- +Citizen.CreateThread(function() + while true do + Citizen.Wait(1) + + -- process cam controls if cam exists and player is dead + if (cam and isDead) then + ProcessCamControls() + end + end +end) + +Citizen.CreateThread(function() + while true do + Citizen.Wait(500) + + if (not isDead and NetworkIsPlayerActive(PlayerId()) and IsPedFatallyInjured(PlayerPedId())) then + isDead = true + + StartDeathCam() + elseif (isDead and NetworkIsPlayerActive(PlayerId()) and not IsPedFatallyInjured(PlayerPedId())) then + isDead = false + + EndDeathCam() + end + end +end) + + + +-------------------------------------------------- +------------------- FUNCTIONS -------------------- +-------------------------------------------------- + +-- initialize camera +function StartDeathCam() + ClearFocus() + + local playerPed = PlayerPedId() + + cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", GetEntityCoords(playerPed), 0, 0, 0, GetGameplayCamFov()) + + SetCamActive(cam, true) + RenderScriptCams(true, true, 1000, true, false) +end + +-- destroy camera +function EndDeathCam() + ClearFocus() + + RenderScriptCams(false, false, 0, true, false) + DestroyCam(cam, false) + + cam = nil +end + +-- process camera controls +function ProcessCamControls() + local playerPed = PlayerPedId() + local playerCoords = GetEntityCoords(playerPed) + + -- disable 1st person as the 1st person camera can cause some glitches + DisableFirstPersonCamThisFrame() + + -- calculate new position + local newPos = ProcessNewPosition() + + -- focus cam area + SetFocusArea(newPos.x, newPos.y, newPos.z, 0.0, 0.0, 0.0) + + -- set coords of cam + SetCamCoord(cam, newPos.x, newPos.y, newPos.z) + + -- set rotation + PointCamAtCoord(cam, playerCoords.x, playerCoords.y, playerCoords.z + 0.5) +end + +function ProcessNewPosition() + local mouseX = 0.0 + local mouseY = 0.0 + + -- keyboard + if (IsInputDisabled(0)) then + -- rotation + mouseX = GetDisabledControlNormal(1, 1) * 8.0 + mouseY = GetDisabledControlNormal(1, 2) * 8.0 + + -- controller + else + -- rotation + mouseX = GetDisabledControlNormal(1, 1) * 1.5 + mouseY = GetDisabledControlNormal(1, 2) * 1.5 + end + + angleZ = angleZ - mouseX -- around Z axis (left / right) + angleY = angleY + mouseY -- up / down + -- limit up / down angle to 90° + if (angleY > 89.0) then angleY = 89.0 elseif (angleY < -89.0) then angleY = -89.0 end + + local pCoords = GetEntityCoords(PlayerPedId()) + + local behindCam = { + x = pCoords.x + ((Cos(angleZ) * Cos(angleY)) + (Cos(angleY) * Cos(angleZ))) / 2 * (Cfg.radius + 0.5), + y = pCoords.y + ((Sin(angleZ) * Cos(angleY)) + (Cos(angleY) * Sin(angleZ))) / 2 * (Cfg.radius + 0.5), + z = pCoords.z + ((Sin(angleY))) * (Cfg.radius + 0.5) + } + local rayHandle = StartShapeTestRay(pCoords.x, pCoords.y, pCoords.z + 0.5, behindCam.x, behindCam.y, behindCam.z, -1, PlayerPedId(), 0) + local a, hitBool, hitCoords, surfaceNormal, entityHit = GetShapeTestResult(rayHandle) + + local maxRadius = Cfg.radius + if (hitBool and Vdist(pCoords.x, pCoords.y, pCoords.z + 0.5, hitCoords) < Cfg.radius + 0.5) then + maxRadius = Vdist(pCoords.x, pCoords.y, pCoords.z + 0.5, hitCoords) + end + + local offset = { + x = ((Cos(angleZ) * Cos(angleY)) + (Cos(angleY) * Cos(angleZ))) / 2 * maxRadius, + y = ((Sin(angleZ) * Cos(angleY)) + (Cos(angleY) * Sin(angleZ))) / 2 * maxRadius, + z = ((Sin(angleY))) * maxRadius + } + + local pos = { + x = pCoords.x + offset.x, + y = pCoords.y + offset.y, + z = pCoords.z + offset.z + } + + + -- Debug x,y,z axis + --DrawMarker(1, pCoords.x, pCoords.y, pCoords.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03, 0.03, 5.0, 0, 0, 255, 255, false, false, 2, false, 0, false) + --DrawMarker(1, pCoords.x, pCoords.y, pCoords.z, 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 0.03, 0.03, 5.0, 255, 0, 0, 255, false, false, 2, false, 0, false) + --DrawMarker(1, pCoords.x, pCoords.y, pCoords.z, 0.0, 0.0, 0.0, -90.0, 0.0, 0.0, 0.03, 0.03, 5.0, 0, 255, 0, 255, false, false, 2, false, 0, false) + + return pos +end + +--XAchse Westen Osten +--Yachse Norden Süden +--ZAchse oben unten + +--gegenkathete = x +--ankathete = y +--hypotenuse = 1 +--alpha = GetCamRot(cam).z diff --git a/resources/DeathCam/config.lua b/resources/DeathCam/config.lua new file mode 100644 index 000000000..796e9b690 --- /dev/null +++ b/resources/DeathCam/config.lua @@ -0,0 +1,10 @@ +-------------------------------------------------- +------ DEATH CAM FOR FIVEM MADE BY KIMINAZE ------ +------ This script does let you control the ------ +------ camera after you have died. ------ +-------------------------------------------------- + +Cfg = {} + +-- maximum radius the camera will orbit at (in meters) +Cfg.radius = 5.0 diff --git a/resources/Delete-All-Vehicles/LICENSE b/resources/Delete-All-Vehicles/LICENSE new file mode 100644 index 000000000..f288702d2 --- /dev/null +++ b/resources/Delete-All-Vehicles/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +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. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/resources/Delete-All-Vehicles/__resource.lua b/resources/Delete-All-Vehicles/__resource.lua new file mode 100644 index 000000000..2bd5f05cb --- /dev/null +++ b/resources/Delete-All-Vehicles/__resource.lua @@ -0,0 +1,15 @@ +-------------------------------------- +------Created By Whit3Xlightning------ +--https://github.com/Whit3XLightning-- +-------------------------------------- + +server_script { + 'config.lua', + 'server/server.lua' +} +client_scripts { + 'config.lua', + 'client/client.lua', + 'client/entityiter.lua' +} + diff --git a/resources/Delete-All-Vehicles/client/client.lua b/resources/Delete-All-Vehicles/client/client.lua new file mode 100644 index 000000000..13db3e12f --- /dev/null +++ b/resources/Delete-All-Vehicles/client/client.lua @@ -0,0 +1,20 @@ +-------------------------------------- +------Created By Whit3Xlightning------ +--https://github.com/Whit3XLightning-- +-------------------------------------- + +RegisterNetEvent("wld:delallveh") +AddEventHandler("wld:delallveh", function () + local totalvehc = 0 + local notdelvehc = 0 + + for vehicle in EnumerateVehicles() do + if (not IsPedAPlayer(GetPedInVehicleSeat(vehicle, -1))) then SetVehicleHasBeenOwnedByPlayer(vehicle, false) SetEntityAsMissionEntity(vehicle, false, false) DeleteVehicle(vehicle) + if (DoesEntityExist(vehicle)) then DeleteVehicle(vehicle) end + if (DoesEntityExist(vehicle)) then notdelvehc = notdelvehc + 1 end + end + totalvehc = totalvehc + 1 + end + local vehfrac = totalvehc - notdelvehc .. " / " .. totalvehc + Citizen.Trace("You just deleted "..vehfrac.." vehicles in the server!") +end) \ No newline at end of file diff --git a/resources/Delete-All-Vehicles/client/entityiter.lua b/resources/Delete-All-Vehicles/client/entityiter.lua new file mode 100644 index 000000000..71e9ee235 --- /dev/null +++ b/resources/Delete-All-Vehicles/client/entityiter.lua @@ -0,0 +1,79 @@ +--[[The MIT License (MIT) + +Copyright (c) 2017 IllidanS4 + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +]] + +local entityEnumerator = { + __gc = function(enum) + if enum.destructor and enum.handle then + enum.destructor(enum.handle) + end + enum.destructor = nil + enum.handle = nil + end +} + +local function EnumerateEntities(initFunc, moveFunc, disposeFunc) + return coroutine.wrap(function() + local iter, id = initFunc() + if not id or id == 0 then + disposeFunc(iter) + return + end + + local enum = {handle = iter, destructor = disposeFunc} + setmetatable(enum, entityEnumerator) + + local next = true + repeat + coroutine.yield(id) + next, id = moveFunc(iter) + until not next + + enum.destructor, enum.handle = nil, nil + disposeFunc(iter) + end) +end + +function EnumerateObjects() + return EnumerateEntities(FindFirstObject, FindNextObject, EndFindObject) +end + +function EnumeratePeds() + return EnumerateEntities(FindFirstPed, FindNextPed, EndFindPed) +end + +function EnumerateVehicles() + return EnumerateEntities(FindFirstVehicle, FindNextVehicle, EndFindVehicle) +end + +function EnumeratePickups() + return EnumerateEntities(FindFirstPickup, FindNextPickup, EndFindPickup) +end + +--[[Usage: +for ped in EnumeratePeds() do + +end +]] \ No newline at end of file diff --git a/resources/Delete-All-Vehicles/config.lua b/resources/Delete-All-Vehicles/config.lua new file mode 100644 index 000000000..8acd3a4cf --- /dev/null +++ b/resources/Delete-All-Vehicles/config.lua @@ -0,0 +1,16 @@ +-------------------------------------- +------Created By Whit3Xlightning------ +--https://github.com/Whit3XLightning-- +-------------------------------------- + +Config = {} + +Config = { + commandName = "delallveh", + -- This is the command that you will type into chat to execute the script. + + restricCommand = true + -- Setting this to false will allow anyone in the server to use the command. + -- If you set it to true you will need to add a ace perm to allow people to use it. + -- Such as add_ace [GROUP] command.[commandName] allow +} \ No newline at end of file diff --git a/resources/Delete-All-Vehicles/server/server.lua b/resources/Delete-All-Vehicles/server/server.lua new file mode 100644 index 000000000..0cde7adc2 --- /dev/null +++ b/resources/Delete-All-Vehicles/server/server.lua @@ -0,0 +1,6 @@ +-------------------------------------- +------Created By Whit3Xlightning------ +--https://github.com/Whit3XLightning-- +-------------------------------------- + +RegisterCommand(Config.commandName, function(source, args, rawCommand) TriggerClientEvent("wld:delallveh", -1) end, Config.restricCommand) diff --git a/resources/Delete-Gun/dog-c.lua b/resources/Delete-Gun/dog-c.lua new file mode 100644 index 000000000..f27e3e34e --- /dev/null +++ b/resources/Delete-Gun/dog-c.lua @@ -0,0 +1,84 @@ +-- Created by @murfasa https://forum.cfx.re/u/murfasa + +local dogtoggle = false +local allowed = false +local passAce = false +local onAim = GetConvar("dog.onAim", "true") +local useAce = GetConvar("dog.useAce", "false") + +-- Functions -- +Citizen.CreateThread(function() + if useAce == "true" then + TriggerServerEvent("dog:checkRole") + end +end) + +RegisterNetEvent("dog:returnCheck") +AddEventHandler("dog:returnCheck", function(check) + passAce = check +end) + +local function checkRole() + if useAce == "false" then + allowed = true + return allowed + end + if passAce == true then + allowed = true + return allowed + end +end + +local function getEntity(player) -- function To Get Entity Player Is Aiming At + local _, entity = GetEntityPlayerIsFreeAimingAt(player) + return entity +end + +local function aimCheck(player) -- function to check config value onAim. If it's off, then + if onAim == "true" then + return true + else + return IsPedShooting(player) + end +end + +local function drawNotification(text) -- draws a notification box + SetNotificationTextEntry("STRING") + AddTextComponentString(text) + DrawNotification(false, false) +end +-- Functions -- + + +RegisterCommand("delgun", function() + checkRole() + if allowed == true then + if dogtoggle == false then + dogtoggle = true + drawNotification("~g~Delete Object Gun Enabled!") + else + dogtoggle = false + drawNotification("~b~Delete Object Gun Disabled!") + end + else + drawNotification("~r~You have insufficient permissions to activate the Delete Object Gun.") + end +end, false) + + +Citizen.CreateThread(function() + while true do + Citizen.Wait(0) + if dogtoggle then + if IsPlayerFreeAiming(PlayerId()) then + local entity = getEntity(PlayerId()) + if GetEntityType(entity) == 2 or 3 then + if aimCheck(GetPlayerPed(-1)) then + SetEntityAsMissionEntity(entity, true, true) + DeleteEntity(entity) + end + end + end + end + end +end) \ No newline at end of file diff --git a/resources/Delete-Gun/dog-s.lua b/resources/Delete-Gun/dog-s.lua new file mode 100644 index 000000000..2e8d1dfee --- /dev/null +++ b/resources/Delete-Gun/dog-s.lua @@ -0,0 +1,10 @@ +-- Created by @murfasa https://forum.cfx.re/u/murfasa + +RegisterServerEvent("dog:checkRole") +AddEventHandler("dog:checkRole", function() + if IsPlayerAceAllowed(source, "dog.delgun") then + TriggerClientEvent("dog:returnCheck", source, true) + else + TriggerClientEvent("dog:returnCheck", source, false) + end +end) \ No newline at end of file diff --git a/resources/Delete-Gun/dogconfig.cfg b/resources/Delete-Gun/dogconfig.cfg new file mode 100644 index 000000000..5d063e77f --- /dev/null +++ b/resources/Delete-Gun/dogconfig.cfg @@ -0,0 +1,4 @@ +setr dog.onAim "true" # change to false if you want to delete object on gunshot rather than on aim + +setr dog.useAce "true" # change to true in order to use Ace permissions +add_ace group.admin dog.delgun allow # if using ace perms, allows delgun command for admin group. change as you need \ No newline at end of file diff --git a/resources/Delete-Gun/fxmanifest.lua b/resources/Delete-Gun/fxmanifest.lua new file mode 100644 index 000000000..4e58bad8f --- /dev/null +++ b/resources/Delete-Gun/fxmanifest.lua @@ -0,0 +1,6 @@ +-- Created by @murfasa https://forum.cfx.re/u/murfasa +fx_version "bodacious" +game "gta5" + +client_script "dog-c.lua" +server_script "dog-s.lua" \ No newline at end of file diff --git a/resources/Delete-Vehicle/__resource.lua b/resources/Delete-Vehicle/__resource.lua new file mode 100644 index 000000000..6199fed32 --- /dev/null +++ b/resources/Delete-Vehicle/__resource.lua @@ -0,0 +1,12 @@ +-- Delete Vehicle script written by WolfKnight +-- With credit to Mr.Scammer, thers, Zanax and Konijima! +-- Version 1.0.5 + +-- Set the resource manifest +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +-- Add a client script +client_script "client.lua" + +-- Add a server script +server_script "server.lua" \ No newline at end of file diff --git a/resources/Delete-Vehicle/client.lua b/resources/Delete-Vehicle/client.lua new file mode 100644 index 000000000..996535945 --- /dev/null +++ b/resources/Delete-Vehicle/client.lua @@ -0,0 +1,70 @@ +-- Register a network event +RegisterNetEvent( 'wk:deleteVehicle' ) + +-- The distance to check in front of the player for a vehicle +-- Distance is in GTA units, which are quite big +local distanceToCheck = 5.0 + +-- Add an event handler for the deleteVehicle event. +-- Gets called when a user types in /dv in chat (see server.lua) +AddEventHandler( 'wk:deleteVehicle', function() + local ped = GetPlayerPed( -1 ) + + if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then + local pos = GetEntityCoords( ped ) + + if ( IsPedSittingInAnyVehicle( ped ) ) then + local vehicle = GetVehiclePedIsIn( ped, false ) + + if ( GetPedInVehicleSeat( vehicle, -1 ) == ped ) then + SetEntityAsMissionEntity( vehicle, true, true ) + deleteCar( vehicle ) + + if ( DoesEntityExist( vehicle ) ) then + ShowNotification( "~r~Unable to delete vehicle, try again." ) + else + ShowNotification( "Vehicle deleted." ) + end + else + ShowNotification( "You must be in the driver's seat!" ) + end + else + local playerPos = GetEntityCoords( ped, 1 ) + local inFrontOfPlayer = GetOffsetFromEntityInWorldCoords( ped, 0.0, distanceToCheck, 0.0 ) + local vehicle = GetVehicleInDirection( playerPos, inFrontOfPlayer ) + + if ( DoesEntityExist( vehicle ) ) then + SetEntityAsMissionEntity( vehicle, true, true ) + deleteCar( vehicle ) + + if ( DoesEntityExist( vehicle ) ) then + ShowNotification( "~r~Unable to delete vehicle, try again." ) + else + ShowNotification( "Vehicle deleted." ) + end + else + ShowNotification( "You must be in or near a vehicle to delete it." ) + end + end + end +end ) + +-- Delete car function borrowed frtom Mr.Scammer's model blacklist, thanks to him! +function deleteCar( entity ) + Citizen.InvokeNative( 0xEA386986E786A54F, Citizen.PointerValueIntInitialized( entity ) ) +end + +-- Gets a vehicle in a certain direction +-- Credit to Konijima +function GetVehicleInDirection( coordFrom, coordTo ) + local rayHandle = CastRayPointToPoint( coordFrom.x, coordFrom.y, coordFrom.z, coordTo.x, coordTo.y, coordTo.z, 10, GetPlayerPed( -1 ), 0 ) + local _, _, _, _, vehicle = GetRaycastResult( rayHandle ) + return vehicle +end + +-- Shows a notification on the player's screen +function ShowNotification( text ) + SetNotificationTextEntry( "STRING" ) + AddTextComponentString( text ) + DrawNotification( false, false ) +end \ No newline at end of file diff --git a/resources/Delete-Vehicle/server.lua b/resources/Delete-Vehicle/server.lua new file mode 100644 index 000000000..f42af0e92 --- /dev/null +++ b/resources/Delete-Vehicle/server.lua @@ -0,0 +1,15 @@ +-- Add an event handler for the 'chatMessage' event +AddEventHandler( 'chatMessage', function( source, n, msg ) + + msg = string.lower( msg ) + + -- Check to see if a client typed in /dv + if ( msg == "/dv" or msg == "/delveh" ) then + + -- Cancel the chat message event (stop the server from posting the message) + CancelEvent() + + -- Trigger the client event + TriggerClientEvent( 'wk:deleteVehicle', source ) + end +end ) \ No newline at end of file diff --git a/resources/Disable-Dispatch/__resource.lua b/resources/Disable-Dispatch/__resource.lua new file mode 100644 index 000000000..ca40bbc75 --- /dev/null +++ b/resources/Disable-Dispatch/__resource.lua @@ -0,0 +1,3 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +client_script 'client.lua' diff --git a/resources/Disable-Dispatch/client.lua b/resources/Disable-Dispatch/client.lua new file mode 100644 index 000000000..a48e963a9 --- /dev/null +++ b/resources/Disable-Dispatch/client.lua @@ -0,0 +1,11 @@ +Citizen.CreateThread(function() + while true do + Wait(0) + for i = 1, 12 do + EnableDispatchService(i, false) + end + SetPlayerWantedLevel(PlayerId(), 0, false) + SetPlayerWantedLevelNow(PlayerId(), false) + SetPlayerWantedLevelNoDrop(PlayerId(), 0, false) + end +end) diff --git a/resources/Doorlock/LICENSE b/resources/Doorlock/LICENSE new file mode 100644 index 000000000..94a9ed024 --- /dev/null +++ b/resources/Doorlock/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +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. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/resources/Doorlock/README.md b/resources/Doorlock/README.md new file mode 100644 index 000000000..82fa947f7 --- /dev/null +++ b/resources/Doorlock/README.md @@ -0,0 +1 @@ +# Badger-Doorlock diff --git a/resources/Doorlock/client/main.lua b/resources/Doorlock/client/main.lua new file mode 100644 index 000000000..daefe5729 --- /dev/null +++ b/resources/Doorlock/client/main.lua @@ -0,0 +1,124 @@ + +Citizen.CreateThread(function() + -- Update the door list + TriggerServerEvent('esx_doorlock:getDoorState') +end) + +RegisterNetEvent('esx_doorlock:returnDoorState') +AddEventHandler('esx_doorlock:returnDoorState', function(states) + for index, state in pairs(states) do + Config.DoorList[index].locked = state + end +end) + +Citizen.CreateThread(function() + Wait(1000); + TriggerServerEvent('Doorlock:CheckPerms'); +end) + +RegisterNetEvent('esx_doorlock:setDoorState') +AddEventHandler('esx_doorlock:setDoorState', function(index, state) Config.DoorList[index].locked = state end) + +Citizen.CreateThread(function() + while true do + local playerCoords = GetEntityCoords(PlayerPedId()) + + for k,v in ipairs(Config.DoorList) do + + if v.doors then + for k2,v2 in ipairs(v.doors) do + if v2.object and DoesEntityExist(v2.object) then + if k2 == 1 then + v.distanceToPlayer = #(playerCoords - GetEntityCoords(v2.object)) + end + + if v.locked and v2.objHeading and round(GetEntityHeading(v2.object)) ~= v2.objHeading then + SetEntityHeading(v2.object, v2.objHeading) + end + else + v.distanceToPlayer = nil + v2.object = GetClosestObjectOfType(v2.objCoords, 1.0, v2.objHash, false, false, false) + end + end + else + if v.object and DoesEntityExist(v.object) then + v.distanceToPlayer = #(playerCoords - GetEntityCoords(v.object)) + + if v.locked and v.objHeading and round(GetEntityHeading(v.object)) ~= v.objHeading then + SetEntityHeading(v.object, v.objHeading) + end + else + v.distanceToPlayer = nil + v.object = GetClosestObjectOfType(v.objCoords, 1.0, v.objHash, false, false, false) + end + end + end + + Citizen.Wait(500) + end +end) +function round(n) + return n % 1 >= 0.5 and math.ceil(n) or math.floor(n) +end + +Citizen.CreateThread(function() + while true do + Citizen.Wait(0) + local letSleep = true + + for k,v in ipairs(Config.DoorList) do + if v.distanceToPlayer and v.distanceToPlayer < 50 then + letSleep = false + + if v.doors then + for k2,v2 in ipairs(v.doors) do + FreezeEntityPosition(v2.object, v.locked) + end + else + FreezeEntityPosition(v.object, v.locked) + end + end + + if v.distanceToPlayer and v.distanceToPlayer < v.maxDistance then + local size, displayText = 1, "~g~Unlocked ~w~[E]" + + if v.size then size = v.size end + if v.locked then + displayText = "~r~Locked ~w~[E]" + end + --if v.isAuthorized then displayText = _U('press_button', displayText) end + local x, y, z = table.unpack(v.textCoords); + Draw3DText(x, y, z - 2, displayText, 4, 0.1, 0.1); + + if IsControlJustReleased(0, 38) then + TriggerServerEvent('Doorlock:CheckPermsDoor', k, not v.locked); + end + end + end + + if letSleep then + Citizen.Wait(500) + end + end +end) +function Draw3DText(x,y,z,textInput,fontId,scaleX,scaleY) + local px,py,pz=table.unpack(GetGameplayCamCoords()) + local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1) + local scale = (1/dist)*20 + local fov = (1/GetGameplayCamFov())*100 + local scale = scale*fov + SetTextScale(scaleX*scale, scaleY*scale) + SetTextFont(fontId) + SetTextProportional(1) + SetTextColour(250, 250, 250, 255) -- You can change the text color here + SetTextDropshadow(1, 1, 1, 1, 255) + SetTextEdge(2, 0, 0, 0, 150) + SetTextDropShadow() + SetTextOutline() + SetTextEntry("STRING") + SetTextCentre(1) + AddTextComponentString(textInput) + SetDrawOrigin(x,y,z+2, 0) + DrawText(0.0, 0.0) + ClearDrawOrigin() +end diff --git a/resources/Doorlock/config.lua b/resources/Doorlock/config.lua new file mode 100644 index 000000000..7b5e4245e --- /dev/null +++ b/resources/Doorlock/config.lua @@ -0,0 +1,238 @@ +Config = {} +Config.Locale = 'en' + +Config.Roles = { + ['SAHP'] = 807381507622305852, --LSPD + ['BCSO'] = 720071486416617575, + ['BCPD'] = 720078261794897941, + ['CO'] = 720311990941122580, +} + +Config.DoorList = { + + -- + -- Mission Row First Floor + -- + + -- Entrance Doors + { + textCoords = vector3(434.7, -982.0, 31.5), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = false, + maxDistance = 2.5, + doors = { + {objHash = GetHashKey('v_ilev_ph_door01'), objHeading = 270.0, objCoords = vector3(434.7, -980.6, 30.8)}, + {objHash = GetHashKey('v_ilev_ph_door002'), objHeading = 270.0, objCoords = vector3(434.7, -983.2, 30.8)} + } + }, + + -- To locker room & roof + { + objHash = GetHashKey('v_ilev_ph_gendoor004'), + objHeading = 90.0, + objCoords = vector3(449.6, -986.4, 30.6), + textCoords = vector3(450.1, -986.3, 31.7), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 1.25 + }, + + -- Rooftop + { + objHash = GetHashKey('v_ilev_gtdoor02'), + objHeading = 90.0, + objCoords = vector3(464.3, -984.6, 43.8), + textCoords = vector3(464.3, -984.0, 44.8), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 1.25 + }, + + -- Hallway to roof + { + objHash = GetHashKey('v_ilev_arm_secdoor'), + objHeading = 90.0, + objCoords = vector3(461.2, -985.3, 30.8), + textCoords = vector3(461.5, -986.0, 31.5), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 1.25 + }, + + -- Armory + { + objHash = GetHashKey('v_ilev_arm_secdoor'), + objHeading = 270.0, + objCoords = vector3(452.6, -982.7, 30.6), + textCoords = vector3(453.0, -982.6, 31.7), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 1.25 + }, + + -- Captain Office + { + objHash = GetHashKey('v_ilev_ph_gendoor002'), + objHeading = 180.0, + objCoords = vector3(447.2, -980.6, 30.6), + textCoords = vector3(447.2, -980.0, 31.7), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 1.25 + }, + + -- To downstairs (double doors) + { + textCoords = vector3(444.6, -989.4, 31.7), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 4, + doors = { + {objHash = GetHashKey('v_ilev_ph_gendoor005'), objHeading = 180.0, objCoords = vector3(443.9, -989.0, 30.6)}, + {objHash = GetHashKey('v_ilev_ph_gendoor005'), objHeading = 0.0, objCoords = vector3(445.3, -988.7, 30.6)} + } + }, + + -- + -- Mission Row Cells + -- + + -- Main Cells + { + objHash = GetHashKey('v_ilev_ph_cellgate'), + objHeading = 0.0, + objCoords = vector3(463.8, -992.6, 24.9), + textCoords = vector3(463.3, -992.6, 25.1), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 1.25 + }, + + -- Cell 1 + { + objHash = GetHashKey('v_ilev_ph_cellgate'), + objHeading = 270.0, + objCoords = vector3(462.3, -993.6, 24.9), + textCoords = vector3(461.8, -993.3, 25.0), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 1.25 + }, + + -- Cell 2 + { + objHash = GetHashKey('v_ilev_ph_cellgate'), + objHeading = 90.0, + objCoords = vector3(462.3, -998.1, 24.9), + textCoords = vector3(461.8, -998.8, 25.0), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 1.25 + }, + + -- Cell 3 + { + objHash = GetHashKey('v_ilev_ph_cellgate'), + objHeading = 90.0, + objCoords = vector3(462.7, -1001.9, 24.9), + textCoords = vector3(461.8, -1002.4, 25.0), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 1.25 + }, + + -- To Back + { + objHash = GetHashKey('v_ilev_gtdoor'), + objHeading = 0.0, + objCoords = vector3(463.4, -1003.5, 25.0), + textCoords = vector3(464.0, -1003.5, 25.5), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 1.25 + }, + + -- + -- Mission Row Back + -- + + -- Back (double doors) + { + textCoords = vector3(468.6, -1014.4, 27.1), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 4, + doors = { + {objHash = GetHashKey('v_ilev_rc_door2'), objHeading = 0.0, objCoords = vector3(467.3, -1014.4, 26.5)}, + {objHash = GetHashKey('v_ilev_rc_door2'), objHeading = 180.0, objCoords = vector3(469.9, -1014.4, 26.5)} + } + }, + + -- Back Gate + { + objHash = GetHashKey('hei_prop_station_gate'), + objHeading = 90.0, + objCoords = vector3(488.8, -1017.2, 27.1), + textCoords = vector3(488.8, -1020.2, 30.0), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 14, + size = 2 + }, + + -- + -- Sandy Shores + -- + + -- Entrance + { + objHash = GetHashKey('v_ilev_shrfdoor'), + objHeading = 30.0, + objCoords = vector3(1855.1, 3683.5, 34.2), + textCoords = vector3(1855.1, 3683.5, 35.0), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = false, + maxDistance = 1.25 + }, + + -- + -- Paleto Bay + -- + + -- Entrance (double doors) + { + textCoords = vector3(-443.5, 6016.3, 32.0), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = false, + maxDistance = 2.5, + doors = { + {objHash = GetHashKey('v_ilev_shrf2door'), objHeading = 315.0, objCoords = vector3(-443.1, 6015.6, 31.7)}, + {objHash = GetHashKey('v_ilev_shrf2door'), objHeading = 135.0, objCoords = vector3(-443.9, 6016.6, 31.7)} + } + }, + + -- + -- Bolingbroke Penitentiary + -- + + -- Entrance (Two big gates) + { + objHash = GetHashKey('prop_gate_prison_01'), + objCoords = vector3(1844.9, 2604.8, 44.6), + textCoords = vector3(1844.9, 2608.5, 48.0), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 12, + size = 2 + }, + + { + objHash = GetHashKey('prop_gate_prison_01'), + objCoords = vector3(1818.5, 2604.8, 44.6), + textCoords = vector3(1818.5, 2608.4, 48.0), + authorizedRoles = {'CO', 'SAHP', 'BCSO', 'BCPD'}, + locked = true, + maxDistance = 12, + size = 2 + } +} \ No newline at end of file diff --git a/resources/Doorlock/fxmanifest.lua b/resources/Doorlock/fxmanifest.lua new file mode 100644 index 000000000..87f68f8be --- /dev/null +++ b/resources/Doorlock/fxmanifest.lua @@ -0,0 +1,17 @@ +fx_version 'adamant' + +game 'gta5' + +description 'Badger Door Lock' + +version '1.4.0' + +server_scripts { + 'config.lua', + 'server/main.lua' +} + +client_scripts { + 'config.lua', + 'client/main.lua' +} diff --git a/resources/Doorlock/server/main.lua b/resources/Doorlock/server/main.lua new file mode 100644 index 000000000..d329c7984 --- /dev/null +++ b/resources/Doorlock/server/main.lua @@ -0,0 +1,93 @@ +local doorState = {} + + +RegisterServerEvent('esx_doorlock:updateState') +AddEventHandler('esx_doorlock:updateState', function(doorIndex, state) + local player = source; + if roleTracker[player] ~= nil then + local roleListt = roleTracker[player]; + for i = 1, #roleListt do + if type(doorIndex) == 'number' and type(state) == 'boolean' and Config.DoorList[doorIndex] + and isAuthorized(roleListt[i], Config.DoorList[doorIndex]) then + doorState[doorIndex] = state + TriggerClientEvent('esx_doorlock:setDoorState', -1, doorIndex, state) + return; + end + end + end +end) + +RegisterNetEvent('esx_doorlock:getDoorState') +AddEventHandler('esx_doorlock:getDoorState', function() + TriggerClientEvent('esx_doorlock:returnDoorState', -1, doorState); +end) + +RegisterNetEvent('Doorlock:CheckPermsDoor') +AddEventHandler('Doorlock:CheckPermsDoor', function(doorV, state) + local player = source; + if roleTracker[player] ~= nil then + local roleListt = roleTracker[player]; + for i = 1, #roleListt do + if type(doorV) == 'number' and Config.DoorList[doorV] + and isAuthorized(roleListt[i], Config.DoorList[doorV]) then + doorState[doorV] = state; + TriggerClientEvent('esx_doorlock:setDoorState', -1, doorV, state) + return; + end + end + end +end) + +AddEventHandler('playerDropped', function (reason) + -- Clear their lists + local src = source; + roleTracker[src] = nil; +end) + +RegisterNetEvent('Doorlock:CheckPerms') +AddEventHandler('Doorlock:CheckPerms', function() + local src = source; + for k, v in ipairs(GetPlayerIdentifiers(src)) do + if string.sub(v, 1, string.len("discord:")) == "discord:" then + identifierDiscord = v + end + end + -- TriggerClientEvent("FaxDisVeh:CheckPermission:Return", src, true, false) + if identifierDiscord then + local roles = exports.Badger_Discord_API:GetDiscordRoles(src) + if not (roles == false) then + for roleName, roleID in pairs(Config.Roles) do + for i = 1, #roles do + if tostring(roles[i]) == tostring(roleID) then + -- Return the index back to the Client script + if roleTracker[src] ~= nil then + -- They have a list, add to it + table.insert(roleTracker[src], roleName); + print("Added " .. GetPlayerName(src) .. " to doorlock-group '" .. roleName .. "'") + else + -- No list, make one + local roless = {}; + table.insert(roless, roleName); + roleTracker[src] = roless; + print("Added " .. GetPlayerName(src) .. " to doorlock-group '" .. roleName .. "'") + end + end + end + end + else + print(GetPlayerName(src) .. " did not receive door permissions because roles == false") + end + elseif identifierDiscord == nil then + print("identifierDiscord == nil") + end +end) +roleTracker = {} +function isAuthorized(role, doorObject) + for k, rolee in pairs(doorObject.authorizedRoles) do + if rolee == role then + return true + end + end + + return false +end diff --git a/resources/EGRP-HUD/client.lua b/resources/EGRP-HUD/client.lua new file mode 100644 index 000000000..0a07f9ac2 --- /dev/null +++ b/resources/EGRP-HUD/client.lua @@ -0,0 +1,413 @@ +----------------------------------- +-- Area of Patrol, Made by FAXES -- +----------------------------------- + +--- "Ramsus" --- + +local isUiOpen = false +local speedBuffer = {} +local velBuffer = {} +local SeatbeltON = false +local InVehicle = false + +function Notify(string) + SetNotificationTextEntry("STRING") + AddTextComponentString(string) + DrawNotification(false, true) +end + +AddEventHandler('seatbelt:sounds', function(soundFile, soundVolume) + SendNUIMessage({ + transactionType = 'playSound', + transactionFile = soundFile, + transactionVolume = soundVolume + }) +end) + +function IsCar(veh) + local vc = GetVehicleClass(veh) + return (vc >= 0 and vc <= 7) or (vc >= 9 and vc <= 12) or (vc >= 17 and vc <= 20) +end + +function Fwv(entity) + local hr = GetEntityHeading(entity) + 90.0 + if hr < 0.0 then hr = 360.0 + hr end + hr = hr * 0.0174533 + return { x = math.cos(hr) * 2.0, y = math.sin(hr) * 2.0 } +end + +Citizen.CreateThread(function() + while true do + Citizen.Wait(0) + + local ped = PlayerPedId() + local car = GetVehiclePedIsIn(ped) + + if car ~= 0 and (InVehicle or IsCar(car)) then + InVehicle = true + if isUiOpen == false and not IsPlayerDead(PlayerId()) then + if Config.Blinker then + SendNUIMessage({displayWindow = 'true'}) + end + isUiOpen = true + end + + if SeatbeltON then + DisableControlAction(0, 75, true) -- Disable exit vehicle when stop + DisableControlAction(27, 75, true) -- Disable exit vehicle when Driving + end + + speedBuffer[2] = speedBuffer[1] + speedBuffer[1] = GetEntitySpeed(car) + + if not SeatbeltON and speedBuffer[2] ~= nil and GetEntitySpeedVector(car, true).y > 1.0 and speedBuffer[1] > (Config.Speed / 3.6) and (speedBuffer[2] - speedBuffer[1]) > (speedBuffer[1] * 0.255) then + local co = GetEntityCoords(ped) + local fw = Fwv(ped) + SetEntityCoords(ped, co.x + fw.x, co.y + fw.y, co.z - 0.47, true, true, true) + SetEntityVelocity(ped, velBuffer[2].x, velBuffer[2].y, velBuffer[2].z) + Citizen.Wait(1) + SetPedToRagdoll(ped, 1000, 1000, 0, 0, 0, 0) + end + + velBuffer[2] = velBuffer[1] + velBuffer[1] = GetEntityVelocity(car) + + if IsControlJustReleased(0, Config.Control) and GetLastInputMethod(0) then + SeatbeltON = not SeatbeltON + if SeatbeltON then + Citizen.Wait(1) + + if Config.Sounds then + TriggerEvent("seatbelt:sounds", "buckle", Config.Volume) + end + if Config.Notification then + Notify(Config.Strings.seatbelt_on) + end + + if Config.Blinker then + SendNUIMessage({displayWindow = 'false'}) + end + isUiOpen = true + else + if Config.Notification then + Notify(Config.Strings.seatbelt_off) + end + + if Config.Sounds then + TriggerEvent("seatbelt:sounds", "unbuckle", Config.Volume) + end + + if Config.Blinker then + SendNUIMessage({displayWindow = 'true'}) + end + isUiOpen = true + end + end + + elseif InVehicle then + InVehicle = false + SeatbeltON = false + speedBuffer[1], speedBuffer[2] = 0.0, 0.0 + if isUiOpen == true and not IsPlayerDead(PlayerId()) then + if Config.Blinker then + SendNUIMessage({displayWindow = 'false'}) + end + isUiOpen = false + end + end + end +end) + +Citizen.CreateThread(function() + while true do + Citizen.Wait(10) + local Vehicle = GetVehiclePedIsIn(GetPlayerPed(-1), false) + local VehSpeed = GetEntitySpeed(Vehicle) * 3.6 + + if Config.AlarmOnlySpeed and VehSpeed > Config.AlarmSpeed then + ShowWindow = true + else + ShowWindow = false + SendNUIMessage({displayWindow = 'false'}) + end + + if IsPlayerDead(PlayerId()) or IsPauseMenuActive() then + if isUiOpen == true then + SendNUIMessage({displayWindow = 'false'}) + end + elseif not SeatbeltON and InVehicle and not IsPauseMenuActive() and not IsPlayerDead(PlayerId()) and Config.Blinker then + if Config.AlarmOnlySpeed and ShowWindow and VehSpeed > Config.AlarmSpeed then + SendNUIMessage({displayWindow = 'true'}) + end + end + end +end) + +Citizen.CreateThread(function() + while true do + --Citizen.Wait(3500) + Citizen.Wait(30000) + if not SeatbeltON and InVehicle and not IsPauseMenuActive() and Config.LoopSound and ShowWindow then + TriggerEvent("seatbelt:sounds", "seatbelt", Config.Volume) + end + end +end) + +--- NO NEED TO EDIT THIS FILE!!!! EDIT THE CONFIG.LUA --- +--- NO NEED TO EDIT THIS FILE!!!! EDIT THE CONFIG.LUA --- +--- NO NEED TO EDIT THIS FILE!!!! EDIT THE CONFIG.LUA --- +--- NO NEED TO EDIT THIS FILE!!!! EDIT THE CONFIG.LUA --- +--- NO NEED TO EDIT THIS FILE!!!! EDIT THE CONFIG.LUA --- + + +local cooldown = 0 +peacetimeActive = false +local year, month, day, hour, minute, second = GetLocalTime() +local AOPxNew = 0.660 +local AOPyNew = 1.430 +local AOPyNew2 = 1.430 + +AddEventHandler('onClientMapStart', function() + TriggerEvent('AOP:RunConfig') + Wait(2000) + TriggerServerEvent('AOP:Sync') + TriggerServerEvent('AOP:PTSync') +end) + +AddEventHandler('playerSpawned', function() + local ped = GetPlayerPed(-1) + if AOPSpawnsEnabled then + TriggerEvent('AOP:SetPlayerSpawnPoint', ped) + end +end) + +RegisterNetEvent('AOP:NoPerms') +AddEventHandler('AOP:NoPerms', function() + ShowInfo(noPermsMessage) +end) + +RegisterNetEvent('Fax:ClientPrint') +AddEventHandler('Fax:ClientPrint', function(text) + print(text) +end) + +RegisterNetEvent('AOP:DisNotification') +AddEventHandler('AOP:DisNotification', function(textPassed) + BeginTextCommandDisplayHelp("STRING") + AddTextComponentSubstringPlayerName(textPassed) + EndTextCommandDisplayHelp(0, 0, 1, - 1) +end) + +RegisterNetEvent('AOP:PTSound') +AddEventHandler('AOP:PTSound', function() + PlaySoundFrontend(-1,"CONFIRM_BEEP", "HUD_MINI_GAME_SOUNDSET",1) +end) + +RegisterNetEvent('AOP:RunConfig') +AddEventHandler('AOP:RunConfig', function() + if AOPLocation == 0 then -- Default + if serverPLD then + AOPxNew = 0.660 + AOPyNew = 1.370 + AOPyNew2 = AOPyNew + 0.025 + else + AOPxNew = 0.660 + AOPyNew = 1.430 + AOPyNew2 = AOPyNew + 0.025 + end + elseif AOPLocation == 1 then -- Bottom Center + AOPxNew = 1.000 + AOPyNew = 1.430 + AOPyNew2 = AOPyNew + 0.025 + elseif AOPLocation == 2 then -- Bottom Right [WIP] + AOPxNew = 0.660 + AOPyNew = 1.430 + AOPyNew2 = AOPyNew + 0.025 + elseif AOPLocation == 3 then -- Top Right [WIP] + AOPxNew = 0.660 + AOPyNew = 1.430 + AOPyNew2 = AOPyNew + 0.025 + elseif AOPLocation == 4 then -- Top Center + AOPxNew = 1.000 + AOPyNew = 0.50 + AOPyNew2 = AOPyNew + 0.025 + elseif AOPLocation == 5 then -- Top Left + AOPxNew = 0.00 + AOPyNew = 0.50 + AOPyNew2 = AOPyNew + 0.025 + elseif AOPLocation == 6 then -- Custom + AOPxNew = AOPx + AOPyNew = AOPy + AOPyNew2 = AOPyNew + 0.025 + end + + Citizen.Trace("[FAXES AOP SCRIPT] Config Ran") +end) + + +RegisterNetEvent('AOP:SendAOP') +AddEventHandler('AOP:SendAOP', function(newCurAOP) + FaxCurAOP = newCurAOP +end) + +RegisterNetEvent('AOP:SendPT') +AddEventHandler('AOP:SendPT', function(newCurPT) + peacetimeActive = newCurPT +end) + +RegisterNetEvent('AOP:SetPlayerSpawnPoint') +AddEventHandler('AOP:SetPlayerSpawnPoint', function(ped) + for i=1, #AOPSpawns do + local AOPTab = AOPSpawns[i] + if string.lower(AOPTab.AOPName) == string.lower(FaxCurAOP) then + SetEntityCoords(ped, AOPTab.AOPCoords.x, AOPTab.AOPCoords.y, AOPTab.AOPCoords.z) + end + end +end) + +Citizen.CreateThread(function() + while true do + if localTime == 1 then -- client time + year, month, day, hour, minute, second = GetLocalTime() + newMinute = minute + miid = GetPlayerServerId(NetworkGetEntityOwner(GetPlayerPed(-1))) + if minute < 10 then + newMinute = "0" .. minute + end + drawTimeText = featColor .. "Time: ~w~" .. hour .. ":" .. newMinute .. featColor .." | Date: ~w~" .. day .. featColor .."/~w~" .. month .. featColor .. "/~w~" .. year .. featColor .. " | Player ID: ~w~" .. miid + elseif localTime == 2 then + year = GetClockYear();month = GetClockMonth();day = GetClockDayOfMonth() + hour = GetClockHours();minute = GetClockMinutes();second = GetClockSeconds() + newMinute = minute + miid = GetPlayerServerId(NetworkGetEntityOwner(GetPlayerPed(-1))) + if minute < 10 then + newMinute = "0" .. minute + end + drawTimeText = featColor .. "Time: ~w~" .. hour .. ":" .. newMinute .. featColor .." | Date: ~w~" .. day .. featColor .."/~w~" .. month .. featColor .. "/~w~" .. year .. featColor .. " | Player ID: ~w~" .. miid + elseif localTime == 0 then + drawTimeText = "" + end + Citizen.Wait(1) + local player = GetPlayerPed(-1) + local veh = GetVehiclePedIsIn(player) + local mph = math.ceil(GetEntitySpeed(veh) * 2.23) + + if peacetimeActive then + if peacetimeNS then + if IsControlPressed(0, 106) then + ShowInfo("~r~Peacetime is enabled. ~n~~s~You can not shoot.") + end + SetPlayerCanDoDriveBy(player, false) + DisablePlayerFiring(player, true) + DisableControlAction(0, 140) -- Melee R + end + if GetPedInVehicleSeat(veh, -1) == player then + if mph > maxPTSpeed then + ShowInfo("~r~Please keep in mind peacetime is active! ~n~~w~Slow down or stop.") + end + end + + DrawTextAOP(AOPxNew, AOPyNew, 1.0,1.0,0.45, drawTimeText, 255, 255, 255, 255) + DrawTextAOP(AOPxNew, AOPyNew2, 1.0,1.0,0.45, "~w~Current " .. featColor .. "AOP: ~w~" .. FaxCurAOP .. featColor .. " | ~w~PeaceTime: ~g~Enabled" .. featColor , 255, 255, 255, 255) + elseif not peacetimeActive then + if peacetime then + DrawTextAOP(AOPxNew, AOPyNew, 1.0,1.0,0.45, drawTimeText, 255, 255, 255, 255) + DrawTextAOP(AOPxNew, AOPyNew2, 1.0,1.0,0.45, "~w~Current " .. featColor .. "AOP: ~w~" .. FaxCurAOP .. featColor .. " | ~w~PeaceTime: ~r~Disabled" .. featColor , 255, 255, 255, 255) + else + DrawTextAOP(AOPxNew, AOPyNew, 1.0,1.0,0.45, drawTimeText, 255, 255, 255, 255) + DrawTextAOP(AOPxNew, AOPyNew2, 1.0,1.0,0.45, "~w~Current " .. featColor .. "AOP: ~w~" .. FaxCurAOP .. featColor , 255, 255, 255, 255) + end + end + end +end) + +Citizen.CreateThread(function() + while true do + if IsPedInAnyVehicle(GetPlayerPed(-1)) then + local ped = GetPlayerPed(-1) + local veh = GetVehiclePedIsIn(ped) + local plate = GetVehicleNumberPlateText(veh) + local rpm = math.ceil(GetVehicleCurrentRpm(veh) * 11) - 1 + local speed = math.ceil(GetEntitySpeed(veh) * 2.236936) + local gear = GetVehicleCurrentGear(veh) + if speed == 0 then + gear = "N" + elseif gear == 0 then + gear = "~r~R" + end + DrawTextAOP(0.665, 1.340, 1.0,1.0,0.45,"~r~Plate: ~w~"..plate.."~r~ | MPH: ~w~"..speed.." ~r~| RPM: ~w~"..rpm.."X ~r~| Gear: ~w~"..gear, 255,255,255,255) + end + Citizen.Wait(1) + end +end) + +function DrawTextAOP(x,y ,width,height,scale, text, r,g,b,a) + if AOPLocation == 1 or AOPLocation == 4 then + SetTextCentre(true) + end + SetTextFont(4) + SetTextProportional(0) + SetTextScale(scale, scale) + SetTextColour(r, g, b, a) + SetTextDropShadow(0, 0, 0, 0,255) + SetTextEdge(2, 0, 0, 0, 255) + SetTextDropShadow() + SetTextOutline() + SetTextEntry("STRING") + AddTextComponentString(text) + DrawText(x - width/2, y - height/2 + 0.005) +end + +Citizen.CreateThread(function() + while true do Citizen.Wait(1) + local MyPed = GetPlayerPed(-1) + + if SeatbeltON == true then + seatbeltmsg = "Enabled" + + elseif SeatbeltON == false then + seatbeltmsg = "Disabled" + + end + + if(IsPedInAnyVehicle(MyPed, false))then + + local MyPedVeh = GetVehiclePedIsIn(MyPed) + local VehStopped = IsVehicleStopped(MyPedVeh) + local VehEngineHP = GetVehicleEngineHealth(MyPedVeh) + local VehEngineOn = GetIsVehicleEngineRunning(MyPedVeh) + + if VehEngineOn then + if VehEngineHP > 500 and VehEngineHP < 750 and SeatbeltON == true then + DrawTextAOP(0.665, 1.314, 1.0,1.0,0.45, "~r~Engine Status: ~y~Partially Damaged ~r~| Seatbelt: ~g~"..seatbeltmsg, 255, 255, 255, 255) + elseif VehEngineHP > 500 and VehEngineHP < 750 and SeatbeltON == false then + DrawTextAOP(0.665, 1.314, 1.0,1.0,0.45, "~r~Engine Status: ~y~Partially Damaged ~r~| Seatbelt: ~r~"..seatbeltmsg, 255, 255, 255, 255) + elseif (VehEngineHP > 200) and (VehEngineHP < 500) and SeatbeltON == true then + DrawTextAOP(0.665, 1.314, 1.0,1.0,0.45, "~r~Engine Status: ~y~Heavily Damaged ~r~| Seatbelt: ~g~"..seatbeltmsg, 255, 255, 255, 255) + elseif (VehEngineHP > 200) and (VehEngineHP < 500) and SeatbeltON == false then + DrawTextAOP(0.665, 1.314, 1.0,1.0,0.45, "~r~Engine Status: ~y~Heavily Damaged ~r~| Seatbelt: ~r~"..seatbeltmsg, 255, 255, 255, 255) + elseif VehEngineHP < 200 and SeatbeltON == true then + DrawTextAOP(0.665, 1.314, 1.0,1.0,0.45, "~r~Engine Status: ~r~Permanently Damaged ~r~| Seatbelt: ~g~"..seatbeltmsg, 255, 255, 255, 255) + elseif VehEngineHP < 200 and SeatbeltON == false then + DrawTextAOP(0.665, 1.314, 1.0,1.0,0.45, "~r~Engine Status: ~r~Permanently Damaged ~r~| Seatbelt: ~r~"..seatbeltmsg, 255, 255, 255, 255) + elseif VehEngineHP > 750 and SeatbeltON == true then + DrawTextAOP(0.665, 1.314, 1.0,1.0,0.45, "~r~Engine Status: ~g~Fully Functional ~r~| Seatbelt: ~g~"..seatbeltmsg, 255, 255, 255, 255) + elseif VehEngineHP > 750 and SeatbeltON == false then + DrawTextAOP(0.665, 1.314, 1.0,1.0,0.45, "~r~Engine Status: ~g~Fully Functional ~r~| Seatbelt: ~r~"..seatbeltmsg, 255, 255, 255, 255) + end + else + if SeatbeltON == true then + DrawTextAOP(0.665, 1.314, 1.0,1.0,0.45, "~r~Engine Status: ~r~Engine Off ~r~| Seatbelt: ~g~"..seatbeltmsg, 255, 255, 255, 255) + elseif SeatbeltON == false then + DrawTextAOP(0.665, 1.314, 1.0,1.0,0.45, "~r~Engine Status: ~r~Engine Off ~r~| Seatbelt: ~r~"..seatbeltmsg, 255, 255, 255, 255) + end + end + end + end + end) + +function ShowInfo(text) + BeginTextCommandThefeedPost("STRING") + AddTextComponentSubstringPlayerName(text) + EndTextCommandThefeedPostTicker(true, false) +end \ No newline at end of file diff --git a/resources/EGRP-HUD/config.lua b/resources/EGRP-HUD/config.lua new file mode 100644 index 000000000..a979264c5 --- /dev/null +++ b/resources/EGRP-HUD/config.lua @@ -0,0 +1,132 @@ +--[[ + ----------------------------------- + -- Area of Patrol, Made by FAXES -- + -- CONFIG FILE -- + ----------------------------------- + + !!!!!!!!!IMPORTANT!!!!!!!!! + To see what each variable (configurable option) below does. Please view the link right below... + + Default / Variable Docs: https://docs.faxes.zone/docs/aop-setup/#variable-documentation +]] + +Config = {} +-- Disable/enable sounds +Config.Sounds = true +Config.LoopSound = true +Config.Volume = 0.8 +-- Min: 0.0 Max: 1.0 + +-- Disable/enable Notifications +Config.Notification = false +Config.Strings = {seatbelt_on = 'Seatbelt: ~g~connected', seatbelt_off = 'Seatbelt: ~r~disconnected'} +-- Change to your own translations. + +-- Disable/enable blinker image +Config.Blinker = false + +-- Seatbelt button (docs.fivem.net/docs/game-references/controls) (Set to K) +Config.Control = 311 + +-- KM/H (must be have decimal value) (Set to 50MPH) +Config.Speed = 80.0 + +Config.AlarmOnlySpeed = true +Config.AlarmSpeed = 15 + +--[[ + 1. General Config & Commands +--]] + + FaxCurAOP = "Los Santos" + usingPerms = true + AOPChangeNotification = true + + AOPCommand = "aop" + PTCommand = "pt" + + featColor = "~r~" + noPermsMessage = "~r~Insufficient Permissions." + + +--[[ + 2. Peacetime Settings +--]] + + peacetime = true + peacetimeNS = true + maxPTSpeed = 100 + + PTOnMessage = featColor .. "Peace Time ~w~is now ~g~ in effect!" + PTOffMessage = featColor .. "Peace Time ~w~is now ~r~off." + + +--[[ + 3. DrawText Settings +--]] + + AOPLocation = 6 + serverPLD = false + localTime = 1 + + --AOPx = 0.660 + --AOPy = 1.430 + AOPx = 0.665 + AOPy = 1.425 + + +--[[ + 4. Auto AOP Settings +--]] + + autoChangeAOP = false + + ACAOPUnder5 = "Paleto Bay" + ACAOPUnder10 = "Sandy Shores" + ACAOPUnder20 = "Blaine County" + ACAOPUnder30 = "Los Santos" + ACAOPOver30 = "San Andreas" + + +--[[ + 5. AOP Spawn Locations +--]] + + AOPSpawnsEnabled = false + AOPSpawns = { + { + AOPName = 'sandy shores', + AOPCoords = {x = 311.22, y = 3457.60, z = 36.15} + }, + { + AOPName = 'paleto bay', + AOPCoords = {x = -447.24, y = 5970.46, z = 31.78} + }, + { + AOPName = 'downtown', + AOPCoords = {x = 219.98, y = -913.38, z = 30.69} + }, + { + AOPName = 'rockford hills', + AOPCoords = {x = -851.57, y = -128.04, z = 37.62} + }, + } + +-- NEW! +--[[ + 6. Discord Permissions + Make sure to have discord_perms installed and configured! +--]] + + usingDiscordPerms = true + discordRoleIds = { + "608583076037001225", + "789551229549281331", + "517060882686279701", + "789538166536798248", + "635155687688634399", + "556158473981788176", + "650653280275267591", + "671141073728307228", + "361899298209923075" + } \ No newline at end of file diff --git a/resources/EGRP-HUD/fxmanifest.lua b/resources/EGRP-HUD/fxmanifest.lua new file mode 100644 index 000000000..cc2a5ee82 --- /dev/null +++ b/resources/EGRP-HUD/fxmanifest.lua @@ -0,0 +1,21 @@ +----------------------------------- +-- Area of Patrol, Made by FAXES -- +----------------------------------- + +fx_version 'bodacious' +game 'gta5' + +author 'FAXES' + +client_script "config.lua" +client_script "client.lua" +server_script "config.lua" +server_script "server.lua" + +ui_page 'html/ui.html' + +files { + 'html/*', + 'html/img/seatbelt.png', + 'html/sounds/*.ogg' +} \ No newline at end of file diff --git a/resources/EGRP-HUD/html/app.js b/resources/EGRP-HUD/html/app.js new file mode 100644 index 000000000..1702342bc --- /dev/null +++ b/resources/EGRP-HUD/html/app.js @@ -0,0 +1,26 @@ + +window.addEventListener('message', function(e) { + $("#container").stop(false, true); + if (e.data.displayWindow == 'true') { + $("#container").css('display', 'flex'); + + $("#container").animate({ + bottom: "25%", + opacity: "1.0" + }, + 700, function() { + + }); + + } else { + $("#container").animate({ + bottom: "-50%", + opacity: "0.0" + }, + 700, function() { + $("#container").css('display', 'none'); + + }); + } +}); + diff --git a/resources/EGRP-HUD/html/img/seatbelt.png b/resources/EGRP-HUD/html/img/seatbelt.png new file mode 100644 index 000000000..7b0e81430 Binary files /dev/null and b/resources/EGRP-HUD/html/img/seatbelt.png differ diff --git a/resources/EGRP-HUD/html/sounds/buckle.ogg b/resources/EGRP-HUD/html/sounds/buckle.ogg new file mode 100644 index 000000000..70c20eac1 Binary files /dev/null and b/resources/EGRP-HUD/html/sounds/buckle.ogg differ diff --git a/resources/EGRP-HUD/html/sounds/seatbelt.ogg b/resources/EGRP-HUD/html/sounds/seatbelt.ogg new file mode 100644 index 000000000..7b7b4454f Binary files /dev/null and b/resources/EGRP-HUD/html/sounds/seatbelt.ogg differ diff --git a/resources/EGRP-HUD/html/sounds/unbuckle.ogg b/resources/EGRP-HUD/html/sounds/unbuckle.ogg new file mode 100644 index 000000000..66394bd6a Binary files /dev/null and b/resources/EGRP-HUD/html/sounds/unbuckle.ogg differ diff --git a/resources/EGRP-HUD/html/style.css b/resources/EGRP-HUD/html/style.css new file mode 100644 index 000000000..b41d6cd02 --- /dev/null +++ b/resources/EGRP-HUD/html/style.css @@ -0,0 +1,58 @@ +html { + overflow: hidden; +} + +body { + margin: 0px; + padding: 0px; +} + +#container { + position: absolute; + top: 92%; + left: 18%; /*25*/ + width: 80px; + height: 80px; + display: none; + flex-direction: column; +} + +header { + width: 80px; + height: 80px; + opacity: 0.8; + border-top-left-radius: 40px; + border-top-right-radius: 40px; + +} + +header img { + width: 80px; + height: 80px; + border-top-left-radius: 40px; + border-top-right-radius: 40px; +} + +.blink-image { + -moz-animation: blink normal 1s infinite ease-in-out; + -webkit-animation: blink normal 1s infinite ease-in-out; + animation: blink normal 1s infinite ease-in-out; +} + +@-moz-keyframes blink { + 0% {opacity:1;} + 50% {opacity:0;} + 100% {opacity:1;} +} + +@-webkit-keyframes blink { + 0% {opacity:1;} + 50% {opacity:0;} + 100% {opacity:1;} +} + +@keyframes blink { + 0% {opacity:1;} + 50% {opacity:0;} + 100% {opacity:1;} +} \ No newline at end of file diff --git a/resources/EGRP-HUD/html/ui.html b/resources/EGRP-HUD/html/ui.html new file mode 100644 index 000000000..b254047ce --- /dev/null +++ b/resources/EGRP-HUD/html/ui.html @@ -0,0 +1,42 @@ + + + + + Seatbelt + + + + + +

+
+ header +
+
+ + + + + + + + + + diff --git a/resources/EGRP-HUD/server.lua b/resources/EGRP-HUD/server.lua new file mode 100644 index 000000000..52fb02921 --- /dev/null +++ b/resources/EGRP-HUD/server.lua @@ -0,0 +1,175 @@ +----------------------------------- +-- Area of Patrol, Made by FAXES -- +----------------------------------- + +--- NO NEED TO EDIT THIS FILE!!!! EDIT THE CONFIG.LUA --- +--- NO NEED TO EDIT THIS FILE!!!! EDIT THE CONFIG.LUA --- +--- NO NEED TO EDIT THIS FILE!!!! EDIT THE CONFIG.LUA --- +--- NO NEED TO EDIT THIS FILE!!!! EDIT THE CONFIG.LUA --- +--- NO NEED TO EDIT THIS FILE!!!! EDIT THE CONFIG.LUA --- + +FaxCurPT = false +curVersion = "3.3" + +local function has_value(table, val) + if table then + for index, value in ipairs(table) do + if value == val then + return true + end + end + end + return false +end +function GetDiscordPermissionSet(src) + if usingDiscordPerms then + local passAuth = false + for k, v in ipairs(GetPlayerIdentifiers(src)) do + if string.sub(v, 1, string.len("discord:")) == "discord:" then + identifierDiscord = v + end + end + if identifierDiscord then + usersRoles = exports.discord_perms:GetRoles(src) + for index, valueReq in ipairs(discordRoleIds) do + if has_value(usersRoles, valueReq) then + passAuth = true + end + if next(discordRoleIds,index) == nil then + if passAuth == true then + return true + else + return false + end + end + end + else + print("~1~[Fax-AOP] No Discord ID found for '" .. GetPlayerName(src) .. "'~r~") + return false + end + end +end + +RegisterServerEvent('AOP:Startup') +AddEventHandler('AOP:Startup', function() + Wait(3000) + TriggerClientEvent("AOP:RunConfig", -1) + Wait(30000) + SetMapName("RP : " .. FaxCurAOP) +end) + +TriggerEvent("AOP:Startup") + +RegisterCommand(AOPCommand, function(source, args, rawCommand) + if source == 0 or IsPlayerAceAllowed(source, "faxes.aopcmds") or GetDiscordPermissionSet(source) or not usingPerms then + FaxCurAOP = table.concat(args, " ") + if(source == 0)then;print("AOP changed to: " .. FaxCurAOP);end + TriggerEvent("AOP:Sync") + SetMapName("RP : " .. FaxCurAOP) + if AOPChangeNotification then + TriggerClientEvent("AOP:DisNotification", -1, featColor .. "Area of Patrol ~w~has changed!~n~AOP: " .. FaxCurAOP) + end + else + TriggerClientEvent('AOP:NoPerms', source) + end +end) + + +RegisterServerEvent('AOP:Sync') +AddEventHandler('AOP:Sync', function() + TriggerClientEvent('AOP:SendAOP', -1, FaxCurAOP) +end) + +RegisterCommand(PTCommand, function(source, args, rawCommand) + if peacetime then + if source == 0 or IsPlayerAceAllowed(source, "faxes.aopcmds") or GetDiscordPermissionSet(source) or not usingPerms then + if(source == 0)then;print("Peacetime toggled");end + if not FaxCurPT then + TriggerClientEvent("AOP:DisNotification", -1, PTOnMessage) + FaxCurPT = true + TriggerEvent('AOP:PTSync') + elseif FaxCurPT then + TriggerClientEvent("AOP:DisNotification", -1, PTOffMessage) + FaxCurPT = false + TriggerEvent('AOP:PTSync') + end + else + TriggerClientEvent('AOP:NoPerms', source) + end + end +end) + +RegisterServerEvent('AOP:PTSync') +AddEventHandler('AOP:PTSync', function() + TriggerClientEvent('AOP:SendPT', -1, FaxCurPT) +end) + +Citizen.CreateThread(function() + while autoChangeAOP do + local players = GetPlayers() + for a = 1, #players do + if players[a] > "30" then -- over 30 + FaxCurAOP = ACAOPOver30 + SetMapName("RP : " .. FaxCurAOP) + TriggerEvent("AOP:Sync") + elseif players[a] < "5" then -- under 5 + FaxCurAOP = ACAOPUnder5 + SetMapName("RP : " .. FaxCurAOP) + TriggerEvent("AOP:Sync") + elseif players[a] < "10" then -- under 10 + FaxCurAOP = ACAOPUnder10 + SetMapName("RP : " .. FaxCurAOP) + TriggerEvent("AOP:Sync") + elseif players[a] < "20" then -- under 20 + FaxCurAOP = ACAOPUnder20 + SetMapName("RP : " .. FaxCurAOP) + TriggerEvent("AOP:Sync") + elseif players[a] < "30" then -- under 30 + FaxCurAOP = ACAOPUnder30 + SetMapName("RP : " .. FaxCurAOP) + TriggerEvent("AOP:Sync") + end + end + TriggerEvent("AOP:Sync") + Citizen.Wait(120 * 1000) + end +end) + +-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -- +----------------------------------------------------------- +-- THE BELOW IS FOR DEBUGGING AND CHECKERS. DO NOT TOUCH -- +-- Touching the below results in NO support! -- +----------------------------------------------------------- + +RegisterCommand("aopstatus", function(source, args, rawCommand) + TriggerClientEvent("Fax:ClientPrint", source, "Current AOP: " .. FaxCurAOP) + TriggerClientEvent("Fax:ClientPrint", source, "AOP Command: " .. AOPCommand) + TriggerClientEvent("Fax:ClientPrint", source, "PT Command: " .. PTCommand) + TriggerClientEvent("Fax:ClientPrint", source, "Feat Color: " .. featColor) + TriggerClientEvent("Fax:ClientPrint", source, "Auto Change AOP: " .. tostring(autoChangeAOP)) + TriggerClientEvent("Fax:ClientPrint", source, "Using Permissions: " .. tostring(usingPerms)) + TriggerClientEvent("Fax:ClientPrint", source, "Peacetime Func Enabled: " .. tostring(peacetime)) + TriggerClientEvent("Fax:ClientPrint", source, "User Time Enabled: " .. tostring(localTime)) + TriggerClientEvent("Fax:ClientPrint", source, "AOP Location Setting: " .. tostring(AOPLocation)) + TriggerClientEvent("Fax:ClientPrint", source, "AOP Spawn Points: " .. tostring(AOPSpawnsEnabled)) + if AOPLocation == 6 then + TriggerClientEvent("Fax:ClientPrint", source, "AOP Location X Setting: " .. tostring(AOPx)) + TriggerClientEvent("Fax:ClientPrint", source, "AOP Location Y Setting: " .. tostring(AOPy)) + end + TriggerClientEvent("Fax:ClientPrint", source, "------------------") + TriggerClientEvent("Fax:ClientPrint", source, "Current Version: " .. curVersion) + TriggerClientEvent("Fax:ClientPrint", source, "Script Credits: Script made by FAXES, Discord: FAXES#8655 - http://faxes.zone/discord") +end) + +PerformHttpRequest("https://raw.githubusercontent.com/FAXES/Area-of-Patrol/master/announce.json", function(err, shit, headers) + local data = json.decode(shit) + if data.status == 1 and curVersion < data.version then + print("\n^5[Fax-AOP ^7- ^3Notice^5]^5 New Script Version: ^7" .. data.version .. ". ^5New Announcement: ^7" .. data.message .. "\n") + elseif data.status == 1 then + print("\n^5[Fax-AOP ^7- ^1Announcement^5]^7 " .. data.message .. "\n") + elseif curVersion < data.version then + print("\n^5[Fax-AOP ^7- ^3Notice^5]^7 Fax-AOP has a new version! Your version: " .. curVersion .. ". New version: " .. data.version .. "\nChangelog: " .. data.changelog .. "\n") + else + print("\n^5[Fax-AOP]^7 Status: ^2Script (Re)Started^7\n") + end +end) \ No newline at end of file diff --git a/resources/EGRP-LoadingScreen/README.md b/resources/EGRP-LoadingScreen/README.md new file mode 100644 index 000000000..d9f24a57a --- /dev/null +++ b/resources/EGRP-LoadingScreen/README.md @@ -0,0 +1,5 @@ +Discord : https://discord.gg/3rm8Jdf2Vq + + + +Vidéo : https://youtu.be/C_nYwhCDZv4 diff --git a/resources/EGRP-LoadingScreen/__resource.lua b/resources/EGRP-LoadingScreen/__resource.lua new file mode 100644 index 000000000..0809a3053 --- /dev/null +++ b/resources/EGRP-LoadingScreen/__resource.lua @@ -0,0 +1,40 @@ +files { + 'index.html', + 'assets/css/style.css', + 'assets/css/custom.css', + 'assets/fonts/fontawesome-webfont3e6e.eot', + 'assets/fonts/fontawesome-webfont3e6e.html', + 'assets/fonts/fontawesome-webfont3e6e.svg', + 'assets/fonts/fontawesome-webfont3e6e-2.html', + 'assets/fonts/fontawesome-webfont3e6e-3.html', + 'assets/fonts/fontawesome-webfontd41d.eot', + 'assets/fonts/glyphicons-halflings-regular.html', + 'assets/fonts/glyphicons-halflings-regular-2.html', + 'assets/fonts/glyphicons-halflings-regular-3.html', + 'assets/fonts/glyphicons-halflings-regular-4.html', + 'assets/fonts/glyphicons-halflings-regular-5.html', + 'assets/fonts/glyphicons-halflings-regulard41d.html', + 'assets/fonts/themify.eot', + 'assets/fonts/themify.html', + 'assets/fonts/themify-2.html', + 'assets/fonts/themify9f24.svg', + 'assets/fonts/themifyd41d.eot', + 'assets/images/logo.png', + 'assets/images/background.jpg', + 'assets/images/staff/EliteGaming.png', + 'assets/images/staff/EpicFace.png', + 'assets/images/staff/Mustang.png', + 'assets/images/staff/Oreo.png', + 'assets/images/staff/Jacobee.png', + 'assets/images/staff/vJack.png', + 'assets/images/partner/choxie.png', + 'assets/images/partner/musk.png', + 'assets/js/script.js', + 'assets/music/loading.ogg' +} + +loadscreen 'index.html' +loadscreen_manual_shutdown 'yes' +client_script 'client.lua' + +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' diff --git a/resources/EGRP-LoadingScreen/assets/css/custom.css b/resources/EGRP-LoadingScreen/assets/css/custom.css new file mode 100644 index 000000000..1c347c7ab --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/css/custom.css @@ -0,0 +1,54 @@ + +.color-main { + color: red; +} + + + +.column { + float: left; + width: 33.3%; + margin-bottom: 16px; + padding: 0 8px; + } + + @media screen and (max-width: 650px) { + .column { + width: 100%; + display: block; + } + } + + .card { + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); + } + + .container { + padding: 0 16px; + } + + .container::after, .row::after { + content: ""; + clear: both; + display: table; + } + + .title { + color: grey; + } + + +.video-background { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + bottom: 0; + right: 0; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + z-index: -99; +} \ No newline at end of file diff --git a/resources/EGRP-LoadingScreen/assets/css/style.css b/resources/EGRP-LoadingScreen/assets/css/style.css new file mode 100644 index 000000000..d92612dfc --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/css/style.css @@ -0,0 +1,24 @@ +/*! + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.html);src:url(../fonts/glyphicons-halflings-regulard41d.html?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular-2.html) format('woff2'),url(../fonts/glyphicons-halflings-regular-3.html) format('woff'),url(../fonts/glyphicons-halflings-regular-4.html) format('truetype'),url(../fonts/glyphicons-halflings-regular-5.html#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ +/*! + * Themify Icons + * https://themify.me/themify-icons + */ +@font-face{font-family:themify;src:url(../fonts/themify.eot);src:url(../fonts/themifyd41d.eot?#iefix-fvbane) format('embedded-opentype'),url(../fonts/themify.html) format('woff'),url(../fonts/themify-2.html) format('truetype'),url(../fonts/themify9f24.svg?-fvbane#themify) format('svg');font-weight:400;font-style:normal}[class*=" ti-"],[class^=ti-]{font-family:themify;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ti-wand:before{content:"\e600"}.ti-volume:before{content:"\e601"}.ti-user:before{content:"\e602"}.ti-unlock:before{content:"\e603"}.ti-unlink:before{content:"\e604"}.ti-trash:before{content:"\e605"}.ti-thought:before{content:"\e606"}.ti-target:before{content:"\e607"}.ti-tag:before{content:"\e608"}.ti-tablet:before{content:"\e609"}.ti-star:before{content:"\e60a"}.ti-spray:before{content:"\e60b"}.ti-signal:before{content:"\e60c"}.ti-shopping-cart:before{content:"\e60d"}.ti-shopping-cart-full:before{content:"\e60e"}.ti-settings:before{content:"\e60f"}.ti-search:before{content:"\e610"}.ti-zoom-in:before{content:"\e611"}.ti-zoom-out:before{content:"\e612"}.ti-cut:before{content:"\e613"}.ti-ruler:before{content:"\e614"}.ti-ruler-pencil:before{content:"\e615"}.ti-ruler-alt:before{content:"\e616"}.ti-bookmark:before{content:"\e617"}.ti-bookmark-alt:before{content:"\e618"}.ti-reload:before{content:"\e619"}.ti-plus:before{content:"\e61a"}.ti-pin:before{content:"\e61b"}.ti-pencil:before{content:"\e61c"}.ti-pencil-alt:before{content:"\e61d"}.ti-paint-roller:before{content:"\e61e"}.ti-paint-bucket:before{content:"\e61f"}.ti-na:before{content:"\e620"}.ti-mobile:before{content:"\e621"}.ti-minus:before{content:"\e622"}.ti-medall:before{content:"\e623"}.ti-medall-alt:before{content:"\e624"}.ti-marker:before{content:"\e625"}.ti-marker-alt:before{content:"\e626"}.ti-arrow-up:before{content:"\e627"}.ti-arrow-right:before{content:"\e628"}.ti-arrow-left:before{content:"\e629"}.ti-arrow-down:before{content:"\e62a"}.ti-lock:before{content:"\e62b"}.ti-location-arrow:before{content:"\e62c"}.ti-link:before{content:"\e62d"}.ti-layout:before{content:"\e62e"}.ti-layers:before{content:"\e62f"}.ti-layers-alt:before{content:"\e630"}.ti-key:before{content:"\e631"}.ti-import:before{content:"\e632"}.ti-image:before{content:"\e633"}.ti-heart:before{content:"\e634"}.ti-heart-broken:before{content:"\e635"}.ti-hand-stop:before{content:"\e636"}.ti-hand-open:before{content:"\e637"}.ti-hand-drag:before{content:"\e638"}.ti-folder:before{content:"\e639"}.ti-flag:before{content:"\e63a"}.ti-flag-alt:before{content:"\e63b"}.ti-flag-alt-2:before{content:"\e63c"}.ti-eye:before{content:"\e63d"}.ti-export:before{content:"\e63e"}.ti-exchange-vertical:before{content:"\e63f"}.ti-desktop:before{content:"\e640"}.ti-cup:before{content:"\e641"}.ti-crown:before{content:"\e642"}.ti-comments:before{content:"\e643"}.ti-comment:before{content:"\e644"}.ti-comment-alt:before{content:"\e645"}.ti-close:before{content:"\e646"}.ti-clip:before{content:"\e647"}.ti-angle-up:before{content:"\e648"}.ti-angle-right:before{content:"\e649"}.ti-angle-left:before{content:"\e64a"}.ti-angle-down:before{content:"\e64b"}.ti-check:before{content:"\e64c"}.ti-check-box:before{content:"\e64d"}.ti-camera:before{content:"\e64e"}.ti-announcement:before{content:"\e64f"}.ti-brush:before{content:"\e650"}.ti-briefcase:before{content:"\e651"}.ti-bolt:before{content:"\e652"}.ti-bolt-alt:before{content:"\e653"}.ti-blackboard:before{content:"\e654"}.ti-bag:before{content:"\e655"}.ti-move:before{content:"\e656"}.ti-arrows-vertical:before{content:"\e657"}.ti-arrows-horizontal:before{content:"\e658"}.ti-fullscreen:before{content:"\e659"}.ti-arrow-top-right:before{content:"\e65a"}.ti-arrow-top-left:before{content:"\e65b"}.ti-arrow-circle-up:before{content:"\e65c"}.ti-arrow-circle-right:before{content:"\e65d"}.ti-arrow-circle-left:before{content:"\e65e"}.ti-arrow-circle-down:before{content:"\e65f"}.ti-angle-double-up:before{content:"\e660"}.ti-angle-double-right:before{content:"\e661"}.ti-angle-double-left:before{content:"\e662"}.ti-angle-double-down:before{content:"\e663"}.ti-zip:before{content:"\e664"}.ti-world:before{content:"\e665"}.ti-wheelchair:before{content:"\e666"}.ti-view-list:before{content:"\e667"}.ti-view-list-alt:before{content:"\e668"}.ti-view-grid:before{content:"\e669"}.ti-uppercase:before{content:"\e66a"}.ti-upload:before{content:"\e66b"}.ti-underline:before{content:"\e66c"}.ti-truck:before{content:"\e66d"}.ti-timer:before{content:"\e66e"}.ti-ticket:before{content:"\e66f"}.ti-thumb-up:before{content:"\e670"}.ti-thumb-down:before{content:"\e671"}.ti-text:before{content:"\e672"}.ti-stats-up:before{content:"\e673"}.ti-stats-down:before{content:"\e674"}.ti-split-v:before{content:"\e675"}.ti-split-h:before{content:"\e676"}.ti-smallcap:before{content:"\e677"}.ti-shine:before{content:"\e678"}.ti-shift-right:before{content:"\e679"}.ti-shift-left:before{content:"\e67a"}.ti-shield:before{content:"\e67b"}.ti-notepad:before{content:"\e67c"}.ti-server:before{content:"\e67d"}.ti-quote-right:before{content:"\e67e"}.ti-quote-left:before{content:"\e67f"}.ti-pulse:before{content:"\e680"}.ti-printer:before{content:"\e681"}.ti-power-off:before{content:"\e682"}.ti-plug:before{content:"\e683"}.ti-pie-chart:before{content:"\e684"}.ti-paragraph:before{content:"\e685"}.ti-panel:before{content:"\e686"}.ti-package:before{content:"\e687"}.ti-music:before{content:"\e688"}.ti-music-alt:before{content:"\e689"}.ti-mouse:before{content:"\e68a"}.ti-mouse-alt:before{content:"\e68b"}.ti-money:before{content:"\e68c"}.ti-microphone:before{content:"\e68d"}.ti-menu:before{content:"\e68e"}.ti-menu-alt:before{content:"\e68f"}.ti-map:before{content:"\e690"}.ti-map-alt:before{content:"\e691"}.ti-loop:before{content:"\e692"}.ti-location-pin:before{content:"\e693"}.ti-list:before{content:"\e694"}.ti-light-bulb:before{content:"\e695"}.ti-Italic:before{content:"\e696"}.ti-info:before{content:"\e697"}.ti-infinite:before{content:"\e698"}.ti-id-badge:before{content:"\e699"}.ti-hummer:before{content:"\e69a"}.ti-home:before{content:"\e69b"}.ti-help:before{content:"\e69c"}.ti-headphone:before{content:"\e69d"}.ti-harddrives:before{content:"\e69e"}.ti-harddrive:before{content:"\e69f"}.ti-gift:before{content:"\e6a0"}.ti-game:before{content:"\e6a1"}.ti-filter:before{content:"\e6a2"}.ti-files:before{content:"\e6a3"}.ti-file:before{content:"\e6a4"}.ti-eraser:before{content:"\e6a5"}.ti-envelope:before{content:"\e6a6"}.ti-download:before{content:"\e6a7"}.ti-direction:before{content:"\e6a8"}.ti-direction-alt:before{content:"\e6a9"}.ti-dashboard:before{content:"\e6aa"}.ti-control-stop:before{content:"\e6ab"}.ti-control-shuffle:before{content:"\e6ac"}.ti-control-play:before{content:"\e6ad"}.ti-control-pause:before{content:"\e6ae"}.ti-control-forward:before{content:"\e6af"}.ti-control-backward:before{content:"\e6b0"}.ti-cloud:before{content:"\e6b1"}.ti-cloud-up:before{content:"\e6b2"}.ti-cloud-down:before{content:"\e6b3"}.ti-clipboard:before{content:"\e6b4"}.ti-car:before{content:"\e6b5"}.ti-calendar:before{content:"\e6b6"}.ti-book:before{content:"\e6b7"}.ti-bell:before{content:"\e6b8"}.ti-basketball:before{content:"\e6b9"}.ti-bar-chart:before{content:"\e6ba"}.ti-bar-chart-alt:before{content:"\e6bb"}.ti-back-right:before{content:"\e6bc"}.ti-back-left:before{content:"\e6bd"}.ti-arrows-corner:before{content:"\e6be"}.ti-archive:before{content:"\e6bf"}.ti-anchor:before{content:"\e6c0"}.ti-align-right:before{content:"\e6c1"}.ti-align-left:before{content:"\e6c2"}.ti-align-justify:before{content:"\e6c3"}.ti-align-center:before{content:"\e6c4"}.ti-alert:before{content:"\e6c5"}.ti-alarm-clock:before{content:"\e6c6"}.ti-agenda:before{content:"\e6c7"}.ti-write:before{content:"\e6c8"}.ti-window:before{content:"\e6c9"}.ti-widgetized:before{content:"\e6ca"}.ti-widget:before{content:"\e6cb"}.ti-widget-alt:before{content:"\e6cc"}.ti-wallet:before{content:"\e6cd"}.ti-video-clapper:before{content:"\e6ce"}.ti-video-camera:before{content:"\e6cf"}.ti-vector:before{content:"\e6d0"}.ti-themify-logo:before{content:"\e6d1"}.ti-themify-favicon:before{content:"\e6d2"}.ti-themify-favicon-alt:before{content:"\e6d3"}.ti-support:before{content:"\e6d4"}.ti-stamp:before{content:"\e6d5"}.ti-split-v-alt:before{content:"\e6d6"}.ti-slice:before{content:"\e6d7"}.ti-shortcode:before{content:"\e6d8"}.ti-shift-right-alt:before{content:"\e6d9"}.ti-shift-left-alt:before{content:"\e6da"}.ti-ruler-alt-2:before{content:"\e6db"}.ti-receipt:before{content:"\e6dc"}.ti-pin2:before{content:"\e6dd"}.ti-pin-alt:before{content:"\e6de"}.ti-pencil-alt2:before{content:"\e6df"}.ti-palette:before{content:"\e6e0"}.ti-more:before{content:"\e6e1"}.ti-more-alt:before{content:"\e6e2"}.ti-microphone-alt:before{content:"\e6e3"}.ti-magnet:before{content:"\e6e4"}.ti-line-double:before{content:"\e6e5"}.ti-line-dotted:before{content:"\e6e6"}.ti-line-dashed:before{content:"\e6e7"}.ti-layout-width-full:before{content:"\e6e8"}.ti-layout-width-default:before{content:"\e6e9"}.ti-layout-width-default-alt:before{content:"\e6ea"}.ti-layout-tab:before{content:"\e6eb"}.ti-layout-tab-window:before{content:"\e6ec"}.ti-layout-tab-v:before{content:"\e6ed"}.ti-layout-tab-min:before{content:"\e6ee"}.ti-layout-slider:before{content:"\e6ef"}.ti-layout-slider-alt:before{content:"\e6f0"}.ti-layout-sidebar-right:before{content:"\e6f1"}.ti-layout-sidebar-none:before{content:"\e6f2"}.ti-layout-sidebar-left:before{content:"\e6f3"}.ti-layout-placeholder:before{content:"\e6f4"}.ti-layout-menu:before{content:"\e6f5"}.ti-layout-menu-v:before{content:"\e6f6"}.ti-layout-menu-separated:before{content:"\e6f7"}.ti-layout-menu-full:before{content:"\e6f8"}.ti-layout-media-right-alt:before{content:"\e6f9"}.ti-layout-media-right:before{content:"\e6fa"}.ti-layout-media-overlay:before{content:"\e6fb"}.ti-layout-media-overlay-alt:before{content:"\e6fc"}.ti-layout-media-overlay-alt-2:before{content:"\e6fd"}.ti-layout-media-left-alt:before{content:"\e6fe"}.ti-layout-media-left:before{content:"\e6ff"}.ti-layout-media-center-alt:before{content:"\e700"}.ti-layout-media-center:before{content:"\e701"}.ti-layout-list-thumb:before{content:"\e702"}.ti-layout-list-thumb-alt:before{content:"\e703"}.ti-layout-list-post:before{content:"\e704"}.ti-layout-list-large-image:before{content:"\e705"}.ti-layout-line-solid:before{content:"\e706"}.ti-layout-grid4:before{content:"\e707"}.ti-layout-grid3:before{content:"\e708"}.ti-layout-grid2:before{content:"\e709"}.ti-layout-grid2-thumb:before{content:"\e70a"}.ti-layout-cta-right:before{content:"\e70b"}.ti-layout-cta-left:before{content:"\e70c"}.ti-layout-cta-center:before{content:"\e70d"}.ti-layout-cta-btn-right:before{content:"\e70e"}.ti-layout-cta-btn-left:before{content:"\e70f"}.ti-layout-column4:before{content:"\e710"}.ti-layout-column3:before{content:"\e711"}.ti-layout-column2:before{content:"\e712"}.ti-layout-accordion-separated:before{content:"\e713"}.ti-layout-accordion-merged:before{content:"\e714"}.ti-layout-accordion-list:before{content:"\e715"}.ti-ink-pen:before{content:"\e716"}.ti-info-alt:before{content:"\e717"}.ti-help-alt:before{content:"\e718"}.ti-headphone-alt:before{content:"\e719"}.ti-hand-point-up:before{content:"\e71a"}.ti-hand-point-right:before{content:"\e71b"}.ti-hand-point-left:before{content:"\e71c"}.ti-hand-point-down:before{content:"\e71d"}.ti-gallery:before{content:"\e71e"}.ti-face-smile:before{content:"\e71f"}.ti-face-sad:before{content:"\e720"}.ti-credit-card:before{content:"\e721"}.ti-control-skip-forward:before{content:"\e722"}.ti-control-skip-backward:before{content:"\e723"}.ti-control-record:before{content:"\e724"}.ti-control-eject:before{content:"\e725"}.ti-comments-smiley:before{content:"\e726"}.ti-brush-alt:before{content:"\e727"}.ti-youtube:before{content:"\e728"}.ti-vimeo:before{content:"\e729"}.ti-twitter:before{content:"\e72a"}.ti-time:before{content:"\e72b"}.ti-tumblr:before{content:"\e72c"}.ti-skype:before{content:"\e72d"}.ti-share:before{content:"\e72e"}.ti-share-alt:before{content:"\e72f"}.ti-rocket:before{content:"\e730"}.ti-pinterest:before{content:"\e731"}.ti-new-window:before{content:"\e732"}.ti-microsoft:before{content:"\e733"}.ti-list-ol:before{content:"\e734"}.ti-linkedin:before{content:"\e735"}.ti-layout-sidebar-2:before{content:"\e736"}.ti-layout-grid4-alt:before{content:"\e737"}.ti-layout-grid3-alt:before{content:"\e738"}.ti-layout-grid2-alt:before{content:"\e739"}.ti-layout-column4-alt:before{content:"\e73a"}.ti-layout-column3-alt:before{content:"\e73b"}.ti-layout-column2-alt:before{content:"\e73c"}.ti-instagram:before{content:"\e73d"}.ti-google:before{content:"\e73e"}.ti-github:before{content:"\e73f"}.ti-flickr:before{content:"\e740"}.ti-facebook:before{content:"\e741"}.ti-dropbox:before{content:"\e742"}.ti-dribbble:before{content:"\e743"}.ti-apple:before{content:"\e744"}.ti-android:before{content:"\e745"}.ti-save:before{content:"\e746"}.ti-save-alt:before{content:"\e747"}.ti-yahoo:before{content:"\e748"}.ti-wordpress:before{content:"\e749"}.ti-vimeo-alt:before{content:"\e74a"}.ti-twitter-alt:before{content:"\e74b"}.ti-tumblr-alt:before{content:"\e74c"}.ti-trello:before{content:"\e74d"}.ti-stack-overflow:before{content:"\e74e"}.ti-soundcloud:before{content:"\e74f"}.ti-sharethis:before{content:"\e750"}.ti-sharethis-alt:before{content:"\e751"}.ti-reddit:before{content:"\e752"}.ti-pinterest-alt:before{content:"\e753"}.ti-microsoft-alt:before{content:"\e754"}.ti-linux:before{content:"\e755"}.ti-jsfiddle:before{content:"\e756"}.ti-joomla:before{content:"\e757"}.ti-html5:before{content:"\e758"}.ti-flickr-alt:before{content:"\e759"}.ti-email:before{content:"\e75a"}.ti-drupal:before{content:"\e75b"}.ti-dropbox-alt:before{content:"\e75c"}.ti-css3:before{content:"\e75d"}.ti-rss:before{content:"\e75e"}.ti-rss-alt:before{content:"\e75f"} +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont3e6e.eot?v=4.7.0');src:url('../fonts/fontawesome-webfontd41d.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont3e6e.html?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont3e6e-2.html?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont3e6e-3.html?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont3e6e.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} + /*! +Vegas.css - http://vegas.jaysalvat.com/ +Licensed under the MIT license - http://opensource.org/licenses/MIT + +Copyright (c) 2015 Jay Salvat */ + .vegas-overlay,.vegas-slide,.vegas-slide-inner,.vegas-timer,.vegas-wrapper{position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;border:none;padding:0;margin:0}.vegas-overlay{opacity:.5;background:url(overlays/02.html) center center}.vegas-timer{top:auto;bottom:0;height:2px}.vegas-timer-progress{width:0;height:100%;background:#fff;-webkit-transition:width ease-out;transition:width ease-out}.vegas-timer-running .vegas-timer-progress{width:100%}.vegas-slide,.vegas-slide-inner{margin:0;padding:0;background:center center no-repeat;-webkit-transform:translateZ(0);transform:translateZ(0)}body .vegas-container{overflow:hidden!important;position:relative}.vegas-video{min-width:100%;min-height:100%;width:auto;height:auto}body.vegas-container{overflow:auto;position:static;z-index:-2}body.vegas-container>.vegas-overlay,body.vegas-container>.vegas-slide,body.vegas-container>.vegas-timer{position:fixed;z-index:-1}:root body.vegas-container>.vegas-overlay,:root body.vegas-container>.vegas-slide,_::full-page-media,_:future{bottom:-76px}.vegas-transition-blur,.vegas-transition-blur2{opacity:0;-webkit-filter:blur(32px);filter:blur(32px)}.vegas-transition-blur-in,.vegas-transition-blur2-in{opacity:1;-webkit-filter:blur(0);filter:blur(0)}.vegas-transition-blur2-out{opacity:0}.vegas-transition-burn,.vegas-transition-burn2{opacity:0;-webkit-filter:contrast(1000%) saturate(1000%);filter:contrast(1000%) saturate(1000%)}.vegas-transition-burn-in,.vegas-transition-burn2-in{opacity:1;-webkit-filter:contrast(100%) saturate(100%);filter:contrast(100%) saturate(100%)}.vegas-transition-burn2-out{opacity:0;-webkit-filter:contrast(1000%) saturate(1000%);filter:contrast(1000%) saturate(1000%)}.vegas-transition-fade,.vegas-transition-fade2{opacity:0}.vegas-transition-fade-in,.vegas-transition-fade2-in{opacity:1}.vegas-transition-fade2-out{opacity:0}.vegas-transition-flash,.vegas-transition-flash2{opacity:0;-webkit-filter:brightness(25);filter:brightness(25)}.vegas-transition-flash-in,.vegas-transition-flash2-in{opacity:1;-webkit-filter:brightness(1);filter:brightness(1)}.vegas-transition-flash2-out{opacity:0;-webkit-filter:brightness(25);filter:brightness(25)}.vegas-transition-negative,.vegas-transition-negative2{opacity:0;-webkit-filter:invert(100%);filter:invert(100%)}.vegas-transition-negative-in,.vegas-transition-negative2-in{opacity:1;-webkit-filter:invert(0);filter:invert(0)}.vegas-transition-negative2-out{opacity:0;-webkit-filter:invert(100%);filter:invert(100%)}.vegas-transition-slideDown,.vegas-transition-slideDown2{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.vegas-transition-slideDown-in,.vegas-transition-slideDown2-in{-webkit-transform:translateY(0);transform:translateY(0)}.vegas-transition-slideDown2-out{-webkit-transform:translateY(100%);transform:translateY(100%)}.vegas-transition-slideLeft,.vegas-transition-slideLeft2{-webkit-transform:translateX(100%);transform:translateX(100%)}.vegas-transition-slideLeft-in,.vegas-transition-slideLeft2-in{-webkit-transform:translateX(0);transform:translateX(0)}.vegas-transition-slideLeft2-out,.vegas-transition-slideRight,.vegas-transition-slideRight2{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.vegas-transition-slideRight-in,.vegas-transition-slideRight2-in{-webkit-transform:translateX(0);transform:translateX(0)}.vegas-transition-slideRight2-out{-webkit-transform:translateX(100%);transform:translateX(100%)}.vegas-transition-slideUp,.vegas-transition-slideUp2{-webkit-transform:translateY(100%);transform:translateY(100%)}.vegas-transition-slideUp-in,.vegas-transition-slideUp2-in{-webkit-transform:translateY(0);transform:translateY(0)}.vegas-transition-slideUp2-out{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.vegas-transition-swirlLeft,.vegas-transition-swirlLeft2{-webkit-transform:scale(2) rotate(35deg);transform:scale(2) rotate(35deg);opacity:0}.vegas-transition-swirlLeft-in,.vegas-transition-swirlLeft2-in{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0);opacity:1}.vegas-transition-swirlLeft2-out,.vegas-transition-swirlRight,.vegas-transition-swirlRight2{-webkit-transform:scale(2) rotate(-35deg);transform:scale(2) rotate(-35deg);opacity:0}.vegas-transition-swirlRight-in,.vegas-transition-swirlRight2-in{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0);opacity:1}.vegas-transition-swirlRight2-out{-webkit-transform:scale(2) rotate(35deg);transform:scale(2) rotate(35deg);opacity:0}.vegas-transition-zoomIn,.vegas-transition-zoomIn2{-webkit-transform:scale(0);transform:scale(0);opacity:0}.vegas-transition-zoomIn-in,.vegas-transition-zoomIn2-in{-webkit-transform:scale(1);transform:scale(1);opacity:1}.vegas-transition-zoomIn2-out,.vegas-transition-zoomOut,.vegas-transition-zoomOut2{-webkit-transform:scale(2);transform:scale(2);opacity:0}.vegas-transition-zoomOut-in,.vegas-transition-zoomOut2-in{-webkit-transform:scale(1);transform:scale(1);opacity:1}.vegas-transition-zoomOut2-out{-webkit-transform:scale(0);transform:scale(0);opacity:0}.vegas-animation-kenburns{-webkit-animation:kenburns ease-out;animation:kenburns ease-out}@-webkit-keyframes kenburns{0%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes kenburns{0%{-webkit-transform:scale(1.5);transform:scale(1.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.vegas-animation-kenburnsDownLeft{-webkit-animation:kenburnsDownLeft ease-out;animation:kenburnsDownLeft ease-out}@-webkit-keyframes kenburnsDownLeft{0%{-webkit-transform:scale(1.5) translate(10%,-10%);transform:scale(1.5) translate(10%,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsDownLeft{0%{-webkit-transform:scale(1.5) translate(10%,-10%);transform:scale(1.5) translate(10%,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsDownRight{-webkit-animation:kenburnsDownRight ease-out;animation:kenburnsDownRight ease-out}@-webkit-keyframes kenburnsDownRight{0%{-webkit-transform:scale(1.5) translate(-10%,-10%);transform:scale(1.5) translate(-10%,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsDownRight{0%{-webkit-transform:scale(1.5) translate(-10%,-10%);transform:scale(1.5) translate(-10%,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsDown{-webkit-animation:kenburnsDown ease-out;animation:kenburnsDown ease-out}@-webkit-keyframes kenburnsDown{0%{-webkit-transform:scale(1.5) translate(0,-10%);transform:scale(1.5) translate(0,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsDown{0%{-webkit-transform:scale(1.5) translate(0,-10%);transform:scale(1.5) translate(0,-10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsLeft{-webkit-animation:kenburnsLeft ease-out;animation:kenburnsLeft ease-out}@-webkit-keyframes kenburnsLeft{0%{-webkit-transform:scale(1.5) translate(10%,0);transform:scale(1.5) translate(10%,0)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsLeft{0%{-webkit-transform:scale(1.5) translate(10%,0);transform:scale(1.5) translate(10%,0)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsRight{-webkit-animation:kenburnsRight ease-out;animation:kenburnsRight ease-out}@-webkit-keyframes kenburnsRight{0%{-webkit-transform:scale(1.5) translate(-10%,0);transform:scale(1.5) translate(-10%,0)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsRight{0%{-webkit-transform:scale(1.5) translate(-10%,0);transform:scale(1.5) translate(-10%,0)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsUpLeft{-webkit-animation:kenburnsUpLeft ease-out;animation:kenburnsUpLeft ease-out}@-webkit-keyframes kenburnsUpLeft{0%{-webkit-transform:scale(1.5) translate(10%,10%);transform:scale(1.5) translate(10%,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsUpLeft{0%{-webkit-transform:scale(1.5) translate(10%,10%);transform:scale(1.5) translate(10%,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsUpRight{-webkit-animation:kenburnsUpRight ease-out;animation:kenburnsUpRight ease-out}@-webkit-keyframes kenburnsUpRight{0%{-webkit-transform:scale(1.5) translate(-10%,10%);transform:scale(1.5) translate(-10%,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsUpRight{0%{-webkit-transform:scale(1.5) translate(-10%,10%);transform:scale(1.5) translate(-10%,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}.vegas-animation-kenburnsUp{-webkit-animation:kenburnsUp ease-out;animation:kenburnsUp ease-out}@-webkit-keyframes kenburnsUp{0%{-webkit-transform:scale(1.5) translate(0,10%);transform:scale(1.5) translate(0,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}}@keyframes kenburnsUp{0%{-webkit-transform:scale(1.5) translate(0,10%);transform:scale(1.5) translate(0,10%)}100%{-webkit-transform:scale(1) translate(0,0);transform:scale(1) translate(0,0)}} + + body,html{width:100%;height:100%!important}body{font-weight:300;font-style:normal;overflow:hidden;color:#fff;background:#111;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6{font-family:Raleway,sans-serif;font-weight:400;line-height:auto;color:#fff}h1{font-size:45px}h2{font-size:35px}h3{font-size:30px}h4{font-size:24px}h5{font-size:18px}h6{font-size:16px}p{font-family:'Open Sans',sans-serif;font-size:14px}a,a:focus,a:hover{cursor:pointer;-webkit-transition:all .3s ease;transition:all .3s ease;text-decoration:none}#page-loader{position:fixed;z-index:99999;bottom:0;left:0;width:100%;height:100%;background:#111}#page-loader.hide-this{bottom:100%;-webkit-transition:all .8s cubic-bezier(.54,.086,0,.98) .2s;transition:all .8s cubic-bezier(.54,.086,0,.98) .2s}#page-loader .spinner-container{position:absolute;z-index:200;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}#page-loader .spinner-container .css-spinner{display:block;width:36px;height:36px;-webkit-transition:all .4s cubic-bezier(.19,1,.22,1);transition:all .4s cubic-bezier(.19,1,.22,1);-webkit-animation:spinner .4s linear infinite;animation:spinner .4s linear infinite;opacity:1;border:solid 2px transparent;border-top-color:#1fb8b2;border-left-color:#1fb8b2;border-radius:100%}#page-loader.hide-this .spinner-container .css-spinner{opacity:0}@-webkit-keyframes spinner{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}#main{position:fixed;width:100%;height:100%}#main-container{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;-webkit-transition:all .2s linear;transition:all .2s linear}.container-mid{position:absolute;z-index:2;top:50%;left:0;display:block;width:100%;height:auto;max-height:100%;-webkit-transform:translateY(-50%);transform:translateY(-50%);text-align:center}.hero .container-mid{overflow:auto;padding:60px 30px}.tooltip.bottom{margin-top:6px}.tooltip.bottom .tooltip-arrow{border-bottom-color:rgba(255,255,255,.06)}.tooltip.bottom .tooltip-inner{font-family:Raleway,sans-serif;font-size:11px;padding:4px 8px;letter-spacing:.4px;color:#fff;border-radius:0;background:rgba(255,255,255,.06)}.fhp-input{display:none!important;opacity:0!important;pointer-events:none!important}.container-mid.block-overflow,.movement-in-progress .container-mid{overflow:hidden}#overlay{position:absolute;z-index:-2;top:0;overflow:hidden;width:100%;height:100%;-webkit-transition:all .8s ease;transition:all .8s ease;pointer-events:none;background:rgba(0,0,0,.8)}#overlay.open{pointer-events:auto;z-index:40}#overlay.fade-In{opacity:0}#overlay.open.fade-In{opacity:1}#overlay.slide-from-top{bottom:100%}#overlay.open.slide-from-top{bottom:0}#overlay.slide-from-bottom{top:100%}#overlay.open.slide-from-bottom{top:0}#overlay.slide-from-left{right:100%}#overlay.open.slide-from-left{right:0}#overlay.slide-from-right{left:100%}#overlay.open.slide-from-right{left:0}.overlay{position:absolute;z-index:1;overflow:auto;width:100%;height:100%;-webkit-transition:all .8s ease;transition:all .8s ease;pointer-events:none}.overlay.active{pointer-events:auto}.overlay.fade-In{opacity:0}.overlay.slide-from-top{bottom:100%}.overlay.slide-from-bottom{top:100%}.overlay.slide-from-left{right:100%}.overlay.slide-from-right{left:100%}#overlay.open .overlay.active.fade-In{opacity:1}#overlay.open .overlay.active.slide-from-top{bottom:0}#overlay.open .overlay.active.slide-from-bottom{top:0}#overlay.open .overlay.active.slide-from-left{right:0}#overlay.open .overlay.active.slide-from-right{left:0}.up-button{position:absolute;z-index:120;top:0;left:50%;overflow:hidden;width:70px;height:0;cursor:pointer;-webkit-transition:all .4s ease;transition:all .4s ease;-webkit-transform:translateX(-50%);transform:translateX(-50%);background:#fff}.up-button.active{height:70px}.up-button i{font-size:16px;font-weight:400;line-height:70px;position:absolute;width:inherit;height:inherit;-webkit-transition:none;transition:none;text-align:center;color:#000}.up-button:hover i{-webkit-transition:all .2s cubic-bezier(1,0,0,1);transition:all .2s cubic-bezier(1,0,0,1)}.up-button i:first-child{-webkit-transform:translateY(200%);transform:translateY(200%)}.up-button:hover i:first-child{-webkit-transform:translateY(0);transform:translateY(0)}.up-button i:last-child{-webkit-transform:translateY(0);transform:translateY(0)}.up-button:hover i:last-child{-webkit-transform:translateY(-200%);transform:translateY(-200%)}.grcs_bullet_nav{position:fixed;right:-200px;top:50%;z-index:150;-webkit-transition:all 1s ease;transition:all 1s ease;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.grcs_bullet_nav.init{right:34px}.grcs_bullet_nav .nav_dots{width:18px;height:18px;border:2px solid #fff;display:block;cursor:pointer;margin:16px 0;border-radius:100%;position:relative}.grcs_bullet_nav .nav_dots.active:before{content:"";background:#fff;width:50%;height:50%;position:absolute;left:50%;margin:0;padding:0;top:50%;border-radius:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.is-mobile.merge-true #overlay.open{overflow-y:scroll;overflow-x:hidden;-webkit-overflow-scrolling:touch}body.is-mobile.merge-true .overlay{position:relative;z-index:1;width:100vw;height:auto;min-height:100vh;pointer-events:auto;top:0!important;left:0!important;bottom:0!important;right:0!important}body.is-mobile.merge-true .overlay .content{display:flex;align-items:center;min-height:100vh}body.is-mobile.merge-true .overlay .container-mid{position:relative;top:0;height:auto;-webkit-transform:translateY(0);transform:translateY(0)}@media screen and (max-width:740px){.grcs_bullet_nav.init{right:14px}}@media screen and (max-width:540px){.grcs_bullet_nav{display:none}}#about h1{font-family:Raleway,sans-serif;font-size:41px;font-weight:400;margin-top:0;margin-bottom:30px;letter-spacing:1px;text-transform:uppercase;color:#fff}#about p{font-size:13px;max-width:610px;line-height:1.5em;letter-spacing:.01em;margin:0 auto 38px auto;text-align:justify;color:#ccc}.subscribe-form{display:block;max-width:470px;margin:0 auto 34px auto;background:rgba(255,255,255,0)}.subscribe-form.success .input-group{cursor:not-allowed}.subscribe-form input{font-family:Raleway,sans-serif;font-size:11px!important;font-weight:300;-webkit-transition:all .2s ease 0s;transition:all .2s ease 0s;letter-spacing:1px;color:#d6d6d6;border:none;border:1px solid #d6d6d6;border-right:none!important;border-radius:0!important;background:rgba(255,255,255,0);box-shadow:none}.subscribe-form.error input{border-color:#fb0909!important}.subscribe-form.success input{border-color:#5fea6e!important;background:rgba(255,255,255,0)!important}.subscribe-form input::-webkit-input-placeholder{color:#d6d6d6}.subscribe-form input::-moz-placeholder{color:#d6d6d6}.subscribe-form input:active,.subscribe-form input:focus{color:#ccc;border-color:#d6d6d6;outline:0;background:rgba(255,255,255,.04);box-shadow:none}.subscribe-form button{font-family:Raleway,sans-serif;font-size:12px!important;font-weight:300;overflow:hidden;margin-left:0!important;padding:0 40px!important;-webkit-transition:all .3s ease 0s;transition:all .3s ease 0s;text-align:center;letter-spacing:2px;text-transform:uppercase;color:#000;border:0;border:1px solid #d6d6d6;border-radius:0!important;background:#fff;box-shadow:none}.subscribe-form.success button{cursor:not-allowed;border-color:#5fea6e!important;background:#5fea6e!important}.subscribe-form.error button{border-color:#fb0909!important;background:#fb0909!important}.subscribe-form button:active,.subscribe-form button:focus,.subscribe-form button:hover{color:#000;border-color:#d6d6d6;outline:0!important;background:rgba(255,255,255,0)}.subscribe-form button:hover{background:rgba(255,255,255,0)!important}.subscribe-form button:active,.subscribe-form button:focus{background:#fff}.subscribe-form .btn-primary[disabled]{opacity:1;color:#fff;border:1px solid #fff;outline:0;background:#fff}.subscribe-form.error button:active,.subscribe-form.error button:focus,.subscribe-form.error button:hover{border-color:#fb0909}.subscribe-form button::before{position:absolute;z-index:-1;top:0;right:auto;left:0;width:100%;height:100%;content:'';-webkit-transition:all .2s ease 0s;transition:all .2s ease 0s;background:#fff}.subscribe-form.success button::before{background:#5fea6e!important}.subscribe-form.error button::before{background:#fb0909!important}.subscribe-form.succes button::before{background:#fff}.subscribe-form button:hover::before{right:0;left:auto;width:0}.subscribe-form.success button:hover::before{right:auto!important;left:0!important;width:100%!important}.subscribe-form button i{font-weight:400;position:absolute;top:50%;left:0;width:100%;height:auto;-webkit-transition:none;transition:none;-webkit-transform:translateY(-50%);transform:translateY(-50%);text-align:center}.subscribe-form button:hover i{-webkit-transition:all .2s ease 0s;transition:all .2s ease 0s}.subscribe-form button i.first{left:-200%;color:#fff}.subscribe-form button i.second{left:0}.subscribe-form button:hover i.first{left:0}.subscribe-form button:hover i.second{left:200%}.subscribe-form.error button i.second:before{content:"\e646";color:#fff}.subscribe-form.error-final button i.second:before{content:"\e628"}.subscribe-form.success button i.second:before{content:"\e628";color:#fff}.subscribe-form.success button:hover i.first{left:-200%}.subscribe-form.success button:hover i.second{left:0}#about .social-icons{margin:10px 0 0 0;padding:0;list-style:none;text-align:center}#about .social-icons li{display:inline-block;margin:0 15px}#about .social-icons li a{font-size:12px;line-height:40px;position:relative;display:block;overflow:hidden;width:40px;height:40px;-webkit-transition:all .2s ease 0s;transition:all .2s ease 0s;color:#000;border-radius:0;background:rgba(255,255,255,.06)}#about .social-icons li a .overlay{position:absolute;z-index:-1;top:0;right:auto;left:0;width:100%;height:100%;-webkit-transition:all .2s ease 0s;transition:all .2s ease 0s;background:#fff}#about .social-icons li a:hover .overlay{right:0;left:auto;width:0}#about .social-icons li a:hover{color:#fff;background:rgba(255,255,255,.06)}#contact h1{font-family:Raleway,sans-serif;font-size:41px;font-weight:400;margin-bottom:28px;text-align:center;letter-spacing:1px;text-transform:uppercase;color:#fff}#contact p{font-size:13px;max-width:355px;margin:0 auto;margin-bottom:30px;padding:0 20px;text-align:justify;color:#d6d6d6;line-height:1.5em;letter-spacing:.01em}#contact-form{font-size:18px;margin-top:20px;text-align:center}#contact-form{font-size:18px;margin-top:20px;text-align:center}#contact-form .control-group{max-width:346px;margin-right:auto;margin-left:auto}#contact-form label{font-family:Raleway,sans-serif;font-size:14px;font-weight:400;width:100%;margin-bottom:10px;text-align:left;text-transform:uppercase;color:#b1b1b1}#contact-form input,#contact-form textarea{font-family:Raleway,sans-serif;font-size:11px;font-weight:300;overflow:hidden;width:100%;height:50px;margin-bottom:24px;padding-left:10px;-webkit-transition:all .2s ease;transition:all .2s ease;letter-spacing:1px;color:#d6d6d6;border:none;border:1px solid #d6d6d6!important;border-radius:0;outline:0;background:rgba(255,255,255,0);box-shadow:none}#contact-form input::-webkit-input-placeholder,#contact-form textarea::-webkit-input-placeholder{color:#d6d6d6}#contact-form input::-moz-placeholder,#contact-form textarea::-moz-placeholder{color:#d6d6d6}#contact-form.error input.active,#contact-form.error textarea.active{border-color:#fb0909!important}#contact-form.success input,#contact-form.success textarea{background:rgba(255,255,255,0)!important}#contact-form textarea{height:110px;padding-top:10px;resize:none!important}#contact-form input:active,#contact-form input:focus{border:1px solid #d6d6d6;outline:0;background:rgba(255,255,255,.04)}#contact-form textarea:active,#contact-form textarea:focus{border:1px solid #fff;outline:0;background:rgba(255,255,255,.04)}#contact-form button{font-family:Raleway,sans-serif;font-size:12px;font-weight:400;line-height:50px;position:relative;display:block;overflow:hidden;width:144px;height:50px;margin:38px auto 0 auto;-webkit-transition:all .2s ease 0s;transition:all .2s ease 0s;text-align:center;letter-spacing:1px;text-transform:uppercase;color:#000;border:1px solid #d6d6d6;border-radius:0;background:#fff}#contact-form.success button{border-color:#5fea6e!important;background:#5fea6e!important}#contact-form.error button{border-color:#fb0909!important;background:#fb0909!important}#contact-form button:active,#contact-form button:focus,#contact-form button:hover{color:#000;border-color:#d6d6d6;outline:0!important;background:rgba(255,255,255,0);box-shadow:none}#contact-form button:hover{background:rgba(255,255,255,0)!important}#contact-form button:active,#contact-form button:focus{background:#fff}#contact-form .btn-primary[disabled]{opacity:1;color:#fff;border:1px solid #fff;outline:0;background:#fff}#contact-form.error button:active,#contact-form.error button:focus,#contact-form.error button:hover{border-color:#fb0909}#contact-form.error button:focus{background:#fb0909}#contact-form.success button:active,#contact-form.success button:focus,#contact-form.success button:hover{border-color:#5fea6e}#contact-form.success button:focus,#contact-form.success button:hover{background:#5fea6e!important}#contact-form button::before{position:absolute;z-index:-1;top:0;right:auto;left:0;width:100%;height:100%;content:'';-webkit-transition:all .2s ease 0s;transition:all .2s ease 0s;background:#fff}#contact-form.success button::before{background:#5fea6e!important}#contact-form.error button::before{background:#fb0909!important}#contact-form.success button::before{background:#fff}#contact-form button:hover::before{right:0;left:auto;width:0}#contact-form.success button:hover::before{right:0;left:0;width:100%}#contact-form button i{position:absolute;top:50%;left:0;width:100%;height:auto;-webkit-transition:none;transition:none;-webkit-transform:translateY(-50%);transform:translateY(-50%);text-align:center}#contact-form button:hover i{-webkit-transition:all .2s ease 0s;transition:all .2s ease 0s}#contact-form button i.first{left:-200%;color:#fff}#contact-form button i.second{left:0}#contact-form button:hover i.first{left:0}#contact-form button:hover i.second{left:200%}#contact-form.error button i.second:before{content:'\e646';color:#fff}#contact-form.success button i.second:before{content:'\e64c';color:#fff}#contact-form.success button:hover i.first{left:-200%}#contact-form.success button:hover i.second{left:0}.white .tooltip.bottom .tooltip-arrow{border-bottom-color:rgba(0,0,0,.02)}.white .tooltip.bottom .tooltip-inner{color:#000;background:rgba(0,0,0,.02)}.white .grcs_bullet_nav .nav_dots{border-color:#ccc!important}.white .grcs_bullet_nav .nav_dots.active:before{background:#ccc!important}.white #overlay{background:rgba(245,245,245,.92)}.white .up-button{background:#000}.white .up-button i{color:#fff}.white #about h1{color:#000}.white #about p{color:#2c2b2b}.white .subscribe-form input{color:#2c2b2b;border:1px solid #2c2b2b;background:rgba(0,0,0,0)}.white .subscribe-form input::-webkit-input-placeholder{color:#2c2b2b}.white .subscribe-form input::-moz-placeholder{color:#2c2b2b}.white .subscribe-form input:active,.white .subscribe-form input:focus{color:#2c2b2b;border-color:#2c2b2b;outline:0;background:rgba(0,0,0,.02);box-shadow:none}.white .subscribe-form button{color:#fff;border:1px solid #2c2b2b;background:#000}.white .subscribe-form button:active,.white .subscribe-form button:focus,.white .subscribe-form button:hover{color:#fff;border-color:#333;outline:0!important;background:rgba(0,0,0,0)}.white .subscribe-form button:hover{background:rgba(0,0,0,0)!important}.white .subscribe-form button:active,.white .subscribe-form button:focus{background:#000}.white .subscribe-form .btn-primary[disabled]{color:#000;border:1px solid #000;background:#000}.white .subscribe-form button::before{background:#000}.white .subscribe-form button i.first{color:#000}.white .subscribe-form.error button i.second:before{color:#000}.white .subscribe-form.success button i.second:before{color:#000}.white #about .social-icons li a{color:#fff;background:rgba(0,0,0,.02)}.white #about .social-icons li a .overlay{background:#000}.white #about .social-icons li a:hover{color:#000;background:rgba(0,0,0,.02)}.white #contact h1{color:#000}.white #contact p{color:#2c2b2b}.white #contact-form label{color:#414141}.white #contact-form input,.white #contact-form textarea{color:#2c2b2b;border:1px solid #2c2b2b!important;background:rgba(0,0,0,0)}.white #contact-form input::-webkit-input-placeholder,.white #contact-form textarea::-webkit-input-placeholder{color:#2c2b2b}.white #contact-form input::-moz-placeholder,.white #contact-form textarea::-moz-placeholder{color:#2c2b2b}.white #contact-form.success input,.white #contact-form.success textarea{background:rgba(0,0,0,0)!important}.white #contact-form input:active,.white #contact-form input:focus{border:1px solid #2c2b2b;background:rgba(0,0,0,.02)}.white #contact-form textarea:active,.white #contact-form textarea:focus{border:1px solid #000;background:rgba(0,0,0,.02)}.white #contact-form button{color:#fff;border:1px solid #2c2b2b;background:#000}.white #contact-form button:active,.white #contact-form button:focus,.white #contact-form button:hover{color:#fff;border-color:#2c2b2b;background:rgba(0,0,0,0)}.white #contact-form button:hover{background:rgba(0,0,0,0)!important}.white #contact-form button:active,.white #contact-form button:focus{background:#000}.white #contact-form .btn-primary[disabled]{color:#000;border:1px solid #000;background:#000}.white #contact-form button .overlay{background:#000}.white #contact-form.success button::before{background:#000}.white #contact-form button i.first{color:#000}.white #contact-form.error button i.second:before{color:#000}.white #contact-form.success button i.second:before{color:#000}@media screen and (max-width:1400px),screen and (max-height:720px){.tooltip.bottom .tooltip-inner{font-size:10px}.up-button{width:60px}.up-button.active{height:60px}.up-button i{font-size:14px;line-height:60px}#overlay .container-mid .container{padding:40px 40px}#about h1{font-size:31px;margin-bottom:20px;letter-spacing:1px}#about p{font-size:10px;max-width:460px;margin:0 auto 28px auto}.subscribe-form{max-width:390px;margin:0 auto 27px auto}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:37px}#about .social-icons li{display:inline-block;margin:0 10px}#about .social-icons li a{font-size:9px;line-height:30px;width:31px;height:31px}.subscribe-form button{font-size:9px!important;padding:0 34px!important}.subscribe-form input{font-size:9px!important}#contact h1{font-size:31px;margin-bottom:16px}#contact p{font-size:10px;max-width:280px;margin-bottom:0;padding:0 20px}#contact-form{margin-top:14px}#contact-form .control-group{max-width:280px}#contact-form label{font-size:12px;margin-bottom:8px}#contact-form input,#contact-form textarea{font-size:9px;height:40px;margin-bottom:14px}#contact-form textarea{height:90px}#contact-form button{font-size:9px;line-height:40px;width:104px;height:40px;margin:24px auto 0 auto}}@media screen and (max-width:420px),screen and (max-height:720px){.spinner{width:100px}.tooltip.bottom .tooltip-inner{font-size:8px}#overlay .container-mid .container{padding:55px 40px}.up-button{width:50px}.up-button.active{height:50px}.up-button i{font-size:11px;line-height:50px}#about h1{font-size:30px}.subscribe-form input{font-size:7px!important}#about .social-icons li{margin:0 14px}#contact h1{font-size:30px;margin-bottom:16px}#contact p{font-size:10px;max-width:280px;margin-bottom:0;padding:0 20px}#contact-form{margin-top:14px}#contact-form .control-group{max-width:280px}#contact-form label{font-size:12px;margin-bottom:8px}#contact-form input,#contact-form textarea{font-size:9px;height:40px;margin-bottom:14px}#contact-form textarea{height:90px}#contact-form button{font-size:9px;line-height:40px;width:104px;height:40px;margin:24px auto 0 auto}}@media screen and (max-width:329px){#about .social-icons li{margin:0 10px}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{padding:10px 12px}}@media screen and (max-width:318px){#about .social-icons li{margin:0 8px}.subscribe-form .input-group{display:block}.subscribe-form input{display:block;text-align:center;border-right:1px solid #d6d6d6!important}}@media screen and (min-width:3000px){.stop-button,.volume-button{font-size:32px;position:fixed;z-index:101;bottom:40px;cursor:pointer;color:#fff}.stop-button{left:110px}.volume-button{left:40px}.spinner{width:240px}.up-button{width:100px}.up-button.active{height:100px}.up-button i{font-size:20px;line-height:100px}#overlay .container-mid .container{padding:120px 40px}#about h1{font-size:51px;margin-bottom:40px;letter-spacing:3px}#about p{font-size:17px;max-width:790px;margin:0 auto 50px auto}.subscribe-form{max-width:630px;margin:0 auto 44px auto}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:56px}#about .social-icons li{display:inline-block;margin:0 20px}#about .social-icons li a{font-size:14px;line-height:46px;width:46px;height:46px}.subscribe-form button{font-size:13px!important;padding:0 50px!important}.subscribe-form input{font-size:13px!important}#contact h1{font-size:51px;margin-bottom:38px}#contact p{font-size:17px;max-width:450px;margin-bottom:0;padding:0 20px}#contact-form{margin-top:40px}#contact-form .control-group{max-width:470px}#contact-form label{font-size:18px;margin-bottom:14px}#contact-form input,#contact-form textarea{font-size:13px;height:64px;margin-bottom:35px;padding:12px 12px}#contact-form textarea{height:180px}#contact-form button{font-size:15px;line-height:64px;width:190px;height:64px;margin:50px auto 0 auto}} + + .hero{position:relative;z-index:1;overflow:hidden;width:100%;height:100%}.hero .front-content{position:absolute;z-index:5;top:0;overflow:hidden;width:100%;height:100%;-webkit-transition:all .6s ease;transition:all .6s ease}.hero .front-content.overlay-active{top:50%;height:0}.hero .front-content .container-mid{text-align:center;-webkit-perspective:1000px;perspective:1000px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.hero .front-content .controls{position:absolute;bottom:0;left:0;-webkit-transition:.2s ease;transition:.2s ease;-webkit-transform:translateY(100px);transform:translateY(100px)}.hero .front-content .controls.show{-webkit-transition:.8s ease;transition:.8s ease;-webkit-transform:translateY(0);transform:translateY(0)}.hero .front-content .controls .pause-button,.hero .front-content .controls .volume-button{font-size:20px;position:absolute;z-index:101;bottom:20px;width:20px;cursor:pointer;color:#fff}.hero .front-content .controls .volume-button{left:66px}.hero .front-content .controls .pause-button{left:26px}.hero .background-content{position:absolute;z-index:-10;overflow:hidden;width:100%;height:100%}.hero .background-content .level-1,.hero .background-content .level-2{position:absolute;width:100%;height:100%}.hero .background-content .level-1{z-index:2;top:50%;left:50%;width:110%;height:110%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.hero .background-content .level-2{z-index:1;-webkit-transform:scale(1.02);transform:scale(1.02)}.hero .background-content #canvas,.hero .background-content .bg-color,.hero .background-content .bg-image,.hero .background-content .bg-overlay,.hero .background-content .bg-pattern,.hero .background-content .bg-video,.hero .background-content .glitch-img{position:absolute!important;width:100%;height:100%!important}.hero .background-content .glitch-img{background-size:cover}.hero .background-content .bg-color{z-index:-1;opacity:0;background:#af997f}.hero .background-content #canvas canvas{position:absolute!important}.hero .background-content .bg-overlay{position:absolute!important;top:0;width:100%;height:100%;opacity:.52;background:#000}.hero .background-content .bg-pattern{opacity:.5;background:url(../images/pattern.png);background-repeat:repeat}.hero-1 .front-content img.logo{margin-top:10px;margin-bottom:20px}.hero .front-content .cycle-wrapper{overflow:hidden!important}.hero-1 .front-content .slide{width:100%;margin:0 auto;text-align:center}.hero-1 .front-content h1{font-family:'Open Sans',sans-serif;font-size:80px;font-weight:600;margin:0 auto;margin-bottom:48px;text-align:center;color:#fff}.hero-1 .front-content h1 span{color:#1fb8b2}.hero-1 .front-content p{font-family:Raleway,sans-serif;font-size:17px;font-weight:400;padding-bottom:50px;letter-spacing:2px;color:#fff}.hero-1 .front-content .arrow-wrap{display:inline-block;overflow:hidden!important;margin:0 auto}.hero-1 .front-content .open-overlay i{font-size:16px;line-height:66px;z-index:2;margin:0 auto;cursor:inherit;-webkit-transition:all .6s ease 0s;transition:all .6s ease 0s;color:inherit;background:rgba(255,255,255,0)}.hero-1 .front-content div.open-overlay{position:relative;display:block;width:74px;height:74px;margin:0 auto;cursor:pointer;-webkit-transition:all .6s ease 0s;transition:all .6s ease 0s;text-align:center;color:#fff;border:solid 4px #fff;overflow:hidden!important}.hero-1 .front-content .down-button i{position:absolute;top:0;left:0;width:100%;-webkit-transition:none;transition:none;text-align:center;color:#fff}.hero-1 .front-content .down-button:hover i{-webkit-transition:all 150ms cubic-bezier(1,0,0,1);transition:all 150ms cubic-bezier(1,0,0,1)}.hero-1 .front-content .down-button i:first-child{top:-200%}.hero-1 .front-content .down-button:hover i:first-child{top:0}.hero-1 .front-content .down-button i:last-child{top:0}.hero-1 .front-content .down-button:hover i:last-child{top:200%}.hero-1 .front-content.page-enter-animated img.logo{-webkit-transform:translateY(-100%)!important;transform:translateY(-100%)!important;opacity:0!important}.hero-1 .front-content.page-enter-animated.show img.logo{-webkit-transition:1s;transition:1s;-webkit-transform:translateY(0)!important;transform:translateY(0)!important;opacity:1!important}.hero-1 .front-content.page-enter-animated .cycle-wrapper{-webkit-transform:translateY(100%)!important;transform:translateY(100%)!important;opacity:0!important}.hero-1 .front-content.page-enter-animated.show .cycle-wrapper{-webkit-transition:1s .5s;transition:1s .5s;-webkit-transform:translateY(0)!important;transform:translateY(0)!important;opacity:1!important}.hero-1 .front-content.page-enter-animated p{-webkit-transform:translateY(100%)!important;transform:translateY(100%)!important;opacity:0!important}.hero-1 .front-content.page-enter-animated.show p{-webkit-transition:1s 1s;transition:1s 1s;-webkit-transform:translateY(0)!important;transform:translateY(0)!important;opacity:1!important}.hero-1 .front-content.page-enter-animated .arrow-wrap{-webkit-transform:translateY(100%)!important;transform:translateY(100%)!important;opacity:0!important}.hero-1 .front-content.page-enter-animated.show .arrow-wrap{-webkit-transition:1s 1.5s;transition:1s 1.5s;-webkit-transform:translateY(0)!important;transform:translateY(0)!important;opacity:1!important}.hero-1 .background-content #canvas{top:100%!important;-webkit-transition:1s 2s;transition:1s 2s;opacity:0}.hero-1 .background-content.page-enter-animated.show #canvas{top:0!important;opacity:1}@media only screen and (max-width:768px),only screen and (max-height:630px){.hero-1 .front-content img.logo{max-width:220px}.hero-1 .front-content h1{font-size:60px;margin-bottom:40px}.hero-1 .front-content p{font-size:14px;padding-bottom:36px}.hero-1 .front-content .open-overlay i{font-size:14px;line-height:58px}.hero-1 .front-content div.open-overlay{width:64px;height:64px;border:solid 3px #fff}}@media only screen and (max-width:600px),only screen and (max-height:500px){.hero-1 .front-content img.logo{max-width:186px;margin-bottom:15px}.hero-1 .front-content h1{font-size:45px;margin-bottom:32px}.hero-1 .front-content p{font-size:12px;padding-bottom:28px}.hero-1 .front-content .open-overlay i{font-size:13px;line-height:46px}.hero-1 .front-content div.open-overlay{width:50px;height:50px;border:solid 2px #fff}}@media only screen and (max-width:480px),only screen and (max-height:410px){.hero-1 .front-content img.logo{max-width:160px;margin-bottom:12px}.hero-1 .front-content h1{font-size:40px;margin-bottom:25px}.hero-1 .front-content p{font-size:11px;font-weight:300;padding-bottom:20px;letter-spacing:2px}.hero-1 .front-content .open-overlay i{font-size:11px;line-height:38px}.hero-1 .front-content div.open-overlay{width:42px;height:42px}}@media only screen and (max-width:400px),only screen and (max-height:310px){.hero-1 .front-content img.logo{max-width:140px;margin-bottom:10px}.hero-1 .front-content h1{font-size:35px;margin-bottom:23px}.hero-1 .front-content p{font-size:10px;padding-bottom:18px}.hero-1 .front-content .open-overlay i{font-size:9px;line-height:32px}.hero-1 .front-content div.open-overlay{width:36px;height:36px}}@media only screen and (max-width:355px),only screen and (max-height:280px){.hero-1 .front-content img.logo{max-width:130px;margin-bottom:8px}.hero-1 .front-content h1{font-size:30px;margin-bottom:20px}.hero-1 .front-content p{font-size:9px;padding-bottom:12px}.hero-1 .front-content .open-overlay i{font-size:8px;line-height:30px}.hero-1 .front-content div.open-overlay{width:34px;height:34px}}.error-404 .front-content img.logo{margin-top:10px;margin-bottom:20px}.error-404 .front-content h1{font-family:Raleway,sans-serif;font-size:80px;font-weight:600;margin:0 auto;text-align:center;color:#fff}.error-404 .front-content h1 span{font-family:'Open Sans',sans-serif;line-height:140px;position:relative;padding:0 20px;color:#fff;margin-right:6px}.error-404 .front-content h1 span:before{position:absolute;z-index:-1;top:0;left:0;width:100%;height:100%;content:'';-webkit-transition:.3s ease;transition:.3s ease;background:#1fb8b2}.error-404 .front-content p{font-family:Raleway,sans-serif;font-size:17px;font-weight:400;line-height:36px;display:block;margin:22px 0 36px;padding:0;letter-spacing:2px;color:#fff}.error-404 .front-content a{font-family:Raleway,sans-serif;font-size:16px;font-weight:400;line-height:36px;display:inline-block;overflow:hidden;margin:0;padding:9px 30px;-webkit-transition:.1s ease;transition:.1s ease;letter-spacing:2px;color:#fff;border:3px solid #fff}.error-404 .front-content.page-enter-animated h1{-webkit-transform:translateY(100%)!important;transform:translateY(100%)!important;opacity:0!important}.error-404 .front-content.page-enter-animated.show h1{-webkit-transition:.8s;transition:.8s;-webkit-transform:translateY(0)!important;transform:translateY(0)!important;opacity:1!important}.error-404 .front-content.page-enter-animated h1 span:before{width:0}.error-404 .front-content.page-enter-animated.show h1 span:before{-webkit-transition:.5s .4s;transition:.5s .4s;width:100%}.error-404 .front-content.page-enter-animated p{-webkit-transform:translateY(100%)!important;transform:translateY(100%)!important;opacity:0!important}.error-404 .front-content.page-enter-animated.show p{-webkit-transition:.8s .6s;transition:.8s .6s;-webkit-transform:translateY(0)!important;transform:translateY(0)!important;opacity:1!important}.error-404 .front-content.page-enter-animated a{-webkit-transform:translateY(100%)!important;transform:translateY(100%)!important;opacity:0!important}.error-404 .front-content.page-enter-animated.show a{-webkit-transition:.8s .8s;transition:.8s .8s;-webkit-transform:translateY(0)!important;transform:translateY(0)!important;opacity:1!important}.error-404 .background-content #canvas{top:100%!important;opacity:0}.error-404 .background-content.page-enter-animated.show #canvas{-webkit-transition:1s 1s;transition:1s 1s;top:0!important;opacity:1}@media only screen and (max-width:768px),only screen and (max-height:630px){.error-404 .front-content h1{font-size:60px;margin-bottom:40px}.error-404 .front-content h1 span{font-size:70px;line-height:120px;padding:0 14px}.error-404 .front-content p{font-size:16px;line-height:20px}}@media only screen and (max-width:600px),only screen and (max-height:500px){.error-404 .front-content h1{font-size:45px;margin-bottom:32px}.error-404 .front-content h1 span{font-size:55px;line-height:100px;padding:0 14px}.error-404 .front-content p{font-size:12px}}@media only screen and (max-width:480px),only screen and (max-height:410px){.error-404 .front-content h1{font-size:40px;margin-bottom:25px}.error-404 .front-content h1 span{font-size:38px;line-height:70px;padding:0 10px}.error-404 .front-content p{font-size:11px;font-weight:300;line-height:20px;letter-spacing:2px}}@media only screen and (max-width:400px),only screen and (max-height:310px){.error-404 .front-content h1{font-size:35px;margin-bottom:23px}.error-404 .front-content h1 span{font-size:34px;line-height:60px;padding:0 6px}.error-404 .front-content p{font-size:10px}}@media only screen and (max-width:355px),only screen and (max-height:280px){.error-404 .front-content h1{font-size:30px;margin-bottom:20px}.error-404 .front-content p{font-size:10px}} + + .options-panel{position:fixed;z-index:200;left:-310px;color:#000;height:auto;width:310px;padding:60px 46px;font-family:'Open Sans',sans-serif;top:15%;background:#fff;transition:all .3s ease}.options-panel.active{left:0}.options-panel .panel-button{position:absolute;right:0;top:10%;background:#fff;color:#000;width:43px;height:43px;font-size:15px;margin:0;text-align:center;line-height:43px;transform:scale(1)!important;transition:all .2s ease!important}.options-panel.active .panel-button{font-size:14px}.options-panel.active .panel-button:before{content:"\e646"}.options-panel h2{color:#000;font-family:'Open Sans',sans-serif;font-size:15px;text-transform:uppercase;margin-bottom:24px;font-weight:600;letter-spacing:.05em;padding-bottom:16px;border-bottom:1px solid #e7e7e7}.options-panel h4{color:#555;letter-spacing:.02em;margin-bottom:12px;margin-top:16px;font-family:'Open Sans',sans-serif;font-size:13px;font-weight:400}.options-panel .option-block p{color:#000;letter-spacing:.04em;margin-bottom:0;text-transform:uppercase;font-family:'Open Sans',sans-serif;background:#fff;padding:8px 0;border-radius:0;width:46%;display:inline-block;font-size:13px;text-align:center;border:1px solid #e6e6e6;cursor:pointer;transition:all .1s ease}.options-panel p.bottom-line{font-size:13px;margin-top:20px;color:#555;font-style:italic}.options-panel .option-block p:first-child{margin-right:8%}.options-panel .option-block p.active,.options-panel .option-block p:hover{background:#1fb8b2;color:#fff}.options-panel span{display:inline-block;height:20px;width:32px;background:#ccc;margin:0 8px 8px 0;cursor:pointer;transition:all .1s ease;transform:scale(1)}.options-panel span:hover{transform:scale(1.08)}.options-panel .row{margin:0}@media (max-height:700px){.options-panel{top:5%}}@media (max-width:450px){.options-panel{height:100%;width:100%;top:0;left:-100%;padding:60px 46px}.options-panel .panel-button{top:4%}.options-panel.active .panel-button{font-size:20px;margin-right:10px!important;margin-top:10px;top:0}}#overlay .overlay.edit,#overlay.edit{transition:0s} \ No newline at end of file diff --git a/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e-2.html b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e-2.html new file mode 100644 index 000000000..dc35ce3c2 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e-2.html differ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e-3.html b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e-3.html new file mode 100644 index 000000000..26dea7951 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e-3.html differ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e.eot b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e.eot new file mode 100644 index 000000000..9b6afaedc Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e.eot differ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e.html b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e.html new file mode 100644 index 000000000..500e51725 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e.html differ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e.svg b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e.svg new file mode 100644 index 000000000..d05688e9e --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfont3e6e.svg @@ -0,0 +1,655 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfontd41d.eot b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfontd41d.eot new file mode 100644 index 000000000..9b6afaedc Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/fonts/fontawesome-webfontd41d.eot differ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-2.html b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-2.html new file mode 100644 index 000000000..6bdb6631a --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-2.html @@ -0,0 +1,7 @@ + + +404 Not Found + +

Not Found

+

The requested URL was not found on this server.

+ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-3.html b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-3.html new file mode 100644 index 000000000..6bdb6631a --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-3.html @@ -0,0 +1,7 @@ + + +404 Not Found + +

Not Found

+

The requested URL was not found on this server.

+ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-4.html b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-4.html new file mode 100644 index 000000000..6bdb6631a --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-4.html @@ -0,0 +1,7 @@ + + +404 Not Found + +

Not Found

+

The requested URL was not found on this server.

+ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-5.html b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-5.html new file mode 100644 index 000000000..6bdb6631a --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular-5.html @@ -0,0 +1,7 @@ + + +404 Not Found + +

Not Found

+

The requested URL was not found on this server.

+ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular.html b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular.html new file mode 100644 index 000000000..6bdb6631a --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regular.html @@ -0,0 +1,7 @@ + + +404 Not Found + +

Not Found

+

The requested URL was not found on this server.

+ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regulard41d.html b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regulard41d.html new file mode 100644 index 000000000..6bdb6631a --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/fonts/glyphicons-halflings-regulard41d.html @@ -0,0 +1,7 @@ + + +404 Not Found + +

Not Found

+

The requested URL was not found on this server.

+ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/themify-2.html b/resources/EGRP-LoadingScreen/assets/fonts/themify-2.html new file mode 100644 index 000000000..5d627e701 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/fonts/themify-2.html differ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/themify.eot b/resources/EGRP-LoadingScreen/assets/fonts/themify.eot new file mode 100644 index 000000000..9ec298b9d Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/fonts/themify.eot differ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/themify.html b/resources/EGRP-LoadingScreen/assets/fonts/themify.html new file mode 100644 index 000000000..847ebd183 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/fonts/themify.html differ diff --git a/resources/EGRP-LoadingScreen/assets/fonts/themify9f24.svg b/resources/EGRP-LoadingScreen/assets/fonts/themify9f24.svg new file mode 100644 index 000000000..3d5385441 --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/fonts/themify9f24.svg @@ -0,0 +1,362 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/EGRP-LoadingScreen/assets/fonts/themifyd41d.eot b/resources/EGRP-LoadingScreen/assets/fonts/themifyd41d.eot new file mode 100644 index 000000000..9ec298b9d Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/fonts/themifyd41d.eot differ diff --git a/resources/EGRP-LoadingScreen/assets/images/background.jpg b/resources/EGRP-LoadingScreen/assets/images/background.jpg new file mode 100644 index 000000000..67510baf9 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/background.jpg differ diff --git a/resources/EGRP-LoadingScreen/assets/images/logo.png b/resources/EGRP-LoadingScreen/assets/images/logo.png new file mode 100644 index 000000000..27ef73d3f Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/logo.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/logodefault.png b/resources/EGRP-LoadingScreen/assets/images/logodefault.png new file mode 100644 index 000000000..b08613a36 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/logodefault.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/partner/choxie.png b/resources/EGRP-LoadingScreen/assets/images/partner/choxie.png new file mode 100644 index 000000000..c9e0b633e Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/partner/choxie.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/partner/jack.png b/resources/EGRP-LoadingScreen/assets/images/partner/jack.png new file mode 100644 index 000000000..a77c799ee Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/partner/jack.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/partner/musk.png b/resources/EGRP-LoadingScreen/assets/images/partner/musk.png new file mode 100644 index 000000000..68d4ef2de Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/partner/musk.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/partner/partner.png b/resources/EGRP-LoadingScreen/assets/images/partner/partner.png new file mode 100644 index 000000000..0d322264f Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/partner/partner.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/staff/EliteGaming.png b/resources/EGRP-LoadingScreen/assets/images/staff/EliteGaming.png new file mode 100644 index 000000000..27ef73d3f Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/staff/EliteGaming.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/staff/EpicFace.png b/resources/EGRP-LoadingScreen/assets/images/staff/EpicFace.png new file mode 100644 index 000000000..b026fee6f Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/staff/EpicFace.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/staff/Jacobee.png b/resources/EGRP-LoadingScreen/assets/images/staff/Jacobee.png new file mode 100644 index 000000000..93cf48962 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/staff/Jacobee.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/staff/Mustang.png b/resources/EGRP-LoadingScreen/assets/images/staff/Mustang.png new file mode 100644 index 000000000..9aa593bc6 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/staff/Mustang.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/staff/Oreo.png b/resources/EGRP-LoadingScreen/assets/images/staff/Oreo.png new file mode 100644 index 000000000..ddadf81ec Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/staff/Oreo.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/staff/redven.png b/resources/EGRP-LoadingScreen/assets/images/staff/redven.png new file mode 100644 index 000000000..333590cb7 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/staff/redven.png differ diff --git a/resources/EGRP-LoadingScreen/assets/images/staff/vJack.png b/resources/EGRP-LoadingScreen/assets/images/staff/vJack.png new file mode 100644 index 000000000..7caea4da7 Binary files /dev/null and b/resources/EGRP-LoadingScreen/assets/images/staff/vJack.png differ diff --git a/resources/EGRP-LoadingScreen/assets/js/script.js b/resources/EGRP-LoadingScreen/assets/js/script.js new file mode 100644 index 000000000..5c2618f3d --- /dev/null +++ b/resources/EGRP-LoadingScreen/assets/js/script.js @@ -0,0 +1,65 @@ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c; +}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,la=/\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1><$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n(" + +
+
+
+
+

Elite Gaming RP

+
+
+

Gaming Community

+
+
+

And Roleplay

+
+
+
+

SCROLL DOWN

+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+

RULES

+
1. You must sign-up and create a civilian on our CAD at: cad.elite-gaming.co.uk
+
2. Any RDM/VDM is strictly prohibited.
+
3. Roleplay everything you do, don't revive mid scenario.
+
4. You cannot steal any emergency vehicles.
+
5. Players cannot role-play sexual assault, rape, or anything that can be deemed as intense and inappropriate behavior.
+
6. Report people who aren't following the rules via /report.
+
7. Racism, bigotry, anti-antisemitism, and any other form of harassment is not tolerated.
+
8. Don't abuse noclip.
+
9. Flying air vehicles is allowed, as long as you are cautious of others.
+
10. You may find further rules and procedures in-game using F7.
+
+
+
+
+
+
+
+

HEAD OF STAFF

+
+
+ +

ThatGuyJacobee

+
+
+
+
+ +

King Rodriguez

+
+
+
+
+ +

vJack

+
+
+
+
+
+
+
+
+
+

EGRP STAFF

+
+
+ +

Choxie

+
+
+ + + +
+
+
+
+ + + + + \ No newline at end of file diff --git a/resources/EGRP-Playerlist/LICENSE b/resources/EGRP-Playerlist/LICENSE new file mode 100644 index 000000000..217dbfeaa --- /dev/null +++ b/resources/EGRP-Playerlist/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jared + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/resources/EGRP-Playerlist/NUI/panel.css b/resources/EGRP-Playerlist/NUI/panel.css new file mode 100644 index 000000000..796ecaff7 --- /dev/null +++ b/resources/EGRP-Playerlist/NUI/panel.css @@ -0,0 +1,103 @@ +#wrap { + display: none; /* CHANGE THIS TO NONE */ + font-family: 'Roboto', sans-serif; +} +body { + display: none; + background-color: transparent; + background: transparent; +} +div.container { + margin-top: 3%; + width: 60% !important; +} +.job-count { + background-color: #5d5d5dad; + border-radius: 10px; + padding: 5px; +} +.row { + margin-right: 0 !important; + margin-left: 0 !important; + margin-bottom: 20px; + margin-top: 10px; +} +div.container-box { + width: 60%; + margin-left: auto; + margin-right: auto; + background-color: rgba(45, 45, 45, 0.68); + color: white; + padding-bottom: 5px; + overflow-y: auto; + max-height: 85%; + border-radius: 5px; +} +div.info { + text-align: center; + display: block; + color: #ADB8BD; + font-weight: bold; +} +div#contain { + text-align: center; + width: 100%; +} +div.container-head { + text-align: center; + padding: 10px 0 10px 0; +} +table { + font-weight: bold; + color: white; + font-size: 15px; + width: 90%; +} +.table { + width: 98%; + margin-left: auto; + margin-right: auto; + border-collapse: collapse; +} +table.container-contents-l { + margin-top: 15px; + margin-left: auto; + margin-right: auto; + text-align: center; +} +tr.player-box { + width: 550px; + padding: 5px 0 5px 0; + color: white; +} +table th { + color: #ADB8BD; + text-decoration: underline; + font-weight: bold; + /*font-size: 16px;*/ + text-transform: uppercase; +} +tr.player-box td { + margin-left: auto; + margin-right: auto; + padding-bottom: 5px; + padding-top: 5px; + vertical-align: middle; + word-wrap: break-word; + max-width: 160px; +} +td.ping-good { + color: #18d812; +} +td.ping-bad { + color: rgb(226, 11, 11); +} +td.ping-warn { + color: rgb(238, 238, 12); +} +tr.player-box img { + height: 30px; + width: 30px; + vertical-align: middle; + margin-right: 10px; +} \ No newline at end of file diff --git a/resources/EGRP-Playerlist/NUI/panel.html b/resources/EGRP-Playerlist/NUI/panel.html new file mode 100644 index 000000000..14d07e9be --- /dev/null +++ b/resources/EGRP-Playerlist/NUI/panel.html @@ -0,0 +1,97 @@ + + + + + + Badger Server List + + + + + + +
+
+
+
+ +
+ + + + + + + + + + + +
DiscordNameIDPing
+
+
Page: 1 | Players: 5/48
+
+
+ + \ No newline at end of file diff --git a/resources/EGRP-Playerlist/NUI/panel.js b/resources/EGRP-Playerlist/NUI/panel.js new file mode 100644 index 000000000..e8130aa0a --- /dev/null +++ b/resources/EGRP-Playerlist/NUI/panel.js @@ -0,0 +1,78 @@ + +var resourceName = ""; +$( function() { + window.addEventListener( 'message', function( event ) { + var item = event.data; + if ( item.resourcename ) { + resourceName = item.resourcename; + } + if (item.display) { + $("#wrap").show(); + $('#body').show(); + } else { + $('#body').hide(); + $("#wrap").hide(); + $("#pageCount").empty(); + $("#playerCount").empty(); + //$("#serverIcon").empty(); + $("#leftCol").empty(); + $("#rightCol").empty(); + $("#ems").empty(); + $("#police").empty(); + $("#taxi").empty(); + $("#mechanic").empty(); + $("#cardealer").empty(); + $("#estate").empty(); + } + if (item.addRowLeft) { + $("#leftCol").append(item.addRowLeft); + } + if (item.addRowRight) { + $("#rightCol").append(item.addRowRight); + } + if (item.playerCount) { + $("#playerCount").append(item.playerCount); + } + if (item.page) { + $("#pageCount").append(item.page); + } + if (item.serverIcon) { + $("#serverIcon").attr('src', item.serverIcon); + } + if (item.emsCount) { + $("#ems").append(item.emsCount); + } + if (item.policeCount) { + $("#police").append(item.policeCount); + } + if (item.taxiCount) { + $("#taxi").append(item.taxiCount); + } + if (item.mechanicCount) { + $("#mechanic").append(item.mechanicCount); + } + if (item.cardealerCount) { + $("#cardealer").append(item.cardealerCount); + } + if (item.estateCount) { + $("#estate").append(item.estateCount); + } + + } ); +} ) +function copyText(text) { + var $temp = $(""); + $("body").append($temp); + $temp.val(text).select(); + document.execCommand("copy"); + $temp.remove(); +} + +function sendData( name, data ) { + $.post( "http://" + resourceName + "/" + name, JSON.stringify( data ), function( datab ) { + if ( datab != "ok" ) { + return false; + } + } ); + return true; +} \ No newline at end of file diff --git a/resources/EGRP-Playerlist/README.md b/resources/EGRP-Playerlist/README.md new file mode 100644 index 000000000..697740411 --- /dev/null +++ b/resources/EGRP-Playerlist/README.md @@ -0,0 +1,41 @@ +# Bad-Scoreboard +The best Fivem Scoreboard created [A Fivem Script] + +## Jared's Developer Community [Discord] +[![Developer Discord](https://discordapp.com/api/guilds/597445834153525298/widget.png?style=banner4)](https://discord.com/invite/WjB5VFz) + +## What is it? + +Bad-Scoreboard (or Bad-ServerList as I like to call it) is a simple Fivem scoreboard script for your Fivem server. This makes the scoreboard a lot prettier and utilizes discord to actually show who is who. A user's discord name and avatar are displayed on the scoreboard so long as their discord ID is found successfully by the Fivem application client. The scoreboard has multiple pages and has a `PageSize` variable in the `config.lua` that can be edited to determine how many users are shown on each page. I found that 10 worked out to be the best delimiter. Pages can be cycled through by just clicking the `UP_ARROW` button again. The `UP_ARROW` displays the scoreboard and each time you click it the next page is brought up (if there are more players than the page can handle). I really like the layout of the scoreboard and figured others would too, so here it is. Enjoy. All I ask is that if you enjoy this resource, please give it a like on the forum page, on GitHub (if you have an account), and pop me a follow over on GitHub. Followers on GitHub are to me are considered more important than social media to me lol. So please help me get famous. Best Regards as always, Badger :) + +## Installation (discord_perms) + +### The script in this video is not installing this script, but much of what you do in this video is the same for this configuration file: + +https://www.youtube.com/watch?v=sjbFzkII2T0 + +## Screenshots + +![Scoreboard Example (1 Page)](https://i.gyazo.com/70c30e8d777daf527626672024131c4e.png) + +![Multiple Scoreboard Pages](https://i.gyazo.com/21066d5a999e768b7ea2080065851a10.gif) + +## Configuration + +``` +---------------------- +--- Bad-ServerList --- +---------------------- +Config = { + GuildID = '', + BotToken = '', + Default_Profile = "https://www.gamesindustry.biz/img/base/default-user.png", -- Discord Avatar column picture if theirs is not found + Discord_Not_Found = "Not Found", -- This will display under 'Discord Name' column if their name is not found + ServerName = 'Noir Roleplay', + PageSize = 10, +} +``` + +## Download + +https://github.com/JaredScar/Bad-Scoreboard diff --git a/resources/EGRP-Playerlist/__resource.lua b/resources/EGRP-Playerlist/__resource.lua new file mode 100644 index 000000000..6fe21e74c --- /dev/null +++ b/resources/EGRP-Playerlist/__resource.lua @@ -0,0 +1,14 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +client_script "config.lua" +server_script "config.lua" +client_script 'client.lua' +server_script "server.lua" + +ui_page "NUI/panel.html" + +files { + "NUI/panel.js", + "NUI/panel.html", + "NUI/panel.css", +} \ No newline at end of file diff --git a/resources/EGRP-Playerlist/client.lua b/resources/EGRP-Playerlist/client.lua new file mode 100644 index 000000000..a49dfec6a --- /dev/null +++ b/resources/EGRP-Playerlist/client.lua @@ -0,0 +1,186 @@ +---------------------------- +--- Bootstrap-Scoreboard --- +---------------------------- +AddEventHandler('playerSpawned', function() + if not alreadySet then + TriggerServerEvent('Bad-ServerList:SetupImg') + alreadySet = true; + end +end) +alreadySet = false; +nui = false; +pageSize = Config.PageSize; +pageCount = 1; +count = 0; +function mod(a, b) + return a - (math.floor(a/b)*b) +end + +jobCounts = {}; +RegisterNetEvent('Bad-ServerList:JobCountUpdate') +AddEventHandler('Bad-ServerList:JobCountUpdate', function(jobCounts) + jobCounts = jobCounts; +end) +function ternary ( cond , T , F ) + if cond then return T else return F end +end +curCount = 0; +Citizen.CreateThread(function() + local key = Config.ScoreboardKey; + nui = false; + local col = true; + while true do + Wait(1); + if IsControlPressed(0, key) then + if not nui then + local left = ""; + local right = ""; + col = true; + local maxCount = 0; + for id, ava in pairs(avatarss) do + maxCount = maxCount + 1; + end + local counter = 0; + local keys = {} + for key, ava in pairs(avatarss) do + table.insert(keys, tonumber(key)); + end + table.sort(keys); + for key = 1, #keys do + local id = tostring(keys[key]); + local ava = avatarss[id]; + if (count < (pageSize * pageCount) and counter >= curCount) then + if (pingss[id] ~= nil and playerNames[id] ~= nil and discordNames[id] ~= nil) then + if pingss[id] < 60 then + left = left .. '' .. + '' .. discordNames[id]:gsub("<", ""):gsub(">", "") .. '' .. + "" .. playerNames[id]:gsub("<", ""):gsub(">", "") .. "" .. + "" .. id .. "" .. + "" .. pingss[id] .. "ms" .. + ""; + end + if pingss[id] >= 60 and pingss[id] < 90 then + left = left .. '' .. + '' .. discordNames[id]:gsub("<", ""):gsub(">", "") .. '' .. + "" .. playerNames[id]:gsub("<", ""):gsub(">", "") .. "" .. + "" .. id .. "" .. + "" .. pingss[id] .. "ms" .. + ""; + end + if pingss[id] >= 90 then + left = left .. '' .. + '' .. discordNames[id]:gsub("<", ""):gsub(">", "") .. '' .. + "" .. playerNames[id]:gsub("<", ""):gsub(">", "") .. "" .. + "" .. id .. "" .. + "" .. pingss[id] .. "ms" .. + ""; + end + count = count + 1; + --[[ + if col then + -- Left col + col = false; + left = left .. '' .. + '' .. discordNames[id]:gsub("<", ""):gsub(">", "") .. '' .. + "" .. playerNames[id]:gsub("<", ""):gsub(">", "") .. "" .. + "" .. id .. "" .. + "" .. pingss[id] .. "ms" .. + ""; + else + -- Right col + col = true; + right = right .. '' .. + '' .. + '' .. discordNames[id]:gsub("<", ""):gsub(">", "") .. '' .. + "" .. playerNames[id]:gsub("<", ""):gsub(">", "") .. "" .. + "" .. id .. "" .. + "" .. pingss[id] .. "ms" .. + ""; + end + count = count + 1; + print("Count is now: " .. count) + ]]-- + end + end + counter = counter + 1; + end + SendNUIMessage({ + addRowLeft = left, + --addRowRight = right, + playerCount = "Players: " .. maxCount .. " / " .. Config.ServerSlots, + page = "Page: " .. pageCount, + serverIcon = Config.ServerIcon, + emsCount = ternary(jobCounts["ambulance"] ~= nil, jobCounts["ambulance"], '0'), + policeCount = ternary(jobCounts["police"] ~= nil, jobCounts["police"], '0'), + taxiCount = ternary(jobCounts["taxi"] ~= nil, jobCounts["taxi"], '0'), + mechanicCount = ternary(jobCounts["mechanic"] ~= nil, jobCounts["mechanic"], '0'), + cardealerCount = ternary(jobCounts["cardealer"] ~= nil, jobCounts["cardealer"], '0'), + estateCount = ternary(jobCounts["realestateagent"] ~= nil, jobCounts["realestateagent"], '0') + }) + if (count >= maxCount) then + print("Count is=" .. count .. " and maxCount=" .. maxCount) + count = 0; + pageCount = 1; + col = true; + curCount = 0; + end + if (count >= (pageSize * pageCount)) then + pageCount = pageCount + 1; + curCount = (pageSize * pageCount) - pageSize; -- Used to be -10 + col = true; + end + SendNUIMessage({ + display = true; + }) + + nui = true + while nui do + Wait(0) + if(IsControlPressed(0, key) == false) then + nui = false + SendNUIMessage({ + display = false; + }) + break + end + end + end + end + end +end) +avatarss = {} +pingss = {} +playerNames = {} +discordNames = {} +RegisterNetEvent('Bad-ServerList:DiscordUpdate') +AddEventHandler('Bad-ServerList:DiscordUpdate', function(players) + discordNames = {}; + for id, discordName in pairs(players) do + --print("[" .. id .. "] Avatar == " .. ava) + discordNames[id] = discordName; + end +end) +RegisterNetEvent('Bad-ServerList:PlayerUpdate') +AddEventHandler('Bad-ServerList:PlayerUpdate', function(players) + playerNames = {}; + for id, playerName in pairs(players) do + --print("[" .. id .. "] Avatar == " .. ava) + playerNames[id] = playerName; + end +end) +RegisterNetEvent('Bad-ServerList:PingUpdate') +AddEventHandler('Bad-ServerList:PingUpdate', function(pingList) + pingss = {}; + for id, ping in pairs(pingList) do + --print("[" .. id .. "] Avatar == " .. ava) + pingss[id] = ping; + end +end) +RegisterNetEvent('Bad-ServerList:ClientUpdate') +AddEventHandler('Bad-ServerList:ClientUpdate', function(avas) + avatarss = {}; + for id, ava in pairs(avas) do + --print("[" .. id .. "] Avatar == " .. ava) + avatarss[id] = ava; + end +end) \ No newline at end of file diff --git a/resources/EGRP-Playerlist/config.lua b/resources/EGRP-Playerlist/config.lua new file mode 100644 index 000000000..3207170e2 --- /dev/null +++ b/resources/EGRP-Playerlist/config.lua @@ -0,0 +1,11 @@ +---------------------------- +--- Bootstrap-Scoreboard --- +---------------------------- +Config = { + Default_Profile = "https://media4.giphy.com/media/3zhxq2ttgN6rEw8SDx/giphy.gif", -- Discord Avatar column picture if theirs is not found + ScoreboardKey = 27, -- 27 is UP, 57 is F10 + Discord_Not_Found = "Not Found", -- This will display under 'Discord Name' column if their name is not found + ServerIcon = "https://i.imgur.com/ZPdWoUn.png", + PageSize = 15, + ServerSlots = 64, +} \ No newline at end of file diff --git a/resources/EGRP-Playerlist/server.lua b/resources/EGRP-Playerlist/server.lua new file mode 100644 index 000000000..233c30fb6 --- /dev/null +++ b/resources/EGRP-Playerlist/server.lua @@ -0,0 +1,144 @@ +---------------------------- +--- Bootstrap-Scoreboard --- +---------------------------- +ESX = nil; +Citizen.CreateThread(function() + while ESX == nil do + TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) + Citizen.Wait(0) + end +end) + +avatars = {} +discordNames = {} +RegisterNetEvent('Bad-ServerList:SetupImg') +AddEventHandler('Bad-ServerList:SetupImg', function() + -- Add their avatar + local src = source; + local license = ExtractIdentifiers(src).license; + -- Only run this code if they have not been set up already + if avatars[license] == nil then + local ava = GetAvatar(src); + local discordName = GetDiscordName(src); + if (ava ~= nil) then + avatars[license] = ava; + else + avatars[license] = Config.Default_Profile; + end + if (discordName ~= nil) then + discordNames[license] = discordName; + else + discordNames[license] = Config.Discord_Not_Found; + end + end +end) +AddEventHandler('onResourceStart', function(resourceName) + if (GetCurrentResourceName() == resourceName) then + -- It's this resource + for _, id in pairs(GetPlayers()) do + Wait(3000); + TriggerEvent('Bad-ServerList:SetupRestart', id); + end + end +end) +RegisterNetEvent('Bad-ServerList:SetupRestart') +AddEventHandler('Bad-ServerList:SetupRestart', function(src) + -- Add their avatar + local ava = GetAvatar(src); + local discordName = GetDiscordName(src); + local license = ExtractIdentifiers(src).license; + if (ava ~= nil) then + avatars[license] = ava; + else + avatars[license] = Config.Default_Profile;; + end + if (discordName ~= nil) then + discordNames[license] = discordName; + else + discordNames[license] = Config.Discord_Not_Found; + end +end) + +Citizen.CreateThread(function() + while true do + Wait((1000 * 5)); -- Every 5 seconds, update + local avatarIDs = {}; + local pings = {}; + local players = {}; + local discords = {}; + local jobCounts = {}; + for _, id in ipairs(GetPlayers()) do + local license = ExtractIdentifiers(id).license; + local ping = GetPlayerPing(id); + players[id] = GetPlayerName(id); + if (ESX ~= nil) then + local xPlayer = ESX.GetPlayerFromId(id); + if (xPlayer ~= nil) then + if (jobCounts[xPlayer.job.name] ~= nil) then + local currCount = jobCounts[xPlayer.job.name]; + jobCounts[xPlayer.job.name] = currCount + 1; + else + jobCounts[xPlayer.job.name] = 1; + end + end + end + pings[id] = ping; + if (avatars[license] ~= nil) then + avatarIDs[id] = avatars[license]; + else + avatarIDs[id] = Config.Default_Profile; + end + if (discordNames[license] ~= nil) then + discords[id] = discordNames[license] + else + discords[id] = Config.Discord_Not_Found; + end + end + TriggerClientEvent('Bad-ServerList:PlayerUpdate', -1, players) + TriggerClientEvent('Bad-ServerList:PingUpdate', -1, pings) + TriggerClientEvent('Bad-ServerList:ClientUpdate', -1, avatarIDs) + TriggerClientEvent('Bad-ServerList:DiscordUpdate', -1, discords) + TriggerClientEvent('Bad-ServerList:JobCountUpdate', -1, jobCounts); + end +end) + + +function GetAvatar(user) + return exports.Badger_Discord_API:GetDiscordAvatar(user); +end +function GetDiscordName(user) + return exports.Badger_Discord_API:GetDiscordName(user); +end + +function ExtractIdentifiers(src) + local identifiers = { + steam = "", + ip = "", + discord = "", + license = "", + xbl = "", + live = "" + } + + --Loop over all identifiers + for i = 0, GetNumPlayerIdentifiers(src) - 1 do + local id = GetPlayerIdentifier(src, i) + + --Convert it to a nice table. + if string.find(id, "steam") then + identifiers.steam = id + elseif string.find(id, "ip") then + identifiers.ip = id + elseif string.find(id, "discord") then + identifiers.discord = id + elseif string.find(id, "license") then + identifiers.license = id + elseif string.find(id, "xbl") then + identifiers.xbl = id + elseif string.find(id, "live") then + identifiers.live = id + end + end + + return identifiers +end \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Badger_Discord_API/LICENSE b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/LICENSE new file mode 100644 index 000000000..a210d6be4 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jared Scarito + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/resources/[EGRP-Discord-Integration]/Badger_Discord_API/README.md b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/README.md new file mode 100644 index 000000000..e213a5abd --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/README.md @@ -0,0 +1,153 @@ +# Badger_Discord_API + +## Documentation +https://docs.badger.store/fivem-discord-scripts/badger_discord_api + +## Jared's Developer Community [Discord] +[![Developer Discord](https://discordapp.com/api/guilds/597445834153525298/widget.png?style=banner4)](https://discord.com/invite/WjB5VFz) + +## Notes +Some methods of the API not may fully work or be broken. I was able to test most and 75% of it works. If something does not work, please just submit an issue or pull request for it on the GitHub page. I will be making a more reinforced documentation for this whole API sometime in the future, but for now please just make use of the example.lua file for understanding it all. Thanks! + +## What is it? +This is essentially a Discord API for FiveM. It utilizes the REST API of Discord for all your essential needs :) Things that are heavy in Discord rate limiting (such as retreiving all server roles and player avatars) will be automatically stored to a cache for developers automatically. I will be moving all my scripts over to use this API for better ease of use. Some features include not having to gather role IDs at all, since the script gets the server's roles automatically, so you can just specify the role's name instead of role IDs at all (however, be aware that this will break then if someone changes the roles' names on Discord)... I hope you can all find some use for this, I know I will :P + +## Scripts that utilize the API +https://forum.cfx.re/t/release-badgertools-major-revamp/665756/ +https://forum.cfx.re/t/discordaceperms-release/573044 +https://forum.cfx.re/t/release-bad-discordqueue-a-discord-role-based-queue-system-by-badger/1394685 +https://forum.cfx.re/t/discordtagids-i-know-i-know-i-only-make-discord-based-scripts/582513 +https://forum.cfx.re/t/discordchatroles-release/566338 + +## Example Usage: + +``` +-- IMPORTANT: +-- For use in other resources, you will need to use: +-- exports.Badger_Discord_API: +-- +-- For example: +-- exports.Badger_Discord_API:GetRoleIdFromRoleName("roleName") + +RegisterCommand('testResource', function(source, args, rawCommand) + local user = source; -- The user + + + +-- function GetRoleIdFromRoleName(name) +-- Returns nil if not found +-- Returns Discord Role ID if found +-- Usage: + local roleName = "Founder"; -- Change this to an existing role name on your Discord server + + local roleID = GetRoleIdFromRoleName(roleName); + print("[Badger_Perms Example] The roleID for (" .. roleName .. ") is: " .. tostring(roleID)); + +-- function IsDiscordEmailVerified(user) +-- Returns false if not found +-- Returns true if verified +-- Usage: + local isVerified = IsDiscordEmailVerified(user); + print("[Badger_Perms Example] Player " .. GetPlayerName(user) .. " has Discord email verified?: " .. tostring(isVerified)); + +-- function GetDiscordEmail(user) +-- Returns nil if not found +-- Returns Email if found +-- Usage: + local emailAddr = GetDiscordEmail(user); + print("[Badger_Perms Example] Player " .. GetPlayerName(user) .. " has Discord email address: " .. tostring(emailAddr)); + +-- function GetDiscordName(user) +-- Returns nil if not found +-- Returns Discord name if found +-- Usage: + local name = GetDiscordName(user); + print("[Badger_Perms Example] Player " .. GetPlayerName(user) .. " has Discord name: " .. tostring(name)); + +-- function GetGuildIcon() +-- Returns nil if not found +-- Returns URL if found +-- Usage: + local icon_URL = GetGuildIcon(); + print("[Badger_Perms Example] Guild icon URL is: " .. tostring(icon_URL)); + +-- function GetGuildSplash() +-- Returns nil if not found +-- Returns URL if found +-- Usage: + local splash_URL = GetGuildSplash(); + print("[Badger_Perms Example] Guild splash URL is: " .. tostring(splash_URL)); + +-- function GetGuildName() +-- Returns nil if not found +-- Returns name if found +-- Usage: + local guildName = GetGuildName(); + print("[Badger_Perms Example] Guild name is: " .. tostring(guildName)); + +-- function GetGuildDescription() +-- Returns nil if not found +-- Returns description if found +-- Usage: + local guildDesc = GetGuildDescription(); + print("[Badger_Perms Example] Guild description is: " .. tostring(guildDesc)); + +-- function GetGuildMemberCount() +-- Returns nil if not found +-- Returns member count if found +-- Usage: + local guildMemCount = GetGuildMemberCount(); + print("[Badger_Perms Example] Guild member count is: " .. tostring(guildMemCount)); + +-- function GetGuildOnlineMemberCount() +-- Returns nil if not found +-- Returns description if found +-- Usage: + local onlineMemCount = GetGuildOnlineMemberCount(); + print("[Badger_Perms Example] Guild online member count is: " .. tostring(onlineMemCount)); + +-- function GetDiscordAvatar(user) +-- Returns nil if not found +-- Returns URL if found +-- Usage: + local avatar = GetDiscordAvatar(user); + print("[Badger_Perms Example] Player " .. GetPlayerName(user) .. " has Discord avatar: " .. tostring(avatar)); + +-- function GetDiscordNickname(user) +-- Returns nil if not found +-- Returns nickname if found +-- Usage: + local nickname = GetDiscordNickname(user); + print("[Badger_Perms Example] Player " .. GetPlayerName(user) .. " has Discord nickname: " .. tostring(nickname)); + +-- function GetGuildRoleList() +-- Returns nil if not found +-- Returns associative array if found +-- Usage: + local roles = GetGuildRoleList(); + for roleName, roleID in pairs(roles) do + print(roleName .. " === " .. roleID); + end + +-- function GetDiscordRoles(user) +-- Returns nil if not found +-- Returns array if found +-- Usage: + local roles = GetDiscordRoles(user) + for i = 1, #roles do + print(roles[i]); + end + +-- function CheckEqual(role1, role2) +-- Returns false if not equal +-- Returns true if equal +-- Usage: + local isRolesEqual = CheckEqual("Founder", 597446100206616596); + local isRolesEqual2 = CheckEqual("FounderRef", "Founder"); -- Refer to config.lua file, this is basically checking if FounderRef in the config is + -- equal to the Founder role's ID +end) +``` + +## Download + +https://github.com/JaredScar/Badger_Discord_API diff --git a/resources/[EGRP-Discord-Integration]/Badger_Discord_API/__resource.lua b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/__resource.lua new file mode 100644 index 000000000..c367364dc --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/__resource.lua @@ -0,0 +1,30 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +client_scripts { + 'client.lua', +} + +server_scripts { + 'config.lua', + "server.lua", -- Uncomment this line + --"example.lua" -- Remove this when you actually start using the script!!! +} + +server_exports { + "GetDiscordRoles", + "GetRoleIdfromRoleName", + "GetDiscordAvatar", + "GetDiscordName", + "GetDiscordEmail", + "IsDiscordEmailVerified", + "GetDiscordNickname", + "GetGuildIcon", + "GetGuildSplash", + "GetGuildName", + "GetGuildDescription", + "GetGuildMemberCount", + "GetGuildOnlineMemberCount", + "GetGuildRoleList", + "ResetCaches", + "CheckEqual" +} \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Badger_Discord_API/client.lua b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/client.lua new file mode 100644 index 000000000..607b28b8d --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/client.lua @@ -0,0 +1,8 @@ +triggered = false; +AddEventHandler("playerSpawned", function() + if not triggered then + triggered = true; + Citizen.Wait((1000 * 20)); -- Wait 20 seconds + TriggerServerEvent('Badger_Discord_API:PlayerLoaded'); + end +end) \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Badger_Discord_API/config.lua b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/config.lua new file mode 100644 index 000000000..6270492e1 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/config.lua @@ -0,0 +1,38 @@ +Config = { + Guild_ID = '361895986198609920', + Bot_Token = 'NTI4NjYwNTc5MjA4OTIxMDk4.DwljPg.T-EapLt0H4szdfByBQIh7ks3kb8', + RoleList = {}, + ["Silver Supporter 🥈"] = "596414797977878530", + ["Gold Supporter 🥇"] = "742482159851536455", + ["Platinum Supporter 💠"] = "742482158945566771", + ["Diamond Supporter 💎"] = "742482161680122047", + ["LSPD"] = "807381507622305852", + ["BCSO"] = "807381508167565352", + ["SASP"] = "807381508859887667", + ["SAFD"] = "807381509195300905", + ["Civilian I"] = "813907383892967424", + ["Civilian II"] = "876585455615889450", + ["Civilian III"] = "876585456387629066", + ["Civilian IV"] = "876585900946128936", + ["Civilian V"] = "876585431901294663", + ["EG | Helper"] = "538822780662054963", + ["EG | Staff"] = "608583076037001225", + ["EG | Sr. Staff"] = "789551229549281331", + ["EG | Moderator"] = "517060882686279701", + ["EG | Sr. Moderator"] = "789538166536798248", + ["EG | Admin"] = "635155687688634399", + ["EG | Sr. Admin"] = "556158473981788176", + ["EG | Head of Staff"] = "650653280275267591", + ["EG | Server Developer"] = "671141073728307228", + ["EG | Owner"] = "361899298209923075", +} + +Config.Splash = { + Header_IMG = 'https://forum.cfx.re/uploads/default/original/3X/a/6/a6ad03c9fb60fa7888424e7c9389402846107c7e.png', + Enabled = false, + Wait = 10, -- How many seconds should splash page be shown for? (Max is 12) + Heading1 = "Welcome to [ServerName]", + Heading2 = "Make sure to join our Discord and check out our website!", + Discord_Link = 'https://discord.gg', + Website_Link = 'https://badger.store', +} \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Badger_Discord_API/example.lua b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/example.lua new file mode 100644 index 000000000..0d28e1042 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/example.lua @@ -0,0 +1,124 @@ +-- IMPORTANT: +-- For use in other resources, you will need to use: +-- exports.Badger_Discord_API: +-- +-- For example: +-- exports.Badger_Discord_API:GetRoleIdFromRoleName("roleName") + +RegisterCommand('testResource', function(source, args, rawCommand) + local user = source; -- The user + + + +-- function GetRoleIdFromRoleName(name) +-- Returns nil if not found +-- Returns Discord Role ID if found +-- Usage: + local roleName = "Founder"; -- Change this to an existing role name on your Discord server + + local roleID = GetRoleIdFromRoleName(roleName); + print("[Badger_Perms Example] The roleID for (" .. roleName .. ") is: " .. tostring(roleID)); + +-- function IsDiscordEmailVerified(user) +-- Returns false if not found +-- Returns true if verified +-- Usage: + local isVerified = IsDiscordEmailVerified(user); + print("[Badger_Perms Example] Player " .. GetPlayerName(user) .. " has Discord email verified?: " .. tostring(isVerified)); + +-- function GetDiscordEmail(user) +-- Returns nil if not found +-- Returns Email if found +-- Usage: + local emailAddr = GetDiscordEmail(user); + print("[Badger_Perms Example] Player " .. GetPlayerName(user) .. " has Discord email address: " .. tostring(emailAddr)); + +-- function GetDiscordName(user) +-- Returns nil if not found +-- Returns Discord name if found +-- Usage: + local name = GetDiscordName(user); + print("[Badger_Perms Example] Player " .. GetPlayerName(user) .. " has Discord name: " .. tostring(name)); + +-- function GetGuildIcon() +-- Returns nil if not found +-- Returns URL if found +-- Usage: + local icon_URL = GetGuildIcon(); + print("[Badger_Perms Example] Guild icon URL is: " .. tostring(icon_URL)); + +-- function GetGuildSplash() +-- Returns nil if not found +-- Returns URL if found +-- Usage: + local splash_URL = GetGuildSplash(); + print("[Badger_Perms Example] Guild splash URL is: " .. tostring(splash_URL)); + +-- function GetGuildName() +-- Returns nil if not found +-- Returns name if found +-- Usage: + local guildName = GetGuildName(); + print("[Badger_Perms Example] Guild name is: " .. tostring(guildName)); + +-- function GetGuildDescription() +-- Returns nil if not found +-- Returns description if found +-- Usage: + local guildDesc = GetGuildDescription(); + print("[Badger_Perms Example] Guild description is: " .. tostring(guildDesc)); + +-- function GetGuildMemberCount() +-- Returns nil if not found +-- Returns member count if found +-- Usage: + local guildMemCount = GetGuildMemberCount(); + print("[Badger_Perms Example] Guild member count is: " .. tostring(guildMemCount)); + +-- function GetGuildOnlineMemberCount() +-- Returns nil if not found +-- Returns description if found +-- Usage: + local onlineMemCount = GetGuildOnlineMemberCount(); + print("[Badger_Perms Example] Guild online member count is: " .. tostring(onlineMemCount)); + +-- function GetDiscordAvatar(user) +-- Returns nil if not found +-- Returns URL if found +-- Usage: + local avatar = GetDiscordAvatar(user); + print("[Badger_Perms Example] Player " .. GetPlayerName(user) .. " has Discord avatar: " .. tostring(avatar)); + +-- function GetDiscordNickname(user) +-- Returns nil if not found +-- Returns nickname if found +-- Usage: + local nickname = GetDiscordNickname(user); + print("[Badger_Perms Example] Player " .. GetPlayerName(user) .. " has Discord nickname: " .. tostring(nickname)); + +-- function GetGuildRoleList() +-- Returns nil if not found +-- Returns associative array if found +-- Usage: + local roles = GetGuildRoleList(); + for roleName, roleID in pairs(roles) do + print(roleName .. " === " .. roleID); + end + +-- function GetDiscordRoles(user) +-- Returns nil if not found +-- Returns array if found +-- Usage: + local roles = GetDiscordRoles(user) + for i = 1, #roles do + print(roles[i]); + end + +-- function CheckEqual(role1, role2) +-- Returns false if not equal +-- Returns true if equal +-- Usage: + local isRolesEqual = CheckEqual("Founder", 597446100206616596); + local isRolesEqual2 = CheckEqual("FounderRef", "Founder"); -- Refer to config.lua file, this is basically checking if FounderRef in the config is + -- equal to the Founder role's ID +end) diff --git a/resources/[EGRP-Discord-Integration]/Badger_Discord_API/server.lua b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/server.lua new file mode 100644 index 000000000..f14878c80 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Badger_Discord_API/server.lua @@ -0,0 +1,436 @@ +local FormattedToken = "Bot " .. Config.Bot_Token + +Citizen.CreateThread(function() + if (GetCurrentResourceName() ~= "Badger_Discord_API") then + --StopResource(GetCurrentResourceName()); + print("[" .. GetCurrentResourceName() .. "] " .. "IMPORTANT: This resource must be named Badger_Discord_API for it to work properly with other scripts..."); + end + --print("[Badger_Discord_API] For support, make sure to join Badger's official Discord server: discord.gg/WjB5VFz"); +end) + +tracked = {} + +RegisterNetEvent('Badger_Discord_API:PlayerLoaded') +AddEventHandler('Badger_Discord_API:PlayerLoaded', function() + if (GetCurrentResourceName() ~= "Badger_Discord_API") then + TriggerClientEvent('chatMessage', -1, '^1[^5SCRIPT ERROR^1] ^3The script ^1' .. GetCurrentResourceName() .. ' ^3will not work properly... You must ' + .. 'rename the resource to ^1Badger_Discord_API'); + end + local license = ExtractIdentifiers(source).license; + if (tracked[license] == nil) then + tracked[license] = true; + --TriggerClientEvent('chatMessage', source, + --'^1[^5Badger_Discord_API^1] ^3The Discord API script was created by Badger. You may join his Discord at: ^6discord.gg/WjB5VFz') + end +end) + +--card = '{"type":"AdaptiveCard","$schema":"http://adaptivecards.io/schemas/adaptive-card.json","version":"1.2","body":[{"type":"Container","items":[{"type":"TextBlock","text":"Badger_Discord_API","wrap":true,"fontType":"Default","size":"ExtraLarge","weight":"Bolder","color":"Light","horizontalAlignment":"Center"},{"type":"TextBlock","text":"' .. Config.Splash.Heading1 .. '","wrap":true,"size":"Large","weight":"Bolder","color":"Light"},{"type":"TextBlock","text":"' .. Config.Splash.Heading2 .. '","wrap":true,"color":"Light","size":"Medium"},{"type":"ColumnSet","height":"stretch","minHeight":"100px","bleed":true,"horizontalAlignment":"Center","columns":[{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Discord","url":"' .. Config.Splash.Discord_Link .. '","style":"positive"}]}],"height":"stretch"},{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Website","style":"positive","url":"' .. Config.Splash.Website_Link .. '"}]}]}]},{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Click to join Badger\'s Discord","style":"destructive","iconUrl":"https://i.gyazo.com/c629f37bb1aeed2c1bc1768fdc93bc1a.gif","url":"https://discord.com/invite/WjB5VFz"}]}],"style":"default","bleed":true,"height":"stretch","isVisible":true}]}' +card = '{"type":"AdaptiveCard","$schema":"http://adaptivecards.io/schemas/adaptive-card.json","version":"1.2","body":[{"type":"Image","url":"' .. Config.Splash.Header_IMG .. '","horizontalAlignment":"Center"},{"type":"Container","items":[{"type":"TextBlock","text":"Badger_Discord_API","wrap":true,"fontType":"Default","size":"ExtraLarge","weight":"Bolder","color":"Light","horizontalAlignment":"Center"},{"type":"TextBlock","text":"' .. Config.Splash.Heading1 .. '","wrap":true,"size":"Large","weight":"Bolder","color":"Light", "horizontalAlignment":"Center"},{"type":"TextBlock","text":"' .. Config.Splash.Heading2 .. '","wrap":true,"color":"Light","size":"Medium","horizontalAlignment":"Center"},{"type":"ColumnSet","height":"stretch","minHeight":"100px","bleed":true,"horizontalAlignment":"Center","columns":[{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Discord","url":"' .. Config.Splash.Discord_Link .. '","style":"positive"}]}],"height":"stretch"},{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Website","style":"positive","url":"' .. Config.Splash.Website_Link .. '"}]}]}]},{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Click to join Badger\'s Discord","style":"destructive","iconUrl":"https://i.gyazo.com/c629f37bb1aeed2c1bc1768fdc93bc1a.gif","url":"https://discord.com/invite/WjB5VFz"}]}],"style":"default","bleed":true,"height":"stretch","isVisible":true}]}' +if Config.Splash.Enabled then + AddEventHandler('playerConnecting', function(name, setKickReason, deferrals) + -- Player is connecting + deferrals.defer(); + local src = source; + local toEnd = false; + local count = 0; + while not toEnd do + deferrals.presentCard(card, + function(data, rawData) + end) + Wait((1000)) + count = count + 1; + if count == Config.Splash.Wait then + toEnd = true; + end + end + deferrals.done(); + end) +end + +function ExtractIdentifiers(src) + local identifiers = { + steam = "", + ip = "", + discord = "", + license = "", + xbl = "", + live = "" + } + + --Loop over all identifiers + for i = 0, GetNumPlayerIdentifiers(src) - 1 do + local id = GetPlayerIdentifier(src, i) + + --Convert it to a nice table. + if string.find(id, "steam") then + identifiers.steam = id + elseif string.find(id, "ip") then + identifiers.ip = id + elseif string.find(id, "discord") then + identifiers.discord = id + elseif string.find(id, "license") then + identifiers.license = id + elseif string.find(id, "xbl") then + identifiers.xbl = id + elseif string.find(id, "live") then + identifiers.live = id + end + end + + return identifiers +end +function DiscordRequest(method, endpoint, jsondata) + local data = nil + PerformHttpRequest("https://discordapp.com/api/"..endpoint, function(errorCode, resultData, resultHeaders) + data = {data=resultData, code=errorCode, headers=resultHeaders} + end, method, #jsondata > 0 and json.encode(jsondata) or "", {["Content-Type"] = "application/json", ["Authorization"] = FormattedToken}) + + while data == nil do + Citizen.Wait(0) + end + + return data +end + +function GetRoleIdFromRoleName(name) + if (Caches.RoleList ~= nil) then + return tonumber(Caches.RoleList[name]); + else + local roles = GetGuildRoleList(); + return tonumber(roles[name]); + end +end + +function CheckEqual(role1, role2) + local checkStr1 = false; + local checkStr2 = false; + local roleID1 = role1; + local roleID2 = role2; + if type(role1) == "string" then checkStr1 = true end; + if type(role2) == "string" then checkStr2 = true end; + if checkStr1 then + local roles = GetGuildRoleList(); + for roleName, roleID in pairs(roles) do + if roleName == role1 then + roleID1 = roleID; + end + end + local roles2 = Config.RoleList; + for roleRef, roleID in pairs(roles2) do + if roleRef == role1 then + roleID1 = roleID; + end + end + end + if checkStr2 then + local roles = GetGuildRoleList(); + for roleName, roleID in pairs(roles) do + if roleName == role2 then + roleID2 = roleID; + end + end + local roles2 = Config.RoleList; + for roleRef, roleID in pairs(roles2) do + if roleRef == role2 then + roleID2 = roleID; + end + end + end + if tonumber(roleID1) == tonumber(roleID2) then + return true; + end + return false; +end + +function IsDiscordEmailVerified(user) + local discordId = nil + local isVerified = false; + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + break + end + end + if discordId then + local endpoint = ("users/%s"):format(discordId) + local member = DiscordRequest("GET", endpoint, {}) + if member.code == 200 then + local data = json.decode(member.data) + if data ~= nil then + -- It is valid data + --print("The data for User " .. GetPlayerName(user) .. " is: "); + --print(data.avatar); + isVerified = data.verified; + --print("---") + end + else + print("[Badger_Perms] ERROR: Code 200 was not reached. Error provided: " .. member.data) + end + end + return isVerified; +end + +function GetDiscordEmail(user) + local discordId = nil + local emailData = nil; + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + break + end + end + if discordId then + local endpoint = ("users/%s"):format(discordId) + local member = DiscordRequest("GET", endpoint, {}) + if member.code == 200 then + local data = json.decode(member.data) + if data ~= nil then + -- It is valid data + --print("The data for User " .. GetPlayerName(user) .. " is: "); + --print(data.avatar); + emailData = data.email; + --print("---") + end + else + print("[Badger_Perms] ERROR: Code 200 was not reached. Error provided: " .. member.data) + end + end + return emailData; +end + +function GetDiscordName(user) + local discordId = nil + local nameData = nil; + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + break + end + end + if discordId then + local endpoint = ("users/%s"):format(discordId) + local member = DiscordRequest("GET", endpoint, {}) + if member.code == 200 then + local data = json.decode(member.data) + if data ~= nil then + -- It is valid data + --print("The data for User " .. GetPlayerName(user) .. " is: "); + --print(data.avatar); + nameData = data.username .. "#" .. data.discriminator; + --print("---") + end + else + print("[Badger_Perms] ERROR: Code 200 was not reached. Error provided: " .. member.data) + end + end + return nameData; +end + +function GetGuildIcon() + local guild = DiscordRequest("GET", "guilds/"..Config.Guild_ID, {}) + if guild.code == 200 then + local data = json.decode(guild.data) + if (data.icon:sub(1, 1) and data.icon:sub(2, 2) == "_") then + -- It's a gif + return 'https://cdn.discordapp.com/icons/' .. Config.Guild_ID .. "/" .. data.icon .. ".gif"; + else + -- Image + return 'https://cdn.discordapp.com/icons/' .. Config.Guild_ID .. "/" .. data.icon .. ".png"; + end + else + print("[Badger_Perms] An error occured, please check your config and ensure everything is correct. Error: "..(guild.data or guild.code)) + end + return nil; +end + +function GetGuildSplash() + local guild = DiscordRequest("GET", "guilds/"..Config.Guild_ID, {}) + if guild.code == 200 then + local data = json.decode(guild.data) + -- Image + return 'https://cdn.discordapp.com/splashes/' .. Config.Guild_ID .. "/" .. data.icon .. ".png"; + else + print("[Badger_Perms] An error occured, please check your config and ensure everything is correct. Error: "..(guild.data or guild.code)) + end + return nil; +end + +function GetGuildName() + local guild = DiscordRequest("GET", "guilds/"..Config.Guild_ID, {}) + if guild.code == 200 then + local data = json.decode(guild.data) + -- Image + return data.name; + else + print("[Badger_Perms] An error occured, please check your config and ensure everything is correct. Error: "..(guild.data or guild.code)) + end + return nil; +end + +function GetGuildDescription() + local guild = DiscordRequest("GET", "guilds/"..Config.Guild_ID, {}) + if guild.code == 200 then + local data = json.decode(guild.data) + -- Image + return data.description; + else + print("[Badger_Perms] An error occured, please check your config and ensure everything is correct. Error: "..(guild.data or guild.code)) + end + return nil; +end + +function GetGuildMemberCount() + local guild = DiscordRequest("GET", "guilds/"..Config.Guild_ID.."?with_counts=true", {}) + if guild.code == 200 then + local data = json.decode(guild.data) + -- Image + return data.approximate_member_count; + else + print("[Badger_Perms] An error occured, please check your config and ensure everything is correct. Error: "..(guild.data or guild.code)) + end + return nil; +end + +function GetGuildOnlineMemberCount() + local guild = DiscordRequest("GET", "guilds/"..Config.Guild_ID.."?with_counts=true", {}) + if guild.code == 200 then + local data = json.decode(guild.data) + return data.approximate_presence_count; + else + print("[Badger_Perms] An error occured, please check your config and ensure everything is correct. Error: "..(guild.data or guild.code)) + end + return nil; +end + +function GetDiscordAvatar(user) + local discordId = nil + local imgURL = nil; + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + break + end + end + if discordId then + if Caches.Avatars[discordId] == nil then + local endpoint = ("users/%s"):format(discordId) + local member = DiscordRequest("GET", endpoint, {}) + if member.code == 200 then + local data = json.decode(member.data) + if data ~= nil and data.avatar ~= nil then + -- It is valid data + --print("The data for User " .. GetPlayerName(user) .. " is: "); + --print(data.avatar); + if (data.avatar:sub(1, 1) and data.avatar:sub(2, 2) == "_") then + --print("IMG URL: " .. "https://cdn.discordapp.com/avatars/" .. discordId .. "/" .. data.avatar .. ".gif") + imgURL = "https://cdn.discordapp.com/avatars/" .. discordId .. "/" .. data.avatar .. ".gif"; + else + --print("IMG URL: " .. "https://cdn.discordapp.com/avatars/" .. discordId .. "/" .. data.avatar .. ".png") + imgURL = "https://cdn.discordapp.com/avatars/" .. discordId .. "/" .. data.avatar .. ".png" + end + --print("---") + end + else + print("[Badger_Perms] ERROR: Code 200 was not reached. Error provided: " .. member.data) + end + Caches.Avatars[discordId] = imgURL; + else + imgURL = Caches.Avatars[discordId]; + end + else + print("[Badger_Perms] ERROR: Discord ID was not found...") + end + return imgURL; +end + +Caches = { + Avatars = {} +} +function ResetCaches() + Caches = {}; +end + +function GetGuildRoleList() + if (Caches.RoleList == nil) then + local guild = DiscordRequest("GET", "guilds/"..Config.Guild_ID, {}) + if guild.code == 200 then + local data = json.decode(guild.data) + -- Image + local roles = data.roles; + local roleList = {}; + for i = 1, #roles do + roleList[roles[i].name] = roles[i].id; + end + Caches.RoleList = roleList; + else + print("[Badger_Perms] An error occured, please check your config and ensure everything is correct. Error: "..(guild.data or guild.code)) + Caches.RoleList = nil; + end + end + return Caches.RoleList; +end + +function GetDiscordRoles(user) + local discordId = nil + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + break; + end + end + + if discordId then + local endpoint = ("guilds/%s/members/%s"):format(Config.Guild_ID, discordId) + local member = DiscordRequest("GET", endpoint, {}) + if member.code == 200 then + local data = json.decode(member.data) + local roles = data.roles + local found = true + return roles + else + print("[Badger_Perms] ERROR: Code 200 was not reached... Returning false. [Member Data NOT FOUND]") + return false + end + else + print("[Badger_Perms] ERROR: Discord was not connected to user's Fivem account...") + return false + end + return false +end + +function GetDiscordNickname(user) + local discordId = nil + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + break + end + end + + if discordId then + local endpoint = ("guilds/%s/members/%s"):format(Config.Guild_ID, discordId) + local member = DiscordRequest("GET", endpoint, {}) + if member.code == 200 then + local data = json.decode(member.data) + local nickname = data.nick + return nickname; + else + print("[Badger_Perms] ERROR: Code 200 was not reached. Error provided: "..member.data) + return nil; + end + else + print("[Badger_Perms] ERROR: Discord was not connected to user's Fivem account...") + return nil; + end + return nil; +end + +Citizen.CreateThread(function() + local guild = DiscordRequest("GET", "guilds/"..Config.Guild_ID, {}) + if guild.code == 200 then + local data = json.decode(guild.data) + print("[Badger_Perms] Permission system guild set to: "..data.name.." ("..data.id..")") + else + print("[Badger_Perms] An error occured, please check your config and ensure everything is correct. Error: "..(guild.data or guild.code)) + end +end) \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Discord-Logging/__resource.lua b/resources/[EGRP-Discord-Integration]/Discord-Logging/__resource.lua new file mode 100644 index 000000000..b94ce3c0a --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-Logging/__resource.lua @@ -0,0 +1,10 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +description 'Server Logging' + +version '1.0' + +server_script 'server.lua' +client_script 'client.lua' + +--edit and cleand up by NebelRebell diff --git a/resources/[EGRP-Discord-Integration]/Discord-Logging/client.lua b/resources/[EGRP-Discord-Integration]/Discord-Logging/client.lua new file mode 100644 index 000000000..429ba8012 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-Logging/client.lua @@ -0,0 +1,75 @@ +-- Made by Tazio +-- Help by qalle-fivem (esx_checkdeathcause) + +local Melee = { -1569615261, 1737195953, 1317494643, -1786099057, 1141786504, -2067956739, -868994466 } +local Bullet = { 453432689, 1593441988, 584646201, -1716589765, 324215364, 736523883, -270015777, -1074790547, -2084633992, -1357824103, -1660422300, 2144741730, 487013001, 2017895192, -494615257, -1654528753, 100416529, 205991906, 1119849093 } +local Knife = { -1716189206, 1223143800, -1955384325, -1833087301, 910830060, } +local Car = { 133987706, -1553120962 } +local Animal = { -100946242, 148160082 } +local FallDamage = { -842959696 } +local Explosion = { -1568386805, 1305664598, -1312131151, 375527679, 324506233, 1752584910, -1813897027, 741814745, -37975472, 539292904, 341774354, -1090665087 } +local Gas = { -1600701090 } +local Burn = { 615608432, 883325847, -544306709 } +local Drown = { -10959621, 1936677264 } + +Citizen.CreateThread(function() + local alreadyDead = false + + while true do + Citizen.Wait(50) + local playerPed = GetPlayerPed(-1) + if IsEntityDead(playerPed) and not alreadyDead then + local playerName = GetPlayerName(PlayerId()) + killer = GetPedKiller(playerPed) + killername = false + + for id = 0, 64 do + if killer == GetPlayerPed(id) then + killername = GetPlayerName(id) + end + end + + local death = GetPedCauseOfDeath(playerPed) + + if checkArray (Melee, death) then + TriggerServerEvent('playerDied', killername .. " meleed " .. playerName) + elseif checkArray (Bullet, death) then + TriggerServerEvent('playerDied', killername .. " shot " .. playerName) + elseif checkArray (Knife, death) then + TriggerServerEvent('playerDied', killername .. " stabbed " .. playerName) + elseif checkArray (Car, death) then + TriggerServerEvent('playerDied', killername .. " hit " .. playerName) + elseif checkArray (Animal, death) then + TriggerServerEvent('playerDied', playerName .. " died by an animal") + elseif checkArray (FallDamage, death) then + TriggerServerEvent('playerDied', playerName .. " died of fall damage") + elseif checkArray (Explosion, death) then + TriggerServerEvent('playerDied', playerName .. " died of an explosion") + elseif checkArray (Gas, death) then + TriggerServerEvent('playerDied', playerName .. " died of gas") + elseif checkArray (Burn, death) then + TriggerServerEvent('playerDied', playerName .. " burned to death") + elseif checkArray (Drown, death) then + TriggerServerEvent('playerDied', playerName .. " drowned") + else + TriggerServerEvent('playerDied', playerName .. " was killed by an unknown force") + --print(death) + end + + alreadyDead = true + end + + if not IsEntityDead(playerPed) then + alreadyDead = false + end + end +end) + +function checkArray (array, val) + for name, value in ipairs(array) do + if value == val then + return true + end + end + return false +end \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Discord-Logging/server.lua b/resources/[EGRP-Discord-Integration]/Discord-Logging/server.lua new file mode 100644 index 000000000..66cfcd890 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-Logging/server.lua @@ -0,0 +1,89 @@ +-- Made by Tazio + +local DISCORD_WEBHOOK = "https://discord.com/api/webhooks/807394115561979935/-gtiRGG6drFwJ_8e2vGG-SxJPhEb-tQTq_0r0664Q8CdtkLvj6BDxmiyE8Oc92VYuCMH" +local DISCORD_NAME = "Elite Gaming RP" +local STEAM_KEY = "0C034D20C57C8D6C5A8EED855916981F" +local DISCORD_IMAGE = "https://i.imgur.com/lF8nHnz.jpg" -- default is FiveM logo + +--DON'T EDIT BELOW THIS + +PerformHttpRequest(DISCORD_WEBHOOK, function(err, text, headers) end, 'POST', json.encode({username = DISCORD_NAME, content = "Discord Webhook is **ONLINE**", avatar_url = DISCORD_IMAGE}), { ['Content-Type'] = 'application/json' }) + +AddEventHandler('chatMessage', function(source, name, message) + + if string.match(message, "@everyone") then + message = message:gsub("@everyone", "`@everyone`") + end + if string.match(message, "@here") then + message = message:gsub("@here", "`@here`") + end + --print(tonumber(GetIDFromSource('steam', source), 16)) -- DEBUGGING + --print('https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' .. STEAM_KEY .. '&steamids=' .. tonumber(GetIDFromSource('steam', source), 16)) + if STEAM_KEY == '' or STEAM_KEY == nil then + PerformHttpRequest(DISCORD_WEBHOOK, function(err, text, headers) end, 'POST', json.encode({username = name .. " [" .. source .. "]", content = message, tts = false}), { ['Content-Type'] = 'application/json' }) + else + PerformHttpRequest('https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' .. STEAM_KEY .. '&steamids=' .. tonumber(GetIDFromSource('steam', source), 16), function(err, text, headers) + local image = string.match(text, '"avatarfull":"(.-)","') + --print(image) -- DEBUGGING + PerformHttpRequest(DISCORD_WEBHOOK, function(err, text, headers) end, 'POST', json.encode({username = name .. " [" .. source .. "]", content = message, avatar_url = image, tts = false}), { ['Content-Type'] = 'application/json' }) + end) + end +end) + +AddEventHandler('playerConnecting', function() + --PerformHttpRequest(DISCORD_WEBHOOK, function(err, text, headers) end, 'POST', json.encode({username = DISCORD_NAME, content = "```CSS\n".. GetPlayerName(source) .. " connecting\n```", avatar_url = DISCORD_IMAGE}), { ['Content-Type'] = 'application/json' }) + sendToDiscord("Server Login", "**" .. GetPlayerName(source) .. "** is connecting to the server.", 65280) +end) + +AddEventHandler('playerDropped', function(reason) + local color = 16711680 + if string.match(reason, "Kicked") or string.match(reason, "Banned") then + color = 16007897 + end + sendToDiscord("Server Logout", "**" .. GetPlayerName(source) .. "** has left the server. \n Reason: " .. reason, color) +end) + +RegisterServerEvent('playerDied') +AddEventHandler('playerDied',function(message) + sendToDiscord("Death log", message, 16711680) +end) + +function GetIDFromSource(Type, ID) --(Thanks To WolfKnight [forum.FiveM.net]) + local IDs = GetPlayerIdentifiers(ID) + for k, CurrentID in pairs(IDs) do + local ID = stringsplit(CurrentID, ':') + if (ID[1]:lower() == string.lower(Type)) then + return ID[2]:lower() + end + end + return nil +end + +function stringsplit(input, seperator) + if seperator == nil then + seperator = '%s' + end + + local t={} ; i=1 + + for str in string.gmatch(input, '([^'..seperator..']+)') do + t[i] = str + i = i + 1 + end + + return t +end + +function sendToDiscord(name, message, color) + local connect = { + { + ["color"] = color, + ["title"] = "**".. name .."**", + ["description"] = message, + ["footer"] = { + ["text"] = "Server Logging", + }, + } + } + PerformHttpRequest(DISCORD_WEBHOOK, function(err, text, headers) end, 'POST', json.encode({username = DISCORD_NAME, embeds = connect, avatar_url = DISCORD_IMAGE}), { ['Content-Type'] = 'application/json' }) +end diff --git a/resources/[EGRP-Discord-Integration]/Discord-Queue/Badger_Discord_Queue.zip b/resources/[EGRP-Discord-Integration]/Discord-Queue/Badger_Discord_Queue.zip new file mode 100644 index 000000000..b74391aa6 Binary files /dev/null and b/resources/[EGRP-Discord-Integration]/Discord-Queue/Badger_Discord_Queue.zip differ diff --git a/resources/[EGRP-Discord-Integration]/Discord-Queue/README.md b/resources/[EGRP-Discord-Integration]/Discord-Queue/README.md new file mode 100644 index 000000000..2cbd1970b --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-Queue/README.md @@ -0,0 +1,68 @@ +# Documentation as well as updates to this resource have been moved to: https://docs.badger.store/fivem-discord-scripts/bad-discordqueue + +## Jared's Developer Community [Discord] +[![Developer Discord](https://discordapp.com/api/guilds/597445834153525298/widget.png?style=banner4)](https://discord.com/invite/WjB5VFz) + +## All I ask + +All I ask is that if you enjoy this resource, please give it a like on the forum page, on GitHub (if you have an account), and pop me a follow over on GitHub. + +## What is it? + +This is basically a discord queue for logging into a server. When you connect to the server, you get added to a queue. Depending on your priority, you can be at the back of the queue or added to the top automatically. This all depends on what discord roles you have considering it works off of priority numbers. I'm not the best at writing descriptions. I'll be honest, I personally am probably not going to use this script, but I had a lot of people request this script from me, so here it is. Why not increase my rep within the Fivem community? + +## Dependencies + +https://github.com/sadboilogan/discord_perms + +## Installation + +https://www.youtube.com/watch?v=sjbFzkII2T0 + +## Screenshots + +![Queue Gif](https://i.gyazo.com/3606be50c8770850b86a83fd8efbec18.gif) + +## Configuration + +``` +Config = { + Default_Prio = 500000, -- This is the default priority value if a discord isn't found + Displays = { + Prefix = '[BadgerDiscordQueue]', + ConnectingLoop = { + '🦡🌿🦡🌿🦡🌿', + '🌿🦡🌿🦡🌿🦡', + '🦡🌿🦡🌿🦡🥦', + '🌿🦡🌿🦡🥦🦡', + '🦡🌿🦡🥦🦡🥦', + '🌿🦡🥦🦡🥦🦡', + '🦡🥦🦡🥦🦡🥦', + '🥦🦡🥦🦡🥦🦡', + '🦡🥦🦡🥦🦡🌿', + '🥦🦡🥦🦡🌿🦡', + '🦡🥦🦡🌿🦡🌿', + '🥦🦡🌿🦡🌿🦡', + }, + Messages = { + MSG_CONNECTING = 'You are being connected [{QUEUE_NUM}/{QUEUE_MAX}]: ', + MSG_CONNECTED = 'You are up! You are being connected now :)' + } + } +} + +Config.Rankings = { + -- LOWER NUMBER === HIGHER PRIORITY + ['1'] = 500, -- Discord User + ['1'] = 400, -- Donator + ['1'] = 300, -- Trial Mod + ['1'] = 200, -- Mod + ['1'] = 100, -- Admin + ['1'] = 1, -- Management +} +``` +- Replace the `'1'`s in the configuration with the discord role ID you want to set up priority for + +## Download + +https://github.com/JaredScar/Bad-DiscordQueue diff --git a/resources/[EGRP-Discord-Integration]/Discord-Queue/SharedQueue.lua b/resources/[EGRP-Discord-Integration]/Discord-Queue/SharedQueue.lua new file mode 100644 index 000000000..3f555e70f --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-Queue/SharedQueue.lua @@ -0,0 +1,279 @@ +Queue = {} +Queue.Players = {} +Queue.PlayerInfo = {} +Queue.SortedKeys = {} +Queue.Messages = {} +debugg = true; + + + +function getKeysSortedByValue(tbl, sortFunction) + local keys = {} + for key in pairs(tbl) do + table.insert(keys, key) + end + + table.sort(keys, function(a, b) + return sortFunction(tbl[a], tbl[b]) + end) + + return keys +end + +function Queue:IsWhitelisted(user) + local discordId = nil; + local license = nil; + + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + --print("Found discord id: "..discordId) + end + if string.match(id, "license:") then + license = string.gsub(id, "license:", "") + end + end + local identifierDiscord = discordId; + + if identifierDiscord then + local roles = exports.Badger_Discord_API:GetDiscordRoles(user); + if not (roles == false) then + for i = 1, #roles do + for roleID, list in pairs(Config.Rankings) do + if exports.Badger_Discord_API:CheckEqual(roles[i], roleID) then + return true; + end + end + end + end + end + return false; +end + +queueIndex = 0; +function Queue:SetupPriority(user) + local discordId = nil; + local license = nil; + + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + --print("Found discord id: "..discordId) + end + if string.match(id, "license:") then + license = string.gsub(id, "license:", "") + end + end + if license ~= nil then + -- Reset their account + Queue.Players[license] = nil; + local identifierDiscord = discordId; + queueIndex = queueIndex + 1; + theirPrios = {}; + msgs = {}; + if identifierDiscord and (Queue.Players[license] == nil) then + local roles = exports.Badger_Discord_API:GetDiscordRoles(user) + local lastRolePrio = 99999999999999999999; + local msg = nil; + if not (roles == false) then + for i = 1, #roles do + for roleID, list in pairs(Config.Rankings) do + local rolePrio = list[1]; + if exports.Badger_Discord_API:CheckEqual(roles[i], roleID) then + -- Return the index back to the Client script + table.insert(theirPrios, rolePrio); + if lastRolePrio > tonumber(rolePrio) then + msg = list[2]; + lastRolePrio = rolePrio; + end + end + end + end + else + Queue.Players[license] = tonumber(Config.Default_Prio) + queueIndex;; + Queue.Messages[license] = Config.Displays.Messages.MSG_CONNECTING; + end + if #theirPrios > 0 then + table.sort(theirPrios); + Queue.Players[license] = tonumber(theirPrios[1]) + queueIndex; + end + if msg ~= nil then + Queue.Messages[license] = msg; + end + elseif identifierDiscord == nil then + Queue.Players[license] = tonumber(Config.Default_Prio) + queueIndex; + Queue.Messages[license] = Config.Displays.Messages.MSG_CONNECTING; + end + if Queue.Players[license] == nil then + Queue.Players[license] = tonumber(Config.Default_Prio) + queueIndex; + end + if Queue.Messages[license] == nil then + Queue.Messages[license] = Config.Displays.Messages.MSG_CONNECTING; + end + local SortedKeys = getKeysSortedByValue(Queue.Players, function(a, b) return a < b end) + Queue.SortedKeys = SortedKeys; + local username = GetPlayerName(user); + Queue.PlayerInfo[license] = { username, Queue.Players[license] }; + if debugg then + for identifier, data in pairs(Queue.PlayerInfo) do + print("[DEBUG] " .. tostring(data[1]) .. " has priority of: " .. tostring(data[2]) ); + end + end + end -- License == nil, don't run +end +function GetMessage(user) + local discordId = nil; + local license = nil; + + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + --print("Found discord id: "..discordId) + end + if string.match(id, "license:") then + license = string.gsub(id, "license:", "") + end + end + local msg = Config.Displays.Messages.MSG_CONNECTING; + if (Queue.Messages[license] ~= nil) then + return Queue.Messages[license]; + else + return msg; + end +end + +function Queue:IsSetUp(user) + local discordId = nil; + local license = nil; + + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + --print("Found discord id: "..discordId) + end + if string.match(id, "license:") then + license = string.gsub(id, "license:", "") + end + end + if (Queue.Players[license] ~= nil) then + return true; + end + return false; +end + +function Queue:CheckQueue(user, currentConnectors, slots) + local discordId = nil; + local license = nil; + + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + --print("Found discord id: "..discordId) + end + if string.match(id, "license:") then + license = string.gsub(id, "license:", "") + end + end + if (tostring(Queue.SortedKeys[1]) == tostring(license) ) then + return true; -- They can login + end + -- Added 12/10/20 + --[[]]-- + local openSlots = (slots - GetNumPlayerIndices()) - currentConnectors; + local count = 1; + for k, v in pairs(Queue.SortedKeys) do + if Queue.SortedKeys[count] == license and count <= openSlots then + return true; + end + count = count + 1; + end + --[[]]-- + -- End add + return false; -- Still waiting in queue, not next in line +end + +function Queue:GetMax() + local cout = 0; + for identifier, prio in pairs(Queue.Players) do + cout = cout + 1; + end + return cout; +end + +function Queue:GetQueueNum(user) + local discordId = nil; + local license = nil; + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + --print("Found discord id: "..discordId) + end + if string.match(id, "license:") then + license = string.gsub(id, "license:", "") + end + end + local cout = 1; + for i = 1, #Queue.SortedKeys do + local identifier = Queue.SortedKeys[i]; + if identifier == license then + return cout; + end + cout = cout + 1; + end + return 1; +end + +function Queue:PopLicense(license) + -- Pop them off the Queue + local tempQueue = {}; + lic = license:gsub("license:", ""); + --[[ + for id, prio in pairs(Queue.Players) do + if tostring(id) ~= tostring(lic) then + tempQueue[id] = prio; + end + end + ]]-- + Queue.Messages[lic] = nil; + Queue.Players[lic] = nil; + --Queue.Players = tempQueue; + Queue.PlayerInfo[lic] = nil; + if debugg then + print("[DEBUG] " .. tostring(lic) .. " has been POPPED from QUEUE") + end + local SortedKeys = getKeysSortedByValue(Queue.Players, function(a, b) return a < b end) + Queue.SortedKeys = SortedKeys; +end + +function Queue:Pop(user) + -- Pop them off the Queue + local lic = nil; + + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "license:") then + lic = string.gsub(id, "license:", "") + end + end + local tempQueue = {}; + --[[ + for id, prio in pairs(Queue.Players) do + if tostring(id) ~= tostring(lic) then + tempQueue[id] = prio; + end + end + ]]-- + Queue.Messages[lic] = nil; + Queue.Players[lic] = nil; + --Queue.Players = tempQueue; + Queue.PlayerInfo[lic] = nil; + local SortedKeys = getKeysSortedByValue(Queue.Players, function(a, b) return a < b end) + Queue.SortedKeys = SortedKeys; + if debugg then + print("[DEBUG] " .. GetPlayerName(user) .. " has been POPPED from QUEUE") + end + if debugg then + for identifier, data in pairs(Queue.PlayerInfo) do + print("[DEBUG] " .. tostring(data[1]) .. " has priority of: " .. tostring(data[2]) ); + end + end +end \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Discord-Queue/client.lua b/resources/[EGRP-Discord-Integration]/Discord-Queue/client.lua new file mode 100644 index 000000000..2a6522927 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-Queue/client.lua @@ -0,0 +1,9 @@ +Citizen.CreateThread(function() + while true do + Citizen.Wait(0); + if NetworkIsSessionStarted() then + TriggerServerEvent('DiscordQueue:Activated'); -- They got past queue, deactivate them in it + return + end + end +end) \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Discord-Queue/config.lua b/resources/[EGRP-Discord-Integration]/Discord-Queue/config.lua new file mode 100644 index 000000000..f02b0bb26 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-Queue/config.lua @@ -0,0 +1,46 @@ +Config = { + Default_Prio = 500000, -- This is the default priority value if a discord isn't found + AllowedPerTick = 6, -- How many players should we allow to connect at a time? + HostDisplayQueue = true, + onlyActiveWhenFull = false, + Requirements = { -- A player must have the identifier to be allowed into the server + Discord = true, + Steam = true + }, + WhitelistRequired = false, -- If this option is set to true, a player must have a role in Config.Rankings to be allowed into the server + Debug = false, + Webhook = '', + Displays = { + Prefix = '[BadgerDiscordQueue]', + ConnectingLoop = { + '🦡🌿🦡🌿🦡🌿', + '🌿🦡🌿🦡🌿🦡', + '🦡🌿🦡🌿🦡🥦', + '🌿🦡🌿🦡🥦🦡', + '🦡🌿🦡🥦🦡🥦', + '🌿🦡🥦🦡🥦🦡', + '🦡🥦🦡🥦🦡🥦', + '🥦🦡🥦🦡🥦🦡', + '🦡🥦🦡🥦🦡🌿', + '🥦🦡🥦🦡🌿🦡', + '🦡🥦🦡🌿🦡🌿', + '🥦🦡🌿🦡🌿🦡', + }, + Messages = { + MSG_CONNECTING = 'You are being connected [{QUEUE_NUM}/{QUEUE_MAX}]: ', -- Default message if they have no discord roles + MSG_CONNECTED = 'You are up! You are being connected now :)', + MSG_DISCORD_REQUIRED = 'Your Discord was not detected... You are required to have Discord to play on this server...', + MSG_STEAM_REQUIRED = 'Your Steam was not detected... You are required to have Steam to play on this server...', + MSG_NOT_WHITELISTED = 'You do not have a Discord role whitelisted for this server... You are not whitelisted.', + }, + }, +} + +Config.Rankings = { + -- LOWER NUMBER === HIGHER PRIORITY + -- ['roleID'] = {rolePriority, connectQueueMessage}, + ['Civilian I'] = {500, "You are being connected (you are not as special as Badger) [{QUEUE_NUM}/{QUEUE_MAX}]:"}, -- Discord User + ['Staff'] = {100, "You are being connected (Staff Queue) [{QUEUE_NUM}/{QUEUE_MAX}]:"}, -- Staff + ['Admin'] = {50, "You are being connected (Admin Queue) [{QUEUE_NUM}/{QUEUE_MAX}]:"}, -- Admin + ['Founder'] = {1, "You are being connected (Founder Queue) [{QUEUE_NUM}/{QUEUE_MAX}]:"}, -- Founder +} \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Discord-Queue/fxmanifest.lua b/resources/[EGRP-Discord-Integration]/Discord-Queue/fxmanifest.lua new file mode 100644 index 000000000..92a6b9ff8 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-Queue/fxmanifest.lua @@ -0,0 +1,16 @@ +fx_version 'bodacious' + +game 'gta5' + +description 'Bad-DiscordQueue by OfficialBadger(cfx.re)/JaredScar(github) originally released on cfx.re forums for FiveM' +cfxlink 'https://forum.cfx.re/t/release-bad-discordqueue-a-discord-role-based-queue-system-by-badger/1394685' + +client_scripts { + "client.lua" +} + +server_scripts { + "config.lua", + "SharedQueue.lua", + "server.lua" +} diff --git a/resources/[EGRP-Discord-Integration]/Discord-Queue/server.lua b/resources/[EGRP-Discord-Integration]/Discord-Queue/server.lua new file mode 100644 index 000000000..0e225d144 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-Queue/server.lua @@ -0,0 +1,380 @@ +displayIndex = 1; +displays = Config.Displays.ConnectingLoop; +prefix = Config.Displays.Prefix; +currentConnectors = 0; +maxConnectors = Config.AllowedPerTick; +hostname = GetConvar("sv_hostname") +slots = GetConvarInt('sv_maxclients', 32) + +StopResource('hardcap') + +AddEventHandler('onResourceStop', function(resource) + if resource == GetCurrentResourceName() then + if GetResourceState('hardcap') == 'stopped' then + StartResource('hardcap') + end + end +end) + +webhookURL = Config.Webhook; +function sendToDisc(title, message, footer) + local embed = {} + embed = { + { + ["color"] = 65280, -- GREEN = 65280 --- RED = 16711680 + ["title"] = "**".. title .."**", + ["description"] = "" .. message .. "", + ["footer"] = { + ["text"] = footer, + }, + } + } + -- Start + -- TODO Input Webhook + PerformHttpRequest(webhookURL, + function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + -- END +end +function ExtractIdentifiers(src) + local identifiers = { + steam = "", + ip = "", + discord = "", + license = "", + xbl = "", + live = "" + } + + --Loop over all identifiers + for i = 0, GetNumPlayerIdentifiers(src) - 1 do + local id = GetPlayerIdentifier(src, i) + + --Convert it to a nice table. + if string.find(id, "steam") then + identifiers.steam = id + elseif string.find(id, "ip") then + identifiers.ip = id + elseif string.find(id, "discord") then + identifiers.discord = id + elseif string.find(id, "license") then + identifiers.license = id + elseif string.find(id, "xbl") then + identifiers.xbl = id + elseif string.find(id, "live") then + identifiers.live = id + end + end + + return identifiers +end +function sendToDiscQueue(title, message, footer) + local embed = {} + embed = { + { + ["color"] = 16711680, -- GREEN = 65280 --- RED = 16711680 + ["title"] = "**".. title .."**", + ["description"] = "" .. message .. "", + ["footer"] = { + ["text"] = footer, + }, + } + } + -- Start + -- TODO Input Webhook + PerformHttpRequest(webhookURL, + function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + -- END +end + +Citizen.CreateThread(function() + while true do + Wait((1000 * 30)); -- Every 30 seconds + --print("sv_maxclients is set to: " .. tostring(slots)); + --print("Queue:GetMax() is set to: " .. tostring(Queue:GetMax())); + if Config.HostDisplayQueue then + if hostname ~= "default FXServer" and Queue:GetMax() > 0 then + SetConvar("sv_hostname", "[" .. Queue:GetMax() .. "/" .. (Queue:GetMax() + 1) .. "] " .. hostname); + --print(prefix .. " Set server title: '" .. "[" .. "1" .. "/" .. (Queue:GetMax() + 1) .. "] " .. hostname .. "'") + end + if hostname ~= "default FXServer" and Queue:GetMax() == 0 then + SetConvar("sv_hostname", hostname); + --print(prefix .. " Set server title: '" .. hostname .. "'") + end + end + end +end) +notSet = true; +Citizen.CreateThread(function() + while notSet do + if hostname == "default FXServer" then + hostname = GetConvar("sv_hostname"); + else + notSet = false; + end + end +end) + +function GetPlayerCount() + return GetNumPlayerIndices(); +end +local connecting = {} +local playerConnecting = {} + +function CheckForGhostUsers() + for license, data in pairs(playerConnecting) do + local found = false; + local user = data.ID; + local name = data.PlayerName; + local connectingg = data.Connection; + --[[ MASS DEBUG + if Config.Debug then + print("[Bad-DiscordQueue] (MASS DEBUG)") + print("[Bad-DiscordQueue] PlayerName: " .. tostring(name) .. " || ID:" .. tostring(user) .. " || GetPlayerName(user): " .. tostring(GetPlayerName(user) ) ); + end + --[[ MASS DEBUG END ]]-- + if GetPlayerName(user) == nil or GetPlayerName(user) ~= name then + -- They no longer exist + Queue:PopLicense(license) + if Config.Debug then + print(prefix .. " (Thread : NO LONGER EXISTS) Popped player " .. name .. " from queue..."); + end + if connecting[license] ~= nil then + if (currentConnectors > 0) then + currentConnectors = currentConnectors - 1; + end + if Config.Debug then + print(prefix .. " (Thread : NO LONGER EXISTS) currentConnectors was decremented... FROM: " .. tostring(currentConnectors + 1) .. " -- TO: " .. + tostring(currentConnectors)); + end + connecting[license] = nil; + end + if Config.Debug then + print(prefix .. " (Thread : NO LONGER EXISTS) currentConnectors is == " .. tostring(currentConnectors) ) + end + playerConnecting[license] = nil; + end + end +end + +--[[ +Citizen.CreateThread(function() + while true do + Citizen.Wait((1000 * 20)); + for license, data in pairs(playerConnecting) do + local found = false; + local user = data.ID; + local name = data.PlayerName; + local connectingg = data.Connection; + -- MASS DEBUG + if Config.Debug then + print("[Bad-DiscordQueue] (MASS DEBUG)") + print("[Bad-DiscordQueue] PlayerName: " .. tostring(name) .. " || ID:" .. tostring(user) .. " || GetPlayerName(user): " .. tostring(GetPlayerName(user) ) ); + end + -- MASS DEBUG END + if GetPlayerName(user) ~= name and GetPlayerName(user) == nil then + -- They no longer exist + Queue:PopLicense(license) + if Config.Debug then + print("[Bad-DiscordQueue] (Thread : NO LONGER EXISTS) Popped player " .. name .. " from queue..."); + end + if connecting[license] ~= nil then + connecting[license] = nil; + if (currentConnectors > 0) then + currentConnectors = currentConnectors - 1; + end + end + if Config.Debug then + print("[Bad-DiscordQueue] (Thread : NO LONGER EXISTS) currentConnectors is == " .. tostring(currentConnectors) ) + end + playerConnecting[license] = nil; + end + end + end +end) +]]-- +Citizen.CreateThread(function() + while true do + Wait((40 * 1000)); + CheckForGhostUsers(); + end +end) + +AddEventHandler('playerConnecting', function(name, setKickReason, deferrals) + deferrals.defer(); + local user = source; + local license = ExtractIdentifiers(user).license:gsub("license:", ""); + local ids = ExtractIdentifiers(user); + local playerName = GetPlayerName(user); + local allowed = true; + if Config.Requirements.Steam then + -- Check if they have Steam + if #ids.steam <= 1 then + deferrals.done(Config.Displays.Prefix .. " " .. Config.Displays.Messages.MSG_STEAM_REQUIRED); + allowed = false; + CancelEvent(); + return; + end + end + if Config.Requirements.Discord then + -- Check if they have Discord + if #ids.discord <= 1 then + deferrals.done(Config.Displays.Prefix .. " " .. Config.Displays.Messages.MSG_DISCORD_REQUIRED); + allowed = false; + CancelEvent(); + return; + end + end + if Config.WhitelistRequired then + if not Queue:IsWhitelisted(user) then + -- Not whitelisted, return + deferrals.done(Config.Displays.Prefix .. " " .. Config.Displays.Messages.MSG_NOT_WHITELISTED); + allowed = false; + CancelEvent(); + return; + end + end + if allowed then + playerConnecting[license] = {Connection = false, ID = user, PlayerName = playerName, Timeout = 0}; + if Config.onlyActiveWhenFull == true then + -- It's only active when server is full so lets check + if (GetPlayerCount() + 1) > slots or (GetPlayerCount() + Queue:GetMax()) > slots then + -- It's full, activate + if not Queue:IsSetUp(user) then + -- Set them up + Queue:SetupPriority(user); + if GetPlayerName(user) ~= nil then + sendToDiscQueue("QUEUED USER", "Player `" .. GetPlayerName(user):gsub("`", "") .. "` has been added to the queue...", "Bad-DiscordQueue created by Badger"); + end + local message = GetMessage(user); + local msg = message:gsub("{QUEUE_NUM}", Queue:GetQueueNum(user)):gsub("{QUEUE_MAX}", Queue:GetMax()); + if GetPlayerName(user) ~= nil then + print(prefix .. " " .. "Player " .. GetPlayerName(user) .. " has been set to the QUEUE [" .. msg .. "]"); + end + end + while ( ( (not Queue:CheckQueue(user, currentConnectors, slots)) or (currentConnectors == maxConnectors) ) or (GetPlayerCount() == slots) or + ((GetPlayerCount() + currentConnectors + 1) > slots) or ( (GetPlayerCount() + currentConnectors ) >= slots) ) do + -- They are still in the queue + Wait(1000); + if displayIndex > #displays then + displayIndex = 1; + end + local message = GetMessage(user); + local msg = message:gsub("{QUEUE_NUM}", Queue:GetQueueNum(user)):gsub("{QUEUE_MAX}", Queue:GetMax()); + deferrals.update(prefix .. " " .. msg .. displays[displayIndex]); + displayIndex = displayIndex + 1; + end + -- If it got down here, they are now allowed to join the server + if connecting[license] == nil or connecting[license] ~= true then + Queue:PopLicense(license) + currentConnectors = currentConnectors + 1; + connecting[license] = true; + if GetPlayerName(user) ~= nil then + print(prefix .. " " .. "Player " .. GetPlayerName(user) .. " is allowed to join now!"); + end + Wait(1000); + if GetPlayerName(user) ~= nil then + sendToDisc("NEW CONNECTOR", "Player `" .. GetPlayerName(user):gsub("`", "") .. "` is allowed to join now!", "Bad-DiscordQueue created by Badger"); + end + if playerConnecting[license] ~= nil then + playerConnecting[license].Timeout = Config.Timeout; + playerConnecting[license].Connection = true; + end + if Config.Debug then + print(prefix .. " (playerConnecting) currentConnectors is == " .. tostring(currentConnectors) ) + end + end -- connecting[license] == nil + deferrals.done(); + else + deferrals.done();--deferrals done if server is not full as we don't want the queue + end + else + if not Queue:IsSetUp(user) then + -- Set them up + Queue:SetupPriority(user); + if GetPlayerName(user) ~= nil then + sendToDiscQueue("QUEUED USER", "Player `" .. GetPlayerName(user):gsub("`", "") .. "` has been added to the queue...", "Bad-DiscordQueue created by Badger"); + end + local message = GetMessage(user); + local msg = message:gsub("{QUEUE_NUM}", Queue:GetQueueNum(user)):gsub("{QUEUE_MAX}", Queue:GetMax()); + if GetPlayerName(user) ~= nil then + print(prefix .. " " .. "Player " .. GetPlayerName(user) .. " has been set to the QUEUE [" .. msg .. "]"); + end + end + while ( ( (not Queue:CheckQueue(user, currentConnectors, slots)) or (currentConnectors == maxConnectors) ) or (GetPlayerCount() == slots) or + ((GetPlayerCount() + currentConnectors + 1) > slots) or ( (GetPlayerCount() + currentConnectors ) >= slots) ) do + -- They are still in the queue + Wait(1000); + if displayIndex > #displays then + displayIndex = 1; + end + local message = GetMessage(user); + local msg = message:gsub("{QUEUE_NUM}", Queue:GetQueueNum(user)):gsub("{QUEUE_MAX}", Queue:GetMax()); + deferrals.update(prefix .. " " .. msg .. displays[displayIndex]); + displayIndex = displayIndex + 1; + end + -- If it got down here, they are now allowed to join the server + if connecting[license] == nil or connecting[license] ~= true then + Queue:PopLicense(license) + currentConnectors = currentConnectors + 1; + connecting[license] = true; + if GetPlayerName(user) ~= nil then + print(prefix .. " " .. "Player " .. GetPlayerName(user) .. " is allowed to join now!"); + end + Wait(1000); + if GetPlayerName(user) ~= nil then + sendToDisc("NEW CONNECTOR", "Player `" .. GetPlayerName(user):gsub("`", "") .. "` is allowed to join now!", "Bad-DiscordQueue created by Badger"); + end + if playerConnecting[license] ~= nil then + playerConnecting[license].Timeout = Config.Timeout; + playerConnecting[license].Connection = true; + end + if Config.Debug then + print(prefix .. " (playerConnecting) currentConnectors is == " .. tostring(currentConnectors) ) + end + end -- connecting[license] == nil; + deferrals.done(); + end + end +end) +AddEventHandler('playerDropped', function (reason) + local user = source; + local license = ExtractIdentifiers(user).license:gsub("license:", ""); + if (connecting[license] ~= nil) then + if (currentConnectors > 0) then + currentConnectors = currentConnectors - 1; + if Config.Debug then + print(prefix .. " (playerDropped) currentConnectors was decremented... FROM: " .. tostring(currentConnectors + 1) .. " -- TO: " .. + tostring(currentConnectors)); + end + end + connecting[license] = nil; + end + playerConnecting[license] = nil; + if (Queue:IsSetUp(user)) then + Queue:Pop(user); + sendToDiscQueue("REMOVED QUEUE USER", "Player `" .. GetPlayerName(user):gsub("`", "") .. "` has been removed from the queue...", "Bad-DiscordQueue created by Badger"); + print(prefix .. " (playerDropped) " .. "Player " .. GetPlayerName(user) .. " has been removed from QUEUE"); + end +end) + +RegisterNetEvent('DiscordQueue:Activated') +AddEventHandler('DiscordQueue:Activated', function() + -- They were activated, pop them from Queue + Queue:Pop(source); + local user = source; + local license = ExtractIdentifiers(user).license:gsub("license:", ""); + connecting[license] = nil; + playerConnecting[license] = nil; + sendToDiscQueue("REMOVED QUEUE USER", "Player `" .. GetPlayerName(user):gsub("`", "") .. "` has been removed from the queue...", "Bad-DiscordQueue created by Badger"); + if (currentConnectors > 0) then + currentConnectors = currentConnectors - 1; + if Config.Debug then + print(prefix .. " (DiscordQueue:Activated) currentConnectors was decremented... FROM: " .. tostring(currentConnectors + 1) .. " -- TO: " .. + tostring(currentConnectors)); + end + end + if Config.Debug then + print(prefix .. " (DiscordQueue:Activated) " .. "Player " .. GetPlayerName(user) .. " has been removed from QUEUE"); + print(prefix .. " (DiscordQueue:Activated) currentConnectors is == " .. tostring(currentConnectors) ) + end +end) diff --git a/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/LICENSE b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/LICENSE new file mode 100644 index 000000000..217dbfeaa --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jared + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/README.md b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/README.md new file mode 100644 index 000000000..45de87681 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/README.md @@ -0,0 +1,89 @@ +# DiscordVehicleRestrictions + +## Documentation: https://docs.badger.store/fivem-discord-scripts/discordvehiclerestrictions + +## What is it? +DiscordVehiclesRestrictions is a Discord based vehicle restriction script. I have previously made a script like this in the past, but it was made when I was barely considered a FiveM script developer. Due to the sloppy code practices within that script, I decided to rewrite the script and include something at most people had inquired about within the old one: Inheritance. + +### Old Script: +https://forum.cfx.re/t/discordvehiclesrestrict/599594 + +## Images +https://i.gyazo.com/415c775a6cd94f194e22c9843778bdb0.gif + +## Requirement +https://forum.cfx.re/t/release-badger-discord-api/1698464 + +## Configuration +* It should be noted that for `Config.Inheritances`, the roleNames and roleIDs should match up with the ones specified in `Config.VehicleRestrictions`. + +* Also, inheritance only inherits the role groups listed. Inheriting `RoleName2` which inherits `RoleName1` would not be inherited for `RoleName3`. +```lua +Config = { + RestrictedMessage = "~r~Restricted Vehicle Model.", + InheritanceEnabled = false +} + +Config.VehicleRestrictions = { + ['RoleName1 or ID'] = { + "baller", + "baller2", + "baller3", + "baller4" + }, + ['RoleName2 or ID2'] = {}, + ['RoleName3 or ID3'] = {}, + ['RoleName4 or ID4'] = {} +} + +-- Requires Config.InheritanceEnabled to be = true +Config.Inheritances = { + ['RoleName2 or ID'] = {'RoleName1', 'RoleName3', 'RoleName4'}, + ['RoleName3'] = {'RoleName2'}, +} +``` + +## Example Configuration +```lua +Config = { + RestrictedMessage = "~r~Restricted Vehicle Model.", + InheritanceEnabled = true +} + +Config.VehicleRestrictions = { + ['Head_Admin'] = { + "baller", + "baller2", + "baller3", + "baller4", + }, + ['Admin'] = { + "dcd", + "chr20", + }, + ['Moderator'] = { + "nf6", + "foxsnt", + "foxshelby", + "gt63s", + "fhauler", + "rescue1", + "um1", + "um2", + "um3", + "um4", + "um5", + "um6", + "um6", + "riot", + }, +} + +-- Requires Config.InheritanceEnabled to be = true +Config.Inheritances = { + ['Head_Admin'] = {'Admin', 'Moderator'}, +} +``` +Thanks to @clewis329 for helping to test this, a well as providing the example configuration file :) +## Download +https://github.com/JaredScar/DiscordVehicleRestrictions diff --git a/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/client.lua b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/client.lua new file mode 100644 index 000000000..c8205f8f9 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/client.lua @@ -0,0 +1,84 @@ +restrictions = Config.VehicleRestrictions; +myRoles = nil; + +RegisterNetEvent("BadgerVehicles:CheckPermission:Return") +AddEventHandler("BadgerVehicles:CheckPermission:Return", function(roles) + myRoles = roles; +end) + +lastChecked = nil; +hasPerm = nil; +Citizen.CreateThread(function() + TriggerServerEvent("BadgerVehicles:CheckPermission"); + while true do + Citizen.Wait(1000) + + local ped = PlayerPedId() + local veh = nil + + if IsPedInAnyVehicle(ped, false) then + veh = GetVehiclePedIsUsing(ped) + else + veh = GetVehiclePedIsTryingToEnter(ped) + end + local model = GetEntityModel(veh) + if (model ~= nil) then + local driver = GetPedInVehicleSeat(veh, -1) + if (lastChecked ~= nil) and (lastChecked == model) and (hasPerm ~= nil) and (not hasPerm) then + if driver == ped then + ShowInfo(Config.RestrictedMessage) + DeleteEntity(veh) + ClearPedTasksImmediately(ped) + end + print("[DiscordVehicleRestrictions] Vehicle was last checked, but is not a driver...") + end + end + + if veh ~= nil and DoesEntityExist(veh) and lastChecked ~= model then + local driver = GetPedInVehicleSeat(veh, -1) + -- Check if it has one of the restricted vehicles + local requiredPerm = nil; + hasPerm = false; + for role, val in pairs(myRoles) do + if (val == true) then + local vehicles = Config.VehicleRestrictions[role]; + for i = 1, #vehicles do + if GetHashKey(vehicles[i]) == model then + requiredPerm = true; + hasPerm = true; + end + end + end + end + if not hasPerm then + local vehicles = Config.VehicleRestrictions; + for role, vehicleList in pairs(vehicles) do + for i = 1, #vehicleList do + if GetHashKey(vehicleList[i]) == model then + requiredPerm = true; + end + end + end + end + + lastChecked = model; + + -- If doesn't have permission, it's a restricted vehicle to them + if not hasPerm and (requiredPerm ~= nil) then + if driver == ped then + ShowInfo(Config.RestrictedMessage) + DeleteEntity(veh) + ClearPedTasksImmediately(ped) + end + else + hasPerm = true; + end + end + end +end) + +function ShowInfo(text) + SetNotificationTextEntry("STRING") + AddTextComponentSubstringPlayerName(text) + DrawNotification(false, false) +end \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/config.lua b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/config.lua new file mode 100644 index 000000000..7571a1344 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/config.lua @@ -0,0 +1,118 @@ +Config = { + RestrictedMessage = "~r~Restricted Vehicle Model! If you think this is an error message a staff member.", + InheritanceEnabled = false +} + +Config.VehicleRestrictions = { + ['EG | Helper'] = { + "Staff-Buggy", + "Staff-Camaro", + "Staff-Charger", + "Staff-Mustang" + }, + ['EG | Staff'] = { + "Staff-Buggy", + "Staff-Camaro", + "Staff-Charger", + "Staff-Mustang" + }, + ['EG | Sr. Staff'] = { + "Staff-Buggy", + "Staff-Camaro", + "Staff-Charger", + "Staff-Mustang" + }, + ['EG | Moderator'] = { + "Staff-Buggy", + "Staff-Camaro", + "Staff-Charger", + "Staff-Mustang" + }, + ['EG | Sr. Moderator'] = { + "Staff-Buggy", + "Staff-Camaro", + "Staff-Charger", + "Staff-Mustang" + }, + ['EG | Admin'] = { + "Staff-Buggy", + "Staff-Camaro", + "Staff-Charger", + "Staff-Mustang" + }, + ['EG | Sr. Admin'] = { + "Staff-Buggy", + "Staff-Camaro", + "Staff-Charger", + "Staff-Mustang", + "m3e", + "mazdarx3pxxbk", + "mazdarx3pxxbkb", + "vanzwbchevy", + "vanzwbchev" + }, + ['EG | Head of Staff'] = { + "Staff-Buggy", + "Staff-Camaro", + "Staff-Charger", + "Staff-Mustang", + "m3e", + "mazdarx3pxxbk", + "mazdarx3pxxbkb", + "vanzwbchevy", + "vanzwbchev" + }, + ['EG | Server Developer'] = { + "Staff-Buggy", + "Staff-Camaro", + "Staff-Charger", + "Staff-Mustang", + "m3e", + "mazdarx3pxxbk", + "mazdarx3pxxbkb", + "vanzwbchevy", + "vanzwbchev" + }, + ['EG | Owner'] = { + "Staff-Buggy", + "Staff-Camaro", + "Staff-Charger", + "Staff-Mustang", + "m3e", + "mazdarx3pxxbk", + "mazdarx3pxxbkb", + "vanzwbchevy", + "vanzwbchev" + }, + ['Silver Supporter 🥈'] = { + "r8v10", + "18performante" + }, + ['Gold Supporter 🥇'] = { + "bdivo", + "tr22", + "aperta", + "r8v10", + "18performante" + }, + ['Platinum Supporter 💠'] = { + "bdivo", + "tr22", + "aperta", + "r8v10", + "18performante" + }, + ['Diamond Supporter 💎'] = { + "bdivo", + "tr22", + "aperta", + "r8v10", + "18performante" + } +} + +-- Requires Config.InheritanceEnabled to be = true +Config.Inheritances = { + ['Silver Tier 🥈'] = {'Gold Tier 🥇', 'Platinum Tier 💠', 'Diamond Tier 💎'}, + ['Gold Tier 🥇'] = {'Platinum Tier 💠', 'Diamond Tier 💎'}, +} \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/fxmanifest.lua b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/fxmanifest.lua new file mode 100644 index 000000000..03d9d79ac --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/fxmanifest.lua @@ -0,0 +1,15 @@ +fx_version 'bodacious' + +game 'gta5' + +description 'DiscordVehicleRestrictions by OfficialBadger (cfx.re) / JaredScar (github) originally released on cfx.re forums for FiveM' + +client_scripts { + "config.lua", + "client.lua" +} + +server_scripts { + "config.lua", + "server.lua" +} diff --git a/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/server.lua b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/server.lua new file mode 100644 index 000000000..5c19e4414 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-VehRestriction/server.lua @@ -0,0 +1,45 @@ +RegisterServerEvent("BadgerVehicles:CheckPermission") +AddEventHandler("BadgerVehicles:CheckPermission", function() + local src = source; + local userRoles = {} + for k, v in ipairs(GetPlayerIdentifiers(src)) do + if string.sub(v, 1, string.len("discord:")) == "discord:" then + identifierDiscord = v + end + end + + if tostring(identifierDiscord) == "394446211341615104" then + -- It is the one and only Badger, we must pay our respects + TriggerClientEvent('chatMessage', -1, '^1[^5DiscordVehicleRestrictions^1] ^3Script creator ^1Badger ^3has joined the server!...'); + end + + if identifierDiscord then + local roleIDs = exports.Badger_Discord_API:GetDiscordRoles(src) + if not (roleIDs == false) then + for i = 1, #roleIDs do + for role, vehicles in pairs(Config.VehicleRestrictions) do + if exports.Badger_Discord_API:CheckEqual(role, roleIDs[i]) then + userRoles[role] = true; + print("[DiscordVehicleRestrictions] " .. GetPlayerName(src) .. " has received permission for role: " .. tostring(role) ); + if Config.InheritanceEnabled then + local inheritedRoles = Config.Inheritances[role]; + if inheritedRoles ~= nil then + -- There is inheritted roles + for j = 1, #inheritedRoles do + userRoles[ inheritedRoles[j] ] = true; + print("[DiscordVehicleRestrictions] " .. GetPlayerName(src) .. " has inherited role: " .. tostring(role) ); + end + end + end + end + end + end + else + print("[DiscordVehicleRestrictions] " .. GetPlayerName(src) .. " did not receive permissions because roles == false") + end + elseif identifierDiscord == nil then + print("[DiscordVehicleRestrictions] " .. "identifierDiscord == nil") + end + -- Trigger client event + TriggerClientEvent("BadgerVehicles:CheckPermission:Return", src, userRoles); +end) \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/LICENSE b/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/LICENSE new file mode 100644 index 000000000..e7d69ab04 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jared Scarito + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/README.md b/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/README.md new file mode 100644 index 000000000..ba26aaf8c --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/README.md @@ -0,0 +1,67 @@ +# DiscordWeaponPerms +## Continued Documentation +https://docs.badger.store/fivem-discord-scripts/discordweaponperms +## Discontinued Documentation +**Version 1.0** + +Another discord script of course! With this script, you can restrict weapons to certain roles on your discord server! This script also allows restricting certain attachments to different groups as well (however, it'll remove the weapon if they have the attachment, I'll eventually update it to just remove the attachment from the weapon). + +https://i.gyazo.com/52a7106f1db9c309c28ff012b8127ae2.gif + +You must set up IllusiveTea's discord_perms script for this to work properly. --> https://forum.fivem.net/t/discord-roles-for-permissions-im-creative-i-know/233805 + +**How it works** +``` +roleList = { +1, -- Trusted Civ (1) +1, -- Donator (2) +1, -- Personal (3) +} +``` +responds to it's respective number within the other list: +``` +restrictedWeapons = { +{}, -- Trusted Civ (1) +{}, -- Donator (2) +{ +"WEAPON_RPG", +}, -- Personal (3) +} +``` + +The RPG weapon would then be restricted to only people with personal discord role within your discord server. + +It's quite simple :slight_smile: + + +**Installation** +1. Download DiscordWeaponPerms +2. Extract the .zip and place the folder in your /resources/ of your Fivem server +3. Make sure you add “start DiscordWeaponPerms†in your server.cfg +4. Enjoy :slight_smile: + +**Download** +[DiscordWeaponPerms](https://github.com/TheWolfBadger/DiscordWeaponPerms) + + + +**My Other Work** + +[DiscordChatRoles](https://forum.fivem.net/t/discordchatroles-release/566338) + +[DiscordAcePerms](https://forum.fivem.net/t/discordaceperms-release/573044) + +[SandyVehiclesRestrict](https://forum.fivem.net/t/release-sandy-vehicles-restrict/564929) + +[DiscordTagIDs](https://forum.fivem.net/t/discordtagids-i-know-i-know-i-only-make-discord-based-scripts/582513) + +[DiscordVehiclesRestrict](https://forum.fivem.net/t/discordvehiclesrestrict/599594) + +[DiscordPedPerms](https://forum.fivem.net/t/release-discordpedperms/642866) + +[BadgerAnims](https://forum.fivem.net/t/release-badgeranims/650517) + +[DiscordWeaponPerms](https://forum.fivem.net/t/release-discordweaponperms/664774) + +**Version 2.0** +- Removing restricted weapon attachments from weapon instead of whole weapon? diff --git a/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/__resource.lua b/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/__resource.lua new file mode 100644 index 000000000..281e9392c --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/__resource.lua @@ -0,0 +1,7 @@ +----------------------------------- +---------- Discord Reports -------- +--- by Badger --- +----------------------------------- + +client_script "client.lua" +server_script "server.lua" \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/client.lua b/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/client.lua new file mode 100644 index 000000000..2a10fec21 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/client.lua @@ -0,0 +1,82 @@ +-------------------------- +--- DiscordWeaponPerms --- +-------------------------- +restrictedWeapons = { +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 1 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 3 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 4 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 5 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 6 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 7 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 8 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 9 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 10 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 11 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 12 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 13 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 14 +{"WEAPON_PROXMINE", "WEAPON_GRENADELAUNCHER", "WEAPON_RPG", "WEAPON_MINIGUN", "WEAPON_FIREWORK", "WEAPON_RAILGUN", "WEAPON_HOMINGLAUNCHER", "WEAPON_STICKYBOMB", "WEAPON_COMPACTLAUNCHER", "WEAPON_RAYPISTOL", "WEAPON_RAYCARBINE", "WEAPON_RAYMINIGUN", "WEAPON_PIPEBOMB",}, -- 15 +} +--[[ +Weapon components list: https://wiki.rage.mp/index.php?title=Weapons_Components +Weapon list: https://runtime.fivem.net/doc/natives/#_0xBF0FD6E56C964FCB +]]-- +isAllowed = {} +RegisterNetEvent('DiscordWeaponPerms:CheckPerms:Return') +AddEventHandler('DiscordWeaponPerms:CheckPerms:Return', function(hasPerms) + isAllowed = hasPerms +end) +function has_value (tab, val) + for index, value in ipairs(tab) do + if value == val then + return true + end + end + return false +end +alreadyRan = false +Citizen.CreateThread(function() + while true do + Citizen.Wait(1000) + if not alreadyRan then + TriggerServerEvent("DiscordWeaponPerms:CheckPerms") + alreadyRan = true + end + --TriggerServerEvent("Print:PrintDebug", "It gets here 1") -- DEBUG - GET RID OF + local ped = GetPlayerPed(-1) + local weapon = GetSelectedPedWeapon(ped) + local restrictedStr = "" + local requiredPerm = nil + for i=1, #restrictedWeapons do + local weaponArr = restrictedWeapons[i] + for j=1, #weaponArr do + -- Check if the weapon is restricted and for what group, or if it's the attachment + if weapon == GetHashKey(weaponArr[j]) then + -- This weapon is restricted unless they have this role perm + requiredPerm = i + restrictedStr = weaponArr[j] + break + elseif (HasPedGotWeaponComponent(ped, weapon, GetHashKey(weaponArr[j]))) then + -- It's restricted unless they have this role perm + requiredPerm = i + restrictedStr = weaponArr[j] + break + end + end + end + --TriggerServerEvent("Print:PrintDebug", "It gets here 2") -- DEBUG - GET RID OF + -- Check their perms + if not has_value(isAllowed, requiredPerm) and requiredPerm ~= nil then + -- Does not have perms to use this + RemoveWeaponFromPed(ped, weapon) + DisplayNotification("~r~Weapon Restricted! \n~w~You aren't a high enough rank to use this!\n" .. restrictedStr) + end + --TriggerServerEvent("Print:PrintDebug", "It gets here 3") -- DEBUG - GET RID OF + end +end) + +function DisplayNotification( text ) + SetNotificationTextEntry( "STRING" ) + AddTextComponentString( text ) + DrawNotification( false, false ) +end \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/server.lua b/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/server.lua new file mode 100644 index 000000000..ec19f9b38 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/Discord-WepRestriction/server.lua @@ -0,0 +1,53 @@ +-------------------------- +--- DiscordWeaponPerms --- +-------------------------- +roleList = { +"Civilian I", -- Civilian I (1) +"Civilian II", -- Civilian II (2) +"Civilian III", -- Civilian III (3) +"Civilian IV", -- Civilian IV (4) +"Civilian V", -- Civilian V (5) +"EG | Helper", -- Mod (6) +"EG | Staff", -- Admin (7) +"EG | Sr. Staff", -- Management (8) +"EG | Moderator", -- Owner (9) +"EG | Sr. Moderator", -- Owner (10) +"EG | Admin", -- Owner (11) +"EG | Sr. Admin", -- Owner (12) +"EG | Head of Staff", -- Owner (13) +"EG | Server Developer", -- Owner (14) +"EG | Owner", -- Owner (15) +} + + +RegisterNetEvent('Print:PrintDebug') +AddEventHandler('Print:PrintDebug', function(msg) + print(msg) + TriggerClientEvent('chatMessage', -1, "^7[^1Badger's Scripts^7] ^1DEBUG ^7" .. msg) +end) + +RegisterNetEvent("DiscordWeaponPerms:CheckPerms") +AddEventHandler("DiscordWeaponPerms:CheckPerms", function() + local src = source + for k, v in ipairs(GetPlayerIdentifiers(src)) do + if string.sub(v, 1, string.len("discord:")) == "discord:" then + identifierDiscord = v + end + end + local hasPerms = {} -- Has perms for indexes: + if identifierDiscord then + local roleIDs = exports.Badger_Discord_API:GetDiscordRoles(src) + if not (roleIDs == false) then + for i = 1, #roleList do + for j = 1, #roleIDs do + if exports.Badger_Discord_API:CheckEqual(roleList[i], roleIDs[j]) then + table.insert(hasPerms, i) + end + end + end + else + print(GetPlayerName(src) .. " has not gotten their permissions cause roleIDs == false") + end + end + TriggerClientEvent('DiscordWeaponPerms:CheckPerms:Return', src, hasPerms) +end) \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/DiscordAcePerms/LICENSE b/resources/[EGRP-Discord-Integration]/DiscordAcePerms/LICENSE new file mode 100644 index 000000000..9595491de --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordAcePerms/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jared + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/resources/[EGRP-Discord-Integration]/DiscordAcePerms/README.md b/resources/[EGRP-Discord-Integration]/DiscordAcePerms/README.md new file mode 100644 index 000000000..52507a04a --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordAcePerms/README.md @@ -0,0 +1,37 @@ +# DiscordAcePerms +## Continued Documentation +https://docs.badger.store/fivem-discord-scripts/discordaceperms + +## Jared's Developer Community [Discord] +[![Developer Discord](https://discordapp.com/api/guilds/597445834153525298/widget.png?style=banner4)](https://discord.com/invite/WjB5VFz) + +## Discontinued Documentation +### Version 1.0 + +#### Installation Information: + +https://forum.fivem.net/t/discordaceperms-release/573044 + +This is another one of my discord scripts! :) If used properly along with my other scripts, you can fully make your server use only discord roles for permissions and chat roles ;) + +You must set up IllusiveTea’s discord_perms script for this to work properly: + +https://forum.fivem.net/t/discord-roles-for-permissions-im-creative-i-know/233805 + +The permissions for a user update after every restart when they first login (so long as they have the discord role ID associated with the group in the list). + +#### How to set it up: + + +The 1s should be replaced with IDs of the respective roles in your discord server. The quotes with groups should represent the groups in your permissions.cfg or server.cfg. +```lua +roleList = { +{1, "group.tc"}, --[[ Trusted-Civ --- ]] +{1, "group.faa"}, --[[ FAA --- ]] +{1, "group.donator"}, --[[ Donator --- ]] +{1, "group.trialModerator"}, --[[ T-Mod --- ]] +{1, "group.moderator"}, --[[ Moderator --- ]] +{1, "group.admin"}, --[[ Admin --- ]] +{1, "group.admin"}, --[[ Management --- ]] +{1, "group.owner"}, --[[ Owner --- ]] +} diff --git a/resources/[EGRP-Discord-Integration]/DiscordAcePerms/__resource.lua b/resources/[EGRP-Discord-Integration]/DiscordAcePerms/__resource.lua new file mode 100644 index 000000000..b607dbd97 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordAcePerms/__resource.lua @@ -0,0 +1,8 @@ +----------------------------------- +--- Discord ACE Perms by Badger --- +----------------------------------- + +resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937" + +server_script "config.lua" +server_script "server.lua" \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/DiscordAcePerms/config.lua b/resources/[EGRP-Discord-Integration]/DiscordAcePerms/config.lua new file mode 100644 index 000000000..7652bf8d0 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordAcePerms/config.lua @@ -0,0 +1,17 @@ +Config = { + Server_Name = "[Elite Gaming RP]", + Discord_Link = 'https://discord.gg/2XvwvgR', + Website_Link = 'https://elite-gaming.co.uk', + roleList = { + {538822780662054963, "group.helper"}, --Helper role + {608583076037001225, "group.staff"}, --Staff role + {789551229549281331, "group.staff"}, --Sr.Staff role + {517060882686279701, "group.moderator"}, --Moderator role + {789538166536798248, "group.moderator"}, --Sr.Moderator role + {635155687688634399, "group.admin"}, --Admin role + {556158473981788176, "group.admin"}, --Sr.Admin role + {650653280275267591, "group.superadmin"}, --Head of Staff role + {789553875152535593, "group.superadmin"}, --Development Team role + {361899298209923075, "group.superadmin"}, --Owner role + }, +} \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/DiscordAcePerms/server.lua b/resources/[EGRP-Discord-Integration]/DiscordAcePerms/server.lua new file mode 100644 index 000000000..b1d2a86b7 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordAcePerms/server.lua @@ -0,0 +1,177 @@ +----------------------------------- +--- Discord ACE Perms by Badger --- +----------------------------------- + +--- Code --- +local function has_value (tab, val) + for index, value in ipairs(tab) do + if value == val then + return true + end + end + + return false +end +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end +function ExtractIdentifiers(src) + local identifiers = { + steam = "", + ip = "", + discord = "", + license = "", + xbl = "", + live = "" + } + + --Loop over all identifiers + for i = 0, GetNumPlayerIdentifiers(src) - 1 do + local id = GetPlayerIdentifier(src, i) + + --Convert it to a nice table. + if string.find(id, "steam") then + identifiers.steam = id + elseif string.find(id, "ip") then + identifiers.ip = id + elseif string.find(id, "discord") then + identifiers.discord = id + elseif string.find(id, "license") then + identifiers.license = id + elseif string.find(id, "xbl") then + identifiers.xbl = id + elseif string.find(id, "live") then + identifiers.live = id + end + end + + return identifiers +end + +DiscordDetector = {} + +InDiscordDetector = {} + +PermTracker = {} + +roleList = Config.roleList; + +AddEventHandler('playerDropped', function (reason) + local src = source; + local discord = ExtractIdentifiers(src).discord:gsub("discord:", ""); + local license = ExtractIdentifiers(src).license; + if PermTracker[discord] ~= nil then + -- They have perms that need to be removed: + local list = PermTracker[discord]; + for i = 1, #list do + local permGroup = list[i]; + ExecuteCommand('remove_principal identifier.discord:' .. discord .. " " .. permGroup); + print("[DiscordAcePerms] (playerDropped) Removed " + .. GetPlayerName(src) .. " from role group " .. permGroup) + end + PermTracker[discord] = nil; + end + DiscordDetector[license] = nil; +end) +debugScript = false; + +AddEventHandler('playerConnecting', function(name, setKickReason, deferrals) + deferrals.defer(); + local src = source; + local identifierDiscord = ""; + local license = ExtractIdentifiers(src).license; + local discord = ExtractIdentifiers(src).discord:gsub("discord:", ""); + for k, v in ipairs(GetPlayerIdentifiers(src)) do + if string.sub(v, 1, string.len("discord:")) == "discord:" then + identifierDiscord = v + end + end + local permAdd = "add_principal identifier.discord:" .. discord .. " " + if identifierDiscord then + if debugScript then + print("Gets past identifierDiscord statement"); + end + local roleIDs = exports.Badger_Discord_API:GetDiscordRoles(src) + if debugScript then + print("Value of roleIDs == " .. tostring(roleIDs)); + end + if not (roleIDs == false) then + if debugScript then + print("Gets past (not [roleIDs == false]) statement"); + end + for i = 1, #roleList do + for j = 1, #roleIDs do + if exports.Badger_Discord_API:CheckEqual(roleList[i][1], roleIDs[j]) then + print("[DiscordAcePerms] (playerConnecting) Added " .. GetPlayerName(src) .. " to role group " .. roleList[i][2]); + ExecuteCommand(permAdd .. roleList[i][2]) + -- Track the permission node given: + if PermTracker[discord] ~= nil then + -- Has them, we add to list + local list = PermTracker[discord]; + table.insert(list, roleList[i][2]); + PermTracker[discord] = list; + else + -- Doesn't have them, give them a list + local list = {}; + table.insert(list, roleList[i][2]); + PermTracker[discord] = list; + end + end + end + end + print("[DiscordAcePerms] (playerConnecting) Player " .. GetPlayerName(src) .. " has been granted their permissions..."); + else + print("[DiscordAcePerms] " .. GetPlayerName(src) .. " has not gotten permissions because we could not find their roles...") + if InDiscordDetector[license] == nil then + -- Notify them they are not in the Discord + InDiscordDetector[license] = true; + local clicked = false; + while not clicked do + deferrals.presentCard(card, + function(data, rawData) + if (data.submitId == 'played') then + clicked = true; + deferrals.done() + end + end) + Citizen.Wait((1000 * 13)); + end + return; + end + end + else + if DiscordDetector[license] == nil then + -- Kick with we couldn't find their discord, try to restart it whilst fivem is closed + DiscordDetector[license] = true; + print('[DiscordAcePerms] Discord was not found for player ' .. GetPlayerName(src) .. "...") + local clicked = false; + while not clicked do + deferrals.presentCard(card, + function(data, rawData) + if (data.submitId == 'played') then + clicked = true; + deferrals.done() + end + end) + Citizen.Wait((1000 * 13)); + end + return; + end + end + deferrals.done(); +end) +--card = '{"type":"AdaptiveCard","$schema":"http://adaptivecards.io/schemas/adaptive-card.json","version":"1.2","body":[{"type":"Container","items":[{"type":"TextBlock","text":"Welcome to ' .. Config.Server_Name .. '","wrap":true,"fontType":"Default","size":"ExtraLarge","weight":"Bolder","color":"Light"},{"type":"TextBlock","text":"You were not detected in our Discord!","wrap":true,"size":"Large","weight":"Bolder","color":"Light"},{"type":"TextBlock","text":"Please join below, then press play! Have fun!","wrap":true,"color":"Light","size":"Medium"},{"type":"ColumnSet","height":"stretch","minHeight":"100px","bleed":true,"horizontalAlignment":"Center","columns":[{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Discord","iconUrl":"","url":"' .. Config.Discord_Link .. '","style":"positive"}]}]},{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.Submit","title":"Play","style":"positive","iconUrl":"","id":"played"}]}]},{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Website","style":"positive","url":"' .. Config.Website_Link .. '","iconUrl":""}]}]}]},{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"DiscordAcePerms created by Badger","style":"destructive","iconUrl":"https://i.gyazo.com/c629f37bb1aeed2c1bc1768fdc93bc1a.gif","url":"https://discord.com/invite/WjB5VFz"}]}],"style":"default","bleed":true,"height":"stretch","isVisible":true}]}' +-- IMPORTANT +-- BEFORE EDITING: +-- Do not take out my credit... Out of respect for my resources, do not remove my credit. Thank you. +card = '{"type":"AdaptiveCard","$schema":"http://adaptivecards.io/schemas/adaptive-card.json","version":"1.2","body":[{"type":"Container","items":[{"type":"TextBlock","text":"Welcome to ' .. Config.Server_Name .. '","wrap":true,"fontType":"Default","size":"ExtraLarge","weight":"Bolder","color":"Light"},{"type":"TextBlock","text":"You were not detected in our Discord!","wrap":true,"size":"Large","weight":"Bolder","color":"Light"},{"type":"TextBlock","text":"Please join below, then press play! Have fun!","wrap":true,"color":"Light","size":"Medium"},{"type":"ColumnSet","height":"stretch","minHeight":"100px","bleed":true,"horizontalAlignment":"Center","selectAction":{"type":"Action.OpenUrl"},"columns":[{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Discord","url":"' .. Config.Discord_Link .. '","style":"positive"}]}]},{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.Submit","title":"Play","style":"positive", "id":"played"}]}]},{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Website","style":"positive","url":"' .. Config.Website_Link .. '"}]}]}]},{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"DiscordAcePerms created by Badger","style":"destructive","iconUrl":"https://i.gyazo.com/c629f37bb1aeed2c1bc1768fdc93bc1a.gif","url":"https://discord.com/invite/WjB5VFz"}]}],"style":"default","bleed":true,"height":"stretch","isVisible":true}]}' +--card = json.encode(card) +--card = [==[{"type":"AdaptiveCard","$schema":"http://adaptivecards.io/schemas/adaptive-card.json","version":"1.2","body":[{"type":"Container","items":[{"type":"TextBlock","text":"Welcome to [SERVER_NAME]","wrap":true,"fontType":"Default","size":"ExtraLarge","weight":"Bolder","color":"Light"},{"type":"TextBlock","text":"You were not detected in our Discord!","wrap":true,"size":"Large","weight":"Bolder","color":"Light"},{"type":"TextBlock","text":"Please join below, then press play! Have fun!","wrap":true,"color":"Light","size":"Medium"},{"type":"ColumnSet","height":"stretch","minHeight":"100px","bleed":true,"horizontalAlignment":"Center","selectAction":{"type":"Action.OpenUrl"},"columns":[{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Discord","iconUrl":"https://i.gyazo.com/c629f37bb1aeed2c1bc1768fdc93bc1a.gif","url":"https://discord.gg","style":"positive"}]}]},{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.Submit","title":"Play","style":"positive","iconUrl":"https://i.gyazo.com/c629f37bb1aeed2c1bc1768fdc93bc1a.gif","id":"played"}]}]},{"type":"Column","width":"stretch","items":[{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"Website","style":"positive","url":"https://badger.store","iconUrl":"https://i.gyazo.com/c629f37bb1aeed2c1bc1768fdc93bc1a.gif"}]}]}]},{"type":"ActionSet","actions":[{"type":"Action.OpenUrl","title":"DiscordAcePerms created by Badger","style":"destructive","iconUrl":"https://i.gyazo.com/c629f37bb1aeed2c1bc1768fdc93bc1a.gif","url":"https://discord.com/invite/WjB5VFz"}]}],"style":"default","bleed":true,"height":"stretch","isVisible":true}]}]==] \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/DiscordChatRoles/LICENSE b/resources/[EGRP-Discord-Integration]/DiscordChatRoles/LICENSE new file mode 100644 index 000000000..9595491de --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordChatRoles/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jared + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/resources/[EGRP-Discord-Integration]/DiscordChatRoles/README.md b/resources/[EGRP-Discord-Integration]/DiscordChatRoles/README.md new file mode 100644 index 000000000..ba53ec8d8 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordChatRoles/README.md @@ -0,0 +1,43 @@ +# DiscordChatRoles + +## Continued Documentation +https://docs.badger.store/fivem-discord-scripts/discordchatroles + +## Discontinued Documentation + +### Version 1.0 + +#### Installation Information: +https://forum.fivem.net/t/discordchatroles-release/566338 + +This is a very simple script that uses IllusiveTea’s discord_perms for chat roles :) + +Picture example taken from my RP server: + +![Example](https://i.gyazo.com/c845547a9cbcd99e7716726d53abb216.png) + +You must set up IllusiveTea’s discord_perms script for this to work properly: + +https://forum.fivem.net/t/discord-roles-for-permissions-im-creative-i-know/233805 + +Example of how the chat roles are set up and what you should change: + +```lua +--[[ + List in order of least priority to highest with + highest priority overtaking role before it if + they have that discord role. +]]-- +roleList = { +{0, "^4Civilian | "}, +{1, "^3Trusted Civ | "}, +{1, "^2Donator | "}, +{1, "^1T-Mod | "}, +{1, "^1Mod | "}, +{1, "^1Admin | "}, +{1, "^6Management | "}, +{1, "^5Owner | "}, +} +``` + +The 1s should be replaced with IDs of the respective roles in your discord server. (0 should stay for Civilian as it is the default role for all users) diff --git a/resources/[EGRP-Discord-Integration]/DiscordChatRoles/__resource.lua b/resources/[EGRP-Discord-Integration]/DiscordChatRoles/__resource.lua new file mode 100644 index 000000000..3d5c0d617 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordChatRoles/__resource.lua @@ -0,0 +1,8 @@ +------------------------------------ +--- Discord Chat Roles by Badger --- +------------------------------------ + +resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937" + +client_script "client.lua" +server_script "server.lua" \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/DiscordChatRoles/client.lua b/resources/[EGRP-Discord-Integration]/DiscordChatRoles/client.lua new file mode 100644 index 000000000..a0f3a2c2e --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordChatRoles/client.lua @@ -0,0 +1,21 @@ +------------------------------------ +--- Discord Chat Roles by Badger --- +------------------------------------ + +RegisterNetEvent('Permissions:CheckPermsClient') +AddEventHandler('Permissions:CheckPermsClient', function(msg) + if staffchatActive then + TriggerServerEvent('DiscordChatRoles:CheckPerms', msg) + end +end) +staffchatActive = true +RegisterNetEvent('DiscordChatRoles:StaffChat:Toggle') +AddEventHandler('DiscordChatRoles:StaffChat:Toggle', function() + if staffchatActive then + staffchatActive = false + TriggerEvent('chatMessage', '', {255, 255, 255}, '^7[^1StaffChat^7] ^5StaffChat messages are now ^1DISABLED') + else + staffchatActive = true + TriggerEvent('chatMessage', '', {255, 255, 255}, '^7[^1StaffChat^7] ^5StaffChat messages are now ^2ENABLED') + end +end) \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/DiscordChatRoles/server.lua b/resources/[EGRP-Discord-Integration]/DiscordChatRoles/server.lua new file mode 100644 index 000000000..140f533f3 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordChatRoles/server.lua @@ -0,0 +1,495 @@ +------------------------------------ +--- Discord Chat Roles by Badger --- +------------------------------------ + +--[[ + List in order of least priority to highest with + highest priority overtaking role before it if + they have that discord role. +]]-- +-- CONFIG -- +roleList = { +{0, "👱†^3Member | "}, -- 1 +{434472452328783893, "👨â€ðŸ”¬ ^3Verified Member | "}, -- 2 +{807398679937417237, "ðŸ› ï¸ ^1Mechanic | "}, -- 3 +{807381509195300905, '👨â€âš•ï¸ ^1SAFD | '}, -- 4 +{807381508167565352, '👮 ^2BCSO | '}, -- 5 +{807381508859887667, '👮 ^8SASP | '}, -- 6 +{807381507622305852, '👮 ^4LSPD | '}, -- 7 +{807381510284902451, '👮 ^4FBI | '}, -- 8 +{807381510026035240, '📶 ^6Dispatch | '}, -- 9 +{585557857827815429, '🔥 ^9Nitro Booster | '}, -- 10 +{596414797977878530, "🥈 ^7Silver Supporter | "}, -- 11 +{742482159851536455, '🥇 ^3Gold Supporter | '}, -- 12 +{742482158945566771, "💠 ^4Platinum Supporter | "}, -- 13 +{742482161680122047, "💎 ^5Diamond Supporter | "}, -- 14 +{608583076037001225, "🛂 ï¸^2Staff | "}, +{789551229549281331, "🛂 ï¸^2Sr. Staff | "}, +{517060882686279701, "🛃 ^4Moderator | "}, +{789538166536798248, "🛃 ^4Sr. Moderator | "}, +{635155687688634399, "🔰 ^2Administrator | "}, +{556158473981788176, "🔰 ^2Senior Administrator | "}, +{650653280275267591, "🔰 ^2Head of Staff | "}, +{671141073728307228, "👨â€ðŸ’» ^8Server Developer | "}, +{361899298209923075, "🉠^8EGRP CEO | "}, +} +sendBlockMessages = false; + + +-- CODE -- +function sendMsg(firstline, msg, to) + TriggerClientEvent('chat:addMessage', to, { + template = '
{0}
{1}
', + args = { firstline, msg } + }); +end + +-- For allowing colored chat +allowedColors = {3, 4, 10, 11, 12, 13, 14} +allowedRed = {10, 11, 12, 13, 14} + + +--- Code --- + +function sleep (a) + local sec = tonumber(os.clock() + a); + while (os.clock() < sec) do + end +end +local function has_value (tab, val) + for index, value in ipairs(tab) do + if value == val then + return true + end + end + + return false +end +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end +function get_index (tab, val) + local counter = 1 + for index, value in ipairs(tab) do + if value == val then + return counter + end + counter = counter + 1 + end + + return nil +end + +roleTracker = {} +roleAccess = {} +chatcolorTracker = {} +local availColors = +{ + ['DiscordChatRoles.Access.Donator'] = { + ['White'] = {'^0'}, + ['Green'] = {'^2'}, + ['Yellow'] = {'^3'}, + ['Blue'] = {'^4'}, + ['Light Blue'] = {'^5'}, + ['Purple'] = {'^6'}, + ['White'] = {'^7'}, + ['Pink'] = {'^9'}, + ['Police'] = {'^1', '^4'}, + ['Police2'] = {'^4', '^1'}, + ['Christmas'] = {'^2', '^1'}, + ['Christmas2'] = {'^1', '^2'}, + }, + ['DiscordChatRoles.Access.Elite'] = { + ['RainbowYGB'] = {'^3', '^2', '^4'}, + ['RainbowFull'] = {'^3', '^4', '^1', '^5', '^6', '^7', '^9'}, + }, + ['DiscordChatRoles.Access.Staff'] = { + ['Red'] = {'^1'}, + } +} +RegisterCommand('chatcolor', function(source, args, rawCommand) + local theirList = {} + local colorList = {} + for k, v in pairs(availColors) do + -- k = Permission + -- v = Array of color-selections + if IsPlayerAceAllowed(source, k) then + -- They have permission to use these colors: + for colorName, colorArr in pairs(availColors[k]) do + table.insert(theirList, colorName); + table.insert(colorList, colorArr); + end + end + end + if #args == 0 then + -- List out which ones they have access to + if #theirList > 0 then + TriggerClientEvent('chatMessage', source, prefix .. 'You have access to the following Chat-Colors:'); + for i = 1, #theirList do + local arr = colorList[i]; + local example = 'Example' + local ex = ''; + local indCount = 1 + for j = 1, #example do + if indCount > #arr then + indCount = 1; + end + local char = example:sub(j, j); + ex = ex .. arr[indCount] .. char; + indCount = indCount + 1; + end + TriggerClientEvent('chatMessage', source, '^9[^4' .. i .. '^9] ^0' .. theirList[i] .. " ---> " .. ex); + end + else + TriggerClientEvent('chatMessage', source, prefix .. '^1ERROR: You have no Chat-Colors :( - Consider donating for some :)'); + end + else + local selection = args[1] + if tonumber(selection) ~= nil then + local sel = tonumber(selection); + if sel <= #theirList then + chatcolorTracker[source] = colorList[sel]; + TriggerClientEvent('chatMessage', source, prefix .. 'You have set your Chat-Color to ^4' .. theirList[sel]); + else + -- Invalid selection + TriggerClientEvent('chatMessage', source, '^1ERROR: That is not a valid selection...') + end + else + -- Print it's not a number + TriggerClientEvent('chatMessage', source, '^1ERROR: You did not put in a number...') + end + end +end) +RegisterCommand('cc', function(source, args, rawCommand) + local theirList = {} + local colorList = {} + for k, v in pairs(availColors) do + -- k = Permission + -- v = Array of color-selections + if IsPlayerAceAllowed(source, k) then + -- They have permission to use these colors: + for colorName, colorArr in pairs(availColors[k]) do + table.insert(theirList, colorName); + table.insert(colorList, colorArr); + end + end + end + if #args == 0 then + -- List out which ones they have access to + if #theirList > 0 then + TriggerClientEvent('chatMessage', source, prefix .. 'You have access to the following Chat-Colors:'); + for i = 1, #theirList do + local arr = colorList[i]; + local example = 'Example' + local ex = ''; + local indCount = 1 + for j = 1, #example do + if indCount > #arr then + indCount = 1; + end + local char = example:sub(j, j); + ex = ex .. arr[indCount] .. char; + indCount = indCount + 1; + end + TriggerClientEvent('chatMessage', source, '^9[^4' .. i .. '^9] ^0' .. theirList[i] .. " ---> " .. ex); + end + else + TriggerClientEvent('chatMessage', source, prefix .. '^1ERROR: You have no Chat-Colors :( - Consider donating for some :)'); + end + else + local selection = args[1] + if tonumber(selection) ~= nil then + local sel = tonumber(selection); + if sel <= #theirList then + chatcolorTracker[source] = colorList[sel]; + TriggerClientEvent('chatMessage', source, prefix .. 'You have set your Chat-Color to ^4' .. theirList[sel]); + else + -- Invalid selection + TriggerClientEvent('chatMessage', source, '^1ERROR: That is not a valid selection...') + end + else + -- Print it's not a number + TriggerClientEvent('chatMessage', source, '^1ERROR: You did not put in a number...') + end + end +end) +function setContains(set, key) + return set[key] ~= nil +end +function msg(src, mesg) + TriggerClientEvent('chatMessage', src, prefix .. mesg) +end +function msgRaw(src, mesg) + TriggerClientEvent('chatMessage', src, mesg) +end +prefix = '^9[^5DiscordChatRoles^9] ^3' +RegisterCommand('chattag', function(source, args, rawCommand) + local steamID = GetPlayerIdentifiers(source)[1]; + local accessChat = roleAccess[steamID] + if accessChat == nil then + -- Need them to say something in chat first 1 time + msg(source, 'You need to say something in chat before you run this command...') + return; + end + if #args == 0 then + -- Just list their chat tags + msg(source, "You have access to the following Chat-Tags:") + for i = 1, #accessChat do + msgRaw(source, '^9[^4' .. i .. '^9] ^r' .. roleList[accessChat[i]][2]) + end + msg(source, "Use /chattag to change your Chat-Tag") + elseif #args == 1 then + -- Change their chat tag + if tonumber(args[1]) ~= nil then + if accessChat[tonumber(args[1])] ~= nil then + -- Set their chatTag + roleTracker[steamID] = accessChat[tonumber(args[1])] + msg(source, 'Your Chat-Tag has now been set to:^r ' .. roleList[accessChat[tonumber(args[1])]][2]) + else + -- Not a valid chat tag ID + msg(source, '^1ERROR: This is not a valid Chat-Tag id') + end + else + -- It's not a valid number + msg(source, '^1ERROR: This is not a number...') + end + else + -- Not correct syntax + msg(source, '^1ERROR: Not proper usage. /chattag ') + end +end) +chatNotEnabled = {} +RegisterNetEvent('DiscordChatRoles:DisableChat') +AddEventHandler('DiscordChatRoles:DisableChat', function(src) + chatNotEnabled[src] = true; +end) +RegisterNetEvent('DiscordChatRoles:EnableChat') +AddEventHandler('DiscordChatRoles:EnableChat', function(src) + chatNotEnabled[src] = nil; +end) + +AddEventHandler('chatMessage', function(source, name, msg) + local args = stringsplit(msg) + CancelEvent() + local src = source + if not string.find(args[1], "/") and setContains(roleTracker, GetPlayerIdentifiers(source)[1]) and + not has_value(inStaffChat, GetPlayerIdentifiers(source)[1]) and not (chatNotEnabled[src] ~= nil) then + local roleStr = roleList[roleTracker[GetPlayerIdentifiers(source)[1]]][2] + local colors = {'^0', '^2', '^3', '^4', '^5', '^6', '^7', '^8', '^9'} + local staffColors = {'^1', '^8'} + local hasColors = false + local hasRed = false + local roleNum = roleTracker[GetPlayerIdentifiers(source)[1]] + for i = 1, #colors do + local checkFor = "%" .. tostring(colors[i]) + if string.match(msg, checkFor) ~= nil then + hasColors = true + end + end + for i = 1, #staffColors do + if string.find(msg, "%" .. staffColors[i]) ~= nil then + hasRed = true + end + end + local dontSend = false + if hasColors then + -- Check if they have required role + if not has_value(allowedColors, tonumber(roleNum)) then + dontSend = true + TriggerClientEvent('chatMessage', source, "^7[^1DiscordChatRoles^7] ^1You cannot use colored chat since you are not a donator...") + end + end + if hasRed then + -- Check if they have required role + if not has_value(allowedRed, tonumber(roleNum)) then + dontSend = true + TriggerClientEvent('chatMessage', source, "^7[^1DiscordChatRoles^7] ^1You cannot use the color RED in chat since you are not staff...") + end + end + local theirColor = chatcolorTracker[source]; + local finalMessage = msg; + if theirColor ~= nil then + finalMessage = '' + local indCount = 1; + for j = 1, #msg do + if indCount > #theirColor then + indCount = 1; + end + local char = msg:sub(j, j); + finalMessage = finalMessage .. theirColor[indCount] .. char; + indCount = indCount + 1; + end + end + if not dontSend then + --TriggerClientEvent('chatMessage', -1, roleStr .. name .. "^7: " .. finalMessage) + if sendBlockMessages then + sendMsg(roleStr .. name .. "^7: ", finalMessage, -1); + else + TriggerClientEvent('chatMessage', -1, roleStr .. name .. "^7: " .. finalMessage); + end + end + end + if not string.find(args[1], "/") and not has_value(inStaffChat, GetPlayerIdentifiers(source)[1]) and + not setContains(roleTracker, GetPlayerIdentifiers(source)[1]) and not (chatNotEnabled[src] ~= nil) then + CancelEvent() + roleTracker[GetPlayerIdentifiers(source)[1]] = 1 + for k, v in ipairs(GetPlayerIdentifiers(src)) do + if string.sub(v, 1, string.len("discord:")) == "discord:" then + identifierDiscord = v + end + end + local roleStr = roleList[1][2] + local roleNum = 1 + local hasAccess = {} + table.insert(hasAccess, roleNum) + if identifierDiscord then + local roleIDs = exports.discord_perms:GetRoles(src) + -- Loop through roleList and set their role up: + if not (roleIDs == false) then + for i = 1, #roleList do + for j = 1, #roleIDs do + local roleID = roleIDs[j] + if (tostring(roleList[i][1]) == tostring(roleID)) then + roleStr = roleList[i][2] + table.insert(hasAccess, i) + roleNum = i + end + end + end + roleAccess[GetPlayerIdentifiers(source)[1]] = hasAccess; + else + print(GetPlayerName(src) .. " has not gotten their permissions cause roleIDs == false") + end + end + roleTracker[GetPlayerIdentifiers(source)[1]] = roleNum + local colors = {'^0', '^2', '^3', '^4', '^5', '^6', '^7', '^8', '^9'} + local staffColors = {'^1', '^8'} + local hasColors = false + local hasRed = false + for i = 1, #colors do + local checkFor = "%" .. tostring(colors[i]) + if string.match(msg, checkFor) ~= nil then + hasColors = true + end + end + for i = 1, #staffColors do + if string.find(msg, "%" .. staffColors[i]) ~= nil then + hasRed = true + end + end + local dontSend = false + if hasColors then + -- Check if they have required role + if not has_value(allowedColors, tonumber(roleNum)) then + dontSend = true + TriggerClientEvent('chatMessage', source, "^7[^1DiscordChatRoles^7] ^1You cannot use colored chat since you are not a donator...") + end + end + if hasRed then + -- Check if they have required role + if not has_value(allowedRed, tonumber(roleNum)) then + dontSend = true + TriggerClientEvent('chatMessage', source, "^7[^1DiscordChatRoles^7] ^1You cannot use the color RED in chat since you are not staff...") + end + end + local theirColor = chatcolorTracker[source]; + local finalMessage = msg; + if theirColor ~= nil then + finalMessage = '' + local indCount = 1; + for j = 1, #msg do + if indCount > #theirColor then + indCount = 1; + end + local char = msg:sub(j, j); + finalMessage = finalMessage .. theirColor[indCount] .. char; + indCount = indCount + 1; + end + end + if not dontSend then + --TriggerClientEvent('chatMessage', -1, roleStr .. name .. "^7: " .. finalMessage) + if (sendBlockMessages) then + sendMsg(roleStr .. name .. "^7: ", finalMessage, -1); + else + TriggerClientEvent('chatMessage', -1, roleStr .. name .. "^7: " .. finalMessage); + end + end + elseif has_value(inStaffChat, GetPlayerIdentifiers(source)[1]) and not string.find(args[1], "/") and not (chatNotEnabled[src] ~= nil) then + -- Run client event for all and check perms + CancelEvent() + msg = "^7[^1StaffChat^7] ^5(^1" .. name .. "^5) ^9" .. msg + TriggerClientEvent('Permissions:CheckPermsClient', -1, msg) + --print("It gets here 1") + end +end) +RegisterNetEvent('Print:PrintDebug') +AddEventHandler('Print:PrintDebug', function(msg) + print(msg) + TriggerClientEvent('chatMessage', source, "^7[^1Badger's Scripts^7] ^1DEBUG ^7" .. msg) +end) +inStaffChat = {} +RegisterNetEvent("DiscordChatRoles:CheckPerms") +AddEventHandler("DiscordChatRoles:CheckPerms", function(msg) + -- Check if they have permissions + --print("It gets to start") + local src = source + if IsPlayerAceAllowed(src, "StaffChat.Toggle") then + TriggerClientEvent('chatMessage', src, msg) + --print("It gets to end") + else + -- Doesn't have perms + end +end) +RegisterCommand("staffchat", function(source, args, rawCommand) + -- Check if they can run the command + if IsPlayerAceAllowed(source, "StaffChat.Toggle") then + if #args == 1 then + if args[1] == "toggle" then + -- Turn off their staffchat and return + TriggerClientEvent('DiscordChatRoles:StaffChat:Toggle', source) + return + end + end + if not has_value(inStaffChat, GetPlayerIdentifiers(source)[1]) then + table.insert(inStaffChat, GetPlayerIdentifiers(source)[1]) + TriggerClientEvent('chatMessage', source, "^7[^1StaffChat^7] ^5StaffChat has been toggled ^2ON") + else + table.remove(inStaffChat, get_index(inStaffChat, GetPlayerIdentifiers(source)[1])) + TriggerClientEvent('chatMessage', source, "^7[^1StaffChat^7] ^5StaffChat has been toggled ^1OFF") + end + end +end) + +RegisterCommand("sc", function(source, args, rawCommand) + -- Check if they can run the command + if IsPlayerAceAllowed(source, "StaffChat.Toggle") then + if #args == 1 then + if args[1] == "toggle" then + -- Turn off their staffchat and return + TriggerClientEvent('DiscordChatRoles:StaffChat:Toggle', source) + return + end + end + if not has_value(inStaffChat, GetPlayerIdentifiers(source)[1]) then + table.insert(inStaffChat, GetPlayerIdentifiers(source)[1]) + TriggerClientEvent('chatMessage', source, "^7[^1StaffChat^7] ^5StaffChat has been toggled ^2ON") + else + table.remove(inStaffChat, get_index(inStaffChat, GetPlayerIdentifiers(source)[1])) + TriggerClientEvent('chatMessage', source, "^7[^1StaffChat^7] ^5StaffChat has been toggled ^1OFF") + end + end +end) + +AddEventHandler("playerDropped", function() + if has_value(inStaffChat, GetPlayerIdentifiers(source)[1]) then + table.remove(inStaffChat, get_index(inStaffChat, GetPlayerIdentifiers(source)[1])) + end +end) \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/DiscordReports/LICENSE b/resources/[EGRP-Discord-Integration]/DiscordReports/LICENSE new file mode 100644 index 000000000..9595491de --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordReports/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jared + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/resources/[EGRP-Discord-Integration]/DiscordReports/README.md b/resources/[EGRP-Discord-Integration]/DiscordReports/README.md new file mode 100644 index 000000000..1bd528ce5 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordReports/README.md @@ -0,0 +1,4 @@ +# DiscordReports +A Fivem script +## Documentation +https://docs.badger.store/fivem-discord-scripts/discordreports diff --git a/resources/[EGRP-Discord-Integration]/DiscordReports/__resource.lua b/resources/[EGRP-Discord-Integration]/DiscordReports/__resource.lua new file mode 100644 index 000000000..281e9392c --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordReports/__resource.lua @@ -0,0 +1,7 @@ +----------------------------------- +---------- Discord Reports -------- +--- by Badger --- +----------------------------------- + +client_script "client.lua" +server_script "server.lua" \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/DiscordReports/client.lua b/resources/[EGRP-Discord-Integration]/DiscordReports/client.lua new file mode 100644 index 000000000..6a0c31d31 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordReports/client.lua @@ -0,0 +1,17 @@ +----------------------------------- +---------- Discord Reports -------- +--- by Badger --- +----------------------------------- + +RegisterNetEvent("Reports:CheckPermission:Client") +AddEventHandler("Reports:CheckPermission:Client", function(msg, error) + TriggerServerEvent("Reports:CheckPermission", msg, false) +end) + +--- Functions --- +function ShowInfo(text) + SetNotificationTextEntry("STRING") + AddTextComponentSubstringPlayerName(text) + DrawNotification(false, false) +end + diff --git a/resources/[EGRP-Discord-Integration]/DiscordReports/server.lua b/resources/[EGRP-Discord-Integration]/DiscordReports/server.lua new file mode 100644 index 000000000..7e17a6eda --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/DiscordReports/server.lua @@ -0,0 +1,158 @@ +----------------------------------- +---------- Discord Reports -------- +--- by Badger --- +----------------------------------- +-- Config -- +webhookURL = 'https://discord.com/api/webhooks/807400065840447510/sA249_-XyX9xntZPSyH8STNStIRdbggo2pMXyTLRVTRkSsqnOG2AksZ1D-d-a8qJYAxg' +displayIdentifiers = true; + +-- CODE -- +function GetPlayers() + local players = {} + + for _, i in ipairs(GetActivePlayers()) do + if NetworkIsPlayerActive(i) then + table.insert(players, i) + end + end + + return players +end + +RegisterCommand("report", function(source, args, rawCommand) + sm = stringsplit(rawCommand, " "); + if #args < 2 then + TriggerClientEvent('chatMessage', source, "^1ERROR: Invalid Usage. ^2Proper Usage: /report ") + return; + end + id = sm[2] + if GetPlayerIdentifiers(id)[1] == nil then + TriggerClientEvent('chatMessage', source, "^1ERROR: The specified ID is not currently online...") + return; + end + msg = "" + local message = "" + msg = msg .. " ^9(^6" .. GetPlayerName(source) .. "^9) ^1[^3" .. id .. "^1] " + for i = 3, #sm do + msg = msg .. sm[i] .. " " + message = message .. sm[i] .. " " + end + -- TriggerClientEvent('chatMessage', source, "^9[^1Badger-Tags^9] ^3Your tag is now ^2active") + -- TriggerClientEvent('SandyRestrictions:IsAOP:Return', -1, isSandyAOP, false) + if tonumber(id) ~= nil then + -- it's a number + TriggerClientEvent("Reports:CheckPermission:Client", -1, msg, false) + TriggerClientEvent('chatMessage', source, "^9[^1Report^9] ^2Report has been submitted! Thank you for helping us :)") + if not displayIdentifiers then + sendToDisc("NEW REPORT: _[" .. tostring(id) .. "] " .. GetPlayerName(id) .. "_", 'Reason: **' .. message .. + '**', "Reported by: [" .. source .. "] " .. GetPlayerName(source)) + else + -- Display the identifiers with the report + local ids = ExtractIdentifiers(id); + local steam = ids.steam:gsub("steam:", ""); + local steamDec = tostring(tonumber(steam,16)); + steam = "https://steamcommunity.com/profiles/" .. steamDec; + local gameLicense = ids.license; + local discord = ids.discord; + sendToDisc("NEW REPORT: _[" .. tostring(id) .. "] " .. GetPlayerName(id) .. "_", + 'Reason: **' .. message .. + '**\n' .. + 'Steam: **' .. steam .. '**\n' .. + 'GameLicense: **' .. gameLicense .. '**\n' .. + 'Discord Tag: **<@' .. discord:gsub('discord:', '') .. '>**\n' .. + 'Discord UID: **' .. discord:gsub('discord:', '') .. '**', "Reported by: [" .. source .. "] " .. GetPlayerName(source)) + end + --print("Runs report command fine and is number for ID") -- TODO - Debug + else + -- It's not a number + TriggerClientEvent('chatMessage', source, "^9[^1Report^9] ^1Invalid Format. ^1Proper Format: /report ") + end +end) + +function sendToDisc(title, message, footer) + local embed = {} + embed = { + { + ["color"] = 16711680, -- GREEN = 65280 --- RED = 16711680 + ["title"] = "**".. title .."**", + ["description"] = "" .. message .. "", + ["footer"] = { + ["text"] = footer, + }, + } + } + -- Start + -- TODO Input Webhook + PerformHttpRequest(webhookURL, + function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + -- END +end + +local function has_value (tab, val) + for index, value in ipairs(tab) do + if value == val then + return true + end + end + return false +end +function sleep (a) + local sec = tonumber(os.clock() + a); + while (os.clock() < sec) do + end +end + +hasPermission = {} +doesNotHavePermission = {} + +RegisterNetEvent("Reports:CheckPermission") +AddEventHandler("Reports:CheckPermission", function(msg, error) + local src = source + if IsPlayerAceAllowed(src, "BadgerReports.See") then + TriggerClientEvent('chatMessage', src, "^9[^1Report^9] ^8" .. msg) + end +end) + +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + return t +end +function ExtractIdentifiers(src) + local identifiers = { + steam = "", + ip = "", + discord = "", + license = "", + xbl = "", + live = "" + } + + --Loop over all identifiers + for i = 0, GetNumPlayerIdentifiers(src) - 1 do + local id = GetPlayerIdentifier(src, i) + + --Convert it to a nice table. + if string.find(id, "steam") then + identifiers.steam = id + elseif string.find(id, "ip") then + identifiers.ip = id + elseif string.find(id, "discord") then + identifiers.discord = id + elseif string.find(id, "license") then + identifiers.license = id + elseif string.find(id, "xbl") then + identifiers.xbl = id + elseif string.find(id, "live") then + identifiers.live = id + end + end + + return identifiers +end \ No newline at end of file diff --git a/resources/[EGRP-Discord-Integration]/discord_perms/__resource.lua b/resources/[EGRP-Discord-Integration]/discord_perms/__resource.lua new file mode 100644 index 000000000..7ebbaf845 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/discord_perms/__resource.lua @@ -0,0 +1,9 @@ +resource_manifest_version "44febabe-d386-4d18-afbe-5e627f4af937" + +server_scripts { + "config.lua", + "server.lua" +} + +server_export "IsRolePresent" +server_export "GetRoles" diff --git a/resources/[EGRP-Discord-Integration]/discord_perms/config.lua b/resources/[EGRP-Discord-Integration]/discord_perms/config.lua new file mode 100644 index 000000000..d1e37d41d --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/discord_perms/config.lua @@ -0,0 +1,11 @@ +Config = { + DiscordToken = "NTI4NjYwNTc5MjA4OTIxMDk4.DwljPg.T-EapLt0H4szdfByBQIh7ks3kb8", + GuildId = "361895986198609920", + + -- Format: ["Role Nickname"] = "Role ID" You can get role id by doing \@RoleName + Roles = { + ["Donator"] = "703705936577036290", -- This would be checked by doing exports.discord_perms:IsRolePresent(user, "TestRole") + ["Donator+"] = "711589146925203519" + --["Donator++"] = "711628656341942394" + } +} diff --git a/resources/[EGRP-Discord-Integration]/discord_perms/server.lua b/resources/[EGRP-Discord-Integration]/discord_perms/server.lua new file mode 100644 index 000000000..173551a20 --- /dev/null +++ b/resources/[EGRP-Discord-Integration]/discord_perms/server.lua @@ -0,0 +1,94 @@ +local FormattedToken = "Bot "..Config.DiscordToken + +function DiscordRequest(method, endpoint, jsondata) + local data = nil + PerformHttpRequest("https://discordapp.com/api/"..endpoint, function(errorCode, resultData, resultHeaders) + data = {data=resultData, code=errorCode, headers=resultHeaders} + end, method, #jsondata > 0 and json.encode(jsondata) or "", {["Content-Type"] = "application/json", ["Authorization"] = FormattedToken}) + + while data == nil do + Citizen.Wait(0) + end + + return data +end + +function GetRoles(user) + local discordId = nil + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + print("Found discord id: "..discordId) + break + end + end + + if discordId then + local endpoint = ("guilds/%s/members/%s"):format(Config.GuildId, discordId) + local member = DiscordRequest("GET", endpoint, {}) + if member.code == 200 then + local data = json.decode(member.data) + local roles = data.roles + local found = true + return roles + else + --print("An error occured, maybe they arent in the discord? Error: "..member.data) + return false + end + else + --print("missing identifier") + return false + end +end + +function IsRolePresent(user, role) + local discordId = nil + for _, id in ipairs(GetPlayerIdentifiers(user)) do + if string.match(id, "discord:") then + discordId = string.gsub(id, "discord:", "") + --print("Found discord id: "..discordId) + break + end + end + + local theRole = nil + if type(role) == "number" then + theRole = tostring(role) + else + theRole = Config.Roles[role] + end + + if discordId then + local endpoint = ("guilds/%s/members/%s"):format(Config.GuildId, discordId) + local member = DiscordRequest("GET", endpoint, {}) + if member.code == 200 then + local data = json.decode(member.data) + local roles = data.roles + local found = true + for i=1, #roles do + if roles[i] == theRole then + --print("Found role") + return true + end + end + --print("Not found!") + return false + else + --print("An error occured, maybe they arent in the discord? Error: "..member.data) + return false + end + else + --print("Missing Identifier") + return false + end +end + +Citizen.CreateThread(function() + local guild = DiscordRequest("GET", "guilds/"..Config.GuildId, {}) + if guild.code == 200 then + local data = json.decode(guild.data) + --print("Permission system guild set to: "..data.name.." ("..data.id..")") + else + --print("An error occured, please check your config and ensure everything is correct. Error: "..(guild.data or guild.code)) + end +end) diff --git a/resources/[EGRP-Peds]/AdminPed/__resource.lua b/resources/[EGRP-Peds]/AdminPed/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/AdminPed/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/AdminPed/peds.meta b/resources/[EGRP-Peds]/AdminPed/peds.meta new file mode 100644 index 000000000..7db281425 --- /dev/null +++ b/resources/[EGRP-Peds]/AdminPed/peds.meta @@ -0,0 +1 @@ + s_m_m_ciasec_01 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.ydd b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.ydd new file mode 100644 index 000000000..3b56c4c73 Binary files /dev/null and b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.ydd differ diff --git a/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.yft b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.yft new file mode 100644 index 000000000..20a017ce3 --- /dev/null +++ b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca9f77e0b335bc0b765ed4a5fe669c8266e5a5a2c48fdc65646bcad9734903ac +size 12785 diff --git a/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.ymt b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.ymt new file mode 100644 index 000000000..884d4a06a Binary files /dev/null and b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.ymt differ diff --git a/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.ytd b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.ytd new file mode 100644 index 000000000..cde5ea7d1 --- /dev/null +++ b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b1586b4223a50009ae9c550623e1d1524a9a22770dda3eeed6e861a7735fd3d +size 9871448 diff --git a/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01_p.ydd b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01_p.ydd new file mode 100644 index 000000000..ee2646f3d Binary files /dev/null and b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01_p.ydd differ diff --git a/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01_p.ytd b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01_p.ytd new file mode 100644 index 000000000..c5e8eb76a --- /dev/null +++ b/resources/[EGRP-Peds]/AdminPed/stream/s_m_m_ciasec_01_p.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0644e96aa4738e87b8b5b376e6ae567a763455b9a9bd73f3f7b82500ec6caf5d +size 1006953 diff --git a/resources/[EGRP-Peds]/Alien/__resource.lua b/resources/[EGRP-Peds]/Alien/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/Alien/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/Alien/peds.meta b/resources/[EGRP-Peds]/Alien/peds.meta new file mode 100644 index 000000000..8521f807e --- /dev/null +++ b/resources/[EGRP-Peds]/Alien/peds.meta @@ -0,0 +1 @@ + Alien move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/Alien/stream/Alien.ydd b/resources/[EGRP-Peds]/Alien/stream/Alien.ydd new file mode 100644 index 000000000..d151ea273 Binary files /dev/null and b/resources/[EGRP-Peds]/Alien/stream/Alien.ydd differ diff --git a/resources/[EGRP-Peds]/Alien/stream/Alien.yft b/resources/[EGRP-Peds]/Alien/stream/Alien.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/Alien/stream/Alien.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/Alien/stream/Alien.ymt b/resources/[EGRP-Peds]/Alien/stream/Alien.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/Alien/stream/Alien.ymt differ diff --git a/resources/[EGRP-Peds]/Alien/stream/Alien.ytd b/resources/[EGRP-Peds]/Alien/stream/Alien.ytd new file mode 100644 index 000000000..3d1f710f1 --- /dev/null +++ b/resources/[EGRP-Peds]/Alien/stream/Alien.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c7ffb96f55e52146932b8e87009560aa742ce230e93d3a0889440adb00b3899 +size 1372507 diff --git a/resources/[EGRP-Peds]/BCSO/__resource.lua b/resources/[EGRP-Peds]/BCSO/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/BCSO/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/BCSO/peds.meta b/resources/[EGRP-Peds]/BCSO/peds.meta new file mode 100644 index 000000000..ccd401389 --- /dev/null +++ b/resources/[EGRP-Peds]/BCSO/peds.meta @@ -0,0 +1 @@ + BCSO move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/BCSO/stream/BCSO.ydd b/resources/[EGRP-Peds]/BCSO/stream/BCSO.ydd new file mode 100644 index 000000000..0d2e8d879 Binary files /dev/null and b/resources/[EGRP-Peds]/BCSO/stream/BCSO.ydd differ diff --git a/resources/[EGRP-Peds]/BCSO/stream/BCSO.yft b/resources/[EGRP-Peds]/BCSO/stream/BCSO.yft new file mode 100644 index 000000000..c638f79c2 --- /dev/null +++ b/resources/[EGRP-Peds]/BCSO/stream/BCSO.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c36737237e40a7e5c06683ec4cdbf04788aab1ab8feeb6d02fb50070a5bc634 +size 12782 diff --git a/resources/[EGRP-Peds]/BCSO/stream/BCSO.ymt b/resources/[EGRP-Peds]/BCSO/stream/BCSO.ymt new file mode 100644 index 000000000..5900255b0 Binary files /dev/null and b/resources/[EGRP-Peds]/BCSO/stream/BCSO.ymt differ diff --git a/resources/[EGRP-Peds]/BCSO/stream/BCSO.ytd b/resources/[EGRP-Peds]/BCSO/stream/BCSO.ytd new file mode 100644 index 000000000..3c41acc70 --- /dev/null +++ b/resources/[EGRP-Peds]/BCSO/stream/BCSO.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9bf977815cd61c9ed7a078b79326d126ad790b90bd5cdf27b16d1c5eeb2226d +size 5406906 diff --git a/resources/[EGRP-Peds]/BCSO/stream/BCSO_p.ydd b/resources/[EGRP-Peds]/BCSO/stream/BCSO_p.ydd new file mode 100644 index 000000000..a3e67cd69 Binary files /dev/null and b/resources/[EGRP-Peds]/BCSO/stream/BCSO_p.ydd differ diff --git a/resources/[EGRP-Peds]/BCSO/stream/BCSO_p.ytd b/resources/[EGRP-Peds]/BCSO/stream/BCSO_p.ytd new file mode 100644 index 000000000..faf756258 --- /dev/null +++ b/resources/[EGRP-Peds]/BCSO/stream/BCSO_p.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:deb67ac40e9d5ba137475b7ae9c32e9f32664bb84d2e64347753d2789dc08aaa +size 103878 diff --git a/resources/[EGRP-Peds]/Batman/__resource.lua b/resources/[EGRP-Peds]/Batman/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/Batman/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/Batman/peds.meta b/resources/[EGRP-Peds]/Batman/peds.meta new file mode 100644 index 000000000..41c21f275 --- /dev/null +++ b/resources/[EGRP-Peds]/Batman/peds.meta @@ -0,0 +1 @@ + BatmanBVS move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.ydd b/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.ydd new file mode 100644 index 000000000..4986c11d4 Binary files /dev/null and b/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.ydd differ diff --git a/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.yft b/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.ymt b/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.ymt differ diff --git a/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.ytd b/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.ytd new file mode 100644 index 000000000..5e60e0244 --- /dev/null +++ b/resources/[EGRP-Peds]/Batman/stream/BatmanBVS.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33a4e2c859c65d1196c159f9513438f0c2d077d425a65d664c8d8879d06c90b9 +size 1721114 diff --git a/resources/[EGRP-Peds]/BlueStaff/__resource.lua b/resources/[EGRP-Peds]/BlueStaff/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/BlueStaff/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/BlueStaff/peds.meta b/resources/[EGRP-Peds]/BlueStaff/peds.meta new file mode 100644 index 000000000..8278de468 --- /dev/null +++ b/resources/[EGRP-Peds]/BlueStaff/peds.meta @@ -0,0 +1 @@ + csb_mweather move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.ydd b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.ydd new file mode 100644 index 000000000..78f5d1fb4 Binary files /dev/null and b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.ydd differ diff --git a/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.yft b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.yft new file mode 100644 index 000000000..5179368ce --- /dev/null +++ b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07cd49a21de0f73eed3963a111eb1a638c3037f65af1f6ea710cbc5286e78389 +size 15001 diff --git a/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.ymt b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.ymt new file mode 100644 index 000000000..5725fc35b Binary files /dev/null and b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.ymt differ diff --git a/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.ytd b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.ytd new file mode 100644 index 000000000..6cdb54e99 --- /dev/null +++ b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:042b7f57332d02b861566953f00b189e1db85aecb1d785db273bcd35c690dba2 +size 1623826 diff --git a/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather_p.ydd b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather_p.ydd new file mode 100644 index 000000000..46f0b86c8 Binary files /dev/null and b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather_p.ydd differ diff --git a/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather_p.ytd b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather_p.ytd new file mode 100644 index 000000000..2f624076c --- /dev/null +++ b/resources/[EGRP-Peds]/BlueStaff/stream/csb_mweather_p.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40b043f5415c69da6160410674fdfa94d6a054210a25911f8b4afb79874a927f +size 57539 diff --git a/resources/[EGRP-Peds]/BritishArmed/__resource.lua b/resources/[EGRP-Peds]/BritishArmed/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/BritishArmed/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/BritishArmed/peds.meta b/resources/[EGRP-Peds]/BritishArmed/peds.meta new file mode 100644 index 000000000..654fd56d3 --- /dev/null +++ b/resources/[EGRP-Peds]/BritishArmed/peds.meta @@ -0,0 +1 @@ + BritishArmed move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.ydd b/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.ydd new file mode 100644 index 000000000..32938159e Binary files /dev/null and b/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.ydd differ diff --git a/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.yft b/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.yft new file mode 100644 index 000000000..20a017ce3 --- /dev/null +++ b/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca9f77e0b335bc0b765ed4a5fe669c8266e5a5a2c48fdc65646bcad9734903ac +size 12785 diff --git a/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.ymt b/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.ymt new file mode 100644 index 000000000..abc92523f Binary files /dev/null and b/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.ymt differ diff --git a/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.ytd b/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.ytd new file mode 100644 index 000000000..435986873 --- /dev/null +++ b/resources/[EGRP-Peds]/BritishArmed/stream/BritishArmed.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3963a4a927637885d3f4ae53f07627cbc69a533535ced7d241f3d55e1814571d +size 16363691 diff --git a/resources/[EGRP-Peds]/BumbleBee/__resource.lua b/resources/[EGRP-Peds]/BumbleBee/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/BumbleBee/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/BumbleBee/peds.meta b/resources/[EGRP-Peds]/BumbleBee/peds.meta new file mode 100644 index 000000000..ee2f58632 --- /dev/null +++ b/resources/[EGRP-Peds]/BumbleBee/peds.meta @@ -0,0 +1 @@ + BumbleBee move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL BumbleBeeMini move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.ydd b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.ydd new file mode 100644 index 000000000..e491c64ab Binary files /dev/null and b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.ydd differ diff --git a/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.yft b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.yft new file mode 100644 index 000000000..f162e2a1a --- /dev/null +++ b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:218e4fe515a9fd8c7cf455f46e2cf88c2fe9d8c36595e78fda54e155f57357fa +size 14045 diff --git a/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.ymt b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.ymt differ diff --git a/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.ytd b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.ytd new file mode 100644 index 000000000..51ca2aaeb --- /dev/null +++ b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBee.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e982c3ae444e973d282acf1254aedc1a851f0566e09e07e28e03760d208b373 +size 4759351 diff --git a/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.ydd b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.ydd new file mode 100644 index 000000000..d6b20f1d3 Binary files /dev/null and b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.ydd differ diff --git a/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.yft b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.yft new file mode 100644 index 000000000..96ea54b5d --- /dev/null +++ b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29a6997bae2f5b7cace812bf9b2e752110d65640cd9b44673f3c2c435c4293de +size 13310 diff --git a/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.ymt b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.ymt differ diff --git a/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.ytd b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.ytd new file mode 100644 index 000000000..51ca2aaeb --- /dev/null +++ b/resources/[EGRP-Peds]/BumbleBee/stream/BumbleBeeMini.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e982c3ae444e973d282acf1254aedc1a851f0566e09e07e28e03760d208b373 +size 4759351 diff --git a/resources/[EGRP-Peds]/CasualMai/__resource.lua b/resources/[EGRP-Peds]/CasualMai/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/CasualMai/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/CasualMai/peds.meta b/resources/[EGRP-Peds]/CasualMai/peds.meta new file mode 100644 index 000000000..c8d0b4ef9 --- /dev/null +++ b/resources/[EGRP-Peds]/CasualMai/peds.meta @@ -0,0 +1 @@ + CasualMai move_m@generic expr_set_ambient_male CIVFEMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.ydd b/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.ydd new file mode 100644 index 000000000..e5a935f8e Binary files /dev/null and b/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.ydd differ diff --git a/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.yft b/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.yft new file mode 100644 index 000000000..18b31dd43 --- /dev/null +++ b/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7cbb0591f9fdc8219ef4a18b62737674af345728c9f1dfa3218b338f5387189 +size 14588 diff --git a/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.ymt b/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.ymt new file mode 100644 index 000000000..06b93fec0 Binary files /dev/null and b/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.ymt differ diff --git a/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.ytd b/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.ytd new file mode 100644 index 000000000..22cf18734 --- /dev/null +++ b/resources/[EGRP-Peds]/CasualMai/stream/CasualMai.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed5c96a1978e6e81befdd526fd17200898acdda4d9e962000fb652e6af3df69c +size 15683614 diff --git a/resources/[EGRP-Peds]/CyberpunkGirls/__resource.lua b/resources/[EGRP-Peds]/CyberpunkGirls/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/CyberpunkGirls/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/CyberpunkGirls/peds.meta b/resources/[EGRP-Peds]/CyberpunkGirls/peds.meta new file mode 100644 index 000000000..984cead45 --- /dev/null +++ b/resources/[EGRP-Peds]/CyberpunkGirls/peds.meta @@ -0,0 +1 @@ + Cyberpunk move_m@generic expr_set_ambient_male CIVFEMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL Cyberpunk2 move_m@generic expr_set_ambient_male CIVFEMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.ydd b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.ydd new file mode 100644 index 000000000..bdb1dbe51 Binary files /dev/null and b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.ydd differ diff --git a/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.yft b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.yft new file mode 100644 index 000000000..059d7f2ac --- /dev/null +++ b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc58bdffcd890604eceaa7cb168cc2e54ea7acf5817bf340da77f045b03ecb56 +size 15154 diff --git a/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.ymt b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.ymt new file mode 100644 index 000000000..5244ec231 Binary files /dev/null and b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.ymt differ diff --git a/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.ytd b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.ytd new file mode 100644 index 000000000..b1eb9e1ec --- /dev/null +++ b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4152ec9e2af9f3786090a7ecad58cec56b1f42d82af23388541018cc2d964f3d +size 8109657 diff --git a/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.ydd b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.ydd new file mode 100644 index 000000000..384b4d088 Binary files /dev/null and b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.ydd differ diff --git a/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.yft b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.yft new file mode 100644 index 000000000..5b854fc02 --- /dev/null +++ b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a654604a61e0220ec49ce16f1532ca606ac27bded3067a37f46b355b9c93e08a +size 16005 diff --git a/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.ymt b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.ymt new file mode 100644 index 000000000..5244ec231 Binary files /dev/null and b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.ymt differ diff --git a/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.ytd b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.ytd new file mode 100644 index 000000000..3ed78246f --- /dev/null +++ b/resources/[EGRP-Peds]/CyberpunkGirls/stream/Cyberpunk2.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1df77edaf3eef2e20773a5501519ce94f6a51a487bdc318252a4f97ba56903cc +size 7086846 diff --git a/resources/[EGRP-Peds]/DarthVader/__resource.lua b/resources/[EGRP-Peds]/DarthVader/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/DarthVader/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/DarthVader/peds.meta b/resources/[EGRP-Peds]/DarthVader/peds.meta new file mode 100644 index 000000000..59aca7614 --- /dev/null +++ b/resources/[EGRP-Peds]/DarthVader/peds.meta @@ -0,0 +1 @@ + DarthVader move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.ydd b/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.ydd new file mode 100644 index 000000000..bedeb3116 Binary files /dev/null and b/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.ydd differ diff --git a/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.yft b/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.ymt b/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.ymt differ diff --git a/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.ytd b/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.ytd new file mode 100644 index 000000000..50ba14ce6 --- /dev/null +++ b/resources/[EGRP-Peds]/DarthVader/stream/DarthVader.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca220a75d390d077e7d708bb57e7958d26c4ddab235383d83ffed6155b61e189 +size 1674973 diff --git a/resources/[EGRP-Peds]/Deadpool/__resource.lua b/resources/[EGRP-Peds]/Deadpool/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/Deadpool/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/Deadpool/peds.meta b/resources/[EGRP-Peds]/Deadpool/peds.meta new file mode 100644 index 000000000..5657bf4fd --- /dev/null +++ b/resources/[EGRP-Peds]/Deadpool/peds.meta @@ -0,0 +1 @@ + Deadpool move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.ydd b/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.ydd new file mode 100644 index 000000000..08f3040f9 Binary files /dev/null and b/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.ydd differ diff --git a/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.yft b/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.ymt b/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.ymt differ diff --git a/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.ytd b/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.ytd new file mode 100644 index 000000000..06b4f7e84 --- /dev/null +++ b/resources/[EGRP-Peds]/Deadpool/stream/Deadpool.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18c36d70825fd1722fee3b1acc1d50d3b080fb41a0f30b910a1ebacf39e0cf98 +size 2242831 diff --git a/resources/[EGRP-Peds]/FBI-csgo/__resource.lua b/resources/[EGRP-Peds]/FBI-csgo/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/FBI-csgo/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/FBI-csgo/peds.meta b/resources/[EGRP-Peds]/FBI-csgo/peds.meta new file mode 100644 index 000000000..e1a93efd8 --- /dev/null +++ b/resources/[EGRP-Peds]/FBI-csgo/peds.meta @@ -0,0 +1 @@ + csgo move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL csgo2 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL csgo3 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL csgo4 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.ydd b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.ydd new file mode 100644 index 000000000..52c0d50e8 Binary files /dev/null and b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.ydd differ diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.yft b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.ymt b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.ymt differ diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.ytd b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.ytd new file mode 100644 index 000000000..b8194888b --- /dev/null +++ b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f0df22e02c7a3a120dc95b65fb74ebffb04974a04a0f9bcd8109e38d476f810 +size 2473821 diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.ydd b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.ydd new file mode 100644 index 000000000..0e20d73d7 Binary files /dev/null and b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.ydd differ diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.yft b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.ymt b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.ymt differ diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.ytd b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.ytd new file mode 100644 index 000000000..7e3e16fa3 --- /dev/null +++ b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo2.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:745e1e40e4d8a3be2881dd85edde6d62f0bc0b0a2eb5771c667ecc2d47913cec +size 2407856 diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.ydd b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.ydd new file mode 100644 index 000000000..98da231cf Binary files /dev/null and b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.ydd differ diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.yft b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.ymt b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.ymt differ diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.ytd b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.ytd new file mode 100644 index 000000000..50127c2af --- /dev/null +++ b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo3.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a64bb2ea02fa9e0fb18101962c85d6a2b242b19c2124c2b36f568da37ec89d03 +size 2327285 diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.ydd b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.ydd new file mode 100644 index 000000000..8b2b25d66 Binary files /dev/null and b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.ydd differ diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.yft b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.ymt b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.ymt differ diff --git a/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.ytd b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.ytd new file mode 100644 index 000000000..872cbcfa7 --- /dev/null +++ b/resources/[EGRP-Peds]/FBI-csgo/stream/csgo4.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2585c921453ae902215ec13cc31b2fafe33dda81bd99344d00348b9fd4772662 +size 2499878 diff --git a/resources/[EGRP-Peds]/Hulk/__resource.lua b/resources/[EGRP-Peds]/Hulk/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/Hulk/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/Hulk/peds.meta b/resources/[EGRP-Peds]/Hulk/peds.meta new file mode 100644 index 000000000..2bcef41fd --- /dev/null +++ b/resources/[EGRP-Peds]/Hulk/peds.meta @@ -0,0 +1 @@ + HulkAvengers move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL HulkUltron move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.ydd b/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.ydd new file mode 100644 index 000000000..ea167d0ad Binary files /dev/null and b/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.ydd differ diff --git a/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.yft b/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.yft new file mode 100644 index 000000000..bea3b551d --- /dev/null +++ b/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d6beeb2060ae36797a4d1f5ee3f95d919a01d53a085312d437659c30c37dd45 +size 13297 diff --git a/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.ymt b/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.ymt differ diff --git a/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.ytd b/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.ytd new file mode 100644 index 000000000..0b1dd9ff9 --- /dev/null +++ b/resources/[EGRP-Peds]/Hulk/stream/HulkAvengers.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c58616666af7256c58cd2a35673ff1bceff7371890c8ee2aefb3ffc3618d4e5e +size 299937 diff --git a/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.ydd b/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.ydd new file mode 100644 index 000000000..1118be764 Binary files /dev/null and b/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.ydd differ diff --git a/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.yft b/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.yft new file mode 100644 index 000000000..bea3b551d --- /dev/null +++ b/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d6beeb2060ae36797a4d1f5ee3f95d919a01d53a085312d437659c30c37dd45 +size 13297 diff --git a/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.ymt b/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.ymt differ diff --git a/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.ytd b/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.ytd new file mode 100644 index 000000000..355544933 --- /dev/null +++ b/resources/[EGRP-Peds]/Hulk/stream/HulkUltron.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8af352af0ef9e7befe45b05099f460493279bf4822dc2b51dd4cb3d8fc9c475e +size 1478389 diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.ydd b/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.ydd new file mode 100644 index 000000000..4a98215ac Binary files /dev/null and b/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.ydd differ diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.yft b/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.yft new file mode 100644 index 000000000..012765d62 --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa26d899eeb0977e53df02e132433a6a8ee74fd03374bd00043570e8f8fe4843 +size 12692 diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.ymt b/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.ymt new file mode 100644 index 000000000..fe6a87d79 Binary files /dev/null and b/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.ymt differ diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.ytd b/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.ytd new file mode 100644 index 000000000..59935df05 --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/Stream/IronManEG.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78a9992f3618e0c43546194991621996b7732028fda290cba1c4d59904174bdf +size 6497414 diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.ydd b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.ydd new file mode 100644 index 000000000..81b7e7d2f Binary files /dev/null and b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.ydd differ diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.yft b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.ymt b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.ymt differ diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.ytd b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.ytd new file mode 100644 index 000000000..5f343bc38 --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK43.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6db0e527ab9291f42bbded2d404272bbdae0e8b433fdc73409cd5369d33c13b1 +size 1296777 diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.ydd b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.ydd new file mode 100644 index 000000000..4bf29863e Binary files /dev/null and b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.ydd differ diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.yft b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.yft new file mode 100644 index 000000000..012765d62 --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa26d899eeb0977e53df02e132433a6a8ee74fd03374bd00043570e8f8fe4843 +size 12692 diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.ymt b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.ymt new file mode 100644 index 000000000..fe6a87d79 Binary files /dev/null and b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.ymt differ diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.ytd b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.ytd new file mode 100644 index 000000000..f459cbc25 --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c88fc1770a80afaf07d562983879478814bcc484fe18cd07500f39e9990a5c28 +size 6062658 diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.ydd b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.ydd new file mode 100644 index 000000000..283e13a7e Binary files /dev/null and b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.ydd differ diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.yft b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.ymt b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.ymt differ diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.ytd b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.ytd new file mode 100644 index 000000000..28b364f11 --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/Stream/IronManMK85z.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dd2040caea3969dc94e6d4af86d2f1e7af260d189db1cb458f6f76079b879d2 +size 5471034 diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.ydd b/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.ydd new file mode 100644 index 000000000..50ced8ce5 Binary files /dev/null and b/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.ydd differ diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.yft b/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.yft new file mode 100644 index 000000000..012765d62 --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa26d899eeb0977e53df02e132433a6a8ee74fd03374bd00043570e8f8fe4843 +size 12692 diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.ymt b/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.ymt new file mode 100644 index 000000000..fe6a87d79 Binary files /dev/null and b/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.ymt differ diff --git a/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.ytd b/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.ytd new file mode 100644 index 000000000..6bf0d24e5 --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/Stream/IronManTeamSuit.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96d9de6862a5a1fe48ba9b9d41588856056f79e5014bb2628aaa03e9c8b249b1 +size 5027192 diff --git a/resources/[EGRP-Peds]/IronMan/__resource.lua b/resources/[EGRP-Peds]/IronMan/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/IronMan/peds.meta b/resources/[EGRP-Peds]/IronMan/peds.meta new file mode 100644 index 000000000..1e60d5c39 --- /dev/null +++ b/resources/[EGRP-Peds]/IronMan/peds.meta @@ -0,0 +1 @@ + IronManMK43 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL IronManMK85 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL IronManMK85z move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL IronManEG move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL IronManTeamSuit move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/JohnWick/__resource.lua b/resources/[EGRP-Peds]/JohnWick/__resource.lua new file mode 100644 index 000000000..3f986aa70 --- /dev/null +++ b/resources/[EGRP-Peds]/JohnWick/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { + 'peds.meta' +} + +data_file "PED_METADATA_FILE" "peds.meta" diff --git a/resources/[EGRP-Peds]/JohnWick/peds.meta b/resources/[EGRP-Peds]/JohnWick/peds.meta new file mode 100644 index 000000000..f39e34ebb --- /dev/null +++ b/resources/[EGRP-Peds]/JohnWick/peds.meta @@ -0,0 +1,43 @@ + + + + + JohnWick + move_m@generic + expr_set_ambient_male + CIVMALE + move_m@business@c + move_ped_strafing + move_ped_to_strafe + move_strafe_injured + dam_ko + dam_ad + ANIM_GROUP_GESTURE_M_GENERIC + facial_clipset_group_gen_male + ANIM_GROUP_VISEMES_M_LO + Male + Male_prone + NMBS_SLOW_GETUPS + ambientPed_upperWrinkles + DEFAULT + STANDARD_PED + STANDARD_PED + STANDARD_MALE + CIVMALE + STANDARD_PED + DEFAULT_PERCEPTION + BS_AI + WEAPON_UNARMED + SERVICEMALES + DEFAULT + VFXPEDINFO_HUMAN_GENERIC + FLEE + SAT_NONE + TB_WARM + SLOD_HUMAN + SCENARIO_POP_STREAMING_NORMAL + DSP_NORMAL + + + + \ No newline at end of file diff --git a/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.ydd b/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.ydd new file mode 100644 index 000000000..c7ee23f80 Binary files /dev/null and b/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.ydd differ diff --git a/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.yft b/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.yft new file mode 100644 index 000000000..28d828ec7 --- /dev/null +++ b/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:710e5f474f9e63b4f244e58c60e855c5198364b3388e7d21a5d78972d2a431e3 +size 12758 diff --git a/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.ymt b/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.ymt new file mode 100644 index 000000000..962df7855 Binary files /dev/null and b/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.ymt differ diff --git a/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.ytd b/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.ytd new file mode 100644 index 000000000..d6674612d --- /dev/null +++ b/resources/[EGRP-Peds]/JohnWick/stream/JohnWick.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c78f9faf246862865417f2b0a711a5113c8e78093b11fa0c81d30954f429c37e +size 13927158 diff --git a/resources/[EGRP-Peds]/Joker/__resource.lua b/resources/[EGRP-Peds]/Joker/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/Joker/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/Joker/peds.meta b/resources/[EGRP-Peds]/Joker/peds.meta new file mode 100644 index 000000000..348daa382 --- /dev/null +++ b/resources/[EGRP-Peds]/Joker/peds.meta @@ -0,0 +1 @@ + Joker move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL JokerSick move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/Joker/stream/Joker.ydd b/resources/[EGRP-Peds]/Joker/stream/Joker.ydd new file mode 100644 index 000000000..bcab3c323 Binary files /dev/null and b/resources/[EGRP-Peds]/Joker/stream/Joker.ydd differ diff --git a/resources/[EGRP-Peds]/Joker/stream/Joker.yft b/resources/[EGRP-Peds]/Joker/stream/Joker.yft new file mode 100644 index 000000000..012765d62 --- /dev/null +++ b/resources/[EGRP-Peds]/Joker/stream/Joker.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa26d899eeb0977e53df02e132433a6a8ee74fd03374bd00043570e8f8fe4843 +size 12692 diff --git a/resources/[EGRP-Peds]/Joker/stream/Joker.ymt b/resources/[EGRP-Peds]/Joker/stream/Joker.ymt new file mode 100644 index 000000000..fe6a87d79 Binary files /dev/null and b/resources/[EGRP-Peds]/Joker/stream/Joker.ymt differ diff --git a/resources/[EGRP-Peds]/Joker/stream/Joker.ytd b/resources/[EGRP-Peds]/Joker/stream/Joker.ytd new file mode 100644 index 000000000..c19c6dbc7 --- /dev/null +++ b/resources/[EGRP-Peds]/Joker/stream/Joker.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0be5a176f3cd43a49ee261c7dbbfabc6611090383318432a1a13d8420a9f828d +size 2125704 diff --git a/resources/[EGRP-Peds]/Joker/stream/JokerSick.ydd b/resources/[EGRP-Peds]/Joker/stream/JokerSick.ydd new file mode 100644 index 000000000..bcab3c323 Binary files /dev/null and b/resources/[EGRP-Peds]/Joker/stream/JokerSick.ydd differ diff --git a/resources/[EGRP-Peds]/Joker/stream/JokerSick.yft b/resources/[EGRP-Peds]/Joker/stream/JokerSick.yft new file mode 100644 index 000000000..012765d62 --- /dev/null +++ b/resources/[EGRP-Peds]/Joker/stream/JokerSick.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa26d899eeb0977e53df02e132433a6a8ee74fd03374bd00043570e8f8fe4843 +size 12692 diff --git a/resources/[EGRP-Peds]/Joker/stream/JokerSick.ymt b/resources/[EGRP-Peds]/Joker/stream/JokerSick.ymt new file mode 100644 index 000000000..fe6a87d79 Binary files /dev/null and b/resources/[EGRP-Peds]/Joker/stream/JokerSick.ymt differ diff --git a/resources/[EGRP-Peds]/Joker/stream/JokerSick.ytd b/resources/[EGRP-Peds]/Joker/stream/JokerSick.ytd new file mode 100644 index 000000000..80a3f2a40 --- /dev/null +++ b/resources/[EGRP-Peds]/Joker/stream/JokerSick.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfbb3f66400c64290148ba0ad68ef11252061566d4c46ca51edd9b640448b70c +size 2140378 diff --git a/resources/[EGRP-Peds]/KyloRen/__resource.lua b/resources/[EGRP-Peds]/KyloRen/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/KyloRen/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/KyloRen/peds.meta b/resources/[EGRP-Peds]/KyloRen/peds.meta new file mode 100644 index 000000000..8f257e457 --- /dev/null +++ b/resources/[EGRP-Peds]/KyloRen/peds.meta @@ -0,0 +1 @@ + KyloRen move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.ydd b/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.ydd new file mode 100644 index 000000000..09dfad244 Binary files /dev/null and b/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.ydd differ diff --git a/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.yft b/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.ymt b/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.ymt differ diff --git a/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.ytd b/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.ytd new file mode 100644 index 000000000..8dc3e638c --- /dev/null +++ b/resources/[EGRP-Peds]/KyloRen/stream/KyloRen.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50739b79ef28aa309bf7504da3ece3c8c7db13b2bf7262204d40ad6f7db01079 +size 2252054 diff --git a/resources/[EGRP-Peds]/LsfdBattalion/__resource.lua b/resources/[EGRP-Peds]/LsfdBattalion/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/LsfdBattalion/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/LsfdBattalion/peds.meta b/resources/[EGRP-Peds]/LsfdBattalion/peds.meta new file mode 100644 index 000000000..c259481fd --- /dev/null +++ b/resources/[EGRP-Peds]/LsfdBattalion/peds.meta @@ -0,0 +1 @@ + s_m_m_fireman_02 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.ydd b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.ydd new file mode 100644 index 000000000..ed79e1cb0 Binary files /dev/null and b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.ydd differ diff --git a/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.yft b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.yft new file mode 100644 index 000000000..b89fbdf89 --- /dev/null +++ b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d80d24ed1dc9cea4d0f1d8c09722dd1f7360ce08d9d45eff057d699584d3196 +size 12811 diff --git a/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.ymt b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.ymt new file mode 100644 index 000000000..90f14538c Binary files /dev/null and b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.ymt differ diff --git a/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.ytd b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.ytd new file mode 100644 index 000000000..795e64845 --- /dev/null +++ b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11a12febfb658b0968d24011f87b779090180bcdf7272a5ccbbd75ed1017a63e +size 2983940 diff --git a/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02_p.ydd b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02_p.ydd new file mode 100644 index 000000000..d706d35a9 Binary files /dev/null and b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02_p.ydd differ diff --git a/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02_p.ytd b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02_p.ytd new file mode 100644 index 000000000..6d4e42f7c --- /dev/null +++ b/resources/[EGRP-Peds]/LsfdBattalion/stream/s_m_m_fireman_02_p.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9618203e201750a9548c8700989c6746985225c1dfb3572e7c5806477a10ddb +size 815074 diff --git a/resources/[EGRP-Peds]/LspdFemale/__resource.lua b/resources/[EGRP-Peds]/LspdFemale/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/LspdFemale/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/LspdFemale/peds.meta b/resources/[EGRP-Peds]/LspdFemale/peds.meta new file mode 100644 index 000000000..11e7d8ceb --- /dev/null +++ b/resources/[EGRP-Peds]/LspdFemale/peds.meta @@ -0,0 +1 @@ + s_f_y_cop_01 move_f@generic expr_set_ambient_female CIVFEMALE move_f@generic move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_F_GENERIC facial_clipset_group_gen_female ANIM_GROUP_VISEMES_F_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_FEMALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01.ydd b/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01.ydd new file mode 100644 index 000000000..5f0dfe43b Binary files /dev/null and b/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01.ydd differ diff --git a/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01.ymt b/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01.ymt new file mode 100644 index 000000000..1dd1aeced Binary files /dev/null and b/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01.ymt differ diff --git a/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01.ytd b/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01.ytd new file mode 100644 index 000000000..c5ac9f5cd --- /dev/null +++ b/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af8686329d83972ffd16b38fd0df6d78a7289d15ec09a9575fd0b4ae502c4bab +size 2933365 diff --git a/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01_p.ytd b/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01_p.ytd new file mode 100644 index 000000000..ffc2434fd --- /dev/null +++ b/resources/[EGRP-Peds]/LspdFemale/stream/s_f_y_cop_01_p.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:033b1bae0a4dd920c50ac425c424cc3b938346bbd169ac1d2fc6ef547d4b1713 +size 46040 diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.ydd b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.ydd new file mode 100644 index 000000000..fdb159a97 Binary files /dev/null and b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.ydd differ diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.yft b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.yft new file mode 100644 index 000000000..605d45402 --- /dev/null +++ b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9320168eb9ea5e47e23386fb42b9e474557848f311cc80ff738f4902ad7adb9d +size 21422 diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.ymt b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.ymt new file mode 100644 index 000000000..182a223ae Binary files /dev/null and b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.ymt differ diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.ytd b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.ytd new file mode 100644 index 000000000..ecda0e8b5 --- /dev/null +++ b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomata.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fcaa41005c13f5ebead7c3a3f569559cfd11dffda280c8bf3c3625c4cf3458e +size 4130963 diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.ydd b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.ydd new file mode 100644 index 000000000..27e891827 Binary files /dev/null and b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.ydd differ diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.yft b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.yft new file mode 100644 index 000000000..605d45402 --- /dev/null +++ b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9320168eb9ea5e47e23386fb42b9e474557848f311cc80ff738f4902ad7adb9d +size 21422 diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.ymt b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.ymt new file mode 100644 index 000000000..182a223ae Binary files /dev/null and b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.ymt differ diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.ytd b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.ytd new file mode 100644 index 000000000..517ecef23 --- /dev/null +++ b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataAS.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b259dce60a13a760f058e885617d30b852b2a7b364ed7282114c70852a87d13 +size 4406301 diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.ydd b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.ydd new file mode 100644 index 000000000..f2b96d84a Binary files /dev/null and b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.ydd differ diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.yft b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.yft new file mode 100644 index 000000000..605d45402 --- /dev/null +++ b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9320168eb9ea5e47e23386fb42b9e474557848f311cc80ff738f4902ad7adb9d +size 21422 diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.ymt b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.ymt new file mode 100644 index 000000000..182a223ae Binary files /dev/null and b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.ymt differ diff --git a/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.ytd b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.ytd new file mode 100644 index 000000000..4d10b220a --- /dev/null +++ b/resources/[EGRP-Peds]/NierAutomata/Stream/NierAutomataBS.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee84c4a64495affb87238c58dc59a8e5c7fc79bffc5590363e60209ce2aee581 +size 5437275 diff --git a/resources/[EGRP-Peds]/NierAutomata/__resource.lua b/resources/[EGRP-Peds]/NierAutomata/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/NierAutomata/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/NierAutomata/peds.meta b/resources/[EGRP-Peds]/NierAutomata/peds.meta new file mode 100644 index 000000000..c5107dc1c --- /dev/null +++ b/resources/[EGRP-Peds]/NierAutomata/peds.meta @@ -0,0 +1 @@ + NierAutomata move_f@generic expr_set_ambient_female CIVFEMALE move_f@generic move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_F_GENERIC facial_clipset_group_gen_female ANIM_GROUP_VISEMES_F_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_FEMALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL NierAutomataBS move_f@generic expr_set_ambient_female CIVFEMALE move_f@generic move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_F_GENERIC facial_clipset_group_gen_female ANIM_GROUP_VISEMES_F_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_FEMALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL NierAutomataAS move_f@generic expr_set_ambient_female CIVFEMALE move_f@generic move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_F_GENERIC facial_clipset_group_gen_female ANIM_GROUP_VISEMES_F_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_FEMALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/OptimusPrime/__resource.lua b/resources/[EGRP-Peds]/OptimusPrime/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/OptimusPrime/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/OptimusPrime/peds.meta b/resources/[EGRP-Peds]/OptimusPrime/peds.meta new file mode 100644 index 000000000..862f4e8ee --- /dev/null +++ b/resources/[EGRP-Peds]/OptimusPrime/peds.meta @@ -0,0 +1 @@ + OptimusPrime move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL OptimusPrimeMini move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.ydd b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.ydd new file mode 100644 index 000000000..0004db223 Binary files /dev/null and b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.ydd differ diff --git a/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.yft b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.yft new file mode 100644 index 000000000..2af62ac0e --- /dev/null +++ b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9dba597b32a4f0f83991a93f5341812060949b499537f91c8ba2d46f4f407d89 +size 13159 diff --git a/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.ymt b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.ymt new file mode 100644 index 000000000..9ced729e6 Binary files /dev/null and b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.ymt differ diff --git a/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.ytd b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.ytd new file mode 100644 index 000000000..035ae7c6d --- /dev/null +++ b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrime.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:456098ddff8ae046366d85a18580071d04d57f76ff752767965798b7fe0ca04a +size 4739748 diff --git a/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.ydd b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.ydd new file mode 100644 index 000000000..fb9295414 Binary files /dev/null and b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.ydd differ diff --git a/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.yft b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.yft new file mode 100644 index 000000000..068cb20c6 --- /dev/null +++ b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:850d13c1e7be5c0d7c8f6a6dc3bf32b202ad602963603099bfe962833875ed15 +size 13792 diff --git a/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.ymt b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.ymt new file mode 100644 index 000000000..d16e393cd Binary files /dev/null and b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.ymt differ diff --git a/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.ytd b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.ytd new file mode 100644 index 000000000..035ae7c6d --- /dev/null +++ b/resources/[EGRP-Peds]/OptimusPrime/stream/OptimusPrimeMini.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:456098ddff8ae046366d85a18580071d04d57f76ff752767965798b7fe0ca04a +size 4739748 diff --git a/resources/[EGRP-Peds]/RareBane/__resource.lua b/resources/[EGRP-Peds]/RareBane/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/RareBane/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/RareBane/peds.meta b/resources/[EGRP-Peds]/RareBane/peds.meta new file mode 100644 index 000000000..7f314eaef --- /dev/null +++ b/resources/[EGRP-Peds]/RareBane/peds.meta @@ -0,0 +1 @@ + RareBane move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/RareBane/stream/RareBane.ydd b/resources/[EGRP-Peds]/RareBane/stream/RareBane.ydd new file mode 100644 index 000000000..e2696e7ab Binary files /dev/null and b/resources/[EGRP-Peds]/RareBane/stream/RareBane.ydd differ diff --git a/resources/[EGRP-Peds]/RareBane/stream/RareBane.yft b/resources/[EGRP-Peds]/RareBane/stream/RareBane.yft new file mode 100644 index 000000000..af1374159 --- /dev/null +++ b/resources/[EGRP-Peds]/RareBane/stream/RareBane.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7e536c434381dc60de38dc619dec3fb64bdfebd1b4a9a7745dc5e1fe3b95d36 +size 13468 diff --git a/resources/[EGRP-Peds]/RareBane/stream/RareBane.ymt b/resources/[EGRP-Peds]/RareBane/stream/RareBane.ymt new file mode 100644 index 000000000..d343ea1eb Binary files /dev/null and b/resources/[EGRP-Peds]/RareBane/stream/RareBane.ymt differ diff --git a/resources/[EGRP-Peds]/RareBane/stream/RareBane.ytd b/resources/[EGRP-Peds]/RareBane/stream/RareBane.ytd new file mode 100644 index 000000000..8a96954bc --- /dev/null +++ b/resources/[EGRP-Peds]/RareBane/stream/RareBane.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:568dd2b18414e4a04b8bc2e5aa29c0347fdb2764d5dee6352b24444f8f2e8c54 +size 8131608 diff --git a/resources/[EGRP-Peds]/RedAdmin/__resource.lua b/resources/[EGRP-Peds]/RedAdmin/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/RedAdmin/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/RedAdmin/peds.meta b/resources/[EGRP-Peds]/RedAdmin/peds.meta new file mode 100644 index 000000000..69c20a748 --- /dev/null +++ b/resources/[EGRP-Peds]/RedAdmin/peds.meta @@ -0,0 +1 @@ + s_m_m_chemsec_01 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.ydd b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.ydd new file mode 100644 index 000000000..2d6334630 Binary files /dev/null and b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.ydd differ diff --git a/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.yft b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.yft new file mode 100644 index 000000000..64de9669c --- /dev/null +++ b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73e1207419cdeae93ab0d4bed433d9549a5f1b40a093f541368bfa2be99762ca +size 12663 diff --git a/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.ymt b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.ymt new file mode 100644 index 000000000..354bcb884 Binary files /dev/null and b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.ymt differ diff --git a/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.ytd b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.ytd new file mode 100644 index 000000000..177b1ca05 --- /dev/null +++ b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6def4f9c2a827c3edde933132a520a929f9815e20f5033b4d96e27ee11f1396 +size 2440107 diff --git a/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01_p.ydd b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01_p.ydd new file mode 100644 index 000000000..c8d406d79 Binary files /dev/null and b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01_p.ydd differ diff --git a/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01_p.ytd b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01_p.ytd new file mode 100644 index 000000000..2102176b4 --- /dev/null +++ b/resources/[EGRP-Peds]/RedAdmin/stream/s_m_m_chemsec_01_p.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ee9107ced9e3ebe4c5ec999ca2a3daea13a063182bbeff446b797d897910f45 +size 108186 diff --git a/resources/[EGRP-Peds]/SSPolice/__resource.lua b/resources/[EGRP-Peds]/SSPolice/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/SSPolice/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/SSPolice/peds.meta b/resources/[EGRP-Peds]/SSPolice/peds.meta new file mode 100644 index 000000000..49f3f8bba --- /dev/null +++ b/resources/[EGRP-Peds]/SSPolice/peds.meta @@ -0,0 +1 @@ + s_m_y_blackops_02 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.ydd b/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.ydd new file mode 100644 index 000000000..727d5a93b Binary files /dev/null and b/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.ydd differ diff --git a/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.yft b/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.yft new file mode 100644 index 000000000..20a017ce3 --- /dev/null +++ b/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca9f77e0b335bc0b765ed4a5fe669c8266e5a5a2c48fdc65646bcad9734903ac +size 12785 diff --git a/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.ymt b/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.ymt new file mode 100644 index 000000000..c2a3bc30a Binary files /dev/null and b/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.ymt differ diff --git a/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.ytd b/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.ytd new file mode 100644 index 000000000..f9c41cdb9 --- /dev/null +++ b/resources/[EGRP-Peds]/SSPolice/stream/s_m_y_blackops_02.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09b4936a1530b56ebd3e7559d4d8693e9b4181ad950a3eb543a17c67c691fa88 +size 13009070 diff --git a/resources/[EGRP-Peds]/SpiderMan/__resource.lua b/resources/[EGRP-Peds]/SpiderMan/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/SpiderMan/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/SpiderMan/peds.meta b/resources/[EGRP-Peds]/SpiderMan/peds.meta new file mode 100644 index 000000000..de115e4a1 --- /dev/null +++ b/resources/[EGRP-Peds]/SpiderMan/peds.meta @@ -0,0 +1 @@ + SpiderMan move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.ydd b/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.ydd new file mode 100644 index 000000000..17feba7e7 Binary files /dev/null and b/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.ydd differ diff --git a/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.yft b/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.ymt b/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.ymt differ diff --git a/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.ytd b/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.ytd new file mode 100644 index 000000000..d585b2d2f --- /dev/null +++ b/resources/[EGRP-Peds]/SpiderMan/stream/SpiderMan.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a0793eb98568cfd560559d31e5f07d71e9f2268f11daa5e230768ba4e8c4f76 +size 864065 diff --git a/resources/[EGRP-Peds]/Superman/__resource.lua b/resources/[EGRP-Peds]/Superman/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/Superman/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/Superman/peds.meta b/resources/[EGRP-Peds]/Superman/peds.meta new file mode 100644 index 000000000..c860ae032 --- /dev/null +++ b/resources/[EGRP-Peds]/Superman/peds.meta @@ -0,0 +1 @@ + spn52 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/Superman/stream/spn52.ydd b/resources/[EGRP-Peds]/Superman/stream/spn52.ydd new file mode 100644 index 000000000..9e1c3c44d Binary files /dev/null and b/resources/[EGRP-Peds]/Superman/stream/spn52.ydd differ diff --git a/resources/[EGRP-Peds]/Superman/stream/spn52.yft b/resources/[EGRP-Peds]/Superman/stream/spn52.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/Superman/stream/spn52.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/Superman/stream/spn52.ymt b/resources/[EGRP-Peds]/Superman/stream/spn52.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/Superman/stream/spn52.ymt differ diff --git a/resources/[EGRP-Peds]/Superman/stream/spn52.ytd b/resources/[EGRP-Peds]/Superman/stream/spn52.ytd new file mode 100644 index 000000000..113418a75 --- /dev/null +++ b/resources/[EGRP-Peds]/Superman/stream/spn52.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bcf64d345e83094bb84fa4ff4e5040287084b5ec90a3cd3708526a3a7bf9a98 +size 2060426 diff --git a/resources/[EGRP-Peds]/ThanosIW/__resource.lua b/resources/[EGRP-Peds]/ThanosIW/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/ThanosIW/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/ThanosIW/peds.meta b/resources/[EGRP-Peds]/ThanosIW/peds.meta new file mode 100644 index 000000000..afd4de445 --- /dev/null +++ b/resources/[EGRP-Peds]/ThanosIW/peds.meta @@ -0,0 +1 @@ + ThanosIW move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.ydd b/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.ydd new file mode 100644 index 000000000..80554f027 Binary files /dev/null and b/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.ydd differ diff --git a/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.yft b/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.yft new file mode 100644 index 000000000..bea3b551d --- /dev/null +++ b/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d6beeb2060ae36797a4d1f5ee3f95d919a01d53a085312d437659c30c37dd45 +size 13297 diff --git a/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.ymt b/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.ymt differ diff --git a/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.ytd b/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.ytd new file mode 100644 index 000000000..2b2eba749 --- /dev/null +++ b/resources/[EGRP-Peds]/ThanosIW/stream/ThanosIW.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3832bcf35a414e0bc5aecb69f16032e6bba94a319f54e1a2e0e7d5e757865680 +size 3480030 diff --git a/resources/[EGRP-Peds]/ThanosIW/stream/suit_ThanosIW.ini b/resources/[EGRP-Peds]/ThanosIW/stream/suit_ThanosIW.ini new file mode 100644 index 000000000..a92289cfc --- /dev/null +++ b/resources/[EGRP-Peds]/ThanosIW/stream/suit_ThanosIW.ini @@ -0,0 +1,49 @@ +[general] +name=Thanos (IW big) +model=ThanosIW_big +hotkey=None +bDisableFirstPerson=False +bSetDefaultComponentVariation=0 +movement_clipset= +bHidePlayerChar=0 +aux=0.1 +bSetDefaultComponentVariationB=True +[parts_1] +model= +boneID=0 +pos_offset_x=0 +pos_offset_y=0 +pos_offset_z=0 +rot_offset_x=0 +rot_offset_y=0 +rot_offset_z=0 +bHideInFirstPerson=0 +name= +[compvar_1] +component= +variation=0 +textureIndex=0 +[thanosConfig] +maxHealth=10000 +healthRegenCoef=1 +damageCauseCoef=1 +AI_maxHealth=10000 +AI_healthRegenCoef=1 +AI_damageCauseCoef=1 +handoffset=0,26;0,15;0,05 +handOffsetCoef=0,85 +victim_handAttachOffset=0.147;-0.015;-0.194 +[stone_offsets] +stone_Mind=0,5977498;0,06775008;-0,002249546 +stone_Soul=0,6589994;-0,009000017;-0,1069997 +stone_Reality=0,7102495;0,0005000766;-0,04949963 +stone_Space=0,6760005;0,07225007;-0,08074955 +stone_Power=0,6449997;0,1575;-0,05699978 +stone_Time=0,4702497;0,2425;-0,1644997 +[stone_glowSizeCoef] +stone_Mind=1 +stone_Soul=1 +stone_Reality=1 +stone_Space=1 +stone_Power=1 +stone_Time=1 diff --git a/resources/[EGRP-Peds]/Thor/__resource.lua b/resources/[EGRP-Peds]/Thor/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/Thor/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/Thor/peds.meta b/resources/[EGRP-Peds]/Thor/peds.meta new file mode 100644 index 000000000..a9f5d38da --- /dev/null +++ b/resources/[EGRP-Peds]/Thor/peds.meta @@ -0,0 +1 @@ + ThorEG move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL ThorIW move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL ThorTeamSuit move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorEG.ydd b/resources/[EGRP-Peds]/Thor/stream/ThorEG.ydd new file mode 100644 index 000000000..861635aaa Binary files /dev/null and b/resources/[EGRP-Peds]/Thor/stream/ThorEG.ydd differ diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorEG.yft b/resources/[EGRP-Peds]/Thor/stream/ThorEG.yft new file mode 100644 index 000000000..012765d62 --- /dev/null +++ b/resources/[EGRP-Peds]/Thor/stream/ThorEG.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa26d899eeb0977e53df02e132433a6a8ee74fd03374bd00043570e8f8fe4843 +size 12692 diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorEG.yld b/resources/[EGRP-Peds]/Thor/stream/ThorEG.yld new file mode 100644 index 000000000..7676de8ad Binary files /dev/null and b/resources/[EGRP-Peds]/Thor/stream/ThorEG.yld differ diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorEG.ymt b/resources/[EGRP-Peds]/Thor/stream/ThorEG.ymt new file mode 100644 index 000000000..fe6a87d79 Binary files /dev/null and b/resources/[EGRP-Peds]/Thor/stream/ThorEG.ymt differ diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorEG.ytd b/resources/[EGRP-Peds]/Thor/stream/ThorEG.ytd new file mode 100644 index 000000000..9341316bb --- /dev/null +++ b/resources/[EGRP-Peds]/Thor/stream/ThorEG.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:469ad318bcee1ae9cf4e0c49f2b242d892ade9603801e3da8e33f8166ba1e5a1 +size 13128454 diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorIW.ydd b/resources/[EGRP-Peds]/Thor/stream/ThorIW.ydd new file mode 100644 index 000000000..613a69f2f Binary files /dev/null and b/resources/[EGRP-Peds]/Thor/stream/ThorIW.ydd differ diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorIW.yft b/resources/[EGRP-Peds]/Thor/stream/ThorIW.yft new file mode 100644 index 000000000..c7141da3e --- /dev/null +++ b/resources/[EGRP-Peds]/Thor/stream/ThorIW.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d41efd77ec376c992e01569a63417f7a3b3dc93346eaeadf56f830446882f88 +size 12731 diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorIW.ymt b/resources/[EGRP-Peds]/Thor/stream/ThorIW.ymt new file mode 100644 index 000000000..bb739cfe5 Binary files /dev/null and b/resources/[EGRP-Peds]/Thor/stream/ThorIW.ymt differ diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorIW.ytd b/resources/[EGRP-Peds]/Thor/stream/ThorIW.ytd new file mode 100644 index 000000000..57b7340ac --- /dev/null +++ b/resources/[EGRP-Peds]/Thor/stream/ThorIW.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ad5fdf5e05dee92d3cd2576174d5c31bd7e8dc5ba6612bdede822bb8cbe2259 +size 649118 diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.ydd b/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.ydd new file mode 100644 index 000000000..21a3522b8 Binary files /dev/null and b/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.ydd differ diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.yft b/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.yft new file mode 100644 index 000000000..012765d62 --- /dev/null +++ b/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa26d899eeb0977e53df02e132433a6a8ee74fd03374bd00043570e8f8fe4843 +size 12692 diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.ymt b/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.ymt new file mode 100644 index 000000000..fe6a87d79 Binary files /dev/null and b/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.ymt differ diff --git a/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.ytd b/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.ytd new file mode 100644 index 000000000..97d68f965 --- /dev/null +++ b/resources/[EGRP-Peds]/Thor/stream/ThorTeamSuit.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8826377c4ac5b6c5e53ecf7327d25a8f484a2aa79cbebd9b11ade6a68bd8077 +size 4274813 diff --git a/resources/[EGRP-Peds]/WonderWoman/__resource.lua b/resources/[EGRP-Peds]/WonderWoman/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/WonderWoman/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/WonderWoman/peds.meta b/resources/[EGRP-Peds]/WonderWoman/peds.meta new file mode 100644 index 000000000..9c593ffec --- /dev/null +++ b/resources/[EGRP-Peds]/WonderWoman/peds.meta @@ -0,0 +1 @@ + Wonder Woman Movie move_f@generic expr_set_ambient_female CIVFEMALE move_f@generic move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_F_GENERIC facial_clipset_group_gen_female ANIM_GROUP_VISEMES_F_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_FEMALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.ydd b/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.ydd new file mode 100644 index 000000000..1c6e089eb Binary files /dev/null and b/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.ydd differ diff --git a/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.yft b/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.yft new file mode 100644 index 000000000..987c5bbb7 --- /dev/null +++ b/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1d3a154df156dcdd38dbbff6af10f59f3bb1f50ab3f7d89cb86f38abd561c54 +size 13133 diff --git a/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.ymt b/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.ymt new file mode 100644 index 000000000..b6dbe17e6 Binary files /dev/null and b/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.ymt differ diff --git a/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.ytd b/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.ytd new file mode 100644 index 000000000..03a96e14a --- /dev/null +++ b/resources/[EGRP-Peds]/WonderWoman/stream/Wonder Woman Movie.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:438810d4554c654f0440052c54b66eb7a4dcd7b36050dfd3cd690ae0c3490bb0 +size 1316307 diff --git a/resources/[EGRP-Peds]/pd/__resource.lua b/resources/[EGRP-Peds]/pd/__resource.lua new file mode 100644 index 000000000..ae28e4545 --- /dev/null +++ b/resources/[EGRP-Peds]/pd/__resource.lua @@ -0,0 +1,7 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { +'peds.meta' +} + +data_file 'PED_METADATA_FILE' 'peds.meta' \ No newline at end of file diff --git a/resources/[EGRP-Peds]/pd/peds.meta b/resources/[EGRP-Peds]/pd/peds.meta new file mode 100644 index 000000000..24efa5a09 --- /dev/null +++ b/resources/[EGRP-Peds]/pd/peds.meta @@ -0,0 +1 @@ + s_m_y_cop_01 move_m@generic expr_set_ambient_male CIVMALE move_m@business@c move_ped_strafing move_ped_to_strafe move_strafe_injured dam_ko dam_ad ANIM_GROUP_GESTURE_M_GENERIC facial_clipset_group_gen_male ANIM_GROUP_VISEMES_M_LO Male Male_prone NMBS_SLOW_GETUPS ambientPed_upperWrinkles DEFAULT STANDARD_PED STANDARD_PED STANDARD_MALE CIVMALE STANDARD_PED DEFAULT_PERCEPTION BS_AI WEAPON_UNARMED SERVICEMALES DEFAULT VFXPEDINFO_HUMAN_GENERIC FLEE SAT_NONE TB_WARM SLOD_HUMAN SCENARIO_POP_STREAMING_NORMAL DSP_NORMAL diff --git a/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.ydd b/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.ydd new file mode 100644 index 000000000..0d2e8d879 Binary files /dev/null and b/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.ydd differ diff --git a/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.yft b/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.yft new file mode 100644 index 000000000..c638f79c2 --- /dev/null +++ b/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c36737237e40a7e5c06683ec4cdbf04788aab1ab8feeb6d02fb50070a5bc634 +size 12782 diff --git a/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.ymt b/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.ymt new file mode 100644 index 000000000..5900255b0 Binary files /dev/null and b/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.ymt differ diff --git a/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.ytd b/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.ytd new file mode 100644 index 000000000..62e4d7694 --- /dev/null +++ b/resources/[EGRP-Peds]/pd/stream/s_m_y_cop_01.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52436c3380ebfb60a0a0707cc378219d098cfb03f866a4959bcc8e6c339337e0 +size 7106061 diff --git a/resources/[EGRP-Weapons]/P90/fxmanifest.lua b/resources/[EGRP-Weapons]/P90/fxmanifest.lua new file mode 100644 index 000000000..e69de29bb diff --git a/resources/[EGRP-Weapons]/P90/stream/w_at_ar_supp_02.ydr b/resources/[EGRP-Weapons]/P90/stream/w_at_ar_supp_02.ydr new file mode 100644 index 000000000..90c59613d --- /dev/null +++ b/resources/[EGRP-Weapons]/P90/stream/w_at_ar_supp_02.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7236ef777caafc20c6a7f74173a5ab9d2bb27c1f11a04c2db0fd12790b48bb07 +size 45824 diff --git a/resources/[EGRP-Weapons]/P90/stream/w_at_ar_supp_02.ytd b/resources/[EGRP-Weapons]/P90/stream/w_at_ar_supp_02.ytd new file mode 100644 index 000000000..2ee30e97f --- /dev/null +++ b/resources/[EGRP-Weapons]/P90/stream/w_at_ar_supp_02.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c53e8627a02e0eaec8dc348954354d9df637049e4bcc0ac1acc40172044857f +size 1396458 diff --git a/resources/[EGRP-Weapons]/P90/stream/w_at_ar_supp_02_hi.ydr b/resources/[EGRP-Weapons]/P90/stream/w_at_ar_supp_02_hi.ydr new file mode 100644 index 000000000..90c59613d --- /dev/null +++ b/resources/[EGRP-Weapons]/P90/stream/w_at_ar_supp_02_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7236ef777caafc20c6a7f74173a5ab9d2bb27c1f11a04c2db0fd12790b48bb07 +size 45824 diff --git a/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg.ydr b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg.ydr new file mode 100644 index 000000000..db1164083 --- /dev/null +++ b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:897e15df0e6f15fe23467fea4eea0762f5deb61b3c1d1848edb9dfa7bd241fe1 +size 696500 diff --git a/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg.ytd b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg.ytd new file mode 100644 index 000000000..fd057e94d --- /dev/null +++ b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fbfffecfe91072588ab60ac1cd5e0ed9b6b123ed31e121fef877a76231a95e8 +size 1149159 diff --git a/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_hi.ydr b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_hi.ydr new file mode 100644 index 000000000..db1164083 --- /dev/null +++ b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:897e15df0e6f15fe23467fea4eea0762f5deb61b3c1d1848edb9dfa7bd241fe1 +size 696500 diff --git a/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_mag1.ydr b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_mag1.ydr new file mode 100644 index 000000000..6206b61af --- /dev/null +++ b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_mag1.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:000db84923a70862a1ccc9246dd6c5dd1ba0f83bed377df927ca85abad062e3f +size 157508 diff --git a/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_mag1.ytd b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_mag1.ytd new file mode 100644 index 000000000..1b52677e0 --- /dev/null +++ b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_mag1.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bce288f4de3812211ea982ed2f84ce96cceb3feb13e8e2efbfbfb8512c71f7d6 +size 357823 diff --git a/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_mag1_hi.ydr b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_mag1_hi.ydr new file mode 100644 index 000000000..6206b61af --- /dev/null +++ b/resources/[EGRP-Weapons]/P90/stream/w_sb_assaultsmg_mag1_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:000db84923a70862a1ccc9246dd6c5dd1ba0f83bed377df927ca85abad062e3f +size 157508 diff --git a/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle+hi.ytd b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle+hi.ytd new file mode 100644 index 000000000..bfc5c0f2d --- /dev/null +++ b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle+hi.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6044ae58eca2bbbe426ad7ba49524036ac3bb6e6fc388f35f68b1abe9b1bedf +size 1450647 diff --git a/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle.ydr b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle.ydr new file mode 100644 index 000000000..a94eaa31f --- /dev/null +++ b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e734d4a50f9b297598e7b553b5d6d8df76d63575517d2c2c354d9861f5ddddcc +size 91666 diff --git a/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle.ytd b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle.ytd new file mode 100644 index 000000000..bfc5c0f2d --- /dev/null +++ b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6044ae58eca2bbbe426ad7ba49524036ac3bb6e6fc388f35f68b1abe9b1bedf +size 1450647 diff --git a/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle_hi.ydr b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle_hi.ydr new file mode 100644 index 000000000..7d279d22f --- /dev/null +++ b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d1fe5b9e5fe12c43f3305574f7b61424261147340d2e9600558429dfe3495b7 +size 91671 diff --git a/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle_mag1.ydr b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle_mag1.ydr new file mode 100644 index 000000000..a7209f685 --- /dev/null +++ b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle_mag1.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d3208487a2afb6d11af079ab41f765805717eccf91a0bf58ed0c08b4820c308 +size 7224 diff --git a/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle_mag1.ytd b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle_mag1.ytd new file mode 100644 index 000000000..bfc5c0f2d --- /dev/null +++ b/resources/[EGRP-Weapons]/ak-47/Stream/w_ar_assaultrifle_mag1.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6044ae58eca2bbbe426ad7ba49524036ac3bb6e6fc388f35f68b1abe9b1bedf +size 1450647 diff --git a/resources/[EGRP-Weapons]/ak-47/__resource.lua b/resources/[EGRP-Weapons]/ak-47/__resource.lua new file mode 100644 index 000000000..dde67706a --- /dev/null +++ b/resources/[EGRP-Weapons]/ak-47/__resource.lua @@ -0,0 +1,17 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { + 'contentunlocks.meta', + 'loadouts.meta', + 'weaponcomponents.meta', + 'weaponanimations.meta', + 'weaponarchetypes.meta', + 'weapons.meta' + } + + data_file 'WEAPONINFO_FILE' 'weapons.meta' + data_file 'WEAPON_METADATA_FILE' 'weaponarchetypes.meta' + data_file 'WEAPON_ANIMATIONS_FILE' 'weaponanimations.meta' + data_file 'CONTENT_UNLOCKING_META_FILE' 'contentunlocks.meta' + data_file 'LOADOUTS_FILE' 'loadouts.meta' + data_file 'WEAPON_COMPONENTS' 'weaponcomponents.meta' \ No newline at end of file diff --git a/resources/[EGRP-Weapons]/glock17/__resource.lua b/resources/[EGRP-Weapons]/glock17/__resource.lua new file mode 100644 index 000000000..e69de29bb diff --git a/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol.ydr b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol.ydr new file mode 100644 index 000000000..8eb4b991d --- /dev/null +++ b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:335421cddd643514675ad7eed1df7737e97c17cd0710bb5cdd989b803a3e57f2 +size 234669 diff --git a/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol.ytd b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol.ytd new file mode 100644 index 000000000..4e642cd42 --- /dev/null +++ b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5a6b16b2cb6ed527c8c09397c849768f89e0de987c808f4cfc3986322673a97 +size 903380 diff --git a/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_hi.ydr b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_hi.ydr new file mode 100644 index 000000000..001ef7320 --- /dev/null +++ b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6e0e1162a680c036b0f52a414010fca8e41f62b45ac7681167d158d581d728f +size 344743 diff --git a/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag1.ydr b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag1.ydr new file mode 100644 index 000000000..47922fa56 --- /dev/null +++ b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag1.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb3cccc5309b9a190696aa821cd1a4e7faf140c36cb975ce59edc295698aff31 +size 34863 diff --git a/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag1.ytd b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag1.ytd new file mode 100644 index 000000000..853c29a15 --- /dev/null +++ b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag1.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:975322e2df11b457689ab478a89b2d05e5f7429831cab0b424879f853ec0fd55 +size 230303 diff --git a/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag2.ydr b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag2.ydr new file mode 100644 index 000000000..edf07ec9b --- /dev/null +++ b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag2.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dca46d000d176746e60de821d76c6e66126d313637d6208f0ab7170d662602e +size 35819 diff --git a/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag2.ytd b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag2.ytd new file mode 100644 index 000000000..853c29a15 --- /dev/null +++ b/resources/[EGRP-Weapons]/glock17/stream/w_pi_combatpistol_mag2.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:975322e2df11b457689ab478a89b2d05e5f7429831cab0b424879f853ec0fd55 +size 230303 diff --git a/resources/[EGRP-Weapons]/m4a1/__resource.lua b/resources/[EGRP-Weapons]/m4a1/__resource.lua new file mode 100644 index 000000000..e69de29bb diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle.ydr b/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle.ydr new file mode 100644 index 000000000..dd257646b --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ab63303546a4260772101b5238958e3e975f0fe33efb0a8ae8247e9c8527498 +size 222045 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle.ytd b/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle.ytd new file mode 100644 index 000000000..862a38157 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:864024882b438d72840f3afd19e9692b401fa20e4d0a6c7402d1fdffe7958237 +size 3472327 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle_hi.ydr b/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle_hi.ydr new file mode 100644 index 000000000..6eb6f9598 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:603cb95796c554826e2ef4b197eff5cc435b3012573a8bd00bf35f2e34666428 +size 223265 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle_mag1.ydr b/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle_mag1.ydr new file mode 100644 index 000000000..049cf67a3 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle_mag1.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ced895c1eb8782d1c9215c98a32f202151a289cd3549c126915f77c7b277961d +size 9476 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle_mag1.ytd b/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle_mag1.ytd new file mode 100644 index 000000000..851129f22 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_ar_carbinerifle_mag1.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11f781246bbfa2408511b74f87f2da58e0c6a0f79145584fb6c5aa79c9630f34 +size 472158 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_afgrip.ydr b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_afgrip.ydr new file mode 100644 index 000000000..faea593de --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_afgrip.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e7ce84f8d2e40d9af9ad83599e6549cf5908f0ab4f5ef1f91224e0b6ecaa3df +size 157586 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_afgrip.ytd b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_afgrip.ytd new file mode 100644 index 000000000..98e24a8c5 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_afgrip.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b249cc6ab11d5b8a0ea75b220866b9f1fd2cb4943a814c4a76709af7b9dc01b1 +size 2815158 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_afgrip_hi.ydr b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_afgrip_hi.ydr new file mode 100644 index 000000000..e38975b14 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_afgrip_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44ac639ce3f0189fe0f234974d1a965d5a42b10000f3d17cba79a4771cad2d00 +size 155773 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_supp.ydr b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_supp.ydr new file mode 100644 index 000000000..a45a992b6 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_supp.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c98da6ddf47256826b4d2f0217aa050c6dfb070dcd57d3036e3efd8fd52277e +size 17219 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_supp.ytd b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_supp.ytd new file mode 100644 index 000000000..17a554d39 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_supp.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fc73a669c2b3f5f7c06598c63f69107c426a168620658d2fef261645ead81bb +size 440531 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_supp_hi.ydr b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_supp_hi.ydr new file mode 100644 index 000000000..a85fb2414 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_at_ar_supp_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:347f249a980f589e4ea05ab249aff10af133796c958ac841439dbfffa6d1c101 +size 14120 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_at_scope_medium.ydr b/resources/[EGRP-Weapons]/m4a1/stream/w_at_scope_medium.ydr new file mode 100644 index 000000000..982e60572 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_at_scope_medium.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18e6127e7f1949a08b5c1cf27319cdb546115006b86ee80d579a056b82755cd6 +size 233333 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_at_scope_medium.ytd b/resources/[EGRP-Weapons]/m4a1/stream/w_at_scope_medium.ytd new file mode 100644 index 000000000..87a7329e4 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_at_scope_medium.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9337427dd092717803a011fbc6b5f5cc54f10a52fd35feec423e3d386c6a42bc +size 843681 diff --git a/resources/[EGRP-Weapons]/m4a1/stream/w_at_scope_medium_hi.ydr b/resources/[EGRP-Weapons]/m4a1/stream/w_at_scope_medium_hi.ydr new file mode 100644 index 000000000..af989e834 --- /dev/null +++ b/resources/[EGRP-Weapons]/m4a1/stream/w_at_scope_medium_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86487f052a4b053e4d7c882e99d657798ec80d007bdea5ea267832c2e0debdf6 +size 230334 diff --git a/resources/[EGRP-Weapons]/mp5/__resource.lua b/resources/[EGRP-Weapons]/mp5/__resource.lua new file mode 100644 index 000000000..e69de29bb diff --git a/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg.ydr b/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg.ydr new file mode 100644 index 000000000..6b6bbbad0 --- /dev/null +++ b/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ed5508340d04ccc5919d11cf906783272c95ab9199d50ddcfdfddb5217350a1 +size 318400 diff --git a/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg.ytd b/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg.ytd new file mode 100644 index 000000000..99b5edfce --- /dev/null +++ b/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8141d2e064775d454a24291ca9d2b349c67e4dbeea9e9b2f39eb836aa17342da +size 5285887 diff --git a/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg_hi.ydr b/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg_hi.ydr new file mode 100644 index 000000000..aa038b7c5 --- /dev/null +++ b/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af7d0b197308d9b880a3440b058f6b645fb7ddbc5776ea860be34b8fb55f8645 +size 322541 diff --git a/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg_mag1.ydr b/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg_mag1.ydr new file mode 100644 index 000000000..e212a39fc --- /dev/null +++ b/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg_mag1.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28bba97725448180b11914bbd03557be242e5c6dcd65f5fc594e08d07e601a08 +size 28405 diff --git a/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg_mag1.ytd b/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg_mag1.ytd new file mode 100644 index 000000000..99b5edfce --- /dev/null +++ b/resources/[EGRP-Weapons]/mp5/stream/w_sb_smg_mag1.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8141d2e064775d454a24291ca9d2b349c67e4dbeea9e9b2f39eb836aa17342da +size 5285887 diff --git a/resources/[EGRP-Weapons]/remington870/__resource.lua b/resources/[EGRP-Weapons]/remington870/__resource.lua new file mode 100644 index 000000000..e69de29bb diff --git a/resources/[EGRP-Weapons]/remington870/stream/w_sg_pumpshotgun.ydr b/resources/[EGRP-Weapons]/remington870/stream/w_sg_pumpshotgun.ydr new file mode 100644 index 000000000..1d8c3962c --- /dev/null +++ b/resources/[EGRP-Weapons]/remington870/stream/w_sg_pumpshotgun.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:947c6bff83d00915a4c439b46b168debe034e635f9c900c44c457e0fc98aa5b6 +size 442425 diff --git a/resources/[EGRP-Weapons]/remington870/stream/w_sg_pumpshotgun.ytd b/resources/[EGRP-Weapons]/remington870/stream/w_sg_pumpshotgun.ytd new file mode 100644 index 000000000..25301e4bf --- /dev/null +++ b/resources/[EGRP-Weapons]/remington870/stream/w_sg_pumpshotgun.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c6b101e39136c316b5e053a1360565e67bed90df88b18325835b080d1785f23 +size 7759912 diff --git a/resources/[EGRP-Weapons]/remington870/stream/w_sg_pumpshotgun_hi.ydr b/resources/[EGRP-Weapons]/remington870/stream/w_sg_pumpshotgun_hi.ydr new file mode 100644 index 000000000..f52d43baa --- /dev/null +++ b/resources/[EGRP-Weapons]/remington870/stream/w_sg_pumpshotgun_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d1f1eac9109b856172221607f23297c4e9de3ac1701e14df986d1411c61f8b4 +size 448428 diff --git a/resources/[EGRP-Weapons]/scar/__resource.lua b/resources/[EGRP-Weapons]/scar/__resource.lua new file mode 100644 index 000000000..e69de29bb diff --git a/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine+hi.ytd b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine+hi.ytd new file mode 100644 index 000000000..4b4e02e74 --- /dev/null +++ b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine+hi.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:449109f555903b25dd03d8f2e54eef0672387fb63ccd6af903961223e6b76734 +size 7153246 diff --git a/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine.ydr b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine.ydr new file mode 100644 index 000000000..e75c31f51 --- /dev/null +++ b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf2a498b9acffb41f8f26f5951b8d4762b00a74b5de42e0264e0a6fb9a13d87c +size 276499 diff --git a/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine.ytd b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine.ytd new file mode 100644 index 000000000..50d54d07c --- /dev/null +++ b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca61d709212f1e9534cd1e9cf78c97b896290195103bda6d2dba1d3aea6e5f58 +size 1136139 diff --git a/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_hi.ydr b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_hi.ydr new file mode 100644 index 000000000..a7f9667c8 --- /dev/null +++ b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b23411beb109ff208736aad3a9eb7d8b5eebd46430268b29641e29ae474d606 +size 276498 diff --git a/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag1.ydr b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag1.ydr new file mode 100644 index 000000000..9342eec7d --- /dev/null +++ b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag1.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc7a5b16675e74eec1bcfeeab013e2707c112e7722eeb16417f89fb2badceb58 +size 20771 diff --git a/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag1.ytd b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag1.ytd new file mode 100644 index 000000000..f977c5e50 --- /dev/null +++ b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag1.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2832dad0b3d900db2f0cf1b74764a2e9aa170c3c624e6f4ae8d3c8889dfdaf0 +size 1134520 diff --git a/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag2.ydr b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag2.ydr new file mode 100644 index 000000000..dc005b8b8 --- /dev/null +++ b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag2.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d3e5034747599b54db1816bfd5112e4b881941e320c9b171b4ce0554f927408 +size 106874 diff --git a/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag2.ytd b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag2.ytd new file mode 100644 index 000000000..f7d783127 --- /dev/null +++ b/resources/[EGRP-Weapons]/scar/stream/w_ar_specialcarbine_mag2.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37e117fd5596fe4b212b3a2509d014db53d210e4a5465cdebb22fb6a675a5b2a +size 348625 diff --git a/resources/[EGRP-Weapons]/x26taser/__resource.lua b/resources/[EGRP-Weapons]/x26taser/__resource.lua new file mode 100644 index 000000000..e69de29bb diff --git a/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun+hi.ytd b/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun+hi.ytd new file mode 100644 index 000000000..5dacaec44 --- /dev/null +++ b/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun+hi.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4985405df0577e7481ceadf1f40c0a583fef472b29cb895808d7ed0bc899978f +size 1118071 diff --git a/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun.ydr b/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun.ydr new file mode 100644 index 000000000..7be490d3c --- /dev/null +++ b/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e322f23d9fab748b852409f61e8134a3542100f5bae40090d9e2b64a4b028718 +size 194988 diff --git a/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun.ytd b/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun.ytd new file mode 100644 index 000000000..99e040af8 --- /dev/null +++ b/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ef448bc03198bf787b469602f862847e256fc260f8f7db76b2024c10e7211d1 +size 377077 diff --git a/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun_hi.ydr b/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun_hi.ydr new file mode 100644 index 000000000..fc2b9d322 --- /dev/null +++ b/resources/[EGRP-Weapons]/x26taser/stream/w_pi_stungun_hi.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d4cb9c9428151db76036f774fe4432eaa657a4d4c68a40dbebcd5425b2cf9d9 +size 220408 diff --git a/resources/[gamemodes]/[maps]/fivem-map-hipster/fxmanifest.lua b/resources/[gamemodes]/[maps]/fivem-map-hipster/fxmanifest.lua new file mode 100644 index 000000000..a656eb52a --- /dev/null +++ b/resources/[gamemodes]/[maps]/fivem-map-hipster/fxmanifest.lua @@ -0,0 +1,6 @@ +resource_type 'map' { gameTypes = { ['basic-gamemode'] = true } } + +map 'map.lua' + +fx_version 'adamant' +game 'gta5' \ No newline at end of file diff --git a/resources/[gamemodes]/[maps]/fivem-map-hipster/map.lua b/resources/[gamemodes]/[maps]/fivem-map-hipster/map.lua new file mode 100644 index 000000000..4084dd15c --- /dev/null +++ b/resources/[gamemodes]/[maps]/fivem-map-hipster/map.lua @@ -0,0 +1,3 @@ +spawnpoint 'a_m_y_skater_01' { x = -875.29, y = -432.37, z = 38.5 } + +-- \ No newline at end of file diff --git a/resources/[gamemodes]/[maps]/fivem-map-skater/fxmanifest.lua b/resources/[gamemodes]/[maps]/fivem-map-skater/fxmanifest.lua new file mode 100644 index 000000000..a656eb52a --- /dev/null +++ b/resources/[gamemodes]/[maps]/fivem-map-skater/fxmanifest.lua @@ -0,0 +1,6 @@ +resource_type 'map' { gameTypes = { ['basic-gamemode'] = true } } + +map 'map.lua' + +fx_version 'adamant' +game 'gta5' \ No newline at end of file diff --git a/resources/[gamemodes]/[maps]/fivem-map-skater/map.lua b/resources/[gamemodes]/[maps]/fivem-map-skater/map.lua new file mode 100644 index 000000000..4084dd15c --- /dev/null +++ b/resources/[gamemodes]/[maps]/fivem-map-skater/map.lua @@ -0,0 +1,3 @@ +spawnpoint 'a_m_y_skater_01' { x = -875.29, y = -432.37, z = 38.5 } + +-- \ No newline at end of file diff --git a/resources/[gamemodes]/[maps]/redm-map-one/fxmanifest.lua b/resources/[gamemodes]/[maps]/redm-map-one/fxmanifest.lua new file mode 100644 index 000000000..0ec5657ef --- /dev/null +++ b/resources/[gamemodes]/[maps]/redm-map-one/fxmanifest.lua @@ -0,0 +1,8 @@ +resource_type 'map' { gameTypes = { ['basic-gamemode'] = true } } + +map 'map.lua' + +fx_version 'adamant' +game 'rdr3' + +rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.' \ No newline at end of file diff --git a/resources/[gamemodes]/[maps]/redm-map-one/map.lua b/resources/[gamemodes]/[maps]/redm-map-one/map.lua new file mode 100644 index 000000000..d010aed3f --- /dev/null +++ b/resources/[gamemodes]/[maps]/redm-map-one/map.lua @@ -0,0 +1,2 @@ +spawnpoint 'player_three' { x = -262.849, y = 793.404, z = 118.087 } +spawnpoint 'player_zero' { x = -262.849, y = 793.404, z = 118.087 } diff --git a/resources/[gamemodes]/basic-gamemode/basic_client.lua b/resources/[gamemodes]/basic-gamemode/basic_client.lua new file mode 100644 index 000000000..5631d485c --- /dev/null +++ b/resources/[gamemodes]/basic-gamemode/basic_client.lua @@ -0,0 +1,4 @@ +AddEventHandler('onClientMapStart', function() + exports.spawnmanager:setAutoSpawn(true) + exports.spawnmanager:forceRespawn() +end) diff --git a/resources/[gamemodes]/basic-gamemode/fxmanifest.lua b/resources/[gamemodes]/basic-gamemode/fxmanifest.lua new file mode 100644 index 000000000..c18c3b9aa --- /dev/null +++ b/resources/[gamemodes]/basic-gamemode/fxmanifest.lua @@ -0,0 +1,6 @@ +resource_type 'gametype' { name = 'Roleplay' } + +client_script 'basic_client.lua' + +game 'common' +fx_version 'adamant' \ No newline at end of file diff --git a/resources/[gameplay]/chat-theme-gtao/fxmanifest.lua b/resources/[gameplay]/chat-theme-gtao/fxmanifest.lua new file mode 100644 index 000000000..0b42a9741 --- /dev/null +++ b/resources/[gameplay]/chat-theme-gtao/fxmanifest.lua @@ -0,0 +1,13 @@ +file 'style.css' +file 'shadow.js' + +chat_theme 'gtao' { + styleSheet = 'style.css', + script = 'shadow.js', + msgTemplates = { + default = '{0}{1}' + } +} + +game 'common' +fx_version 'adamant' \ No newline at end of file diff --git a/resources/[gameplay]/chat-theme-gtao/shadow.js b/resources/[gameplay]/chat-theme-gtao/shadow.js new file mode 100644 index 000000000..55d31761c --- /dev/null +++ b/resources/[gameplay]/chat-theme-gtao/shadow.js @@ -0,0 +1,74 @@ +(function() { +var Filters = {} + +var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); +svg.setAttribute("style", "display:block;width:0px;height:0px"); +var defs = document.createElementNS("http://www.w3.org/2000/svg", "defs"); + +var blurFilter = document.createElementNS("http://www.w3.org/2000/svg", "filter"); +blurFilter.setAttribute("id", "svgBlurFilter"); +var feGaussianFilter = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur"); +feGaussianFilter.setAttribute("stdDeviation", "0 0"); +blurFilter.appendChild(feGaussianFilter); +defs.appendChild(blurFilter); +Filters._svgBlurFilter = feGaussianFilter; + +// Drop Shadow Filter +var dropShadowFilter = document.createElementNS("http://www.w3.org/2000/svg", "filter"); +dropShadowFilter.setAttribute("id", "svgDropShadowFilter"); +var feGaussianFilter = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur"); +feGaussianFilter.setAttribute("in", "SourceAlpha"); +feGaussianFilter.setAttribute("stdDeviation", "3"); +dropShadowFilter.appendChild(feGaussianFilter); +Filters._svgDropshadowFilterBlur = feGaussianFilter; + +var feOffset = document.createElementNS("http://www.w3.org/2000/svg", "feOffset"); +feOffset.setAttribute("dx", "0"); +feOffset.setAttribute("dy", "0"); +feOffset.setAttribute("result", "offsetblur"); +dropShadowFilter.appendChild(feOffset); +Filters._svgDropshadowFilterOffset = feOffset; + +var feFlood = document.createElementNS("http://www.w3.org/2000/svg", "feFlood"); +feFlood.setAttribute("flood-color", "rgba(0,0,0,1)"); +dropShadowFilter.appendChild(feFlood); +Filters._svgDropshadowFilterFlood = feFlood; + +var feComposite = document.createElementNS("http://www.w3.org/2000/svg", "feComposite"); +feComposite.setAttribute("in2", "offsetblur"); +feComposite.setAttribute("operator", "in"); +dropShadowFilter.appendChild(feComposite); +var feComposite = document.createElementNS("http://www.w3.org/2000/svg", "feComposite"); +feComposite.setAttribute("in2", "SourceAlpha"); +feComposite.setAttribute("operator", "out"); +feComposite.setAttribute("result", "outer"); +dropShadowFilter.appendChild(feComposite); + +var feMerge = document.createElementNS("http://www.w3.org/2000/svg", "feMerge"); +var feMergeNode = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode"); +feMerge.appendChild(feMergeNode); +var feMergeNode = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode"); +feMerge.appendChild(feMergeNode); +Filters._svgDropshadowMergeNode = feMergeNode; +dropShadowFilter.appendChild(feMerge); +defs.appendChild(dropShadowFilter); +svg.appendChild(defs); +document.documentElement.appendChild(svg); + +const blurScale = 1; +const scale = (document.body.clientWidth / 1280); + +Filters._svgDropshadowFilterBlur.setAttribute("stdDeviation", + 1 * blurScale + " " + + 1 * blurScale +); +Filters._svgDropshadowFilterOffset.setAttribute("dx", + String(Math.cos(45 * Math.PI / 180) * 1 * scale)); +Filters._svgDropshadowFilterOffset.setAttribute("dy", + String(Math.sin(45 * Math.PI / 180) * 1 * scale)); +Filters._svgDropshadowFilterFlood.setAttribute("flood-color", + 'rgba(0, 0, 0, 1)'); +Filters._svgDropshadowMergeNode.setAttribute("in", + "SourceGraphic"); + +})(); \ No newline at end of file diff --git a/resources/[gameplay]/chat-theme-gtao/style.css b/resources/[gameplay]/chat-theme-gtao/style.css new file mode 100644 index 000000000..c2c0fa33c --- /dev/null +++ b/resources/[gameplay]/chat-theme-gtao/style.css @@ -0,0 +1,128 @@ +* { + font-family: inherit; +} + +.chat-window { + --size: calc(((2.7vh * 1.2)) * 6); + + position: absolute; + right: calc(2.77vh); + top: calc(50% - (var(--size) / 2)); + height: var(--size) !important; + + background: inherit !important; + + text-align: right; + + left: auto; + + user-select: none; +} + +@font-face { + font-family: 'Font2'; + src: url(https://runtime.fivem.net/temp/ChaletLondonNineteenSixty.otf?a); +} + +@font-face { + font-family: 'Font2_cond'; + src: url(https://runtime.fivem.net/temp/chaletcomprime-colognesixty-webfont.ttf?a); +} + +.msg { + font-family: Font2, sans-serif; + color: #fff; + + font-size: calc(1.8vh); /* 13px in 720p, calc'd by width */ + filter: url(#svgDropShadowFilter); + + line-height: calc(2.7vh * 1.2); + + margin-bottom: 0; +} + +.chat-messages { + margin: 0; + height: 100%; +} + +.msg > span > span > b { + font-family: Font2_cond, sans-serif; + font-weight: normal; + + vertical-align: baseline; + padding-right: 11px; + + line-height: 1; + + font-size: calc(2.7vh); +} + +.msg > span > span > span { + vertical-align: baseline; +} + +.msg i:first-of-type { + font-style: normal; + color: #c0c0c0; +} + +.chat-input { + position: absolute; + right: calc(2.77vh); + bottom: calc(2.77vh); + + background: inherit !important; + + text-align: right; + + top: auto; + left: auto; + + height: auto; + + font-family: Font2, sans-serif; +} + +.chat-input > div { + background-color: rgba(0, 0, 0, .6); + padding: calc(0.28vh / 2); +} + +.chat-input .prefix { + margin: 0; + margin-left: 0.7%; + margin-top: -0.1%; +} + +.chat-input > div + div { + position: absolute; + bottom: calc(1.65vh + 0.28vh + 0.28vh + 0.28vh + (0.28vh / 2)); + width: 99.6%; + + text-align: left; +} + +.suggestions { + border: calc(0.28vh / 2) solid rgba(180, 180, 180, .6); + background: transparent; +} + +textarea { + background: transparent; + border: calc(0.28vh / 2) solid rgba(180, 180, 180, .6); + padding: calc(0.28vh / 2); + padding-left: calc(3.5% + (0.28vh / 2)); +} + +@media screen and (min-aspect-ratio: 21/9) { + .chat-window, .chat-input { + right: calc(12.8vw); + } +} + +@media screen and (min-aspect-ratio: 32/9) { + .chat-window, .chat-input { + right: calc(25vw); + } +} diff --git a/resources/[gameplay]/chat/README.md b/resources/[gameplay]/chat/README.md new file mode 100644 index 000000000..279df4ad7 --- /dev/null +++ b/resources/[gameplay]/chat/README.md @@ -0,0 +1 @@ +# Chat diff --git a/resources/[gameplay]/chat/cl_chat.lua b/resources/[gameplay]/chat/cl_chat.lua new file mode 100644 index 000000000..21d92da7c --- /dev/null +++ b/resources/[gameplay]/chat/cl_chat.lua @@ -0,0 +1,234 @@ +local isRDR = not TerraingridActivate and true or false + +local chatInputActive = false +local chatInputActivating = false +local chatHidden = true +local chatLoaded = false + +RegisterNetEvent('chatMessage') +RegisterNetEvent('chat:addTemplate') +RegisterNetEvent('chat:addMessage') +RegisterNetEvent('chat:addSuggestion') +RegisterNetEvent('chat:addSuggestions') +RegisterNetEvent('chat:removeSuggestion') +RegisterNetEvent('chat:clear') + +-- internal events +RegisterNetEvent('__cfx_internal:serverPrint') + +RegisterNetEvent('_chat:messageEntered') + +--deprecated, use chat:addMessage +AddEventHandler('chatMessage', function(author, color, text) + local args = { text } + if author ~= "" then + table.insert(args, 1, author) + end + SendNUIMessage({ + type = 'ON_MESSAGE', + message = { + color = color, + multiline = true, + args = args + } + }) +end) + +AddEventHandler('__cfx_internal:serverPrint', function(msg) + print(msg) + + SendNUIMessage({ + type = 'ON_MESSAGE', + message = { + templateId = 'print', + multiline = true, + args = { msg } + } + }) +end) + +AddEventHandler('chat:addMessage', function(message) + SendNUIMessage({ + type = 'ON_MESSAGE', + message = message + }) +end) + +AddEventHandler('chat:addSuggestion', function(name, help, params) + SendNUIMessage({ + type = 'ON_SUGGESTION_ADD', + suggestion = { + name = name, + help = help, + params = params or nil + } + }) +end) + +AddEventHandler('chat:addSuggestions', function(suggestions) + for _, suggestion in ipairs(suggestions) do + SendNUIMessage({ + type = 'ON_SUGGESTION_ADD', + suggestion = suggestion + }) + end +end) + +AddEventHandler('chat:removeSuggestion', function(name) + SendNUIMessage({ + type = 'ON_SUGGESTION_REMOVE', + name = name + }) +end) + +AddEventHandler('chat:addTemplate', function(id, html) + SendNUIMessage({ + type = 'ON_TEMPLATE_ADD', + template = { + id = id, + html = html + } + }) +end) + +AddEventHandler('chat:clear', function(name) + SendNUIMessage({ + type = 'ON_CLEAR' + }) +end) + +RegisterNUICallback('chatResult', function(data, cb) + chatInputActive = false + SetNuiFocus(false) + + if not data.canceled then + local id = PlayerId() + + --deprecated + local r, g, b = 0, 0x99, 255 + + if data.message:sub(1, 1) == '/' then + ExecuteCommand(data.message:sub(2)) + else + TriggerServerEvent('_chat:messageEntered', GetPlayerName(id), { r, g, b }, data.message) + end + end + + cb('ok') +end) + +local function refreshCommands() + if GetRegisteredCommands then + local registeredCommands = GetRegisteredCommands() + + local suggestions = {} + + for _, command in ipairs(registeredCommands) do + if IsAceAllowed(('command.%s'):format(command.name)) then + table.insert(suggestions, { + name = '/' .. command.name, + help = '' + }) + end + end + + TriggerEvent('chat:addSuggestions', suggestions) + end +end + +local function refreshThemes() + local themes = {} + + for resIdx = 0, GetNumResources() - 1 do + local resource = GetResourceByFindIndex(resIdx) + + if GetResourceState(resource) == 'started' then + local numThemes = GetNumResourceMetadata(resource, 'chat_theme') + + if numThemes > 0 then + local themeName = GetResourceMetadata(resource, 'chat_theme') + local themeData = json.decode(GetResourceMetadata(resource, 'chat_theme_extra') or 'null') + + if themeName and themeData then + themeData.baseUrl = 'nui://' .. resource .. '/' + themes[themeName] = themeData + end + end + end + end + + SendNUIMessage({ + type = 'ON_UPDATE_THEMES', + themes = themes + }) +end + +AddEventHandler('onClientResourceStart', function(resName) + Wait(500) + + refreshCommands() + refreshThemes() +end) + +AddEventHandler('onClientResourceStop', function(resName) + Wait(500) + + refreshCommands() + refreshThemes() +end) + +RegisterNUICallback('loaded', function(data, cb) + TriggerServerEvent('chat:init'); + + refreshCommands() + refreshThemes() + + chatLoaded = true + + cb('ok') +end) + +Citizen.CreateThread(function() + SetTextChatEnabled(false) + SetNuiFocus(false) + + while true do + Wait(0) + + if not chatInputActive then + if IsControlPressed(0, isRDR and `INPUT_MP_TEXT_CHAT_ALL` or 245) --[[ INPUT_MP_TEXT_CHAT_ALL ]] then + chatInputActive = true + chatInputActivating = true + + SendNUIMessage({ + type = 'ON_OPEN' + }) + end + end + + if chatInputActivating then + if not IsControlPressed(0, isRDR and `INPUT_MP_TEXT_CHAT_ALL` or 245) then + SetNuiFocus(true) + + chatInputActivating = false + end + end + + if chatLoaded then + local shouldBeHidden = false + + if IsScreenFadedOut() or IsPauseMenuActive() then + shouldBeHidden = true + end + + if (shouldBeHidden and not chatHidden) or (not shouldBeHidden and chatHidden) then + chatHidden = shouldBeHidden + + SendNUIMessage({ + type = 'ON_SCREEN_STATE_CHANGE', + shouldHide = shouldBeHidden + }) + end + end + end +end) diff --git a/resources/[gameplay]/chat/fxmanifest.lua b/resources/[gameplay]/chat/fxmanifest.lua new file mode 100644 index 000000000..14c61bdff --- /dev/null +++ b/resources/[gameplay]/chat/fxmanifest.lua @@ -0,0 +1,30 @@ +description 'chat management stuff' + +ui_page 'html/index.html' + +client_script 'cl_chat.lua' +server_script 'sv_chat.lua' + +files { + 'html/index.html', + 'html/index.css', + 'html/config.default.js', + 'html/config.js', + 'html/App.js', + 'html/Message.js', + 'html/Suggestions.js', + 'html/vendor/vue.2.3.3.min.js', + 'html/vendor/flexboxgrid.6.3.1.min.css', + 'html/vendor/animate.3.5.2.min.css', + 'html/vendor/latofonts.css', + 'html/vendor/fonts/LatoRegular.woff2', + 'html/vendor/fonts/LatoRegular2.woff2', + 'html/vendor/fonts/LatoLight2.woff2', + 'html/vendor/fonts/LatoLight.woff2', + 'html/vendor/fonts/LatoBold.woff2', + 'html/vendor/fonts/LatoBold2.woff2', + } + +fx_version 'adamant' +games { 'rdr3', 'gta5' } +rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.' \ No newline at end of file diff --git a/resources/[gameplay]/chat/html/App.js b/resources/[gameplay]/chat/html/App.js new file mode 100644 index 000000000..6e54d2fa9 --- /dev/null +++ b/resources/[gameplay]/chat/html/App.js @@ -0,0 +1,255 @@ +window.APP = { + template: '#app_template', + name: 'app', + data() { + return { + style: CONFIG.style, + showInput: false, + showWindow: false, + shouldHide: true, + backingSuggestions: [], + removedSuggestions: [], + templates: CONFIG.templates, + message: '', + messages: [], + oldMessages: [], + oldMessagesIndex: -1, + tplBackups: [], + msgTplBackups: [] + }; + }, + destroyed() { + clearInterval(this.focusTimer); + window.removeEventListener('message', this.listener); + }, + mounted() { + post('http://chat/loaded', JSON.stringify({})); + this.listener = window.addEventListener('message', (event) => { + const item = event.data || event.detail; //'detail' is for debuging via browsers + if (this[item.type]) { + this[item.type](item); + } + }); + }, + watch: { + messages() { + if (this.showWindowTimer) { + clearTimeout(this.showWindowTimer); + } + this.showWindow = true; + this.resetShowWindowTimer(); + + const messagesObj = this.$refs.messages; + this.$nextTick(() => { + messagesObj.scrollTop = messagesObj.scrollHeight; + }); + }, + }, + computed: { + suggestions() { + return this.backingSuggestions.filter((el) => this.removedSuggestions.indexOf(el.name) <= -1); + }, + }, + methods: { + ON_SCREEN_STATE_CHANGE({ shouldHide }) { + this.shouldHide = shouldHide; + }, + ON_OPEN() { + this.showInput = true; + this.showWindow = true; + if (this.showWindowTimer) { + clearTimeout(this.showWindowTimer); + } + this.focusTimer = setInterval(() => { + if (this.$refs.input) { + this.$refs.input.focus(); + } else { + clearInterval(this.focusTimer); + } + }, 100); + }, + ON_MESSAGE({ message }) { + this.messages.push(message); + }, + ON_CLEAR() { + this.messages = []; + this.oldMessages = []; + this.oldMessagesIndex = -1; + }, + ON_SUGGESTION_ADD({ suggestion }) { + const duplicateSuggestion = this.backingSuggestions.find(a => a.name == suggestion.name); + if (duplicateSuggestion) { + if(suggestion.help || suggestion.params) { + duplicateSuggestion.help = suggestion.help || ""; + duplicateSuggestion.params = suggestion.params || []; + } + return; + } + if (!suggestion.params) { + suggestion.params = []; //TODO Move somewhere else + } + this.backingSuggestions.push(suggestion); + }, + ON_SUGGESTION_REMOVE({ name }) { + if(this.removedSuggestions.indexOf(name) <= -1) { + this.removedSuggestions.push(name); + } + }, + ON_TEMPLATE_ADD({ template }) { + if (this.templates[template.id]) { + this.warn(`Tried to add duplicate template '${template.id}'`) + } else { + this.templates[template.id] = template.html; + } + }, + ON_UPDATE_THEMES({ themes }) { + this.removeThemes(); + + this.setThemes(themes); + }, + removeThemes() { + for (let i = 0; i < document.styleSheets.length; i++) { + const styleSheet = document.styleSheets[i]; + const node = styleSheet.ownerNode; + + if (node.getAttribute('data-theme')) { + node.parentNode.removeChild(node); + } + } + + this.tplBackups.reverse(); + + for (const [ elem, oldData ] of this.tplBackups) { + elem.innerText = oldData; + } + + this.tplBackups = []; + + this.msgTplBackups.reverse(); + + for (const [ id, oldData ] of this.msgTplBackups) { + this.templates[id] = oldData; + } + + this.msgTplBackups = []; + }, + setThemes(themes) { + for (const [ id, data ] of Object.entries(themes)) { + if (data.style) { + const style = document.createElement('style'); + style.type = 'text/css'; + style.setAttribute('data-theme', id); + style.appendChild(document.createTextNode(data.style)); + + document.head.appendChild(style); + } + + if (data.styleSheet) { + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.type = 'text/css'; + link.href = data.baseUrl + data.styleSheet; + link.setAttribute('data-theme', id); + + document.head.appendChild(link); + } + + if (data.templates) { + for (const [ tplId, tpl ] of Object.entries(data.templates)) { + const elem = document.getElementById(tplId); + + if (elem) { + this.tplBackups.push([ elem, elem.innerText ]); + elem.innerText = tpl; + } + } + } + + if (data.script) { + const script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = data.baseUrl + data.script; + + document.head.appendChild(script); + } + + if (data.msgTemplates) { + for (const [ tplId, tpl ] of Object.entries(data.msgTemplates)) { + this.msgTplBackups.push([ tplId, this.templates[tplId] ]); + this.templates[tplId] = tpl; + } + } + } + }, + warn(msg) { + this.messages.push({ + args: [msg], + template: '^3CHAT-WARN: ^0{0}', + }); + }, + clearShowWindowTimer() { + clearTimeout(this.showWindowTimer); + }, + resetShowWindowTimer() { + this.clearShowWindowTimer(); + this.showWindowTimer = setTimeout(() => { + if (!this.showInput) { + this.showWindow = false; + } + }, CONFIG.fadeTimeout); + }, + keyUp() { + this.resize(); + }, + keyDown(e) { + if (e.which === 38 || e.which === 40) { + e.preventDefault(); + this.moveOldMessageIndex(e.which === 38); + } else if (e.which == 33) { + var buf = document.getElementsByClassName('chat-messages')[0]; + buf.scrollTop = buf.scrollTop - 100; + } else if (e.which == 34) { + var buf = document.getElementsByClassName('chat-messages')[0]; + buf.scrollTop = buf.scrollTop + 100; + } + }, + moveOldMessageIndex(up) { + if (up && this.oldMessages.length > this.oldMessagesIndex + 1) { + this.oldMessagesIndex += 1; + this.message = this.oldMessages[this.oldMessagesIndex]; + } else if (!up && this.oldMessagesIndex - 1 >= 0) { + this.oldMessagesIndex -= 1; + this.message = this.oldMessages[this.oldMessagesIndex]; + } else if (!up && this.oldMessagesIndex - 1 === -1) { + this.oldMessagesIndex = -1; + this.message = ''; + } + }, + resize() { + const input = this.$refs.input; + input.style.height = '5px'; + input.style.height = `${input.scrollHeight + 2}px`; + }, + send(e) { + if(this.message !== '') { + post('http://chat/chatResult', JSON.stringify({ + message: this.message, + })); + this.oldMessages.unshift(this.message); + this.oldMessagesIndex = -1; + this.hideInput(); + } else { + this.hideInput(true); + } + }, + hideInput(canceled = false) { + if (canceled) { + post('http://chat/chatResult', JSON.stringify({ canceled })); + } + this.message = ''; + this.showInput = false; + clearInterval(this.focusTimer); + this.resetShowWindowTimer(); + }, + }, +}; diff --git a/resources/[gameplay]/chat/html/Message.js b/resources/[gameplay]/chat/html/Message.js new file mode 100644 index 000000000..067d8428f --- /dev/null +++ b/resources/[gameplay]/chat/html/Message.js @@ -0,0 +1,86 @@ +Vue.component('message', { + template: '#message_template', + data() { + return {}; + }, + computed: { + textEscaped() { + let s = this.template ? this.template : this.templates[this.templateId]; + + if (this.template) { + //We disable templateId since we are using a direct raw template + this.templateId = -1; + } + + //This hack is required to preserve backwards compatability + if (this.templateId == CONFIG.defaultTemplateId + && this.args.length == 1) { + s = this.templates[CONFIG.defaultAltTemplateId] //Swap out default template :/ + } + + s = s.replace(/{(\d+)}/g, (match, number) => { + const argEscaped = this.args[number] != undefined ? this.escape(this.args[number]) : match + if (number == 0 && this.color) { + //color is deprecated, use templates or ^1 etc. + return this.colorizeOld(argEscaped); + } + return argEscaped; + }); + return this.colorize(s); + }, + }, + methods: { + colorizeOld(str) { + return `${str}` + }, + colorize(str) { + let s = "" + (str.replace(/\^([0-9])/g, (str, color) => ``)) + ""; + + const styleDict = { + '*': 'font-weight: bold;', + '_': 'text-decoration: underline;', + '~': 'text-decoration: line-through;', + '=': 'text-decoration: underline line-through;', + 'r': 'text-decoration: none;font-weight: normal;', + }; + + const styleRegex = /\^(\_|\*|\=|\~|\/|r)(.*?)(?=$|\^r|<\/em>)/; + while (s.match(styleRegex)) { //Any better solution would be appreciated :P + s = s.replace(styleRegex, (str, style, inner) => `${inner}`) + } + return s.replace(/]*><\/span[^>]*>/g, ''); + }, + escape(unsafe) { + return String(unsafe) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + }, + }, + props: { + templates: { + type: Object, + }, + args: { + type: Array, + }, + template: { + type: String, + default: null, + }, + templateId: { + type: String, + default: CONFIG.defaultTemplateId, + }, + multiline: { + type: Boolean, + default: false, + }, + color: { //deprecated + type: Array, + default: false, + }, + }, +}); diff --git a/resources/[gameplay]/chat/html/Suggestions.js b/resources/[gameplay]/chat/html/Suggestions.js new file mode 100644 index 000000000..07c4688ab --- /dev/null +++ b/resources/[gameplay]/chat/html/Suggestions.js @@ -0,0 +1,44 @@ +Vue.component('suggestions', { + template: '#suggestions_template', + props: ['message', 'suggestions'], + data() { + return {}; + }, + computed: { + currentSuggestions() { + if (this.message === '') { + return []; + } + const currentSuggestions = this.suggestions.filter((s) => { + if (!s.name.startsWith(this.message)) { + const suggestionSplitted = s.name.split(' '); + const messageSplitted = this.message.split(' '); + for (let i = 0; i < messageSplitted.length; i += 1) { + if (i >= suggestionSplitted.length) { + return i < suggestionSplitted.length + s.params.length; + } + if (suggestionSplitted[i] !== messageSplitted[i]) { + return false; + } + } + } + return true; + }).slice(0, CONFIG.suggestionLimit); + + currentSuggestions.forEach((s) => { + // eslint-disable-next-line no-param-reassign + s.disabled = !s.name.startsWith(this.message); + + s.params.forEach((p, index) => { + const wType = (index === s.params.length - 1) ? '.' : '\\S'; + const regex = new RegExp(`${s.name} (?:\\w+ ){${index}}(?:${wType}*)$`, 'g'); + + // eslint-disable-next-line no-param-reassign + p.disabled = this.message.match(regex) == null; + }); + }); + return currentSuggestions; + }, + }, + methods: {}, +}); diff --git a/resources/[gameplay]/chat/html/config.default.js b/resources/[gameplay]/chat/html/config.default.js new file mode 100644 index 000000000..d2600ebe7 --- /dev/null +++ b/resources/[gameplay]/chat/html/config.default.js @@ -0,0 +1,19 @@ +// DO NOT EDIT THIS FILE +// Copy it to `config.js` and edit it +window.CONFIG = { + defaultTemplateId: 'default', //This is the default template for 2 args1 + defaultAltTemplateId: 'defaultAlt', //This one for 1 arg + templates: { //You can add static templates here + 'default': '{0}: {1}', + 'defaultAlt': '{0}', + 'print': '
{0}
', + 'example:important': '

^2{0}

' + }, + fadeTimeout: 7000, + suggestionLimit: 5, + style: { + background: 'rgba(52, 73, 94, 0.0)', + width: '38%', + height: '22%', + } +}; diff --git a/resources/[gameplay]/chat/html/index.css b/resources/[gameplay]/chat/html/index.css new file mode 100644 index 000000000..c2bf15ec5 --- /dev/null +++ b/resources/[gameplay]/chat/html/index.css @@ -0,0 +1,127 @@ +.color-0{color: #ffffff;} +.color-1{color: #ff4444;} +.color-2{color: #99cc00;} +.color-3{color: #ffbb33;} +.color-4{color: #0099cc;} +.color-5{color: #33b5e5;} +.color-6{color: #aa66cc;} +.color-8{color: #cc0000;} +.color-9{color: #cc0068;} + +* { + font-family: 'Lato', sans-serif; + margin: 0; + padding: 0; +} + +.no-grow { + flex-grow: 0; +} + +em { + font-style: normal; +} + +#app { + font-family: 'Lato', Helvetica, Arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + color: white; +} + +.chat-window { + position: absolute; + top: 1.5%; + left: 0.8%; + width: 38%; + height: 22%; + max-width: 1000px; + background-color: rgba(52, 73, 94, 0.0); + -webkit-animation-duration: 2s; +} + + +.chat-messages { + position: relative; + height: 95%; + font-size: 1.8vh; + margin: 1%; + + overflow-x: hidden; + overflow-y: hidden; +} + + +.chat-input { + font-size: 1.65vh; + position: absolute; + + top: 23.8%; + left: 0.8%; + width: 38%; + max-width: 1000px; + box-sizing: border-box; +} + +.prefix { + font-size: 1.8vh; + position: absolute; + margin-top: 0.5%; + left: 0.208%; +} + +textarea { + font-size: 1.65vh; + display: block; + box-sizing: border-box; + padding: 1%; + padding-left: 3.5%; + color: white; + background-color: rgba(44, 62, 80, 0.0); + width: 100%; + border-width: 0; + height: 3.15%; + overflow: hidden; + text-overflow: ellipsis; +} + +textarea:focus, input:focus { + outline: none; +} + +.msg { + margin-bottom: 0.28%; +} + +.multiline { + margin-left: 4%; + text-indent: -1.2rem; + white-space: pre-line; +} + +.suggestions { + list-style-type: none; + padding: 0.5%; + padding-left: 1.4%; + font-size: 1.65vh; + box-sizing: border-box; + color: white; + background-color: rgba(44, 62, 80, 0.0); + width: 100%; +} + +.help { + color: #b0bbbd; +} + +.disabled { + color: #b0bbbd; +} + +.suggestion { + margin-bottom: 0.5%; +} + +.hidden { + display: none; +} \ No newline at end of file diff --git a/resources/[gameplay]/chat/html/index.html b/resources/[gameplay]/chat/html/index.html new file mode 100644 index 000000000..6ce65dd13 --- /dev/null +++ b/resources/[gameplay]/chat/html/index.html @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + diff --git a/resources/[gameplay]/chat/html/vendor/animate.3.5.2.min.css b/resources/[gameplay]/chat/html/vendor/animate.3.5.2.min.css new file mode 100644 index 000000000..b6f612953 --- /dev/null +++ b/resources/[gameplay]/chat/html/vendor/animate.3.5.2.min.css @@ -0,0 +1,11 @@ +@charset "UTF-8"; + +/*! + * animate.css -http://daneden.me/animate + * Version - 3.5.1 + * Licensed under the MIT license - http://opensource.org/licenses/MIT + * + * Copyright (c) 2016 Daniel Eden + */ + +.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.animated.bounceIn,.animated.bounceOut,.animated.flipOutX,.animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}40%,43%,70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}70%{-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);transform:translateZ(0)}40%,43%{-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}40%,43%,70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}70%{-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:none;transform:none}}@keyframes wobble{0%{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:none;transform:none}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) rotateY(-1turn);transform:perspective(400px) rotateY(-1turn)}0%,40%{-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-190deg);transform:perspective(400px) translateZ(150px) rotateY(-190deg)}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-170deg);transform:perspective(400px) translateZ(150px) rotateY(-170deg)}50%,80%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95)}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) rotateY(-1turn);transform:perspective(400px) rotateY(-1turn)}0%,40%{-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-190deg);transform:perspective(400px) translateZ(150px) rotateY(-190deg)}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(-170deg);transform:perspective(400px) translateZ(150px) rotateY(-170deg)}50%,80%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95)}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}0%,40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}0%,40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}0%,40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg)}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}0%,40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg)}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg)}60%,80%{opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg)}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg)}60%,80%{opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg)}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{transform-origin:center;-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}0%,to{-webkit-transform-origin:center}to{transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{0%{transform-origin:center;-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}0%,to{-webkit-transform-origin:center}to{transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{0%{transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{0%{transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{0%{transform-origin:right bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{0%{transform-origin:right bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{0%{transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{0%{transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{0%{transform-origin:right bottom;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{0%{transform-origin:right bottom;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{0%{transform-origin:center;opacity:1}0%,to{-webkit-transform-origin:center}to{transform-origin:center;-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}@keyframes rotateOut{0%{transform-origin:center;opacity:1}0%,to{-webkit-transform-origin:center}to{transform-origin:center;-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{0%{transform-origin:left bottom;opacity:1}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{transform-origin:left bottom;opacity:1}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:rotate(45deg);transform:rotate(45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{0%{transform-origin:right bottom;opacity:1}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{transform-origin:right bottom;opacity:1}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{0%{transform-origin:left bottom;opacity:1}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{transform-origin:left bottom;opacity:1}0%,to{-webkit-transform-origin:left bottom}to{transform-origin:left bottom;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{0%{transform-origin:right bottom;opacity:1}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}@keyframes rotateOutUpRight{0%{transform-origin:right bottom;opacity:1}0%,to{-webkit-transform-origin:right bottom}to{transform-origin:right bottom;-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{transform-origin:top left}0%,20%,60%{-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);transform-origin:top left}40%,80%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{transform-origin:top left}0%,20%,60%{-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);transform-origin:top left}40%,80%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate(120deg);transform:translate3d(100%,0,0) rotate(120deg)}}@keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate(120deg);transform:translate3d(100%,0,0) rotate(120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%,to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%,to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp} \ No newline at end of file diff --git a/resources/[gameplay]/chat/html/vendor/flexboxgrid.6.3.1.min.css b/resources/[gameplay]/chat/html/vendor/flexboxgrid.6.3.1.min.css new file mode 100644 index 000000000..2f502c950 --- /dev/null +++ b/resources/[gameplay]/chat/html/vendor/flexboxgrid.6.3.1.min.css @@ -0,0 +1 @@ +.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}} \ No newline at end of file diff --git a/resources/[gameplay]/chat/html/vendor/fonts/LatoBold.woff2 b/resources/[gameplay]/chat/html/vendor/fonts/LatoBold.woff2 new file mode 100644 index 000000000..8ba37ada4 Binary files /dev/null and b/resources/[gameplay]/chat/html/vendor/fonts/LatoBold.woff2 differ diff --git a/resources/[gameplay]/chat/html/vendor/fonts/LatoBold2.woff2 b/resources/[gameplay]/chat/html/vendor/fonts/LatoBold2.woff2 new file mode 100644 index 000000000..8dfc7fd63 Binary files /dev/null and b/resources/[gameplay]/chat/html/vendor/fonts/LatoBold2.woff2 differ diff --git a/resources/[gameplay]/chat/html/vendor/fonts/LatoLight.woff2 b/resources/[gameplay]/chat/html/vendor/fonts/LatoLight.woff2 new file mode 100644 index 000000000..2913c8cd8 Binary files /dev/null and b/resources/[gameplay]/chat/html/vendor/fonts/LatoLight.woff2 differ diff --git a/resources/[gameplay]/chat/html/vendor/fonts/LatoLight2.woff2 b/resources/[gameplay]/chat/html/vendor/fonts/LatoLight2.woff2 new file mode 100644 index 000000000..f0611d5c9 Binary files /dev/null and b/resources/[gameplay]/chat/html/vendor/fonts/LatoLight2.woff2 differ diff --git a/resources/[gameplay]/chat/html/vendor/fonts/LatoRegular.woff2 b/resources/[gameplay]/chat/html/vendor/fonts/LatoRegular.woff2 new file mode 100644 index 000000000..c87fc55c7 Binary files /dev/null and b/resources/[gameplay]/chat/html/vendor/fonts/LatoRegular.woff2 differ diff --git a/resources/[gameplay]/chat/html/vendor/fonts/LatoRegular2.woff2 b/resources/[gameplay]/chat/html/vendor/fonts/LatoRegular2.woff2 new file mode 100644 index 000000000..63ea29229 Binary files /dev/null and b/resources/[gameplay]/chat/html/vendor/fonts/LatoRegular2.woff2 differ diff --git a/resources/[gameplay]/chat/html/vendor/latofonts.css b/resources/[gameplay]/chat/html/vendor/latofonts.css new file mode 100644 index 000000000..a715fc4b3 --- /dev/null +++ b/resources/[gameplay]/chat/html/vendor/latofonts.css @@ -0,0 +1,48 @@ +/* latin-ext */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 300; + src: local('Lato Light'), local('Lato-Light'), url(fonts/LatoLight.woff2); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 300; + src: local('Lato Light'), local('Lato-Light'), url(fonts/LatoLight2.woff2); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* latin-ext */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 400; + src: local('Lato Regular'), local('Lato-Regular'), url(fonts/LatoRegular.woff2); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 400; + src: local('Lato Regular'), local('Lato-Regular'), url(fonts/LatoRegular2.woff2); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* latin-ext */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 700; + src: local('Lato Bold'), local('Lato-Bold'), url(fonts/LatoBold.woff2); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 700; + src: local('Lato Bold'), local('Lato-Bold'), url(fonts/LatoBold2.woff2); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} diff --git a/resources/[gameplay]/chat/html/vendor/vue.2.3.3.min.js b/resources/[gameplay]/chat/html/vendor/vue.2.3.3.min.js new file mode 100644 index 000000000..757d5aa96 --- /dev/null +++ b/resources/[gameplay]/chat/html/vendor/vue.2.3.3.min.js @@ -0,0 +1,8 @@ +/*! + * Vue.js v2.3.3 + * (c) 2014-2017 Evan You + * Released under the MIT License. + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";function e(e){return void 0===e||null===e}function t(e){return void 0!==e&&null!==e}function n(e){return!0===e}function r(e){return!1===e}function i(e){return"string"==typeof e||"number"==typeof e}function o(e){return null!==e&&"object"==typeof e}function a(e){return"[object Object]"===Ti.call(e)}function s(e){return"[object RegExp]"===Ti.call(e)}function c(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function u(e){var t=parseFloat(e);return isNaN(t)?e:t}function l(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}function p(e,t){return ji.call(e,t)}function d(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function v(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function h(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function m(e,t){for(var n in t)e[n]=t[n];return e}function g(e){for(var t={},n=0;nTo&&wo[n].id>e.id;)n--;wo.splice(n+1,0,e)}else wo.push(e);Oo||(Oo=!0,ao(xe))}}function Se(e){No.clear(),Te(e,No)}function Te(e,t){var n,r,i=Array.isArray(e);if((i||o(e))&&Object.isExtensible(e)){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(i)for(n=e.length;n--;)Te(e[n],t);else for(r=Object.keys(e),n=r.length;n--;)Te(e[r[n]],t)}}function Ee(e,t,n){Lo.get=function(){return this[t][n]},Lo.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Lo)}function je(e){e._watchers=[];var t=e.$options;t.props&&Ne(e,t.props),t.methods&&Re(e,t.methods),t.data?Le(e):j(e._data={},!0),t.computed&&De(e,t.computed),t.watch&&Fe(e,t.watch)}function Ne(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;vo.shouldConvert=o;for(var a in t)!function(o){i.push(o);var a=V(o,t,n,e);N(r,o,a),o in e||Ee(e,"_props",o)}(a);vo.shouldConvert=!0}function Le(e){var t=e.$options.data;t=e._data="function"==typeof t?Ie(t,e):t||{},a(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,i=n.length;i--;)r&&p(r,n[i])||C(n[i])||Ee(e,"_data",n[i]);j(t,!0)}function Ie(e,t){try{return e.call(t)}catch(e){return k(e,t,"data()"),{}}}function De(e,t){var n=e._computedWatchers=Object.create(null);for(var r in t){var i=t[r],o="function"==typeof i?i:i.get;n[r]=new jo(e,o,y,Io),r in e||Me(e,r,i)}}function Me(e,t,n){"function"==typeof n?(Lo.get=Pe(t),Lo.set=y):(Lo.get=n.get?!1!==n.cache?Pe(t):n.get:y,Lo.set=n.set?n.set:y),Object.defineProperty(e,t,Lo)}function Pe(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),co.target&&t.depend(),t.value}}function Re(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?y:v(t[n],e)}function Fe(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function vt(e){this._init(e)}function ht(e){e.use=function(e){if(e.installed)return this;var t=h(arguments,1);return t.unshift(this),"function"==typeof e.install?e.install.apply(e,t):"function"==typeof e&&e.apply(null,t),e.installed=!0,this}}function mt(e){e.mixin=function(e){return this.options=H(this.options,e),this}}function gt(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=H(n.options,e),a.super=n,a.options.props&&yt(a),a.options.computed&&_t(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Ri.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=m({},a.options),i[r]=a,a}}function yt(e){var t=e.options.props;for(var n in t)Ee(e.prototype,"_props",n)}function _t(e){var t=e.options.computed;for(var n in t)Me(e.prototype,n,t[n])}function bt(e){Ri.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&a(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function $t(e){return e&&(e.Ctor.options.name||e.tag)}function Ct(e,t){return"string"==typeof e?e.split(",").indexOf(t)>-1:!!s(e)&&e.test(t)}function xt(e,t,n){for(var r in e){var i=e[r];if(i){var o=$t(i.componentOptions);o&&!n(o)&&(i!==t&&wt(i),e[r]=null)}}}function wt(e){e&&e.componentInstance.$destroy()}function kt(e){for(var n=e.data,r=e,i=e;t(i.componentInstance);)i=i.componentInstance._vnode,i.data&&(n=At(i.data,n));for(;t(r=r.parent);)r.data&&(n=At(n,r.data));return Ot(n)}function At(e,n){return{staticClass:St(e.staticClass,n.staticClass),class:t(e.class)?[e.class,n.class]:n.class}}function Ot(e){var n=e.class,r=e.staticClass;return t(r)||t(n)?St(r,Tt(n)):""}function St(e,t){return e?t?e+" "+t:e:t||""}function Tt(n){if(e(n))return"";if("string"==typeof n)return n;var r="";if(Array.isArray(n)){for(var i,a=0,s=n.length;a-1?pa[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:pa[e]=/HTMLUnknownElement/.test(t.toString())}function Nt(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function Lt(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function It(e,t){return document.createElementNS(sa[e],t)}function Dt(e){return document.createTextNode(e)}function Mt(e){return document.createComment(e)}function Pt(e,t,n){e.insertBefore(t,n)}function Rt(e,t){e.removeChild(t)}function Ft(e,t){e.appendChild(t)}function Bt(e){return e.parentNode}function Ht(e){return e.nextSibling}function Ut(e){return e.tagName}function Vt(e,t){e.textContent=t}function zt(e,t,n){e.setAttribute(t,n)}function Jt(e,t){var n=e.data.ref;if(n){var r=e.context,i=e.componentInstance||e.elm,o=r.$refs;t?Array.isArray(o[n])?f(o[n],i):o[n]===i&&(o[n]=void 0):e.data.refInFor?Array.isArray(o[n])&&o[n].indexOf(i)<0?o[n].push(i):o[n]=[i]:o[n]=i}}function Kt(e,n){return e.key===n.key&&e.tag===n.tag&&e.isComment===n.isComment&&t(e.data)===t(n.data)&&qt(e,n)}function qt(e,n){if("input"!==e.tag)return!0;var r;return(t(r=e.data)&&t(r=r.attrs)&&r.type)===(t(r=n.data)&&t(r=r.attrs)&&r.type)}function Wt(e,n,r){var i,o,a={};for(i=n;i<=r;++i)o=e[i].key,t(o)&&(a[o]=i);return a}function Zt(e,t){(e.data.directives||t.data.directives)&&Gt(e,t)}function Gt(e,t){var n,r,i,o=e===ha,a=t===ha,s=Yt(e.data.directives,e.context),c=Yt(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,Xt(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(Xt(i,"bind",t,e),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n=0&&" "===(m=e.charAt(h));h--);m&&Ca.test(m)||(l=!0)}}else void 0===o?(v=i+1,o=e.slice(0,i).trim()):t();if(void 0===o?o=e.slice(0,i).trim():0!==v&&t(),a)for(i=0;i=Vo}function _n(e){return 34===e||39===e}function bn(e){var t=1;for(qo=Ko;!yn();)if(e=gn(),_n(e))$n(e);else if(91===e&&t++,93===e&&t--,0===t){Wo=Ko;break}}function $n(e){for(var t=e;!yn()&&(e=gn())!==t;);}function Cn(e,t,n){Zo=n;var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if("select"===o)kn(e,r,i);else if("input"===o&&"checkbox"===a)xn(e,r,i);else if("input"===o&&"radio"===a)wn(e,r,i);else if("input"===o||"textarea"===o)An(e,r,i);else if(!Bi.isReservedTag(o))return vn(e,r,i),!1;return!0}function xn(e,t,n){var r=n&&n.number,i=pn(e,"value")||"null",o=pn(e,"true-value")||"true",a=pn(e,"false-value")||"false";cn(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),fn(e,wa,"var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$c){$$i<0&&("+t+"=$$a.concat($$v))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+hn(t,"$$c")+"}",null,!0)}function wn(e,t,n){var r=n&&n.number,i=pn(e,"value")||"null";i=r?"_n("+i+")":i,cn(e,"checked","_q("+t+","+i+")"),fn(e,wa,hn(t,i),null,!0)}function kn(e,t,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+hn(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),fn(e,"change",o,null,!0)}function An(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?xa:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=hn(t,l);c&&(f="if($event.target.composing)return;"+f),cn(e,"value","("+t+")"),fn(e,u,f,null,!0),(s||a||"number"===r)&&fn(e,"blur","$forceUpdate()")}function On(e){var n;t(e[xa])&&(n=qi?"change":"input",e[n]=[].concat(e[xa],e[n]||[]),delete e[xa]),t(e[wa])&&(n=Qi?"click":"change",e[n]=[].concat(e[wa],e[n]||[]),delete e[wa])}function Sn(e,t,n,r,i){if(n){var o=t,a=Go;t=function(n){null!==(1===arguments.length?o(n):o.apply(null,arguments))&&Tn(e,t,r,a)}}Go.addEventListener(e,t,Xi?{capture:r,passive:i}:r)}function Tn(e,t,n,r){(r||Go).removeEventListener(e,t,n)}function En(t,n){if(!e(t.data.on)||!e(n.data.on)){var r=n.data.on||{},i=t.data.on||{};Go=n.elm,On(r),Y(r,i,Sn,Tn,n.context)}}function jn(n,r){if(!e(n.data.domProps)||!e(r.data.domProps)){var i,o,a=r.elm,s=n.data.domProps||{},c=r.data.domProps||{};t(c.__ob__)&&(c=r.data.domProps=m({},c));for(i in s)e(c[i])&&(a[i]="");for(i in c)if(o=c[i],"textContent"!==i&&"innerHTML"!==i||(r.children&&(r.children.length=0),o!==s[i]))if("value"===i){a._value=o;var u=e(o)?"":String(o);Nn(a,r,u)&&(a.value=u)}else a[i]=o}}function Nn(e,t,n){return!e.composing&&("option"===t.tag||Ln(e,n)||In(e,n))}function Ln(e,t){return document.activeElement!==e&&e.value!==t}function In(e,n){var r=e.value,i=e._vModifiers;return t(i)&&i.number||"number"===e.type?u(r)!==u(n):t(i)&&i.trim?r.trim()!==n.trim():r!==n}function Dn(e){var t=Mn(e.style);return e.staticStyle?m(e.staticStyle,t):t}function Mn(e){return Array.isArray(e)?g(e):"string"==typeof e?Oa(e):e}function Pn(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)i=i.componentInstance._vnode,i.data&&(n=Dn(i.data))&&m(r,n);(n=Dn(e.data))&&m(r,n);for(var o=e;o=o.parent;)o.data&&(n=Dn(o.data))&&m(r,n);return r}function Rn(n,r){var i=r.data,o=n.data;if(!(e(i.staticStyle)&&e(i.style)&&e(o.staticStyle)&&e(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,p=Mn(r.data.style)||{};r.data.normalizedStyle=t(p.__ob__)?m({},p):p;var d=Pn(r,!0);for(s in f)e(d[s])&&Ea(c,s,"");for(s in d)(a=d[s])!==f[s]&&Ea(c,s,null==a?"":a)}}function Fn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Bn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t);else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");e.setAttribute("class",n.trim())}}function Hn(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&m(t,Ia(e.name||"v")),m(t,e),t}return"string"==typeof e?Ia(e):void 0}}function Un(e){Ua(function(){Ua(e)})}function Vn(e,t){(e._transitionClasses||(e._transitionClasses=[])).push(t),Fn(e,t)}function zn(e,t){e._transitionClasses&&f(e._transitionClasses,t),Bn(e,t)}function Jn(e,t,n){var r=Kn(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ma?Fa:Ha,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c0&&(n=Ma,l=a,f=o.length):t===Pa?u>0&&(n=Pa,l=u,f=c.length):(l=Math.max(a,u),n=l>0?a>u?Ma:Pa:null,f=n?n===Ma?o.length:c.length:0),{type:n,timeout:l,propCount:f,hasTransform:n===Ma&&Va.test(r[Ra+"Property"])}}function qn(e,t){for(;e.length1}function Xn(e,t){!0!==t.data.show&&Zn(t)}function er(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s-1,a.selected!==o&&(a.selected=o);else if(_(nr(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function tr(e,t){for(var n=0,r=t.length;n=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=a.length-1;c>=i;c--)t.end&&t.end(a[c].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,r):"p"===s&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}for(var i,o,a=[],s=t.expectHTML,c=t.isUnaryTag||Di,u=t.canBeLeftOpenTag||Di,l=0;e;){if(i=e,o&&Ds(o)){var f=o.toLowerCase(),p=Ms[f]||(Ms[f]=new RegExp("([\\s\\S]*?)(]*>)","i")),d=0,v=e.replace(p,function(e,n,r){return d=r.length,Ds(f)||"noscript"===f||(n=n.replace(//g,"$1").replace(//g,"$1")),t.chars&&t.chars(n),""});l+=e.length-v.length,e=v,r(f,l-d,l)}else{var h=e.indexOf("<");if(0===h){if(vs.test(e)){var m=e.indexOf("--\x3e");if(m>=0){n(m+3);continue}}if(hs.test(e)){var g=e.indexOf("]>");if(g>=0){n(g+2);continue}}var y=e.match(ds);if(y){n(y[0].length);continue}var _=e.match(ps);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var $=function(){var t=e.match(ls);if(t){var r={tagName:t[1],attrs:[],start:l};n(t[0].length);for(var i,o;!(i=e.match(fs))&&(o=e.match(cs));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if($){!function(e){var n=e.tagName,i=e.unarySlash;s&&("p"===o&&as(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||"html"===n&&"head"===o||!!i,f=e.attrs.length,p=new Array(f),d=0;d=0){for(x=e.slice(h);!(ps.test(x)||ls.test(x)||vs.test(x)||hs.test(x)||(w=x.indexOf("<",1))<0);)h+=w,x=e.slice(h);C=e.substring(0,h),n(h)}h<0&&(C=e,e=""),t.chars&&C&&t.chars(C)}if(e===i){t.chars&&t.chars(e);break}}r()}function yr(e,t){var n=t?Hs(t):Bs;if(n.test(e)){for(var r,i,o=[],a=n.lastIndex=0;r=n.exec(e);){i=r.index,i>a&&o.push(JSON.stringify(e.slice(a,i)));var s=rn(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a0,Zi=Ki&&Ki.indexOf("edge/")>0,Gi=Ki&&Ki.indexOf("android")>0,Yi=Ki&&/iphone|ipad|ipod|ios/.test(Ki),Qi=Ki&&/chrome\/\d+/.test(Ki)&&!Zi,Xi=!1;if(Ji)try{var eo={};Object.defineProperty(eo,"passive",{get:function(){Xi=!0}}),window.addEventListener("test-passive",null,eo)}catch(e){}var to,no,ro=function(){return void 0===to&&(to=!Ji&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),to},io=Ji&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,oo="undefined"!=typeof Symbol&&A(Symbol)&&"undefined"!=typeof Reflect&&A(Reflect.ownKeys),ao=function(){function e(){r=!1;var e=n.slice(0);n.length=0;for(var t=0;t1?h(n):n;for(var r=h(arguments,1),i=0,o=n.length;i1&&(t[n[0].trim()]=n[1].trim())}}),t}),Sa=/^--/,Ta=/\s*!important$/,Ea=function(e,t,n){if(Sa.test(t))e.style.setProperty(t,n);else if(Ta.test(n))e.style.setProperty(t,n.replace(Ta,""),"important");else{var r=Na(t);if(Array.isArray(n))for(var i=0,o=n.length;iv?(f=e(i[g+1])?null:i[g+1].elm,y(n,f,i,d,g,o)):d>g&&b(n,r,p,v)}function x(r,i,o,a){if(r!==i){if(n(i.isStatic)&&n(r.isStatic)&&i.key===r.key&&(n(i.isCloned)||n(i.isOnce)))return i.elm=r.elm,void(i.componentInstance=r.componentInstance);var s,c=i.data;t(c)&&t(s=c.hook)&&t(s=s.prepatch)&&s(r,i);var u=i.elm=r.elm,l=r.children,f=i.children;if(t(c)&&h(i)){for(s=0;s',n.innerHTML.indexOf(t)>0}("\n"," "),is=l("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),os=l("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),as=l("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),ss=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],cs=new RegExp("^\\s*"+/([^\s"'<>\/=]+)/.source+"(?:\\s*("+/(?:=)/.source+")\\s*(?:"+ss.join("|")+"))?"),us="[a-zA-Z_][\\w\\-\\.]*",ls=new RegExp("^<((?:"+us+"\\:)?"+us+")"),fs=/^\s*(\/?)>/,ps=new RegExp("^<\\/((?:"+us+"\\:)?"+us+")[^>]*>"),ds=/^]+>/i,vs=/^ * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, loose); + }).join(' '); +} + +function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + + debug('tilde return', ret); + return ret; + }); +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, loose); + }).join(' '); +} + +function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } + + debug('caret return', ret); + return ret; + }); +} + +function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, loose); + }).join(' '); +} + +function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + + if (gtlt === '=' && anyX) + gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) + M = +M + 1; + else + m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + + return ret; + }); +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; + + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; + + return (from + ' ' + to).trim(); +} + + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) + return true; + } + return false; +}; + +function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) + continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false; + } + + return true; +} + +exports.satisfies = satisfies; +function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, loose) { + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, loose) + if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) + max = v; + maxSV = new SemVer(max, loose); + } + } + }) + return max; +} + +exports.minSatisfying = minSatisfying; +function minSatisfying(versions, range, loose) { + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, loose) + if (!min || minSV.compare(v) === 1) { // compare(min, v, true) + min = v; + minSV = new SemVer(min, loose); + } + } + }) + return min; +} + +exports.validRange = validRange; +function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, loose) { + return outside(version, range, '<', loose); +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, loose) { + return outside(version, range, '>', loose); +} + +exports.outside = outside; +function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, loose)) { + return false; + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + + var high = null; + var low = null; + + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; +} + +exports.prerelease = prerelease; +function prerelease(version, loose) { + var parsed = parse(version, loose); + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; +} + +exports.intersects = intersects; +function intersects(r1, r2, loose) { + r1 = new Range(r1, loose) + r2 = new Range(r2, loose) + return r1.intersects(r2) +} + +exports.coerce = coerce; +function coerce(version) { + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + var match = version.match(re[COERCE]); + + if (match == null) + return null; + + return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); +} + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +module.exports = require("stream"); + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +module.exports = require("url"); + +/***/ }), +/* 25 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(41); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__(444); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(56); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(48); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__(441); +/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */ + + + + + + +var Subscription = /*@__PURE__*/ (function () { + function Subscription(unsubscribe) { + this.closed = false; + this._parent = null; + this._parents = null; + this._subscriptions = null; + if (unsubscribe) { + this._unsubscribe = unsubscribe; + } + } + Subscription.prototype.unsubscribe = function () { + var hasErrors = false; + var errors; + if (this.closed) { + return; + } + var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions; + this.closed = true; + this._parent = null; + this._parents = null; + this._subscriptions = null; + var index = -1; + var len = _parents ? _parents.length : 0; + while (_parent) { + _parent.remove(this); + _parent = ++index < len && _parents[index] || null; + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isFunction__["a" /* isFunction */])(_unsubscribe)) { + var trial = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(_unsubscribe).call(this); + if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) { + hasErrors = true; + errors = errors || (__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */] ? + flattenUnsubscriptionErrors(__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e.errors) : [__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e]); + } + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_isArray__["a" /* isArray */])(_subscriptions)) { + index = -1; + len = _subscriptions.length; + while (++index < len) { + var sub = _subscriptions[index]; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isObject__["a" /* isObject */])(sub)) { + var trial = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(sub.unsubscribe).call(sub); + if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) { + hasErrors = true; + errors = errors || []; + var err = __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e; + if (err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) { + errors = errors.concat(flattenUnsubscriptionErrors(err.errors)); + } + else { + errors.push(err); + } + } + } + } + } + if (hasErrors) { + throw new __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */](errors); + } + }; + Subscription.prototype.add = function (teardown) { + if (!teardown || (teardown === Subscription.EMPTY)) { + return Subscription.EMPTY; + } + if (teardown === this) { + return this; + } + var subscription = teardown; + switch (typeof teardown) { + case 'function': + subscription = new Subscription(teardown); + case 'object': + if (subscription.closed || typeof subscription.unsubscribe !== 'function') { + return subscription; + } + else if (this.closed) { + subscription.unsubscribe(); + return subscription; + } + else if (typeof subscription._addParent !== 'function') { + var tmp = subscription; + subscription = new Subscription(); + subscription._subscriptions = [tmp]; + } + break; + default: + throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.'); + } + var subscriptions = this._subscriptions || (this._subscriptions = []); + subscriptions.push(subscription); + subscription._addParent(this); + return subscription; + }; + Subscription.prototype.remove = function (subscription) { + var subscriptions = this._subscriptions; + if (subscriptions) { + var subscriptionIndex = subscriptions.indexOf(subscription); + if (subscriptionIndex !== -1) { + subscriptions.splice(subscriptionIndex, 1); + } + } + }; + Subscription.prototype._addParent = function (parent) { + var _a = this, _parent = _a._parent, _parents = _a._parents; + if (!_parent || _parent === parent) { + this._parent = parent; + } + else if (!_parents) { + this._parents = [parent]; + } + else if (_parents.indexOf(parent) === -1) { + _parents.push(parent); + } + }; + Subscription.EMPTY = (function (empty) { + empty.closed = true; + return empty; + }(new Subscription())); + return Subscription; +}()); + +function flattenUnsubscriptionErrors(errors) { + return errors.reduce(function (errs, err) { return errs.concat((err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) ? err.errors : err); }, []); +} +//# sourceMappingURL=Subscription.js.map + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + bufferSplit: bufferSplit, + addRSAMissing: addRSAMissing, + calculateDSAPublic: calculateDSAPublic, + calculateED25519Public: calculateED25519Public, + calculateX25519Public: calculateX25519Public, + mpNormalize: mpNormalize, + mpDenormalize: mpDenormalize, + ecNormalize: ecNormalize, + countZeros: countZeros, + assertCompatible: assertCompatible, + isCompatible: isCompatible, + opensslKeyDeriv: opensslKeyDeriv, + opensshCipherInfo: opensshCipherInfo, + publicFromPrivateECDSA: publicFromPrivateECDSA, + zeroPadToLength: zeroPadToLength, + writeBitString: writeBitString, + readBitString: readBitString +}; + +var assert = __webpack_require__(16); +var Buffer = __webpack_require__(15).Buffer; +var PrivateKey = __webpack_require__(33); +var Key = __webpack_require__(27); +var crypto = __webpack_require__(11); +var algs = __webpack_require__(32); +var asn1 = __webpack_require__(66); + +var ec, jsbn; +var nacl; + +var MAX_CLASS_DEPTH = 3; + +function isCompatible(obj, klass, needVer) { + if (obj === null || typeof (obj) !== 'object') + return (false); + if (needVer === undefined) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && + klass.prototype._sshpkApiVersion[0] == needVer[0]) + return (true); + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + if (!proto || ++depth > MAX_CLASS_DEPTH) + return (false); + } + if (proto.constructor.name !== klass.name) + return (false); + var ver = proto._sshpkApiVersion; + if (ver === undefined) + ver = klass._oldVersionDetect(obj); + if (ver[0] != needVer[0] || ver[1] < needVer[1]) + return (false); + return (true); +} + +function assertCompatible(obj, klass, needVer, name) { + if (name === undefined) + name = 'object'; + assert.ok(obj, name + ' must not be null'); + assert.object(obj, name + ' must be an object'); + if (needVer === undefined) + needVer = klass.prototype._sshpkApiVersion; + if (obj instanceof klass && + klass.prototype._sshpkApiVersion[0] == needVer[0]) + return; + var proto = Object.getPrototypeOf(obj); + var depth = 0; + while (proto.constructor.name !== klass.name) { + proto = Object.getPrototypeOf(proto); + assert.ok(proto && ++depth <= MAX_CLASS_DEPTH, + name + ' must be a ' + klass.name + ' instance'); + } + assert.strictEqual(proto.constructor.name, klass.name, + name + ' must be a ' + klass.name + ' instance'); + var ver = proto._sshpkApiVersion; + if (ver === undefined) + ver = klass._oldVersionDetect(obj); + assert.ok(ver[0] == needVer[0] && ver[1] >= needVer[1], + name + ' must be compatible with ' + klass.name + ' klass ' + + 'version ' + needVer[0] + '.' + needVer[1]); +} + +var CIPHER_LEN = { + 'des-ede3-cbc': { key: 7, iv: 8 }, + 'aes-128-cbc': { key: 16, iv: 16 } +}; +var PKCS5_SALT_LEN = 8; + +function opensslKeyDeriv(cipher, salt, passphrase, count) { + assert.buffer(salt, 'salt'); + assert.buffer(passphrase, 'passphrase'); + assert.number(count, 'iteration count'); + + var clen = CIPHER_LEN[cipher]; + assert.object(clen, 'supported cipher'); + + salt = salt.slice(0, PKCS5_SALT_LEN); + + var D, D_prev, bufs; + var material = Buffer.alloc(0); + while (material.length < clen.key + clen.iv) { + bufs = []; + if (D_prev) + bufs.push(D_prev); + bufs.push(passphrase); + bufs.push(salt); + D = Buffer.concat(bufs); + for (var j = 0; j < count; ++j) + D = crypto.createHash('md5').update(D).digest(); + material = Buffer.concat([material, D]); + D_prev = D; + } + + return ({ + key: material.slice(0, clen.key), + iv: material.slice(clen.key, clen.key + clen.iv) + }); +} + +/* Count leading zero bits on a buffer */ +function countZeros(buf) { + var o = 0, obit = 8; + while (o < buf.length) { + var mask = (1 << obit); + if ((buf[o] & mask) === mask) + break; + obit--; + if (obit < 0) { + o++; + obit = 8; + } + } + return (o*8 + (8 - obit) - 1); +} + +function bufferSplit(buf, chr) { + assert.buffer(buf); + assert.string(chr); + + var parts = []; + var lastPart = 0; + var matches = 0; + for (var i = 0; i < buf.length; ++i) { + if (buf[i] === chr.charCodeAt(matches)) + ++matches; + else if (buf[i] === chr.charCodeAt(0)) + matches = 1; + else + matches = 0; + + if (matches >= chr.length) { + var newPart = i + 1; + parts.push(buf.slice(lastPart, newPart - matches)); + lastPart = newPart; + matches = 0; + } + } + if (lastPart <= buf.length) + parts.push(buf.slice(lastPart, buf.length)); + + return (parts); +} + +function ecNormalize(buf, addZero) { + assert.buffer(buf); + if (buf[0] === 0x00 && buf[1] === 0x04) { + if (addZero) + return (buf); + return (buf.slice(1)); + } else if (buf[0] === 0x04) { + if (!addZero) + return (buf); + } else { + while (buf[0] === 0x00) + buf = buf.slice(1); + if (buf[0] === 0x02 || buf[0] === 0x03) + throw (new Error('Compressed elliptic curve points ' + + 'are not supported')); + if (buf[0] !== 0x04) + throw (new Error('Not a valid elliptic curve point')); + if (!addZero) + return (buf); + } + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x0; + buf.copy(b, 1); + return (b); +} + +function readBitString(der, tag) { + if (tag === undefined) + tag = asn1.Ber.BitString; + var buf = der.readString(tag, true); + assert.strictEqual(buf[0], 0x00, 'bit strings with unused bits are ' + + 'not supported (0x' + buf[0].toString(16) + ')'); + return (buf.slice(1)); +} + +function writeBitString(der, buf, tag) { + if (tag === undefined) + tag = asn1.Ber.BitString; + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + der.writeBuffer(b, tag); +} + +function mpNormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00) + buf = buf.slice(1); + if ((buf[0] & 0x80) === 0x80) { + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + buf = b; + } + return (buf); +} + +function mpDenormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0x00) + buf = buf.slice(1); + return (buf); +} + +function zeroPadToLength(buf, len) { + assert.buffer(buf); + assert.number(len); + while (buf.length > len) { + assert.equal(buf[0], 0x00); + buf = buf.slice(1); + } + while (buf.length < len) { + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + buf = b; + } + return (buf); +} + +function bigintToMpBuf(bigint) { + var buf = Buffer.from(bigint.toByteArray()); + buf = mpNormalize(buf); + return (buf); +} + +function calculateDSAPublic(g, p, x) { + assert.buffer(g); + assert.buffer(p); + assert.buffer(x); + try { + var bigInt = __webpack_require__(81).BigInteger; + } catch (e) { + throw (new Error('To load a PKCS#8 format DSA private key, ' + + 'the node jsbn library is required.')); + } + g = new bigInt(g); + p = new bigInt(p); + x = new bigInt(x); + var y = g.modPow(x, p); + var ybuf = bigintToMpBuf(y); + return (ybuf); +} + +function calculateED25519Public(k) { + assert.buffer(k); + + if (nacl === undefined) + nacl = __webpack_require__(76); + + var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); + return (Buffer.from(kp.publicKey)); +} + +function calculateX25519Public(k) { + assert.buffer(k); + + if (nacl === undefined) + nacl = __webpack_require__(76); + + var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); + return (Buffer.from(kp.publicKey)); +} + +function addRSAMissing(key) { + assert.object(key); + assertCompatible(key, PrivateKey, [1, 1]); + try { + var bigInt = __webpack_require__(81).BigInteger; + } catch (e) { + throw (new Error('To write a PEM private key from ' + + 'this source, the node jsbn lib is required.')); + } + + var d = new bigInt(key.part.d.data); + var buf; + + if (!key.part.dmodp) { + var p = new bigInt(key.part.p.data); + var dmodp = d.mod(p.subtract(1)); + + buf = bigintToMpBuf(dmodp); + key.part.dmodp = {name: 'dmodp', data: buf}; + key.parts.push(key.part.dmodp); + } + if (!key.part.dmodq) { + var q = new bigInt(key.part.q.data); + var dmodq = d.mod(q.subtract(1)); + + buf = bigintToMpBuf(dmodq); + key.part.dmodq = {name: 'dmodq', data: buf}; + key.parts.push(key.part.dmodq); + } +} + +function publicFromPrivateECDSA(curveName, priv) { + assert.string(curveName, 'curveName'); + assert.buffer(priv); + if (ec === undefined) + ec = __webpack_require__(139); + if (jsbn === undefined) + jsbn = __webpack_require__(81).BigInteger; + var params = algs.curves[curveName]; + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString('hex')); + + var d = new jsbn(mpNormalize(priv)); + var pub = G.multiply(d); + pub = Buffer.from(curve.encodePointHex(pub), 'hex'); + + var parts = []; + parts.push({name: 'curve', data: Buffer.from(curveName)}); + parts.push({name: 'Q', data: pub}); + + var key = new Key({type: 'ecdsa', curve: curve, parts: parts}); + return (key); +} + +function opensshCipherInfo(cipher) { + var inf = {}; + switch (cipher) { + case '3des-cbc': + inf.keySize = 24; + inf.blockSize = 8; + inf.opensslName = 'des-ede3-cbc'; + break; + case 'blowfish-cbc': + inf.keySize = 16; + inf.blockSize = 8; + inf.opensslName = 'bf-cbc'; + break; + case 'aes128-cbc': + case 'aes128-ctr': + case 'aes128-gcm@openssh.com': + inf.keySize = 16; + inf.blockSize = 16; + inf.opensslName = 'aes-128-' + cipher.slice(7, 10); + break; + case 'aes192-cbc': + case 'aes192-ctr': + case 'aes192-gcm@openssh.com': + inf.keySize = 24; + inf.blockSize = 16; + inf.opensslName = 'aes-192-' + cipher.slice(7, 10); + break; + case 'aes256-cbc': + case 'aes256-ctr': + case 'aes256-gcm@openssh.com': + inf.keySize = 32; + inf.blockSize = 16; + inf.opensslName = 'aes-256-' + cipher.slice(7, 10); + break; + default: + throw (new Error( + 'Unsupported openssl cipher "' + cipher + '"')); + } + return (inf); +} + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2017 Joyent, Inc. + +module.exports = Key; + +var assert = __webpack_require__(16); +var algs = __webpack_require__(32); +var crypto = __webpack_require__(11); +var Fingerprint = __webpack_require__(156); +var Signature = __webpack_require__(75); +var DiffieHellman = __webpack_require__(325).DiffieHellman; +var errs = __webpack_require__(74); +var utils = __webpack_require__(26); +var PrivateKey = __webpack_require__(33); +var edCompat; + +try { + edCompat = __webpack_require__(454); +} catch (e) { + /* Just continue through, and bail out if we try to use it. */ +} + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var KeyParseError = errs.KeyParseError; + +var formats = {}; +formats['auto'] = __webpack_require__(455); +formats['pem'] = __webpack_require__(86); +formats['pkcs1'] = __webpack_require__(327); +formats['pkcs8'] = __webpack_require__(157); +formats['rfc4253'] = __webpack_require__(103); +formats['ssh'] = __webpack_require__(456); +formats['ssh-private'] = __webpack_require__(192); +formats['openssh'] = formats['ssh-private']; +formats['dnssec'] = __webpack_require__(326); + +function Key(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.parts, 'options.parts'); + assert.string(opts.type, 'options.type'); + assert.optionalString(opts.comment, 'options.comment'); + + var algInfo = algs.info[opts.type]; + if (typeof (algInfo) !== 'object') + throw (new InvalidAlgorithmError(opts.type)); + + var partLookup = {}; + for (var i = 0; i < opts.parts.length; ++i) { + var part = opts.parts[i]; + partLookup[part.name] = part; + } + + this.type = opts.type; + this.parts = opts.parts; + this.part = partLookup; + this.comment = undefined; + this.source = opts.source; + + /* for speeding up hashing/fingerprint operations */ + this._rfc4253Cache = opts._rfc4253Cache; + this._hashCache = {}; + + var sz; + this.curve = undefined; + if (this.type === 'ecdsa') { + var curve = this.part.curve.data.toString(); + this.curve = curve; + sz = algs.curves[curve].size; + } else if (this.type === 'ed25519' || this.type === 'curve25519') { + sz = 256; + this.curve = 'curve25519'; + } else { + var szPart = this.part[algInfo.sizePart]; + sz = szPart.data.length; + sz = sz * 8 - utils.countZeros(szPart.data); + } + this.size = sz; +} + +Key.formats = formats; + +Key.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'ssh'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + if (format === 'rfc4253') { + if (this._rfc4253Cache === undefined) + this._rfc4253Cache = formats['rfc4253'].write(this); + return (this._rfc4253Cache); + } + + return (formats[format].write(this, options)); +}; + +Key.prototype.toString = function (format, options) { + return (this.toBuffer(format, options).toString()); +}; + +Key.prototype.hash = function (algo) { + assert.string(algo, 'algorithm'); + algo = algo.toLowerCase(); + if (algs.hashAlgs[algo] === undefined) + throw (new InvalidAlgorithmError(algo)); + + if (this._hashCache[algo]) + return (this._hashCache[algo]); + var hash = crypto.createHash(algo). + update(this.toBuffer('rfc4253')).digest(); + this._hashCache[algo] = hash; + return (hash); +}; + +Key.prototype.fingerprint = function (algo) { + if (algo === undefined) + algo = 'sha256'; + assert.string(algo, 'algorithm'); + var opts = { + type: 'key', + hash: this.hash(algo), + algorithm: algo + }; + return (new Fingerprint(opts)); +}; + +Key.prototype.defaultHashAlgorithm = function () { + var hashAlgo = 'sha1'; + if (this.type === 'rsa') + hashAlgo = 'sha256'; + if (this.type === 'dsa' && this.size > 1024) + hashAlgo = 'sha256'; + if (this.type === 'ed25519') + hashAlgo = 'sha512'; + if (this.type === 'ecdsa') { + if (this.size <= 256) + hashAlgo = 'sha256'; + else if (this.size <= 384) + hashAlgo = 'sha384'; + else + hashAlgo = 'sha512'; + } + return (hashAlgo); +}; + +Key.prototype.createVerify = function (hashAlgo) { + if (hashAlgo === undefined) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, 'hash algorithm'); + + /* ED25519 is not supported by OpenSSL, use a javascript impl. */ + if (this.type === 'ed25519' && edCompat !== undefined) + return (new edCompat.Verifier(this, hashAlgo)); + if (this.type === 'curve25519') + throw (new Error('Curve25519 keys are not suitable for ' + + 'signing or verification')); + + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto.createVerify(nm); + } catch (e) { + err = e; + } + if (v === undefined || (err instanceof Error && + err.message.match(/Unknown message digest/))) { + nm = 'RSA-'; + nm += hashAlgo.toUpperCase(); + v = crypto.createVerify(nm); + } + assert.ok(v, 'failed to create verifier'); + var oldVerify = v.verify.bind(v); + var key = this.toBuffer('pkcs8'); + var curve = this.curve; + var self = this; + v.verify = function (signature, fmt) { + if (Signature.isSignature(signature, [2, 0])) { + if (signature.type !== self.type) + return (false); + if (signature.hashAlgorithm && + signature.hashAlgorithm !== hashAlgo) + return (false); + if (signature.curve && self.type === 'ecdsa' && + signature.curve !== curve) + return (false); + return (oldVerify(key, signature.toBuffer('asn1'))); + + } else if (typeof (signature) === 'string' || + Buffer.isBuffer(signature)) { + return (oldVerify(key, signature, fmt)); + + /* + * Avoid doing this on valid arguments, walking the prototype + * chain can be quite slow. + */ + } else if (Signature.isSignature(signature, [1, 0])) { + throw (new Error('signature was created by too old ' + + 'a version of sshpk and cannot be verified')); + + } else { + throw (new TypeError('signature must be a string, ' + + 'Buffer, or Signature object')); + } + }; + return (v); +}; + +Key.prototype.createDiffieHellman = function () { + if (this.type === 'rsa') + throw (new Error('RSA keys do not support Diffie-Hellman')); + + return (new DiffieHellman(this)); +}; +Key.prototype.createDH = Key.prototype.createDiffieHellman; + +Key.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + if (k instanceof PrivateKey) + k = k.toPublic(); + if (!k.comment) + k.comment = options.filename; + return (k); + } catch (e) { + if (e.name === 'KeyEncryptedError') + throw (e); + throw (new KeyParseError(options.filename, format, e)); + } +}; + +Key.isKey = function (obj, ver) { + return (utils.isCompatible(obj, Key, ver)); +}; + +/* + * API versions for Key: + * [1,0] -- initial ver, may take Signature for createVerify or may not + * [1,1] -- added pkcs1, pkcs8 formats + * [1,2] -- added auto, ssh-private, openssh formats + * [1,3] -- added defaultHashAlgorithm + * [1,4] -- added ed support, createDH + * [1,5] -- first explicitly tagged version + * [1,6] -- changed ed25519 part names + */ +Key.prototype._sshpkApiVersion = [1, 6]; + +Key._oldVersionDetect = function (obj) { + assert.func(obj.toBuffer); + assert.func(obj.fingerprint); + if (obj.createDH) + return ([1, 4]); + if (obj.defaultHashAlgorithm) + return ([1, 3]); + if (obj.formats['auto']) + return ([1, 2]); + if (obj.formats['pkcs1']) + return ([1, 1]); + return ([1, 0]); +}; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +module.exports = require("assert"); + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = nullify; +function nullify(obj = {}) { + if (Array.isArray(obj)) { + for (var _iterator = obj, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + const item = _ref; + + nullify(item); + } + } else if (obj !== null && typeof obj === 'object' || typeof obj === 'function') { + Object.setPrototypeOf(obj, null); + + // for..in can only be applied to 'object', not 'function' + if (typeof obj === 'object') { + for (const key in obj) { + nullify(obj[key]); + } + } + } + + return obj; +} + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const escapeStringRegexp = __webpack_require__(388); +const ansiStyles = __webpack_require__(506); +const stdoutColor = __webpack_require__(598).stdout; + +const template = __webpack_require__(599); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); +} + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return template(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +var Buffer = __webpack_require__(15).Buffer; + +var algInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y'], + sizePart: 'p' + }, + 'rsa': { + parts: ['e', 'n'], + sizePart: 'n' + }, + 'ecdsa': { + parts: ['curve', 'Q'], + sizePart: 'Q' + }, + 'ed25519': { + parts: ['A'], + sizePart: 'A' + } +}; +algInfo['curve25519'] = algInfo['ed25519']; + +var algPrivInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y', 'x'] + }, + 'rsa': { + parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] + }, + 'ecdsa': { + parts: ['curve', 'Q', 'd'] + }, + 'ed25519': { + parts: ['A', 'k'] + } +}; +algPrivInfo['curve25519'] = algPrivInfo['ed25519']; + +var hashAlgs = { + 'md5': true, + 'sha1': true, + 'sha256': true, + 'sha384': true, + 'sha512': true +}; + +/* + * Taken from + * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf + */ +var curves = { + 'nistp256': { + size: 256, + pkcs8oid: '1.2.840.10045.3.1.7', + p: Buffer.from(('00' + + 'ffffffff 00000001 00000000 00000000' + + '00000000 ffffffff ffffffff ffffffff'). + replace(/ /g, ''), 'hex'), + a: Buffer.from(('00' + + 'FFFFFFFF 00000001 00000000 00000000' + + '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(( + '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + + '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'c49d3608 86e70493 6a6678e1 139d26b7' + + '819f7e90'). + replace(/ /g, ''), 'hex'), + n: Buffer.from(('00' + + 'ffffffff 00000000 ffffffff ffffffff' + + 'bce6faad a7179e84 f3b9cac2 fc632551'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + + '77037d81 2deb33a0 f4a13945 d898c296' + + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + + '2bce3357 6b315ece cbb64068 37bf51f5'). + replace(/ /g, ''), 'hex') + }, + 'nistp384': { + size: 384, + pkcs8oid: '1.3.132.0.34', + p: Buffer.from(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffe' + + 'ffffffff 00000000 00000000 ffffffff'). + replace(/ /g, ''), 'hex'), + a: Buffer.from(('00' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + + 'FFFFFFFF 00000000 00000000 FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(( + 'b3312fa7 e23ee7e4 988e056b e3f82d19' + + '181d9c6e fe814112 0314088f 5013875a' + + 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'a335926a a319a27a 1d00896a 6773a482' + + '7acdac73'). + replace(/ /g, ''), 'hex'), + n: Buffer.from(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff c7634d81 f4372ddf' + + '581a0db2 48b0a77a ecec196a ccc52973'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + 'aa87ca22 be8b0537 8eb1c71e f320ad74' + + '6e1d3b62 8ba79b98 59f741e0 82542a38' + + '5502f25d bf55296c 3a545e38 72760ab7' + + '3617de4a 96262c6f 5d9e98bf 9292dc29' + + 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). + replace(/ /g, ''), 'hex') + }, + 'nistp521': { + size: 521, + pkcs8oid: '1.3.132.0.35', + p: Buffer.from(( + '01ffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffff').replace(/ /g, ''), 'hex'), + a: Buffer.from(('01FF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(('51' + + '953eb961 8e1c9a1f 929a21a0 b68540ee' + + 'a2da725b 99b315f3 b8b48991 8ef109e1' + + '56193951 ec7e937b 1652c0bd 3bb1bf07' + + '3573df88 3d2c34f1 ef451fd4 6b503f00'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'd09e8800 291cb853 96cc6717 393284aa' + + 'a0da64ba').replace(/ /g, ''), 'hex'), + n: Buffer.from(('01ff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffa' + + '51868783 bf2f966b 7fcc0148 f709a5d0' + + '3bb5c9b8 899c47ae bb6fb71e 91386409'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + + '9c648139 053fb521 f828af60 6b4d3dba' + + 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + + '3348b3c1 856a429b f97e7e31 c2e5bd66' + + '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + + '98f54449 579b4468 17afbd17 273e662c' + + '97ee7299 5ef42640 c550b901 3fad0761' + + '353c7086 a272c240 88be9476 9fd16650'). + replace(/ /g, ''), 'hex') + } +}; + +module.exports = { + info: algInfo, + privInfo: algPrivInfo, + hashAlgs: hashAlgs, + curves: curves +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2017 Joyent, Inc. + +module.exports = PrivateKey; + +var assert = __webpack_require__(16); +var Buffer = __webpack_require__(15).Buffer; +var algs = __webpack_require__(32); +var crypto = __webpack_require__(11); +var Fingerprint = __webpack_require__(156); +var Signature = __webpack_require__(75); +var errs = __webpack_require__(74); +var util = __webpack_require__(3); +var utils = __webpack_require__(26); +var dhe = __webpack_require__(325); +var generateECDSA = dhe.generateECDSA; +var generateED25519 = dhe.generateED25519; +var edCompat; +var nacl; + +try { + edCompat = __webpack_require__(454); +} catch (e) { + /* Just continue through, and bail out if we try to use it. */ +} + +var Key = __webpack_require__(27); + +var InvalidAlgorithmError = errs.InvalidAlgorithmError; +var KeyParseError = errs.KeyParseError; +var KeyEncryptedError = errs.KeyEncryptedError; + +var formats = {}; +formats['auto'] = __webpack_require__(455); +formats['pem'] = __webpack_require__(86); +formats['pkcs1'] = __webpack_require__(327); +formats['pkcs8'] = __webpack_require__(157); +formats['rfc4253'] = __webpack_require__(103); +formats['ssh-private'] = __webpack_require__(192); +formats['openssh'] = formats['ssh-private']; +formats['ssh'] = formats['ssh-private']; +formats['dnssec'] = __webpack_require__(326); + +function PrivateKey(opts) { + assert.object(opts, 'options'); + Key.call(this, opts); + + this._pubCache = undefined; +} +util.inherits(PrivateKey, Key); + +PrivateKey.formats = formats; + +PrivateKey.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'pkcs1'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + return (formats[format].write(this, options)); +}; + +PrivateKey.prototype.hash = function (algo) { + return (this.toPublic().hash(algo)); +}; + +PrivateKey.prototype.toPublic = function () { + if (this._pubCache) + return (this._pubCache); + + var algInfo = algs.info[this.type]; + var pubParts = []; + for (var i = 0; i < algInfo.parts.length; ++i) { + var p = algInfo.parts[i]; + pubParts.push(this.part[p]); + } + + this._pubCache = new Key({ + type: this.type, + source: this, + parts: pubParts + }); + if (this.comment) + this._pubCache.comment = this.comment; + return (this._pubCache); +}; + +PrivateKey.prototype.derive = function (newType) { + assert.string(newType, 'type'); + var priv, pub, pair; + + if (this.type === 'ed25519' && newType === 'curve25519') { + if (nacl === undefined) + nacl = __webpack_require__(76); + + priv = this.part.k.data; + if (priv[0] === 0x00) + priv = priv.slice(1); + + pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv)); + pub = Buffer.from(pair.publicKey); + + return (new PrivateKey({ + type: 'curve25519', + parts: [ + { name: 'A', data: utils.mpNormalize(pub) }, + { name: 'k', data: utils.mpNormalize(priv) } + ] + })); + } else if (this.type === 'curve25519' && newType === 'ed25519') { + if (nacl === undefined) + nacl = __webpack_require__(76); + + priv = this.part.k.data; + if (priv[0] === 0x00) + priv = priv.slice(1); + + pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv)); + pub = Buffer.from(pair.publicKey); + + return (new PrivateKey({ + type: 'ed25519', + parts: [ + { name: 'A', data: utils.mpNormalize(pub) }, + { name: 'k', data: utils.mpNormalize(priv) } + ] + })); + } + throw (new Error('Key derivation not supported from ' + this.type + + ' to ' + newType)); +}; + +PrivateKey.prototype.createVerify = function (hashAlgo) { + return (this.toPublic().createVerify(hashAlgo)); +}; + +PrivateKey.prototype.createSign = function (hashAlgo) { + if (hashAlgo === undefined) + hashAlgo = this.defaultHashAlgorithm(); + assert.string(hashAlgo, 'hash algorithm'); + + /* ED25519 is not supported by OpenSSL, use a javascript impl. */ + if (this.type === 'ed25519' && edCompat !== undefined) + return (new edCompat.Signer(this, hashAlgo)); + if (this.type === 'curve25519') + throw (new Error('Curve25519 keys are not suitable for ' + + 'signing or verification')); + + var v, nm, err; + try { + nm = hashAlgo.toUpperCase(); + v = crypto.createSign(nm); + } catch (e) { + err = e; + } + if (v === undefined || (err instanceof Error && + err.message.match(/Unknown message digest/))) { + nm = 'RSA-'; + nm += hashAlgo.toUpperCase(); + v = crypto.createSign(nm); + } + assert.ok(v, 'failed to create verifier'); + var oldSign = v.sign.bind(v); + var key = this.toBuffer('pkcs1'); + var type = this.type; + var curve = this.curve; + v.sign = function () { + var sig = oldSign(key); + if (typeof (sig) === 'string') + sig = Buffer.from(sig, 'binary'); + sig = Signature.parse(sig, type, 'asn1'); + sig.hashAlgorithm = hashAlgo; + sig.curve = curve; + return (sig); + }; + return (v); +}; + +PrivateKey.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + assert.ok(k instanceof PrivateKey, 'key is not a private key'); + if (!k.comment) + k.comment = options.filename; + return (k); + } catch (e) { + if (e.name === 'KeyEncryptedError') + throw (e); + throw (new KeyParseError(options.filename, format, e)); + } +}; + +PrivateKey.isPrivateKey = function (obj, ver) { + return (utils.isCompatible(obj, PrivateKey, ver)); +}; + +PrivateKey.generate = function (type, options) { + if (options === undefined) + options = {}; + assert.object(options, 'options'); + + switch (type) { + case 'ecdsa': + if (options.curve === undefined) + options.curve = 'nistp256'; + assert.string(options.curve, 'options.curve'); + return (generateECDSA(options.curve)); + case 'ed25519': + return (generateED25519()); + default: + throw (new Error('Key generation not supported with key ' + + 'type "' + type + '"')); + } +}; + +/* + * API versions for PrivateKey: + * [1,0] -- initial ver + * [1,1] -- added auto, pkcs[18], openssh/ssh-private formats + * [1,2] -- added defaultHashAlgorithm + * [1,3] -- added derive, ed, createDH + * [1,4] -- first tagged version + * [1,5] -- changed ed25519 part names and format + */ +PrivateKey.prototype._sshpkApiVersion = [1, 5]; + +PrivateKey._oldVersionDetect = function (obj) { + assert.func(obj.toPublic); + assert.func(obj.createSign); + if (obj.derive) + return ([1, 3]); + if (obj.defaultHashAlgorithm) + return ([1, 2]); + if (obj.formats['auto']) + return ([1, 1]); + return ([1, 0]); +}; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.wrapLifecycle = exports.run = exports.install = exports.Install = undefined; + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(21)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(2)); +} + +let install = exports.install = (() => { + var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, lockfile) { + yield wrapLifecycle(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const install = new Install(flags, config, reporter, lockfile); + yield install.init(); + })); + }); + + return function install(_x7, _x8, _x9, _x10) { + return _ref29.apply(this, arguments); + }; +})(); + +let run = exports.run = (() => { + var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + let lockfile; + let error = 'installCommandRenamed'; + if (flags.lockfile === false) { + lockfile = new (_lockfile || _load_lockfile()).default(); + } else { + lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); + } + + if (args.length) { + const exampleArgs = args.slice(); + + if (flags.saveDev) { + exampleArgs.push('--dev'); + } + if (flags.savePeer) { + exampleArgs.push('--peer'); + } + if (flags.saveOptional) { + exampleArgs.push('--optional'); + } + if (flags.saveExact) { + exampleArgs.push('--exact'); + } + if (flags.saveTilde) { + exampleArgs.push('--tilde'); + } + let command = 'add'; + if (flags.global) { + error = 'globalFlagRemoved'; + command = 'global add'; + } + throw new (_errors || _load_errors()).MessageError(reporter.lang(error, `yarn ${command} ${exampleArgs.join(' ')}`)); + } + + yield install(config, reporter, flags, lockfile); + }); + + return function run(_x11, _x12, _x13, _x14) { + return _ref31.apply(this, arguments); + }; +})(); + +let wrapLifecycle = exports.wrapLifecycle = (() => { + var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags, factory) { + yield config.executeLifecycleScript('preinstall'); + + yield factory(); + + // npm behaviour, seems kinda funky but yay compatibility + yield config.executeLifecycleScript('install'); + yield config.executeLifecycleScript('postinstall'); + + if (!config.production) { + if (!config.disablePrepublish) { + yield config.executeLifecycleScript('prepublish'); + } + yield config.executeLifecycleScript('prepare'); + } + }); + + return function wrapLifecycle(_x15, _x16, _x17) { + return _ref32.apply(this, arguments); + }; +})(); + +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; + +var _objectPath; + +function _load_objectPath() { + return _objectPath = _interopRequireDefault(__webpack_require__(304)); +} + +var _hooks; + +function _load_hooks() { + return _hooks = __webpack_require__(374); +} + +var _index; + +function _load_index() { + return _index = _interopRequireDefault(__webpack_require__(220)); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(6); +} + +var _integrityChecker; + +function _load_integrityChecker() { + return _integrityChecker = _interopRequireDefault(__webpack_require__(208)); +} + +var _lockfile; + +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(19)); +} + +var _lockfile2; + +function _load_lockfile2() { + return _lockfile2 = __webpack_require__(19); +} + +var _packageFetcher; + +function _load_packageFetcher() { + return _packageFetcher = _interopRequireWildcard(__webpack_require__(210)); +} + +var _packageInstallScripts; + +function _load_packageInstallScripts() { + return _packageInstallScripts = _interopRequireDefault(__webpack_require__(557)); +} + +var _packageCompatibility; + +function _load_packageCompatibility() { + return _packageCompatibility = _interopRequireWildcard(__webpack_require__(209)); +} + +var _packageResolver; + +function _load_packageResolver() { + return _packageResolver = _interopRequireDefault(__webpack_require__(366)); +} + +var _packageLinker; + +function _load_packageLinker() { + return _packageLinker = _interopRequireDefault(__webpack_require__(211)); +} + +var _index2; + +function _load_index2() { + return _index2 = __webpack_require__(57); +} + +var _index3; + +function _load_index3() { + return _index3 = __webpack_require__(78); +} + +var _autoclean; + +function _load_autoclean() { + return _autoclean = __webpack_require__(354); +} + +var _constants; + +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(8)); +} + +var _normalizePattern; + +function _load_normalizePattern() { + return _normalizePattern = __webpack_require__(37); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(4)); +} + +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(29)); +} + +var _yarnVersion; + +function _load_yarnVersion() { + return _yarnVersion = __webpack_require__(120); +} + +var _generatePnpMap; + +function _load_generatePnpMap() { + return _generatePnpMap = __webpack_require__(579); +} + +var _workspaceLayout; + +function _load_workspaceLayout() { + return _workspaceLayout = _interopRequireDefault(__webpack_require__(90)); +} + +var _resolutionMap; + +function _load_resolutionMap() { + return _resolutionMap = _interopRequireDefault(__webpack_require__(214)); +} + +var _guessName; + +function _load_guessName() { + return _guessName = _interopRequireDefault(__webpack_require__(169)); +} + +var _audit; + +function _load_audit() { + return _audit = _interopRequireDefault(__webpack_require__(353)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const deepEqual = __webpack_require__(631); + +const emoji = __webpack_require__(302); +const invariant = __webpack_require__(9); +const path = __webpack_require__(0); +const semver = __webpack_require__(22); +const uuid = __webpack_require__(119); +const ssri = __webpack_require__(65); + +const ONE_DAY = 1000 * 60 * 60 * 24; + +/** + * Try and detect the installation method for Yarn and provide a command to update it with. + */ + +function getUpdateCommand(installationMethod) { + if (installationMethod === 'tar') { + return `curl --compressed -o- -L ${(_constants || _load_constants()).YARN_INSTALLER_SH} | bash`; + } + + if (installationMethod === 'homebrew') { + return 'brew upgrade yarn'; + } + + if (installationMethod === 'deb') { + return 'sudo apt-get update && sudo apt-get install yarn'; + } + + if (installationMethod === 'rpm') { + return 'sudo yum install yarn'; + } + + if (installationMethod === 'npm') { + return 'npm install --global yarn'; + } + + if (installationMethod === 'chocolatey') { + return 'choco upgrade yarn'; + } + + if (installationMethod === 'apk') { + return 'apk update && apk add -u yarn'; + } + + if (installationMethod === 'portage') { + return 'sudo emerge --sync && sudo emerge -au sys-apps/yarn'; + } + + return null; +} + +function getUpdateInstaller(installationMethod) { + // Windows + if (installationMethod === 'msi') { + return (_constants || _load_constants()).YARN_INSTALLER_MSI; + } + + return null; +} + +function normalizeFlags(config, rawFlags) { + const flags = { + // install + har: !!rawFlags.har, + ignorePlatform: !!rawFlags.ignorePlatform, + ignoreEngines: !!rawFlags.ignoreEngines, + ignoreScripts: !!rawFlags.ignoreScripts, + ignoreOptional: !!rawFlags.ignoreOptional, + force: !!rawFlags.force, + flat: !!rawFlags.flat, + lockfile: rawFlags.lockfile !== false, + pureLockfile: !!rawFlags.pureLockfile, + updateChecksums: !!rawFlags.updateChecksums, + skipIntegrityCheck: !!rawFlags.skipIntegrityCheck, + frozenLockfile: !!rawFlags.frozenLockfile, + linkDuplicates: !!rawFlags.linkDuplicates, + checkFiles: !!rawFlags.checkFiles, + audit: !!rawFlags.audit, + + // add + peer: !!rawFlags.peer, + dev: !!rawFlags.dev, + optional: !!rawFlags.optional, + exact: !!rawFlags.exact, + tilde: !!rawFlags.tilde, + ignoreWorkspaceRootCheck: !!rawFlags.ignoreWorkspaceRootCheck, + + // outdated, update-interactive + includeWorkspaceDeps: !!rawFlags.includeWorkspaceDeps, + + // add, remove, update + workspaceRootIsCwd: rawFlags.workspaceRootIsCwd !== false + }; + + if (config.getOption('ignore-scripts')) { + flags.ignoreScripts = true; + } + + if (config.getOption('ignore-platform')) { + flags.ignorePlatform = true; + } + + if (config.getOption('ignore-engines')) { + flags.ignoreEngines = true; + } + + if (config.getOption('ignore-optional')) { + flags.ignoreOptional = true; + } + + if (config.getOption('force')) { + flags.force = true; + } + + return flags; +} + +class Install { + constructor(flags, config, reporter, lockfile) { + this.rootManifestRegistries = []; + this.rootPatternsToOrigin = (0, (_map || _load_map()).default)(); + this.lockfile = lockfile; + this.reporter = reporter; + this.config = config; + this.flags = normalizeFlags(config, flags); + this.resolutions = (0, (_map || _load_map()).default)(); // Legacy resolutions field used for flat install mode + this.resolutionMap = new (_resolutionMap || _load_resolutionMap()).default(config); // Selective resolutions for nested dependencies + this.resolver = new (_packageResolver || _load_packageResolver()).default(config, lockfile, this.resolutionMap); + this.integrityChecker = new (_integrityChecker || _load_integrityChecker()).default(config); + this.linker = new (_packageLinker || _load_packageLinker()).default(config, this.resolver); + this.scripts = new (_packageInstallScripts || _load_packageInstallScripts()).default(config, this.resolver, this.flags.force); + } + + /** + * Create a list of dependency requests from the current directories manifests. + */ + + fetchRequestFromCwd(excludePatterns = [], ignoreUnusedPatterns = false) { + var _this = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const patterns = []; + const deps = []; + let resolutionDeps = []; + const manifest = {}; + + const ignorePatterns = []; + const usedPatterns = []; + let workspaceLayout; + + // some commands should always run in the context of the entire workspace + const cwd = _this.flags.includeWorkspaceDeps || _this.flags.workspaceRootIsCwd ? _this.config.lockfileFolder : _this.config.cwd; + + // non-workspaces are always root, otherwise check for workspace root + const cwdIsRoot = !_this.config.workspaceRootFolder || _this.config.lockfileFolder === cwd; + + // exclude package names that are in install args + const excludeNames = []; + for (var _iterator = excludePatterns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + const pattern = _ref; + + if ((0, (_index3 || _load_index3()).getExoticResolver)(pattern)) { + excludeNames.push((0, (_guessName || _load_guessName()).default)(pattern)); + } else { + // extract the name + const parts = (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern); + excludeNames.push(parts.name); + } + } + + const stripExcluded = function stripExcluded(manifest) { + for (var _iterator2 = excludeNames, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + const exclude = _ref2; + + if (manifest.dependencies && manifest.dependencies[exclude]) { + delete manifest.dependencies[exclude]; + } + if (manifest.devDependencies && manifest.devDependencies[exclude]) { + delete manifest.devDependencies[exclude]; + } + if (manifest.optionalDependencies && manifest.optionalDependencies[exclude]) { + delete manifest.optionalDependencies[exclude]; + } + } + }; + + for (var _iterator3 = Object.keys((_index2 || _load_index2()).registries), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + const registry = _ref3; + + const filename = (_index2 || _load_index2()).registries[registry].filename; + + const loc = path.join(cwd, filename); + if (!(yield (_fs || _load_fs()).exists(loc))) { + continue; + } + + _this.rootManifestRegistries.push(registry); + + const projectManifestJson = yield _this.config.readJson(loc); + yield (0, (_index || _load_index()).default)(projectManifestJson, cwd, _this.config, cwdIsRoot); + + Object.assign(_this.resolutions, projectManifestJson.resolutions); + Object.assign(manifest, projectManifestJson); + + _this.resolutionMap.init(_this.resolutions); + for (var _iterator4 = Object.keys(_this.resolutionMap.resolutionsByPackage), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + const packageName = _ref4; + + const optional = (_objectPath || _load_objectPath()).default.has(manifest.optionalDependencies, packageName) && _this.flags.ignoreOptional; + for (var _iterator8 = _this.resolutionMap.resolutionsByPackage[packageName], _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { + var _ref9; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref9 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref9 = _i8.value; + } + + const _ref8 = _ref9; + const pattern = _ref8.pattern; + + resolutionDeps = [...resolutionDeps, { registry, pattern, optional, hint: 'resolution' }]; + } + } + + const pushDeps = function pushDeps(depType, manifest, { hint, optional }, isUsed) { + if (ignoreUnusedPatterns && !isUsed) { + return; + } + // We only take unused dependencies into consideration to get deterministic hoisting. + // Since flat mode doesn't care about hoisting and everything is top level and specified then we can safely + // leave these out. + if (_this.flags.flat && !isUsed) { + return; + } + const depMap = manifest[depType]; + for (const name in depMap) { + if (excludeNames.indexOf(name) >= 0) { + continue; + } + + let pattern = name; + if (!_this.lockfile.getLocked(pattern)) { + // when we use --save we save the dependency to the lockfile with just the name rather than the + // version combo + pattern += '@' + depMap[name]; + } + + // normalization made sure packages are mentioned only once + if (isUsed) { + usedPatterns.push(pattern); + } else { + ignorePatterns.push(pattern); + } + + _this.rootPatternsToOrigin[pattern] = depType; + patterns.push(pattern); + deps.push({ pattern, registry, hint, optional, workspaceName: manifest.name, workspaceLoc: manifest._loc }); + } + }; + + if (cwdIsRoot) { + pushDeps('dependencies', projectManifestJson, { hint: null, optional: false }, true); + pushDeps('devDependencies', projectManifestJson, { hint: 'dev', optional: false }, !_this.config.production); + pushDeps('optionalDependencies', projectManifestJson, { hint: 'optional', optional: true }, true); + } + + if (_this.config.workspaceRootFolder) { + const workspaceLoc = cwdIsRoot ? loc : path.join(_this.config.lockfileFolder, filename); + const workspacesRoot = path.dirname(workspaceLoc); + + let workspaceManifestJson = projectManifestJson; + if (!cwdIsRoot) { + // the manifest we read before was a child workspace, so get the root + workspaceManifestJson = yield _this.config.readJson(workspaceLoc); + yield (0, (_index || _load_index()).default)(workspaceManifestJson, workspacesRoot, _this.config, true); + } + + const workspaces = yield _this.config.resolveWorkspaces(workspacesRoot, workspaceManifestJson); + workspaceLayout = new (_workspaceLayout || _load_workspaceLayout()).default(workspaces, _this.config); + + // add virtual manifest that depends on all workspaces, this way package hoisters and resolvers will work fine + const workspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.dependencies); + for (var _iterator5 = Object.keys(workspaces), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + const workspaceName = _ref5; + + const workspaceManifest = workspaces[workspaceName].manifest; + workspaceDependencies[workspaceName] = workspaceManifest.version; + + // include dependencies from all workspaces + if (_this.flags.includeWorkspaceDeps) { + pushDeps('dependencies', workspaceManifest, { hint: null, optional: false }, true); + pushDeps('devDependencies', workspaceManifest, { hint: 'dev', optional: false }, !_this.config.production); + pushDeps('optionalDependencies', workspaceManifest, { hint: 'optional', optional: true }, true); + } + } + const virtualDependencyManifest = { + _uid: '', + name: `workspace-aggregator-${uuid.v4()}`, + version: '1.0.0', + _registry: 'npm', + _loc: workspacesRoot, + dependencies: workspaceDependencies, + devDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.devDependencies), + optionalDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.optionalDependencies), + private: workspaceManifestJson.private, + workspaces: workspaceManifestJson.workspaces + }; + workspaceLayout.virtualManifestName = virtualDependencyManifest.name; + const virtualDep = {}; + virtualDep[virtualDependencyManifest.name] = virtualDependencyManifest.version; + workspaces[virtualDependencyManifest.name] = { loc: workspacesRoot, manifest: virtualDependencyManifest }; + + // ensure dependencies that should be excluded are stripped from the correct manifest + stripExcluded(cwdIsRoot ? virtualDependencyManifest : workspaces[projectManifestJson.name].manifest); + + pushDeps('workspaces', { workspaces: virtualDep }, { hint: 'workspaces', optional: false }, true); + + const implicitWorkspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceDependencies); + + for (var _iterator6 = (_constants || _load_constants()).OWNED_DEPENDENCY_TYPES, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + const type = _ref6; + + for (var _iterator7 = Object.keys(projectManifestJson[type] || {}), _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref7; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + const dependencyName = _ref7; + + delete implicitWorkspaceDependencies[dependencyName]; + } + } + + pushDeps('dependencies', { dependencies: implicitWorkspaceDependencies }, { hint: 'workspaces', optional: false }, true); + } + + break; + } + + // inherit root flat flag + if (manifest.flat) { + _this.flags.flat = true; + } + + return { + requests: [...resolutionDeps, ...deps], + patterns, + manifest, + usedPatterns, + ignorePatterns, + workspaceLayout + }; + })(); + } + + /** + * TODO description + */ + + prepareRequests(requests) { + return requests; + } + + preparePatterns(patterns) { + return patterns; + } + preparePatternsForLinking(patterns, cwdManifest, cwdIsRoot) { + return patterns; + } + + prepareManifests() { + var _this2 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const manifests = yield _this2.config.getRootManifests(); + return manifests; + })(); + } + + bailout(patterns, workspaceLayout) { + var _this3 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // We don't want to skip the audit - it could yield important errors + if (_this3.flags.audit) { + return false; + } + // PNP is so fast that the integrity check isn't pertinent + if (_this3.config.plugnplayEnabled) { + return false; + } + if (_this3.flags.skipIntegrityCheck || _this3.flags.force) { + return false; + } + const lockfileCache = _this3.lockfile.cache; + if (!lockfileCache) { + return false; + } + const lockfileClean = _this3.lockfile.parseResultType === 'success'; + const match = yield _this3.integrityChecker.check(patterns, lockfileCache, _this3.flags, workspaceLayout); + if (_this3.flags.frozenLockfile && (!lockfileClean || match.missingPatterns.length > 0)) { + throw new (_errors || _load_errors()).MessageError(_this3.reporter.lang('frozenLockfileError')); + } + + const haveLockfile = yield (_fs || _load_fs()).exists(path.join(_this3.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME)); + + const lockfileIntegrityPresent = !_this3.lockfile.hasEntriesExistWithoutIntegrity(); + const integrityBailout = lockfileIntegrityPresent || !_this3.config.autoAddIntegrity; + + if (match.integrityMatches && haveLockfile && lockfileClean && integrityBailout) { + _this3.reporter.success(_this3.reporter.lang('upToDate')); + return true; + } + + if (match.integrityFileMissing && haveLockfile) { + // Integrity file missing, force script installations + _this3.scripts.setForce(true); + return false; + } + + if (match.hardRefreshRequired) { + // e.g. node version doesn't match, force script installations + _this3.scripts.setForce(true); + return false; + } + + if (!patterns.length && !match.integrityFileMissing) { + _this3.reporter.success(_this3.reporter.lang('nothingToInstall')); + yield _this3.createEmptyManifestFolders(); + yield _this3.saveLockfileAndIntegrity(patterns, workspaceLayout); + return true; + } + + return false; + })(); + } + + /** + * Produce empty folders for all used root manifests. + */ + + createEmptyManifestFolders() { + var _this4 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + if (_this4.config.modulesFolder) { + // already created + return; + } + + for (var _iterator9 = _this4.rootManifestRegistries, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { + var _ref10; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref10 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref10 = _i9.value; + } + + const registryName = _ref10; + const folder = _this4.config.registries[registryName].folder; + + yield (_fs || _load_fs()).mkdirp(path.join(_this4.config.lockfileFolder, folder)); + } + })(); + } + + /** + * TODO description + */ + + markIgnored(patterns) { + for (var _iterator10 = patterns, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { + var _ref11; + + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref11 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref11 = _i10.value; + } + + const pattern = _ref11; + + const manifest = this.resolver.getStrictResolvedPattern(pattern); + const ref = manifest._reference; + invariant(ref, 'expected package reference'); + + // just mark the package as ignored. if the package is used by a required package, the hoister + // will take care of that. + ref.ignore = true; + } + } + + /** + * helper method that gets only recent manifests + * used by global.ls command + */ + getFlattenedDeps() { + var _this5 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref12 = yield _this5.fetchRequestFromCwd(); + + const depRequests = _ref12.requests, + rawPatterns = _ref12.patterns; + + + yield _this5.resolver.init(depRequests, {}); + + const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this5.resolver.getManifests(), _this5.config); + _this5.resolver.updateManifests(manifests); + + return _this5.flatten(rawPatterns); + })(); + } + + /** + * TODO description + */ + + init() { + var _this6 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.checkUpdate(); + + // warn if we have a shrinkwrap + if (yield (_fs || _load_fs()).exists(path.join(_this6.config.lockfileFolder, (_constants || _load_constants()).NPM_SHRINKWRAP_FILENAME))) { + _this6.reporter.warn(_this6.reporter.lang('shrinkwrapWarning')); + } + + // warn if we have an npm lockfile + if (yield (_fs || _load_fs()).exists(path.join(_this6.config.lockfileFolder, (_constants || _load_constants()).NPM_LOCK_FILENAME))) { + _this6.reporter.warn(_this6.reporter.lang('npmLockfileWarning')); + } + + if (_this6.config.plugnplayEnabled) { + _this6.reporter.info(_this6.reporter.lang('plugnplaySuggestV2L1')); + _this6.reporter.info(_this6.reporter.lang('plugnplaySuggestV2L2')); + } + + let flattenedTopLevelPatterns = []; + const steps = []; + + var _ref13 = yield _this6.fetchRequestFromCwd(); + + const depRequests = _ref13.requests, + rawPatterns = _ref13.patterns, + ignorePatterns = _ref13.ignorePatterns, + workspaceLayout = _ref13.workspaceLayout, + manifest = _ref13.manifest; + + let topLevelPatterns = []; + + const artifacts = yield _this6.integrityChecker.getArtifacts(); + if (artifacts) { + _this6.linker.setArtifacts(artifacts); + _this6.scripts.setArtifacts(artifacts); + } + + if ((_packageCompatibility || _load_packageCompatibility()).shouldCheck(manifest, _this6.flags)) { + steps.push((() => { + var _ref14 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + _this6.reporter.step(curr, total, _this6.reporter.lang('checkingManifest'), emoji.get('mag')); + yield _this6.checkCompatibility(); + }); + + return function (_x, _x2) { + return _ref14.apply(this, arguments); + }; + })()); + } + + const audit = new (_audit || _load_audit()).default(_this6.config, _this6.reporter, { groups: (_constants || _load_constants()).OWNED_DEPENDENCY_TYPES }); + let auditFoundProblems = false; + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('resolveStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.reporter.step(curr, total, _this6.reporter.lang('resolvingPackages'), emoji.get('mag')); + yield _this6.resolver.init(_this6.prepareRequests(depRequests), { + isFlat: _this6.flags.flat, + isFrozen: _this6.flags.frozenLockfile, + workspaceLayout + }); + topLevelPatterns = _this6.preparePatterns(rawPatterns); + flattenedTopLevelPatterns = yield _this6.flatten(topLevelPatterns); + return { bailout: !_this6.flags.audit && (yield _this6.bailout(topLevelPatterns, workspaceLayout)) }; + })); + }); + + if (_this6.flags.audit) { + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('auditStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.reporter.step(curr, total, _this6.reporter.lang('auditRunning'), emoji.get('mag')); + if (_this6.flags.offline) { + _this6.reporter.warn(_this6.reporter.lang('auditOffline')); + return { bailout: false }; + } + const preparedManifests = yield _this6.prepareManifests(); + // $FlowFixMe - Flow considers `m` in the map operation to be "mixed", so does not recognize `m.object` + const mergedManifest = Object.assign({}, ...Object.values(preparedManifests).map(function (m) { + return m.object; + })); + const auditVulnerabilityCounts = yield audit.performAudit(mergedManifest, _this6.lockfile, _this6.resolver, _this6.linker, topLevelPatterns); + auditFoundProblems = auditVulnerabilityCounts.info || auditVulnerabilityCounts.low || auditVulnerabilityCounts.moderate || auditVulnerabilityCounts.high || auditVulnerabilityCounts.critical; + return { bailout: yield _this6.bailout(topLevelPatterns, workspaceLayout) }; + })); + }); + } + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('fetchStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.markIgnored(ignorePatterns); + _this6.reporter.step(curr, total, _this6.reporter.lang('fetchingPackages'), emoji.get('truck')); + const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this6.resolver.getManifests(), _this6.config); + _this6.resolver.updateManifests(manifests); + yield (_packageCompatibility || _load_packageCompatibility()).check(_this6.resolver.getManifests(), _this6.config, _this6.flags.ignoreEngines); + })); + }); + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('linkStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // remove integrity hash to make this operation atomic + yield _this6.integrityChecker.removeIntegrityFile(); + _this6.reporter.step(curr, total, _this6.reporter.lang('linkingDependencies'), emoji.get('link')); + flattenedTopLevelPatterns = _this6.preparePatternsForLinking(flattenedTopLevelPatterns, manifest, _this6.config.lockfileFolder === _this6.config.cwd); + yield _this6.linker.init(flattenedTopLevelPatterns, workspaceLayout, { + linkDuplicates: _this6.flags.linkDuplicates, + ignoreOptional: _this6.flags.ignoreOptional + }); + })); + }); + + if (_this6.config.plugnplayEnabled) { + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('pnpStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const pnpPath = `${_this6.config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`; + + const code = yield (0, (_generatePnpMap || _load_generatePnpMap()).generatePnpMap)(_this6.config, flattenedTopLevelPatterns, { + resolver: _this6.resolver, + reporter: _this6.reporter, + targetPath: pnpPath, + workspaceLayout + }); + + try { + const file = yield (_fs || _load_fs()).readFile(pnpPath); + if (file === code) { + return; + } + } catch (error) {} + + yield (_fs || _load_fs()).writeFile(pnpPath, code); + yield (_fs || _load_fs()).chmod(pnpPath, 0o755); + })); + }); + } + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('buildStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this6.reporter.step(curr, total, _this6.flags.force ? _this6.reporter.lang('rebuildingPackages') : _this6.reporter.lang('buildingFreshPackages'), emoji.get('hammer')); + + if (_this6.config.ignoreScripts) { + _this6.reporter.warn(_this6.reporter.lang('ignoredScripts')); + } else { + yield _this6.scripts.init(flattenedTopLevelPatterns); + } + })); + }); + + if (_this6.flags.har) { + steps.push((() => { + var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + const formattedDate = new Date().toISOString().replace(/:/g, '-'); + const filename = `yarn-install_${formattedDate}.har`; + _this6.reporter.step(curr, total, _this6.reporter.lang('savingHar', filename), emoji.get('black_circle_for_record')); + yield _this6.config.requestManager.saveHar(filename); + }); + + return function (_x3, _x4) { + return _ref21.apply(this, arguments); + }; + })()); + } + + if (yield _this6.shouldClean()) { + steps.push((() => { + var _ref22 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + _this6.reporter.step(curr, total, _this6.reporter.lang('cleaningModules'), emoji.get('recycle')); + yield (0, (_autoclean || _load_autoclean()).clean)(_this6.config, _this6.reporter); + }); + + return function (_x5, _x6) { + return _ref22.apply(this, arguments); + }; + })()); + } + + let currentStep = 0; + for (var _iterator11 = steps, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) { + var _ref23; + + if (_isArray11) { + if (_i11 >= _iterator11.length) break; + _ref23 = _iterator11[_i11++]; + } else { + _i11 = _iterator11.next(); + if (_i11.done) break; + _ref23 = _i11.value; + } + + const step = _ref23; + + const stepResult = yield step(++currentStep, steps.length); + if (stepResult && stepResult.bailout) { + if (_this6.flags.audit) { + audit.summary(); + } + if (auditFoundProblems) { + _this6.reporter.warn(_this6.reporter.lang('auditRunAuditForDetails')); + } + _this6.maybeOutputUpdate(); + return flattenedTopLevelPatterns; + } + } + + // fin! + if (_this6.flags.audit) { + audit.summary(); + } + if (auditFoundProblems) { + _this6.reporter.warn(_this6.reporter.lang('auditRunAuditForDetails')); + } + yield _this6.saveLockfileAndIntegrity(topLevelPatterns, workspaceLayout); + yield _this6.persistChanges(); + _this6.maybeOutputUpdate(); + _this6.config.requestManager.clearCache(); + return flattenedTopLevelPatterns; + })(); + } + + checkCompatibility() { + var _this7 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref24 = yield _this7.fetchRequestFromCwd(); + + const manifest = _ref24.manifest; + + yield (_packageCompatibility || _load_packageCompatibility()).checkOne(manifest, _this7.config, _this7.flags.ignoreEngines); + })(); + } + + persistChanges() { + var _this8 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // get all the different registry manifests in this folder + const manifests = yield _this8.config.getRootManifests(); + + if (yield _this8.applyChanges(manifests)) { + yield _this8.config.saveRootManifests(manifests); + } + })(); + } + + applyChanges(manifests) { + let hasChanged = false; + + if (this.config.plugnplayPersist) { + const object = manifests.npm.object; + + + if (typeof object.installConfig !== 'object') { + object.installConfig = {}; + } + + if (this.config.plugnplayEnabled && object.installConfig.pnp !== true) { + object.installConfig.pnp = true; + hasChanged = true; + } else if (!this.config.plugnplayEnabled && typeof object.installConfig.pnp !== 'undefined') { + delete object.installConfig.pnp; + hasChanged = true; + } + + if (Object.keys(object.installConfig).length === 0) { + delete object.installConfig; + } + } + + return Promise.resolve(hasChanged); + } + + /** + * Check if we should run the cleaning step. + */ + + shouldClean() { + return (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).CLEAN_FILENAME)); + } + + /** + * TODO + */ + + flatten(patterns) { + var _this9 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + if (!_this9.flags.flat) { + return patterns; + } + + const flattenedPatterns = []; + + for (var _iterator12 = _this9.resolver.getAllDependencyNamesByLevelOrder(patterns), _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) { + var _ref25; + + if (_isArray12) { + if (_i12 >= _iterator12.length) break; + _ref25 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) break; + _ref25 = _i12.value; + } + + const name = _ref25; + + const infos = _this9.resolver.getAllInfoForPackageName(name).filter(function (manifest) { + const ref = manifest._reference; + invariant(ref, 'expected package reference'); + return !ref.ignore; + }); + + if (infos.length === 0) { + continue; + } + + if (infos.length === 1) { + // single version of this package + // take out a single pattern as multiple patterns may have resolved to this package + flattenedPatterns.push(_this9.resolver.patternsByPackage[name][0]); + continue; + } + + const options = infos.map(function (info) { + const ref = info._reference; + invariant(ref, 'expected reference'); + return { + // TODO `and is required by {PARENT}`, + name: _this9.reporter.lang('manualVersionResolutionOption', ref.patterns.join(', '), info.version), + + value: info.version + }; + }); + const versions = infos.map(function (info) { + return info.version; + }); + let version; + + const resolutionVersion = _this9.resolutions[name]; + if (resolutionVersion && versions.indexOf(resolutionVersion) >= 0) { + // use json `resolution` version + version = resolutionVersion; + } else { + version = yield _this9.reporter.select(_this9.reporter.lang('manualVersionResolution', name), _this9.reporter.lang('answer'), options); + _this9.resolutions[name] = version; + } + + flattenedPatterns.push(_this9.resolver.collapseAllVersionsOfPackage(name, version)); + } + + // save resolutions to their appropriate root manifest + if (Object.keys(_this9.resolutions).length) { + const manifests = yield _this9.config.getRootManifests(); + + for (const name in _this9.resolutions) { + const version = _this9.resolutions[name]; + + const patterns = _this9.resolver.patternsByPackage[name]; + if (!patterns) { + continue; + } + + let manifest; + for (var _iterator13 = patterns, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) { + var _ref26; + + if (_isArray13) { + if (_i13 >= _iterator13.length) break; + _ref26 = _iterator13[_i13++]; + } else { + _i13 = _iterator13.next(); + if (_i13.done) break; + _ref26 = _i13.value; + } + + const pattern = _ref26; + + manifest = _this9.resolver.getResolvedPattern(pattern); + if (manifest) { + break; + } + } + invariant(manifest, 'expected manifest'); + + const ref = manifest._reference; + invariant(ref, 'expected reference'); + + const object = manifests[ref.registry].object; + object.resolutions = object.resolutions || {}; + object.resolutions[name] = version; + } + + yield _this9.config.saveRootManifests(manifests); + } + + return flattenedPatterns; + })(); + } + + /** + * Remove offline tarballs that are no longer required + */ + + pruneOfflineMirror(lockfile) { + var _this10 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const mirror = _this10.config.getOfflineMirrorPath(); + if (!mirror) { + return; + } + + const requiredTarballs = new Set(); + for (const dependency in lockfile) { + const resolved = lockfile[dependency].resolved; + if (resolved) { + const basename = path.basename(resolved.split('#')[0]); + if (dependency[0] === '@' && basename[0] !== '@') { + requiredTarballs.add(`${dependency.split('/')[0]}-${basename}`); + } + requiredTarballs.add(basename); + } + } + + const mirrorFiles = yield (_fs || _load_fs()).walk(mirror); + for (var _iterator14 = mirrorFiles, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) { + var _ref27; + + if (_isArray14) { + if (_i14 >= _iterator14.length) break; + _ref27 = _iterator14[_i14++]; + } else { + _i14 = _iterator14.next(); + if (_i14.done) break; + _ref27 = _i14.value; + } + + const file = _ref27; + + const isTarball = path.extname(file.basename) === '.tgz'; + // if using experimental-pack-script-packages-in-mirror flag, don't unlink prebuilt packages + const hasPrebuiltPackage = file.relative.startsWith('prebuilt/'); + if (isTarball && !hasPrebuiltPackage && !requiredTarballs.has(file.basename)) { + yield (_fs || _load_fs()).unlink(file.absolute); + } + } + })(); + } + + /** + * Save updated integrity and lockfiles. + */ + + saveLockfileAndIntegrity(patterns, workspaceLayout) { + var _this11 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const resolvedPatterns = {}; + Object.keys(_this11.resolver.patterns).forEach(function (pattern) { + if (!workspaceLayout || !workspaceLayout.getManifestByPattern(pattern)) { + resolvedPatterns[pattern] = _this11.resolver.patterns[pattern]; + } + }); + + // TODO this code is duplicated in a few places, need a common way to filter out workspace patterns from lockfile + patterns = patterns.filter(function (p) { + return !workspaceLayout || !workspaceLayout.getManifestByPattern(p); + }); + + const lockfileBasedOnResolver = _this11.lockfile.getLockfile(resolvedPatterns); + + if (_this11.config.pruneOfflineMirror) { + yield _this11.pruneOfflineMirror(lockfileBasedOnResolver); + } + + // write integrity hash + if (!_this11.config.plugnplayEnabled) { + yield _this11.integrityChecker.save(patterns, lockfileBasedOnResolver, _this11.flags, workspaceLayout, _this11.scripts.getArtifacts()); + } + + // --no-lockfile or --pure-lockfile or --frozen-lockfile + if (_this11.flags.lockfile === false || _this11.flags.pureLockfile || _this11.flags.frozenLockfile) { + return; + } + + const lockFileHasAllPatterns = patterns.every(function (p) { + return _this11.lockfile.getLocked(p); + }); + const lockfilePatternsMatch = Object.keys(_this11.lockfile.cache || {}).every(function (p) { + return lockfileBasedOnResolver[p]; + }); + const resolverPatternsAreSameAsInLockfile = Object.keys(lockfileBasedOnResolver).every(function (pattern) { + const manifest = _this11.lockfile.getLocked(pattern); + return manifest && manifest.resolved === lockfileBasedOnResolver[pattern].resolved && deepEqual(manifest.prebuiltVariants, lockfileBasedOnResolver[pattern].prebuiltVariants); + }); + const integrityPatternsAreSameAsInLockfile = Object.keys(lockfileBasedOnResolver).every(function (pattern) { + const existingIntegrityInfo = lockfileBasedOnResolver[pattern].integrity; + if (!existingIntegrityInfo) { + // if this entry does not have an integrity, no need to re-write the lockfile because of it + return true; + } + const manifest = _this11.lockfile.getLocked(pattern); + if (manifest && manifest.integrity) { + const manifestIntegrity = ssri.stringify(manifest.integrity); + return manifestIntegrity === existingIntegrityInfo; + } + return false; + }); + + // remove command is followed by install with force, lockfile will be rewritten in any case then + if (!_this11.flags.force && _this11.lockfile.parseResultType === 'success' && lockFileHasAllPatterns && lockfilePatternsMatch && resolverPatternsAreSameAsInLockfile && integrityPatternsAreSameAsInLockfile && patterns.length) { + return; + } + + // build lockfile location + const loc = path.join(_this11.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME); + + // write lockfile + const lockSource = (0, (_lockfile2 || _load_lockfile2()).stringify)(lockfileBasedOnResolver, false, _this11.config.enableLockfileVersions); + yield (_fs || _load_fs()).writeFilePreservingEol(loc, lockSource); + + _this11._logSuccessSaveLockfile(); + })(); + } + + _logSuccessSaveLockfile() { + this.reporter.success(this.reporter.lang('savedLockfile')); + } + + /** + * Load the dependency graph of the current install. Only does package resolving and wont write to the cwd. + */ + hydrate(ignoreUnusedPatterns) { + var _this12 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + const request = yield _this12.fetchRequestFromCwd([], ignoreUnusedPatterns); + const depRequests = request.requests, + rawPatterns = request.patterns, + ignorePatterns = request.ignorePatterns, + workspaceLayout = request.workspaceLayout; + + + yield _this12.resolver.init(depRequests, { + isFlat: _this12.flags.flat, + isFrozen: _this12.flags.frozenLockfile, + workspaceLayout + }); + yield _this12.flatten(rawPatterns); + _this12.markIgnored(ignorePatterns); + + // fetch packages, should hit cache most of the time + const manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this12.resolver.getManifests(), _this12.config); + _this12.resolver.updateManifests(manifests); + yield (_packageCompatibility || _load_packageCompatibility()).check(_this12.resolver.getManifests(), _this12.config, _this12.flags.ignoreEngines); + + // expand minimal manifests + for (var _iterator15 = _this12.resolver.getManifests(), _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) { + var _ref28; + + if (_isArray15) { + if (_i15 >= _iterator15.length) break; + _ref28 = _iterator15[_i15++]; + } else { + _i15 = _iterator15.next(); + if (_i15.done) break; + _ref28 = _i15.value; + } + + const manifest = _ref28; + + const ref = manifest._reference; + invariant(ref, 'expected reference'); + const type = ref.remote.type; + // link specifier won't ever hit cache + + let loc = ''; + if (type === 'link') { + continue; + } else if (type === 'workspace') { + if (!ref.remote.reference) { + continue; + } + loc = ref.remote.reference; + } else { + loc = _this12.config.generateModuleCachePath(ref); + } + const newPkg = yield _this12.config.readManifest(loc); + yield _this12.resolver.updateManifest(ref, newPkg); + } + + return request; + })(); + } + + /** + * Check for updates every day and output a nag message if there's a newer version. + */ + + checkUpdate() { + if (this.config.nonInteractive) { + // don't show upgrade dialog on CI or non-TTY terminals + return; + } + + // don't check if disabled + if (this.config.getOption('disable-self-update-check')) { + return; + } + + // only check for updates once a day + const lastUpdateCheck = Number(this.config.getOption('lastUpdateCheck')) || 0; + if (lastUpdateCheck && Date.now() - lastUpdateCheck < ONE_DAY) { + return; + } + + // don't bug for updates on tagged releases + if ((_yarnVersion || _load_yarnVersion()).version.indexOf('-') >= 0) { + return; + } + + this._checkUpdate().catch(() => { + // swallow errors + }); + } + + _checkUpdate() { + var _this13 = this; + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + let latestVersion = yield _this13.config.requestManager.request({ + url: (_constants || _load_constants()).SELF_UPDATE_VERSION_URL + }); + invariant(typeof latestVersion === 'string', 'expected string'); + latestVersion = latestVersion.trim(); + if (!semver.valid(latestVersion)) { + return; + } + + // ensure we only check for updates periodically + _this13.config.registries.yarn.saveHomeConfig({ + lastUpdateCheck: Date.now() + }); + + if (semver.gt(latestVersion, (_yarnVersion || _load_yarnVersion()).version)) { + const installationMethod = yield (0, (_yarnVersion || _load_yarnVersion()).getInstallationMethod)(); + _this13.maybeOutputUpdate = function () { + _this13.reporter.warn(_this13.reporter.lang('yarnOutdated', latestVersion, (_yarnVersion || _load_yarnVersion()).version)); + + const command = getUpdateCommand(installationMethod); + if (command) { + _this13.reporter.info(_this13.reporter.lang('yarnOutdatedCommand')); + _this13.reporter.command(command); + } else { + const installer = getUpdateInstaller(installationMethod); + if (installer) { + _this13.reporter.info(_this13.reporter.lang('yarnOutdatedInstaller', installer)); + } + } + }; + } + })(); + } + + /** + * Method to override with a possible upgrade message. + */ + + maybeOutputUpdate() {} +} + +exports.Install = Install; +function hasWrapper(commander, args) { + return true; +} + +function setFlags(commander) { + commander.description('Yarn install is used to install all dependencies for a project.'); + commander.usage('install [flags]'); + commander.option('-A, --audit', 'Run vulnerability audit on installed packages'); + commander.option('-g, --global', 'DEPRECATED'); + commander.option('-S, --save', 'DEPRECATED - save package to your `dependencies`'); + commander.option('-D, --save-dev', 'DEPRECATED - save package to your `devDependencies`'); + commander.option('-P, --save-peer', 'DEPRECATED - save package to your `peerDependencies`'); + commander.option('-O, --save-optional', 'DEPRECATED - save package to your `optionalDependencies`'); + commander.option('-E, --save-exact', 'DEPRECATED'); + commander.option('-T, --save-tilde', 'DEPRECATED'); +} + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(52); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 36 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SubjectSubscriber; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subject; }); +/* unused harmony export AnonymousSubject */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__(12); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscriber__ = __webpack_require__(7); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(189); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__ = __webpack_require__(422); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(321); +/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */ + + + + + + + +var SubjectSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SubjectSubscriber, _super); + function SubjectSubscriber(destination) { + var _this = _super.call(this, destination) || this; + _this.destination = destination; + return _this; + } + return SubjectSubscriber; +}(__WEBPACK_IMPORTED_MODULE_2__Subscriber__["a" /* Subscriber */])); + +var Subject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](Subject, _super); + function Subject() { + var _this = _super.call(this) || this; + _this.observers = []; + _this.closed = false; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject.prototype[__WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () { + return new SubjectSubscriber(this); + }; + Subject.prototype.lift = function (operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject.prototype.next = function (value) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + if (!this.isStopped) { + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].next(value); + } + } + }; + Subject.prototype.error = function (err) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + this.hasError = true; + this.thrownError = err; + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].error(err); + } + this.observers.length = 0; + }; + Subject.prototype.complete = function () { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].complete(); + } + this.observers.length = 0; + }; + Subject.prototype.unsubscribe = function () { + this.isStopped = true; + this.closed = true; + this.observers = null; + }; + Subject.prototype._trySubscribe = function (subscriber) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + else { + return _super.prototype._trySubscribe.call(this, subscriber); + } + }; + Subject.prototype._subscribe = function (subscriber) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + else if (this.hasError) { + subscriber.error(this.thrownError); + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + else if (this.isStopped) { + subscriber.complete(); + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + else { + this.observers.push(subscriber); + return new __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__["a" /* SubjectSubscription */](this, subscriber); + } + }; + Subject.prototype.asObservable = function () { + var observable = new __WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */](); + observable.source = this; + return observable; + }; + Subject.create = function (destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject; +}(__WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */])); + +var AnonymousSubject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](AnonymousSubject, _super); + function AnonymousSubject(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject.prototype.next = function (value) { + var destination = this.destination; + if (destination && destination.next) { + destination.next(value); + } + }; + AnonymousSubject.prototype.error = function (err) { + var destination = this.destination; + if (destination && destination.error) { + this.destination.error(err); + } + }; + AnonymousSubject.prototype.complete = function () { + var destination = this.destination; + if (destination && destination.complete) { + this.destination.complete(); + } + }; + AnonymousSubject.prototype._subscribe = function (subscriber) { + var source = this.source; + if (source) { + return this.source.subscribe(subscriber); + } + else { + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + }; + return AnonymousSubject; +}(Subject)); + +//# sourceMappingURL=Subject.js.map + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.normalizePattern = normalizePattern; + +/** + * Explode and normalize a pattern into its name and range. + */ + +function normalizePattern(pattern) { + let hasVersion = false; + let range = 'latest'; + let name = pattern; + + // if we're a scope then remove the @ and add it back later + let isScoped = false; + if (name[0] === '@') { + isScoped = true; + name = name.slice(1); + } + + // take first part as the name + const parts = name.split('@'); + if (parts.length > 1) { + name = parts.shift(); + range = parts.join('@'); + + if (range) { + hasVersion = true; + } else { + range = '*'; + } + } + + // add back @ scope suffix + if (isScoped) { + name = `@${name}`; + } + + return { name, range, hasVersion }; +} + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** + * @license + * Lodash + * Copyright JS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.10'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\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', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + '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' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + return key == '__proto__' + ? undefined + : object[key]; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + + return result; + } + + if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + + return result; + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + if (isObject(srcValue)) { + stack || (stack = new Stack); + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' + + + + +
+ +
+ + + +
+
+

+
+

+ + + + +

+
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/resources/[system]/runcode/web/nui.html b/resources/[system]/runcode/web/nui.html new file mode 100644 index 000000000..6f65d714c --- /dev/null +++ b/resources/[system]/runcode/web/nui.html @@ -0,0 +1,60 @@ + + +runcode nui + + + +
+ +
+ + \ No newline at end of file diff --git a/resources/[system]/scoreboard/fxmanifest.lua b/resources/[system]/scoreboard/fxmanifest.lua new file mode 100644 index 000000000..aca4ad9b5 --- /dev/null +++ b/resources/[system]/scoreboard/fxmanifest.lua @@ -0,0 +1,21 @@ +description 'Scoreboard' + +-- temporary! +ui_page 'html/scoreboard.html' + +client_script 'scoreboard.lua' + +files { + 'html/scoreboard.html', + 'html/style.css', + 'html/reset.css', + 'html/listener.js', + 'html/res/futurastd-medium.css', + 'html/res/futurastd-medium.eot', + 'html/res/futurastd-medium.woff', + 'html/res/futurastd-medium.ttf', + 'html/res/futurastd-medium.svg', +} + +fx_version 'adamant' +game 'gta5' \ No newline at end of file diff --git a/resources/[system]/scoreboard/html/listener.js b/resources/[system]/scoreboard/html/listener.js new file mode 100644 index 000000000..19cb4c804 --- /dev/null +++ b/resources/[system]/scoreboard/html/listener.js @@ -0,0 +1,17 @@ +$(function() +{ + window.addEventListener('message', function(event) + { + var item = event.data; + var buf = $('#wrap'); + buf.find('table').append("IDNameWanted level"); + if (item.meta && item.meta == 'close') + { + document.getElementById("ptbl").innerHTML = ""; + $('#wrap').hide(); + return; + } + buf.find('table').append(item.text); + $('#wrap').show(); + }, false); +}); \ No newline at end of file diff --git a/resources/[system]/scoreboard/html/res/futurastd-medium.css b/resources/[system]/scoreboard/html/res/futurastd-medium.css new file mode 100644 index 000000000..4f26d7040 --- /dev/null +++ b/resources/[system]/scoreboard/html/res/futurastd-medium.css @@ -0,0 +1,8 @@ +@font-face { + font-family: 'FuturaStdMedium'; + src: url('futurastd-medium.eot'); + src: url('futurastd-medium.eot') format('embedded-opentype'), + url('futurastd-medium.woff') format('woff'), + url('futurastd-medium.ttf') format('truetype'), + url('futurastd-medium.svg#FuturaStdMedium') format('svg'); +} diff --git a/resources/[system]/scoreboard/html/res/futurastd-medium.eot b/resources/[system]/scoreboard/html/res/futurastd-medium.eot new file mode 100644 index 000000000..66de49717 Binary files /dev/null and b/resources/[system]/scoreboard/html/res/futurastd-medium.eot differ diff --git a/resources/[system]/scoreboard/html/res/futurastd-medium.svg b/resources/[system]/scoreboard/html/res/futurastd-medium.svg new file mode 100644 index 000000000..e7472bef6 --- /dev/null +++ b/resources/[system]/scoreboard/html/res/futurastd-medium.svg @@ -0,0 +1,913 @@ + + + + +Created by FontForge 20110222 at Mon Aug 4 15:25:24 2014 + By Orthosie Webhosting +Copyright (c) 1987, 1991, 1993, 2002 Adobe Systems Incorporated. All Rights Reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/[system]/scoreboard/html/res/futurastd-medium.ttf b/resources/[system]/scoreboard/html/res/futurastd-medium.ttf new file mode 100644 index 000000000..f87af22a7 Binary files /dev/null and b/resources/[system]/scoreboard/html/res/futurastd-medium.ttf differ diff --git a/resources/[system]/scoreboard/html/res/futurastd-medium.woff b/resources/[system]/scoreboard/html/res/futurastd-medium.woff new file mode 100644 index 000000000..f234cf31b Binary files /dev/null and b/resources/[system]/scoreboard/html/res/futurastd-medium.woff differ diff --git a/resources/[system]/scoreboard/html/reset.css b/resources/[system]/scoreboard/html/reset.css new file mode 100644 index 000000000..af944401f --- /dev/null +++ b/resources/[system]/scoreboard/html/reset.css @@ -0,0 +1,48 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/resources/[system]/scoreboard/html/scoreboard.html b/resources/[system]/scoreboard/html/scoreboard.html new file mode 100644 index 000000000..f4df0a18b --- /dev/null +++ b/resources/[system]/scoreboard/html/scoreboard.html @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/resources/[system]/scoreboard/html/style.css b/resources/[system]/scoreboard/html/style.css new file mode 100644 index 000000000..5da54202f --- /dev/null +++ b/resources/[system]/scoreboard/html/style.css @@ -0,0 +1,40 @@ +@import url('res/futurastd-medium.css'); + +html { + color: #fff; +} + +#wrap { + width: 500px; + min-height: 185px; + margin-top: 10%; + margin-left: auto; + margin-right: auto; + background-color: #fff; + box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.16), 0px 2px 10px 0px rgba(0, 0, 0, 0.12); + color: rgba(255, 255, 255, 0.9); +} + +table { + text-align: left; +} + +th, td { + padding-left: 25px; +} + +th { + padding-top: 10px; + height: 40px; +} + +tr { + font-size: 120%; + font-family: 'Segoe UI'; + /*text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);*/ +} + +tr.heading { + background-color: #43A047; + color: rgba(255, 255, 255, 0.9); +} \ No newline at end of file diff --git a/resources/[system]/scoreboard/scoreboard.lua b/resources/[system]/scoreboard/scoreboard.lua new file mode 100644 index 000000000..4d0efdb30 --- /dev/null +++ b/resources/[system]/scoreboard/scoreboard.lua @@ -0,0 +1,48 @@ +local listOn = false + +Citizen.CreateThread(function() + listOn = false + while true do + Wait(0) + + if IsControlPressed(0, 27)--[[ INPUT_PHONE ]] then + if not listOn then + local players = {} + local ptable = GetActivePlayers() + for _, i in ipairs(ptable) do + local wantedLevel = GetPlayerWantedLevel(i) + r, g, b = GetPlayerRgbColour(i) + table.insert(players, + '' .. GetPlayerServerId(i) .. '' .. sanitize(GetPlayerName(i)) .. '' .. (wantedLevel and wantedLevel or tostring(0)) .. '' + ) + end + + SendNUIMessage({ text = table.concat(players) }) + + listOn = true + while listOn do + Wait(0) + if(IsControlPressed(0, 27) == false) then + listOn = false + SendNUIMessage({ + meta = 'close' + }) + break + end + end + end + end + end +end) + +function sanitize(txt) + local replacements = { + ['&' ] = '&', + ['<' ] = '<', + ['>' ] = '>', + ['\n'] = '
' + } + return txt + :gsub('[&<>\n]', replacements) + :gsub(' +', function(s) return ' '..(' '):rep(#s-1) end) +end diff --git a/resources/[system]/sessionmanager-rdr3/.gitignore b/resources/[system]/sessionmanager-rdr3/.gitignore new file mode 100644 index 000000000..23d67fc10 --- /dev/null +++ b/resources/[system]/sessionmanager-rdr3/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +yarn.lock diff --git a/resources/[system]/sessionmanager-rdr3/fxmanifest.lua b/resources/[system]/sessionmanager-rdr3/fxmanifest.lua new file mode 100644 index 000000000..d6e7fe19c --- /dev/null +++ b/resources/[system]/sessionmanager-rdr3/fxmanifest.lua @@ -0,0 +1,8 @@ +fx_version 'adamant' +game 'common' + +dependencies { + 'yarn' +} + +server_script 'sm_server.js' \ No newline at end of file diff --git a/resources/[system]/sessionmanager-rdr3/package.json b/resources/[system]/sessionmanager-rdr3/package.json new file mode 100644 index 000000000..e00b6dcc1 --- /dev/null +++ b/resources/[system]/sessionmanager-rdr3/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "@citizenfx/protobufjs": "6.8.8" + } +} \ No newline at end of file diff --git a/resources/[system]/sessionmanager-rdr3/rline.proto b/resources/[system]/sessionmanager-rdr3/rline.proto new file mode 100644 index 000000000..f5b98440b --- /dev/null +++ b/resources/[system]/sessionmanager-rdr3/rline.proto @@ -0,0 +1,169 @@ +syntax = "proto3"; +package rline; + +message RpcErrorData { + string ErrorCodeString = 1; + int32 ErrorCode = 2; + string DomainString = 3; + int32 DomainCode = 4; + bytes DataEx = 5; +}; + +message RpcError { + int32 ErrorCode = 1; + string ErrorMessage = 2; + RpcErrorData Data = 3; +}; + +message RpcHeader { + string RequestId = 1; + string MethodName = 2; + RpcError Error = 3; + string srcTid = 4; +}; + +message RpcMessage { + RpcHeader Header = 1; + bytes Content = 2; +}; + +message RpcResponseContainer { + bytes Content = 1; +}; + +message RpcResponseMessage { + RpcHeader Header = 1; + RpcResponseContainer Container = 2; +}; + +message TokenStuff { + string tkn = 1; +}; + +message InitSessionResponse { + bytes sesid = 1; + TokenStuff token = 2; +}; + +message MpGamerHandleDto { + string gh = 1; +}; + +message MpPeerAddressDto { + string addr = 1; +}; + +message InitPlayer2_Parameters { + MpGamerHandleDto gh = 1; + MpPeerAddressDto peerAddress = 2; + int32 discriminator = 3; + int32 seamlessType = 4; + uint32 connectionReason = 5; +}; + +message InitPlayerResult { + uint32 code = 1; +}; + +message Restriction { + int32 u1 = 1; + int32 u2 = 2; + int32 u3 = 3; +} + +message GetRestrictionsData { + repeated Restriction restriction = 1; + repeated string unk2 = 2; +}; + +message GetRestrictionsResult { + GetRestrictionsData data = 1; +}; + +message PlayerIdSto { + int32 acctId = 1; + int32 platId = 2; +}; + +message MpSessionRequestIdDto { + PlayerIdSto requestor = 1; + int32 index = 2; + int32 hash = 3; +}; + +message QueueForSession_Seamless_Parameters { + MpSessionRequestIdDto requestId = 1; + uint32 optionFlags = 2; + int32 x = 3; + int32 y = 4; +}; + +message QueueForSessionResult { + uint32 code = 1; +}; + +message QueueEntered_Parameters { + uint32 queueGroup = 1; + MpSessionRequestIdDto requestId = 2; + uint32 optionFlags = 3; +}; + +message GuidDto { + fixed64 a = 1; + fixed64 b = 2; +}; + +message MpTransitionIdDto { + GuidDto value = 1; +}; + +message MpSessionIdDto { + GuidDto value = 1; +}; + +message SessionSubcommandEnterSession { + int32 index = 1; + int32 hindex = 2; + uint32 sessionFlags = 3; + uint32 mode = 4; + int32 size = 5; + int32 teamIndex = 6; + MpTransitionIdDto transitionId = 7; + uint32 sessionManagerType = 8; + int32 slotCount = 9; +}; + +message SessionSubcommandLeaveSession { + uint32 reason = 1; +}; + +message SessionSubcommandAddPlayer { + PlayerIdSto id = 1; + MpGamerHandleDto gh = 2; + MpPeerAddressDto addr = 3; + int32 index = 4; +}; + +message SessionSubcommandRemovePlayer { + PlayerIdSto id = 1; +}; + +message SessionSubcommandHostChanged { + int32 index = 1; +}; + +message SessionCommand { + uint32 cmd = 1; + string cmdname = 2; + SessionSubcommandEnterSession EnterSession = 3; + SessionSubcommandLeaveSession LeaveSession = 4; + SessionSubcommandAddPlayer AddPlayer = 5; + SessionSubcommandRemovePlayer RemovePlayer = 6; + SessionSubcommandHostChanged HostChanged = 7; +}; + +message scmds_Parameters { + MpSessionIdDto sid = 1; + int32 ncmds = 2; + repeated SessionCommand cmds = 3; +}; \ No newline at end of file diff --git a/resources/[system]/sessionmanager-rdr3/sm_server.js b/resources/[system]/sessionmanager-rdr3/sm_server.js new file mode 100644 index 000000000..ded45fdbd --- /dev/null +++ b/resources/[system]/sessionmanager-rdr3/sm_server.js @@ -0,0 +1,276 @@ +const protobuf = require("@citizenfx/protobufjs"); + +const playerDatas = {}; +let slotsUsed = 0; + +function assignSlotId() { + for (let i = 0; i < 32; i++) { + if (!(slotsUsed & (1 << i))) { + slotsUsed |= (1 << i); + return i; + } + } + + return -1; +} + +let hostIndex = -1; + +protobuf.load(GetResourcePath(GetCurrentResourceName()) + "/rline.proto", function(err, root) { + if (err) { + console.log(err); + return; + } + + const RpcMessage = root.lookupType("rline.RpcMessage"); + const RpcResponseMessage = root.lookupType("rline.RpcResponseMessage"); + const InitSessionResponse = root.lookupType("rline.InitSessionResponse"); + const InitPlayer2_Parameters = root.lookupType("rline.InitPlayer2_Parameters"); + const InitPlayerResult = root.lookupType("rline.InitPlayerResult"); + const GetRestrictionsResult = root.lookupType("rline.GetRestrictionsResult"); + const QueueForSession_Seamless_Parameters = root.lookupType("rline.QueueForSession_Seamless_Parameters"); + const QueueForSessionResult = root.lookupType("rline.QueueForSessionResult"); + const QueueEntered_Parameters = root.lookupType("rline.QueueEntered_Parameters"); + const scmds_Parameters = root.lookupType("rline.scmds_Parameters"); + + function toArrayBuffer(buf) { + var ab = new ArrayBuffer(buf.length); + var view = new Uint8Array(ab); + for (var i = 0; i < buf.length; ++i) { + view[i] = buf[i]; + } + return ab; + } + + function emitMsg(target, data) { + emitNet('__cfx_internal:pbRlScSession', target, toArrayBuffer(data)); + } + + function emitSessionCmds(target, cmd, cmdname, msg) { + const stuff = {}; + stuff[cmdname] = msg; + + emitMsg(target, RpcMessage.encode({ + Header: { + MethodName: 'scmds' + }, + Content: scmds_Parameters.encode({ + sid: { + value: { + a: 2, + b: 2 + } + }, + ncmds: 1, + cmds: [ + { + cmd, + cmdname, + ...stuff + } + ] + }).finish() + }).finish()); + } + + function emitAddPlayer(target, msg) { + emitSessionCmds(target, 2, 'AddPlayer', msg); + } + + function emitRemovePlayer(target, msg) { + emitSessionCmds(target, 3, 'RemovePlayer', msg); + } + + function emitHostChanged(target, msg) { + emitSessionCmds(target, 5, 'HostChanged', msg); + } + + onNet('playerDropped', () => { + try { + const oData = playerDatas[source]; + delete playerDatas[source]; + + if (oData && hostIndex === oData.slot) { + const pda = Object.entries(playerDatas); + + if (pda.length > 0) { + hostIndex = pda[0][1].slot | 0; // TODO: actually use <=31 slot index *and* check for id + + for (const [ id, data ] of Object.entries(playerDatas)) { + emitHostChanged(id, { + index: hostIndex + }); + } + } else { + hostIndex = -1; + } + } + + if (!oData) { + return; + } + + if (oData.slot > -1) { + slotsUsed &= ~(1 << oData.slot); + } + + for (const [ id, data ] of Object.entries(playerDatas)) { + emitRemovePlayer(id, { + id: oData.id + }); + } + } catch (e) { + console.log(e); + console.log(e.stack); + } + }); + + function makeResponse(type, data) { + return { + Header: { + }, + Container: { + Content: type.encode(data).finish() + } + }; + } + + const handlers = { + async InitSession(source, data) { + return makeResponse(InitSessionResponse, { + sesid: Buffer.alloc(16), + /*token: { + tkn: 'ACSTOKEN token="meow",signature="meow"' + }*/ + }); + }, + + async InitPlayer2(source, data) { + const req = InitPlayer2_Parameters.decode(data); + + playerDatas[source] = { + gh: req.gh, + peerAddress: req.peerAddress, + discriminator: req.discriminator, + slot: -1 + }; + + return makeResponse(InitPlayerResult, { + code: 0 + }); + }, + + async GetRestrictions(source, data) { + return makeResponse(GetRestrictionsResult, { + data: { + + } + }); + }, + + async ConfirmSessionEntered(source, data) { + return {}; + }, + + async QueueForSession_Seamless(source, data) { + const req = QueueForSession_Seamless_Parameters.decode(data); + + playerDatas[source].req = req.requestId; + playerDatas[source].id = req.requestId.requestor; + playerDatas[source].slot = assignSlotId(); + + setTimeout(() => { + emitMsg(source, RpcMessage.encode({ + Header: { + MethodName: 'QueueEntered' + }, + Content: QueueEntered_Parameters.encode({ + queueGroup: 69, + requestId: req.requestId, + optionFlags: req.optionFlags + }).finish() + }).finish()); + + if (hostIndex === -1) { + hostIndex = playerDatas[source].slot | 0; + } + + emitSessionCmds(source, 0, 'EnterSession', { + index: playerDatas[source].slot | 0, + hindex: hostIndex, + sessionFlags: 0, + mode: 0, + size: Object.entries(playerDatas).filter(a => a[1].id).length, + //size: 2, + //size: Object.entries(playerDatas).length, + teamIndex: 0, + transitionId: { + value: { + a: 0,//2, + b: 0 + } + }, + sessionManagerType: 0, + slotCount: 32 + }); + + setTimeout(() => { + // tell player about everyone, and everyone about player + const meData = playerDatas[source]; + + const aboutMe = { + id: meData.id, + gh: meData.gh, + addr: meData.peerAddress, + index: playerDatas[source].slot | 0 + }; + + for (const [ id, data ] of Object.entries(playerDatas)) { + if (id == source || !data.id) continue; + + emitAddPlayer(source, { + id: data.id, + gh: data.gh, + addr: data.peerAddress, + index: data.slot | 0 + }); + + emitAddPlayer(id, aboutMe); + } + }, 150); + }, 50); + + return makeResponse(QueueForSessionResult, { + code: 1 + }); + }, + }; + + async function handleMessage(source, method, data) { + if (handlers[method]) { + return await handlers[method](source, data); + } + + return {}; + } + + onNet('__cfx_internal:pbRlScSession', async (data) => { + const s = source; + + try { + const message = RpcMessage.decode(new Uint8Array(data)); + const response = await handleMessage(s, message.Header.MethodName, message.Content); + + if (!response || !response.Header) { + return; + } + + response.Header.RequestId = message.Header.RequestId; + + emitMsg(s, RpcResponseMessage.encode(response).finish()); + } catch (e) { + console.log(e); + console.log(e.stack); + } + }); +}); \ No newline at end of file diff --git a/resources/[system]/sessionmanager/__resource.lua b/resources/[system]/sessionmanager/__resource.lua new file mode 100644 index 000000000..7b661f8e9 --- /dev/null +++ b/resources/[system]/sessionmanager/__resource.lua @@ -0,0 +1,4 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +server_script 'server/host_lock.lua' +client_script 'client/empty.lua' \ No newline at end of file diff --git a/resources/[system]/sessionmanager/client/empty.lua b/resources/[system]/sessionmanager/client/empty.lua new file mode 100644 index 000000000..00825ac02 --- /dev/null +++ b/resources/[system]/sessionmanager/client/empty.lua @@ -0,0 +1,3 @@ +--This empty file causes the scheduler.lua to load clientside +--scheduler.lua when loaded inside the sessionmanager resource currently manages remote callbacks. +--Without this, callbacks will only work server->client and not client->server. \ No newline at end of file diff --git a/resources/[system]/sessionmanager/server/host_lock.lua b/resources/[system]/sessionmanager/server/host_lock.lua new file mode 100644 index 000000000..51214042f --- /dev/null +++ b/resources/[system]/sessionmanager/server/host_lock.lua @@ -0,0 +1,69 @@ +-- whitelist c2s events +RegisterServerEvent('hostingSession') +RegisterServerEvent('hostedSession') + +-- event handler for pre-session 'acquire' +local currentHosting +local hostReleaseCallbacks = {} + +-- TODO: add a timeout for the hosting lock to be held +-- TODO: add checks for 'fraudulent' conflict cases of hosting attempts (typically whenever the host can not be reached) +AddEventHandler('hostingSession', function() + -- if the lock is currently held, tell the client to await further instruction + if currentHosting then + TriggerClientEvent('sessionHostResult', source, 'wait') + + -- register a callback for when the lock is freed + table.insert(hostReleaseCallbacks, function() + TriggerClientEvent('sessionHostResult', source, 'free') + end) + + return + end + + -- if the current host was last contacted less than a second ago + if GetHostId() then + if GetPlayerLastMsg(GetHostId()) < 1000 then + TriggerClientEvent('sessionHostResult', source, 'conflict') + + return + end + end + + hostReleaseCallbacks = {} + + currentHosting = source + + TriggerClientEvent('sessionHostResult', source, 'go') + + -- set a timeout of 5 seconds + SetTimeout(5000, function() + if not currentHosting then + return + end + + currentHosting = nil + + for _, cb in ipairs(hostReleaseCallbacks) do + cb() + end + end) +end) + +AddEventHandler('hostedSession', function() + -- check if the client is the original locker + if currentHosting ~= source then + -- TODO: drop client as they're clearly lying + print(currentHosting, '~=', source) + return + end + + -- free the host lock (call callbacks and remove the lock value) + for _, cb in ipairs(hostReleaseCallbacks) do + cb() + end + + currentHosting = nil +end) + +EnableEnhancedHostSupport(true) \ No newline at end of file diff --git a/resources/[test]/example-loadscreen/__resource.lua b/resources/[test]/example-loadscreen/__resource.lua new file mode 100644 index 000000000..5f9db34fa --- /dev/null +++ b/resources/[test]/example-loadscreen/__resource.lua @@ -0,0 +1,18 @@ +-- This resource is part of the default Cfx.re asset pack (cfx-server-data) +-- Altering or recreating for local use only is strongly discouraged. + +version '1.0.0' +author 'Cfx.re ' +description 'Example loading screen.' +repository 'https://github.com/citizenfx/cfx-server-data' + +files { + 'index.html', + 'keks.css', + 'bankgothic.ttf', + 'loadscreen.jpg' +} + +loadscreen 'index.html' + +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' diff --git a/resources/[test]/example-loadscreen/bankgothic.ttf b/resources/[test]/example-loadscreen/bankgothic.ttf new file mode 100644 index 000000000..f3d8049b0 Binary files /dev/null and b/resources/[test]/example-loadscreen/bankgothic.ttf differ diff --git a/resources/[test]/example-loadscreen/index.html b/resources/[test]/example-loadscreen/index.html new file mode 100644 index 000000000..c3f8446da --- /dev/null +++ b/resources/[test]/example-loadscreen/index.html @@ -0,0 +1,77 @@ + + + + + +
+
+

Free Mode

+

Not Algonquin

+
+ +
+

Intel

+

+
+

The Statue of Happiness has no heart. You do.

+
+
+
+
+
+
+ + + + diff --git a/resources/[test]/example-loadscreen/keks.css b/resources/[test]/example-loadscreen/keks.css new file mode 100644 index 000000000..0026bc9c4 --- /dev/null +++ b/resources/[test]/example-loadscreen/keks.css @@ -0,0 +1,151 @@ +body +{ + margin: 0px; + padding: 0px; +} + +.backdrop +{ + position: relative; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + + background-image: url(loadscreen.jpg); + background-size: 100% 100%; +} + +.bottom +{ + position: absolute; + bottom: 0px; + width: 100%; + height: 100%; +} + +#gradient +{ + position: absolute; + bottom: 0px; + width: 100%; + + height: 25%; + + background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%); +} + +@font-face { + font-family: 'BankGothic'; + src: url('bankgothic.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +h1, h2 { + position: relative; + background: transparent; + z-index: 0; +} +/* add a single stroke */ +h1:before, h2:before { + content: attr(title); + position: absolute; + -webkit-text-stroke: 0.1em #000; + left: 0; + z-index: -1; +} + + +.letni +{ + position: absolute; + left: 5%; + right: 5%; + bottom: 10%; + + z-index: 5; + + color: #fff; + + font-family: "Segoe UI"; +} + +.letni p +{ + font-size: 22px; + + margin-left: 3px; + + margin-top: 0px; +} + +.letni h2, .letni h3 +{ + font-family: BankGothic; + + text-transform: uppercase; + + font-size: 50px; + + margin: 0px; + + display: inline-block; +} + +.top +{ + color: #fff; + + position: absolute; + top: 7%; + left: 5%; + right: 5%; +} + +.top h1 +{ + font-family: BankGothic; + font-size: 60px; + + margin: 0px; +} + +.top h2 +{ + font-family: BankGothic; + font-size: 40px; + + margin: 0px; + + color: #ddd; +} + +.loadbar +{ + width: 100%; + background-color: rgba(140, 140, 140, .9); + height: 20px; + + margin-left: 2px; + margin-right: 3px; + + margin-top: 5px; + margin-bottom: 5px; + + overflow: hidden; + + position: relative; + + display: block; +} + +.thingy +{ + width: 10%; + background-color: #eee; + height: 20px; + + position: absolute; + left: 10%; +} \ No newline at end of file diff --git a/resources/[test]/example-loadscreen/loadscreen.jpg b/resources/[test]/example-loadscreen/loadscreen.jpg new file mode 100644 index 000000000..a87caee90 Binary files /dev/null and b/resources/[test]/example-loadscreen/loadscreen.jpg differ diff --git a/resources/[test]/fivem/fxmanifest.lua b/resources/[test]/fivem/fxmanifest.lua new file mode 100644 index 000000000..74201da9e --- /dev/null +++ b/resources/[test]/fivem/fxmanifest.lua @@ -0,0 +1,13 @@ +-- This resource is part of the default Cfx.re asset pack (cfx-server-data) +-- Altering or recreating for local use only is strongly discouraged. + +version '1.0.0' +author 'Cfx.re ' +description 'A compatibility resource to load basic-gamemode.' +repository 'https://github.com/citizenfx/cfx-server-data' + +-- compatibility wrapper +fx_version 'adamant' +game 'common' + +dependency 'basic-gamemode' diff --git a/resources/assets/TruckersFM_Logo.dds b/resources/assets/TruckersFM_Logo.dds new file mode 100644 index 000000000..70a21fe7e Binary files /dev/null and b/resources/assets/TruckersFM_Logo.dds differ diff --git a/resources/assets/TruckersFM_Logo.png b/resources/assets/TruckersFM_Logo.png new file mode 100644 index 000000000..24518a23e Binary files /dev/null and b/resources/assets/TruckersFM_Logo.png differ diff --git a/resources/assets/__resource.lua b/resources/assets/__resource.lua new file mode 100644 index 000000000..e69de29bb diff --git a/resources/assets/stream/hud/Backup of HUD items.ytdbackup b/resources/assets/stream/hud/Backup of HUD items.ytdbackup new file mode 100644 index 000000000..b35f29249 Binary files /dev/null and b/resources/assets/stream/hud/Backup of HUD items.ytdbackup differ diff --git a/resources/assets/stream/hud/hud.ytd b/resources/assets/stream/hud/hud.ytd new file mode 100644 index 000000000..bebf20514 --- /dev/null +++ b/resources/assets/stream/hud/hud.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:804b39f0fe88ef940d4664e469d8971e7abbd61b922166a79b16de32c96b7e0d +size 447291 diff --git a/resources/b737800/__resource.lua b/resources/b737800/__resource.lua new file mode 100644 index 000000000..993c7d740 --- /dev/null +++ b/resources/b737800/__resource.lua @@ -0,0 +1,15 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +files { + 'handling.meta', + 'vehicles.meta', + 'carvariations.meta', + 'dlctext.meta' +} + +data_file 'HANDLING_FILE' 'handling.meta' +data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta' +data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta' +data_file 'DLCTEXT_FILE' 'dlctext.meta' + +client_scripts 'vehicle_names.lua' diff --git a/resources/b737800/caraddoncontentunlocks.meta b/resources/b737800/caraddoncontentunlocks.meta new file mode 100644 index 000000000..ef7532e33 --- /dev/null +++ b/resources/b737800/caraddoncontentunlocks.meta @@ -0,0 +1,7 @@ + + + + CU_TUNABOAT_VEH + + + diff --git a/resources/b737800/carvariations.meta b/resources/b737800/carvariations.meta new file mode 100644 index 000000000..d0c7f23e2 --- /dev/null +++ b/resources/b737800/carvariations.meta @@ -0,0 +1,71 @@ + + + + + + + + + + + + + b737800C + + + + 119 + 111 + 111 + 111 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/b737800/dlctext.meta b/resources/b737800/dlctext.meta new file mode 100644 index 000000000..22bb4c390 --- /dev/null +++ b/resources/b737800/dlctext.meta @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/resources/b737800/handling.meta b/resources/b737800/handling.meta new file mode 100644 index 000000000..54d3183a0 --- /dev/null +++ b/resources/b737800/handling.meta @@ -0,0 +1,188 @@ + + + + + + b737800C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20000000 + 400100 + 20 + AVERAGE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HANDLING_TYPE_FLYING + + + + + + + B737800 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20000000 + 400100 + 20 + AVERAGE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HANDLING_TYPE_FLYING + + + + + + + \ No newline at end of file diff --git a/resources/b737800/stream/B737800.yft b/resources/b737800/stream/B737800.yft new file mode 100644 index 000000000..9e0fa832e --- /dev/null +++ b/resources/b737800/stream/B737800.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c460c29b59bd831b9a8cdc8f1bbbffbad9f79e1f5f0480735ebb0ff7319a1f9 +size 2613259 diff --git a/resources/b737800/stream/B737800.ytd b/resources/b737800/stream/B737800.ytd new file mode 100644 index 000000000..042354c34 --- /dev/null +++ b/resources/b737800/stream/B737800.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6fcd9381be93843508d26c3812304fcf322f6aa18dbaf49c38987d32bc3cee8 +size 43768058 diff --git a/resources/b737800/stream/B737800_hi.yft b/resources/b737800/stream/B737800_hi.yft new file mode 100644 index 000000000..3f99857db --- /dev/null +++ b/resources/b737800/stream/B737800_hi.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a87461af87000179b6a5ce3ef468cd285e3540af83bafb478d991d4516ddd4a5 +size 2613229 diff --git a/resources/b737800/stream/b737800C.yft b/resources/b737800/stream/b737800C.yft new file mode 100644 index 000000000..063b6c329 --- /dev/null +++ b/resources/b737800/stream/b737800C.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f60ca499b36de503fcdee5eb45534a3c5d4bee98a5a9ac06012fd0374a68bcc7 +size 2747942 diff --git a/resources/b737800/stream/b737800C.ytd b/resources/b737800/stream/b737800C.ytd new file mode 100644 index 000000000..97c65b6d7 --- /dev/null +++ b/resources/b737800/stream/b737800C.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b9c82d120a7469f573d28055c6068af15c763916a62be5a78eec73b6ec28924 +size 24522359 diff --git a/resources/b737800/stream/b737800C_hi.yft b/resources/b737800/stream/b737800C_hi.yft new file mode 100644 index 000000000..fe3749140 --- /dev/null +++ b/resources/b737800/stream/b737800C_hi.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ea4fac6692fec9846f05cd3b95ffb5b99f49a2ba5657e86036ba9b0f45b2eea +size 2747887 diff --git a/resources/b737800/vehiclelayouts.meta b/resources/b737800/vehiclelayouts.meta new file mode 100644 index 000000000..3e396c916 --- /dev/null +++ b/resources/b737800/vehiclelayouts.meta @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + ENTRY_POINT_PLANE_b737800C_WARP_LEFT + + + + INVALID + SIDE_LEFT + + + + + + + + + + + + + + + + + + + + MPWarpInOut SPEntryAllowedAlso IgnoreSmashWindowCheck + + + + ENTRY_POINT_PLANE_b737800C_WARP_RIGHT + + + + INVALID + SIDE_RIGHT + + + + + + + + + + + + MPWarpInOut SPEntryAllowedAlso IgnoreSmashWindowCheck + + + + + + + ENTRY_POINT_ANIM_PLANE_b737800C_WARP + + + + + + + + + ENTER_VEHICLE_STD + + + + + + UseVehicleRelativeEntryPosition WarpOut DontCloseDoorInside DontCloseDoorOutside NavigateToWarpEntryPoint + + + + + + + + + + LAYOUT_PLANE_b737800C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + StreamAnims WarpIntoAndOut DisableJackingAndBusting Use2DBodyBlend + + busted_vehicle_std + + + + LAYOUT_PLANE_B737800 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + StreamAnims WarpIntoAndOut DisableJackingAndBusting Use2DBodyBlend + + busted_vehicle_std + + + + + + + + \ No newline at end of file diff --git a/resources/b737800/vehicles.meta b/resources/b737800/vehicles.meta new file mode 100644 index 000000000..0e3605cd5 --- /dev/null +++ b/resources/b737800/vehicles.meta @@ -0,0 +1,253 @@ + + + vehshare + + + + b737800C + b737800C + b737800C + b737800C + + null + null + null + null + + null + CARGOPLANE + LAYOUT_PLANE_b737800C + STANDARD_COVER_OFFSET_INFO + EXPLOSION_INFO_JET + + FOLLOW_TITAN_CAMERA + PLANE_AIM_CAMERA + TITAN_BONNET_CAMERA + PLANE_POV_CAMERA + + + + + + + + + + + + + + + + + + VFXVEHICLEINFO_PLANE_CARGO + + + + + + + + + + + + + + + + + + + + + + 100.000000 + 400.000000 + 600.000000 + 1200.000000 + 3400.000000 + 3400.000000 + + + + + + + + + + + SWANKNESS_4 + + FLAG_NO_BOOT FLAG_HAS_LIVERY FLAG_USE_LIGHTING_INTERIOR_OVERRIDE FLAG_HEADLIGHTS_USE_ACTUAL_BONE_POS FLAG_PEDS_CAN_STAND_ON_TOP FLAG_DRIVER_NO_DRIVE_BY FLAG_DONT_SPAWN_IN_CARGEN FLAG_DONT_SPAWN_AS_AMBIENT FLAG_BLOCK_FROM_ATTRACTOR_SCENARIO FLAG_HEADLIGHTS_ON_LANDINGGEAR FLAG_DONT_TIMESLICE_WHEELS + VEHICLE_TYPE_PLANE + VPT_NONE + VDT_LAZER + VC_PLANE + VWT_SPORT + + + + + S_M_M_GenTransport + Pilot + + + + + VEH_EXT_DOOR_DSIDE_R + VEH_EXT_BONNET + + + VEH_EXT_DOOR_DSIDE_R + VEH_EXT_BONNET + + + + + + + JET_WINGLIGHT_LEFT_CAMERA + JET_WINGLIGHT_RIGHT_CAMERA + + + + + + + STD_FRONT_LEFT + PLANE_FRONT_RIGHT + + + + B737800 + B737800 + B737800 + B737800 + + null + null + null + null + + null + CARGOPLANE + LAYOUT_PLANE_B737800 + STANDARD_COVER_OFFSET_INFO + EXPLOSION_INFO_JET + + FOLLOW_TITAN_CAMERA + PLANE_AIM_CAMERA + TITAN_BONNET_CAMERA + PLANE_POV_CAMERA + + + + + + + + + + + + + + + + + + VFXVEHICLEINFO_PLANE_CARGO + + + + + + + + + + + + + + + + + + + + + + 100.000000 + 400.000000 + 600.000000 + 1200.000000 + 3400.000000 + 3400.000000 + + + + + + + + + + + SWANKNESS_4 + + FLAG_NO_BOOT FLAG_HAS_LIVERY FLAG_USE_LIGHTING_INTERIOR_OVERRIDE FLAG_HEADLIGHTS_USE_ACTUAL_BONE_POS FLAG_PEDS_CAN_STAND_ON_TOP FLAG_DRIVER_NO_DRIVE_BY FLAG_DONT_SPAWN_IN_CARGEN FLAG_DONT_SPAWN_AS_AMBIENT FLAG_BLOCK_FROM_ATTRACTOR_SCENARIO FLAG_HEADLIGHTS_ON_LANDINGGEAR FLAG_DONT_TIMESLICE_WHEELS + VEHICLE_TYPE_PLANE + VPT_NONE + VDT_LAZER + VC_PLANE + VWT_SPORT + + + + + S_M_M_GenTransport + Pilot + + + + + VEH_EXT_DOOR_DSIDE_R + VEH_EXT_BONNET + + + VEH_EXT_DOOR_DSIDE_R + VEH_EXT_BONNET + + + + + + + JET_WINGLIGHT_LEFT_CAMERA + JET_WINGLIGHT_RIGHT_CAMERA + + + + + + + STD_FRONT_LEFT + PLANE_FRONT_RIGHT + + + + + + vehicles_flyer_interior + b737800C + + + vehicles_flyer_interior + B737800 + + + \ No newline at end of file diff --git a/resources/cadvanced_mdt/.gitignore b/resources/cadvanced_mdt/.gitignore new file mode 100644 index 000000000..06ab8861c --- /dev/null +++ b/resources/cadvanced_mdt/.gitignore @@ -0,0 +1,4 @@ +.vscode +mdt_config.lua +ui/cache/ +node_modules/ diff --git a/resources/cadvanced_mdt/README.md b/resources/cadvanced_mdt/README.md new file mode 100644 index 000000000..fc3cf6a03 --- /dev/null +++ b/resources/cadvanced_mdt/README.md @@ -0,0 +1,6 @@ +# CADvanced MDT + +This repository is the FiveM resource that provides integration between CADvanced (https://cadvanced.app) and FiveM in the form of an in-game MDT + +The resource is offered as an optional, free plugin with CADvanced. + diff --git a/resources/cadvanced_mdt/client/callbacks.lua b/resources/cadvanced_mdt/client/callbacks.lua new file mode 100644 index 000000000..9fa0ee8d8 --- /dev/null +++ b/resources/cadvanced_mdt/client/callbacks.lua @@ -0,0 +1,403 @@ +-- Callback for hiding the MDT +RegisterNUICallback( + "hideMdt", + function(_, cb) + print_debug("RECEIVED hideMdt FROM NUI") + SetNuiFocus(false, false) + if cb then + cb() + end + end +) + +-- Callback for hiding the call +RegisterNUICallback( + "hideCall", + function(_, cb) + print_debug("RECEIVED hideCall FROM NUI") + SetNuiFocus(false, false) + if cb then + cb() + end + end +) + +-- Callback for starting a panic +RegisterNUICallback( + "startPanic", + function(_, cb) + -- Tell the server to start the panic + print_debug("RECEIVED REQUEST FROM NUI TO START PANIC") + TriggerServerEvent("start_panic") + if cb then + cb() + end + end +) + +-- Callback for sending initialisation data +RegisterNUICallback( + "init", + function(_, cb) + -- Tell the server to send the init data + print_debug("RECEIVED REQUEST FROM NUI TO SEND INIT DATA") + print_debug("REQUESTING INIT DATA FROM SERVER") + TriggerServerEvent("send_init") + if cb then + cb() + end + end +) + +-- Callback to handle citizen searches +RegisterNUICallback( + "searchCitizen", + function(data, cb) + -- Tell the server to send the init data + print_debug("RECEIVED REQUEST FROM NUI TO SEND CITIZEN SEARCH PARAMETERS") + print_debug("SENDING CITIZEN SEARCH OBJECT TO SERVER") + TriggerServerEvent("search_citizens", data) + if cb then + cb() + end + end +) + +-- Callback to handle vehicle searches +RegisterNUICallback( + "searchVehicle", + function(data, cb) + -- Tell the server to send the init data + print_debug("RECEIVED REQUEST FROM NUI TO SEND VEHICLE SEARCH PARAMETERS") + print_debug("SENDING VEHICLE SEARCH OBJECT TO SERVER") + TriggerServerEvent("search_vehicles", data) + if cb then + cb() + end + end +) + +-- Callback to handle citizen calls +RegisterNUICallback( + "citizenCall", + function(data, cb) + print_debug("RECEIVED REQUEST FROM NUI TO SEND CITIZEN CALL") + print_debug("SENDING CITIZEN CALL OBJECT TO SERVER") + TriggerServerEvent("citizen_call", data) + if cb then + cb('Sent') + end + end +) + +-- Callback to handle citizen offences retrieval +RegisterNUICallback( + "getCitizenOffences", + function(data, cb) + -- Tell the server to send the init data + print_debug("RECEIVED REQUEST FROM NUI TO GET CITIZEN OFFENCES") + print_debug("SENDING GET CITIZEN OFFENCES REQUEST TO SERVER") + TriggerServerEvent("get_citizen_offences", data) + if cb then + cb() + end + end +) + +-- Callback to handle removal of user from unit +RegisterNUICallback( + "removeUserFromUnit", + function(data, cb) + -- Tell the server to remove the user from the unit + print_debug("RECEIVED REQUEST FROM NUI TO REMOVE USER " .. data.userId .. " FROM UNIT " .. data.unitId) + print_debug("SENDING REMOVE USER FROM UNIT REQUEST TO SERVER") + TriggerServerEvent("remove_user_from_unit", data) + if cb then + cb() + end + end +) + +-- Callback to handle addition of user to unit +RegisterNUICallback( + "addUserToUnit", + function(data, cb) + -- Tell the server to add the user to the unit + print_debug("RECEIVED REQUEST FROM NUI TO ADD USER " .. data.userId .. " TO UNIT " .. data.unitId) + print_debug("SENDING ADD USER TO UNIT REQUEST TO SERVER") + TriggerServerEvent("add_user_to_unit", data) + if cb then + cb() + end + end +) + +-- Callback to handle addition of user to unit +RegisterNUICallback( + "setUnitState", + function(data, cb) + -- Tell the server to set the state of the unit + print_debug("RECEIVED REQUEST FROM NUI TO SET STATE OF UNIT " .. data.unitId .. " TO STATE " .. data.stateId) + print_debug("SENDING SET UNIT STATE REQUEST TO SERVER") + TriggerServerEvent("set_unit_state", data) + if cb then + cb() + end + end +) + +-- Callback to handle addition of a marker +RegisterNUICallback( + "addMarker", + function(data, cb) + -- Tell the server to add the marker + print_debug("RECEIVED REQUEST FROM NUI TO ADD MARKER " .. data.markerId .. " TO " .. data.type .. " " .. data.typeId) + print_debug("SENDING MARKER ADDITION REQUEST TO SERVER") + TriggerServerEvent("add_marker", data) + if cb then + cb() + end + end +) + +-- Callback to handle removal of a marker +RegisterNUICallback( + "removeMarker", + function(data, cb) + -- Tell the server to add the marker + print_debug("RECEIVED REQUEST FROM NUI TO REMOVE MARKER " .. data.markerId .. " FROM " .. data.type .. " " .. data.typeId) + print_debug("SENDING MARKER REMOVAL REQUEST TO SERVER") + TriggerServerEvent("remove_marker", data) + if cb then + cb() + end + end +) + +-- Callback to handle setting of call marker +RegisterNUICallback( + "setCallMarker", + function(data, cb) + -- Add the marker + print_debug("RECEIVED REQUEST FROM NUI TO SET MARKER FOR CALL " .. data.call.id) + set_call_marker(data.call) + if cb then + cb() + end + end +) + +-- Callback to handle setting of call route +RegisterNUICallback( + "setCallRoute", + function(data, cb) + -- Add the route + print_debug("RECEIVED REQUEST FROM NUI TO SET ROUTE") + set_call_route() + if cb then + cb() + end + end +) + +-- Callback to handle removal of call marker +RegisterNUICallback( + "clearCallMarker", + function(data, cb) + -- Remove the marker + print_debug("RECEIVED REQUEST FROM NUI TO REMOVE MARKER") + clear_call_marker() + if cb then + cb() + end + end +) + +-- Callback to handle removal of all call routes +RegisterNUICallback( + "clearCallRoute", + function(cb) + -- Remove the routes + print_debug("RECEIVED REQUEST FROM NUI TO REMOVE ROUTE") + clear_call_route() + if cb then + cb() + end + end +) + +-- Callback to handle saving of an offence's metadata +RegisterNUICallback( + "sendOffenceMeta", + function(data, cb) + -- Tell the server to send the metadata + print_debug("RECEIVED REQUEST FROM NUI TO SAVE OFFENCE METADATA") + print_debug("SENDING METADATA SAVE REQUEST TO SERVER") + TriggerServerEvent("send_offence_metadata", data) + if cb then + cb() + end + end +) + +-- Callback to handle saving of a call +RegisterNUICallback( + "sendCall", + function(data, cb) + -- Tell the server to send the call + print_debug("RECEIVED REQUEST FROM NUI TO SAVE CALL") + print_debug("SENDING CALL SAVE REQUEST TO SERVER") + TriggerServerEvent("send_call", data) + if cb then + cb() + end + end +) + +-- Callback to handle deleting of a call +RegisterNUICallback( + "deleteCall", + function(data, cb) + -- Tell the server to delete the call + print_debug("RECEIVED REQUEST FROM NUI TO DELETE CALL") + print_debug("SENDING CALL DELETE REQUEST TO SERVER") + TriggerServerEvent("delete_call", data) + if cb then + cb() + end + end +) + +-- Callback to handle saving of a unit +RegisterNUICallback( + "sendUnit", + function(data, cb) + -- Tell the server to send the call + print_debug("RECEIVED REQUEST FROM NUI TO SAVE UNIT") + print_debug("SENDING UNIT SAVE REQUEST TO SERVER") + TriggerServerEvent("send_unit", data) + if cb then + cb() + end + end +) + +-- Callback to handle deleting of a call +RegisterNUICallback( + "deleteUnit", + function(data, cb) + -- Tell the server to delete the call + print_debug("RECEIVED REQUEST FROM NUI TO DELETE UNIT") + print_debug("SENDING UNIT DELETE REQUEST TO SERVER") + TriggerServerEvent("delete_unit", data) + if cb then + cb() + end + end +) + +-- Callback to handle saving of a ticket +RegisterNUICallback( + "saveTicket", + function(data, cb) + -- Tell the server to do it + print_debug("RECEIVED REQUEST FROM NUI TO SAVE TICKET") + print_debug("SENDING TICKET SAVE REQUEST TO SERVER") + TriggerServerEvent("save_ticket", data) + if cb then + cb() + end + end +) + +-- Callback to handle saving of an arrest +RegisterNUICallback( + "saveArrest", + function(data, cb) + -- Tell the server to do it + print_debug("RECEIVED REQUEST FROM NUI TO SAVE ARREST") + print_debug("SENDING ARREST SAVE REQUEST TO SERVER") + TriggerServerEvent("save_arrest", data) + if cb then + cb() + end + end +) + +RegisterNUICallback( + "deleteOffence", + function(data, cb) + -- Tell the server to delete the offence + print_debug("RECEIVED REQUEST FROM NUI TO DELETE OFFENCE") + print_debug("SENDING DELETE OFFENCE REQUEST TO SERVER") + TriggerServerEvent("delete_offence", data) + if cb then + cb() + end + end +) + +-- Callback for stopping terminal dragging +RegisterNUICallback( + "terminalDraggingStop", + function(_, cb) + -- Tell the server to start the panic + print_debug("RECEIVED REQUEST FROM NUI TO STOP TERMINAL DRAGGING") + print_debug("SENDING STOP TERMINAL DRAGGING REQUEST TO SERVER") + TriggerServerEvent("terminal_drag_toggle") + if cb then + cb() + end + end +) + +-- Callback for toggling a unit assignment +RegisterNUICallback( + "toggleAssignment", + function(data, cb) + -- Tell the server to toggle the assignment + print_debug("RECEIVED REQUEST FROM NUI TO TOGGLE UNIT ASSIGNMENT") + print_debug("SENDING TOGGLE UNIT ASSIGNMENT REQUEST TO SERVER") + TriggerServerEvent("toggle_assignment", data) + if cb then + cb() + end + end +) + +local active_blip + +function set_call_marker(call) + -- For now, we're only allowing a single call marker + -- Clear any prexisting markers or routes + clear_call_marker() + clear_call_route() + local blip = AddBlipForCoord(call.markerX, call.markerY) + SetBlipSprite(blip, 398) + SetBlipColour(blip, 0) + SetBlipDisplay(blip, 2) + SetBlipAsShortRange(blip, false) + BeginTextCommandSetBlipName("String") + AddTextComponentString(call.callType.name .. ' - ' .. call.callGrade.name) + EndTextCommandSetBlipName(blip) + active_blip = blip +end + +function clear_call_marker() + if (active_blip ~= nil) then + RemoveBlip(active_blip) + end +end + +function set_call_route() + if (active_blip ~= nil) then + clear_call_route() + SetBlipRoute(active_blip, true) + end +end + +function clear_call_route() + if (active_blip ~= nil) then + SetBlipRoute(active_blip, false) + end +end diff --git a/resources/cadvanced_mdt/client/commands.lua b/resources/cadvanced_mdt/client/commands.lua new file mode 100644 index 000000000..6e2ceec44 --- /dev/null +++ b/resources/cadvanced_mdt/client/commands.lua @@ -0,0 +1,8 @@ +-- Command handling +RegisterCommand( + "mdt", + function(source) + TriggerServerEvent("open_mdt") + end, + false -- Allow anyone to issue this command +) \ No newline at end of file diff --git a/resources/cadvanced_mdt/client/comms.lua b/resources/cadvanced_mdt/client/comms.lua new file mode 100644 index 000000000..19371346f --- /dev/null +++ b/resources/cadvanced_mdt/client/comms.lua @@ -0,0 +1,394 @@ +-- Blindly receive data and pass it to NUI +function pass_to_nui(data, object) + print_debug("SENDING " .. object .. " TO NUI") + SendNUIMessage( + { + object = object, + data = data + } + ) +end + +RegisterNetEvent("data:open_mdt") +AddEventHandler( + "data:open_mdt", + function(jsonData) + print_debug("RECEIVED REQUEST FROM SERVER TO OPEN MDT") + SendNUIMessage({action = "showMdt"}) + SetNuiFocus(true, true) + end +) + +RegisterNetEvent("data:open_terminal") +AddEventHandler( + "data:open_terminal", + function(jsonData) + state_set("terminal_dragging", "no") + print_debug("RECEIVED REQUEST FROM SERVER TO OPEN TERMINAL") + SendNUIMessage({action = "openTerminal"}) + end +) + +RegisterNetEvent("data:close_terminal") +AddEventHandler( + "data:close_terminal", + function(jsonData) + print_debug("RECEIVED REQUEST FROM SERVER TO CLOSE TERMINAL") + SendNUIMessage({action = "closeTerminal"}) + SetNuiFocus(false, false) + end +) + +RegisterNetEvent("data:terminal_drag_toggle") +AddEventHandler( + "data:terminal_drag_toggle", + function(newState) + print_debug("RECEIVED REQUEST FROM SERVER TO TOGGLE TERMINAL DRAGGING") + local current_state = state_get("terminal_dragging") + if current_state == "yes" then + SendNUIMessage({action = "terminalDraggingOff"}) + SetNuiFocus(false, false) + state_set("terminal_dragging", "no") + else + SendNUIMessage({action = "openTerminal"}) + SendNUIMessage({action = "terminalDraggingOn"}) + SetNuiFocus(true, true) + state_set("terminal_dragging", "yes") + end + end +) + +RegisterNetEvent("data:open_call") +AddEventHandler( + "data:open_call", + function(jsonData) + print_debug("RECEIVED REQUEST FROM SERVER TO OPEN CALL") + SendNUIMessage({action = "openCall"}) + SetNuiFocus(true, true) + end +) + +RegisterNetEvent("data:send_chat") +AddEventHandler( + "data:send_chat", + function(message) + print_debug("RECEIVED REQUEST FROM SERVER TO SEND A CHAT MESSAGE: " .. message) + sendChat(message) + end +) + +RegisterNetEvent("data:config") +AddEventHandler( + "data:config", + function(jsonData) + print_debug("RECEIVED CONFIG FROM SERVER") + state_set("config", jsonData) + pass_to_nui(jsonData, "config") + -- Register stuff that is dependent on the state + -- + -- Start a panic + -- Command + RegisterCommand( + state.config.panic_command, + function(source) + TriggerServerEvent("start_panic") + end, + false -- Allow anyone to issue this command + ) + -- Keybind + Citizen.CreateThread(function() + while true do + Citizen.Wait(0) + if IsControlJustReleased(0, tonumber(state.config.panic_keybind)) then + TriggerServerEvent("start_panic") + end + end + end) + -- Open the terminal + -- Command + RegisterCommand( + state.config.terminal_open_command, + function(source) + TriggerServerEvent("open_terminal") + end, + false -- Allow anyone to issue this command + ) + -- Keybind + Citizen.CreateThread(function() + while true do + Citizen.Wait(0) + if state.config.terminal_open_keybind_first ~= nil then + if IsControlPressed(1, tonumber(state.config.terminal_open_keybind_first)) and IsControlJustReleased(1, tonumber(state.config.terminal_open_keybind_second)) then + TriggerServerEvent("open_terminal") + end + else + if IsControlJustReleased(1, tonumber(state.config.terminal_open_keybind_second)) then + TriggerServerEvent("open_terminal") + end + end + end + end) + -- Close the terminal + -- Command + RegisterCommand( + state.config.terminal_close_command, + function(source) + TriggerServerEvent("close_terminal") + end, + false -- Allow anyone to issue this command + ) + -- Keybind + Citizen.CreateThread(function() + while true do + Citizen.Wait(0) + if state.config.terminal_close_keybind_first ~= nil then + if IsControlPressed(1, tonumber(state.config.terminal_close_keybind_first)) and IsControlJustReleased(1, tonumber(state.config.terminal_close_keybind_second)) then + TriggerServerEvent("close_terminal") + end + else + if IsControlJustReleased(1, tonumber(state.config.terminal_close_keybind_second)) then + TriggerServerEvent("close_terminal") + end + end + end + end) + -- Allow the terminal to be moved + -- Command + RegisterCommand( + state.config.terminal_move_command, + function(source) + TriggerServerEvent("terminal_drag_toggle") + end, + false -- Allow anyone to issue this command + ) + -- Keybind + Citizen.CreateThread(function() + while true do + Citizen.Wait(0) + if state.config.terminal_move_keybind_first ~= nil then + if IsControlPressed(1, tonumber(state.config.terminal_move_keybind_first)) and IsControlJustReleased(1, tonumber(state.config.terminal_move_keybind_second)) then + TriggerServerEvent("terminal_drag_toggle") + end + else + if IsControlJustReleased(1, tonumber(state.config.terminal_move_keybind_second)) then + TriggerServerEvent("terminal_drag_toggle") + end + end + end + end) + -- Open the call + -- Command + RegisterCommand( + state.config.call_command, + function(source) + TriggerServerEvent("open_call") + end, + false -- Allow anyone to issue this command + ) + -- Keybind + Citizen.CreateThread(function() + while true do + Citizen.Wait(0) + if state.config.call_keybind_first ~= nil then + if IsControlPressed(1, tonumber(state.config.call_keybind_first)) and IsControlJustReleased(1, tonumber(state.config.call_keybind_second)) then + TriggerServerEvent("open_call") + end + else + if IsControlJustReleased(1, tonumber(state.config.call_keybind_second)) then + TriggerServerEvent("open_call") + end + end + end + end) + end +) + +RegisterNetEvent("data:units") +AddEventHandler( + "data:units", + function(jsonData) + print_debug("RECEIVED UNITS FROM SERVER") + pass_to_nui(jsonData, "units") + end +) + +RegisterNetEvent("data:unit_states") +AddEventHandler( + "data:unit_states", + function(jsonData) + print_debug("RECEIVED UNIT STATES FROM SERVER") + pass_to_nui(jsonData, "unit_states") + end +) + +RegisterNetEvent("data:unit_types") +AddEventHandler( + "data:unit_types", + function(jsonData) + print_debug("RECEIVED UNIT TYPES FROM SERVER") + pass_to_nui(jsonData, "unit_types") + end +) + +RegisterNetEvent("data:citizen_markers") +AddEventHandler( + "data:citizen_markers", + function(jsonData) + print_debug("RECEIVED CITIZEN MARKERS FROM SERVER") + pass_to_nui(jsonData, "citizen_markers") + end +) + +RegisterNetEvent("data:vehicle_markers") +AddEventHandler( + "data:vehicle_markers", + function(jsonData) + print_debug("RECEIVED VEHICLE MARKERS FROM SERVER") + pass_to_nui(jsonData, "vehicle_markers") + end +) + +RegisterNetEvent("data:charges") +AddEventHandler( + "data:charges", + function(jsonData) + print_debug("RECEIVED CHARGES FROM SERVER") + pass_to_nui(jsonData, "charges") + end +) + +RegisterNetEvent("data:vehicle_models") +AddEventHandler( + "data:vehicle_models", + function(jsonData) + print_debug("RECEIVED VEHICLE MODELS FROM SERVER") + pass_to_nui(jsonData, "vehicle_models") + end +) + +RegisterNetEvent("data:calls") +AddEventHandler( + "data:calls", + function(jsonData) + print_debug("RECEIVED CALLS FROM SERVER") + pass_to_nui(jsonData, "calls") + end +) + +RegisterNetEvent("data:users") +AddEventHandler( + "data:users", + function(jsonData) + print_debug("RECEIVED USERS FROM SERVER") + state_set("users", jsonData) + pass_to_nui(jsonData, "users") + end +) + +RegisterNetEvent("data:user_units") +AddEventHandler( + "data:user_units", + function(jsonData) + print_debug("RECEIVED USER_UNITS FROM SERVER") + pass_to_nui(jsonData, "user_units") + end +) + +RegisterNetEvent("data:user_ranks") +AddEventHandler( + "data:user_ranks", + function(jsonData) + print_debug("RECEIVED USER_RANKS FROM SERVER") + pass_to_nui(jsonData, "user_ranks") + end +) + +RegisterNetEvent("data:steam_id") +AddEventHandler( + "data:steam_id", + function(jsonData) + print_debug("RECEIVED STEAM ID FROM SERVER") + pass_to_nui(jsonData, "steam_id") + end +) + +RegisterNetEvent("data:citizen_search_results") +AddEventHandler( + "data:citizen_search_results", + function(jsonData) + print_debug("RECEIVED CITIZEN SEARCH RESULTS FROM SERVER") + pass_to_nui(jsonData, "citizen_search_results") + end +) + +RegisterNetEvent("data:citizen") +AddEventHandler( + "data:citizen", + function(jsonData) + print_debug("RECEIVED CITIZEN FROM SERVER") + pass_to_nui(jsonData, "citizen") + end +) + +RegisterNetEvent("data:vehicle_search_results") +AddEventHandler( + "data:vehicle_search_results", + function(jsonData) + print_debug("RECEIVED VEHICLE SEARCH RESULTS FROM SERVER") + pass_to_nui(jsonData, "vehicle_search_results") + end +) + +RegisterNetEvent("data:citizen_offences") +AddEventHandler( + "data:citizen_offences", + function(stringTxt) + print_debug("RECEIVED CITIZEN OFFENCES FROM SERVER") + pass_to_nui(stringTxt, "citizen_offences") + end +) + +RegisterNetEvent("data:locations") +AddEventHandler( + "data:locations", + function(jsonData) + print_debug("RECEIVED LOCATIONS FROM SERVER") + pass_to_nui(jsonData, "locations") + end +) + +RegisterNetEvent("data:call_grades") +AddEventHandler( + "data:call_grades", + function(jsonData) + print_debug("RECEIVED CALL GRADES FROM SERVER") + pass_to_nui(jsonData, "call_grades") + end +) + +RegisterNetEvent("data:call_types") +AddEventHandler( + "data:call_types", + function(jsonData) + print_debug("RECEIVED CALL TYPES FROM SERVER") + pass_to_nui(jsonData, "call_types") + end +) + +RegisterNetEvent("data:call_incidents") +AddEventHandler( + "data:call_incidents", + function(jsonData) + print_debug("RECEIVED CALL INCIDENTS FROM SERVER") + pass_to_nui(jsonData, "call_incidents") + end +) + +RegisterNetEvent("data:display_panic") +AddEventHandler( + "data:display_panic", + function(jsonData) + print_debug("RECEIVED PANIC NOTIFICATION FROM SERVER") + pass_to_nui(jsonData, "display_panic") + end +) \ No newline at end of file diff --git a/resources/cadvanced_mdt/client/debug.lua b/resources/cadvanced_mdt/client/debug.lua new file mode 100644 index 000000000..a0fe3dca8 --- /dev/null +++ b/resources/cadvanced_mdt/client/debug.lua @@ -0,0 +1,6 @@ +function print_debug(content) + local conf = state_get("config") + if conf.debug then + print("CADVANCED CLIENT: " .. content) + end +end \ No newline at end of file diff --git a/resources/cadvanced_mdt/client/location.lua b/resources/cadvanced_mdt/client/location.lua new file mode 100644 index 000000000..850f6fd1a --- /dev/null +++ b/resources/cadvanced_mdt/client/location.lua @@ -0,0 +1,8 @@ +Citizen.CreateThread(function() + while true do + local pos = GetEntityCoords(GetPlayerPed(-1)) + print_debug("SENDING LOCATION TO SERVER") + TriggerServerEvent('update_location', { x = pos.x, y = pos.y }) + Citizen.Wait(5000) + end +end) diff --git a/resources/cadvanced_mdt/client/state.lua b/resources/cadvanced_mdt/client/state.lua new file mode 100644 index 000000000..428ee5119 --- /dev/null +++ b/resources/cadvanced_mdt/client/state.lua @@ -0,0 +1,35 @@ +state = {} + +function state_init(key) + if not state[key] then + state[key] = {} + end +end + +function state_get(key) + if not state[key] then + state_init(key) + end + return state[key] +end + +function state_get_value(key, id) + if not state[key] then + return + end + local value = state[key] + for _, it in ipairs(value) do + if (it.id == id) then + return it + end + end +end + +function state_set(key, val) + if not state[key] then + state_init(key) + end + print_debug("UPDATING STATE FOR " .. key) + state[key] = val + return state[key] +end \ No newline at end of file diff --git a/resources/cadvanced_mdt/client/util.lua b/resources/cadvanced_mdt/client/util.lua new file mode 100644 index 000000000..8164860a0 --- /dev/null +++ b/resources/cadvanced_mdt/client/util.lua @@ -0,0 +1,41 @@ +-- Send a chat message +function sendChat(message) + TriggerEvent("chat:addMessage", { + color = {255, 0, 0}, + multiline = true, + args = { "MDT", message } + }) +end + +-- Dump a table's contents to the console +function dump_table(tbl) + print_debug(tprint(tbl)) +end + +-- Serialize a table +function tprint(tbl, indent) + if not indent then + indent = 0 + end + local toprint = string.rep(" ", indent) .. "{\r\n" + indent = indent + 2 + for k, v in pairs(tbl) do + toprint = toprint .. string.rep(" ", indent) + if (type(k) == "number") then + toprint = toprint .. "[" .. k .. "] = " + elseif (type(k) == "string") then + toprint = toprint .. k .. "= " + end + if (type(v) == "number") then + toprint = toprint .. v .. ",\r\n" + elseif (type(v) == "string") then + toprint = toprint .. '"' .. v .. '",\r\n' + elseif (type(v) == "table") then + toprint = toprint .. tprint(v, indent + 2) .. ",\r\n" + else + toprint = toprint .. '"' .. tostring(v) .. '",\r\n' + end + end + toprint = toprint .. string.rep(" ", indent - 2) .. "}" + return toprint +end \ No newline at end of file diff --git a/resources/cadvanced_mdt/fxmanifest.lua b/resources/cadvanced_mdt/fxmanifest.lua new file mode 100644 index 000000000..e5c59d6ee --- /dev/null +++ b/resources/cadvanced_mdt/fxmanifest.lua @@ -0,0 +1,48 @@ +fx_version "adamant" +games {"gta5"} + +name "CADvanced MDT" +description "CADvanced MDT, a FiveM resource that provides integration between CADvanced (https://cadvanced.app) and FiveM in the form of an in-game MDT." +version "2.2.1" + +ui_page "ui/build/index.html" +ui_page_preload "yes" + +files { + "ui/build/index.html", + "ui/build/bundle.js", + "ui/build/css/reset.css", + "ui/build/css/main.css", + "ui/build/sounds/roger.ogg", + "ui/build/sounds/panic.ogg", + "ui/build/sounds/dtmf/1.ogg", + "ui/build/sounds/dtmf/2.ogg", + "ui/build/sounds/dtmf/3.ogg", + "ui/build/sounds/dtmf/4.ogg", + "ui/build/sounds/dtmf/5.ogg", + "ui/build/sounds/dtmf/6.ogg", + "ui/build/sounds/dtmf/7.ogg", + "ui/build/sounds/dtmf/8.ogg", + "ui/build/sounds/dtmf/9.ogg", + "ui/build/sounds/dtmf/0.ogg", + "ui/build/sounds/ringing_uk.ogg", + "ui/build/sounds/ringing_us.ogg", + "ui/build/sounds/busy_uk.ogg", + "ui/build/sounds/busy_us.ogg" +} + +client_scripts { + "client/*.lua" +} + +server_scripts { + "server/lib/debug.lua", + "server/lib/state.lua", + "server/lib/util.lua", + "server/lib/router.lua", + "server/main.lua", + "mdt_config.lua", + "version.lua", + "modules/api.lua", + "modules/config.lua" +} diff --git a/resources/cadvanced_mdt/mdt_config.lua.sample b/resources/cadvanced_mdt/mdt_config.lua.sample new file mode 100644 index 000000000..2c6776bbb --- /dev/null +++ b/resources/cadvanced_mdt/mdt_config.lua.sample @@ -0,0 +1,37 @@ +local cfg = {} + +-- ONLY EDIT LINES BETWEEN THE HASHES +-- ################################## + +cfg.cad_url = "https://yourcad.cadvanced.app" -- The full URL of your CAD +cfg.homepage = "WELCOME TO MY MDT!" -- Text to be displayed on the front page of the MDT +cfg.api_token = "" -- Your CAD's API token, see Admin > Preferences in the CAD +cfg.enable_whitelist = false -- Only allow players with the "Player" role to join +cfg.sound_volume = 0.5 -- The volume of MDT sounds +cfg.debug = false -- Debug mode - do not enable unless requested by support +cfg.panic_command = "panic" -- The command ( WITHOUT THE / ) to be used to create a panic call +cfg.panic_keybind = "168" -- The keybind to use to create a panic call (default F7) +cfg.panic_flash_mdt = true -- When a panic call is created, flash the MDT border +cfg.panic_play_tone = true -- When a panic call is created, play a panic tone +cfg.panic_duration = 10 -- Time in seconds the MDT should flash and the tone should play +cfg.panic_create_marker = true -- When a panic call is created, create a marker and route for all assigned units +cfg.terminal_open_command = "to" -- The command ( WITHOUT THE / ) to be used to open the terminal +cfg.terminal_open_keybind_first = "19" -- The first keybind to use to open the terminal (default Left Alt) +cfg.terminal_open_keybind_second = "161" -- The second keybind to use to open the terminal (default 7) +cfg.terminal_close_command = "tc" -- The command ( WITHOUT THE / ) to be used to close the terminal +cfg.terminal_close_keybind_first = "19" -- The keybind to use to close the terminal (default Left Alt) +cfg.terminal_close_keybind_second = "163" -- The keybind to use to close the terminal (default 9) +cfg.terminal_move_command = "mt" -- The command ( WITHOUT THE / ) to be used to activate terminal "move" mode +cfg.terminal_move_keybind_first = "19" -- The keybind to use to move the terminal (default Left Alt) +cfg.terminal_move_keybind_second = "162" -- The keybind to use to close the terminal (default 8) +cfg.call_command = "call" -- The command ( WITHOUT THE / ) to be used to place a call with the dispatcher +cfg.call_keybind_first = "19" -- The first keybind to use to open the terminal (default Left Alt) +cfg.call_keybind_second = "197" -- The second keybind to use to open the terminal (default ]) +cfg.call_number = "999" -- The number that is dialed when a citizen places a call +cfg.call_ring_filename = "ringing_uk.ogg" -- Sound file used for ringing tone +cfg.call_busy_filename = "busy_uk.ogg" -- Sound file used for busy tone +cfg.self_dispatch = false -- Enable self dispatch in the MDT +cfg.call_require_citizen = true -- Requires active citizen to create a 911 Call +-- ################################## + +return cfg diff --git a/resources/cadvanced_mdt/server/lib/debug.lua b/resources/cadvanced_mdt/server/lib/debug.lua new file mode 100644 index 000000000..74b169287 --- /dev/null +++ b/resources/cadvanced_mdt/server/lib/debug.lua @@ -0,0 +1,15 @@ +function print_debug(content) + local conf = module("server/modules/config") + if conf.val("debug") then + local temp_file = state_get("temp_file") + print("CADVANCED SERVER: [ " .. temp_file .. " ] " .. content) + local fh = assert(io.open(temp_file, 'a')) + if (fh ~= nil) then + fh:write(os.date() .. " - " .. content .. "\n") + fh:close() + else + print("CADVANCED SERVER: CANNOT WRITE TO LOG FILE " .. fn) + print(fh) + end + end +end \ No newline at end of file diff --git a/resources/cadvanced_mdt/server/lib/router.lua b/resources/cadvanced_mdt/server/lib/router.lua new file mode 100644 index 000000000..e3304cf09 --- /dev/null +++ b/resources/cadvanced_mdt/server/lib/router.lua @@ -0,0 +1,87 @@ +local users = module("server/modules/users") +local units = module("server/modules/units") +local calls = module("server/modules/calls") +local vehicles = module("server/modules/vehicles") +local citizens = module("server/modules/citizens") + +SetHttpHandler( + function(req, res) + print_debug("ROUTER RECEIVED REQUEST TO " .. req.path) + if req.method == "POST" then + if req.path == "/update" then + req.setDataHandler( + function(body) + print_debug("PUT ROUTER RECEIVED " .. body) + local data = json.decode(body) + if next(data) ~= nil then + print_debug("HANDLING UPDATED " .. data.object) + if (data.object == "user") then + -- We will receive the Steam ID of a user we + -- need to update our cache of + users.populate_player(data.payload.steamId) + elseif (data.object == "unit") then + -- Update a given unit + units.update_unit(data.payload.unitId) + elseif (data.object == "call") then + -- Update a given call + calls.update_call(data.payload.callId) + elseif (data.object == "citizen") then + -- Update a given citizen + citizens.update_citizen(data.payload.citizenId) + elseif (data.object == "calls") then + -- Update all calls + calls.repopulate_calls() + elseif (data.object == "user_units") then + -- Repopulate all user / unit assignments + units.repopulate_user_units() + elseif (data.object == "citizen_markers") then + -- Repopulate all citizen markers + citizens.repopulate_citizen_markers() + elseif (data.object == "vehicle_markers") then + -- Repopulate all vehicle markers + vehicles.repopulate_vehicle_markers() + elseif (data.object == "vehicle_models") then + -- Repopulate all vehicle models + vehicles.repopulate_vehicle_models() + elseif (data.object == "unit_states") then + -- Repopulate all unit states + units.repopulate_unit_states() + elseif (data.object == "unit_types") then + -- Repopulate all unit types + units.repopulate_unit_types() + elseif (data.object == "user_ranks") then + -- Repopulate all user ranks + users.repopulate_user_ranks() + elseif (data.object == "units") then + -- Repopulate all units + units.repopulate_units() + elseif (data.object == "whitelist") then + -- Repopulate the whitelist + users.get_whitelisted() + elseif (data.object == "panic") then + -- We've got a panic + users.display_panic(data.payload.callId) + end + end + res.send(json.encode({ + result = "OK", + cadvanced_mdt_version = GetResourceMetadata('cadvanced_mdt', 'version', 0) + })) + end + ) + end + elseif req.method == "GET" then + print_debug("GET ROUTER RESPONDING") + if req.path == "/locations" then + local user_locations = users.get_locations() + res.send(json.encode({ + userLocations = user_locations, + cadvanced_mdt_version = GetResourceMetadata('cadvanced_mdt', 'version', 0) + })) + elseif req.path == '/version' then + local version = GetResourceMetadata('cadvanced_mdt', 'version', 0) + res.send(json.encode({version = version })) + end + end + end +) diff --git a/resources/cadvanced_mdt/server/lib/state.lua b/resources/cadvanced_mdt/server/lib/state.lua new file mode 100644 index 000000000..acda881cb --- /dev/null +++ b/resources/cadvanced_mdt/server/lib/state.lua @@ -0,0 +1,37 @@ +state = {} + +function state_init(key) + if not state[key] then + state[key] = {} + end +end + +function state_get(key) + if not state[key] then + state_init(key) + end + return state[key] +end + +function state_get_value(key, id) + if not state[key] then + return + end + local value = state[key] + for _, it in ipairs(value) do + if (it.id == id) then + return it + end + end +end + +function state_set(key, val) + if not state[key] then + state_init(key) + end + state[key] = val + print_debug("UPDATED STATE FOR " .. key) + return state[key] +end + +exports('state_get', state_get) diff --git a/resources/cadvanced_mdt/server/lib/util.lua b/resources/cadvanced_mdt/server/lib/util.lua new file mode 100644 index 000000000..718820061 --- /dev/null +++ b/resources/cadvanced_mdt/server/lib/util.lua @@ -0,0 +1,107 @@ +local modules = {} + +-- load a lua resource file as module (for a specific side) +-- path: lua file path without extension +-- Shamelessly borrowed from: +-- https://github.com/ImagicTheCat/vRP/blob/master/vrp/lib/utils.lua +function module(path) + local module = modules[path] + if module then -- cached module + return module + else + local code = LoadResourceFile("cadvanced_mdt", path .. ".lua") + if code then + local f, err = load(code, "/" .. path .. ".lua") + if f then + local ok, res = xpcall(f, debug.traceback) + if ok then + modules[path] = res + return res + else + error("error loading module " .. path .. ":" .. res) + end + else + error("error parsing module " .. path .. ":" .. debug.traceback(err)) + end + else + return false + end + end +end + +-- Does a user have an active officer +function hasOfficer(userSource) + local users = state_get("users") + local has = false + for i, iter in ipairs(users) do + if ( + userSource == iter.source and + iter.character and + iter.character.__typename == "Officer" + ) then + has = true + break + end + end + return has; +end + +-- Does a user have an active citizen +function hasCitizen(userSource) + local users = state_get("users") + local has = false + for i, iter in ipairs(users) do + if ( + userSource == iter.source and + iter.character and + iter.character.__typename == "Citizen" + ) then + has = true + break + end + end + return has; +end + +-- Generic "check if value is in array" function +function hasValue(tab, val) + for index, value in ipairs(tab) do + if value == val then + return true + end + end + return false +end + +-- Dump a table's contents to the console +function dump_table(tbl) + print_debug(tprint(tbl)) +end + +-- Serialize a table +function tprint(tbl, indent) + if not indent then + indent = 0 + end + local toprint = string.rep(" ", indent) .. "{\r\n" + indent = indent + 2 + for k, v in pairs(tbl) do + toprint = toprint .. string.rep(" ", indent) + if (type(k) == "number") then + toprint = toprint .. "[" .. k .. "] = " + elseif (type(k) == "string") then + toprint = toprint .. k .. "= " + end + if (type(v) == "number") then + toprint = toprint .. v .. ",\r\n" + elseif (type(v) == "string") then + toprint = toprint .. '"' .. v .. '",\r\n' + elseif (type(v) == "table") then + toprint = toprint .. tprint(v, indent + 2) .. ",\r\n" + else + toprint = toprint .. '"' .. tostring(v) .. '",\r\n' + end + end + toprint = toprint .. string.rep(" ", indent - 2) .. "}" + return toprint +end \ No newline at end of file diff --git a/resources/cadvanced_mdt/server/main.lua b/resources/cadvanced_mdt/server/main.lua new file mode 100644 index 000000000..ad6443422 --- /dev/null +++ b/resources/cadvanced_mdt/server/main.lua @@ -0,0 +1,13 @@ +local init = module("server/modules/init") + +-- Create a name for a logging tempfile +state_set("temp_file", os.tmpname() .. ".log") + +-- Bootstrap data population +init.bootstrapData() + +-- Create handlers for server events +init.createEventHandlers() + +-- Start any long running tasks +init.startTasks() \ No newline at end of file diff --git a/resources/cadvanced_mdt/server/modules/calls.lua b/resources/cadvanced_mdt/server/modules/calls.lua new file mode 100644 index 000000000..1de9256bf --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/calls.lua @@ -0,0 +1,184 @@ +local queries = module("server/modules/queries") +local client_sender = module("server/modules/comms/client_sender") +local api = module("server/modules/comms/api") + +local calls = {} + +-- Get the table of all calls +function calls.get_all_calls(pass_to_client) + local q_all_calls = queries.get_all_calls() + api.request( + q_all_calls, + function(response) + response = json.decode(response) + if response.error == nil then + local cll = {} + for _, call in ipairs(response.data.allCalls) do + table.insert(cll, call) + end + state_set("calls", cll) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.calls, "calls") + end + else + print_debug(response.error) + end + end + ) +end + +-- Update a call +function calls.update_call(id) + local q_get_call = queries.get_call(id) + print_debug("UPDATING CALL " .. id) + api.request( + q_get_call, + function(response) + response = json.decode(response) + if response.error == nil then + print_debug("PARSING UPDATED CALL") + local received = response.data.getCall + local ex_calls = state_get("calls") + local found = false + for i, iter in ipairs(ex_calls) do + if (iter.id == received.id) then + ex_calls[i] = received + found = true + end + end + if not found then + table.insert(ex_calls, received) + end + state_set("calls", ex_calls) + -- Send client the updated calls list + print_debug("SENDING ALL CLIENTS UPDATED CALLS") + client_sender.pass_data(ex_calls, "calls") + else + print_debug(response.error) + end + end + ) +end + +-- Repopulate all calls +function calls.repopulate_calls() + calls.get_all_calls(true) +end + +-- Get the table of all call grades +function calls.get_all_call_grades(pass_to_client) + local q_get_all_call_grades = queries.get_all_call_grades() + api.request( + q_get_all_call_grades, + function(response) + response = json.decode(response) + if response.error == nil then + local call_grades = {} + for _, grade in ipairs(response.data.allCallGrades) do + table.insert(call_grades, grade) + end + state_set("call_grades", call_grades) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.call_grades, "call_grades") + end + else + print_debug(response.error) + end + end + ) +end + +-- Get the table of all call types +function calls.get_all_call_types(pass_to_client) + local q_get_all_call_types = queries.get_all_call_types() + api.request( + q_get_all_call_types, + function(response) + response = json.decode(response) + if response.error == nil then + local call_types = {} + for _, call_type in ipairs(response.data.allCallTypes) do + table.insert(call_types, call_type) + end + state_set("call_types", call_types) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.call_types, "call_types") + end + else + print_debug(response.error) + end + end + ) +end + +-- Get the table of all call incidents +function calls.get_all_call_incidents(pass_to_client) + local q_get_all_call_incidents = queries.get_all_call_incidents() + api.request( + q_get_all_call_incidents, + function(response) + response = json.decode(response) + if response.error == nil then + local call_incidents = {} + for _, call_incident in ipairs(response.data.allIncidentTypes) do + table.insert(call_incidents, call_incident) + end + state_set("call_incidents", call_incidents) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.call_incidents, "call_incidents") + end + else + print_debug(response.error) + end + end + ) +end + +-- Send a call +function calls.send_call(data) + local q_send_call + if (data.id) then + q_send_call = queries.update_call(data) + else + q_send_call = queries.create_call(data) + end + api.request( + q_send_call, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +-- Delete a call +function calls.delete_call(data) + local q_delete_call = queries.delete_call(data) + api.request( + q_delete_call, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +-- Toggle a unit assignment +function calls.toggle_assignment(data) + local q_toggle_assignment = queries.toggle_assignment(data) + api.request( + q_toggle_assignment, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +return calls diff --git a/resources/cadvanced_mdt/server/modules/citizens.lua b/resources/cadvanced_mdt/server/modules/citizens.lua new file mode 100644 index 000000000..979501bbf --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/citizens.lua @@ -0,0 +1,143 @@ +local user_helpers = module("server/modules/helpers/users") +local queries = module("server/modules/queries") +local client_sender = module("server/modules/comms/client_sender") +local api = module("server/modules/comms/api") + +local citizens = {} + +function citizens.send_call(call, callback, src) + call.steamId = user_helpers.get_steam_id(source) + local q_send_call = queries.send_citizen_call(call) + api.request( + q_send_call, + function(response) + end + ) +end + +function citizens.search_citizens(search, callback, src) + local q_search_citizens = queries.search_citizens(search) + api.request( + q_search_citizens, + function(response) + response = json.decode(response) + if response.error == nil then + local received = response.data.searchCitizens + -- Send client the search results + print_debug("SENDING ALL CLIENTS CITIZEN SEARCH RESULTS") + callback(received, "citizen_search_results", src) + else + print_debug(response.error) + end + end + ) +end + +function citizens.get_citizen_offences(data, callback) + local q_get_citizen_offences = queries.get_citizen_offences(data) + api.request( + q_get_citizen_offences, + function(response) + local decoded = json.decode(response) + if decoded.error == nil then + local received = response + -- Send client the offences + print_debug("SENDING ALL CLIENTS CITIZEN OFFENCES") + callback(received, "citizen_offences") + else + print_debug(decoded.error) + end + end + ) +end + +-- Get the table of citizen markers +function citizens.get_all_markers(pass_to_client) + local q_get_all_citizen_markers = queries.get_all_citizen_markers() + api.request( + q_get_all_citizen_markers, + function(response) + response = json.decode(response) + if response.error == nil then + local citizen_markers = {} + for _, marker in ipairs(response.data.allCitizenMarkers) do + table.insert(citizen_markers, marker) + end + state_set("citizen_markers", citizen_markers) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.citizen_markers, "citizen_markers") + end + else + print_debug(response.error) + end + end + ) +end + +-- Update a citizen +function citizens.update_citizen(id) + local q_get_citizen = queries.get_citizen(id) + print_debug("UPDATING CITIZEN " .. id) + api.request( + q_get_citizen, + function(response) + response = json.decode(response) + if response.error == nil then + print_debug("PARSING UPDATED CITIZEN") + local received = response.data.getCitizen + local ex_citizens = state_get("citizens") + local found = false + for i, iter in ipairs(ex_citizens) do + if (iter.id == received.id) then + ex_citizens[i] = received + found = true + end + end + if not found then + table.insert(ex_citizens, received) + end + state_set("citizens", ex_citizens) + -- Send client the updated citizen + print_debug("SENDING ALL CLIENTS UPDATED CITIZEN") + client_sender.pass_data(received, "citizen") + else + print_debug(response.error) + end + end + ) +end + +-- Repopulate all vehicle_markers +function citizens.repopulate_citizen_markers() + citizens.get_all_markers(true) +end + +-- Add a marker to a citizen +function citizens.add_marker(data) + local q_attach_marker_to_citizen = queries.attach_marker_to_citizen(data) + api.request( + q_attach_marker_to_citizen, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +-- Remove a marker from a citizen +function citizens.remove_marker(data) + local q_detach_marker_from_citizen = queries.detach_marker_from_citizen(data) + api.request( + q_detach_marker_from_citizen, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +return citizens \ No newline at end of file diff --git a/resources/cadvanced_mdt/server/modules/comms/api.lua b/resources/cadvanced_mdt/server/modules/comms/api.lua new file mode 100644 index 000000000..de6f133c8 --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/comms/api.lua @@ -0,0 +1,29 @@ +local api = {} + +function api.request(query, callback) + local conf = module("server/modules/config") + local token = conf.val("api_token") + local url = conf.val("cad_url") .. "/api" + print_debug("MAKING API CALL TO " .. url) + print_debug("CALL BODY: " .. query) + PerformHttpRequest( + url, + function(errorCode, resultData) + if errorCode ~= 200 then + print_debug("CADvanced: ERROR - Unable to perform query " .. query .. ", error " .. errorCode) + callback({error = errorCode}) + end + print_debug("CALL RESPONSE: " .. resultData) + callback(resultData) + end, + "POST", + query, + { + ["Content-Type"] = "application/json", + ["cadvanced-token"] = token, + ["cadvanced-mdt-version"] = GetResourceMetadata('cadvanced_mdt', 'version', 0) + } + ) +end + +return api diff --git a/resources/cadvanced_mdt/server/modules/comms/client_receiver.lua b/resources/cadvanced_mdt/server/modules/comms/client_receiver.lua new file mode 100644 index 000000000..0e70942b9 --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/comms/client_receiver.lua @@ -0,0 +1,360 @@ +local conf = module("server/modules/config") +local user_helpers = module("server/modules/helpers/users") +local citizens = module("server/modules/citizens") +local users = module("server/modules/users") +local units = module("server/modules/units") +local vehicles = module("server/modules/vehicles") +local legal = module("server/modules/legal") +local calls = module("server/modules/calls") +local client_sender = module("server/modules/comms/client_sender") + +local client_receiver = {} + +function client_receiver.client_event_handlers() + -- Incoming events from client + + -- Send initialisation data + RegisterNetEvent("send_init") + AddEventHandler( + "send_init", + function() + print_debug("RECEIVED REQUEST FROM CLIENT FOR INIT DATA") + -- We call populate_player here rather than just passing the current + -- state of all users because we probably don't know anything about + -- this player, so we want to get their data first, which will have + -- the side effect of distributing it to all clients, including us + users.populate_player() + client_sender.pass_data({ + homepage = conf.val("homepage"), + sound_volume = conf.val("sound_volume"), + debug = conf.val("debug"), + panic_command = conf.val("panic_command"), + panic_keybind = conf.val("panic_keybind"), + panic_flash_mdt = conf.val("panic_flash_mdt"), + panic_play_tone = conf.val("panic_play_tone"), + panic_create_marker = conf.val("panic_create_marker"), + panic_duration = conf.val("panic_duration"), + terminal_open_command = conf.val("terminal_open_command"), + terminal_open_keybind_first = conf.val("terminal_open_keybind_first"), + terminal_open_keybind_second = conf.val("terminal_open_keybind_second"), + terminal_close_command = conf.val("terminal_close_command"), + terminal_close_keybind_first = conf.val("terminal_close_keybind_first"), + terminal_close_keybind_second = conf.val("terminal_close_keybind_second"), + terminal_move_command = conf.val("terminal_move_command"), + terminal_move_keybind_first = conf.val("terminal_move_keybind_first"), + terminal_move_keybind_second = conf.val("terminal_move_keybind_second"), + call_command = conf.val("call_command"), + call_keybind_first = conf.val("call_keybind_first"), + call_keybind_second = conf.val("call_keybind_second"), + call_number = conf.val("call_number"), + call_ring_filename = conf.val("call_ring_filename"), + call_busy_filename = conf.val("call_busy_filename"), + self_dispatch = conf.val("self_dispatch") + }, "config", source) + client_sender.pass_data(state_get("calls"), "calls", source) + client_sender.pass_data(state_get("units"), "units", source) + client_sender.pass_data(state_get("unit_states"), "unit_states", source) + client_sender.pass_data(state_get("unit_types"), "unit_types", source) + client_sender.pass_data(state_get("user_units"), "user_units", source) + client_sender.pass_data(state_get("user_ranks"), "user_ranks", source) + client_sender.pass_data(state_get("citizen_markers"), "citizen_markers", source) + client_sender.pass_data(state_get("vehicle_markers"), "vehicle_markers", source) + client_sender.pass_data(state_get("vehicle_models"), "vehicle_models", source) + client_sender.pass_data(state_get("charges"), "charges", source) + client_sender.pass_data(state_get("locations"), "locations", source) + client_sender.pass_data(state_get("call_grades"), "call_grades", source) + client_sender.pass_data(state_get("call_types"), "call_types", source) + client_sender.pass_data(state_get("call_incidents"), "call_incidents", source) + client_sender.pass_data(user_helpers.get_steam_id(source), "steam_id", source) + end + ) + + -- Open the MDT + RegisterNetEvent("open_mdt") + AddEventHandler( + "open_mdt", + function() + print_debug("RECEIVED REQUEST FROM CLIENT TO OPEN MDT FOR USER " .. source) + if (hasOfficer(source)) then + client_sender.pass_data(nil, "open_mdt", source) + else + client_sender.pass_data("Only an officer can do this", "send_chat", source) + end + end + ) + + -- Open the terminal + RegisterNetEvent("open_terminal") + AddEventHandler( + "open_terminal", + function() + print_debug("RECEIVED REQUEST FROM CLIENT TO OPEN TERMINAL FOR USER " .. source) + if (hasOfficer(source)) then + client_sender.pass_data(nil, "open_terminal", source) + else + client_sender.pass_data("Only an officer can do this", "send_chat", source) + end + end + ) + + -- Close the terminal + RegisterNetEvent("close_terminal") + AddEventHandler( + "close_terminal", + function() + print_debug("RECEIVED REQUEST FROM CLIENT TO CLOSE TERMINAL FOR USER " .. source) + if (hasOfficer(source)) then + client_sender.pass_data(nil, "close_terminal", source) + else + client_sender.pass_data("Only an officer can do this", "send_chat", source) + end + end + ) + + -- Toggle the terminal draggable state + RegisterNetEvent("terminal_drag_toggle") + AddEventHandler( + "terminal_drag_toggle", + function() + print_debug("RECEIVED REQUEST FROM CLIENT TO TOGGLE THE TERMINAL DRAG STATE FOR USER " .. source) + if (hasOfficer(source)) then + client_sender.pass_data(nil, "terminal_drag_toggle", source) + else + client_sender.pass_data("Only an officer can do this", "send_chat", source) + end + end + ) + + -- Open the call + RegisterNetEvent("open_call") + AddEventHandler( + "open_call", + function() + print_debug("RECEIVED REQUEST FROM CLIENT TO OPEN CALL FOR USER " .. source) + if (not conf.val('call_require_citizen') or hasCitizen(source)) then + client_sender.pass_data(nil, "open_call", source) + else + client_sender.pass_data("Only a citizen can do this", "send_chat", source) + end + end + ) + + -- Start panic + RegisterNetEvent("start_panic") + AddEventHandler( + "start_panic", + function() + print_debug("RECEIVED REQUEST FROM CLIENT TO START PANIC FOR USER " .. source) + if (hasOfficer(source)) then + users.start_panic() + else + client_sender.pass_data("Only an officer can do this", "send_chat", source) + end + end + ) + + -- Update player location + RegisterNetEvent("update_location") + AddEventHandler( + "update_location", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO UPDATE LOCATION FOR USER " .. source) + users.update_location(source, data) + end + ) + + -- Perform citizen search + RegisterNetEvent("search_citizens") + AddEventHandler( + "search_citizens", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SEND CITIZEN SEARCH") + citizens.search_citizens(data, client_sender.pass_data, source) + end + ) + + -- Perform citizen call creation + RegisterNetEvent("citizen_call") + AddEventHandler( + "citizen_call", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SEND CITIZEN CALL") + if (not conf.val('call_require_citizen') or hasCitizen(source)) then + citizens.send_call(data, client_sender.pass_data, source) + else + client_sender.pass_data("Only a citizen can do this", "send_chat", source) + end + end + ) + + -- Perform vehicle search + RegisterNetEvent("search_vehicles") + AddEventHandler( + "search_vehicles", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SEND VEHICLE SEARCH") + vehicles.search_vehicles(data, client_sender.pass_data, source) + end + ) + + -- Get citizen offences + RegisterNetEvent("get_citizen_offences") + AddEventHandler( + "get_citizen_offences", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO GET CITIZEN OFFENCES") + citizens.get_citizen_offences(data, client_sender.pass_data) + end + ) + + -- Remove user from unit + RegisterNetEvent("remove_user_from_unit") + AddEventHandler( + "remove_user_from_unit", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO REMOVE USER FROM UNIT") + users.remove_from_unit(data) + end + ) + + -- Add user to unit + RegisterNetEvent("add_user_to_unit") + AddEventHandler( + "add_user_to_unit", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO ADD USER TO UNIT") + users.add_to_unit(data) + end + ) + + -- Set a unit state + RegisterNetEvent("set_unit_state") + AddEventHandler( + "set_unit_state", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SET UNIT STATE") + units.set_unit_state(data) + end + ) + + -- Add a marker to something + RegisterNetEvent("add_marker") + AddEventHandler( + "add_marker", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SET ADD MARKER TO " .. data.type) + if (data.type == 'Citizen') then + citizens.add_marker(data) + elseif (data.type == 'Vehicle') then + vehicles.add_marker(data) + end + end + ) + + -- Remove marker from something + RegisterNetEvent("remove_marker") + AddEventHandler( + "remove_marker", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SET REMOVE MARKER FROM " .. data.type) + if (data.type == 'Citizen') then + citizens.remove_marker(data) + elseif (data.type == 'Vehicle') then + vehicles.remove_marker(data) + end + end + ) + + -- Send an offence's metadata + RegisterNetEvent("send_offence_metadata") + AddEventHandler( + "send_offence_metadata", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SEND OFFENCE METADATA") + legal.send_offence_metadata(data) + end + ) + + -- Send a call + RegisterNetEvent("send_call") + AddEventHandler( + "send_call", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SEND CALL") + calls.send_call(data) + end + ) + + -- Delete a call + RegisterNetEvent("delete_call") + AddEventHandler( + "delete_call", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO DELETE CALL") + calls.delete_call(data) + end + ) + + -- Send a unit + RegisterNetEvent("send_unit") + AddEventHandler( + "send_unit", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SEND UNIT") + units.send_unit(data) + end + ) + + -- Delete a unit + RegisterNetEvent("delete_unit") + AddEventHandler( + "delete_unit", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO DELETE UNIT") + units.delete_unit(data) + end + ) + + -- Save a ticket + RegisterNetEvent("save_ticket") + AddEventHandler( + "save_ticket", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SAVE A TICKET") + legal.save_ticket(data) + end + ) + + -- Save an arrest + RegisterNetEvent("save_arrest") + AddEventHandler( + "save_arrest", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO SAVE AN ARREST") + legal.save_arrest(data) + end + ) + + -- Delete an offence + RegisterNetEvent("delete_offence") + AddEventHandler( + "delete_offence", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO DELETE OFFENCE") + legal.delete_offence(data) + end + ) + -- Delete a call + RegisterNetEvent("toggle_assignment") + AddEventHandler( + "toggle_assignment", + function(data) + print_debug("RECEIVED REQUEST FROM CLIENT TO TOGGLE UNIT ASSIGNMENT") + calls.toggle_assignment(data) + end + ) + + +end + +return client_receiver diff --git a/resources/cadvanced_mdt/server/modules/comms/client_sender.lua b/resources/cadvanced_mdt/server/modules/comms/client_sender.lua new file mode 100644 index 000000000..9b5ab9cca --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/comms/client_sender.lua @@ -0,0 +1,13 @@ +local client_sender = {} + +-- Generic "pass some data to all clients" +function client_sender.pass_data(data, type, source) + if (source) then + print_debug("SENDING " .. type .. " TO CLIENT " .. source) + else + print_debug("SENDING " .. type .. " TO ALL CLIENTS") + end + TriggerClientEvent("data:" .. type, source or -1, data) +end + +return client_sender diff --git a/resources/cadvanced_mdt/server/modules/config.lua b/resources/cadvanced_mdt/server/modules/config.lua new file mode 100644 index 000000000..b77598766 --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/config.lua @@ -0,0 +1,118 @@ +local conf = module("mdt_config") + +local config = {} + +-- Return a config value +function config.val(key) + return conf[key] +end + +-- Check the loaded config for sanity +function config.sanity_check() + if conf then + if conf.cad_url == nil or conf.cad_url == "https://yourcad.cadvanced.app" then + print("****** CADVANCED: Invalid or missing cad_url value in config ******") + return false + end + if conf.api_token == nil or conf.api_token == "" then + print("****** CADVANCED: Invalid or missing api_token value in config ******") + return false + end + if conf.homepage == nil then + print("****** CADVANCED: Missing 'homepage' entry in config ******") + return false + end + if conf.enable_whitelist == nil then + print("****** CADVANCED: Missing enable_whitelist value in config ******") + return false + end + if conf.sound_volume == nil then + print("****** CADVANCED: Missing sound_volume value in config ******") + return false + end + if conf.debug == nil then + print("****** CADVANCED: Missing debug value in config ******") + return false + end + if conf.panic_command == nil or conf.panic_command == "" then + print("****** CADVANCED: Missing panic_command value in config ******") + return false + end + if conf.panic_keybind == nil or conf.panic_keybind == "" then + print("****** CADVANCED: Missing panic_keybind value in config ******") + return false + end + if conf.panic_flash_mdt == nil or conf.panic_flash_mdt == "" then + print("****** CADVANCED: Missing panic_flash_mdt value in config ******") + return false + end + if conf.panic_play_tone == nil or conf.panic_play_tone == "" then + print("****** CADVANCED: Missing panic_play_tone value in config ******") + return false + end + if conf.panic_duration == nil or conf.panic_duration == "" then + print("****** CADVANCED: Missing panic_duration value in config ******") + return false + end + if conf.panic_create_marker == nil or conf.panic_create_marker == "" then + print("****** CADVANCED: Missing panic_create_marker value in config ******") + return false + end + if conf.terminal_open_command == nil or conf.terminal_open_command == "" then + print("****** CADVANCED: Missing terminal_open_command value in config ******") + return false + end + if conf.terminal_close_command == nil or conf.terminal_close_command == "" then + print("****** CADVANCED: Missing terminal_close_command value in config ******") + return false + end + if conf.terminal_open_keybind_second == nil or conf.terminal_open_keybind_second == "" then + print("****** CADVANCED: Missing terminal_open_keybind_second value in config ******") + return false + end + if conf.terminal_close_keybind_second == nil or conf.terminal_close_keybind_second == "" then + print("****** CADVANCED: Missing terminal_close_keybind_second value in config ******") + return false + end + if conf.terminal_move_command == nil or conf.terminal_move_command == "" then + print("****** CADVANCED: Missing terminal_move_command value in config ******") + return false + end + if conf.terminal_move_keybind_second == nil or conf.terminal_move_keybind_second == "" then + print("****** CADVANCED: Missing terminal_move_keybind_second value in config ******") + return false + end + if conf.call_command == nil or conf.call_command == "" then + print("****** CADVANCED: Missing call_command value in config ******") + return false + end + if conf.call_keybind_second == nil or conf.call_keybind_second == "" then + print("****** CADVANCED: Missing call_keybind_second value in config ******") + return false + end + if conf.call_number == nil or conf.call_number == "" then + print("****** CADVANCED: Missing call_number value in config ******") + return false + end + if conf.call_ring_filename == nil or conf.call_ring_filename == "" then + print("****** CADVANCED: Missing call_ring_filename value in config ******") + return false + end + if conf.call_busy_filename == nil or conf.call_busy_filename == "" then + print("****** CADVANCED: Missing call_busy_filename value in config ******") + return false + end + if conf.self_dispatch == nil then + print("****** CADVANCED: Missing self_dispatch value in config ******") + return false + end + return true + else + print( + "****** CADVANCED: UNABLE TO LOAD CONFIG. File mdt_config.lua was not found. Please create a config file (using config.lua.sample as an example). Then try again ******" + ) + return false + end +end + +return config diff --git a/resources/cadvanced_mdt/server/modules/helpers/users.lua b/resources/cadvanced_mdt/server/modules/helpers/users.lua new file mode 100644 index 000000000..a563107a8 --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/helpers/users.lua @@ -0,0 +1,16 @@ +local user_helpers = {} + +-- Get the player's Steam ID +function user_helpers.get_steam_id(source) + local id = nil + for k, v in ipairs(GetPlayerIdentifiers(source)) do + if string.sub(v, 1, string.len("steam:")) == "steam:" then + local trimmed = v:gsub("steam:", "") + id = trimmed + break + end + end + return id +end + +return user_helpers diff --git a/resources/cadvanced_mdt/server/modules/init.lua b/resources/cadvanced_mdt/server/modules/init.lua new file mode 100644 index 000000000..0df14fc02 --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/init.lua @@ -0,0 +1,100 @@ +local conf = module("server/modules/config") +local users = module("server/modules/users") +local calls = module("server/modules/calls") +local units = module("server/modules/units") +local citizens = module("server/modules/citizens") +local vehicles = module("server/modules/vehicles") +local legal = module("server/modules/legal") +local locations = module("server/modules/locations") +local calls = module("server/modules/calls") +local client_receiver = module("server/modules/comms/client_receiver") + +local init = {} + +-- Bootstrap our local data model +function init.bootstrapData() + -- Check we have a valid config + local sane = conf.sanity_check() + if not sane then + return + end + + -- Get the whitelisted players, if appropriate + users.get_whitelisted() + + -- Get all calls + calls.get_all_calls() + + -- Get all units + units.get_all_units() + + -- Get all unit states + units.get_all_unit_states() + + -- Get all unit types + units.get_all_unit_types() + + -- Get all user / unit assignments + units.get_all_user_units() + + -- Get all user ranks + users.get_all_user_ranks() + + -- Get all citizen markers + citizens.get_all_markers() + + -- Get all vehicle markers + vehicles.get_all_markers() + + -- Get all vehicle models + vehicles.get_all_models() + + -- Get all charges + legal.get_all_charges() + + -- Get all call grades + calls.get_all_call_grades() + + -- Get all call grades + calls.get_all_call_types() + + -- Get all call incidents + calls.get_all_call_incidents() + + -- Get all locations + locations.get_all_locations() +end + +function init.createEventHandlers() + -- Add the playerConnecting handler + users.handler_playerConnecting() + + -- Add the playerDropped handler + users.handler_playerDropped() + + -- Add handling for client initiated events + client_receiver.client_event_handlers() +end + +function init.startTasks() + -- Purge any user locations that haven't been updated + -- in the last 10 seconds + Citizen.CreateThread(function() + while true do + local locs = state_get("user_locations") + local expired = os.time() - 10 + local filtered = {} + for i, it in ipairs(locs) do + if it.updated >= expired then + table.insert(filtered, it) + else + print_debug("PURGING LOCATION FOR INACTIVE PLAYER " .. it.steamId) + end + end + state_set("user_locations", filtered) + Citizen.Wait(7000) + end + end) +end + +return init diff --git a/resources/cadvanced_mdt/server/modules/legal.lua b/resources/cadvanced_mdt/server/modules/legal.lua new file mode 100644 index 000000000..d6200f2cc --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/legal.lua @@ -0,0 +1,101 @@ +local queries = module("server/modules/queries") +local client_sender = module("server/modules/comms/client_sender") +local api = module("server/modules/comms/api") + +local legal = {} + +-- Get the table of all charges +function legal.get_all_charges(pass_to_client) + local q_get_all_charges = queries.get_all_charges() + api.request( + q_get_all_charges, + function(response) + response = json.decode(response) + if response.error == nil then + local charges = {} + for _, charge in ipairs(response.data.allCharges) do + table.insert(charges, charge) + end + state_set("charges", charges) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.charges, "charges") + end + else + print_debug(response.error) + end + end + ) +end + +-- Send an offence's metadata +function legal.send_offence_metadata(data) + local q_send_offence_metadata + if (data.id) then + q_send_offence_metadata = queries.update_offence(data) + else + q_send_offence_metadata = queries.create_offence(data) + end + api.request( + q_send_offence_metadata, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +-- Save a ticket +function legal.save_ticket(data) + local q_save_ticket + if (data.id) then + q_save_ticket = queries.update_ticket(data) + else + q_save_ticket = queries.create_ticket(data) + end + api.request( + q_save_ticket, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +-- Save an arrest +function legal.save_arrest(data) + local q_save_arrest + if (data.id) then + q_save_arrest = queries.update_arrest(data) + else + q_save_arrest = queries.create_arrest(data) + end + api.request( + q_save_arrest, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +-- Delete an offence +function legal.delete_offence(data) + local q_delete_offence = queries.delete_offence(data) + api.request( + q_delete_offence, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +return legal \ No newline at end of file diff --git a/resources/cadvanced_mdt/server/modules/locations.lua b/resources/cadvanced_mdt/server/modules/locations.lua new file mode 100644 index 000000000..fccfac570 --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/locations.lua @@ -0,0 +1,30 @@ +local queries = module("server/modules/queries") +local client_sender = module("server/modules/comms/client_sender") +local api = module("server/modules/comms/api") + +local locations = {} + +-- Get the table of locations +function locations.get_all_locations(pass_to_client) + local q_get_all_locations = queries.get_all_locations() + api.request( + q_get_all_locations, + function(response) + response = json.decode(response) + if response.error == nil then + local location_list = {} + for _, location in ipairs(response.data.allLocations) do + table.insert(location_list, location) + end + state_set("locations", location_list) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.locations, "locations") + end + else + print_debug(response.error) + end + end + ) +end + +return locations \ No newline at end of file diff --git a/resources/cadvanced_mdt/server/modules/queries.lua b/resources/cadvanced_mdt/server/modules/queries.lua new file mode 100644 index 000000000..ed30b58cc --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/queries.lua @@ -0,0 +1,541 @@ +local queries = {} + +function _doSub(str, sub) + return string.gsub(str, "%$(%w+)", sub) +end + +function queries.get_whitelisted() + local query = { + operationName = null, + query = "{ allWhitelisted{ steamId } }" + } + return json.encode(query) +end + +function queries.get_user(steam_id) + local query = { + operationName = null, + query = _doSub( + '{ getUser(steamId: "$x") { id userName steamId avatarUrl x y roles { id name code } character { ... on Citizen { id firstName lastName active __typename } ... on Officer { id firstName lastName active __typename } } } }', + {x = steam_id} + ) + } + return json.encode(query) +end + +function queries.start_panic(steam_id) + local query = { + operationName = null, + variables = { + steamId = steam_id + }, + query = 'mutation ($steamId: String!) { startPanic(steamId: $steamId) { id callerInfo markerX markerY callType { id name code readonly } callGrade { id name code readonly } callLocations { id name code readonly } callIncidents { id name code readonly } callDescriptions { id text } } }' + } + return json.encode(query) +end + +function queries.get_all_calls() + local query = { + operationName = null, + query = "{ allCalls { id callerInfo markerX markerY callGrade { id name } callType { id name } callLocations { id name } callIncidents { id name } callDescriptions { id text } assignedUnits { id } } }" + } + return json.encode(query) +end + +function queries.get_all_units() + local query = { + operationName = null, + query = "{ allUnits { id callSign unitType { id name } unitState { id name colour code active } UnitTypeId UnitStateId } }" + } + return json.encode(query) +end + +function queries.get_all_user_units() + local query = { + operationName = null, + query = "{ allUserUnits { UserId UnitId UserRankId } }" + } + return json.encode(query) +end + +function queries.get_all_user_ranks() + local query = { + operationName = null, + query = "{ allUserRanks { id name position } } " + } + return json.encode(query) +end + +function queries.get_unit(unit_id) + local query = { + operationname = null, + query = _doSub( + "{ getUnit(id: $x) { id callSign unitType { id name } unitState { id name colour code } UnitTypeId UnitStateId } }", + {x = unit_id} + ) + } + return json.encode(query) +end + +function queries.get_call(call_id) + local query = { + operationname = null, + query = _doSub( + "{ getCall(id: $x) { id callerInfo markerX markerY callGrade { id name } callType { id name } callLocations { id name } callIncidents { id name } callDescriptions { id text } assignedUnits { id } } }", + {x = call_id} + ) + } + return json.encode(query) +end + +function queries.get_citizen(citizen_id) + local query = { + operationname = null, + query = _doSub( + '{ getCitizen(id: $x) { id firstName lastName address postalCode GenderId gender { id name } EthnicityId ethnicity { id name } vehicles { id colour licencePlate vehicleModel { id name } insuranceStatus { id name } markers { id name } } weapons { id weaponType { id name } weaponStatus { id name } } licences { id licenceType { id name } licenceStatus { id name } } warrants { id validFrom validTo details } markers { id name } offences { id date time location ArrestId arrest { id date time OfficerId officer { id firstName lastName } charges { id name } } charges { id name } TicketId ticket { id date time location points fine notes OfficerId officer { id firstName lastName } } } dateOfBirth weight height hair eyes active createdAt } }', + {x = citizen_id} + ) + } + return json.encode(query) +end + +function queries.search_citizens(props) + -- Ensure all properties are populated, as we need to substitute + -- all placeholders in the query + local to_send = {} + local allProps = {'firstName', 'lastName', 'dateOfBirth', 'id'}; + for _, key in ipairs(allProps) do + if props[key] ~= nil and string.len(props[key]) > 0 then + to_send[key] = props[key] + else + to_send[key] = "" + end + end + local query = { + operationname = null, + query = _doSub( + '{ searchCitizens(firstName: "$firstName", lastName: "$lastName", dateOfBirth: "$dateOfBirth", id: "$id" ) { id firstName lastName address postalCode GenderId gender { id name } EthnicityId ethnicity { id name } vehicles { id colour licencePlate vehicleModel { id name } insuranceStatus { id name } markers { id name } } weapons { id weaponType { id name } weaponStatus { id name } } licences { id licenceType { id name } licenceStatus { id name } } warrants { id validFrom validTo details } markers { id name } dateOfBirth weight height hair eyes active createdAt } }', + to_send + ) + } + return json.encode(query) +end + +function queries.send_citizen_call(props) + -- Ensure all properties are populated, as we need to substitute + -- all placeholders in the query + local query = { + operationname = null, + variables = { + steamId = props.steamId, + location = props.location, + callerInfo = props.callerInfo, + notes = props.notes + }, + query = 'mutation ($steamId: String!, $location: String!, $callerInfo: String!, $notes: String!) { createCitizenCall(steamId: $steamId, location: $location, callerInfo: $callerInfo, notes: $notes) { id } }' + } + return json.encode(query) +end + +function queries.search_vehicles(props) + -- Ensure all properties are populated, as we need to substitute + -- all placeholders in the query + local to_send = {} + local allProps = {'licencePlate', 'colour', 'vehicleModel'}; + for _, key in ipairs(allProps) do + if props[key] ~= nil and string.len(props[key]) > 0 then + to_send[key] = props[key] + else + to_send[key] = "" + end + end + local query = { + operationname = null, + query = _doSub( + '{ searchVehicles(licencePlate: "$licencePlate", colour: "$colour", vehicleModel: "$vehicleModel") { id colour licencePlate vehicleModel { id name } insuranceStatus { id name } markers { id name } citizen { id firstName lastName address postalCode markers { id name } licences { id licenceType { id name } licenceStatus { id name } } } } }', + to_send + ) + } + return json.encode(query) +end + +function queries.update_user_units(props) + local query = { + operationname = null, + variables = { + userId = props.user_id, + assignments = props.user_units + }, + query = "mutation ($assignments: [UserUnitInput], $userId: ID!) { updateUserAssignments(assignments: $assignments, userId: $userId) { UserId UnitId UserRankId } }" + } + return json.encode(query) +end + +function queries.get_citizen_offences(data) + local query = { + operationname = null, + query = _doSub( + '{ getCitizen(id: "$id") { id offences { id date time location ArrestId arrest { id date time OfficerId officer { id firstName lastName } charges { id name } } charges { id name } TicketId ticket { id date time location points fine notes OfficerId officer { id firstName lastName } } } } }', + data + ) + } + return json.encode(query) +end + +function queries.get_all_unit_states() + local query = { + operationName = null, + query = "{ allUnitStates { id name colour } } " + } + return json.encode(query) +end + +function queries.get_all_unit_types() + local query = { + operationName = null, + query = "{ allUnitTypes { id name } } " + } + return json.encode(query) +end + +function queries.get_all_citizen_markers() + local query = { + operationName = null, + query = "{ allCitizenMarkers { id name } } " + } + return json.encode(query) +end + +function queries.get_all_vehicle_markers() + local query = { + operationName = null, + query = "{ allVehicleMarkers { id name } } " + } + return json.encode(query) +end + +function queries.get_all_vehicle_models() + local query = { + operationName = null, + query = "{ allVehicleModels { id name } } " + } + return json.encode(query) +end + +function queries.set_unit_state(props, unit) + local query = { + operationname = null, + variables = { + id = props.unitId, + callSign = unit.callSign, + UnitStateId = props.stateId, + UnitTypeId = unit.UnitTypeId + }, + query = "mutation ($id: ID!, $callSign: String!, $UnitTypeId: ID!, $UnitStateId: ID!) { updateUnit(id: $id, callSign: $callSign, UnitTypeId: $UnitTypeId, UnitStateId: $UnitStateId) { id callSign unitType { id name } unitState { id name colour code } UnitTypeId UnitStateId } }" + } + return json.encode(query) +end + +function queries.attach_marker_to_citizen(props) + local query = { + operationname = null, + variables = { + CitizenId = props.typeId, + MarkerId = props.markerId + }, + query = "mutation ($CitizenId: ID!, $MarkerId: ID!) { attachMarkerToCitizen(CitizenId: $CitizenId, MarkerId: $MarkerId) { id name type } }" + } + return json.encode(query) +end + +function queries.detach_marker_from_citizen(props) + local query = { + operationname = null, + variables = { + CitizenId = props.typeId, + MarkerId = props.markerId + }, + query = "mutation ($CitizenId: ID!, $MarkerId: ID!) { detachMarkerFromCitizen(CitizenId: $CitizenId, MarkerId: $MarkerId) }" + } + return json.encode(query) +end + +function queries.attach_marker_to_vehicle(props) + local query = { + operationname = null, + variables = { + VehicleId = props.typeId, + MarkerId = props.markerId + }, + query = "mutation ($VehicleId: ID!, $MarkerId: ID!) { attachMarkerToVehicle(VehicleId: $VehicleId, MarkerId: $MarkerId) { id name type } }" + } + return json.encode(query) +end + +function queries.detach_marker_from_vehicle(props) + local query = { + operationname = null, + variables = { + VehicleId = props.typeId, + MarkerId = props.markerId + }, + query = "mutation ($VehicleId: ID!, $MarkerId: ID!) { detachMarkerFromVehicle(VehicleId: $VehicleId, MarkerId: $MarkerId) }" + } + return json.encode(query) +end + +function queries.get_all_charges() + local query = { + operationName = null, + query = "{ allCharges { id name } } " + } + return json.encode(query) +end + +function queries.create_offence(props) + local query = { + operationName = null, + variables = { + CitizenId = props.CitizenId, + charges = {}, + date = props.date, + location = props.location, + time = props.time + }, + query = "mutation ($date: String, $time: String, $location: String, $charges: [ChargeInput], $CitizenId: ID! ) { createOffence(date: $date, time: $time, location: $location, charges: $charges, CitizenId: $CitizenId) { id date time location ArrestId arrest { id date time OfficerId officer { id firstName lastName } charges { id name } } charges { id name } TicketId ticket { id date time location points fine notes OfficerId officer { id firstName lastName } } }}" + } + return json.encode(query) +end + +function queries.update_offence(props) + local query = { + operationName = null, + variables = { + id = props.id, + CitizenId = props.CitizenId, + charges = props.charges, + date = props.date, + location = props.location, + time = props.time + }, + query = "mutation ($id: ID!, $date: String, $time: String, $location: String, $charges: [ChargeInput], $CitizenId: ID! ) { updateOffence(id: $id, date: $date, time: $time, location: $location, charges: $charges, CitizenId: $CitizenId) { id date time location ArrestId arrest { id date time OfficerId officer { id firstName lastName } charges { id name } } charges { id name } TicketId ticket { id date time location points fine notes OfficerId officer { id firstName lastName } } }}" + } + return json.encode(query) +end + +function queries.create_ticket(props) + local query = { + operationName = null, + variables = { + CitizenId = props.CitizenId, + OffenceId = props.OffenceId, + OfficerId = props.OfficerId, + date = props.date, + fine = props.fine, + location = props.location, + notes = props.notes, + points = props.points, + time = props.time + }, + query = "mutation ($date: String, $time: String, $location: String, $points: String, $fine: String, $notes: String, $CitizenId: ID!, $OfficerId: ID!, $OffenceId: ID!) { createTicket(date: $date, time: $time, location: $location, points: $points, fine: $fine, notes: $notes, CitizenId: $CitizenId, OfficerId: $OfficerId, OffenceId: $OffenceId) { id date time location points fine notes OfficerId officer { id firstName lastName } }}" + } + return json.encode(query) +end + +function queries.update_ticket(props) + local query = { + operationName = null, + variables = { + id = props.id, + CitizenId = props.CitizenId, + OffenceId = props.OffenceId, + OfficerId = props.OfficerId, + date = props.date, + fine = props.fine, + location = props.location, + notes = props.notes, + points = props.points, + time = props.time + }, + query = "mutation ($id: ID!, $date: String, $time: String, $location: String, $points: String, $fine: String, $notes: String, $CitizenId: ID!, $OfficerId: ID!, $OffenceId: ID!) { updateTicket(id: $id, date: $date, time: $time, location: $location, points: $points, fine: $fine, notes: $notes, CitizenId: $CitizenId, OfficerId: $OfficerId, OffenceId: $OffenceId) { id date time location points fine notes OfficerId officer { id firstName lastName } }}" + } + return json.encode(query) +end + +function queries.create_arrest(props) + local query = { + operationName = null, + variables = { + date = props.date, + time = props.time, + charges = props.charges, + OfficerId = props.OfficerId, + OffenceId = props.OffenceId, + CitizenId = props.CitizenId + }, + query = "mutation ($date: String, $time: String, $charges: [ChargeInput], $OfficerId: ID!, $OffenceId: ID!, $CitizenId: ID!) { createArrest(date: $date, time: $time, charges: $charges, OfficerId: $OfficerId, OffenceId: $OffenceId, CitizenId: $CitizenId) { id date time OfficerId officer { id firstName lastName } charges { id name } OffenceId }}" + } + return json.encode(query) +end + +function queries.update_arrest(props) + local query = { + operationName = null, + variables = { + id = props.id, + date = props.date, + time = props.time, + charges = props.charges, + OfficerId = props.OfficerId, + OffenceId = props.OffenceId, + CitizenId = props.CitizenId + }, + query = "mutation ($id: ID!, $date: String, $time: String, $charges: [ChargeInput], $OfficerId: ID!, $OffenceId: ID!, $CitizenId: ID!) { updateArrest(id: $id, date: $date, time: $time, charges: $charges, OfficerId: $OfficerId, OffenceId: $OffenceId, CitizenId: $CitizenId) { id date time OfficerId officer { id firstName lastName } charges { id name } OffenceId } }" + } + return json.encode(query) +end + +function queries.delete_offence(props) + local query = { + operationName = null, + variables = { + id = props.id, + CitizenId = props.CitizenId + }, + query = "mutation ($id: ID!, $CitizenId: ID!) { deleteOffence(id: $id, CitizenId: $CitizenId)}" + } + return json.encode(query) +end + +function queries.get_all_locations() + local query = { + operationName = null, + query = "{ allLocations { id name } }" + } + return json.encode(query) +end + +function queries.get_all_call_grades() + local query = { + operationName = null, + query = "{ allCallGrades { id name code } }" + } + return json.encode(query) +end + +function queries.get_all_call_types() + local query = { + operationName = null, + query = "{ allCallTypes { id name code } }" + } + return json.encode(query) +end + +function queries.get_all_call_incidents() + local query = { + operationName = null, + query = "{ allIncidentTypes { id name code } }" + } + return json.encode(query) +end + +function queries.create_call(props) + local query = { + operationName = null, + variables = { + callerInfo = props.callerInfo, + callGrade = props.callGrade, + callType = props.callType, + callIncidents = props.callIncidents, + callLocations = props.callLocations, + callDescriptions = props.callDescriptions, + markerX = 0, + markerY = 0 + }, + query = "mutation ($callerInfo: String, $callGrade: CallGradeInput!, $callType: CallTypeInput!, $callIncidents: [IncidentTypeInput]!, $callLocations: [LocationInput!]!, $callDescriptions: [CallDescriptionInput], $markerX: Float, $markerY: Float) { createCall(callerInfo: $callerInfo, callGrade: $callGrade, callType: $callType, callIncidents: $callIncidents, callLocations: $callLocations, callDescriptions: $callDescriptions, markerX: $markerX, markerY: $markerY) { id callerInfo markerX markerY callType { id name code readonly } callGrade { id name code readonly } callLocations { id name code readonly } callIncidents { id name code readonly } callDescriptions { id text } }}" + } + return json.encode(query) +end + +function queries.update_call(props) + local query = { + operationName = null, + variables = { + id = props.id, + callerInfo = props.callerInfo, + callGrade = props.callGrade, + callType = props.callType, + callIncidents = props.callIncidents, + callLocations = props.callLocations, + callDescriptions = props.callDescriptions, + markerX = props.markerX, + markerY = props.markerY + }, + query = "mutation ($id: ID!, $callerInfo: String, $callGrade: CallGradeInput!, $callType: CallTypeInput!, $callIncidents: [IncidentTypeInput]!, $callLocations: [LocationInput!]!, $callDescriptions: [CallDescriptionInput], $markerX: Float, $markerY: Float) { updateCall(id: $id, callerInfo: $callerInfo, callGrade: $callGrade, callType: $callType, callIncidents: $callIncidents, callLocations: $callLocations, callDescriptions: $callDescriptions, markerX: $markerX, markerY: $markerY) { id callerInfo markerX markerY callType { id name code readonly } callGrade { id name code readonly } callLocations { id name code readonly } callIncidents { id name code readonly } callDescriptions { id text } }}" + } + return json.encode(query) +end + +function queries.delete_call(props) + local query = { + operationName = null, + variables = { + callId = props.id + }, + query = "mutation ($callId: ID!) { deleteCall(id: $callId)}" + } + return json.encode(query) +end + +function queries.create_unit(props) + local query = { + operationName = null, + variables = { + callSign = props.callSign, + unitStateId = props.unitState.id, + unitTypeId = props.unitType.id + }, + query = "mutation ($callSign: String!, $unitTypeId: ID!, $unitStateId: ID!) { createUnit(callSign: $callSign, UnitTypeId: $unitTypeId, UnitStateId: $unitStateId) { id } }" + } + return json.encode(query) +end + +function queries.update_unit(props) + local query = { + operationName = null, + variables = { + id = props.id, + callSign = props.callSign, + unitStateId = props.unitState.id, + unitTypeId = props.unitType.id + }, + query = "mutation ($id: ID!, $callSign: String!, $unitTypeId: ID!, $unitStateId: ID!) { updateUnit(id: $id, callSign: $callSign, UnitTypeId: $unitTypeId, UnitStateId: $unitStateId) { id } }" + } + return json.encode(query) +end + +function queries.delete_unit(props) + local query = { + operationName = null, + variables = { + unitId = props.id + }, + query = "mutation ($unitId: ID!) { deleteUnit(id: $unitId)}" + } + return json.encode(query) +end + +function queries.toggle_assignment(props) + local mutation = props.currentlyAssigned and "divestCallFromUnit" or "assignCallToUnit" + local query = { + operationName = null, + variables = { + callId = props.callId, + unitId = props.unitId + }, + query = "mutation ($callId: ID!, $unitId: ID!) { " .. mutation .. "(CallId: $callId, UnitId: $unitId) { callId unitId } }" + } + return json.encode(query) +end + +return queries diff --git a/resources/cadvanced_mdt/server/modules/units.lua b/resources/cadvanced_mdt/server/modules/units.lua new file mode 100644 index 000000000..07bb852be --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/units.lua @@ -0,0 +1,221 @@ +local queries = module("server/modules/queries") +local client_sender = module("server/modules/comms/client_sender") +local api = module("server/modules/comms/api") + +local units = {} + +-- Get the table of all units +function units.get_all_units(pass_to_client) + local q_all_units = queries.get_all_units() + api.request( + q_all_units, + function(response) + response = json.decode(response) + if response.error == nil then + local unt = {} + for _, unit in ipairs(response.data.allUnits) do + table.insert(unt, unit) + end + state_set("units", unt) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.units, "units") + end + else + print_debug(response.error) + end + end + ) +end + +-- Get the table of all unit states +function units.get_all_unit_states(pass_to_client) + local q_all_unit_states = queries.get_all_unit_states() + api.request( + q_all_unit_states, + function(response) + response = json.decode(response) + if response.error == nil then + local us = {} + for _, state in ipairs(response.data.allUnitStates) do + table.insert(us, state) + end + state_set("unit_states", us) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.unit_states, "unit_states") + end + else + print_debug(response.error) + end + end + ) +end + +-- Get the table of all unit types +function units.get_all_unit_types(pass_to_client) + local q_all_unit_types = queries.get_all_unit_types() + api.request( + q_all_unit_types, + function(response) + response = json.decode(response) + if response.error == nil then + local ut = {} + for _, uType in ipairs(response.data.allUnitTypes) do + table.insert(ut, uType) + end + state_set("unit_types", ut) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.unit_types, "unit_types") + end + else + print_debug(response.error) + end + end + ) +end + +-- Get the table of all user / unit assignments +function units.get_all_user_units(pass_to_client) + local q_all_user_units = queries.get_all_user_units() + api.request( + q_all_user_units, + function(response) + response = json.decode(response) + if response.error == nil then + local user_units = {} + for _, assignment in ipairs(response.data.allUserUnits) do + table.insert(user_units, assignment) + end + state_set("user_units", user_units) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.user_units, "user_units") + end + else + print_debug(response.error) + end + end + ) +end + +-- Send a unit +function units.send_unit(data) + local q_send_unit + if (data.id) then + q_send_unit = queries.update_unit(data) + else + q_send_unit = queries.create_unit(data) + end + api.request( + q_send_unit, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +-- Delete a unit +function units.delete_unit(data) + local q_delete_unit = queries.delete_unit(data) + api.request( + q_delete_unit, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +-- Repopulate all user_units +function units.repopulate_user_units() + units.get_all_user_units(true) +end + +-- Repopulate all units +function units.repopulate_units() + units.get_all_units(true) +end + +-- Repopulate all unit states +function units.repopulate_unit_states() + units.get_all_unit_states(true) +end + +-- Repopulate all unit types +function units.repopulate_unit_types() + units.get_all_unit_types(true) +end + +-- Update a unit +function units.update_unit(id) + local q_get_unit = queries.get_unit(id) + print_debug("UPDATING UNIT " .. id) + api.request( + q_get_unit, + function(response) + response = json.decode(response) + if response.error == nil then + print_debug("PARSING UPDATED UNIT") + local received = response.data.getUnit + local ex_units = state_get("units") + local found = false + for i, iter in ipairs(ex_units) do + if (iter.id == received.id) then + ex_units[i] = received + found = true + end + end + if not found then + table.insert(ex_units, received) + end + state_set("units", ex_units) + -- Send client the updated units list + print_debug("SENDING ALL CLIENTS UPDATED UNITS") + client_sender.pass_data(ex_units, "units") + else + print_debug(response.error) + end + end + ) +end + +-- Update a unit's state +function units.set_unit_state(data) + local unit = state_get_value("units", data.unitId) + print_debug("SENDING UPDATED UNIT STATE TO CAD FOR UNIT " .. data.unitId) + if (unit ~= nil) then + local q_set_unit_state = queries.set_unit_state(data, unit) + api.request( + q_set_unit_state, + function(response) + response = json.decode(response) + if response.error == nil then + print_debug("PARSING UPDATED UNIT") + local received = response.data.updateUnit + local ex_units = state_get("units") + local found = false + for i, iter in ipairs(ex_units) do + if (iter.id == received.id) then + ex_units[i] = received + found = true + end + end + if not found then + table.insert(ex_units, received) + end + state_set("units", ex_units) + -- Send client the updated units list + print_debug("SENDING ALL CLIENTS UPDATED UNITS") + client_sender.pass_data(ex_units, "units") + else + print_debug(response.error) + end + end + ) + end +end + +return units diff --git a/resources/cadvanced_mdt/server/modules/users.lua b/resources/cadvanced_mdt/server/modules/users.lua new file mode 100644 index 000000000..08dc703de --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/users.lua @@ -0,0 +1,315 @@ +local user_helpers = module("server/modules/helpers/users") +local queries = module("server/modules/queries") +local api = module("server/modules/comms/api") +local client_sender = module("server/modules/comms/client_sender") +local conf = module("server/modules/config") + +local users = {} + +-- Get the table of whitelisted users +function users.get_whitelisted() + if conf.val("enable_whitelist") then + local q_whitelisted = queries.get_whitelisted() + api.request( + q_whitelisted, + function(response) + response = json.decode(response) + if response.error == nil then + local whitelist = {} + for _, wl in ipairs(response.data.allWhitelisted) do + table.insert(whitelist, wl.steamId) + end + state_set("whitelist", whitelist) + else + print_debug(response.error) + end + end + ) + else + return {} + end +end + +-- Get the table of user ranks +function users.get_all_user_ranks(pass_to_client) + local q_get_all_user_ranks = queries.get_all_user_ranks() + api.request( + q_get_all_user_ranks, + function(response) + response = json.decode(response) + if response.error == nil then + local user_ranks = {} + for _, rank in ipairs(response.data.allUserRanks) do + table.insert(user_ranks, rank) + end + state_set("user_ranks", user_ranks) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.user_ranks, "user_ranks") + end + else + print_debug(response.error) + end + end + ) +end + +-- Repopulate all user_ranks +function users.repopulate_user_ranks() + users.get_all_user_ranks(true) +end + +-- Check if a user has a SteamID +function users.validate(source, setKickReason) + if not source then + setKickReason( + "Unable to find SteamID, please relaunch FiveM with steam open or restart FiveM & Steam if steam is already open" + ) + CancelEvent() + print_debug("PLAYER JOIN DENIED - NO SOURCE") + return false + end + local id = user_helpers.get_steam_id(source) + if not id then + setKickReason( + "Unable to find SteamID, please relaunch FiveM with steam open or restart FiveM & Steam if steam is already open" + ) + CancelEvent() + print_debug("PLAYER JOIN DENIED - NO STEAM ID") + return false + end + if conf.val("enable_whitelist") and not hasValue(state_get("whitelist"), id) then + setKickReason("You are not whitelisted for this server") + CancelEvent() + print_debug("PLAYER JOIN DENIED - NOT WHITELISTED") + return false + end + print_debug("PLAYER JOIN ACCEPTED") + return true +end + +-- Update a players location or add a new one +function users.update_location(source, data) + local steam_id = user_helpers.get_steam_id(source) + local user_locations = state_get("user_locations") + local found = false + for i, it in ipairs(user_locations) do + if it.steamId == steam_id then + user_locations[i] = { + steamId = steam_id, + x = data.x, + y = data.y, + updated = os.time() + } + found = true + break + end + end + if found == false then + table.insert(user_locations, { + steamId = steam_id, + x = data.x, + y = data.y, + updated = os.time() + }) + end + state_set("user_locations", user_locations) +end + +-- Return all users with locations +function users.get_locations() + return state_get("user_locations") +end + +-- Start a paninc call +function users.start_panic() + local steamId = user_helpers.get_steam_id(source) + local q_panic = queries.start_panic(steamId) + api.request( + q_panic, + function(response) + end + ) +end + +-- Receive a panic notification from the CAD and let NUI know +function users.display_panic(call_id) + client_sender.pass_data({ call_id = call_id }, "display_panic") +end + +-- Get a players details and update state as appropriate +function users.populate_player(steamId) + local is_new = false + local my_source + if not steamId then + is_new = true + print_debug("GETTING NEWLY CONNECTED PLAYER DETAILS FOR " .. source) + my_source = source + steamId = user_helpers.get_steam_id(source) + else + print_debug("GETTING UPDATED PLAYER DETAILS FOR " .. steamId) + end + local q_user = queries.get_user(steamId) + api.request( + q_user, + function(response) + response = json.decode(response) + if response.error == nil then + local usr = state_get("users") + local returned_user = response.data.getUser + if returned_user ~= nil then + if is_new then + returned_user.source = my_source + table.insert(usr, returned_user) + else + for i, it in ipairs(usr) do + if it.steamId == steamId then + -- Preserve the user's source + returned_user.source = usr[i].source + usr[i] = returned_user + break + end + end + end + state_set("users", usr) + -- Send client the updated user list + print_debug("SENDING ALL CLIENTS UPDATED USERS") + client_sender.pass_data(usr, "users") + else + print_debug("PLAYER " .. steamId .. " NOT FOUND IN CAD") + return + end + else + print_debug(response.error) + end + end + ) +end + +-- Player connect handler +function users.handler_playerConnecting() + -- Validate a user when they connect + AddEventHandler( + "playerConnecting", + function(name, setKickReason) + print_debug("PLAYER CONNECTED " .. source) + print_debug("VALIDATING PLAYER") + users.validate(source, setKickReason) + end + ) +end + +-- Player dropped handler +---- Remove the user table from state.users +function users.handler_playerDropped() + AddEventHandler( + "playerDropped", + function() + local id = user_helpers.get_steam_id(source) + print_debug("PLAYER " .. id .. " DROPPED") + -- Remove the player from the players table + local usr = state_get("users") + for i, user in ipairs(usr) do + print_debug("USER'S STEAM ID " .. user.steamId .. " - ITERATED ID " .. id) + if user.steamId == id then + table.remove(usr, i) + state_set("users", usr) + -- Send client the updated user list + print_debug("SENDING ALL CLIENTS UPDATED USERS") + client_sender.pass_data(usr, "users") + break + end + end + -- Remove the player from the active player locations + local user_locations = state_get("user_locations") + local filtered = {} + for i, user_location in ipairs(user_locations) do + if user_location.steamId == id then + print_debug("REMOVING LOCATION FOR PLAYER " .. id) + else + table.insert(filtered, user_location) + end + end + state_set("user_locations", filtered) + end + ) +end + +-- Send the API current user assignments +function users.update_user_units(user_id) + local user_units = state_get("user_units") + local user_units_send = {} + -- Only include this user's assignments + for i, uu in ipairs(user_units) do + if (uu.UserId == user_id) then + table.insert(user_units_send, uu) + end + end + local payload = { user_units = user_units_send, user_id = user_id } + local q_update_user_units = queries.update_user_units(payload) + -- This request will prompt the API to notify us of the change, so + -- we can mostly ignore the response + api.request( + q_update_user_units, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +-- Remove a user from a unit in our local state +function users.remove_from_unit(data) + local user_id = data.userId + local unit_id = data.unitId + if (user_id ~= nil and unit_id ~= nil) then + -- First remove the user from the unit in our local state + -- we should then have something we can send to the API + local assignments = state_get("user_units") + local found = 0 + for i, assignment in ipairs(assignments) do + if assignment.UserId == user_id and assignment.UnitId == unit_id then + found = i + end + end + if found > 0 then + table.remove(assignments, found) + state_set("user_units", assignments) + users.update_user_units(user_id) + else + print_debug("UNABLE TO FIND SUPPLIED UNIT ASSIGNMENT") + end + end +end + +-- Add a user to a unit in our local state +function users.add_to_unit(data) + local user_id = data.userId + local unit_id = data.unitId + local rank_id = data.rankId + if (user_id ~= nil and unit_id ~= nil and rank_id ~= nil) then + -- First add the user to the unit in our local state + -- we should then have something we can send to the API + local assignments = state_get("user_units") + local found = 0 + for i, assignment in ipairs(assignments) do + if assignment.UserId == user_id and assignment.UnitId == unit_id and assignment.UserRankId == rank_id then + found = i + end + end + if found == 0 then + table.insert(assignments, { + UserId = user_id, + UnitId = unit_id, + UserRankId = rank_id + }) + state_set("user_units", assignments) + users.update_user_units(user_id) + else + print_debug("UNABLE TO FIND SUPPLIED UNIT ASSIGNMENT") + end + end +end + +return users diff --git a/resources/cadvanced_mdt/server/modules/vehicles.lua b/resources/cadvanced_mdt/server/modules/vehicles.lua new file mode 100644 index 000000000..6a3624c40 --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/vehicles.lua @@ -0,0 +1,109 @@ +local queries = module("server/modules/queries") +local client_sender = module("server/modules/comms/client_sender") +local api = module("server/modules/comms/api") + +local vehicles = {} + +-- Get the table of vehicle markers +function vehicles.get_all_markers(pass_to_client) + local q_get_all_vehicle_markers = queries.get_all_vehicle_markers() + api.request( + q_get_all_vehicle_markers, + function(response) + response = json.decode(response) + if response.error == nil then + local vehicle_markers = {} + for _, marker in ipairs(response.data.allVehicleMarkers) do + table.insert(vehicle_markers, marker) + end + state_set("vehicle_markers", vehicle_markers) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.vehicle_markers, "vehicle_markers") + end + else + print_debug(response.error) + end + end + ) +end + +-- Repopulate all vehicle_markers +function vehicles.repopulate_vehicle_markers() + vehicles.get_all_markers(true) +end + +-- Get the table of vehicle models +function vehicles.get_all_models(pass_to_client) + local q_get_all_vehicle_models = queries.get_all_vehicle_models() + api.request( + q_get_all_vehicle_models, + function(response) + response = json.decode(response) + if response.error == nil then + local vehicle_models = {} + for _, model in ipairs(response.data.allVehicleModels) do + table.insert(vehicle_models, model) + end + state_set("vehicle_models", vehicle_models) + if (pass_to_client ~= nil and pass_to_client) then + client_sender.pass_data(state.vehicle_models, "vehicle_models") + end + else + print_debug(response.error) + end + end + ) +end + +-- Repopulate all vehicle_models +function vehicles.repopulate_vehicle_models() + vehicles.get_all_models(true) +end + +-- Add a marker to a vehicle +function vehicles.add_marker(data) + local q_attach_marker_to_vehicle = queries.attach_marker_to_vehicle(data) + api.request( + q_attach_marker_to_vehicle, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +-- Remove a marker from a vehicle +function vehicles.remove_marker(data) + local q_detach_marker_from_vehicle = queries.detach_marker_from_vehicle(data) + api.request( + q_detach_marker_from_vehicle, + function(response) + response = json.decode(response) + if response.error ~= nil then + print_debug(response.error) + end + end + ) +end + +function vehicles.search_vehicles(search, callback, src) + local q_search_vehicles = queries.search_vehicles(search) + api.request( + q_search_vehicles, + function(response) + response = json.decode(response) + if response.error == nil then + local received = response.data.searchVehicles + -- Send client the search results + print_debug("SENDING ALL CLIENTS VEHICLE SEARCH RESULTS") + callback(received, "vehicle_search_results", src) + else + print_debug(response.error) + end + end + ) +end + +return vehicles \ No newline at end of file diff --git a/resources/cadvanced_mdt/server/modules/version.lua b/resources/cadvanced_mdt/server/modules/version.lua new file mode 100644 index 000000000..350e76772 --- /dev/null +++ b/resources/cadvanced_mdt/server/modules/version.lua @@ -0,0 +1,5 @@ +local version = {} + +version.current = "1.0.0" + +return version diff --git a/resources/cadvanced_mdt/ui/build/bundle.js b/resources/cadvanced_mdt/ui/build/bundle.js new file mode 100644 index 000000000..fa535ac1a --- /dev/null +++ b/resources/cadvanced_mdt/ui/build/bundle.js @@ -0,0 +1,39 @@ +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=225)}([function(t,e,n){var r=n(7),i=n(28),o=n(17),a=n(18),s=n(29),c=function(t,e,n){var u,l,d,f,p=t&c.F,h=t&c.G,v=t&c.S,g=t&c.P,m=t&c.B,A=h?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,_=h?i:i[e]||(i[e]={}),y=_.prototype||(_.prototype={});for(u in h&&(n=e),n)d=((l=!p&&A&&void 0!==A[u])?A:n)[u],f=m&&l?s(d,r):g&&"function"==typeof d?s(Function.call,d):d,A&&a(A,u,d,t&c.U),_[u]!=d&&o(_,u,f),g&&y[u]!=d&&(y[u]=d)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),o=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(o).concat([i]).join("\n")}var a,s,c;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;on.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i0?i(r(t),9007199254740991):0}},function(t,e,n){t.exports=!n(8)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(4),i=n(120),o=n(33),a=Object.defineProperty;e.f=n(12)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(34);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"property-container"},[t.label&&t.label.length>0?n("span",{staticClass:"label"},[t._v("\n "+t._s(t.label)+":\n ")]):t._e(),t._v("\n "+t._s(t.value)+"\n")])};r._withStripped=!0;var i={props:{label:{type:String,required:!1},value:{type:String,required:!1,default:"Unknown"}}},o=(n(506),n(1)),a=Object(o.a)(i,r,[],!1,null,"37abe4c0",null);a.options.__file="src/components/reusable/Citizen/Property.vue";e.a=a.exports},function(t,e,n){var r=n(13),i=n(46);t.exports=n(12)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(7),i=n(17),o=n(21),a=n(47)("src"),s=n(229),c=(""+s).split("toString");n(28).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(o(n,a)||i(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(t,e,n){var r=n(0),i=n(8),o=n(34),a=/"/g,s=function(t,e,n,r){var i=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+""};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",n)}},function(t,e,n){"use strict";var r=n(157),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===i.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n0?r:n)(t)}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){var r=n(9);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(0),i=n(28),o=n(8);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(t,e,n){var r=n(29),i=n(65),o=n(14),a=n(11),s=n(107);t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,l=4==t,d=6==t,f=5==t||d,p=e||s;return function(e,s,h){for(var v,g,m=o(e),A=i(m),_=r(s,h,3),y=a(A.length),b=0,x=n?p(e,y):c?p(e,0):void 0;y>b;b++)if((f||b in A)&&(g=_(v=A[b],b,m),t))if(n)x[b]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return b;case 2:x.push(v)}else if(l)return!1;return d?-1:u||l?l:x}}},function(t,e,n){"use strict";if(n(12)){var r=n(40),i=n(7),o=n(8),a=n(0),s=n(79),c=n(115),u=n(29),l=n(53),d=n(46),f=n(17),p=n(55),h=n(31),v=n(11),g=n(148),m=n(49),A=n(33),_=n(21),y=n(59),b=n(9),x=n(14),w=n(104),C=n(50),S=n(24),k=n(51).f,E=n(106),O=n(47),M=n(10),T=n(36),B=n(69),I=n(68),$=n(109),P=n(61),j=n(74),R=n(52),D=n(108),L=n(137),N=n(13),U=n(23),F=N.f,z=U.f,V=i.RangeError,G=i.TypeError,H=i.Uint8Array,Q=Array.prototype,q=c.ArrayBuffer,W=c.DataView,Y=T(0),J=T(2),X=T(3),Z=T(4),K=T(5),tt=T(6),et=B(!0),nt=B(!1),rt=$.values,it=$.keys,ot=$.entries,at=Q.lastIndexOf,st=Q.reduce,ct=Q.reduceRight,ut=Q.join,lt=Q.sort,dt=Q.slice,ft=Q.toString,pt=Q.toLocaleString,ht=M("iterator"),vt=M("toStringTag"),gt=O("typed_constructor"),mt=O("def_constructor"),At=s.CONSTR,_t=s.TYPED,yt=s.VIEW,bt=T(1,(function(t,e){return kt(I(t,t[mt]),e)})),xt=o((function(){return 1===new H(new Uint16Array([1]).buffer)[0]})),wt=!!H&&!!H.prototype.set&&o((function(){new H(1).set({})})),Ct=function(t,e){var n=h(t);if(n<0||n%e)throw V("Wrong offset!");return n},St=function(t){if(b(t)&&_t in t)return t;throw G(t+" is not a typed array!")},kt=function(t,e){if(!b(t)||!(gt in t))throw G("It is not a typed array constructor!");return new t(e)},Et=function(t,e){return Ot(I(t,t[mt]),e)},Ot=function(t,e){for(var n=0,r=e.length,i=kt(t,r);r>n;)i[n]=e[n++];return i},Mt=function(t,e,n){F(t,e,{get:function(){return this._d[n]}})},Tt=function(t){var e,n,r,i,o,a,s=x(t),c=arguments.length,l=c>1?arguments[1]:void 0,d=void 0!==l,f=E(s);if(null!=f&&!w(f)){for(a=f.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(d&&c>2&&(l=u(l,arguments[2],2)),e=0,n=v(s.length),i=kt(this,n);n>e;e++)i[e]=d?l(s[e],e):s[e];return i},Bt=function(){for(var t=0,e=arguments.length,n=kt(this,e);e>t;)n[t]=arguments[t++];return n},It=!!H&&o((function(){pt.call(new H(1))})),$t=function(){return pt.apply(It?dt.call(St(this)):St(this),arguments)},Pt={copyWithin:function(t,e){return L.call(St(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(St(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return D.apply(St(this),arguments)},filter:function(t){return Et(this,J(St(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return K(St(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(St(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Y(St(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(St(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(St(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ut.apply(St(this),arguments)},lastIndexOf:function(t){return at.apply(St(this),arguments)},map:function(t){return bt(St(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(St(this),arguments)},reduceRight:function(t){return ct.apply(St(this),arguments)},reverse:function(){for(var t,e=St(this).length,n=Math.floor(e/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return lt.call(St(this),t)},subarray:function(t,e){var n=St(this),r=n.length,i=m(t,r);return new(I(n,n[mt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===e?r:m(e,r))-i))}},jt=function(t,e){return Et(this,dt.call(St(this),t,e))},Rt=function(t){St(this);var e=Ct(arguments[1],1),n=this.length,r=x(t),i=v(r.length),o=0;if(i+e>n)throw V("Wrong length!");for(;o255?255:255&r),i.v[p](n*e+i.o,r,xt)}(this,n,t)},enumerable:!0})};_?(h=n((function(t,n,r,i){l(t,h,u,"_d");var o,a,s,c,d=0,p=0;if(b(n)){if(!(n instanceof q||"ArrayBuffer"==(c=y(n))||"SharedArrayBuffer"==c))return _t in n?Ot(h,n):Tt.call(h,n);o=n,p=Ct(r,e);var m=n.byteLength;if(void 0===i){if(m%e)throw V("Wrong length!");if((a=m-p)<0)throw V("Wrong length!")}else if((a=v(i)*e)+p>m)throw V("Wrong length!");s=a/e}else s=g(n),o=new q(a=s*e);for(f(t,"_d",{b:o,o:p,l:a,e:s,v:new W(o)});d=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return o(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||l(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function g(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i-1)return t.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function y(t,e){return _.call(t,e)}function b(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var x=/-(\w)/g,w=b((function(t){return t.replace(x,(function(t,e){return e?e.toUpperCase():""}))})),C=b((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),S=/\B([A-Z])/g,k=b((function(t){return t.replace(S,"-$1").toLowerCase()}));var E=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function O(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function M(t,e){for(var n in e)t[n]=e[n];return t}function T(t){for(var e={},n=0;n0,X=W&&W.indexOf("edge/")>0,Z=(W&&W.indexOf("android"),W&&/iphone|ipad|ipod|ios/.test(W)||"ios"===q),K=(W&&/chrome\/\d+/.test(W),W&&/phantomjs/.test(W),W&&W.match(/firefox\/(\d+)/)),tt={}.watch,et=!1;if(H)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){et=!0}}),window.addEventListener("test-passive",null,nt)}catch(t){}var rt=function(){return void 0===V&&(V=!H&&!Q&&void 0!==t&&(t.process&&"server"===t.process.env.VUE_ENV)),V},it=H&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ot(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,st="undefined"!=typeof Symbol&&ot(Symbol)&&"undefined"!=typeof Reflect&&ot(Reflect.ownKeys);at="undefined"!=typeof Set&&ot(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ct=B,ut=0,lt=function(){this.id=ut++,this.subs=[]};lt.prototype.addSub=function(t){this.subs.push(t)},lt.prototype.removeSub=function(t){A(this.subs,t)},lt.prototype.depend=function(){lt.target&<.target.addDep(this)},lt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(o&&!y(i,"default"))a=!1;else if(""===a||a===k(t)){var c=Ft(String,i.type);(c<0||s0&&(le((c=t(c,(n||"")+"_"+r))[0])&&le(l)&&(d[u]=mt(l.text+c[0].text),c.shift()),d.push.apply(d,c)):s(c)?le(l)?d[u]=mt(l.text+c):""!==c&&d.push(mt(c)):le(c)&&le(l)?d[u]=mt(l.text+c.text):(a(e._isVList)&&o(c.tag)&&i(c.key)&&o(n)&&(c.key="__vlist"+n+"_"+r+"__"),d.push(c)));return d}(t):void 0}function le(t){return o(t)&&o(t.text)&&!1===t.isComment}function de(t,e){if(t){for(var n=Object.create(null),r=st?Reflect.ownKeys(t):Object.keys(t),i=0;i0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&n&&n!==r&&s===n.$key&&!o&&!n.$hasNormal)return n;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=ve(e,c,t[c]))}else i={};for(var u in e)u in i||(i[u]=ge(e,u));return t&&Object.isExtensible(t)&&(t._normalized=i),F(i,"$stable",a),F(i,"$key",s),F(i,"$hasNormal",o),i}function ve(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return(t=t&&"object"==typeof t&&!Array.isArray(t)?[t]:ue(t))&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function ge(t,e){return function(){return t[e]}}function me(t,e){var n,r,i,a,s;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,i=t.length;rdocument.createEvent("Event").timeStamp&&(cn=function(){return un.now()})}function ln(){var t,e;for(sn=cn(),on=!0,tn.sort((function(t,e){return t.id-e.id})),an=0;anan&&tn[n].id>t.id;)n--;tn.splice(n+1,0,t)}else tn.push(t);rn||(rn=!0,ee(ln))}}(this)},fn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){zt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},fn.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||A(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var pn={enumerable:!0,configurable:!0,get:B,set:B};function hn(t,e,n){pn.get=function(){return this[e][n]},pn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,pn)}function vn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[];t.$parent&&wt(!1);var o=function(o){i.push(o);var a=Lt(o,e,n,t);kt(r,o,a),o in t||hn(t,"_props",o)};for(var a in e)o(a);wt(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]="function"!=typeof e[n]?B:E(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;l(e=t._data="function"==typeof e?function(t,e){ft();try{return t.call(e,e)}catch(t){return zt(t,e,"data()"),{}}finally{pt()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props,i=(t.$options.methods,n.length);for(;i--;){var o=n[i];0,r&&y(r,o)||(a=void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&hn(t,"_data",o))}var a;St(e,!0)}(t):St(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=rt();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;0,r||(n[i]=new fn(t,a||B,B,gn)),i in t||mn(t,i,o)}}(t,e.computed),e.watch&&e.watch!==tt&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!d(t)&&t.test(e)}function En(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=Sn(a.componentOptions);s&&!e(s)&&On(n,o,r,i)}}}function On(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,A(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=bn++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Rt(xn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&We(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,i=n&&n.context;t.$slots=fe(e._renderChildren,i),t.$scopedSlots=r,t._c=function(e,n,r,i){return Ne(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Ne(t,e,n,r,i,!0)};var o=n&&n.data;kt(t,"$attrs",o&&o.attrs||r,null,!0),kt(t,"$listeners",e._parentListeners||r,null,!0)}(e),Ke(e,"beforeCreate"),function(t){var e=de(t.$options.inject,t);e&&(wt(!1),Object.keys(e).forEach((function(n){kt(t,n,e[n])})),wt(!0))}(e),vn(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),Ke(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(wn),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Et,t.prototype.$delete=Ot,t.prototype.$watch=function(t,e,n){if(l(e))return yn(this,t,e,n);(n=n||{}).user=!0;var r=new fn(this,t,e,n);if(n.immediate)try{e.call(this,r.value)}catch(t){zt(t,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(wn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var i=0,o=t.length;i1?O(n):n;for(var r=O(arguments,1),i='event handler for "'+t+'"',o=0,a=n.length;oparseInt(this.max)&&On(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return N}};Object.defineProperty(t,"config",e),t.util={warn:ct,extend:M,mergeOptions:Rt,defineReactive:kt},t.set=Et,t.delete=Ot,t.nextTick=ee,t.observable=function(t){return St(t),t},t.options=Object.create(null),D.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,M(t.options.components,Tn),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Rt(this.options,t),this}}(t),Cn(t),function(t){D.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&l(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(wn),Object.defineProperty(wn.prototype,"$isServer",{get:rt}),Object.defineProperty(wn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(wn,"FunctionalRenderContext",{value:Ie}),wn.version="2.6.12";var Bn=g("style,class"),In=g("input,textarea,option,select,progress"),$n=g("contenteditable,draggable,spellcheck"),Pn=g("events,caret,typing,plaintext-only"),jn=g("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Rn="http://www.w3.org/1999/xlink",Dn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Ln=function(t){return Dn(t)?t.slice(6,t.length):""},Nn=function(t){return null==t||!1===t};function Un(t){for(var e=t.data,n=t,r=t;o(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=Fn(r.data,e));for(;o(n=n.parent);)n&&n.data&&(e=Fn(e,n.data));return function(t,e){if(o(t)||o(e))return zn(t,Vn(e));return""}(e.staticClass,e.class)}function Fn(t,e){return{staticClass:zn(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function zn(t,e){return t?e?t+" "+e:t:e||""}function Vn(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,i=t.length;r-1?fr(t,e,n):jn(e)?Nn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):$n(e)?t.setAttribute(e,function(t,e){return Nn(e)||"false"===e?"false":"contenteditable"===t&&Pn(e)?e:"true"}(e,n)):Dn(e)?Nn(n)?t.removeAttributeNS(Rn,Ln(e)):t.setAttributeNS(Rn,e,n):fr(t,e,n)}function fr(t,e,n){if(Nn(n))t.removeAttribute(e);else{if(Y&&!J&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var pr={create:lr,update:lr};function hr(t,e){var n=e.elm,r=e.data,a=t.data;if(!(i(r.staticClass)&&i(r.class)&&(i(a)||i(a.staticClass)&&i(a.class)))){var s=Un(e),c=n._transitionClasses;o(c)&&(s=zn(s,Vn(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var vr,gr={create:hr,update:hr};function mr(t,e,n){var r=vr;return function i(){var o=e.apply(null,arguments);null!==o&&yr(t,i,n,r)}}var Ar=qt&&!(K&&Number(K[1])<=53);function _r(t,e,n,r){if(Ar){var i=sn,o=e;e=o._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=i||t.timeStamp<=0||t.target.ownerDocument!==document)return o.apply(this,arguments)}}vr.addEventListener(t,e,et?{capture:n,passive:r}:n)}function yr(t,e,n,r){(r||vr).removeEventListener(t,e._wrapper||e,n)}function br(t,e){if(!i(t.data.on)||!i(e.data.on)){var n=e.data.on||{},r=t.data.on||{};vr=e.elm,function(t){if(o(t.__r)){var e=Y?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}o(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(n),ae(n,r,_r,yr,mr,e.context),vr=void 0}}var xr,wr={create:br,update:br};function Cr(t,e){if(!i(t.data.domProps)||!i(e.data.domProps)){var n,r,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=M({},c)),s)n in c||(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=r;var u=i(r)?"":String(r);Sr(a,u)&&(a.value=u)}else if("innerHTML"===n&&Qn(a.tagName)&&i(a.innerHTML)){(xr=xr||document.createElement("div")).innerHTML=""+r+"";for(var l=xr.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(r!==s[n])try{a[n]=r}catch(t){}}}}function Sr(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var kr={create:Cr,update:Cr},Er=b((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function Or(t){var e=Mr(t.style);return t.staticStyle?M(t.staticStyle,e):e}function Mr(t){return Array.isArray(t)?T(t):"string"==typeof t?Er(t):t}var Tr,Br=/^--/,Ir=/\s*!important$/,$r=function(t,e,n){if(Br.test(e))t.style.setProperty(e,n);else if(Ir.test(n))t.style.setProperty(k(e),n.replace(Ir,""),"important");else{var r=jr(e);if(Array.isArray(n))for(var i=0,o=n.length;i-1?e.split(Lr).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Ur(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Lr).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Fr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&M(e,zr(t.name||"v")),M(e,t),e}return"string"==typeof t?zr(t):void 0}}var zr=b((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Vr=H&&!J,Gr="transition",Hr="transitionend",Qr="animation",qr="animationend";Vr&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Gr="WebkitTransition",Hr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Qr="WebkitAnimation",qr="webkitAnimationEnd"));var Wr=H?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Yr(t){Wr((function(){Wr(t)}))}function Jr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Nr(t,e))}function Xr(t,e){t._transitionClasses&&A(t._transitionClasses,e),Ur(t,e)}function Zr(t,e,n){var r=ti(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s="transition"===i?Hr:qr,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n="transition",l=a,d=o.length):"animation"===e?u>0&&(n="animation",l=u,d=c.length):d=(n=(l=Math.max(a,u))>0?a>u?"transition":"animation":null)?"transition"===n?o.length:c.length:0,{type:n,timeout:l,propCount:d,hasTransform:"transition"===n&&Kr.test(r[Gr+"Property"])}}function ei(t,e){for(;t.length1}function si(t,e){!0!==e.data.show&&ri(e)}var ci=function(t){var e,n,r={},c=t.modules,u=t.nodeOps;for(e=0;eh?_(t,i(n[m+1])?null:n[m+1].elm,n,p,m,r):p>m&&b(e,f,h)}(f,g,m,n,l):o(m)?(o(t.text)&&u.setTextContent(f,""),_(f,null,m,0,m.length-1,n)):o(g)?b(g,0,g.length-1):o(t.text)&&u.setTextContent(f,""):t.text!==e.text&&u.setTextContent(f,e.text),o(h)&&o(p=h.hook)&&o(p=p.postpatch)&&p(t,e)}}}function S(t,e,n){if(a(n)&&o(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==o&&(a.selected=o);else if(P(pi(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function fi(t,e){return e.every((function(e){return!P(e,t)}))}function pi(t){return"_value"in t?t._value:t.value}function hi(t){t.target.composing=!0}function vi(t){t.target.composing&&(t.target.composing=!1,gi(t.target,"input"))}function gi(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function mi(t){return!t.componentInstance||t.data&&t.data.transition?t:mi(t.componentInstance._vnode)}var Ai={model:ui,show:{bind:function(t,e,n){var r=e.value,i=(n=mi(n)).data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,ri(n,(function(){t.style.display=o}))):t.style.display=r?o:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=mi(n)).data&&n.data.transition?(n.data.show=!0,r?ri(n,(function(){t.style.display=t.__vOriginalDisplay})):ii(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}}},_i={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function yi(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?yi(Ge(e.children)):t}function bi(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[w(o)]=i[o];return e}function xi(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var wi=function(t){return t.tag||Ve(t)},Ci=function(t){return"show"===t.name},Si={name:"transition",props:_i,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(wi)).length){0;var r=this.mode;0;var i=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var o=yi(i);if(!o)return i;if(this._leaving)return xi(t,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var c=(o.data||(o.data={})).transition=bi(this),u=this._vnode,l=yi(u);if(o.data.directives&&o.data.directives.some(Ci)&&(o.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(o,l)&&!Ve(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var d=l.data.transition=M({},c);if("out-in"===r)return this._leaving=!0,se(d,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),xi(t,i);if("in-out"===r){if(Ve(o))return u;var f,p=function(){f()};se(c,"afterEnter",p),se(c,"enterCancelled",p),se(d,"delayLeave",(function(t){f=t}))}}return i}}},ki=M({tag:String,moveClass:String},_i);function Ei(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Oi(t){t.data.newPos=t.elm.getBoundingClientRect()}function Mi(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete ki.mode;var Ti={Transition:Si,TransitionGroup:{props:ki,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var i=Je(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,i(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=bi(this),s=0;s-1?Wn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Wn[t]=/HTMLUnknownElement/.test(e.toString())},M(wn.options.directives,Ai),M(wn.options.components,Ti),wn.prototype.__patch__=H?ci:B,wn.prototype.$mount=function(t,e){return function(t,e,n){var r;return t.$el=e,t.$options.render||(t.$options.render=gt),Ke(t,"beforeMount"),r=function(){t._update(t._render(),n)},new fn(t,r,B,{before:function(){t._isMounted&&!t._isDestroyed&&Ke(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,Ke(t,"mounted")),t}(this,t=t&&H?function(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}(t):void 0,e)},H&&setTimeout((function(){N.devtools&&it&&it.emit("init",wn)}),0),e.default=wn}.call(this,n(45),n(466).setImmediate)},function(t,e){t.exports=!1},function(t,e,n){var r=n(47)("meta"),i=n(9),o=n(21),a=n(13).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(8)((function(){return c(Object.preventExtensions({}))})),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},d=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&d.NEED&&c(t)&&!o(t,r)&&l(t),t}}},function(t,e,n){var r=n(10)("unscopables"),i=Array.prototype;null==i[r]&&n(17)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){"use strict";var r=n(83),i=n(117);function o(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function s(t){o(a,r,i,s,c,"next",t)}function c(t){o(a,r,i,s,c,"throw",t)}s(void 0)}))}}e.a={methods:{playSound:function(t,e){var n=this,o=this.$store.getters.getResourceConfig;if(o&&o.sound_volume){var a=new i.Howl({src:[t],loop:e,volume:parseFloat(o.sound_volume),onend:function(){n.$store.getters.getPanicActive||a.loop(!1)}});Object(r.debounce)((function(){return a.play()}),1500)()}},playPromise:function(t){var e=this;return new Promise((function(n){var r=e.$store.getters.getResourceConfig;r&&r.sound_volume?new i.Howl({src:t,volume:parseFloat(r.sound_volume),onend:function(){return n()}}).play():n()}))},playSounds:function(t){var e=this;return a(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=a(regeneratorRuntime.mark((function n(r){var i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=0;case 1:if(!(idocument.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(122),i=n(92).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(7),i=n(13),o=n(12),a=n(10)("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(29),i=n(135),o=n(104),a=n(4),s=n(11),c=n(106),u={},l={};(e=t.exports=function(t,e,n,d,f){var p,h,v,g,m=f?function(){return t}:c(t),A=r(n,d,e?2:1),_=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(o(m)){for(p=s(t.length);p>_;_++)if((g=e?A(a(h=t[_])[0],h[1]):A(t[_]))===u||g===l)return g}else for(v=m.call(t);!(h=v.next()).done;)if((g=i(v,A,h.value,e))===u||g===l)return g}).BREAK=u,e.RETURN=l},function(t,e,n){var r=n(18);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){var r=n(9);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";var r=function(){var t=this.$createElement;this._self._c;return this._m(0)};r._withStripped=!0;n(550);var i=n(1),o=Object(i.a)({},r,[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"message"}},[e("h1",[this._v("Coming soon")]),this._v(" "),e("p",[this._v("\n This MDT is currently under development. While it has many working\n features, some of the functionality has not yet been added. If you\n are seeing this message it is because the area you are trying to\n access is not yet complete. Thank you for your patience, new\n functionality is being added as soon as development of it is\n complete.\n ")])])}],!1,null,"668ff500",null);o.options.__file="src/components/reusable/ComingSoon.vue";e.a=o.exports},function(t,e,n){var r=n(13).f,i=n(21),o=n(10)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(30),i=n(10)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(0),i=n(34),o=n(8),a=n(95),s="["+a+"]",c=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),l=function(t,e,n){var i={},s=o((function(){return!!a[t]()||"​…"!="​…"[t]()})),c=i[t]=s?e(d):a[t];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},d=l.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(u,"")),t};t.exports=l},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"markers-container"},this._l(this.markers,(function(t){return e("Alert",{key:t.id,staticClass:"marker",attrs:{text:t.name,icon:"fa-exclamation-circle"}})})),1)};r._withStripped=!0;var i=n(63),o={props:{markers:{type:Array,required:!0}},components:{Alert:i.a}},a=(n(512),n(1)),s=Object(a.a)(o,r,[],!1,null,"c888e104",null);s.options.__file="src/components/reusable/Citizen/Markers.vue";e.a=s.exports},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"alert"},[t.icon?n("i",{class:["fas",t.icon]}):t._e(),t._v(" "),t.text&&t.text.length>0?n("div",{staticClass:"alert-text"},[t._v(t._s(t.text))]):t._e()])};r._withStripped=!0;var i={props:{icon:{type:String,required:!1},text:{type:String,required:!1}}},o=(n(510),n(1)),a=Object(o.a)(i,r,[],!1,null,"1500cc70",null);a.options.__file="src/components/reusable/widgets/Alert.vue";e.a=a.exports},function(t,e,n){var r=n(28),i=n(7),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(40)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(30);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";var r=n(4);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(4),i=n(15),o=n(10)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r=n(22),i=n(11),o=n(49);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(30);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(31),i=n(34);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){var r=n(9),i=n(30),o=n(10)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(10)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(59),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){"use strict";n(139);var r=n(18),i=n(17),o=n(8),a=n(34),s=n(10),c=n(110),u=s("species"),l=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var f=s(t),p=!o((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),h=p?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[u]=function(){return n}),n[f](""),!e})):void 0;if(!p||!h||"replace"===t&&!l||"split"===t&&!d){var v=/./[f],g=n(a,f,""[t],(function(t,e,n,r,i){return e.exec===c?p&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),m=g[0],A=g[1];r(String.prototype,t,m),i(RegExp.prototype,f,2==e?function(t,e){return A.call(t,this,e)}:function(t){return A.call(t,this)})}}},function(t,e,n){var r=n(7).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";var r=n(7),i=n(0),o=n(18),a=n(55),s=n(41),c=n(54),u=n(53),l=n(9),d=n(8),f=n(74),p=n(58),h=n(96);t.exports=function(t,e,n,v,g,m){var A=r[t],_=A,y=g?"set":"add",b=_&&_.prototype,x={},w=function(t){var e=b[t];o(b,t,"delete"==t||"has"==t?function(t){return!(m&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof _&&(m||b.forEach&&!d((function(){(new _).entries().next()})))){var C=new _,S=C[y](m?{}:-0,1)!=C,k=d((function(){C.has(1)})),E=f((function(t){new _(t)})),O=!m&&d((function(){for(var t=new _,e=5;e--;)t[y](e,e);return!t.has(-0)}));E||((_=e((function(e,n){u(e,_,t);var r=h(new A,e,_);return null!=n&&c(n,g,r[y],r),r}))).prototype=b,b.constructor=_),(k||O)&&(w("delete"),w("has"),g&&w("get")),(O||S)&&w(y),m&&b.clear&&delete b.clear}else _=v.getConstructor(e,t,g,y),a(_.prototype,n),s.NEED=!0;return p(_,t),x[t]=_,i(i.G+i.W+i.F*(_!=A),x),m||v.setStrong(_,t,g),_}},function(t,e,n){for(var r,i=n(7),o=n(17),a=n(47),s=a("typed_array"),c=a("view"),u=!(!i.ArrayBuffer||!i.DataView),l=u,d=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)(r=i[f[d++]])?(o(r.prototype,s,!0),o(r.prototype,c,!0)):l=!1;t.exports={ABV:u,CONSTR:l,TYPED:s,VIEW:c}},function(t,e,n){"use strict";t.exports=n(40)||!n(8)((function(){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete n(7)[t]}))},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){"use strict";var r=n(0),i=n(15),o=n(29),a=n(54);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,c=arguments[1];return i(this),(e=void 0!==c)&&i(c),null==t?new this:(n=[],e?(r=0,s=o(c,arguments[2],2),a(t,!1,(function(t){n.push(s(t,r++))}))):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){!function(t){"use strict";function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=3?"mounted":"bind"}var d={install:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.lock,a=void 0!==r&&r,d=n.listenTo,f=void 0===d?"keyup":d,p=n.defaultTime,h=void 0===p?"300ms":p,v=n.fireOnEmpty,g=void 0!==v&&v,m=n.cancelOnEmpty,A=void 0!==m&&m;t.directive("debounce",e({},l(t.version),(function(t,e){var n=e.value,r=e.arg,l=void 0===r?h:r,d=e.modifiers,p=Object.assign({fireonempty:g,cancelonempty:A,lock:a},d),v=o(t.attributes,f),m=i((function(t){n(t.target.value,t)}),l);function _(t){s(t.target.value,p)?m.cancel():c(t.key,p)||u(t.target.value,p)?(m.cancel(),n(t.target.value,t)):m(t)}v.forEach((function(e){t.addEventListener(e,_)}))})))}};t.debounce=i,t.default=d,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=6)}([function(t,e,n){var r=n(8);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),(0,n(4).default)("7ec05f6c",r,!1,{})},function(t,e,n){var r=n(10);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),(0,n(4).default)("3453d19d",r,!1,{})},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,r=t[1]||"",i=t[3];if(!i)return r;if(e&&"function"==typeof btoa){var o=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i div[data-v-61d92e31] {\n cursor: pointer;\n padding: 3px 6px;\n width: 100%;\n}\n.ti-selected-item[data-v-61d92e31] {\n background-color: #5C6BC0;\n color: #fff;\n}\n',"",{version:3,sources:["C:/Users/johan/dev/vue-tags-input/vue-tags-input/C:/Users/johan/dev/vue-tags-input/vue-tags-input/vue-tags-input.scss"],names:[],mappings:"AAAA;EACE,uBAAuB;EACvB,mCAA8C;EAC9C,+JAAuM;EACvM,oBAAoB;EACpB,mBAAmB;CAAE;AAEvB;EACE,kCAAkC;EAClC,YAAY;EACZ,mBAAmB;EACnB,oBAAoB;EACpB,qBAAqB;EACrB,qBAAqB;EACrB,eAAe;EACf,oCAAoC;EACpC,mCAAmC;CAAE;AAEvC;EACE,iBAAiB;CAAE;AAErB;EACE,iBAAiB;CAAE;AAErB;EACE,iBAAiB;CAAE;AAErB;EACE,YAAY;EACZ,aAAa;EACb,sBAAsB;CAAE;AAE1B;EACE,uBAAuB;CAAE;AAE3B;EACE,cAAc;CAAE;AAElB;EACE,8BAA8B;CAAE;AAElC;EACE,iBAAiB;EACjB,mBAAmB;EACnB,uBAAuB;CAAE;AAE3B;EACE,aAAa;CAAE;AACf;IACE,gBAAgB;CAAE;AAEtB;EACE,uBAAuB;EACvB,cAAc;EACd,aAAa;EACb,gBAAgB;CAAE;AAEpB;EACE,cAAc;EACd,gBAAgB;EAChB,YAAY;EACZ,iBAAiB;CAAE;AAErB;EACE,0BAA0B;EAC1B,YAAY;EACZ,mBAAmB;EACnB,cAAc;EACd,iBAAiB;EACjB,YAAY;EACZ,iBAAiB;CAAE;AACnB;IACE,cAAc;CAAE;AAClB;IACE,cAAc;IACd,oBAAoB;CAAE;AACxB;IACE,mBAAmB;CAAE;AACvB;IACE,mBAAmB;CAAE;AACvB;IACE,mBAAmB;IACnB,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;CAAE;AACrB;IACE,iBAAiB;IACjB,cAAc;IACd,oBAAoB;IACpB,kBAAkB;CAAE;AACpB;MACE,gBAAgB;CAAE;AACtB;IACE,kBAAkB;CAAE;AACtB;IACE,0BAA0B;CAAE;AAEhC;EACE,cAAc;EACd,eAAe;EACf,iBAAiB;EACjB,YAAY;EACZ,iBAAiB;CAAE;AACnB;IACE,eAAe;IACf,iBAAiB;IACjB,aAAa;IACb,aAAa;IACb,YAAY;CAAE;AAElB;EACE,qBAAqB;CAAE;AAEzB;EACE,uBAAuB;EACvB,iBAAiB;EACjB,mBAAmB;EACnB,YAAY;EACZ,uBAAuB;EACvB,YAAY;CAAE;AAEhB;EACE,gBAAgB;EAChB,iBAAiB;EACjB,YAAY;CAAE;AAEhB;EACE,0BAA0B;EAC1B,YAAY;CAAE",file:"vue-tags-input.scss?vue&type=style&index=0&id=61d92e31&lang=scss&scoped=true&",sourcesContent:['@font-face {\n font-family: \'icomoon\';\n src: url("./assets/fonts/icomoon.eot?7grlse");\n src: url("./assets/fonts/icomoon.eot?7grlse#iefix") format("embedded-opentype"), url("./assets/fonts/icomoon.ttf?7grlse") format("truetype"), url("./assets/fonts/icomoon.woff?7grlse") format("woff");\n font-weight: normal;\n font-style: normal; }\n\n[class^="ti-icon-"], [class*=" ti-icon-"] {\n font-family: \'icomoon\' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale; }\n\n.ti-icon-check:before {\n content: "\\e902"; }\n\n.ti-icon-close:before {\n content: "\\e901"; }\n\n.ti-icon-undo:before {\n content: "\\e900"; }\n\nul {\n margin: 0px;\n padding: 0px;\n list-style-type: none; }\n\n*, *:before, *:after {\n box-sizing: border-box; }\n\ninput:focus {\n outline: none; }\n\ninput[disabled] {\n background-color: transparent; }\n\n.vue-tags-input {\n max-width: 450px;\n position: relative;\n background-color: #fff; }\n\ndiv.vue-tags-input.disabled {\n opacity: 0.5; }\n div.vue-tags-input.disabled * {\n cursor: default; }\n\n.ti-input {\n border: 1px solid #ccc;\n display: flex;\n padding: 4px;\n flex-wrap: wrap; }\n\n.ti-tags {\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n line-height: 1em; }\n\n.ti-tag {\n background-color: #5C6BC0;\n color: #fff;\n border-radius: 2px;\n display: flex;\n padding: 3px 5px;\n margin: 2px;\n font-size: .85em; }\n .ti-tag:focus {\n outline: none; }\n .ti-tag .ti-content {\n display: flex;\n align-items: center; }\n .ti-tag .ti-tag-center {\n position: relative; }\n .ti-tag span {\n line-height: .85em; }\n .ti-tag span.ti-hidden {\n padding-left: 14px;\n visibility: hidden;\n height: 0px;\n white-space: pre; }\n .ti-tag .ti-actions {\n margin-left: 2px;\n display: flex;\n align-items: center;\n font-size: 1.15em; }\n .ti-tag .ti-actions i {\n cursor: pointer; }\n .ti-tag:last-child {\n margin-right: 4px; }\n .ti-tag.ti-invalid, .ti-tag.ti-tag.ti-deletion-mark {\n background-color: #e54d42; }\n\n.ti-new-tag-input-wrapper {\n display: flex;\n flex: 1 0 auto;\n padding: 3px 5px;\n margin: 2px;\n font-size: .85em; }\n .ti-new-tag-input-wrapper input {\n flex: 1 0 auto;\n min-width: 100px;\n border: none;\n padding: 0px;\n margin: 0px; }\n\n.ti-new-tag-input {\n line-height: initial; }\n\n.ti-autocomplete {\n border: 1px solid #ccc;\n border-top: none;\n position: absolute;\n width: 100%;\n background-color: #fff;\n z-index: 20; }\n\n.ti-item > div {\n cursor: pointer;\n padding: 3px 6px;\n width: 100%; }\n\n.ti-selected-item {\n background-color: #5C6BC0;\n color: #fff; }\n'],sourceRoot:""}])},function(t,e,n){"use strict";t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e){t.exports="data:font/ttf;base64,AAEAAAALAIAAAwAwT1MvMg8SBawAAAC8AAAAYGNtYXAXVtKJAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZqWfozAAAAF4AAAA/GhlYWQPxZgIAAACdAAAADZoaGVhB4ADyAAAAqwAAAAkaG10eBIAAb4AAALQAAAAHGxvY2EAkgDiAAAC7AAAABBtYXhwAAkAHwAAAvwAAAAgbmFtZZlKCfsAAAMcAAABhnBvc3QAAwAAAAAEpAAAACAAAwOAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpAgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6QL//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAFYBAQO+AoEAHAAAATIXHgEXFhcHJicuAScmIyIGBxchERc2Nz4BNzYCFkpDQ28pKRdkECAfVTM0OT9wLZz+gJgdIiJLKSgCVRcYUjg5QiAzKys+ERIrJZoBgJoZFRQcCAgAAQDWAIEDKgLVAAsAAAEHFwcnByc3JzcXNwMq7u487u487u487u4Cme7uPO7uPO7uPO7uAAEAkgCBA4ACvQAFAAAlARcBJzcBgAHEPP4A7jz5AcQ8/gDuPAAAAAABAAAAAAAAH8nTUV8PPPUACwQAAAAAANZ1KhsAAAAA1nUqGwAAAAADvgLVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAO+AAEAAAAAAAAAAAAAAAAAAAAHBAAAAAAAAAAAAAAAAgAAAAQAAFYEAADWBAAAkgAAAAAACgAUAB4AUABqAH4AAQAAAAcAHQABAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGljb21vb24AaQBjAG8AbQBvAG8AblZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb21vb24AaQBjAG8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AblJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb21vb24AaQBjAG8AbQBvAG8AbkZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="},function(t,e){t.exports="data:font/woff;base64,d09GRgABAAAAAAUQAAsAAAAABMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIFrGNtYXAAAAFoAAAAVAAAAFQXVtKJZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAPwAAAD8pZ+jMGhlYWQAAALAAAAANgAAADYPxZgIaGhlYQAAAvgAAAAkAAAAJAeAA8hobXR4AAADHAAAABwAAAAcEgABvmxvY2EAAAM4AAAAEAAAABAAkgDibWF4cAAAA0gAAAAgAAAAIAAJAB9uYW1lAAADaAAAAYYAAAGGmUoJ+3Bvc3QAAATwAAAAIAAAACAAAwAAAAMDgAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6QIDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkC//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQBWAQEDvgKBABwAAAEyFx4BFxYXByYnLgEnJiMiBgcXIREXNjc+ATc2AhZKQ0NvKSkXZBAgH1UzNDk/cC2c/oCYHSIiSykoAlUXGFI4OUIgMysrPhESKyWaAYCaGRUUHAgIAAEA1gCBAyoC1QALAAABBxcHJwcnNyc3FzcDKu7uPO7uPO7uPO7uApnu7jzu7jzu7jzu7gABAJIAgQOAAr0ABQAAJQEXASc3AYABxDz+AO48+QHEPP4A7jwAAAAAAQAAAAAAAB/J01FfDzz1AAsEAAAAAADWdSobAAAAANZ1KhsAAAAAA74C1QAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAADvgABAAAAAAAAAAAAAAAAAAAABwQAAAAAAAAAAAAAAAIAAAAEAABWBAAA1gQAAJIAAAAAAAoAFAAeAFAAagB+AAEAAAAHAB0AAQAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAHAAAAAQAAAAAAAgAHAGAAAQAAAAAAAwAHADYAAQAAAAAABAAHAHUAAQAAAAAABQALABUAAQAAAAAABgAHAEsAAQAAAAAACgAaAIoAAwABBAkAAQAOAAcAAwABBAkAAgAOAGcAAwABBAkAAwAOAD0AAwABBAkABAAOAHwAAwABBAkABQAWACAAAwABBAkABgAOAFIAAwABBAkACgA0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vue-tags-input",class:[{"ti-disabled":t.disabled},{"ti-focus":t.focused}]},[n("div",{staticClass:"ti-input"},[t.tagsCopy?n("ul",{staticClass:"ti-tags"},[t._l(t.tagsCopy,(function(e,r){return n("li",{key:r,staticClass:"ti-tag",class:[{"ti-editing":t.tagsEditStatus[r]},e.tiClasses,e.classes,{"ti-deletion-mark":t.isMarked(r)}],style:e.style,attrs:{tabindex:"0"},on:{click:function(n){return t.$emit("tag-clicked",{tag:e,index:r})}}},[n("div",{staticClass:"ti-content"},[t.$scopedSlots["tag-left"]?n("div",{staticClass:"ti-tag-left"},[t._t("tag-left",null,{tag:e,index:r,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)})],2):t._e(),t._v(" "),n("div",{ref:"tagCenter",refInFor:!0,staticClass:"ti-tag-center"},[t.$scopedSlots["tag-center"]?t._e():n("span",{class:{"ti-hidden":t.tagsEditStatus[r]},on:{click:function(e){return t.performEditTag(r)}}},[t._v(t._s(e.text))]),t._v(" "),t.$scopedSlots["tag-center"]?t._e():n("tag-input",{attrs:{scope:{edit:t.tagsEditStatus[r],maxlength:t.maxlength,tag:e,index:r,validateTag:t.createChangedTag,performCancelEdit:t.cancelEdit,performSaveEdit:t.performSaveTag}}}),t._v(" "),t._t("tag-center",null,{tag:e,index:r,maxlength:t.maxlength,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,validateTag:t.createChangedTag,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)})],2),t._v(" "),t.$scopedSlots["tag-right"]?n("div",{staticClass:"ti-tag-right"},[t._t("tag-right",null,{tag:e,index:r,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)})],2):t._e()]),t._v(" "),n("div",{staticClass:"ti-actions"},[t.$scopedSlots["tag-actions"]?t._e():n("i",{directives:[{name:"show",rawName:"v-show",value:t.tagsEditStatus[r],expression:"tagsEditStatus[index]"}],staticClass:"ti-icon-undo",on:{click:function(e){return t.cancelEdit(r)}}}),t._v(" "),t.$scopedSlots["tag-actions"]?t._e():n("i",{directives:[{name:"show",rawName:"v-show",value:!t.tagsEditStatus[r],expression:"!tagsEditStatus[index]"}],staticClass:"ti-icon-close",on:{click:function(e){return t.performDeleteTag(r)}}}),t._v(" "),t.$scopedSlots["tag-actions"]?t._t("tag-actions",null,{tag:e,index:r,edit:t.tagsEditStatus[r],performSaveEdit:t.performSaveTag,performDelete:t.performDeleteTag,performCancelEdit:t.cancelEdit,performOpenEdit:t.performEditTag,deletionMark:t.isMarked(r)}):t._e()],2)])})),t._v(" "),n("li",{staticClass:"ti-new-tag-input-wrapper"},[n("input",t._b({ref:"newTagInput",staticClass:"ti-new-tag-input",class:[t.createClasses(t.newTag,t.tags,t.validation,t.isDuplicate)],attrs:{placeholder:t.placeholder,maxlength:t.maxlength,disabled:t.disabled,type:"text",size:"1"},domProps:{value:t.newTag},on:{keydown:[function(e){return t.performAddTags(t.filteredAutocompleteItems[t.selectedItem]||t.newTag,e)},function(e){return e.type.indexOf("key")||8===e.keyCode?t.invokeDelete(e):null},function(e){return e.type.indexOf("key")||9===e.keyCode?t.performBlur(e):null},function(e){return e.type.indexOf("key")||38===e.keyCode?t.selectItem(e,"before"):null},function(e){return e.type.indexOf("key")||40===e.keyCode?t.selectItem(e,"after"):null}],paste:t.addTagsFromPaste,input:t.updateNewTag,blur:function(e){return t.$emit("blur",e)},focus:function(e){t.focused=!0,t.$emit("focus",e)},click:function(e){!t.addOnlyFromAutocomplete&&(t.selectedItem=null)}}},"input",t.$attrs,!1))])],2):t._e()]),t._v(" "),t._t("between-elements"),t._v(" "),t.autocompleteOpen?n("div",{staticClass:"ti-autocomplete",on:{mouseout:function(e){t.selectedItem=null}}},[t._t("autocomplete-header"),t._v(" "),n("ul",t._l(t.filteredAutocompleteItems,(function(e,r){return n("li",{key:r,staticClass:"ti-item",class:[e.tiClasses,e.classes,{"ti-selected-item":t.isSelected(r)}],style:e.style,on:{mouseover:function(e){!t.disabled&&(t.selectedItem=r)}}},[t.$scopedSlots["autocomplete-item"]?t._t("autocomplete-item",null,{item:e,index:r,performAdd:function(e){return t.performAddTags(e,void 0,"autocomplete")},selected:t.isSelected(r)}):n("div",{on:{click:function(n){return t.performAddTags(e,void 0,"autocomplete")}}},[t._v("\n "+t._s(e.text)+"\n ")])],2)})),0),t._v(" "),t._t("autocomplete-footer")],2):t._e()],2)};r._withStripped=!0;var i=n(5),o=n.n(i),a=function(t){return JSON.parse(JSON.stringify(t))},s=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0;void 0===t.text&&(t={text:t});var i=function(t,e){return e.filter((function(e){var n=t.text;return"string"==typeof e.rule?!new RegExp(e.rule).test(n):e.rule instanceof RegExp?!e.rule.test(n):"[object Function]"==={}.toString.call(e.rule)?e.rule(t):void 0})).map((function(t){return t.classes}))}(t,n),o=function(t,e){for(var n=0;n1?n-1:0),i=1;i1?e-1:0),r=1;r=this.autocompleteMinLength&&this.filteredAutocompleteItems.length>0&&this.focused},filteredAutocompleteItems:function(){var t=this,e=this.autocompleteItems.map((function(e){return c(e,t.tags,t.validation,t.isDuplicate)}));return this.autocompleteFilterDuplicates?e.filter(this.duplicateFilter):e}},methods:{createClasses:s,getSelectedIndex:function(t){var e=this.filteredAutocompleteItems,n=this.selectedItem,r=e.length-1;if(0!==e.length)return null===n?0:"before"===t&&0===n?r:"after"===t&&n===r?0:"after"===t?n+1:n-1},selectDefaultItem:function(){this.addOnlyFromAutocomplete&&this.filteredAutocompleteItems.length>0?this.selectedItem=0:this.selectedItem=null},selectItem:function(t,e){t.preventDefault(),this.selectedItem=this.getSelectedIndex(e)},isSelected:function(t){return this.selectedItem===t},isMarked:function(t){return this.deletionMark===t},invokeDelete:function(){var t=this;if(this.deleteOnBackspace&&!(this.newTag.length>0)){var e=this.tagsCopy.length-1;null===this.deletionMark?(this.deletionMarkTime=setTimeout((function(){return t.deletionMark=null}),1e3),this.deletionMark=e):this.performDeleteTag(e)}},addTagsFromPaste:function(){var t=this;this.addFromPaste&&setTimeout((function(){return t.performAddTags(t.newTag)}),10)},performEditTag:function(t){var e=this;this.allowEditTags&&(this._events["before-editing-tag"]||this.editTag(t),this.$emit("before-editing-tag",{index:t,tag:this.tagsCopy[t],editTag:function(){return e.editTag(t)}}))},editTag:function(t){this.allowEditTags&&(this.toggleEditMode(t),this.focus(t))},toggleEditMode:function(t){this.allowEditTags&&!this.disabled&&this.$set(this.tagsEditStatus,t,!this.tagsEditStatus[t])},createChangedTag:function(t,e){var n=this.tagsCopy[t];n.text=e?e.target.value:this.tagsCopy[t].text,this.$set(this.tagsCopy,t,c(n,this.tagsCopy,this.validation,this.isDuplicate))},focus:function(t){var e=this;this.$nextTick((function(){var n=e.$refs.tagCenter[t].querySelector("input.ti-tag-input");n&&n.focus()}))},quote:function(t){return t.replace(/([()[{*+.$^\\|?])/g,"\\$1")},cancelEdit:function(t){this.tags[t]&&(this.tagsCopy[t]=a(c(this.tags[t],this.tags,this.validation,this.isDuplicate)),this.$set(this.tagsEditStatus,t,!1))},hasForbiddingAddRule:function(t){var e=this;return t.some((function(t){var n=e.validation.find((function(e){return t===e.classes}));return!!n&&n.disableAdd}))},createTagTexts:function(t){var e=this,n=new RegExp(this.separators.map((function(t){return e.quote(t)})).join("|"));return t.split(n).map((function(t){return{text:t}}))},performDeleteTag:function(t){var e=this;this._events["before-deleting-tag"]||this.deleteTag(t),this.$emit("before-deleting-tag",{index:t,tag:this.tagsCopy[t],deleteTag:function(){return e.deleteTag(t)}})},deleteTag:function(t){this.disabled||(this.deletionMark=null,clearTimeout(this.deletionMarkTime),this.tagsCopy.splice(t,1),this._events["update:tags"]&&this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},noTriggerKey:function(t,e){var n=-1!==this[e].indexOf(t.keyCode)||-1!==this[e].indexOf(t.key);return n&&t.preventDefault(),!n},performAddTags:function(t,e,n){var r=this;if(!(this.disabled||e&&this.noTriggerKey(e,"addOnKey"))){var i=[];"object"===A(t)&&(i=[t]),"string"==typeof t&&(i=this.createTagTexts(t)),(i=i.filter((function(t){return t.text.trim().length>0}))).forEach((function(t){t=c(t,r.tags,r.validation,r.isDuplicate),r._events["before-adding-tag"]||r.addTag(t,n),r.$emit("before-adding-tag",{tag:t,addTag:function(){return r.addTag(t,n)}})}))}},duplicateFilter:function(t){return this.isDuplicate?!this.isDuplicate(this.tagsCopy,t):!this.tagsCopy.find((function(e){return e.text===t.text}))},addTag:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"new-tag-input",r=this.filteredAutocompleteItems.map((function(t){return t.text}));this.addOnlyFromAutocomplete&&-1===r.indexOf(t.text)||this.$nextTick((function(){return e.maxTags&&e.maxTags<=e.tagsCopy.length?e.$emit("max-tags-reached",t):e.avoidAddingDuplicates&&!e.duplicateFilter(t)?e.$emit("adding-duplicate",t):void(e.hasForbiddingAddRule(t.tiClasses)||(e.$emit("input",""),e.tagsCopy.push(t),e._events["update:tags"]&&e.$emit("update:tags",e.tagsCopy),"autocomplete"===n&&e.$refs.newTagInput.focus(),e.$emit("tags-changed",e.tagsCopy)))}))},performSaveTag:function(t,e){var n=this,r=this.tagsCopy[t];this.disabled||e&&this.noTriggerKey(e,"addOnKey")||0!==r.text.trim().length&&(this._events["before-saving-tag"]||this.saveTag(t,r),this.$emit("before-saving-tag",{index:t,tag:r,saveTag:function(){return n.saveTag(t,r)}}))},saveTag:function(t,e){if(this.avoidAddingDuplicates){var n=a(this.tagsCopy),r=n.splice(t,1)[0];if(this.isDuplicate?this.isDuplicate(n,r):-1!==n.map((function(t){return t.text})).indexOf(r.text))return this.$emit("saving-duplicate",e)}this.hasForbiddingAddRule(e.tiClasses)||(this.$set(this.tagsCopy,t,e),this.toggleEditMode(t),this._events["update:tags"]&&this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},tagsEqual:function(){var t=this;return!this.tagsCopy.some((function(e,n){return!o()(e,t.tags[n])}))},updateNewTag:function(t){var e=t.target.value;this.newTag=e,this.$emit("input",e)},initTags:function(){this.tagsCopy=u(this.tags,this.validation,this.isDuplicate),this.tagsEditStatus=a(this.tags).map((function(){return!1})),this._events["update:tags"]&&!this.tagsEqual()&&this.$emit("update:tags",this.tagsCopy)},blurredOnClick:function(t){this.$el.contains(t.target)||this.$el.contains(document.activeElement)||this.performBlur(t)},performBlur:function(){this.addOnBlur&&this.focused&&this.performAddTags(this.newTag),this.focused=!1}},watch:{value:function(t){this.addOnlyFromAutocomplete||(this.selectedItem=null),this.newTag=t},tags:{handler:function(){this.initTags()},deep:!0},autocompleteOpen:"selectDefaultItem"},created:function(){this.newTag=this.value,this.initTags()},mounted:function(){this.selectDefaultItem(),document.addEventListener("click",this.blurredOnClick)},destroyed:function(){document.removeEventListener("click",this.blurredOnClick)}},y=(n(9),f(_,r,[],!1,null,"61d92e31",null));y.options.__file="vue-tags-input/vue-tags-input.vue";var b=y.exports;n.d(e,"VueTagsInput",(function(){return b})),n.d(e,"createClasses",(function(){return s})),n.d(e,"createTag",(function(){return c})),n.d(e,"createTags",(function(){return u})),n.d(e,"TagInput",(function(){return h})),b.install=function(t){return t.component(b.name,b)},"undefined"!=typeof window&&window.Vue&&window.Vue.use(b),e.default=b}])},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.unitModalOpen?n("UnitModal"):t._e(),t._v(" "),n("div",{attrs:{id:"unit-actions"}},[t.units.length>0?n("div",{attrs:{id:"units-filter"}},[n("span",[t._v("Only show my units")]),t._v(" "),t.ownUnits?n("i",{staticClass:"fas fa-toggle-on",on:{click:t.toggleOwnUnits}}):n("i",{staticClass:"fas fa-toggle-off",on:{click:t.toggleOwnUnits}})]):t._e(),t._v(" "),t.isSelfDispatch?n("div",{attrs:{id:"new-unit-header"}},[n("MiniButton",{attrs:{text:"Create new unit",colour:"rgba(0, 255, 0, 0.5)"},on:{miniClick:t.openUnitModal}})],1):t._e()]),t._v(" "),t.units.length>0?n("div",{attrs:{id:"units"}},[t._l(t.units,(function(e){return n("Unit",{key:e.id,class:{open:t.isUnitOpen(e.id)},attrs:{unit:e,ownUnits:t.ownUnits,isOpen:t.isUnitOpen(e.id)},on:{leaveUnit:function(n){return t.leaveUnit(e.id)},beingEdited:function(n){return t.setEditedUnit(e.id)},unitToggle:function(n){return t.setUnitOpen(e.id)}}})})),t._v(" "),n("RanksModal",{on:{selectRank:t.joinUnit}}),t._v(" "),n("StatesModal",{on:{selectState:t.selectState}})],2):t._e(),t._v(" "),t.units&&0!=t.units.length?t._e():n("div",{attrs:{id:"no-units"}},[n("div",{attrs:{id:"no-units-text"}},[t._v("No units available")])])],1)};r._withStripped=!0;var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return!t.ownUnits||t.ownUnits&&t.isAssignedToUnit?n("div",{class:{inPanic:t.isInPanic},attrs:{id:"unit"}},[n("UnitHeader",{attrs:{unit:t.unit,isOpen:t.isOpen},on:{beingEdited:t.beingEdited,leaveUnit:t.leaveUnit,toggled:t.toggle}}),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isOpen,expression:"isOpen"}],staticClass:"calls-container",class:{maskedcalls:!t.isAssignedToUnit}},[t.isSelfDispatch?n("UnitTools",{attrs:{unit:t.unit}}):t._e(),t._v(" "),t._l(t.assignedCalls,(function(e,r){return n("Call",{key:r,attrs:{call:e},on:{changed:t.callChanged}})})),t._v(" "),n("div",{staticClass:"no-calls-container"},[t.hasCalls?t._e():n("div",{staticClass:"no-calls"},[t._v("\n No assigned calls\n ")])])],2)],1):t._e()};i._withStripped=!0;var o=n(43),a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"unit-header"},[n("div",{staticClass:"top-row"},[n("div",{staticClass:"key-info"},[n("div",{staticClass:"callsign",style:{color:"#"+t.unit.unitState.colour}},[t._v("\n "+t._s(t.unit.callSign)+"\n ")]),t._v(" "),n("div",{staticClass:"expand-button",on:{click:t.toggled}},[t.isOpen?n("i",{staticClass:"fas fa-toggle-on"}):n("i",{staticClass:"fas fa-toggle-off"})])]),t._v(" "),n("div",{staticClass:"unit-type-name"},[t._v("\n "+t._s(t.unit.unitType.name)+"\n ")]),t._v(" "),n("div",{staticClass:"unit-state-name"},[t._v("\n "+t._s(t.unit.unitState.name)+"\n ")]),t._v(" "),n("div",{staticClass:"unit-rank-name"},[t._v(t._s(t.rankOnUnit))])]),t._v(" "),n("div",{staticClass:"bottom-row"},[n("div",{staticClass:"unit-actions"},[t.isAssignedToUnit?n("MiniButton",{staticClass:"unit-state-button",attrs:{text:"Unit state",colour:"rgba(0,0,0,0.2)"},on:{miniClick:t.openStatusModal}}):t._e(),t._v(" "),t.isAssignedToUnit?n("MiniButton",{attrs:{text:"Leave",colour:"rgba(255, 0, 0, 0.5)"},on:{miniClick:t.leaveUnit}}):n("MiniButton",{attrs:{text:"Join",colour:"rgba(0, 255, 0, 0.5)"},on:{miniClick:t.openRanksModal}})],1)])])};a._withStripped=!0;var s=n(6),c={components:{MiniButton:s.a},props:{unit:{type:Object,required:!0},isOpen:{type:Boolean,required:!0}},computed:{rankOnUnit:function(){var t=this.userUnitStatus;return t?this.$store.getters.getRank(t.UserRankId):null},isAssignedToUnit:function(){return!!this.userUnitStatus},userUnitStatus:function(){var t=this,e=this.$store.getters.getUser;return this.$store.getters.getUserUnits.find((function(n){return n.UserId===e.id&&n.UnitId===t.unit.id}))}},methods:{leaveUnit:function(){this.$emit("leaveUnit")},openRanksModal:function(){this.$emit("beingEdited"),this.$store.commit("setModal",{type:"ranks",data:{open:!0}})},openStatusModal:function(){this.$emit("beingEdited"),this.$store.commit("setModal",{type:"unitStates",data:{open:!0}})},toggled:function(){this.$emit("toggled")}}},u=(n(478),n(1)),l=Object(u.a)(c,a,[],!1,null,"289e87f5",null);l.options.__file="src/components/main/status/units/unit/UnitHeader.vue";var d=l.exports,f=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"container"}},[e("MiniButton",{attrs:{text:"Edit unit",colour:"rgba(0, 255, 0, 0.5)"},on:{miniClick:this.editUnit}}),this._v(" "),e("MiniButton",{attrs:{text:"Delete unit",colour:"rgba(255, 0, 0, 0.5)"},on:{miniClick:this.deleteUnit}})],1)};f._withStripped=!0;var p=n(5),h={props:{unit:{type:Object,required:!0}},components:{MiniButton:s.a},mixins:[p.a],methods:{editUnit:function(){this.$store.commit("setModal",{type:"unit",data:{open:!0,type:"unit",entity:this.unit}})},deleteUnit:function(){this.sendClientMessage("deleteUnit",this.unit)}}},v=(n(480),Object(u.a)(h,f,[],!1,null,"6190aba3",null));v.options.__file="src/components/main/status/units/unit/UnitTools.vue";var g=v.exports,m=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"call-details"},[n("div",[t._v("\n "+t._s(t.incidentString)+"\n "),n("CallMarker",{staticClass:"marker-icon",attrs:{call:t.call}})],1),t._v(" "),n("div",[t._v(t._s(t.call.callGrade.name))]),t._v(" "),n("div",[t._v(t._s(t.locationsString))]),t._v(" "),n("div",{staticClass:"call-descriptions"},t._l(t.descriptions,(function(e){return n("div",{key:e.id,staticClass:"call-description",attrs:{description:e}},[t._v("\n "+t._s(e)+"\n ")])})),0)])};m._withStripped=!0;var A=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.showButtons?n("div",{staticClass:"markers"},[n("div",{staticClass:"marker-button",class:{active:t.markerButtonActive},on:{click:t.setActiveMarker}},[n("i",{staticClass:"fas fa-map-marker-alt"})]),t._v(" "),n("div",{class:{active:t.routeButtonActive,disabled:!t.markerButtonActive},on:{click:t.setActiveRoute}},[n("i",{staticClass:"fas fa-route"})])]):t._e()};A._withStripped=!0;var _={props:{call:{type:Object,required:!0}},mixins:[p.a],computed:{showButtons:function(){return this.call.markerX&&this.call.markerY},markerButtonActive:function(){return this.$store.getters.getActiveMarker==this.call.id},routeButtonActive:function(){return this.$store.getters.getActiveRoute==this.call.id}},methods:{setActiveMarker:function(){this.$store.getters.getActiveMarker!=this.call.id?(this.$store.commit("setActiveMarker",this.call.id),this.$store.commit("setActiveRoute",-1),this.sendClientMessage("setCallMarker",{call:this.call}),this.sendClientMessage("clearCallRoute")):(this.$store.commit("setActiveMarker",-1),this.$store.commit("setActiveRoute",-1),this.sendClientMessage("clearCallMarker"))},setActiveRoute:function(){this.markerButtonActive&&(this.$store.getters.getActiveRoute!=this.call.id?(this.$store.commit("setActiveRoute",this.call.id),this.sendClientMessage("setCallRoute")):(this.$store.commit("setActiveRoute",-1),this.sendClientMessage("clearCallRoute")))}}},y=(n(482),Object(u.a)(_,A,[],!1,null,"143d48f5",null));y.options.__file="src/components/reusable/Call/CallMarker.vue";var b={components:{CallMarker:y.exports},props:{call:{type:Object,required:!0}},computed:{incidentString:function(){return this.call.callIncidents.map((function(t){return t.name})).join(", ")},locationsString:function(){return this.call.callLocations.map((function(t){return t.name})).join(", ")},descriptions:function(){return this.call.callDescriptions.map((function(t){return t.text}))}},watch:{call:function(){this.$emit("changed")}}},x=(n(484),Object(u.a)(b,m,[],!1,null,"660d1fa2",null));x.options.__file="src/components/main/status/units/unit/Call.vue";var w=x.exports,C={props:{unit:{type:Object,required:!0},isOpen:{type:Boolean,required:!0},ownUnits:{type:Boolean,required:!0}},components:{UnitHeader:d,UnitTools:g,Call:w},mixins:[o.a],computed:{assignedCalls:function(){var t=this;return this.$store.getters.getCalls.filter((function(e){return e.assignedUnits.some((function(e){return e.id==t.unit.id}))}))},hasCalls:function(){return this.assignedCalls.length>0},isAssignedToUnit:function(){return!!this.userUnitStatus},userUnitStatus:function(){return this.$store.getters.userUnitStatus(this.unit.id)},isInPanic:function(){return"PANIC"===this.unit.unitState.code},isSelfDispatch:function(){return this.$store.getters.getResourceConfig.self_dispatch}},methods:{leaveUnit:function(){this.$emit("leaveUnit")},beingEdited:function(){this.$emit("beingEdited")},toggle:function(){this.$emit("unitToggle")}}},S=(n(486),Object(u.a)(C,i,[],!1,null,"5ee57bc8",null));S.options.__file="src/components/main/status/units/unit/Unit.vue";var k=S.exports,E=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Modal",{attrs:{id:"unit-modal",open:t.isOpen},on:{close:t.close},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("\n "+t._s(t.unit.id?"Edit":"Create")+" unit\n ")]},proxy:!0},{key:"body",fn:function(){return[t.failedValidation?n("div",{staticClass:"failed-validation"},[t._v("\n All fields must be completed\n ")]):t._e(),t._v(" "),n("div",{staticClass:"unit"},[n("div",{attrs:{id:"unit-callsign"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.unit.callSign,expression:"unit.callSign"}],attrs:{type:"text",placeholder:"Unit callsign"},domProps:{value:t.unit.callSign},on:{input:function(e){e.target.composing||t.$set(t.unit,"callSign",e.target.value)}}})]),t._v(" "),n("div",{attrs:{id:"type-state"}},[n("div",{attrs:{id:"unit-type"}},[n("v-select",{staticClass:"unit-select",attrs:{label:"name",options:t.$store.getters.getUnitTypes},model:{value:t.unit.unitType,callback:function(e){t.$set(t.unit,"unitType",e)},expression:"unit.unitType"}})],1),t._v(" "),n("div",{attrs:{id:"unit-state"}},[n("v-select",{staticClass:"unit-select",attrs:{label:"name",options:t.$store.getters.getUnitStates},model:{value:t.unit.unitState,callback:function(e){t.$set(t.unit,"unitState",e)},expression:"unit.unitState"}})],1)])])]},proxy:!0},{key:"footer",fn:function(){return[n("MiniButton",{staticClass:"unit-save-button",attrs:{text:"Save",colour:"rgba(0,255,0,0.5)"},on:{miniClick:t.saveUnit}})]},proxy:!0}])})};E._withStripped=!0;var O=n(25),M={data:function(){return{unit:JSON.parse(JSON.stringify(this.$store.getters.getModalData("unit").entity)),failedValidation:!1}},components:{Modal:O.a,MiniButton:s.a},mixins:[p.a],computed:{isOpen:function(){return this.$store.getters.getIsModalOpen("unit")}},methods:{close:function(){this.$store.commit("resetModal",{type:"unit"})},saveUnit:function(){0!==this.unit.callSign.length&&this.unit.unitType.id&&this.unit.unitState.id?(this.failedValidation=!1,this.sendClientMessage("sendUnit",this.unit),this.$store.commit("resetModal",{type:"unit"})):this.failedValidation=!0}}},T=(n(490),Object(u.a)(M,E,[],!1,null,"0703c0fc",null));T.options.__file="src/components/reusable/Unit/UnitModal.vue";var B=T.exports,I=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Modal",{attrs:{open:t.isOpen},on:{close:t.close},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("\n Choose a rank\n ")]},proxy:!0},{key:"body",fn:function(){return[n("div",{staticClass:"ranks"},t._l(t.ranks,(function(e){return n("Rank",{key:e.id,attrs:{rank:e},on:{selectRank:function(n){return t.selectRank(e.id)}}})})),1)]},proxy:!0}])})};I._withStripped=!0;var $=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"rank-container"},[e("MiniButton",{attrs:{fontSize:"17px",text:this.rank.name,colour:"rgba(0, 0, 0, 0.2)",borderColour:"rgba(255,255,255,0.5)"},on:{miniClick:this.selectRank}})],1)};$._withStripped=!0;var P={props:{rank:{type:Object,required:!0}},components:{MiniButton:s.a},methods:{selectRank:function(){this.$emit("selectRank")}}},j=(n(492),Object(u.a)(P,$,[],!1,null,"8cfd582e",null));j.options.__file="src/components/reusable/Officer/Rank.vue";var R=j.exports,D={components:{Modal:O.a,MiniButton:s.a,Rank:R},computed:{ranks:function(){return this.$store.getters.getUserRanks},isOpen:function(){return this.$store.getters.getIsModalOpen("ranks")}},methods:{selectRank:function(t){this.$emit("selectRank",t),this.$store.commit("resetModal",{type:"ranks"})},close:function(){this.$store.commit("resetModal",{type:"ranks"})}}},L=(n(494),Object(u.a)(D,I,[],!1,null,"808bbfba",null));L.options.__file="src/components/reusable/Officer/RanksModal.vue";var N=L.exports,U=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Modal",{attrs:{open:t.isOpen},on:{close:t.close},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("\n Choose a state\n ")]},proxy:!0},{key:"body",fn:function(){return[n("div",{staticClass:"states"},t._l(t.states,(function(e){return n("State",{key:e.id,attrs:{state:e},on:{selectState:function(n){return t.selectState(e.id)}}})})),1)]},proxy:!0}])})};U._withStripped=!0;var F=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"state-container"},[e("div",{staticClass:"state-indicator",style:{background:"#"+this.stateColour}}),this._v(" "),e("MiniButton",{attrs:{fontSize:"17px",text:this.state.name,colour:"rgba(0, 0, 0, 0.2)",borderColour:"rgba(255,255,255,0.5)",borderRadius:"0 4px 4px 0"},on:{miniClick:this.selectState}})],1)};F._withStripped=!0;var z={props:{state:{type:Object,required:!0}},components:{MiniButton:s.a},methods:{selectState:function(){this.$emit("selectState")}},computed:{stateColour:function(){return this.state.colour}}},V=(n(496),Object(u.a)(z,F,[],!1,null,"4a3095ec",null));V.options.__file="src/components/reusable/Unit/State.vue";var G=V.exports,H={components:{Modal:O.a,MiniButton:s.a,State:G},computed:{states:function(){return this.$store.getters.getUnitStates},isOpen:function(){return this.$store.getters.getIsModalOpen("unitStates")}},methods:{selectState:function(t){this.$emit("selectState",t),this.$store.commit("resetModal",{type:"unitStates"})},close:function(){this.$store.commit("resetModal",{type:"unitStates"})}}},Q=(n(498),Object(u.a)(H,U,[],!1,null,"6a7d36f8",null));Q.options.__file="src/components/reusable/Unit/StatesModal.vue";var q=Q.exports,W={data:function(){return{unitBeingEdited:0,unitsOpen:[],ownUnits:!1}},mixins:[p.a],components:{Unit:k,RanksModal:N,StatesModal:q,UnitModal:B,MiniButton:s.a},computed:{units:function(){return this.$store.getters.getUnits},unitModalOpen:function(){return this.$store.getters.getIsModalOpen("unit")},isSelfDispatch:function(){return this.$store.getters.getResourceConfig.self_dispatch}},methods:{setEditedUnit:function(t){this.unitBeingEdited=t},leaveUnit:function(t){var e=this.$store.getters.getUser;this.sendClientMessage("removeUserFromUnit",{userId:e.id,unitId:t})},joinUnit:function(t){var e=this.$store.getters.getUser;this.sendClientMessage("addUserToUnit",{userId:e.id,unitId:this.unitBeingEdited,rankId:t}),this.unitBeingEdited=0},selectState:function(t){this.sendClientMessage("setUnitState",{stateId:t,unitId:this.unitBeingEdited}),this.unitBeingEdited=0},isUnitOpen:function(t){return this.unitsOpen.includes(t)},setUnitOpen:function(t){this.isUnitOpen(t)?this.unitsOpen.splice(this.unitsOpen.findIndex((function(e){return e==t})),1):this.unitsOpen.push(t)},toggleOwnUnits:function(){this.ownUnits=!this.ownUnits},openUnitModal:function(){this.$store.commit("setModal",{type:"unit",data:{open:!0,type:"unit",entity:{id:null,callSign:"",unitState:{},unitType:{}}}})}}},Y=(n(500),Object(u.a)(W,r,[],!1,null,"f4bcb770",null));Y.options.__file="src/components/main/status/units/Units.vue";e.a=Y.exports},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Modal",{attrs:{open:t.isOpen},on:{close:t.close},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("\n Choose markers\n ")]},proxy:!0},{key:"body",fn:function(){return[n("div",{staticClass:"markers"},t._l(t.allMarkers,(function(e){return n("MarkerDisplay",{key:e.id,attrs:{isSelected:t.isSelectedValue(e.id),marker:e},on:{addMarker:function(n){return t.addMarker(e.id)},removeMarker:function(n){return t.removeMarker(e.id)}}})})),1)]},proxy:!0}])})};r._withStripped=!0;var i=n(25),o=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"marker-container"},[e("MiniButton",{attrs:{text:this.marker.name,icon:this.icon,fontSize:"17px",colour:"rgba(0, 0, 0, 0.2)",borderColour:"rgba(255,255,255,0.5)",padding:"7px"},on:{miniClick:this.toggleMarker}})],1)};o._withStripped=!0;var a=n(6),s={props:{marker:{type:Object,required:!0},isSelected:{type:Boolean,required:!1}},components:{MiniButton:a.a},computed:{icon:function(){return this.isSelected?"fa-minus-circle":"fa-plus-circle"}},methods:{toggleMarker:function(){this.isSelected?this.$emit("removeMarker",{id:this.marker.id}):this.$emit("addMarker",{id:this.marker.id})}}},c=(n(528),n(1)),u=Object(c.a)(s,o,[],!1,null,"9f8df010",null);u.options.__file="src/components/reusable/Citizen/MarkersModal/MarkerDisplay.vue";var l=u.exports,d=n(5);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0},addMarker:function(t){var e=this.$store.getters.getModalData("markers"),n={type:e.type,typeId:e.entity.id,markerId:t};this.sendClientMessage("addMarker",n);var r=this.allMarkers.find((function(e){return e.id===t})),i=[].concat(v(this.selectedValues),[r]);this.$store.commit("setModal",{type:"markers",data:{entity:p(p({},e.entity),{},{markers:i})}}),this.$store.commit(e.updateMutation,{entity:this.$store.getters.getModalData("markers").entity})},removeMarker:function(t){var e=this.$store.getters.getModalData("markers"),n={type:this.markerType,typeId:e.entity.id,markerId:t};this.sendClientMessage("removeMarker",n);var r=this.selectedValues.filter((function(e){return e.id!==t}));this.$store.commit("setModal",{type:"markers",data:{entity:p(p({},e.entity),{},{markers:r})}}),this.$store.commit(e.updateMutation,{entity:this.$store.getters.getModalData("markers").entity})},close:function(){this.$store.commit("resetModal",{type:"markers"})}}},A=(n(530),Object(c.a)(m,r,[],!1,null,"1219ebd8",null));A.options.__file="src/components/reusable/Citizen/MarkersModal/MarkersModal.vue";e.a=A.exports},function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"licence"},[e("SectionProperty",{staticClass:"section",attrs:{label:"Licence"}}),this._v(" "),e("div",{staticClass:"details"},[e("Property",{attrs:{value:this.licence.licenceType?this.licence.licenceType.name:"[ Unknown licence type ]"}}),this._v("\n   :  \n "),e("Property",{attrs:{value:this.licence.licenceStatus?this.licence.licenceStatus.name:"[ Unknown status ]"}})],1)],1)};r._withStripped=!0;var i=n(16),o=n(26),a={props:{licence:{type:Object,required:!0}},components:{Property:i.a,SectionProperty:o.a}},s=(n(518),n(1)),c=Object(s.a)(a,r,[],!1,null,"4b92f256",null);c.options.__file="src/components/reusable/Citizen/Licence.vue";e.a=c.exports},function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"warrant"},[e("SectionProperty",{staticClass:"section",attrs:{label:"Warrant"}}),this._v(" "),e("div",{staticClass:"details"},[e("Property",{attrs:{label:"From",value:this.warrant.validFrom}}),this._v("\n  - \n "),e("Property",{attrs:{label:"To",value:this.warrant.validTo}}),this._v(" "),e("Property",{staticClass:"warrant-details",attrs:{label:"Details",value:this.warrant.details}})],1)],1)};r._withStripped=!0;var i=n(16),o=n(26),a={props:{warrant:{type:Object,required:!0}},components:{Property:i.a,SectionProperty:o.a}},s=(n(520),n(1)),c=Object(s.a)(a,r,[],!1,null,"69748d22",null);c.options.__file="src/components/reusable/Citizen/Warrant.vue";e.a=c.exports},function(t,e,n){var r=n(9),i=n(7).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(7),i=n(28),o=n(40),a=n(121),s=n(13).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(64)("keys"),i=n(47);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(7).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(9),i=n(4),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(29)(Function.call,n(23).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e){t.exports="\t\n\v\f\r   ᠎ â€â€‚         âŸã€€\u2028\u2029\ufeff"},function(t,e,n){var r=n(9),i=n(94).set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){"use strict";var r=n(31),i=n(34);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){"use strict";var r=n(40),i=n(0),o=n(18),a=n(17),s=n(61),c=n(101),u=n(58),l=n(24),d=n(10)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,h,v,g,m){c(n,e,h);var A,_,y,b=function(t){if(!f&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",w="values"==v,C=!1,S=t.prototype,k=S[d]||S["@@iterator"]||v&&S[v],E=k||b(v),O=v?w?b("entries"):E:void 0,M="Array"==e&&S.entries||k;if(M&&(y=l(M.call(new t)))!==Object.prototype&&y.next&&(u(y,x,!0),r||"function"==typeof y[d]||a(y,d,p)),w&&k&&"values"!==k.name&&(C=!0,E=function(){return k.call(this)}),r&&!m||!f&&!C&&S[d]||a(S,d,E),s[e]=E,s[x]=p,v)if(A={values:w?E:b("values"),keys:g?E:b("keys"),entries:O},m)for(_ in A)_ in S||o(S,_,A[_]);else i(i.P+i.F*(f||C),e,A);return A}},function(t,e,n){"use strict";var r=n(50),i=n(46),o=n(58),a={};n(17)(a,n(10)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(73),i=n(34);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(10)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(61),i=n(10)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(13),i=n(46);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(59),i=n(10)("iterator"),o=n(61);t.exports=n(28).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(318);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){"use strict";var r=n(14),i=n(49),o=n(11);t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(42),i=n(138),o=n(61),a=n(22);t.exports=n(100)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r,i,o=n(67),a=RegExp.prototype.exec,s=String.prototype.replace,c=a,u=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),l=void 0!==/()??/.exec("")[1];(u||l)&&(c=function(t){var e,n,r,i,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",o.call(c))),u&&(e=c.lastIndex),r=a.call(c,t),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:e),l&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;in;)e.push(arguments[n++]);return m[++g]=function(){s("function"==typeof t?t:Function(t),e)},r(g),g},p=function(t){delete m[t]},"process"==n(30)(d)?r=function(t){d.nextTick(a(A,t,1))}:v&&v.now?r=function(t){v.now(a(A,t,1))}:h?(o=(i=new h).port2,i.port1.onmessage=_,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",_,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),A.call(t)}}:function(t){setTimeout(a(A,t,1),0)}),t.exports={set:f,clear:p}},function(t,e,n){var r=n(7),i=n(112).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(30)(a);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(u)}}else n=function(){i.call(r,u)};else{var d=!0,f=document.createTextNode("");new o(u).observe(f,{characterData:!0}),n=function(){f.data=d=!d}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";var r=n(15);function i(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new i(t)}},function(t,e,n){"use strict";var r=n(7),i=n(12),o=n(40),a=n(79),s=n(17),c=n(55),u=n(8),l=n(53),d=n(31),f=n(11),p=n(148),h=n(51).f,v=n(13).f,g=n(108),m=n(58),A=r.ArrayBuffer,_=r.DataView,y=r.Math,b=r.RangeError,x=r.Infinity,w=A,C=y.abs,S=y.pow,k=y.floor,E=y.log,O=y.LN2,M=i?"_b":"buffer",T=i?"_l":"byteLength",B=i?"_o":"byteOffset";function I(t,e,n){var r,i,o,a=new Array(n),s=8*n-e-1,c=(1<>1,l=23===e?S(2,-24)-S(2,-77):0,d=0,f=t<0||0===t&&1/t<0?1:0;for((t=C(t))!=t||t===x?(i=t!=t?1:0,r=c):(r=k(E(t)/O),t*(o=S(2,-r))<1&&(r--,o*=2),(t+=r+u>=1?l/o:l*S(2,1-u))*o>=2&&(r++,o/=2),r+u>=c?(i=0,r=c):r+u>=1?(i=(t*o-1)*S(2,e),r+=u):(i=t*S(2,u-1)*S(2,e),r=0));e>=8;a[d++]=255&i,i/=256,e-=8);for(r=r<0;a[d++]=255&r,r/=256,s-=8);return a[--d]|=128*f,a}function $(t,e,n){var r,i=8*n-e-1,o=(1<>1,s=i-7,c=n-1,u=t[c--],l=127&u;for(u>>=7;s>0;l=256*l+t[c],c--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[c],c--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:u?-x:x;r+=S(2,e),l-=a}return(u?-1:1)*r*S(2,l-e)}function P(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function j(t){return[255&t]}function R(t){return[255&t,t>>8&255]}function D(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function L(t){return I(t,52,8)}function N(t){return I(t,23,4)}function U(t,e,n){v(t.prototype,e,{get:function(){return this[n]}})}function F(t,e,n,r){var i=p(+n);if(i+e>t[T])throw b("Wrong index!");var o=t[M]._b,a=i+t[B],s=o.slice(a,a+e);return r?s:s.reverse()}function z(t,e,n,r,i,o){var a=p(+n);if(a+e>t[T])throw b("Wrong index!");for(var s=t[M]._b,c=a+t[B],u=r(+i),l=0;lQ;)(V=H[Q++])in A||s(A,V,w[V]);o||(G.constructor=A)}var q=new _(new A(2)),W=_.prototype.setInt8;q.setInt8(0,2147483648),q.setInt8(1,2147483649),!q.getInt8(0)&&q.getInt8(1)||c(_.prototype,{setInt8:function(t,e){W.call(this,t,e<<24>>24)},setUint8:function(t,e){W.call(this,t,e<<24>>24)}},!0)}else A=function(t){l(this,A,"ArrayBuffer");var e=p(t);this._b=g.call(new Array(e),0),this[T]=e},_=function(t,e,n){l(this,_,"DataView"),l(t,A,"DataView");var r=t[T],i=d(e);if(i<0||i>r)throw b("Wrong offset!");if(i+(n=void 0===n?r-i:f(n))>r)throw b("Wrong length!");this[M]=t,this[B]=i,this[T]=n},i&&(U(A,"byteLength","_l"),U(_,"buffer","_b"),U(_,"byteLength","_l"),U(_,"byteOffset","_o")),c(_.prototype,{getInt8:function(t){return F(this,1,t)[0]<<24>>24},getUint8:function(t){return F(this,1,t)[0]},getInt16:function(t){var e=F(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=F(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return P(F(this,4,t,arguments[1]))},getUint32:function(t){return P(F(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return $(F(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return $(F(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){z(this,1,t,j,e)},setUint8:function(t,e){z(this,1,t,j,e)},setInt16:function(t,e){z(this,2,t,R,e,arguments[2])},setUint16:function(t,e){z(this,2,t,R,e,arguments[2])},setInt32:function(t,e){z(this,4,t,D,e,arguments[2])},setUint32:function(t,e){z(this,4,t,D,e,arguments[2])},setFloat32:function(t,e){z(this,4,t,N,e,arguments[2])},setFloat64:function(t,e){z(this,8,t,L,e,arguments[2])}});m(A,"ArrayBuffer"),m(_,"DataView"),s(_.prototype,a.VIEW,!0),e.ArrayBuffer=A,e.DataView=_},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,d=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&p())}function p(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++d1)for(var n=1;n=0&&t<=1){if(e._volume=t,e._muted)return e;e.usingWebAudio&&e.masterGain.gain.setValueAtTime(t,o.ctx.currentTime);for(var n=0;n=0;e--)t._howls[e].unload();return t.usingWebAudio&&t.ctx&&void 0!==t.ctx.close&&(t.ctx.close(),t.ctx=null,p()),t},codecs:function(t){return(this||o)._codecs[t.replace(/^x-/,"")]},_setup:function(){var t=this||o;if(t.state=t.ctx&&t.ctx.state||"suspended",t._autoSuspend(),!t.usingWebAudio)if("undefined"!=typeof Audio)try{void 0===(new Audio).oncanplaythrough&&(t._canPlayEvent="canplay")}catch(e){t.noAudio=!0}else t.noAudio=!0;try{(new Audio).muted&&(t.noAudio=!0)}catch(t){}return t.noAudio||t._setupCodecs(),t},_setupCodecs:function(){var t=this||o,e=null;try{e="undefined"!=typeof Audio?new Audio:null}catch(e){return t}if(!e||"function"!=typeof e.canPlayType)return t;var n=e.canPlayType("audio/mpeg;").replace(/^no$/,""),r=t._navigator&&t._navigator.userAgent.match(/OPR\/([0-6].)/g),i=r&&parseInt(r[0].split("/")[1],10)<33;return t._codecs={mp3:!(i||!n&&!e.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!n,opus:!!e.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(e.canPlayType('audio/wav; codecs="1"')||e.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!e.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!e.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(e.canPlayType("audio/x-m4b;")||e.canPlayType("audio/m4b;")||e.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(e.canPlayType("audio/x-mp4;")||e.canPlayType("audio/mp4;")||e.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),webm:!!e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),dolby:!!e.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(e.canPlayType("audio/x-flac;")||e.canPlayType("audio/flac;")).replace(/^no$/,"")},t},_unlockAudio:function(){var t=this||o;if(!t._audioUnlocked&&t.ctx){t._audioUnlocked=!1,t.autoUnlock=!1,t._mobileUnloaded||44100===t.ctx.sampleRate||(t._mobileUnloaded=!0,t.unload()),t._scratchBuffer=t.ctx.createBuffer(1,1,22050);var e=function(n){for(;t._html5AudioPool.length0?s._seek:n._sprite[t][0]/1e3),l=Math.max(0,(n._sprite[t][0]+n._sprite[t][1])/1e3-u),d=1e3*l/Math.abs(s._rate),f=n._sprite[t][0]/1e3,p=(n._sprite[t][0]+n._sprite[t][1])/1e3;s._sprite=t,s._ended=!1;var h=function(){s._paused=!1,s._seek=u,s._start=f,s._stop=p,s._loop=!(!s._loop&&!n._sprite[t][2])};if(!(u>=p)){var v=s._node;if(n._webAudio){var g=function(){n._playLock=!1,h(),n._refreshBuffer(s);var t=s._muted||n._muted?0:s._volume;v.gain.setValueAtTime(t,o.ctx.currentTime),s._playStart=o.ctx.currentTime,void 0===v.bufferSource.start?s._loop?v.bufferSource.noteGrainOn(0,u,86400):v.bufferSource.noteGrainOn(0,u,l):s._loop?v.bufferSource.start(0,u,86400):v.bufferSource.start(0,u,l),d!==1/0&&(n._endTimers[s._id]=setTimeout(n._ended.bind(n,s),d)),e||setTimeout((function(){n._emit("play",s._id),n._loadQueue()}),0)};"running"===o.state&&"interrupted"!==o.ctx.state?g():(n._playLock=!0,n.once("resume",g),n._clearTimer(s._id))}else{var m=function(){v.currentTime=u,v.muted=s._muted||n._muted||o._muted||v.muted,v.volume=s._volume*o.volume(),v.playbackRate=s._rate;try{var r=v.play();if(r&&"undefined"!=typeof Promise&&(r instanceof Promise||"function"==typeof r.then)?(n._playLock=!0,h(),r.then((function(){n._playLock=!1,v._unlocked=!0,e||(n._emit("play",s._id),n._loadQueue())})).catch((function(){n._playLock=!1,n._emit("playerror",s._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),s._ended=!0,s._paused=!0}))):e||(n._playLock=!1,h(),n._emit("play",s._id),n._loadQueue()),v.playbackRate=s._rate,v.paused)return void n._emit("playerror",s._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==t||s._loop?n._endTimers[s._id]=setTimeout(n._ended.bind(n,s),d):(n._endTimers[s._id]=function(){n._ended(s),v.removeEventListener("ended",n._endTimers[s._id],!1)},v.addEventListener("ended",n._endTimers[s._id],!1))}catch(t){n._emit("playerror",s._id,t)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===v.src&&(v.src=n._src,v.load());var A=window&&window.ejecta||!v.readyState&&o._navigator.isCocoonJS;if(v.readyState>=3||A)m();else{n._playLock=!0;var _=function(){m(),v.removeEventListener(o._canPlayEvent,_,!1)};v.addEventListener(o._canPlayEvent,_,!1),n._clearTimer(s._id)}}return s._id}n._ended(s)},pause:function(t){var e=this;if("loaded"!==e._state||e._playLock)return e._queue.push({event:"pause",action:function(){e.pause(t)}}),e;for(var n=e._getSoundIds(t),r=0;r=0?e=parseInt(i[0],10):t=parseFloat(i[0])}else i.length>=2&&(t=parseFloat(i[0]),e=parseInt(i[1],10));if(!(void 0!==t&&t>=0&&t<=1))return(n=e?r._soundById(e):r._sounds[0])?n._volume:0;if("loaded"!==r._state||r._playLock)return r._queue.push({event:"volume",action:function(){r.volume.apply(r,i)}}),r;void 0===e&&(r._volume=t),e=r._getSoundIds(e);for(var c=0;c0?r/u:r),d=Date.now();t._fadeTo=n,t._interval=setInterval((function(){var i=(Date.now()-d)/r;d=Date.now(),s+=c*i,s=Math.round(100*s)/100,s=c<0?Math.max(n,s):Math.min(n,s),a._webAudio?t._volume=s:a.volume(s,t._id,!0),o&&(a._volume=s),(ne&&s>=n)&&(clearInterval(t._interval),t._interval=null,t._fadeTo=null,a.volume(n,t._id),a._emit("fade",t._id))}),l)},_stopFade:function(t){var e=this._soundById(t);return e&&e._interval&&(this._webAudio&&e._node.gain.cancelScheduledValues(o.ctx.currentTime),clearInterval(e._interval),e._interval=null,this.volume(e._fadeTo,t),e._fadeTo=null,this._emit("fade",t)),this},loop:function(){var t,e,n,r=this,i=arguments;if(0===i.length)return r._loop;if(1===i.length){if("boolean"!=typeof i[0])return!!(n=r._soundById(parseInt(i[0],10)))&&n._loop;t=i[0],r._loop=t}else 2===i.length&&(t=i[0],e=parseInt(i[1],10));for(var o=r._getSoundIds(e),a=0;a=0?e=parseInt(i[0],10):t=parseFloat(i[0])}else 2===i.length&&(t=parseFloat(i[0]),e=parseInt(i[1],10));if("number"!=typeof t)return(n=r._soundById(e))?n._rate:r._rate;if("loaded"!==r._state||r._playLock)return r._queue.push({event:"rate",action:function(){r.rate.apply(r,i)}}),r;void 0===e&&(r._rate=t),e=r._getSoundIds(e);for(var c=0;c=0?e=parseInt(r[0],10):n._sounds.length&&(e=n._sounds[0]._id,t=parseFloat(r[0]))}else 2===r.length&&(t=parseFloat(r[0]),e=parseInt(r[1],10));if(void 0===e)return n;if("number"==typeof t&&("loaded"!==n._state||n._playLock))return n._queue.push({event:"seek",action:function(){n.seek.apply(n,r)}}),n;var s=n._soundById(e);if(s){if(!("number"==typeof t&&t>=0)){if(n._webAudio){var c=n.playing(e)?o.ctx.currentTime-s._playStart:0,u=s._rateSeek?s._rateSeek-s._seek:0;return s._seek+(u+c*Math.abs(s._rate))}return s._node.currentTime}var l=n.playing(e);l&&n.pause(e,!0),s._seek=t,s._ended=!1,n._clearTimer(e),n._webAudio||!s._node||isNaN(s._node.duration)||(s._node.currentTime=t);var d=function(){n._emit("seek",e),l&&n.play(e,!0)};if(l&&!n._webAudio){var f=function(){n._playLock?setTimeout(f,0):d()};setTimeout(f,0)}else d()}return n},playing:function(t){if("number"==typeof t){var e=this._soundById(t);return!!e&&!e._paused}for(var n=0;n=0&&o._howls.splice(r,1);var i=!0;for(n=0;n=0){i=!1;break}return c&&i&&delete c[t._src],o.noAudio=!1,t._state="unloaded",t._sounds=[],t=null,null},on:function(t,e,n,r){var i=this["_on"+t];return"function"==typeof e&&i.push(r?{id:n,fn:e,once:r}:{id:n,fn:e}),this},off:function(t,e,n){var r=this["_on"+t],i=0;if("number"==typeof e&&(n=e,e=null),e||n)for(i=0;i=0;i--)r[i].id&&r[i].id!==e&&"load"!==t||(setTimeout(function(t){t.call(this,e,n)}.bind(this,r[i].fn),0),r[i].once&&this.off(t,r[i].fn,r[i].id));return this._loadQueue(t),this},_loadQueue:function(t){if(this._queue.length>0){var e=this._queue[0];e.event===t&&(this._queue.shift(),this._loadQueue()),t||e.action()}return this},_ended:function(t){var e=t._sprite;if(!this._webAudio&&t._node&&!t._node.paused&&!t._node.ended&&t._node.currentTime=0;n--){if(e<=t)return;this._sounds[n]._ended&&(this._webAudio&&this._sounds[n]._node&&this._sounds[n]._node.disconnect(0),this._sounds.splice(n,1),e--)}}},_getSoundIds:function(t){if(void 0===t){for(var e=[],n=0;n=0;if(o._scratchBuffer&&t.bufferSource&&(t.bufferSource.onended=null,t.bufferSource.disconnect(0),e))try{t.bufferSource.buffer=o._scratchBuffer}catch(t){}return t.bufferSource=null,this},_clearSound:function(t){/MSIE |Trident\//.test(o._navigator&&o._navigator.userAgent)||(t.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var s=function(t){this._parent=t,this.init()};s.prototype={init:function(){var t=this._parent;return this._muted=t._muted,this._loop=t._loop,this._volume=t._volume,this._rate=t._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++o._counter,t._sounds.push(this),this.create(),this},create:function(){var t=this._parent,e=o._muted||this._muted||this._parent._muted?0:this._volume;return t._webAudio?(this._node=void 0===o.ctx.createGain?o.ctx.createGainNode():o.ctx.createGain(),this._node.gain.setValueAtTime(e,o.ctx.currentTime),this._node.paused=!0,this._node.connect(o.masterGain)):o.noAudio||(this._node=o._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(o._canPlayEvent,this._loadFn,!1),this._endFn=this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=t._src,this._node.preload=!0===t._preload?"auto":t._preload,this._node.volume=e*o.volume(),this._node.load()),this},reset:function(){var t=this._parent;return this._muted=t._muted,this._loop=t._loop,this._volume=t._volume,this._rate=t._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++o._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0),this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var t=this._parent;t._duration=Math.ceil(10*this._node.duration)/10,0===Object.keys(t._sprite).length&&(t._sprite={__default:[0,1e3*t._duration]}),"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue()),this._node.removeEventListener(o._canPlayEvent,this._loadFn,!1)},_endListener:function(){var t=this._parent;t._duration===1/0&&(t._duration=Math.ceil(10*this._node.duration)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=1e3*t._duration),t._ended(this)),this._node.removeEventListener("ended",this._endFn,!1)}};var c={},u=function(t){var e=t._src;if(c[e])return t._duration=c[e].duration,void f(t);if(/^data:[^;]+;base64,/.test(e)){for(var n=atob(e.split(",")[1]),r=new Uint8Array(n.length),i=0;i0?(c[e._src]=t,f(e,t)):n()};"undefined"!=typeof Promise&&1===o.ctx.decodeAudioData.length?o.ctx.decodeAudioData(t).then(r).catch(n):o.ctx.decodeAudioData(t,r,n)},f=function(t,e){e&&!t._duration&&(t._duration=e.duration),0===Object.keys(t._sprite).length&&(t._sprite={__default:[0,1e3*t._duration]}),"loaded"!==t._state&&(t._state="loaded",t._emit("load"),t._loadQueue())},p=function(){if(o.usingWebAudio){try{"undefined"!=typeof AudioContext?o.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?o.ctx=new webkitAudioContext:o.usingWebAudio=!1}catch(t){o.usingWebAudio=!1}o.ctx||(o.usingWebAudio=!1);var t=/iP(hone|od|ad)/.test(o._navigator&&o._navigator.platform),e=o._navigator&&o._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=e?parseInt(e[1],10):null;if(t&&n&&n<9){var r=/safari/.test(o._navigator&&o._navigator.userAgent.toLowerCase());o._navigator&&!r&&(o.usingWebAudio=!1)}o.usingWebAudio&&(o.masterGain=void 0===o.ctx.createGain?o.ctx.createGainNode():o.ctx.createGain(),o.masterGain.gain.setValueAtTime(o._muted?0:o._volume,o.ctx.currentTime),o.masterGain.connect(o.ctx.destination)),o._setup()}};void 0===(r=function(){return{Howler:o,Howl:a}}.apply(e,[]))||(t.exports=r),e.Howler=o,e.Howl=a,void 0!==n?(n.HowlerGlobal=i,n.Howler=o,n.Howl=a,n.Sound=s):"undefined"!=typeof window&&(window.HowlerGlobal=i,window.Howler=o,window.Howl=a,window.Sound=s)}(), +/*! + * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported. + * + * howler.js v2.2.1 + * howlerjs.com + * + * (c) 2013-2020, James Simpson of GoldFire Studios + * goldfirestudios.com + * + * MIT License + */ +function(){"use strict";var t;HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(t){if(!this.ctx||!this.ctx.listener)return this;for(var e=this._howls.length-1;e>=0;e--)this._howls[e].stereo(t);return this},HowlerGlobal.prototype.pos=function(t,e,n){return this.ctx&&this.ctx.listener?(e="number"!=typeof e?this._pos[1]:e,n="number"!=typeof n?this._pos[2]:n,"number"!=typeof t?this._pos:(this._pos=[t,e,n],void 0!==this.ctx.listener.positionX?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this},HowlerGlobal.prototype.orientation=function(t,e,n,r,i,o){if(!this.ctx||!this.ctx.listener)return this;var a=this._orientation;return e="number"!=typeof e?a[1]:e,n="number"!=typeof n?a[2]:n,r="number"!=typeof r?a[3]:r,i="number"!=typeof i?a[4]:i,o="number"!=typeof o?a[5]:o,"number"!=typeof t?a:(this._orientation=[t,e,n,r,i,o],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(t,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(e,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(r,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(i,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(o,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(t,e,n,r,i,o),this)},Howl.prototype.init=(t=Howl.prototype.init,function(e){return this._orientation=e.orientation||[1,0,0],this._stereo=e.stereo||null,this._pos=e.pos||null,this._pannerAttr={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:360,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:360,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:0,distanceModel:void 0!==e.distanceModel?e.distanceModel:"inverse",maxDistance:void 0!==e.maxDistance?e.maxDistance:1e4,panningModel:void 0!==e.panningModel?e.panningModel:"HRTF",refDistance:void 0!==e.refDistance?e.refDistance:1,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:1},this._onstereo=e.onstereo?[{fn:e.onstereo}]:[],this._onpos=e.onpos?[{fn:e.onpos}]:[],this._onorientation=e.onorientation?[{fn:e.onorientation}]:[],t.call(this,e)}),Howl.prototype.stereo=function(t,n){var r=this;if(!r._webAudio)return r;if("loaded"!==r._state)return r._queue.push({event:"stereo",action:function(){r.stereo(t,n)}}),r;var i=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===n){if("number"!=typeof t)return r._stereo;r._stereo=t,r._pos=[t,0,0]}for(var o=r._getSoundIds(n),a=0;a=0&&(e=t.slice(r),t=t.slice(0,r));var i=t.indexOf("?");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{path:t,query:n,hash:e}}(o.path||""),f=e&&e.path||"/",p=d.path?w(d.path,f,n||o.append):f,h=function(t,e,n){void 0===e&&(e={});var r,i=n||l;try{r=i(t||"")}catch(t){r={}}for(var o in e){var a=e[o];r[o]=Array.isArray(a)?a.map(u):u(a)}return r}(d.query,o.query,i&&i.options.parseQuery),v=o.hash||d.hash;return v&&"#"!==v.charAt(0)&&(v="#"+v),{_normalized:!0,path:p,query:h,hash:v}}var G,H=function(){},Q={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,i=this.$route,o=n.resolve(this.to,i,this.append),a=o.location,s=o.route,c=o.href,u={},l=n.options.linkActiveClass,d=n.options.linkExactActiveClass,h=null==l?"router-link-active":l,v=null==d?"router-link-exact-active":d,g=null==this.activeClass?h:this.activeClass,m=null==this.exactActiveClass?v:this.exactActiveClass,_=s.redirectedFrom?p(null,V(s.redirectedFrom),null,n):s;u[m]=A(i,_,this.exactPath),u[g]=this.exact||this.exactPath?u[m]:function(t,e){return 0===t.path.replace(f,"/").indexOf(e.path.replace(f,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(i,_);var y=u[m]?this.ariaCurrentValue:null,b=function(t){q(t)&&(e.replace?n.replace(a,H):n.push(a,H))},x={click:q};Array.isArray(this.event)?this.event.forEach((function(t){x[t]=b})):x[this.event]=b;var w={class:u},C=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:c,route:s,navigate:b,isActive:u[g],isExactActive:u[m]});if(C){if(1===C.length)return C[0];if(C.length>1||!C.length)return 0===C.length?t():t("span",{},C)}if("a"===this.tag)w.on=x,w.attrs={href:c,"aria-current":y};else{var S=function t(e){var n;if(e)for(var r=0;r-1&&(s.params[f]=n.params[f]);return s.path=z(l.path,s.params),c(l,s,a)}if(s.path){s.params={};for(var p=0;p=t.length?n():t[i]?e(t[i],(function(){r(i+1)})):r(i+1)};r(0)}var _t={redirected:2,aborted:4,cancelled:8,duplicated:16};function yt(t,e){return xt(t,e,_t.redirected,'Redirected when going from "'+t.fullPath+'" to "'+function(t){if("string"==typeof t)return t;if("path"in t)return t.path;var e={};return wt.forEach((function(n){n in t&&(e[n]=t[n])})),JSON.stringify(e,null,2)}(e)+'" via a navigation guard.')}function bt(t,e){return xt(t,e,_t.cancelled,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function xt(t,e,n,r){var i=new Error(r);return i._isRouter=!0,i.from=t,i.to=e,i.type=n,i}var wt=["params","query","hash"];function Ct(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function St(t,e){return Ct(t)&&t._isRouter&&(null==e||t.type===e)}function kt(t){return function(e,n,r){var i=!1,o=0,a=null;Et(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){i=!0,o++;var c,u=Tt((function(e){var i;((i=e).__esModule||Mt&&"Module"===i[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:G.extend(e),n.components[s]=e,--o<=0&&r()})),l=Tt((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=Ct(t)?t:new Error(e),r(a))}));try{c=t(u,l)}catch(t){l(t)}if(c)if("function"==typeof c.then)c.then(u,l);else{var d=c.component;d&&"function"==typeof d.then&&d.then(u,l)}}})),i||r()}}function Et(t,e){return Ot(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Ot(t){return Array.prototype.concat.apply([],t)}var Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Tt(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Bt=function(t,e){this.router=t,this.base=function(t){if(!t)if(W){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=v,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function It(t,e,n,r){var i=Et(t,(function(t,r,i,o){var a=function(t,e){"function"!=typeof t&&(t=G.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,i,o)})):n(a,r,i,o)}));return Ot(r?i.reverse():i)}function $t(t,e){if(e)return function(){return t.apply(e,arguments)}}Bt.prototype.listen=function(t){this.cb=t},Bt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Bt.prototype.onError=function(t){this.errorCbs.push(t)},Bt.prototype.transitionTo=function(t,e,n){var r,i=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var o=this.current;this.confirmTransition(r,(function(){i.updateRoute(r),e&&e(r),i.ensureURL(),i.router.afterHooks.forEach((function(t){t&&t(r,o)})),i.ready||(i.ready=!0,i.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!i.ready&&(St(t,_t.redirected)&&o===v||(i.ready=!0,i.readyErrorCbs.forEach((function(e){e(t)}))))}))},Bt.prototype.confirmTransition=function(t,e,n){var r=this,i=this.current;this.pending=t;var o,a,s=function(t){!St(t)&&Ct(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},c=t.matched.length-1,u=i.matched.length-1;if(A(t,i)&&c===u&&t.matched[c]===i.matched[u])return this.ensureURL(),s(((a=xt(o=i,t,_t.duplicated,'Avoided redundant navigation to current location: "'+o.fullPath+'".')).name="NavigationDuplicated",a));var l=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n0)){var e=this.router,n=e.options.scrollBehavior,r=vt&&n;r&&this.listeners.push(ot());var i=function(){var n=t.current,i=jt(t.base);t.current===v&&i===t._startLocation||t.transitionTo(i,(function(t){r&&at(e,t,n,!0)}))};window.addEventListener("popstate",i),this.listeners.push((function(){window.removeEventListener("popstate",i)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){gt(C(r.base+t.fullPath)),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){mt(C(r.base+t.fullPath)),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(jt(this.base)!==this.current.fullPath){var e=C(this.base+this.current.fullPath);t?gt(e):mt(e)}},e.prototype.getCurrentLocation=function(){return jt(this.base)},e}(Bt);function jt(t){var e=window.location.pathname;return t&&0===e.toLowerCase().indexOf(t.toLowerCase())&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Rt=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=jt(t);if(!/^\/#/.test(e))return window.location.replace(C(t+"/#"+e)),!0}(this.base)||Dt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=vt&&e;n&&this.listeners.push(ot());var r=function(){var e=t.current;Dt()&&t.transitionTo(Lt(),(function(r){n&&at(t.router,r,e,!0),vt||Ft(r.fullPath)}))},i=vt?"popstate":"hashchange";window.addEventListener(i,r),this.listeners.push((function(){window.removeEventListener(i,r)}))}},e.prototype.push=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){Ut(t.fullPath),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){Ft(t.fullPath),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Lt()!==e&&(t?Ut(e):Ft(e))},e.prototype.getCurrentLocation=function(){return Lt()},e}(Bt);function Dt(){var t=Lt();return"/"===t.charAt(0)||(Ft("/"+t),!1)}function Lt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Nt(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Ut(t){vt?gt(Nt(t)):window.location.hash=t}function Ft(t){vt?mt(Nt(t)):window.location.replace(Nt(t))}var zt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){St(t,_t.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Bt),Vt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=X(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!vt&&!1!==t.fallback,this.fallback&&(e="hash"),W||(e="abstract"),this.mode=e,e){case"history":this.history=new Pt(this,t.base);break;case"hash":this.history=new Rt(this,t.base,this.fallback);break;case"abstract":this.history=new zt(this,t.base);break;default:0}},Gt={currentRoute:{configurable:!0}};function Ht(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Vt.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Gt.currentRoute.get=function(){return this.history&&this.history.current},Vt.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof Pt||n instanceof Rt){var r=function(t){n.setupListeners(),function(t){var r=n.current,i=e.options.scrollBehavior;vt&&i&&"fullPath"in t&&at(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Vt.prototype.beforeEach=function(t){return Ht(this.beforeHooks,t)},Vt.prototype.beforeResolve=function(t){return Ht(this.resolveHooks,t)},Vt.prototype.afterEach=function(t){return Ht(this.afterHooks,t)},Vt.prototype.onReady=function(t,e){this.history.onReady(t,e)},Vt.prototype.onError=function(t){this.history.onError(t)},Vt.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},Vt.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},Vt.prototype.go=function(t){this.history.go(t)},Vt.prototype.back=function(){this.go(-1)},Vt.prototype.forward=function(){this.go(1)},Vt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Vt.prototype.resolve=function(t,e,n){var r=V(t,e=e||this.history.current,n,this),i=this.match(r,e),o=i.redirectedFrom||i.fullPath;return{location:r,route:i,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?C(t+"/"+r):r}(this.history.base,o,this.mode),normalizedTo:r,resolved:i}},Vt.prototype.getRoutes=function(){return this.matcher.getRoutes()},Vt.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==v&&this.history.transitionTo(this.history.getCurrentLocation())},Vt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==v&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Vt.prototype,Gt),Vt.install=function t(e){if(!t.installed||G!==e){t.installed=!0,G=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",b),e.component("RouterLink",Q);var i=e.config.optionMergeStrategies;i.beforeRouteEnter=i.beforeRouteLeave=i.beforeRouteUpdate=i.created}},Vt.version="3.5.1",Vt.isNavigationFailure=St,Vt.NavigationFailureType=_t,Vt.START_LOCATION=v,W&&window.Vue&&window.Vue.use(Vt),e.a=Vt},function(t,e,n){"use strict";(function(t){var n=("undefined"!=typeof window?window:void 0!==t?t:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function r(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var n,i=(n=function(e){return e.original===t},e.filter(n)[0]);if(i)return i.copy;var o=Array.isArray(t)?[]:{};return e.push({original:t,copy:o}),Object.keys(t).forEach((function(n){o[n]=r(t[n],e)})),o}function i(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function o(t){return null!==t&&"object"==typeof t}var a=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},s={namespaced:{configurable:!0}};s.namespaced.get=function(){return!!this._rawModule.namespaced},a.prototype.addChild=function(t,e){this._children[t]=e},a.prototype.removeChild=function(t){delete this._children[t]},a.prototype.getChild=function(t){return this._children[t]},a.prototype.hasChild=function(t){return t in this._children},a.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},a.prototype.forEachChild=function(t){i(this._children,t)},a.prototype.forEachGetter=function(t){this._rawModule.getters&&i(this._rawModule.getters,t)},a.prototype.forEachAction=function(t){this._rawModule.actions&&i(this._rawModule.actions,t)},a.prototype.forEachMutation=function(t){this._rawModule.mutations&&i(this._rawModule.mutations,t)},Object.defineProperties(a.prototype,s);var c=function(t){this.register([],t,!1)};c.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},c.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},c.prototype.update=function(t){!function t(e,n,r){0;if(n.update(r),r.modules)for(var i in r.modules){if(!n.getChild(i))return void 0;t(e.concat(i),n.getChild(i),r.modules[i])}}([],this.root,t)},c.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new a(e,n);0===t.length?this.root=o:this.get(t.slice(0,-1)).addChild(t[t.length-1],o);e.modules&&i(e.modules,(function(e,i){r.register(t.concat(i),e,n)}))},c.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},c.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var u;var l=function(t){var e=this;void 0===t&&(t={}),!u&&"undefined"!=typeof window&&window.Vue&&A(window.Vue);var r=t.plugins;void 0===r&&(r=[]);var i=t.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new c(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new u,this._makeLocalGettersCache=Object.create(null);var o=this,a=this.dispatch,s=this.commit;this.dispatch=function(t,e){return a.call(o,t,e)},this.commit=function(t,e,n){return s.call(o,t,e,n)},this.strict=i;var l=this._modules.root.state;v(this,l,[],this._modules.root),h(this,l),r.forEach((function(t){return t(e)})),(void 0!==t.devtools?t.devtools:u.config.devtools)&&function(t){n&&(t._devtoolHook=n,n.emit("vuex:init",t),n.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){n.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){n.emit("vuex:action",t,e)}),{prepend:!0}))}(this)},d={state:{configurable:!0}};function f(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function p(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;v(t,n,[],t._modules.root,!0),h(t,n,e)}function h(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,a={};i(o,(function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var s=u.config.silent;u.config.silent=!0,t._vm=new u({data:{$$state:e},computed:a}),u.config.silent=s,t.strict&&function(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),u.nextTick((function(){return r.$destroy()})))}function v(t,e,n,r,i){var o=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=r),!o&&!i){var s=g(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){u.set(s,c,r.state)}))}var l=r.context=function(t,e,n){var r=""===e,i={dispatch:r?t.dispatch:function(n,r,i){var o=m(n,r,i),a=o.payload,s=o.options,c=o.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:r?t.commit:function(n,r,i){var o=m(n,r,i),a=o.payload,s=o.options,c=o.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(i,{getters:{get:r?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(i){if(i.slice(0,r)===e){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return t.getters[i]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return g(t.state,n)}}}),i}(t,a,n);r.forEachMutation((function(e,n){!function(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,r.state,e)}))}(t,a+n,e,l)})),r.forEachAction((function(e,n){var r=e.root?n:a+n,i=e.handler||e;!function(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push((function(e){var i,o=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return(i=o)&&"function"==typeof i.then||(o=Promise.resolve(o)),t._devtoolHook?o.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):o}))}(t,r,i,l)})),r.forEachGetter((function(e,n){!function(t,e,n,r){if(t._wrappedGetters[e])return void 0;t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)}}(t,a+n,e,l)})),r.forEachChild((function(r,o){v(t,e,n.concat(o),r,i)}))}function g(t,e){return e.reduce((function(t,e){return t[e]}),t)}function m(t,e,n){return o(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function A(t){u&&t===u|| +/*! + * vuex v3.6.2 + * (c) 2021 Evan You + * @license MIT + */ +function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(u=t)}d.state.get=function(){return this._vm._data.$$state},d.state.set=function(t){0},l.prototype.commit=function(t,e,n){var r=this,i=m(t,e,n),o=i.type,a=i.payload,s=(i.options,{type:o,payload:a}),c=this._mutations[o];c&&(this._withCommit((function(){c.forEach((function(t){t(a)}))})),this._subscribers.slice().forEach((function(t){return t(s,r.state)})))},l.prototype.dispatch=function(t,e){var n=this,r=m(t,e),i=r.type,o=r.payload,a={type:i,payload:o},s=this._actions[i];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(a,n.state)}))}catch(t){0}var c=s.length>1?Promise.all(s.map((function(t){return t(o)}))):s[0](o);return new Promise((function(t,e){c.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(a,n.state)}))}catch(t){0}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(a,n.state,t)}))}catch(t){0}e(t)}))}))}},l.prototype.subscribe=function(t,e){return f(t,this._subscribers,e)},l.prototype.subscribeAction=function(t,e){return f("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},l.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},l.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},l.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),v(this,this.state,t,this._modules.get(t),n.preserveState),h(this,this.state)},l.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=g(e.state,t.slice(0,-1));u.delete(n,t[t.length-1])})),p(this)},l.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},l.prototype.hotUpdate=function(t){this._modules.update(t),p(this,!0)},l.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(l.prototype,d);var _=C((function(t,e){var n={};return w(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=S(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[r].vuex=!0})),n})),y=C((function(t,e){var n={};return w(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var o=S(this.$store,"mapMutations",t);if(!o)return;r=o.context.commit}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}})),n})),b=C((function(t,e){var n={};return w(e).forEach((function(e){var r=e.key,i=e.val;i=t+i,n[r]=function(){if(!t||S(this.$store,"mapGetters",t))return this.$store.getters[i]},n[r].vuex=!0})),n})),x=C((function(t,e){var n={};return w(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var o=S(this.$store,"mapActions",t);if(!o)return;r=o.context.dispatch}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}})),n}));function w(t){return function(t){return Array.isArray(t)||o(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function C(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function S(t,e,n){return t._modulesNamespaceMap[n]}function k(t,e,n){var r=n?t.groupCollapsed:t.group;try{r.call(t,e)}catch(n){t.log(e)}}function E(t){try{t.groupEnd()}catch(e){t.log("—— log end ——")}}function O(){var t=new Date;return" @ "+M(t.getHours(),2)+":"+M(t.getMinutes(),2)+":"+M(t.getSeconds(),2)+"."+M(t.getMilliseconds(),3)}function M(t,e){return n="0",r=e-t.toString().length,new Array(r+1).join(n)+t;var n,r}var T={Store:l,install:A,version:"3.6.2",mapState:_,mapMutations:y,mapGetters:b,mapActions:x,createNamespacedHelpers:function(t){return{mapState:_.bind(null,t),mapGetters:b.bind(null,t),mapMutations:y.bind(null,t),mapActions:x.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var n=t.filter;void 0===n&&(n=function(t,e,n){return!0});var i=t.transformer;void 0===i&&(i=function(t){return t});var o=t.mutationTransformer;void 0===o&&(o=function(t){return t});var a=t.actionFilter;void 0===a&&(a=function(t,e){return!0});var s=t.actionTransformer;void 0===s&&(s=function(t){return t});var c=t.logMutations;void 0===c&&(c=!0);var u=t.logActions;void 0===u&&(u=!0);var l=t.logger;return void 0===l&&(l=console),function(t){var d=r(t.state);void 0!==l&&(c&&t.subscribe((function(t,a){var s=r(a);if(n(t,d,s)){var c=O(),u=o(t),f="mutation "+t.type+c;k(l,f,e),l.log("%c prev state","color: #9E9E9E; font-weight: bold",i(d)),l.log("%c mutation","color: #03A9F4; font-weight: bold",u),l.log("%c next state","color: #4CAF50; font-weight: bold",i(s)),E(l)}d=s})),u&&t.subscribeAction((function(t,n){if(a(t,n)){var r=O(),i=s(t),o="action "+t.type+r;k(l,o,e),l.log("%c action","color: #03A9F4; font-weight: bold",i),E(l)}})))}}};e.a=T}).call(this,n(45))},function(t,e,n){t.exports=!n(12)&&!n(8)((function(){return 7!=Object.defineProperty(n(89)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){e.f=n(10)},function(t,e,n){var r=n(21),i=n(22),o=n(69)(!1),a=n(91)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(13),i=n(4),o=n(48);t.exports=n(12)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(22),i=n(51).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,e,n){"use strict";var r=n(12),i=n(48),o=n(70),a=n(66),s=n(14),c=n(65),u=Object.assign;t.exports=!u||n(8)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r}))?function(t,e){for(var n=s(t),u=arguments.length,l=1,d=o.f,f=a.f;u>l;)for(var p,h=c(arguments[l++]),v=d?i(h).concat(d(h)):i(h),g=v.length,m=0;g>m;)p=v[m++],r&&!f.call(h,p)||(n[p]=h[p]);return n}:u},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var r=n(15),i=n(9),o=n(128),a=[].slice,s={},c=function(t,e,n){if(!(e in s)){for(var r=[],i=0;i>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(7).parseFloat,i=n(60).trim;t.exports=1/r(n(95)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(30);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(9),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(98),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),c=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),u=r(t);return is||n!=n?u*(1/0):u*n}},function(t,e,n){var r=n(4);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(15),i=n(14),o=n(65),a=n(11);t.exports=function(t,e,n,s,c){r(e);var u=i(t),l=o(u),d=a(u.length),f=c?d-1:0,p=c?-1:1;if(n<2)for(;;){if(f in l){s=l[f],f+=p;break}if(f+=p,c?f<0:d<=f)throw TypeError("Reduce of empty array with no initial value")}for(;c?f>=0:d>f;f+=p)f in l&&(s=e(s,l[f],f,u));return s}},function(t,e,n){"use strict";var r=n(14),i=n(49),o=n(11);t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),s=i(t,a),c=i(e,a),u=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===u?a:i(u,a))-c,a-s),d=1;for(c0;)c in n?n[s]=n[c]:delete n[s],s+=d,c+=d;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(110);n(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,e,n){n(12)&&"g"!=/./g.flags&&n(13).f(RegExp.prototype,"flags",{configurable:!0,get:n(67)})},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(4),i=n(9),o=n(114);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(144),i=n(56);t.exports=n(78)("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=r.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(i(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(13).f,i=n(50),o=n(55),a=n(29),s=n(53),c=n(54),u=n(100),l=n(138),d=n(52),f=n(12),p=n(41).fastKey,h=n(56),v=f?"_s":"size",g=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,u){var l=t((function(t,r){s(t,l,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,null!=r&&c(r,n,t[u],t)}));return o(l.prototype,{clear:function(){for(var t=h(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=h(this,e),r=g(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[v]--}return!!r},forEach:function(t){h(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(h(this,e),t)}}),f&&r(l.prototype,"size",{get:function(){return h(this,e)[v]}}),l},def:function(t,e,n){var r,i,o=g(t,e);return o?o.v=n:(t._l=o={i:i=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[v]++,"F"!==i&&(t._i[i]=o)),t},getEntry:g,setStrong:function(t,e,n){u(t,e,(function(t,n){this._t=h(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?l(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,l(1))}),n?"entries":"values",!n,!0),d(e)}}},function(t,e,n){"use strict";var r=n(144),i=n(56);t.exports=n(78)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(7),o=n(36)(0),a=n(18),s=n(41),c=n(125),u=n(147),l=n(9),d=n(56),f=n(56),p=!i.ActiveXObject&&"ActiveXObject"in i,h=s.getWeak,v=Object.isExtensible,g=u.ufstore,m=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},A={get:function(t){if(l(t)){var e=h(t);return!0===e?g(d(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(d(this,"WeakMap"),t,e)}},_=t.exports=n(78)("WeakMap",m,A,u,!0,!0);f&&p&&(c((r=u.getConstructor(m,"WeakMap")).prototype,A),s.NEED=!0,o(["delete","has","get","set"],(function(t){var e=_.prototype,n=e[t];a(e,t,(function(e,i){if(l(e)&&!v(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)}))})))},function(t,e,n){"use strict";var r=n(55),i=n(41).getWeak,o=n(4),a=n(9),s=n(53),c=n(54),u=n(36),l=n(21),d=n(56),f=u(5),p=u(6),h=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},m=function(t,e){return f(t.a,(function(t){return t[0]===e}))};g.prototype={get:function(t){var e=m(this,t);if(e)return e[1]},has:function(t){return!!m(this,t)},set:function(t,e){var n=m(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var u=t((function(t,r){s(t,u,e,"_i"),t._t=e,t._i=h++,t._l=void 0,null!=r&&c(r,n,t[o],t)}));return r(u.prototype,{delete:function(t){if(!a(t))return!1;var n=i(t);return!0===n?v(d(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=i(t);return!0===n?v(d(this,e)).has(t):n&&l(n,this._i)}}),u},def:function(t,e,n){var r=i(o(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},function(t,e,n){var r=n(31),i=n(11);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(51),i=n(70),o=n(4),a=n(7).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){"use strict";var r=n(71),i=n(9),o=n(11),a=n(29),s=n(10)("isConcatSpreadable");t.exports=function t(e,n,c,u,l,d,f,p){for(var h,v,g=l,m=0,A=!!f&&a(f,p,3);m0)g=t(e,n,h,o(h.length),g,d-1)-1;else{if(g>=9007199254740991)throw TypeError();e[g]=h}g++}m++}return g}},function(t,e,n){var r=n(11),i=n(97),o=n(34);t.exports=function(t,e,n,a){var s=String(o(t)),c=s.length,u=void 0===n?" ":String(n),l=r(e);if(l<=c||""==u)return s;var d=l-c,f=i.call(u,Math.ceil(d/u.length));return f.length>d&&(f=f.slice(0,d)),a?f+s:s+f}},function(t,e,n){var r=n(12),i=n(48),o=n(22),a=n(66).f;t.exports=function(t){return function(e){for(var n,s=o(e),c=i(s),u=c.length,l=0,d=[];u>l;)n=c[l++],r&&!a.call(s,n)||d.push(t?[n,s[n]]:s[n]);return d}}},function(t,e,n){var r=n(59),i=n(154);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(54);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e){t.exports=Math.scale||function(t,e,n,r,i){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||i!=i?NaN:t===1/0||t===-1/0?t:(t-e)*(i-r)/(n-e)+r}},function(t,e,n){var r=n(431);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("09376ae4",r,!1,{})},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r=200&&t<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(o)})),t.exports=c}).call(this,n(116))},function(t,e,n){"use strict";var r=n(20),i=n(438),o=n(158),a=n(440),s=n(443),c=n(444),u=n(162);t.exports=function(t){return new Promise((function(e,l){var d=t.data,f=t.headers;r.isFormData(d)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var h=t.auth.username||"",v=t.auth.password||"";f.Authorization="Basic "+btoa(h+":"+v)}var g=a(t.baseURL,t.url);if(p.open(t.method.toUpperCase(),o(g,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:t,request:p};i(e,l,r),p=null}},p.onabort=function(){p&&(l(u("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){l(u("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),l(u(e,t,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var m=n(445),A=(t.withCredentials||c(g))&&t.xsrfCookieName?m.read(t.xsrfCookieName):void 0;A&&(f[t.xsrfHeaderName]=A)}if("setRequestHeader"in p&&r.forEach(f,(function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete f[e]:p.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){p&&(p.abort(),l(t),p=null)})),void 0===d&&(d=null),p.send(d)}))}},function(t,e,n){"use strict";var r=n(439);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";var r=n(20);t.exports=function(t,e){e=e||{};var n={},i=["url","method","params","data"],o=["headers","auth","proxy"],a=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(i,(function(t){void 0!==e[t]&&(n[t]=e[t])})),r.forEach(o,(function(i){r.isObject(e[i])?n[i]=r.deepMerge(t[i],e[i]):void 0!==e[i]?n[i]=e[i]:r.isObject(t[i])?n[i]=r.deepMerge(t[i]):void 0!==t[i]&&(n[i]=t[i])})),r.forEach(a,(function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])}));var s=i.concat(o).concat(a),c=Object.keys(e).filter((function(t){return-1===s.indexOf(t)}));return r.forEach(c,(function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])})),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){var r=n(449);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("0c3a0cbc",r,!1,{})},function(t,e,n){var r=n(451);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("404341d8",r,!1,{})},function(t,e,n){var r=n(453);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("3336fbef",r,!1,{})},function(t,e,n){var r=n(455);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("1c816882",r,!1,{})},function(t,e,n){var r=n(457);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("e49d3b8e",r,!1,{})},function(t,e,n){var r=n(459);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("1507b441",r,!1,{})},function(t,e,n){var r=n(461);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("79dcdc7f",r,!1,{})},function(t,e,n){var r=n(463);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("d531ef78",r,!1,{})},function(t,e,n){var r=n(465);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("13c8b863",r,!1,{})},function(t,e,n){var r=n(469);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("eb591924",r,!1,{})},function(t,e,n){var r=n(471);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("aafb020a",r,!1,{})},function(t,e,n){var r=n(473);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("369a065b",r,!1,{})},function(t,e,n){var r=n(475);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("2679ba9a",r,!1,{})},function(t,e,n){var r=n(477);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("0266b90f",r,!1,{})},function(t,e,n){var r=n(479);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("bc2d1ecc",r,!1,{})},function(t,e,n){var r=n(481);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("0c2820a2",r,!1,{})},function(t,e,n){var r=n(483);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("40842250",r,!1,{})},function(t,e,n){var r=n(485);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("6f20a95a",r,!1,{})},function(t,e,n){var r=n(487);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("58a0a0c0",r,!1,{})},function(t,e,n){var r=n(489);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("0fa6a862",r,!1,{})},function(t,e,n){var r=n(491);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("df9f328e",r,!1,{})},function(t,e,n){var r=n(493);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("3123ab2a",r,!1,{})},function(t,e,n){var r=n(495);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("eddbae10",r,!1,{})},function(t,e,n){var r=n(497);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("7e91fdb9",r,!1,{})},function(t,e,n){var r=n(499);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("01f04424",r,!1,{})},function(t,e,n){var r=n(501);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("5e1f9ab9",r,!1,{})},function(t,e,n){var r=n(503);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("260e6154",r,!1,{})},function(t,e,n){var r=n(505);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("81766594",r,!1,{})},function(t,e,n){var r=n(507);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("6f480ae8",r,!1,{})},function(t,e,n){var r=n(509);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("6a69c0e6",r,!1,{})},function(t,e,n){var r=n(511);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("ad64a032",r,!1,{})},function(t,e,n){var r=n(513);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("c9792330",r,!1,{})},function(t,e,n){var r=n(515);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("ad9450be",r,!1,{})},function(t,e,n){var r=n(517);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("56e5b8a4",r,!1,{})},function(t,e,n){var r=n(519);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("7cafa077",r,!1,{})},function(t,e,n){var r=n(521);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("39476562",r,!1,{})},function(t,e,n){var r=n(523);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("c046c272",r,!1,{})},function(t,e,n){var r=n(525);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("525b0084",r,!1,{})},function(t,e,n){var r=n(527);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("0bb02f93",r,!1,{})},function(t,e,n){var r=n(529);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("d9126a46",r,!1,{})},function(t,e,n){var r=n(531);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("c9e183ba",r,!1,{})},function(t,e,n){var r=n(533);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("ecad9838",r,!1,{})},function(t,e,n){var r=n(535);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("1607f800",r,!1,{})},function(t,e,n){var r=n(537);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("72553de6",r,!1,{})},function(t,e,n){var r=n(539);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("7e128811",r,!1,{})},function(t,e,n){var r=n(541);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("2c432291",r,!1,{})},function(t,e,n){var r=n(543);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("aa3394ea",r,!1,{})},function(t,e,n){var r=n(545);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("6e7be548",r,!1,{})},function(t,e,n){var r=n(547);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("98544ae2",r,!1,{})},function(t,e,n){var r=n(549);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("251bef35",r,!1,{})},function(t,e,n){var r=n(551);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);(0,n(3).default)("4d2d6b94",r,!1,{})},function(t,e,n){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=8)}([function(t,e,n){var r=n(4),i=n(5),o=n(6);t.exports=function(t){return r(t)||i(t)||o()}},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e,n){},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);en.bottom)return this.$refs.dropdownMenu.scrollTop=e.offsetTop-(n.height-a)}},getDropdownViewport:function(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},l={data:function(){return{typeAheadPointer:-1}},watch:{filteredOptions:function(){for(var t=0;t=0;t--)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},typeAheadDown:function(){for(var t=this.typeAheadPointer+1;t0&&void 0!==arguments[0]?arguments[0]:null;return this.mutableLoading=null==t?!this.mutableLoading:t}}};function f(t,e,n,r,i,o,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:u}}var p={Deselect:f({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"}},[e("path",{attrs:{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"}})])}),[],!1,null,null,null).exports,OpenIndicator:f({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"}},[e("path",{attrs:{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"}})])}),[],!1,null,null,null).exports},h={inserted:function(t,e,n){var r=n.context;if(r.appendToBody){var i=r.$refs.toggle.getBoundingClientRect(),o=i.height,a=i.top,s=i.left,c=i.width,u=window.scrollX||window.pageXOffset,l=window.scrollY||window.pageYOffset;t.unbindPosition=r.calculatePosition(t,r,{width:c+"px",left:u+s+"px",top:l+a+o+"px"}),document.body.appendChild(t)}},unbind:function(t,e,n){n.context.appendToBody&&(t.unbindPosition&&"function"==typeof t.unbindPosition&&t.unbindPosition(),t.parentNode&&t.parentNode.removeChild(t))}},v=0;function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;e-1}},filter:{type:Function,default:function(t,e){var n=this;return t.filter((function(t){var r=n.getOptionLabel(t);return"number"==typeof r&&(r=r.toString()),n.filterBy(t,r,e)}))}},createOption:{type:Function,default:function(t){return"object"===a()(this.optionList[0])?c()({},this.label,t):t}},resetOnOptionsChange:{default:!1,validator:function(t){return["function","boolean"].includes(a()(t))}},clearSearchOnBlur:{type:Function,default:function(t){var e=t.clearSearchOnSelect,n=t.multiple;return e&&!n}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:function(){return[13]}},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:function(t,e){return t}},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default:function(t,e,n){var r=n.width,i=n.top,o=n.left;t.style.top=i,t.style.left=o,t.style.width=r}}},data:function(){return{uid:++v,search:"",open:!1,isComposing:!1,pushedTags:[],_value:[]}},watch:{options:function(t,e){var n=this;!this.taggable&&("function"==typeof n.resetOnOptionsChange?n.resetOnOptionsChange(t,e,n.selectedValue):n.resetOnOptionsChange)&&this.clearSelection(),this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value)},value:function(t){this.isTrackingValues&&this.setInternalValueFromOptions(t)},multiple:function(){this.clearSelection()},open:function(t){this.$emit(t?"open":"close")}},created:function(){this.mutableLoading=this.loading,void 0!==this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value),this.$on("option:created",this.pushTag)},methods:{setInternalValueFromOptions:function(t){var e=this;Array.isArray(t)?this.$data._value=t.map((function(t){return e.findOptionFromReducedValue(t)})):this.$data._value=this.findOptionFromReducedValue(t)},select:function(t){this.$emit("option:selecting",t),this.isOptionSelected(t)||(this.taggable&&!this.optionExists(t)&&this.$emit("option:created",t),this.multiple&&(t=this.selectedValue.concat(t)),this.updateValue(t),this.$emit("option:selected",t)),this.onAfterSelect(t)},deselect:function(t){var e=this;this.$emit("option:deselecting",t),this.updateValue(this.selectedValue.filter((function(n){return!e.optionComparator(n,t)}))),this.$emit("option:deselected",t)},clearSelection:function(){this.updateValue(this.multiple?[]:null)},onAfterSelect:function(t){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue:function(t){var e=this;void 0===this.value&&(this.$data._value=t),null!==t&&(t=Array.isArray(t)?t.map((function(t){return e.reduce(t)})):this.reduce(t)),this.$emit("input",t)},toggleDropdown:function(t){var e=t.target!==this.searchEl;e&&t.preventDefault();var n=[].concat(i()(this.$refs.deselectButtons||[]),i()([this.$refs.clearButton]||!1));void 0===this.searchEl||n.filter(Boolean).some((function(e){return e.contains(t.target)||e===t.target}))?t.preventDefault():this.open&&e?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected:function(t){var e=this;return this.selectedValue.some((function(n){return e.optionComparator(n,t)}))},optionComparator:function(t,e){return this.getOptionKey(t)===this.getOptionKey(e)},findOptionFromReducedValue:function(t){var e=this,n=[].concat(i()(this.options),i()(this.pushedTags)).filter((function(n){return JSON.stringify(e.reduce(n))===JSON.stringify(t)}));return 1===n.length?n[0]:n.find((function(t){return e.optionComparator(t,e.$data._value)}))||t},closeSearchOptions:function(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue:function(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){var t=null;this.multiple&&(t=i()(this.selectedValue.slice(0,this.selectedValue.length-1))),this.updateValue(t)}},optionExists:function(t){var e=this;return this.optionList.some((function(n){return e.optionComparator(n,t)}))},normalizeOptionForSlot:function(t){return"object"===a()(t)?t:c()({},this.label,t)},pushTag:function(t){this.pushedTags.push(t)},onEscape:function(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur:function(){if(!this.mousedown||this.searching){var t=this.clearSearchOnSelect,e=this.multiple;return this.clearSearchOnBlur({clearSearchOnSelect:t,multiple:e})&&(this.search=""),void this.closeSearchOptions()}this.mousedown=!1,0!==this.search.length||0!==this.options.length||this.closeSearchOptions()},onSearchFocus:function(){this.open=!0,this.$emit("search:focus")},onMousedown:function(){this.mousedown=!0},onMouseUp:function(){this.mousedown=!1},onSearchKeyDown:function(t){var e=this,n=function(t){return t.preventDefault(),!e.isComposing&&e.typeAheadSelect()},r={8:function(t){return e.maybeDeleteValue()},9:function(t){return e.onTab()},27:function(t){return e.onEscape()},38:function(t){return t.preventDefault(),e.typeAheadUp()},40:function(t){return t.preventDefault(),e.typeAheadDown()}};this.selectOnKeyCodes.forEach((function(t){return r[t]=n}));var i=this.mapKeydown(r,this);if("function"==typeof i[t.keyCode])return i[t.keyCode](t)}},computed:{isTrackingValues:function(){return void 0===this.value||this.$options.propsData.hasOwnProperty("reduce")},selectedValue:function(){var t=this.value;return this.isTrackingValues&&(t=this.$data._value),t?[].concat(t):[]},optionList:function(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl:function(){return this.$scopedSlots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope:function(){var t=this,e={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:m({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":"vs".concat(this.uid,"__combobox"),"aria-controls":"vs".concat(this.uid,"__listbox"),ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":"vs".concat(this.uid,"__option-").concat(this.typeAheadPointer)}:{}),events:{compositionstart:function(){return t.isComposing=!0},compositionend:function(){return t.isComposing=!1},keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:function(e){return t.search=e.target.value}}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.loading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:e,listFooter:e,header:m({},e,{deselect:this.deselect}),footer:m({},e,{deselect:this.deselect})}},childComponents:function(){return m({},p,{},this.components)},stateClasses:function(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching:function(){return!!this.search},dropdownOpen:function(){return!this.noDrop&&this.open&&!this.mutableLoading},searchPlaceholder:function(){if(this.isValueEmpty&&this.placeholder)return this.placeholder},filteredOptions:function(){var t=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return t;var e=this.search.length?this.filter(t,this.search,this):t;if(this.taggable&&this.search.length){var n=this.createOption(this.search);this.optionExists(n)||e.unshift(n)}return e},isValueEmpty:function(){return 0===this.selectedValue.length},showClearButton:function(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}}},_=(n(7),f(A,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"v-select",class:t.stateClasses,attrs:{dir:t.dir}},[t._t("header",null,null,t.scope.header),t._v(" "),n("div",{ref:"toggle",staticClass:"vs__dropdown-toggle",attrs:{id:"vs"+t.uid+"__combobox",role:"combobox","aria-expanded":t.dropdownOpen.toString(),"aria-owns":"vs"+t.uid+"__listbox","aria-label":"Search for option"},on:{mousedown:function(e){return t.toggleDropdown(e)}}},[n("div",{ref:"selectedOptions",staticClass:"vs__selected-options"},[t._l(t.selectedValue,(function(e){return t._t("selected-option-container",[n("span",{key:t.getOptionKey(e),staticClass:"vs__selected"},[t._t("selected-option",[t._v("\n "+t._s(t.getOptionLabel(e))+"\n ")],null,t.normalizeOptionForSlot(e)),t._v(" "),t.multiple?n("button",{ref:"deselectButtons",refInFor:!0,staticClass:"vs__deselect",attrs:{disabled:t.disabled,type:"button",title:"Deselect "+t.getOptionLabel(e),"aria-label":"Deselect "+t.getOptionLabel(e)},on:{click:function(n){return t.deselect(e)}}},[n(t.childComponents.Deselect,{tag:"component"})],1):t._e()],2)],{option:t.normalizeOptionForSlot(e),deselect:t.deselect,multiple:t.multiple,disabled:t.disabled})})),t._v(" "),t._t("search",[n("input",t._g(t._b({staticClass:"vs__search"},"input",t.scope.search.attributes,!1),t.scope.search.events))],null,t.scope.search)],2),t._v(" "),n("div",{ref:"actions",staticClass:"vs__actions"},[n("button",{directives:[{name:"show",rawName:"v-show",value:t.showClearButton,expression:"showClearButton"}],ref:"clearButton",staticClass:"vs__clear",attrs:{disabled:t.disabled,type:"button",title:"Clear Selected","aria-label":"Clear Selected"},on:{click:t.clearSelection}},[n(t.childComponents.Deselect,{tag:"component"})],1),t._v(" "),t._t("open-indicator",[t.noDrop?t._e():n(t.childComponents.OpenIndicator,t._b({tag:"component"},"component",t.scope.openIndicator.attributes,!1))],null,t.scope.openIndicator),t._v(" "),t._t("spinner",[n("div",{directives:[{name:"show",rawName:"v-show",value:t.mutableLoading,expression:"mutableLoading"}],staticClass:"vs__spinner"},[t._v("Loading...")])],null,t.scope.spinner)],2)]),t._v(" "),n("transition",{attrs:{name:t.transition}},[t.dropdownOpen?n("ul",{directives:[{name:"append-to-body",rawName:"v-append-to-body"}],key:"vs"+t.uid+"__listbox",ref:"dropdownMenu",staticClass:"vs__dropdown-menu",attrs:{id:"vs"+t.uid+"__listbox",role:"listbox",tabindex:"-1"},on:{mousedown:function(e){return e.preventDefault(),t.onMousedown(e)},mouseup:t.onMouseUp}},[t._t("list-header",null,null,t.scope.listHeader),t._v(" "),t._l(t.filteredOptions,(function(e,r){return n("li",{key:t.getOptionKey(e),staticClass:"vs__dropdown-option",class:{"vs__dropdown-option--selected":t.isOptionSelected(e),"vs__dropdown-option--highlight":r===t.typeAheadPointer,"vs__dropdown-option--disabled":!t.selectable(e)},attrs:{role:"option",id:"vs"+t.uid+"__option-"+r,"aria-selected":r===t.typeAheadPointer||null},on:{mouseover:function(n){t.selectable(e)&&(t.typeAheadPointer=r)},mousedown:function(n){n.preventDefault(),n.stopPropagation(),t.selectable(e)&&t.select(e)}}},[t._t("option",[t._v("\n "+t._s(t.getOptionLabel(e))+"\n ")],null,t.normalizeOptionForSlot(e))],2)})),t._v(" "),0===t.filteredOptions.length?n("li",{staticClass:"vs__no-options"},[t._t("no-options",[t._v("Sorry, no matching options.")],null,t.scope.noOptions)],2):t._e(),t._v(" "),t._t("list-footer",null,null,t.scope.listFooter)],2):n("ul",{staticStyle:{display:"none",visibility:"hidden"},attrs:{id:"vs"+t.uid+"__listbox",role:"listbox"}})]),t._v(" "),t._t("footer",null,null,t.scope.footer)],2)}),[],!1,null,null,null).exports),y={ajax:d,pointer:l,pointerScroll:u};n.d(e,"VueSelect",(function(){return _})),n.d(e,"mixins",(function(){return y})),e.default=_}])},function(t,e,n){t.exports=n(432)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createOverlay=s,e.adjustElementZIndex=c,e.mousedown=u,e.mouseup=l,e.mousemove=d,e.setDraggerOffset=f;var r,i=n(39),o=(r=i)&&r.__esModule?r:{default:r};var a={draggableElementId:null,down:!1,height:0,width:0,initialX:0,initialY:0,constraintToWindow:!1,cursorPreviousX:0,cursorPreviousY:0,draggerOffsetLeft:0,draggerOffsetTop:0,overlay:null,draggableEl:null,initialZIndex:void 0};function s(t,e,n){var r=document.createElement("div");return r.setAttribute("style","\n width: 100vw; \n height: 100vh; \n position: absolute;\n top: 0;\n left: 0;\n z-index: 10000;\n "),r.addEventListener("mouseup",(function(t){return l(t,e,n)})),r.addEventListener("mousedown",(function(t){return u(t,e,n)})),r.addEventListener("mousemove",(function(t){return d(t,e,n)})),document.body.appendChild(r),r}function c(t,e){t.style.zIndex=e}function u(t,e,n){if(!n.draggableElementId||function(t,e){for(var n=0;nt.clientX,i=n.cursorPreviousXt.clientY;n.constraintToWindow&&(function(t,e,n){return t.offsetLeft+e.width>=window.innerWidth&&!n}(e,n,r)||function(t,e,n){return t.offsetLeft<=0&&!n}(e,0,i))||(e.style.left=n.draggerOffsetLeft+(t.clientX-n.initialX)+"px"),n.constraintToWindow&&(function(t,e,n){return t.offsetTop<=0&&!n}(e,0,o)||function(t,e,n){return t.offsetTop+e.height>=window.innerHeight&&!n}(e,n,a))||(e.style.top=n.draggerOffsetTop+(t.clientY-n.initialY)+"px")}n.cursorPreviousX=t.clientX,n.cursorPreviousY=t.clientY}function f(t,e){e.draggerOffsetLeft=t.offsetLeft,e.draggerOffsetTop=t.offsetTop}e.default=o.default.directive("drag",{inserted:function(t,e,n){a.draggableElementId=e.arg||null,a.constraintToWindow=e.modifiers["window-only"],t.addEventListener("mouseup",(function(e){return l(0,t,a)})),t.addEventListener("mousedown",(function(e){return u(e,t,a)})),t.addEventListener("mousemove",(function(e){return d(e,t,a)})),f(t,a),a.initialZIndex=t.style.zIndex}})},function(t,e,n){"use strict";(function(t){var r=n(39),i=n(118),o=n(223),a=n(224),s=n(220),c=n(222),u=n(221),l=n(57);r.default.use(i.a);var d=[{path:"/",components:{status:o.a}},{path:"/status",components:{status:a.a}},{path:"/search/citizens",components:{search:s.a}},{path:"/search/vehicles",components:{search:c.a}},{path:"/search/incidents",components:{search:l.a}},{path:"/search/bolo",components:{search:l.a}},{path:"/create/bolo",components:{create:l.a}},{path:"/dispatch",components:{dispatch:u.a}},{path:"/messaging",components:{messaging:l.a}},{path:"/notes",components:{notes:l.a}},{path:"/panic",components:{panic:l.a}}],f=new i.a({base:t.env.BASE_URL,routes:d});e.a=f}).call(this,n(116))},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.offenceModalOpen?n("OffenceModal"):t._e(),t._v(" "),t.markersModalOpen?n("MarkersModal"):t._e(),t._v(" "),n("SearchBar",{on:{searchChanged:function(e){return t.sendSearch(e)}}}),t._v(" "),t.isLoading?n("UpdateMessage",{attrs:{message:"Contacting control..."}}):n("SearchResults",{attrs:{searched:t.searched}})],1)};r._withStripped=!0;var i=n(44),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"search-bar"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.firstName,expression:"firstName"},{name:"debounce",rawName:"v-debounce:1s",value:t.handleUpdate,expression:"handleUpdate",arg:"1s"}],attrs:{type:"text",id:"search-first-name",placeholder:"First name"},domProps:{value:t.firstName},on:{input:function(e){e.target.composing||(t.firstName=e.target.value)}}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.lastName,expression:"lastName"},{name:"debounce",rawName:"v-debounce:1s",value:t.handleUpdate,expression:"handleUpdate",arg:"1s"}],attrs:{type:"text",id:"search-surname",placeholder:"Surname"},domProps:{value:t.lastName},on:{input:function(e){e.target.composing||(t.lastName=e.target.value)}}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.dateOfBirth,expression:"dateOfBirth"},{name:"debounce",rawName:"v-debounce:1s",value:t.handleUpdate,expression:"handleUpdate",arg:"1s"}],attrs:{type:"text",id:"search-date-of-birth",placeholder:"Date of birth"},domProps:{value:t.dateOfBirth},on:{input:function(e){e.target.composing||(t.dateOfBirth=e.target.value)}}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.id,expression:"id"},{name:"debounce",rawName:"v-debounce:1s",value:t.handleUpdate,expression:"handleUpdate",arg:"1s"}],attrs:{type:"text",id:"search-id",placeholder:"Citizen ID"},domProps:{value:t.id},on:{input:function(e){e.target.composing||(t.id=e.target.value)}}})])};o._withStripped=!0;var a={data:function(){return{firstName:"",lastName:"",dateOfBirth:"",id:""}},computed:{preppedSearch:function(){var t=this,e={};return Object.keys(this.$data).forEach((function(n){var r=t.$data[n]?t.$data[n].toString().trim():null;r&&r.length>0&&(e[n]=r)})),e}},methods:{handleUpdate:function(){var t=this.preppedSearch;Object.keys(t).length>0&&this.$emit("searchChanged",this.preppedSearch)}}},s=(n(504),n(1)),c=Object(s.a)(a,o,[],!1,null,"7d233728",null);c.options.__file="src/components/main/search/citizens/SearchBar.vue";var u=c.exports,l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.results.length>0?n("div",{attrs:{id:"search-results"}},t._l(t.results,(function(e){return n("Citizen",{key:e.id,attrs:{citizen:e,open:t.open,setOpen:t.setOpen},on:{openCitizenResult:function(e){return t.setOpen(e)}}})})),1):t._e(),t._v(" "),t.searched&&0===t.results.length?n("UpdateMessage",{attrs:{message:"No results found"}}):t._e()],1)};l._withStripped=!0;var d=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"citizen"},[n("div",{staticClass:"header"},[n("div",{staticClass:"name"},[t._v("\n "+t._s(t.citizen.firstName)+" "+t._s(t.citizen.lastName)+"\n ")]),t._v(" "),n("div",{staticClass:"markers"},[n("Markers",{attrs:{markers:t.citizen.markers}}),t._v(" "),n("MiniButton",{attrs:{text:"Edit markers",colour:"rgba(0,0,0,0.2)",borderRadius:"3px",icon:"fa-pen-alt",padding:"6px 8px"},on:{miniClick:function(e){return t.openMarkersModal()}}})],1),t._v(" "),n("div",{staticClass:"shove-right"},[t.getAlerts?n("div",{staticClass:"alerts-container"},[n("Alert",{attrs:{icon:"fa-exclamation-triangle"}})],1):t._e(),t._v(" "),n("div",{on:{click:t.setOpen}},[n("i",{directives:[{name:"show",rawName:"v-show",value:!t.isOpen,expression:"!isOpen"}],staticClass:"fas fa-chevron-down"}),t._v(" "),n("i",{directives:[{name:"show",rawName:"v-show",value:t.isOpen,expression:"isOpen"}],staticClass:"fas fa-chevron-up"})])])]),t._v(" "),t.isOpen?n("div",{staticClass:"legal-actions"},[n("MiniButton",{attrs:{text:"Add offence",colour:"rgba(0,255,0,0.5)",borderRadius:"3px",icon:"fa-pen-alt",padding:"6px 8px"},on:{miniClick:function(e){return t.openOffenceModal(!0)}}})],1):t._e(),t._v(" "),t.isOpen?n("div",{staticClass:"details"},[n("Property",{staticClass:"ethnicity property",attrs:{label:"Ethnicity",value:t.citizen.ethnicity?t.citizen.ethnicity.name:"[ Unknown ethnicity ]"}}),t._v(" "),n("Property",{staticClass:"gender property",attrs:{label:"Gender",value:t.citizen.gender?t.citizen.gender.name:"[ Unknown gender ]"}}),t._v(" "),n("Property",{staticClass:"height property",attrs:{label:"Height",value:t.citizen.height}}),t._v(" "),n("Property",{staticClass:"weight property",attrs:{label:"Weight",value:t.citizen.weight}}),t._v(" "),n("Property",{staticClass:"hair property",attrs:{label:"Hair",value:t.citizen.hair}}),t._v(" "),n("Property",{staticClass:"eyes property",attrs:{label:"Eyes",value:t.citizen.eyes}}),t._v(" "),n("Property",{staticClass:"address property",attrs:{label:"Address",value:t.citizen.address}}),t._v(" "),n("Property",{staticClass:"postal-code property",attrs:{label:"Postal code",value:t.citizen.postalCode}}),t._v(" "),n("Property",{staticClass:"dob property",attrs:{label:"DOB",value:t.citizen.dateOfBirth}}),t._v(" "),n("div",{staticClass:"vehicles"},t._l(t.citizen.vehicles,(function(t){return n("Vehicle",{key:t.id,attrs:{vehicle:t}})})),1),t._v(" "),n("div",{staticClass:"weapons"},t._l(t.citizen.weapons,(function(t){return n("Weapon",{key:t.id,attrs:{weapon:t}})})),1),t._v(" "),n("div",{staticClass:"licences"},t._l(t.citizen.licences,(function(t){return n("Licence",{key:t.id,attrs:{licence:t}})})),1),t._v(" "),n("div",{staticClass:"warrants"},t._l(t.citizen.warrants,(function(t){return n("Warrant",{key:t.id,attrs:{warrant:t}})})),1),t._v(" "),n("div",{staticClass:"incidents"},[n("Incidents",{attrs:{citizen:t.citizen}})],1)],1):t._e()])};d._withStripped=!0;var f=n(16),p=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vehicle"},[n("SectionProperty",{staticClass:"section",attrs:{label:"Vehicle"}}),t._v(" "),n("div",{staticClass:"vehicle-container"},[n("div",{staticClass:"details"},[n("div",{staticClass:"licence-plate"},[n("Property",{attrs:{label:"",value:t.vehicle.licencePlate||"[ Unknown licence plate ]"}})],1),t._v(" "),n("div",{staticClass:"colour"},[n("Property",{attrs:{label:"",value:t.vehicle.colour||"[ Unknown colour ]"}}),t._v("\n  \n "),n("Property",{attrs:{label:"",value:t.vehicle.vehicleModel?t.vehicle.vehicleModel.name:"[ Unknown model ]"}})],1),t._v(" "),n("div",{staticClass:"insurance"},[n("Property",{attrs:{label:"Insurance",value:t.vehicle.insuranceStatus?t.vehicle.insuranceStatus.name:"[ Unknown status ]"}})],1)]),t._v(" "),n("div",{staticClass:"vehicle-markers"},[t.hasMarkers?n("Markers",{attrs:{markers:t.vehicle.markers}}):t._e(),t._v(" "),n("MiniButton",{attrs:{text:"Edit markers",colour:"rgba(0,0,0,0.2)",borderRadius:"3px",icon:"fa-pen-alt",padding:"6px 8px"},on:{miniClick:function(e){return t.openMarkersModal()}}})],1)])],1)};p._withStripped=!0;var h=n(26),v=n(62),g=n(6),m={props:{vehicle:{type:Object,required:!0}},computed:{hasMarkers:function(){return this.vehicle.markers&&this.vehicle.markers.length>0}},components:{Property:f.a,SectionProperty:h.a,Markers:v.a,MiniButton:g.a},methods:{openMarkersModal:function(){this.$store.commit("setModal",{type:"markers",data:{open:!0,type:"Vehicle",entity:this.vehicle,updateMutation:"updateVehicleInCitizenSearchResult"}})}}},A=(n(514),Object(s.a)(m,p,[],!1,null,"cca3cc9e",null));A.options.__file="src/components/reusable/Citizen/Vehicle.vue";var _=A.exports,y=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"weapon"},[e("SectionProperty",{staticClass:"section",attrs:{label:"Weapon"}}),this._v(" "),e("div",{staticClass:"details"},[e("div",{staticClass:"type"},[e("Property",{attrs:{label:"",value:this.weapon.weaponType?this.weapon.weaponType.name:"[ Unknown weapon type ]"}})],1),this._v(" "),e("div",{staticClass:"name"},[e("Property",{attrs:{label:"Status",value:this.weapon.weaponStatus?this.weapon.weaponStatus.name:"[ Unknown weapon status ]"}})],1)])],1)};y._withStripped=!0;var b={props:{weapon:{type:Object,required:!0}},components:{Property:f.a,SectionProperty:h.a}},x=(n(516),Object(s.a)(b,y,[],!1,null,"3aa271b2",null));x.options.__file="src/components/reusable/Citizen/Weapon.vue";var w=x.exports,C=n(87),S=n(88),k=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._l(t.citizen.offences,(function(e,r){return n("Incident",{key:e.id,attrs:{incident:e,citizen:t.citizen,index:r}})})),1)};k._withStripped=!0;var E=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"incident"},[n("SectionProperty",{staticClass:"section",attrs:{label:"Incident"}}),t._v(" "),n("div",{staticClass:"details"},[n("div",{staticClass:"time-location"},[n("div",{staticClass:"spread"},[n("Property",{staticClass:"incident-date",attrs:{value:t.incident.date}}),t._v("\n  \n "),n("Property",{staticClass:"incident-time",attrs:{value:t.incident.time}})],1),t._v(" "),n("Property",{staticClass:"location",attrs:{value:t.incident.location}})],1),t._v(" "),n("div",{staticClass:"arrest"},[n("div",{staticClass:"label"},[t._v("Arrest")]),t._v(" "),n("div",{staticClass:"arrest-details"},[t.incident.arrest.id?t._e():n("div",[t._v("\n Not made\n ")]),t._v(" "),t.incident.arrest.id?n("div",[n("div",{staticClass:"arrest-date-time"},[n("div",{staticClass:"spread"},[n("Property",{staticClass:"arrest-date",attrs:{value:t.incident.arrest.date}}),t._v("\n  \n "),n("Property",{staticClass:"arrest-time",attrs:{value:t.incident.arrest.time}})],1)]),t._v(" "),n("div",{staticClass:"arrest-officer"},[n("span",{staticClass:"label"},[t._v("Arresting officer")]),t._v(" "),n("div",{staticClass:"spread"},[n("Property",{attrs:{value:t.incident.arrest.officer.firstName}}),t._v("\n  \n "),n("Property",{attrs:{value:t.incident.arrest.officer.lastName}})],1)]),t._v(" "),n("div",{staticClass:"arrest-charges"},[n("span",{staticClass:"label"},[t._v("Charges")]),t._v(" "),n("Property",{attrs:{value:t.incident.arrest.charges.map((function(t){return t.name})).join(", ")}})],1)]):t._e()])]),t._v(" "),n("div",{staticClass:"charges"},[n("div",{staticClass:"label"},[t._v("Charges")]),t._v(" "),n("div",{staticClass:"charges-details"},[0===t.incident.charges.length?n("div",[t._v("\n No charges filed\n ")]):t._e(),t._v(" "),t.incident.charges.length>0?n("div",[n("Property",{attrs:{value:t.incident.charges.map((function(t){return t.name})).join(", ")}})],1):t._e()])]),t._v(" "),n("div",{staticClass:"tickets"},[n("div",{staticClass:"label"},[t._v("Ticket")]),t._v(" "),n("div",{staticClass:"ticket-list"},[t.incident.ticket.id?t._e():n("div",[t._v("\n Not issued\n ")]),t._v(" "),t.incident.ticket.id?n("div",[n("ul",[n("li",[n("Property",{attrs:{label:"Date & time",value:t.incident.ticket.date+" "+t.incident.ticket.time}})],1),t._v(" "),n("li",[n("Property",{attrs:{label:"Location",value:t.incident.ticket.location}})],1),t._v(" "),n("li",{staticClass:"ticket-officer"},[n("Property",{attrs:{label:"Issuing officer",value:t.incident.ticket.officer.firstName}}),t._v("\n  \n "),n("Property",{attrs:{value:t.incident.ticket.officer.lastName}})],1),t._v(" "),n("li",[n("Property",{attrs:{label:"Points issued",value:t.incident.ticket.points}})],1),t._v(" "),n("li",[n("Property",{attrs:{label:"Fine issued",value:t.incident.ticket.fine}})],1),t._v(" "),n("li",[n("Property",{attrs:{label:"Notes",value:t.incident.ticket.notes}})],1)])]):t._e()])]),t._v(" "),n("div",{staticClass:"edit"},[n("MiniButton",{attrs:{text:"Edit offence",colour:"rgba(0,0,0,0.2)",borderRadius:"3px",icon:"fa-pen-alt",padding:"6px 8px"},on:{miniClick:function(e){return t.openOffencesModal()}}}),t._v(" "),n("MiniButton",{attrs:{text:"Delete offence",colour:"rgba(255,255,0,0.5)",borderRadius:"3px",icon:"fa-trash-alt",padding:"6px 8px"},on:{miniClick:function(e){return t.deleteOffence()}}})],1)])],1)};E._withStripped=!0;var O=n(5),M={props:{incident:{type:Object,required:!0},citizen:{type:Object,required:!0},index:{type:Number,required:!0}},mixins:[O.a],components:{Property:f.a,SectionProperty:h.a,MiniButton:g.a},methods:{openOffencesModal:function(){this.$store.commit("setModal",{type:"offence",data:{open:!0,type:"Citizen",entity:this.citizen,updateMutation:"updateCitizenSearchResult",offenceIndex:this.index}})},deleteOffence:function(){this.sendClientMessage("deleteOffence",{id:this.incident.id,CitizenId:this.citizen.id})}}},T=(n(522),Object(s.a)(M,E,[],!1,null,"9154a3c6",null));T.options.__file="src/components/reusable/Citizen/Incident.vue";var B=T.exports,I={props:{citizen:{type:Object,required:!0}},components:{Incident:B},mixins:[O.a],mounted:function(){this.sendClientMessage("getCitizenOffences",{id:this.citizen.id})}},$=Object(s.a)(I,k,[],!1,null,null,null);$.options.__file="src/components/reusable/Citizen/Incidents.vue";var P=$.exports,j=n(63),R={components:{Property:f.a,Vehicle:_,Weapon:w,Licence:C.a,Warrant:S.a,Incidents:P,Alert:j.a,Markers:v.a,MiniButton:g.a},props:{citizen:{type:Object,required:!0},open:{type:String,required:!0}},methods:{setOpen:function(){this.$emit("openCitizenResult",this.isOpen?"0":this.citizen.id)},openOffenceModal:function(t){t&&this.$store.commit("addEmptyOffence",{citizenId:this.citizen.id});var e=this.citizen.offences.length;this.$store.commit("setModal",{type:"offence",data:{open:!0,type:"Citizen",entity:this.citizen,updateMutation:"updateCitizenSearchResult",offenceIndex:e-1}})},openMarkersModal:function(){this.$store.commit("setModal",{type:"markers",data:{open:!0,type:"Citizen",entity:this.citizen,updateMutation:"updateCitizenSearchResult"}})}},computed:{isOpen:function(){return this.open==this.citizen.id},getAlerts:function(){return null},getWarrants:function(){return this.citizen.warrants}}},D=(n(524),Object(s.a)(R,d,[],!1,null,"064c07ed",null));D.options.__file="src/components/reusable/Citizen/Citizen.vue";var L={components:{Citizen:D.exports,UpdateMessage:i.a},props:{searched:{type:Boolean,required:!0}},data:function(){return{open:"0"}},methods:{setOpen:function(t){this.open=t}},computed:{results:function(){return this.$store.getters.getCitizenSearchResults}}},N=(n(526),Object(s.a)(L,l,[],!1,null,"a395f1ea",null));N.options.__file="src/components/main/search/citizens/SearchResults.vue";var U=N.exports,F=n(86),z=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Modal",{attrs:{open:t.isOpen},on:{close:t.close},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("\n Offence\n ")]},proxy:!0},{key:"body",fn:function(){return[n("div",{staticClass:"offence"},[n("div",{staticClass:"meta"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.offence.date,expression:"offence.date"}],attrs:{type:"text",placeholder:"Enter date"},domProps:{value:t.offence.date},on:{input:function(e){e.target.composing||t.$set(t.offence,"date",e.target.value)}}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.offence.time,expression:"offence.time"}],attrs:{type:"text",placeholder:"Enter time"},domProps:{value:t.offence.time},on:{input:function(e){e.target.composing||t.$set(t.offence,"time",e.target.value)}}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.offence.location,expression:"offence.location"}],attrs:{type:"text",placeholder:"Location"},domProps:{value:t.offence.location},on:{input:function(e){e.target.composing||t.$set(t.offence,"location",e.target.value)}}})]),t._v(" "),t.offence.id?t._e():n("div",{staticClass:"continue"},[n("MiniButton",{attrs:{text:"Continue...",colour:"rgba(0,255,0,0.5)",borderRadius:"3px",icon:"fa-save",padding:"6px 8px"},on:{miniClick:function(e){return t.sendMeta()}}})],1),t._v(" "),t.offence.id?n("div",{staticClass:"continue"},[n("MiniButton",{attrs:{colour:"rgba(0,255,0,0.5)",borderRadius:"3px",icon:"fa-save",padding:"6px 8px"},on:{miniClick:function(e){return t.sendMeta()}}})],1):t._e(),t._v(" "),t.offence.id?n("div",{staticClass:"operations"},[n("div",{staticClass:"tablist"},[n("button",{staticClass:"tab",class:{selected:1===t.active},attrs:{role:"tab"},on:{click:function(e){return t.setActiveTab(1)}}},[t._v("\n Arrest\n ")]),t._v(" "),n("button",{staticClass:"tab",class:{selected:2===t.active},attrs:{role:"tab"},on:{click:function(e){return t.setActiveTab(2)}}},[t._v("\n Charges\n ")]),t._v(" "),n("button",{staticClass:"tab",class:{selected:3===t.active},attrs:{role:"tab"},on:{click:function(e){return t.setActiveTab(3)}}},[t._v("\n Ticket\n ")])]),t._v(" "),n("div",{staticClass:"content"},[n("div",{directives:[{name:"show",rawName:"v-show",value:1===t.active,expression:"active === 1"}],staticClass:"arrest-container"},[n("div",{staticClass:"meta"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.offence.arrest.date,expression:"offence.arrest.date"}],attrs:{type:"text",placeholder:"Enter arrest date"},domProps:{value:t.offence.arrest.date},on:{input:function(e){e.target.composing||t.$set(t.offence.arrest,"date",e.target.value)}}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.offence.arrest.time,expression:"offence.arrest.time"}],attrs:{type:"text",placeholder:"Enter arrest time"},domProps:{value:t.offence.arrest.time},on:{input:function(e){e.target.composing||t.$set(t.offence.arrest,"time",e.target.value)}}})]),t._v(" "),n("div",{staticClass:"arrest-content"},[n("div",{staticClass:"arrest-input"},[n("vue-tags-input",{attrs:{tags:t.offenceToTags(t.offence.arrest.charges),"add-only-from-autocomplete":!0,placeholder:"Add arrest charges","autocomplete-items":t.filteredItemsArrest},on:{"tags-changed":function(e){return t.offence.arrest.charges=t.tagsToOffence(e)}},model:{value:t.arrestTag,callback:function(e){t.arrestTag=e},expression:"arrestTag"}})],1)]),t._v(" "),n("div",{staticClass:"actionlist"},[n("MiniButton",{attrs:{text:"Send to control",colour:"rgba(0,255,0,0.5)",borderRadius:"3px",icon:"fa-save",padding:"6px 8px"},on:{miniClick:function(e){return t.saveArrest()}}})],1)]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:2===t.active,expression:"active === 2"}],staticClass:"charges-container"},[n("div",{staticClass:"charges-content"},[n("vue-tags-input",{attrs:{tags:t.offenceToTags(t.offence.charges),"add-only-from-autocomplete":!0,placeholder:"Add charges","autocomplete-items":t.filteredItemsCharges},on:{"tags-changed":function(e){return t.offence.charges=t.tagsToOffence(e)}},model:{value:t.chargesTag,callback:function(e){t.chargesTag=e},expression:"chargesTag"}})],1),t._v(" "),n("div",{staticClass:"actionlist"},[n("MiniButton",{attrs:{text:"Send to control",colour:"rgba(0,255,0,0.5)",borderRadius:"3px",icon:"fa-save",padding:"6px 8px"},on:{miniClick:function(e){return t.saveCharges()}}})],1)]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:3===t.active,expression:"active === 3"}],staticClass:"tickets"},[n("div",{staticClass:"meta"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.offence.ticket.date,expression:"offence.ticket.date"}],attrs:{type:"text",placeholder:"Enter ticket date"},domProps:{value:t.offence.ticket.date},on:{input:function(e){e.target.composing||t.$set(t.offence.ticket,"date",e.target.value)}}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.offence.ticket.time,expression:"offence.ticket.time"}],attrs:{type:"text",placeholder:"Enter ticket time"},domProps:{value:t.offence.ticket.time},on:{input:function(e){e.target.composing||t.$set(t.offence.ticket,"time",e.target.value)}}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.offence.ticket.location,expression:"offence.ticket.location"}],attrs:{type:"text",placeholder:"Enter ticket location"},domProps:{value:t.offence.ticket.location},on:{input:function(e){e.target.composing||t.$set(t.offence.ticket,"location",e.target.value)}}})]),t._v(" "),n("div",{staticClass:"ticket-content"},[n("div",{staticClass:"ticket-input"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.offence.ticket.points,expression:"offence.ticket.points"}],attrs:{type:"text",placeholder:"Points"},domProps:{value:t.offence.ticket.points},on:{input:function(e){e.target.composing||t.$set(t.offence.ticket,"points",e.target.value)}}})]),t._v(" "),n("div",{staticClass:"ticket-input"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.offence.ticket.fine,expression:"offence.ticket.fine"}],attrs:{type:"text",placeholder:"Fine"},domProps:{value:t.offence.ticket.fine},on:{input:function(e){e.target.composing||t.$set(t.offence.ticket,"fine",e.target.value)}}})]),t._v(" "),n("div",{staticClass:"ticket-input notes"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.offence.ticket.notes,expression:"offence.ticket.notes"}],attrs:{placeholder:"Notes"},domProps:{value:t.offence.ticket.notes},on:{input:function(e){e.target.composing||t.$set(t.offence.ticket,"notes",e.target.value)}}}),t._v(" "),n("div",{staticClass:"character-count"},[t._v("\n "+t._s(t.offence.ticket.notes.length)+" / 255\n ")])])]),t._v(" "),n("div",{staticClass:"actionlist"},[n("MiniButton",{attrs:{text:"Send to control",colour:"rgba(0,255,0,0.5)",borderRadius:"3px",icon:"fa-save",padding:"6px 8px"},on:{miniClick:function(e){return t.saveTicket()}}})],1)])])]):t._e()])]},proxy:!0}])})};z._withStripped=!0;var V=n(84),G=n.n(V),H=n(25),Q={props:{searchResults:{type:Array,required:!0}},data:function(){return{activeTab:1,arrestTag:"",chargesTag:"",arrestCharges:[]}},mixins:[O.a],components:{VueTagsInput:G.a,Modal:H.a,MiniButton:g.a},computed:{isOpen:function(){return this.$store.getters.getIsModalOpen("offence")},active:function(){return this.activeTab},offence:function(){var t=this.$store.getters.getModalData("offence");return t.entity?t.entity.offences[t.offenceIndex]:{}},filteredItemsArrest:function(){var t=this,e=this.$store.getters.getCharges.filter((function(e){return-1!==e.name.toLowerCase().indexOf(t.arrestTag.toLowerCase())}));return this.offenceToTags(e)},filteredItemsCharges:function(){var t=this,e=this.$store.getters.getCharges.filter((function(e){return-1!==e.name.toLowerCase().indexOf(t.chargesTag.toLowerCase())}));return this.offenceToTags(e)}},methods:{setActiveTab:function(t){this.activeTab=t},close:function(){var t=this.$store.getters.getModalData("offence");this.$store.commit("purgeEmptyOffences",t.entity),this.$store.commit("resetModal",{type:"offence"})},sendMeta:function(){var t={CitizenId:this.$store.getters.getModalData("offence").entity.id,date:this.offence.date,location:this.offence.location,time:this.offence.time,charges:this.offence.charges};this.offence.id&&(t.id=this.offence.id),this.sendClientMessage("sendOffenceMeta",t)},saveArrest:function(){var t=this.$store.getters.getModalData("offence"),e=this.$store.getters.getActiveOfficer,n={CitizenId:t.entity.id,date:this.offence.arrest.date,time:this.offence.arrest.time,location:this.offence.location,OffenceId:this.offence.id,OfficerId:e.id,charges:this.offence.arrest.charges};this.offence.arrest.id&&(n.id=this.offence.arrest.id),this.sendClientMessage("saveArrest",n),this.$store.commit(t.updateMutation,{entity:this.$store.getters.getModalData("offence").entity})},saveCharges:function(){var t=this.$store.getters.getModalData("offence"),e={id:this.offence.id,CitizenId:t.entity.id,date:this.offence.date,location:this.offence.location,time:this.offence.time,charges:this.offence.charges};this.sendClientMessage("sendOffenceMeta",e)},saveTicket:function(){var t=this.$store.getters.getModalData("offence"),e=this.$store.getters.getActiveOfficer,n=this.offence.ticket,r={date:this.offence.ticket.date,time:this.offence.ticket.time,location:this.offence.ticket.location,CitizenId:t.entity.id,OffenceId:this.offence.id,OfficerId:e.id,points:n.points,fine:n.fine,notes:n.notes};n.id&&(r.id=n.id),this.sendClientMessage("saveTicket",r)},offenceToTags:function(t){return t.map((function(t){return{id:t.id,text:t.name}}))},tagsToOffence:function(t){return t.map((function(t){return{id:t.id,name:t.text}}))}}},q=(n(532),Object(s.a)(Q,z,[],!1,null,null,null));q.options.__file="src/components/reusable/Offence/OffenceModal.vue";var W=q.exports,Y={components:{SearchBar:u,SearchResults:U,UpdateMessage:i.a,MarkersModal:F.a,OffenceModal:W},data:function(){return{searched:!1,isLoading:!1}},mixins:[O.a],computed:{results:function(){return this.$store.getters.getCitizenSearchResults},offenceModalOpen:function(){return this.$store.getters.getIsModalOpen("offence")},markersModalOpen:function(){return this.$store.getters.getIsModalOpen("markers")}},methods:{sendSearch:function(t){this.isLoading=!0,this.searched=!0,this.sendClientMessage("searchCitizen",t)},purgeEmpty:function(){this.results}},watch:{results:function(){this.isLoading=!1}},destroyed:function(){this.$store.commit("setCitizenSearchResultsInitial",[])}},J=Object(s.a)(Y,r,[],!1,null,null,null);J.options.__file="src/components/main/search/citizens/SearchCitizens.vue";e.a=J.exports},function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"dispatch-container"}},[e("div",{attrs:{id:"calls"}},[e("Calls")],1),this._v(" "),e("div",{attrs:{id:"units"}},[e("Units")],1)])};r._withStripped=!0;var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.callModalOpen?n("CallModal"):t._e(),t._v(" "),t.isSelfDispatch?n("div",{attrs:{id:"new-call-header"}},[n("MiniButton",{attrs:{text:"Create new call",colour:"rgba(0, 255, 0, 0.5)"},on:{miniClick:t.openCallModal}})],1):t._e(),t._v(" "),t.calls.length>0?n("div",{attrs:{id:"calls"}},t._l(t.calls,(function(e){return n("Call",{key:e.id,class:{open:t.isCallOpen(e.id)},attrs:{call:e,isOpen:t.isCallOpen(e.id)},on:{callToggle:function(n){return t.setCallOpen(e.id)}}})})),1):t._e(),t._v(" "),t.calls&&0!=t.calls.length?t._e():n("div",{attrs:{id:"no-calls"}},[n("div",{attrs:{id:"no-calls-text"}},[t._v("No calls at present")])])],1)};i._withStripped=!0;var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"call"}},[n("CallHeader",{attrs:{call:t.call,isOpen:t.isOpen},on:{toggled:t.toggle}}),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isOpen,expression:"isOpen"}],staticClass:"details-container"},[n("div",{staticClass:"call-grade"},[t._v("\n "+t._s(t.call.callGrade.name)+" - "+t._s(t.call.callType.name)+"\n ")]),t._v(" "),n("div",{staticClass:"caller-info"},[t._v("\n "+t._s(t.call.callerInfo)+"\n ")]),t._v(" "),t._l(t.call.callDescriptions,(function(e){return n("div",{key:e.id,staticClass:"description"},[t._v("\n "+t._s(e.text)+"\n ")])})),t._v(" "),n("div",{staticClass:"assignment-heading"},[t._v("Unit assignments:")]),t._v(" "),n("div",{staticClass:"assignments"},t._l(t.units,(function(e){return n("div",{key:e.id},[n("div",{staticClass:"unit-assign"},[n("input",{attrs:{type:"checkbox"},domProps:{checked:t.isAssigned(e.id)},on:{click:function(n){return t.toggleAssign(e.id)}}}),t._v("\n "+t._s(e.callSign)+"\n ")])])})),0)],2)],1)};o._withStripped=!0;var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"call-header"},[n("div",{staticClass:"top-row"},[n("div",{staticClass:"key-info"},[n("div",{staticClass:"summary"},[n("div",{staticClass:"call-type"},[t._v(t._s(t.call.callIncidents.map((function(t){return t.name})).join(", ")))]),t._v(" "),n("div",{staticClass:"call-location"},[t._v("\n "+t._s(t.call.callLocations.map((function(t){return t.name})).join(", "))+"\n ")]),t._v(" "),t.call.assignedUnits.length>0?n("div",{staticClass:"call-units"},t._l(t.units,(function(e){return n("span",{key:e.id,style:{color:"#"+e.unitState.colour}},[t._v("\n "+t._s(e.callSign)+"\n ")])})),0):t._e()]),t._v(" "),t.call.assignedUnits.length>0?n("div",{staticClass:"is-assigned"},[n("i",{staticClass:"fas fa-users"})]):t._e(),t._v(" "),n("div",{staticClass:"expand-button",on:{click:t.toggled}},[t.isOpen?n("i",{staticClass:"fas fa-toggle-on"}):n("i",{staticClass:"fas fa-toggle-off"})])])]),t._v(" "),n("div",{staticClass:"bottom-row"},[n("div",{staticClass:"call-actions"},[n("MiniButton",{staticClass:"call-state-button",attrs:{text:"Edit",colour:"rgba(0,255,0,0.5)"},on:{miniClick:t.openCallModal}}),t._v(" "),n("MiniButton",{attrs:{text:"Delete",colour:"rgba(255, 0, 0, 0.5)"},on:{miniClick:t.deleteCall}})],1)])])};a._withStripped=!0;var s=n(6),c=n(5),u={components:{MiniButton:s.a},props:{call:{type:Object,required:!0},isOpen:{type:Boolean,required:!0}},mixins:[c.a],computed:{units:function(){var t=this.$store.getters.getUnits,e=this.call.assignedUnits.map((function(t){return t.id}));return t.filter((function(t){return e.includes(t.id)}))}},methods:{toggled:function(){this.$emit("toggled")},openCallModal:function(){this.$store.commit("setModal",{type:"call",data:{open:!0,type:"call",entity:this.call}})},deleteCall:function(){this.sendClientMessage("deleteCall",this.call)}}},l=(n(540),n(1)),d=Object(l.a)(u,a,[],!1,null,"08fdf2ba",null);d.options.__file="src/components/main/dispatch/calls/call/CallHeader.vue";var f=d.exports,p={props:{call:{type:Object,required:!0},isOpen:{type:Boolean,required:!0}},mixins:[c.a],components:{CallHeader:f},computed:{units:function(){return this.$store.getters.getUnits.filter((function(t){return!0===t.unitState.active}))}},methods:{toggle:function(){this.$emit("callToggle")},isAssigned:function(t){return this.call.assignedUnits.some((function(e){return e.id===t}))},toggleAssign:function(t){this.sendClientMessage("toggleAssignment",{callId:this.call.id,unitId:t,currentlyAssigned:this.isAssigned(t)})}}},h=(n(542),Object(l.a)(p,o,[],!1,null,"9affd614",null));h.options.__file="src/components/main/dispatch/calls/call/Call.vue";var v=h.exports,g=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Modal",{attrs:{open:t.isOpen},on:{close:t.close},scopedSlots:t._u([{key:"header",fn:function(){return[t._v("\n "+t._s(t.call.id?"Edit":"Create")+" call\n ")]},proxy:!0},{key:"body",fn:function(){return[t.failedValidation?n("div",{staticClass:"failed-validation"},[t._v("\n All fields must be completed\n ")]):t._e(),t._v(" "),n("div",{staticClass:"call"},[n("div",{staticClass:"callerInfo"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.call.callerInfo,expression:"call.callerInfo"}],attrs:{type:"text",placeholder:"Caller information"},domProps:{value:t.call.callerInfo},on:{input:function(e){e.target.composing||t.$set(t.call,"callerInfo",e.target.value)}}})]),t._v(" "),n("div",{staticClass:"gradeType"},[n("div",{staticClass:"grade"},[n("v-select",{staticClass:"call-select",attrs:{label:"name",options:t.$store.getters.getCallGrades},model:{value:t.call.callGrade,callback:function(e){t.$set(t.call,"callGrade",e)},expression:"call.callGrade"}})],1),t._v(" "),n("div",{staticClass:"type"},[n("v-select",{staticClass:"call-select",attrs:{label:"name",options:t.$store.getters.getCallTypes},model:{value:t.call.callType,callback:function(e){t.$set(t.call,"callType",e)},expression:"call.callType"}})],1)]),t._v(" "),n("div",{staticClass:"descriptions"},t._l(t.allDescriptions(),(function(e,r){return n("div",{key:e.id,staticClass:"description"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.call.callDescriptions[r].text,expression:"call.callDescriptions[index].text"}],attrs:{type:"text",placeholder:"Description"},domProps:{value:t.call.callDescriptions[r].text},on:{input:function(e){e.target.composing||t.$set(t.call.callDescriptions[r],"text",e.target.value)}}}),t._v(" "),e.text.length>0?n("MiniButton",{staticClass:"description-button",attrs:{icon:"fa-trash-alt",colour:"rgba(255,0,0,0.5)"},on:{miniClick:function(e){return t.deleteDescription(r)}}}):t._e()],1)})),0),t._v(" "),n("div",{staticClass:"incidents"},[n("vue-tags-input",{attrs:{tags:t.thingToTags(t.call.callIncidents),"add-only-from-autocomplete":!0,placeholder:"Add incidents","autocomplete-items":t.filteredItemsIncidents},on:{"tags-changed":function(e){return t.call.callIncidents=t.tagsToThing(e)}},model:{value:t.incidentTag,callback:function(e){t.incidentTag=e},expression:"incidentTag"}})],1),t._v(" "),n("div",{staticClass:"locations"},[n("vue-tags-input",{attrs:{tags:t.thingToTags(t.call.callLocations),"add-only-from-autocomplete":!0,placeholder:"Add locations","autocomplete-items":t.filteredItemsLocations},on:{"tags-changed":function(e){return t.call.callLocations=t.tagsToThing(e)}},model:{value:t.locationTag,callback:function(e){t.locationTag=e},expression:"locationTag"}})],1)])]},proxy:!0},{key:"footer",fn:function(){return[n("MiniButton",{staticClass:"call-save-button",attrs:{text:"Save",colour:"rgba(0,255,0,0.5)"},on:{miniClick:t.saveCall}})]},proxy:!0}])})};g._withStripped=!0;var m=n(84),A=n.n(m),_={data:function(){return{call:JSON.parse(JSON.stringify(this.$store.getters.getModalData("call").entity)),incidentTag:"",locationTag:"",failedValidation:!1}},components:{Modal:n(25).a,MiniButton:s.a,VueTagsInput:A.a},mixins:[c.a],computed:{isOpen:function(){return this.$store.getters.getIsModalOpen("call")},filteredItemsIncidents:function(){var t=this,e=this.$store.getters.getCallIncidents.filter((function(e){return-1!==e.name.toLowerCase().indexOf(t.incidentTag.toLowerCase())}));return this.thingToTags(e)},filteredItemsLocations:function(){var t=this,e=this.$store.getters.getLocations.filter((function(e){return-1!==e.name.toLowerCase().indexOf(t.locationTag.toLowerCase())}));return this.thingToTags(e)}},methods:{close:function(){this.$store.commit("resetModal",{type:"call"})},allDescriptions:function(){var t=this.call.callDescriptions;return(0===t.length||t[t.length-1].text.length>0)&&this.call.callDescriptions.push({id:Math.floor(5e4*Math.random()+1),text:""}),t},deleteDescription:function(t){this.call.callDescriptions.splice(t,1)},thingToTags:function(t){return t.map((function(t){return{id:t.id,text:t.name}}))},tagsToThing:function(t){return t.map((function(t){return{id:t.id,name:t.text}}))},saveCall:function(){this.call.callDescriptions=this.call.callDescriptions.filter((function(t){return t.text.length>0})),this.call.callGrade.id&&this.call.callType.id&&0!==this.call.callerInfo.length&&0!==this.call.callIncidents.length&&0!==this.call.callLocations.length&&0!==this.call.callDescriptions.length?(this.failedValidation=!1,this.sendClientMessage("sendCall",this.call),this.$store.commit("resetModal",{type:"call"})):this.failedValidation=!0}}},y=(n(544),Object(l.a)(_,g,[],!1,null,"4ac6217c",null));y.options.__file="src/components/reusable/Call/CallModal.vue";var b={data:function(){return{callsOpen:[]}},components:{Call:v,CallModal:y.exports,MiniButton:s.a},computed:{calls:function(){return this.$store.getters.getCalls},callModalOpen:function(){return this.$store.getters.getIsModalOpen("call")},isSelfDispatch:function(){return this.$store.getters.getResourceConfig.self_dispatch}},methods:{isCallOpen:function(t){return this.callsOpen.includes(t)},setCallOpen:function(t){this.isCallOpen(t)?this.callsOpen.splice(this.callsOpen.findIndex((function(e){return e==t})),1):this.callsOpen.push(t)},openCallModal:function(){this.$store.commit("setModal",{type:"call",data:{open:!0,type:"call",entity:{assignedUnits:[],callDescriptions:[],callGrade:{},callIncidents:[],callLocations:[],callType:{},callerInfo:"",id:null}}})}}},x=(n(546),Object(l.a)(b,i,[],!1,null,"022738c8",null));x.options.__file="src/components/main/dispatch/calls/Calls.vue";var w={components:{Calls:x.exports,Units:n(85).a}},C=(n(548),Object(l.a)(w,r,[],!1,null,"3a6c7149",null));C.options.__file="src/components/main/dispatch/Dispatch.vue";e.a=C.exports},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("MarkersModal"),t._v(" "),n("SearchBar",{on:{searchChanged:function(e){return t.sendSearch(e)}}}),t._v(" "),t.isLoading?n("UpdateMessage",{attrs:{message:"Contacting control..."}}):n("SearchResults",{attrs:{searched:t.searched}})],1)};r._withStripped=!0;var i=n(44),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"search-bar"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.licencePlate,expression:"licencePlate"},{name:"debounce",rawName:"v-debounce:1s",value:t.handleUpdate,expression:"handleUpdate",arg:"1s"}],attrs:{type:"text",id:"search-licence-plate",placeholder:"Licence plate"},domProps:{value:t.licencePlate},on:{input:function(e){e.target.composing||(t.licencePlate=e.target.value)}}}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.colour,expression:"colour"},{name:"debounce",rawName:"v-debounce:1s",value:t.handleUpdate,expression:"handleUpdate",arg:"1s"}],attrs:{type:"text",id:"search-colour",placeholder:"Colour"},domProps:{value:t.colour},on:{input:function(e){e.target.composing||(t.colour=e.target.value)}}}),t._v(" "),n("v-select",{staticClass:"vehicle-select",attrs:{label:"name",options:t.vehicleModels},on:{input:t.handleSelectUpdate},model:{value:t.vehicleModel,callback:function(e){t.vehicleModel=e},expression:"vehicleModel"}})],1)};o._withStripped=!0;var a={data:function(){return{licencePlate:"",colour:"",vehicleModel:{}}},computed:{preppedSearch:function(){var t=this,e={};return Object.keys(this.$data).forEach((function(n){var r=t.$data[n];r instanceof Object&&(r=r.id),(r=r?r.toString().trim():null)&&r.length>0&&(e[n]=r)})),e},vehicleModels:function(){return this.$store.getters.getVehicleModels}},methods:{handleSelectUpdate:function(t){this.vehicleModel=t,this.handleUpdate()},handleUpdate:function(){var t=this.preppedSearch;Object.keys(t).length>0&&this.$emit("searchChanged",this.preppedSearch)}}},s=(n(534),n(1)),c=Object(s.a)(a,o,[],!1,null,"087f22e4",null);c.options.__file="src/components/main/search/vehicles/SearchBar.vue";var u=c.exports,l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.results.length>0?n("div",{attrs:{id:"search-results"}},t._l(t.results,(function(t){return n("Vehicle",{key:t.id,staticClass:"result",attrs:{vehicle:t}})})),1):t._e(),t._v(" "),t.searched&&0===t.results.length?n("UpdateMessage",{attrs:{message:"No results found"}}):t._e()],1)};l._withStripped=!0;var d=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vehicle"},[n("div",{staticClass:"header"},[n("div",{staticClass:"summary"},[t._v("\n "+t._s(t.vehicle.licencePlate||"[ Unknown licence plate ]")+"\n "+t._s(t.vehicle.colour||"[ Unknown colour ]")+"\n "+t._s(t.vehicle.vehicleModel?t.vehicle.vehicleModel.name:"[ Unknown model ]")+"\n ")]),t._v(" "),n("div",{staticClass:"markers"},[n("Markers",{attrs:{markers:t.vehicle.markers}}),t._v(" "),n("MiniButton",{attrs:{text:"Edit markers",colour:"rgba(0,0,0,0.2)",borderRadius:"3px",icon:"fa-pen-alt",padding:"6px 8px"},on:{miniClick:function(e){return t.openVehicleMarkersModal(t.vehicle)}}})],1)]),t._v(" "),n("div",{staticClass:"details"},[n("div",{staticClass:"detail-section"},[n("SectionProperty",{attrs:{label:"Owner"}}),t._v(" "),n("div",{staticClass:"owner-details"},[n("div",[n("div",{staticClass:"name-alerts"},[n("Property",{staticClass:"name property",attrs:{value:t.getCitizenName}}),t._v(" "),t.citizenHasWarrants?n("div",{staticClass:"alerts-container"},[n("Alert",{attrs:{icon:"fa-exclamation-triangle"}})],1):t._e()],1),t._v(" "),n("Property",{staticClass:"address property",attrs:{value:t.getCitizenAddress}}),t._v(" "),n("div",{staticClass:"vehicle-markers"},[t.citizenHasMarkers?n("Markers",{attrs:{markers:t.vehicle.citizen.markers}}):t._e(),t._v(" "),n("MiniButton",{attrs:{text:"Edit markers",colour:"rgba(0,0,0,0.2)",borderRadius:"3px",icon:"fa-pen-alt",padding:"6px 8px"},on:{miniClick:function(e){return t.openCitizenMarkersModal(t.vehicle.citizen)}}})],1)],1)])],1),t._v(" "),n("div",{staticClass:"detail-section"},[n("SectionProperty",{attrs:{label:"Licences"}}),t._v(" "),n("div",{staticClass:"licences-details"},[n("div",t._l(t.vehicle.citizen.licences,(function(t){return n("div",{key:t.id},[n("Property",{staticClass:"licence property",attrs:{label:t.licenceType?t.licenceType.name:"[ Unknown licence type ]",value:t.licenceStatus?t.licenceStatus.name:"[ Unknown status ]"}})],1)})),0)])],1),t._v(" "),n("div",{staticClass:"detail-section"},[n("SectionProperty",{attrs:{label:"Insurance"}}),t._v(" "),n("div",{staticClass:"insurance-details"},[n("Property",{staticClass:"name property",attrs:{value:t.vehicle.insuranceStatus?t.vehicle.insuranceStatus.name:"[ Unknown insurance status ]"}})],1)],1)])])};d._withStripped=!0;var f=n(27),p=n(26),h=n(16),v=n(87),g=n(62),m=n(88),A=n(63),_=n(6),y={components:{Property:h.a,Licence:v.a,Warrant:m.a,Alert:A.a,Markers:g.a,MiniButton:_.a,SectionProperty:p.a},props:{vehicle:{type:Object,required:!0}},mixins:[f.a],methods:{openVehicleMarkersModal:function(t){this.doLog(JSON.parse(JSON.stringify(t))),this.$store.commit("setModal",{type:"markers",data:{open:!0,type:"Vehicle",entity:t,updateMutation:"updateVehicleSearchResult"}})},openCitizenMarkersModal:function(t){this.doLog(JSON.parse(JSON.stringify(t))),this.$store.commit("setModal",{type:"markers",data:{open:!0,type:"Citizen",entity:t,updateMutation:"updateCitizenInVehicleSearchResult"}})}},computed:{getAlerts:function(){},getCitizenName:function(){return"".concat(this.vehicle.citizen.firstName," ").concat(this.vehicle.citizen.lastName)},getCitizenAddress:function(){return"".concat(this.vehicle.citizen.address," ").concat(this.vehicle.citizen.postalCode)},citizenHasMarkers:function(){return this.vehicle.citizen.markers&&this.vehicle.citizen.markers.length>0},citizenHasWarrants:function(){return this.vehicle.citizen.warrants&&this.vehicle.citizen.warrants.length>0}}},b=(n(536),Object(s.a)(y,d,[],!1,null,"8a57b116",null));b.options.__file="src/components/reusable/Vehicle/Vehicle.vue";var x={components:{Vehicle:b.exports,UpdateMessage:i.a},props:{searched:{type:Boolean,required:!0}},data:function(){return{open:"0"}},methods:{setOpen:function(t){this.open=t}},computed:{results:function(){return this.$store.getters.getVehicleSearchResults}}},w=(n(538),Object(s.a)(x,l,[],!1,null,"0dfcb4c7",null));w.options.__file="src/components/main/search/vehicles/SearchResults.vue";var C=w.exports,S=n(86),k=n(5),E={components:{SearchBar:u,SearchResults:C,UpdateMessage:i.a,MarkersModal:S.a},data:function(){return{searched:!1,isLoading:!1}},mixins:[k.a],methods:{sendSearch:function(t){this.isLoading=!0,this.searched=!0,this.sendClientMessage("searchVehicle",t)}},watch:{results:function(){this.isLoading=!1}},computed:{results:function(){return this.$store.getters.getVehicleSearchResults}},destroyed:function(){this.$store.commit("setVehicleSearchResults",[])}},O=Object(s.a)(E,r,[],!1,null,null,null);O.options.__file="src/components/main/search/vehicles/SearchVehicles.vue";e.a=O.exports},function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"container"}},[e("div",{attrs:{id:"home-text"}},[this._v(this._s(this.getText||"WELCOME TO THE MDT"))])])};r._withStripped=!0;var i={computed:{getText:function(){return this.$store.getters.getResourceConfig.homepage}}},o=(n(476),n(1)),a=Object(o.a)(i,r,[],!1,null,"45815535",null);a.options.__file="src/components/main/Home.vue";e.a=a.exports},function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("Units")],1)};r._withStripped=!0;var i={components:{Units:n(85).a}},o=n(1),a=Object(o.a)(i,r,[],!1,null,null,null);a.options.__file="src/components/main/status/Status.vue";e.a=a.exports},function(t,e,n){n(226),t.exports=n(552)},function(t,e,n){"use strict";(function(t){if(n(227),n(424),n(425),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;function e(t,e,n){t[e]||Object.defineProperty(t,e,{writable:!0,configurable:!0,value:n})}e(String.prototype,"padLeft","".padStart),e(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach((function(t){[][t]&&e(Array,t,Function.call.bind([][t]))}))}).call(this,n(45))},function(t,e,n){n(228),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(308),n(309),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(109),n(332),n(139),n(333),n(140),n(334),n(335),n(336),n(337),n(338),n(143),n(145),n(146),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(376),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414),n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),t.exports=n(28)},function(t,e,n){"use strict";var r=n(7),i=n(21),o=n(12),a=n(0),s=n(18),c=n(41).KEY,u=n(8),l=n(64),d=n(58),f=n(47),p=n(10),h=n(121),v=n(90),g=n(230),m=n(71),A=n(4),_=n(9),y=n(14),b=n(22),x=n(33),w=n(46),C=n(50),S=n(124),k=n(23),E=n(70),O=n(13),M=n(48),T=k.f,B=O.f,I=S.f,$=r.Symbol,P=r.JSON,j=P&&P.stringify,R=p("_hidden"),D=p("toPrimitive"),L={}.propertyIsEnumerable,N=l("symbol-registry"),U=l("symbols"),F=l("op-symbols"),z=Object.prototype,V="function"==typeof $&&!!E.f,G=r.QObject,H=!G||!G.prototype||!G.prototype.findChild,Q=o&&u((function(){return 7!=C(B({},"a",{get:function(){return B(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=T(z,e);r&&delete z[e],B(t,e,n),r&&t!==z&&B(z,e,r)}:B,q=function(t){var e=U[t]=C($.prototype);return e._k=t,e},W=V&&"symbol"==typeof $.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof $},Y=function(t,e,n){return t===z&&Y(F,e,n),A(t),e=x(e,!0),A(n),i(U,e)?(n.enumerable?(i(t,R)&&t[R][e]&&(t[R][e]=!1),n=C(n,{enumerable:w(0,!1)})):(i(t,R)||B(t,R,w(1,{})),t[R][e]=!0),Q(t,e,n)):B(t,e,n)},J=function(t,e){A(t);for(var n,r=g(e=b(e)),i=0,o=r.length;o>i;)Y(t,n=r[i++],e[n]);return t},X=function(t){var e=L.call(this,t=x(t,!0));return!(this===z&&i(U,t)&&!i(F,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,R)&&this[R][t])||e)},Z=function(t,e){if(t=b(t),e=x(e,!0),t!==z||!i(U,e)||i(F,e)){var n=T(t,e);return!n||!i(U,e)||i(t,R)&&t[R][e]||(n.enumerable=!0),n}},K=function(t){for(var e,n=I(b(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==R||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===z,r=I(n?F:b(t)),o=[],a=0;r.length>a;)!i(U,e=r[a++])||n&&!i(z,e)||o.push(U[e]);return o};V||(s(($=function(){if(this instanceof $)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(F,n),i(this,R)&&i(this[R],t)&&(this[R][t]=!1),Q(this,t,w(1,n))};return o&&H&&Q(z,t,{configurable:!0,set:e}),q(t)}).prototype,"toString",(function(){return this._k})),k.f=Z,O.f=Y,n(51).f=S.f=K,n(66).f=X,E.f=tt,o&&!n(40)&&s(z,"propertyIsEnumerable",X,!0),h.f=function(t){return q(p(t))}),a(a.G+a.W+a.F*!V,{Symbol:$});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var rt=M(p.store),it=0;rt.length>it;)v(rt[it++]);a(a.S+a.F*!V,"Symbol",{for:function(t){return i(N,t+="")?N[t]:N[t]=$(t)},keyFor:function(t){if(!W(t))throw TypeError(t+" is not a symbol!");for(var e in N)if(N[e]===t)return e},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!V,"Object",{create:function(t,e){return void 0===e?C(t):J(C(t),e)},defineProperty:Y,defineProperties:J,getOwnPropertyDescriptor:Z,getOwnPropertyNames:K,getOwnPropertySymbols:tt});var ot=u((function(){E.f(1)}));a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return E.f(y(t))}}),P&&a(a.S+a.F*(!V||u((function(){var t=$();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(_(e)||void 0!==t)&&!W(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,j.apply(P,r)}}),$.prototype[D]||n(17)($.prototype,D,$.prototype.valueOf),d($,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(t,e,n){t.exports=n(64)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(48),i=n(70),o=n(66);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),c=o.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var r=n(0);r(r.S,"Object",{create:n(50)})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(12),"Object",{defineProperty:n(13).f})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(12),"Object",{defineProperties:n(123)})},function(t,e,n){var r=n(22),i=n(23).f;n(35)("getOwnPropertyDescriptor",(function(){return function(t,e){return i(r(t),e)}}))},function(t,e,n){var r=n(14),i=n(24);n(35)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},function(t,e,n){var r=n(14),i=n(48);n(35)("keys",(function(){return function(t){return i(r(t))}}))},function(t,e,n){n(35)("getOwnPropertyNames",(function(){return n(124).f}))},function(t,e,n){var r=n(9),i=n(41).onFreeze;n(35)("freeze",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(9),i=n(41).onFreeze;n(35)("seal",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(9),i=n(41).onFreeze;n(35)("preventExtensions",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(9);n(35)("isFrozen",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},function(t,e,n){var r=n(9);n(35)("isSealed",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},function(t,e,n){var r=n(9);n(35)("isExtensible",(function(t){return function(e){return!!r(e)&&(!t||t(e))}}))},function(t,e,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(125)})},function(t,e,n){var r=n(0);r(r.S,"Object",{is:n(126)})},function(t,e,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(94).set})},function(t,e,n){"use strict";var r=n(59),i={};i[n(10)("toStringTag")]="z",i+""!="[object z]"&&n(18)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,e,n){var r=n(0);r(r.P,"Function",{bind:n(127)})},function(t,e,n){var r=n(13).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(12)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(9),i=n(24),o=n(10)("hasInstance"),a=Function.prototype;o in a||n(13).f(a,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(0),i=n(129);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(0),i=n(130);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){"use strict";var r=n(7),i=n(21),o=n(30),a=n(96),s=n(33),c=n(8),u=n(51).f,l=n(23).f,d=n(13).f,f=n(60).trim,p=r.Number,h=p,v=p.prototype,g="Number"==o(n(50)(v)),m="trim"in String.prototype,A=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=m?e.trim():f(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,c=e.slice(2),u=0,l=c.length;ui)return NaN;return parseInt(c,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(g?c((function(){v.valueOf.call(n)})):"Number"!=o(n))?a(new h(A(e)),n,p):A(e)};for(var _,y=n(12)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),b=0;y.length>b;b++)i(h,_=y[b])&&!i(p,_)&&d(p,_,l(h,_));p.prototype=v,v.constructor=p,n(18)(r,"Number",p)}},function(t,e,n){"use strict";var r=n(0),i=n(31),o=n(131),a=n(97),s=1..toFixed,c=Math.floor,u=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",d=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*u[n],u[n]=r%1e7,r=c(r/1e7)},f=function(t){for(var e=6,n=0;--e>=0;)n+=u[e],u[e]=c(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==u[t]){var n=String(u[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},h=function(t,e,n){return 0===e?n:e%2==1?h(t,e-1,n*t):h(t*t,e/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(8)((function(){s.call({})}))),"Number",{toFixed:function(t){var e,n,r,s,c=o(this,l),u=i(t),v="",g="0";if(u<0||u>20)throw RangeError(l);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(v="-",c=-c),c>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*h(2,69,1))-69)<0?c*h(2,-e,1):c/h(2,e,1),n*=4503599627370496,(e=52-e)>0){for(d(0,n),r=u;r>=7;)d(1e7,0),r-=7;for(d(h(10,r,1),0),r=e-1;r>=23;)f(1<<23),r-=23;f(1<0?v+((s=g.length)<=u?"0."+a.call("0",u-s)+g:g.slice(0,s-u)+"."+g.slice(s-u)):v+g}})},function(t,e,n){"use strict";var r=n(0),i=n(8),o=n(131),a=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==a.call(1,void 0)}))||!i((function(){a.call({})}))),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(0),i=n(7).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{isInteger:n(132)})},function(t,e,n){var r=n(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),i=n(132),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),i=n(130);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(0),i=n(129);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(0),i=n(133),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e,n){var r=n(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),i=n(98);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(0),i=n(99);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var r=n(0);r(r.S,"Math",{fround:n(134)})},function(t,e,n){var r=n(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,a=0,s=arguments.length,c=0;a0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(o)}})},function(t,e,n){var r=n(0),i=Math.imul;r(r.S+r.F*n(8)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log1p:n(133)})},function(t,e,n){var r=n(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(0);r(r.S,"Math",{sign:n(98)})},function(t,e,n){var r=n(0),i=n(99),o=Math.exp;r(r.S+r.F*n(8)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(0),i=n(99),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(0),i=n(49),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(0),i=n(22),o=n(11);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var r=n(0),i=n(72)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(0),i=n(11),o=n(102),a="".endsWith;r(r.P+r.F*n(103)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),s=void 0===n?r:Math.min(i(n),r),c=String(t);return a?a.call(e,c,s):e.slice(s-c.length,s)===c}})},function(t,e,n){"use strict";var r=n(0),i=n(102);r(r.P+r.F*n(103)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0);r(r.P,"String",{repeat:n(97)})},function(t,e,n){"use strict";var r=n(0),i=n(11),o=n(102),a="".startsWith;r(r.P+r.F*n(103)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(19)("anchor",(function(t){return function(e){return t(this,"a","name",e)}}))},function(t,e,n){"use strict";n(19)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,e,n){"use strict";n(19)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,e,n){"use strict";n(19)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,e,n){"use strict";n(19)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,e,n){"use strict";n(19)("fontcolor",(function(t){return function(e){return t(this,"font","color",e)}}))},function(t,e,n){"use strict";n(19)("fontsize",(function(t){return function(e){return t(this,"font","size",e)}}))},function(t,e,n){"use strict";n(19)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,e,n){"use strict";n(19)("link",(function(t){return function(e){return t(this,"a","href",e)}}))},function(t,e,n){"use strict";n(19)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,e,n){"use strict";n(19)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,e,n){"use strict";n(19)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,e,n){"use strict";n(19)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,e,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(0),i=n(14),o=n(33);r(r.P+r.F*n(8)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(0),i=n(307);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var r=n(8),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-50000000000001))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(18)(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,e,n){var r=n(10)("toPrimitive"),i=Date.prototype;r in i||n(17)(i,r,n(310))},function(t,e,n){"use strict";var r=n(4),i=n(33);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,e,n){var r=n(0);r(r.S,"Array",{isArray:n(71)})},function(t,e,n){"use strict";var r=n(29),i=n(0),o=n(14),a=n(135),s=n(104),c=n(11),u=n(105),l=n(106);i(i.S+i.F*!n(74)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,d,f=o(t),p="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,g=void 0!==v,m=0,A=l(f);if(g&&(v=r(v,h>2?arguments[2]:void 0,2)),null==A||p==Array&&s(A))for(n=new p(e=c(f.length));e>m;m++)u(n,m,g?v(f[m],m):f[m]);else for(d=A.call(f),n=new p;!(i=d.next()).done;m++)u(n,m,g?a(d,v,[i.value,m],!0):i.value);return n.length=m,n}})},function(t,e,n){"use strict";var r=n(0),i=n(105);r(r.S+r.F*n(8)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),i=n(22),o=[].join;r(r.P+r.F*(n(65)!=Object||!n(32)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(0),i=n(93),o=n(30),a=n(49),s=n(11),c=[].slice;r(r.P+r.F*n(8)((function(){i&&c.call(i)})),"Array",{slice:function(t,e){var n=s(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var i=a(t,n),u=a(e,n),l=s(u-i),d=new Array(l),f=0;f1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(0);r(r.P,"Array",{copyWithin:n(137)}),n(42)("copyWithin")},function(t,e,n){var r=n(0);r(r.P,"Array",{fill:n(108)}),n(42)("fill")},function(t,e,n){"use strict";var r=n(0),i=n(36)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(42)("find")},function(t,e,n){"use strict";var r=n(0),i=n(36)(6),o="findIndex",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(42)(o)},function(t,e,n){n(52)("Array")},function(t,e,n){var r=n(7),i=n(96),o=n(13).f,a=n(51).f,s=n(73),c=n(67),u=r.RegExp,l=u,d=u.prototype,f=/a/g,p=/a/g,h=new u(f)!==f;if(n(12)&&(!h||n(8)((function(){return p[n(10)("match")]=!1,u(f)!=f||u(p)==p||"/a/i"!=u(f,"i")})))){u=function(t,e){var n=this instanceof u,r=s(t),o=void 0===e;return!n&&r&&t.constructor===u&&o?t:i(h?new l(r&&!o?t.source:t,e):l((r=t instanceof u)?t.source:t,r&&o?c.call(t):e),n?this:d,u)};for(var v=function(t){t in u||o(u,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})},g=a(l),m=0;g.length>m;)v(g[m++]);d.constructor=u,u.prototype=d,n(18)(r,"RegExp",u)}n(52)("RegExp")},function(t,e,n){"use strict";n(140);var r=n(4),i=n(67),o=n(12),a=/./.toString,s=function(t){n(18)(RegExp.prototype,"toString",t,!0)};n(8)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(t,e,n){"use strict";var r=n(4),i=n(11),o=n(111),a=n(75);n(76)("match",1,(function(t,e,n,s){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=s(n,t,this);if(e.done)return e.value;var c=r(t),u=String(this);if(!c.global)return a(c,u);var l=c.unicode;c.lastIndex=0;for(var d,f=[],p=0;null!==(d=a(c,u));){var h=String(d[0]);f[p]=h,""===h&&(c.lastIndex=o(u,i(c.lastIndex),l)),p++}return 0===p?null:f}]}))},function(t,e,n){"use strict";var r=n(4),i=n(14),o=n(11),a=n(31),s=n(111),c=n(75),u=Math.max,l=Math.min,d=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n(76)("replace",2,(function(t,e,n,h){return[function(r,i){var o=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=h(n,t,this,e);if(i.done)return i.value;var d=r(t),f=String(this),p="function"==typeof e;p||(e=String(e));var g=d.global;if(g){var m=d.unicode;d.lastIndex=0}for(var A=[];;){var _=c(d,f);if(null===_)break;if(A.push(_),!g)break;""===String(_[0])&&(d.lastIndex=s(f,o(d.lastIndex),m))}for(var y,b="",x=0,w=0;w=x&&(b+=f.slice(x,S)+T,x=S+C.length)}return b+f.slice(x)}];function v(t,e,r,o,a,s){var c=r+t.length,u=o.length,l=p;return void 0!==a&&(a=i(a),l=f),n.call(s,l,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(c);case"<":s=a[i.slice(1,-1)];break;default:var l=+i;if(0===l)return n;if(l>u){var f=d(l/10);return 0===f?n:f<=u?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):n}s=o[l-1]}return void 0===s?"":s}))}}))},function(t,e,n){"use strict";var r=n(4),i=n(126),o=n(75);n(76)("search",1,(function(t,e,n,a){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var s=r(t),c=String(this),u=s.lastIndex;i(u,0)||(s.lastIndex=0);var l=o(s,c);return i(s.lastIndex,u)||(s.lastIndex=u),null===l?-1:l.index}]}))},function(t,e,n){"use strict";var r=n(73),i=n(4),o=n(68),a=n(111),s=n(11),c=n(75),u=n(110),l=n(8),d=Math.min,f=[].push,p="length",h=!l((function(){RegExp(4294967295,"y")}));n(76)("split",2,(function(t,e,n,l){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[p]||2!="ab".split(/(?:ab)*/)[p]||4!=".".split(/(.?)(.?)/)[p]||".".split(/()()/)[p]>1||"".split(/.?/)[p]?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);for(var o,a,s,c=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,h=void 0===e?4294967295:e>>>0,v=new RegExp(t.source,l+"g");(o=u.call(v,i))&&!((a=v.lastIndex)>d&&(c.push(i.slice(d,o.index)),o[p]>1&&o.index=h));)v.lastIndex===o.index&&v.lastIndex++;return d===i[p]?!s&&v.test("")||c.push(""):c.push(i.slice(d)),c[p]>h?c.slice(0,h):c}:"0".split(void 0,0)[p]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):v.call(String(i),n,r)},function(t,e){var r=l(v,t,this,e,v!==n);if(r.done)return r.value;var u=i(t),f=String(this),p=o(u,RegExp),g=u.unicode,m=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(h?"y":"g"),A=new p(h?u:"^(?:"+u.source+")",m),_=void 0===e?4294967295:e>>>0;if(0===_)return[];if(0===f.length)return null===c(A,f)?[f]:[];for(var y=0,b=0,x=[];bo;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&P(t)}))}},P=function(t){m.call(c,(function(){var e,n,r,i=t._v,o=j(t);if(o&&(e=y((function(){O?C.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=O||j(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},j=function(t){return 1!==t._h&&0===(t._a||t._c).length},R=function(t){m.call(c,(function(){var e;O?C.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})}))},D=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),$(e,!0))},L=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw w("Promise can't be resolved itself");(e=I(t))?A((function(){var r={_w:n,_d:!1};try{e.call(t,u(L,r,1),u(D,r,1))}catch(t){D.call(r,t)}})):(n._v=t,n._s=1,$(n,!1))}catch(t){D.call({_w:n,_d:!1},t)}}};B||(E=function(t){h(this,E,"Promise","_h"),p(t),r.call(this);try{t(u(L,this,1),u(D,this,1))}catch(t){D.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(55)(E.prototype,{then:function(t,e){var n=T(g(this,E));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=O?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&$(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=u(L,t,1),this.reject=u(D,t,1)},_.f=T=function(t){return t===E||t===a?new o(t):i(t)}),d(d.G+d.W+d.F*!B,{Promise:E}),n(58)(E,"Promise"),n(52)("Promise"),a=n(28).Promise,d(d.S+d.F*!B,"Promise",{reject:function(t){var e=T(this);return(0,e.reject)(t),e.promise}}),d(d.S+d.F*(s||!B),"Promise",{resolve:function(t){return x(s&&this===a?E:this,t)}}),d(d.S+d.F*!(B&&n(74)((function(t){E.all(t).catch(M)}))),"Promise",{all:function(t){var e=this,n=T(e),r=n.resolve,i=n.reject,o=y((function(){var n=[],o=0,a=1;v(t,!1,(function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then((function(t){c||(c=!0,n[s]=t,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=T(e),r=n.reject,i=y((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(t,e,n){"use strict";var r=n(147),i=n(56);n(78)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(0),i=n(79),o=n(115),a=n(4),s=n(49),c=n(11),u=n(9),l=n(7).ArrayBuffer,d=n(68),f=o.ArrayBuffer,p=o.DataView,h=i.ABV&&l.isView,v=f.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(l!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return h&&h(t)||u(t)&&g in t}}),r(r.P+r.U+r.F*n(8)((function(){return!new f(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),o=new(d(this,f))(c(i-r)),u=new p(this),l=new p(o),h=0;r=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){var r=n(23),i=n(24),o=n(21),a=n(0),s=n(9),c=n(4);a(a.S,"Reflect",{get:function t(e,n){var a,u,l=arguments.length<3?e:arguments[2];return c(e)===l?e[n]:(a=r.f(e,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(l):void 0:s(u=i(e))?t(u,n,l):void 0}})},function(t,e,n){var r=n(23),i=n(0),o=n(4);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},function(t,e,n){var r=n(0),i=n(24),o=n(4);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),i=n(4),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(149)})},function(t,e,n){var r=n(0),i=n(4),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(13),i=n(23),o=n(24),a=n(21),s=n(0),c=n(46),u=n(4),l=n(9);s(s.S,"Reflect",{set:function t(e,n,s){var d,f,p=arguments.length<4?e:arguments[3],h=i.f(u(e),n);if(!h){if(l(f=o(e)))return t(f,n,s,p);h=c(0)}if(a(h,"value")){if(!1===h.writable||!l(p))return!1;if(d=i.f(p,n)){if(d.get||d.set||!1===d.writable)return!1;d.value=s,r.f(p,n,d)}else r.f(p,n,c(0,s));return!0}return void 0!==h.set&&(h.set.call(p,s),!0)}})},function(t,e,n){var r=n(0),i=n(94);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var r=n(0),i=n(69)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(42)("includes")},function(t,e,n){"use strict";var r=n(0),i=n(150),o=n(14),a=n(11),s=n(15),c=n(107);r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return s(t),e=a(r.length),n=c(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n(42)("flatMap")},function(t,e,n){"use strict";var r=n(0),i=n(150),o=n(14),a=n(11),s=n(31),c=n(107);r(r.P,"Array",{flatten:function(){var t=arguments[0],e=o(this),n=a(e.length),r=c(e,0);return i(r,e,e,n,0,void 0===t?1:s(t)),r}}),n(42)("flatten")},function(t,e,n){"use strict";var r=n(0),i=n(72)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(0),i=n(151),o=n(77),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";var r=n(0),i=n(151),o=n(77),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(60)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,e,n){"use strict";n(60)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,e,n){"use strict";var r=n(0),i=n(34),o=n(11),a=n(73),s=n(67),c=RegExp.prototype,u=function(t,e){this._r=t,this._s=e};n(101)(u,"RegExp String",(function(){var t=this._r.exec(this._s);return{value:t,done:null===t}})),r(r.P,"String",{matchAll:function(t){if(i(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in c?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(t.lastIndex),new u(r,e)}})},function(t,e,n){n(90)("asyncIterator")},function(t,e,n){n(90)("observable")},function(t,e,n){var r=n(0),i=n(149),o=n(22),a=n(23),s=n(105);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),c=a.f,u=i(r),l={},d=0;u.length>d;)void 0!==(n=c(r,e=u[d++]))&&s(l,e,n);return l}})},function(t,e,n){var r=n(0),i=n(152)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){var r=n(0),i=n(152)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";var r=n(0),i=n(14),o=n(15),a=n(13);n(12)&&r(r.P+n(80),"Object",{__defineGetter__:function(t,e){a.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(0),i=n(14),o=n(15),a=n(13);n(12)&&r(r.P+n(80),"Object",{__defineSetter__:function(t,e){a.f(i(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(0),i=n(14),o=n(33),a=n(24),s=n(23).f;n(12)&&r(r.P+n(80),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=s(n,r))return e.get}while(n=a(n))}})},function(t,e,n){"use strict";var r=n(0),i=n(14),o=n(33),a=n(24),s=n(23).f;n(12)&&r(r.P+n(80),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=s(n,r))return e.set}while(n=a(n))}})},function(t,e,n){var r=n(0);r(r.P+r.R,"Map",{toJSON:n(153)("Map")})},function(t,e,n){var r=n(0);r(r.P+r.R,"Set",{toJSON:n(153)("Set")})},function(t,e,n){n(81)("Map")},function(t,e,n){n(81)("Set")},function(t,e,n){n(81)("WeakMap")},function(t,e,n){n(81)("WeakSet")},function(t,e,n){n(82)("Map")},function(t,e,n){n(82)("Set")},function(t,e,n){n(82)("WeakMap")},function(t,e,n){n(82)("WeakSet")},function(t,e,n){var r=n(0);r(r.G,{global:n(7)})},function(t,e,n){var r=n(0);r(r.S,"System",{global:n(7)})},function(t,e,n){var r=n(0),i=n(30);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var r=n(0),i=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*i}})},function(t,e,n){var r=n(0),i=n(155),o=n(134);r(r.S,"Math",{fscale:function(t,e,n,r,a){return o(i(t,e,n,r,a))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,o=n>>>0;return(e>>>0)+(r>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,e,n){var r=n(0);r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,o=n>>>0;return(e>>>0)-(r>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,e,n){var r=n(0);r(r.S,"Math",{imulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,a=n>>16,s=r>>16,c=(a*o>>>0)+(i*o>>>16);return a*s+(c>>16)+((i*s>>>0)+(65535&c)>>16)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var r=n(0),i=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*i}})},function(t,e,n){var r=n(0);r(r.S,"Math",{scale:n(155)})},function(t,e,n){var r=n(0);r(r.S,"Math",{umulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,a=n>>>16,s=r>>>16,c=(a*o>>>0)+(i*o>>>16);return a*s+(c>>>16)+((i*s>>>0)+(65535&c)>>>16)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var r=n(0),i=n(28),o=n(7),a=n(68),s=n(142);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){"use strict";var r=n(0),i=n(114),o=n(141);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=n(38),i=n(4),o=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,i(n),o(r))}})},function(t,e,n){var r=n(38),i=n(4),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var c=s.get(e);return c.delete(n),!!c.size||s.delete(e)}})},function(t,e,n){var r=n(38),i=n(4),o=n(24),a=r.has,s=r.get,c=r.key,u=function(t,e,n){if(a(t,e,n))return s(t,e,n);var r=o(e);return null!==r?u(t,r,n):void 0};r.exp({getMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:c(arguments[2]))}})},function(t,e,n){var r=n(145),i=n(154),o=n(38),a=n(4),s=n(24),c=o.keys,u=o.key,l=function(t,e){var n=c(t,e),o=s(t);if(null===o)return n;var a=l(o,e);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(t){return l(a(t),arguments.length<2?void 0:u(arguments[1]))}})},function(t,e,n){var r=n(38),i=n(4),o=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(38),i=n(4),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){var r=n(38),i=n(4),o=n(24),a=r.has,s=r.key,c=function(t,e,n){if(a(t,e,n))return!0;var r=o(e);return null!==r&&c(t,r,n)};r.exp({hasMetadata:function(t,e){return c(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(38),i=n(4),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(38),i=n(4),o=n(15),a=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?i:o)(n),a(r))}}})},function(t,e,n){var r=n(0),i=n(113)(),o=n(7).process,a="process"==n(30)(o);r(r.G,{asap:function(t){var e=a&&o.domain;i(e?e.bind(t):t)}})},function(t,e,n){"use strict";var r=n(0),i=n(7),o=n(28),a=n(113)(),s=n(10)("observable"),c=n(15),u=n(4),l=n(53),d=n(55),f=n(17),p=n(54),h=p.RETURN,v=function(t){return null==t?void 0:c(t)},g=function(t){var e=t._c;e&&(t._c=void 0,e())},m=function(t){return void 0===t._o},A=function(t){m(t)||(t._o=void 0,g(t))},_=function(t,e){u(t),this._c=void 0,this._o=t,t=new y(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:c(n),this._c=n)}catch(e){return void t.error(e)}m(this)&&g(this)};_.prototype=d({},{unsubscribe:function(){A(this)}});var y=function(t){this._s=t};y.prototype=d({},{next:function(t){var e=this._s;if(!m(e)){var n=e._o;try{var r=v(n.next);if(r)return r.call(n,t)}catch(t){try{A(e)}finally{throw t}}}},error:function(t){var e=this._s;if(m(e))throw t;var n=e._o;e._o=void 0;try{var r=v(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{g(e)}finally{throw t}}return g(e),t},complete:function(t){var e=this._s;if(!m(e)){var n=e._o;e._o=void 0;try{var r=v(n.complete);t=r?r.call(n,t):void 0}catch(t){try{g(e)}finally{throw t}}return g(e),t}}});var b=function(t){l(this,b,"Observable","_f")._f=c(t)};d(b.prototype,{subscribe:function(t){return new _(t,this._f)},forEach:function(t){var e=this;return new(o.Promise||i.Promise)((function(n,r){c(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:n})}))}}),d(b,{from:function(t){var e="function"==typeof this?this:b,n=v(u(t)[s]);if(n){var r=u(n.call(t));return r.constructor===e?r:new e((function(t){return r.subscribe(t)}))}return new e((function(e){var n=!1;return a((function(){if(!n){try{if(p(t,!1,(function(t){if(e.next(t),n)return h}))===h)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}})),function(){n=!0}}))},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t2,i=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*s,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,e,n){var r=n(0),i=n(112);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(109),i=n(48),o=n(18),a=n(7),s=n(17),c=n(61),u=n(10),l=u("iterator"),d=u("toStringTag"),f=c.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(p),v=0;v=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}}}function v(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return E()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=g(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function m(){}function A(){}function _(){}function y(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function b(t){function n(e,i,o,a){var s=g(t[e],t,i);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then((function(t){n("next",t,o,a)}),(function(t){n("throw",t,o,a)})):Promise.resolve(u).then((function(t){c.value=t,o(c)}),a)}a(s.arg)}var i;"object"==typeof e.process&&e.process.domain&&(n=e.process.domain.bind(n)),this._invoke=function(t,e){function r(){return new Promise((function(r,i){n(t,e,r,i)}))}return i=i?i.then(r,r):r()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=g(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n li[data-v-e091e5d0] {\n color: rgba(255, 255, 255, 0.5);\n padding: 0 15px;\n border-right: 1px solid rgba(255, 255, 255, 0.71);\n border-left: 1px solid rgba(255, 255, 255, 0.71);\n cursor: pointer;\n position: relative;\n}\n#top_level > li[data-v-e091e5d0]:hover {\n color: rgba(0, 178, 255, 0.5);\n}\n#top_level > li.router-link-active[data-v-e091e5d0] {\n color: #00b2ff;\n}\n#top_level > li[data-v-e091e5d0]:first-child {\n border-left: 0;\n padding-left: 0;\n}\n#top_level > li[data-v-e091e5d0]:last-child {\n border-right: 0;\n padding-right: 0;\n}\n.dropdown_trigger:hover .dropdown_container[data-v-e091e5d0],\n.dropdown_container[data-v-e091e5d0] {\n display: flex;\n}\n.dropdown_container[data-v-e091e5d0] {\n display: none;\n flex-direction: column;\n position: absolute;\n top: 25px;\n left: -1px;\n padding-top: 5px;\n background: #333;\n}\n.dropdown_container li[data-v-e091e5d0] {\n padding: 10px;\n border-top: 1px solid rgba(255, 255, 255, 0.7);\n border-right: 1px solid rgba(255, 255, 255, 0.7);\n border-left: 1px solid rgba(255, 255, 255, 0.7);\n color: rgba(255, 255, 255, 0.5);\n}\n.dropdown_container > li.router-link-active[data-v-e091e5d0] {\n color: #00b2ff;\n}\n.dropdown_container li[data-v-e091e5d0]:hover {\n color: rgba(0, 178, 255, 0.5);\n}\n.dropdown_container li[data-v-e091e5d0]:last-child {\n border-bottom: 1px solid rgba(255, 255, 255, 0.7);\n}\n",""]),t.exports=e},function(t,e,n){"use strict";var r=n(20),i=n(157),o=n(433),a=n(163);function s(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var c=s(n(160));c.Axios=o,c.create=function(t){return s(a(c.defaults,t))},c.Cancel=n(164),c.CancelToken=n(446),c.isCancel=n(159),c.all=function(t){return Promise.all(t)},c.spread=n(447),t.exports=c,t.exports.default=c},function(t,e,n){"use strict";var r=n(20),i=n(158),o=n(434),a=n(435),s=n(163);function c(t){this.defaults=t,this.interceptors={request:new o,response:new o}}c.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},c.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){c.prototype[t]=function(e,n){return this.request(r.merge(n||{},{method:t,url:e}))}})),r.forEach(["post","put","patch"],(function(t){c.prototype[t]=function(e,n,i){return this.request(r.merge(i||{},{method:t,url:e,data:n}))}})),t.exports=c},function(t,e,n){"use strict";var r=n(20);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,n){"use strict";var r=n(20),i=n(436),o=n(159),a=n(160);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return s(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(s(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(20);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e,n){"use strict";var r=n(20);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(162);t.exports=function(t,e,n){var i=n.config.validateStatus;!i||i(n.status)?t(n):e(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(441),i=n(442);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(20),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},function(t,e,n){"use strict";var r=n(20);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(20);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(164);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";n(165)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\nbutton[data-v-bea9cfce] {\n padding: 1px 6px 3px 6px;\n letter-spacing: 0.1em;\n min-width: 50px;\n text-transform: uppercase;\n color: rgba(255, 255, 255, 0.8);\n margin: 0;\n cursor: pointer;\n outline: 0;\n}\nbutton[data-v-bea9cfce]:first-child {\n margin-left: 0;\n}\nbutton[data-v-bea9cfce]:last-child {\n margin-right: 0;\n}\ntext[data-v-bea9cfce] {\n margin-left: 5px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(166)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\ndiv[data-v-926bfc36] {\n flex: 2 2 0;\n text-align: right;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(167)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\ndiv[data-v-712df1a0] {\n flex: 2 2 0;\n text-align: right;\n color: rgba(255, 255, 255, 0.8);\n cursor: pointer;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(168)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\nheader[data-v-5e628c52] {\n background: #333;\n grid-area: 1/1/2/1;\n border-radius: 5px 5px 0 0;\n padding: 0 30px;\n display: flex;\n align-items: center;\n text-transform: uppercase;\n color: rgba(255, 255, 255, 0.5);\n font-weight: 500;\n font-size: 24px;\n letter-spacing: 0.1em;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(169)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\nmain[data-v-c1f1971a] {\n grid-area: 2/1/3/1;\n padding: 40px 35px;\n overflow-y: auto;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(170)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\ndiv[data-v-5a51ecec] {\n flex: 1 1 0;\n text-align: right;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(171)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\ndiv#connection_stat[data-v-3edf4286] {\n flex: 1 1 0;\n display: flex;\n align-items: center;\n}\ndiv#connection_indicator[data-v-3edf4286] {\n width: 24px;\n height: 24px;\n border-radius: 12px;\n background: rgba(82, 255, 0, 0.5);\n margin-right: 20px;\n}\ndiv#connection_indicator.receiving[data-v-3edf4286] {\n animation: blink-data-v-3edf4286 0.2s infinite alternate;\n}\n@keyframes blink-data-v-3edf4286 {\n50% {\n opacity: 0.5;\n}\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(172)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\nfooter[data-v-3d302860] {\n background: #333;\n grid-area: 3/1/3/1;\n display: flex;\n align-items: center;\n text-transform: uppercase;\n padding: 0 30px;\n font-size: 24px;\n font-weight: 500;\n letter-spacing: 0.1em;\n color: rgba(255, 255, 255, 0.7);\n border-radius: 0 0 5px 5px;\n}\n#officer_footer[data-v-3d302860] {\n flex: 1 1 0;\n text-align: right;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(173)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\nbody,\ninput,\ntextarea,\nbutton {\n font-family: 'Jura', sans-serif;\n}\n#mdt {\n position: absolute;\n width: 95vw;\n height: 90vh;\n left: 2.5vw;\n top: 5vh;\n background: #4a4a4a;\n border: 5px solid #777;\n border-radius: 10px;\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: 58px auto 48px;\n}\ndiv#mdt.panic {\n animation: blink 0.5s infinite alternate;\n}\n@keyframes blink {\n0% {\n border-color: #e20000;\n}\n50% {\n border-color: #777;\n}\n}\n",""]),t.exports=e},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(467),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(45))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,c=1,u={},l=!1,d=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){h(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){h(t.data)},r=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(t){var e=d.createElement("script");e.onreadystatechange=function(){h(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(h,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&h(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n *[data-v-788049a6] {\n display: block;\n}\n#title > span[data-v-788049a6] {\n margin: 0 0 20px 0;\n font-size: 30px;\n color: rgba(255, 255, 255, 0.5);\n}\n#title > h1[data-v-788049a6] {\n font-size: 20px;\n text-transform: uppercase;\n}\n#dialer[data-v-788049a6] {\n font-family: 'VT323', sans-serif;\n font-size: 20px;\n color: rgba(0, 0, 0, 0.4);\n margin: 0 20px;\n border: 1px solid rgba(0, 0, 0, 0.5);\n padding: 8px;\n border-radius: 5px;\n background: rgba(255, 255, 255, 0.2);\n text-align: center;\n height: 1em;\n}\n#content[data-v-788049a6] {\n flex: 1;\n padding: 10px 20px;\n}\n#call-complete[data-v-788049a6] {\n color: rgba(255, 255, 255, 0.8);\n padding-bottom: 20px;\n}\n#call-details[data-v-788049a6],\n#connect[data-v-788049a6] {\n display: flex;\n flex-direction: column;\n}\n#connect[data-v-788049a6] {\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n#connect button[data-v-788049a6] {\n margin: 10px 0;\n}\n#footer[data-v-788049a6] {\n padding: 10px 20px;\n background: rgba(0, 0, 0, 0.2);\n color: rgba(255, 255, 255, 0.8);\n display: flex;\n justify-content: flex-end;\n}\n#connect-indicator[data-v-788049a6] {\n width: 16px;\n height: 16px;\n border-radius: 8px;\n margin-left: 10px;\n}\n.disconnected[data-v-788049a6] {\n background: rgba(255, 0, 0, 0.4);\n}\n.connecting[data-v-788049a6] {\n background: rgba(255, 255, 0, 0.4);\n}\n.connected[data-v-788049a6] {\n background: rgba(0, 255, 0, 0.4);\n}\n.caller-input[data-v-788049a6] {\n display: block;\n border-radius: 5px;\n border: 1px solid rgba(255, 255, 255, 0.5);\n background: none;\n padding: 10px;\n outline: none;\n color: rgba(255, 255, 255, 0.5);\n font-weight: 500;\n font-size: 15px;\n letter-spacing: 0.12em;\n margin-top: 20px;\n}\n.notes[data-v-788049a6] {\n height: 100px;\n resize: none;\n}\n#call-actions[data-v-788049a6] {\n margin-top: 20px;\n display: flex;\n justify-content: space-between;\n}\nbutton[data-v-788049a6] {\n width: 40%;\n background: none;\n border: 1px solid rgba(255, 255, 255, 0.5);\n border-radius: 5px;\n padding: 10px;\n font-size: 15px;\n font-weight: 500;\n text-transform: uppercase;\n color: rgba(255, 255, 255, 0.7);\n}\n#place-call[data-v-788049a6],\n#connect-button[data-v-788049a6] {\n background: rgba(0, 255, 0, 0.4);\n}\n#place-call[data-v-788049a6]:disabled {\n opacity: 0.5;\n}\n#cancel[data-v-788049a6] {\n background: rgba(255, 0, 0, 0.4);\n}\n.location-select[data-v-788049a6] {\n border: 0;\n padding: 10px 0;\n}\n.location-select[data-v-788049a6] .vs__dropdown-toggle {\n border-radius: 5px;\n border: 1px solid rgba(255, 255, 255, 0.5);\n background: none;\n color: rgba(255, 255, 255, 0.5);\n font-size: 15px;\n letter-spacing: 0.12em;\n}\n.location-select[data-v-788049a6] .vs__dropdown-menu {\n background: #4a4a4a;\n border: 2px solid rgba(255, 255, 255, 0.5);\n border-top: 0;\n color: rgba(255, 255, 255, 0.5);\n font-size: 15px;\n letter-spacing: 0.12em;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.location-select[data-v-788049a6] .vs__search,\n.location-select[data-v-788049a6] .vs__dropdown-option {\n color: rgba(255, 255, 255, 0.5);\n overflow-x: hidden;\n}\n.location-select[data-v-788049a6] .vs__search::placeholder {\n color: rgba(255, 255, 255, 0.2);\n}\n.location-select[data-v-788049a6] .vs__dropdown-option--highlight {\n background: rgba(0, 0, 0, 0.5);\n}\n.location-select[data-v-788049a6] .vs__selected-options {\n overflow-x: hidden;\n overflow-y: hidden;\n white-space: nowrap;\n}\n.location-select[data-v-788049a6] .vs__selected {\n color: rgba(255, 255, 255, 0.5);\n}\n.location-select[data-v-788049a6] .vs__clear {\n fill: rgba(255, 255, 255, 0.5);\n}\n.location-select[data-v-788049a6] .vs__open-indicator {\n fill: rgba(255, 255, 255, 0.5);\n margin-right: 10px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(178)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#container[data-v-45815535] {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n font-size: 40px;\n color: rgba(255, 255, 255, 0.5);\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(179)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.unit-header[data-v-289e87f5] {\n display: flex;\n flex-direction: column;\n background: rgba(0, 0, 0, 0.1);\n padding: 20px;\n margin-bottom: 14px;\n min-height: 98px;\n}\n.top-row[data-v-289e87f5] {\n margin-bottom: 5px;\n flex: 1;\n}\n.key-info[data-v-289e87f5] {\n display: flex;\n}\n.expand-button[data-v-289e87f5] {\n flex-grow: 1;\n font-size: 25px;\n color: rgba(255, 255, 255, 0.5);\n text-align: right;\n color: rgba(0, 0, 0, 0.3);\n}\n.expand-button i[data-v-289e87f5] {\n display: block;\n}\n.callsign[data-v-289e87f5] {\n font-size: 20px;\n letter-spacing: 0.1em;\n}\n.bottom-row[data-v-289e87f5] {\n display: flex;\n justify-content: space-between;\n align-items: top;\n font-size: 14px;\n color: rgba(255, 255, 255, 0.5);\n}\n.unit-state-name[data-v-289e87f5],\n.unit-type-name[data-v-289e87f5],\n.unit-rank-name[data-v-289e87f5] {\n font-size: 14px;\n color: rgba(255, 255, 255, 0.5);\n text-transform: uppercase;\n letter-spacing: 0.1em;\n}\n.unit-actions[data-v-289e87f5] {\n display: flex;\n flex-grow: 1;\n justify-content: flex-end;\n}\n.unit-state-button[data-v-289e87f5] {\n margin-right: 10px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(180)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#container[data-v-6190aba3] {\n display: flex;\n justify-content: space-around;\n margin-bottom: 10px;\n}\n#container button[data-v-6190aba3] {\n margin-right: 10px;\n}\n#container button[data-v-6190aba3]:last-child {\n margin-right: 0;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(181)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.markers[data-v-143d48f5] {\n display: flex;\n}\n.marker-button[data-v-143d48f5] {\n margin-right: 5px;\n}\n.active[data-v-143d48f5] {\n color: rgba(0, 255, 0, 0.5);\n}\n.disabled[data-v-143d48f5] {\n color: rgba(255, 255, 255, 0.2);\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(182)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.call-details[data-v-660d1fa2] {\n padding: 20px 8px;\n background: rgba(255, 255, 255, 0.1);\n margin-bottom: 14px;\n font-size: 14px;\n text-transform: uppercase;\n line-height: 16px;\n letter-spacing: 0.1em;\n color: rgba(255, 255, 255, 0.7);\n}\n.call-descriptions[data-v-660d1fa2] {\n margin-top: 20px;\n font-weight: normal;\n text-transform: none;\n}\ndiv[data-v-660d1fa2]:last-child {\n margin-bottom: 0;\n}\ndiv.marker-icon[data-v-660d1fa2] {\n cursor: pointer;\n font-size: 20px;\n margin: 10px 0 10px 10px;\n float: right;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(183)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#unit[data-v-5ee57bc8] {\n display: flex;\n flex-direction: column;\n border: 3px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n border-radius: 10px;\n}\n#unit.inPanic[data-v-5ee57bc8] {\n border: 3px solid #e20000;\n}\n#unit[data-v-5ee57bc8]:first-child {\n margin-left: 0;\n}\n#unit[data-v-5ee57bc8]:last-child {\n margin-right: 0;\n}\n.calls-container[data-v-5ee57bc8] {\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow-y: auto;\n}\n.no-calls-container[data-v-5ee57bc8] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n}\n.no-calls[data-v-5ee57bc8] {\n font-size: 20px;\n color: rgba(255, 255, 255, 1);\n text-align: center;\n}\n.maskedcalls[data-v-5ee57bc8] {\n opacity: 0.3;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(184)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.modal-mask[data-v-fdddac0e] {\n position: fixed;\n z-index: 9998;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: table;\n}\n.modal-wrapper[data-v-fdddac0e] {\n display: table-cell;\n vertical-align: middle;\n}\n.modal-container[data-v-fdddac0e] {\n max-width: 50%;\n margin: 0px auto;\n background-color: #4a4a4a;\n box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.5);\n border: 2px solid rgba(255, 255, 255, 0.7);\n}\n.modal-header[data-v-fdddac0e] {\n padding: 10px 20px;\n color: rgba(255, 255, 255, 0.5);\n letter-spacing: 0.1em;\n text-transform: uppercase;\n background: #333;\n}\n.modal-body[data-v-fdddac0e] {\n padding: 20px;\n margin: 20px 0;\n}\n.modal-footer[data-v-fdddac0e] {\n padding: 20px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n}\n.modal-footer > *[data-v-fdddac0e] {\n margin-right: 10px;\n}\n.modal-footer > *[data-v-fdddac0e]:last-child {\n margin-right: 0;\n}\n.modal-close[data-v-fdddac0e] {\n color: rgba(255, 255, 255, 0.8);\n letter-spacing: 0.1em;\n text-transform: uppercase;\n font-size: 13px;\n cursor: pointer;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(185)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.unit[data-v-0703c0fc] {\n display: flex;\n flex-direction: column;\n}\n#unit-callsign[data-v-0703c0fc] {\n display: flex;\n}\n#unit-callsign input[data-v-0703c0fc] {\n flex: 1;\n}\n#type-state[data-v-0703c0fc] {\n margin-top: 10px;\n display: flex;\n}\n#unit-type[data-v-0703c0fc] {\n flex: 1;\n padding-right: 10px;\n}\n#unit-state[data-v-0703c0fc] {\n flex: 1;\n padding-left: 10px;\n}\ninput[data-v-0703c0fc] {\n flex: 1;\n padding: 10px;\n border: 0;\n outline: 0;\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.5);\n font-size: 14px;\n}\n.unit-select[data-v-0703c0fc] .vs__dropdown-toggle {\n height: 44px;\n border-radius: 5px;\n border: 2px solid rgba(255, 255, 255, 0.5);\n background: none;\n color: rgba(255, 255, 255, 0.5);\n font-weight: 500;\n font-size: 14px;\n letter-spacing: 0.12em;\n}\n.unit-select[data-v-0703c0fc] .vs__dropdown-menu {\n background: #4a4a4a;\n border: 2px solid rgba(255, 255, 255, 0.5);\n border-top: 0;\n color: rgba(255, 255, 255, 0.5);\n font-weight: 500;\n font-size: 14px;\n letter-spacing: 0.12em;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.unit-select[data-v-0703c0fc] .vs__search,\n.unit-select[data-v-0703c0fc] .vs__dropdown-option {\n color: rgba(255, 255, 255, 0.5);\n overflow-x: hidden;\n}\n.unit-select[data-v-0703c0fc] .vs__dropdown-option--highlight {\n background: rgba(0, 0, 0, 0.5);\n}\n.unit-select[data-v-0703c0fc] .vs__selected-options {\n overflow-x: hidden;\n overflow-y: hidden;\n white-space: nowrap;\n}\n.unit-select[data-v-0703c0fc] .vs__selected {\n color: rgba(255, 255, 255, 0.5);\n}\n.unit-select[data-v-0703c0fc] .vs__clear {\n display: none;\n}\n.unit-select[data-v-0703c0fc] .vs__open-indicator {\n fill: rgba(255, 255, 255, 0.5);\n margin-right: 10px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(186)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.rank-container[data-v-8cfd582e] {\n margin: 10px;\n}\n.rank-container[data-v-8cfd582e]:first-child {\n margin-left: 0;\n}\n.rank-container[data-v-8cfd582e]:last-child {\n margin-right: 0;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(187)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.ranks[data-v-808bbfba] {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(188)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.state-container[data-v-4a3095ec] {\n display: flex;\n margin: 10px;\n}\n.state-container[data-v-4a3095ec]:first-child {\n margin-left: 0;\n}\n.state-container[data-v-4a3095ec]:last-child {\n margin-right: 0;\n}\n.state-indicator[data-v-4a3095ec] {\n width: 15px;\n border-radius: 4px 0 0 4px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(189)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.states[data-v-6a7d36f8] {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(190)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#unit-actions[data-v-f4bcb770] {\n display: flex;\n justify-content: flex-end;\n}\n#unit-actions div[data-v-f4bcb770] {\n margin-right: 40px;\n}\n#unit-actions div[data-v-f4bcb770]:last-child {\n margin-right: 0;\n}\n#new-unit-header[data-v-f4bcb770] {\n text-align: right;\n margin-bottom: 20px;\n}\n#units-filter[data-v-f4bcb770] {\n display: flex;\n margin-bottom: 20px;\n justify-content: flex-end;\n align-items: center;\n font-size: 20px;\n color: rgba(255, 255, 255, 0.5);\n text-transform: uppercase;\n}\n#units-filter span[data-v-f4bcb770] {\n display: block;\n}\n#units-filter i[data-v-f4bcb770] {\n display: block;\n margin-left: 10px;\n}\n#units[data-v-f4bcb770] {\n display: grid;\n grid-gap: 10px;\n grid-template-columns: repeat(auto-fit, minmax(300px, auto));\n grid-auto-rows: 145px;\n grid-auto-flow: dense;\n}\n.open[data-v-f4bcb770] {\n grid-row: span 4;\n}\ni.fas[data-v-f4bcb770] {\n cursor: pointer;\n}\n#no-units[data-v-f4bcb770] {\n display: flex;\n width: 100%;\n justify-content: center;\n padding-top: 380px;\n font-size: 30px;\n color: rgba(255, 255, 255, 0.5);\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(191)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.update-message[data-v-1042746c] {\n color: rgba(255, 255, 255, 0.5);\n margin-top: 100px;\n text-align: center;\n font-size: 40px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(192)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#search-bar[data-v-7d233728] {\n display: flex;\n justify-content: space-between;\n}\n#search-bar > input[data-v-7d233728] {\n width: 310px;\n height: 16px;\n border-radius: 5px;\n border: 2px solid rgba(255, 255, 255, 0.5);\n background: none;\n padding: 20px 20px 24px 20px;\n color: rgba(255, 255, 255, 0.5);\n font-weight: 500;\n font-size: 24px;\n letter-spacing: 0.12em;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(193)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.label[data-v-37abe4c0] {\n font-weight: bold;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(194)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.section[data-v-77215b42] {\n background: rgba(0, 0, 0, 0.1);\n color: rgba(255, 255, 255, 0.7);\n text-transform: uppercase;\n min-width: 100px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(195)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.alert[data-v-1500cc70] {\n display: flex;\n align-items: baseline;\n background: rgba(255, 0, 0, 0.5);\n border-radius: 4px;\n padding: 6px 8px;\n font-size: 14px;\n font-weight: bold;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0.1em;\n color: rgba(255, 255, 255, 0.7);\n}\n.alert-text[data-v-1500cc70] {\n margin-left: 10px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(196)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.markers-container[data-v-c888e104] {\n display: flex;\n margin-right: 10px;\n}\n.marker[data-v-c888e104] {\n margin-left: 10px;\n}\n.marker[data-v-c888e104]:first-child {\n margin-left: 0;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(197)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.vehicle[data-v-cca3cc9e] {\n display: flex;\n color: rgba(255, 255, 255, 0.7);\n border-bottom: 1px solid rgba(255, 255, 255, 0.7);\n font-size: 14px;\n min-height: 40px;\n}\n.vehicle[data-v-cca3cc9e]:last-child {\n border: 0;\n}\n.vehicle-container[data-v-cca3cc9e] {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n padding: 10px 0;\n}\n.details[data-v-cca3cc9e] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n padding: 0 30px;\n}\n.licence-plate[data-v-cca3cc9e] {\n margin-right: 30px;\n}\n.colour[data-v-cca3cc9e] {\n display: flex;\n}\n.details > div.insurance[data-v-cca3cc9e] {\n margin-left: auto;\n}\n.vehicle-markers[data-v-cca3cc9e] {\n padding: 10px 0 0 30px;\n display: flex;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(198)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.weapon[data-v-3aa271b2] {\n display: flex;\n color: rgba(255, 255, 255, 0.7);\n font-size: 14px;\n min-height: 40px;\n}\n.details[data-v-3aa271b2] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n padding: 0 30px;\n}\n.details > div.name[data-v-3aa271b2] {\n margin-left: auto;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(199)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.licence[data-v-4b92f256] {\n display: flex;\n color: rgba(255, 255, 255, 0.7);\n font-size: 14px;\n min-height: 40px;\n}\n.details[data-v-4b92f256] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n padding: 10px 30px;\n}\n.warrant-details[data-v-4b92f256] {\n margin-left: 20px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(200)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.warrant[data-v-69748d22] {\n display: flex;\n color: rgba(255, 255, 255, 0.7);\n font-size: 14px;\n min-height: 40px;\n}\n.details[data-v-69748d22] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n padding: 10px 30px;\n}\n.warrant-details[data-v-69748d22] {\n margin-left: 20px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(201)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.incident[data-v-9154a3c6] {\n color: rgba(255, 255, 255, 0.7);\n font-size: 14px;\n min-height: 40px;\n display: flex;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n.incident[data-v-9154a3c6]:last-child {\n border-bottom: 0;\n}\n.label[data-v-9154a3c6] {\n font-weight: bold;\n}\n.details[data-v-9154a3c6] {\n display: flex;\n flex-grow: 1;\n align-items: stretch;\n line-height: 18px;\n}\n.time-location[data-v-9154a3c6] {\n padding: 10px 15px;\n flex-basis: 15%;\n align-items: top;\n border-right: 1px solid rgba(255, 255, 255, 0.1);\n}\n.spread[data-v-9154a3c6] {\n display: flex;\n}\n.charges[data-v-9154a3c6] {\n padding: 10px 15px;\n flex-basis: 20%;\n display: flex;\n align-items: top;\n border-right: 1px solid rgba(255, 255, 255, 0.1);\n}\n.arrest[data-v-9154a3c6] {\n padding: 10px 15px;\n flex-basis: 30%;\n display: flex;\n align-items: top;\n border-right: 1px solid rgba(255, 255, 255, 0.1);\n}\n.arrest-details[data-v-9154a3c6],\n.charges-details[data-v-9154a3c6] {\n padding-left: 30px;\n}\n.arrest-date-time[data-v-9154a3c6],\n.arrest-officer[data-v-9154a3c6] {\n margin-right: 15px;\n}\n.tickets[data-v-9154a3c6] {\n padding: 10px 15px;\n display: flex;\n align-items: top;\n flex: 1;\n}\n.ticket-list[data-v-9154a3c6] {\n padding-left: 30px;\n}\n.ticket-officer[data-v-9154a3c6] {\n display: flex;\n white-space: nowrap;\n}\n.edit[data-v-9154a3c6] {\n padding: 10px 15px;\n align-items: top;\n display: flex;\n flex-direction: column;\n}\n.edit > *[data-v-9154a3c6] {\n margin-bottom: 10px;\n}\n.edit > *[data-v-9154a3c6]:last-child {\n margin-bottom: 0;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(202)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.citizen[data-v-064c07ed] {\n letter-spacing: 0.1em;\n margin-top: 5px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n}\n.citizen[data-v-064c07ed]:first-child {\n margin-top: 70px;\n}\n.label[data-v-064c07ed] {\n font-weight: bold;\n}\n.header[data-v-064c07ed] {\n display: flex;\n align-items: center;\n background: rgba(255, 255, 255, 0.1);\n font-weight: 500;\n font-size: 24px;\n letter-spacing: 0.1em;\n color: rgba(255, 255, 255, 0.7);\n}\n.name[data-v-064c07ed],\n.shove-right[data-v-064c07ed] {\n margin: 15px 23px 19px 23px;\n}\n.shove-right[data-v-064c07ed] {\n display: flex;\n padding-left: 40px;\n margin-left: auto;\n}\n.markers[data-v-064c07ed] {\n margin-left: 30px;\n display: flex;\n}\n.alerts-container[data-v-064c07ed] {\n margin: 0 50px 0 auto;\n}\n.legal-actions[data-v-064c07ed] {\n display: flex;\n justify-content: flex-end;\n padding: 10px 20px;\n}\n.legal-actions button[data-v-064c07ed] {\n margin-right: 10px;\n}\n.legal-actions button[data-v-064c07ed]:last-child {\n margin-right: 0;\n}\n.details[data-v-064c07ed] {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n border-top: 1px solid rgba(255, 255, 255, 0.7);\n}\n.property[data-v-064c07ed] {\n color: rgba(255, 255, 255, 0.7);\n padding: 15px;\n}\n.ethnicity[data-v-064c07ed] {\n grid-area: 1/1/1/3;\n border-bottom: 1px solid rgba(255, 255, 255, 0.7);\n border-right: 1px solid rgba(255, 255, 255, 0.7);\n}\n.gender[data-v-064c07ed] {\n grid-area: 1/3/1/5;\n border-bottom: 1px solid rgba(255, 255, 255, 0.7);\n border-right: 1px solid rgba(255, 255, 255, 0.7);\n}\n.height[data-v-064c07ed] {\n grid-area: 1/5/1/7;\n border-bottom: 1px solid rgba(255, 255, 255, 0.7);\n border-right: 1px solid rgba(255, 255, 255, 0.7);\n}\n.weight[data-v-064c07ed] {\n grid-area: 1/7/1/9;\n border-bottom: 1px solid rgba(255, 255, 255, 0.7);\n border-right: 1px solid rgba(255, 255, 255, 0.7);\n}\n.hair[data-v-064c07ed] {\n grid-area: 1/9/1/11;\n border-bottom: 1px solid rgba(255, 255, 255, 0.7);\n border-right: 1px solid rgba(255, 255, 255, 0.7);\n}\n.eyes[data-v-064c07ed] {\n grid-area: 1/11/1/13;\n border-bottom: 1px solid rgba(255, 255, 255, 0.7);\n}\n.address[data-v-064c07ed] {\n grid-area: 2/1/2/7;\n border-right: 1px solid rgba(255, 255, 255, 0.7);\n}\n.postal-code[data-v-064c07ed] {\n grid-area: 2/7/2/11;\n border-right: 1px solid rgba(255, 255, 255, 0.7);\n}\n.dob[data-v-064c07ed] {\n grid-area: 2/11/2/13;\n}\n.vehicles[data-v-064c07ed] {\n grid-area: 3/1/3/13;\n border-top: 1px solid rgba(255, 255, 255, 0.7);\n}\n.weapons[data-v-064c07ed] {\n grid-area: 4/1/4/13;\n display: grid;\n grid-template-columns: repeat(auto-fill, 33%);\n border-top: 1px solid rgba(255, 255, 255, 0.7);\n}\n.licences[data-v-064c07ed] {\n grid-area: 5/1/5/13;\n display: grid;\n grid-template-columns: repeat(auto-fill, 33%);\n border-top: 1px solid rgba(255, 255, 255, 0.7);\n}\n.warrants[data-v-064c07ed] {\n grid-area: 6/1/6/13;\n display: grid;\n border-top: 1px solid rgba(255, 255, 255, 0.7);\n}\n.incidents[data-v-064c07ed] {\n grid-area: 7/1/7/13;\n display: grid;\n grid-template-columns: auto;\n border-top: 1px solid rgba(255, 255, 255, 0.7);\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(203)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#search_results[data-v-a395f1ea] {\n overflow-y: auto;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(204)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.marker-container[data-v-9f8df010] {\n margin: 10px;\n}\n.marker-container[data-v-9f8df010]:first-child {\n margin-left: 0;\n}\n.marker-container[data-v-9f8df010]:last-child {\n margin-right: 0;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(205)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.markers[data-v-1219ebd8] {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(206)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.offence {\n display: flex;\n flex-direction: column;\n}\n.continue {\n display: flex;\n justify-content: flex-end;\n margin-top: 10px;\n}\n.meta {\n display: flex;\n justify-content: flex-end;\n}\n.meta input,\n.tickets input,\n.tickets textarea {\n margin-right: 10px;\n padding: 10px;\n border: 0;\n outline: 0;\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.5);\n font-size: 14px;\n}\n.meta input::placeholder,\n.tickets input::placeholder,\n.tickets textarea::placeholder {\n color: rgba(255, 255, 255, 0.5);\n}\n.meta input:last-child,\n.tickets input:last-child {\n margin-right: 0;\n}\n.operations {\n margin-top: 20px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n}\n.tablist {\n display: flex;\n border-bottom: 1px solid rgba(255, 255, 255, 0.3);\n}\n.tab {\n margin: 0 10px;\n}\n.tab:first-child {\n margin-left: 0;\n}\n.tab:last-child {\n margin-right: 0;\n}\nbutton.tab {\n background: transparent;\n border: 0;\n padding: 10px 20px;\n color: rgba(255, 255, 255, 0.7);\n cursor: pointer;\n outline: none;\n}\nbutton.tab.selected {\n background: #333;\n}\n.tickets-container,\n.charges-container,\n.arrest-container {\n display: flex;\n flex-direction: column;\n}\n.charges-content,\n.arrest-content {\n flex: 1;\n margin-top: 20px;\n}\n.content {\n padding: 20px;\n}\n.ticket-content {\n margin-top: 20px;\n flex: 1;\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: 1fr 3fr;\n grid-column-gap: 20px;\n grid-row-gap: 20px;\n justify-items: stretch;\n align-items: stretch;\n}\n.ticket-input {\n display: flex;\n}\n.tickets input {\n flex-grow: 1;\n}\n.tickets .notes {\n grid-column: span 2;\n display: flex;\n flex-direction: column;\n}\n.tickets textarea {\n flex-grow: 1;\n margin-right: 0;\n resize: none;\n}\n.character-count {\n margin-top: 5px;\n text-align: right;\n color: rgba(255, 255, 255, 0.7);\n font-size: 14px;\n}\n.actionlist {\n display: flex;\n padding-top: 20px;\n justify-content: flex-end;\n}\n.vue-tags-input {\n max-width: 100% !important;\n background-color: rgba(255, 255, 255, 0.1) !important;\n}\n.vue-tags-input .ti-tag {\n background: #333;\n}\n.vue-tags-input .ti-new-tag-input {\n background-color: transparent !important;\n color: #fff !important;\n}\n.vue-tags-input .ti-input {\n padding: 4px 10px;\n}\n.vue-tags-input .ti-autocomplete {\n background: #4a4a4a;\n border: 1px solid rgba(255, 255, 255, 0.3);\n color: #fff;\n}\n.vue-tags-input .ti-autocomplete .ti-selected-item {\n background: #333;\n}\n.vue-tags-input .ti-deletion-mark {\n background: rgba(255, 0, 0, 0.5) !important;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(207)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#search-bar[data-v-087f22e4] {\n display: flex;\n justify-content: space-between;\n}\n#search-bar > input[data-v-087f22e4] {\n width: 410px;\n height: 16px;\n border-radius: 5px;\n border: 2px solid rgba(255, 255, 255, 0.5);\n background: none;\n padding: 20px 20px 24px 20px;\n color: rgba(255, 255, 255, 0.5);\n font-weight: 500;\n font-size: 24px;\n letter-spacing: 0.12em;\n}\n.vehicle-select[data-v-087f22e4] .vs__dropdown-toggle {\n width: 410px;\n height: 64px;\n border-radius: 5px;\n border: 2px solid rgba(255, 255, 255, 0.5);\n background: none;\n color: rgba(255, 255, 255, 0.5);\n font-weight: 500;\n font-size: 24px;\n letter-spacing: 0.12em;\n}\n.vehicle-select[data-v-087f22e4] .vs__dropdown-menu {\n background: #4a4a4a;\n border: 2px solid rgba(255, 255, 255, 0.5);\n border-top: 0;\n color: rgba(255, 255, 255, 0.5);\n font-weight: 500;\n font-size: 24px;\n letter-spacing: 0.12em;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.vehicle-select[data-v-087f22e4] .vs__search,\n.vehicle-select[data-v-087f22e4] .vs__dropdown-option {\n color: rgba(255, 255, 255, 0.5);\n overflow-x: hidden;\n}\n.vehicle-select[data-v-087f22e4] .vs__dropdown-option--highlight {\n background: rgba(0, 0, 0, 0.5);\n}\n.vehicle-select[data-v-087f22e4] .vs__selected-options {\n overflow-x: hidden;\n overflow-y: hidden;\n white-space: nowrap;\n}\n.vehicle-select[data-v-087f22e4] .vs__selected {\n color: rgba(255, 255, 255, 0.5);\n}\n.vehicle-select[data-v-087f22e4] .vs__clear {\n fill: rgba(255, 255, 255, 0.5);\n}\n.vehicle-select[data-v-087f22e4] .vs__open-indicator {\n fill: rgba(255, 255, 255, 0.5);\n margin-right: 10px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(208)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.vehicle[data-v-8a57b116] {\n letter-spacing: 0.1em;\n margin-top: 5px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n}\n.vehicle[data-v-8a57b116]:first-child {\n margin-top: 70px;\n}\n.label[data-v-8a57b116] {\n font-weight: bold;\n}\n.header[data-v-8a57b116] {\n display: flex;\n align-items: center;\n background: rgba(255, 255, 255, 0.1);\n font-weight: 500;\n font-size: 24px;\n letter-spacing: 0.1em;\n color: rgba(255, 255, 255, 0.7);\n}\n.summary[data-v-8a57b116] {\n margin: 15px 23px 19px 23px;\n}\n.markers[data-v-8a57b116] {\n margin-left: 30px;\n display: flex;\n}\n.alerts-container[data-v-8a57b116] {\n margin: 0 50px 0 auto;\n}\n.details[data-v-8a57b116] {\n display: grid;\n grid-template-columns: 4fr 1fr 1fr;\n border-top: 1px solid rgba(255, 255, 255, 0.7);\n}\n.detail-section[data-v-8a57b116] {\n display: flex;\n}\n.vehicle-markers[data-v-8a57b116] {\n display: flex;\n padding: 8px 15px;\n}\n.property[data-v-8a57b116] {\n color: rgba(255, 255, 255, 0.7);\n padding: 8px 15px;\n}\n.licences-details[data-v-8a57b116],\n.insurance-details[data-v-8a57b116],\n.warrant-details[data-v-8a57b116],\n.name-alerts[data-v-8a57b116],\n.owner-details[data-v-8a57b116] {\n display: flex;\n align-items: center;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(209)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#search-results[data-v-0dfcb4c7] {\n margin-top: 70px;\n overflow-y: auto;\n}\n.result[data-v-0dfcb4c7] {\n border-right: 1px solid rgba(255, 255, 255, 0.7);\n border-left: 1px solid rgba(255, 255, 255, 0.7);\n}\n.result[data-v-0dfcb4c7]:first-child {\n border-top: 1px solid rgba(255, 255, 255, 0.7);\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(210)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.call-header[data-v-08fdf2ba] {\n display: flex;\n flex-direction: column;\n background: rgba(0, 0, 0, 0.1);\n padding: 20px;\n margin-bottom: 14px;\n min-height: 98px;\n}\n.top-row[data-v-08fdf2ba] {\n margin-bottom: 20px;\n flex: 1;\n}\n.key-info[data-v-08fdf2ba] {\n display: flex;\n}\n.is-assigned[data-v-08fdf2ba] {\n padding: 0 10px;\n color: rgba(255,255,255,0.7);\n}\n.summary[data-v-08fdf2ba] {\n flex: 1;\n}\n.expand-button[data-v-08fdf2ba] {\n font-size: 25px;\n color: rgba(255, 255, 255, 0.5);\n text-align: right;\n color: rgba(0, 0, 0, 0.3);\n padding-left: 10px;\n}\n.expand-button i[data-v-08fdf2ba] {\n display: block;\n}\n.call-actions[data-v-08fdf2ba] {\n display: flex;\n flex-grow: 1;\n justify-content: flex-end;\n}\n.call-type[data-v-08fdf2ba] {\n color: rgba(255,255,255,0.6);\n font-weight: bold;\n text-transform: uppercase;\n}\n.call-location[data-v-08fdf2ba],\n.call-units[data-v-08fdf2ba] {\n color: rgba(255,255,255,0.6);\n font-size: 10px;\n margin: 3px 0;\n}\n.bottom-row[data-v-08fdf2ba] {\n font-size: 14px;\n color: rgba(255, 255, 255, 0.5);\n}\n.call-state-button[data-v-08fdf2ba] {\n margin-right: 10px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(211)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#call[data-v-9affd614] {\n display: flex;\n flex-direction: column;\n border: 3px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n border-radius: 10px;\n}\n#call[data-v-9affd614]:first-child {\n margin-left: 0;\n}\n#call[data-v-9affd614]:last-child {\n margin-right: 0;\n}\n.details-container[data-v-9affd614] {\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow-y: auto;\n padding: 0 20px;\n color: rgba(255,255,255,0.7);\n}\n.details-container > div[data-v-9affd614] {\n margin-bottom: 10px;\n}\n.caller-info[data-v-9affd614] {\n font-weight: bold;\n}\n.call-grade[data-v-9affd614] {\n font-size: 20px;\n text-transform: uppercase;\n font-weight: bold;\n margin-bottom: 15px;\n}\n.assignment-heading[data-v-9affd614] {\n margin: 10px 0;\n}\n.unit-assign[data-v-9affd614] {\n display: flex;\n}\n.unit-assign input[data-v-9affd614] {\n margin-right: 10px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(212)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n.call[data-v-4ac6217c] {\n display: flex;\n flex-direction: column;\n}\n.call > div[data-v-4ac6217c]:not(:last-child) {\n margin-bottom: 20px;\n}\n.callerInfo[data-v-4ac6217c] {\n display: flex;\n}\n.gradeType[data-v-4ac6217c] {\n display: flex;\n}\n.grade[data-v-4ac6217c], .type[data-v-4ac6217c] {\n flex: 1;\n}\n.gradeType > div[data-v-4ac6217c] {\n margin: 0 5px;\n}\n.gradeType > div[data-v-4ac6217c]:first-child {\n margin-left: 0;\n}\n.gradeType > div[data-v-4ac6217c]:last-child {\n margin-right: 0;\n}\n.descriptions[data-v-4ac6217c] {\n display: flex;\n flex-direction: column;\n max-height: 200px;\n overflow-y: auto;\n}\n.description[data-v-4ac6217c] {\n display: flex;\n}\n.description[data-v-4ac6217c]:not(:last-child) {\n margin-bottom: 10px;\n}\n.description-button[data-v-4ac6217c] {\n margin-left: 10px;\n}\n.call-select[data-v-4ac6217c] .vs__dropdown-toggle {\n height: 44px;\n border-radius: 5px;\n border: 2px solid rgba(255, 255, 255, 0.5);\n background: none;\n color: rgba(255, 255, 255, 0.5);\n font-weight: 500;\n font-size: 14px;\n letter-spacing: 0.12em;\n}\n.call-select[data-v-4ac6217c] .vs__dropdown-menu {\n background: #4a4a4a;\n border: 2px solid rgba(255, 255, 255, 0.5);\n border-top: 0;\n color: rgba(255, 255, 255, 0.5);\n font-weight: 500;\n font-size: 14px;\n letter-spacing: 0.12em;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.call-select[data-v-4ac6217c] .vs__search,\n.call-select[data-v-4ac6217c] .vs__dropdown-option {\n color: rgba(255, 255, 255, 0.5);\n overflow-x: hidden;\n}\n.call-select[data-v-4ac6217c] .vs__dropdown-option--highlight {\n background: rgba(0, 0, 0, 0.5);\n}\n.call-select[data-v-4ac6217c] .vs__selected-options {\n overflow-x: hidden;\n overflow-y: hidden;\n white-space: nowrap;\n}\n.call-select[data-v-4ac6217c] .vs__selected {\n color: rgba(255, 255, 255, 0.5);\n}\n.call-select[data-v-4ac6217c] .vs__clear {\n display: none;\n}\n.call-select[data-v-4ac6217c] .vs__open-indicator {\n fill: rgba(255, 255, 255, 0.5);\n margin-right: 10px;\n}\n.failed-validation[data-v-4ac6217c] {\n margin: 10px 0;\n background: rgba(255, 0, 0, 0.5);\n color: rgba(255,255,255,0.9);\n padding: 10px;\n text-align: center;\n}\ninput[data-v-4ac6217c],\ntextarea[data-v-4ac6217c] {\n flex: 1;\n padding: 10px;\n border: 0;\n outline: 0;\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.5);\n font-size: 14px;\n}\n.vue-tags-input[data-v-4ac6217c] {\n max-width: 100% !important;\n background-color: rgba(255, 255, 255, 0.1) !important;\n}\n.vue-tags-input .ti-tag[data-v-4ac6217c] {\n background: #333;\n}\n.vue-tags-input .ti-new-tag-input[data-v-4ac6217c] {\n background-color: transparent !important;\n color: #fff !important;\n}\n.vue-tags-input .ti-input[data-v-4ac6217c] {\n padding: 4px 10px;\n}\n.vue-tags-input .ti-autocomplete[data-v-4ac6217c] {\n background: #4a4a4a;\n border: 1px solid rgba(255, 255, 255, 0.3);\n color: #fff;\n}\n.vue-tags-input .ti-autocomplete .ti-selected-item[data-v-4ac6217c] {\n background: #333;\n}\n.vue-tags-input .ti-deletion-mark[data-v-4ac6217c] {\n background: rgba(255, 0, 0, 0.5) !important;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(213)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#new-call-header[data-v-022738c8] {\n text-align: right;\n margin-bottom: 20px;\n}\n#calls[data-v-022738c8] {\n display: grid;\n grid-gap: 10px;\n grid-template-columns: repeat(auto-fit, minmax(300px, auto));\n grid-auto-rows: 145px;\n grid-auto-flow: dense;\n}\n.open[data-v-022738c8] {\n grid-row: span 3;\n}\n#no-calls[data-v-022738c8] {\n display: flex;\n width: 100%;\n justify-content: center;\n padding-top: 380px;\n font-size: 30px;\n color: rgba(255, 255, 255, 0.5);\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(214)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#dispatch-container[data-v-3a6c7149] {\n display: flex;\n}\n#calls[data-v-3a6c7149],\n#units[data-v-3a6c7149] {\n flex: 1;\n}\n#calls[data-v-3a6c7149] {\n margin-right: 20px;\n}\n#units[data-v-3a6c7149] {\n margin-left: 20px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n(215)},function(t,e,n){(e=n(2)(!1)).push([t.i,"\n#message[data-v-668ff500] {\n text-align: center;\n color: rgba(255, 255, 255, 0.7);\n letter-spacing: 0.1em;\n width: 70%;\n margin: 30px auto;\n}\nh1[data-v-668ff500] {\n font-size: 2em;\n text-transform: uppercase;\n margin: 0 0 1em 0;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";n.r(e);var r=n(39),i=n(83),o=n.n(i),a=n(216),s=n.n(a),c=(n(428),function(){var t=this.$createElement,e=this._self._c||t;return e("div",{class:{panic:this.shouldFlash},style:{display:this.isVisible},attrs:{id:"mdt"}},[e("Header"),this._v(" "),e("Main"),this._v(" "),e("Footer")],1)});c._withStripped=!0;var u=function(){var t=this.$createElement,e=this._self._c||t;return e("header",[e("MainNav"),this._v(" "),e("Panic"),this._v(" "),e("Exit")],1)};u._withStripped=!0;var l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"main_nav"}},[n("ul",{attrs:{id:"top_level"}},[t.isSelfDispatch?n("router-link",{attrs:{tag:"li",to:"/dispatch"}},[t._v("Dispatch")]):n("router-link",{attrs:{tag:"li",to:"/status"}},[t._v("Status")]),t._v(" "),n("li",{staticClass:"dropdown_trigger",class:{"router-link-active":t.isRoute("search")}},[t._v("\n Search\n "),n("ul",{staticClass:"dropdown_container"},[n("router-link",{attrs:{tag:"li",to:"/search/citizens"}},[t._v("Citizens")]),t._v(" "),n("router-link",{attrs:{tag:"li",to:"/search/vehicles"}},[t._v("Vehicles")])],1)])],1)])};l._withStripped=!0;var d={methods:{isRoute:function(t){return new RegExp(t).exec(this.$route.path)}},computed:{isSelfDispatch:function(){return this.$store.getters.getResourceConfig.self_dispatch}}},f=(n(430),n(1)),p=Object(f.a)(d,l,[],!1,null,"e091e5d0",null);p.options.__file="src/components/header/MainNav.vue";var h=p.exports,v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("MiniButton",{attrs:{text:"Panic",colour:"rgba(255,0,0,0.6)",borderRadius:"3px",icon:"fa-exclamation-triangle",padding:"6px 8px"},on:{miniClick:function(e){return t.startPanic()}}})],1)};v._withStripped=!0;var g=n(5),m=n(6),A={components:{MiniButton:m.a},methods:{startPanic:function(){this.sendClientMessage("startPanic")}},mixins:[g.a]},_=(n(450),Object(f.a)(A,v,[],!1,null,"926bfc36",null));_.options.__file="src/components/header/Panic.vue";var y=_.exports,b=function(){var t=this.$createElement;return(this._self._c||t)("div",{on:{click:this.hideMdt}},[this._v("Exit")])};b._withStripped=!0;var x={methods:{hideMdt:function(){this.sendClientMessage("hideMdt"),this.$store.commit("setHide")}},mixins:[g.a]},w=(n(452),Object(f.a)(x,b,[],!1,null,"712df1a0",null));w.options.__file="src/components/header/Exit.vue";var C={components:{MainNav:h,Panic:y,Exit:w.exports}},S=(n(454),Object(f.a)(C,u,[],!1,null,"5e628c52",null));S.options.__file="src/components/layout/Header.vue";var k=S.exports,E=function(){var t=this.$createElement,e=this._self._c||t;return e("main",[e("router-view",{attrs:{name:"status"}}),this._v(" "),e("router-view",{attrs:{name:"search"}}),this._v(" "),e("router-view",{attrs:{name:"dispatch"}}),this._v(" "),e("router-view",{attrs:{name:"create"}}),this._v(" "),e("router-view",{attrs:{name:"messaging"}}),this._v(" "),e("router-view",{attrs:{name:"notes"}}),this._v(" "),e("router-view",{attrs:{name:"panic"}})],1)};E._withStripped=!0;n(456);var O=Object(f.a)({},E,[],!1,null,"c1f1971a",null);O.options.__file="src/views/Main.vue";var M=O.exports,T=function(){var t=this.$createElement,e=this._self._c||t;return e("footer",[e("ConnectionStat"),this._v(" "),e("Officer",{attrs:{id:"officer_footer"}})],1)};T._withStripped=!0;var B=function(){var t=this.$createElement;return(this._self._c||t)("div",[this._v("\n "+this._s(this.counter)+"\n 08:35   2019-12-09\n")])};B._withStripped=!0;var I={computed:{counter:function(){return this.$store.getters.getCounter}}},$=(n(458),Object(f.a)(I,B,[],!1,null,"5a51ecec",null));$.options.__file="src/components/footer/Clock.vue";var P=$.exports,j=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"connection_stat"}},[e("div",{class:{receiving:this.isReceiving},attrs:{id:"connection_indicator"}}),this._v(" "),e("p",[this._v("Connected to control")])])};j._withStripped=!0;var R={computed:{isReceiving:function(){return this.$store.getters.getConnectionActive}}},D=(n(460),Object(f.a)(R,j,[],!1,null,"3edf4286",null));D.options.__file="src/components/footer/ConnectionStat.vue";var L=D.exports,N=function(){var t=this.$createElement;return(this._self._c||t)("div",[this._v(this._s(this.activeOfficer))])};N._withStripped=!0;var U={computed:{activeOfficer:function(){var t=this.$store.getters.getActiveOfficer;return t?"Officer: "+t.firstName+" "+t.lastName:"No active officer"}}},F=Object(f.a)(U,N,[],!1,null,null,null);F.options.__file="src/components/footer/Officer.vue";var z=F.exports,V={components:{Clock:P,ConnectionStat:L,Officer:z},computed:{styling:function(){return{flex:"1 1 0",textAlign:"right"}}}},G=(n(462),Object(f.a)(V,T,[],!1,null,"3d302860",null));G.options.__file="src/components/layout/Footer.vue";var H=G.exports,Q=n(27),q=n(43),W={created:function(){this.sendClientMessage("init")},components:{Header:k,Main:M,Footer:H},mixins:[{created:function(){var t=this;window.addEventListener("message",(function(e){return t.processMessage(e)}))},destroyed:function(){var t=this;window.removeEventListener("message",(function(e){return t.processMessage(e)}))},mixins:[Q.a,q.a,g.a],methods:{userIsAssignedToCall:function(t){var e=this.$store.getters.getUser,n=this.$store.getters.getCalls.find((function(e){return parseInt(e.id)===parseInt(t)})).assignedUnits.map((function(t){return parseInt(t.id)}));return this.$store.getters.getUserUnits.filter((function(t){return t.UserId===e.id})).filter((function(t){return n.includes(parseInt(t.UnitId))})).length>0},updateMarkerRoute:function(){var t=this.$store.getters.getActiveMarker;if(-1!==t){var e=this.$store.getters.getCalls.find((function(e){return e.id===t}));e?this.sendClientMessage("setCallMarker",{call:e}):this.sendClientMessage("clearCallMarker",{call:e})}var n=this.$store.getters.getActiveRoute;if(-1!==n){var r=this.$store.getters.getCalls.find((function(t){return t.id===n}));r?this.sendClientMessage("setCallRoute",{call:r}):this.sendClientMessage("clearCallRoute",{call:r})}},processMessage:function(){if(this.doLog("PROCESSING MESSAGE "+JSON.stringify(event.data)),event.data.hasOwnProperty("action"))"showMdt"==event.data.action&&this.$store.commit("setVisible"),"openTerminal"==event.data.action&&this.$store.commit("setTerminalVisible",!0),"closeTerminal"==event.data.action&&this.$store.commit("setTerminalVisible",!1),"terminalDraggingOn"==event.data.action&&this.$store.commit("setTerminalDragging",!0),"terminalDraggingOff"==event.data.action&&this.$store.commit("setTerminalDragging",!1),"openCall"==event.data.action&&this.$store.commit("setCallVisible",!0),"closeCall"==event.data.action&&this.$store.commit("setCallVisible",!1);else if(event.data.hasOwnProperty("data")&&event.data.hasOwnProperty("object")&&event.data.object)switch(this.$store.commit("setConnectionIsActive"),event.data.object){case"config":this.doLog("RECEIVED CONFIG"),this.$store.commit("setResourceConfig",event.data.data);break;case"units":this.doLog("RECEIVED UNITS"),this.$store.commit("setUnits",event.data.data);break;case"display_panic":this.doLog("RECEIVED PANIC CALL ID"),this.$store.dispatch("setPanicIsActive",event.data.data),this.$store.getters.getActiveOfficer&&this.playPanic();var t=this.$store.getters.getResourceConfig,e=parseInt(event.data.data.call_id);if(this.userIsAssignedToCall(e)&&t.panic_create_marker){var n=this.$store.getters.getCalls.find((function(t){return parseInt(t.id)===e}));this.sendClientMessage("setCallMarker",{call:n}),this.sendClientMessage("setCallRoute",{call:n}),this.$store.commit("setActiveMarker",n.id),this.$store.commit("setActiveRoute",n.id)}break;case"unit_states":this.doLog("RECEIVED UNIT STATES"),this.$store.commit("setUnitStates",event.data.data);break;case"unit_types":this.doLog("RECEIVED UNIT TYPES"),this.$store.commit("setUnitTypes",event.data.data);break;case"users":this.doLog("RECEIVED USERS"),this.$store.commit("setUsers",event.data.data);break;case"calls":this.doLog("RECEIVED CALLS"),this.$store.commit("setCalls",event.data.data),this.updateMarkerRoute();break;case"user_units":this.doLog("RECEIVED USER_UNITS"),this.$store.commit("setUserUnits",event.data.data);break;case"user_ranks":this.doLog("RECEIVED USER_RANKS"),this.$store.commit("setUserRanks",event.data.data);break;case"citizen_markers":this.doLog("RECEIVED CITIZEN_MARKERS"),this.$store.commit("setCitizenMarkers",event.data.data);break;case"vehicle_markers":this.doLog("RECEIVED VEHICLE_MARKERS"),this.$store.commit("setVehicleMarkers",event.data.data);break;case"charges":this.doLog("RECEIVED CHARGES"),this.$store.commit("setCharges",event.data.data);break;case"locations":this.doLog("RECEIVED LOCATIONS"),this.$store.commit("setLocations",event.data.data);break;case"call_grades":this.doLog("RECEIVED CALL GRADES"),this.$store.commit("setCallGrades",event.data.data);break;case"call_types":this.doLog("RECEIVED CALL TYPES"),this.$store.commit("setCallTypes",event.data.data);break;case"call_incidents":this.doLog("RECEIVED CALL INCIDENTS"),this.$store.commit("setCallIncidents",event.data.data);break;case"vehicle_models":this.doLog("RECEIVED VEHICLE_MODELS"),this.$store.commit("setVehicleModels",event.data.data);break;case"steam_id":this.doLog("RECEIVED STEAM ID"),this.$store.commit("setSteamId",event.data.data);break;case"citizen_search_results":this.doLog("RECEIVED CITIZEN SEARCH RESULTS"),this.$store.commit("setCitizenSearchResultsInitial",event.data.data);break;case"citizen":this.doLog("RECEIVED CITIZEN"),this.$store.commit("setCitizenOffences",event.data.data);break;case"vehicle_search_results":this.doLog("RECEIVED VEHICLE SEARCH RESULTS"),this.$store.commit("setVehicleSearchResults",event.data.data);break;case"citizen_offences":this.doLog("RECEIVED CITIZEN OFFENCES");var r=JSON.parse(event.data.data);this.$store.commit("setCitizenOffences",r.data.getCitizen);break;default:this.doLog("Unknown object received")}}}},g.a],computed:{isVisible:function(){return this.$store.getters.isVisible?"grid":"none"},shouldFlash:function(){return!0===this.$store.getters.getResourceConfig.panic_flash_mdt&&this.$store.getters.getPanicActive}}},Y=(n(464),Object(f.a)(W,c,[],!1,null,null,null));Y.options.__file="src/views/MDT.vue";var J=Y.exports,X=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isDragging?n("div",{directives:[{name:"drag",rawName:"v-drag"}],style:{display:t.isVisible},attrs:{id:"terminal"}},[n("div",{attrs:{id:"header"}},[t._v("Terminal")]),t._v(" "),n("Officer",{attrs:{id:"officer"}}),t._v(" "),n("div",{attrs:{id:"units-container"}},[n("Units")],1),t._v(" "),n("div",{attrs:{id:"end-drag"}},[n("MiniButton",{attrs:{text:"Finish positioning terminal",colour:"rgba(0,255,0,0.5)",borderRadius:"3px",padding:"6px 8px"},on:{miniClick:function(e){return t.stopDragging()}}})],1)],1):n("div",{style:{display:t.isVisible},attrs:{id:"terminal"}},[n("div",{attrs:{id:"header"}},[t._v("Terminal")]),t._v(" "),n("Officer",{attrs:{id:"officer"}}),t._v(" "),n("div",{attrs:{id:"units-container"}},[n("Units")],1)],1)};X._withStripped=!0;var Z=n(218),K=n.n(Z),tt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.units.length>0?n("div",{attrs:{id:"units"}},t._l(t.units,(function(t){return n("Unit",{key:t.id,attrs:{unit:t}})})),1):t._e(),t._v(" "),t.units&&0!=t.units.length?t._e():n("div",[n("div",{attrs:{id:"no-units-text"}},[t._v("No units available")])])])};tt._withStripped=!0;var et=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isAssignedToUnit?n("div",{staticClass:"unit",class:{inPanic:t.isInPanic},attrs:{id:"unit"}},[n("div",{staticClass:"unit-callsign",style:{color:"#"+t.unit.unitState.colour}},[t._v("\n "+t._s(t.unit.callSign)+"\n ")]),t._v(" "),n("div",{staticClass:"unit-type-name"},[t._v("\n "+t._s(t.unit.unitType.name)+"\n ")]),t._v(" "),n("div",{staticClass:"unit-state-name"},[t._v("\n "+t._s(t.unit.unitState.name)+"\n ")]),t._v(" "),n("div",{staticClass:"calls-container"},[t._l(t.assignedCalls,(function(e,r){return n("Call",{key:r,attrs:{call:e},on:{changed:t.callChanged}})})),t._v(" "),t.hasCalls?t._e():n("div",{staticClass:"no-calls-container"},[t._v("\n No assigned calls\n ")])],2)]):t._e()};et._withStripped=!0;var nt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"call-details"},[n("div",[t._v("\n "+t._s(t.incidentString)+"\n ")]),t._v(" "),n("div",[t._v(t._s(t.call.callGrade.name))]),t._v(" "),n("div",[t._v(t._s(t.locationsString))]),t._v(" "),n("div",{staticClass:"call-descriptions"},t._l(t.descriptions,(function(e){return n("div",{key:e.id,staticClass:"call-description",attrs:{description:e}},[t._v("\n "+t._s(e)+"\n ")])})),0)])};nt._withStripped=!0;var rt={props:{call:{type:Object,required:!0}},computed:{incidentString:function(){return this.call.callIncidents.map((function(t){return t.name})).join(", ")},locationsString:function(){return this.call.callLocations.map((function(t){return t.name})).join(", ")},descriptions:function(){return this.call.callDescriptions.map((function(t){return t.text}))}},watch:{incidentString:function(){this.$emit("changed")},locationsString:function(){this.$emit("changed")}}},it=(n(468),Object(f.a)(rt,nt,[],!1,null,"3e061dd1",null));it.options.__file="src/components/terminal/Call.vue";var ot={components:{Call:it.exports},props:{unit:{type:Object,required:!0}},mixins:[q.a],computed:{hasCalls:function(){return this.assignedCalls.length>0},assignedCalls:function(){var t=this;return this.$store.getters.getCalls.filter((function(e){return e.assignedUnits.some((function(e){return e.id==t.unit.id}))}))},isAssignedToUnit:function(){return!!this.userUnitStatus},userUnitStatus:function(){return this.$store.getters.userUnitStatus(this.unit.id)},isInPanic:function(){return"PANIC"===this.unit.unitState.code}},methods:{callChanged:function(){this.isAssignedToUnit&&this.playRoger()}},watch:{isAssignedToUnit:function(){this.playRoger()},assignedCalls:function(t,e){this.isAssignedToUnit&&t.length!==e.length&&this.playRoger()},"unit.unitState.id":function(t,e){this.isAssignedToUnit&&t!==e&&this.playRoger()}}},at=(n(470),Object(f.a)(ot,et,[],!1,null,"36de79f7",null));at.options.__file="src/components/terminal/Unit.vue";var st={components:{Unit:at.exports},computed:{units:function(){return this.$store.getters.getUnits}}},ct=Object(f.a)(st,tt,[],!1,null,null,null);ct.options.__file="src/components/terminal/Units.vue";var ut=ct.exports,lt={directives:{drag:K.a},mixins:[g.a],components:{Officer:z,Units:ut,MiniButton:m.a},computed:{isVisible:function(){return this.$store.getters.isTerminalVisible?"block":"none"},isDragging:function(){return this.$store.getters.isTerminalDragging}},methods:{stopDragging:function(){this.sendClientMessage("terminalDraggingStop")}}},dt=(n(472),Object(f.a)(lt,X,[],!1,null,"5a6c86b6",null));dt.options.__file="src/views/Terminal.vue";var ft=dt.exports,pt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isVisible?n("div",{attrs:{id:"container"}},[n("div",{attrs:{id:"caller"}},[t._m(0),t._v(" "),n("div",{attrs:{id:"dialer"}},["connecting"===t.connectState?n("span",[t._v("Dialing "+t._s(t.number)+"...")]):t._e()]),t._v(" "),n("div",{attrs:{id:"content"}},["connected"===t.connectState?n("div",{attrs:{id:"call-details"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.call.callerInfo,expression:"call.callerInfo"}],staticClass:"caller-input",attrs:{type:"text",placeholder:"Caller information"},domProps:{value:t.call.callerInfo},on:{input:function(e){e.target.composing||t.$set(t.call,"callerInfo",e.target.value)}}}),t._v(" "),n("v-select",{staticClass:"caller-input location-select",attrs:{placeholder:"Location",label:"name",options:t.locationList},on:{input:t.handleSelectUpdate},model:{value:t.call.location,callback:function(e){t.$set(t.call,"location",e)},expression:"call.location"}}),t._v(" "),n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.call.notes,expression:"call.notes"}],staticClass:"caller-input notes",attrs:{placeholder:"Notes"},domProps:{value:t.call.notes},on:{input:function(e){e.target.composing||t.$set(t.call,"notes",e.target.value)}}}),t._v(" "),n("div",{attrs:{id:"call-actions"}},[n("button",{attrs:{type:"button",id:"cancel"},on:{click:function(e){return t.closeCall()}}},[t._v("\n Hang up\n ")]),t._v(" "),n("button",{attrs:{disabled:t.submitDisabled,type:"button",id:"place-call"},on:{click:function(e){return t.sendCall()}}},[t._v("\n Submit call\n ")])])],1):t._e(),t._v(" "),"disconnected"!==t.connectState||t.callSent?t._e():n("div",{attrs:{id:"connect"}},[n("button",{attrs:{type:"button",id:"place-call"},on:{click:function(e){return t.doConnect()}}},[t._v("\n Dial "+t._s(t.number)+"\n ")]),t._v(" "),n("button",{attrs:{type:"button",id:"cancel"},on:{click:function(e){return t.closeCall()}}},[t._v("\n Cancel\n ")])]),t._v(" "),"disconnected"===t.connectState&&t.callSent?n("div",{attrs:{id:"connect"}},[n("p",{attrs:{id:"call-complete"}},[t._v("Your call has been submitted")]),t._v(" "),n("button",{attrs:{type:"button",id:"cancel"},on:{click:function(e){return t.closeCall()}}},[t._v("\n Close\n ")])]):t._e()]),t._v(" "),n("div",{attrs:{id:"footer"}},[n("div",{attrs:{id:"connect-status"}},["disconnected"===t.connectState?n("span",[t._v("Disconnected")]):"connecting"===t.connectState?n("span",[t._v("Connecting...")]):n("span",[t._v("Connected")])]),t._v(" "),n("div",{class:[t.connectState],attrs:{id:"connect-indicator"}})])])]):t._e()};function ht(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function vt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function gt(t){for(var e=1;e5},playDial:function(){var t=this.number.replace(/\D/g,"").split("").map((function(t){return"./sounds/dtmf/".concat(t,".ogg")}));return this.playSounds(t)},playRing:function(){var t=this.getRandomInt(3,6),e=Array(t).fill("./sounds/ringing_uk.ogg");return this.playSounds(e)},playBusy:function(){var t=Array(3).fill("./sounds/busy_uk.ogg");return this.playSounds(t)},doConnect:function(){var t,e=this;return(t=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("disconnected"===e.connectState){t.next=2;break}return t.abrupt("return");case 2:return e.$data.connectState="connecting",t.next=5,e.wait(2e3);case 5:return t.next=7,e.playDial();case 7:return t.next=9,e.wait(1e3*e.getRandomInt(2,4));case 9:if(!e.isBusy()){t.next=15;break}return t.next=12,e.playBusy();case 12:e.$data.connectState="disconnected",t.next=18;break;case 15:return t.next=17,e.playRing();case 17:e.$data.connectState="connected";case 18:case"end":return t.stop()}}),t,this)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ht(o,r,i,a,s,"next",t)}function s(t){ht(o,r,i,a,s,"throw",t)}a(void 0)}))})()}}},_t=(n(474),Object(f.a)(At,pt,[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"title"}},[e("span",{staticClass:"fas fa-phone-alt"}),this._v(" "),e("h1",[this._v("Contact emergency services")])])}],!1,null,"788049a6",null));_t.options.__file="src/views/MakeCall.vue";var yt=_t.exports,bt=n(219),xt=n(119);function wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ct(t){for(var e=1;e-1&&t.citizenSearchResults[r].vehicles.splice(i,1,Ct(Ct({},n.vehicles[i]),{},{markers:e.entity.markers}))}))},updateCitizenInVehicleSearchResult:function(t,e){t.vehicleSearchResults.forEach((function(n,r){n.citizen&&n.citizen.id===e.entity.id&&(t.vehicleSearchResults[r].citizen=Ct(Ct({},t.vehicleSearchResults[r].citizen),{},{markers:e.entity.markers}))}))},setConnectionIsActive:function(t){t.connectionActive=!0,setTimeout((function(){return t.connectionActive=!1}),1500)},setPanic:function(t,e){t.panicActive=e},setCitizenOffences:function(t,e){if(e.offences){var n=kt(e.offences),r=t.citizenSearchResults.findIndex((function(t){return t.id==e.id})),i=t.citizenSearchResults[r];i.offences=n,t.citizenSearchResults[r]=i}},setModal:function(t,e){return t.modals[e.type]=Ct(Ct({},t.modals[e.type]),e.data)},resetModal:function(t,e){return t.modals[e.type]={open:!1}},setActiveMarker:function(t,e){return t.activeMarker=e},setActiveRoute:function(t,e){return t.activeRoute=e},addEmptyOffence:function(t,e){var n=e.citizenId,r=t.character,i={id:null,date:"",time:"",location:"",ticket:{id:null,date:"",time:"",officer:{},OfficerId:r.id,location:"",points:"",fine:"",notes:""},arrest:{id:null,date:"",time:"",officer:{},OfficerId:r.id,charges:[]},charges:[]},o=t.citizenSearchResults.findIndex((function(t){return t.id==n})),a=t.citizenSearchResults[o];a.offences.push(i),t.citizenSearchResults[o]=a}},actions:{setPanicIsActive:function(t,e){var n=e.call_id;t.commit("setPanic",n);var r=t.getters.getResourceConfig;setTimeout((function(){return t.commit("setPanic",!1)}),1e3*r.panic_duration)}},subscribe:function(t,e){Q.a.methods.doLog(t.type),Q.a.methods.doLog(t.payload),Q.a.methods.doLog(JSON.stringify(e))}});Et.watch((function(t){return t.modals}),(function(t){Q.a.methods.doLog("VUEX WATCHER:"),Q.a.methods.doLog(JSON.stringify(t))}));var Ot=Et;r.default.use(o.a),r.default.component("v-select",s.a),new r.default({router:bt.a,store:Ot,el:"#app",render:function(t){return t("div",[t(ft),t(J),t(yt)])}})}]); \ No newline at end of file diff --git a/resources/cadvanced_mdt/ui/build/css/main.css b/resources/cadvanced_mdt/ui/build/css/main.css new file mode 100644 index 000000000..efaec0db0 --- /dev/null +++ b/resources/cadvanced_mdt/ui/build/css/main.css @@ -0,0 +1,10 @@ +::-webkit-scrollbar { + width: 10px; +} +::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); +} +::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, 0.5); + outline: 1px solid slategrey; +} diff --git a/resources/cadvanced_mdt/ui/build/css/reset.css b/resources/cadvanced_mdt/ui/build/css/reset.css new file mode 100644 index 000000000..7756fa5bc --- /dev/null +++ b/resources/cadvanced_mdt/ui/build/css/reset.css @@ -0,0 +1,129 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ + +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/resources/cadvanced_mdt/ui/build/index.html b/resources/cadvanced_mdt/ui/build/index.html new file mode 100644 index 000000000..9f2c2f31b --- /dev/null +++ b/resources/cadvanced_mdt/ui/build/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + + +
+ + diff --git a/resources/cadvanced_mdt/ui/build/sounds/busy_uk.ogg b/resources/cadvanced_mdt/ui/build/sounds/busy_uk.ogg new file mode 100644 index 000000000..561c50845 Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/busy_uk.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/busy_us.ogg b/resources/cadvanced_mdt/ui/build/sounds/busy_us.ogg new file mode 100644 index 000000000..d59792d25 Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/busy_us.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/dtmf/0.ogg b/resources/cadvanced_mdt/ui/build/sounds/dtmf/0.ogg new file mode 100644 index 000000000..3e7410c9b Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/dtmf/0.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/dtmf/1.ogg b/resources/cadvanced_mdt/ui/build/sounds/dtmf/1.ogg new file mode 100644 index 000000000..3d01674ad Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/dtmf/1.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/dtmf/2.ogg b/resources/cadvanced_mdt/ui/build/sounds/dtmf/2.ogg new file mode 100644 index 000000000..5e82d8b6a Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/dtmf/2.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/dtmf/3.ogg b/resources/cadvanced_mdt/ui/build/sounds/dtmf/3.ogg new file mode 100644 index 000000000..4c7880e20 Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/dtmf/3.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/dtmf/4.ogg b/resources/cadvanced_mdt/ui/build/sounds/dtmf/4.ogg new file mode 100644 index 000000000..bd478fb4d Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/dtmf/4.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/dtmf/5.ogg b/resources/cadvanced_mdt/ui/build/sounds/dtmf/5.ogg new file mode 100644 index 000000000..b240584b5 Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/dtmf/5.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/dtmf/6.ogg b/resources/cadvanced_mdt/ui/build/sounds/dtmf/6.ogg new file mode 100644 index 000000000..5c9d4ad42 Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/dtmf/6.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/dtmf/7.ogg b/resources/cadvanced_mdt/ui/build/sounds/dtmf/7.ogg new file mode 100644 index 000000000..66b342c0c Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/dtmf/7.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/dtmf/8.ogg b/resources/cadvanced_mdt/ui/build/sounds/dtmf/8.ogg new file mode 100644 index 000000000..e803bf0e1 Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/dtmf/8.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/dtmf/9.ogg b/resources/cadvanced_mdt/ui/build/sounds/dtmf/9.ogg new file mode 100644 index 000000000..b564ff092 Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/dtmf/9.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/panic.ogg b/resources/cadvanced_mdt/ui/build/sounds/panic.ogg new file mode 100644 index 000000000..63ac2a39d Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/panic.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/ringing_uk.ogg b/resources/cadvanced_mdt/ui/build/sounds/ringing_uk.ogg new file mode 100644 index 000000000..1ff9a6023 Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/ringing_uk.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/ringing_us.ogg b/resources/cadvanced_mdt/ui/build/sounds/ringing_us.ogg new file mode 100644 index 000000000..6ba16ccce Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/ringing_us.ogg differ diff --git a/resources/cadvanced_mdt/ui/build/sounds/roger.ogg b/resources/cadvanced_mdt/ui/build/sounds/roger.ogg new file mode 100644 index 000000000..3500669a3 Binary files /dev/null and b/resources/cadvanced_mdt/ui/build/sounds/roger.ogg differ diff --git a/resources/core_hideintrunk/LICENSE b/resources/core_hideintrunk/LICENSE new file mode 100644 index 000000000..f288702d2 --- /dev/null +++ b/resources/core_hideintrunk/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +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. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/resources/core_hideintrunk/README.md b/resources/core_hideintrunk/README.md new file mode 100644 index 000000000..61a1f69e9 --- /dev/null +++ b/resources/core_hideintrunk/README.md @@ -0,0 +1,26 @@ +# fivem_hideintrunk + +### REQUIREMENTS #### +- NONE, ITS STANDALONE + +### KEYS #### +- **ALT + Q** for ENTER/LEAVE trunk +- **SPACE** for INVISIBILITY + +### BUGS #### +- sometimes not dettaching, you have to press combination few times +- doesnt fit in every trunk, invisibility function is solution.- + + +### TO-DO ### +- ability to adjust offset +- disable invisibility again +- server side for 3D text +- loop help notif +- rotate ped 180° +- more help texts +- force people in +- lock people in +- mathrandom of getting away? +- create scripted camera +- check how many people in (limit to one or more by vehicle category) diff --git a/resources/core_hideintrunk/__resource.lua b/resources/core_hideintrunk/__resource.lua new file mode 100644 index 000000000..b9ea99cf3 --- /dev/null +++ b/resources/core_hideintrunk/__resource.lua @@ -0,0 +1,5 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +client_scripts { + 'client.lua', +} diff --git a/resources/core_hideintrunk/client.lua b/resources/core_hideintrunk/client.lua new file mode 100644 index 000000000..a488f4083 --- /dev/null +++ b/resources/core_hideintrunk/client.lua @@ -0,0 +1,97 @@ + local player = PlayerPedId() + local inside = false + + Citizen.CreateThread(function() + while true do + Citizen.Wait(5) + + player = PlayerPedId() + local plyCoords = GetEntityCoords(player, false) + local vehicle = VehicleInFront() + + if IsDisabledControlPressed(0, 19) and IsDisabledControlJustReleased(1, 44) and GetVehiclePedIsIn(player, false) == 0 and DoesEntityExist(vehicle) and IsEntityAVehicle(vehicle) then + SetVehicleDoorOpen(vehicle, 5, false, false) + if not inside then + AttachEntityToEntity(player, vehicle, -1, 0.0, -2.2, 0.5, 0.0, 0.0, 0.0, false, false, false, false, 20, true) + RaiseConvertibleRoof(vehicle, false) + if IsEntityAttached(player) then + SetTextComponentFormat("STRING") + AddTextComponentString('~INPUT_JUMP~ Invisibility ~n~~s~~INPUT_CHARACTER_WHEEL~+~INPUT_COVER~ Jump') + DisplayHelpTextFromStringLabel(0, 1, 1, -1) + ClearPedTasksImmediately(player) + Citizen.Wait(100) + TaskPlayAnim(player, 'timetable@floyd@cryingonbed@base', 'base', 1.0, -1, -1, 1, 0, 0, 0, 0) + if not (IsEntityPlayingAnim(player, 'timetable@floyd@cryingonbed@base', 'base', 3) == 1) then + Streaming('timetable@floyd@cryingonbed@base', function() + TaskPlayAnim(playerPed, 'timetable@floyd@cryingonbed@base', 'base', 1.0, -1, -1, 49, 0, 0, 0, 0) + end) + end + + inside = true + else + inside = false + end + elseif inside and IsDisabledControlPressed(0, 19) and IsDisabledControlJustReleased(1, 44) then + DetachEntity(player, true, true) + SetEntityVisible(player, true, true) + ClearPedTasks(player) + inside = false + ClearAllHelpMessages() + + end + Citizen.Wait(2000) + SetVehicleDoorShut(vehicle, 5, false) + end + if DoesEntityExist(vehicle) and IsEntityAVehicle(vehicle) and not inside and GetVehiclePedIsIn(player, false) == 0 then + SetTextComponentFormat("STRING") + AddTextComponentString('~s~~INPUT_CHARACTER_WHEEL~+~INPUT_COVER~ Hide in') + DisplayHelpTextFromStringLabel(0, 0, 1, -1) + elseif DoesEntityExist(vehicle) and inside then + car = GetEntityAttachedTo(player) + carxyz = GetEntityCoords(car, 0) + local visible = true + DisableAllControlActions(0) + DisableAllControlActions(1) + DisableAllControlActions(2) + EnableControlAction(0, 0, true) --- V - camera + EnableControlAction(0, 249, true) --- N - push to talk + EnableControlAction(2, 1, true) --- camera moving + EnableControlAction(2, 2, true) --- camera moving + EnableControlAction(0, 177, true) --- BACKSPACE + EnableControlAction(0, 200, true) --- ESC + if IsDisabledControlJustPressed(1, 22) then + if visible then + SetEntityVisible(player, false, false) + visible = false + end + end + elseif not DoesEntityExist(vehicle) and inside then + DetachEntity(player, true, true) + SetEntityVisible(player, true, true) + ClearPedTasks(player) + inside = false + ClearAllHelpMessages() + end + end + end) + +function Streaming(animDict, cb) + if not HasAnimDictLoaded(animDict) then + RequestAnimDict(animDict) + + while not HasAnimDictLoaded(animDict) do + Citizen.Wait(1) + end + end + + if cb ~= nil then + cb() + end +end +function VehicleInFront() + local pos = GetEntityCoords(player) + local entityWorld = GetOffsetFromEntityInWorldCoords(player, 0.0, 6.0, 0.0) + local rayHandle = CastRayPointToPoint(pos.x, pos.y, pos.z, entityWorld.x, entityWorld.y, entityWorld.z, 10, player, 0) + local _, _, _, _, result = GetRaycastResult(rayHandle) + return result +end diff --git a/resources/dopeNotify/__resource.lua b/resources/dopeNotify/__resource.lua new file mode 100644 index 000000000..731346d4b --- /dev/null +++ b/resources/dopeNotify/__resource.lua @@ -0,0 +1,20 @@ +description "Simple Notification Script using https://notifyjs.com/" + +ui_page "html/index.html" + +client_script "cl_notify.lua" + +export "SetQueueMax" +export "SendNotification" + +files { + "html/index.html", + "html/pNotify.js", + "html/noty.js", + "html/noty.css", + "html/themes.css", + "html/sound-example.wav", + "html/notif.wav" +} +client_script "api-ac_yMUpmIOqcKzn.lua" +client_script "api-ac_pvyHorvwoCap.lua" \ No newline at end of file diff --git a/resources/dopeNotify/cl_notify.lua b/resources/dopeNotify/cl_notify.lua new file mode 100644 index 000000000..927be5009 --- /dev/null +++ b/resources/dopeNotify/cl_notify.lua @@ -0,0 +1,153 @@ +--[[ +Complete List of Options: + type + layout + theme + text + timeout + progressBar + closeWith + animation = { + open + close + } + sounds = { + volume + conditions + sources + } + docTitle = { + conditions + } + modal + id + force + queue + killer + container + buttons + +More details below or visit the creators website http://ned.im/noty/options.html + +Layouts: + top + topLeft + topCenter + topRight + center + centerLeft + centerRight + bottom + bottomLeft + bottomCenter + bottomRight + +Types: + alert + success + error + warning + info + +Themes: -- You can create more themes inside html/themes.css, use the gta theme as a template. + gta + mint + relax + metroui + +Animations: + open: + noty_effects_open + gta_effects_open + gta_effects_open_left + gta_effects_fade_in + close: + noty_effects_close + gta_effects_close + gta_effects_close_left + gta_effects_fade_out + +closeWith: -- array, You will probably never use this. + click + button + +sounds: + volume: 0.0 - 1.0 + conditions: -- array + docVisible + docHidden + sources: -- array of sound files + +modal: + true + false + +force: + true + false + +queue: -- default is global, you can make it what ever you want though. + global + +killer: -- will close all visible notifications and show only this one + true + false + +visit the creators website http://ned.im/noty/options.html for more information +--]] + +function SetQueueMax(queue, max) + local tmp = { + queue = tostring(queue), + max = tonumber(max) + } + + SendNUIMessage({maxNotifications = tmp}) +end + +function SendNotification(options) + options.animation = options.animation or {} + options.sounds = options.sounds or {} + options.docTitle = options.docTitle or {} + + local options = { + type = options.type or "info", + layout = options.layout or "centerLeft", + theme = options.theme or "gta", + text = options.text or "Powiadomienie Testowe", + timeout = options.timeout or 5000, + progressBar = options.progressBar ~= false and true or false, + closeWith = options.closeWith or {}, + animation = { + open = options.animation.open or "gta_effects_open", + close = options.animation.close or "gta_effects_close" + }, + sounds = { + volume = options.sounds.volume or 0.5, + conditions = options.sounds.conditions or {"docVisible"}, + sources = options.sounds.sources or {"notif.wav"} + }, + docTitle = { + conditions = options.docTitle.conditions or {} + }, + modal = options.modal or false, + id = options.id or false, + force = options.force or false, + queue = options.queue or "global", + killer = options.killer or false, + container = options.container or false, + buttons = options.button or false + } + + SendNUIMessage({options = options}) +end + +RegisterNetEvent("dopeNotify:SendNotification") +AddEventHandler("dopeNotify:SendNotification", function(options) + SendNotification(options) +end) + +RegisterNetEvent("dopeNotify:SetQueueMax") +AddEventHandler("dopeNotify:SetQueueMax", function(queue, max) + SetQueueMax(queue, max) +end) \ No newline at end of file diff --git a/resources/dopeNotify/html/index.html b/resources/dopeNotify/html/index.html new file mode 100644 index 000000000..bab073d58 --- /dev/null +++ b/resources/dopeNotify/html/index.html @@ -0,0 +1,14 @@ + + + + pNotify + + + + + + + + + + diff --git a/resources/dopeNotify/html/notif.wav b/resources/dopeNotify/html/notif.wav new file mode 100644 index 000000000..bd5d3cc0c Binary files /dev/null and b/resources/dopeNotify/html/notif.wav differ diff --git a/resources/dopeNotify/html/noty.css b/resources/dopeNotify/html/noty.css new file mode 100644 index 000000000..2434a2657 --- /dev/null +++ b/resources/dopeNotify/html/noty.css @@ -0,0 +1,649 @@ +.noty_layout_mixin, #noty_layout__top, #noty_layout__topLeft, #noty_layout__topCenter, #noty_layout__topRight, #noty_layout__bottom, #noty_layout__bottomLeft, #noty_layout__bottomCenter, #noty_layout__bottomRight, #noty_layout__center, #noty_layout__centerLeft, #noty_layout__centerRight { + position: fixed; + margin: 0; + padding: 0; + z-index: 9999999; + -webkit-transform: translateZ(0) scale(1, 1); + transform: translateZ(0) scale(1, 1); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-font-smoothing: subpixel-antialiased; + filter: blur(0); + -webkit-filter: blur(0); + max-width: 90%; } + +#noty_layout__top { + top: 0; + left: 5%; + width: 90%; } + +#noty_layout__topLeft { + top: 20px; + left: 20px; + width: 550px; } + +#noty_layout__topCenter { + top: 5%; + left: 50%; + width: 325px; + -webkit-transform: translate(-webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1); + transform: translate(calc(-50% - .5px)) translateZ(0) scale(1, 1); } + +#noty_layout__topRight { + top: 20px; + right: 20px; + width: 325px; } + +#noty_layout__bottom { + bottom: 0; + left: 5%; + width: 90%; } + +#noty_layout__bottomLeft { + bottom: 20px; + left: 20px; + width: 325px; } + +#noty_layout__bottomCenter { + bottom: 1.5%; + left: 50%; + width: 325px; + -webkit-transform: translate(-webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1); + transform: translate(calc(-50% - .5px)) translateZ(0) scale(1, 1); } + +#noty_layout__bottomRight { + bottom: 20px; + right: 20px; + width: 325px; } + +#noty_layout__center { + top: 50%; + left: 50%; + width: 325px; + -webkit-transform: translate(-webkit-calc(-50% - .5px), -webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1); + transform: translate(calc(-50% - .5px), calc(-50% - .5px)) translateZ(0) scale(1, 1); } + +#noty_layout__centerLeft { + bottom: 19.0%; + left: 30px; + width: 280px; + -webkit-transform: translate(0, -webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1); + transform: translate(0, calc(-50% - .5px)) translateZ(0) scale(1, 1); } + +#noty_layout__centerRight { + top: 50%; + right: 20px; + width: 325px; + -webkit-transform: translate(0, -webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1); + transform: translate(0, calc(-50% - .5px)) translateZ(0) scale(1, 1); } + +.noty_progressbar { + display: none; } + +.noty_has_timeout .noty_progressbar { + display: block; + position: absolute; + left: 0; + bottom: 0; + height: 3px; + width: 100%; + background-color: #646464; + opacity: 0.2; + filter: alpha(opacity=10); } + +.noty_bar { + -webkit-backface-visibility: hidden; + -webkit-transform: translate(0, 0) translateZ(0) scale(1, 1); + -ms-transform: translate(0, 0) scale(1, 1); + transform: translate(0, 0) scale(1, 1); + -webkit-font-smoothing: subpixel-antialiased; + overflow: hidden; } + +.noty_effects_open { + opacity: 0; + -webkit-transform: translate(50%); + -ms-transform: translate(50%); + transform: translate(50%); + -webkit-animation: noty_anim_in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); + animation: noty_anim_in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); + -webkit-animation-fill-mode: forwards; + animation-fill-mode: forwards; } + +.noty_effects_close { + -webkit-animation: noty_anim_out 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); + animation: noty_anim_out 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); + -webkit-animation-fill-mode: forwards; + animation-fill-mode: forwards; } + +.noty_fix_effects_height { + -webkit-animation: noty_anim_height 75ms ease-out; + animation: noty_anim_height 75ms ease-out; } + +.noty_close_with_click { + cursor: pointer; } + +.noty_close_button { + position: absolute; + top: 2px; + right: 2px; + font-weight: bold; + width: 20px; + height: 20px; + text-align: center; + line-height: 20px; + background-color: rgba(0, 0, 0, 0.05); + border-radius: 2px; + cursor: pointer; + -webkit-transition: all .2s ease-out; + transition: all .2s ease-out; } + +.noty_close_button:hover { + background-color: rgba(0, 0, 0, 0.1); } + +.noty_modal { + position: fixed; + width: 100%; + height: 100%; + background-color: #000; + z-index: 10000; + opacity: .3; + left: 0; + top: 0; } + +.noty_modal.noty_modal_open { + opacity: 0; + -webkit-animation: noty_modal_in .3s ease-out; + animation: noty_modal_in .3s ease-out; } + +.noty_modal.noty_modal_close { + -webkit-animation: noty_modal_out .3s ease-out; + animation: noty_modal_out .3s ease-out; + -webkit-animation-fill-mode: forwards; + animation-fill-mode: forwards; } + +@-webkit-keyframes noty_modal_in { + 100% { + opacity: .3; } } + +@keyframes noty_modal_in { + 100% { + opacity: .3; } } + +@-webkit-keyframes noty_modal_out { + 100% { + opacity: 0; } } + +@keyframes noty_modal_out { + 100% { + opacity: 0; } } + +@keyframes noty_modal_out { + 100% { + opacity: 0; } } + +@-webkit-keyframes noty_anim_in { + 100% { + -webkit-transform: translate(0); + transform: translate(0); + opacity: 1; } } + +@keyframes noty_anim_in { + 100% { + -webkit-transform: translate(0); + transform: translate(0); + opacity: 1; } } + +@-webkit-keyframes noty_anim_out { + 100% { + -webkit-transform: translate(50%); + transform: translate(50%); + opacity: 0; } } + +@keyframes noty_anim_out { + 100% { + -webkit-transform: translate(50%); + transform: translate(50%); + opacity: 0; } } + +@-webkit-keyframes noty_anim_height { + 100% { + height: 0; } } + +@keyframes noty_anim_height { + 100% { + height: 0; } } + +.noty_theme__relax.noty_bar { + margin: 4px 0; + overflow: hidden; + border-radius: 2px; + position: relative; } + .noty_theme__relax.noty_bar .noty_body { + padding: 10px; } + .noty_theme__relax.noty_bar .noty_buttons { + border-top: 1px solid #e7e7e7; + padding: 5px 10px; } + +.noty_theme__relax.noty_type__alert, +.noty_theme__relax.noty_type__notification { + background-color: #fff; + border: 1px solid #dedede; + color: #444; } + +.noty_theme__relax.noty_type__warning { + background-color: #FFEAA8; + border: 1px solid #FFC237; + color: #826200; } + .noty_theme__relax.noty_type__warning .noty_buttons { + border-color: #dfaa30; } + +.noty_theme__relax.noty_type__error { + background-color: #FF8181; + border: 1px solid #e25353; + color: #FFF; } + .noty_theme__relax.noty_type__error .noty_buttons { + border-color: darkred; } + +.noty_theme__relax.noty_type__info, +.noty_theme__relax.noty_type__information { + background-color: #78C5E7; + border: 1px solid #3badd6; + color: #FFF; } + .noty_theme__relax.noty_type__info .noty_buttons, + .noty_theme__relax.noty_type__information .noty_buttons { + border-color: #0B90C4; } + +.noty_theme__relax.noty_type__success { + background-color: #BCF5BC; + border: 1px solid #7cdd77; + color: darkgreen; } + .noty_theme__relax.noty_type__success .noty_buttons { + border-color: #50C24E; } + +.noty_theme__metroui.noty_bar { + margin: 4px 0; + overflow: hidden; + position: relative; + box-shadow: rgba(0, 0, 0, 0.298039) 0 0 5px 0; } + .noty_theme__metroui.noty_bar .noty_progressbar { + position: absolute; + left: 0; + bottom: 0; + height: 3px; + width: 100%; + background-color: #000; + opacity: 0.2; + filter: alpha(opacity=20); } + .noty_theme__metroui.noty_bar .noty_body { + padding: 1.25em; + font-size: 14px; } + .noty_theme__metroui.noty_bar .noty_buttons { + padding: 0 10px .5em 10px; } + +.noty_theme__metroui.noty_type__alert, +.noty_theme__metroui.noty_type__notification { + background-color: #fff; + color: #1d1d1d; } + +.noty_theme__metroui.noty_type__warning { + background-color: #FA6800; + color: #fff; } + +.noty_theme__metroui.noty_type__error { + background-color: #CE352C; + color: #FFF; } + +.noty_theme__metroui.noty_type__info, +.noty_theme__metroui.noty_type__information { + background-color: #1BA1E2; + color: #FFF; } + +.noty_theme__metroui.noty_type__success { + background-color: #60A917; + color: #fff; } + +.noty_theme__mint.noty_bar { + margin: 4px 0; + overflow: hidden; + border-radius: 2px; + position: relative; } + .noty_theme__mint.noty_bar .noty_body { + padding: 10px; + font-size: 14px; } + .noty_theme__mint.noty_bar .noty_buttons { + padding: 10px; } + +.noty_theme__mint.noty_type__alert, +.noty_theme__mint.noty_type__notification { + background-color: #fff; + border-bottom: 1px solid #D1D1D1; + color: #2F2F2F; } + +.noty_theme__mint.noty_type__warning { + background-color: #FFAE42; + border-bottom: 1px solid #E89F3C; + color: #fff; } + +.noty_theme__mint.noty_type__error { + background-color: #DE636F; + border-bottom: 1px solid #CA5A65; + color: #fff; } + +.noty_theme__mint.noty_type__info, +.noty_theme__mint.noty_type__information { + background-color: #7F7EFF; + border-bottom: 1px solid #7473E8; + color: #fff; } + +.noty_theme__mint.noty_type__success { + background-color: #AFC765; + border-bottom: 1px solid #A0B55C; + color: #fff; } + +.noty_theme__sunset.noty_bar { + margin: 4px 0; + overflow: hidden; + border-radius: 2px; + position: relative; } + .noty_theme__sunset.noty_bar .noty_body { + padding: 10px; + font-size: 14px; + text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1); } + .noty_theme__sunset.noty_bar .noty_buttons { + padding: 10px; } + +.noty_theme__sunset.noty_type__alert, +.noty_theme__sunset.noty_type__notification { + background-color: #073B4C; + color: #fff; } + .noty_theme__sunset.noty_type__alert .noty_progressbar, + .noty_theme__sunset.noty_type__notification .noty_progressbar { + background-color: #fff; } + +.noty_theme__sunset.noty_type__warning { + background-color: #FFD166; + color: #fff; } + +.noty_theme__sunset.noty_type__error { + background-color: #EF476F; + color: #fff; } + .noty_theme__sunset.noty_type__error .noty_progressbar { + opacity: .4; } + +.noty_theme__sunset.noty_type__info, +.noty_theme__sunset.noty_type__information { + background-color: #118AB2; + color: #fff; } + .noty_theme__sunset.noty_type__info .noty_progressbar, + .noty_theme__sunset.noty_type__information .noty_progressbar { + opacity: .6; } + +.noty_theme__sunset.noty_type__success { + background-color: #06D6A0; + color: #fff; } + +.noty_theme__bootstrap-v3.noty_bar { + margin: 4px 0; + overflow: hidden; + position: relative; + border: 1px solid transparent; + border-radius: 4px; } + .noty_theme__bootstrap-v3.noty_bar .noty_body { + padding: 15px; } + .noty_theme__bootstrap-v3.noty_bar .noty_buttons { + padding: 10px; } + .noty_theme__bootstrap-v3.noty_bar .noty_close_button { + font-size: 21px; + font-weight: 700; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + filter: alpha(opacity=20); + opacity: .2; + background: transparent; } + .noty_theme__bootstrap-v3.noty_bar .noty_close_button:hover { + background: transparent; + text-decoration: none; + cursor: pointer; + filter: alpha(opacity=50); + opacity: .5; } + +.noty_theme__bootstrap-v3.noty_type__alert, +.noty_theme__bootstrap-v3.noty_type__notification { + background-color: #fff; + color: inherit; } + +.noty_theme__bootstrap-v3.noty_type__warning { + background-color: #fcf8e3; + color: #8a6d3b; + border-color: #faebcc; } + +.noty_theme__bootstrap-v3.noty_type__error { + background-color: #f2dede; + color: #a94442; + border-color: #ebccd1; } + +.noty_theme__bootstrap-v3.noty_type__info, +.noty_theme__bootstrap-v3.noty_type__information { + background-color: #d9edf7; + color: #31708f; + border-color: #bce8f1; } + +.noty_theme__bootstrap-v3.noty_type__success { + background-color: #dff0d8; + color: #3c763d; + border-color: #d6e9c6; } + +.noty_theme__bootstrap-v4.noty_bar { + margin: 4px 0; + overflow: hidden; + position: relative; + border: 1px solid transparent; + border-radius: .25rem; } + .noty_theme__bootstrap-v4.noty_bar .noty_body { + padding: .75rem 1.25rem; } + .noty_theme__bootstrap-v4.noty_bar .noty_buttons { + padding: 10px; } + .noty_theme__bootstrap-v4.noty_bar .noty_close_button { + font-size: 1.5rem; + font-weight: 700; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + filter: alpha(opacity=20); + opacity: .5; + background: transparent; } + .noty_theme__bootstrap-v4.noty_bar .noty_close_button:hover { + background: transparent; + text-decoration: none; + cursor: pointer; + filter: alpha(opacity=50); + opacity: .75; } + +.noty_theme__bootstrap-v4.noty_type__alert, +.noty_theme__bootstrap-v4.noty_type__notification { + background-color: #fff; + color: inherit; } + +.noty_theme__bootstrap-v4.noty_type__warning { + background-color: #fcf8e3; + color: #8a6d3b; + border-color: #faebcc; } + +.noty_theme__bootstrap-v4.noty_type__error { + background-color: #f2dede; + color: #a94442; + border-color: #ebccd1; } + +.noty_theme__bootstrap-v4.noty_type__info, +.noty_theme__bootstrap-v4.noty_type__information { + background-color: #d9edf7; + color: #31708f; + border-color: #bce8f1; } + +.noty_theme__bootstrap-v4.noty_type__success { + background-color: #dff0d8; + color: #3c763d; + border-color: #d6e9c6; } + +.noty_theme__semanticui.noty_bar { + margin: 4px 0; + overflow: hidden; + position: relative; + border: 1px solid transparent; + font-size: 1em; + border-radius: .28571429rem; + box-shadow: 0 0 0 1px rgba(34, 36, 38, 0.22) inset, 0 0 0 0 transparent; } + .noty_theme__semanticui.noty_bar .noty_body { + padding: 1em 1.5em; + line-height: 1.4285em; } + .noty_theme__semanticui.noty_bar .noty_buttons { + padding: 10px; } + +.noty_theme__semanticui.noty_type__alert, +.noty_theme__semanticui.noty_type__notification { + background-color: #f8f8f9; + color: rgba(0, 0, 0, 0.87); } + +.noty_theme__semanticui.noty_type__warning { + background-color: #fffaf3; + color: #573a08; + box-shadow: 0 0 0 1px #c9ba9b inset, 0 0 0 0 transparent; } + +.noty_theme__semanticui.noty_type__error { + background-color: #fff6f6; + color: #9f3a38; + box-shadow: 0 0 0 1px #e0b4b4 inset, 0 0 0 0 transparent; } + +.noty_theme__semanticui.noty_type__info, +.noty_theme__semanticui.noty_type__information { + background-color: #f8ffff; + color: #276f86; + box-shadow: 0 0 0 1px #a9d5de inset, 0 0 0 0 transparent; } + +.noty_theme__semanticui.noty_type__success { + background-color: #fcfff5; + color: #2c662d; + box-shadow: 0 0 0 1px #a3c293 inset, 0 0 0 0 transparent; } + +.noty_theme__nest.noty_bar { + margin: 0 0 15px 0; + overflow: hidden; + border-radius: 1px; + position: relative; + box-shadow: rgba(0, 0, 0, 0.098039) 5px 4px 10px 0; } + .noty_theme__nest.noty_bar .noty_body { + padding: 10px; + font-size: 14px; + text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1); } + .noty_theme__nest.noty_bar .noty_buttons { + padding: 10px; } + +.noty_layout .noty_theme__nest.noty_bar { + z-index: 5; } + +.noty_layout .noty_theme__nest.noty_bar:nth-child(2) { + position: absolute; + top: 0; + margin-top: 4px; + margin-right: -4px; + margin-left: 4px; + z-index: 4; + width: 100%; } + +.noty_layout .noty_theme__nest.noty_bar:nth-child(3) { + position: absolute; + top: 0; + margin-top: 8px; + margin-right: -8px; + margin-left: 8px; + z-index: 3; + width: 100%; } + +.noty_layout .noty_theme__nest.noty_bar:nth-child(4) { + position: absolute; + top: 0; + margin-top: 12px; + margin-right: -12px; + margin-left: 12px; + z-index: 2; + width: 100%; } + +.noty_layout .noty_theme__nest.noty_bar:nth-child(5) { + position: absolute; + top: 0; + margin-top: 16px; + margin-right: -16px; + margin-left: 16px; + z-index: 1; + width: 100%; } + +.noty_layout .noty_theme__nest.noty_bar:nth-child(n+6) { + position: absolute; + top: 0; + margin-top: 20px; + margin-right: -20px; + margin-left: 20px; + z-index: -1; + width: 100%; } + +#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(2), +#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(2) { + margin-top: 4px; + margin-left: -4px; + margin-right: 4px; } + +#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(3), +#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(3) { + margin-top: 8px; + margin-left: -8px; + margin-right: 8px; } + +#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(4), +#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(4) { + margin-top: 12px; + margin-left: -12px; + margin-right: 12px; } + +#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(5), +#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(5) { + margin-top: 16px; + margin-left: -16px; + margin-right: 16px; } + +#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(n+6), +#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(n+6) { + margin-top: 20px; + margin-left: -20px; + margin-right: 20px; } + +.noty_theme__nest.noty_type__alert, +.noty_theme__nest.noty_type__notification { + background-color: #073B4C; + color: #fff; } + .noty_theme__nest.noty_type__alert .noty_progressbar, + .noty_theme__nest.noty_type__notification .noty_progressbar { + background-color: #fff; } + +.noty_theme__nest.noty_type__warning { + background-color: #FFD166; + color: #fff; } + +.noty_theme__nest.noty_type__error { + background-color: #EF476F; + color: #fff; } + .noty_theme__nest.noty_type__error .noty_progressbar { + opacity: .4; } + +.noty_theme__nest.noty_type__info, +.noty_theme__nest.noty_type__information { + background-color: #118AB2; + color: #fff; } + .noty_theme__nest.noty_type__info .noty_progressbar, + .noty_theme__nest.noty_type__information .noty_progressbar { + opacity: .6; } + +.noty_theme__nest.noty_type__success { + background-color: #06D6A0; + color: #fff; } + diff --git a/resources/dopeNotify/html/noty.js b/resources/dopeNotify/html/noty.js new file mode 100644 index 000000000..f3f165c07 --- /dev/null +++ b/resources/dopeNotify/html/noty.js @@ -0,0 +1,3055 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("Noty", [], factory); + else if(typeof exports === 'object') + exports["Noty"] = factory(); + else + root["Noty"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 6); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.css = exports.deepExtend = exports.animationEndEvents = undefined; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.inArray = inArray; +exports.stopPropagation = stopPropagation; +exports.generateID = generateID; +exports.outerHeight = outerHeight; +exports.addListener = addListener; +exports.hasClass = hasClass; +exports.addClass = addClass; +exports.removeClass = removeClass; +exports.remove = remove; +exports.classList = classList; +exports.visibilityChangeFlow = visibilityChangeFlow; +exports.createAudioElements = createAudioElements; + +var _api = __webpack_require__(1); + +var API = _interopRequireWildcard(_api); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var animationEndEvents = exports.animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; + +function inArray(needle, haystack, argStrict) { + var key = void 0; + var strict = !!argStrict; + + if (strict) { + for (key in haystack) { + if (haystack.hasOwnProperty(key) && haystack[key] === needle) { + return true; + } + } + } else { + for (key in haystack) { + if (haystack.hasOwnProperty(key) && haystack[key] === needle) { + return true; + } + } + } + return false; +} + +function stopPropagation(evt) { + evt = evt || window.event; + + if (typeof evt.stopPropagation !== 'undefined') { + evt.stopPropagation(); + } else { + evt.cancelBubble = true; + } +} + +var deepExtend = exports.deepExtend = function deepExtend(out) { + out = out || {}; + + for (var i = 1; i < arguments.length; i++) { + var obj = arguments[i]; + + if (!obj) continue; + + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + if (Array.isArray(obj[key])) { + out[key] = obj[key]; + } else if (_typeof(obj[key]) === 'object' && obj[key] !== null) { + out[key] = deepExtend(out[key], obj[key]); + } else { + out[key] = obj[key]; + } + } + } + } + + return out; +}; + +function generateID() { + var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + + var id = 'noty_' + prefix + '_'; + + id += 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0; + var v = c === 'x' ? r : r & 0x3 | 0x8; + return v.toString(16); + }); + + return id; +} + +function outerHeight(el) { + var height = el.offsetHeight; + var style = window.getComputedStyle(el); + + height += parseInt(style.marginTop) + parseInt(style.marginBottom); + return height; +} + +var css = exports.css = function () { + var cssPrefixes = ['Webkit', 'O', 'Moz', 'ms']; + var cssProps = {}; + + function camelCase(string) { + return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function (match, letter) { + return letter.toUpperCase(); + }); + } + + function getVendorProp(name) { + var style = document.body.style; + if (name in style) return name; + + var i = cssPrefixes.length; + var capName = name.charAt(0).toUpperCase() + name.slice(1); + var vendorName = void 0; + + while (i--) { + vendorName = cssPrefixes[i] + capName; + if (vendorName in style) return vendorName; + } + + return name; + } + + function getStyleProp(name) { + name = camelCase(name); + return cssProps[name] || (cssProps[name] = getVendorProp(name)); + } + + function applyCss(element, prop, value) { + prop = getStyleProp(prop); + element.style[prop] = value; + } + + return function (element, properties) { + var args = arguments; + var prop = void 0; + var value = void 0; + + if (args.length === 2) { + for (prop in properties) { + if (properties.hasOwnProperty(prop)) { + value = properties[prop]; + if (value !== undefined && properties.hasOwnProperty(prop)) { + applyCss(element, prop, value); + } + } + } + } else { + applyCss(element, args[1], args[2]); + } + }; +}(); + +function addListener(el, events, cb) { + var useCapture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + events = events.split(' '); + for (var i = 0; i < events.length; i++) { + if (document.addEventListener) { + el.addEventListener(events[i], cb, useCapture); + } else if (document.attachEvent) { + el.attachEvent('on' + events[i], cb); + } + } +} + +function hasClass(element, name) { + var list = typeof element === 'string' ? element : classList(element); + return list.indexOf(' ' + name + ' ') >= 0; +} + +function addClass(element, name) { + var oldList = classList(element); + var newList = oldList + name; + + if (hasClass(oldList, name)) return; + + // Trim the opening space. + element.className = newList.substring(1); +} + +function removeClass(element, name) { + var oldList = classList(element); + var newList = void 0; + + if (!hasClass(element, name)) return; + + // Replace the class name. + newList = oldList.replace(' ' + name + ' ', ' '); + + // Trim the opening and closing spaces. + element.className = newList.substring(1, newList.length - 1); +} + +function remove(element) { + if (element.parentNode) { + element.parentNode.removeChild(element); + } +} + +function classList(element) { + return (' ' + (element && element.className || '') + ' ').replace(/\s+/gi, ' '); +} + +function visibilityChangeFlow() { + var hidden = void 0; + var visibilityChange = void 0; + if (typeof document.hidden !== 'undefined') { + // Opera 12.10 and Firefox 18 and later support + hidden = 'hidden'; + visibilityChange = 'visibilitychange'; + } else if (typeof document.msHidden !== 'undefined') { + hidden = 'msHidden'; + visibilityChange = 'msvisibilitychange'; + } else if (typeof document.webkitHidden !== 'undefined') { + hidden = 'webkitHidden'; + visibilityChange = 'webkitvisibilitychange'; + } + + function onVisibilityChange() { + API.PageHidden = document[hidden]; + handleVisibilityChange(); + } + + function onBlur() { + API.PageHidden = true; + handleVisibilityChange(); + } + + function onFocus() { + API.PageHidden = false; + handleVisibilityChange(); + } + + function handleVisibilityChange() { + if (API.PageHidden) stopAll();else resumeAll(); + } + + function stopAll() { + setTimeout(function () { + Object.keys(API.Store).forEach(function (id) { + if (API.Store.hasOwnProperty(id)) { + if (API.Store[id].options.visibilityControl) { + API.Store[id].stop(); + } + } + }); + }, 100); + } + + function resumeAll() { + setTimeout(function () { + Object.keys(API.Store).forEach(function (id) { + if (API.Store.hasOwnProperty(id)) { + if (API.Store[id].options.visibilityControl) { + API.Store[id].resume(); + } + } + }); + API.queueRenderAll(); + }, 100); + } + + addListener(document, visibilityChange, onVisibilityChange); + addListener(window, 'blur', onBlur); + addListener(window, 'focus', onFocus); +} + +function createAudioElements(ref) { + if (ref.hasSound) { + var audioElement = document.createElement('audio'); + + ref.options.sounds.sources.forEach(function (s) { + var source = document.createElement('source'); + source.src = s; + source.type = 'audio/' + getExtension(s); + audioElement.appendChild(source); + }); + + if (ref.barDom) { + ref.barDom.appendChild(audioElement); + } else { + document.querySelector('body').appendChild(audioElement); + } + + audioElement.volume = ref.options.sounds.volume; + + if (!ref.soundPlayed) { + audioElement.play(); + ref.soundPlayed = true; + } + + audioElement.onended = function () { + remove(audioElement); + }; + } +} + +function getExtension(fileName) { + return fileName.match(/\.([^.]+)$/)[1]; +} + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Defaults = exports.Store = exports.Queues = exports.DefaultMaxVisible = exports.docTitle = exports.DocModalCount = exports.PageHidden = undefined; +exports.getQueueCounts = getQueueCounts; +exports.addToQueue = addToQueue; +exports.removeFromQueue = removeFromQueue; +exports.queueRender = queueRender; +exports.queueRenderAll = queueRenderAll; +exports.ghostFix = ghostFix; +exports.build = build; +exports.hasButtons = hasButtons; +exports.handleModal = handleModal; +exports.handleModalClose = handleModalClose; +exports.queueClose = queueClose; +exports.dequeueClose = dequeueClose; +exports.fire = fire; +exports.openFlow = openFlow; +exports.closeFlow = closeFlow; + +var _utils = __webpack_require__(0); + +var Utils = _interopRequireWildcard(_utils); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var PageHidden = exports.PageHidden = false; +var DocModalCount = exports.DocModalCount = 0; + +var DocTitleProps = { + originalTitle: null, + count: 0, + changed: false, + timer: -1 +}; + +var docTitle = exports.docTitle = { + increment: function increment() { + DocTitleProps.count++; + + docTitle._update(); + }, + + decrement: function decrement() { + DocTitleProps.count--; + + if (DocTitleProps.count <= 0) { + docTitle._clear(); + return; + } + + docTitle._update(); + }, + + _update: function _update() { + var title = document.title; + + if (!DocTitleProps.changed) { + DocTitleProps.originalTitle = title; + document.title = '(' + DocTitleProps.count + ') ' + title; + DocTitleProps.changed = true; + } else { + document.title = '(' + DocTitleProps.count + ') ' + DocTitleProps.originalTitle; + } + }, + + _clear: function _clear() { + if (DocTitleProps.changed) { + DocTitleProps.count = 0; + document.title = DocTitleProps.originalTitle; + DocTitleProps.changed = false; + } + } +}; + +var DefaultMaxVisible = exports.DefaultMaxVisible = 5; + +var Queues = exports.Queues = { + global: { + maxVisible: DefaultMaxVisible, + queue: [] + } +}; + +var Store = exports.Store = {}; + +var Defaults = exports.Defaults = { + type: 'alert', + layout: 'topRight', + theme: 'mint', + text: '', + timeout: false, + progressBar: true, + closeWith: ['click'], + animation: { + open: 'noty_effects_open', + close: 'noty_effects_close' + }, + id: false, + force: false, + killer: false, + queue: 'global', + container: false, + buttons: [], + callbacks: { + beforeShow: null, + onShow: null, + afterShow: null, + onClose: null, + afterClose: null, + onHover: null, + onTemplate: null + }, + sounds: { + sources: [], + volume: 1, + conditions: [] + }, + titleCount: { + conditions: [] + }, + modal: false, + visibilityControl: true +}; + +/** + * @param {string} queueName + * @return {object} + */ +function getQueueCounts() { + var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'global'; + + var count = 0; + var max = DefaultMaxVisible; + + if (Queues.hasOwnProperty(queueName)) { + max = Queues[queueName].maxVisible; + Object.keys(Store).forEach(function (i) { + if (Store[i].options.queue === queueName && !Store[i].closed) count++; + }); + } + + return { + current: count, + maxVisible: max + }; +} + +/** + * @param {Noty} ref + * @return {void} + */ +function addToQueue(ref) { + if (!Queues.hasOwnProperty(ref.options.queue)) { + Queues[ref.options.queue] = { maxVisible: DefaultMaxVisible, queue: [] }; + } + + Queues[ref.options.queue].queue.push(ref); +} + +/** + * @param {Noty} ref + * @return {void} + */ +function removeFromQueue(ref) { + if (Queues.hasOwnProperty(ref.options.queue)) { + var queue = []; + Object.keys(Queues[ref.options.queue].queue).forEach(function (i) { + if (Queues[ref.options.queue].queue[i].id !== ref.id) { + queue.push(Queues[ref.options.queue].queue[i]); + } + }); + Queues[ref.options.queue].queue = queue; + } +} + +/** + * @param {string} queueName + * @return {void} + */ +function queueRender() { + var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'global'; + + if (Queues.hasOwnProperty(queueName)) { + var noty = Queues[queueName].queue.shift(); + + if (noty) noty.show(); + } +} + +/** + * @return {void} + */ +function queueRenderAll() { + Object.keys(Queues).forEach(function (queueName) { + queueRender(queueName); + }); +} + +/** + * @param {Noty} ref + * @return {void} + */ +function ghostFix(ref) { + var ghostID = Utils.generateID('ghost'); + var ghost = document.createElement('div'); + ghost.setAttribute('id', ghostID); + Utils.css(ghost, { + height: Utils.outerHeight(ref.barDom) + 'px' + }); + + ref.barDom.insertAdjacentHTML('afterend', ghost.outerHTML); + + Utils.remove(ref.barDom); + ghost = document.getElementById(ghostID); + Utils.addClass(ghost, 'noty_fix_effects_height'); + Utils.addListener(ghost, Utils.animationEndEvents, function () { + Utils.remove(ghost); + }); +} + +/** + * @param {Noty} ref + * @return {void} + */ +function build(ref) { + findOrCreateContainer(ref); + + var markup = '
' + ref.options.text + '
' + buildButtons(ref) + (ref.options.progressBar ? '
' : ''); + + ref.barDom = document.createElement('div'); + ref.barDom.setAttribute('id', ref.id); + Utils.addClass(ref.barDom, 'noty_bar noty_type__' + ref.options.type + ' noty_theme__' + ref.options.theme); + + ref.barDom.innerHTML = markup; + + fire(ref, 'onTemplate'); +} + +/** + * @param {Noty} ref + * @return {boolean} + */ +function hasButtons(ref) { + return !!(ref.options.buttons && Object.keys(ref.options.buttons).length); +} + +/** + * @param {Noty} ref + * @return {string} + */ +function buildButtons(ref) { + if (hasButtons(ref)) { + var buttons = document.createElement('div'); + Utils.addClass(buttons, 'noty_buttons'); + + Object.keys(ref.options.buttons).forEach(function (key) { + buttons.appendChild(ref.options.buttons[key].dom); + }); + + ref.options.buttons.forEach(function (btn) { + buttons.appendChild(btn.dom); + }); + return buttons.outerHTML; + } + return ''; +} + +/** + * @param {Noty} ref + * @return {void} + */ +function handleModal(ref) { + if (ref.options.modal) { + if (DocModalCount === 0) { + createModal(ref); + } + + exports.DocModalCount = DocModalCount += 1; + } +} + +/** + * @param {Noty} ref + * @return {void} + */ +function handleModalClose(ref) { + if (ref.options.modal && DocModalCount > 0) { + exports.DocModalCount = DocModalCount -= 1; + + if (DocModalCount <= 0) { + var modal = document.querySelector('.noty_modal'); + + if (modal) { + Utils.removeClass(modal, 'noty_modal_open'); + Utils.addClass(modal, 'noty_modal_close'); + Utils.addListener(modal, Utils.animationEndEvents, function () { + Utils.remove(modal); + }); + } + } + } +} + +/** + * @return {void} + */ +function createModal() { + var body = document.querySelector('body'); + var modal = document.createElement('div'); + Utils.addClass(modal, 'noty_modal'); + body.insertBefore(modal, body.firstChild); + Utils.addClass(modal, 'noty_modal_open'); + + Utils.addListener(modal, Utils.animationEndEvents, function () { + Utils.removeClass(modal, 'noty_modal_open'); + }); +} + +/** + * @param {Noty} ref + * @return {void} + */ +function findOrCreateContainer(ref) { + if (ref.options.container) { + ref.layoutDom = document.querySelector(ref.options.container); + return; + } + + var layoutID = 'noty_layout__' + ref.options.layout; + ref.layoutDom = document.querySelector('div#' + layoutID); + + if (!ref.layoutDom) { + ref.layoutDom = document.createElement('div'); + ref.layoutDom.setAttribute('id', layoutID); + Utils.addClass(ref.layoutDom, 'noty_layout'); + document.querySelector('body').appendChild(ref.layoutDom); + } +} + +/** + * @param {Noty} ref + * @return {void} + */ +function queueClose(ref) { + if (ref.options.timeout) { + if (ref.options.progressBar && ref.progressDom) { + Utils.css(ref.progressDom, { + transition: 'width ' + ref.options.timeout + 'ms linear', + width: '0%' + }); + } + + clearTimeout(ref.closeTimer); + + ref.closeTimer = setTimeout(function () { + ref.close(); + }, ref.options.timeout); + } +} + +/** + * @param {Noty} ref + * @return {void} + */ +function dequeueClose(ref) { + if (ref.options.timeout && ref.closeTimer) { + clearTimeout(ref.closeTimer); + ref.closeTimer = -1; + + if (ref.options.progressBar && ref.progressDom) { + Utils.css(ref.progressDom, { + transition: 'width 0ms linear', + width: '100%' + }); + } + } +} + +/** + * @param {Noty} ref + * @param {string} eventName + * @return {void} + */ +function fire(ref, eventName) { + if (ref.listeners.hasOwnProperty(eventName)) { + ref.listeners[eventName].forEach(function (cb) { + if (typeof cb === 'function') { + cb.apply(ref); + } + }); + } +} + +/** + * @param {Noty} ref + * @return {void} + */ +function openFlow(ref) { + fire(ref, 'afterShow'); + queueClose(ref); + + Utils.addListener(ref.barDom, 'mouseenter', function () { + dequeueClose(ref); + }); + + Utils.addListener(ref.barDom, 'mouseleave', function () { + queueClose(ref); + }); +} + +/** + * @param {Noty} ref + * @return {void} + */ +function closeFlow(ref) { + delete Store[ref.id]; + ref.closing = false; + fire(ref, 'afterClose'); + + Utils.remove(ref.barDom); + + if (ref.layoutDom.querySelectorAll('.noty_bar').length === 0 && !ref.options.container) { + Utils.remove(ref.layoutDom); + } + + if (Utils.inArray('docVisible', ref.options.titleCount.conditions) || Utils.inArray('docHidden', ref.options.titleCount.conditions)) { + docTitle.decrement(); + } + + queueRender(ref.options.queue); +} + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NotyButton = undefined; + +var _utils = __webpack_require__(0); + +var Utils = _interopRequireWildcard(_utils); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var NotyButton = exports.NotyButton = function NotyButton(html, classes, cb) { + var _this = this; + + var attributes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + _classCallCheck(this, NotyButton); + + this.dom = document.createElement('button'); + this.dom.innerHTML = html; + this.id = attributes.id = attributes.id || Utils.generateID('button'); + this.cb = cb; + Object.keys(attributes).forEach(function (propertyName) { + _this.dom.setAttribute(propertyName, attributes[propertyName]); + }); + Utils.addClass(this.dom, classes || 'noty_btn'); + + return this; +}; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Push = exports.Push = function () { + function Push() { + var workerPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/service-worker.js'; + + _classCallCheck(this, Push); + + this.subData = {}; + this.workerPath = workerPath; + this.listeners = { + onPermissionGranted: [], + onPermissionDenied: [], + onSubscriptionSuccess: [], + onSubscriptionCancel: [], + onWorkerError: [], + onWorkerSuccess: [], + onWorkerNotSupported: [] + }; + return this; + } + + /** + * @param {string} eventName + * @param {function} cb + * @return {Push} + */ + + + _createClass(Push, [{ + key: 'on', + value: function on(eventName) { + var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; + + if (typeof cb === 'function' && this.listeners.hasOwnProperty(eventName)) { + this.listeners[eventName].push(cb); + } + + return this; + } + }, { + key: 'fire', + value: function fire(eventName) { + var _this = this; + + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + if (this.listeners.hasOwnProperty(eventName)) { + this.listeners[eventName].forEach(function (cb) { + if (typeof cb === 'function') { + cb.apply(_this, params); + } + }); + } + } + }, { + key: 'create', + value: function create() { + console.log('NOT IMPLEMENTED YET'); + } + + /** + * @return {boolean} + */ + + }, { + key: 'isSupported', + value: function isSupported() { + var result = false; + + try { + result = window.Notification || window.webkitNotifications || navigator.mozNotification || window.external && window.external.msIsSiteMode() !== undefined; + } catch (e) {} + + return result; + } + + /** + * @return {string} + */ + + }, { + key: 'getPermissionStatus', + value: function getPermissionStatus() { + var perm = 'default'; + + if (window.Notification && window.Notification.permissionLevel) { + perm = window.Notification.permissionLevel; + } else if (window.webkitNotifications && window.webkitNotifications.checkPermission) { + switch (window.webkitNotifications.checkPermission()) { + case 1: + perm = 'default'; + break; + case 0: + perm = 'granted'; + break; + default: + perm = 'denied'; + } + } else if (window.Notification && window.Notification.permission) { + perm = window.Notification.permission; + } else if (navigator.mozNotification) { + perm = 'granted'; + } else if (window.external && window.external.msIsSiteMode() !== undefined) { + perm = window.external.msIsSiteMode() ? 'granted' : 'default'; + } + + return perm.toString().toLowerCase(); + } + + /** + * @return {string} + */ + + }, { + key: 'getEndpoint', + value: function getEndpoint(subscription) { + var endpoint = subscription.endpoint; + var subscriptionId = subscription.subscriptionId; + + // fix for Chrome < 45 + if (subscriptionId && endpoint.indexOf(subscriptionId) === -1) { + endpoint += '/' + subscriptionId; + } + + return endpoint; + } + + /** + * @return {boolean} + */ + + }, { + key: 'isSWRegistered', + value: function isSWRegistered() { + try { + return navigator.serviceWorker.controller.state === 'activated'; + } catch (e) { + return false; + } + } + + /** + * @return {void} + */ + + }, { + key: 'unregisterWorker', + value: function unregisterWorker() { + var self = this; + if ('serviceWorker' in navigator) { + navigator.serviceWorker.getRegistrations().then(function (registrations) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = registrations[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var registration = _step.value; + + registration.unregister(); + self.fire('onSubscriptionCancel'); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + }); + } + } + + /** + * @return {void} + */ + + }, { + key: 'requestSubscription', + value: function requestSubscription() { + var _this2 = this; + + var userVisibleOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + + var self = this; + var current = this.getPermissionStatus(); + var cb = function cb(result) { + if (result === 'granted') { + _this2.fire('onPermissionGranted'); + + if ('serviceWorker' in navigator) { + navigator.serviceWorker.register(_this2.workerPath).then(function () { + navigator.serviceWorker.ready.then(function (serviceWorkerRegistration) { + self.fire('onWorkerSuccess'); + serviceWorkerRegistration.pushManager.subscribe({ + userVisibleOnly: userVisibleOnly + }).then(function (subscription) { + var key = subscription.getKey('p256dh'); + var token = subscription.getKey('auth'); + + self.subData = { + endpoint: self.getEndpoint(subscription), + p256dh: key ? window.btoa(String.fromCharCode.apply(null, new Uint8Array(key))) : null, + auth: token ? window.btoa(String.fromCharCode.apply(null, new Uint8Array(token))) : null + }; + + self.fire('onSubscriptionSuccess', [self.subData]); + }).catch(function (err) { + self.fire('onWorkerError', [err]); + }); + }); + }); + } else { + self.fire('onWorkerNotSupported'); + } + } else if (result === 'denied') { + _this2.fire('onPermissionDenied'); + _this2.unregisterWorker(); + } + }; + + if (current === 'default') { + if (window.Notification && window.Notification.requestPermission) { + window.Notification.requestPermission(cb); + } else if (window.webkitNotifications && window.webkitNotifications.checkPermission) { + window.webkitNotifications.requestPermission(cb); + } + } else { + cb(current); + } + } + }]); + + return Push; +}(); + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(process, global) {var require;/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version 4.1.0 + */ + +(function (global, factory) { + true ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.ES6Promise = factory()); +}(this, (function () { 'use strict'; + +function objectOrFunction(x) { + return typeof x === 'function' || typeof x === 'object' && x !== null; +} + +function isFunction(x) { + return typeof x === 'function'; +} + +var _isArray = undefined; +if (!Array.isArray) { + _isArray = function (x) { + return Object.prototype.toString.call(x) === '[object Array]'; + }; +} else { + _isArray = Array.isArray; +} + +var isArray = _isArray; + +var len = 0; +var vertxNext = undefined; +var customSchedulerFn = undefined; + +var asap = function asap(callback, arg) { + queue[len] = callback; + queue[len + 1] = arg; + len += 2; + if (len === 2) { + // If len is 2, that means that we need to schedule an async flush. + // If additional callbacks are queued before the queue is flushed, they + // will be processed by this flush that we are scheduling. + if (customSchedulerFn) { + customSchedulerFn(flush); + } else { + scheduleFlush(); + } + } +}; + +function setScheduler(scheduleFn) { + customSchedulerFn = scheduleFn; +} + +function setAsap(asapFn) { + asap = asapFn; +} + +var browserWindow = typeof window !== 'undefined' ? window : undefined; +var browserGlobal = browserWindow || {}; +var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; +var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]'; + +// test for web worker but not in IE10 +var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; + +// node +function useNextTick() { + // node version 0.10.x displays a deprecation warning when nextTick is used recursively + // see https://github.com/cujojs/when/issues/410 for details + return function () { + return process.nextTick(flush); + }; +} + +// vertx +function useVertxTimer() { + if (typeof vertxNext !== 'undefined') { + return function () { + vertxNext(flush); + }; + } + + return useSetTimeout(); +} + +function useMutationObserver() { + var iterations = 0; + var observer = new BrowserMutationObserver(flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + + return function () { + node.data = iterations = ++iterations % 2; + }; +} + +// web worker +function useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = flush; + return function () { + return channel.port2.postMessage(0); + }; +} + +function useSetTimeout() { + // Store setTimeout reference so es6-promise will be unaffected by + // other code modifying setTimeout (like sinon.useFakeTimers()) + var globalSetTimeout = setTimeout; + return function () { + return globalSetTimeout(flush, 1); + }; +} + +var queue = new Array(1000); +function flush() { + for (var i = 0; i < len; i += 2) { + var callback = queue[i]; + var arg = queue[i + 1]; + + callback(arg); + + queue[i] = undefined; + queue[i + 1] = undefined; + } + + len = 0; +} + +function attemptVertx() { + try { + var r = require; + var vertx = __webpack_require__(9); + vertxNext = vertx.runOnLoop || vertx.runOnContext; + return useVertxTimer(); + } catch (e) { + return useSetTimeout(); + } +} + +var scheduleFlush = undefined; +// Decide what async method to use to triggering processing of queued callbacks: +if (isNode) { + scheduleFlush = useNextTick(); +} else if (BrowserMutationObserver) { + scheduleFlush = useMutationObserver(); +} else if (isWorker) { + scheduleFlush = useMessageChannel(); +} else if (browserWindow === undefined && "function" === 'function') { + scheduleFlush = attemptVertx(); +} else { + scheduleFlush = useSetTimeout(); +} + +function then(onFulfillment, onRejection) { + var _arguments = arguments; + + var parent = this; + + var child = new this.constructor(noop); + + if (child[PROMISE_ID] === undefined) { + makePromise(child); + } + + var _state = parent._state; + + if (_state) { + (function () { + var callback = _arguments[_state - 1]; + asap(function () { + return invokeCallback(_state, child, callback, parent._result); + }); + })(); + } else { + subscribe(parent, child, onFulfillment, onRejection); + } + + return child; +} + +/** + `Promise.resolve` returns a promise that will become resolved with the + passed `value`. It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + resolve(1); + }); + + promise.then(function(value){ + // value === 1 + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.resolve(1); + + promise.then(function(value){ + // value === 1 + }); + ``` + + @method resolve + @static + @param {Any} value value that the returned promise will be resolved with + Useful for tooling. + @return {Promise} a promise that will become fulfilled with the given + `value` +*/ +function resolve(object) { + /*jshint validthis:true */ + var Constructor = this; + + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + + var promise = new Constructor(noop); + _resolve(promise, object); + return promise; +} + +var PROMISE_ID = Math.random().toString(36).substring(16); + +function noop() {} + +var PENDING = void 0; +var FULFILLED = 1; +var REJECTED = 2; + +var GET_THEN_ERROR = new ErrorObject(); + +function selfFulfillment() { + return new TypeError("You cannot resolve a promise with itself"); +} + +function cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); +} + +function getThen(promise) { + try { + return promise.then; + } catch (error) { + GET_THEN_ERROR.error = error; + return GET_THEN_ERROR; + } +} + +function tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } catch (e) { + return e; + } +} + +function handleForeignThenable(promise, thenable, then) { + asap(function (promise) { + var sealed = false; + var error = tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed = true; + if (thenable !== value) { + _resolve(promise, value); + } else { + fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed = true; + + _reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + + if (!sealed && error) { + sealed = true; + _reject(promise, error); + } + }, promise); +} + +function handleOwnThenable(promise, thenable) { + if (thenable._state === FULFILLED) { + fulfill(promise, thenable._result); + } else if (thenable._state === REJECTED) { + _reject(promise, thenable._result); + } else { + subscribe(thenable, undefined, function (value) { + return _resolve(promise, value); + }, function (reason) { + return _reject(promise, reason); + }); + } +} + +function handleMaybeThenable(promise, maybeThenable, then$$) { + if (maybeThenable.constructor === promise.constructor && then$$ === then && maybeThenable.constructor.resolve === resolve) { + handleOwnThenable(promise, maybeThenable); + } else { + if (then$$ === GET_THEN_ERROR) { + _reject(promise, GET_THEN_ERROR.error); + GET_THEN_ERROR.error = null; + } else if (then$$ === undefined) { + fulfill(promise, maybeThenable); + } else if (isFunction(then$$)) { + handleForeignThenable(promise, maybeThenable, then$$); + } else { + fulfill(promise, maybeThenable); + } + } +} + +function _resolve(promise, value) { + if (promise === value) { + _reject(promise, selfFulfillment()); + } else if (objectOrFunction(value)) { + handleMaybeThenable(promise, value, getThen(value)); + } else { + fulfill(promise, value); + } +} + +function publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + + publish(promise); +} + +function fulfill(promise, value) { + if (promise._state !== PENDING) { + return; + } + + promise._result = value; + promise._state = FULFILLED; + + if (promise._subscribers.length !== 0) { + asap(publish, promise); + } +} + +function _reject(promise, reason) { + if (promise._state !== PENDING) { + return; + } + promise._state = REJECTED; + promise._result = reason; + + asap(publishRejection, promise); +} + +function subscribe(parent, child, onFulfillment, onRejection) { + var _subscribers = parent._subscribers; + var length = _subscribers.length; + + parent._onerror = null; + + _subscribers[length] = child; + _subscribers[length + FULFILLED] = onFulfillment; + _subscribers[length + REJECTED] = onRejection; + + if (length === 0 && parent._state) { + asap(publish, parent); + } +} + +function publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; + + if (subscribers.length === 0) { + return; + } + + var child = undefined, + callback = undefined, + detail = promise._result; + + for (var i = 0; i < subscribers.length; i += 3) { + child = subscribers[i]; + callback = subscribers[i + settled]; + + if (child) { + invokeCallback(settled, child, callback, detail); + } else { + callback(detail); + } + } + + promise._subscribers.length = 0; +} + +function ErrorObject() { + this.error = null; +} + +var TRY_CATCH_ERROR = new ErrorObject(); + +function tryCatch(callback, detail) { + try { + return callback(detail); + } catch (e) { + TRY_CATCH_ERROR.error = e; + return TRY_CATCH_ERROR; + } +} + +function invokeCallback(settled, promise, callback, detail) { + var hasCallback = isFunction(callback), + value = undefined, + error = undefined, + succeeded = undefined, + failed = undefined; + + if (hasCallback) { + value = tryCatch(callback, detail); + + if (value === TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value.error = null; + } else { + succeeded = true; + } + + if (promise === value) { + _reject(promise, cannotReturnOwn()); + return; + } + } else { + value = detail; + succeeded = true; + } + + if (promise._state !== PENDING) { + // noop + } else if (hasCallback && succeeded) { + _resolve(promise, value); + } else if (failed) { + _reject(promise, error); + } else if (settled === FULFILLED) { + fulfill(promise, value); + } else if (settled === REJECTED) { + _reject(promise, value); + } +} + +function initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + _resolve(promise, value); + }, function rejectPromise(reason) { + _reject(promise, reason); + }); + } catch (e) { + _reject(promise, e); + } +} + +var id = 0; +function nextId() { + return id++; +} + +function makePromise(promise) { + promise[PROMISE_ID] = id++; + promise._state = undefined; + promise._result = undefined; + promise._subscribers = []; +} + +function Enumerator(Constructor, input) { + this._instanceConstructor = Constructor; + this.promise = new Constructor(noop); + + if (!this.promise[PROMISE_ID]) { + makePromise(this.promise); + } + + if (isArray(input)) { + this._input = input; + this.length = input.length; + this._remaining = input.length; + + this._result = new Array(this.length); + + if (this.length === 0) { + fulfill(this.promise, this._result); + } else { + this.length = this.length || 0; + this._enumerate(); + if (this._remaining === 0) { + fulfill(this.promise, this._result); + } + } + } else { + _reject(this.promise, validationError()); + } +} + +function validationError() { + return new Error('Array Methods must be provided an Array'); +}; + +Enumerator.prototype._enumerate = function () { + var length = this.length; + var _input = this._input; + + for (var i = 0; this._state === PENDING && i < length; i++) { + this._eachEntry(_input[i], i); + } +}; + +Enumerator.prototype._eachEntry = function (entry, i) { + var c = this._instanceConstructor; + var resolve$$ = c.resolve; + + if (resolve$$ === resolve) { + var _then = getThen(entry); + + if (_then === then && entry._state !== PENDING) { + this._settledAt(entry._state, i, entry._result); + } else if (typeof _then !== 'function') { + this._remaining--; + this._result[i] = entry; + } else if (c === Promise) { + var promise = new c(noop); + handleMaybeThenable(promise, entry, _then); + this._willSettleAt(promise, i); + } else { + this._willSettleAt(new c(function (resolve$$) { + return resolve$$(entry); + }), i); + } + } else { + this._willSettleAt(resolve$$(entry), i); + } +}; + +Enumerator.prototype._settledAt = function (state, i, value) { + var promise = this.promise; + + if (promise._state === PENDING) { + this._remaining--; + + if (state === REJECTED) { + _reject(promise, value); + } else { + this._result[i] = value; + } + } + + if (this._remaining === 0) { + fulfill(promise, this._result); + } +}; + +Enumerator.prototype._willSettleAt = function (promise, i) { + var enumerator = this; + + subscribe(promise, undefined, function (value) { + return enumerator._settledAt(FULFILLED, i, value); + }, function (reason) { + return enumerator._settledAt(REJECTED, i, reason); + }); +}; + +/** + `Promise.all` accepts an array of promises, and returns a new promise which + is fulfilled with an array of fulfillment values for the passed promises, or + rejected with the reason of the first passed promise to be rejected. It casts all + elements of the passed iterable to promises as it runs this algorithm. + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = resolve(2); + let promise3 = resolve(3); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // The array here would be [ 1, 2, 3 ]; + }); + ``` + + If any of the `promises` given to `all` are rejected, the first promise + that is rejected will be given as an argument to the returned promises's + rejection handler. For example: + + Example: + + ```javascript + let promise1 = resolve(1); + let promise2 = reject(new Error("2")); + let promise3 = reject(new Error("3")); + let promises = [ promise1, promise2, promise3 ]; + + Promise.all(promises).then(function(array){ + // Code here never runs because there are rejected promises! + }, function(error) { + // error.message === "2" + }); + ``` + + @method all + @static + @param {Array} entries array of promises + @param {String} label optional string for labeling the promise. + Useful for tooling. + @return {Promise} promise that is fulfilled when all `promises` have been + fulfilled, or rejected if any of them become rejected. + @static +*/ +function all(entries) { + return new Enumerator(this, entries).promise; +} + +/** + `Promise.race` returns a new promise which is settled in the same way as the + first passed promise to settle. + + Example: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 2'); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // result === 'promise 2' because it was resolved before promise1 + // was resolved. + }); + ``` + + `Promise.race` is deterministic in that only the state of the first + settled promise matters. For example, even if other promises given to the + `promises` array argument are resolved, but the first settled promise has + become rejected before the other promises became fulfilled, the returned + promise will become rejected: + + ```javascript + let promise1 = new Promise(function(resolve, reject){ + setTimeout(function(){ + resolve('promise 1'); + }, 200); + }); + + let promise2 = new Promise(function(resolve, reject){ + setTimeout(function(){ + reject(new Error('promise 2')); + }, 100); + }); + + Promise.race([promise1, promise2]).then(function(result){ + // Code here never runs + }, function(reason){ + // reason.message === 'promise 2' because promise 2 became rejected before + // promise 1 became fulfilled + }); + ``` + + An example real-world use case is implementing timeouts: + + ```javascript + Promise.race([ajax('foo.json'), timeout(5000)]) + ``` + + @method race + @static + @param {Array} promises array of promises to observe + Useful for tooling. + @return {Promise} a promise which settles in the same way as the first passed + promise to settle. +*/ +function race(entries) { + /*jshint validthis:true */ + var Constructor = this; + + if (!isArray(entries)) { + return new Constructor(function (_, reject) { + return reject(new TypeError('You must pass an array to race.')); + }); + } else { + return new Constructor(function (resolve, reject) { + var length = entries.length; + for (var i = 0; i < length; i++) { + Constructor.resolve(entries[i]).then(resolve, reject); + } + }); + } +} + +/** + `Promise.reject` returns a promise rejected with the passed `reason`. + It is shorthand for the following: + + ```javascript + let promise = new Promise(function(resolve, reject){ + reject(new Error('WHOOPS')); + }); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + Instead of writing the above, your code now simply becomes the following: + + ```javascript + let promise = Promise.reject(new Error('WHOOPS')); + + promise.then(function(value){ + // Code here doesn't run because the promise is rejected! + }, function(reason){ + // reason.message === 'WHOOPS' + }); + ``` + + @method reject + @static + @param {Any} reason value that the returned promise will be rejected with. + Useful for tooling. + @return {Promise} a promise rejected with the given `reason`. +*/ +function reject(reason) { + /*jshint validthis:true */ + var Constructor = this; + var promise = new Constructor(noop); + _reject(promise, reason); + return promise; +} + +function needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); +} + +function needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); +} + +/** + Promise objects represent the eventual result of an asynchronous operation. The + primary way of interacting with a promise is through its `then` method, which + registers callbacks to receive either a promise's eventual value or the reason + why the promise cannot be fulfilled. + + Terminology + ----------- + + - `promise` is an object or function with a `then` method whose behavior conforms to this specification. + - `thenable` is an object or function that defines a `then` method. + - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). + - `exception` is a value that is thrown using the throw statement. + - `reason` is a value that indicates why a promise was rejected. + - `settled` the final resting state of a promise, fulfilled or rejected. + + A promise can be in one of three states: pending, fulfilled, or rejected. + + Promises that are fulfilled have a fulfillment value and are in the fulfilled + state. Promises that are rejected have a rejection reason and are in the + rejected state. A fulfillment value is never a thenable. + + Promises can also be said to *resolve* a value. If this value is also a + promise, then the original promise's settled state will match the value's + settled state. So a promise that *resolves* a promise that rejects will + itself reject, and a promise that *resolves* a promise that fulfills will + itself fulfill. + + + Basic Usage: + ------------ + + ```js + let promise = new Promise(function(resolve, reject) { + // on success + resolve(value); + + // on failure + reject(reason); + }); + + promise.then(function(value) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Advanced Usage: + --------------- + + Promises shine when abstracting away asynchronous interactions such as + `XMLHttpRequest`s. + + ```js + function getJSON(url) { + return new Promise(function(resolve, reject){ + let xhr = new XMLHttpRequest(); + + xhr.open('GET', url); + xhr.onreadystatechange = handler; + xhr.responseType = 'json'; + xhr.setRequestHeader('Accept', 'application/json'); + xhr.send(); + + function handler() { + if (this.readyState === this.DONE) { + if (this.status === 200) { + resolve(this.response); + } else { + reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); + } + } + }; + }); + } + + getJSON('/posts.json').then(function(json) { + // on fulfillment + }, function(reason) { + // on rejection + }); + ``` + + Unlike callbacks, promises are great composable primitives. + + ```js + Promise.all([ + getJSON('/posts'), + getJSON('/comments') + ]).then(function(values){ + values[0] // => postsJSON + values[1] // => commentsJSON + + return values; + }); + ``` + + @class Promise + @param {function} resolver + Useful for tooling. + @constructor +*/ +function Promise(resolver) { + this[PROMISE_ID] = nextId(); + this._result = this._state = undefined; + this._subscribers = []; + + if (noop !== resolver) { + typeof resolver !== 'function' && needsResolver(); + this instanceof Promise ? initializePromise(this, resolver) : needsNew(); + } +} + +Promise.all = all; +Promise.race = race; +Promise.resolve = resolve; +Promise.reject = reject; +Promise._setScheduler = setScheduler; +Promise._setAsap = setAsap; +Promise._asap = asap; + +Promise.prototype = { + constructor: Promise, + + /** + The primary way of interacting with a promise is through its `then` method, + which registers callbacks to receive either a promise's eventual value or the + reason why the promise cannot be fulfilled. + + ```js + findUser().then(function(user){ + // user is available + }, function(reason){ + // user is unavailable, and you are given the reason why + }); + ``` + + Chaining + -------- + + The return value of `then` is itself a promise. This second, 'downstream' + promise is resolved with the return value of the first promise's fulfillment + or rejection handler, or rejected if the handler throws an exception. + + ```js + findUser().then(function (user) { + return user.name; + }, function (reason) { + return 'default name'; + }).then(function (userName) { + // If `findUser` fulfilled, `userName` will be the user's name, otherwise it + // will be `'default name'` + }); + + findUser().then(function (user) { + throw new Error('Found user, but still unhappy'); + }, function (reason) { + throw new Error('`findUser` rejected and we're unhappy'); + }).then(function (value) { + // never reached + }, function (reason) { + // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. + // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. + }); + ``` + If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. + + ```js + findUser().then(function (user) { + throw new PedagogicalException('Upstream error'); + }).then(function (value) { + // never reached + }).then(function (value) { + // never reached + }, function (reason) { + // The `PedgagocialException` is propagated all the way down to here + }); + ``` + + Assimilation + ------------ + + Sometimes the value you want to propagate to a downstream promise can only be + retrieved asynchronously. This can be achieved by returning a promise in the + fulfillment or rejection handler. The downstream promise will then be pending + until the returned promise is settled. This is called *assimilation*. + + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // The user's comments are now available + }); + ``` + + If the assimliated promise rejects, then the downstream promise will also reject. + + ```js + findUser().then(function (user) { + return findCommentsByAuthor(user); + }).then(function (comments) { + // If `findCommentsByAuthor` fulfills, we'll have the value here + }, function (reason) { + // If `findCommentsByAuthor` rejects, we'll have the reason here + }); + ``` + + Simple Example + -------------- + + Synchronous Example + + ```javascript + let result; + + try { + result = findResult(); + // success + } catch(reason) { + // failure + } + ``` + + Errback Example + + ```js + findResult(function(result, err){ + if (err) { + // failure + } else { + // success + } + }); + ``` + + Promise Example; + + ```javascript + findResult().then(function(result){ + // success + }, function(reason){ + // failure + }); + ``` + + Advanced Example + -------------- + + Synchronous Example + + ```javascript + let author, books; + + try { + author = findAuthor(); + books = findBooksByAuthor(author); + // success + } catch(reason) { + // failure + } + ``` + + Errback Example + + ```js + + function foundBooks(books) { + + } + + function failure(reason) { + + } + + findAuthor(function(author, err){ + if (err) { + failure(err); + // failure + } else { + try { + findBoooksByAuthor(author, function(books, err) { + if (err) { + failure(err); + } else { + try { + foundBooks(books); + } catch(reason) { + failure(reason); + } + } + }); + } catch(error) { + failure(err); + } + // success + } + }); + ``` + + Promise Example; + + ```javascript + findAuthor(). + then(findBooksByAuthor). + then(function(books){ + // found books + }).catch(function(reason){ + // something went wrong + }); + ``` + + @method then + @param {Function} onFulfilled + @param {Function} onRejected + Useful for tooling. + @return {Promise} + */ + then: then, + + /** + `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same + as the catch block of a try/catch statement. + + ```js + function findAuthor(){ + throw new Error('couldn't find that author'); + } + + // synchronous + try { + findAuthor(); + } catch(reason) { + // something went wrong + } + + // async with promises + findAuthor().catch(function(reason){ + // something went wrong + }); + ``` + + @method catch + @param {Function} onRejection + Useful for tooling. + @return {Promise} + */ + 'catch': function _catch(onRejection) { + return this.then(null, onRejection); + } +}; + +function polyfill() { + var local = undefined; + + if (typeof global !== 'undefined') { + local = global; + } else if (typeof self !== 'undefined') { + local = self; + } else { + try { + local = Function('return this')(); + } catch (e) { + throw new Error('polyfill failed because global object is unavailable in this environment'); + } + } + + var P = local.Promise; + + if (P) { + var promiseToString = null; + try { + promiseToString = Object.prototype.toString.call(P.resolve()); + } catch (e) { + // silently ignored + } + + if (promiseToString === '[object Promise]' && !P.cast) { + return; + } + } + + local.Promise = Promise; +} + +// Strange compat.. +Promise.polyfill = polyfill; +Promise.Promise = Promise; + +return Promise; + +}))); +//# sourceMappingURL=es6-promise.map + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7), __webpack_require__(8))) + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /* global VERSION */ + +__webpack_require__(5); + +var _es6Promise = __webpack_require__(4); + +var _es6Promise2 = _interopRequireDefault(_es6Promise); + +var _utils = __webpack_require__(0); + +var Utils = _interopRequireWildcard(_utils); + +var _api = __webpack_require__(1); + +var API = _interopRequireWildcard(_api); + +var _button = __webpack_require__(2); + +var _push = __webpack_require__(3); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Noty = function () { + /** + * @param {object} options + * @return {Noty} + */ + function Noty() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + _classCallCheck(this, Noty); + + this.options = Utils.deepExtend({}, API.Defaults, options); + this.id = this.options.id || Utils.generateID('bar'); + this.closeTimer = -1; + this.barDom = null; + this.layoutDom = null; + this.progressDom = null; + this.showing = false; + this.shown = false; + this.closed = false; + this.closing = false; + this.killable = this.options.timeout || this.options.closeWith.length > 0; + this.hasSound = this.options.sounds.sources.length > 0; + this.soundPlayed = false; + this.listeners = { + beforeShow: [], + onShow: [], + afterShow: [], + onClose: [], + afterClose: [], + onHover: [], + onTemplate: [] + }; + this.promises = { + show: null, + close: null + }; + this.on('beforeShow', this.options.callbacks.beforeShow); + this.on('onShow', this.options.callbacks.onShow); + this.on('afterShow', this.options.callbacks.afterShow); + this.on('onClose', this.options.callbacks.onClose); + this.on('afterClose', this.options.callbacks.afterClose); + this.on('onHover', this.options.callbacks.onHover); + this.on('onTemplate', this.options.callbacks.onTemplate); + + return this; + } + + /** + * @param {string} eventName + * @param {function} cb + * @return {Noty} + */ + + + _createClass(Noty, [{ + key: 'on', + value: function on(eventName) { + var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {}; + + if (typeof cb === 'function' && this.listeners.hasOwnProperty(eventName)) { + this.listeners[eventName].push(cb); + } + + return this; + } + + /** + * @return {Noty} + */ + + }, { + key: 'show', + value: function show() { + var _this = this; + + if (this.options.killer === true && !API.PageHidden) { + Noty.closeAll(); + } else if (typeof this.options.killer === 'string' && !API.PageHidden) { + Noty.closeAll(this.options.killer); + } else { + var queueCounts = API.getQueueCounts(this.options.queue); + + if (queueCounts.current >= queueCounts.maxVisible || API.PageHidden) { + API.addToQueue(this); + + if (API.PageHidden && this.hasSound && Utils.inArray('docHidden', this.options.sounds.conditions)) { + Utils.createAudioElements(this); + } + + if (API.PageHidden && Utils.inArray('docHidden', this.options.titleCount.conditions)) { + API.docTitle.increment(); + } + + return this; + } + } + + API.Store[this.id] = this; + + API.fire(this, 'beforeShow'); + + this.showing = true; + + if (this.closing) { + this.showing = false; + return this; + } + + API.build(this); + API.handleModal(this); + + if (this.options.force) { + this.layoutDom.insertBefore(this.barDom, this.layoutDom.firstChild); + } else { + this.layoutDom.appendChild(this.barDom); + } + + if (this.hasSound && !this.soundPlayed && Utils.inArray('docVisible', this.options.sounds.conditions)) { + Utils.createAudioElements(this); + } + + if (Utils.inArray('docVisible', this.options.titleCount.conditions)) { + API.docTitle.increment(); + } + + this.shown = true; + this.closed = false; + + // bind button events if any + if (API.hasButtons(this)) { + Object.keys(this.options.buttons).forEach(function (key) { + var btn = _this.barDom.querySelector('#' + _this.options.buttons[key].id); + Utils.addListener(btn, 'click', function (e) { + Utils.stopPropagation(e); + _this.options.buttons[key].cb(); + }); + }); + } + + this.progressDom = this.barDom.querySelector('.noty_progressbar'); + + if (Utils.inArray('click', this.options.closeWith)) { + Utils.addClass(this.barDom, 'noty_close_with_click'); + Utils.addListener(this.barDom, 'click', function (e) { + Utils.stopPropagation(e); + _this.close(); + }, false); + } + + Utils.addListener(this.barDom, 'mouseenter', function () { + API.fire(_this, 'onHover'); + }, false); + + if (this.options.timeout) Utils.addClass(this.barDom, 'noty_has_timeout'); + + if (Utils.inArray('button', this.options.closeWith)) { + Utils.addClass(this.barDom, 'noty_close_with_button'); + + var closeButton = document.createElement('div'); + Utils.addClass(closeButton, 'noty_close_button'); + closeButton.innerHTML = '×'; + this.barDom.appendChild(closeButton); + + Utils.addListener(closeButton, 'click', function (e) { + Utils.stopPropagation(e); + _this.close(); + }, false); + } + + API.fire(this, 'onShow'); + + if (this.options.animation.open === null) { + this.promises.show = new _es6Promise2.default(function (resolve) { + resolve(); + }); + } else if (typeof this.options.animation.open === 'function') { + this.promises.show = new _es6Promise2.default(this.options.animation.open.bind(this)); + } else { + Utils.addClass(this.barDom, this.options.animation.open); + this.promises.show = new _es6Promise2.default(function (resolve) { + Utils.addListener(_this.barDom, Utils.animationEndEvents, function () { + Utils.removeClass(_this.barDom, _this.options.animation.open); + resolve(); + }); + }); + } + + this.promises.show.then(function () { + var _t = _this; + setTimeout(function () { + API.openFlow(_t); + }, 100); + }); + + return this; + } + + /** + * @return {Noty} + */ + + }, { + key: 'stop', + value: function stop() { + API.dequeueClose(this); + return this; + } + + /** + * @return {Noty} + */ + + }, { + key: 'resume', + value: function resume() { + API.queueClose(this); + return this; + } + + /** + * @param {int|boolean} ms + * @return {Noty} + */ + + }, { + key: 'setTimeout', + value: function (_setTimeout) { + function setTimeout(_x) { + return _setTimeout.apply(this, arguments); + } + + setTimeout.toString = function () { + return _setTimeout.toString(); + }; + + return setTimeout; + }(function (ms) { + this.stop(); + this.options.timeout = ms; + + if (this.barDom) { + if (this.options.timeout) { + Utils.addClass(this.barDom, 'noty_has_timeout'); + } else { + Utils.removeClass(this.barDom, 'noty_has_timeout'); + } + + var _t = this; + setTimeout(function () { + // ugly fix for progressbar display bug + _t.resume(); + }, 100); + } + + return this; + }) + + /** + * @param {string} html + * @param {boolean} optionsOverride + * @return {Noty} + */ + + }, { + key: 'setText', + value: function setText(html) { + var optionsOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (this.barDom) { + this.barDom.querySelector('.noty_body').innerHTML = html; + } + + if (optionsOverride) this.options.text = html; + + return this; + } + + /** + * @param {string} type + * @param {boolean} optionsOverride + * @return {Noty} + */ + + }, { + key: 'setType', + value: function setType(type) { + var _this2 = this; + + var optionsOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (this.barDom) { + var classList = Utils.classList(this.barDom).split(' '); + + classList.forEach(function (c) { + if (c.substring(0, 11) === 'noty_type__') { + Utils.removeClass(_this2.barDom, c); + } + }); + + Utils.addClass(this.barDom, 'noty_type__' + type); + } + + if (optionsOverride) this.options.type = type; + + return this; + } + + /** + * @param {string} theme + * @param {boolean} optionsOverride + * @return {Noty} + */ + + }, { + key: 'setTheme', + value: function setTheme(theme) { + var _this3 = this; + + var optionsOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (this.barDom) { + var classList = Utils.classList(this.barDom).split(' '); + + classList.forEach(function (c) { + if (c.substring(0, 12) === 'noty_theme__') { + Utils.removeClass(_this3.barDom, c); + } + }); + + Utils.addClass(this.barDom, 'noty_theme__' + theme); + } + + if (optionsOverride) this.options.theme = theme; + + return this; + } + + /** + * @return {Noty} + */ + + }, { + key: 'close', + value: function close() { + var _this4 = this; + + if (this.closed) return this; + + if (!this.shown) { + // it's in the queue + API.removeFromQueue(this); + return this; + } + + API.fire(this, 'onClose'); + + this.closing = true; + + if (this.options.animation.close === null) { + this.promises.close = new _es6Promise2.default(function (resolve) { + resolve(); + }); + } else if (typeof this.options.animation.close === 'function') { + this.promises.close = new _es6Promise2.default(this.options.animation.close.bind(this)); + } else { + Utils.addClass(this.barDom, this.options.animation.close); + this.promises.close = new _es6Promise2.default(function (resolve) { + Utils.addListener(_this4.barDom, Utils.animationEndEvents, function () { + if (_this4.options.force) { + Utils.remove(_this4.barDom); + } else { + API.ghostFix(_this4); + } + resolve(); + }); + }); + } + + this.promises.close.then(function () { + API.closeFlow(_this4); + API.handleModalClose(_this4); + }); + + this.closed = true; + + return this; + } + + // API functions + + /** + * @param {boolean|string} queueName + * @return {Noty} + */ + + }], [{ + key: 'closeAll', + value: function closeAll() { + var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + Object.keys(API.Store).forEach(function (id) { + if (queueName) { + if (API.Store[id].options.queue === queueName && API.Store[id].killable) { + API.Store[id].close(); + } + } else if (API.Store[id].killable) { + API.Store[id].close(); + } + }); + return this; + } + + /** + * @param {Object} obj + * @return {Noty} + */ + + }, { + key: 'overrideDefaults', + value: function overrideDefaults(obj) { + API.Defaults = Utils.deepExtend({}, API.Defaults, obj); + return this; + } + + /** + * @param {int} amount + * @param {string} queueName + * @return {Noty} + */ + + }, { + key: 'setMaxVisible', + value: function setMaxVisible() { + var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : API.DefaultMaxVisible; + var queueName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'global'; + + if (!API.Queues.hasOwnProperty(queueName)) { + API.Queues[queueName] = { maxVisible: amount, queue: [] }; + } + + API.Queues[queueName].maxVisible = amount; + return this; + } + + /** + * @param {string} innerHtml + * @param {String} classes + * @param {Function} cb + * @param {Object} attributes + * @return {NotyButton} + */ + + }, { + key: 'button', + value: function button(innerHtml) { + var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var cb = arguments[2]; + var attributes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + return new _button.NotyButton(innerHtml, classes, cb, attributes); + } + + /** + * @return {string} + */ + + }, { + key: 'version', + value: function version() { + return "3.1.0"; + } + + /** + * @param {String} workerPath + * @return {Push} + */ + + }, { + key: 'Push', + value: function Push(workerPath) { + return new _push.Push(workerPath); + } + }]); + + return Noty; +}(); + +// Document visibility change controller + + +exports.default = Noty; +Utils.visibilityChangeFlow(); +module.exports = exports['default']; + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }) +/******/ ]); +}); +//# sourceMappingURL=noty.js.map \ No newline at end of file diff --git a/resources/dopeNotify/html/pNotify.js b/resources/dopeNotify/html/pNotify.js new file mode 100644 index 000000000..5fd44b55a --- /dev/null +++ b/resources/dopeNotify/html/pNotify.js @@ -0,0 +1,11 @@ +$(function(){ + window.addEventListener("message", function(event){ + if(event.data.options){ + var options = event.data.options; + new Noty(options).show(); + }else{ + var maxNotifications = event.data.maxNotifications; + Noty.setMaxVisible(maxNotifications.max, maxNotifications.queue); + }; + }); +}); \ No newline at end of file diff --git a/resources/dopeNotify/html/themes.css b/resources/dopeNotify/html/themes.css new file mode 100644 index 000000000..b235e8fa1 --- /dev/null +++ b/resources/dopeNotify/html/themes.css @@ -0,0 +1,137 @@ +@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap"); +.noty_theme__gta.noty_bar { + margin: 10px 0; + overflow: hidden; + border-radius: 1px; + font-family: 'Poppins', sans-serif; + text-transform: uppercase; + position: relative; + height: auto; + word-wrap: break-word; +} + +.noty_theme__gta.noty_bar .noty_body { + padding: 15px; + font-size: 15px; +} + +.noty_theme__gta.noty_bar .noty_buttons { + padding: 20px; +} + +.noty_theme__gta.noty_bar .noty_progressbar { + position: absolute; + left: 0; + bottom: 0x; + height: 6px; + width: 100%; + background: black; + opacity: 0.0; + filter: alpha(opacity=80); +} + +.noty_theme__gta.noty_type__alert, +.noty_theme__gta.noty_type__notification { + background-color: rgb(0, 0, 0, 0.7); + color: rgb(255, 255, 255); + border-radius: 10px; +} + +.noty_theme__gta.noty_type__warning { + background-color: rgb(0, 0, 0, 0.7); + color: rgb(255, 255, 255); + border-radius: 10px; +} + +.noty_theme__gta.noty_type__error { + background-color: rgb(0, 0, 0, 0.7); + color: rgb(255, 255, 255); + border-radius: 10px; +} + +.noty_theme__gta.noty_type__info, +.noty_theme__gta.noty_type__information { + background-color: rgb(0, 0, 0, 0.7); + color: rgb(255, 255, 255); + border-radius: 10px; + +} +.fas { + color: #ffffff; +} + +.noty_theme__gta.noty_type__success { + background-color: rgb(0, 0, 0, 0.7); + color: rgb(255, 255, 255); + border-radius: 10px; +} + +.gta_effects_open { + opacity: 0; + -webkit-transform: translate(50%); + -ms-transform: translate(50%); + transform: translate(100%); + -webkit-animation: noty_anim_in 1.3s cubic-bezier(0.215, 0.61, 0.355, 1); + animation: noty_anim_in 1.3s cubic-bezier(0.215, 0.61, 0.355, 1); + -webkit-animation-fill-mode: forwards; + animation-fill-mode: forwards; +} + +.gta_effects_close { + -webkit-animation: noty_anim_out 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); + animation: noty_anim_out 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); + -webkit-animation-fill-mode: forwards; + animation-fill-mode: forwards; +} + +@-webkit-keyframes noty_anim_out_left { + 100% { + -webkit-transform: translate(-50%); + transform: translate(-50%); + opacity: 0; } } + +@keyframes noty_anim_out_left { + 100% { + -webkit-transform: translate(-50%); + transform: translate(-50%); + opacity: 0; } } + +.gta_effects_open_left { + opacity: 0; + -webkit-transform: translate(-50%); + -ms-transform: translate(-50%); + transform: translate(-50%); + -webkit-animation: noty_anim_in 5s cubic-bezier(0.215, 0.61, 0.355, 1); + animation: noty_anim_in 5s cubic-bezier(0.215, 0.61, 0.355, 1); + -webkit-animation-fill-mode: forwards; + animation-fill-mode: forwards; +} + +.gta_effects_close_left { + -webkit-animation: noty_anim_out_left 5s cubic-bezier(0.68, -0.55, 0.265, 1.55); + animation: noty_anim_out_left 5s cubic-bezier(0.68, -0.55, 0.265, 1.55); + -webkit-animation-fill-mode: backwards; + animation-fill-mode: backwards; +} + +@-webkit-keyframes noty_anim_fade_in { + 100% { opacity: 1; } } + +@keyframes noty_anim_fade_in { + 100% { opacity: 1; } } + +@-webkit-keyframes noty_anim_fade_out { + 100% { opacity: 0; } } + +@keyframes noty_anim_fade_out { + 100% { opacity: 0; } } + +.gta_effects_fade_in { + opacity: 0; + animation: noty_anim_fade_in 0.5s; +} + +.gta_effects_fade_out { + opacity: 1; + animation: noty_anim_fade_out 0.5s; +} \ No newline at end of file diff --git a/resources/dpclothing/.gitattributes b/resources/dpclothing/.gitattributes new file mode 100644 index 000000000..dfe077042 --- /dev/null +++ b/resources/dpclothing/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/resources/dpclothing/Client/Clothing.lua b/resources/dpclothing/Client/Clothing.lua new file mode 100644 index 000000000..9b0bf4f05 --- /dev/null +++ b/resources/dpclothing/Client/Clothing.lua @@ -0,0 +1,354 @@ +--[[ + + These are the tables for all the info we will need when dealing with the functions. + + ["Handle"] = { First we name it, this is the string that will be put in the command to be used with ToggleClothing, or ToggleProps. + Drawable = 11, Then we assign its drawable/prop id. + Table = Variations.Jackets, Then we assign its table found in Variations, if it has one, alternatively we can do. + Table = { + Standalone = true, + Male = 34, + Female = 35 + }, + Which makes it standalone, this example is for shoes, now when the player does the command it checks if they are currently wearing id 34. + If they are not it takes the drawable off and saves the one they had equipped. + + Emote = { Hey lets do the Emote, Pretty self explanatory. + Dict = "missmic4", This is the dict of the emote. + Anim = "michael_tux_fidget", Anim of the emote. + Move = 51, The move type of the emote, 51 is upper body only so you can move, 0 does not allow you to move. + Dur = 1500 Duration of the emote. + Alternatively for the props theres a seperate emote for taking off/putting on the prop. + } + }, + +]]-- + +local Drawables = { + ["Top"] = { + Drawable = 11, + Table = Variations.Jackets, + Emote = { Dict = "missmic4", Anim = "michael_tux_fidget", Move = 51, Dur = 1500 } + }, + ["Gloves"] = { + Drawable = 3, + Table = Variations.Gloves, + Remember = true, + Emote = { Dict = "nmt_3_rcm-10", Anim = "cs_nigel_dual-10", Move = 51, Dur = 1200 } + }, + ["Shoes"] = { + Drawable = 6, + Table = { Standalone = true, Male = 34, Female = 35 }, + Emote = { Dict = "random@domestic", Anim = "pickup_low", Move = 0, Dur = 1200 } + }, + ["Neck"] = { + Drawable = 7, + Table = { Standalone = true, Male = 0, Female = 0 }, + Emote = { Dict = "clothingtie", Anim = "try_tie_positive_a", Move = 51, Dur = 2100 } + }, + ["Vest"] = { + Drawable = 9, + Table = { Standalone = true, Male = 0, Female = 0 }, + Emote = { Dict = "clothingtie", Anim = "try_tie_negative_a", Move = 51, Dur = 1200 } + }, + ["Bag"] = { + Drawable = 5, + Table = Variations.Bags, + Emote = { Dict = "anim@heists@ornate_bank@grab_cash", Anim = "intro", Move = 51, Dur = 1600 } + }, + ["Mask"] = { + Drawable = 1, + Table = { Standalone = true, Male = 0, Female = 0 }, + Emote = { Dict = "mp_masks@standard_car@ds@", Anim = "put_on_mask", Move = 51, Dur = 800 } + }, + ["Hair"] = { + Drawable = 2, + Table = Variations.Hair, + Remember = true, + Emote = { Dict = "clothingtie", Anim = "check_out_a", Move = 51, Dur = 2000 } + }, +} + +local Extras = { + ["Shirt"] = { + Drawable = 11, + Table = { + Standalone = true, Male = 252, Female = 74, + Extra = { + { Drawable = 8, Id = 15, Tex = 0, Name = "Extra Undershirt"}, + { Drawable = 3, Id = 15, Tex = 0, Name = "Extra Gloves"}, + { Drawable = 10, Id = 0, Tex = 0, Name = "Extra Decals"}, + } + }, + Emote = { Dict = "clothingtie", Anim = "try_tie_negative_a", Move = 51, Dur = 1200 } + }, + ["Pants"] = { + Drawable = 4, + Table = { Standalone = true, Male = 61, Female = 14 }, + Emote = { Dict = "re@construction", Anim = "out_of_breath", Move = 51, Dur = 1300 } + }, +} + +local Props = { + ["Visor"] = { + Prop = 0, + Variants = Variations.Visor, + Emote = { + On = { Dict = "mp_masks@standard_car@ds@", Anim = "put_on_mask", Move = 51, Dur = 600 }, + Off = { Dict = "missheist_agency2ahelmet", Anim = "take_off_helmet_stand", Move = 51, Dur = 1200 } + } + }, + ["Hat"] = { + Prop = 0, + Emote = { + On = { Dict = "mp_masks@standard_car@ds@", Anim = "put_on_mask", Move = 51, Dur = 600 }, + Off = { Dict = "missheist_agency2ahelmet", Anim = "take_off_helmet_stand", Move = 51, Dur = 1200 } + } + }, + ["Glasses"] = { + Prop = 1, + Emote = { + On = { Dict = "clothingspecs", Anim = "take_off", Move = 51, Dur = 1400 }, + Off = { Dict = "clothingspecs", Anim = "take_off", Move = 51, Dur = 1400 } + } + }, + ["Ear"] = { + Prop = 2, + Emote = { + On = { Dict = "mp_cp_stolen_tut", Anim = "b_think", Move = 51, Dur = 900 }, + Off = { Dict = "mp_cp_stolen_tut", Anim = "b_think", Move = 51, Dur = 900 } + } + }, + ["Watch"] = { + Prop = 6, + Emote = { + On = { Dict = "nmt_3_rcm-10", Anim = "cs_nigel_dual-10", Move = 51, Dur = 1200 }, + Off = { Dict = "nmt_3_rcm-10", Anim = "cs_nigel_dual-10", Move = 51, Dur = 1200 } + } + }, + ["Bracelet"] = { + Prop = 7, + Emote = { + On = { Dict = "nmt_3_rcm-10", Anim = "cs_nigel_dual-10", Move = 51, Dur = 1200 }, + Off = { Dict = "nmt_3_rcm-10", Anim = "cs_nigel_dual-10", Move = 51, Dur = 1200 } + } + }, +} + +LastEquipped = {} +Cooldown = false + +local function PlayToggleEmote(e, cb) + local Ped = PlayerPedId() + while not HasAnimDictLoaded(e.Dict) do RequestAnimDict(e.Dict) Wait(100) end + if IsPedInAnyVehicle(Ped) then e.Move = 51 end + TaskPlayAnim(Ped, e.Dict, e.Anim, 3.0, 3.0, e.Dur, e.Move, 0, false, false, false) + local Pause = e.Dur-500 if Pause < 500 then Pause = 500 end + IncurCooldown(Pause) + Wait(Pause) -- Lets wait for the emote to play for a bit then do the callback. + cb() +end + +function ResetClothing() + local Ped = PlayerPedId() + for k,v in pairs(LastEquipped) do + if v then + if v.Ped == Ped then + if v.Drawable then SetPedComponentVariation(Ped, v.ID, v.Drawable, v.Texture, 0) + elseif v.Prop then ClearPedProp(Ped, v.ID) SetPedPropIndex(Ped, v.ID, v.Prop, v.Texture, true) end + else print("Skipped "..k.." (Ped Changed)") end + end + end + LastEquipped = {} +end + +function ToggleClothing(which, extra) + if Cooldown then return end + local Toggle = Drawables[which] if extra then Toggle = Extras[which] end + local Ped = PlayerPedId() + local Cur = { -- Lets check what we are currently wearing. + Drawable = GetPedDrawableVariation(Ped, Toggle.Drawable), + ID = Toggle.Drawable, + Ped = Ped, + Texture = GetPedTextureVariation(Ped, Toggle.Drawable), + } + local Gender = IsMpPed(Ped) + if which ~= "Mask" then + if not Gender then Notify(Lang("NotAllowedPed")) return false end -- We cancel the command here if the person is not using a multiplayer model. + end + local Table = Toggle.Table[Gender] + if not Toggle.Table.Standalone then -- "Standalone" is for things that dont require a variant, like the shoes just need to be switched to a specific drawable. Looking back at this i should have planned ahead, but it all works so, meh! + for k,v in pairs(Table) do + if not Toggle.Remember then + if k == Cur.Drawable then + PlayToggleEmote(Toggle.Emote, function() SetPedComponentVariation(Ped, Toggle.Drawable, v, Cur.Texture, 0) end) return true + end + else + if not LastEquipped[which] then + if k == Cur.Drawable then + PlayToggleEmote(Toggle.Emote, function() LastEquipped[which] = Cur SetPedComponentVariation(Ped, Toggle.Drawable, v, Cur.Texture, 0) end) return true + end + else + local Last = LastEquipped[which] + PlayToggleEmote(Toggle.Emote, function() SetPedComponentVariation(Ped, Toggle.Drawable, Last.Drawable, Last.Texture, 0) LastEquipped[which] = false end) return true + end + end + end + Notify(Lang("NoVariants")) return + else + if not LastEquipped[which] then + if Cur.Drawable ~= Table then + PlayToggleEmote(Toggle.Emote, function() + LastEquipped[which] = Cur + SetPedComponentVariation(Ped, Toggle.Drawable, Table, 0, 0) + if Toggle.Table.Extra then + local Extras = Toggle.Table.Extra + for k,v in pairs(Extras) do + local ExtraCur = {Drawable = GetPedDrawableVariation(Ped, v.Drawable), Texture = GetPedTextureVariation(Ped, v.Drawable), Id = v.Drawable} + if v.Drawable ~= ExtraCur.Drawable then + SetPedComponentVariation(Ped, v.Drawable, v.Id, v.Tex, 0) + LastEquipped[v.Name] = ExtraCur + end + end + end + end) + return true + end + else + local Last = LastEquipped[which] + PlayToggleEmote(Toggle.Emote, function() + SetPedComponentVariation(Ped, Toggle.Drawable, Last.Drawable, Last.Texture, 0) + LastEquipped[which] = false + if Toggle.Table.Extra then + local Extras = Toggle.Table.Extra + for k,v in pairs(Extras) do + if LastEquipped[v.Name] then + local Last = LastEquipped[v.Name] + SetPedComponentVariation(Ped, Last.Id, Last.Drawable, Last.Texture, 0) + LastEquipped[v.Name] = false + end + end + end + end) + return true + end + end + Notify(Lang("AlreadyWearing")) return false +end + +function ToggleProps(which) + if Cooldown then return end + local Prop = Props[which] + local Ped = PlayerPedId() + local Gender = IsMpPed(Ped) + local Cur = { -- Lets get out currently equipped prop. + ID = Prop.Prop, + Ped = Ped, + Prop = GetPedPropIndex(Ped, Prop.Prop), + Texture = GetPedPropTextureIndex(Ped, Prop.Prop), + } + if not Prop.Variants then + if Cur.Prop ~= -1 then -- If we currently are wearing this prop, remove it and save the one we were wearing into the LastEquipped table. + PlayToggleEmote(Prop.Emote.Off, function() LastEquipped[which] = Cur ClearPedProp(Ped, Prop.Prop) end) return true + else + local Last = LastEquipped[which] -- Detect that we have already taken our prop off, lets put it back on. + if Last then + PlayToggleEmote(Prop.Emote.On, function() SetPedPropIndex(Ped, Prop.Prop, Last.Prop, Last.Texture, true) end) LastEquipped[which] = false return true + end + end + Notify(Lang("NothingToRemove")) return false + else + local Gender = IsMpPed(Ped) + if not Gender then Notify(Lang("NotAllowedPed")) return false end -- We dont really allow for variants on ped models, Its possible, but im pretty sure 95% of ped models dont really have variants. + local Variations = Prop.Variants[Gender] + for k,v in pairs(Variations) do + if Cur.Prop == k then + PlayToggleEmote(Prop.Emote.On, function() SetPedPropIndex(Ped, Prop.Prop, v, Cur.Texture, true) end) return true + end + end + Notify(Lang("NoVariants")) return false + end +end + +function DrawDev() -- Draw text for all the stuff we are wearing, to make grabbing the variants of stuff much simpler for people. + local Entries = {} + for k,v in PairsKeys(Drawables) do table.insert(Entries, { Name = k, Drawable = v.Drawable }) end + for k,v in PairsKeys(Extras) do table.insert(Entries, { Name = k, Drawable = v.Drawable }) end + for k,v in PairsKeys(Props) do table.insert(Entries, { Name = k, Prop = v.Prop }) end + for k,v in pairs(Entries) do + local Ped = PlayerPedId() local Cur + if v.Drawable then + Cur = { Id = GetPedDrawableVariation(Ped, v.Drawable), Texture = GetPedTextureVariation(Ped, v.Drawable) } + elseif v.Prop then + Cur = { Id = GetPedPropIndex(Ped, v.Prop), Texture = GetPedPropTextureIndex(Ped, v.Prop) } + end + Text(0.2, 0.8*k/18, 0.30, "~o~"..v.Name.."~w~ = \n ("..Cur.Id.." , "..Cur.Texture..")", false, 1) + DrawRect(0.23, 0.8*k/18+0.025, 0.07, 0.045, 0, 0, 0, 150) + end +end + +local TestThreadActive = nil +function DevTestVariants(d) -- If debug mode is enabled we can try all the variants to check for scuff. + if not TestThreadActive then + Citizen.CreateThread(function() + TestThreadActive = true + local Ped = PlayerPedId() + local Drawable = Drawables[d] + local Prop = Props[d] + local Gender = IsMpPed(Ped) + if Drawable then + if Drawable.Table then + if type(Drawable.Table[Gender]) == "table" then + for k,v in PairsKeys(Drawable.Table[Gender]) do + Notify(d.." : ~o~"..k) + SoundPlay("Open") + SetPedComponentVariation(Ped, Drawable.Drawable, k, 0, 0) + Wait(300) + Notify(d.." : ~b~"..v) + SoundPlay("Close") + SetPedComponentVariation(Ped, Drawable.Drawable, v, 0, 0) + Wait(300) + end + end + end + elseif Prop then + if Prop.Variants then + for k,v in PairsKeys(Prop.Variants[Gender]) do + Notify(d.." : ~o~"..k) + SoundPlay("Open") + SetPedPropIndex(Ped, Prop.Prop, k, 0, true) + Wait(300) + Notify(d.." : ~b~"..v) + SoundPlay("Close") + SetPedPropIndex(Ped, Prop.Prop, v, 0, true) + Wait(300) + ClearPedProp(Ped, Prop.Prop) + Wait(200) + end + end + end + TestThreadActive = false + end) + else + Notify("Already testing variants.") + end +end + +for k,v in pairs(Config.Commands) do + RegisterCommand(k, v.Func) + --log("Created /"..k.." ("..v.Desc..")") -- Useful for translation checking. + TriggerEvent("chat:addSuggestion", "/"..k, v.Desc) +end +if Config.ExtrasEnabled then + for k,v in pairs(Config.ExtraCommands) do + RegisterCommand(k, v.Func) + --log("Created /"..k.." ("..v.Desc..")") -- Useful for translation checking. + TriggerEvent("chat:addSuggestion", "/"..k, v.Desc) + end +end + +AddEventHandler('onResourceStop', function(resource) -- Mostly for development, restart the resource and it will put all the clothes back on. + if resource == GetCurrentResourceName() then + ResetClothing() + end +end) \ No newline at end of file diff --git a/resources/dpclothing/Client/Config.lua b/resources/dpclothing/Client/Config.lua new file mode 100644 index 000000000..bdcccdd08 --- /dev/null +++ b/resources/dpclothing/Client/Config.lua @@ -0,0 +1,172 @@ +Config = { + Language = "en", -- You can change the language here. I translated some with a tool online so they might not be 100% accurate. Let me know! + ExtrasEnabled = true, -- This toggles the extra commands (Shirt, Pants) in case you dont want your players stripping their clothes for whatever reason. + Debug = false, -- Enables logging and on screen display of what your character is wearing. + GUI = { + Position = {x = 0.65, y = 0.5}, -- 0.5 is the middle! + AllowInCars = false, -- Allow the GUI in cars? + AllowWhenRagdolled = false, -- Allow the GUI when ragdolled? + Enabled = true, -- You can turn the gui off here, the base commands will still work. + Key = GetKey("Y"), -- Change the GUI key here. + Sound = true, -- You can disable sound in the GUI here. + TextColor = {255,255,255}, + TextOutline = true, + TextFont = 0, -- Change font, useful for other languages. + TextSize = 0.21, -- Change the text size below buttons here, useful for other languages. + } +} + +--[[ + Here are the commands to be generated, this is the layout. + + ["commandname"] = { + Func = Function that gets triggered. + Sprite = You probably shouldnt change this. + Desc = Description to be added in chat. + Button = The position of the button in the GUI. + Name = The display string for the GUI, we grab this with the Lang function, so they can be changed above. + }, + + You can change the command name if you wish, do so in the language file Locales/LANGUAGE.lua, + Some alternatives i thought of were : + + Top : Jacket, Hoodie. + Hair : Bun, Ponytail, Hairdown. + Visor : Brim, Cap. + + And then for the props you can change em to something real short to make it easy for people to use. + + Glasses : G. + Hat : H. + Mask : M. + Visor : V. +]]-- + +Config.Commands = { + [Lang("TOP")] = { + Func = function() ToggleClothing("Top") end, + Sprite = "top", + Desc = Lang("Top2"), + Button = 1, + Name = Lang("Top") + }, + [Lang("GLOVES")] = { + Func = function() ToggleClothing("Gloves") end, + Sprite = "gloves", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Gloves"))), + Button = 2, + Name = Lang("Gloves") + }, + [Lang("VISOR")] = { + Func = function() ToggleProps("Visor") end, + Sprite = "visor", + Desc = Lang("Visor2"), + Button = 3, + Name = Lang("Visor") + }, + [Lang("BAG")] = { + Func = function() ToggleClothing("Bag") end, + Sprite = "bag", + Desc = Lang("Bag2"), + Button = 8, + Name = Lang("Bag") + }, + [Lang("SHOES")] = { + Func = function() ToggleClothing("Shoes") end, + Sprite = "shoes", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Shoes"))), + Button = 5, + Name = Lang("Shoes") + }, + [Lang("VEST")] = { + Func = function() ToggleClothing("Vest") end, + Sprite = "vest", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Vest"))), + Button = 14, + Name = Lang("Vest") + }, + [Lang("HAIR")] = { + Func = function() ToggleClothing("Hair") end, + Sprite = "hair", + Desc = Lang("Hair2"), + Button = 7, + Name = Lang("Hair") + }, + [Lang("HAT")] = { + Func = function() ToggleProps("Hat") end, + Sprite = "hat", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Hat"))), + Button = 4, + Name = Lang("Hat") + }, + [Lang("GLASSES")] = { + Func = function() ToggleProps("Glasses") end, + Sprite = "glasses", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Glasses"))), + Button = 9, + Name = Lang("Glasses") + }, + [Lang("EAR")] = { + Func = function() ToggleProps("Ear") end, + Sprite = "ear", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Ear2"))), + Button = 10, + Name = Lang("Ear") + }, + [Lang("NECK")] = { + Func = function() ToggleClothing("Neck") end, + Sprite = "neck", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Neck2"))), + Button = 11, + Name = Lang("Neck") + }, + [Lang("WATCH")] = { + Func = function() ToggleProps("Watch") end, + Sprite = "watch", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Watch"))), + Button = 12, + Name = Lang("Watch"), + Rotation = 5.0 + }, + [Lang("BRACELET")] = { + Func = function() ToggleProps("Bracelet") end, + Sprite = "bracelet", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Bracelet"))), + Button = 13, + Name = Lang("Bracelet") + }, + [Lang("MASK")] = { + Func = function() ToggleClothing("Mask") end, + Sprite = "mask", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Mask"))), + Button = 6, + Name = Lang("Mask") + } +} + +Config.ExtraCommands = { + [Lang("PANTS")] = { + Func = function() ToggleClothing("Pants", true) end, + Sprite = "pants", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Pants"))), + Name = Lang("Pants"), + OffsetX = -0.04, + OffsetY = 0.0, + }, + [Lang("SHIRT")] = { + Func = function() ToggleClothing("Shirt", true) end, + Sprite = "shirt", + Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Shirt"))), + Name = Lang("Shirt"), + OffsetX = 0.04, + OffsetY = 0.0, + }, + [Lang("RESET")] = { + Func = function() if not ResetClothing() then Notify(Lang("AlreadyWearing")) end end, + Sprite = "reset", + Desc = Lang("Reset2"), + Name = Lang("Reset"), + OffsetX = 0.12, + OffsetY = 0.2, + }, +} \ No newline at end of file diff --git a/resources/dpclothing/Client/Functions.lua b/resources/dpclothing/Client/Functions.lua new file mode 100644 index 000000000..b41b246c0 --- /dev/null +++ b/resources/dpclothing/Client/Functions.lua @@ -0,0 +1,130 @@ +Locale = {} +Keys = { -- Who doesnt love a big old table of keys. + [","] = 82, ["-"] = 84, ["."] = 81, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, + ["8"] = 162, ["9"] = 163, ["="] = 83, ["["] = 39, ["]"] = 40, ["A"] = 34, ["B"] = 29, ["BACKSPACE"] = 177, ["C"] = 26, ["CAPS"] = 137, + ["D"] = 9, ["DELETE"] = 178, ["UP"] = 172, ["DOWN"] = 173, ["E"] = 38, ["ENTER"] = 18, ["ESC"] = 322, ["F"] = 23, ["F1"] = 288, ["F10"] = 57, ["F2"] = 289, + ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["G"] = 47, ["H"] = 74, ["HOME"] = 213, ["K"] = 311, + ["L"] = 182, ["LEFT"] = 174, ["LEFTALT"] = 19, ["LEFTCTRL"] = 36, ["LEFTSHIFT"] = 21, ["M"] = 244, ["N"] = 249, ["N+"] = 96, ["N-"] = 97, + ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118, ["NENTER"] = 201, ["P"] = 199, ["PAGEDOWN"] = 11, + ["PAGEUP"] = 10, ["Q"] = 44, ["R"] = 45, ["RIGHT"] = 175, ["RIGHTCTRL"] = 70, ["S"] = 8, ["SPACE"] = 22, ["T"] = 245, ["TAB"] = 37, + ["TOP"] = 27, ["U"] = 303, ["V"] = 0, ["W"] = 32, ["X"] = 73, ["Y"] = 246, ["Z"] = 20, ["~"] = 243, +} + +function log(l) -- Just a simple logging thing, to easily log all kinds of stuff. + if not Config.Debug then return end + if type(l) == "table" then print(json.encode(l)) elseif type(l) == "boolean" then print(l) else print(l.." | "..type(l)) end +end + +function GetKey(str) + local Key = Keys[string.upper(str)] + if Key then return Key else return false end +end + +function IncurCooldown(ms) + Citizen.CreateThread(function() + Cooldown = true Wait(ms) Cooldown = false + end) +end + +-- This is my old implementation, unsure if its any better than above though, not sure if creating a thread as often as we do above is good? Time will tell i suppose. + +--function IncurCooldown(ms) +-- Cooldown = ms +--end +--Citizen.CreateThread(function() +-- while true do Wait(500) +-- if Cooldown then +-- Wait(Cooldown) +-- Cooldown = false +-- end +-- end +--end) + +function PairsKeys(t, f) + local a = {} + for n in pairs(t) do table.insert(a, n) end + table.sort(a, f) + local i = 0 + local iter = function () + i = i + 1 + if a[i] == nil then return nil + else return a[i], t[a[i]] end + end + return iter +end + +function Text(x, y, scale, text, colour, align, force, w) + local align = align or 0 + local colour = colour or Config.GUI.TextColor + SetTextFont(Config.GUI.TextFont) + SetTextJustification(align) + SetTextScale(scale, scale) + SetTextColour(colour[1], colour[2], colour[3], 255) + if Config.GUI.TextOutline then SetTextOutline() end + if w then SetTextWrap(w.x, w.y) end + SetTextEntry("STRING") + AddTextComponentString(text) + DrawText(x,y) +end + +function FirstUpper(str) + return (str:gsub("^%l", string.upper)) +end + +function Lang(what) + local Dict = Locale[Config.Language] + if not Dict[what] then return Locale["en"][what] end -- If we cant find a translation, use the english one. + return Dict[what] +end + +function Notify(message) -- However you want your notifications to be shown, you can switch it up here. + SetNotificationTextEntry("STRING") + AddTextComponentString(message) + DrawNotification(0,1) +end + +function IsMpPed(ped) + local Male = GetHashKey("mp_m_freemode_01") local Female = GetHashKey("mp_f_freemode_01") + local CurrentModel = GetEntityModel(ped) + if CurrentModel == Male then return "Male" elseif CurrentModel == Female then return "Female" else return false end +end + +--[[ + Some events that might be useful for external use. + You can trigger em with TriggerEvent("EventName"). + I was thinking about making them exports, but this is easier, if thats wrong and exports are better for some reason let me know. +]]-- + +--[[ + [dpc:EquipLast] + This event will remove all saved clothes from the client. + And put them back on the players model. + You should use this in your own / other external scripts whenever the player : + Eenter a clothing store, enter a barber shop, and many other uses i maybe havent though of. + Of course you dont have to do that, but it makes the player experience better. + Otherwise they might for example "save" a hat, then go to a clothing store and change the hat, then when using /hat it puts on the hat they had before they paid for their new hat. +]]-- + +RegisterNetEvent('dpc:EquipLast') +AddEventHandler('dpc:EquipLast', function() + local Ped = PlayerPedId() + for k,v in pairs(LastEquipped) do + if v then + if v.Drawable then SetPedComponentVariation(Ped, v.ID, v.Drawable, v.Texture, 0) + elseif v.Prop then ClearPedProp(Ped, v.ID) SetPedPropIndex(Ped, v.ID, v.Prop, v.Texture, true) end + end + end + LastEquipped = {} +end) + +--[[ + [dpc:ResetClothing] + Same deal as above but instead of equipping the stuff, it just clears the lastequipped. + Useful for when you change a players model. +]]-- + +RegisterNetEvent('dpc:ResetClothing') +AddEventHandler('dpc:ResetClothing', function() + LastEquipped = {} +end) + diff --git a/resources/dpclothing/Client/GUI.lua b/resources/dpclothing/Client/GUI.lua new file mode 100644 index 000000000..e2d2a7dfb --- /dev/null +++ b/resources/dpclothing/Client/GUI.lua @@ -0,0 +1,246 @@ +if not Config.GUI.Enabled then return end + +local Sounds = { -- In case you wanna change out the sounds they are located here. + ["Close"] = {"TOGGLE_ON", "HUD_FRONTEND_DEFAULT_SOUNDSET"}, + ["Open"] = {"NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET"}, + ["Select"] = {"SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET"} +} +function SoundPlay(which) + if not Config.GUI.Sound then return end + local Sound = Sounds[which] + PlaySoundFrontend(-1, Sound[1], Sound[2]) +end + +local function Distance(x1, y1, x2, y2) + local dx = x1 - x2 + local dy = y1 - y2 + return math.sqrt(dx * dx + dy * dy) +end + +local function DisableControl() + DisableControlAction(1, 1, true) + DisableControlAction(1, 2, true) + DisableControlAction(1, 18, true) + DisableControlAction(1, 68, true) + DisableControlAction(1, 69, true) + DisableControlAction(1, 70, true) + DisableControlAction(1, 91, true) + DisableControlAction(1, 92, true) + DisableControlAction(1, 24, true) + DisableControlAction(1, 25, true) + DisableControlAction(1, 14, true) + DisableControlAction(1, 15, true) + DisableControlAction(1, 16, true) + DisableControlAction(1, 17, true) + DisablePlayerFiring(PlayerId(), true) -- We wouldnt want the player punching by accident. + ShowCursorThisFrame() +end + +local function GetCursor() -- This might break for people with weird resolutions? Im really not sure. + local sx, sy = GetActiveScreenResolution() + local cx, cy = GetNuiCursorPosition() + local cx, cy = (cx / sx) + 0.008, (cy / sy) + 0.027 + return cx, cy +end + +local function DrawButton(b) + local B = Config.GUI.ButtonColor + if b.Shadow then + DrawSprite("dp_clothing", "circle", b.x, b.y, b.Size.Circle.x/0.80, b.Size.Circle.y/0.80, 0.0, b.Colour.r, b.Colour.g, b.Colour.b, b.Alpha) + end + DrawSprite("dp_clothing", b.Sprite, b.x, b.y, b.Size.Sprite.x/0.68, b.Size.Sprite.y/0.68, b.Rotation, 255, 255, 255, b.Alpha) + if IsDisabledControlJustPressed(1, 24) then + local x,y = GetCursor() + local Distance = Distance(b.x+0.005, b.y+0.025, x, y) + if Distance < 0.025 then return true end + elseif IsDisabledControlJustPressed(1, 25) and Config.Debug then + local x,y = GetCursor() + local Distance = Distance(b.x+0.005, b.y+0.025, x, y) + if Distance < 0.025 then + DevTestVariants(FirstUpper(b.Sprite)) + end + end + return false +end + +local function Check(ped) -- We check if the player should be able to open the menu. + if IsPedInAnyVehicle(ped) and not Config.GUI.AllowInCars then + return false + elseif IsPedSwimmingUnderWater(ped) then + return false + elseif IsPedRagdoll(ped) and not Config.GUI.AllowWhenRagdolled then + return false + elseif IsHudComponentActive(19) then -- If the weapon wheel is open, we close! + return false + end + return true +end + +local DefaultButton = {x = 0.0254, y = 0.0445} +local DefaultCircle = {x = 0.0345 / 1.2, y = 0.06 / 1.2} +local Buttons = {} +local ExtraButtons = {} + +local function GenerateTheButtons() -- We generate the buttons here to save on a little bit of performance. + local x, y, rx, ry = Config.GUI.Position.x, Config.GUI.Position.y, 0.1, 0.175 + for k,v in pairs(Config.Commands) do + local i = v.Button + local Angle = i * math.pi / 7 local Ptx, Pty = x + rx * math.cos(Angle), y + ry * math.sin(Angle) + Buttons[i] = { + Command = k, + Desc = v.Desc or "", + Rotation = v.Rotation or 0.0, + Size = {Sprite = DefaultButton}, + Sprite = v.Sprite, + Text = v.Name, + x = Ptx, y = Pty, + } + end + if Config.ExtrasEnabled then -- The extra buttons arent tied to the wheel, and can be moved with simple offsets. + for k,v in pairs(Config.ExtraCommands) do + ExtraButtons[k] = { + Command = k, + Desc = v.Desc or "", + OffsetX = v.OffsetX, OffsetY = v.OffsetY, + Size = { Circle = {x = DefaultCircle.x, y = DefaultCircle.y}, Sprite = {x = DefaultButton.x/1.35, y = DefaultButton.y/1.35}}, + Sprite = v.Sprite, + Text = v.Name, + } + end + end +end + +local function PushedButton(button, extra) -- https://www.youtube.com/watch?v=v57i1Ze0jB8 + Citizen.CreateThread(function() + SoundPlay("Select") + if not extra then + local thing = Buttons[button] + thing.Size = {Sprite = {x = DefaultButton.x/1.1, y = DefaultButton.y/1.1}} + Wait(100) + thing.Size = {Sprite = {x = DefaultButton.x, y = DefaultButton.y}} + else + local thing = ExtraButtons[button] + thing.Size = { Circle = {x = DefaultCircle.x, y = DefaultCircle.y}, Sprite = {x = DefaultButton.x/1.3/1.1, y = DefaultButton.y/1.3/1.1}} + Wait(100) + thing.Size = { Circle = {x = DefaultCircle.x, y = DefaultCircle.y}, Sprite = {x = DefaultButton.x/1.35, y = DefaultButton.y/1.35}} + end + end) +end + +local function HoveredButton() + local x,y = GetCursor() + for k,v in pairs(Buttons) do + local Distance = Distance(v.x+0.005, v.y+0.025, x, y) + if Distance < 0.025 then + Text(Config.GUI.Position.x, Config.GUI.Position.y-0.10, 0.3, v.Text, false, false, true) + Text(Config.GUI.Position.x, Config.GUI.Position.y-0.08, 0.22, v.Desc, {210,210,210}, false, true, {x = 0.1, y = 0.2}) + end + end + for k,v in pairs(ExtraButtons) do + local Distance = Distance(Config.GUI.Position.x+v.OffsetX+0.005, Config.GUI.Position.y+v.OffsetY+0.025, x, y) + if Distance < 0.025 then + Text(Config.GUI.Position.x, Config.GUI.Position.y-0.10, 0.3, v.Text, false, false, true) + Text(Config.GUI.Position.x, Config.GUI.Position.y-0.08, 0.22, v.Desc, {210,210,210}, false, true, {x = 0.1, y = 0.2}) + end + end + local Distance = Distance(Config.GUI.Position.x+0.005, Config.GUI.Position.y+0.025, x, y) + if Distance < 0.015 then + Text(Config.GUI.Position.x, Config.GUI.Position.y-0.09, 0.3, Lang("Info"), false, false, true) + end +end + +--[[ + This is the function that draws the GUI, im using native DrawSprites and Texts. + Its not the most efficient thing ms wise, but it does the job pretty well, and i dont have to bother with NUI HTML stuff. + If you have any performance tips, let me know. +]]-- + +local function DrawGUI() + DisableControl() -- Disable control while GUI is active. + HoveredButton() -- This checks if you are hovering a button, and if you are it displays name and description. + local x, y, rx, ry = Config.GUI.Position.x, Config.GUI.Position.y, 0.1, 0.175 + for k,v in pairs(Buttons) do + local Colour local Alpha + if LastEquipped[FirstUpper(v.Sprite)] then + Alpha = 180 Colour = {r=0,g=100,b=210,a=220} + else + Alpha = 255 Colour = {r=0,g=0,b=0,a=255} + end + DrawSprite("dp_wheel", k.."", x, y, 0.4285, 0.7714, 0.0, Colour.r, Colour.g, Colour.b, Colour.a) + local Button = DrawButton({ -- Lets draw the buttons! + Alpha = Alpha, + Colour = Colour, + Rotation = v.Rotation, + Size = v.Size, + Sprite = v.Sprite, + Text = v.Text, + x = v.x, y = v.y, + }) + if Button and not Cooldown then -- If the button is clicked we execute the command, just like if the player typed it in chat. + if v.Sprite == "gloves" then + if not LastEquipped["Shirt"] then + PushedButton(k) ExecuteCommand(v.Command) + else + Notify(Lang("NoShirtOn")) + end + else + PushedButton(k) ExecuteCommand(v.Command) + end + + end + end + for k,v in pairs(ExtraButtons) do + local Colour local Alpha + if LastEquipped[FirstUpper(v.Sprite)] then + Alpha = 180 Colour = {r=0,g=100,b=210,a=220} + else + Alpha = 255 Colour = {r=0,g=0,b=0,a=255} + end + local Button = DrawButton({ + Alpha = Alpha, + Colour = Colour, + Shadow = true, + Size = v.Size, + Sprite = v.Sprite, + Text = v.Text, + x = x + v.OffsetX, + y = y + v.OffsetY, + }) + if Button and not Cooldown then + PushedButton(k, true) ExecuteCommand(v.Command) + end + end + if Cooldown then Text(x, y+0.05, 0.28, Lang("PleaseWait"), false, false, true) end -- Cooldown indicator, if theres a cooldown we display a little text. + local InfoButton = DrawButton({ + Alpha = 255, + Colour = {r=0,g=0,b=0}, + Shadow = true, + Size = {Circle = {x = 0.0345, y = 0.06}, Sprite = {x = 0.0234, y = 0.0425}}, + Sprite = "info", + Text = Lang("Info"), + x = x, y = y, + }) + if InfoButton then + Notify(Lang("Information")) + for k,v in pairs(LastEquipped) do log(k.." : "..json.encode(v)) end -- If the info button is pressed we log all "LastEquipped" items, for debugging purposes. + end +end + +local TextureDicts = {"dp_clothing", "dp_wheel"} +Citizen.CreateThread(function() + for k,v in pairs(TextureDicts) do while not HasStreamedTextureDictLoaded(v) do Wait(100) RequestStreamedTextureDict(v, true) end end + GenerateTheButtons() + while true do Wait(0) + if IsControlJustPressed(1, Config.GUI.Key) then + local Ped = PlayerPedId() + if Check(Ped) then SoundPlay("Open") SetCursorLocation(Config.GUI.Position.x, Config.GUI.Position.y) end + elseif IsControlPressed(1, Config.GUI.Key) then + local Ped = PlayerPedId() + if Check(Ped) then DrawGUI() end + elseif IsControlJustReleased(1, Config.GUI.Key) then + if Check(Ped) then SoundPlay("Close") end + end + --DrawGUI() + if Config.Debug then DrawDev() end + end +end) \ No newline at end of file diff --git a/resources/dpclothing/Client/Variations.lua b/resources/dpclothing/Client/Variations.lua new file mode 100644 index 000000000..fc0067ab2 --- /dev/null +++ b/resources/dpclothing/Client/Variations.lua @@ -0,0 +1,537 @@ +function AddNewVariation(which, gender, one, two, single) + local Where = Variations[which][gender] + if not single then + Where[one] = two + Where[two] = one + else + Where[one] = two + end +end + +--[[ + This is where all the different variations go. + For jackets i included extra things that arent just hoodies aswell, things like the christmas sweater with their different lights. + So doing the command whilst wearing the christmas sweater you can toggle the light. + + Tip for adding new ones of this is to toggle Config.Debug, and use vMenu Player Appearance to switch around. + + If you are using EUP you might have to change things around! + But it should be easy enough to understand and make changes as you want. + + Simply just : + + AddNewVariation(Table, Gender, First, Second) + + And for Hair there is also the "single" var. + Its important for haircuts. +]]-- + +Citizen.CreateThread(function() + -- Male Visor/Hat Variations + AddNewVariation("Visor", "Male", 9, 10) + AddNewVariation("Visor", "Male", 18, 67) + AddNewVariation("Visor", "Male", 82, 67) + AddNewVariation("Visor", "Male", 44, 45) + AddNewVariation("Visor", "Male", 50, 68) + AddNewVariation("Visor", "Male", 51, 69) + AddNewVariation("Visor", "Male", 52, 70) + AddNewVariation("Visor", "Male", 53, 71) + AddNewVariation("Visor", "Male", 62, 72) + AddNewVariation("Visor", "Male", 65, 66) + AddNewVariation("Visor", "Male", 73, 74) + AddNewVariation("Visor", "Male", 76, 77) + AddNewVariation("Visor", "Male", 79, 78) + AddNewVariation("Visor", "Male", 80, 81) + AddNewVariation("Visor", "Male", 91, 92) + AddNewVariation("Visor", "Male", 104, 105) + AddNewVariation("Visor", "Male", 109, 110) + AddNewVariation("Visor", "Male", 116, 117) + AddNewVariation("Visor", "Male", 118, 119) + AddNewVariation("Visor", "Male", 123, 124) + AddNewVariation("Visor", "Male", 125, 126) + AddNewVariation("Visor", "Male", 127, 128) + AddNewVariation("Visor", "Male", 130, 131) + -- Female Visor/Hat Variations + AddNewVariation("Visor", "Female", 43, 44) + AddNewVariation("Visor", "Female", 49, 67) + AddNewVariation("Visor", "Female", 64, 65) + AddNewVariation("Visor", "Female", 65, 64) + AddNewVariation("Visor", "Female", 51, 69) + AddNewVariation("Visor", "Female", 50, 68) + AddNewVariation("Visor", "Female", 52, 70) + AddNewVariation("Visor", "Female", 62, 71) + AddNewVariation("Visor", "Female", 72, 73) + AddNewVariation("Visor", "Female", 75, 76) + AddNewVariation("Visor", "Female", 78, 77) + AddNewVariation("Visor", "Female", 79, 80) + AddNewVariation("Visor", "Female", 18, 66) + AddNewVariation("Visor", "Female", 66, 81) + AddNewVariation("Visor", "Female", 81, 66) + AddNewVariation("Visor", "Female", 86, 84) + AddNewVariation("Visor", "Female", 90, 91) + AddNewVariation("Visor", "Female", 103, 104) + AddNewVariation("Visor", "Female", 108, 109) + AddNewVariation("Visor", "Female", 115, 116) + AddNewVariation("Visor", "Female", 117, 118) + AddNewVariation("Visor", "Female", 122, 123) + AddNewVariation("Visor", "Female", 124, 125) + AddNewVariation("Visor", "Female", 126, 127) + AddNewVariation("Visor", "Female", 129, 130) + -- Male Bags + AddNewVariation("Bags", "Male", 45, 44) + AddNewVariation("Bags", "Male", 41, 40) + -- Female Bags + AddNewVariation("Bags", "Female", 45, 44) + AddNewVariation("Bags", "Female", 41, 40) + -- Male Hair + AddNewVariation("Hair", "Male", 7, 15, true) + AddNewVariation("Hair", "Male", 43, 15, true) + AddNewVariation("Hair", "Male", 9, 43, true) + AddNewVariation("Hair", "Male", 11, 43, true) + AddNewVariation("Hair", "Male", 15, 43, true) + AddNewVariation("Hair", "Male", 16, 43, true) + AddNewVariation("Hair", "Male", 17, 43, true) + AddNewVariation("Hair", "Male", 20, 43, true) + AddNewVariation("Hair", "Male", 22, 43, true) + AddNewVariation("Hair", "Male", 45, 43, true) + AddNewVariation("Hair", "Male", 47, 43, true) + AddNewVariation("Hair", "Male", 49, 43, true) + AddNewVariation("Hair", "Male", 51, 43, true) + AddNewVariation("Hair", "Male", 52, 43, true) + AddNewVariation("Hair", "Male", 53, 43, true) + AddNewVariation("Hair", "Male", 56, 43, true) + AddNewVariation("Hair", "Male", 58, 43, true) + -- Female Hair + AddNewVariation("Hair", "Female", 1, 49, true) + AddNewVariation("Hair", "Female", 2, 49, true) + AddNewVariation("Hair", "Female", 7, 49, true) + AddNewVariation("Hair", "Female", 9, 49, true) + AddNewVariation("Hair", "Female", 10, 49, true) + AddNewVariation("Hair", "Female", 11, 48, true) + AddNewVariation("Hair", "Female", 14, 53, true) + AddNewVariation("Hair", "Female", 15, 42, true) + AddNewVariation("Hair", "Female", 21, 42, true) + AddNewVariation("Hair", "Female", 23, 42, true) + AddNewVariation("Hair", "Female", 31, 53, true) + AddNewVariation("Hair", "Female", 39, 49, true) + AddNewVariation("Hair", "Female", 40, 49, true) + AddNewVariation("Hair", "Female", 42, 53, true) + AddNewVariation("Hair", "Female", 45, 49, true) + AddNewVariation("Hair", "Female", 48, 49, true) + AddNewVariation("Hair", "Female", 49, 48, true) + AddNewVariation("Hair", "Female", 52, 53, true) + AddNewVariation("Hair", "Female", 53, 42, true) + AddNewVariation("Hair", "Female", 54, 55, true) + AddNewVariation("Hair", "Female", 59, 42, true) + AddNewVariation("Hair", "Female", 59, 54, true) + AddNewVariation("Hair", "Female", 68, 53, true) + AddNewVariation("Hair", "Female", 76, 48, true) + -- Male Top/Jacket Variations + AddNewVariation("Jackets", "Male", 29, 30) + AddNewVariation("Jackets", "Male", 31, 32) + AddNewVariation("Jackets", "Male", 42, 43) + AddNewVariation("Jackets", "Male", 68, 69) + AddNewVariation("Jackets", "Male", 74, 75) + AddNewVariation("Jackets", "Male", 87, 88) + AddNewVariation("Jackets", "Male", 99, 100) + AddNewVariation("Jackets", "Male", 101, 102) + AddNewVariation("Jackets", "Male", 103, 104) + AddNewVariation("Jackets", "Male", 126, 127) + AddNewVariation("Jackets", "Male", 129, 130) + AddNewVariation("Jackets", "Male", 184, 185) + AddNewVariation("Jackets", "Male", 188, 189) + AddNewVariation("Jackets", "Male", 194, 195) + AddNewVariation("Jackets", "Male", 196, 197) + AddNewVariation("Jackets", "Male", 198, 199) + AddNewVariation("Jackets", "Male", 200, 203) + AddNewVariation("Jackets", "Male", 202, 205) + AddNewVariation("Jackets", "Male", 206, 207) + AddNewVariation("Jackets", "Male", 210, 211) + AddNewVariation("Jackets", "Male", 217, 218) + AddNewVariation("Jackets", "Male", 229, 230) + AddNewVariation("Jackets", "Male", 232, 233) + AddNewVariation("Jackets", "Male", 251, 253) + AddNewVariation("Jackets", "Male", 256, 261) + AddNewVariation("Jackets", "Male", 262, 263) + AddNewVariation("Jackets", "Male", 265, 266) + AddNewVariation("Jackets", "Male", 267, 268) + AddNewVariation("Jackets", "Male", 279, 280) + -- Female Top/Jacket Variations + AddNewVariation("Jackets", "Female", 53, 52) + AddNewVariation("Jackets", "Female", 57, 58) + AddNewVariation("Jackets", "Female", 62, 63) + AddNewVariation("Jackets", "Female", 90, 91) + AddNewVariation("Jackets", "Female", 92, 93) + AddNewVariation("Jackets", "Female", 94, 95) + AddNewVariation("Jackets", "Female", 187, 186) + AddNewVariation("Jackets", "Female", 190, 191) + AddNewVariation("Jackets", "Female", 196, 197) + AddNewVariation("Jackets", "Female", 198, 199) + AddNewVariation("Jackets", "Female", 200, 201) + AddNewVariation("Jackets", "Female", 202, 205) + AddNewVariation("Jackets", "Female", 204, 207) + AddNewVariation("Jackets", "Female", 210, 211) + AddNewVariation("Jackets", "Female", 214, 215) + AddNewVariation("Jackets", "Female", 227, 228) + AddNewVariation("Jackets", "Female", 239, 240) + AddNewVariation("Jackets", "Female", 242, 243) + AddNewVariation("Jackets", "Female", 259, 261) + AddNewVariation("Jackets", "Female", 265, 270) + AddNewVariation("Jackets", "Female", 271, 272) + AddNewVariation("Jackets", "Female", 274, 275) + AddNewVariation("Jackets", "Female", 276, 277) + AddNewVariation("Jackets", "Female", 292, 293) +end) + +-- And this is the master table, i put it down here since it has all the glove variations, and thats quite the eyesore. +-- You probably dont wanna touch anything down here really. +-- I generated these glove ones with a tool i made, im pretty certain its accurate, there might be native function for this. +-- If there is i wish i knew of it before i spent hours doing it this way. + +Variations = { + Jackets = {Male = {}, Female = {}}, + Hair = {Male = {}, Female = {}}, + Bags = {Male = {}, Female = {}}, + Visor = {Male = {}, Female = {}}, + Gloves = { + Male = { + [16] = 4, + [17] = 4, + [18] = 4, + [19] = 0, + [20] = 1, + [21] = 2, + [22] = 4, + [23] = 5, + [24] = 6, + [25] = 8, + [26] = 11, + [27] = 12, + [28] = 14, + [29] = 15, + [30] = 0, + [31] = 1, + [32] = 2, + [33] = 4, + [34] = 5, + [35] = 6, + [36] = 8, + [37] = 11, + [38] = 12, + [39] = 14, + [40] = 15, + [41] = 0, + [42] = 1, + [43] = 2, + [44] = 4, + [45] = 5, + [46] = 6, + [47] = 8, + [48] = 11, + [49] = 12, + [50] = 14, + [51] = 15, + [52] = 0, + [53] = 1, + [54] = 2, + [55] = 4, + [56] = 5, + [57] = 6, + [58] = 8, + [59] = 11, + [60] = 12, + [61] = 14, + [62] = 15, + [63] = 0, + [64] = 1, + [65] = 2, + [66] = 4, + [67] = 5, + [68] = 6, + [69] = 8, + [70] = 11, + [71] = 12, + [72] = 14, + [73] = 15, + [74] = 0, + [75] = 1, + [76] = 2, + [77] = 4, + [78] = 5, + [79] = 6, + [80] = 8, + [81] = 11, + [82] = 12, + [83] = 14, + [84] = 15, + [85] = 0, + [86] = 1, + [87] = 2, + [88] = 4, + [89] = 5, + [90] = 6, + [91] = 8, + [92] = 11, + [93] = 12, + [94] = 14, + [95] = 15, + [96] = 4, + [97] = 4, + [98] = 4, + [99] = 0, + [100] = 1, + [101] = 2, + [102] = 4, + [103] = 5, + [104] = 6, + [105] = 8, + [106] = 11, + [107] = 12, + [108] = 14, + [109] = 15, + [110] = 4, + [111] = 4, + [115] = 112, + [116] = 112, + [117] = 112, + [118] = 112, + [119] = 112, + [120] = 112, + [121] = 112, + [122] = 113, + [123] = 113, + [124] = 113, + [125] = 113, + [126] = 113, + [127] = 113, + [128] = 113, + [129] = 114, + [130] = 114, + [131] = 114, + [132] = 114, + [133] = 114, + [134] = 114, + [135] = 114, + [136] = 15, + [137] = 15, + [138] = 0, + [139] = 1, + [140] = 2, + [141] = 4, + [142] = 5, + [143] = 6, + [144] = 8, + [145] = 11, + [146] = 12, + [147] = 14, + [148] = 112, + [149] = 113, + [150] = 114, + [151] = 0, + [152] = 1, + [153] = 2, + [154] = 4, + [155] = 5, + [156] = 6, + [157] = 8, + [158] = 11, + [159] = 12, + [160] = 14, + [161] = 112, + [162] = 113, + [163] = 114, + [165] = 4, + [166] = 4, + [167] = 4, + }, + Female = { + [16] = 11, + [17] = 3, + [18] = 3, + [19] = 3, + [20] = 0, + [21] = 1, + [22] = 2, + [23] = 3, + [24] = 4, + [25] = 5, + [26] = 6, + [27] = 7, + [28] = 9, + [29] = 11, + [30] = 12, + [31] = 14, + [32] = 15, + [33] = 0, + [34] = 1, + [35] = 2, + [36] = 3, + [37] = 4, + [38] = 5, + [39] = 6, + [40] = 7, + [41] = 9, + [42] = 11, + [43] = 12, + [44] = 14, + [45] = 15, + [46] = 0, + [47] = 1, + [48] = 2, + [49] = 3, + [50] = 4, + [51] = 5, + [52] = 6, + [53] = 7, + [54] = 9, + [55] = 11, + [56] = 12, + [57] = 14, + [58] = 15, + [59] = 0, + [60] = 1, + [61] = 2, + [62] = 3, + [63] = 4, + [64] = 5, + [65] = 6, + [66] = 7, + [67] = 9, + [68] = 11, + [69] = 12, + [70] = 14, + [71] = 15, + [72] = 0, + [73] = 1, + [74] = 2, + [75] = 3, + [76] = 4, + [77] = 5, + [78] = 6, + [79] = 7, + [80] = 9, + [81] = 11, + [82] = 12, + [83] = 14, + [84] = 15, + [85] = 0, + [86] = 1, + [87] = 2, + [88] = 3, + [89] = 4, + [90] = 5, + [91] = 6, + [92] = 7, + [93] = 9, + [94] = 11, + [95] = 12, + [96] = 14, + [97] = 15, + [98] = 0, + [99] = 1, + [100] = 2, + [101] = 3, + [102] = 4, + [103] = 5, + [104] = 6, + [105] = 7, + [106] = 9, + [107] = 11, + [108] = 12, + [109] = 14, + [110] = 15, + [111] = 3, + [112] = 3, + [113] = 3, + [114] = 0, + [115] = 1, + [116] = 2, + [117] = 3, + [118] = 4, + [119] = 5, + [120] = 6, + [121] = 7, + [122] = 9, + [123] = 11, + [124] = 12, + [125] = 14, + [126] = 15, + [127] = 3, + [128] = 3, + [132] = 129, + [133] = 129, + [134] = 129, + [135] = 129, + [136] = 129, + [137] = 129, + [138] = 129, + [139] = 130, + [140] = 130, + [141] = 130, + [142] = 130, + [143] = 130, + [144] = 130, + [145] = 130, + [146] = 131, + [147] = 131, + [148] = 131, + [149] = 131, + [150] = 131, + [151] = 131, + [152] = 131, + [154] = 153, + [155] = 153, + [156] = 153, + [157] = 153, + [158] = 153, + [159] = 153, + [160] = 153, + [162] = 161, + [163] = 161, + [164] = 161, + [165] = 161, + [166] = 161, + [167] = 161, + [168] = 161, + [169] = 15, + [170] = 15, + [171] = 0, + [172] = 1, + [173] = 2, + [174] = 3, + [175] = 4, + [176] = 5, + [177] = 6, + [178] = 7, + [179] = 9, + [180] = 11, + [181] = 12, + [182] = 14, + [183] = 129, + [184] = 130, + [185] = 131, + [186] = 153, + [187] = 0, + [188] = 1, + [189] = 2, + [190] = 3, + [191] = 4, + [192] = 5, + [193] = 6, + [194] = 7, + [195] = 9, + [196] = 11, + [197] = 12, + [198] = 14, + [199] = 129, + [200] = 130, + [201] = 131, + [202] = 153, + [203] = 161, + [204] = 161, + [206] = 3, + [207] = 3, + [208] = 3, + } + } +} \ No newline at end of file diff --git a/resources/dpclothing/Locale/de.lua b/resources/dpclothing/Locale/de.lua new file mode 100644 index 000000000..d8ea1bd82 --- /dev/null +++ b/resources/dpclothing/Locale/de.lua @@ -0,0 +1,53 @@ +Locale.de = { --Translated by @Naifen-Phoxidas + AlreadyWearing = "Sie tragen bereits diese Kleidung.", + Bag = "Rucksack", + Bag2 = "Öffne oder schliesse dein Rucksack.", + Bracelet = "Armband", + Ear = "Ohr", + Ear2 = "Ohrzubehör", + Glasses = "Brille", + Gloves = "Handschuhe", + Hair = "Haar", + Hair2 = "Legen Sie Ihre Haare hoch/runter und offen/Pferdeschwanz.", + Hat = "Hut", + Info = "Info", + Information = "Wenn die Schaltfläche blau ist, haben Sie ein gespeichertes Element.", + Mask = "Maske", + Neck = "Hals", + Neck2 = "Halszubehör", + NotAllowedPed = "Dieses Ped-Modell erlaubt diese Option nicht.", + NothingToRemove = "Sie können zurzeit nichts entfernen.", + NoVariants = "Es scheint keine Varianten dafür zu geben.", + Pants = "Hose", + PleaseWait = "Bitte warten...", + Shirt = "Hemd", + Shoes = "Schuhe", + TakeOffOn = "Ziehe %s aus/an.", + Top = "Oberteil", + Top2 = "Hemd Variante verändern.", + Vest = "Weste", + Visor = "Visier", + Visor2 = "Hut Variante verändern.", + Watch = "Uhr", + NoShirtOn = "Sie können dies nicht ohne Ihr Hemd tun.", + Reset = "Revert", + Reset2 = "Alles wieder in den Normalzustand zurückversetzen", + -- Commands + BAG = "rucksack", + BRACELET = "armband", + EAR = "ohr", + GLASSES = "brille", + GLOVES = "handschuhe", + HAIR = "haar", + HAT = "hut", + MASK = "maske", + NECK = "hals", + SHOES = "schuhe", + TOP = "oberteil", + VEST = "weste", + VISOR = "visier", + WATCH = "uhr", + PANTS = "hose", + SHIRT = "hemd", + RESET = "revertclothing", +} diff --git a/resources/dpclothing/Locale/en.lua b/resources/dpclothing/Locale/en.lua new file mode 100644 index 000000000..2e06504a8 --- /dev/null +++ b/resources/dpclothing/Locale/en.lua @@ -0,0 +1,53 @@ +Locale.en = { + AlreadyWearing = "You are already wearing that.", + Bag = "Bag", + Bag2 = "Opens or closes your bag.", + Bracelet = "Bracelet", + Ear = "Ear", + Ear2 = "ear accessory", + Glasses = "Glasses", + Gloves = "Gloves", + Hair = "Hair", + Hair2 = "Put your hair up/down/in a bun/ponytail.", + Hat = "Hat", + Info = "Info", + Information = "If the button is blue, you have a saved item.", + Mask = "Mask", + Neck = "Neck", + Neck2 = "neck accessory", + NotAllowedPed = "This ped model does not allow for this option.", + NothingToRemove = "You dont appear to have anything to remove.", + NoVariants = "There dont seem to be any variants for this.", + Pants = "Pants", + PleaseWait = "Please wait...", + Shirt = "Shirt", + Shoes = "Shoes", + TakeOffOn = "Take your %s off/on.", + Top = "Top", + Top2 = "Toggle shirt variation.", + Vest = "Vest", + Visor = "Visor", + Visor2 = "Toggle hat variation.", + Watch = "Watch", + NoShirtOn = "You cannot do this without your shirt on.", + Reset = "Revert", + Reset2 = "Revert everything back to normal.", + -- Commands + BAG = "bag", + BRACELET = "bracelet", + EAR = "ear", + GLASSES = "glasses", + GLOVES = "gloves", + HAIR = "hair", + HAT = "hat", + MASK = "mask", + NECK = "neck", + SHOES = "shoes", + TOP = "top", + VEST = "vest", + VISOR = "visor", + WATCH = "watch", + PANTS = "pants", + SHIRT = "shirt", + RESET = "revertclothing", +} \ No newline at end of file diff --git a/resources/dpclothing/Locale/es.lua b/resources/dpclothing/Locale/es.lua new file mode 100644 index 000000000..aab36df6c --- /dev/null +++ b/resources/dpclothing/Locale/es.lua @@ -0,0 +1,56 @@ +Locale.es = { + AlreadyWearing = "Ya estás usando eso.", + Bag = "Bolsa", + Bag2 = "Abre o cierra tu bolsa", + Bracelet = "Pulsera", + Ear = "Oreja", + Ear2 = "accesorio para el oído", + Glasses = "Gafas", + Gloves = "Guantes", + Hair = "Cabello", + Hair2 = "Pon tu cabello arriba/abajo en un moño/cola de caballo.", + Hat = "Sombrero", + Info = "Info", + Information = "Si el botón es azul, tienes un elemento guardado.", + Mask = "Máscara", + Neck = "Cuello", + Neck2 = "accesorio de cuello", + NotAllowedPed = "Este modelo de personaje no permite esta opción.", + NothingToRemove = "No parece que tengas nada que quitarte.", + NoVariants = "No parece haber ninguna variante para esto.", + Pants = "Pantalones", + PleaseWait = "Por favor, espere...", + Shirt = "Camisa", + Shoes = "Zapatos", + TakeOffOn = "Toma tus %s off/on.", + Top = "Chaqueta", + Top2 = "Variación de la camisa de cambio.", + Vest = "Chaleco", + Visor = "Visor", + Visor2 = "Variación del sombrero.", + Watch = "Vigilar", + NoShirtOn = "No puedes hacer esto sin tu camisa.", + Reset = "Revertir", + Reset2 = "Volver todo a la normalidad", + -- Comandos + BAG = "bolsa", + BRACELET = "brazalete", + EAR = "ear", + GLASSES = "gafas", + GLOVES = "guantes", + HAIR = "pelo", + HAT = "hat", + MASK = "máscara", + NECK = "cuello", + SHOES = "zapatos", + TOP = "chaqueta", + VEST = "chaleco", + VISOR = "visor", + WATCH = "mira", + PANTS = "pantalones", + SHIRT = "camisa", + RESET = "revertir", +} + +-- Generated with DeepL +-- I dont speak spanish so contributions are encouraged! \ No newline at end of file diff --git a/resources/dpclothing/Locale/fr.lua b/resources/dpclothing/Locale/fr.lua new file mode 100644 index 000000000..6668b0f76 --- /dev/null +++ b/resources/dpclothing/Locale/fr.lua @@ -0,0 +1,56 @@ +Locale.fr = { + AlreadyWearing = "Vous portez déjà cela.", + Bag = "Sac", + Bag2 = "Ouvrez ou fermez votre sac.", + Bracelet = "Bracelet", + Ear = "Oreille", + Ear2 = "accessoire pour l'oreille", + Glasses = "Lunettes", + Gloves = "Gants", + Hair = "Cheveux", + Hair2 = "Mettez vos cheveux en haut/en bas/en chignon/en queue de cheval.", + Hat = "Chapeau", + Info = "Info", + Information = "Si le bouton est grisé, vous avez un objet enregistré.", + Mask = "Masque", + Neck = "Cou", + Neck2 = "accessoire pour le cou", + NotAllowedPed = "Ce modèle de caractère ne permet pas cette option", + NothingToRemove = "Vous ne semblez pas avoir de choses à enlever.", + NoVariants = "Il ne semble pas y avoir de variantes pour cela.", + Pants = "Pantalons", + PleaseWait = "S'il vous plaît, attendez...", + Shirt = "Chemise", + Shoes = "Chaussures", + TakeOffOn = "Enlevez vos %s off/on.", + Top = "Veste", + Top2 = "Variation de la chemise à bascule.", + Vest = "Gilet", + Visor = "Visière", + Visor2 = "Variation du chapeau à bascule.", + Watch = "Regarder", + NoShirtOn = "Vous ne pouvez pas le faire sans votre chemise.", + Reset = "Retour", + Reset2 = "Tout revenir à la normale.", + -- Commandes + BAG = "sac", + BRACELET = "bracelet", + EAR = "ear", + GLASSES = "lunettes", + GLOVES = "gants", + HAIR = "cheveux", + HAT = "hat", + MASK = "masque", + NECK = "cou", + SHOES = "chaussures", + TOP = "veste", + VEST = "gilet", + VISOR = "visor", + WATCH = "voir", + PANTS = "pantalons", + SHIRT = "chemise", + RESET = "retour", +} + +-- Generated with DeepL +-- I dont speak french so contributions are encouraged! \ No newline at end of file diff --git a/resources/dpclothing/README.md b/resources/dpclothing/README.md new file mode 100644 index 000000000..db06fe80a --- /dev/null +++ b/resources/dpclothing/README.md @@ -0,0 +1,2 @@ +https://forum.cfx.re/t/dpclothing-1-0-0-clothing-variations-and-toggles-gloves-vest-top-hair-bag-and-more/1326317 +Read the cfx.re post for more information! diff --git a/resources/dpclothing/fxmanifest.lua b/resources/dpclothing/fxmanifest.lua new file mode 100644 index 000000000..10aed4f9a --- /dev/null +++ b/resources/dpclothing/fxmanifest.lua @@ -0,0 +1,14 @@ +fx_version 'bodacious' +game 'gta5' +author 'dullpear' +version '1.0.0' +description 'dpClothing+' + +client_scripts { + 'Client/Functions.lua', -- Global Functions / Events / Debug and Locale start. + 'Locale/*.lua', -- Locales. + 'Client/Config.lua', -- Configuration. + 'Client/Variations.lua', -- Variants, this is where you wanan change stuff around most likely. + 'Client/Clothing.lua', + 'Client/GUI.lua', -- The GUI. +} \ No newline at end of file diff --git a/resources/dpclothing/stream/dp_clothing.ytd b/resources/dpclothing/stream/dp_clothing.ytd new file mode 100644 index 000000000..0f8105cee --- /dev/null +++ b/resources/dpclothing/stream/dp_clothing.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80850d688b4350928c1448b055b27d423662bda858501e0efa8cf875081cbc33 +size 53531 diff --git a/resources/dpclothing/stream/dp_wheel.ytd b/resources/dpclothing/stream/dp_wheel.ytd new file mode 100644 index 000000000..4c9f8afc2 --- /dev/null +++ b/resources/dpclothing/stream/dp_wheel.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c349d972a7baa7d0aaf2db0d33a631839723f26762917fab44fdbb70db49881 +size 56212 diff --git a/resources/els-fivem/.github/ISSUE_TEMPLATE/bug_report.md b/resources/els-fivem/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..7274510a9 --- /dev/null +++ b/resources/els-fivem/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,25 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**ELS Information:** +Version #: +Server Version #: +Screenshots of Config.lua, vcf.lua, vcf folder: + +**Additional context** +Add any other context about the problem here. diff --git a/resources/els-fivem/LICENSE b/resources/els-fivem/LICENSE new file mode 100644 index 000000000..94a9ed024 --- /dev/null +++ b/resources/els-fivem/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +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. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/resources/els-fivem/README.md b/resources/els-fivem/README.md new file mode 100644 index 000000000..6921db637 --- /dev/null +++ b/resources/els-fivem/README.md @@ -0,0 +1,8 @@ +### Master branch is now considered development work. Use the releases tab for stable builds. +https://discord.gg/GUvNXNe + +**Default Controls** +https://github.com/MrDaGree/ELS-FiveM/wiki/Controls + +**Installation Guide** +https://youtu.be/5-NGCLjew64 diff --git a/resources/els-fivem/__resource.lua b/resources/els-fivem/__resource.lua new file mode 100644 index 000000000..8aebf50c1 --- /dev/null +++ b/resources/els-fivem/__resource.lua @@ -0,0 +1,23 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +description 'ELS FiveM' + +version '1.7' + +client_script { + 'vcf.lua', + 'config.lua', + 'client/util.lua', + 'client/client.lua', + 'client/_patternTypes/leds.lua', + 'client/_patternTypes/traf.lua', + 'client/_patternTypes/chp.lua', + 'client/patterns.lua' +} + +server_script { + 'vcf.lua', + 'config.lua', + 'server/server.lua', + 'server/xml.lua' +} \ No newline at end of file diff --git a/resources/els-fivem/client/_patternTypes/chp.lua b/resources/els-fivem/client/_patternTypes/chp.lua new file mode 100644 index 000000000..45b781d0f --- /dev/null +++ b/resources/els-fivem/client/_patternTypes/chp.lua @@ -0,0 +1,99 @@ +chp_StageOne = { + [1] = { + [1] = "0000000000000000000000000000000000000000000000000000000000000000000000000000000", + [2] = "0000000000000000000000000000000000000000000000000000000000000000000000000000000", + [3] = "0000000000000000000000000000000000000000000000000000000000000000000000000000000", + [4] = "0000000000000000000000000000000000000000000000000000000000000000000000000000000", + [5] = "0000000000000000000000000000000000000000000000000000000000000000000000000000000", + [6] = "0000000000000000000000000000000000000000000000000000000000000000000000000000000", + [7] = "0000000000000000000011111111111111111111000000000000000000011111111111111111111", + [8] = "0000000000000000000000000000000000000000000000000000000000000000000000000000000", + [9] = "1111111111111111111100000000000000000001111111111111111111100000000000000000000", + [10] = "1111111111111111111111111111111111111111111111111111111111111111111111111111111", + [11] = "0000000000000000000000000000000000000000000000000000000000000000000000000000000", + } +} + +chp_StageTwo = { + [1] = { + [1] = "111111111111111111111111111111111111111111111111111111111111111111111111", + [2] = "000000000000000000000000000000000000000000000000000000000000000000000000", + [3] = "11111111111111111111111111111111111111111111111111111111111111111111111111", + [4] = "000000000000000000000000000000000000000000000000000000000000000000000000", + [5] = "000000000000000000000000000000000000000000000000000000000000000000000000", + [6] = "000000000000000000000000000000000000000000000000000000000000000000000000", + [7] = "111111111111111110000000000000000001111111111111111100000000000000000000", + [8] = "111111111110000000000000000000111111111111111110000000000000000000111111", + [9] = "111111000000000000000000111111111111111110000000000000000000111111111111", + [10] = "111111111111111111111111111111111111111111111111111111111111111111111111", + [11] = "000000000000000000000000000000000000000000000000000000000000000000000000", + }, + [2] = { + [1] = "00000000000000000000000000000000000000000000000000000000000000000000000000", + [2] = "00000000000000000000000000000000000000000000000000000000000000000000000000", + [3] = "11111111111111111111111111111111111111111111111111111111111111111111111111", + [4] = "11111111111111111111111111111111111111111111111111111111111111111111111111", + [5] = "00000000000000000000000000000000000000000000000000000000000000000000000000", + [6] = "00000000000000000000000000000000000000000000000000000000000000000000000000", + [7] = "11111111111111111000000000000000000001111111111111111100000000000000000000", + [8] = "00000011111111111111111000000000000000000001111111111111111100000000000000", + [9] = "00000000000111111111111111111000000000000000000001111111111111111100000000", + [10] = "11111111111111111111111111111111111111111111111111111111111111111111111111", + [11] = "00000000000000000000000000000000000000000000000000000000000000000000000000", + }, + [3] = { + [1] = "1111111111111111111111111111111111111111111111111111", + [2] = "0000000000000000000000000000000000000000000000000000", + [3] = "1111111111111111111111111111111111111111111111111111", + [4] = "1111111111111111111111111111111111111111111111111111", + [5] = "0000000000000000000000000000000000000000000000000000", + [6] = "0000000000000000000000000000000000000000000000000000", + [7] = "1111111111110000000000000011111111111100000000000000", + [8] = "1111110000000000000011111111111100000000000000111111", + [9] = "1111111111110000000000000011111111111100000000000000", + [10] = "1111111111111111111111111111111111111111111111111111", + [11] = "0000000000000000000000000000000000000000000000000000", + } +} + +chp_StageThree = { + [1] = { + [1] = "0000000000000000001111111111111111110000000000000000000011111111111111111111", + [2] = "0000000000000000000000000000000000000000000000000000000000000000000000000000", + [3] = "1111111111111111110000000000000000001111111111111111111100000000000000000000", + [4] = "0000000000000000001111111111111111110000000000000000000011111111111111111111", + [5] = "0000000000000000001111111111111111110000000000000000000011111111111111111111", + [6] = "1111111111111111110000000000000000001111111111111111111100000000000000000000", + [7] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [8] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [9] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [10] = "000000000000000000000000000000000000000000000000000000000000000000000000000000", + [11] = "0000000000000000000000000000000000000000000000000000000000000000000000000000", + }, + [2] = { + [1] = "000000000000000000001111111111111111111100000000000000000011111111111111111111", + [2] = "000000000000000000000000000000000000000000000000000000000000000000000000000000", + [3] = "111111111111111111110000000000000000000011111111111111111100000000000000000000", + [4] = "000000000000000000001111111111111111111100000000000000000011111111111111111111", + [5] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [6] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [7] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [8] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [9] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [10] = "000000000000000000000000000000000000000000000000000000000000000000000000000000", + [11] = "000000000000000000000000000000000000000000000000000000000000000000000000000000", + }, + [3] = { + [1] = "000000000000000000111111111111111111110000000000000000000011111111111111111111", + [2] = "000000000000000000000000000000000000000000000000000000000000000000000000000000", + [3] = "111111111111111111000000000000000000001111111111111111111100000000000000000000", + [4] = "000000000000000000111111111111111111110000000000000000000011111111111111111111", + [5] = "000000000000000000000000000000000000000000000000000000000000000000000000000000", + [6] = "000000000000000000000000000000000000000000000000000000000000000000000000000000", + [7] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [8] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [9] = "111111111111111111111111111111111111111111111111111111111111111111111111111111", + [10] = "000000000000000000000000000000000000000000000000000000000000000000000000000000", + [11] = "000000000000000000000000000000000000000000000000000000000000000000000000000000", + } +} \ No newline at end of file diff --git a/resources/els-fivem/client/_patternTypes/leds.lua b/resources/els-fivem/client/_patternTypes/leds.lua new file mode 100644 index 000000000..4dbf11c69 --- /dev/null +++ b/resources/els-fivem/client/_patternTypes/leds.lua @@ -0,0 +1,1760 @@ +led_PrimaryPatterns = { + [1] = { + [1] = "00001110110011011000000000000110110000", + [2] = "00001110110011011000000000000110110000", + [3] = "10110000000000000110110011011000000000", + [4] = "10110000000000000110110011011000000000", + }, + [2] = { + [1] = "0000000001101100110110000000000001101100110110000000000000", + [2] = "1100110110000000000001101100110110000000000001101100110111", + [3] = "1100110110000000000001101100110110000000000001101100110111", + [4] = "0000000001101100110110000000000001101100110110000000000000", + }, + [3] = { + [1] = "110011011000000000000110110011011000000000000", + [2] = "000000000110110011011000000000000110110011011", + [3] = "110011011000000000000110110011011000000000000", + [4] = "000000000110110011011000000000000110110011011", + }, + [4] = { + [1] = "1101100110110000000000001100110000111011", + [2] = "1101100110110000000000001100110000111011", + [3] = "1101100110110000000000001100110000111011", + [4] = "1101100110110000000000001100110000111011", + }, + [5] = { + [1] = "000000000000001100101011111100000000000000", + [2] = "000000000000001100101011111100000000000000", + [3] = "110010101111110000000000000011001010111111", + [4] = "110010101111110000000000000011001010111111", + }, + [6] = { + [1] = "11001010111111000000000000001100101011111100000000000000", + [2] = "00000000000000110010101111110000000000000011001010111111", + [3] = "00000000000000110010101111110000000000000011001010111111", + [4] = "11001010111111000000000000001100101011111100000000000000", + }, + [7] = { + [1] = "000000000000001100101011111100000000000000", + [2] = "110010101111110000000000000011001010111111", + [3] = "000000000000001100101011111100000000000000", + [4] = "110010101111110000000000000011001010111111", + }, + [8] = { + [1] = "00000000000000011001010111111000000000000000110010101111111", + [2] = "00000000000000011001010111111000000000000000110010101111111", + [3] = "00000000000000011001010111111000000000000000110010101111111", + [4] = "00000000000000011001010111111000000000000000110010101111111", + }, + [9] = { + [1] = "00000000001111001111000000000011110011111000000000000", + [2] = "00000000001111001111000000000011110011111000000000000", + [3] = "11000011110000000000110000111100000000000110000111111", + [4] = "11000011110000000000110000111100000000000110000111111", + }, + [10] = { + [1] = "1100001111000000000011000011110000000000", + [2] = "0000000000111100111100000000001111001111", + [3] = "0000000000111100111100000000001111001111", + [4] = "1100001111000000000011000011110000000000", + }, + [11] = { + [1] = "10011110000000000001111001111000000000011110011110000000000011111", + [2] = "00000001100001111110000000000110000111100000000001100000111100000", + [3] = "00011110000000000001111001111000000000011110011110000000000011111", + [4] = "10000001100001111110000000000110000111100000000001100000111100000", + }, + [12] = { + [1] = "10011110000000000111100111100000000001111110001111100000000001111001111000000000000011110001111101", + [2] = "00011110000000000111100111100000000001111110001111100000000001111001111000000000000011110001111101", + [3] = "10011110000000000111100111100000000001111110001111100000000001111001111000000000000011110001111100", + [4] = "00011110000000000111100111100000000001111110001111100000000001111001111000000000000011110001111100", + }, + [13] = { + [1] = "000000000011011100000000011011100000000001101111", + [2] = "000000000011011100000000011011100000000001101111", + [3] = "001101110000000000110111000000000110111100000000", + [4] = "001101110000000000110111000000000110111100000000", + }, + [14] = { + [1] = "00000110111000000000110111000000000110111000000000110111000000000011101111000000000001101111000000000011000", + [2] = "11100000000011011100000000011011100000000011011100000000001101110000000000011011110000000000011101110000000", + [3] = "11100000000011011100000000011011100000000011011100000000001101110000000000011011110000000000011101110000000", + [4] = "00000110111000000000110111000000000110111000000000110111000000000011101111000000000001101111000000000011000", + }, + [15] = { + [1] = "11100000000011011100000000011011100000000011011100000000011011110000000000110011100000000000110111000000000011011100000000011101110000000001100111000001", + [2] = "00000110111000000000110111000000000110111000000000110111000000000011011110000000000111011110000000001101111000000000110111000000000011011100000000001101", + [3] = "11100000000011011100000000011011100000000011011100000000011011110000000000110011100000000000110111000000000011011100000000011101110000000001100111000001", + [4] = "00000110111000000000110111000000000110111000000000110111000000000011011110000000000111011110000000001101111000000000110111000000000011011100000000001101", + }, + [16] = { + [1] = "110000000001101110000000000110111000000000011011100000000000011001110000000001101110000000000011011100000000000110011100000000000011101111000001", + [2] = "110000000001101110000000000110111000000000011011100000000000011001110000000001101110000000000011011100000000000110011100000000000011101111000001", + [3] = "110000000001101110000000000110111000000000011011100000000000011001110000000001101110000000000011011100000000000110011100000000000011101111000000", + [4] = "110000000001101110000000000110111000000000011011100000000000011001110000000001101110000000000011011100000000000110011100000000000011101111000000", + }, + [17] = { + [1] = "00000011010000000011010000001101000000110100000011010000001101000000001101100000000111010000001101000000110100000011010000001101000000011011000000011001000000110010000000", + [2] = "00000011010000000011010000001101000000110100000011010000001101000000001101100000000111010000001101000000110100000011010000001101000000011011000000011001000000110010000001", + [3] = "01101000000111011000000110100000011010000001101000000110100000001101000000001111010000000110100000011010000001101000000110100000011101000000001101000000011010000000111101", + [4] = "01101000000111011000000110100000011010000001101000000110100000001101000000001111010000000110100000011010000001101000000110100000011101000000001101000000011010000000111100", + }, + [18] = { + [1] = "001101000000011010000000001101000000110100000001101000000011010000001101000000110100000011010000000111010000001101000000011010000000110110001", + [2] = "100000011101000000111100100000011010000001110100000011010000000110100000011010000001101000000110010000000110100000011101000000110110000000000", + [3] = "100000011101000000111100100000011010000001110100000011010000000110100000011010000001101000000110010000000110100000011101000000110110000000001", + [4] = "001101000000011010000000001101000000110100000001101000000011010000001101000000110100000011010000000111010000001101000000011010000000110110000", + }, + [19] = { + [1] = "00000011001100000001101000000110100000011010000000111010000000110100000000110100000011011000000110100000011101000000011011", + [2] = "01101000000000110100000011010000001101000000110110000000110010000001101100000001101000000011010000001101000000001101000000", + [3] = "00000011001100000001101000000110100000011010000000111010000000110100000000110100000011011000000110100000011101000000011011", + [4] = "01101000000000110100000011010000001101000000110110000000110010000001101100000001101000000011010000001101000000001101000000", + }, + [20] = { + [1] = "11010000001101000000", + [2] = "11010000001101000000", + [3] = "11010000001101000000", + [4] = "11010000001101000000", + }, + [21] = { + [1] = "00000000000000011001011111100000000000001100101111111100000000000000011000110011111110000000000001100101111110000000000000000110001011111110000000000000", + [2] = "00000000000000011001011111100000000000001100101111111100000000000000011000110011111110000000000001100101111110000000000000000110001011111110000000000000", + [3] = "11000101111111100000000000011001011111110000000000000011000100111111100000000000000001100101111110000000000001100100111111111000000000000001110010111111", + [4] = "11000101111111100000000000011001011111110000000000000011000100111111100000000000000001100101111110000000000001100100111111111000000000000001110010111111", + }, + [22] = { + [1] = "000000001100101111110000000000001100101111111000000000000110001011111111000000000000011001011111110000000000001100010111111100000000000001100", + [2] = "101111110000000000001100101111110000000000000110010111111000000000000000110011011111100000000000001100101111110000000000000011001101111110000", + [3] = "101111110000000000001100101111110000000000000110010111111000000000000000110011011111100000000000001100101111110000000000000011001101111110000", + [4] = "000000001100101111110000000000001100101111111000000000000110001011111111000000000000011001011111110000000000001100010111111100000000000001100", + }, + [23] = { + [1] = "0000000000000011001011111100000000000001110001011111100000000000000011001011111100000000000001111001001111111100000000000001100110111111000000000000001110010011111110000000000000011000110011111100", + [2] = "1110010111111100000000000011001001111110000000000000011001101111111100000000000011001011111110000000000000000011001001111110000000000000110010111111110000000000000001100110111111100000000000000000", + [3] = "0000000000000011001011111100000000000001110001011111100000000000000011001011111100000000000001111001001111111100000000000001100110111111000000000000001110010011111110000000000000011000110011111100", + [4] = "1110010111111100000000000011001001111110000000000000011001101111111100000000000011001011111110000000000000000011001001111110000000000000110010111111110000000000000001100110111111100000000000000000", + }, + [24] = { + [1] = "1011111100000000000000110010111111000000000000111100101111110000000000000011000101111111100000000000000110001001111111100000000000000110001101111111000000000000000011001001111111", + [2] = "1011111100000000000000110010111111000000000000111100101111110000000000000011000101111111100000000000000110001001111111100000000000000110001101111111000000000000000011001001111111", + [3] = "1011111100000000000000110010111111000000000000111100101111110000000000000011000101111111100000000000000110001001111111100000000000000110001101111111000000000000000011001001111111", + [4] = "1011111100000000000000110010111111000000000000111100101111110000000000000011000101111111100000000000000110001001111111100000000000000110001101111111000000000000000011001001111111", + }, + [25] = { + [1] = "11011011011000000000000000000111011001101100111100000000000000000111101100110111011100000000000000000000001110011001101111011000000000000000000111011101101101110000000000000000000", + [2] = "11011011011000000000000000000111011001101100111100000000000000000111101100110111011100000000000000000000001110011001101111011000000000000000000111011101101101110000000000000000000", + [3] = "00000000000011011110110110110000000000000000000001110110110110110000000000000000000000110111011101111011000000000000000000000011100110110110110000000000000000000110110110111011100", + [4] = "00000000000011011110110110110000000000000000000001110110110110110000000000000000000000110111011101111011000000000000000000000011100110110110110000000000000000000110110110111011100", + }, + [26] = { + [1] = "00000000000001101101101101100000000000000000011100110110011011000000000000000000110111001101110111000000", + [2] = "01101101101100000000000000001101101101100111000000000000000000011011101101100110000000000000000000011000", + [3] = "01101101101100000000000000001101101101100111000000000000000000011011101101100110000000000000000000011000", + [4] = "00000000000001101101101101100000000000000000011100110110011011000000000000000000110111001101110111000000", + }, + [27] = { + [1] = "110110110110000000000000000110110111011011000000000000000000110110110111011000000000000000000011011001110110111100000000000000000000011011011011011000000000000000000110111001111011101100000000000", + [2] = "000000000000110110110110110000000000000000011011100110110110000000000000000011011011001110110000000000000000000001110011011101101110000000000000000011011001101101110000000000000000000001110110000", + [3] = "110110110110000000000000000110110111011011000000000000000000110110110111011000000000000000000011011001110110111100000000000000000000011011011011011000000000000000000110111001111011101100000000000", + [4] = "000000000000110110110110110000000000000000011011100110110110000000000000000011011011001110110000000000000000000001110011011101101110000000000000000011011001101101110000000000000000000001110110000", + }, + [28] = { + [1] = "10110110111000000000000000001101110011011011000000000000000000110110110110110000000000000000011011011011011100000000000000000110110110110110000000000000000001100110110110011100000000000000000001111", + [2] = "10110110111000000000000000001101110011011011000000000000000000110110110110110000000000000000011011011011011100000000000000000110110110110110000000000000000001100110110110011100000000000000000001111", + [3] = "10110110111000000000000000001101110011011011000000000000000000110110110110110000000000000000011011011011011100000000000000000110110110110110000000000000000001100110110110011100000000000000000001111", + [4] = "10110110111000000000000000001101110011011011000000000000000000110110110110110000000000000000011011011011011100000000000000000110110110110110000000000000000001100110110110011100000000000000000001111", + }, + [29] = { + [1] = "1100110000000000000011111001100000000000011111001100000000000001111111001110000000000000000111111000110000000000000011111110011000000", + [2] = "1100110000000000000011111001100000000000011111001100000000000001111111001110000000000000000111111000110000000000000011111110011000000", + [3] = "1100001111100011111100000000011111001111100000000011111100111110000000000001111111001111111000000000001111111001111100000000000111111", + [4] = "1100001111100011111100000000011111001111100000000011111100111110000000000001111111001111111000000000001111111001111100000000000111111", + }, + [30] = { + [1] = "00001111110001111100000000001111100111110000000000111110011111100000000000111111000011111110000000000111110000", + [2] = "00110000000000000011111100110000000000001111100011000000000000011111100111000000000000000001111110011000000000", + [3] = "00110000000000000011111100110000000000001111100011000000000000011111100111000000000000000001111110011000000000", + [4] = "00001111110001111100000000001111100111110000000000111110011111100000000000111111000011111110000000000111110000", + }, + [31] = { + [1] = "00011000000000000000111110011000000000000111110011100000000000011111110000110000000000000000111110000000", + [2] = "00000111111000111111000000000111110011111000000000011111001111100000000000001111110001111111000000000000", + [3] = "00011000000000000000111110011000000000000111110011100000000000011111110000110000000000000000111110000000", + [4] = "00000111111000111111000000000111110011111000000000011111001111100000000000001111110001111111000000000000", + }, + [32] = { + [1] = "00110000000000000011111001100000000000011111000111000000000000111111000111000000000000001111110001100000000000011", + [2] = "00110000000000000011111001100000000000011111000111000000000000111111000111000000000000001111110001100000000000011", + [3] = "00110000000000000011111001100000000000011111000111000000000000111111000111000000000000001111110001100000000000011", + [4] = "00110000000000000011111001100000000000011111000111000000000000111111000111000000000000001111110001100000000000011", + }, + [33] = { + [1] = "1111111100000000000011111111110000000000111111111110000000000000111111111111000000000001111111111111000000000000111111111110000000000011111", + [2] = "1111111100000000000011111111110000000000111111111110000000000000111111111111000000000001111111111111000000000000111111111110000000000011111", + [3] = "1111111111111111111100000000001111111111000000000001111111111111000000000000111111111110000000000000111111111111000000000001111111111100000", + [4] = "1111111111111111111100000000001111111111000000000001111111111111000000000000111111111110000000000000111111111111000000000001111111111100000", + }, + [34] = { + [1] = "11111111111111111111000000000011111111110000000000011111111111110000000000011111111111110000000000001111111111100000000000111111111111100000000000001111111111111000000000001111111", + [2] = "11111110000000000000111111111100000000001111111111100000000000001111111111100000000000001111111111110000000000011111111111000000000000011111111111110000000000000111111111110000000", + [3] = "00000000000000000000111111111100000000001111111111100000000000001111111111100000000000001111111111110000000000011111111111000000000000011111111111110000000000000111111111110000000", + [4] = "00000001111111111111000000000011111111110000000000011111111111110000000000011111111111110000000000001111111111100000000000111111111111100000000000001111111111111000000000001111111", + }, + [35] = { + [1] = "111111110000000000011111111110000000000111111111100000000000111111111111000000000000", + [2] = "000000001111111111100000000001111111111000000000011111111111000000000000111111111111", + [3] = "000000000000000000011111111110000000000111111111100000000000111111111111000000000000", + [4] = "111111111111111111100000000001111111111000000000011111111111000000000000111111111111", + }, + [36] = { + [1] = "00000000000000000001111111111100000000001111111111100000000000111111111111100000000000011111111110000000000000111111", + [2] = "11111110000000000001111111111100000000001111111111100000000000111111111111100000000000011111111110000000000000111111", + [3] = "00000000000000000001111111111100000000001111111111100000000000111111111111100000000000011111111110000000000000111111", + [4] = "11111110000000000001111111111100000000001111111111100000000000111111111111100000000000011111111110000000000000111111", + }, + [37] = { + [1] = "110000011111100000011111000001111100000111110000001111111100000001111110000001111111000000111111000", + [2] = "110000011111100000011111000001111100000111110000001111111100000001111110000001111111000000111111000", + [3] = "111111100000011111100000111110000011111000001111110000000011111110000001111110000000111111000000111", + [4] = "111111100000011111100000111110000011111000001111110000000011111110000001111110000000111111000000111", + }, + [38] = { + [1] = "0011111000001111110000001111100000111110000001111111000000111110000011111111100000011111100000000", + [2] = "0000000111110000001111110000011111000001111110000000111111000001111100000000011111100000011111111", + [3] = "1100000111110000001111110000011111000001111110000000111111000001111100000000011111100000011111111", + [4] = "1111111000001111110000001111100000111110000001111111000000111110000011111111100000011111100000000", + }, + [39] = { + [1] = "000000011111000001111100000111110000001111100000011111100000000111111000000", + [2] = "111111100000111110000011111000001111110000011111100000011111111000000111111", + [3] = "110000011111000001111100000111110000001111100000011111100000000111111000000", + [4] = "001111100000111110000011111000001111110000011111100000011111111000000111111", + }, + [40] = { + [1] = "00000001111100000111110000011111000001111100000011111110000011111100000011111100000000", + [2] = "11000001111100000111110000011111000001111100000011111110000011111100000011111100000000", + [3] = "00000001111100000111110000011111000001111100000011111110000011111100000011111100000001", + [4] = "11000001111100000111110000011111000001111100000011111110000011111100000011111100000001", + }, + [41] = { + [1] = "0011100000111100001110001110001111000111000111000111000011100001111000011100000111", + [2] = "0011100000111100001110001110001111000111000111000111000011100001111000011100000111", + [3] = "1100011111000011110001110001110000111000111000111000111100011110000111100011111000", + [4] = "1100011111000011110001110001110000111000111000111000111100011110000111100011111000", + }, + [42] = { + [1] = "1111000111000011100001110001110001110001110001110000111000111000", + [2] = "1000111000111100011110001110001110001110001110001111000111000111", + [3] = "0000111000111100011110001110001110001110001110001111000111000111", + [4] = "0111000111000011100001110001110001110001110001110000111000111000", + }, + [43] = { + [1] = "00001110001110001110001110001110001110001110000011110001110000111111000011111100001111000", + [2] = "11110001110001110001110001110001110001110001111100001110001111000000111100000011110000111", + [3] = "10001110001110001110001110001110001110001110000011110001110000111111000011111100001111000", + [4] = "01110001110001110001110001110001110001110001111100001110001111000000111100000011110000111", + }, + [44] = { + [1] = "000111000111000111000011100011110001111000111110000111100001111000111000011100011100001111100001111000011100011110", + [2] = "000111000111000111000011100011110001111000111110000111100001111000111000011100011100001111100001111000011100011110", + [3] = "000111000111000111000011100011110001111000111110000111100001111000111000011100011100001111100001111000011100011110", + [4] = "000111000111000111000011100011110001111000111110000111100001111000111000011100011100001111100001111000011100011110", + }, + [45] = { + [1] = "110110110000000000000011011011011000000000000000110111011101110000000000000001101111011011000000000000000011111111111111100000000000001111111111111000000000000111111111111000000000000000000000000000000000000", + [2] = "110110110000000000000011011011011000000000000000110111011101110000000000000001101111011011000000000000000011111111111111100000000000001111111111111000000000000111111111111000000000000000000000000000000000000", + [3] = "000000000110110011011000000000000011011011011100000000000000000011011011101100000000000000011011100111011000000000000000011111111111110000000000000111111111111000000000000111111111111111111111111111111111111", + [4] = "000000000110110011011000000000000011011011011100000000000000000011011011101100000000000000011011100111011000000000000000011111111111110000000000000111111111111000000000000111111111111111111111111111111111111", + }, + [46] = { + [1] = "000000000110110011011000000000000011011011011100000000000000000011011011101100000000000000011011100111011000000000000000011111111111110000000000000111111111111000000000000111111111111111111111111111111111111", + [2] = "110110110000000000000011011011011000000000000000110111011101110000000000000001101111011011000000000000000011111111111111100000000000001111111111111000000000000111111111111000000000000000000000000000000000000", + [3] = "110110110000000000000011011011011000000000000000110111011101110000000000000001101111011011000000000000000011111111111111100000000000001111111111111000000000000111111111111000000000000000000000000000000000000", + [4] = "000000000110110011011000000000000011011011011100000000000000000011011011101100000000000000011011100111011000000000000000011111111111110000000000000111111111111000000000000111111111111111111111111111111111111", + }, + [47] = { + [1] = "11011011000000000000011011011011000000000000001110110110110000000000000110110110110000000000000000111111111111000000000000111111111111000000000001111111111111100000000000000000000000000000001111111111111111111111111111111", + [2] = "00000000011011011011000000000000011011011011000000000000000110110110110000000000000011011001101110000000000000111111111111000000000000111111111110000000000000011111111111111111111111111111110000000000000000000000000000000", + [3] = "11011011000000000000011011011011000000000000001110110110110000000000000110110110110000000000000000111111111111000000000000111111111111000000000001111111111111100000000000000000000000000000001111111111111111111111111111111", + [4] = "00000000011011011011000000000000011011011011000000000000000110110110110000000000000011011001101110000000000000111111111111000000000000111111111110000000000000011111111111111111111111111111110000000000000000000000000000000", + }, + [48] = { + [1] = "110110110000000000000110110110110000000000000001101100110110000000000000001101110011011000000000000001111111111100000000000011111111111110000000000011111111111000000000000000000000000000000000", + [2] = "110110110000000000000110110110110000000000000001101100110110000000000000001101110011011000000000000001111111111100000000000011111111111110000000000011111111111000000000000000000000000000000000", + [3] = "110110110000000000000110110110110000000000000001101100110110000000000000001101110011011000000000000001111111111100000000000011111111111110000000000011111111111000000000000000000000000000000000", + [4] = "110110110000000000000110110110110000000000000001101100110110000000000000001101110011011000000000000001111111111100000000000011111111111110000000000011111111111000000000000000000000000000000000", + }, + [49] = { + [1] = "0000000000111111111000000000111111110000000011111110000000011111100000011111100000001111000000111000011001010011001110001111000001111100000001111110000001111111100000000001111111100000000111111111100000000011111111110000000000000", + [2] = "0000000000111111111000000000111111110000000011111110000000011111100000011111100000001111000000111000011001010011001110001111000001111100000001111110000001111111100000000001111111100000000111111111100000000011111111110000000000000", + [3] = "1111111111000000000111111111000000001111111100000001111111100000011111100000011111110000111111000111100110101100110001110000111110000011111110000001111110000000011111111110000000011111111000000000011111111100000000001111111111111", + [4] = "1111111111000000000111111111000000001111111100000001111111100000011111100000011111110000111111000111100110101100110001110000111110000011111110000001111110000000011111111110000000011111111000000000011111111100000000001111111111111", + }, + [50] = { + [1] = "1111111111000000000111111111000000000111111110000000011111111000000111111100000111110000111100011100110101100110001111000011111000000111110000000111111000000011111111000000000111111110000000000111111111110000000000111111111111", + [2] = "0000000000111111111000000000111111111000000001111111100000000111111000000011111000001111000011100011001010011001110000111100000111111000001111111000000111111100000000111111111000000001111111111000000000001111111111000000000000", + [3] = "0000000000111111111000000000111111111000000001111111100000000111111000000011111000001111000011100011001010011001110000111100000111111000001111111000000111111100000000111111111000000001111111111000000000001111111111000000000000", + [4] = "1111111111000000000111111111000000000111111110000000011111111000000111111100000111110000111100011100110101100110001111000011111000000111110000000111111000000011111111000000000111111110000000000111111111110000000000111111111111", + }, + [51] = { + [1] = "000000000011111111100000000011111111100000000111111110000000000111111000000001111111100000111100001110000011001011001111000111000011110000011111100000001111111000000001111111100000000111111111110000000000011111111110000000001111111111100000000000011111111111000000000011111111100000000111111100000001111110000001111100000111100001111000110010101100111000111100001111110000011111100000011111111000000011111111100000000011111111100000000001111111111100000000000", + [2] = "111111111100000000011111111100000000011111111000000001111111111000000111111110000000011111000011110001111100110100110000111000111100001111100000011111110000000111111110000000011111111000000000001111111111100000000001111111110000000000011111111111100000000000111111111100000000011111111000000011111110000001111110000011111000011110000111001101010011000111000011110000001111100000011111100000000111111100000000011111111100000000011111111110000000000011111111111", + [3] = "000000000011111111100000000011111111100000000111111110000000000111111000000001111111100000111100001110000011001011001111000111000011110000011111100000001111111000000001111111100000000111111111110000000000011111111110000000001111111111100000000000011111111111000000000011111111100000000111111100000001111110000001111100000111100001111000110010101100111000111100001111110000011111100000011111111000000011111111100000000011111111100000000001111111111100000000000", + [4] = "111111111100000000011111111100000000011111111000000001111111111000000111111110000000011111000011110001111100110100110000111000111100001111100000011111110000000111111110000000011111111000000000001111111111100000000001111111110000000000011111111111100000000000111111111100000000011111111000000011111110000001111110000011111000011110000111001101010011000111000011110000001111100000011111100000000111111100000000011111111100000000011111111110000000000011111111111", + }, + [52] = { + [1] = "0000000000111111111000000000111111110000000011111110000000111111100000011111000001111100000111000110010101100111000111100001111100000111111000000111111100000001111111100000000111111111000000000111111111", + [2] = "0000000000111111111000000000111111110000000011111110000000111111100000011111000001111100000111000110010101100111000111100001111100000111111000000111111100000001111111100000000111111111000000000111111111", + [3] = "0000000000111111111000000000111111110000000011111110000000111111100000011111000001111100000111000110010101100111000111100001111100000111111000000111111100000001111111100000000111111111000000000111111111", + [4] = "0000000000111111111000000000111111110000000011111110000000111111100000011111000001111100000111000110010101100111000111100001111100000111111000000111111100000001111111100000000111111111000000000111111111", + }, + [53] = { + [1] = "000000001111000000001111000000001111000000001111000000001111000000001111000000001111000000001111000000001111100000000111100000000111100000000011110000000011111000000001111000000001111000000001111", + [2] = "000000001111000000001111000000001111000000001111000000001111000000001111000000001111000000001111000000001111100000000111100000000111100000000011110000000011111000000001111000000001111000000001111", + [3] = "001111000000001111000000001111000000001111000000001111000000001111000000001111000000001111000000001111000000000111100000000111100000000111100000000011110000000001111000000001111000000001111000000", + [4] = "001111000000001111000000001111000000001111000000001111000000001111000000001111000000001111000000001111000000000111100000000111100000000111100000000011110000000001111000000001111000000001111000000", + }, + [54] = { + [1] = "0011110000000001111000000001111000000001111000000001111000000001111000000000111110000000000111100000000011110000000001111000000001111000000001111100000000111100000000011110000000001111000000000011110000000001111000000", + [2] = "0000000011110000000001111000000001111000000001111000000001111000000001111000000000011111100000000111110000000011110000000001111000000001111000000000111100000000011110000000011111000000001111100000000011111000000001111", + [3] = "0000000011110000000001111000000001111000000001111000000001111000000001111000000000011111100000000111110000000011110000000001111000000001111000000000111100000000011110000000011111000000001111100000000011111000000001111", + [4] = "0011110000000001111000000001111000000001111000000001111000000001111000000000111110000000000111100000000011110000000001111000000001111000000001111100000000111100000000011110000000001111000000000011110000000001111000000", + }, + [55] = { + [1] = "111100000000011110000000011110000000011111100000000111100000000001111000000000001111110000000011110000000011110000000011111100000000011111000000001111100000000011110000000011110000000001111000000000111100000000", + [2] = "000000011110000000011110000000011110000000000111100000000111111000000001111110000000000011110000000011110000000011110000000000111110000000001111000000000011110000000011110000000001111000000001111100000000111100", + [3] = "111100000000011110000000011110000000011111100000000111100000000001111000000000001111110000000011110000000011110000000011111100000000011111000000001111100000000011110000000011110000000001111000000000111100000000", + [4] = "000000011110000000011110000000011110000000000111100000000111111000000001111110000000000011110000000011110000000011110000000000111110000000001111000000000011110000000011110000000001111000000001111100000000111100", + }, + [56] = { + [1] = "000000001111100000000111100000000111110000000001111100000000001111000000000000011110000000000111110000000001111100000000001111000000000000111100000000011111000000000011111000000000111100000000001111110000000001111000000001111100000000011111111000000000011111000000000011110000000001111100000000", + [2] = "000000001111100000000111100000000111110000000001111100000000001111000000000000011110000000000111110000000001111100000000001111000000000000111100000000011111000000000011111000000000111100000000001111110000000001111000000001111100000000011111111000000000011111000000000011110000000001111100000000", + [3] = "000000001111100000000111100000000111110000000001111100000000001111000000000000011110000000000111110000000001111100000000001111000000000000111100000000011111000000000011111000000000111100000000001111110000000001111000000001111100000000011111111000000000011111000000000011110000000001111100000000", + [4] = "000000001111100000000111100000000111110000000001111100000000001111000000000000011110000000000111110000000001111100000000001111000000000000111100000000011111000000000011111000000000111100000000001111110000000001111000000001111100000000011111111000000000011111000000000011110000000001111100000000", + }, + [57] = { + [1] = "0000000011111111100000001111111110000000111111111000000000111111111100000001111111111110000000011111111100000000111111111111000000001111111111100000000111111111000000001111111111000000011111111111110000000011111111110000000000111111111", + [2] = "0000000011111111100000001111111110000000111111111000000000111111111100000001111111111110000000011111111100000000111111111111000000001111111111100000000111111111000000001111111111000000011111111111110000000011111111110000000000111111111", + [3] = "1111111110000000111111111000000011111111100000001111111111100000001111111111000000000011111111110000000111111111100000000011111111111000000001111111111100000001111111111000000001111111110000000000011111111111000000011111111111100000000", + [4] = "1111111110000000111111111000000011111111100000001111111111100000001111111111000000000011111111110000000111111111100000000011111111111000000001111111111100000001111111111000000001111111110000000000011111111111000000011111111111100000000", + }, + [58] = { + [1] = "111111111100000001111111110000000111111111000000011111111111000000011111111110000000111111111000000011111111100000001111111110000000", + [2] = "000000000111111111000000011111111100000001111111110000000011111111110000000011111111100000001111111110000000111111111000000011111111", + [3] = "000000000111111111000000011111111100000001111111110000000011111111110000000011111111100000001111111110000000111111111000000011111111", + [4] = "111111111100000001111111110000000111111111000000011111111111000000011111111110000000111111111000000011111111100000001111111110000000", + }, + [59] = { + [1] = "111111111000000011111111100000000011111111110000000001111111110000000111111111110000000011111111100000000011111111100000001111111110000000", + [2] = "100000001111111110000000111111111110000000011111111111000000011111111100000000011111111110000000111111111110000000111111111000000011111111", + [3] = "111111111000000011111111100000000011111111110000000001111111110000000111111111110000000011111111100000000011111111100000001111111110000000", + [4] = "100000001111111110000000111111111110000000011111111111000000011111111100000000011111111110000000111111111110000000111111111000000011111111", + }, + [60] = { + [1] = "000000011111111100000001111111110000000011111111110000000011111111100000000011111111110000000111111111100000000111111111100000000001111111111100000001111111111", + [2] = "000000011111111100000001111111110000000011111111110000000011111111100000000011111111110000000111111111100000000111111111100000000001111111111100000001111111111", + [3] = "000000011111111100000001111111110000000011111111110000000011111111100000000011111111110000000111111111100000000111111111100000000001111111111100000001111111111", + [4] = "000000011111111100000001111111110000000011111111110000000011111111100000000011111111110000000111111111100000000111111111100000000001111111111100000001111111111", + }, + [61] = { + [1] = "11001101101100000000000000110011011011000000000000000110011011101110000000000000000000", + [2] = "11001101101100000000000000110011011011000000000000000110011011101110000000000000000000", + [3] = "00000000000001100110110110000000000000011001101101110000000000000000011100011011101110", + [4] = "00000000000001100110110110000000000000011001101101110000000000000000011100011011101110", + }, + [62] = { + [1] = "000000000011001100110110000000000000011001101101100000000000000000011001101101100000000000000001100001101100111100", + [2] = "011011011000000000000000110011011011000000000000001110001100110011000000000000001100110011101100000000000000000000", + [3] = "011011011000000000000000110011011011000000000000001110001100110011000000000000001100110011101100000000000000000000", + [4] = "000000000011001100110110000000000000011001101101100000000000000000011001101101100000000000000001100001101100111100", + }, + [63] = { + [1] = "0000000000000110011011011000000000000000000110001101110110000000000000001100110110110000000000000000001110011011011", + [2] = "1100110110110000000000000001100110111001110000000000000000110001101101100000000000000110001101110011100000000000000", + [3] = "0000000000000110011011011000000000000000000110001101110110000000000000001100110110110000000000000000001110011011011", + [4] = "1100110110110000000000000001100110111001110000000000000000110001101101100000000000000110001101110011100000000000000", + }, + [64] = { + [1] = "00000000000000110011011011000000000000000001100111011011000000000000000001100110111011000000000000000110011011011", + [2] = "00000000000000110011011011000000000000000001100111011011000000000000000001100110111011000000000000000110011011011", + [3] = "00000000000000110011011011000000000000000001100111011011000000000000000001100110111011000000000000000110011011011", + [4] = "00000000000000110011011011000000000000000001100111011011000000000000000001100110111011000000000000000110011011011", + }, + [65] = { + [1] = "11011011000000000110110110110000000001101101101100000000000011110110111011000000000001101101101100000000", + [2] = "11011011000000000110110110110000000001101101101100000000000011110110111011000000000001101101101100000000", + [3] = "00000011011011011000000000110110110110000000001100110111011100000000000011011011101110000000001101110110", + [4] = "00000011011011011000000000110110110110000000001100110111011100000000000011011011101110000000001101110111", + }, + [66] = { + [1] = "11011011011000000000110110111011000000000110110110111100000000001101101101100000000000011011011011000000000011", + [2] = "11000000000110110110110000000000110110110110000000000011101101101100000000011101101110011000000000111011011011", + [3] = "11000000000110110110110000000000110110110110000000000011101101101100000000011101101110011000000000111011011011", + [4] = "11011011011000000000110110111011000000000110110110111100000000001101101101100000000000011011011011000000000011", + }, + [67] = { + [1] = "011011011000000000110110110111000000000111011011011000000000110110111011000000000011011101101100000000000111011011011000000000011101101101100001", + [2] = "111111111011011011000000000111011011011000000000011011011011000000000011011001101100000000001101100111011000000000011011001101100000000001101111", + [3] = "011011011000000000110110110111000000000111011011011000000000110110111011000000000011011101101100000000000111011011011000000000011101101101100000", + [4] = "000000011011011011000000000111011011011000000000011011011011000000000011011001101100000000001101100111011000000000011011001101100000000001101100", + }, + [68] = { + [1] = "11000000000010100111100000000001010111110000000000010100111110000000000000101001111100000000000001101001111000000000000101011110000000000000011000", + [2] = "11101111100111100001110111110011110001111011111000111100000111011111100011111000001110111111100011111000011101111111001111000111101111111100111111", + [3] = "00010000011000011110001000001100001110000100000111000011111000100000011100000111110001000000011100000111100010000000110000111000010000000011000011", + [4] = "00010101111000000000001010111100000000000101011111000000000000101001111100000000000001011001111100000000000010110111110000000000010011011111000000", + }, + [69] = { + [1] = "000000001111111001100111111110001111111001100111111111100011111111100110001111111110001111111100110011111111111000011111111100011100111111111100001111111110011001111111111000000111111110011100111111110000111111110011001111111100011111111001100111111111110001111111001100011111111000111111100011000111", + [2] = "001101101111110000000011001101101111110000000011110011011011111111000000000110011101101111111000000000110000110110011111111000000000011100111011101111111100000000110011100111100111111100000000011001101110111111100000000110011011011111110000000001100011101101111110000000001100110110111111000000000011", + [3] = "001101101111110000000011001101101111110000000011110011011011111111000000000110011101101111111000000000110000110110011111111000000000011100111011101111111100000000110011100111100111111100000000011001101110111111100000000110011011011111110000000001100011101101111110000000001100110110111111000000000011", + [4] = "000000001111111001100111111110001111111001100111111111100011111111100110001111111110001111111100110011111111111000011111111100011100111111111100001111111110011001111111111000000111111110011100111111110000111111110011001111111100011111111001100111111111110001111111001100011111111000111111100011000111", + }, + [70] = { + [1] = "00000000000000000000000000001101100000000000000000000000000000011011000000000000000000000000000001110110000000000000000000000000000000000000001110011100000", + [2] = "00000000000000001101110000000000000000000000000000011011100000000000000000000000000001101110000000000000000000000000000000001110011111000000000000000000000", + [3] = "00000000000000001101110000000000000000000000000000011011100000000000000000000000000001101110000000000000000000000000000000001110011111000000000000000000000", + [4] = "01101100000000000000000000000000001101110000000000000000000000000000011011000000000000000000000000000000111011000000000000000000000000000000000000000000111", + }, + [71] = { + [1] = "0000000000011110000000001110000000000111000000000000111111000000000001111000000000000111000000000000111100000000000001111000000000000111000000000001111", + [2] = "0000000111111110000000111110000000011111000000000111111111000000001111111000000001111111000000000011111100000000001111111000000000111111000000001111111", + [3] = "0000000111111110000000111110000000011111000000000111111111000000001111111000000001111111000000000011111100000000001111111000000000111111000000001111111", + [4] = "0000000000011110000000001110000000000111000000000000111111000000000001111000000000000111000000000000111100000000000001111000000000000111000000000001111", + }, + [72] = { + [1] = "000000000000000111111111111111111111100001110000000000000001111111111111111111100000011000000000000000000111111111111111111100011", + [2] = "000000111111111111111111100000000000000001110000000111111111111111111000000000000000011000000001111111111111111111000000000000011", + [3] = "000000111111111111111111100000000000000001110000000111111111111111111000000000000000011000000001111111111111111111000000000000011", + [4] = "000000000000000111111111111111111111100001110000000000000001111111111111111111100000011000000000000000000111111111111111111100011", + }, + [73] = { + [1] = "111000000001111110000001111100000011111000000011111100000001111110000000011111111000000011111100000011111000000001111100000000111111000000111110000001111100000011111", + [2] = "000000111111110000001111100000011111000000011111000000011111100000000111111100000000011111000000011111000000011111100000001111110000000111110000001111100000011111111", + [3] = "000000111111110000001111100000011111000000011111000000011111100000000111111100000000011111000000011111000000011111100000001111110000000111110000001111100000011111111", + [4] = "111000000001111110000001111100000011111000000011111100000001111110000000011111111000000011111100000011111000000001111100000000111111000000111110000001111100000011111", + }, + [74] = { + [1] = "110000111100000000111110000111100000000111100000111100000000111110000111100000000111100001111000000001111000011110000000011110000011111110000000001111000001111000000000111111000001111100000000000011111100001111110000000001111000011111111", + [2] = "000000001111000011111000000001111000011110000000001111000011111000000001111000011110000000011110000111100000000111100001111000000000011111100001111100000000011110000011111000000000001111100000011111110000000001111100001111100000000011111", + [3] = "000000001111000011111000000001111000011110000000001111000011111000000001111000011110000000011110000111100000000111100001111000000000011111100001111100000000011110000011111000000000001111100000011111110000000001111100001111100000000011111", + [4] = "110000111100000000111110000111100000000111100000111100000000111110000111100000000111100001111000000001111000011110000000011110000011111110000000001111000001111000000000111111000001111100000000000011111100001111110000000001111000011111111", + }, + [75] = { + [1] = "00000000001111000011111000011100000000001111110000011111100000011100000000011110000011111000001100000000000001111110000111111000001100000000011111100000111100000111000000000011111100000111111000000111", + [2] = "00000000111100000000011110011100000000111110000000000011111100011100000001111000000000011111001100000000011111110000000001111111001100000001111100000000001111000111000000001111100000000000111111000111", + [3] = "00000000111100000000011110011100000000111110000000000011111100011100000001111000000000011111001100000000011111110000000001111111001100000001111100000000001111000111000000001111100000000000111111000111", + [4] = "00000000001111000011111000011100000000001111110000011111100000011100000000011110000011111000001100000000000001111110000111111000001100000000011111100000111100000111000000000011111100000111111000000111", + }, + [76] = { + [1] = "11111111100000000111111111100000000011111111111110000000000001111111111111100000000001111111111110000000000011111111111100000000000111111111111100000000000", + [2] = "00000000111111111100000000111111111110000000000011111111111111000000000000111111111111000000000111111111111111000000000111111111111110000000000111111111111", + [3] = "00000000111111111100000000111111111110000000000011111111111111000000000000111111111111000000000111111111111111000000000111111111111110000000000111111111111", + [4] = "11111111100000000111111111100000000011111111111110000000000001111111111111100000000001111111111110000000000011111111111100000000000111111111111100000000000", + }, + [77] = { + [1] = "000000000000001100111110000000000000000110011111000000000000000000111000111111", + [2] = "000000001111111100111110000000011111111110011111000000001111111111111000111111", + [3] = "000000001111111100111110000000011111111110011111000000001111111111111000111111", + [4] = "000000000000001100111110000000000000000110011111000000000000000000111000111111", + }, + [78] = { + [1] = "00000111111001111110000001010000111100111001100111111100000011111000011111100000010110000011100011001110111111111", + [2] = "00011110000000001111110000000110111100111001100111111100001111100000000011111100000000011011100011001110111111111", + [3] = "00011110000000001111110000000110111100111001100111111100001111100000000011111100000000011011100011001110111111111", + [4] = "00000111111001111110000001010000111100111001100111111100000011111000011111100000010110000011100011001110111111111", + }, + [79] = { + [1] = "11111110000011111111100000011111111110000000111111111110000011111111100000011111111111000000111111111110000001111111111110000011111111111000000011111111111000000111", + [2] = "00000111111111000001111111111000000111111111110000001111111111000001111111111000000011111111110000000111111111110000000111111111100000011111111111000000111111111111", + [3] = "00000111111111000001111111111000000111111111110000001111111111000001111111111000000011111111110000000111111111110000000111111111100000011111111111000000111111111111", + [4] = "11111110000011111111100000011111111110000000111111111110000011111111100000011111111111000000111111111110000001111111111110000011111111111000000011111111111000000111", + }, + [80] = { + [1] = "11111111100000000000111111111110000000000001111111111111100000000000000111111111111000000000000011111111111111100000000000011111111111000000000000", + [2] = "11100000001110000000001110000000111000000000011110000000001111100000000001110000000011100000000000111110000000001110000000000111000000001110000000", + [3] = "00000111000000011100000000011100000001110000000000000111000000000111100000000011110000000111100000000000001110000000011100000000001110000000011100", + [4] = "11111111111111111111000000000001111111111110000000000000011111111111111000000000000111111111111100000000000000011111111111100000000000111111111111", + }, + [81] = { + [1] = "1000000000010010000000001010000000001010000000000010010000000000010110000000000101000000000000011010000000000001010000000000000010100000000001", + [2] = "1100001001111111000010011111000010011111000001100111111100000100111111000001001111100000001001111111000001000011111100000010001111111000010011", + [3] = "0011110110000000111101100000111101100000111110011000000011111011000000111110110000011111110110000000111110111100000011111101110000000111101100", + [4] = "0000101100000000001011000000001011000000001001110000000000010110000000001101100000000001101100000000001101110000000000010011100000000001011000", + }, + [82] = { + [1] = "111111100000000011111111000000001111111110000000011111111000000001111111100000000111111110000000011111111000000001111", + [2] = "100011101100001111000111011000011100011110110000111000111011000011100011101100001110001110110000111000111011000011100", + [3] = "000011101100001111000111011000011100011110110000111000111011000011100011101100001110001110110000111000111011000011100", + [4] = "000111111111000000001111111110000000111111111100000001111111110000000111111111000000011111111100000001111111110000000", + }, + [83] = { + [1] = "1111000000111100000011110000001111000000111100000011110000001111000000111100000011110000001111000000111111", + [2] = "0011110000001111000000111100000011110000001111000000111100000011110000001111000000111100000011110000001111", + [3] = "1111000000111100000011110000001111000000111100000011110000001111000000111100000011110000001111000000111111", + [4] = "0011110000001111000000111100000011110000001111000000111100000011110000001111000000111100000011110000001111", + }, + [84] = { + [1] = "11111000000000001111110000000000011111000000000000011111000000000000001111100000000000000111111100000000000000111111111000000000000000001111111000000000000000001111100000000000000011111000000000000011111100000000000000", + [2] = "00011111000000000000111110000000000011111000000000000011111000000000000001111110000000000000011111100000000000000000111111100000000000000001111111111000000000000001111110000000000000011111000000000000001111110000000000", + [3] = "00000000000111110000000000001111100000000000111111100000000000011111110000000000001111111000000000000001111111000000000000000000111111110000000000000000011111110000000000001111111100000000000011111100000000000000111111", + [4] = "00000000111110000000000001111100000000000111110000000000000111111000000000000001111100000000000000011111100000000000000000011111111000000000000000000111111100000000000001111110000000000000111111000000000000001111111000", + }, + [85] = { + [1] = "00000000111111111100000000001111111111110000000000000000000000110000000000000001110000000000000011100000000000000111000000000000000111111111100000000000011111111111000000000000000000000001111000000000000011100000000000011100000000000011111000000000011111111111100000000001111111111110000000000000000000110000000000000011100000000000000111100000000000001100000000000000000000", + [2] = "00000000000000000011111111110000000000001111111111110000000000001111000000001110001100000000111100011000000000111000110000000000000111111111100000000000011111111111000000000000000000000000000111000000001100011110000001100011110000001100000000000000000000000000011111111110000000000001111111111000000000001110000000011100011100000000011000011100000000110011000000000000000000", + [3] = "00000000000000000011111111110000000000001111111111110000000000000000110001110000000011100011000000000110000111000000001110000000000000000000011111111111100000000000111111111111000000000000000000110011110000000001100110000000001100110000000000000000000000000000011111111110000000000001111111111000000000000001100011100000000011100011100000000011100111000000111000000000000000", + [4] = "00000000111111111100000000001111111111110000000000000000000000000000001110000000000000011100000000000001111000000000000001111100000000000000011111111111100000000000111111111111000000000000000000001100000000000000011000000000000011000000000000000000011111111111100000000001111111111110000000000000000000000000011100000000000000011100000000000000011000000000000111111110000000", + }, + [86] = { + [1] = "00000000000001110000111000111000111000000000000111100001111000111100011111000111111111111110000111100001111000111100001111000000000000000011100011111000111100001110000111111111111100011111000111100011110000111100000000000111000111100011100011110001111111111110001111000111100011111000111110000", + [2] = "00000000000001110000111000111000111000000000000111100001111000111100011111000111111111111110000111100001111000111100001111000000000000000011100011111000111100001110000111111111111100011111000111100011110000111100000000000111000111100011100011110001111111111110001111000111100011111000111110000", + [3] = "00000000011110001111000111000111000111111111111000011110000111000011100000111000000000000001111000011110000111000011110000111111111111111100011100000111000011110001111000000000000011100000111000011100001111000011111111111000111000011100011100001110000000000001110000111000011100000111000001111", + [4] = "00000000011110001111000111000111000111111111111000011110000111000011100000111000000000000001111000011110000111000011110000111111111111111100011100000111000011110001111000000000000011100000111000011100001111000011111111111000111000011100011100001110000000000001110000111000011100000111000001111", + }, + [87] = { + [1] = "000000001111000111000111000111000111111111110000111100001110000111110001111000000000000111100001110000111110000011100001111111111111100011110001110001110001110000000000011100011110000111100001110001111111111100011100011100011100011100000000000111000111000111000111000111111111110001110001110001110001110000000000011100011100011100011100011111111111000111000111000111000111000000000001110001110001110001110001111111111100", + [2] = "000000000000111000111000111000111000000000001111000011110001111000001110000111111111111000011110001111000001111100011110000000000000011100001110001110001110001111111111100011100001111000011110001110000000000011100011100011100011100011111111111000111000111000111000111000000000001110001110001110001110001111111111100011100011100011100011100000000000111000111000111000111000111111111110001110001110001110001110000000000011", + [3] = "111111110000111000111000111000111000000000001111000011110001111000001110000111111111111000011110001111000001111100011110000000000000011100001110001110001110001111111111100011100001111000011110001110000000000011100011100011100011100011111111111000111000111000111000111000000000001110001110001110001110001111111111100011100011100011100011100000000000111000111000111000111000111111111110001110001110001110001110000000000011", + [4] = "111111111111000111000111000111000111111111110000111100001110000111110001111000000000000111100001110000111110000011100001111111111111100011110001110001110001110000000000011100011110000111100001110001111111111100011100011100011100011100000000000111000111000111000111000111111111110001110001110001110001110000000000011100011100011100011100011111111111000111000111000111000111000000000001110001110001110001110001111111111100", + }, + [88] = { + [1] = "00000000000001110001110001110001110000000000011100011100011100011100011111111101", + [2] = "11111111111110001110001110001110001111111111100011100011100011100011100000000001", + [3] = "11111111110001110001110001110001110000000000011100011100011100011100011111111100", + [4] = "00000000001110001110001110001110001111111111100011100011100011100011100000000000", + }, + [89] = { + [1] = "1000000011011000011101100000011001100000001101100001101100000011011000000001101100001101110000001101100000001101100001101100000001101110000000110110000110110000001101110", + [2] = "1000000011011000011101100000011001100000001101100001101100000011011000000001101100001101110000001101100000001101100001101100000001101110000000110110000110110000001101110", + [3] = "0011011011011000011101100000000000001101101101100001101100000000000011011101101100001101110000000000001101101101100001101100000000000000110110110110000110110000000000000", + [4] = "0011011011011000011101100000000000001101101101100001101100000000000011011101101100001101110000000000001101101101100001101100000000000000110110110110000110110000000000000", + }, + [90] = { + [1] = "000110110110110000110110000000000001101101101100001101100000000000011011011011000011011000000000000110110110110000110110000000000000110110", + [2] = "110000000110110000110110000001101100000001101100001101100000011011000000011011000011011000000110110000000110110000110110000001110110000000", + [3] = "110000000110110000110110000001101100000001101100001101100000011011000000011011000011011000000110110000000110110000110110000001110110000000", + [4] = "000110110110110000110110000000000001101101101100001101100000000000011011011011000011011000000000000110110110110000110110000000000000110110", + }, + [91] = { + [1] = "110000000110110000110110000001101100000001101100001110110000001100110000000110110000110110000000110110000000110011000011011000", + [2] = "000110110110110000110110000000000001101101101100001110110000000000000110110110110000110110000000000000110110110011000011011000", + [3] = "110000000110110000110110000001101100000001101100001110110000001100110000000110110000110110000000110110000000110011000011011000", + [4] = "000110110110110000110110000000000001101101101100001110110000000000000110110110110000110110000000000000110110110011000011011000", + }, + [92] = { + [1] = "1111110011011000000000110011011000111111110011011000000000000110001101100001111111100110110000000000110011011000111111111001101110000000000110000", + [2] = "1111110011011000000011110011011000001111110011011000000000011110001101100000011111100110110000000011110011011000001111111001101110000000011110000", + [3] = "0011110011011000001111110011011000000011110011011000000011111110001101100000000111100110110000001111110011011000000011111001101110000001111110000", + [4] = "0000110011011000111111110011011000000000110011011000011111111110001101100000000001100110110001111111110011011000000000111001101110000111111110000", + }, + [93] = { + [1] = "10000000000111100000000001111000000000011111000000000011110000000000111100000000001111100000000001111000000000011110000000000111100000000001111000000010", + [2] = "10000000000111100000000001111000000000011111000000000011110000000000111100000000001111100000000001111000000000011110000000000111100000000001111000000011", + [3] = "11110000000000111100000000001111000000000001111000000000011110000000000111100000000000111100000000001111000000000011110000000000111100000000001111000000", + [4] = "11110000000000111100000000001111000000000001111000000000011110000000000111100000000000111100000000001111000000000011110000000000111100000000001111000000", + }, + [94] = { + [1] = "000000000000001110000000000000001110000000000000001110000000000000001110000000000000001110000000000000000001110000000000000000011100000000000000111", + [2] = "110000000000000011110000000000000011110000000000000011110000000000000011110000000000000011110000000000000000011110000000000000000111100000000000000", + [3] = "011110000000000000011110000000000000011110000000000000011110000000000000011110000000000000011110000000000000000011111000000000000000111100000000001", + [4] = "000011100000000000000011100000000000000011100000000000000011100000000000000011100000000000000011100000000000000000001110000000000000000111000000000", + }, + [95] = { + [1] = "000000001111000000001110000000011100000000111000000001110000000001110000000011100000000011110000000011100000", + [2] = "001101100000001101100000011011000000110110000001101100000011001100000011011000000110111000000011011000000000", + [3] = "100000011001100000011011000000110110000001101100000011011000000011011000000110110000000110111000000110110000", + [4] = "011100000000011100000000111000000001110000000011100000000111000000000111000000001110000000000111000000001111", + }, + [96] = { + [1] = "000000001111110000001111110000001111110000110110000000011011000000011101110000000110110000000000000000110110000000110110000001101100000011011100000001111110000001111111000000011111100000011111110000110110000000011101100000000011011100000000011011000000000000011011000000110110000001101100000011011111000000000011111111", + [2] = "000000001111110000001111110000001111110000110110000000011011000000011101110000000110110000000000000000110110000000110110000001101100000011011100000001111110000001111111000000011111100000011111110000110110000000011101100000000011011100000000011011000000000000011011000000110110000001101100000011011111000000000011111111", + [3] = "001111110000001111110000001111110000000000000000110011000000011011000000000110110000000110011000000000110110000000110110000001101100000011011100000000000001111110000000111111100000011111100000000000000000011011000000001111011000000001101110000000001101100000011011000000110110000001101100000011011111000000000000000000", + [4] = "111111110000001111110000001111110000000000000000110011000000011011000000000110110000000110011000000000110110000000110110000001101100000011011100000000000001111110000000111111100000011111100000000000000000011011000000001111011000000001101110000000001101100000011011000000110110000001101100000011011111000000000000000000", + }, + [97] = { + [1] = "111111111000000111111100000001111110000000000000000000001101100000000011101110000000001111011000000000110111000000110011100000011011000000110011000000000111001110000000000000111111100000011111100000000111111000000000000000000000", + [2] = "110000000111111000000011111110000001111111000001110111000000001110011000000000111011000000000011001110000000000000110011100000011011000000110011000000000111001110000000111111000000011111100000011111111000000111111110000001101111", + [3] = "000000000111111000000011111110000001111111000001110111000000001110011000000000111011000000000011001110000000000000110011100000011011000000110011000000000111001110000000111111000000011111100000011111111000000111111110000001101111", + [4] = "001111111000000111111100000001111110000000000000000000001101100000000011101110000000001111011000000000110111000000110011100000011011000000110011000000000111001110000000000000111111100000011111100000000111111000000000000000000000", + }, + [98] = { + [1] = "0000000011111100000011111110000000111111100000011101100000000110011000000011101100000001101100000000000000011011000000011101110000000111011000000001101111100000000111111100000000011111110000001111110000001111111100001101100000001101100000000110111000000011011000000000000110110000001101100000001101100000011011100000001111110000000000", + [2] = "1111111100000011111100000001111111000000000000000000000110110000000011011000000001101100000001101100000000011011000000011101110000000111011000000001101111100000000000000011111111100000001111110000001111110000000000000000001101100000001101110000000011011000000011011000000110110000001101100000001101100000011011100000000000001111111100", + [3] = "1100000011111100000011111110000000111111100000011101100000000110011000000011101100000001101100000000000000011011000000011101110000000111011000000001101111100000000111111100000000011111110000001111110000001111111100001101100000001101100000000110111000000011011000000000000110110000001101100000001101100000011011100000001111110000000000", + [4] = "0011111100000011111100000001111111000000000000000000000110110000000011011000000001101100000001101100000000011011000000011101110000000111011000000001101111100000000000000011111111100000001111110000001111110000000000000000001101100000001101110000000011011000000011011000000110110000001101100000001101100000011011100000000000001111111100", + }, + [99] = { + [1] = "10110000011001011000001100101100000000000000000000000000000000000000011001011000001110010110000011001011000000000000000000000000000000000001100011011000000011100101100000011000100111000000000000000000000000000000000000000011100010110000000111001011000000", + [2] = "10110000011001011000001100101100000000000000000000000000000000000000011001011000001110010110000011001011000000000000000000000000000000000001100011011000000011100101100000011000100111000000000000000000000000000000000000000011100010110000000111001011000000", + [3] = "00000000000000000000000000000011001001100000110001011000000011000101100000000000000000000000000000000000110010011000001100101100000110010110000000000000000000000000000000000000000000110001011000001100100110000000111001001100000000000000000000000000000000", + [4] = "00000000000000000000000000000011001001100000110001011000000011000101100000000000000000000000000000000000110010011000001100101100000110010110000000000000000000000000000000000000000000110001011000001100100110000000111001001100000000000000000000000000000000", + }, + [100] = { + [1] = "00000000000000000000000000000001100101100000110010110000011100101100000000000000000000000000000000000000011100100111000001100101100000011100101100000000000000000000000000000000000011001011100000011001011000001100010111000000000000000000000000000000000000000", + [2] = "01011000001100101100000110010110000000000000000000000000000000000011001011100000011001001100000011100101100000000000000000000000000000000000000011100101100000011001011000001100101100000000000000000000000000000000000000110010110000011001011000001100010011110", + [3] = "01011000001100101100000110010110000000000000000000000000000000000011001011100000011001001100000011100101100000000000000000000000000000000000000011100101100000011001011000001100101100000000000000000000000000000000000000110010110000011001011000001100010011110", + [4] = "00000000000000000000000000000001100101100000110010110000011100101100000000000000000000000000000000000000011100100111000001100101100000011100101100000000000000000000000000000000000011001011100000011001011000001100010111000000000000000000000000000000000000000", + }, + [101] = { + [1] = "010110000011001011000001100101100000000000000000000000000000000000000111000101100000110010110000001100110011000000000000000000000000000000000000000011001011000001110010110000011001011000000000000000000000000000000000", + [2] = "000000000000000000000000000000011001011000001110001011000001100100111000000000000000000000000000000000000000110010111000000110010011000000011100101100000000000000000000000000000000000110010011000000111001011000001110", + [3] = "010110000011001011000001100101100000000000000000000000000000000000000111000101100000110010110000001100110011000000000000000000000000000000000000000011001011000001110010110000011001011000000000000000000000000000000000", + [4] = "000000000000000000000000000000011001011000001110001011000001100100111000000000000000000000000000000000000000110010111000000110010011000000011100101100000000000000000000000000000000000110010011000000111001011000001110", + }, + [102] = { + [1] = "010110000011001011000001100101100000000000000000000000000000000000001110010011000000110011001100000111001011000000000000000000000000000000000000000111001011000001110001001100000011001001100000000000000000000000000000000000000011001011000000110000", + [2] = "010110000011001011000001100101100000000000000000000000000000000000001110010011000000110011001100000111001011000000000000000000000000000000000000000111001011000001110001001100000011001001100000000000000000000000000000000000000011001011000000110000", + [3] = "010110000011001011000001100101100000000000000000000000000000000000001110010011000000110011001100000111001011000000000000000000000000000000000000000111001011000001110001001100000011001001100000000000000000000000000000000000000011001011000000110000", + [4] = "010110000011001011000001100101100000000000000000000000000000000000001110010011000000110011001100000111001011000000000000000000000000000000000000000111001011000001110001001100000011001001100000000000000000000000000000000000000011001011000000110000", + }, + [103] = { + [1] = "000000000000000000001111111110000000001111111100000000111111100000000011111111000000011111000001111000011110001110011001111001101110110000000000000000110011100011110000111111000001111111000000001111111100000001111111110000000011111111111000000000111111111111000000000001111111110000000001111111100000000011111110000000011111100000001111100000011111110000111100011000011011001110011011000000000000000110011100011111000011111100000", + [2] = "000000000000000000001111111110000000001111111100000000111111100000000011111111000000011111000001111000011110001110011001111001101110110000000000000000110011100011110000111111000001111111000000001111111100000001111111110000000011111111111000000000111111111111000000000001111111110000000001111111100000000011111110000000011111100000001111100000011111110000111100011000011011001110011011000000000000000110011100011111000011111100000", + [3] = "000000001111111111110000000001111111110000000011111111000000011111111100000000111111100000111110000111100001110001100000000000000000000110111011011011001100011100001111000000111110000000111111110000000011111110000000001111111100000000000111111111000000000000111111111110000000001111111110000000011111111100000001111111100000011111110000011111100000001111000011100111100000000000000000011011011011011001100011100000111100000011111", + [4] = "000000001111111111110000000001111111110000000011111111000000011111111100000000111111100000111110000111100001110001100000000000000000000110111011011011001100011100001111000000111110000000111111110000000011111110000000001111111100000000000111111111000000000000111111111110000000001111111110000000011111111100000001111111100000011111110000011111100000001111000011100111100000000000000000011011011011011001100011100000111100000011111", + }, + [104] = { + [1] = "00000001111111111000000000111111111000000000111111110000000001111111100000011111110000011111100000111100011100110000000000000000011011011101100110011000111000001111000000111110000000111111100000000111111100000000011111111000000000011111111100000000000111111111100000000001111111110000000001111111110000", + [2] = "00000000000000000111111111000000000111111111000000001111111110000000011111100000001111100000011111000011100011001100110011011011000000000000000001100111000111110000111111000001111111000000011111111000000011111111100000000111111111100000000011111111111000000000011111111110000000001111111110000000001111", + [3] = "11111110000000000111111111000000000111111111000000001111111110000000011111100000001111100000011111000011100011001100110011011011000000000000000001100111000111110000111111000001111111000000011111111000000011111111100000000111111111100000000011111111111000000000011111111110000000001111111110000000001111", + [4] = "11111111111111111000000000111111111000000000111111110000000001111111100000011111110000011111100000111100011100110000000000000000011011011101100110011000111000001111000000111110000000111111100000000111111100000000011111111000000000011111111100000000000111111111100000000001111111110000000001111111110000", + }, + [105] = { + [1] = "000000000000000011111111100000000011111111000000001111111000000011111110000001111111000000111100000111000011000011011011011101100000000000000001100111000111110000111110000001111110000001111111100000000011111111110000000011111111110000000000111111111111100000000000011111111110000000001111111100000000111111100000001111110000001111100000111100001110001100110110110110110000000000000", + [2] = "111111111111111100000000011111111100000000111111110000000111111100000001111110000000111111000011111000111100111100000000000000001101101110110110011000111000001111000001111110000001111110000000011111111100000000001111111100000000001111111111000000000000011111111111100000000001111111110000000011111111000000011111110000001111110000011111000011110001110011000000000000000110011011011", + [3] = "111111000000000011111111100000000011111111000000001111111000000011111110000001111111000000111100000111000011000011011011011101100000000000000001100111000111110000111110000001111110000001111111100000000011111111110000000011111111110000000000111111111111100000000000011111111110000000001111111100000000111111100000001111110000001111100000111100001110001100110110110110110000000000000", + [4] = "000000111111111100000000011111111100000000111111110000000111111100000001111110000000111111000011111000111100111100000000000000001101101110110110011000111000001111000001111110000001111110000000011111111100000000001111111100000000001111111111000000000000011111111111100000000001111111110000000011111111000000011111110000001111110000011111000011110001110011000000000000000110011011011", + }, + [106] = { + [1] = "00000000000000000011111111100000000001111111100000000111111100000000111111100000001111100000111110000011100011001101100110110110000000000000001100011110000000", + [2] = "11111111000000000011111111100000000001111111100000000111111100000000111111100000001111100000111110000011100011001101100110110110000000000000001100011110000000", + [3] = "00000000000000000011111111100000000001111111100000000111111100000000111111100000001111100000111110000011100011001101100110110110000000000000001100011110000000", + [4] = "11111111000000000011111111100000000001111111100000000111111100000000111111100000001111100000111110000011100011001101100110110110000000000000001100011110000000", + }, + [107] = { + [1] = "01111000000000011110011110000000000000000111111110000000001111110000000011111110000000000111111110000000011111111100000000000000000000001111111110000000011111111000000000111111111111", + [2] = "01111000000000011110011110000000000000000111111110000000001111110000000011111110000000000111111110000000011111111100000000000000000000001111111110000000011111111000000000111111111111", + [3] = "00000111100111100000000001111001111000000111111110000000001111110000000011111110000000000000000001111111100000000011111111100000000000001111111110000000011111111000000000111111111111", + [4] = "00000111100111100000000001111001111000000111111110000000001111110000000011111110000000000000000001111111100000000011111111100000000000001111111110000000011111111000000000111111111111", + }, + [108] = { + [1] = "000111000111000111000111000111000111100011100001110001110001101101101101101101101101101110011100001110000111000011100011100011110001110001110001110001110000110110110110110110011011011011001110001110001110000111100001110001111000111000011100011100011100001101101101110110110110110111011001111", + [2] = "000111000111000111000111000111000111100011100001110001110001101101101101101101101101101110011100001110000111000011100011100011110001110001110001110001110000110110110110110110011011011011001110001110001110000111100001110001111000111000011100011100011100001101101101110110110110110111011001111", + [3] = "111000111000111000111000111000111000011100011110001110001111101101101101101101101101101110000011110001111000111100011100011100001110001110001110001110001111110110110110110110011011011011000001110001110001111000011110001110000111000111100011100011100011111101101101110110110110110111011000000", + [4] = "111000111000111000111000111000111000011100011110001110001111101101101101101101101101101110000011110001111000111100011100011100001110001110001110001110001111110110110110110110011011011011000001110001110001111000011110001110000111000111100011100011100011111101101101110110110110110111011000000", + }, + [109] = { + [1] = "111000111000111000111000111000111000111110000111000111000001111110110110110110110110110110110000011100011110001111100011100011100011110001110000111100001110001111101101101101101101101101101100000111000", + [2] = "000111000111000111000111000111000111000001111000111000111110001110110110110110110110110110110011100011100001110000011100011100011100001110001111000011110001110001101101101101101101101101101100111000111", + [3] = "000111000111000111000111000111000111000001111000111000111110001110110110110110110110110110110011100011100001110000011100011100011100001110001111000011110001110001101101101101101101101101101100111000111", + [4] = "111000111000111000111000111000111000111110000111000111000001111110110110110110110110110110110000011100011110001111100011100011100011110001110000111100001110001111101101101101101101101101101100000111000", + }, + [110] = { + [1] = "0001110001110001110001110001110001110001110001110001110001101101101101101101101101101100111000111000111000111000111000011100011100011100011100011100011011011011011011011001110110110011100000", + [2] = "1110001110001110001110001110001110001110001110001110001111101101101101101101101101101100000111000111000111000111000111100011100011100011100011100011111011011011011011011001110110110000011111", + [3] = "0001110001110001110001110001110001110001110001110001110001101101101101101101101101101100111000111000111000111000111000011100011100011100011100011100011011011011011011011001110110110011100000", + [4] = "1110001110001110001110001110001110001110001110001110001111101101101101101101101101101100000111000111000111000111000111100011100011100011100011100011111011011011011011011001110110110000011111", + }, + [111] = { + [1] = "000111000111000111000111000111000111000111000011100011100011011011001101101101101101101100111000111000111000111000111000111000111000111000111000011100011011011011011011011011011011001111000111000111000111000111100011110001111", + [2] = "000111000111000111000111000111000111000111000011100011100011011011001101101101101101101100111000111000111000111000111000111000111000111000111000011100011011011011011011011011011011001111000111000111000111000111100011110001111", + [3] = "000111000111000111000111000111000111000111000011100011100011011011001101101101101101101100111000111000111000111000111000111000111000111000111000011100011011011011011011011011011011001111000111000111000111000111100011110001111", + [4] = "000111000111000111000111000111000111000111000011100011100011011011001101101101101101101100111000111000111000111000111000111000111000111000111000011100011011011011011011011011011011001111000111000111000111000111100011110001111", + }, + [112] = { + [1] = "11110000000001111111100000000111111111000000000011111111000000001111111100000000111111110000000001111111110000000001111111110000000011111111000000001111111110", + [2] = "00000000011110000000000001111000000000000001111100000000000011110000000000001111000000000000111110000000000000111110000000000000111100000000000011110000000000", + [3] = "11110000000000000111100000000000011111000000000000001111000000000000111100000000000011110000000000000111110000000000000011110000000000001111000000000000111110", + [4] = "00001111111110000000011111111000000000111111111100000000111111110000000011111111000000001111111110000000001111111110000000001111111100000000111111110000000000", + }, + [113] = { + [1] = "0000000000001101101111001101101110000000000001101101111100110110110000000000000110110111100110011011000000000000011011011111001101101100000000000011011011110011011011", + [2] = "0000000000001101101111000000000000000000000001101101111100000000000000000000000110110111100000000000000000000000011011011111000000000000000000000011011011110000000000", + [3] = "0000000000001101101111000000000000000000000001101101111100000000000000000000000110110111100000000000000000000000011011011111000000000000000000000011011011110000000000", + [4] = "0011011011001101101111000000000000011011011001101101111100000000000011011011000110110111100000000000001101101100011011011111000000000000110110110011011011110000000000", + }, + [114] = { + [1] = "11011011011000000011011011011000000011011011011000000001101101101100000001101101101100000001101101101100000000110110011101100000001101101101100000001101101101100000001101101101100000001101101110110000000", + [2] = "11011011011000000011011011011000000011011011011000000001101101101100000001101101101100000001101101101100000000110110011101100000001101101101100000001101101101100000001101101101100000001101101110110000000", + [3] = "00000001101101101100000001101101101100000001101101101100000000110110110110000000110110110110000000110110110111000000001110110110110000000110110110110000000110110110110000000110110110110000000111011011011", + [4] = "00000001101101101100000001101101101100000001101101101100000000110110110110000000110110110110000000110110110111000000001110110110110000000110110110110000000110110110110000000110110110110000000111011011011", + }, + [115] = { + [1] = "00000000111111110000000011111111000000001111110000000000011001101101111100001111111100000000111111111000000001111111100000000111111000000000000110011011011111", + [2] = "11111111000000001111111100000000111111110000001111111111011001101101111100000000000011111111000000000111111110000000011111111000000111111111110110011011011111", + [3] = "11111111000000001111111100000000111111110000001111111111011001101101111100000000000011111111000000000111111110000000011111111000000111111111110110011011011111", + [4] = "00000000111111110000000011111111000000001111110000000000011001101101111100001111111100000000111111111000000001111111100000000111111000000000000110011011011111", + }, + [116] = { + [1] = "01110011110000010101110011110000010101110011110000010101110011110000010101110011110000010101110011110000010101110011110000010101110011110000001010111001111000001010111001111000001", + [2] = "00011100111101011100011100111101011100011100111101011100011100111101011100011100111101011100011100111101011100011100111101011100011100111101001110001110011110101110001110011110111", + [3] = "11100011000100000011100011000100000011100011000100000011100011000100000011100011000100000011100011000100000011100011000100000011100011000100000001110001100010000001110001100010000", + [4] = "10000010101110011110000010101110011110000010101110011110000010101110011110000010101110011110000010101110011110000010101110011110000010101110001111000001010111001111000001010111000", + }, + [117] = { + [1] = "00000000111000000001110000000011100000000111000000001110000000011100000000111000000001110000000011100000000", + [2] = "11100000001111000000011110000000111100000001111000000011110000000111100000001111000000011110000000111100000", + [3] = "00111100000001111000000011110000000111100000001111000000011110000000111100000001111000000011110000000111111", + [4] = "00000111000000001110000000011100000000111000000001110000000011100000000111000000001110000000011100000000110", + }, + [118] = { + [1] = "000110000001100000011000000110000001100000011000000110000001100000011000000110000", + [2] = "011000000110000001100000011000000110000001100000011000000110000001100000011000000", + [3] = "100000011000000110000001100000011000000110000001100000011000000110000001100000000", + [4] = "000001100000011000000110000001100000011000000110000001100000011000000110000001111", + }, + [119] = { + [1] = "000010000000000000000000111111111000000000000000000011111111100000000000000000001111111110000000000000000000111111110", + [2] = "000011110000000000000111100000001111000000000000011110000000111100000000000001111000000011110000000000000111100000001", + [3] = "000000011110000000111100000000000001111000000011110000000000000111100000001111000000000000011110000000111100000000000", + [4] = "111100000111111111100000000000000000011111111110000000000000000001111111111000000000000000000111111111100000000000000", + }, + [120] = { + [1] = "000000000110000000000110000000000110000000000110000000000110000000000110000000000110000000000110000000000110000000000110000000000110000000", + [2] = "100000011001100000011001100000011001100000011001100000011001100000011001100000011001100000011001100000011001100000011001100000011001100000", + [3] = "011001100000011001100000011001100000011001100000011001100000011001100000011001100000011001100000011001100000011001100000011001100000011000", + [4] = "000110000000000110000000000110000000000110000000000110000000000110000000000110000000000110000000000110000000000110000000000110000000000111", + }, + [121] = { + [1] = "0110000000000000000000110110000000000000000000110110000000000000000000110110000000000000000000110110000000000000", + [2] = "0000000000110110000000000000000000110110000000000000000000110110000000000000000000110110000000000000000000110110", + [3] = "0000110110000000000000000000110110000000000000000000110110000000000000000000110110000000000000000000110110000001", + [4] = "0000000000000000110110000000000000000000110110000000000000000000110110000000000000000000110110000000000000000001", + }, + [122] = { + [1] = "000111111110000000011111111100000000111111110000000011111111000000001111111100000000111111110000000011111111", + [2] = "011111111000000001111111100000000011111111000000001111111100000000111111110000000011111111000000001111111100", + [3] = "111111100000000111111110000000001111111100000000111111110000000011111111000000001111111100000000111111110000", + [4] = "111110000000011111111000000000111111110000000011111111000000001111111100000000111111110000000011111111000000", + }, + [123] = { + [1] = "111111110000000011111111000000001111111100000000111111110000000011111111", + [2] = "001111111100000000111111110000000011111111000000001111111100000000111111", + [3] = "000011111111000000001111111100000000111111110000000011111111000000001110", + [4] = "000000111111110000000011111111000000001111111100000000111111110000000000", + }, + [124] = { + [1] = "11111000000000000000011111111000011111111000000000000000011111111000001111111110000000000000000111111111000011111111000000000000000000111111111000011111111000000000", + [2] = "11111110000000000001111111100000000111111110000000000001111111100000000001111111100000000000011111111100000000111111110000000000000011111111100000000111111110000000", + [3] = "01111111100000000111111110000000000001111111100000000111111110000000000000011111111000000001111111100000000000001111111100000000011111111100000000000001111111110000", + [4] = "00011111111000011111111000000000000000011111111000011111111000000000000000000111111110000111111110000000000000000011111111000001111111110000000000000000011111111111", + }, + [125] = { + [1] = "0000000001111110000001111110000001111110000001111110000001111111000000001111111000000011111100000011111100000001111110000001111110000000011111100000000111111000000111111100000000111111", + [2] = "0001111110000001111110000001111110000001111110000001111110000000111111001111111000000011111100000011111100000001111110000001111110000000011111100000000000000111111111111100000000000000", + [3] = "0000000001111110000001111110000001111110000001111110000001111111000000000000000111111100000011111100000011111110000001111110000001111111100000011111100111111000000000000011111100000000", + [4] = "1111111110000001111110000001111110000001111110000001111110000000111111000000000111111100000011111100000011111110000001111110000001111111100000011111100000000111111000000011111100111111", + }, + [126] = { + [1] = "1100000001101100000001101100000001101100000000110110000000111011000000011011000000011011000000011011000000011011100000001101100000001101100000000001101100000000110110000000110110000", + [2] = "1100000000000001101101101100000000000001110110110110000000000000011011011011000000000000011011011011000000000000001101101101100000000000001110111001101100000000000000110110110110011", + [3] = "0001101100000001101100000001101100000001110110000000110110000000011011000000011011000000011011000000011011000000001101100000001101100000001110111000000001100110000000110110000000100", + [4] = "0001101101101100000000000001101101101100000000000000110110111011000000000000011011011011000000000000011011011011100000000000001101101101100000000000000001100110110110000000000000110", + }, + [127] = { + [1] = "0101011111100000000000000110010101111110000000000000011001010111111111101", + [2] = "0010111111000000000000000011001011111100000000000000001100101111111100001", + [3] = "0000000000110010111111111000000000000011001011111111100000000000000011100", + [4] = "0000000000011001010111111000000000000001100101011111100000000000000000000", + }, + [128] = { + [1] = "101101101101100000000000000000110110110111011011000000000000000000001101101110110110110000000000000000001101101110110110111100000000000000000011001101101110011011000000000000000000000", + [2] = "101101101101100000000000000000110110110111011011000000000000000000001101101110110110110000000000000000001101101110110110111100000000000000000011001101101110011011000000000000000000000", + [3] = "000000000000011011011011011011000000000000000000110111011001110110110000000000000000001101101100110110110000000000000000000011011011001101101100000000000000000000110111011011001110111", + [4] = "000000000000011011011011011011000000000000000000110111011001110110110000000000000000001101101100110110110000000000000000000011011011001101101100000000000000000000110111011011001110111", + }, + [129] = { + [1] = "0000000000000001101101101101101100000000000000000000000110011011011011011000000000000000000001101111011101101100111000000000000000000111011110011011011011000000000", + [2] = "0110110110110110000000000000000011101110110110111001111000000000000000000110111101101101100110000000000000000000000110111011011011011000000000000000000000111100111", + [3] = "0110110110110110000000000000000011101110110110111001111000000000000000000110111101101101100110000000000000000000000110111011011011011000000000000000000000111100111", + [4] = "0000000000000001101101101101101100000000000000000000000110011011011011011000000000000000000001101111011101101100111000000000000000000111011110011011011011000000000", + }, + [130] = { + [1] = "011011011011011000000000000000001101101101110110110000000000000000000000111011011011011011100000000000000000001110110110110011101100000000000000000000001110011001101100110111000000000000000000011011101110", + [2] = "000000000000000110110110110110110000000000000000001110110011101100111011000000000000000000011110110110110110110000000000000000000011011011101111011101110000000000000000000000110110111011101101100000000000", + [3] = "011011011011011000000000000000001101101101110110110000000000000000000000111011011011011011100000000000000000001110110110110011101100000000000000000000001110011001101100110111000000000000000000011011101110", + [4] = "000000000000000110110110110110110000000000000000001110110011101100111011000000000000000000011110110110110110110000000000000000000011011011101111011101110000000000000000000000110110111011101101100000000000", + }, + [131] = { + [1] = "1101101101110110000000000000000011011011011011011000000000000000000000011011101100110110110000000000000000000011001101110111011011000000000000000000001101110110110110110000000000000", + [2] = "1101101101110110000000000000000011011011011011011000000000000000000000011011101100110110110000000000000000000011001101110111011011000000000000000000001101110110110110110000000000000", + [3] = "1101101101110110000000000000000011011011011011011000000000000000000000011011101100110110110000000000000000000011001101110111011011000000000000000000001101110110110110110000000000000", + [4] = "1101101101110110000000000000000011011011011011011000000000000000000000011011101100110110110000000000000000000011001101110111011011000000000000000000001101110110110110110000000000000", + }, + [132] = { + [1] = "00011100000000011100111000000000111001110000000000000111001111000000000111110011110000000000011100111000000000001110011100000000000111001110000000000", + [2] = "00011100000000011100111000000000111001110000000000000111001111000000000111110011110000000000011100111000000000001110011100000000000111001110000000000", + [3] = "00000001110011100000000011100111000000000011111001111000000000011100111000000000000111000111100000000011110011110000000001110001111000000000111100000", + [4] = "00000001110011100000000011100111000000000011111001111000000000011100111000000000000111000111100000000011110011110000000001110001111000000000111100000", + }, + [133] = { + [1] = "0000011100111000000000111001110000000000111001110000000001110011111000000000001110011110000000001111001110000000001111001111000000", + [2] = "0111000000000111001110000000001110011100000000001110011100000000000111000011100000000001110011100000000001110011100000000000111111", + [3] = "0111000000000111001110000000001110011100000000001110011100000000000111000011100000000001110011100000000001110011100000000000111111", + [4] = "0000011100111000000000111001110000000000111001110000000001110011111000000000001110011110000000001111001110000000001111001111000000", + }, + [134] = { + [1] = "00111000000000011100111000000000111001111000000000011110011100000000001110011100000000000011110011100000000000111000111100000000001111001110000000000011100111100000000001111001110000000000011100111100000000001110011100000000000111000111000000000000111001110000000", + [2] = "00000011100011100000000011100111000000000011110011100000000001111001110000000000111110011100000000001111000111000000000001110011110000000000111100111100000000001111001110000000000111001111100000000001111001110000000001111001111000000000011110001111000000000111110", + [3] = "00111000000000011100111000000000111001111000000000011110011100000000001110011100000000000011110011100000000000111000111100000000001111001110000000000011100111100000000001111001110000000000011100111100000000001110011100000000000111000111000000000000111001110000000", + [4] = "00000011100011100000000011100111000000000011110011100000000001111001110000000000111110011100000000001111000111000000000001110011110000000000111100111100000000001111001110000000000111001111100000000001111001110000000001111001111000000000011110001111000000000111110", + }, + [135] = { + [1] = "1110000000000111100111000000000111001110000000000000111110011110000000001111000111000000000011100111000000000000011100111100000000011110000111000000000001111001111000000000111100111100000000011110001110000000000000011100011100000000001110011110000000000111100001110000000000000111000111000000000001111000111000000000011100111100", + [2] = "1110000000000111100111000000000111001110000000000000111110011110000000001111000111000000000011100111000000000000011100111100000000011110000111000000000001111001111000000000111100111100000000011110001110000000000000011100011100000000001110011110000000000111100001110000000000000111000111000000000001111000111000000000011100111100", + [3] = "1110000000000111100111000000000111001110000000000000111110011110000000001111000111000000000011100111000000000000011100111100000000011110000111000000000001111001111000000000111100111100000000011110001110000000000000011100011100000000001110011110000000000111100001110000000000000111000111000000000001111000111000000000011100111100", + [4] = "1110000000000111100111000000000111001110000000000000111110011110000000001111000111000000000011100111000000000000011100111100000000011110000111000000000001111001111000000000111100111100000000011110001110000000000000011100011100000000001110011110000000000111100001110000000000000111000111000000000001111000111000000000011100111100", + }, + [136] = { + [1] = "011000000110110000001101100000011011100000001110011100000001100111100000011011000000110110000000110110000001101110000001101100000000110111000000110110000000001101100", + [2] = "011000000110110000001101100000011011100000001110011100000001100111100000011011000000110110000000110110000001101110000001101100000000110111000000110110000000001101100", + [3] = "000011011000000110110000001101100000000110110000000001100110000000001101100000011011000000111011000000110110000000110110000000111011000000011011000000011001110000000", + [4] = "000011011000000110110000001101100000000110110000000001100110000000001101100000011011000000111011000000110110000000110110000000111011000000011011000000011001110000000", + }, + [137] = { + [1] = "0000110110000001101100000011011000000011011000000001110011111", + [2] = "0110000001101100000011011000000110111000000111001100000000000", + [3] = "0110000001101100000011011000000110111000000111001100000000000", + [4] = "0000110110000001101100000011011000000011011000000001110011111", + }, + [138] = { + [1] = "0110000000110111000000110110000001101100000001101100000011011000000110110000000011101100000011011000000011101110000000110110000001101110000000110110000000110011000000011011000000001101110000001110111000000011011000000011100111000000000", + [2] = "0000110111000000011011000000110110000001101110000001101100000011011000000111001100000001101100000001101100000000110111000000110110000000111011000000110111000000001101100000011101110000000110110000000011001100000011011100000000001101110", + [3] = "0110000000110111000000110110000001101100000001101100000011011000000110110000000011101100000011011000000011101110000000110110000001101110000000110110000000110011000000011011000000001101110000001110111000000011011000000011100111000000000", + [4] = "0000110111000000011011000000110110000001101110000001101100000011011000000111001100000001101100000001101100000000110111000000110110000000111011000000110111000000001101100000011101110000000110110000000011001100000011011100000000001101110", + }, + [139] = { + [1] = "11000000110110000001101100000011011000000000110011000000001101100000011011000000110110000000111011000000011101100000", + [2] = "11000000110110000001101100000011011000000000110011000000001101100000011011000000110110000000111011000000011101100000", + [3] = "11000000110110000001101100000011011000000000110011000000001101100000011011000000110110000000111011000000011101100000", + [4] = "11000000110110000001101100000011011000000000110011000000001101100000011011000000110110000000111011000000011101100000", + }, + [140] = { + [1] = "01100011001110011001100110011001100110011000110001100111001111001100110001100001100111001100110011000110011100111001100011110001110001110001100110011100111100011110011110001100001100011100111001", + [2] = "01100011001110011001100110011001100110011000110001100111001111001100110001100001100111001100110011000110011100111001100011110001110001110001100110011100111100011110011110001100001100011100111001", + [3] = "01100011001110011001100110011001100110011000110001100111001111001100110001100001100111001100110011000110011100111001100011110001110001110001100110011100111100011110011110001100001100011100111001", + [4] = "01100011001110011001100110011001100110011000110001100111001111001100110001100001100111001100110011000110011100111001100011110001110001110001100110011100111100011110011110001100001100011100111001", + }, +} + +led_SecondaryPatterns = { + [1] = { + [7] = "00000000000000000000000000000000000000000000000000000000000000011110000111100111100000000000000000000000011110011110000111100111000000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111000000000000000000000000000", + [8] = "00000000000000000000000000000000000000000000000000000000000000011110000111100111100000000000000000000000011110011110000111100111000000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111000000000000000000000000001", + [9] = "00000000000000000000000000000000000000000000000000000000000000000000000000000000011110011110000111100111100000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111000", + }, + [2] = { + [7] = "00000000000000001111001111000011100111000000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111000000000000000000000000011110011110000111100111100000000000000000000000011110011110011", + [8] = "11000011110011110000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111100000000000000000000000011110011110000111100111100000000000000", + [9] = "00000000000000001111001111000011100111000000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111000000000000000000000000111100111100001111001111000000000000000000000000011110011110000111100111100000000000000000000000011110011110000", + }, + [3] = { + [7] = "110000111100111000000000000000000000000111100111100001110011100000000000000000000000111100111000111100111100000000000000000000000111001111000110011110000000000000000000000011101111000011100111100000000000000000000001111001111000011110011100000000000000000000000011110011100001111001111000000000000000000000000111100111100001110000001", + [8] = "000000000000000111100111100001111001111000000000000000000000011110011110000111101111000000000000000000000011110011110000111100111000000000000000000001111001111000111100111100000000000000000000011110011110001110011110000000000000000000000011110011110000111100111100000000000000000000000111100111100001111001111000000000000000000000001", + [9] = "000000000000000111100111100001111001111000000000000000000000011110011110000111101111000000000000000000000011110011110000111100111000000000000000000001111001111000111100111100000000000000000000011110011110001110011110000000000000000000000011110011110000111100111100000000000000000000000111100111100001111001111000000000000000000000001", + }, + [4] = { + [7] = "1110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000000", + [8] = "1110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000000", + [9] = "1110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000011110011110000111100111100000000000000000000000000", + }, + [5] = { + [7] = "00001100110011111111111100000000000000000000000000001111000011001100111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000000", + [8] = "00001100110011111111111100000000000000000000000000001111000011001100111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000000", + [9] = "00000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111000000000000000000000000000011110000110011001111111111110000000000", + }, + [6] = { + [7] = "0000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111000000000000000000000000000011111100", + [8] = "1100110011111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000001111000011001100111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000", + [9] = "0000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111000000000000000000000000000011111100", + }, + [7] = { + [7] = "0011001001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100", + [8] = "0000000000000000000001111000011001100111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111000000", + [9] = "0000000000000000000001111000011001100111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111000000", + }, + [8] = { + [7] = "0011001001111111111110000000000000000000000000000111100001100110111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000011110000000", + [8] = "0011001001111111111110000000000000000000000000000111100001100110111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000011110000000", + [9] = "0011001001111111111110000000000000000000000000000111100001100110111111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111100001100110011111111111100000000000000000000000000011110000000", + }, + [9] = { + [7] = "000000011111111000000000000000000001111111100001111111100000000000000000000111111100001111111100000000000000000001111111100001111111100000000000000000000111111110000111111100000", + [8] = "000000011111111000000000000000000001111111100001111111100000000000000000000111111100001111111100000000000000000001111111100001111111100000000000000000000111111110000111111100000", + [9] = "000000000000000111100000000111111110000000000000000000011110000000011111111000000000000000000011110000000011111110000000000000000000011110000000011111111000000000000000000011111", + }, + [10] = { + [7] = "00000000000000011110000000011111111000000000000000000001111000000001111111100000000000000000000111100000000111111100000000000000000001111000000001111111000000000000000000001111000000000", + [8] = "00000001111111100000000000000000000111111110000111111110000000000000000000011111111000011111111000000000000000000011111111000011111110000000000000000000111111110000111111110000000000000", + [9] = "11100000000000011110000000011111111000000000000000000001111000000001111111100000000000000000000111100000000111111100000000000000000001111000000001111111000000000000000000001111000000000", + }, + [11] = { + [7] = "000000011111111000000000000000000001111111100001111111100000000000000000000111111110000111111110000000000000000000011111111000011111111000000000000000000001111111111", + [8] = "000000000000000111100000000111111110000000000000000000011110000000011111111000000000000000000001111000000001111111100000000000000000000111100000000111111110000000000", + [9] = "000000000000000111100000000111111110000000000000000000011110000000011111111000000000000000000001111000000001111111100000000000000000000111100000000111111110000000000", + }, + [12] = { + [7] = "100001111111100000000000000000000111111110000111111110000000000000000000111111110000111111110000000000000000000011111111000011111111000000000000000000001111111100001111111100000000000000000001111111100001111111100000000000000000000000", + [8] = "000001111111100000000000000000000111111110000111111110000000000000000000111111110000111111110000000000000000000011111111000011111111000000000000000000001111111100001111111100000000000000000001111111100001111111100000000000000000000000", + [9] = "000001111111100000000000000000000111111110000111111110000000000000000000111111110000111111110000000000000000000011111111000011111111000000000000000000001111111100001111111100000000000000000001111111100001111111100000000000000000000000", + }, + [13] = { + [7] = "1111110000000000000000111100111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000011111100", + [8] = "1111110000000000000000111100111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000011111100", + [9] = "0000000001111001111110000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111110000000000", + }, + [14] = { + [7] = "0000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000001111001111100000000000000000011110011111100000000", + [8] = "1111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000011110011111100000000000000000111100111111000000000000000000111100", + [9] = "0000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000001111001111100000000000000000011110011111100000000", + }, + [15] = { + [7] = "11111100000000000000000011110011111100000000000000000011110011111100000000000000000011110011111100000000000000000111100111111000000000000000001111001111110000000000000000001110011111100000000000000000011110011111000000000000000000111100111111000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000", + [8] = "00000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111100000000000000000111100111111000000000000000000111100111111000000000000000001111001111110000000000000000011110011111100000000000000000011110111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000000", + [9] = "00000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111100000000000000000111100111111000000000000000000111100111111000000000000000001111001111110000000000000000011110011111100000000000000000011110111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000000", + }, + [16] = { + [7] = "0111111000000000000000000111100111111000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000011110011111100000000000000000", + [8] = "0111111000000000000000000111100111111000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000011110011111100000000000000000", + [9] = "0111111000000000000000000111100111111000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000011110011111100000000000000000", + }, + [17] = { + [7] = "0100000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001110011000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111001100000000000011110011000000000000111001100000000000011110011000000000000111100110000000000011110011000000000000111100110000000000001111001100000000000111101100000000000011100110000000000", + [8] = "0100000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001110011000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111001100000000000011110011000000000000111001100000000000011110011000000000000111100110000000000011110011000000000000111100110000000000001111001100000000000111101100000000000011100110000000000", + [9] = "0000111100100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000111100110000000000001111001100000000000111100110000000000001111001100000000000011110011000000000001111001100000000000011110011000000000000111001100000000000111100110000000000011111100", + }, + [18] = { + [7] = "000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000111100110000000000001111011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111011000000000000111100110000000000001111001100000000000011110011000000000000111101", + [8] = "110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100100000000000011110011000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000001111001100000000000011110011000000000000111100110000000000001111001100000000", + [9] = "000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000111100110000000000001111011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111011000000000000111100110000000000001111001100000000000011110011000000000000111100", + }, + [19] = { + [7] = "1000000000000111001100000000000011100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000", + [8] = "0001111001100000000000111100110000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000000", + [9] = "0001111001100000000000111100110000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000000", + }, + [20] = { + [7] = "0110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110010000000000111001000000000000111100110000000000001111001100000000000111100110000000000001111001000000000", + [8] = "0110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110010000000000111001000000000000111100110000000000001111001100000000000111100110000000000001111001000000000", + [9] = "0110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110011000000000000111100110000000000001111001100000000000011110010000000000111001000000000000111100110000000000001111001100000000000111100110000000000001111001000000000", + }, + [21] = { + [7] = "00011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000011110000110011111111111100000000000000", + [8] = "00011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000011110000110011111111111100000000000000", + [9] = "00000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111100000000000000000000000011110000110000", + }, + [22] = { + [7] = "00000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111000011001111111111110000000000000000000000001110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110", + [8] = "00110011111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000001111000011001111111111110000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000", + [9] = "00000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111000011001111111111110000000000000000000000001110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110", + }, + [23] = { + [7] = "00011001111111111110000000000000000000000111100001100111111111110000000000000000000000001111000011001111111111100000000000000000000001111000011001111111111110000000000000000000000001111000010011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000111100", + [8] = "00000000000000000001110000110011111111111000000000000000000000001111000011001111111111110000000000000000000000011110001101111111111110000000000000000000000001111000011001111111111110000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011100001100111111111111000000", + [9] = "00000000000000000001110000110011111111111000000000000000000000001111000011001111111111110000000000000000000000011110001101111111111110000000000000000000000001111000011001111111111110000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011110000110011111111111100000000000000000000000011100001100111111111111000000", + }, + [24] = { + [7] = "0011001111111111000000000000000000000000111100001100111111111111000000000000000000000000111100011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111100000000000000000000000011110000110011111111111100000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000", + [8] = "0011001111111111000000000000000000000000111100001100111111111111000000000000000000000000111100011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111100000000000000000000000011110000110011111111111100000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000", + [9] = "0011001111111111000000000000000000000000111100001100111111111111000000000000000000000000111100011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111110000000000000000000000001111000011001111111111100000000000000000000000011110000110011111111111100000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000000000000000000111100001100111111111111000000000", + }, + [25] = { + [7] = "011110011110011110011110000000000000000000000000000000011110011110011110011110111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000", + [8] = "011110011110011110011110000000000000000000000000000000011110011110011110011110111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000", + [9] = "000000000000000000000000011110011110011110011110011110000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110", + }, + [26] = { + [7] = "0000000000000000000000000111100111100111101111001111000000000000000000000000000000001111001111001111001111001111000000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100000", + [8] = "0111100111100111100111100000000000000000000000000000001111001111001111001111001111000000000000000000000000000000001111001111001111001111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000", + [9] = "0000000000000000000000000111100111100111101111001111000000000000000000000000000000001111001111001111001111001111000000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100000", + }, + [27] = { + [7] = "01111001111001111001111000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000011110011110011110011110000", + [8] = "00000000000000000000000001111001111001110011110011110000000000000000000000000000000011110111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100011110011110011110000000000000000000000000000", + [9] = "00000000000000000000000001111001111001110011110011110000000000000000000000000000000011110111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100111100111100111100000000000000000000000000000000111100111100011110011110011110000000000000000000000000000", + }, + [28] = { + [7] = "001111001111001111001111000000000000000000000000000000001111001111001111001111001111000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000111100111100111111", + [8] = "001111001111001111001111000000000000000000000000000000001111001111001111001111001111000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000111100111100111111", + [9] = "001111001111001111001111000000000000000000000000000000001111001111001111001111001111000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000111100111100111111", + }, + [29] = { + [7] = "111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000", + [8] = "111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000", + [9] = "111111000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111", + }, + [30] = { + [7] = "00000000000011111111110001111111111000000000000000000111111111100001111111111000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111", + [8] = "00000000111100000000000000000000000111111111100001111000000000000000000000000111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000", + [9] = "11110000000011111111110001111111111000000000000000000111111111100001111111111000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111", + }, + [31] = { + [7] = "111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111", + [8] = "000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000", + [9] = "111111000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000", + }, + [32] = { + [7] = "111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000", + [8] = "000000000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000", + [9] = "000000000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000000000000000000011111111110000111100000000", + }, + [33] = { + [7] = "00000000000000000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000011111111111111111111", + [8] = "00000000000000000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000011111111111111111111", + [9] = "00000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111100000000000000000000", + }, + [34] = { + [7] = "1111111111111111111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000001111111111111111111100000000000000000000111111111111111", + [8] = "1111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111110000000000000000000011111111111111111111000000000000000", + [9] = "0000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000001111111111111111111100000000000000000000111111111111111", + }, + [35] = { + [7] = "11111111111111100000000000000000001111111111111111111100000000000000000000111111111111111111100000000000000000000111111111111111111110000000000000000000111111111111111111110000000000000000000111111111111111111110000000000000000000011111", + [8] = "00000000000000011111111111111111110000000000000000000011111111111111111111000000000000000000011111111111111111111000000000000000000001111111111111111111000000000000000000001111111111111111111000000000000000000001111111111111111111100000", + [9] = "11111111111111111111111111111111110000000000000000000011111111111111111111000000000000000000011111111111111111111000000000000000000001111111111111111111000000000000000000001111111111111111111000000000000000000001111111111111111111100000", + }, + [36] = { + [7] = "111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111110000000000000000011111111111111110000000000000000000111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000011111111111111111110000000000000000000111111111111111111100000000000000", + [8] = "000000000000000000000000000000000011111111111111111111000000000000000000001111111111111111110000000000000000011111111111111110000000000000000000111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000011111111111111111110000000000000000000111111111111111111100000000000000", + [9] = "000000000000000000000000000000000011111111111111111111000000000000000000001111111111111111110000000000000000011111111111111110000000000000000000111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000000011111111111111111110000000000000000000111111111111111111100000000000000", + }, + [37] = { + [7] = "000000000000000111111111100000000001111111110000000001111111111000000001111111110000000000111111111100000000001111111111000000000011111111110000000001111111111000000000011111111110000000000111111111000000000011111111110000000000111111111100000000001111111111000000000011111111110000", + [8] = "000000000000000111111111100000000001111111110000000001111111111000000001111111110000000000111111111100000000001111111111000000000011111111110000000001111111111000000000011111111110000000000111111111000000000011111111110000000000111111111100000000001111111111000000000011111111110000", + [9] = "000001111111111000000000011111111110000000001111111110000000000111111110000000001111111111000000000011111111110000000000111111111100000000001111111110000000000111111111100000000001111111111000000000111111111100000000001111111111000000000011111111110000000000111111111100000000001111", + }, + [38] = { + [7] = "0000001111111111000000000011111111110000000000111111111100000000001111111110000000000111111111100000000001111111110000000000111111111100000000001111111111000000000011111111110000000000111111111100000000001111111111000000000011111111110000000000111111111100000000011111111110000000000111111111100000000001111111110000000000111111111100000000001111111111000000000111111111100000000001111111111000000000011111", + [8] = "0000000000000000111111111100000000001111111111000000000011111111110000000001111111111000000000011111111110000000001111111111000000000011111111110000000000111111111100000000001111111111000000000011111111110000000000111111111100000000001111111111000000000011111111100000000001111111111000000000011111111110000000001111111111000000000011111111110000000000111111111000000000011111111110000000000111111111100000", + [9] = "1111111111111111000000000011111111110000000000111111111100000000001111111110000000000111111111100000000001111111110000000000111111111100000000001111111111000000000011111111110000000000111111111100000000001111111111000000000011111111110000000000111111111100000000011111111110000000000111111111100000000001111111110000000000111111111100000000001111111111000000000111111111100000000001111111111000000000011111", + }, + [39] = { + [7] = "11110000000011111111110000000000111111111100000000011111111110000000000111111111100000000001111111111000000000011111111110000000000111111111100000000001111111110000000011111111100000000001111111111000000000011111111110000000001111111111000000000011111111110000000001111111111000000000011111111110000", + [8] = "00001111111100000000001111111111000000000011111111100000000001111111111000000000011111111110000000000111111111100000000001111111111000000000011111111110000000001111111100000000011111111110000000000111111111100000000001111111110000000000111111111100000000001111111110000000000111111111100000000001111", + [9] = "11111111111100000000001111111111000000000011111111100000000001111111111000000000011111111110000000000111111111100000000001111111111000000000011111111110000000001111111100000000011111111110000000000111111111100000000001111111110000000000111111111100000000001111111110000000000111111111100000000001111", + }, + [40] = { + [7] = "000000000000001111111111000000000111111110000000011111110000000001111111110000000011111111100000000011111111000000001111111110000000001111111111000000000011111111110000000001111111111000000000011111111100000000011111111100000000011111111110000000000111111111000000000011111111110000000001111111111000000000", + [8] = "111110000000001111111111000000000111111110000000011111110000000001111111110000000011111111100000000011111111000000001111111110000000001111111111000000000011111111110000000001111111111000000000011111111100000000011111111100000000011111111110000000000111111111000000000011111111110000000001111111111000000000", + [9] = "111110000000001111111111000000000111111110000000011111110000000001111111110000000011111111100000000011111111000000001111111110000000001111111111000000000011111111110000000001111111111000000000011111111100000000011111111100000000011111111110000000000111111111000000000011111111110000000001111111111000000000", + }, + [41] = { + [7] = "000000111110000001111110000011111000000111111000000111111000000111110000001111110000001111110000011111000000111110000001111110000001111100000011111100000011111100000011111100000011111100000011111100000011111000000000", + [8] = "000000111110000001111110000011111000000111111000000111111000000111110000001111110000001111110000011111000000111110000001111110000001111100000011111100000011111100000011111100000011111100000011111100000011111000000000", + [9] = "011111000001111110000001111100000111111000000111111000000111111000001111110000001111110000001111100000111111000001111110000001111110000011111100000011111100000011111100000011111100000011111100000011111100000111111111", + }, + [42] = { + [7] = "1111110000011111100000011111100000011111100000011111100000111111000000111111000000111110000001111100000011111100000011111100000011111100000011111100000011111100000011111100000011111100000011111100000011111000000111111000000111111000000111111000000111110000001111110000001111110000001111110000001111110000001111110000001111110000011111100000111111000000111111000000111111000000111111000000000", + [8] = "0000001111100000011111100000011111100000011111100000011111000000111111000000111111000001111110000011111100000011111100000011111100000011111100000011111100000011111100000011111100000011111100000011111100000111111000000111111000000111111000000111111000001111110000001111110000001111110000001111110000001111110000001111110000001111100000011111000000111111000000111111000000111111000000111111111", + [9] = "1111110000011111100000011111100000011111100000011111100000111111000000111111000000111110000001111100000011111100000011111100000011111100000011111100000011111100000011111100000011111100000011111100000011111000000111111000000111111000000111111000000111110000001111110000001111110000001111110000001111110000001111110000001111110000011111100000111111000000111111000000111111000000111111000000000", + }, + [43] = { + [7] = "00000011111100000011111100000011111100000111111000001111100000011111100000011111100000011111100000011111000001111110000001111100000011111000000111111000000111111", + [8] = "11111100000011111100000011111100000011111000000111110000011111100000011111100000011111100000011111100000111110000001111110000011111100000111111000000111111000000", + [9] = "01111100000011111100000011111100000011111000000111110000011111100000011111100000011111100000011111100000111110000001111110000011111100000111111000000111111000000", + }, + [44] = { + [7] = "11000011111100000011111100000011111100000111111000001111110000001111110000001111110000001111110000001111110000011111000000111111000000111110000001111000000111111000000111111000000111111000001111100000111111000000111111000000000", + [8] = "00000011111100000011111100000011111100000111111000001111110000001111110000001111110000001111110000001111110000011111000000111111000000111110000001111000000111111000000111111000000111111000001111100000111111000000111111000000000", + [9] = "00000011111100000011111100000011111100000111111000001111110000001111110000001111110000001111110000001111110000011111000000111111000000111110000001111000000111111000000111111000000111111000001111100000111111000000111111000000000", + }, + [45] = { + [7] = "01111011011100000000000000000000000001111001111001111001111000000000000000000000000011110011110011110011000000000000000000000000111001111001111001111000000000000", + [8] = "01111011011100000000000000000000000001111001111001111001111000000000000000000000000011110011110011110011000000000000000000000000111001111001111001111000000000000", + [9] = "00000000000000111101111001111001111000000000000000000000000001111001111001111011110000000000000000000000001111001100111100111100000000000000000000000001111001111", + }, + [46] = { + [7] = "0000000000000000000011110011110111001110000000000000000000000000111100111100111100111100000000000000000000000000111100111100111100111100000000000000000000000000111100111100111100111100000000000000000000011111111111111111110000000000000000000011111111111111000000000000001111111111111111111111111111111111111111111111111111111111100000000000000000000000111101111001110011110000000000000000000000000111101110011110011110000000000000000000000001110011100111100111100000000000000000000000111001111001110011110000000000000000000001111111111111111111000000000000000001111111111111111100000000000000000001111111111111111111111111111111111111111111111", + [8] = "0011110011110011110000000000000000000000011110011110011110011110000000000000000000000000111100111100111100111100000000000000000000000000111100111100111100111100000000000000000000000000111111111111111111100000000000000000001111111111111111111100000000000000111111111111110000000000000000000000000000000000000000000000000000000000011110011110011100111100000000000000000000000011110011110011100111100000000000000000000000111001111001111001111000000000000000000000001111001111001110011110000000000000000000000011111111111111111110000000000000000000111111111111111110000000000000000011111111111111111110000000000000000000000000000000000000000000000", + [9] = "0000000000000000000011110011110111001110000000000000000000000000111100111100111100111100000000000000000000000000111100111100111100111100000000000000000000000000111100111100111100111100000000000000000000011111111111111111110000000000000000000011111111111111000000000000001111111111111111111111111111111111111111111111111111111111100000000000000000000000111101111001110011110000000000000000000000000111101110011110011110000000000000000000000001110011100111100111100000000000000000000000111001111001110011110000000000000000000001111111111111111111000000000000000001111111111111111100000000000000000001111111111111111111111111111111111111111111111", + }, + [47] = { + [7] = "1011100111100111100000000000000000000111101111011100111000000000000000000000001111001111001111001111000000000000000000000111011110011110110000000000000000000000000011111111111111111110000000000000000000011111111111111111111000000000000000000011111111111111111111000000000000000000000000000000000000000000000000000000000111100111101111011100000000000000000000000111100111001110011100000000000000000000000111100111100111100111100000000000000000000000001111001110011100111100000000000000000000000000111111111111111111110000000000000000011111111111111111110000000000000000000011111111111111111100000000000000000000000000000000000000000000000011100111101100111000000000000000000", + [8] = "0000000000000000000111001110011101110000000000000000000001110111100111100111000000000000000000000000011100111001110011110000000000000000000011110011110011110011110000000000000000000001111111111111111111100000000000000000000111111111111111111100000000000000000000111111111111111111111111111111111111111111111111111111111000000000000000000000111100111011110011110000000000000000000000111100111101110011100000000000000000000000000111100111101111001111000000000000000000000000111100111100111100111100000000000000000000001111111111111111100000000000000000001111111111111111111100000000000000000011111111111111111111111111111111111111111111111100000000000000000011110011100111111", + [9] = "1000000000000000000111001110011101110000000000000000000001110111100111100111000000000000000000000000011100111001110011110000000000000000000011110011110011110011110000000000000000000001111111111111111111100000000000000000000111111111111111111100000000000000000000111111111111111111111111111111111111111111111111111111111000000000000000000000111100111011110011110000000000000000000000111100111101110011100000000000000000000000000111100111101111001111000000000000000000000000111100111100111100111100000000000000000000001111111111111111100000000000000000001111111111111111111100000000000000000011111111111111111111111111111111111111111111111100000000000000000011110011100111111", + }, + [48] = { + [7] = "001110011011100000000000000000000001111001111001111001111000000000000000000000000011110011110011110011110000000000000000000000011001111001110011100000000000000000000000011111111111111111110000000000000000111111111111111110000000000000000000011111111111111111100000000000000000000000000000000000000000000000000000011100111100111100111100000000000000000000000000111001110111100111000000000000000000000001110011110011110011110000000000000000000011110011110011110111100000000000000000000001111111111111111100000000000000000000111111111111111000000000000000000111111111111110000000000000000000000000", + [8] = "001110011011100000000000000000000001111001111001111001111000000000000000000000000011110011110011110011110000000000000000000000011001111001110011100000000000000000000000011111111111111111110000000000000000111111111111111110000000000000000000011111111111111111100000000000000000000000000000000000000000000000000000011100111100111100111100000000000000000000000000111001110111100111000000000000000000000001110011110011110011110000000000000000000011110011110011110111100000000000000000000001111111111111111100000000000000000000111111111111111000000000000000000111111111111110000000000000000000000000", + [9] = "001110011011100000000000000000000001111001111001111001111000000000000000000000000011110011110011110011110000000000000000000000011001111001110011100000000000000000000000011111111111111111110000000000000000111111111111111110000000000000000000011111111111111111100000000000000000000000000000000000000000000000000000011100111100111100111100000000000000000000000000111001110111100111000000000000000000000001110011110011110011110000000000000000000011110011110011110111100000000000000000000001111111111111111100000000000000000000111111111111111000000000000000000111111111111110000000000000000000000000", + }, + [49] = { + [7] = "0000000000000000000000000000000001111111111111111000000000000000000111111111111111100000000000000001111111111110000000000001111111111000000000001111111100000000011111110000001111110000011110000101100111100001111110000011111111000000001111111111000000000011111111111000000000001111111111110000000000011111111111111110000000000000011111111111111111100000000000000011111111111111111110000000000000000000011111111111111111000000000000000001111111111111111000000000000000011111111111100000000000001111111111110000000000001111111111000000000011111110000001111110001111000010011011110000111111000000111111110000000111111111000000000111111111111", + [8] = "0000000000000000000000000000000001111111111111111000000000000000000111111111111111100000000000000001111111111110000000000001111111111000000000001111111100000000011111110000001111110000011110000101100111100001111110000011111111000000001111111111000000000011111111111000000000001111111111110000000000011111111111111110000000000000011111111111111111100000000000000011111111111111111110000000000000000000011111111111111111000000000000000001111111111111111000000000000000011111111111100000000000001111111111110000000000001111111111000000000011111110000001111110001111000010011011110000111111000000111111110000000111111111000000000111111111111", + [9] = "0000000000000011111111111111111110000000000000000111111111111111111000000000000000011111111111111110000000000001111111111110000000000111111111110000000011111111100000001111110000001111100001111010011000011110000001111100000000111111110000000000111111111100000000000111111111110000000000001111111111100000000000000001111111111111100000000000000000011111111111111100000000000000000001111111111111111111100000000000000000111111111111111110000000000000000111111111111111100000000000011111111111110000000000001111111111110000000000111111111100000001111110000001110000111101100100001111000000111111000000001111111000000000111111111000000000000", + }, + [50] = { + [7] = "11111111111111111111111110000000000000001111111111111111100000000000000001111111111111111000000000001111111111111100000000000111111111111000000000011111111110000000011111111000001111110000111100100110000111100000011111100000001111111000000000011111111110000000000001111111111110000000000000111111111111000000000000000111111111111111111", + [8] = "11111111110000000000000001111111111111110000000000000000011111111111111110000000000000000111111111110000000000000011111111111000000000000111111111100000000001111111100000000111110000001111000011011001111000011111100000011111110000000111111111100000000001111111111110000000000001111111111111000000000000111111111111111000000000000000000", + [9] = "00000000001111111111111110000000000000001111111111111111100000000000000001111111111111111000000000001111111111111100000000000111111111111000000000011111111110000000011111111000001111110000111100100110000111100000011111100000001111111000000000011111111110000000000001111111111110000000000000111111111111000000000000000111111111111111111", + }, + [51] = { + [7] = "1111111111100000000000000000001111111111111111110000000000000000111111111111111000000000000000011111111111111000000000000011111111111000000000000111111111100000000001111111100000000111111000000111100001100110011110000111110000001111111000000001111111111000000000011111111111100000000000011111111111111", + [8] = "0000000000011111111111111111110000000000000000001111111111111111000000000000000111111111111111100000000000000111111111111100000000000111111111111000000000011111111110000000011111111000000111111000011110011001100001111000001111110000000111111110000000000111111111100000000000011111111111100000000000000", + [9] = "1111111111111111111111111111110000000000000000001111111111111111000000000000000111111111111111100000000000000111111111111100000000000111111111111000000000011111111110000000011111111000000111111000011110011001100001111000001111110000000111111110000000000111111111100000000000011111111111100000000000000", + }, + [52] = { + [7] = "111111111111110000000000000000111111111111111111000000000000000001111111111111111000000000000000011111111111111000000000000001111111111110000000000001111111110000000111111110000000011111100000111100001100110011110000111111000001111111100000000111111111100000000011111111111000000000000111111111111000000000000001111111111111110000000000000001111111111111111110000000000000000011111111111111111110000000000000000000111111111111111111000000000000000000111111111111110000000000000011111111111110000000000111111111111000000000001111111111000000000011111111000000011110000001100011001100111100001111110000001111111100000001111111111000000000111111111000000000000111111111111111", + [8] = "000000000000000000000000000000111111111111111111000000000000000001111111111111111000000000000000011111111111111000000000000001111111111110000000000001111111110000000111111110000000011111100000111100001100110011110000111111000001111111100000000111111111100000000011111111111000000000000111111111111000000000000001111111111111110000000000000001111111111111111110000000000000000011111111111111111110000000000000000000111111111111111111000000000000000000111111111111110000000000000011111111111110000000000111111111111000000000001111111111000000000011111111000000011110000001100011001100111100001111110000001111111100000001111111111000000000111111111000000000000111111111111111", + [9] = "000000000000000000000000000000111111111111111111000000000000000001111111111111111000000000000000011111111111111000000000000001111111111110000000000001111111110000000111111110000000011111100000111100001100110011110000111111000001111111100000000111111111100000000011111111111000000000000111111111111000000000000001111111111111110000000000000001111111111111111110000000000000000011111111111111111110000000000000000000111111111111111111000000000000000000111111111111110000000000000011111111111110000000000111111111111000000000001111111111000000000011111111000000011110000001100011001100111100001111110000001111111100000001111111111000000000111111111000000000000111111111111111", + }, + [53] = { + [7] = "11100000000000011111111000000000000001111111100000000000000001111111000000000000000111111100000000000000111111110000000000000000111111100000000000000111111110000000000000001111111100000000000000111111110000000000001111111000000000000011111110000000000000011111110000000000000001111110000000000000000", + [8] = "11100000000000011111111000000000000001111111100000000000000001111111000000000000000111111100000000000000111111110000000000000000111111100000000000000111111110000000000000001111111100000000000000111111110000000000001111111000000000000011111110000000000000011111110000000000000001111110000000000000000", + [9] = "11100011111000000000000000011111110000000000000001111111100000000000000011111110000000000000011111110000000000000000111111110000000000000011111110000000000000001111111100000000000000001111111000000000000001111110000000000000111111000000000000000111111000000000000000111111100000000000001111111100000", + }, + [54] = { + [7] = "000001111000000000011111000000000000011111111000000000001111111000000000000000111111110000000000000001111111000000000000000111111110000000000000011111111000000000000000111111110000000000000011111111000000000000011111111000000000000001111111100000000000000011111111000000000000000111111100000000000000111111000000000000000011111111", + [8] = "000000000000111100000000000111111000000000000000111110000000000000111111110000000000000000111111100000000000000011111110000000000000000111111100000000000000111111110000000000000000111111000000000000000111111000000000000000011111110000000000000001111111000000000000000011111111000000000000001111110000000000000011111111000000000000", + [9] = "000001111000000000011111000000000000011111111000000000001111111000000000000000111111110000000000000001111111000000000000000111111110000000000000011111111000000000000000111111110000000000000011111111000000000000011111111000000000000001111111100000000000000011111111000000000000000111111100000000000000111111000000000000000011111111", + }, + [55] = { + [7] = "10000000000000001111111100000000000000011111111000000000000000111111110000000000000001111111100000000000000111111100000000000000001111111100000000000000001111111100000000000000111111110000000000000000000", + [8] = "00000111111100000000000000001111111000000000000000011111110000000000000001111111100000000000000001111111100000000000001111111100000000000000001111111100000000000000011111110000000000000000111111100000000", + [9] = "10000111111100000000000000001111111000000000000000011111110000000000000001111111100000000000000001111111100000000000001111111100000000000000001111111100000000000000011111110000000000000000111111100000000", + }, + [56] = { + [7] = "00000000000000111111110000000000000001111111000000000000001111110000000000000000111111110000000000000001111111100000000000000", + [8] = "00000000000000111111110000000000000001111111000000000000001111110000000000000000111111110000000000000001111111100000000000000", + [9] = "00000000000000111111110000000000000001111111000000000000001111110000000000000000111111110000000000000001111111100000000000000", + }, + [57] = { + [7] = "0000001000000000000001111111111111100000000000001111111111111111000000000000001111111111111111000000000001111111111111110000000000000011111111111111111100000000000011111111111111111000000000000111111111111110000000000001111111111111111110000000000000111111111111111110000000000000111111111111111100000000000000111111111111111110000000000000000000", + [8] = "0000001000000000000001111111111111100000000000001111111111111111000000000000001111111111111111000000000001111111111111110000000000000011111111111111111100000000000011111111111111111000000000000111111111111110000000000001111111111111111110000000000000111111111111111110000000000000111111111111111100000000000000111111111111111110000000000000000000", + [9] = "0000001111111111111111100000000000111111111111111100000000000011111111111111111000000000000011111111111111100000000000111111111111111111000000000000001111111111111111000000000000011111111111111110000000000111111111111111100000000000000111111111111111110000000000000111111111111111100000000000000111111111111111110000000000000111111111111111111111", + }, + [58] = { + [7] = "0000000111111111111111110000000000001111111111111111110000000000000011111111111111110000000000000011111111111111110000000000000111111111111111000000000000111111111111111000000000000111111111111111110000000000001111111111111000000000000111111111111111110000000000000011111111111111110000000000000111111111111", + [8] = "0000000100000000000000111111111111111100000000000000111111111111111111000000000000111111111111111111000000000000111111111111111100000000000011111111111111100000000000011111111111111110000000000000111111111111111100000000001111111111111110000000000000111111111111111111000000000000011111111111111110000000000", + [9] = "1111111111111111111111110000000000001111111111111111110000000000000011111111111111110000000000000011111111111111110000000000000111111111111111000000000000111111111111111000000000000111111111111111110000000000001111111111111000000000000111111111111111110000000000000011111111111111110000000000000111111111111", + }, + [59] = { + [7] = "11111100000000000001111111111111111100000000000000111111111111111110000000000011111111111111100000000000000111111111111111110000000000000011111111111111110000000000011111111111111000000000000111111111111111100000000000001111111111111111100000000001111111111111111100000000000000111111111111111", + [8] = "00000111111111111111100000000000001111111111111111110000000000000011111111111110000000000001111111111111111110000000000000111111111111111111000000000000111111111111110000000000011111111111111100000000000001111111111111111100000000000001111111111111000000000000001111111111111111110000000000000", + [9] = "11111111111111111111100000000000001111111111111111110000000000000011111111111110000000000001111111111111111110000000000000111111111111111111000000000000111111111111110000000000011111111111111100000000000001111111111111111100000000000001111111111111000000000000001111111111111111110000000000000", + }, + [60] = { + [7] = "1111111111000000000011111111111111111000000000000001111111111111111110000000000001111111111111111110000000000000111111111111111110000000000000011111111111111111000000000001111111111111111100000000000000111111111111111111000000000000011111111", + [8] = "0000000011000000000011111111111111111000000000000001111111111111111110000000000001111111111111111110000000000000111111111111111110000000000000011111111111111111000000000001111111111111111100000000000000111111111111111111000000000000011111111", + [9] = "0000000011000000000011111111111111111000000000000001111111111111111110000000000001111111111111111110000000000000111111111111111110000000000000011111111111111111000000000001111111111111111100000000000000111111111111111111000000000000011111111", + }, + [61] = { + [7] = "000011100111100111100000000000000000000000000001111000011110011001111000000000000000000000001110011110011110011110000000000000000000000000001111000011110111100111100000000000000000000000011110001110011110011100000000000000000000000111100001100111100111100000000000000000000000011110000", + [8] = "000011100111100111100000000000000000000000000001111000011110011001111000000000000000000000001110011110011110011110000000000000000000000000001111000011110111100111100000000000000000000000011110001110011110011100000000000000000000000111100001100111100111100000000000000000000000011110000", + [9] = "000000000000000000000111100001111001111001111000000000000000000000000001110001110111001111000000000000000000000000011100001111001111001111000000000000000000000000000111100011110111100111000000000000000000000001100001110011110111100000000000000000000000000111100011110011110110000000000", + }, + [62] = { + [7] = "0000000000000000111000111011110011100000000000000000000000001110001110011110110000000000000000000000000011110000111100111100111100000000000000000000", + [8] = "0011001111001110000000000000000000000111000011100111100111000000000000000000000111000011110011110011110000000000000000000000000000111100001110011110", + [9] = "0000000000000000111000111011110011100000000000000000000000001110001110011110110000000000000000000000000011110000111100111100111100000000000000000000", + }, + [63] = { + [7] = "001100111101111000000000000000000000111100001111001111001111000000000000000000000000000111100011001111001110000000000000000000000000011110000111100111001111000000000000000000000000111000011110011110011110000000000000000000000000001111000011110011100111000000000000000000000000001111000111100111101111000000000000000000000000000111000011110011110000", + [8] = "000000000000000001100111101111001110000000000000000000000000001111000011110011100111100000000000000000000000011110001110011110011110000000000000000000000000001110001111001110111100000000000000000000000000011110001111001111001111000000000000000000000000001111000011110011100111000000000000000000000000001111000111100111100111100000000000000000000000", + [9] = "000000000000000001100111101111001110000000000000000000000000001111000011110011100111100000000000000000000000011110001110011110011110000000000000000000000000001110001111001110111100000000000000000000000000011110001111001111001111000000000000000000000000001111000011110011100111000000000000000000000000001111000111100111100111100000000000000000000000", + }, + [64] = { + [7] = "00011101101110000000000000000000000111001111001111001110000000000000000000000000000111100011110011110011100000000000000000000000111100001111001111001100000000000000000000000000001111000111100111100111100000000000000000000000001111000011100111100111100000000000000", + [8] = "00011101101110000000000000000000000111001111001111001110000000000000000000000000000111100011110011110011100000000000000000000000111100001111001111001100000000000000000000000000001111000111100111100111100000000000000000000000001111000011100111100111100000000000000", + [9] = "00011101101110000000000000000000000111001111001111001110000000000000000000000000000111100011110011110011100000000000000000000000111100001111001111001100000000000000000000000000001111000111100111100111100000000000000000000000001111000011100111100111100000000000000", + }, + [65] = { + [7] = "1110111001111000000000000000110111001111011110000000000000000011101111011100111100000000000000001110111100111001110000000000000000001110011110011110011000000000000011100111100111100111100000000000000011100111001110111000000000000001111001110011100110000000000000000000", + [8] = "1110111001111000000000000000110111001111011110000000000000000011101111011100111100000000000000001110111100111001110000000000000000001110011110011110011000000000000011100111100111100111100000000000000011100111001110111000000000000001111001110011100110000000000000000001", + [9] = "0000000001111001110011001111000000000000011110011100111100111100000000000000111100111001111001110000000000000001110011110011110011110000000000000000011001111011011100000000000000000111101110011110011100000000000000111001100111101110000000000000000110011110011100111111", + }, + [66] = { + [7] = "0000001100111100111101111000000000000000001111001111001111001111000000000000000001110011110011101110000000000000000011100111001111001111000000000000000111001110011110011110000000000000110011101111001111000000000000000000111100111100000", + [8] = "1011101100000000000000000111100111001111001111000000000000000000111001111001111001110000000000000001111001111001110011100000000000000000110011110011100111000000000000000001111011101110110000000000000000111100111100111100111100000000000", + [9] = "1111111100111100111101111000000000000000001111001111001111001111000000000000000001110011110011101110000000000000000011100111001111001111000000000000000111001110011110011110000000000000110011101111001111000000000000000000111100111100000", + }, + [67] = { + [7] = "11011011100000000000000110011101100111100000000000000000011110111100111100111000000000000000011100111101111001111000000000000000111100111101100111100000000000011011100111001100000000000011011100111011110000000000000011101101100110000000000000111011101111001111000000000000101", + [8] = "00000011101110111001111000000000000111100111100111100111100000000000000000111001111001110011100000000000000001111001110011101111000000000000000111100110111011100000000000001101110111011100000000000011110011110011011100000000000110011100111011000000000000001111011110111011000", + [9] = "00000011101110111001111000000000000111100111100111100111100000000000000000111001111001110011100000000000000001111001110011101111000000000000000111100110111011100000000000001101110111011100000000000011110011110011011100000000000110011100111011000000000000001111011110111011000", + }, + [68] = { + [7] = "0011111000000000000000001100110111111100000000000000001100110011111110000000000000000110010011111111000000000000000001100110011111100000000000000100110011111111000000000000", + [8] = "0000011110111111110000111111110000111110011111111000111111110000011111100111111110011111110000001111110011111111000011111110000011111011111110001111110000001111110111111001", + [9] = "0000000001001100111111000000000000000001100110011111000000000000000000011001100111100000000000000000001100110011111100000000000000000100101111110000000000000000001010011111", + }, + [69] = { + [7] = "00000000000001111111110001111001111111111110000111111111000011100011111111111111000111111111111000111000111111111111000011111111111100000000", + [8] = "11001110111101111111100000000000110000111001110111111110000000000001111000111100110111111111100000000000011000011100111011111111110000000000", + [9] = "11111111000001111111110001111001111111111110000111111111000011100011111111111111000111111111111000111000111111111111000011111111111100000000", + }, + [70] = { + [7] = "11100000000000000000000000000000000000000000000011100111000000000000000000000000000000000000000000000001110111100000000000000000000000000000000000000000011011000000000000000000000000000000000000000000011110110000000000000000000000000000000000000000000000000011100111000000000000000000000000000000000000000000000000111100111000000000000000000000011", + [8] = "00000000000000000000000000011110011111100000000000000000000000000000000000000000001110011111100000000000000000000000000000000000000000111101111110000000000000000000000000000000000000111101111110000000000000000000000000000000000000000000011110011110000000000000000000000000000000000000000000000011101111100000000000000000000000000000000000000000011", + [9] = "00000111100111100000000000000000000000000000000000000000011100110000000000000000000000000000000000000000000000000111101100000000000000000000000000000000000000001110111000000000000000000000000000000000000000000011110011110000000000000000000000000000000000000000000000011110011110000000000000000000000000000000000000000000000001110011110000000000011", + }, + [71] = { + [7] = "11000000000001111110000000000011111000000000001111000000000000001111110000000000001111100000000000000111100000000001111100000000000000011111000000000000011111100000000000000001111000000000000011111100000000000000", + [8] = "11000000011111111110000000011111111000000001111111000000000011111111110000000000111111100000000000111111100000001111111100000000000111111111000000000111111111100000000000011111111000000000111111111100000000001111", + [9] = "11000000000001111110000000000011111000000000001111000000000000001111110000000000001111100000000000000111100000000001111100000000000000011111000000000000011111100000000000000001111000000000000011111100000000000000", + }, + [72] = { + [7] = "0000000111111111111111111111111111110000011110000000000000000000000011111111111111111111111111110000111100000000000000000000000001111111111111111111111111110000011110000000000000000000000000011111111111111111111111111110000001100000000000000000000000000001111111111111111111111111111110000001110000000000000000000000011111111111111111111111111111000000111000000000000000000000000000111111111111111111111111111110000001110000000000000000000000000011111111111111111111111111111100000011110000000000000000000000000011111111111111111111111111111111000001110000000000000000000011111", + [8] = "1111111111111111111110000000000000000000011110000000001111111111111111111111111110000000000000000000111100000000001111111111111111111111111111100000000000000000011110000000000111111111111111111111111111110000000000000000000001100000000000011111111111111111111111111111110000000000000000000001110000000001111111111111111111111111111000000000000000000000111000000000000111111111111111111111111111110000000000000000000001110000000000001111111111111111111111111111100000000000000000000011110000000000111111111111111111111111111111110000000000000000000001110000000011111111111111111", + [9] = "0000000111111111111111111111111111110000011110000000000000000000000011111111111111111111111111110000111100000000000000000000000001111111111111111111111111110000011110000000000000000000000000011111111111111111111111111110000001100000000000000000000000000001111111111111111111111111111110000001110000000000000000000000011111111111111111111111111111000000111000000000000000000000000000111111111111111111111111111110000001110000000000000000000000000011111111111111111111111111111100000011110000000000000000000000000011111111111111111111111111111111000001110000000000000000000011111", + }, + [73] = { + [7] = "1111111111100000000001111111100000000000111111100000000001111111100000000000111111111100000000011111111100000000000111111111100000000001111111111000000000001111111100000000000111111111111111110", + [8] = "1111100000000000011111100000000000111111111000000000111111111000000000111111111100000000000011111110000000000111111111100000000000011111111000000000001111111111000000000011111111100000111100000", + [9] = "1111111111100000000001111111100000000000111111100000000001111111100000000000111111111100000000011111111100000000000111111111100000000001111111111000000000001111111100000000000111111111111111110", + }, + [74] = { + [7] = "0011111100000001111111000000111000000000000001111111000001111111000000111000000000000001111110000000111111000001110000000000000111111000000011111111000000001110000000000111111100000001111000000111100000000000000011111100000001111111000000001111000000000000000111111100000000111111", + [8] = "0011110000000000001111110000111000000000011111110000000000000111111100111000000000011111111000000000000111111001110000000001111110000000000000001111111100001110000000111111000000000000011110000111100000000000011111100000000000001111111100001111000000000001111111100000000000000000", + [9] = "0011111100000001111111000000111000000000000001111111000001111111000000111000000000000001111110000000111111000001110000000000000111111000000011111111000000001110000000000111111100000001111000000111100000000000000011111100000001111111000000001111000000000000000111111100000000111111", + }, + [75] = { + [7] = "1111111111111111111100000000000001111111111111110000000000000001111111111111111000000000000000111111111111111111000000000000000111111111111111111100000000000000011111111111111111111000000000000000011111111111111111000000000000000111", + [8] = "0000001000000000000111111111111111000000000000111111111111111111000000000000011111111111111111110000000000000011111111111111111110000000000000000111111111111111111000000000000000011111111111111111110000000000000011111111111111111111", + [9] = "1111111111111111111100000000000001111111111111110000000000000001111111111111111000000000000000111111111111111111000000000000000111111111111111111100000000000000011111111111111111111000000000000000011111111111111111000000000000000111", + }, + [76] = { + [7] = "1111111110000111111100000000000000000000111000111110000000000000000000000111100001111110000000000000000000001111000111111110000000000000000000111100011111111000000000000000000111000111110000000000000000000001111001111100000000000000000011110001111111000000000000000000011000111111110000", + [8] = "1111111110000111111100000000011111111111111000111110000000000111111111111111100001111110000000000111111111111111000111111110000000011111111111111100011111111000000000011111111111000111110000000000011111111111111001111100000000111111111111110001111111000000000011111111111000111111110000", + [9] = "1111111110000111111100000000000000000000111000111110000000000000000000000111100001111110000000000000000000001111000111111110000000000000000000111100011111111000000000000000000111000111110000000000000000000001111001111100000000000000000011110001111111000000000000000000011000111111110000", + }, + [77] = { + [7] = "1111100011110000000100110000011100110110111111100000111111000111111000000110011000000011111000111100111100111111111100000000001111111000111111100000000110011000000111110000111001111001111111111000000011111110001111110000000101000000", + [8] = "1100000000111111000000000011011100110110111111100011111000000000111111100000000001110011111000111100111100111111111100000011111110000000000011111110000000000001110111110000111001111001111111111000011111110000000001111110000000001111", + [9] = "1111100011110000000100110000011100110110111111100000111111000111111000000110011000000011111000111100111100111111111100000000001111111000111111100000000110011000000111110000111001111001111111111000000011111110001111110000000101000000", + }, + [78] = { + [7] = "000001111000000000011111111111111100000000011111111111110000000000111111111111111000000000111111111111111110000000001111111111111111100000000111111111111111000000000111111111111100000000011111111111000000111111111100000111111111100000001111111111000000", + [8] = "111111111111111111111100000000011111111111111100000001111111111111110000000000111111111111111100000000011111111111111111000000000111111111111111000000000111111111111111000000011111111111111100000111111111111000001111111110000001111111111100000011111111", + [9] = "000001111000000000011111111111111100000000011111111111110000000000111111111111111000000000111111111111111110000000001111111111111111100000000111111111111111000000000111111111111100000000011111111111000000111111111100000111111111100000001111111111000000", + }, + [79] = { + [7] = "000000000000000000000000000011111111111111111111000000000000000001111111111111111111100000000000000000000011111111111111111110000000000000000001111111111111111111100000000000000000000011111111111111000000000000000111111111111111000000000000000011111111111111110000000000000001111101", + [8] = "111000000001111000000000000000011111000000000000011111100000000000001111100000000000000111110000000000000000001111100000000000011111100000000000001111100000000000000111111000000000000000011111000000001111000000000000111100000000011110000000000000011110000000000111000000000000000111", + [9] = "000000000111111111111111111100000000000000000000111111111111111110000000000000000000011111111111111111111100000000000000000001111111111111111110000000000000000000011111111111111111111100000000000000111111111111111000000000000000111111111111111100000000000000001111111111111110000000", + }, + [80] = { + [7] = "0000000001010000000000101000000000001101100000000000000010010000000000000001100100000000000001001100000000000001010000000000000000010100000000000000010100000000011", + [8] = "1000010011111000010001111100000100111111110000001100001111111100000011000111111110000001100011111111000000100011111100000001100001111111000000110001111111000011000", + [9] = "0001011000000001011000000000010110000000000001101111000000000000011011100000000000001001110000000000001100110000000000011001111000000000000110111000000000001011111", + }, + [81] = { + [7] = "1111111100000000000111111111111100000000000111111111111100000000000111111111111000000000000001111111111110000000000000111111111111000000000000000111111111000000000011111111111110000000000000111111111111110000000000000111111111111111000000000000011111111111000000000000111111111111100000000000000111111111111100000000111111110000000000111111110001", + [8] = "0000011101111000001111000001111100111100001110000011111101110000011110000001111001111000000111100000011110011110000001111000011111001111000000011110000111011000000111110000011110111000000001111000001111110011100000011111100000111111011110000001111100001111011110000011110000011111100111000000011111000001111101100001110001110111000001110001110000", + [9] = "1111111111111111000000000111111111111111000000001111111111111110000000000111111111111111000000000001111111111111111000000001111111111111111100000000001111111111000000000001111111111111100000000000111111111111111100000000000011111111111111110000000000111111111111100000000001111111111111111000000000000111111111111000000011111111110000000011111110", + }, + [82] = { + [7] = "111000000001111100000000111111000000000011110000001111000000111110000000011111000000000111111100000000111111100000000111110000000111111000000000111110000000011111100000000001111100000000111110000000000111111110000000011111111000000001111000000001111110000000", + [8] = "011111000000011111000000000011111000000000111100000011110000001111100000000011111000000000011111100000000011111000000000111110000000111111000000000111100000000011111100000000001111110000000111111000000000011111110000000001111110000000011110000000011111110000", + [9] = "011111000000011111000000000011111000000000111100000011110000001111100000000011111000000000011111100000000011111000000000111110000000111111000000000111100000000011111100000000001111110000000111111000000000011111110000000001111110000000011110000000011111110000", + }, + [83] = { + [7] = "1100000000000000011111111000000000000111111110000000000000001111111000000000000000000111111100000000000000000011111100000000000001111111000000000000001111111110000000000000001111111110000000000000000111111111000000000000000111111100000000000000000011111111000000000000000011110", + [8] = "1111100000000000000001111111100000000000011111110000000000000000111111110000000000000000011111111100000000000000011111110000000000001111111000000000000000001111111000000000000000011111111100000000000000000111111110000000000000111111111000000000000000000111111111000000000000001", + [9] = "0000011111110000000000000000011111000000000000001111111100000000000000001111111100000000000000000011111110000000000000001111110000000000000111111100000000000000000111111100000000000000000011111110000000000000000001111111000000000000000111111111000000000000000000111111000000000", + }, + [84] = { + [7] = "000000000000011100000000000001110000000000000000011111110000000000011111111100000000000000111111111111110000000000000000000000011100000000000000011110000000000000001110000000000000000110000000000000001111111111100000000001111111111100000000000000000011100000000000001111000000000000001110000000000000000011111100000000000001111111111000000000000011111111111110000000000000000000000111000000000000011110000000000000011100000000000011000000000000000000111111111100000000000111111111110000000000000000000000000111000000", + [8] = "110000000111100011000000001110001111000000000011100000000000000000000000000011111111111111000000000000001111111111100000000000000011100000000011100001110000000001110001100000000001111001100000000000001111111111100000000001111111111100000000000000000000011000000011110000110000000001110001110000000000111100000000000000000000000000000111111111111100000000000001111111111110000000000000110000000001100001110000000011100011100000001100111100000000000000111111111100000000000111111111110000000000000000000000000000111111", + [9] = "000011100000000000001111000000000000000011100000000000000000000000011111111100000000000000111111111111110000000000000000000000000000000011100000000000000001111000000000000001111000000000000011110000000000000000011111111110000000000011111111000000000000000001110000000000000001110000000000000001110000000000000000000000000001111111111000000000000011111111111110000000000000000000000000000001110000000000000001100000000000000011000000000000011111000000000000000011111111111000000000001111111111111000000000000000000000", + }, + [85] = { + [7] = "000000000001111000111000111000000111111000000000000000000111110000011110001111100000111100001111111111111111110000111110000111100000011110001110000000000011100011100000000", + [8] = "111111100001111000111000111000000111111000000000000000000111110000011110001111100000111100001111111111111111110000111110000111100000011110001110000000000011100011100000000", + [9] = "000000011110000111000111000111111000000111111111111111111000001111100001110000011111000011110000000000000000001111000001111000011111100001110001111111111100011100011111111", + }, + [86] = { + [7] = "0000000001111000011111000011111100000111000111111111111111000001110000011110000011111000111100000000000000001110001110001111000011100001111111111111110000001110000011110000001111000111110000000000000000111000011110000011110000111110000111111111111111000001111110000011110000001111100001111", + [8] = "0000000000000111100000111100000011111000111000000000000000111110001111100001111100000111000011111111111111110001110001110000111100011110000000000000001111110001111100001111110000111000001111111111111111000111100001111100001111000001111000000000000000111110000001111100001111110000011110000", + [9] = "1111111111111000011111000011111100000111000111111111111111000001110000011110000011111000111100000000000000001110001110001111000011100001111111111111110000001110000011110000001111000111110000000000000000111000011110000011110000111110000111111111111111000001111110000011110000001111100001111", + }, + [87] = { + [7] = "1111111111111100001111110001111100001111000011110000000000000001111100001111110000001111110000011110000011111111111111111100000111110001111100001110000111110000000000000000011111000111110001111000011100001111111111111111000011111000111100001110000111100000", + [8] = "0000000000000011110000001110000011110000111100001111111111111110000011110000001111110000001111100001111100000000000000000011111000001110000011110001111000001111111111111111100000111000001110000111100011110000000000000000111100000111000011110001111000011110", + [9] = "1111111111111111110000001110000011110000111100001111111111111110000011110000001111110000001111100001111100000000000000000011111000001110000011110001111000001111111111111111100000111000001110000111100011110000000000000000111100000111000011110001111000011110", + }, + [88] = { + [7] = "11000000011011000000111011110000000110011110000000000111001110000011101100000000000111001110000000000000111001110000000111100111000000001110011100000000000011100111100000011110011110000000001111001111000000000011101110000000111011110000000000110111000000000001111", + [8] = "11000000011011000000111011110000000110011110000000000111001110000011101100000000000111001110000000000000111001110000000111100111000000001110011100000000000011100111100000011110011110000000001111001111000000000011101110000000111011110000000000110111000000000001111", + [9] = "00011011011011000000111011110000000000000000011101100111001110000011101100000000000000000000111100111100111001110000000111100111000000000000000000111001110011100111100000011110011110000000000000000000001110111011101110000000111011110000000000000000011100111001111", + }, + [89] = { + [7] = "10000111011011110111000011011100000000000000000011110111100111001111000000001111011100000000000000000000111011001111001110000000110011000000000000000001110111011100111000000111001111000000000000000000000011110111100111001110000000111101111000000000000001111011101101111", + [8] = "10110000000011110111000011011100000000111100110000000000000111001111000000001111011100000000001110011110000000001111001110000000110011000000111101111000000000011100111000000111001111000000000011110011110000000000000111001110000000111101111000000011101100000000001101111", + [9] = "10000111011011110111000011011100000000000000000011110111100111001111000000001111011100000000000000000000111011001111001110000000110011000000000000000001110111011100111000000111001111000000000000000000000011110111100111001110000000111101111000000000000001111011101101111", + }, + [90] = { + [7] = "00111000000000110110000011100111000000000000111001111000000000000001111001111000000001111001111000000000000111011110000000000000011001100000000111100111100000000001111011110000000000000111100111100000011110011110000000000111001110000000000011110011110000000111001111000000000011110011100000000001", + [8] = "00000011001110110110000011100111000000000000000000000001111001111001111001111000000001111001111000000000000000000000011110011110011001100000000111100111100000000000000000000011110111100111100111100000011110011110000000000000000000111001110011110011110000000111001111000000000000000000001100111111", + [9] = "00000011001110110110000011100111000000000000000000000001111001111001111001111000000001111001111000000000000000000000011110011110011001100000000111100111100000000000000000000011110111100111100111100000011110011110000000000000000000111001110011110011110000000111001111000000000000000000001100111110", + }, + [91] = { + [7] = "11111110011001100000000000000111100011101110000011111111111111110000111001110000000000000011100001110111000001111111111110000111011110000000000000000011110000110011110000011111111111111000011100111100000000000000000011110000111100111100000011111111111110000111001111000000000000000011110000111100111100001111111111111111", + [8] = "11111110011001100000000001111111100011101110000000001111111111110000111001110000000000111111100001110111000000001111111110000111011110000000000000011111110000110011110000000001111111111000011100111100000000000000111111110000111100111100000000001111111110000111001111000000000000111111110000111100111100000000111111111111", + [9] = "00000110011001100001111111111111100011101110000000000000000011110000111001110000111111111111100001110111000000000000001110000111011110000001111111111111110000110011110000000000000001111000011100111100000011111111111111110000111100111100000000000000001110000111001111000000111111111111110000111100111100000000000000001111", + }, + [92] = { + [7] = "11100000000000000000111111100000000000000000111111100000000000000000111111110000000000000000011111000000000000000111111000000000000000000011111111000000000000000000011111110000000000000000000011111110000000000000000001111110000000000000000000111111110000000000000000001111111100000000000000001111111100000000000000000001111111000000001", + [8] = "11100000000000000000111111100000000000000000111111100000000000000000111111110000000000000000011111000000000000000111111000000000000000000011111111000000000000000000011111110000000000000000000011111110000000000000000001111110000000000000000000111111110000000000000000001111111100000000000000001111111100000000000000000001111111000000001", + [9] = "11111110000000000000000000111111100000000000000001111111100000000000000000111111110000000000000001111100000000000000011111111000000000000000000011111111000000000000000000111111110000000000000000000111111100000000000000000111111100000000000000000000111111110000000000000000001111110000000000000000001111111100000000000000000011111111110", + }, + [93] = { + [7] = "00000000000000000000000000111110000000000000000000000000000111000000000000000000000000000111100000000000000000000000000011111000000000000000000000000001111110000000000000000000000000000011110000000000000000000000000111111000000000000000000000000000011111", + [8] = "11110000000000000000000000000111111100000000000000000000000001111100000000000000000000000000111111100000000000000000000000011111110000000000000000000000000111111100000000000000000000000000011111110000000000000000000000011111110000000000000000000000000000", + [9] = "00000001111110000000000000000000000000001111110000000000000000000000001111100000000000000000000000000001111100000000000000000000000001111100000000000000000000000000001111110000000000000000000000000000111100000000000000000000000000111111000000000000000000", + }, + [94] = { + [7] = "1111000000000001111000000000000000111111000000000000111111000000000000000111111000000000000001111100000000000000111100000000000001111100000000000000111110000000000000000111111000000000000011111100000000000011111100000000000001111110000000000001111100000000", + [8] = "0000001110111100000000011110011100000000000111001100000000000111100111100000000000011100111000000000111100111100000000001110011100000000011110111100000000000111100111100000000000111001110000000000001111011000000000011101111000000000000110111100000000001111", + [9] = "0000011110000000000001111110000000000000011111000000000000011111100000000000000001111100000000000001111100000000000000111110000000000000111110000000000000011111100000000000000001111000000000000000111111000000000001111100000000000000011110000000000000111111", + }, + [95] = { + [7] = "00000000000000111111111100000000000111111111100000000000111111111100000000111100111000000000000001111001110000000000001111001111000000000001111001111000000000000000000000000111001111000000000000111001111000000000001111001111000000000000111100111111000000000000011111111111100000000000011111111111100000000001111111111110000000000011111111111000000001111001111000000000000001111001111000000000000001101110000000000000111001111000000000000000000000011110111100000000011001111000000000001111001111000000000011110011111100000000000011111", + [8] = "11111000000000111111111100000000000111111111100000000000111111111100000000111100111000000000000001111001110000000000001111001111000000000001111001111000000000000000000000000111001111000000000000111001111000000000001111001111000000000000111100111111000000000000011111111111100000000000011111111111100000000001111111111110000000000011111111111000000001111001111000000000000001111001111000000000000001101110000000000000111001111000000000000000000000011110111100000000011001111000000000001111001111000000000011110011111100000000000011111", + [9] = "11111111111111000000000011111111111000000000011111111111000000000000000000000000000001111001111000000000000011110111000000000000001110111000000000000001111001111000000000000111001111000000000000111001111000000000001111001111000000000000111100111111000000000000000000000000011111111111100000000000011111111110000000000001111111111100000000000000000000000000000001111001111000000000000001111001111000000000011110111100000000000001110011100000000000011110111100000000011001111000000000001111001111000000000011110011111100000000000000000", + }, + [96] = { + [7] = "1111111111111111000000000011111111100000000001111111111100000000000000000000000000001110011110000000000011100111100000000000110011100000000000111100111000000000000111100111100000000000011001111000000000001111", + [8] = "1111100000000000111111111100000000011111111110000000000011111111111000000111001111000000000000011101110000000000000111001110000000000111001110000000000000000000000111100111100000000000011001111000000000001111", + [9] = "0000011111111111000000000011111111100000000001111111111100000000000000000000000000001110011110000000000011100111100000000000110011100000000000111100111000000000000111100111100000000000011001111000000000001111", + }, + [97] = { + [7] = "111100000011111111111000000000000111111111100000000001111111110000000011100111100000000000111001111000000000000001111011110000000000000011110111100000000000000000000011100111100000000001111001111000000000000111100111100000000000011110011111100000000000111111111111000000000001111111111100000", + [8] = "111111111100000000000111111111111000000000011111111110000000000000000000000000000110011100000000000001111001111000000000000011110011110000000000000111011100000000000011100111100000000001111001111000000000000111100111100000000000011110011111100000000000000000000000111111111110000000000011100", + [9] = "111111111100000000000111111111111000000000011111111110000000000000000000000000000110011100000000000001111001111000000000000011110011110000000000000111011100000000000011100111100000000001111001111000000000000111100111100000000000011110011111100000000000000000000000111111111110000000000011100", + }, + [98] = { + [7] = "0110011110000000001100010111100000000001110001100111000000000000000000000000000000000000000000000000000000000000111100001100111100000000111100001101111000000011110000110011110000000000000000000000000000000000000000000000000000000000111000011001111000000000011110000100111100000000001100100111100000000000000000000000000000000000000000000000000000111100001100111000000000000", + [8] = "0110011110000000001100010111100000000001110001100111000000000000000000000000000000000000000000000000000000000000111100001100111100000000111100001101111000000011110000110011110000000000000000000000000000000000000000000000000000000000111000011001111000000000011110000100111100000000001100100111100000000000000000000000000000000000000000000000000000111100001100111000000000000", + [9] = "0000000000000000000000000000000000000000000000000000111000011001111000000000111100001001111000000001110000110011000000000000000000000000000000000000000000000000000000000000001110000110011110000000001100010110000000001111000011001111000000000000000000000000000000000000000000000000000000000000011100010011000000011100011001100000000001100011001111000000000000000000000000000", + }, + [99] = { + [7] = "00000000000000000000000000000000000000000000011110001100111100000000011110000110111100000000111100001100111000000000000000000000000000000000000000000000000000000000000000111100001001110000000001111000011001110000000011100001100111100000000000000000000000000000000000000000000000000000000000000111100011001110000000", + [8] = "01011000001110001101110000000011100001100111100000000000000000000000000000000000000000000000000000000000000111100001011110000000001111000011001111000000000111000011001111000000000000000000000000000000000000000000000000000000000000011110000110111000000001111100001001111000000000111100011001111000000000000000000000", + [9] = "00000000000000000000000000000000000000000000011110001100111100000000011110000110111100000000111100001100111000000000000000000000000000000000000000000000000000000000000000111100001001110000000001111000011001110000000011100001100111100000000000000000000000000000000000000000000000000000000000000111100011001110000000", + }, + [100] = { + [7] = "0001011110000000000111100011011100000000001111000010011100000000000000000000000000000000000000000000000000000000000000111100001011110000000011100001100111100000000001111000011001111000000000000000000000000000000000000000000000000000000000000000111100001100111100000000001111000011011110000000000111000011001111000000000000000000000000000000000000000000000000000000000000000001110001100110000000111001101110", + [8] = "0000000000000000000000000000000000000000000000000000000011110000110011110000000001111001100111000000001111000011001111000000000000000000000000000000000000000000000000000000000000000111100001100111100000000011110001100111000000000011110000100111000000000000000000000000000000000000000000000000000000000000000000111100001100111100000000001111000011011110000000000111000011001110000000000000000000000000000000", + [9] = "0000000000000000000000000000000000000000000000000000000011110000110011110000000001111001100111000000001111000011001111000000000000000000000000000000000000000000000000000000000000000111100001100111100000000011110001100111000000000011110000100111000000000000000000000000000000000000000000000000000000000000000000111100001100111100000000001111000011011110000000000111000011001110000000000000000000000000000000", + }, + [101] = { + [7] = "001001100000001110001101110000000011100011001110000000000000000000000000000000000000000000000000000000000111100011001110000000001111000011001111000000001110001100111000000000000000000000000000000000000000000000000000000000000011000010011100000000111100001100111100000000001110001100111000000000000000000000000000000000000000000000000000000000000011110001100111100000000001111000010011111", + [8] = "001001100000001110001101110000000011100011001110000000000000000000000000000000000000000000000000000000000111100011001110000000001111000011001111000000001110001100111000000000000000000000000000000000000000000000000000000000000011000010011100000000111100001100111100000000001110001100111000000000000000000000000000000000000000000000000000000000000011110001100111100000000001111000010011111", + [9] = "001001100000001110001101110000000011100011001110000000000000000000000000000000000000000000000000000000000111100011001110000000001111000011001111000000001110001100111000000000000000000000000000000000000000000000000000000000000011000010011100000000111100001100111100000000001110001100111000000000000000000000000000000000000000000000000000000000000011110001100111100000000001111000010011111", + }, + [102] = { + [7] = "1111111111100000000000000000001111111111111111100000000000000000111111111111110000000000000011111111111100000000000001111111111110000000000011111111110000000000111111110000000011111100000011110001110011110011110011110111100000000000000000000000000000011110000111111000000111111110000000011111111110000000000111111111111000000000000111111111111110000000000000011111111111110000000000000000111111111111111111000000000000000000111111111111111111100000000000000000001111111111111111100000000000000000011111111111111000000000000000111111111111110000000000000011111111111100000000000011111111000000000111111100000000111111000000011110000111100111100111100111100111100000000000000000000000001111000011111100000111111110000", + [8] = "1111111111100000000000000000001111111111111111100000000000000000111111111111110000000000000011111111111100000000000001111111111110000000000011111111110000000000111111110000000011111100000011110001110011110011110011110111100000000000000000000000000000011110000111111000000111111110000000011111111110000000000111111111111000000000000111111111111110000000000000011111111111110000000000000000111111111111111111000000000000000000111111111111111111100000000000000000001111111111111111100000000000000000011111111111111000000000000000111111111111110000000000000011111111111100000000000011111111000000000111111100000000111111000000011110000111100111100111100111100111100000000000000000000000001111000011111100000111111110000", + [9] = "1111111111111111111111111111110000000000000000011111111111111111000000000000001111111111111100000000000011111111111110000000000001111111111100000000001111111111000000001111111100000011111100001110000000000000000000000000000111100111100111100111100111100001111000000111111000000001111111100000000001111111111000000000000111111111111000000000000001111111111111100000000000001111111111111111000000000000000000111111111111111111000000000000000000011111111111111111110000000000000000011111111111111111100000000000000111111111111111000000000000001111111111111100000000000011111111111100000000111111111000000011111111000000111111100001111000000000000000000000000000000111101100111100111001110000111100000011111000000001111", + }, + [103] = { + [7] = "0000000000000111111111111111111110000000000000000011111111111111111000000000000000011111111111111110000000000000011111111111111000000000000111111111111000000000011111111110000000011111111000011111100001111000000000000000000000000000011110011110011100111100111100001111000000111110000000011111110000000001111111111000000000111111111110000000000111111111111100000000000000001111111111111110000000000000001111111111111111110000000000000000000011111111111111111110000000000000000001111111111", + [8] = "0000000000000000000000000000000001111111111111111100000000000000000111111111111111100000000000000001111111111111100000000000000111111111111000000000000111111111100000000001111111100000000111100000011110000111100111100111100110011110000000000000000000000000000011110000111111000001111111100000001111111110000000000111111111000000000001111111111000000000000011111111111111110000000000000001111111111111110000000000000000001111111111111111111100000000000000000001111111111111111110000000000", + [9] = "1111111111111111111111111111111110000000000000000011111111111111111000000000000000011111111111111110000000000000011111111111111000000000000111111111111000000000011111111110000000011111111000011111100001111000000000000000000000000000011110011110011100111100111100001111000000111110000000011111110000000001111111111000000000111111111110000000000111111111111100000000000000001111111111111110000000000000001111111111111111110000000000000000000011111111111111111110000000000000000001111111111", + }, + [104] = { + [7] = "11111111111100000000000000001111111111111111110000000000000001111111111111100000000001111111110000000000001111111111110000000000011111111110000000000111111110000000111111000001111000111100111100111100111100111100000000000000000000000000000011110000111111000000111111110000000001111111111000000000011111111111100000000000011111111111111100000000000000111111111111110000000000000000111111111111111100000000000000000111111111111111111100000000000000000000111111111111111111000000000000000011111111111111110000000000000001111111111111100000000000000111111111100000000000111111111100000000011111110000000111111000000111100001111001111001111001111001111000000000000000000000000001100011111100000011111110000000111111111000", + [8] = "00000000000011111111111111110000000000000000001111111111111110000000000000011111111110000000001111111111110000000000001111111111100000000001111111111000000001111111000000111110000111000000000000000000000000000000111100111100111100111100111100001111000000111111000000001111111110000000000111111111100000000000011111111111100000000000000011111111111111000000000000001111111111111111000000000000000011111111111111111000000000000000000011111111111111111111000000000000000000111111111111111100000000000000001111111111111110000000000000011111111111111000000000011111111111000000000011111111100000001111111000000111111000011110000000000000000000000000000011110011100111001110011110011100000011111100000001111111000000000111", + [9] = "11111111111111111111111111110000000000000000001111111111111110000000000000011111111110000000001111111111110000000000001111111111100000000001111111111000000001111111000000111110000111000000000000000000000000000000111100111100111100111100111100001111000000111111000000001111111110000000000111111111100000000000011111111111100000000000000011111111111111000000000000001111111111111111000000000000000011111111111111111000000000000000000011111111111111111111000000000000000000111111111111111100000000000000001111111111111110000000000000011111111111111000000000011111111111000000000011111111100000001111111000000111111000011110000000000000000000000000000011110011100111001110011110011100000011111100000001111111000000000111", + }, + [105] = { + [7] = "0000000000000000000000000000001111111111111111110000000000000001111111111111110000000000001111111111110000000001111111111000000001111111100000000111110000011111000001110011101101111011100111000000000000000000000000001110011100001111100000111111100000111111111100000000111111111100000000000011111111100000000000111111111111110000000000000000111111111111111100000000000000111111111111111100000000", + [8] = "1111111111111100000000000000001111111111111111110000000000000001111111111111110000000000001111111111110000000001111111111000000001111111100000000111110000011111000001110011101101111011100111000000000000000000000000001110011100001111100000111111100000111111111100000000111111111100000000000011111111100000000000111111111111110000000000000000111111111111111100000000000000111111111111111100000000", + [9] = "1111111111111100000000000000001111111111111111110000000000000001111111111111110000000000001111111111110000000001111111111000000001111111100000000111110000011111000001110011101101111011100111000000000000000000000000001110011100001111100000111111100000111111111100000000111111111100000000000011111111100000000000111111111111110000000000000000111111111111111100000000000000111111111111111100000000", + }, + [106] = { + [7] = "00000011110000000000000111100011111000000000000000000000000001111111100000000111111111000000000111111100000000000111111111111100000000000001111111111100000000000000000000000000000111111111111100000000000111111111111110000000000001111", + [8] = "00000011110000000000000111100011111000000000000000000000000001111111100000000111111111000000000111111100000000000111111111111100000000000001111111111100000000000000000000000000000111111111111100000000000111111111111110000000000001111", + [9] = "00000000001111100011111000000000000111111100111111100000000001111111100000000111111111000000000111111100000000000000000000000011111111111110000000000011111111111100000000000000000111111111111100000000000111111111111110000000000001111", + }, + [107] = { + [7] = "110000111110000111111000111100001111000000111110000011111100001111110000011111000001111110000001111011110111001100111101111001110011001101111000111110000111000011111000000111110000111110000011111000111111000001111110000001111110000001111110000001111001101101110011110111101110011011110111100001111100000111110000111100000111111000001111000000111100000111100000111100011111000011111", + [8] = "110000111110000111111000111100001111000000111110000011111100001111110000011111000001111110000001111011110111001100111101111001110011001101111000111110000111000011111000000111110000111110000011111000111111000001111110000001111110000001111110000001111001101101110011110111101110011011110111100001111100000111110000111100000111111000001111000000111100000111100000111100011111000011111", + [9] = "111111000001111000000111000011110000111111000001111100000011110000001111100000111110000001111111111011110111001100111101111001110011001101111000000001111000111100000111111000001111000001111100000111000000111110000001111110000001111110000001111111111001101101110011110111101110011011110111100000000011111000001111000011111000000111110000111111000011111000011111000011100000111100000", + }, + [108] = { + [7] = "11111000011111100011111000011111100000111110000001111100000111111000001111110000001110000011111111101111001111001111001111001111001110011110011110111000000111100001111110000011111000001111100000111100000111111000001111110000111110000001111000000111111101111011110011110011100111101110111100111100111100000000011111100000011111100000011111100000111110000001111110000001111110000001111110000000", + [8] = "10000111100000011100000111100000011111000001111110000011111000000111110000001111110001111100000111101111001111001111001111001111001110011110011110111001111000011110000001111100000111110000011111000011111000000111110000001111000001111110000111111000011101111011110011110011100111101110111100111100111100001111100000011111100000011111100000011111000001111110000001111110000001111110000001111111", + [9] = "01111000011111100011111000011111100000111110000001111100000111111000001111110000001110000011111111101111001111001111001111001111001110011110011110111000000111100001111110000011111000001111100000111100000111111000001111110000111110000001111000000111111101111011110011110011100111101110111100111100111100000000011111100000011111100000011111100000111110000001111110000001111110000001111110000001", + }, + [109] = { + [7] = "00011111000011111000001111110000011111000011111000001111110000011100000111111000011111000001110110011100110111101110011001110111100110000111100000111110000011111000011110001111000011110000111111000", + [8] = "11100000111100000111110000001111100000111100000111110000001111100011111000000111100000111111110110011100110111101110011001110111100110000000011111000001111100000111100001110000111100001111000000000", + [9] = "11100000111100000111110000001111100000111100000111110000001111100011111000000111100000111111110110011100110111101110011001110111100110000000011111000001111100000111100001110000111100001111000000000", + }, + [110] = { + [7] = "0111110000111110000001111100000111000001111000001111000011111000001110000011111000011001111011011110011100111011110110111011110001111100000111100001111000000111111000001111110001111100000111111000001111000011111100000111100000011101111011100110110110011011110111101110000111100000111111000001111000111100001110000111", + [8] = "0111110000111110000001111100000111000001111000001111000011111000001110000011111000011001111011011110011100111011110110111011110001111100000111100001111000000111111000001111110001111100000111111000001111000011111100000111100000011101111011100110110110011011110111101110000111100000111111000001111000111100001110000111", + [9] = "0111110000111110000001111100000111000001111000001111000011111000001110000011111000011001111011011110011100111011110110111011110001111100000111100001111000000111111000001111110001111100000111111000001111000011111100000111100000011101111011100110110110011011110111101110000111100000111111000001111000111100001110000111", + }, + [111] = { + [7] = "11111111111000000000001111111111111100000000000001111111110000000000000011111111111111000000000000001111111111000000000000011111111111100000000000001111111111111111000000000000000111111111111111000000000000000011111111111111110000000000000001111111111111110000000", + [8] = "11111000000000000011110000000000000000000011111110000000000000001111111100000000000000000000001111110000000000000000111111100000000000000000011111110000000000000000000000001111111000000000000000000000001111111100000000000000000000000111111110000000000000000000000", + [9] = "11111000000111111111110000000000000011111111111110000000001111111111111100000000000000111111111111110000000000111111111111100000000000011111111111110000000000000000111111111111111000000000000000111111111111111100000000000000001111111111111110000000000000001111110", + }, + [112] = { + [7] = "111100111100000000000000000000011100111100111111000111100111011110000000000000000000001100111001111001110111001110000000000000000000111011100111111100001110011101110000000000000000011101101111111000111011100111000000000000000001100111101111110000111100111001111000000000000000000000001111001110011111111000111101110", + [8] = "000000000000000000000000000000011100111100111111000000000000000000000000000000000000001100111001111000000000000000000000000000000000111011100111111100000000000000000000000000000000011101101111111000000000000000000000000000000001100111101111110000000000000000000000000000000000000000001111001110011111111000000000000", + [9] = "000000000000001111001111011100011100111100111111000000000000000000000111001111001110001100111001111000000000000000001100111001110000111011100111111100000000000000000011001110011100011101101111111000000000000000001110011011100001100111101111110000000000000000000000011110011100111100001111001110011111111000000000000", + }, + [113] = { + [7] = "1111001101110000000000001111001111011110011110000000000011110011001110111000000000000001110111100111001111000000000000111001111001111001111000000001110111101101110000000011110110111001100000000000110111001101111", + [8] = "1111001101110000000000001111001111011110011110000000000011110011001110111000000000000001110111100111001111000000000000111001111001111001111000000001110111101101110000000011110110111001100000000000110111001101111", + [9] = "0000001101110011100111000000000000011110011110111001110000000000001110111001111001111000000000000111001111001111011100000000000001111001111001101100000000001101110110110000000000111001101111001110000000001101111", + }, + [114] = { + [7] = "1111110000000000011111111111000000000001111111111110000000000000111111100000000000000000111000111001111011111000000111111111110000000000011111111111100000000000111111111111100000000000111111110000000000000000001100011101101111111110000000111111111111000000000011111111111000000000000011111111111000000000000111111100000000000", + [8] = "1111111111111111100000000000111111111110000000000001111111111111000000011111111111111100111000111001111011111000000000000000001111111111100000000000011111111111000000000000011111111111000000001111111111111111001100011101101111111110000000000000000000111111111100000000000111111111111100000000000111111111111000000011111111111", + [9] = "1111110000000000011111111111000000000001111111111110000000000000111111100000000000000000111000111001111011111000000111111111110000000000011111111111100000000000111111111111100000000000111111110000000000000000001100011101101111111110000000111111111111000000000011111111111000000000000011111111111000000000000111111100000000000", + }, + [115] = { + [7] = "101110001111100000010101111000111111000000011010011111001111110000000011011001111100011111111000000011001011111000111111000000011011011111100001111110000000110110111111000011111110000000000110010011110001111100000011010111100111111000000010110111000111111000000011", + [8] = "100011110011111011011100001111000111111011011110000001110001111100110011111000001111100001111111010011111000011111001111111011011111000001111110001111110010111110000011111100011111111001100111110000011110011111010011110000111000111111001011110001111000111111001011", + [9] = "000000001010011100011110000000100110111100011111100000001101101111000011111110000000011001100111100011111100000000101100111100011111100000000001101101111100111111000000000011011001111110000111111100000001011011100011111000000110100111110011111000000100110111110011", + }, + [116] = { + [7] = "11000000000001111000000000111110000000000001111100000000000011100000000000111110000000000000111111000000000000011100000000000001111000000000000111100000000000011111100000000000001111110000000000000011110000000000111110000000000000011110000000000000001111000000000111100000000000000111110000000000011111000000000000001111100000000000000111110000000000011110000000000000001111000", + [8] = "11111110000000001111100000000011111100000000001111110000000000111100000000000011111100000000000011111110000000000111111000000000001111100000000000111111000000000001111111000000000000111111100000000000111111000000000111111110000000000011111110000000000001111000000001111111100000000000111110000000000011111111000000000000111111000000000000111111000000000011111100000000000000000", + [9] = "00000000011110000000000111000000000000011110000000000000111100000000011111000000000000011111000000000000000111100000000000111110000000000111111000000000000111100000000000000011110000000000000001111100000000000111000000000000001111100000000000000111110000000000111000000000000001111000000000001111100000000000000111110000000000000011111000000000000111100000000000001111110000000", + }, + [117] = { + [7] = "0000111100000000000111000000000111100000000001110000000000111100000000000111100000000011110000000000011110000000000001110000000000001111000000000000111100000000001111000000000001111000000000001111000000000001111000000000001111000000000001111000000000011110000000000111100000000000111100000000000011110000000000001111", + [8] = "1111000000000001111000000001111000000000001110000000000111000000000000111000000000001100000000000011100000000000011110000000000011110000000000001111000000000000110000000000001110000000000011110000000000011110000000000011110000000000001110000000000011100000000001111000000000000111000000000000111100000000000011110000", + [9] = "0000000011110000000000110000000000011100000000001110000000000011110000000000011110000000001111000000000001111000000000001111000000000000111100000000000011110000000000111100000000000111100000000000111000000000000111100000000000111100000000000111000000000001110000000000011110000000000011110000000000001111000000000000", + }, + [118] = { + [7] = "1111111110000000000000000000000000000011111111111000000000000000000000000000011111111111110000000000000000000000000000000000111111111111111111000000000000000000000000000000000000000111111111111111111000000000000000000000000000111110", + [8] = "0000000011111000000000000000000000111110000000001111100000000000000000001111110000000000111111110000000000000000000000011111110000000000000011111111100000000000000000000000000111111110000000000000011111100000000000000000001111100001", + [9] = "0000000000000001111111111111110000000000000000000000000111111111111111000000000000000000000000000011111111111111111000000000000000000000000000000000000111111111111111111110000000000000000000000000000000001111111111111111000000000000", + }, + [119] = { + [7] = "00000000001100000000000000111100000000000000000001111000000000000000000111000000000000000000001110000000000000000000111100000000000000000111000000000000000000001111000000000000000000111100000000000000000001111000000000000000000001111000000000000", + [8] = "10000000110011000000001111000011110000000000011110000111000000000001111000111100000000000011110001110000000000001111000011110000000000111000111100000000000011110000111100000000001111000011110000000000011110000111100000000000011110000111100000000", + [9] = "00011000000000001100000000000000000000111000000000000000000111100000000000000000001111000000000000000000111100000000000000000001110000000000000000001111000000000000000000001110000000000000000000111100000000000000000001111000000000000000000000000", + }, + [120] = { + [7] = "111000000000000000000000000000000000111100111100000000000000000000000000000000000001111001110000000000000000000000000000000000000111100111100000000000000000000000000000000000111100111000000000000000000000000000000000001111001111000000000000000000000000000000000000111100111000000000000000000000", + [8] = "000000000000000111100111100000000000000000000000000000000001111001111000000000000000000000000000000000000011110011110000000000000000000000000000000000011110011100000000000000000000000000000000000111100111100000000000000000000000000000000000011110111100000000000000000000000000000000000011100000", + [9] = "000000000000000000000000001110011110000000000000000000000000000000000001111001111000000000000000000000000000000000000111100111100000000000000000000000000000000000111100111100000000000000000000000000000000000111001111000000000000000000000000000000000000111100111100000000000000000000000000000001", + }, + [121] = { + [7] = "00000011111111111110000000000000011111111110000000000000111111111111000000000000111111111111000000000001111111111110000000000000000111111111111111000000000000000111111111111111000000000000000111111111111111000000000000000111111111111111000000000000001111111", + [8] = "00111111111111110000000000000011111111100000000000000111111111111100000000000011111111111000000000001111111111110000000000000001111111111111110000000000000001111111111111111000000000000001111111111111110000000000000001111111111111110000000000000011111111000", + [9] = "11111111110000000000001111111111111000000000001111111111111000000000000011111111111000000000000111111111110000000000000111111111111111000000000000000011111111111111100000000000000111111111111111100000000000000111111111111111100000000000000011111111111111000", + }, + [122] = { + [7] = "11111111110000000000000111111111000000000000111111111111000000000001111111111111100000000000000111111111111110000000000000011111111111111110000000000000011111111111110000000000001111111111000000000000111", + [8] = "01111111111111000000000001111111111000000000000111111111110000000000001111111111111110000000000000111111111111111000000000000001111111111111111000000000000011111111111110000000000011111111111100000000000", + [9] = "00000001111111111111000000000111111111111000000000000111111111110000000000000111111111111110000000000000011111111111111000000000000000011111111111111100000000000001111111111111000000000111111111111000000", + }, + [123] = { + [7] = "1111111100000000000000111111111111110", + [8] = "1111111111100000000000000011111111111", + [9] = "0000011111111111110000000000000011111", + }, + [124] = { + [7] = "01111110000000000000000000000000011111111111000000011111111111110000000000000000000000111111111111000000011111111111110000000000000000000000000111111111111000000011111111111100000000000000000000000111111111111111100000000", + [8] = "11111111110000000000000000000011111111111000000000000111111111111100000000000000000111111111111000000000000001111111111110000000000000000000111111111111000000000000111111111111000000000000000001111111111111111000000000000", + [9] = "10000111111111110000001111111111111100000000000000000000000001111111111100000111111111110000000000000000000000000011111111111111000001111111111110000000000000000000000000011111111110000001111111111111100000000000000000000", + }, + [125] = { + [7] = "000000000000000011111111111000000001111111000000001111111100000000001111111000000001111111111100000000000011111111100000000001111110111100", + [8] = "000011111111111100000000000111111110000000111111110000000011111111110000000111111110000000000011111111110011111111100000000001111110111100", + [9] = "000011111111111100000000000111111110000000111111110000000011111111110000000111111110000000000011111111110000000000011111111110000000000000", + }, + [126] = { + [7] = "000000000000111100111000000000000001100111000000000000001111001111000000000000011110011110000000000000011110011110000000000000110111100000000000110111000000000000011100111100000", + [8] = "000000000000000000000001111001111001100111000000000000000000000000011110011110011110011110000000000000000000000000011110011100110111100000000000000000001111001111011100111100111", + [9] = "111100111100111100111000000000000000000000001111001111001111001111000000000000000000000000011110011110011110011110000000000000000000000111011100110111000000000000000000000000000", + }, + [127] = { + [7] = "001100110111111110000000000000000000000011100101011111111111000000000000000000000000001111000010011011111111111100000000000000000000000000111000110010011111111111000000000000000000000011100011010011111111110000000000000000000000111001101", + [8] = "000011001111111100000000000000000000000001110010111111111100000000000000000000000000000011110001100111111111110000000000000000000000000000011110001101111111111100000000000000000000000000111000101111111111100000000000000000000000001100001", + [9] = "000000000000000001111000100100111111111100000000000000000000111100011001101111111111110000000000000000000000000011100001101100111111111111000000000000000000000000111000011001101111111100000000000000000000001111001101100111111111000000000", + }, + [128] = { + [7] = "110011101100111100111100000000000000000000000000000001111001111001111001110011100111100000000000000000000000000011101110011100110011110111000000000000", + [8] = "110011101100111100111100000000000000000000000000000001111001111001111001110011100111100000000000000000000000000011101110011100110011110111000000000001", + [9] = "000000000000000000000011110011110011101110111110011110000000000000000000000000000000011111001100110111011100111100000000000000000000000000111011111000", + }, + [129] = { + [7] = "00000000000000000011100111001110111101110011110000000000000000000000000000000111100111001110111100111100111100000000000000000000000000000000011100111001111110011110", + [8] = "11001101101100111100000000000000000000000000001110011110011110011110111001111000000000000000000000000000000011100111100111100111100111100111100000000000000000000000", + [9] = "00000000000000000011100111001110111101110011110000000000000000000000000000000111100111001110111100111100111100000000000000000000000000000000011100111001111110000000", + }, + [130] = { + [7] = "0111001111001111001111000000000000000000000000000000000011110011110011110011110111100111100000000000000000000000000111011100111101110011110011100000000000000000000000000000000001111100111100111100111100000011110", + [8] = "0000000000000000000000111100111100111100111100111100111100000000000000000000000000000000011001111001111001110110111000000000000000000000000000011110011110011110011110011110011110000000000000000000000000000011110", + [9] = "0000000000000000000000111100111100111100111100111100111100000000000000000000000000000000011001111001111001110110111000000000000000000000000000011110011110011110011110011110011110000000000000000000000000000011110", + }, + [131] = { + [7] = "01111011110011110011110000000000000000000000000001110110111011001111011100000000000000000000110011101100111100111011100000000000000000000000000001110110111001100110111000000000000000000000000000110111101110011001110011000000000000000000000", + [8] = "01111011110011110011110000000000000000000000000001110110111011001111011100000000000000000000110011101100111100111011100000000000000000000000000001110110111001100110111000000000000000000000000000110111101110011001110011000000000000000000000", + [9] = "01111011110011110011110000000000000000000000000001110110111011001111011100000000000000000000110011101100111100111011100000000000000000000000000001110110111001100110111000000000000000000000000000110111101110011001110011000000000000000000000", + }, + [132] = { + [7] = "00111000000000000001111100001111100000000000011111000111111000000000000000000111111000011111100000000000000000011111100001111110000000000000111111000011111100000000000", + [8] = "00111000000000000001111100001111100000000000011111000111111000000000000000000111111000011111100000000000000000011111100001111110000000000000111111000011111100000000000", + [9] = "00000011111000011110000000000000001111000111100000000000000001111110000111111000000000000000000111111000011111100000000000000000111110001111000000000000000000111110000", + }, + [133] = { + [7] = "00000000001111100001111100000000001111110000111111000000000000000011111000111110000000000000001111000111110", + [8] = "00001111000000000000000011100011100000000000000000111110000111110000000000000001111000011111000000000000000", + [9] = "00000000001111100001111100000000001111110000111111000000000000000011111000111110000000000000001111000111110", + }, + [134] = { + [7] = "001111110000000000000000111110000111111000000000000000111100011100000000000000011111001111", + [8] = "000000000011111000111111000000000000000001111100011111000000000000111110011111100000000000", + [9] = "000000000011111000111111000000000000000001111100011111000000000000111110011111100000000000", + }, + [135] = { + [7] = "000011111000000000000000011111100001111100000000000000011111100001111110000000000000000011111100001111100000000000000000011111000011111100000000000000000111111000011111000000000000000011111100001111100000000000000001", + [8] = "000011111000000000000000011111100001111100000000000000011111100001111110000000000000000011111100001111100000000000000000011111000011111100000000000000000111111000011111000000000000000011111100001111100000000000000001", + [9] = "000011111000000000000000011111100001111100000000000000011111100001111110000000000000000011111100001111100000000000000000011111000011111100000000000000000111111000011111000000000000000011111100001111100000000000000000", + }, + [136] = { + [7] = "1100000000001110011100000000001111011100000000001110011100000000111001110000000000001110000", + [8] = "1100000000001110011100000000001111011100000000001110011100000000111001110000000000001110000", + [9] = "0001110011110000000000111100110000000001110011110000000000111011000000000011110011110000000", + }, + [137] = { + [7] = "000011100111000000000001111001110000000000001111001111000000000000111100111100000000000011110011110", + [8] = "111000000000111100111000000000001111001111000000000000111100111100000000000011110011110000000000000", + [9] = "000011100111000000000001111001110000000000001111001111000000000000111100111100000000000011110011110", + }, + [138] = { + [7] = "01110000000000111001110000000000001111001110000000000111101110000000111100111000000000011001100000000111001111", + [8] = "00000011001111000000000011110011110000000000011100111000000000110111000000000001111001100000001100111000000000", + [9] = "00000011001111000000000011110011110000000000011100111000000000110111000000000001111001100000001100111000000000", + }, + [139] = { + [7] = "01110000000000111001110000000001111001111000000000001111001100000000011001111000000000011100111000000000111011100000000011110011000000000001111011", + [8] = "01110000000000111001110000000001111001111000000000001111001100000000011001111000000000011100111000000000111011100000000011110011000000000001111011", + [9] = "01110000000000111001110000000001111001111000000000001111001100000000011001111000000000011100111000000000111011100000000011110011000000000001111011", + }, + [140] = { + [7] = "001110001110000110000111100011100001111000111000011110001111000011110000111000011110000111100001111000011000110011100111000111100011100011000011110000111001111000011100111100001110001111001111", + [8] = "001110001110000110000111100011100001111000111000011110001111000011110000111000011110000111100001111000011000110011100111000111100011100011000011110000111001111000011100111100001110001111001111", + [9] = "001110001110000110000111100011100001111000111000011110001111000011110000111000011110000111100001111000011000110011100111000111100011100011000011110000111001111000011100111100001110001111001111", + }, +} + +leds_WarningPatterns = { + [1] = { + [5] = "00000000000000000000000000000000000000000111111111111111111100000000000000000000111111111111111111110000000000000000000011111111111111111", + [6] = "00000000000000000000011111111111111111111000000000000000000011111111111111111111000000000000000000001111111111111111111100000000000000011", + }, + [2] = { + [5] = "11111111111111111111111111111111111111111111111111", + [6] = "111111111111111111111111111111111111111111111111110", + }, + [3] = { + [5] = "000000000000000000000000000000000000000000000000000000000000000000000000", + [6] = "000000000000000000000000000000000000000000000000000000000000000000000000", + }, + [4] = { + [5] = "0011110000111100111100000000000000000000000111100111100001111001111000000000000000000000000111100111100001110", + [6] = "0000000000000000000011110011110000111100111000000000000000000000000111100111100001111001111000000000000000000", + }, + [5] = { + [5] = "1111000011110011110000000000000000000001111001111000111100111100000000000000000000000111100111100001111001111", + [6] = "1111000011110011110000000000000000000001111001111000111100111100000000000000000000000111100111100001111001111", + }, + [6] = { + [5] = "00010011001111111111110000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111000000", + [6] = "00000000000000000000001100001101001111111111000000000000000000000000000011110000110011001111111111110000000000000000000000000000111110", + }, + [7] = { + [5] = "000110011001111111111110000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111111", + [6] = "000110011001111111111110000000000000000000000000111100001100110011111111111100000000000000000000000000001111000011001100111111111111111", + }, + [8] = { + [5] = "1100011111111000000000000000000011111100001111111100000000000000000000111111110000111111110000000000000000000111111110001111100000000000000000011111110000111111000000000000000011111110011111100000000000000000000111111111", + [6] = "1100000000000111100000000111111100000000000000000011110000000011111111000000000000000000001111000000001111111000000000000000011100000000111111100000000000000000110000001111111100000000000000011110000000011111111000000000", + }, + [9] = { + [5] = "1100001111111111000000000000001111111000011111111110000000000000001111111100011111111110000000000000000111111110000111111111111000000000000000011111111000011111111111100000000000000", + [6] = "0000001111111111000000000000001111111000011111111110000000000000001111111100011111111110000000000000000111111110000111111111111000000000000000011111111000011111111111100000000000000", + }, + [10] = { + [5] = "0011111100000000000000000011110011111000000000000111100111111000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000001111001111110000000000000000", + [6] = "0000000000001111001111110000000000000000110011110000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111000000000000000000111100111111", + }, + [11] = { + [5] = "00000000000000001111001111100000000000000001111001111110000000000000000001111001111110000000000000000001111001111100000000000000000111100111111000000000000000001111001111110000000000000000011110011111100000000000000011100111111", + [6] = "00000000000000001111001111100000000000000001111001111110000000000000000001111001111110000000000000000001111001111100000000000000000111100111111000000000000000001111001111110000000000000000011110011111100000000000000011100111111", + }, + [12] = { + [5] = "0000000000111100110000000000001111001100", + [6] = "1111001100000000000011110011000000000000", + }, + [13] = { + [5] = "111100110000000000001111001100000000000011110011000000000000", + [6] = "111100110000000000001111001100000000000011110011000000000000", + }, + [14] = { + [5] = "000110011111111110000000000000000000011000110111111111100000000000000000000000011100001100111111111111000000000000000000000001111000011001111111111110000000000000000000", + [6] = "000000000000000001110001100111111111100000000000000000011110000110011111111111100000000000000000000000111100011001111111111110000000000000000000000001111000011001111111", + }, + [15] = { + [5] = "000010111111111100000000000000000110011001111111111100000000000000000000000111100001100111111111110000000000000000000000011110000110011111111111100000000000000000000000111100001100111111111111000000000000000000000001111000011001111111111100000000000000000000", + [6] = "000010111111111100000000000000000110011001111111111100000000000000000000000111100001100111111111110000000000000000000000011110000110011111111111100000000000000000000000111100001100111111111111000000000000000000000001111000011001111111111100000000000000000000", + }, + [16] = { + [5] = "011110111001111001111000000000000000000000000000001110011110011110011110011110000000000000000000000000000001111001111001111001111001111000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011100000000000", + [6] = "000000000000000000000001110011110011001111001111000000000000000000000000000000011110011110011110011001111000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000011110011110011110011110011110000000000000000000000000000000111001111", + }, + [17] = { + [5] = "0111011110011110011110000000000000000000000000000111100111100111100111100111100000000000000000000000000001111001111001111001111001111000000000000000000000000000000011001111001111111", + [6] = "0111011110011110011110000000000000000000000000000111100111100111100111100111100000000000000000000000000001111001111001111001111001111000000000000000000000000000000011001111001111111", + }, + [18] = { + [5] = "111100011100000000000000000000001111110001111000000000000000000000000111111111000011110000000000000000000000001111111111000011110000000000000000000000001111111111000011110000000000000000000001111111100011100000000000000000000111111111100001110000000000000000000000011111111100011000", + [6] = "111100000011111111000011111111110000000000000111111111100001111111111000000000000000001111111111000011111111110000000000000000001111111111000011111111110000000000000000001111111110000111111110000000000000011111111000011111111000000000000000001111111111000011111111100000000000000111", + }, + [19] = { + [5] = "0000000111100000000000000000000000111111111000111100000000000000000000000011111111110000111100000000000000000000000011111111100001110000000000000000000000011111111110001111000000000000000000000001111111111000011110000000000000000000000111111111100001110000000000000000011111111100001111000000000000", + [6] = "1111100111100000000000000000000000111111111000111100000000000000000000000011111111110000111100000000000000000000000011111111100001110000000000000000000000011111111110001111000000000000000000000001111111111000011110000000000000000000000111111111100001110000000000000000011111111100001111000000000000", + }, + [20] = { + [5] = "00000000000000111111111111111111000000000000000011111111111111111000000000000000001111111111111111111100000000000000000001111111111111111111100000000000000000000111111111111111111100000000000000000000111111111111111110000000000000000000011111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000", + [6] = "00000000000000111111111111111111000000000000000011111111111111111000000000000000001111111111111111111100000000000000000001111111111111111111100000000000000000000111111111111111111100000000000000000000111111111111111110000000000000000000011111111111111111110000000000000000000011111111111111111111000000000000000000001111111111111111111100000000", + }, + [21] = { + [5] = "000000000111111111100000000011111111000000000111111111100000000001111111111000000000011111111100000000001111111111000000000111111111100000000001111111111000000000011111111110000000000111111111000000000000", + [6] = "011111111000000000011111111100000000111111111000000000011111111110000000000111111111100000000011111111110000000000111111111000000000011111111110000000000111111111100000000001111111111000000000111111111111", + }, + [22] = { + [5] = "000001111111110000000000111111111100000000111111111100000000001111111110000000001111111111000000000011111111110000000000111111111000000001111111111000000000111111111100000000001111111111000000000011111111110000000", + [6] = "111111111111110000000000111111111100000000111111111100000000001111111110000000001111111111000000000011111111110000000000111111111000000001111111111000000000111111111100000000001111111111000000000011111111110000000", + }, + [23] = { + [5] = "00000111111000001111110000011111000011111000001111100000011111100000111111000000111111000000111111000000111111000000111111000001111110000001111110000001111110000001111110000001111110000001111110000001111110000001111110000001111110000001111110000001111110000", + [6] = "01111000000111110000001111100000111100000111110000011111100000011111000000111111000000111111000000111111000000111111000000111110000001111110000001111110000001111110000001111110000001111110000001111110000001111110000001111110000001111110000001111110000001111", + }, + [24] = { + [5] = "0111110000011111100000111111000000111000011111000001111110000001111110000001111110000001111110000001111110000001111100000011111100000111111000000111111000001111100000011111100000011111100000111111000001111110000001111100000111111000001111110000001111110000001111100000011111100000111111000000", + [6] = "1111110000011111100000111111000000111000011111000001111110000001111110000001111110000001111110000001111110000001111100000011111100000111111000000111111000001111100000011111100000011111100000111111000001111110000001111100000111111000001111110000001111110000001111100000011111100000111111000000", + }, + [25] = { + [5] = "01110011011110000000000000000000000111011110111011110000000000000000000000001111001111001111001111000000000000000000000000001111001111001111001111000000000000000000000000011111111111111111110000000000000000001111111111111111111000000000000000000001111111111111111111100000000000000000000000000", + [6] = "00000000000000011110011110011110110000000000000000000111100111100111100111100000000000000000000000001111001111001111001111000000000000000000000000001111011110011110011110000000000000000000001111111111111111110000000000000000000111111111111111111110000000000000000000011111111111111111111111111", + }, + [26] = { + [5] = "001111011100111100000000000000000000000011101110011110011110000000000000000000000000011110011110011110011110000000000000000000000001110111100111100111100000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100111100111100111100000000000000000000000001110011101100111100000000000000000000000011100111101111001110000000000000000000000011110011110011110011110000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110011110011100111100000000000000000000000111111", + [6] = "001111011100111100000000000000000000000011101110011110011110000000000000000000000000011110011110011110011110000000000000000000000001110111100111100111100000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100111100111100111100000000000000000000000001110011101100111100000000000000000000000011100111101111001110000000000000000000000011110011110011110011110000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110011110011100111100000000000000000000000111111", + }, + [27] = { + [5] = "11111111100000000000000000001111111111111110000000000000000111111111111111110000000000000000111111111111110000000000000000111111111111110000000000000111111100000000011111111000000001111110000011100001100110111100001111110000001111111000000001111111111000000000011111111111100000000000111111111111100000000000011111111111110000000000000001111111111111110000000000000001111111111111110000000000000111111111111111100000000000000011111111111111000000", + [6] = "11111111111111111111111111110000000000000001111111111111111000000000000000001111111111111111000000000000001111111111111111000000000000001111111111111000000011111111100000000111111110000001111100011110011001000011110000001111110000000111111110000000000111111111100000000000011111111111000000000000011111111111100000000000001111111111111110000000000000001111111111111110000000000000001111111111111000000000000000011111111111111100000000000000111111", + }, + [28] = { + [5] = "00000000011111111111111100000000000011111111111100000000001111111111111100000000000111111111111100000000000111111110000000001111111100000011111110000111111000111001011001110001111000000011111110000000111111100000000111111110000000000001111111111111000000000000011111111111111100000000000011111111111110000000000000001111111111111100000000000011111111111100000000000000011111111110000000011111111100000001111111100000000111111100000000", + [6] = "11111111111111111111111100000000000011111111111100000000001111111111111100000000000111111111111100000000000111111110000000001111111100000011111110000111111000111001011001110001111000000011111110000000111111100000000111111110000000000001111111111111000000000000011111111111111100000000000011111111111110000000000000001111111111111100000000000011111111111100000000000000011111111110000000011111111100000001111111100000000111111100000000", + }, + [29] = { + [5] = "00000000000000111111110000000000000111111000000000000001111110000000000000011111111000000000000000111111100000000000000011111111000000000000001111111000000000000000111111000000000011111000000000000011111100000000000001111111100000000000001111110000000000000011111111110", + [6] = "00001111110000000000000001111110000000000001111111100000000000000111111100000000000000011111110000000000000001111111000000000000000011111100000000000000111111110000000000001111100000000000011111100000000000011111110000000000000011111110000000000001111111100000000000000", + }, + [30] = { + [5] = "000000001111110000000000111110000000000011111100000000000011111100000000000000111111000000000000011111100000000011111100000000000000111111000000000000011111111000000000000111111100000000000011111111000000000000000111101", + [6] = "000000001111110000000000111110000000000011111100000000000011111100000000000000111111000000000000011111100000000011111100000000000000111111000000000000011111111000000000000111111100000000000011111111000000000000000111111", + }, + [31] = { + [5] = "1100111001110000000000000000001110011101110111000000000000000011110011110011110011110000000000000000001111011110011110011110000000000000000111100111100111100111100000000000000000011110011110011110011110000000000000000011100111100111100111100000000000000000011110011110011110011110000000000000000001111001111100111100111100000000000000000111100111100111001111000000000000000111101111001111001111000000000000000000111100111100111100111100000000000000000000111100111100111100111100000000000000001111001111001111000111100000000000000000011110011110011110011110000000000000000001111001111100111100000", + [6] = "1111111111110011110011110011110000000000000111001111011110011100000000000000000011110011110011110011110000000000000000011110011100111001111000000000000000000111100111100111100111100000000000000000011110011110011110011100000000000000000111100111100111100111100000000000000000011110011110011110011110000000000000000000111100111101111001111000000000000000001111011110011110111000000000000000001111001111001111001111000000000000000000111100111100011111001111000000000000000000111100111101110011110000000000000000000111100111100111100111100000000000000000011110011110011110011110000000000000000000000", + }, + [32] = { + [5] = "000000000100000000000000111111111111111100000000000001111111111111111110000000000000111111111111111100000000000000011111111111111111000000000000001111111111111110000000000001111111111111100000000000000011111111111111110000000000000011111111111111111100000000000011111111111111100000000000000001111111111111111110", + [6] = "000000000111111111111111110000000000000111111111111111100000000000000111111111111111110000000000001111111111111111110000000000000001111111111111111100000000000011111111111111100000000000111111111111111110000000000000111111111111111111000000000000001111111111111110000000000000111111111111111111100000000000000000", + }, + [33] = { + [5] = "0111011001110000000000000000000001100011101110111000000000000000000000000011100001110011100111100000000000000000000000000001110001111001111011110000000000000000000000000000111100001111001111001111000000000000000000000000000011110000111100111100111100000000000000000000000000011110000111100111100111100000000000000", + [6] = "0000000000000011100011110011101100000000000000000001110000111001110011110000000000000000000000000111100001111001111001111000000000000000000000000011110000111100111100111100000000000000000000000000001111000011110011110011110000000000000000000000000000111100001111001111011110000000000000000000000000000111100011100", + }, + [34] = { + [5] = "011011011100000000000000000000000011000111011110111100000000000000000000000011100001111001111001110000000000000000000000000111000011110011110011100000000000000000000000011110000111100111100111100000000000000000000000000011110000111100111101111000000000000000000000000000011110000110111001110000000000000000000111001110111100111000", + [6] = "011011011100000000000000000000000011000111011110111100000000000000000000000011100001111001111001110000000000000000000000000111000011110011110011100000000000000000000000011110000111100111100111100000000000000000000000000011110000111100111101111000000000000000000000000000011110000110111001110000000000000000000111001110111100111000", + }, + [35] = { + [5] = "0011110110000000000000000000011100111100111110001110011100111100000000000000000000000111001111001111111100011110111100111100000000000000000000011110011110011111111000111100111100111100000000000000000000001110011110011111111000011110111101111000000000000000000000011100111101111111100001110011110011110000000000000000000000011100111100111111110000111100111100111100000000000000000000000111001110011111000011110011100111100000000000000000011110011100111111000011110011110011110000000000000000000000111001111001111111000011110", + [6] = "0000000000001111011100111100011100111100111110000000000000000000001111001111011110000111001111001111111100000000000000000000001111011100111100011110011110011111111000000000000000000000001110011100111100001110011110011111111000000000000000000000111001111001111000011100111101111111100000000000000000000001111001111001111000011100111100111111110000000000000000000000001111001111001110000111001110011111000000000000000000000001101111011000011110011100111111000000000000000000000001111011110011110000111001111001111111000000000", + }, + [36] = { + [5] = "11110011100110000000000011110011101101110000000000011110011110011100111100000000000001110011110011100111000000000000001111001111001111001111000000000000001111001111001111001111000000000000001110011110011110011110000000000000011110011111001110011110000000000000011110011110011110011110000000000000111101111001111100111100000000000000111100111100111100111100000000000001111011100111100111100000000000001111001111001111011100000000000001111001111001111011110000000", + [6] = "00000011100110111100111000000000001101110111001110000000000000011100111101111001111000000000000011100111001111001111000000000000001111001111001111001111000000000000001111001111001111001111000000000000011110011110011110011110000000000000001110011110011110011110000000000000011110011110011100111100000000000001111100111100111100111100000000000000111100111100111101111000000000000111100111100111001111000000000000001111011100111100111000000000000001111011110011110", + }, + [37] = { + [5] = "0011110011110011111111111000000000000000000000011110001111001111001111111111000000000000000000000111100011110011101111111111100000000000000000000000011110000111100111100111111111110000000000000000000000111000011110011110011111111111100000000000000000000001110001110111100111111111100000000000000000000001110000111001111001111111111110000000000000000000111100001110111101111111111100000000000000000000011100011100111011111", + [6] = "0011110011110011111111111000000000000000000000011110001111001111001111111111000000000000000000000111100011110011101111111111100000000000000000000000011110000111100111100111111111110000000000000000000000111000011110011110011111111111100000000000000000000001110001110111100111111111100000000000000000000001110000111001111001111111111110000000000000000000111100001110111101111111111100000000000000000000011100011100111011111", + }, + [38] = { + [5] = "11111111111111100000111111000011111000001111110000001111110000000000000000000001111100000011111100000011111100000011111100000011111111111111111111100000011111100000011111100000011110000011111110000000000000", + [6] = "11111111111111111111000000111100000111110000001111110000001111111111111111111110000011111100000011111100000011111100000011111100000000000000000000011111100000011111100000011111100001111100000001111111111111", + }, + [39] = { + [5] = "0111000000000000111011110000000111001111000000000001111000111100000000000000111101100000001111011110000000000011100111100000000000000111100111100000000111100111100000000000011111001111000000000000001111001111000000011110111100000000000001111001111000000000000001111001111000000011110001111000000000000111100111100000000000000111100111100000000111100111110000000000001111001111000000000000001111001110000000011101111000000000000000111000000000000011110011100000000111101110000000000111100111100000000000001111011110000000000000000000000000000000011100000000", + [6] = "0000001111011100111011110000000111001111000000000000000000000000111100111100111101100000001111011110000000000000000000000111100111100111100111100000000111100111100000000000000000000000001111001111001111001111000000011110111100000000000000000000000001111001111001111001111000000011110001111000000000000000000000000111100111100111100111100000000111100111110000000000000000000000001111001111001111001110000000011101111000000000000000000000000000000000000011100000000000001110000000000000000000000000000000001111011110000000011100000000000000000000000000111111", + }, + [40] = { + [5] = "000000011111100000000000000000000110000001111110000000000000000000111111000000111111100000000000000000000011000000011111100000000000000000000011000000111111000000000000000000000011000000111111000000000000000000111110000011111100000000000000000000001100000000001110000000000000000000001111111000000000000000000000000000000001111110000001111100000000000000000000011000000011111000000000000000000111110000001111100000000000000000001111110000000000011000000000000000000111111000001111111000000000000000000", + [6] = "111111000001111110000000000000000111111000000111111000000000000000000011111100000011111110000000000000000011111110000001111110000000000000000011111100000011111100000000000000000011111100000011111100000000000000000011110000001111110000000000000000000011110000001111111100000000000000000000011111110000000111111000000000000000000111111000001111110000000000000000011111100000001111000000000000000000001111000001111110000000000000000000111111000000011111100000000000000000011111000000000111110000000000000", + }, + [41] = { + [5] = "000000000000000000011111111111100000000001111111111100000000000011111111111100000000011110011100000000000000000000000011110000000000000001111110001111000000000000000000001111000000000000000000000000000000011110000000000011110011110000000000000000001111000000000000111100000000000000000000000000000000000000000000000000111111111111110000000000000000000000000000000000000000000000000000000000000000000111100000000000000111100011111000000000000000000000001111000000000000000111100111110000000000000000", + [6] = "000000011111111111100000000000011111111110000000000000000000000000000000000000000000000000000000011111001111000000000000000000000000000000000000000000001111001111000000000000001111100000000000000000000000011110000000000011110011110000000000001111001111000000000000111100111111000000000000000000000000000001111111111111000000000000000000000000000000000000000011111111111110000000000000000000000000000000000111100111100000000000000000000000111110000000000000001111100111100000000000000000000111100000", + }, + [42] = { + [5] = "0000000000000000000000000000000001111111100000000000000000000000000111111110000000000000000000000000011111111000000000000000000000000111111110000000000000000000000000011111111100000000000000000000000000111111110000000000000000000000000011111111000000000000000000000000000000000000000000000000000000000000000000001111111100000000000000000000000000111111111100000000000000000000000001111111111000000000000000000000000011111111000000000000000000000000000000000000000000000000000000000000111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + [6] = "0000000000000000000000000000000000000000011111111111111111111111111000000001111111111111111111111111100000000111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111100000000111111111111111111111111111111100000000001111111111111111111111111110000000011111111111111111111111111000000000000000000000000000000000000000000000111111111111111111111111100000000111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111000000011111111111111111111", + }, + [43] = { + [5] = "000000000000000000000000011111111111111111111000000011111111111111111111111111100000000000011111111111111111111111111100000000001111111111111111111111111110000000011111111111111111111111110000000111111111111111111111111000000000000000000000000000000000000000000011111111111111111111100000000111111111111111111111110000000000000000000000000000000000000000111111111111111111111111000000001111111111111111111111110000000011111111111111111111111100000000000", + [6] = "111111111111111111111111100000000000000000000111111100000000000000000000000000000000000000000000000000000000000000000011111111110000000000000000000000000001111111100000000000000000000000001111111000000000000000000000000111111111000000000000000000000000001111111100000000000000000000011111111000000000000000000000001111111100000000000000000000000011111111000000000000000000000000111111110000000000000000000000000000000000000000000000000000000011111111111", + }, + [44] = { + [5] = "0000000000000000000000000000000000000000000000000000011111111111111111111111100000000000000000000000000000000000000000111111111111111111111111000000011111111111111111111110000000111111111111111111111111100000000011111111111111111111111110000000011111111111111111111111110000000001111111111111111111111111000000000011111111111111111111111110000000001111111111111111111111111111000000000111111111111111111111111100000000111111111111111111111110000000111111111111111111111111000000001111111111111111111111110000000000000000000000000000000000000111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000001111111", + [6] = "1111111111111111000000000000000000000000000000000000011111111111111111111111100000000011111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111110000000011111111111111111111111110000000000000000000000000000000000000000000011111111111111111111111110000000001111111111111111111111111111000000000111111111111111111111111100000000111111111111111111111110000000000000000000000000000000000000001111111111111111111111110000000011111111111111111111110000000111111111111111111111100000000111111111111111111111111000000001111111111111111111111100000001111111", + }, + [45] = { + [5] = "11111111111111111110000000000000000011111111111111111111111111111100000000000000000011111111111111111111111111111111110000000000000000001111111111111111111111111111111111000000000000000000111111111111111111111111111111111100000000000000000011111111111111111111111111111111110000000000000000000111111111111111111111111111111111100000000000000000011111111111111111111111111111111111000000000000000000000000001111111111111111111111111110000000000000000001111111111111111111111111111111111111110000000", + [6] = "11111111111111111111111111111111111111111100000000000000000000000011111111111111111111111111000000000000000000000000001111111111111111111111111100000000000000000011111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111100000000000000000000000000011111111111111111111111111100000000000000000000000000000000000000000000111111110000000000000000001111111111111111111111111111111111111100000000000000000000000000001111111", + }, + [46] = { + [5] = "0011111000000000000000000000000111100111110000000000000000000000000000001111110000000000000000000000000111100111111100000000000000000000000111100111111000000000000000000000000000000011111100000000000000000000000000111100111111000000000000000000000000000000000000000000000000000000000000001111000000000000000000000000000000001111011111000000000000000000000000111100111111000000000000000000000000000011111000000000000000000000000111100111110000000000000000000000001111001111100000000000000000000000011100000000000000000000000000000011110000000000000000000000000000000111100111111000000", + [6] = "1111001111100000000000000000000000000000111111000000000000000000000000111100111111100000000000000000000000011111000000000000000000000000000000011110000000000000000000000000000000001111000000000000000000000000000000000011110011111100000000000000000000000000000011111110000000000000000000000000111001111110000000000000000000000000110000000000000000000000000000000000000011111100000000000000000000000000011111100000000000000000000000011110111111000000000000000000000000111100111110000000000000000000000000000011111100000000000000000000000000001111110000000000000000000000011110011111111", + }, + [47] = { + [5] = "00000001111000000000011100001100110000000011000011011110000000000000000000000000000000000000000000000000000000000000011110000000000000000000000111100001100000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000110001100111100000000001111000011001111000000000110", + [6] = "00000000000000000000000000000000000000000000000000000000000000011000000000000011110000110011110000000000000000000111100000000000000000000000000000000000000000000000000000000000000000000011110000110011110000000000000000011011110000000011110000000011000000000000000000000000000000000000000000000000000", + }, + [48] = { + [5] = "000000000000000000000000000000000000000000000000000000000000000000011000000000000000011110000110000000000000001111000110011110000000000000000000000000000000000000000000000000000000000000000000000000000110011100000000011110000000011110000000000111000110011110000000000000000000000000000000000000000000000000000000000000000000000000000000", + [6] = "000000000000000000000000000000000000000000000000000000000001111000000000000000000000000000000110011110000000000000000110011110000000000000000000000000000000000000000000000000000000000000000000011110000000011100000000000000000110011110000000000111000110011110000000000000000000000000000000000000000000000000000000000000000011110000000000", + }, + [49] = { + [5] = "000000000000000000000000000000111111111111110000000000000000000000000000000000000000000000000111111111111000000000000000000000000000000000000111111111100000000000000000000000000000000000000111100001111001111 011110011110011110000000000000000000000000001111000011111100000011111110000000000000000000000000000000000000000000000000000111111111111000000000001111111111111111110000000000000000000000000000000000000000000000000000111111111111111111110000000000000000000111111111111111111000000000000000000111111111111111000000000000000111111111111100000000000000000000000000000000000001111111111100000000001111111000000001111110001111000111001110011110011110011110000000000000000000000000000111000011111000001111111100000000111111111000000000000000000000000000000000111111111111110000000000000111111111111111100000000000000011111111111111111100000000000000000001111111111111111", + [6] = "000000000011111111111111111111000000000000000000000000000000000000000000000000111111111111111000000000000000000000000000000000000001111111111000000000011111111110000000011111111000000000000000011110000000000 000000000000000000111001111001110011110011110000111100000011111100000001111111100000000001111111111000000000000111111111111000000000000111111111110000000000000000001111111111111111100000000000000000011111111111111111000000000000000000001111111111111111111000000000000000000111111111111111111000000000000000111111111111111000000000000011111111111110000000000001111111111110000000000011111111110000000111111110000001110000111000000000000000000000000000111001111001111001111000000000111100000000000000000011111111000000000111111111000000000000111111111111000000000000001111111111111000000000000000000000000000000000000000000000000011111111111111111110000000000000000", + }, + [50] = { + [5] = "111111111111111111111111111111100000000000001111111111111111100000000000000001111111111111111000000000000111111111111111000000000011111111111100000000001111111111000000000000000000000001111100001111000000000000000000000000000000000000001111000000001111000000000000111111000000001111111100000000001111110000000000011111111111100000000000000000000000000000000000000000001111111111111110000000000000000001111111111111111100000000000000000000000000000000000000000000000000000011111111111111111100000000000001111111111110000000000111111110000001111111000000011111111100000011110001111000000000000000000000000000000001111001111001111111", + [6] = "000000000000011111111111111111100000000000001111111111111111100000000000000001111111111111111000000000000111111111111111000000000000000000000000000000000000000000000000001111111110000001111100000000000000000000000000000000000011110011000000001111001111000111000000000000000000000000000000000000001111110000000000011111111111100000000000000111111111111110000000000000001111111111111110000000000000000001111111111111111100000000000000000000000000000000000000000000000000000011111111111111111100000000000001111111111110000000000111111110000001111111000000000000000000000000000001111001111000000000000000000000000000000000000000000000", + }, + [51] = { + [5] = "11100011111111000000000000000000111111100011111100000000000000000000000000000000111111111100000000000000000000000000000000001111111111110000000000000011111111111111100000000000000111111111111111100000000000000000000000000000000111111111111111100000000000000000000000000000000000000000000000000000000000000000000011111111000011111110000000000000000000011111111000111111000000000000000000000000000000000000000000000000000111111111111000000000011111111110000000000000111111111111110000000000000111111111111111000000000000000000000000000000000000000000000000000111111111111110000000000000000111111111", + [6] = "00000000000000111111100001111111000000000000000011111111000011111111000000000000111111111100000000000111111111111000000000001111111111110000000000000000000000000000000000000000000000000000000000011111111111111000000000000000000111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111100001111111100000000000000000111111100001111110000000000111111111111000000000000111111111111000000000011111111110000000000000000000000000000000000000000000000000000000111111111111100000000000000000000000000000000000000111111111111110000000000000000111111111", + }, + [52] = { + [5] = "0000001111110000011111000000000000000011111100000011111100000000000000000000000000011111000000111100111100111001111001111001111001111001111001111001111000011111100000011111000000111111000000000000000011111100000011111100000011111100000011111100000011111100000011111100000011110011110000001111000000001111000000001111001111000000000000000000000000000000000011111100000011111100000000000000000000000000000000000000000011111100000000000000000111111000000000000111001110011110011110011110011110011000000001111000011111100000000000000000000000000000111111000000111110000001111110000001111110000", + [6] = "1111110000001111100000000000000011111100000011111100000011111100000011111100000111100000000000000000000000000000000001111000000001111001111001111001111000000000011111100000111111000000111110000001111100000000000000000011111100000011111100000011111100000000000000000011111111110000000011101111000000001111001111001111001111001111000000000011111100000011111100000000000000000011111100000000000000000011111100000011111100000000000000000111111000000111111111100111000000000000011110011110011110011001111001111000000000011111100000111111000000111111000000000000000001111110000001111110000001111", + }, + [53] = { + [5] = "11110000001111100000011111000001110000011110001111100000011111100000011111000000000000000000000000000111100111000000001111001111001111001111000000000111110000001111110000000000000000111111000000111111000000111110000111110000001111100001111100000111111000000000000111100111011100111100000001111001111000000011000000000000000011111100000111110000001111110000001111110001111110000001111110000001111100001111110000001111100000000000011100111100111100111100111100111100111100111100111100001111100000000000000000111111000000111110000001111110000001111100000000000000011111100000000000000000011111000000000", + [6] = "11110000001111100000000000000001110000000000001111100000011111100000011111000011111000000000000111100111100111001111001111001111001111000000000000000111110000001111110000000000000000111111000000111111000000000000000111110000001111100001111100000111111000000000000000000111000000000000000000000000000001111011000011111100000011111100000111110000001111110000001111110000000000000001111110000001111100001111110000001111100000011110000000111100111100000000000000000000111100111100000000001111100000011111000000111111000000000000000001111110000001111100000011110000000000000000011111100000011111000000000", + }, +} \ No newline at end of file diff --git a/resources/els-fivem/client/_patternTypes/traf.lua b/resources/els-fivem/client/_patternTypes/traf.lua new file mode 100644 index 000000000..23f20658e --- /dev/null +++ b/resources/els-fivem/client/_patternTypes/traf.lua @@ -0,0 +1,182 @@ +traf_Patterns = { + [1] = { + [7] = "000000000000000000000000000000000000000000011110000111100110000000000000000001100111100011100111100000000000000000000110011110011001111000000000000000001110111000011101100000000000000000000011110011100011110011110000000000000000001100000", + [8] = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + [9] = "000000000000000000000000000000000000000000000000000000000001101100001111001110000000000000000000011100111000011100111000000000000000000111100111001110110000000000000000011101111000111100111100000000000000000000001110011100011110110000000", + }, + [2] = { + [7] = "0000000000001101100001101110000000000000000001101111000011101100000000000000000011110011110000111100111000000000000000000000000111100111100001111001111000000000000000000111100111000011101100000000000000000000011110011000011100111000000000000000000111100111100011110011110000000000000000000011110011101", + [8] = "1100011101110000000000000001100111001111011110000000000000000011100110011110011100000000000000000000000111100111100001111001111000000000000000000000000111001100111100111000000000000000000011110011000011100111100000000000000000000111101110001110111000000000000000000000001110011110011100111100000000001", + [9] = "0000000000001101100001101110000000000000000001101111000011101100000000000000000011110011110000111100111000000000000000000000000111100111100001111001111000000000000000000111100111000011101100000000000000000000011110011000011100111000000000000000000111100111100011110011110000000000000000000011110011100", + }, + [3] = { + [7] = "11000011110011110000000000000000001110011110001111001111000000000000000000000111100111100001111001111000000000000000000000011110011110001101100000000000000000000111011110001101111000000000000000", + [8] = "11000011110011111110011110001101111110011110001111001111111001111000011110011111100111100001111001111111001111000011100111111110011110001101111100110001111001111111011110001101111111100111100110", + [9] = "00000000000000001110011110001101110000000000000000000000111001111000011110011000000000000000000000000111001111000011100111100000000000000000011100110001111001111000000000000000000111100111100110", + }, + [4] = { + [7] = "01110000000000000001101110000000000001110111000000000000011011110000000000011110111110000000000011101111000000000000011110000", + [8] = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + [9] = "00000001111001111100000000000110111100000000001110011110000000000001101111000000000000011001111000000000000111011110000000000", + }, + [5] = { + [7] = "000000001110011111000000000000000111100111110000000000000001110011111100000000000000000111100111111000000000000000111100111111000000000000000011100111110000000000000001111011111100000000000000000111011111", + [8] = "011110000000000000011110011111000000000000000011100111111000000000000000111100111110000000000000000011001111110000000000000000001110111111000000000000000011101111100000000000000000111100111110000000000000", + [9] = "000000001110011111000000000000000111100111110000000000000001110011111100000000000000000111100111111000000000000000111100111111000000000000000011100111110000000000000001111011111100000000000000000111011111", + }, + [6] = { + [7] = "0111100000000000001101111100000000000111001111000000000000000001110011111000000000000001110011110000000000001111011110000000000000011100111111000000000000011110011110000000000000111100111110000", + [8] = "0111100001110111101101111100001101110111001111000011110011111101110011111000111100111101110011110011100111001111011110011100111110011100111111000111100111011110011110000110111100111100111110000", + [9] = "0000000001110111100000000000001101110000000000000011110011111100000000000000111100111100000000000011100111000000000000011100111110000000000000000111100111000000000000000110111100000000000000000", + }, + [7] = { + [7] = "00100111111111111000000000000000000001110001100111111111110000000000000000000001111000101111111000000000000000000001110000110011111111100000000000000000011000011001111111110000000000000000000011111", + [8] = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + [9] = "00000000000000000111000110011111111110000000000000000000001111000011011111111110000000000000000110001100111111111110000000000000000000011100011001111111100000000000000000001110000110111111111100000", + }, + [8] = { + [7] = "000000000000001111000011011111110000000000000000011000101111111000000000000000001111000011011111110000000000000000000011110010011111111110000000000000000000111000011001111111111000000000000000000001110001101111111111000000000000000000011100110011111111000000000000000000000111100110011111111100000000000000000110000110111111111100000000000000000000011100010111111111100000000000000000111100011011111111000000000000000000110000110111111111110000000000000", + [8] = "001011111111110000000000000000001100110011111111100000000000000111000101111111110000000000000000001110010011111111111100000000000000000001111000110011111111000000000000000000000111000100111111111110000000000000000000111100010111111111100000000000000000111000011001111111111000000000000000000011100001101111111000000000000000000011000011001111111111100000000000000000011100010111111111000000000000000000111100110011111111000000000000000000001111001011100", + [9] = "000000000000001111000011011111110000000000000000011000101111111000000000000000001111000011011111110000000000000000000011110010011111111110000000000000000000111000011001111111111000000000000000000001110001101111111111000000000000000000011100110011111111000000000000000000000111100110011111111100000000000000000110000110111111111100000000000000000000011100010111111111100000000000000000111100011011111111000000000000000000110000110111111111110000000000000", + }, + [9] = { + [7] = "00110011111110000000000000000011000100111111111100000000000000111100001100111111111100000000000000000111100001011111111100000000000000000011100001001111111110000000000000000001110001101111111000000000000000000000011000101111111111110000000000000", + [8] = "00110011111111111001011111111111000100111111111111100110111111111100001100111111111111001100111111111111100001011111111111100001011111111111100001001111111111111001011111111111110001101111111111000110011111111111111000101111111111111100001100111", + [9] = "00000000000001111001011111111100000000000000000011100110111111000000000000000000000011001100111111111000000000000000000011100001011111111100000000000000000001111001011111111110000000000000000111000110011111111111100000000000000000001100001100111", + }, + [10] = { + [7] = "001010111111100000000000000000000111100001100100111111111110000000000000000000000001111000011011001111111110000000000000000000011100001010011111111111000000000000000000110011001101111111110000000000000000000000110000110011001111111111100000000000000000000000000111100011001011111111110000000000000000000000000111100001100100111111111110000000000000000000000", + [8] = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + [9] = "000000000000011100001010111111111000000000000000000000000001111000010011011111111110000000000000000000000001110011001011111111100000000000000000000000110010110111111111000000000000000000001110011010011111111111000000000000000000000000011110000110011001111111111000000000000000000000001111000011001101111111111000000000000000000000000001111000100110011111110", + }, + [11] = { + [7] = "000000000000000000110001101001111111111110000000000000000000000000001111000010110011111111100000000000000000000000011100001100110011111111100000000000000000000000110001101001111111111100000000000000000000011110000011001100111111111000000000000000000000001110001101100111111110000000000000000000000000111000110", + [8] = "001100101111111111000000000000000000000001111000010011001111111111110000000000000000000000011100001100110111111111100000000000000000000000011001001100111111111111000000000000000000000011100010011011111111100000000000000000000000000111100110011011111111110000000000000000000001110011001100111111111111000000000", + [9] = "000000000000000000110001101001111111111110000000000000000000000000001111000010110011111111100000000000000000000000011100001100110011111111100000000000000000000000110001101001111111111100000000000000000000011110000011001100111111111000000000000000000000001110001101100111111110000000000000000000000000111000110", + }, + [12] = { + [7] = "01001101111111110000000000000000000111000110110011111111100000000000000000000011100001100110011111111111000000000000000000000001110010011001111111111110000000000000000000001111000101100111111110000000000000000111000100110000", + [8] = "01001101111111111100001101001111111111000110110011111111111100001101001111111111100001100110011111111111111000110011001111111111110010011001111111111111110000101001111111111111000101100111111111100011010111111111000100110000", + [9] = "00000000000000001100001101001111111000000000000000000000011100001101001111111100000000000000000000000000111000110011001111111110000000000000000000000001110000101001111111110000000000000000000001100011010111111000000000000000", + }, + [13] = { + [7] = "0000000000000000000000001111111111111100000000000000011111111111111111100000000000000000111111111111100000000000001111111111111111100000000000000111111111111000000000000000000011111111111111110000000000000000000011111111111111111100000000000000111111111111111111000000000000000011111", + [8] = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + [9] = "0000000000111111111111110000000000000011111111111111100000000000000000011111111111111111000000000000011111111111110000000000000000011111111111111000000000000111111111111111111100000000000000001111111111111111111100000000000000000011111111111111000000000000000000111111111111111100000", + }, + [14] = { + [7] = "1111111111111111111111111111100000000000000001111111111111111110000000000000000000011111111111111110000000000000000111111111111111111000000000000000011111111111111000000000000000000111111111111111111000000000000000001111111111111111111000000000000000001111111111111111111100000000000000011111111111111111100000000000000111111111111111111000000000000000", + [8] = "0000000000000000000000000000011111111111111110000000000000000001111111111111111111100000000000000001111111111111111000000000000000000111111111111111100000000000000111111111111111111000000000000000000111111111111111110000000000000000000111111111111111110000000000000000000011111111111111100000000000000000011111111111111000000000000000000111111111111111", + [9] = "0000000000011111111111111111100000000000000001111111111111111110000000000000000000011111111111111110000000000000000111111111111111111000000000000000011111111111111000000000000000000111111111111111111000000000000000001111111111111111111000000000000000001111111111111111111100000000000000011111111111111111100000000000000111111111111111111000000000000000", + }, + [15] = { + [7] = "000000000000000000000000000011111111111111110000000000000001111111111111111110000000000001111111111111111000000000000011111111111111110000000000000000111111111111111100000000000000001111111111111111000000000011111111111111111000000000", + [8] = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", + [9] = "000000000000111111111111111100000000000000001111111111111110000000000000000001111111111110000000000000000111111111111100000000000000001111111111111111000000000000000011111111111111110000000000000000111111111100000000000000000111111111", + }, + [16] = { + [7] = "00000000001111111111000000011111000000001111110000000111111000000000111111000000011111111000000111111000001111111000001111100000011111111000000011111111000000011111000000001111111100000000011111110000000111110000001111111110000000011111111000000001111111100000000111111111000000111111100000011111000000111111000000111111000000011111000001111111000000001111110000011111110000000111111000001111110000001111", + [8] = "11100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + [9] = "11111111110000000000111111100000111111110000001111111000000111111111000000111111100000000111111000000111110000000111110000011111100000000111111100000000111111100000111111110000000011111111100000001111111000001111110000000001111111100000000111111110000000011111111000000000111111000000011111100000111111000000111111000000111111100000111110000000111111110000001111100000001111111000000111110000001111110000", + }, + [17] = { + [7] = "111111100000111111100000000011111000000111110000000011111110000000011111111000000011111000000001111111000000001111110000000111111111000000000111111000000001111111100000000001111111100000000111111110000000111111000000011111111100000000111111111100000000011111111110000000000111111110000000111111000000011111111000000001111111100000000111111111100000011111111110000000000111111110000000011111100000001111111000000000011111110000001111100000", + [8] = "000000011111000000011111111100000111111000001111111100000001111111100000000111111100000111111110000000111111110000001111111000000000111111111000000111111110000000011111111110000000011111111000000001111111000000111111100000000011111111000000000011111111100000000001111111111000000001111111000000111111100000000111111110000000011111111000000000011111100000000001111111111000000001111111100000011111110000000111111111100000001111110000011111", + [9] = "001111100000111111100000000011111000000111110000000011111110000000011111111000000011111000000001111111000000001111110000000111111111000000000111111000000001111111100000000001111111100000000111111110000000111111000000011111111100000000111111111100000000011111111110000000000111111110000000111111000000011111111000000001111111100000000111111111100000011111111110000000000111111110000000011111100000001111111000000000011111110000001111100000", + }, + [18] = { + [7] = "000000000001111111000001111110000000011111100000011111100000001111111111000000001111110000001111111100000001111100000111111110000000111110000000111111111100000000011111111000000011111110000000111111111100000000011111100000000011111111000000111111000000000011111111000000001111111000000000111111111100000000011111111100000000011111110000000111111110000000001111111100000000011111111100000011111111000000011111", + [8] = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", + [9] = "000111111110000000111110000001111111100000011111100000011111110000000000111111110000001111110000000011111110000011111000000001111111000001111111000000000011111111100000000111111100000001111111000000000011111111100000011111111100000000111111000000111111111100000000111111110000000111111111000000000011111111100000000011111111100000001111111000000001111111110000000011111111100000000011111100000000111111100000", + }, + [19] = { + [7] = "1111100000000000001111111111100000000000111111111100000000000001111111110000000000000000111001101101111111100000000000001111111111111100000000000000011111111111111110000000000000111111111111100000000000011111111111000000000000000000110000111100111001111111000000000000000", + [8] = "1111111111111111110000000000011111111111000000000011111111111110000000001111111111000000111001101101111111100000000000000000000000000011111111111111100000000000000001111111111111000000000000011111111111100000000000111111111111110000110000111100111001111111000000000000000", + [9] = "0000000000000000001111111111100000000000111111111100000000000001111111110000000000000000111001101101111111100000000000001111111111111100000000000000011111111111111110000000000000111111111111100000000000011111111111000000000000000000110000111100111001111111000000000000000", + }, + [20] = { + [7] = "000000000000000000111111100000000000000011111110000000000000000000001111110000000000000000000111111100000000000000000001111111100000000000000000000001111111100000000000000000001111110000000001", + [8] = "011111000000111111000000011111000001111100000001111111100000011111110000001111111100000111111000000011111110000000011110000000011111110000000011111110000000011111110000011111110000001111111001", + [9] = "000000111111000000000000000000111110000000000000000000011111100000000000000000000011111000000000000000000001111111100000000000000000001111111100000000000000000000001111100000000000000000000001", + }, + [21] = { + [7] = "100011110011110000000000000000000110011110000111101111000000000000000000001110110001111001110000000000000000011110011110001110111000000000000000001100111000011101110000000000000000000", + [8] = "100011110011110000000000000000000110011110000111101111000000000000000000001110110001111001110000000000000000011110011110001110111000000000000000001100111000011101110000000000000000000", + [9] = "100011110011110000000000000000000110011110000111101111000000000000000000001110110001111001110000000000000000011110011110001110111000000000000000001100111000011101110000000000000000000", + }, + [22] = { + [7] = "01100110111101111000000000000000000000000111001111011101101110000000000000000000111011001101101110000000000000000000001101100110011011110000000000000000000000110111011001101110000000000", + [8] = "01100110111101111000000000000000000000000111001111011101101110000000000000000000111011001101101110000000000000000000001101100110011011110000000000000000000000110111011001101110000000000", + [9] = "01100110111101111000000000000000000000000111001111011101101110000000000000000000111011001101101110000000000000000000001101100110011011110000000000000000000000110111011001101110000000000", + }, + [23] = { + [7] = "00000000000000000000000000000000011111111111111111111000000000000000000001111111111111111111111000000000000000000001111111111111111111111000000000000000000000001111111111111111111110000000000000000000000011111111111111111111000000000000000000000001111111111111111111111100000000000000000000000001111111111111", + [8] = "00000000000000000000000000000000011111111111111111111000000000000000000001111111111111111111111000000000000000000001111111111111111111111000000000000000000000001111111111111111111110000000000000000000000011111111111111111111000000000000000000000001111111111111111111111100000000000000000000000001111111111111", + [9] = "00000000000000000000000000000000011111111111111111111000000000000000000001111111111111111111111000000000000000000001111111111111111111111000000000000000000000001111111111111111111110000000000000000000000011111111111111111111000000000000000000000001111111111111111111111100000000000000000000000001111111111111", + }, + [24] = { + [7] = "11000111111111110000000000000000001111110000111111111000000000000000000000111111100001111111111110000000000000000001111111100111111111000000000000000000000111111001111111111110000000000000000000001111111100111111100000000000", + [8] = "11000111111111110000000000000000001111110000111111111000000000000000000000111111100001111111111110000000000000000001111111100111111111000000000000000000000111111001111111111110000000000000000000001111111100111111100000000000", + [9] = "11000111111111110000000000000000001111110000111111111000000000000000000000111111100001111111111110000000000000000001111111100111111111000000000000000000000111111001111111111110000000000000000000001111111100111111100000000000", + }, + [25] = { + [7] = "0000111111111111100000000000000000000000000111111111110000000000000000000000000011111111110000000000000000000001111111111110000000000000000000000001111111111111000000000000000000000000000000011111111111100000000000000000000000000000011111111111100000000000000000000000000011111111111110000000000000000000000000000111111111111100000000000000000000000000000001111111111111100000000000000000", + [8] = "0000111110000000000000000000000000000111111111000000000000000000000000000111111111111000000000000000000011111111111100000000000000000000001111111111111000000000000000000000000000000011111111111100000000000000000000000000000011111111111111000000000000000000000000001111111111110000000000000000000000000000001111111111100000000000000000000000000000011111111111111100000000000000000000000000", + [9] = "0000111111111111100000000000000000000000000111111111110000000000000000000000000011111111110000000000000000000001111111111110000000000000000000000001111111111111000000000000000000000000000000011111111111100000000000000000000000000000011111111111100000000000000000000000000011111111111110000000000000000000000000000111111111111100000000000000000000000000000001111111111111100000000000000000", + }, + [26] = { + [7] = "000111111111111000000000001001111110000000000000000000011111111111100000000000100111111111110000000000000000000000001111111111111100000000000000010011111111110000000000000000000000000000011111111111111100000000000011000111111111", + [8] = "000111000000000000000000001001111110000000000000001111111110000000000000000000100111111111110000000000000001111111111111100000000000000000000000010011111111110000000000000000000011111111111111100000000000000000000011000111111111", + [9] = "000111111111111000000000001001111110000000000000000000011111111111100000000000100111111111110000000000000000000000001111111111111100000000000000010011111111110000000000000000000000000000011111111111111100000000000011000111111111", + }, + [27] = { + [7] = "1111100000000000000000000000000000000000001111111100000000000000000000000000000000000000011111110000000000000000000000000000000000111111111100000000000000000000000000000000000000111111111000000000000000000000000000000000000000111111110000000000000000000000000000000000001111111100000000000000000000000000000000111111110000000000000000000000000000000000000011111000000000000000000000000000000000011111111100000000000000000000000000000000000000011111110000000000000000000000000000000000000000", + [8] = "1111111111111100000000000000000000000000000000000011111111110000000000000000000000000000000000001111111100000000000000000000000000000000000011111111000000000000000000000000000000000000000111111111000000000000000000000000000000000000001111111000000000000000000000000000000000000011111111000000000000000000000000000000001111111000000000000000000000000000000000000111111110000000000000000000000000000000000011111111100000000000000000000000000000000000001111111100000000000000000000000000000000", + [9] = "1111100000000011111111111111111100000000000000000000000000001111111111111111100000000000000000000000000011111111111111100000000000000000000000000000111111111111111111000000000000000000000000000000111111111111111110000000000000000000000000000111111111111110000000000000000000000000000000111111111111110000000000000000000000000111111111111111110000000000000000000000000001111111111111110000000000000000000000000000011111111111111111000000000000000000000000000011111111111111100000000000000000", + }, + [28] = { + [7] = "0000000000111111111111111111100000000000000000000000000000011111111111111100000000000000000000000000011111111111111100000000000000000000000000000111111111111111110000000000000000000000000000000011111111111111100000000000000000000000000000000011111111111111111000000000000000000000000000000000001111111111111111111100000000000000000000000000000000011111111111111110000000000000000000000000000111111111111111110000000000000000", + [8] = "0001111111000000000000000000000000000000000000000001111111100000000000000000000000000000000000111111100000000000000000000000000000000000011111111000000000000000000000000000000000000000111111111100000000000000000000000000000000000000111111111100000000000000000000000000000000000000000011111111110000000000000000000000000000000000000000000111111111100000000000000000000000000000000000001111111000000000000000000000000000000000", + [9] = "0000000000000000000000000000000000000000001111111110000000000000000000000000000000000011111111000000000000000000000000000000000000111111100000000000000000000000000000000000000011111111000000000000000000000000000000000000001111111111000000000000000000000000000000000000000000111111111100000000000000000000000000000000000000000000111111111000000000000000000000000000000000000000011111110000000000000000000000000000000000001111", + }, + [29] = { + [7] = "0000000000000000000000000000000000000000000000001111111111000000000000000000000000000000000000000000000111111111100000000000000000000000000000000000000000000000001111111110000000000000000000000000000000000000000000000000111111111000000000000000000000000000000000000000000000111111111000000000000000000000000000000000000000000000011111111100000000000000000000000000000000000000011111111110000000000000000000000000000000000000000000000011111111000000000000000000000000000000000000000000000000011111111100000000000000000000000000000000000000000000000001111111100000000000000000000000000000000000000000000000011111111100000000000000000000000000000000000000000000000111111111100000000000000000000000000000000000000001111111100000000000000000000000000000000000000000000001111111000000000000000000000", + [8] = "0001111111000000000000000000000000000000000000000000000000111111100000000000000000000000000000000000000000000000011111111100000000000000000000000000000000000000000000000001111111110000000000000000000000000000000000000000000000000111111000000000000000000000000000000000000000000000000111111100000000000000000000000000000000000000000000000011111100000000000000000000000000000000000000000001111111110000000000000000000000000000000000000000000000111111111100000000000000000000000000000000000000000000000011111111110000000000000000000000000000000000000000000000011111111100000000000000000000000000000000000000000000000011111111100000000000000000000000000000000000000000000000011111110000000000000000000000000000000000000000011111111100000000000000000000000000000000000000000000111111110000000000000", + [9] = "1110000000111111110011001100111110000000000000000000000000000000011111111110101100111110000000000000000000000000000000000011111111110011001011111111000000000000000000000000000000001111111110011001001111110000000000000000000000000000000111111111001001100111111100000000000000000000000000000011111111001101001111111100000000000000000000000000000011111100110100111111100000000000000000000000000000001111111111010011001111111000000000000000000000000000000011111111001011011111110000000000000000000000000000000000001111111100110011011111100000000000000000000000000000000011111111101100110011111110000000000000000000000000000000011111111110011001011111110000000000000000000000000000001111111110010010111110000000000000000000000000000011111111011001101111111000000000000000000000000000001111110101111", + }, + [30] = { + [7] = "00000000000011111110011001100111111110000000000000000000000000111111001011011111000000000000000000000000000000011111111010010011111100000000000000000000000000011111111100110011011111100000000000000000000000000001111111010011001111111000000000000000000000000000000011111110100110011111000000000000000000000000000", + [8] = "00001111111100000000000000000000000000000000000000000001111111000000000000000000000000000000000000000000111111100000000000000000000000000000000000000001111111100000000000000000000000000000000000000000000001111110000000000000000000000000000000000000000000001111111100000000000000000000000000000000000000000011111", + [9] = "11110000000000000000000000000000000000000000000111111110000000000000000000000000000000000000000011111111000000000000000000000000000000000000000001111110000000000000000000000000000000000000000000000001111110000000000000000000000000000000000000000000111111110000000000000000000000000000000000000000011111111100000", + }, + [31] = { + [7] = "00001111111111111111111111111111100000000000000001111111111111111111111111111111111111100000000000000111111111111111111111111111111111111111000000000000000001111111111111111111111111111111111111111111100000000000000111111111111111111111111111111111111111110000000000000011111111111111111111111111111111111111100000000000000001111111111111111111111111111111111111000000000000000011111111111111111111111111111111100000000000", + [8] = "11111111111111111111111111111111100000000000000000000000000111111111111111111111111111100000000000000000000000111111111111111111111111111111000000000000000000000000000111111111111111111111111111111111100000000000000000000000000111111111111111111111111111110000000000000000000000111111111111111111111111111111100000000000000000000000000111111111111111111111111111000000000000000000000000011111111111111111111111100000000000", + [9] = "00000000000001111111111111111111100000000000000000000000000000000000011111111111111111100000000000000000000000000000000011111111111111111111000000000000000000000000000000000000001111111111111111111111100000000000000000000000000000000000001111111111111111110000000000000000000000000000000011111111111111111111100000000000000000000000000000000001111111111111111111000000000000000000000000000000000011111111111111100000000000", + }, + [32] = { + [7] = "0000000000000011111111111111111111110000000000000000000000000000000001111111111111111100000000000000000000000000000000000011111111111111111111111100000000000000000000000000000000000111111111111111111000000000000000000000000000000001111111111111111111100000000000000000000000000000000011111111111111111110000000000000000000000000000001111111111111110000000000000000000000000000000011111111111111111110000000000000000000000000000111111111111111110000", + [8] = "0000001111111111111111111111111111110000000000000000000000011111111111111111111111111100000000000000000000000000011111111111111111111111111111111100000000000000000000000000011111111111111111111111111000000000000000000000001111111111111111111111111111100000000000000000000000011111111111111111111111111110000000000000000000000001111111111111111111110000000000000000000000001111111111111111111111111110000000000000000000011111111111111111111111110000", + [9] = "0000001111111111111111111111111111110000000000000111111111111111111111111111111111111100000000000000000011111111111111111111111111111111111111111100000000000000000011111111111111111111111111111111111000000000000001111111111111111111111111111111111111100000000000000011111111111111111111111111111111111110000000000000001111111111111111111111111111110000000000000011111111111111111111111111111111111110000000000011111111111111111111111111111111110000", + }, + [33] = { + [7] = "000000111111111111111111000000000000000000000000000001111111111111111111111111111110000000000000000000001111111111111111110000000000000000000001111111111111111111111111000000000000000000000000000", + [8] = "000000111111111111111111111111111000000000000000000000000000000011111111111111111111111110000000000000000000001111111111111111110000000000000000000000111111111111111111111111100000000000000000000", + [9] = "000000000000000111111111111111111111111111100000000000000000000000000000001111111111111111111111000000000000000000001111111111111111110000000000000000000000001111111111111111111111110000000000000", + }, + [34] = { + [7] = "0000000000011111111111111111111110000000000000000000000000011111111111111111111111100000000000000000000000000011111111111111111111111111110000000", + [8] = "0001111111111111111111111000000000000000000000000001111111111111111111111111100000000000000000000000111111111111111111111111111111000000000000000", + [9] = "0001111111111111110000000000000000000000001111111111111111111111111000000000000000000000000011111111111111111111111111100000000000000000000000000", + }, + [35] = { + [7] = "0000000000000000000000000000000000001111110000000000000000000000000000000001111111100000000000000000000000000000011111110000000000000000000000000000000001111111000000000000000000000000000000011111100000000000000000000000000000111110000000000000000000", + [8] = "0000111111111111111100000000000000000000001111111111111111100000000000000000000000011111111111111110000000000000000000001111111111111111110000000000000000000000111111111111111100000000000000000000011111111111110000000000000000000001111111111111110000", + [9] = "0000111111111111111100000000000000000000001111111111111111100000000000000000000000011111111111111110000000000000000000001111111111111111110000000000000000000000111111111111111100000000000000000000011111111111110000000000000000000001111111111111110000", + }, + [36] = { + [7] = "00011111111111111110000000000000000000111111111111111111000000000000000000000000011111111111111000000000000000000000000011111111111111000000000000000000000000001111111111111110000000000000000000000111111111111111110000000000000000000000011111111111111111000000000000000000000001111111111111111110000000000000000000000011111111111111110000000000000000000000111111111111", + [8] = "00011111111111111110000000000000000000111111111111111111000000000000000000000000011111111111111000000000000000000000000011111111111111000000000000000000000000001111111111111110000000000000000000000111111111111111110000000000000000000000011111111111111111000000000000000000000001111111111111111110000000000000000000000011111111111111110000000000000000000000111111111111", + [9] = "00000000000000000000000000000001111111000000000000000000000000000000000000011111100000000000000000000000000000001111111100000000000000000000000000000000111111110000000000000000000000000000001111111000000000000000000000000000000000111111100000000000000000000000000000000001111110000000000000000000000000000000000111111100000000000000000000000000000001111111000000000000", + }, +} \ No newline at end of file diff --git a/resources/els-fivem/client/client.lua b/resources/els-fivem/client/client.lua new file mode 100644 index 000000000..32d56500d --- /dev/null +++ b/resources/els-fivem/client/client.lua @@ -0,0 +1,698 @@ +els_Vehicles = {} + +k = nil +vehName = nil +lightingStage = 0 +fps = 0 +prevframes = 0 +curframes = 0 +prevtime = 0 +curtime = 0 +advisorPatternSelectedIndex = 1 +advisorPatternIndex = 1 + +lightPatternPrim = 0 +lightPatternsPrim = 1 +lightPatternSec = 1 + +guiEnabled = true +elsVehs = {} + +m_siren_state = {} +m_soundID_veh = {} +dualEnable = {} +d_siren_state = {} +d_soundID_veh = {} +h_horn_state = {} +h_soundID_veh = {} + +curCleanupTime = 0 + +Citizen.CreateThread(function() + + TriggerServerEvent("els:requestVehiclesUpdate") + + while true do + + if vehInTable(els_Vehicles, checkCarHash(GetVehiclePedIsUsing(GetPlayerPed(-1)))) then + if (GetPedInVehicleSeat(GetVehiclePedIsUsing(GetPlayerPed(-1)), -1) == GetPlayerPed(-1)) or + (GetPedInVehicleSeat(GetVehiclePedIsUsing(GetPlayerPed(-1)), 0) == GetPlayerPed(-1)) then + + if GetVehicleClass(GetVehiclePedIsUsing(GetPlayerPed(-1))) == 18 then + DisableControlAction(0, shared.horn, true) + end + + DisableControlAction(0, 84, true) -- INPUT_VEH_PREV_RADIO_TRACK + DisableControlAction(0, 83, true) -- INPUT_VEH_NEXT_RADIO_TRACK + DisableControlAction(0, 81, true) -- INPUT_VEH_NEXT_RADIO + DisableControlAction(0, 82, true) -- INPUT_VEH_PREV_RADIO + DisableControlAction(0, 85, true) -- INPUT_VEH_PREV_RADIO + + SetVehRadioStation(GetVehiclePedIsUsing(GetPlayerPed(-1)), "OFF") + SetVehicleRadioEnabled(GetVehiclePedIsUsing(GetPlayerPed(-1)), false) + + if(GetLastInputMethod(0)) then + DisableControlAction(0, keyboard.stageChange, true) + + DisableControlAction(0, keyboard.pattern.primary, true) + DisableControlAction(0, keyboard.pattern.secondary, true) + DisableControlAction(0, keyboard.pattern.advisor, true) + DisableControlAction(0, keyboard.modifyKey, true) + + DisableControlAction(0, keyboard.siren.tone_one, true) + DisableControlAction(0, keyboard.siren.tone_two, true) + DisableControlAction(0, keyboard.siren.tone_three, true) + + if IsDisabledControlPressed(0, keyboard.modifyKey) then + + if IsDisabledControlJustReleased(0, keyboard.guiKey) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + if guiEnabled then + guiEnabled = false + else + guiEnabled = true + end + end + + if IsDisabledControlJustReleased(0, keyboard.stageChange) then + if getVehicleVCFInfo(GetVehiclePedIsUsing(GetPlayerPed(-1))).interface.activationType == "invert" or getVehicleVCFInfo(GetVehiclePedIsUsing(GetPlayerPed(-1))).interface.activationType == "euro" then + upOneStage() + else + downOneStage() + end + end + if IsDisabledControlJustReleased(0, keyboard.takedown) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSceneLightState_s") + end + else + if IsDisabledControlJustReleased(0, keyboard.stageChange) then + if getVehicleVCFInfo(GetVehiclePedIsUsing(GetPlayerPed(-1))).interface.activationType == "invert" or getVehicleVCFInfo(GetVehiclePedIsUsing(GetPlayerPed(-1))).interface.activationType == "euro" then + downOneStage() + else + upOneStage() + end + end + if IsDisabledControlJustReleased(0, keyboard.takedown) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setTakedownState_s") + end + if IsDisabledControlJustReleased(0, 84) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setCruiseLights_s") + end + if IsDisabledControlJustReleased(0, keyboard.warning) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))] ~= nil then + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].warning then + TriggerServerEvent("els:changePartState_s", "warning", false) + else + TriggerServerEvent("els:changePartState_s", "warning", true) + end + else + TriggerServerEvent("els:changePartState_s", "warning", true) + end + end + if IsDisabledControlJustReleased(0, keyboard.secondary) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))] ~= nil then + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].secondary then + TriggerServerEvent("els:changePartState_s", "secondary", false) + else + TriggerServerEvent("els:changePartState_s", "secondary", true) + end + else + TriggerServerEvent("els:changePartState_s", "secondary", true) + end + end + if IsDisabledControlJustPressed(0, keyboard.primary) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))] ~= nil then + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].primary then + TriggerServerEvent("els:changePartState_s", "primary", false) + else + TriggerServerEvent("els:changePartState_s", "primary", true) + end + else + TriggerServerEvent("els:changePartState_s", "primary", true) + end + end + end + + + if GetVehicleClass(GetVehiclePedIsUsing(GetPlayerPed(-1))) == 18 then + if (elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))] ~= nil) then + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].stage == 3 then + if IsDisabledControlJustReleased(0, keyboard.siren.tone_one) then + setSirenStateButton(1) + end + if IsDisabledControlJustReleased(0, keyboard.siren.tone_two) then + setSirenStateButton(2) + end + if IsDisabledControlJustReleased(0, keyboard.siren.tone_three) then + setSirenStateButton(3) + end + end + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].stage == 2 then + if IsDisabledControlJustReleased(0, keyboard.siren.tone_one) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 0) + end + if IsDisabledControlJustPressed(0, keyboard.siren.tone_one) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 1) + end + + if IsDisabledControlJustReleased(0, keyboard.siren.tone_two) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 0) + end + if IsDisabledControlJustPressed(0, keyboard.siren.tone_two) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 2) + end + + if IsDisabledControlJustReleased(0, keyboard.siren.tone_three) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 0) + end + if IsDisabledControlJustPressed(0, keyboard.siren.tone_three) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 3) + end + end + end + end + + else + DisableControlAction(0, controller.modifyKey, true) + DisableControlAction(0, controller.stageChange, true) + DisableControlAction(0, controller.siren.tone_one, true) + DisableControlAction(0, controller.siren.tone_two, true) + DisableControlAction(0, controller.siren.tone_three, true) + + if els_Vehicles[checkCarHash(GetVehiclePedIsUsing(GetPlayerPed(-1)))].activateUp then + if IsDisabledControlPressed(0, controller.modifyKey) and IsDisabledControlJustReleased(0, controller.stageChange) then + downOneStage() + elseif IsDisabledControlJustReleased(0, controller.stageChange) then + upOneStage() + end + else + if IsDisabledControlJustReleased(0, controller.stageChange) then + downOneStage() + elseif IsDisabledControlPressed(0, controller.modifyKey) and IsDisabledControlJustReleased(0, controller.stageChange) then + upOneStage() + end + end + + if IsDisabledControlPressed(0, controller.modifyKey) then + DisableControlAction(0, controller.takedown, true) + if IsDisabledControlPressed(0, controller.modifyKey) and IsDisabledControlJustReleased(0, controller.takedown) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setTakedownState_s") + end + end + + if GetVehicleClass(GetVehiclePedIsUsing(GetPlayerPed(-1))) == 18 then + if (elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))] ~= nil) then + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].stage == 3 then + if not IsDisabledControlPressed(0, controller.modifyKey) then + if IsDisabledControlJustReleased(0, controller.siren.tone_one) then + setSirenStateButton(1) + end + if IsDisabledControlJustReleased(0, controller.siren.tone_two) then + setSirenStateButton(2) + end + if IsDisabledControlJustReleased(0, controller.siren.tone_three) then + setSirenStateButton(3) + end + end + + end + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].stage == 2 then + if IsDisabledControlJustReleased(0, controller.siren.tone_one) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 0) + end + if IsDisabledControlJustPressed(0, controller.siren.tone_one) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 1) + end + + if IsDisabledControlJustReleased(0, controller.siren.tone_two) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 0) + end + if IsDisabledControlJustPressed(0, controller.siren.tone_two) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 2) + end + + if IsDisabledControlJustReleased(0, controller.siren.tone_three) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 0) + end + if IsDisabledControlJustPressed(0, controller.siren.tone_three) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + TriggerServerEvent("els:setSirenState_s", 3) + end + end + end + end + end + + if GetVehicleClass(GetVehiclePedIsUsing(GetPlayerPed(-1))) == 18 then + if not IsDisabledControlPressed(0, controller.modifyKey) then + if (IsDisabledControlJustPressed(0, shared.horn)) then + TriggerServerEvent("els:setHornState_s", 1) + end + + if (IsDisabledControlJustReleased(0, shared.horn)) then + TriggerServerEvent("els:setHornState_s", 0) + end + end + end + end + end + + Citizen.Wait(0) + end +end) + +Citizen.CreateThread(function() + while true do + if vehInTable(els_Vehicles, checkCarHash(GetVehiclePedIsUsing(GetPlayerPed(-1)))) then + if (GetPedInVehicleSeat(GetVehiclePedIsUsing(GetPlayerPed(-1)), -1) == GetPlayerPed(-1)) or + (GetPedInVehicleSeat(GetVehiclePedIsUsing(GetPlayerPed(-1)), 0) == GetPlayerPed(-1)) then + + if IsDisabledControlPressed(0, keyboard.modifyKey) then + if IsDisabledControlPressed(0, keyboard.pattern.primary) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + changePrimaryPatternMath(-1) + end + if IsDisabledControlPressed(0, keyboard.pattern.secondary) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + changeSecondaryPatternMath(-1) + end + if IsDisabledControlPressed(0, keyboard.pattern.advisor) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + changeAdvisorPatternMath(-1) + end + else + if IsDisabledControlPressed(0, keyboard.pattern.primary) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + changePrimaryPatternMath(1) + end + if IsDisabledControlPressed(0, keyboard.pattern.secondary) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + changeSecondaryPatternMath(1) + end + if IsDisabledControlPressed(0, keyboard.pattern.advisor) then + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + changeAdvisorPatternMath(1) + end + end + end + end + Wait(150) + end +end) + +Citizen.CreateThread(function() + while true do + if panelOffsetX ~= nil and panelOffsetY ~= nil then + if guiEnabled and vehInTable(els_Vehicles, checkCarHash(GetVehiclePedIsUsing(GetPlayerPed(-1)))) then + if (GetPedInVehicleSeat(GetVehiclePedIsUsing(GetPlayerPed(-1)), -1) == GetPlayerPed(-1)) or + (GetPedInVehicleSeat(GetVehiclePedIsUsing(GetPlayerPed(-1)), 0) == GetPlayerPed(-1)) then + local vehN = GetVehiclePedIsUsing(GetPlayerPed(-1)) + + if (panelType == "original") then + _DrawRect(0.85 + panelOffsetX, 0.89 + panelOffsetY, 0.26, 0.16, 16, 16, 16, 225, 0) + + _DrawRect(0.85 + panelOffsetX, 0.835 + panelOffsetY, 0.245, 0.035, 0, 0, 0, 225, 0) + _DrawRect(0.85 + panelOffsetX, 0.835 + panelOffsetY, 0.24, 0.03, getVehicleVCFInfo(vehN).interface.headerColor.r, getVehicleVCFInfo(vehN).interface.headerColor.g, getVehicleVCFInfo(vehN).interface.headerColor.b, 225, 0) + Draw("MAIN", 0, 0, 0, 255, 0.745 + panelOffsetX, 0.825 + panelOffsetY, 0.25, 0.25, 1, true, 0) + Draw("MRDAGREE SYSTEMS", 0, 0, 0, 255, 0.92 + panelOffsetX, 0.825 + panelOffsetY, 0.25, 0.25, 1, true, 0) + + + _DrawRect(0.78 + panelOffsetX, 0.835 + panelOffsetY, 0.033, 0.025, 0, 0, 0, 225, 0) + if (getVehicleLightStage(GetVehiclePedIsUsing(GetPlayerPed(-1))) == 1) then + _DrawRect(0.78 + panelOffsetX, 0.835 + panelOffsetY, 0.03, 0.02, getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 225, 0) + Draw("S-1", 0, 0, 0, 255, 0.78 + panelOffsetX, 0.825 + panelOffsetY, 0.25, 0.25, 1, true, 0) + else + _DrawRect(0.78 + panelOffsetX, 0.835 + panelOffsetY, 0.03, 0.02, 186, 186, 186, 225, 0) + Draw("S-1", 0, 0, 0, 255, 0.78 + panelOffsetX, 0.825 + panelOffsetY, 0.25, 0.25, 1, true, 0) + end + + _DrawRect(0.815 + panelOffsetX, 0.835 + panelOffsetY, 0.033, 0.025, 0, 0, 0, 225, 0) + if (getVehicleLightStage(GetVehiclePedIsUsing(GetPlayerPed(-1))) == 2) then + _DrawRect(0.815 + panelOffsetX, 0.835 + panelOffsetY, 0.03, 0.02, getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 225, 0) + Draw("S-2", 0, 0, 0, 255, 0.815 + panelOffsetX, 0.825 + panelOffsetY, 0.25, 0.25, 1, true, 0) + else + _DrawRect(0.815 + panelOffsetX, 0.835 + panelOffsetY, 0.03, 0.02, 186, 186, 186, 225, 0) + Draw("S-2", 0, 0, 0, 255, 0.815 + panelOffsetX, 0.825 + panelOffsetY, 0.25, 0.25, 1, true, 0) + end + + _DrawRect(0.850 + panelOffsetX, 0.835 + panelOffsetY, 0.033, 0.025, 0, 0, 0, 225, 0) + if (getVehicleLightStage(GetVehiclePedIsUsing(GetPlayerPed(-1))) == 3) then + _DrawRect(0.850 + panelOffsetX, 0.835 + panelOffsetY, 0.03, 0.02, getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 225, 0) + Draw("S-3", 0, 0, 0, 255, 0.850 + panelOffsetX, 0.825 + panelOffsetY, 0.25, 0.25, 1, true, 0) + else + _DrawRect(0.850 + panelOffsetX, 0.835 + panelOffsetY, 0.03, 0.02, 186, 186, 186, 225, 0) + Draw("S-3", 0, 0, 0, 255, 0.850 + panelOffsetX, 0.825 + panelOffsetY, 0.25, 0.25, 1, true, 0) + end + + + + _DrawRect(0.742 + panelOffsetX, 0.88 + panelOffsetY, 0.028, 0.045, 0, 0, 0, 225, 0) + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))] ~= nil then + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].warning then + _DrawRect(0.7421 + panelOffsetX, 0.871 + panelOffsetY, 0.026, 0.02, getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 225, 0) + Draw("E-" .. formatPatternNumber(advisorPatternSelectedIndex), getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 255, 0.7423 + panelOffsetX, 0.88 + panelOffsetY, 0.25, 0.25, 1, true, 0) + else + _DrawRect(0.7421 + panelOffsetX, 0.871 + panelOffsetY, 0.026, 0.02, 186, 186, 186, 225, 0) + Draw("E-" .. formatPatternNumber(advisorPatternSelectedIndex), 255, 255, 255, 255, 0.7423 + panelOffsetX, 0.88 + panelOffsetY, 0.25, 0.25, 1, true, 0) + end + else + _DrawRect(0.7421 + panelOffsetX, 0.871 + panelOffsetY, 0.026, 0.02, 186, 186, 186, 225, 0) + Draw("E-" .. formatPatternNumber(advisorPatternSelectedIndex), 255, 255, 255, 255, 0.7423 + panelOffsetX, 0.88 + panelOffsetY, 0.25, 0.25, 1, true, 0) + end + Draw("WRN", 0, 0, 0, 255, 0.7423 + panelOffsetX, 0.86 + panelOffsetY, 0.25, 0.25, 1, true, 0) + + _DrawRect(0.774 + panelOffsetX, 0.88 + panelOffsetY, 0.028, 0.045, 0, 0, 0, 225, 0) + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))] ~= nil then + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].secondary then + _DrawRect(0.774 + panelOffsetX, 0.871 + panelOffsetY, 0.025, 0.02, getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 225, 0) + Draw("E-" .. formatPatternNumber(lightPatternSec), getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 255, 0.774 + panelOffsetX, 0.88 + panelOffsetY, 0.25, 0.25, 1, true, 0) + else + _DrawRect(0.774 + panelOffsetX, 0.871 + panelOffsetY, 0.025, 0.02, 186, 186, 186, 225, 0) + Draw("E-" .. formatPatternNumber(lightPatternSec), 255, 255, 255, 255, 0.774 + panelOffsetX, 0.88 + panelOffsetY, 0.25, 0.25, 1, true, 0) + end + else + _DrawRect(0.774 + panelOffsetX, 0.871 + panelOffsetY, 0.025, 0.02, 186, 186, 186, 225, 0) + Draw("E-" .. formatPatternNumber(lightPatternSec), 255, 255, 255, 255, 0.774 + panelOffsetX, 0.88 + panelOffsetY, 0.25, 0.25, 1, true, 0) + end + Draw("SEC", 0, 0, 0, 255, 0.774 + panelOffsetX, 0.86 + panelOffsetY, 0.25, 0.25, 1, true, 0) + + _DrawRect(0.806 + panelOffsetX, 0.88 + panelOffsetY, 0.028, 0.045, 0, 0, 0, 225, 0) + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))] ~= nil then + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].primary then + _DrawRect(0.806 + panelOffsetX, 0.871 + panelOffsetY, 0.025, 0.02, getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 225, 0) + Draw("E-" .. formatPatternNumber(lightPatternPrim), getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 255, 0.806 + panelOffsetX, 0.88 + panelOffsetY, 0.25, 0.25, 1, true, 0) + else + _DrawRect(0.806 + panelOffsetX, 0.871 + panelOffsetY, 0.025, 0.02, 186, 186, 186, 225, 0) + Draw("E-" .. formatPatternNumber(lightPatternPrim), 255, 255, 255, 255, 0.806 + panelOffsetX, 0.88 + panelOffsetY, 0.25, 0.25, 1, true, 0) + end + else + _DrawRect(0.806 + panelOffsetX, 0.871 + panelOffsetY, 0.025, 0.02, 186, 186, 186, 225, 0) + Draw("E-" .. formatPatternNumber(lightPatternPrim), 255, 255, 255, 255, 0.806 + panelOffsetX, 0.88 + panelOffsetY, 0.25, 0.25, 1, true, 0) + end + Draw("PRIM", 0, 0, 0, 255, 0.806 + panelOffsetX, 0.86 + panelOffsetY, 0.25, 0.25, 1, true, 0) + + _DrawRect(0.742 + panelOffsetX, 0.93 + panelOffsetY, 0.028, 0.045, 0, 0, 0, 225, 0) + _DrawRect(0.7421 + panelOffsetX, 0.921 + panelOffsetY, 0.026, 0.02, 186, 186, 186, 225, 0) + Draw("--", 255, 255, 255, 255, 0.7423 + panelOffsetX, 0.93 + panelOffsetY, 0.25, 0.25, 1, true, 0) + Draw("HRN", 0, 0, 0, 255, 0.7423 + panelOffsetX, 0.91 + panelOffsetY, 0.25, 0.25, 1, true, 0) + + + _DrawRect(0.86 + panelOffsetX, 0.911 + panelOffsetY, 0.06, 0.09, 0, 0, 0, 225, 0) + + if (IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 11)) then + _DrawRect(0.853 + panelOffsetX, 0.895 + panelOffsetY, 0.01, 0.005, 255, 255, 255, 225, 0) + _DrawRect(0.866 + panelOffsetX, 0.895 + panelOffsetY, 0.01, 0.005, 255, 255, 255, 225, 0) + else + _DrawRect(0.853 + panelOffsetX, 0.895 + panelOffsetY, 0.01, 0.005, 54, 54, 54, 225, 0) + _DrawRect(0.866 + panelOffsetX, 0.895 + panelOffsetY, 0.01, 0.005, 54, 54, 54, 225, 0) + end + + _DrawRect(0.8365 + panelOffsetX, 0.9 + panelOffsetY, 0.0029, 0.015, 54, 54, 54, 225, 0) + + _DrawRect(0.882 + panelOffsetX, 0.9 + panelOffsetY, 0.0029, 0.015, 54, 54, 54, 225, 0) + + if(IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 7)) then + _DrawRect(0.848 + panelOffsetX, 0.94 + panelOffsetY, 0.01, 0.015, getVehicleVCFInfo(vehN).extras[7].env_color.r, getVehicleVCFInfo(vehN).extras[7].env_color.g, getVehicleVCFInfo(vehN).extras[7].env_color.b, 225, 0) + else + _DrawRect(0.848 + panelOffsetX, 0.94 + panelOffsetY, 0.01, 0.015, 54, 54, 54, 225, 0) + end + + if getVehicleVCFInfo(vehN).secl.type == "traf" or getVehicleVCFInfo(vehN).secl.type == "chp" then + if(IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 8)) then + _DrawRect(0.8598 + panelOffsetX, 0.94 + panelOffsetY, 0.01, 0.015, getVehicleVCFInfo(vehN).extras[8].env_color.r, getVehicleVCFInfo(vehN).extras[8].env_color.g, getVehicleVCFInfo(vehN).extras[8].env_color.b, 225, 0) + else + _DrawRect(0.8598 + panelOffsetX, 0.94 + panelOffsetY, 0.01, 0.015, 54, 54, 54, 225, 0) + end + end + + if(IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 9)) then + _DrawRect(0.872 + panelOffsetX, 0.94 + panelOffsetY, 0.01, 0.015, getVehicleVCFInfo(vehN).extras[9].env_color.r, getVehicleVCFInfo(vehN).extras[9].env_color.g, getVehicleVCFInfo(vehN).extras[9].env_color.b, 225, 0) + else + _DrawRect(0.872 + panelOffsetX, 0.94 + panelOffsetY, 0.01, 0.015, 54, 54, 54, 225, 0) + end + + if(IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 1)) then + _DrawRect(0.84 + panelOffsetX, 0.92 + panelOffsetY, 0.01, 0.015, getVehicleVCFInfo(vehN).extras[1].env_color.r, getVehicleVCFInfo(vehN).extras[1].env_color.g, getVehicleVCFInfo(vehN).extras[1].env_color.b, 225, 0) + else + _DrawRect(0.84 + panelOffsetX, 0.92 + panelOffsetY, 0.01, 0.015, 54, 54, 54, 225, 0) + end + + if(IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 2)) then + _DrawRect(0.853 + panelOffsetX, 0.92 + panelOffsetY, 0.01, 0.015, getVehicleVCFInfo(vehN).extras[2].env_color.r, getVehicleVCFInfo(vehN).extras[2].env_color.g, getVehicleVCFInfo(vehN).extras[2].env_color.b, 225, 0) + else + _DrawRect(0.853 + panelOffsetX, 0.92 + panelOffsetY, 0.01, 0.015, 54, 54, 54, 225, 0) + end + + if(IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 3)) then + _DrawRect(0.866 + panelOffsetX, 0.92 + panelOffsetY, 0.01, 0.015, getVehicleVCFInfo(vehN).extras[3].env_color.r, getVehicleVCFInfo(vehN).extras[3].env_color.g, getVehicleVCFInfo(vehN).extras[3].env_color.b, 225, 0) + else + _DrawRect(0.866 + panelOffsetX, 0.92 + panelOffsetY, 0.01, 0.015, 54, 54, 54, 225, 0) + end + + if(IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 4)) then + _DrawRect(0.879 + panelOffsetX, 0.92 + panelOffsetY, 0.01, 0.015, getVehicleVCFInfo(vehN).extras[4].env_color.r, getVehicleVCFInfo(vehN).extras[4].env_color.g, getVehicleVCFInfo(vehN).extras[4].env_color.b, 225, 0) + else + _DrawRect(0.879 + panelOffsetX, 0.92 + panelOffsetY, 0.01, 0.015, 54, 54, 54, 225, 0) + end + + if(IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 5)) then + _DrawRect(0.853 + panelOffsetX, 0.88 + panelOffsetY, 0.01, 0.015, getVehicleVCFInfo(vehN).extras[5].env_color.r, getVehicleVCFInfo(vehN).extras[5].env_color.g, getVehicleVCFInfo(vehN).extras[5].env_color.b, 225, 0) + else + _DrawRect(0.853 + panelOffsetX, 0.88 + panelOffsetY, 0.01, 0.015, 54, 54, 54, 225, 0) + end + + if(IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 6)) then + _DrawRect(0.866 + panelOffsetX, 0.88 + panelOffsetY, 0.01, 0.015, getVehicleVCFInfo(vehN).extras[6].env_color.r, getVehicleVCFInfo(vehN).extras[6].env_color.g, getVehicleVCFInfo(vehN).extras[6].env_color.b, 225, 0) + else + _DrawRect(0.866 + panelOffsetX, 0.88 + panelOffsetY, 0.01, 0.015, 54, 54, 54, 225, 0) + end + + + _DrawRect(0.91 + panelOffsetX, 0.94 + panelOffsetY, 0.024, 0.023, 0, 0, 0, 225, 0) + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))] ~= nil then + if elsVehs[GetVehiclePedIsUsing(GetPlayerPed(-1))].cruise then + _DrawRect(0.91 + panelOffsetX, 0.94 + panelOffsetY, 0.022, 0.02, getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 225, 0) + else + _DrawRect(0.91 + panelOffsetX, 0.94 + panelOffsetY, 0.022, 0.02, 186, 186, 186, 225, 0) + end + else + _DrawRect(0.91 + panelOffsetX, 0.94 + panelOffsetY, 0.0215, 0.02, 186, 186, 186, 225, 0) + end + Draw("CRS", 0, 0, 0, 255, 0.91 + panelOffsetX, 0.93 + panelOffsetY, 0.25, 0.25, 1, true, 0) + + _DrawRect(0.935 + panelOffsetX, 0.94 + panelOffsetY, 0.024, 0.023, 0, 0, 0, 225, 0) + if IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 11) then + _DrawRect(0.935 + panelOffsetX, 0.94 + panelOffsetY, 0.022, 0.02, getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 225, 0) + else + _DrawRect(0.935 + panelOffsetX, 0.94 + panelOffsetY, 0.0215, 0.02, 186, 186, 186, 225, 0) + end + Draw("TKD", 0, 0, 0, 255, 0.935 + panelOffsetX, 0.93 + panelOffsetY, 0.25, 0.25, 1, true, 0) + + _DrawRect(0.96 + panelOffsetX, 0.94 + panelOffsetY, 0.024, 0.023, 0, 0, 0, 225, 0) + if IsVehicleExtraTurnedOn(GetVehiclePedIsUsing(GetPlayerPed(-1)), 12) then + _DrawRect(0.96 + panelOffsetX, 0.94 + panelOffsetY, 0.022, 0.02, getVehicleVCFInfo(vehN).interface.buttonColor.r, getVehicleVCFInfo(vehN).interface.buttonColor.g, getVehicleVCFInfo(vehN).interface.buttonColor.b, 225, 0) + else + _DrawRect(0.96 + panelOffsetX, 0.94 + panelOffsetY, 0.0215, 0.02, 186, 186, 186, 225, 0) + end + Draw("SCL", 0, 0, 0, 255, 0.96 + panelOffsetX, 0.93 + panelOffsetY, 0.25, 0.25, 1, true, 0) + elseif panelType == "fedsigss" then + + end + end + end + end + Wait(1) + end +end) + +-- Citizen.CreateThread(function() + +-- while true do +-- LghtSoundCleaner() + +-- Wait(800) +-- end +-- end) + +Citizen.CreateThread(function() + while true do + for k,v in pairs(elsVehs) do + if(v ~= nil or DoesEntityExist(k)) then + if (GetDistanceBetweenCoords(GetEntityCoords(k, true), GetEntityCoords(GetPlayerPed(-1), true), true) <= vehicleSyncDistance) then + if elsVehs[k].warning or elsVehs[k].secondary or elsVehs[k].primary then + SetVehicleEngineOn(k, true, true, false) + end + + local vehN = checkCarHash(k) + + for i=11,12 do + if (not IsEntityDead(k) and DoesEntityExist(k)) then + if(els_Vehicles[vehN].extras[i] ~= nil and els_Vehicles[vehN].extras[i].enabled) then + if(IsVehicleExtraTurnedOn(k, i)) then + local boneIndex = GetEntityBoneIndexByName(k, "extra_" .. i) + local coords = GetWorldPositionOfEntityBone(k, boneIndex) + local rotX, rotY, rotZ = table.unpack(RotAnglesToVec(GetEntityRotation(k, 2))) + + if els_Vehicles[vehN].extras[i].env_light then + if i == 11 then + DrawSpotLightWithShadow(coords.x + els_Vehicles[vehN].extras[11].env_pos.x, coords.y + els_Vehicles[vehN].extras[11].env_pos.y, coords.z + els_Vehicles[vehN].extras[11].env_pos.z, rotX, rotY, rotZ, 255, 255, 255, 75.0, 2.0, 10.0, 20.0, 0.0, true) + end + if i == 12 then + DrawLightWithRange(coords.x + els_Vehicles[vehN].extras[12].env_pos.x, coords.y + els_Vehicles[vehN].extras[12].env_pos.y, coords.z + els_Vehicles[vehN].extras[12].env_pos.z, 255, 255, 255, 50.0, envirementLightBrightness) + end + else + if i == 11 then + DrawSpotLightWithShadow(coords.x, coords.y, coords.z + 0.2, rotX, rotY, rotZ, 255, 255, 255, 75.0, 2.0, 10.0, 20.0, 0.0, true) + end + if i == 12 then + DrawLightWithRange(coords.x, coords.y, coords.z, 255, 255, 255, 50.0, envirementLightBrightness) + end + end + end + end + end + end + end + end + end + Wait(4) + end +end) + +Citizen.CreateThread(function() + + while true do + for k,v in pairs(elsVehs) do + if (v ~= nil and DoesEntityExist(k) and GetDistanceBetweenCoords(GetEntityCoords(k, true), GetEntityCoords(GetPlayerPed(-1), true), true) <= vehicleSyncDistance) then + SetVehicleAutoRepairDisabled(k, true) + + if getVehicleVCFInfo(k).priml.type == string.lower("chp") and getVehicleVCFInfo(k).wrnl.type == string.lower("chp") and getVehicleVCFInfo(k).secl.type == string.lower("chp") then + + if v.stage == 0 then + for i=1,10 do + setExtraState(k, i, 1) + end + end + + if v.stage == 1 and v.advisorPattern <= 1 then + runCHPPattern(k, v.advisorPattern, v.stage) + end + + if v.stage == 2 and v.secPattern <= 3 then + runCHPPattern(k, v.secPattern, v.stage) + end + + if v.stage == 3 and v.primPattern <= 3 then + runCHPPattern(k, v.primPattern, v.stage) + end + + else + + if (v.warning) then + if getVehicleVCFInfo(k).wrnl.type == string.lower("leds") and v.advisorPattern <= 53 then + runLedPatternWarning(k, v.advisorPattern) + end + else + setExtraState(k, 5, 1) + setExtraState(k, 6, 1) + end + + if (v.secondary) then + if getVehicleVCFInfo(k).secl.type == string.lower("leds") and v.secPattern <= 140 then + runLedPatternSecondary(k, v.secPattern, function(cb) vehIsReadySecondary[k] = cb end) + elseif getVehicleVCFInfo(k).secl.type == string.lower("traf") and v.secPattern <= 36 then + runTrafPattern(k, v.secPattern) + end + else + setExtraState(k, 7, 1) + setExtraState(k, 8, 1) + setExtraState(k, 9, 1) + end + + if (v.primary) then + if getVehicleVCFInfo(k).priml.type == string.lower("leds") and v.primPattern <= 140 then + runLedPatternPrimary(k, v.primPattern) + end + else + setExtraState(k, 1, 1) + setExtraState(k, 2, 1) + setExtraState(k, 3, 1) + setExtraState(k, 4, 1) + end + + end + end + end + Citizen.Wait(0) + end +end) \ No newline at end of file diff --git a/resources/els-fivem/client/patterns.lua b/resources/els-fivem/client/patterns.lua new file mode 100644 index 000000000..bd053c1a0 --- /dev/null +++ b/resources/els-fivem/client/patterns.lua @@ -0,0 +1,1226 @@ +els_patterns = {} + +function getNumberOfPrimaryPatterns(veh) + local count = 0 + if getVehicleVCFInfo(veh).priml.type == string.lower("leds") then + for k,v in pairs(led_PrimaryPatterns) do + if (v ~= nil) then + count = count + 1 + end + end + elseif getVehicleVCFInfo(veh).priml.type == string.lower("chp") then + count = 3 + end + + return count +end + +function getNumberOfSecondaryPatterns(veh) + local count = 0 + if getVehicleVCFInfo(veh).secl.type == string.lower("leds") then + for k,v in pairs(led_SecondaryPatterns) do + if (v ~= nil) then + count = count + 1 + end + end + end + if getVehicleVCFInfo(veh).secl.type == string.lower("traf") then + for k,v in pairs(traf_Patterns) do + if (v ~= nil) then + count = count + 1 + end + end + end + if getVehicleVCFInfo(veh).secl.type == string.lower("chp") then + count = 3 + end + + return count +end + +function getNumberOfAdvisorPatterns(veh) + local count = 0 + if getVehicleVCFInfo(veh).wrnl.type == string.lower("leds") then + for k,v in pairs(leds_WarningPatterns) do + if (v ~= nil) then + count = count + 1 + end + end + end + if getVehicleVCFInfo(veh).secl.type == string.lower("chp") then + count = 1 + end + + return count +end + +function runEnvirementLightWithBrightness(k, extra, brightness) + Citizen.CreateThread(function() + local vehN = checkCarHash(k) + + if els_Vehicles[vehN].extras[extra] ~= nil then + if(els_Vehicles[vehN].extras[extra].env_light) then + local boneIndex = GetEntityBoneIndexByName(k, "extra_" .. extra) + local coords = GetWorldPositionOfEntityBone(k, boneIndex) + + for i=1,6 do + if(IsVehicleExtraTurnedOn(k, extra) == false) then break end + DrawLightWithRangeAndShadow(coords.x + els_Vehicles[vehN].extras[extra].env_pos.x, coords.y + els_Vehicles[vehN].extras[extra].env_pos.y, coords.z + els_Vehicles[vehN].extras[extra].env_pos.z, els_Vehicles[vehN].extras[extra].env_color.r, els_Vehicles[vehN].extras[extra].env_color.g, els_Vehicles[vehN].extras[extra].env_color.b, 50.0, 0.26, 1.0) + --DrawLightWithRangeAndShadow(coords.x + els_Vehicles[vehN].extras[extra].env_pos.x, coords.y + els_Vehicles[vehN].extras[extra].env_pos.y, coords.z + els_Vehicles[vehN].extras[extra].env_pos.z, els_Vehicles[vehN].extras[extra].env_color.r, els_Vehicles[vehN].extras[extra].env_color.g, els_Vehicles[vehN].extras[extra].env_color.b, 150 + 0.0, brightness, 1.0) + Wait(2) + end + end + end + end) +end + +function runEnvirementLight(k, extra) + Citizen.CreateThread(function() + if not IsEntityDead(k) and k ~= nil then + local vehN = checkCarHash(k) + + if els_Vehicles[vehN].extras[extra] ~= nil then + if(els_Vehicles[vehN].extras[extra].env_light) then + local boneIndex = GetEntityBoneIndexByName(k, "extra_" .. extra) + local coords = GetWorldPositionOfEntityBone(k, boneIndex) + + for i=1,6 do + if(IsVehicleExtraTurnedOn(k, extra) == false) then break end + DrawLightWithRangeAndShadow(coords.x + els_Vehicles[vehN].extras[extra].env_pos.x, coords.y + els_Vehicles[vehN].extras[extra].env_pos.y, coords.z + els_Vehicles[vehN].extras[extra].env_pos.z, els_Vehicles[vehN].extras[extra].env_color.r, els_Vehicles[vehN].extras[extra].env_color.g, els_Vehicles[vehN].extras[extra].env_color.b, 50.0, envirementLightBrightness, 5.0) + --DrawLightWithRange(coords.x + els_Vehicles[vehN].extras[extra].env_pos.x, coords.y + els_Vehicles[vehN].extras[extra].env_pos.y, coords.z + els_Vehicles[vehN].extras[extra].env_pos.z, els_Vehicles[vehN].extras[extra].env_color.r, els_Vehicles[vehN].extras[extra].env_color.g, els_Vehicles[vehN].extras[extra].env_color.b, 150 + 0.0, envirementLightBrightness) + Wait(2) + end + end + end + end + end) +end + +local chpPatternReady = {} +function runCHPPattern(k, pattern, stage) + Citizen.CreateThread(function() + if (not IsEntityDead(k) and DoesEntityExist(k) and (chpPatternReady[k] or chpPatternReady[k] == nil)) then + + chpPatternReady[k] = false + + local done = {} + done[1] = false + done[2] = false + done[3] = false + done[4] = false + done[5] = false + done[6] = false + done[7] = false + done[8] = false + done[9] = false + done[10] = false + + if stage == 1 then + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageOne[pattern][1]) do + local c = tonumber(string.sub(chp_StageOne[pattern][1], spot, spot) ) + setExtraState(k, 1, c) + if c == 0 then + runEnvirementLight(k, 1) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[1] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageOne[pattern][1]) then + done[1] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageOne[pattern][2]) do + local c = tonumber(string.sub(chp_StageOne[pattern][2], spot, spot) ) + setExtraState(k, 2, c) + if c == 0 then + runEnvirementLight(k, 2) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[2] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageOne[pattern][2]) then + done[2] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageOne[pattern][3]) do + local c = tonumber(string.sub(chp_StageOne[pattern][3], spot, spot) ) + setExtraState(k, 3, c) + if c == 0 then + runEnvirementLight(k, 3) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[3] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageOne[pattern][3]) then + done[3] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageOne[pattern][4]) do + local c = tonumber(string.sub(chp_StageOne[pattern][4], spot, spot) ) + setExtraState(k, 4, c) + if c == 0 then + runEnvirementLight(k, 4) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[4] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageOne[pattern][4]) then + done[4] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageOne[pattern][5]) do + local c = tonumber(string.sub(chp_StageOne[pattern][5], spot, spot) ) + setExtraState(k, 5, c) + if c == 0 then + runEnvirementLight(k, 5) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[5] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageOne[pattern][5]) then + done[5] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageOne[pattern][6]) do + local c = tonumber(string.sub(chp_StageOne[pattern][6], spot, spot) ) + setExtraState(k, 6, c) + if c == 0 then + runEnvirementLight(k, 6) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[6] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageOne[pattern][6]) then + done[6] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageOne[pattern][7]) do + local c = tonumber(string.sub(chp_StageOne[pattern][7], spot, spot) ) + setExtraState(k, 7, c) + if c == 0 then + runEnvirementLight(k, 7) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[7] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageOne[pattern][7]) then + done[7] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageOne[pattern][8]) do + local c = tonumber(string.sub(chp_StageOne[pattern][8], spot, spot) ) + setExtraState(k, 8, c) + if c == 0 then + runEnvirementLight(k, 8) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[8] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageOne[pattern][8]) then + done[8] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageOne[pattern][9]) do + local c = tonumber(string.sub(chp_StageOne[pattern][9], spot, spot) ) + setExtraState(k, 9, c) + if c == 0 then + runEnvirementLight(k, 9) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[9] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageOne[pattern][9]) then + done[9] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageOne[pattern][10]) do + local c = tonumber(string.sub(chp_StageOne[pattern][10], spot, spot) ) + setExtraState(k, 10, c) + if c == 0 then + runEnvirementLight(k, 10) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[10] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageOne[pattern][10]) then + done[10] = true + break + end + end + + return + end) + elseif stage == 2 then + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageTwo[pattern][1]) do + local c = tonumber(string.sub(chp_StageTwo[pattern][1], spot, spot) ) + setExtraState(k, 1, c) + if c == 0 then + runEnvirementLight(k, 1) + end + + if elsVehs[k].secPattern ~= pattern then + done[1] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageTwo[pattern][1]) then + done[1] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageTwo[pattern][2]) do + local c = tonumber(string.sub(chp_StageTwo[pattern][2], spot, spot) ) + setExtraState(k, 2, c) + if c == 0 then + runEnvirementLight(k, 2) + end + + if elsVehs[k].secPattern ~= pattern then + done[2] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageTwo[pattern][2]) then + done[2] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageTwo[pattern][3]) do + local c = tonumber(string.sub(chp_StageTwo[pattern][3], spot, spot) ) + setExtraState(k, 3, c) + if c == 0 then + runEnvirementLight(k, 3) + end + + if elsVehs[k].secPattern ~= pattern then + done[3] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageTwo[pattern][3]) then + done[3] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageTwo[pattern][4]) do + local c = tonumber(string.sub(chp_StageTwo[pattern][4], spot, spot) ) + setExtraState(k, 4, c) + if c == 0 then + runEnvirementLight(k, 4) + end + + if elsVehs[k].secPattern ~= pattern then + done[4] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageTwo[pattern][4]) then + done[4] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageTwo[pattern][5]) do + local c = tonumber(string.sub(chp_StageTwo[pattern][5], spot, spot) ) + setExtraState(k, 5, c) + if c == 0 then + runEnvirementLight(k, 5) + end + + if elsVehs[k].secPattern ~= pattern then + done[5] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageTwo[pattern][5]) then + done[5] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageTwo[pattern][6]) do + local c = tonumber(string.sub(chp_StageTwo[pattern][6], spot, spot) ) + setExtraState(k, 6, c) + if c == 0 then + runEnvirementLight(k, 6) + end + + if elsVehs[k].secPattern ~= pattern then + done[6] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageTwo[pattern][6]) then + done[6] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageTwo[pattern][7]) do + local c = tonumber(string.sub(chp_StageTwo[pattern][7], spot, spot) ) + setExtraState(k, 7, c) + if c == 0 then + runEnvirementLight(k, 7) + end + + if elsVehs[k].secPattern ~= pattern then + done[7] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageTwo[pattern][7]) then + done[7] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageTwo[pattern][8]) do + local c = tonumber(string.sub(chp_StageTwo[pattern][8], spot, spot) ) + setExtraState(k, 8, c) + if c == 0 then + runEnvirementLight(k, 8) + end + + if elsVehs[k].secPattern ~= pattern then + done[8] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageTwo[pattern][8]) then + done[8] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageTwo[pattern][9]) do + local c = tonumber(string.sub(chp_StageTwo[pattern][9], spot, spot) ) + setExtraState(k, 9, c) + if c == 0 then + runEnvirementLight(k, 9) + end + + if elsVehs[k].secPattern ~= pattern then + done[9] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageTwo[pattern][9]) then + done[9] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageTwo[pattern][10]) do + local c = tonumber(string.sub(chp_StageTwo[pattern][10], spot, spot) ) + setExtraState(k, 10, c) + if c == 0 then + runEnvirementLight(k, 10) + end + + if elsVehs[k].secPattern ~= pattern then + done[10] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageTwo[pattern][10]) then + done[10] = true + break + end + end + + return + end) + elseif stage == 3 then + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageThree[pattern][1]) do + local c = tonumber(string.sub(chp_StageThree[pattern][1], spot, spot) ) + setExtraState(k, 1, c) + if c == 0 then + runEnvirementLight(k, 1) + end + + if elsVehs[k].primPattern ~= pattern then + done[1] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageThree[pattern][1]) then + done[1] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageThree[pattern][2]) do + local c = tonumber(string.sub(chp_StageThree[pattern][2], spot, spot) ) + setExtraState(k, 2, c) + if c == 0 then + runEnvirementLight(k, 2) + end + + if elsVehs[k].primPattern ~= pattern then + done[2] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageThree[pattern][2]) then + done[2] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageThree[pattern][3]) do + local c = tonumber(string.sub(chp_StageThree[pattern][3], spot, spot) ) + setExtraState(k, 3, c) + if c == 0 then + runEnvirementLight(k, 3) + end + + if elsVehs[k].primPattern ~= pattern then + done[3] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageThree[pattern][3]) then + done[3] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageThree[pattern][4]) do + local c = tonumber(string.sub(chp_StageThree[pattern][4], spot, spot) ) + setExtraState(k, 4, c) + if c == 0 then + runEnvirementLight(k, 4) + end + + if elsVehs[k].primPattern ~= pattern then + done[4] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageThree[pattern][4]) then + done[4] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageThree[pattern][5]) do + local c = tonumber(string.sub(chp_StageThree[pattern][5], spot, spot) ) + setExtraState(k, 5, c) + if c == 0 then + runEnvirementLight(k, 5) + end + + if elsVehs[k].primPattern ~= pattern then + done[5] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageThree[pattern][5]) then + done[5] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageThree[pattern][6]) do + local c = tonumber(string.sub(chp_StageThree[pattern][6], spot, spot) ) + setExtraState(k, 6, c) + if c == 0 then + runEnvirementLight(k, 6) + end + + if elsVehs[k].primPattern ~= pattern then + done[6] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageThree[pattern][6]) then + done[6] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageThree[pattern][7]) do + local c = tonumber(string.sub(chp_StageThree[pattern][7], spot, spot) ) + setExtraState(k, 7, c) + if c == 0 then + runEnvirementLight(k, 7) + end + + if elsVehs[k].primPattern ~= pattern then + done[7] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageThree[pattern][7]) then + done[7] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageThree[pattern][8]) do + local c = tonumber(string.sub(chp_StageThree[pattern][8], spot, spot) ) + setExtraState(k, 8, c) + if c == 0 then + runEnvirementLight(k, 8) + end + + if elsVehs[k].primPattern ~= pattern then + done[8] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageThree[pattern][8]) then + done[8] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageThree[pattern][9]) do + local c = tonumber(string.sub(chp_StageThree[pattern][9], spot, spot) ) + setExtraState(k, 9, c) + if c == 0 then + runEnvirementLight(k, 9) + end + + if elsVehs[k].primPattern ~= pattern then + done[9] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageThree[pattern][9]) then + done[9] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(chp_StageThree[pattern][10]) do + local c = tonumber(string.sub(chp_StageThree[pattern][10], spot, spot) ) + setExtraState(k, 10, c) + if c == 0 then + runEnvirementLight(k, 10) + end + + if elsVehs[k].primPattern ~= pattern then + done[10] = true + break + end + + Wait(lightDelay) + + if spot == string.len(chp_StageThree[pattern][10]) then + done[10] = true + break + end + end + + return + end) + end + + while (not done[1] or not done[2] or not done[3] or not done[4] or not done[5] or not done[6] or not done[7] or not done[8] or not done[9] or not done[10]) do Wait(0) end + if done[1] and done[2] and done[3] and done[4] and done[5] and done[6] and done[7] and done[8] and done[9] and done[10] then + chpPatternReady[k] = true + end + end + end) +end + +local trafPatternReady = {} +function runTrafPattern(k, pattern) + Citizen.CreateThread(function() + if (not IsEntityDead(k) and DoesEntityExist(k) and (trafPatternReady[k] or trafPatternReady[k] == nil)) then + + trafPatternReady[k] = false + + local done = {} + done[1] = false + done[2] = false + done[3] = false + + Citizen.CreateThread(function() + for spot = 1, string.len(traf_Patterns[pattern][7]) do + local c = tonumber(string.sub(traf_Patterns[pattern][7], spot, spot) ) + setExtraState(k, 7, c) + if c == 0 then + runEnvirementLight(k, 7) + end + + if elsVehs[k].secPattern ~= pattern then + done[1] = true + break + end + + Wait(lightDelay) + + if spot == string.len(traf_Patterns[pattern][7]) then + done[1] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(traf_Patterns[pattern][8]) do + local c = tonumber(string.sub(traf_Patterns[pattern][8], spot, spot) ) + setExtraState(k, 8, c) + if c == 0 then + runEnvirementLight(k, 8) + end + + if elsVehs[k].secPattern ~= pattern then + done[2] = true + break + end + + Wait(lightDelay) + + if spot == string.len(traf_Patterns[pattern][8]) then + done[2] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(traf_Patterns[pattern][9]) do + local c = tonumber(string.sub(traf_Patterns[pattern][9], spot, spot) ) + setExtraState(k, 9, c) + if c == 0 then + runEnvirementLight(k, 9) + end + + if elsVehs[k].secPattern ~= pattern then + done[3] = true + break + end + + Wait(lightDelay) + + if spot == string.len(traf_Patterns[pattern][9]) then + done[3] = true + break + end + end + + return + end) + + while (not done[1] or not done[2] or not done[3]) do Wait(0) end + if done[1] and done[2] and done[3] then + trafPatternReady[k] = true + end + end + end) +end + +local ledSecondaryReady = {} +function runLedPatternSecondary(k, pattern) + Citizen.CreateThread(function() + if (not IsEntityDead(k) and DoesEntityExist(k) and (ledSecondaryReady[k] or ledSecondaryReady[k] == nil)) then + + ledSecondaryReady[k] = false + + local done = {} + done[1] = false + done[2] = false + done[3] = false + + Citizen.CreateThread(function() + for spot = 1, string.len(led_SecondaryPatterns[pattern][7]) do + local c = tonumber(string.sub(led_SecondaryPatterns[pattern][7], spot, spot) ) + + setExtraState(k, 7, c) + if c == 0 then + runEnvirementLight(k, 7) + end + + if elsVehs[k] ~= nil then + if elsVehs[k].secPattern ~= pattern then + done[1] = true + ledSecondary = 1 + break + end + end + + Wait(lightDelay) + + if spot == string.len(led_SecondaryPatterns[pattern][7]) then + done[1] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(led_SecondaryPatterns[pattern][8]) do + local c = tonumber(string.sub(led_SecondaryPatterns[pattern][8], spot, spot) ) + + setExtraState(k, 8, c) + if c == 0 then + runEnvirementLight(k, 8) + end + + if elsVehs[k] ~= nil then + if elsVehs[k].secPattern ~= pattern then + done[2] = true + ledSecondary = 1 + break + end + end + + Wait(lightDelay) + + if spot == string.len(led_SecondaryPatterns[pattern][8]) then + done[2] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(led_SecondaryPatterns[pattern][9]) do + local c = tonumber(string.sub(led_SecondaryPatterns[pattern][9], spot, spot) ) + setExtraState(k, 9, c) + if c == 0 then + runEnvirementLight(k, 9) + end + + if elsVehs[k] ~= nil then + if elsVehs[k].secPattern ~= pattern then + done[3] = true + ledSecondary = 1 + break + end + end + + Wait(lightDelay) + + if spot == string.len(led_SecondaryPatterns[pattern][9]) then + done[3] = true + break + end + end + + return + end) + + while (not done[1] or not done[2] or not done[3]) do Wait(0) end + if done[1] and done[2] and done[3] then + ledSecondaryReady[k] = true + end + end + end) +end + +local ledWarningReady = {} +function runLedPatternWarning(k, pattern) + Citizen.CreateThread(function() + if (not IsEntityDead(k) and DoesEntityExist(k) and (ledWarningReady[k] or ledWarningReady[k] == nil)) then + + ledWarningReady[k] = false + + local done = {} + done[1] = false + done[2] = false + done[3] = false + + Citizen.CreateThread(function() + for spot = 1, string.len(leds_WarningPatterns[pattern][5]) do + local c = tonumber(string.sub(leds_WarningPatterns[pattern][5], spot, spot) ) + setExtraState(k, 5, c) + if c == 0 then + runEnvirementLight(k, 5) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[1] = true + break + end + + Wait(lightDelay) + + if spot == string.len(leds_WarningPatterns[pattern][5]) then + done[1] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(leds_WarningPatterns[pattern][6]) do + local c = tonumber(string.sub(leds_WarningPatterns[pattern][6], spot, spot) ) + setExtraState(k, 6, c) + if c == 0 then + runEnvirementLight(k, 6) + end + + if elsVehs[k].advisorPattern ~= pattern then + done[2] = true + break + end + + Wait(lightDelay) + + if spot == string.len(leds_WarningPatterns[pattern][6]) then + done[2] = true + break + end + end + + return + end) + + while (not done[1] or not done[2]) do Wait(0) end + if done[1] and done[2] then + ledWarningReady[k] = true + end + end + end) +end + +local ledPrimaryReady = {} +function runLedPatternPrimary(k, pattern) + Citizen.CreateThread(function() + if (not IsEntityDead(k) and DoesEntityExist(k) and (ledPrimaryReady[k] or ledPrimaryReady[k] == nil)) then + + ledPrimaryReady[k] = false + + local done = {} + done[1] = false + done[2] = false + done[3] = false + done[4] = false + + Citizen.CreateThread(function() + for spot = 1, string.len(led_PrimaryPatterns[pattern][1]) do + local c = tonumber(string.sub(led_PrimaryPatterns[pattern][1], spot, spot) ) + setExtraState(k, 1, c) + if c == 0 then + runEnvirementLight(k, 1) + end + + if elsVehs[k].primPattern ~= pattern then + done[1] = true + break + end + + Wait(lightDelay) + + if spot == string.len(led_PrimaryPatterns[pattern][1]) then + done[1] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(led_PrimaryPatterns[pattern][2]) do + local c = tonumber(string.sub(led_PrimaryPatterns[pattern][2], spot, spot) ) + setExtraState(k, 2, c) + if c == 0 then + runEnvirementLight(k, 2) + end + + if elsVehs[k].primPattern ~= pattern then + done[2] = true + break + end + + Wait(lightDelay) + + if spot == string.len(led_PrimaryPatterns[pattern][2]) then + done[2] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(led_PrimaryPatterns[pattern][3]) do + local c = tonumber(string.sub(led_PrimaryPatterns[pattern][3], spot, spot) ) + setExtraState(k, 3, c) + if c == 0 then + runEnvirementLight(k, 3) + end + + if elsVehs[k].primPattern ~= pattern then + done[3] = true + break + end + + Wait(lightDelay) + + if spot == string.len(led_PrimaryPatterns[pattern][3]) then + done[3] = true + break + end + end + + return + end) + + Citizen.CreateThread(function() + for spot = 1, string.len(led_PrimaryPatterns[pattern][4]) do + local c = tonumber(string.sub(led_PrimaryPatterns[pattern][4], spot, spot) ) + setExtraState(k, 4, c) + if c == 0 then + runEnvirementLight(k, 4) + end + + if elsVehs[k].primPattern ~= pattern then + done[4] = true + break + end + + Wait(lightDelay) + + if spot == string.len(led_PrimaryPatterns[pattern][4]) then + done[4] = true + break + end + end + + return + end) + + while (not done[1] or not done[2] or not done[3] or not done[4]) do Wait(0) end + if done[1] and done[2] and done[3] and done[4] then + ledPrimaryReady[k] = true + end + end + end) +end \ No newline at end of file diff --git a/resources/els-fivem/client/util.lua b/resources/els-fivem/client/util.lua new file mode 100644 index 000000000..e147df747 --- /dev/null +++ b/resources/els-fivem/client/util.lua @@ -0,0 +1,632 @@ +RegisterNetEvent("els:updateElsVehicles") +AddEventHandler("els:updateElsVehicles", function(vehicles, patterns) + els_Vehicles = vehicles + els_patterns = patterns + + lightPatternPrim = 1 + lightPatternSec = 1 + advisorPatternSelectedIndex = 1 +end) + +RegisterNetEvent("els:changeLightStage_c") +AddEventHandler("els:changeLightStage_c", function(sender, stage, advisor, prim, sec) + Citizen.CreateThread(function() + + local player_s = GetPlayerFromServerId(sender) + local ped_s = GetPlayerPed(player_s) + if DoesEntityExist(ped_s) and not IsEntityDead(ped_s) then + if IsPedInAnyVehicle(ped_s, false) then + + local vehNetID = GetVehiclePedIsUsing(ped_s) + + if elsVehs[vehNetID] ~= nil then + elsVehs[vehNetID].stage = stage + if (stage == 1) then + elsVehs[vehNetID].warning = false + elsVehs[vehNetID].secondary = true + elsVehs[vehNetID].primary = false + elseif (stage == 2) then + elsVehs[vehNetID].warning = false + elsVehs[vehNetID].secondary = true + elsVehs[vehNetID].primary = true + elseif (stage == 3) then + elsVehs[vehNetID].warning = true + elsVehs[vehNetID].secondary = true + elsVehs[vehNetID].primary = true + else + elsVehs[vehNetID].warning = false + elsVehs[vehNetID].secondary = false + elsVehs[vehNetID].primary = false + end + elsVehs[vehNetID].primPattern = prim + elsVehs[vehNetID].secPattern = sec + elsVehs[vehNetID].advisorPattern = advisor + else + elsVehs[vehNetID] = {} + elsVehs[vehNetID].stage = stage + if (stage == 1) then + elsVehs[vehNetID].warning = false + elsVehs[vehNetID].secondary = true + elsVehs[vehNetID].primary = false + elseif (stage == 2) then + elsVehs[vehNetID].warning = false + elsVehs[vehNetID].secondary = true + elsVehs[vehNetID].primary = true + elseif (stage == 3) then + elsVehs[vehNetID].warning = true + elsVehs[vehNetID].secondary = true + elsVehs[vehNetID].primary = true + else + elsVehs[vehNetID].warning = false + elsVehs[vehNetID].secondary = false + elsVehs[vehNetID].primary = false + end + elsVehs[vehNetID].primPattern = prim + elsVehs[vehNetID].secPattern = sec + elsVehs[vehNetID].advisorPattern = advisor + end + end + end + return + end) +end) + +RegisterNetEvent("els:changePartState_c") +AddEventHandler("els:changePartState_c", function(sender, part, newstate) + local player_s = GetPlayerFromServerId(sender) + local ped_s = GetPlayerPed(player_s) + if DoesEntityExist(ped_s) and not IsEntityDead(ped_s) then + if IsPedInAnyVehicle(ped_s, false) then + local vehNetID = GetVehiclePedIsUsing(ped_s) + + if elsVehs[vehNetID] == nil then + elsVehs[vehNetID] = {} + elsVehs[vehNetID].stage = 0 + elsVehs[vehNetID].primPattern = 1 + elsVehs[vehNetID].secPattern = 1 + elsVehs[vehNetID].advisorPattern = 1 + end + + elsVehs[vehNetID][part] = newstate + end + end +end) + +RegisterNetEvent("els:changeAdvisorPattern_c") +AddEventHandler("els:changeAdvisorPattern_c", function(sender, pat) + local player_s = GetPlayerFromServerId(sender) + local ped_s = GetPlayerPed(player_s) + if DoesEntityExist(ped_s) and not IsEntityDead(ped_s) then + if IsPedInAnyVehicle(ped_s, false) then + + local vehNetID = GetVehiclePedIsUsing(ped_s) + + if elsVehs[vehNetID] ~= nil then + elsVehs[vehNetID].advisorPattern = pat + else + elsVehs[vehNetID] = {} + elsVehs[vehNetID].advisorPattern = pat + end + end + end +end) + +RegisterNetEvent("els:changeSecondaryPattern_c") +AddEventHandler("els:changeSecondaryPattern_c", function(sender, pat) + local player_s = GetPlayerFromServerId(sender) + local ped_s = GetPlayerPed(player_s) + if DoesEntityExist(ped_s) and not IsEntityDead(ped_s) then + if IsPedInAnyVehicle(ped_s, false) then + + local vehNetID = GetVehiclePedIsUsing(ped_s) + + if elsVehs[vehNetID] ~= nil then + elsVehs[vehNetID].secPattern = pat + else + elsVehs[vehNetID] = {} + elsVehs[vehNetID].secPattern = pat + end + end + end +end) + +RegisterNetEvent("els:changePrimaryPattern_c") +AddEventHandler("els:changePrimaryPattern_c", function(sender, pat) + local player_s = GetPlayerFromServerId(sender) + local ped_s = GetPlayerPed(player_s) + if DoesEntityExist(ped_s) and not IsEntityDead(ped_s) then + if IsPedInAnyVehicle(ped_s, false) then + + local vehNetID = GetVehiclePedIsUsing(ped_s) + + if elsVehs[vehNetID] ~= nil then + elsVehs[vehNetID].primPattern = pat + else + elsVehs[vehNetID] = {} + elsVehs[vehNetID].primPattern = pat + end + end + end +end) + +RegisterNetEvent("els:setSirenState_c") +AddEventHandler("els:setSirenState_c", function(sender, newstate) + local player_s = GetPlayerFromServerId(sender) + local ped_s = GetPlayerPed(player_s) + if DoesEntityExist(ped_s) and not IsEntityDead(ped_s) then + if IsPedInAnyVehicle(ped_s, false) then + local veh = GetVehiclePedIsUsing(ped_s) + setSirenState(veh, newstate) + end + end +end) + +RegisterNetEvent("els:setHornState_c") +AddEventHandler("els:setHornState_c", function(sender, newstate) + local player_s = GetPlayerFromServerId(sender) + local ped_s = GetPlayerPed(player_s) + if DoesEntityExist(ped_s) and not IsEntityDead(ped_s) then + if IsPedInAnyVehicle(ped_s, false) then + local veh = GetVehiclePedIsUsing(ped_s) + setHornState(veh, newstate) + end + end +end) + +RegisterNetEvent("els:setSceneLightState_c") +AddEventHandler("els:setSceneLightState_c", function(sender) + local player_s = GetPlayerFromServerId(sender) + local ped_s = GetPlayerPed(player_s) + if DoesEntityExist(ped_s) and not IsEntityDead(ped_s) then + if IsPedInAnyVehicle(ped_s, false) then + local veh = GetVehiclePedIsUsing(ped_s) + if(elsVehs[veh] == nil) then + changeLightStage(0, 1, 1, 1) + end + if IsVehicleExtraTurnedOn(veh, 12) then + setExtraState(veh, 12, 1) + else + setExtraState(veh, 12, 0) + end + end + end +end) + +RegisterNetEvent("els:setCruiseLights_c") +AddEventHandler("els:setCruiseLights_c", function(sender) + local player_s = GetPlayerFromServerId(sender) + local ped_s = GetPlayerPed(player_s) + if DoesEntityExist(ped_s) and not IsEntityDead(ped_s) then + if IsPedInAnyVehicle(ped_s, false) then + local veh = GetVehiclePedIsUsing(ped_s) + if elsVehs[veh] ~= nil then + if elsVehs[veh].cruise then + elsVehs[veh].cruise = false + else + elsVehs[veh].cruise = true + end + else + elsVehs[veh] = {} + elsVehs[veh].cruise = true + end + end + end +end) + +RegisterNetEvent("els:setTakedownState_c") +AddEventHandler("els:setTakedownState_c", function(sender) + local player_s = GetPlayerFromServerId(sender) + local ped_s = GetPlayerPed(player_s) + if DoesEntityExist(ped_s) and not IsEntityDead(ped_s) then + if IsPedInAnyVehicle(ped_s, false) then + local veh = GetVehiclePedIsUsing(ped_s) + if(elsVehs[veh] == nil) then + changeLightStage(0, 1, 1, 1) + end + if IsVehicleExtraTurnedOn(veh, 11) then + setExtraState(veh, 11, 1) + else + setExtraState(veh, 11, 0) + end + end + end +end) + +function toggleSirenMute(veh, toggle) + if DoesEntityExist(veh) and not IsEntityDead(veh) then + DisableVehicleImpactExplosionActivation(veh, toggle) + end +end + +function setHornState(veh, newstate) + if DoesEntityExist(veh) and not IsEntityDead(veh) then + if newstate ~= h_horn_state[veh] then + + if h_soundID_veh[veh] ~= nil then + StopSound(h_soundID_veh[veh]) + ReleaseSoundId(h_soundID_veh[veh]) + h_soundID_veh[veh] = nil + end + + if newstate == 1 then + h_soundID_veh[veh] = GetSoundId() + PlaySoundFromEntity(h_soundID_veh[veh], getVehicleVCFInfo(veh).sounds.mainHorn.audioString, veh, 0, 0, 0) + end + + h_horn_state[veh] = newstate + end + end +end + +function setSirenState(veh, newstate) + if DoesEntityExist(veh) and not IsEntityDead(veh) then + if newstate ~= m_siren_state[veh] then + + if m_soundID_veh[veh] ~= nil then + StopSound(m_soundID_veh[veh]) + ReleaseSoundId(m_soundID_veh[veh]) + m_soundID_veh[veh] = nil + end + + if newstate == 1 then + + m_soundID_veh[veh] = GetSoundId() + PlaySoundFromEntity(m_soundID_veh[veh], getVehicleVCFInfo(veh).sounds.srnTone1.audioString, veh, 0, 0, 0) + toggleSirenMute(veh, true) + + elseif newstate == 2 then + + m_soundID_veh[veh] = GetSoundId() + PlaySoundFromEntity(m_soundID_veh[veh], getVehicleVCFInfo(veh).sounds.srnTone2.audioString, veh, 0, 0, 0) + toggleSirenMute(veh, true) + + elseif newstate == 3 then + + m_soundID_veh[veh] = GetSoundId() + PlaySoundFromEntity(m_soundID_veh[veh], getVehicleVCFInfo(veh).sounds.srnTone3.audioString, veh, 0, 0, 0) + toggleSirenMute(veh, true) + + else + toggleSirenMute(veh, true) + end + + m_siren_state[veh] = newstate + end + end +end + +function RotAnglesToVec(rot) -- input vector3 + local z = math.rad(rot.z) + local x = math.rad(rot.x) + local num = math.abs(math.cos(x)) + return vector3(-math.sin(z)*num, math.cos(z)*num, math.sin(x)) +end + +function changeLightStage(state, advisor, PatternPrim, PatternSec) + TriggerServerEvent("els:changeLightStage_s", state, advisor, PatternPrim, PatternSec) +end + +function changeAdvisorPattern(pat) + TriggerServerEvent("els:changeAdvisorPattern_s", pat) +end + +function changePrimaryPattern(pat) + TriggerServerEvent("els:changePrimaryPattern_s", pat) +end + +function changeSecondaryPattern(pat) + TriggerServerEvent("els:changeSecondaryPattern_s", pat) +end + +function checkCar(car) + if car then + carModel = GetEntityModel(car) + carName = GetDisplayNameFromVehicleModel(carModel) + + return carName + end +end + +function checkCarHash(car) + if car then + for k,v in pairs(els_Vehicles) do + if GetEntityModel(car) == GetHashKey(k) then + return k + end + end + end +end + +function vehInTable (tab, val) + for index in pairs(tab) do + if index == val then + return true + end + end + + return false +end + +function setExtraState(veh, extra, state) + if (not IsEntityDead(veh) and DoesEntityExist(veh)) then + if els_Vehicles[checkCarHash(veh)].extras[extra] ~= nil then + if(els_Vehicles[checkCarHash(veh)].extras[extra].enabled) then + if DoesExtraExist(veh, extra) then + SetVehicleExtra(veh, extra, state) + end + end + end + end +end + +function isVehicleELS(veh) + return vehInTable(els_Vehicles, checkCarHash(veh)) +end + +function getVehicleLightStage(veh) + + if (elsVehs[veh] ~= nil) then + return elsVehs[veh].stage + end +end + +function Draw(text, r, g, b, alpha, x, y, width, height, ya, center, font) + SetTextColour(r, g, b, alpha) + SetTextFont(font) + SetTextScale(width, height) + SetTextWrap(0.0, 1.0) + SetTextCentre(center) + SetTextDropshadow(0, 0, 0, 0, 0) + SetTextEdge(1, 0, 0, 0, 205) + BeginTextCommandDisplayText("STRING") + AddTextComponentSubstringPlayerName(text) + SetUiLayer(ya) + EndTextCommandDisplayText(x, y) +end + +function hornCleanup() + Citizen.CreateThread(function() + for vehicle, state in pairs(h_horn_state) do + if state >= 0 then + if not DoesEntityExist(vehicle) or IsEntityDead(vehicle) then + if h_soundID_veh[vehicle] ~= nil then + StopSound(h_soundID_veh[vehicle]) + ReleaseSoundId(h_soundID_veh[vehicle]) + h_soundID_veh[vehicle] = nil + h_horn_state[vehicle] = nil + end + end + end + end + return + end) +end + +function sirenCleanup() + Citizen.CreateThread(function() + for vehicle, state in pairs(m_siren_state) do + if m_soundID_veh[vehicle] ~= nil then + if not DoesEntityExist(vehicle) or IsEntityDead(vehicle) then + StopSound(m_soundID_veh[vehicle]) + ReleaseSoundId(m_soundID_veh[vehicle]) + m_soundID_veh[vehicle] = nil + m_siren_state[vehicle] = nil + end + end + end + + for vehicle, state in pairs(d_siren_state) do + if d_soundID_veh[vehicle] ~= nil then + if not DoesEntityExist(vehicle) or IsEntityDead(vehicle) then + StopSound(d_soundID_veh[vehicle]) + ReleaseSoundId(d_soundID_veh[vehicle]) + d_soundID_veh[vehicle] = nil + d_siren_state[vehicle] = nil + end + end + end + return + end) +end + +function _DrawRect(x, y, width, height, r, g, b, a, ya) + SetUiLayer(ya) + DrawRect(x, y, width, height, r, g, b, a) +end + +function vehicleLightCleanup() + Citizen.CreateThread(function() + for vehicle,_ in pairs(elsVehs) do + if elsVehs[vehicle] then + if not DoesEntityExist(vehicle) or IsEntityDead(vehicle) then + if elsVehs[vehicle] ~= nil then + elsVehs[vehicle] = nil + end + end + end + end + return + end) +end + +function LghtSoundCleaner() + vehicleLightCleanup() + hornCleanup() + sirenCleanup() +end + +function changePrimaryPatternMath(way) + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + local primMax = getNumberOfPrimaryPatterns(GetVehiclePedIsUsing(GetPlayerPed(-1))) + local primMin = 1 + local temp = lightPatternPrim + + temp = temp + way + + if(temp < primMin) then + temp = primMax + end + + if(temp > primMax) then + temp = primMin + end + + lightPatternPrim = temp + + if temp ~= 0 then lightPatternsPrim = temp end + changePrimaryPattern(lightPatternsPrim) +end + +function changeSecondaryPatternMath(way) + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + local primMax = getNumberOfSecondaryPatterns(GetVehiclePedIsUsing(GetPlayerPed(-1))) + local primMin = 1 + local temp = lightPatternSec + + temp = temp + way + + if(temp > primMax) then + temp = primMin + end + + if(temp < primMin) then + temp = primMax + end + + lightPatternSec = temp + changeSecondaryPattern(lightPatternSec) +end + +function changeAdvisorPatternMath(way) + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + + local primMax = getNumberOfAdvisorPatterns(GetVehiclePedIsUsing(GetPlayerPed(-1))) + + local primMin = 1 + local temp = advisorPatternSelectedIndex + + temp = temp + way + + if(temp < primMin) then + temp = primMax + end + + if(temp > primMax) then + temp = primMin + end + + advisorPatternSelectedIndex = temp + changeAdvisorPattern(advisorPatternSelectedIndex) +end + +function setSirenStateButton(state) + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + if m_siren_state[GetVehiclePedIsUsing(GetPlayerPed(-1))] ~= state then + TriggerServerEvent("els:setSirenState_s", state) + elseif m_siren_state[GetVehiclePedIsUsing(GetPlayerPed(-1))] == state then + TriggerServerEvent("els:setSirenState_s", 0) + end +end + +function upOneStage() + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + local vehNetID = GetVehiclePedIsUsing(GetPlayerPed(-1)) + + local newStage = 1 + + if (elsVehs[vehNetID] ~= nil and elsVehs[vehNetID].stage ~= nil) then + newStage = elsVehs[vehNetID].stage + 1 + end + + if newStage == 4 then + newStage = 0 + end + + changeLightStage(newStage, advisorPatternSelectedIndex, lightPatternPrim, lightPatternSec) + + if GetVehicleClass(GetVehiclePedIsUsing(GetPlayerPed(-1))) == 18 then + if newStage == getVehicleVCFInfo(GetVehiclePedIsUsing(GetPlayerPed(-1))).misc.dfltsirenltsactivateatlstg then + toggleSirenMute(GetVehiclePedIsUsing(GetPlayerPed(-1)), true) + SetVehicleSiren(GetVehiclePedIsUsing(GetPlayerPed(-1)), true) + else + SetVehicleSiren(GetVehiclePedIsUsing(GetPlayerPed(-1)), false) + end + + if(newStage == 0) then + SetVehicleSiren(GetVehiclePedIsUsing(GetPlayerPed(-1)), false) + TriggerServerEvent("els:setSirenState_s", 0) + TriggerServerEvent("els:setDualSirenState_s", 0) + TriggerServerEvent("els:setDualSiren_s", false) + end + end +end + +function downOneStage() + if playButtonPressSounds then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1) + end + local vehNetID = GetVehiclePedIsUsing(GetPlayerPed(-1)) + + local newStage = 3 + + if(elsVehs[vehNetID] ~= nil and elsVehs[vehNetID].stage ~= nil) then + newStage = elsVehs[vehNetID].stage - 1 + end + + if newStage == -1 then + newStage = 3 + end + + changeLightStage(newStage, advisorPatternSelectedIndex, lightPatternPrim, lightPatternSec) + + if GetVehicleClass(GetVehiclePedIsUsing(GetPlayerPed(-1))) == 18 then + if newStage == getVehicleVCFInfo(GetVehiclePedIsUsing(GetPlayerPed(-1))).misc.dfltsirenltsactivateatlstg then + toggleSirenMute(GetVehiclePedIsUsing(GetPlayerPed(-1)), true) + SetVehicleSiren(GetVehiclePedIsUsing(GetPlayerPed(-1)), true) + else + SetVehicleSiren(GetVehiclePedIsUsing(GetPlayerPed(-1)), false) + end + + if (newStage == 0) then + SetVehicleSiren(GetVehiclePedIsUsing(GetPlayerPed(-1)), false) + TriggerServerEvent("els:setSirenState_s", 0) + TriggerServerEvent("els:setDualSirenState_s", 0) + TriggerServerEvent("els:setDualSiren_s", false) + end + end +end + +function displayScreenKeyboard(text) + HideHudAndRadarThisFrame() + DisplayOnscreenKeyboard(1, text, "", "", "", "", "", 60) + while UpdateOnscreenKeyboard() == 0 do + DisableAllControlActions(0) + Wait(0) + end + if (not GetOnscreenKeyboardResult()) then return nil end + return GetOnscreenKeyboardResult() +end + +function formatPatternNumber(num) + if num < 10 then + return "00" .. tostring(num) + elseif num < 100 and num >= 10 then + return "0" .. tostring(num) + else + return tostring(num) + end +end + +function getVehicleVCFInfo(veh) + return els_Vehicles[checkCarHash(veh)] +end \ No newline at end of file diff --git a/resources/els-fivem/config.lua b/resources/els-fivem/config.lua new file mode 100644 index 000000000..45201dafb --- /dev/null +++ b/resources/els-fivem/config.lua @@ -0,0 +1,49 @@ +outputLoading = false +playButtonPressSounds = true +printDebugInformation = true + +vehicleSyncDistance = 150 +envirementLightBrightness = 0.006 +lightDelay = 20 -- Time in MS + + +panelType = "original" +panelOffsetX = 0.0 +panelOffsetY = 0.0 + +-- https://docs.fivem.net/game-references/controls + +shared = { + horn = 86, +} + +keyboard = { + modifyKey = 132, + stageChange = 85, -- E + guiKey = 199, -- P + takedown = 83, -- = + siren = { + tone_one = 157, -- 1 + tone_two = 158, -- 2 + tone_three = 160, -- 3 + }, + pattern = { + primary = 163, -- 9 + secondary = 162, -- 8 + advisor = 161, -- 7 + }, + warning = 246, -- Y + secondary = 303, -- U + primary = 7, -- ?? +} + +controller = { + modifyKey = 73, + stageChange = 80, + takedown = 74, + siren = { + tone_one = 173, + tone_two = 85, + tone_three = 172, + }, +} \ No newline at end of file diff --git a/resources/els-fivem/server/server.lua b/resources/els-fivem/server/server.lua new file mode 100644 index 000000000..2ffb16f83 --- /dev/null +++ b/resources/els-fivem/server/server.lua @@ -0,0 +1,767 @@ +vehicleInfoTable = {} +patternInfoTable = {} + +local verFile = LoadResourceFile(GetCurrentResourceName(), "version.json") +local curVersion = json.decode(verFile).version +Citizen.CreateThread( function() + local updatePath = "ELS-FiveM" + local resourceName = "ELS-FiveM ("..GetCurrentResourceName()..")" + PerformHttpRequest("https://raw.githubusercontent.com/MrDaGree/"..updatePath.."/master/version.json", function(err, response, headers) + local data = json.decode(response) + + + if curVersion ~= data.version and tonumber(curVersion) < tonumber(data.version) then + print("\n--------------------------------------------------------------------------") + print("\n"..resourceName.." is outdated.\nCurrent Version: "..data.version.."\nYour Version: "..curVersion.."\nPlease update it from https://github.com/MrDaGree"..updatePath.."") + print("\nUpdate Changelog:\n"..data.changelog) + print("\n--------------------------------------------------------------------------") + elseif tonumber(curVersion) > tonumber(data.version) then + print("Your version of "..resourceName.." seems to be higher than the current version. Hax bro?") + else + print(resourceName.." is up to date!") + end + end, "GET", "", {version = 'this'}) +end) + +RegisterCommand('_curver', function(source) + PerformHttpRequest('https://raw.githubusercontent.com/MrDaGree/ELS-FiveM/master/version.json', function(err, response, headers) + local data = json.decode(response) + + if curVersion ~= data.version and tonumber(curVersion) < tonumber(data.version) then + TriggerClientEvent('chat:addMessage', source, { args = { "ELS-FiveM", "You are currently an outdated version of [ " .. GetCurrentResourceName() .. " ]. Your version: [ " .. curVersion .. " ]. Newest version: [ " .. data.version .. " ]."}, color = {13, 161, 200}}) + elseif tonumber(curVersion) > tonumber(data.version) then + TriggerClientEvent('chat:addMessage', source, { args = { "ELS-FiveM", "Um, what? Your version of ELS-FiveM is higher than the current version. What?"}, color = {13, 161, 200}}) + else + TriggerClientEvent('chat:addMessage', source, { args = { "ELS-FiveM", "Your version of [ " .. GetCurrentResourceName() .. " ] is up to date! Current version: [ " .. curVersion .. " ]."}, color = {13, 161, 200}}) + end + end, "GET", "", {version = 'this'}) +end) + +local function processXml(el) + local v = {} + local text + + for _,kid in ipairs(el.kids) do + if kid.type == 'text' then + text = kid.value + elseif kid.type == 'element' then + if not v[kid.name] then + v[kid.name] = {} + end + + table.insert(v[kid.name], processXml(kid)) + end + end + + v._ = el.attr + + if #el.attr == 0 and #el.el == 0 then + v = text + end + + return v +end + +function parseVehData(xml, fileName) + + local a = {} + fileName = string.sub(fileName, 1, -5) + + a = {} + a.interface = {} + a.extras = {} + a.misc = {} + a.cruise = {} + a.sounds = {} + a.wrnl = {} + a.priml = {} + a.secl = {} + + for i=1,#xml.root.el do + if(xml.root.el[i].name == "INTERFACE") then + for ex=1,#xml.root.el[i].kids do + if(xml.root.el[i].kids[ex].name== "LstgActivationType") then + local elem = xml.root.el[i].kids[ex] + a.interface.activationType = elem.kids[1].value + + end + if(xml.root.el[i].kids[ex].name== "InfoPanelHeaderColor") then + local elem = xml.root.el[i].kids[ex] + a.interface.headerColor = {} + if elem.kids[1].value == string.lower("grey") then + a.interface.headerColor['r'] = 40 + a.interface.headerColor['g'] = 40 + a.interface.headerColor['b'] = 40 + end + if elem.kids[1].value == string.lower("white") then + a.interface.headerColor['r'] = 255 + a.interface.headerColor['g'] = 255 + a.interface.headerColor['b'] = 255 + end + if elem.kids[1].value == string.lower("yellow") then + a.interface.headerColor['r'] = 242 + a.interface.headerColor['g'] = 238 + a.interface.headerColor['b'] = 0 + end + end + if(xml.root.el[i].kids[ex].name== "InfoPanelButtonLightColor") then + local elem = xml.root.el[i].kids[ex] + a.interface.buttonColor = {} + if elem.kids[1].value == string.lower("green") then + a.interface.buttonColor['r'] = 0 + a.interface.buttonColor['g'] = 255 + a.interface.buttonColor['b'] = 0 + end + if elem.kids[1].value == string.lower("red") then + a.interface.buttonColor['r'] = 255 + a.interface.buttonColor['g'] = 0 + a.interface.buttonColor['b'] = 0 + end + if elem.kids[1].value == string.lower("blue") then + a.interface.buttonColor['r'] = 0 + a.interface.buttonColor['g'] = 0 + a.interface.buttonColor['b'] = 255 + end + if elem.kids[1].value == string.lower("purple") then + a.interface.buttonColor['r'] = 170 + a.interface.buttonColor['g'] = 0 + a.interface.buttonColor['b'] = 255 + end + if elem.kids[1].value == string.lower("orange") then + a.interface.buttonColor['r'] = 255 + a.interface.buttonColor['g'] = 157 + a.interface.buttonColor['b'] = 0 + end + if elem.kids[1].value == string.lower("yellow") then + a.interface.buttonColor['r'] = 242 + a.interface.buttonColor['g'] = 238 + a.interface.buttonColor['b'] = 0 + end + end + end + end + + if(xml.root.el[i].name == "EOVERRIDE") then + for ex=1,#xml.root.el[i].kids do + if(string.upper(string.sub(xml.root.el[i].kids[ex].name, 1, -3)) == "EXTRA") then + local elem = xml.root.el[i].kids[ex] + local extra = tonumber(string.sub(elem.name, -2)) + a.extras[extra] = {} + if elem.attr['IsElsControlled'] == "true" then + a.extras[extra].enabled = true + else + a.extras[extra].enabled = false + end + + a.extras[extra].env_light = false + a.extras[extra].env_pos = {} + a.extras[extra].env_pos['x'] = 0 + a.extras[extra].env_pos['y'] = 0 + a.extras[extra].env_pos['z'] = 0 + a.extras[extra].env_color = {} + a.extras[extra].env_color['r'] = 255 + a.extras[extra].env_color['g'] = 0 + a.extras[extra].env_color['b'] = 0 + + if(elem.attr['AllowEnvLight'] == "true") then + a.extras[extra].env_light = true + a.extras[extra].env_pos = {} + a.extras[extra].env_pos['x'] = tonumber(elem.attr['OffsetX']) + a.extras[extra].env_pos['y'] = tonumber(elem.attr['OffsetY']) + a.extras[extra].env_pos['z'] = tonumber(elem.attr['OffsetZ']) + a.extras[extra].env_color = {} + + if string.upper(elem.attr['Color']) == "RED" then + a.extras[extra].env_color['r'] = 255 + a.extras[extra].env_color['g'] = 0 + a.extras[extra].env_color['b'] = 0 + elseif string.upper(elem.attr['Color']) == "BLUE" then + a.extras[extra].env_color['r'] = 0 + a.extras[extra].env_color['g'] = 0 + a.extras[extra].env_color['b'] = 255 + elseif string.upper(elem.attr['Color']) == "GREEN" then + a.extras[extra].env_color['r'] = 0 + a.extras[extra].env_color['g'] = 255 + a.extras[extra].env_color['b'] = 0 + elseif string.upper(elem.attr['Color']) == "AMBER" then + a.extras[extra].env_color['r'] = 255 + a.extras[extra].env_color['g'] = 194 + a.extras[extra].env_color['b'] = 0 + elseif string.upper(elem.attr['Color']) == "WHITE" then + a.extras[extra].env_color['r'] = 255 + a.extras[extra].env_color['g'] = 255 + a.extras[extra].env_color['b'] = 255 + end + end + end + + end + end + + if(xml.root.el[i].name == "MISC") then + for ex=1,#xml.root.el[i].kids do + if(xml.root.el[i].kids[ex].name == "ArrowboardType") then + local elem = xml.root.el[i].kids[ex] + a.misc.arrowboardType = elem.kids[1].value + end + + if(xml.root.el[i].kids[ex].name == "UseSteadyBurnLights") then + local elem = xml.root.el[i].kids[ex] + if elem.kids[1].value == "true" then + a.misc.usesteadyburnlights = true + else + a.misc.usesteadyburnlights = false + end + end + + if(xml.root.el[i].kids[ex].name == "DfltSirenLtsActivateAtLstg") then + local elem = xml.root.el[i].kids[ex] + a.misc.dfltsirenltsactivateatlstg = tonumber(elem.kids[1].value) + end + end + end + + if(xml.root.el[i].name == "CRUISE") then + for ex=1,#xml.root.el[i].kids do + local elem = xml.root.el[i].kids[ex] + if(xml.root.el[i].kids[ex].name== "UseExtras") then + if elem.attr['Extra1'] == "true" then a.cruise[1] = 0 else a.cruise[1] = 1 end + if elem.attr['Extra2'] == "true" then a.cruise[2] = 0 else a.cruise[2] = 1 end + if elem.attr['Extra3'] == "true" then a.cruise[3] = 0 else a.cruise[3] = 1 end + if elem.attr['Extra4'] == "true" then a.cruise[4] = 0 else a.cruise[4] = 1 end + end + + if(xml.root.el[i].kids[ex].name== "DisableAtLstg3") then + local elem = xml.root.el[i].kids[ex] + if elem.kids[1].value == "true" then + a.cruise.DisableLstgThree = true + else + a.cruise.DisableLstgThree = false + end + end + end + end + + if(xml.root.el[i].name == "SOUNDS") then + for ex=1,#xml.root.el[i].kids do + local elem = xml.root.el[i].kids[ex] + if(xml.root.el[i].kids[ex].name== "MainHorn") then + a.sounds.mainHorn = {} + if elem.attr['InterruptsSiren'] == "true" then a.sounds.mainHorn.interrupt = true else a.sounds.mainHorn.interrupt = false end + a.sounds.mainHorn.audioString = elem.attr['AudioString'] + end + + if(xml.root.el[i].kids[ex].name== "ManTone1") then + a.sounds.manTone1 = {} + if elem.attr['AllowUse'] == "true" then a.sounds.manTone1.allowUse = true else a.sounds.manTone1.allowUse = false end + a.sounds.manTone1.audioString = elem.attr['AudioString'] + end + + if(xml.root.el[i].kids[ex].name== "ManTone2") then + a.sounds.manTone2 = {} + if elem.attr['AllowUse'] == "true" then a.sounds.manTone2.allowUse = true else a.sounds.manTone2.allowUse = false end + a.sounds.manTone2.audioString = elem.attr['AudioString'] + end + + if(xml.root.el[i].kids[ex].name== "SrnTone1") then + a.sounds.srnTone1 = {} + if elem.attr['AllowUse'] == "true" then a.sounds.srnTone1.allowUse = true else a.sounds.srnTone1.allowUse = false end + a.sounds.srnTone1.audioString = elem.attr['AudioString'] + end + + if(xml.root.el[i].kids[ex].name== "SrnTone2") then + a.sounds.srnTone2 = {} + if elem.attr['AllowUse'] == "true" then a.sounds.srnTone2.allowUse = true else a.sounds.srnTone2.allowUse = false end + a.sounds.srnTone2.audioString = elem.attr['AudioString'] + end + + if(xml.root.el[i].kids[ex].name== "SrnTone3") then + a.sounds.srnTone3 = {} + if elem.attr['AllowUse'] == "true" then a.sounds.srnTone3.allowUse = true else a.sounds.srnTone3.allowUse = false end + a.sounds.srnTone3.audioString = elem.attr['AudioString'] + end + + if(xml.root.el[i].kids[ex].name== "SrnTone4") then + a.sounds.srnTone4 = {} + if elem.attr['AllowUse'] == "true" then a.sounds.srnTone4.allowUse = true else a.sounds.srnTone4.allowUse = false end + a.sounds.srnTone4.audioString = elem.attr['AudioString'] + end + + if(xml.root.el[i].kids[ex].name== "AuxSiren") then + a.sounds.auxSiren = {} + if elem.attr['AllowUse'] == "true" then a.sounds.auxSiren.allowUse = true else a.sounds.auxSiren.allowUse = false end + a.sounds.auxSiren.audioString = elem.attr['AudioString'] + end + + if(xml.root.el[i].kids[ex].name== "PanicMde") then + a.sounds.panicMode = {} + if elem.attr['AllowUse'] == "true" then a.sounds.panicMode.allowUse = true else a.sounds.panicMode.allowUse = false end + a.sounds.panicMode.audioString = elem.attr['AudioString'] + end + end + end + + if(xml.root.el[i].name == "WRNL") then + a.wrnl.type = string.lower(xml.root.el[i].attr['LightingFormat']) + a.wrnl.PresetPatterns = {} + a.wrnl.ForcedPatterns = {} + for ex=1,#xml.root.el[i].kids do + if(xml.root.el[i].kids[ex].name == "PresetPatterns") then + for inner=1,#xml.root.el[i].kids[ex].el do + local elem = xml.root.el[i].kids[ex].el[inner] + + a.wrnl.PresetPatterns[string.lower(elem.name)] = {} + if string.lower(elem.attr['Enabled']) == "true" then a.wrnl.PresetPatterns[string.lower(elem.name)].enabled = true else a.wrnl.PresetPatterns[string.lower(elem.name)].enabled = false end + a.wrnl.PresetPatterns[string.lower(elem.name)].pattern = tonumber(elem.attr['Pattern']) + end + end + if(xml.root.el[i].kids[ex].name == "ForcedPatterns") then + for inner=1,#xml.root.el[i].kids[ex].el do + local elem = xml.root.el[i].kids[ex].el[inner] + + a.wrnl.ForcedPatterns[string.lower(elem.name)] = {} + if string.lower(elem.attr['Enabled']) == "true" then a.wrnl.ForcedPatterns[string.lower(elem.name)].enabled = true else a.wrnl.ForcedPatterns[string.lower(elem.name)].enabled = false end + a.wrnl.ForcedPatterns[string.lower(elem.name)].pattern = tonumber(elem.attr['Pattern']) + end + end + end + end + + if(xml.root.el[i].name == "PRML") then + a.priml.type = string.lower(xml.root.el[i].attr['LightingFormat']) + a.priml.ExtrasActiveAtLstg2 = string.lower(xml.root.el[i].attr['ExtrasActiveAtLstg2']) + a.priml.PresetPatterns = {} + a.priml.ForcedPatterns = {} + for ex=1,#xml.root.el[i].kids do + if(xml.root.el[i].kids[ex].name == "PresetPatterns") then + for inner=1,#xml.root.el[i].kids[ex].el do + local elem = xml.root.el[i].kids[ex].el[inner] + + a.priml.PresetPatterns[string.lower(elem.name)] = {} + if string.lower(elem.attr['Enabled']) == "true" then a.priml.PresetPatterns[string.lower(elem.name)].enabled = true else a.priml.PresetPatterns[string.lower(elem.name)].enabled = false end + a.priml.PresetPatterns[string.lower(elem.name)].pattern = tonumber(elem.attr['Pattern']) + end + end + if(xml.root.el[i].kids[ex].name == "ForcedPatterns") then + for inner=1,#xml.root.el[i].kids[ex].el do + local elem = xml.root.el[i].kids[ex].el[inner] + + a.priml.ForcedPatterns[string.lower(elem.name)] = {} + if string.lower(elem.attr['Enabled']) == "true" then a.priml.ForcedPatterns[string.lower(elem.name)].enabled = true else a.priml.ForcedPatterns[string.lower(elem.name)].enabled = false end + a.priml.ForcedPatterns[string.lower(elem.name)].pattern = tonumber(elem.attr['Pattern']) + end + end + end + end + + if(xml.root.el[i].name == "SECL") then + a.secl.type = string.lower(xml.root.el[i].attr['LightingFormat']) + a.secl.PresetPatterns = {} + a.secl.ForcedPatterns = {} + for ex=1,#xml.root.el[i].kids do + if(xml.root.el[i].kids[ex].name == "PresetPatterns") then + for inner=1,#xml.root.el[i].kids[ex].el do + local elem = xml.root.el[i].kids[ex].el[inner] + + a.secl.PresetPatterns[string.lower(elem.name)] = {} + if string.lower(elem.attr['Enabled']) == "true" then a.secl.PresetPatterns[string.lower(elem.name)].enabled = true else a.secl.PresetPatterns[string.lower(elem.name)].enabled = false end + a.secl.PresetPatterns[string.lower(elem.name)].pattern = tonumber(elem.attr['Pattern']) + end + end + if(xml.root.el[i].kids[ex].name == "ForcedPatterns") then + for inner=1,#xml.root.el[i].kids[ex].el do + local elem = xml.root.el[i].kids[ex].el[inner] + + a.secl.ForcedPatterns[string.lower(elem.name)] = {} + if string.lower(elem.attr['Enabled']) == "true" then a.secl.ForcedPatterns[string.lower(elem.name)].enabled = true else a.secl.ForcedPatterns[string.lower(elem.name)].enabled = false end + a.secl.ForcedPatterns[string.lower(elem.name)].pattern = tonumber(elem.attr['Pattern']) + end + end + end + end + + end + + vehicleInfoTable[fileName] = a + + if outputLoading and outputLoading ~= nil then + if printDebugInformation == nil or printDebugInformation == true then + print("Done with vehicle: " .. fileName) + end + end +end + +function parsePatternData(xml, fileName) + + local primary = {} + local secondary = {} + local advisor = {} + local patternError = false + + fileName = string.sub(fileName, 1, -5) + + for i=1,#xml.root.el do + if(xml.root.el[i].name == "PRIMARY") then + primary.stages = {} + primary.speed = tonumber(xml.root.el[i].attr["speed"]) + for ex=1,#xml.root.el[i].kids do + if(string.upper(string.sub(xml.root.el[i].kids[ex].name, 1, -3)) == "STATE") then + local spot = tonumber(string.sub(xml.root.el[i].kids[ex].name, 6)) + local elem = xml.root.el[i].kids[ex] + primary.stages[spot] = {} + if elem.attr['Extra1'] == "true" then + primary.stages[spot][1] = 0 + elseif elem.attr['Extra1'] == "false" then + primary.stages[spot][1] = 1 + end + if elem.attr['Extra2'] == "true" then + primary.stages[spot][2] = 0 + elseif elem.attr['Extra2'] == "false" then + primary.stages[spot][2] = 1 + end + if elem.attr['Extra3'] == "true" then + primary.stages[spot][3] = 0 + elseif elem.attr['Extra3'] == "false" then + primary.stages[spot][3] = 1 + end + if elem.attr['Extra4'] == "true" then + primary.stages[spot][4] = 0 + elseif elem.attr['Extra4'] == "false" then + primary.stages[spot][4] = 1 + end + if elem.attr['Extra5'] == "true" then + primary.stages[spot][5] = 0 + elseif elem.attr['Extra5'] == "false" then + primary.stages[spot][5] = 1 + end + if elem.attr['Extra6'] == "true" then + primary.stages[spot][6] = 0 + elseif elem.attr['Extra6'] == "false" then + primary.stages[spot][6] = 1 + end + if elem.attr['Extra7'] == "true" then + primary.stages[spot][7] = 0 + elseif elem.attr['Extra7'] == "false" then + primary.stages[spot][7] = 1 + end + if elem.attr['Extra8'] == "true" then + primary.stages[spot][8] = 0 + elseif elem.attr['Extra8'] == "false" then + primary.stages[spot][8] = 1 + end + if elem.attr['Extra9'] == "true" then + primary.stages[spot][9] = 0 + elseif elem.attr['Extra9'] == "false" then + primary.stages[spot][9] = 1 + end + if elem.attr['Extra10'] == "true" then + primary.stages[spot][10] = 0 + elseif elem.attr['Extra10'] == "false" then + primary.stages[spot][10] = 1 + end + if elem.attr['Extra11'] == "true" then + primary.stages[spot][11] = 0 + elseif elem.attr['Extra11'] == "false" then + primary.stages[spot][11] = 1 + end + if elem.attr['Extra12'] == "true" then + primary.stages[spot][12] = 0 + elseif elem.attr['Extra12'] == "false" then + primary.stages[spot][12] = 1 + end + + if elem.attr['Speed'] ~= nil then + primary.stages[spot].speed = tonumber(elem.attr['Speed']) + end + end + end + end + if(xml.root.el[i].name == "SECONDARY") then + secondary.stages = {} + secondary.speed = tonumber(xml.root.el[i].attr["speed"]) + for ex=1,#xml.root.el[i].kids do + if(string.upper(string.sub(xml.root.el[i].kids[ex].name, 1, -3)) == "STATE") then + local spot = tonumber(string.sub(xml.root.el[i].kids[ex].name, 6)) + local elem = xml.root.el[i].kids[ex] + secondary.stages[spot] = {} + if elem.attr['Extra1'] == "true" then + secondary.stages[spot][1] = 0 + elseif elem.attr['Extra1'] == "false" then + secondary.stages[spot][1] = 1 + end + if elem.attr['Extra2'] == "true" then + secondary.stages[spot][2] = 0 + elseif elem.attr['Extra2'] == "false" then + secondary.stages[spot][2] = 1 + end + if elem.attr['Extra3'] == "true" then + secondary.stages[spot][3] = 0 + elseif elem.attr['Extra3'] == "false" then + secondary.stages[spot][3] = 1 + end + if elem.attr['Extra4'] == "true" then + secondary.stages[spot][4] = 0 + elseif elem.attr['Extra4'] == "false" then + secondary.stages[spot][4] = 1 + end + if elem.attr['Extra5'] == "true" then + secondary.stages[spot][5] = 0 + elseif elem.attr['Extra5'] == "false" then + secondary.stages[spot][5] = 1 + end + if elem.attr['Extra6'] == "true" then + secondary.stages[spot][6] = 0 + elseif elem.attr['Extra6'] == "false" then + secondary.stages[spot][6] = 1 + end + if elem.attr['Extra7'] == "true" then + secondary.stages[spot][7] = 0 + elseif elem.attr['Extra7'] == "false" then + secondary.stages[spot][7] = 1 + end + if elem.attr['Extra8'] == "true" then + secondary.stages[spot][8] = 0 + elseif elem.attr['Extra8'] == "false" then + secondary.stages[spot][8] = 1 + end + if elem.attr['Extra9'] == "true" then + secondary.stages[spot][9] = 0 + elseif elem.attr['Extra9'] == "false" then + secondary.stages[spot][9] = 1 + end + if elem.attr['Extra10'] == "true" then + secondary.stages[spot][10] = 0 + elseif elem.attr['Extra10'] == "false" then + secondary.stages[spot][10] = 1 + end + if elem.attr['Extra11'] == "true" then + secondary.stages[spot][11] = 0 + elseif elem.attr['Extra11'] == "false" then + secondary.stages[spot][11] = 1 + end + if elem.attr['Extra12'] == "true" then + secondary.stages[spot][12] = 0 + elseif elem.attr['Extra12'] == "false" then + secondary.stages[spot][12] = 1 + end + + if elem.attr['Speed'] ~= nil then + secondary.stages[spot].speed = tonumber(elem.attr['Speed']) + end + end + end + end + if(xml.root.el[i].name == "ADVISOR") then + advisor = {} + advisor.stages = {} + advisor.speed = tonumber(xml.root.el[i].attr["speed"]) + for ex=1,#xml.root.el[i].kids do + if(string.upper(string.sub(xml.root.el[i].kids[ex].name, 1, -3)) == "STATE") then + local spot = tonumber(string.sub(xml.root.el[i].kids[ex].name, 6)) + local elem = xml.root.el[i].kids[ex] + + advisor.stages[spot] = {} + if elem.attr['Extra1'] == "true" then + advisor.stages[spot][1] = 0 + elseif elem.attr['Extra1'] == "false" then + advisor.stages[spot][1] = 1 + end + if elem.attr['Extra2'] == "true" then + advisor.stages[spot][2] = 0 + elseif elem.attr['Extra2'] == "false" then + advisor.stages[spot][2] = 1 + end + if elem.attr['Extra3'] == "true" then + advisor.stages[spot][3] = 0 + elseif elem.attr['Extra3'] == "false" then + advisor.stages[spot][3] = 1 + end + if elem.attr['Extra4'] == "true" then + advisor.stages[spot][4] = 0 + elseif elem.attr['Extra4'] == "false" then + advisor.stages[spot][4] = 1 + end + if elem.attr['Extra5'] == "true" then + advisor.stages[spot][5] = 0 + elseif elem.attr['Extra5'] == "false" then + advisor.stages[spot][5] = 1 + end + if elem.attr['Extra6'] == "true" then + advisor.stages[spot][6] = 0 + elseif elem.attr['Extra6'] == "false" then + advisor.stages[spot][6] = 1 + end + if elem.attr['Extra7'] == "true" then + advisor.stages[spot][7] = 0 + elseif elem.attr['Extra7'] == "false" then + advisor.stages[spot][7] = 1 + end + if elem.attr['Extra8'] == "true" then + advisor.stages[spot][8] = 0 + elseif elem.attr['Extra8'] == "false" then + advisor.stages[spot][8] = 1 + end + if elem.attr['Extra9'] == "true" then + advisor.stages[spot][9] = 0 + elseif elem.attr['Extra9'] == "false" then + advisor.stages[spot][9] = 1 + end + if elem.attr['Extra10'] == "true" then + advisor.stages[spot][10] = 0 + elseif elem.attr['Extra10'] == "false" then + advisor.stages[spot][10] = 1 + end + if elem.attr['Extra11'] == "true" then + advisor.stages[spot][11] = 0 + elseif elem.attr['Extra11'] == "false" then + advisor.stages[spot][11] = 1 + end + if elem.attr['Extra12'] == "true" then + advisor.stages[spot][12] = 0 + elseif elem.attr['Extra12'] == "false" then + advisor.stages[spot][12] = 1 + end + + if elem.attr['Speed'] ~= nil then + advisor.stages[spot].speed = tonumber(elem.attr['Speed']) + end + end + end + end + end + + if primary.stages ~= nil then + patternInfoTable.primarys[#patternInfoTable.primarys + 1] = primary + end + if secondary.stages ~= nil then + patternInfoTable.secondarys[#patternInfoTable.secondarys + 1] = secondary + end + if advisor.stages ~= nil then + patternInfoTable.advisors[#patternInfoTable.advisors + 1] = advisor + end + patternInfoTable[#patternInfoTable + 1] = a + + if outputLoading and outputLoading ~= nil then + if printDebugInformation == nil or printDebugInformation == true then + print("Done with pattern: " .. fileName) + end + end +end + +function parseObjSet(data, fileName) + local xml = SLAXML:dom(data, fileName) + if xml and xml.root then + if xml.root.name == "vcfroot" then + parseVehData(xml, fileName) + elseif xml.root.name == "pattern" then + parsePatternData(xml, fileName) + end + end +end + +function configCheck() + if (panelOffsetX == nil) then + print("\n\n[ERROR] Please add 'panelOffsetX = 0.0' to your config or you will not get a panel.\n\n") + end + if (panelOffsetY == nil) then + print("\n\n[ERROR] Please add 'panelOffsetY = 0.0' to your config or you will not get a panel.\n\n") + end +end + +AddEventHandler('onResourceStart', function(name) + if name:lower() == GetCurrentResourceName():lower() then + patternInfoTable.primarys = {} + patternInfoTable.secondarys = {} + patternInfoTable.advisors = {} + for i=1,#vcf_files do + local data = LoadResourceFile(GetCurrentResourceName(), "vcf/" .. vcf_files[i]) + + if data then + parseObjSet(data, vcf_files[i]) + end + end + + -- for i=1,#pattern_files do + -- local data = LoadResourceFile(GetCurrentResourceName(), "patterns/" .. pattern_files[i]) + + -- if data then + -- parseObjSet(data, pattern_files[i]) + -- end + -- end + configCheck() + end +end) + +RegisterServerEvent("els:requestVehiclesUpdate") +AddEventHandler('els:requestVehiclesUpdate', function() + if printDebugInformation == nil or printDebugInformation == true then + print("Sending player (" .. source .. ") ELS data") + end + + TriggerClientEvent("els:updateElsVehicles", source, vehicleInfoTable, patternInfoTable) +end) + +RegisterServerEvent("els:changeLightStage_s") +AddEventHandler("els:changeLightStage_s", function(state, advisor, prim, sec) + TriggerClientEvent("els:changeLightStage_c", -1, source, state, advisor, prim, sec) +end) + +RegisterServerEvent("els:changePartState_s") +AddEventHandler("els:changePartState_s", function(part, state) + TriggerClientEvent("els:changePartState_c", -1, source, part, state) +end) + +RegisterServerEvent("els:changeAdvisorPattern_s") +AddEventHandler("els:changeAdvisorPattern_s", function(pat) + TriggerClientEvent("els:changeAdvisorPattern_c", -1, source, pat) +end) + +RegisterServerEvent("els:changeSecondaryPattern_s") +AddEventHandler("els:changeSecondaryPattern_s", function(pat) + TriggerClientEvent("els:changeSecondaryPattern_c", -1, source, pat) +end) + +RegisterServerEvent("els:changePrimaryPattern_s") +AddEventHandler("els:changePrimaryPattern_s", function(pat) + TriggerClientEvent("els:changePrimaryPattern_c", -1, source, pat) +end) + +RegisterServerEvent("els:toggleDfltSirenMute_s") +AddEventHandler("els:toggleDfltSirenMute_s", function(toggle) + TriggerClientEvent("els:toggleDfltSirenMute_s", -1, source, toggle) +end) + +RegisterServerEvent("els:setSirenState_s") +AddEventHandler("els:setSirenState_s", function(newstate) + TriggerClientEvent("els:setSirenState_c", -1, source, newstate) +end) + +RegisterServerEvent("els:setDualSirenState_s") +AddEventHandler("els:setDualSirenState_s", function(newstate) + TriggerClientEvent("els:setDualSirenState_c", -1, source, newstate) +end) + +RegisterServerEvent("els:setDualSiren_s") +AddEventHandler("els:setDualSiren_s", function(newstate) + TriggerClientEvent("els:setDualSiren_c", -1, source, newstate) +end) + +RegisterServerEvent("els:setHornState_s") +AddEventHandler("els:setHornState_s", function(state) + TriggerClientEvent("els:setHornState_c", -1, source, state) +end) + +RegisterServerEvent("els:setTakedownState_s") +AddEventHandler("els:setTakedownState_s", function(state) + TriggerClientEvent("els:setTakedownState_c", -1, source) +end) + +RegisterServerEvent("els:setSceneLightState_s") +AddEventHandler("els:setSceneLightState_s", function(state) + TriggerClientEvent("els:setSceneLightState_c", -1, source) +end) + +RegisterServerEvent("els:setCruiseLights_s") +AddEventHandler("els:setCruiseLights_s", function(state) + TriggerClientEvent("els:setCruiseLights_c", -1, source) +end) diff --git a/resources/els-fivem/server/xml.lua b/resources/els-fivem/server/xml.lua new file mode 100644 index 000000000..abd446d03 --- /dev/null +++ b/resources/els-fivem/server/xml.lua @@ -0,0 +1,305 @@ +-- Optional parser that creates a flat DOM from parsing +--[=====================================================================[ +v0.7 Copyright © 2013-2014 Gavin Kistner ; MIT Licensed +See http://github.com/Phrogz/SLAXML for details. +--]=====================================================================] +SLAXML = { + VERSION = "0.7", + _call = { + pi = function(target,content) + print(string.format("",target,content)) + end, + comment = function(content) + print(string.format("",content)) + end, + startElement = function(name,nsURI,nsPrefix) + io.write("<") + if nsPrefix then io.write(nsPrefix,":") end + io.write(name) + if nsURI then io.write(" (ns='",nsURI,"')") end + print(">") + end, + attribute = function(name,value,nsURI,nsPrefix) + io.write(' ') + if nsPrefix then io.write(nsPrefix,":") end + io.write(name,'=',string.format('%q',value)) + if nsURI then io.write(" (ns='",nsURI,"')") end + io.write("\n") + end, + text = function(text) + print(string.format(" text: %q",text)) + end, + closeElement = function(name,nsURI,nsPrefix) + print(string.format("",name)) + end, + } +} + +function SLAXML:parser(callbacks) + return { _call=callbacks or self._call, parse=SLAXML.parse } +end + +function SLAXML:parse(xml, fileName, options) + if not options then options = { stripWhitespace=false } end + + -- Cache references for maximum speed + local find, sub, gsub, char, push, pop, concat = string.find, string.sub, string.gsub, string.char, table.insert, table.remove, table.concat + local first, last, match1, match2, match3, pos2, nsURI + local unpack = unpack or table.unpack + local pos = 1 + local state = "text" + local textStart = 1 + local currentElement={} + local currentAttributes={} + local currentAttributeCt -- manually track length since the table is re-used + local nsStack = {} + local anyElement = false + + local utf8markers = { {0x7FF,192}, {0xFFFF,224}, {0x1FFFFF,240} } + local function utf8(decimal) -- convert unicode code point to utf-8 encoded character string + if decimal<128 then return char(decimal) end + local charbytes = {} + for bytes,vals in ipairs(utf8markers) do + if decimal<=vals[1] then + for b=bytes+1,2,-1 do + local mod = decimal%64 + decimal = (decimal-mod)/64 + charbytes[b] = char(128+mod) + end + charbytes[1] = char(vals[2]+decimal) + return concat(charbytes) + end + end + end + local entityMap = { ["lt"]="<", ["gt"]=">", ["amp"]="&", ["quot"]='"', ["apos"]="'" } + local entitySwap = function(orig,n,s) return entityMap[s] or n=="#" and utf8(tonumber('0'..s)) or orig end + local function unescape(str) return gsub( str, '(&(#?)([%d%a]+);)', entitySwap ) end + + local function finishText() + if first>textStart and self._call.text then + local text = sub(xml,textStart,first-1) + if options.stripWhitespace then + text = gsub(text,'^%s+','') + text = gsub(text,'%s+$','') + if #text==0 then text=nil end + end + if text then self._call.text(unescape(text)) end + end + end + + local function findPI() + first, last, match1, match2 = find( xml, '^<%?([:%a_][:%w_.-]*) ?(.-)%?>', pos ) + if first then + finishText() + if self._call.pi then self._call.pi(match1,match2) end + pos = last+1 + textStart = pos + return true + end + end + + local function findComment() + first, last, match1 = find( xml, '^', pos ) + if first then + finishText() + if self._call.comment then self._call.comment(match1) end + pos = last+1 + textStart = pos + return true + end + end + + local function nsForPrefix(prefix) + if prefix=='xml' then return 'http://www.w3.org/XML/1998/namespace' end -- http://www.w3.org/TR/xml-names/#ns-decl + for i=#nsStack,1,-1 do if nsStack[i][prefix] then return nsStack[i][prefix] end end + error(("Cannot find namespace for prefix %s"):format(prefix)) + end + + local function startElement() + anyElement = true + first, last, match1 = find( xml, '^<([%a_][%w_.-]*)', pos ) + if first then + currentElement[2] = nil -- reset the nsURI, since this table is re-used + currentElement[3] = nil -- reset the nsPrefix, since this table is re-used + finishText() + pos = last+1 + first,last,match2 = find(xml, '^:([%a_][%w_.-]*)', pos ) + if first then + currentElement[1] = match2 + currentElement[3] = match1 -- Save the prefix for later resolution + match1 = match2 + pos = last+1 + else + currentElement[1] = match1 + for i=#nsStack,1,-1 do if nsStack[i]['!'] then currentElement[2] = nsStack[i]['!']; break end end + end + currentAttributeCt = 0 + push(nsStack,{}) + return true + end + end + + local function findAttribute() + first, last, match1 = find( xml, '^%s+([:%a_][:%w_.-]*)%s*=%s*', pos ) + if first then + pos2 = last+1 + first, last, match2 = find( xml, '^"([^<"]*)"', pos2 ) -- FIXME: disallow non-entity ampersands + if first then + pos = last+1 + match2 = unescape(match2) + else + first, last, match2 = find( xml, "^'([^<']*)'", pos2 ) -- FIXME: disallow non-entity ampersands + if first then + pos = last+1 + match2 = unescape(match2) + end + end + end + if match1 and match2 then + local currentAttribute = {match1,match2} + local prefix,name = string.match(match1,'^([^:]+):([^:]+)$') + if prefix then + if prefix=='xmlns' then + nsStack[#nsStack][name] = match2 + else + currentAttribute[1] = name + currentAttribute[4] = prefix + end + else + if match1=='xmlns' then + nsStack[#nsStack]['!'] = match2 + currentElement[2] = match2 + end + end + currentAttributeCt = currentAttributeCt + 1 + currentAttributes[currentAttributeCt] = currentAttribute + return true + end + end + + local function findCDATA() + first, last, match1 = find( xml, '^', pos ) + if first then + finishText() + if self._call.text then self._call.text(match1) end + pos = last+1 + textStart = pos + return true + end + end + + local function closeElement() + first, last, match1 = find( xml, '^%s*(/?)>', pos ) + if first then + state = "text" + pos = last+1 + textStart = pos + + -- Resolve namespace prefixes AFTER all new/redefined prefixes have been parsed + if currentElement[3] then currentElement[2] = nsForPrefix(currentElement[3]) end + if self._call.startElement then self._call.startElement(unpack(currentElement)) end + if self._call.attribute then + for i=1,currentAttributeCt do + if currentAttributes[i][4] then currentAttributes[i][3] = nsForPrefix(currentAttributes[i][4]) end + self._call.attribute(unpack(currentAttributes[i])) + end + end + + if match1=="/" then + pop(nsStack) + if self._call.closeElement then self._call.closeElement(unpack(currentElement)) end + end + return true + end + end + + local function findElementClose() + first, last, match1, match2 = find( xml, '^', pos ) + if first then + nsURI = nil + for i=#nsStack,1,-1 do if nsStack[i]['!'] then nsURI = nsStack[i]['!']; break end end + else + first, last, match2, match1 = find( xml, '^', pos ) + if first then nsURI = nsForPrefix(match2) end + end + if first then + finishText() + if self._call.closeElement then self._call.closeElement(match1,nsURI) end + pos = last+1 + textStart = pos + pop(nsStack) + return true + end + end + + while pos<#xml do + if state=="text" then + if not (findPI() or findComment() or findCDATA() or findElementClose()) then + if startElement() then + state = "attributes" + else + first, last = find( xml, '^[^<]+', pos ) + pos = (first and last or pos) + 1 + end + end + elseif state=="attributes" then + if not findAttribute() then + if not closeElement() then + print("\n[ERROR] " .. fileName .. " is broken! Please put in online validator and fix!\n") + break + end + end + end + end + + -- if not anyElement then error("Parsing did not discover any elements") end + -- if #nsStack > 0 then print("Parsing could not find closing to attribute. Please put in online validator and fix!\nTo figure out what Pattern/VCF is broken look at the last loaded, the one after that is broken.\n\n") end +end + +function SLAXML:dom(xml, filename, opts) + if not opts then opts={} end + local rich = not opts.simple + local push, pop = table.insert, table.remove + local stack = {} + local doc = { type="document", name="#doc", kids={} } + local current = doc + local builder = SLAXML:parser{ + startElement = function(name,nsURI) + local el = { type="element", name=name, kids={}, el=rich and {} or nil, attr={}, nsURI=nsURI, parent=rich and current or nil } + if current==doc then + if doc.root then error(("Encountered element '%s' when the document already has a root '%s' element"):format(name,doc.root.name)) end + doc.root = el + end + push(current.kids,el) + if current.el then push(current.el,el) end + current = el + push(stack,el) + end, + attribute = function(name,value,nsURI) + if not current or current.type~="element" then error(("Encountered an attribute %s=%s but I wasn't inside an element"):format(name,value)) end + local attr = {type='attribute',name=name,nsURI=nsURI,value=value,parent=rich and current or nil} + if rich then current.attr[name] = value end + push(current.attr,attr) + end, + closeElement = function(name) + if current.name~=name or current.type~="element" then error(("Received a close element notification for '%s' but was inside a '%s' %s"):format(name,current.name,current.type)) end + pop(stack) + current = stack[#stack] + end, + text = function(value) + if current.type~='document' then + if current.type~="element" then error(("Received a text notification '%s' but was inside a %s"):format(value,current.type)) end + push(current.kids,{type='text',name='#text',value=value,parent=rich and current or nil}) + end + end, + comment = function(value) + push(current.kids,{type='comment',name='#comment',value=value,parent=rich and current or nil}) + end, + pi = function(name,value) + push(current.kids,{type='pi',name=name,value=value,parent=rich and current or nil}) + end + } + builder:parse(xml, filename, opts) + return doc +end +return SLAXML \ No newline at end of file diff --git a/resources/els-fivem/vcf.lua b/resources/els-fivem/vcf.lua new file mode 100644 index 000000000..c753812c2 --- /dev/null +++ b/resources/els-fivem/vcf.lua @@ -0,0 +1,51 @@ +vcf_files = { + "POLICE.xml", + "POLICE2.xml", + "POLICE3.xml", + "POLICE4.xml", + "PRANGER.xml", + "SHERIFF2.xml", + "SHERIFF.xml", + "AMBULANCE.xml", + "FBI2.xml", + "FBI.xml", + "SADLER.xml", + "FIRETRUK.xml", + "hwaycar2.xml", + "hwaycar3.xml", + "hwaycar4.xml", + "hwaycar5.xml", + "hwaycar6.xml", + "hwaycar7.xml", + "hwaycar8.xml", + "hwaycar9.xml", + "hwaycar10.xml", + "tflatbed4.xml", + "hazrescue.xml", + "benson.xml", + "exped.xml", + "firetruk.xml", + "fordkuga.xml", + "SHERIFF13.xml", + "SHERIFF12.xml", + "SHERIFF11.xml", + "SHERIFF10.xml", + "SHERIFF9.xml", + "SHERIFF8.xml", + "SHERIFF7.xml", + "SHERIFF6.xml", + "SHERIFF5.xml", + "SHERIFF4.xml", + "SHERIFF3.xml", + "tflatbed4.xml", + "ladder5.xml", + "bmwpd.xml", + "fordfocus.xml", + "POLICET.xml", + "bmwx5.xml", + "charger16.xml", + "tahoe17.xml", + "interceptor11.xml", + "jeepems.xml", + "ninef.xml" +} diff --git a/resources/els-fivem/vcf/FBI2.xml b/resources/els-fivem/vcf/FBI2.xml new file mode 100644 index 000000000..02305b1d5 --- /dev/null +++ b/resources/els-fivem/vcf/FBI2.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/POLICE.xml b/resources/els-fivem/vcf/POLICE.xml new file mode 100644 index 000000000..0ef3760dd --- /dev/null +++ b/resources/els-fivem/vcf/POLICE.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/POLICET.xml b/resources/els-fivem/vcf/POLICET.xml new file mode 100644 index 000000000..757424b0d --- /dev/null +++ b/resources/els-fivem/vcf/POLICET.xml @@ -0,0 +1,123 @@ + + + + + + euro + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + boot + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 9 + 9 + 9 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/SHERIFF.xml b/resources/els-fivem/vcf/SHERIFF.xml new file mode 100644 index 000000000..11db27385 --- /dev/null +++ b/resources/els-fivem/vcf/SHERIFF.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + blue + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 18 + 30 + 73 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/ambulance.xml b/resources/els-fivem/vcf/ambulance.xml new file mode 100644 index 000000000..dd990435a --- /dev/null +++ b/resources/els-fivem/vcf/ambulance.xml @@ -0,0 +1,122 @@ + + + + + + auto + standby + red + red + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20 + 11 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + \ No newline at end of file diff --git a/resources/els-fivem/vcf/benson.xml b/resources/els-fivem/vcf/benson.xml new file mode 100644 index 000000000..e4b83ce23 --- /dev/null +++ b/resources/els-fivem/vcf/benson.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/bmwpd.xml b/resources/els-fivem/vcf/bmwpd.xml new file mode 100644 index 000000000..e2e855650 --- /dev/null +++ b/resources/els-fivem/vcf/bmwpd.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/bmwx5.xml b/resources/els-fivem/vcf/bmwx5.xml new file mode 100644 index 000000000..0803aa458 --- /dev/null +++ b/resources/els-fivem/vcf/bmwx5.xml @@ -0,0 +1,123 @@ + + + + + + euro + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/charger16.xml b/resources/els-fivem/vcf/charger16.xml new file mode 100644 index 000000000..1360531a6 --- /dev/null +++ b/resources/els-fivem/vcf/charger16.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/chgr.xml b/resources/els-fivem/vcf/chgr.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/chgr.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/exped.xml b/resources/els-fivem/vcf/exped.xml new file mode 100644 index 000000000..453c9b740 --- /dev/null +++ b/resources/els-fivem/vcf/exped.xml @@ -0,0 +1,123 @@ + + + + + + auto + standby + red + red + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + \ No newline at end of file diff --git a/resources/els-fivem/vcf/fbi.xml b/resources/els-fivem/vcf/fbi.xml new file mode 100644 index 000000000..1c1b79835 --- /dev/null +++ b/resources/els-fivem/vcf/fbi.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/fdtahoe1.xml b/resources/els-fivem/vcf/fdtahoe1.xml new file mode 100644 index 000000000..60e372ca3 --- /dev/null +++ b/resources/els-fivem/vcf/fdtahoe1.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + 20 + 16 + + + + + + + + + + + + + + + + + + + 135 + 107 + 77 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/fdtahoe2.xml b/resources/els-fivem/vcf/fdtahoe2.xml new file mode 100644 index 000000000..15579a32f --- /dev/null +++ b/resources/els-fivem/vcf/fdtahoe2.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 40 + 43 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/firetruk.xml b/resources/els-fivem/vcf/firetruk.xml new file mode 100644 index 000000000..334c536f1 --- /dev/null +++ b/resources/els-fivem/vcf/firetruk.xml @@ -0,0 +1,123 @@ + + + + + + auto + standby + grey + red + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + \ No newline at end of file diff --git a/resources/els-fivem/vcf/fordfocus.xml b/resources/els-fivem/vcf/fordfocus.xml new file mode 100644 index 000000000..f3ce9206e --- /dev/null +++ b/resources/els-fivem/vcf/fordfocus.xml @@ -0,0 +1,123 @@ + + + + + + euro + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/fordkuga.xml b/resources/els-fivem/vcf/fordkuga.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/fordkuga.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/hazrescue.xml b/resources/els-fivem/vcf/hazrescue.xml new file mode 100644 index 000000000..d7039d575 --- /dev/null +++ b/resources/els-fivem/vcf/hazrescue.xml @@ -0,0 +1,123 @@ + + + + + + auto + standby + red + red + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + \ No newline at end of file diff --git a/resources/els-fivem/vcf/hwaycar1.xml b/resources/els-fivem/vcf/hwaycar1.xml new file mode 100644 index 000000000..d56ff1bf3 --- /dev/null +++ b/resources/els-fivem/vcf/hwaycar1.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/hwaycar10.xml b/resources/els-fivem/vcf/hwaycar10.xml new file mode 100644 index 000000000..0add57adf --- /dev/null +++ b/resources/els-fivem/vcf/hwaycar10.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/hwaycar2.xml b/resources/els-fivem/vcf/hwaycar2.xml new file mode 100644 index 000000000..3a209d419 --- /dev/null +++ b/resources/els-fivem/vcf/hwaycar2.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/hwaycar3.xml b/resources/els-fivem/vcf/hwaycar3.xml new file mode 100644 index 000000000..4b6eeee74 --- /dev/null +++ b/resources/els-fivem/vcf/hwaycar3.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/hwaycar4.xml b/resources/els-fivem/vcf/hwaycar4.xml new file mode 100644 index 000000000..4b6eeee74 --- /dev/null +++ b/resources/els-fivem/vcf/hwaycar4.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/hwaycar5.xml b/resources/els-fivem/vcf/hwaycar5.xml new file mode 100644 index 000000000..cbf0d72e9 --- /dev/null +++ b/resources/els-fivem/vcf/hwaycar5.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/hwaycar6.xml b/resources/els-fivem/vcf/hwaycar6.xml new file mode 100644 index 000000000..cbf0d72e9 --- /dev/null +++ b/resources/els-fivem/vcf/hwaycar6.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/hwaycar7.xml b/resources/els-fivem/vcf/hwaycar7.xml new file mode 100644 index 000000000..add300217 --- /dev/null +++ b/resources/els-fivem/vcf/hwaycar7.xml @@ -0,0 +1,123 @@ + + + + + + auto + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/hwaycar8.xml b/resources/els-fivem/vcf/hwaycar8.xml new file mode 100644 index 000000000..90c53a8c4 --- /dev/null +++ b/resources/els-fivem/vcf/hwaycar8.xml @@ -0,0 +1,125 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/hwaycar9.xml b/resources/els-fivem/vcf/hwaycar9.xml new file mode 100644 index 000000000..0add57adf --- /dev/null +++ b/resources/els-fivem/vcf/hwaycar9.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/interceptor11.xml b/resources/els-fivem/vcf/interceptor11.xml new file mode 100644 index 000000000..9ba2de0e3 --- /dev/null +++ b/resources/els-fivem/vcf/interceptor11.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + white + purple + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/jeepems.xml b/resources/els-fivem/vcf/jeepems.xml new file mode 100644 index 000000000..39fdfa0fb --- /dev/null +++ b/resources/els-fivem/vcf/jeepems.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + white + RED + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/ladder5.xml b/resources/els-fivem/vcf/ladder5.xml new file mode 100644 index 000000000..592d710ee --- /dev/null +++ b/resources/els-fivem/vcf/ladder5.xml @@ -0,0 +1,123 @@ + + + + + + auto + standby + grey + red + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + \ No newline at end of file diff --git a/resources/els-fivem/vcf/ninef.xml b/resources/els-fivem/vcf/ninef.xml new file mode 100644 index 000000000..b04177eda --- /dev/null +++ b/resources/els-fivem/vcf/ninef.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/police2.xml b/resources/els-fivem/vcf/police2.xml new file mode 100644 index 000000000..1360531a6 --- /dev/null +++ b/resources/els-fivem/vcf/police2.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + true + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/police3.xml b/resources/els-fivem/vcf/police3.xml new file mode 100644 index 000000000..1c1b79835 --- /dev/null +++ b/resources/els-fivem/vcf/police3.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/police4.xml b/resources/els-fivem/vcf/police4.xml new file mode 100644 index 000000000..dc572b4dc --- /dev/null +++ b/resources/els-fivem/vcf/police4.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/pranger.xml b/resources/els-fivem/vcf/pranger.xml new file mode 100644 index 000000000..fe24c85c7 --- /dev/null +++ b/resources/els-fivem/vcf/pranger.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sadler.xml b/resources/els-fivem/vcf/sadler.xml new file mode 100644 index 000000000..9df7b1004 --- /dev/null +++ b/resources/els-fivem/vcf/sadler.xml @@ -0,0 +1,142 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + bonnet + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 11 + 12 + 20 + 22 + 23 + 24 + 35 + 28 + 39 + 51 + + + + + + + + + + + + + + + + + + + 16 + 17 + 18 + 24 + 25 + 26 + 40 + 41 + 42 + 135 + 137 + 136 + 119 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff10.xml b/resources/els-fivem/vcf/sheriff10.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff10.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff11.xml b/resources/els-fivem/vcf/sheriff11.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff11.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff12.xml b/resources/els-fivem/vcf/sheriff12.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff12.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff13.xml b/resources/els-fivem/vcf/sheriff13.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff13.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff2.xml b/resources/els-fivem/vcf/sheriff2.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff2.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff3.xml b/resources/els-fivem/vcf/sheriff3.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff3.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff4.xml b/resources/els-fivem/vcf/sheriff4.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff4.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff5.xml b/resources/els-fivem/vcf/sheriff5.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff5.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff6.xml b/resources/els-fivem/vcf/sheriff6.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff6.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff7.xml b/resources/els-fivem/vcf/sheriff7.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff7.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff8.xml b/resources/els-fivem/vcf/sheriff8.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff8.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/sheriff9.xml b/resources/els-fivem/vcf/sheriff9.xml new file mode 100644 index 000000000..79ba96b45 --- /dev/null +++ b/resources/els-fivem/vcf/sheriff9.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/tahoe17.xml b/resources/els-fivem/vcf/tahoe17.xml new file mode 100644 index 000000000..c49d9cba7 --- /dev/null +++ b/resources/els-fivem/vcf/tahoe17.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + blue + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 18 + 30 + 73 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/vcf/tflatbed4.xml b/resources/els-fivem/vcf/tflatbed4.xml new file mode 100644 index 000000000..8978fa71f --- /dev/null +++ b/resources/els-fivem/vcf/tflatbed4.xml @@ -0,0 +1,123 @@ + + + + + + manual + standby + grey + orange + + + + + + + + + + + + + + + + + + + false + off + false + 3 + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + + + diff --git a/resources/els-fivem/version.json b/resources/els-fivem/version.json new file mode 100644 index 000000000..532c92c95 --- /dev/null +++ b/resources/els-fivem/version.json @@ -0,0 +1,4 @@ +{ + "version":"1.75", + "changelog":"Added a /_curver command to check the version of ELS that you are using.\nAdded a FiveM docs link in config.lua for those who are interested in changing the keys." +} \ No newline at end of file