local p=game:GetService("\082\117\110\083\101\114\118\105\099\101")local m=require(script.Parent.Parent.Configuration)local O=require(script.Parent.Parent.Utility.ThemeAccessor)local j=m.Promise local q=m.Roact local f=q.Component:extend("\077\097\116\101\114\105\097\108\073\110\100\101\116\101\114\109\105\110\097\116\101\067\105\114\099\108\101")f.defaultProps={AnchorPoint=Vector2.new(.5,.5);Position=UDim2.fromScale(.5,.5);AnimationSpeed=1,Disabled=false}local Y=table.create(42)Y[1]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\048\049\054\052"Y[2]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\048\051\054\050"Y[3]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\048\053\053\048"Y[4]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\048\055\053\053"Y[5]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\048\057\052\052"Y[6]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\049\049\049\051"Y[7]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\049\050\057\051"Y[8]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\049\053\048\054"Y[9]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\050\050\050\054"Y[10]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\050\052\056\055"Y[11]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\050\055\048\049"Y[12]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\050\056\054\054"Y[13]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\051\048\054\055"Y[14]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\051\050\057\050"Y[15]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\051\055\050\056"Y[16]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\052\051\052\053"Y[17]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\052\053\051\051"Y[18]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\052\055\055\057"Y[19]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\053\049\050\050"Y[20]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\053\052\053\048"Y[21]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\053\056\048\055"Y[22]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\054\048\051\051"Y[23]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\054\050\054\055"Y[24]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\054\053\057\052"Y[25]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\054\056\056\057"Y[26]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\055\049\056\054"Y[27]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\055\053\053\049"Y[28]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\055\056\053\052"Y[29]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\056\048\052\056"Y[30]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\056\050\054\053"Y[31]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\054\057\051\053\055"Y[32]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\049\051\055\054"Y[33]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\049\053\057\055"Y[34]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\049\055\056\055"Y[35]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\050\048\049\056"Y[36]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\050\050\053\053"Y[37]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\050\052\053\055"Y[38]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\050\054\055\056"Y[39]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\050\056\053\050"Y[40]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\051\048\054\050"Y[41]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\051\050\053\049"Y[42]="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\057\053\050\057\055\051\052\054\055"function f.init(p)p:setState({index=1,rotation=0})end local S=setmetatable({},{__index=function(p,m)local O={index=m}p[m]=O return O end})local X=setmetatable({},{__index=function(p,m)local O={rotation=m}p[m]=O return O end})for p=1,42,1 do local m=S[p]end function f.didMount(p)p.isMounted=true p.promise=j.Try(function()while p.isMounted do for m=1,42,1 do p:setState(S[m]);(j.Delay(.03/p.props.AnimationSpeed)):Await()local O=p.state.rotation+2 p:setState(X[O>360 and O-360 or O])end end end)end function f.willUnmount(p)if p.promise then p.promise:Cancel()p.promise=nil end p.isMounted=false end function f.render(p)return q.createElement("\070\114\097\109\101",{AnchorPoint=p.props.AnchorPoint;BackgroundTransparency=1;Size=UDim2.fromOffset(50,50),Position=p.props.Position},{Circle=q.createElement("\073\109\097\103\101\076\097\098\101\108",{BackgroundTransparency=1;Size=UDim2.fromScale(1,1),Image=Y[p.state.index];ImageColor3=O.Get(p,"\080\114\105\109\097\114\121\067\111\108\111\114")})})end return f
local RunService = game:GetService("RunService")
local Configuration = require(script.Parent.Parent.Configuration)
local ThemeAccessor = require(script.Parent.Parent.Utility.ThemeAccessor)

local Promise = Configuration.Promise
local Roact = Configuration.Roact

local IndeterminateCircle = Roact.Component:extend("MaterialIndeterminateCircle")
IndeterminateCircle.defaultProps = {
	AnchorPoint = Vector2.new(0.5, 0.5),
	Position = UDim2.fromScale(0.5, 0.5),
	AnimationSpeed = 1,
	Disabled = false,
}

