local u=workspace.CurrentCamera local v=avatarEditorGui.Main local o=v.Catalog local t=v.Viewer local z=avatarEditorGui.DetailsOverlay local y=avatarEditorGui.Toggle local s=t.Done local n=t.View local Y=o.Header local J=Y.CategoryTabs local K=Y.SubCategoryTabs local O=Y.Search local M=o.Container local H=M.ScrollingFrame local U=H.UIGridLayout local V=M.ScaleFrame local c=V.UIGridLayout local f=O.TextBox local X=O.Clear local W=PurchasePrompt.new(z)local Q=Maid.new()local C=Maid.new()local l={}local a={}local D=Instance.new("\078\117\109\098\101\114\086\097\108\117\101")D.Value=CAMERA_OFFSET local p=TableUtil.Filter(J:GetChildren(),function(u)return u:IsA("\071\117\105\066\117\116\116\111\110")end)local m=TableUtil.Filter(K:GetChildren(),function(u)return u:IsA("\071\117\105\079\098\106\101\099\116")end)local Z=Tween:Create(o,tweenInfo,{Position=UDim2.new(0,0,0,0)})local F=Tween:Create(o,tweenInfo,{Position=UDim2.new(-0.6,0,0,0)})local S=Tween:Create(t,tweenInfo,{Position=UDim2.new(1,0,0,0)})local b=Tween:Create(t,tweenInfo,{Position=UDim2.new(1.4,0,0,0)})local g=Tween:Create(t,tweenInfo,{Position=UDim2.new(1.4,-36,0,0)})local N=Tween:Create(D,tweenInfo,{Value=CAMERA_OFFSET})local I=Tween:Create(D,tweenInfo,{Value=.5})local G="\065\099\099\101\115\115\111\114\105\101\115"local R="\072\097\105\114"local E=false local d=false


local camera = workspace.CurrentCamera

local avatarEditorFrame = avatarEditorGui.Main
local catalogFrame = avatarEditorFrame.Catalog
local viewerFrame = avatarEditorFrame.Viewer

local detailsOverlay = avatarEditorGui.DetailsOverlay
local toggleButton = avatarEditorGui.Toggle

local doneButton = viewerFrame.Done
local viewButton = viewerFrame.View

local headerFrame = catalogFrame.Header
local categoryTabsFrame = headerFrame.CategoryTabs
local subCategoryTabsFrame = headerFrame.SubCategoryTabs
local searchFrame = headerFrame.Search

local containerFrame = catalogFrame.Container
local scrollingFrame = containerFrame.ScrollingFrame
local scrollingFrameUIGridLayout = scrollingFrame.UIGridLayout

local scaleFrame = containerFrame.ScaleFrame
local scaleFrameUIGridLayout = scaleFrame.UIGridLayout

local searchTextBox = searchFrame.TextBox
local clearSearchButton = searchFrame.Clear

local purchasePrompt = PurchasePrompt.new(detailsOverlay)

local activeButtons = Maid.new()
local activeConnections = Maid.new()
local activeCategoryButtons = {}
local activeSubCategoryButtons = {}

local numberValue = Instance.new("NumberValue")
numberValue.Value = CAMERA_OFFSET

local categoryButtons = TableUtil.Filter(categoryTabsFrame:GetChildren(), function(item)
	return item:IsA("GuiButton")
end)
local subCategoryFrames = TableUtil.Filter(subCategoryTabsFrame:GetChildren(), function(item)
	return item:IsA("GuiObject")
end)

local catalogFrameOpenTween = Tween:Create(catalogFrame, tweenInfo, {Position = UDim2.new(0, 0, 0, 0)})
local catalogFrameCloseTween = Tween:Create(catalogFrame, tweenInfo, {Position = UDim2.new(-0.6, 0, 0, 0)})
local viewerFrameOpenTween = Tween:Create(viewerFrame, tweenInfo, {Position = UDim2.new(1, 0, 0, 0)})
local viewerFrameCloseTween = Tween:Create(viewerFrame, tweenInfo, {Position = UDim2.new(1.4, 0, 0, 0)})
local viewFramePartialOpenTween = Tween:Create(viewerFrame, tweenInfo, {Position = UDim2.new(1.4, -36, 0, 0)})
local fullViewCloseTween = Tween:Create(numberValue, tweenInfo, {Value = CAMERA_OFFSET})
local fullViewOpenTween = Tween:Create(numberValue, tweenInfo, {Value = 0.5})

local currentCategory = "Accessories"
local currentSubCategory = "Hair"

local isOpen = false
local fullView = false