local IMAGE_IDS = table.create(42)
IMAGE_IDS[1] = "rbxassetid://3952960164"
IMAGE_IDS[2] = "rbxassetid://3952960362"
IMAGE_IDS[3] = "rbxassetid://3952960550"
IMAGE_IDS[4] = "rbxassetid://3952960755"
IMAGE_IDS[5] = "rbxassetid://3952960944"
IMAGE_IDS[6] = "rbxassetid://3952961113"
IMAGE_IDS[7] = "rbxassetid://3952961293"
IMAGE_IDS[8] = "rbxassetid://3952961506"
IMAGE_IDS[9] = "rbxassetid://3952962226"
IMAGE_IDS[10] = "rbxassetid://3952962487"
IMAGE_IDS[11] = "rbxassetid://3952962701"
IMAGE_IDS[12] = "rbxassetid://3952962866"
IMAGE_IDS[13] = "rbxassetid://3952963067"
IMAGE_IDS[14] = "rbxassetid://3952963292"
IMAGE_IDS[15] = "rbxassetid://3952963728"
IMAGE_IDS[16] = "rbxassetid://3952964345"
IMAGE_IDS[17] = "rbxassetid://3952964533"
IMAGE_IDS[18] = "rbxassetid://3952964779"
IMAGE_IDS[19] = "rbxassetid://3952965122"
IMAGE_IDS[20] = "rbxassetid://3952965450"
IMAGE_IDS[21] = "rbxassetid://3952965807"
IMAGE_IDS[22] = "rbxassetid://3952966033"
IMAGE_IDS[23] = "rbxassetid://3952966267"
IMAGE_IDS[24] = "rbxassetid://3952966594"
IMAGE_IDS[25] = "rbxassetid://3952966889"
IMAGE_IDS[26] = "rbxassetid://3952967186"
IMAGE_IDS[27] = "rbxassetid://3952967551"
IMAGE_IDS[28] = "rbxassetid://3952967854"
IMAGE_IDS[29] = "rbxassetid://3952968048"
IMAGE_IDS[30] = "rbxassetid://3952968265"
IMAGE_IDS[31] = "rbxassetid://3952969357"
IMAGE_IDS[32] = "rbxassetid://3952971376"
IMAGE_IDS[33] = "rbxassetid://3952971597"
IMAGE_IDS[34] = "rbxassetid://3952971787"
IMAGE_IDS[35] = "rbxassetid://3952972018"
IMAGE_IDS[36] = "rbxassetid://3952972255"
IMAGE_IDS[37] = "rbxassetid://3952972457"
IMAGE_IDS[38] = "rbxassetid://3952972678"
IMAGE_IDS[39] = "rbxassetid://3952972852"
IMAGE_IDS[40] = "rbxassetid://3952973062"
IMAGE_IDS[41] = "rbxassetid://3952973251"
IMAGE_IDS[42] = "rbxassetid://3952973467"

function IndeterminateCircle:init()
	self:setState({
		index = 1,
		rotation = 0,
	})
end

local MemoizeIndex = setmetatable({}, {
	__index = function(self, Index)
		local Value = {index = Index}
		self[Index] = Value
		return Value
	end;
})

local MemoizeRotation = setmetatable({}, {
	__index = function(self, Index)
		local Value = {rotation = Index}
		self[Index] = Value
		return Value
	end;
})

for Index = 1, 42 do
	local _ = MemoizeIndex[Index]
end

function IndeterminateCircle:didMount()
	self.isMounted = true
	self.promise = Promise.Try(function()
		while self.isMounted do
			for index = 1, 42 do
				self:setState(MemoizeIndex[index])
				Promise.Delay(0.03 / self.props.AnimationSpeed):Await()
				local newRotation = self.state.rotation + 2
				self:setState(MemoizeRotation[newRotation > 360 and newRotation - 360 or newRotation])
			end
		end
	end)
end

function IndeterminateCircle:willUnmount()
	if self.promise then
		self.promise:Cancel()
		self.promise = nil
	end

	self.isMounted = false
end

function IndeterminateCircle:render()
	return Roact.createElement("Frame", {
		AnchorPoint = self.props.AnchorPoint,
		BackgroundTransparency = 1,
		Size = UDim2.fromOffset(50, 50),
		Position = self.props.Position,
	}, {
		Circle = Roact.createElement("ImageLabel", {
			BackgroundTransparency = 1,
			Size = UDim2.fromScale(1, 1),
			Image = IMAGE_IDS[self.state.index],
			ImageColor3 = ThemeAccessor.Get(self, "PrimaryColor"),
		}),
	})
end

return IndeterminateCircle