local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local l_Parent_3 = l_Parent_2.Parent;
local v4 = require(l_Parent_3.Roact);
local v5 = require(l_Parent_3.t);
local v6 = require(l_Parent_1.ImageSet.Images);
local v7 = require(l_Parent_0.ScrollButton);
local v8 = require(l_Parent_2.Utility.isCallable);
local l_BidirectionalFlatList_0 = require(l_Parent_3.VirtualizedList).BidirectionalFlatList;
local v10 = require(l_Parent_3.Promise);
local v11 = require(l_Parent_3.LuauPolyfill);
local v12 = v6["icons/actions/cycleLeft"];
local v13 = v6["icons/actions/cycleRight"];
local v14 = v4.PureComponent:extend("HorizontalCarousel");
v14.validateProps = v5.strictInterface({
    itemList = v5.array(v5.any),
    renderItem = v5.callback,
    identifier = v5.optional(v5.callback),
    itemSize = v5.optional(v5.Vector2),
    itemPadding = v5.optional(v5.number),
    carouselMargin = v5.optional(v5.number),
    layoutOrder = v5.optional(v5.integer),
    loadNext = v5.optional(v5.callback),
    loadPrevious = v5.optional(v5.callback),
    animateScrolling = v5.optional(v5.boolean),
    maxNumOfItemsVisible = v5.optional(v5.integer),
    onContentSizeChange = v5.optional(v5.callback),
    viewabilityConfigCallbackPairs = v5.optional(v5.array(v5.strictInterface({
        viewabilityConfig = v5.strictInterface({
            minimumViewTime = v5.optional(v5.number),
            viewAreaCoveragePercentThreshold = v5.optional(v5.number),
            itemVisiblePercentThreshold = v5.optional(v5.number),
            waitForInteraction = v5.optional(v5.boolean)
        }),
        onViewableItemsChanged = v8
    })))
});
v14.defaultProps = {
    itemSize = Vector2.new(1, 1),
    itemPadding = 12,
    maxNumOfItemsVisible = 0
};
local function v22(v15, v16, v17, _)
    if v15 == nil then
        return {};
    elseif not (v17 ~= nil) or v17 == 0 then
        return {
            showLeftButton = false,
            showRightButton = false
        };
    else
        local l_v15_0 = v15;
        local v20 = true;
        local v21 = true;
        if l_v15_0 <= 1 then
            l_v15_0 = 1;
            v20 = false;
        elseif v17 < l_v15_0 then
            l_v15_0 = v17;
            v21 = false;
        end;
        if v17 < l_v15_0 + v16 then
            v21 = false;
        end;
        return {
            index = l_v15_0,
            showLeftButton = v20,
            showRightButton = v21,
            numOfItems = v17
        };
    end;
end;
local function _(v23)
    if v23 then
        return not not v10.is(v23) and v23 or v10.promisify(v23);
    else
        return nil;
    end;
end;
v14.getDerivedStateFromProps = function(v25, v26)
    local v27 = #v25.itemList;
    if v26.numOfItems ~= v27 then
        return (v22(v26.index, v26.maxNumOfItemsVisible, v27));
    else
        return nil;
    end;
end;
v14.init = function(v28)
    v28.frameRef = v4.createRef();
    v28.listRef = v4.createRef();
    local v29 = {
        anchorIndex = 1
    };
    v28:setState({
        index = 1,
        hovering = false,
        showLeftButton = false,
        showRightButton = false,
        maxNumOfItemsVisible = v28.props.maxNumOfItemsVisible,
        numOfItems = 0
    });
    v28.onMouseEnter = function(_, v31)
        if v31.UserInputType == Enum.UserInputType.MouseMovement then
            v28:setState(function(v32)
                return v11.Object.assign(v22(v29.anchorIndex, v32.maxNumOfItemsVisible, v32.numOfItems), {
                    hovering = true
                });
            end);
        end;
    end;
    v28.onMouseLeave = function(_, v34)
        if v34.UserInputType == Enum.UserInputType.MouseMovement then
            v28:setState({
                hovering = false
            });
        end;
    end;
    v28.onResize = function(v35)
        local l_X_0 = v35.AbsoluteSize.X;
        v28:setState(function(_, v38)
            return {
                maxNumOfItemsVisible = math.floor(l_X_0 / (v38.itemSize.X + v38.itemPadding))
            };
        end);
    end;
    v28.onScrollUpdate = function(v39)
        v29 = {
            anchorIndex = math.floor((v39.CanvasPosition.X > 0 and v39.CanvasPosition.X or 0) / (v28.props.itemSize.X + v28.props.itemPadding)) + 1,
            animationActive = false
        };
    end;
    v28.scrollLeft = function()
        if not v29.animationActive then
            v28:setState(function(v40, v41)
                local v42 = v29.anchorIndex - v40.maxNumOfItemsVisible;
                if v28.listRef then
                    v28.listRef.current:scrollToIndex({
                        animated = true,
                        index = v42 > 1 and v42 or 1,
                        viewOffset = v41.itemSize.X + v41.itemPadding
                    });
                end;
                return (v22(v42, v40.maxNumOfItemsVisible, v40.numOfItems));
            end);
            return ;
        else
            return ;
        end;
    end;
    v28.scrollRight = function()
        if not v29.animationActive then
            v28:setState(function(v43, v44)
                local v45 = v29.anchorIndex + v43.maxNumOfItemsVisible;
                if v28.listRef then
                    v28.listRef.current:scrollToIndex({
                        animated = true,
                        index = v45,
                        viewOffset = v44.itemSize.X + v44.itemPadding
                    });
                end;
                return (v22(v45, v43.maxNumOfItemsVisible, v43.numOfItems));
            end);
            return ;
        else
            return ;
        end;
    end;
    v28.proxyKeyExtractor = function(v46, v47)
        local l_props_0 = v28.props;
        if not l_props_0.identifier then
            return nil;
        else
            return (l_props_0.identifier(v46, v47));
        end;
    end;
    v28.proxyRenderItem = function(v49)
        return v28.props.renderItem(v49.item);
    end;
    v28.getItemLayout = function(v50, v51)
        local l_props_1 = v28.props;
        local v53 = l_props_1.itemSize.X + (l_props_1.itemPadding or 0);
        return {
            length = if v51 == #v50 then l_props_1.itemSize.X else v53,
            offset = v53 * (v51 - 1) + (l_props_1.carouselMargin or 0),
            index = v51
        };
    end;
end;
v14.render = function(v54)
    local l_props_2 = v54.props;
    local l_state_0 = v54.state;
    local l_itemList_0 = l_props_2.itemList;
    local l_itemSize_0 = l_props_2.itemSize;
    local l_itemPadding_0 = l_props_2.itemPadding;
    local l_carouselMargin_0 = l_props_2.carouselMargin;
    local l_layoutOrder_0 = l_props_2.layoutOrder;
    local l_loadNext_0 = l_props_2.loadNext;
    local l_loadPrevious_0 = l_props_2.loadPrevious;
    local v64 = nil;
    if not (not l_state_0.hovering or not l_state_0.showLeftButton) then
        v64 = v4.createElement(v7, {
            icon = v12,
            callback = v54.scrollLeft
        });
    end;
    local v65 = nil;
    if not (not l_state_0.hovering or not l_state_0.showRightButton) then
        v65 = v4.createElement(v7, {
            icon = v13,
            callback = v54.scrollRight
        });
    end;
    return v4.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, l_itemSize_0.Y),
        LayoutOrder = l_layoutOrder_0,
        BackgroundTransparency = 1,
        [v4.Ref] = v54.frameRef,
        [v4.Event.InputBegan] = v54.onMouseEnter,
        [v4.Event.InputEnded] = v54.onMouseLeave,
        [v4.Change.AbsoluteSize] = v54.onResize
    }, {
        LeftMargin = v4.createElement("Frame", {
            Position = UDim2.fromScale(0, 0),
            AnchorPoint = Vector2.new(0, 0),
            Size = UDim2.new(0, l_carouselMargin_0, 1, 0),
            BackgroundTransparency = 1,
            ZIndex = 2
        }, {
            ScrollLeftButton = v64
        }),
        ScrollerCarousel = l_state_0.maxNumOfItemsVisible > 0 and v4.createElement(l_BidirectionalFlatList_0, {
            [v4.Ref] = v54.listRef,
            data = l_itemList_0,
            renderItem = v54.proxyRenderItem,
            keyExtractor = v54.proxyKeyExtractor,
            horizontal = true,
            initialScrollIndex = 1,
            initialNumToRender = 10,
            windowSize = 5,
            onScroll = v54.onScrollUpdate,
            onStartReachedThreshold = 1,
            onStartReached = if l_loadPrevious_0 then v10.is(l_loadPrevious_0) and l_loadPrevious_0 or v10.promisify(l_loadPrevious_0) else nil,
            onEndReachedThreshold = 1,
            onEndReached = if l_loadNext_0 then v10.is(l_loadNext_0) and l_loadNext_0 or v10.promisify(l_loadNext_0) else nil,
            overrideAutomaticCanvasSize = true,
            getItemLayout = v54.getItemLayout,
            viewabilityConfigCallbackPairs = l_props_2.viewabilityConfigCallbackPairs,
            ItemSeparatorComponent = if not l_itemPadding_0 then nil else function()
                return v4.createFragment({
                    ItemPadding = v4.createElement("UIPadding", {
                        PaddingRight = UDim.new(0, l_itemPadding_0)
                    })
                });
            end,
            showDefaultLoadingIndicators = false,
            ListHeaderComponent = if not l_carouselMargin_0 then nil else function()
                return v4.createFragment({
                    LeftCarouselMargin = v4.createElement("Frame", {
                        Position = UDim2.fromScale(0, 0),
                        AnchorPoint = Vector2.new(0, 0),
                        BackgroundTransparency = 1,
                        Size = UDim2.new(0, l_carouselMargin_0, 1, 0)
                    })
                });
            end,
            ListFooterComponent = if not l_carouselMargin_0 then nil else function()
                return v4.createFragment({
                    RightCarouselMargin = v4.createElement("Frame", {
                        Position = UDim2.fromScale(0, 0),
                        AnchorPoint = Vector2.new(0, 0),
                        BackgroundTransparency = 1,
                        Size = UDim2.new(0, l_carouselMargin_0, 1, 0)
                    })
                });
            end,
            contentContainerStyle = {
                BackgroundTransparency = 1,
                Size = UDim2.fromScale(0, 1),
                ClipsDescendants = false
            },
            style = {
                BackgroundTransparency = 1,
                ScrollBarThickness = 0
            },
            onContentSizeChange = l_props_2.onContentSizeChange
        }) or nil,
        RightMargin = v4.createElement("Frame", {
            Position = UDim2.fromScale(1, 0),
            AnchorPoint = Vector2.new(1, 0),
            Size = UDim2.new(0, l_carouselMargin_0, 1, 0),
            BackgroundTransparency = 1,
            ZIndex = 2
        }, {
            ScrollRightButton = v65
        })
    });
end;
return v14;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local v3 = require(l_Parent_2.Roact);
local v4 = require(l_Parent_2.t);
local v5 = require(l_Parent_1.Core.Style.withStyle);
local l_Core_0 = l_Parent_1.Core;
local v7 = require(l_Parent_0.ImageSet.getIconSize);
local v8 = require(l_Parent_0.ImageSet.Enum.IconSize);
local v9 = require(l_Core_0.Control.Interactable);
local v10 = require(l_Core_0.ImageSet.ImageSetComponent);
local v11 = v3.PureComponent:extend("ScrollButton");
v11.validateProps = v4.strictInterface({
    icon = v4.table,
    callback = v4.callback
});
v11.render = function(v12)
    return v5(function(v13)
        return v3.createElement(v9, {
            AutoButtonColor = false,
            Size = UDim2.fromScale(1, 1),
            BackgroundColor3 = v13.Theme.BackgroundUIContrast.Color,
            BackgroundTransparency = v13.Theme.BackgroundUIContrast.Transparency,
            BorderSizePixel = 0,
            [v3.Event.Activated] = v12.props.callback,
            onStateChanged = function()
            end
        }, {
            Icon = v3.createElement(v10.Label, {
                Size = UDim2.fromOffset(v7(v8.Medium), v7(v8.Medium)),
                Position = UDim2.fromScale(0.5, 0.5),
                AnchorPoint = Vector2.new(0.5, 0.5),
                BackgroundTransparency = 1,
                Image = v12.props.icon,
                ImageColor3 = v13.Theme.IconEmphasis.Color,
                ImageTransparency = v13.Theme.IconEmphasis.Transparency
            })
        });
    end);
end;
return v11;


return {
    Compact = "Compact",
    Gamepad = "Gamepad",
    Wide = "Wide"
};


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Roact);
local v3 = require(l_Parent_1.t);
local v4 = require(l_Parent_0.App.ImageSet.Images);
local v5 = require(l_Parent_0.App.Indicator.EmptyState);
local v6 = require(l_Parent_0.App.Button.Button);
local v7 = require(l_Parent_0.App.Button.Enum.ButtonType);
local v8 = require(l_Parent_0.App.Loading.Enum.RenderOnFailedStyle);
local v9 = v2.PureComponent:extend("FailedStatePage");
v9.validateProps = v3.strictInterface({
    onRetry = v3.optional(v3.callback),
    renderOnFailed = v3.optional(v8.isEnumValue),
    text = v3.optional(v3.string)
});
v9.defaultProps = {
    renderOnFailed = v8.RetryButton
};
v9.render = function(v10)
    if v10.props.renderOnFailed == v8.EmptyStatePage then
        return v2.createElement(v5, {
            position = UDim2.fromScale(0.5, 0.5),
            anchorPoint = Vector2.new(0.5, 0.5),
            onActivated = v10.props.onRetry,
            icon = v4["icons/status/noconnection_large"],
            text = v10.props.text
        });
    elseif v10.props.renderOnFailed == v8.RetryButton then
        if not v10.props.onRetry then
            error("OnRetry callback empty. OnRetry needs to be a function to render the RetryButton");
            return ;
        else
            return v2.createElement(v6, {
                buttonType = v7.Secondary,
                size = UDim2.fromOffset(44, 44),
                position = UDim2.fromScale(0.5, 0.5),
                anchorPoint = Vector2.new(0.5, 0.5),
                onActivated = v10.props.onRetry,
                icon = v4["icons/common/refresh"]
            });
        end;
    else
        error("Failed to provide proper RenderOnFailedStyle");
        return ;
    end;
end;
return v9;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Cryo);
local v2 = require(l_Parent_0.Roact);
local v3 = require(l_Parent_0.t);
local v4 = require(script.Parent.getPageMargin);
local v5 = v2.Component:extend("PageMargin");
v5.validateProps = v3.interface({
    anchorPoint = v3.optional(v3.Vector2),
    position = v3.optional(v3.UDim2),
    backgroundColor3 = v3.optional(v3.Color3),
    backgroundTransparency = v3.optional(v3.number),
    layoutOrder = v3.optional(v3.number),
    size = v3.optional(v3.UDim2),
    useAutomaticSizing = v3.optional(v3.boolean),
    zIndex = v3.optional(v3.number)
});
v5.defaultProps = {
    anchorPoint = Vector2.new(0, 0),
    position = UDim2.new(),
    size = UDim2.fromScale(1, 1),
    backgroundTransparency = 0,
    layoutOrder = 0,
    useAutomaticSizing = false
};
v5.init = function(v6)
    v6.state = {};
    v6.ref = v2.createRef();
    v6.onResize = function(v7)
        if v6.mounted then
            local l_X_0 = v7.AbsoluteSize.X;
            v6:setState(function(v9)
                local v10 = v4(l_X_0);
                if v9.margin ~= v10 then
                    return {
                        margin = v10
                    };
                else
                    return nil;
                end;
            end);
        end;
    end;
end;
v5.render = function(v11)
    return v2.createElement("Frame", {
        AnchorPoint = v11.props.anchorPoint,
        AutomaticSize = not not v11.props.useAutomaticSizing and Enum.AutomaticSize.Y or Enum.AutomaticSize.None,
        BackgroundColor3 = v11.props.backgroundColor3,
        BackgroundTransparency = v11.props.backgroundTransparency,
        BorderSizePixel = 0,
        Position = v11.props.position,
        Size = v11.props.size,
        [v2.Change.AbsoluteSize] = v11.onResize,
        [v2.Ref] = v11.ref,
        LayoutOrder = v11.props.layoutOrder,
        ZIndex = v11.props.zIndex
    }, v1.Dictionary.join(v11.props[v2.Children], {
        padding = v2.createElement("UIPadding", {
            PaddingLeft = UDim.new(0, v11.state.margin),
            PaddingRight = UDim.new(0, v11.state.margin)
        })
    }));
end;
v5.didMount = function(v12)
    v12.mounted = true;
    if v12.ref.current then
        v12.onResize(v12.ref.current);
    end;
end;
v5.willUnmount = function(v13)
    v13.mounted = false;
end;
return v5;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Roact);
local v3 = require(l_Parent_1.t);
local v4 = require(l_Parent_0.App.Loading.Enum.RetrievalStatus);
local v5 = require(l_Parent_0.App.Container.LoadingStatePage);
local v6 = require(l_Parent_0.App.Container.FailedStatePage);
local v7 = v2.PureComponent:extend("LoadingStateContainer");
v7.validateProps = v3.strictInterface({
    dataStatus = v4.isEnumValue,
    renderOnLoaded = v3.callback,
    renderOnFailed = v3.optional(v3.callback),
    onRetry = v3.optional(v3.callback),
    renderOnLoading = v3.optional(v3.callback),
    renderOnEmpty = v3.optional(v3.callback)
});
v7.init = function(v8)
    v8.statePages = {
        [v4.NotStarted] = function()
            if not v8.props.renderOnEmpty then
                if not v8.props.renderOnLoading then
                    return v2.createElement(v5);
                else
                    return v8.props.renderOnLoading();
                end;
            else
                return v8.props.renderOnEmpty();
            end;
        end,
        [v4.Fetching] = function()
            if not v8.props.renderOnLoading then
                return v2.createElement(v5);
            else
                return v8.props.renderOnLoading();
            end;
        end,
        [v4.Failed] = function()
            if not v8.props.renderOnFailed then
                return v2.createElement(v6, {
                    onRetry = v8.props.onRetry
                });
            else
                return v8.props.renderOnFailed();
            end;
        end,
        [v4.Done] = function()
            return v8.props.renderOnLoaded();
        end
    };
end;
v7.render = function(v9)
    return v9.statePages[v9.props.dataStatus]();
end;
return v7;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Parent.Roact);
local v2 = require(l_Parent_0.App.Loading.LoadingSpinner);
local v3 = v1.PureComponent:extend("LoadingStatePage");
v3.render = function(_)
    return v1.createElement(v2, {
        size = UDim2.fromOffset(42, 42),
        position = UDim2.fromScale(0.5, 0.5),
        anchorPoint = Vector2.new(0.5, 0.5)
    });
end;
return v3;


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Style.StyleTypes);
local _ = require(l_Parent_0.Style.Fonts);
return {
    getDefaultStyleProps = function(v3)
        return {
            borderRadius = UDim.new(0, v3.Tokens.Component.VerticalTile.Base.Container.BorderRadius.LeadingTop),
            contentGap = v3.Tokens.Global.Space_150,
            gutter = v3.Tokens.Global.Space_300,
            titleFont = v3.Font.Header1,
            titleTextColor = {
                Color = v3.Tokens.Semantic.Color.Text.Emphasis.Color3,
                Transparency = v3.Tokens.Semantic.Color.Text.Emphasis.Transparency
            }
        };
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UIBlox");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.ReactOtter);
local v4 = require(l_Parent_0.Cryo);
local v5 = require(l_script_FirstAncestor_0.Core.Style.useStyle);
local v6 = {
    zIndex = 1,
    overlayTransparency = 0.5,
    animationConfig = {
        dampingRatio = 1,
        frequency = 6.666666666666667
    }
};
return function(v7)
    local v8 = v4.Dictionary.join(v6, v7);
    local v9 = #v8.items;
    local v10 = v5();
    local v11, v12 = v3.useAnimatedBinding(0, (v2.useCallback(function()
        if v8.crossAnim.isCrossFade then
            v8.crossAnim.setCrossFade(false);
            v8.crossAnim.setCurrentIndex(v8.crossAnim.nextIndex);
        end;
    end, {
        v8.crossAnim.isCrossFade,
        v8.crossAnim.nextIndex,
        v8.crossAnim.setCrossFade,
        v8.crossAnim.setCurrentIndex
    })));
    v2.useEffect(function()
        if v9 < 2 then
            return ;
        elseif not v8.crossAnim.isCrossFade then
            v12((v3.instant(0)));
            return ;
        else
            v12(v3.spring(1, v8.animationConfig));
            return ;
        end;
    end, {
        v8.crossAnim.isCrossFade,
        v8.crossAnim.nextIndex,
        v8.animationConfig
    });
    return v2.createElement("ImageLabel", {
        Size = UDim2.fromScale(1, 1),
        ZIndex = v8.zIndex,
        Image = v8.items[v8.crossAnim.currentIndex].imageId,
        ScaleType = Enum.ScaleType.Crop,
        BackgroundTransparency = 1,
        ImageTransparency = v11
    }, {
        NextImage = if v9 >= 2 then v2.createElement("ImageLabel", {
            Position = UDim2.fromOffset(0, 0),
            Size = UDim2.fromScale(1, 1),
            Image = v8.items[v8.crossAnim.nextIndex].imageId,
            ScaleType = Enum.ScaleType.Crop,
            BackgroundTransparency = 1,
            ImageTransparency = v11:map(function(v13)
                return 1 - v13;
            end)
        }) else nil,
        Overlay = v2.createElement("Frame", {
            Size = UDim2.fromScale(1, 1),
            BackgroundTransparency = v8.overlayTransparency,
            BackgroundColor3 = v10.Theme.Overlay.Color
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UIBlox");
local v1 = require(l_script_FirstAncestor_0.Core.ImageSet.ImageSetComponent);
local v2 = require(l_script_FirstAncestor_0.App.ImageSet.Images);
local v3 = require(l_script_FirstAncestor_0.App.Button.Button);
local v4 = require(l_script_FirstAncestor_0.App.Button.Enum.ButtonType);
local v5 = require(l_script_FirstAncestor_0.Parent.Cryo);
local v6 = require(l_script_FirstAncestor_0.Parent.React);
local v7 = UDim2.fromScale(0.4, 0.512);
local v8 = UDim2.fromScale(0.25, 0.33);
local v9 = {
    numItemsShown = 3.5,
    itemAspectRatio = 1.7777777777777777,
    itemPadding = 16,
    borderRadius = UDim.new(0, 8)
};
return function(v10)
    local v11 = v5.Dictionary.join(v9, v10);
    local v12, v13 = v6.useState(Vector2.zero);
    local v16 = v6.useCallback(function(v14)
        local v15 = (v14.AbsoluteSize.X - v11.itemPadding * (v11.numItemsShown - 1)) / v11.numItemsShown;
        v13(Vector2.new(v15, v15 / v11.itemAspectRatio));
    end, {
        v11.itemAspectRatio,
        v11.numItemsShown
    });
    local v18 = v6.useCallback(function(v17)
        if not v11.onVideoPlayActivated or not v11.items[v17].isVideo then
            if not v11.onPreviewActivated then
                return ;
            else
                return v11.onPreviewActivated(v17);
            end;
        else
            return v11.onVideoPlayActivated(v17);
        end;
    end, {
        v11.items,
        v11.onVideoPlayActivated,
        v11.onPreviewActivated
    });
    local v19 = {};
    for v20, v21 in v11.items, nil, nil do
        local l_isVideo_0 = v21.isVideo;
        v19["Item" .. v20] = v6.createElement("ImageButton", {
            LayoutOrder = v20,
            Size = UDim2.fromOffset(v12.X, v12.Y),
            Image = v21.imageId,
            ScaleType = Enum.ScaleType.Crop,
            BackgroundTransparency = 1,
            AutoButtonColor = false,
            [v6.Event.Activated] = function()
                v18(v20);
            end
        }, {
            Corner = v6.createElement("UICorner", {
                CornerRadius = v11.borderRadius
            }),
            PlayButton = if not l_isVideo_0 then nil else v6.createElement(v3, {
                buttonType = v4.PrimaryContextual,
                size = v7,
                anchorPoint = Vector2.new(0.5, 0.5),
                position = UDim2.fromScale(0.5, 0.5),
                onActivated = function()
                    v18(v20);
                end
            }),
            PlayIcon = if not l_isVideo_0 then nil else v6.createElement(v1.Label, {
                Size = v8,
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.fromScale(0.5, 0.5),
                Image = v2["icons/common/play"],
                BackgroundTransparency = 1,
                ZIndex = 2
            })
        });
    end;
    return v6.createElement("ScrollingFrame", {
        BackgroundTransparency = 1,
        Size = UDim2.fromScale(1, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        AutomaticCanvasSize = Enum.AutomaticSize.XY,
        ScrollBarImageTransparency = 1,
        ScrollingDirection = Enum.ScrollingDirection.X,
        ClipsDescendants = false,
        [v6.Change.AbsoluteSize] = v16
    }, {
        Layout = v6.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            Padding = UDim.new(0, v11.itemPadding)
        }),
        Items = v6.createElement(v6.Fragment, {}, v19)
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UIBlox");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.ReactOtter);
local v4 = require(l_Parent_0.Cryo);
local v5 = require(l_script_FirstAncestor_0.Core.Text.GenericTextLabel.GenericTextLabel);
local v6 = require(l_script_FirstAncestor_0.App.SelectionImage.useSelectionCursor);
local v7 = require(l_script_FirstAncestor_0.Core.Style.useStyle);
local _ = require(l_script_FirstAncestor_0.App.Style.StyleTypes);
local v9 = require(l_script_FirstAncestor_0.App.SelectionCursor.useCursor);
local v10 = require(l_script_FirstAncestor_0.App.SelectionImage.CursorKind);
local v11 = require(l_script_FirstAncestor_0.UIBloxConfig);
local v12 = require(script.Parent.Constants);
local v13 = {
    titleText = "Media",
    numItemsShown = 4,
    itemAspectRatio = 1.7777777777777777,
    animationConfig = {
        dampingRatio = 1,
        frequency = 6.666666666666667
    },
    onActivated = function()
    end,
    onSelectionGained = function()
    end,
    exitFullscreen = function()
    end
};
return function(v14)
    local v15 = v4.Dictionary.join(v13, v14);
    local v16 = v7();
    local v17 = v4.Dictionary.join(v12.getDefaultStyleProps(v16), v15.styleProps or {});
    local l_borderRadius_0 = v17.borderRadius;
    local l_gutter_0 = v17.gutter;
    local l_contentGap_0 = v17.contentGap;
    local l_titleFont_0 = v17.titleFont;
    local l_titleTextColor_0 = v17.titleTextColor;
    local v23, v24 = v3.useAnimatedBinding(0);
    local v25 = nil;
    local v26 = nil;
    if not v11.mediaGalleryExpandedViewImmediateAnimation then
        local v27, v28 = v2.useState(false);
        v25 = v27;
        v26 = v28;
        v2.useEffect(function()
            if not v25 then
                v24(v3.spring(0, v15.animationConfig));
            else
                v24(v3.spring(v15.expandableAreaHeightOffset, v15.animationConfig));
            end;
            return nil;
        end, {
            v25,
            v15.expandableAreaHeightOffset,
            v15.animationConfig
        });
    end;
    local v29, v30 = v2.useState(Vector2.zero);
    local v36 = v2.useCallback(function(v31, _, _, _)
        local v35 = (v31.AbsoluteSize.X - l_gutter_0 * (v15.numItemsShown - 1)) / v15.numItemsShown;
        v30(Vector2.new(v35, v35 / v15.itemAspectRatio));
    end, {
        l_gutter_0,
        v15.itemAspectRatio,
        v15.numItemsShown
    });
    local v46 = v2.useCallback(function(v37, _, v39, v40)
        if v37 then
            local v41 = false;
            if v40 ~= nil then
                v41 = v40:isDescendantOf(v37);
            end;
            local v42 = false;
            if v39 ~= nil then
                v42 = v39:IsDescendantOf(v37);
            end;
            local v43 = v41 and not v42;
            local v44 = not v41 and v42;
            if not v43 then
                if not v44 then
                    return nil;
                else
                    local v45 = false;
                    if v40 ~= nil then
                        v45 = v39.AbsolutePosition.Y < v40.AbsolutePosition.Y;
                    end;
                    if not v11.mediaGalleryExpandedViewImmediateAnimation then
                        v26(v45);
                    elseif not v45 then
                        v24(v3.spring(0, v15.animationConfig));
                    end;
                    v15.exitFullscreen();
                    v15.mediaGalleryGainFocused(false);
                    return nil;
                end;
            else
                if not v11.mediaGalleryExpandedViewImmediateAnimation then
                    v26(true);
                else
                    v24(v3.spring(v15.expandableAreaHeightOffset, v15.animationConfig));
                end;
                v15.mediaGalleryGainFocused(true);
                return nil;
            end;
        else
            return nil;
        end;
    end, {
        if not v11.mediaGalleryExpandedViewImmediateAnimation then nil else v15.expandableAreaHeightOffset,
        if not v11.mediaGalleryExpandedViewImmediateAnimation then nil else v15.animationConfig,
        v15.exitFullscreen,
        v15.mediaGalleryGainFocused
    });
    local v47 = if not v11.useNewSelectionCursor then v6(v15.selectionCursor) else if v15.showCursor then if not v11.useNewSelectionCursor then nil else v9(l_borderRadius_0) else if not v11.useNewSelectionCursor then nil else v6(v10.Invisible);
    return v2.createElement("CanvasGroup", {
        GroupTransparency = v15.groupTransparency,
        Size = UDim2.new(1, 0, 0, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundTransparency = 1
    }, {
        UIListLayout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, l_contentGap_0)
        }),
        ExpandableArea = v2.createElement("Frame", {
            Size = v23:map(function(v48)
                return UDim2.new(1, 0, 0, v48);
            end),
            BackgroundTransparency = 1,
            LayoutOrder = 1
        }),
        Title = v2.createElement(v5, {
            Size = UDim2.new(1, 0, 0, if not l_titleFont_0.RelativeSize then l_titleFont_0.FontSize else l_titleFont_0.RelativeSize * v16.Font.BaseSize),
            Text = v15.titleText,
            TextXAlignment = Enum.TextXAlignment.Left,
            colorStyle = l_titleTextColor_0,
            fontStyle = l_titleFont_0,
            LayoutOrder = 2
        }),
        MediaGallery = v2.createElement("ScrollingFrame", {
            Size = UDim2.new(1, 0, 0, v29.Y),
            BackgroundTransparency = 1,
            AutomaticCanvasSize = Enum.AutomaticSize.XY,
            ScrollBarImageTransparency = 1,
            ScrollBarThickness = 0,
            ScrollingDirection = Enum.ScrollingDirection.X,
            Selectable = false,
            LayoutOrder = 3,
            [v2.Change.AbsoluteSize] = v36,
            [v2.Event.SelectionChanged] = v46
        }, {
            Layout = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Horizontal,
                Padding = UDim.new(0, l_gutter_0)
            }),
            Items = v2.createElement(v2.Fragment, {}, (v2.useMemo(function()
                local v49 = {};
                for v50, v51 in v15.items, nil, nil do
                    v49["Item" .. v50] = v2.createElement("ImageButton", {
                        LayoutOrder = v50,
                        Size = UDim2.fromOffset(v29.X, v29.Y),
                        Image = v51.imageId,
                        ScaleType = Enum.ScaleType.Crop,
                        BackgroundTransparency = 1,
                        AutoButtonColor = false,
                        SelectionImageObject = v47,
                        [v2.Event.Activated] = function()
                            v15.onActivated(v50);
                        end,
                        [v2.Event.SelectionGained] = function()
                            v15.onSelectionGained(v50);
                        end
                    }, {
                        Corner = v2.createElement("UICorner", {
                            CornerRadius = l_borderRadius_0
                        })
                    });
                end;
                return v49;
            end, {
                v29,
                v15.items,
                v15.onActivated,
                v15.onSelectionGained,
                v47,
                l_borderRadius_0
            })))
        })
    });
end;


local l_UserInputService_0 = game:GetService("UserInputService");
local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local l_Parent_3 = l_Parent_2.Parent;
local v5 = require(l_Parent_3.Roact);
local v6 = require(l_Parent_3.t);
local l_EventConnection_0 = require(l_Parent_3.ReactUtils).EventConnection;
local v8 = require(l_Parent_1.ImageSet.Images);
local v9 = require(l_Parent_1.Button.IconButton);
local v10 = require(l_Parent_2.Core.Style.withStyle);
local v11 = require(l_Parent_0.ThumbnailButton);
local v12 = require(l_Parent_0.getShowItems);
local v13 = v5.Component:extend("MediaGalleryFullScreen");
v13.validateProps = v6.strictInterface({
    layoutOrder = v6.optional(v6.integer),
    size = v6.optional(v6.UDim2),
    anchorPoint = v6.optional(v6.Vector2),
    position = v6.optional(v6.UDim2),
    items = v6.array(v6.interface({
        imageId = v6.string,
        isVideo = v6.optional(v6.boolean)
    })),
    showIndex = v6.optional(v6.integer),
    onVideoPlayActivated = v6.optional(v6.callback)
});
v13.defaultProps = {
    size = UDim2.fromScale(1, 1),
    showIndex = 1
};
v13.getDerivedStateFromProps = function(v14, v15)
    local v16 = nil;
    if v15.items ~= v14.items then
        local v17 = v12(v14);
        v16 = {
            items = v14.items,
            itemsToShow = v17,
            showArrows = #v17 > 1,
            focusIndex = math.min(v15.focusIndex or 1, #v17)
        };
    end;
    if v15.showIndex ~= v14.showIndex then
        v16 = v16 or {};
        v16.showIndex = v14.showIndex;
        v16.focusIndex = math.min(v14.showIndex, #v14.items);
    end;
    return v16;
end;
v13.init = function(v18)
    v18.state = {
        items = nil,
        itemsToShow = nil,
        showArrows = true,
        focusIndex = 1,
        showIndex = 1
    };
    local v19, v20 = v5.createBinding(UDim2.fromScale(1, 1));
    v18.itemFrameSize = v19;
    v18.updateItemFrameSize = v20;
    v19, v20 = v5.createBinding(UDim2.new(0, 96, 1, 0));
    v18.arrowButtonSize = v19;
    v18.updateArrowButtonSize = v20;
    v19, v20 = v5.createBinding(UDim2.new(0.5, 0, 0.5, 0));
    v18.leftArrowPosition = v19;
    v18.updateLeftArrowPosition = v20;
    v19, v20 = v5.createBinding(UDim2.new(0.5, 0, 0.5, 0));
    v18.rightArrowPosition = v19;
    v18.updateRightArrowPosition = v20;
    v18.onResize = function(v21)
        local l_X_0 = v21.AbsoluteSize.X;
        local l_Y_0 = v21.AbsoluteSize.Y;
        local v24 = math.floor(l_Y_0 * 1.7777777777777777);
        if l_X_0 < v24 then
            v24 = l_X_0;
            l_Y_0 = math.floor(v24 / 1.7777777777777777);
        end;
        v18.updateItemFrameSize(UDim2.new(0, v24, 0, l_Y_0));
    end;
    v18.onImageResize = function(v25)
        local l_X_1 = v25.AbsoluteSize.X;
        local l_Y_1 = v25.AbsoluteSize.Y;
        v18.updateLeftArrowPosition(UDim2.new(0.5, -l_X_1 / 2, 0.5, 0));
        v18.updateRightArrowPosition(UDim2.new(0.5, l_X_1 / 2, 0.5, 0));
        v18.updateArrowButtonSize(UDim2.new(0, 96, 0, l_Y_1));
    end;
    v18.onUserInputBegan = function(v28)
        if v28.UserInputType ~= Enum.UserInputType.Keyboard then
            return ;
        else
            local l_focusIndex_0 = v18.state.focusIndex;
            local v30 = #v18.props.items;
            if v28.KeyCode == Enum.KeyCode.Left and l_focusIndex_0 > 1 then
                v18.showPreviousItem();
                return ;
            else
                if v28.KeyCode == Enum.KeyCode.Right and l_focusIndex_0 < v30 then
                    v18.showNextItem();
                end;
                return ;
            end;
        end;
    end;
    v18.showPreviousItem = function()
        local v31 = v18.state.focusIndex - 1;
        if v31 < 1 then
            v31 = 1;
        end;
        v18:setState({
            focusIndex = v31
        });
    end;
    v18.showNextItem = function()
        local v32 = #v18.props.items;
        local v33 = v18.state.focusIndex + 1;
        if v32 < v33 then
            v33 = v32;
        end;
        v18:setState({
            focusIndex = v33
        });
    end;
    v18.cycleNext = function()
        local v34 = #v18.props.items;
        local v35 = v18.state.focusIndex + 1;
        if v34 < v35 then
            v35 = 1;
        end;
        v18:setState({
            focusIndex = v35
        });
    end;
    v18.onVideoPlayActivated = function(v36)
        if v18.props.onVideoPlayActivated then
            v18.props.onVideoPlayActivated(v18.state.itemsToShow[v36].originalIndex);
        end;
    end;
end;
local function v44(_, v38, v39, v40, v41, v42, v43)
    return v5.createElement("Frame", {
        Size = v42,
        AnchorPoint = v40,
        Position = v41,
        BorderSizePixel = 0,
        BackgroundTransparency = 1,
        ZIndex = 100
    }, {
        ArrowButton = v5.createElement(v9, {
            size = UDim2.fromScale(1, 1),
            icon = v8[v38],
            showBackground = true,
            backgroundTransparency = 1,
            isDisabled = v39,
            onActivated = v43
        })
    });
end;
v13.render = function(v45)
    return v10(function(v46)
        return v45:renderWithProvider(v46);
    end);
end;
v13.renderWithProvider = function(v47, v48)
    local l_layoutOrder_0 = v47.props.layoutOrder;
    local l_anchorPoint_0 = v47.props.anchorPoint;
    local l_position_0 = v47.props.position;
    local l_size_0 = v47.props.size;
    local l_itemsToShow_0 = v47.state.itemsToShow;
    local l_showArrows_0 = v47.state.showArrows;
    local l_focusIndex_1 = v47.state.focusIndex;
    local v56 = l_itemsToShow_0[l_focusIndex_1];
    return v5.createElement("Frame", {
        LayoutOrder = l_layoutOrder_0,
        Size = l_size_0,
        AnchorPoint = l_anchorPoint_0,
        Position = l_position_0,
        BorderSizePixel = 0,
        BackgroundTransparency = 1,
        [v5.Change.AbsoluteSize] = v47.onResize
    }, {
        LeftArrow = if not l_showArrows_0 then nil else v44(v48, "icons/actions/cycleLeft", l_focusIndex_1 <= 1, Vector2.new(1, 0.5), v47.leftArrowPosition, v47.arrowButtonSize, v47.showPreviousItem),
        FullScreenItemFrame = v5.createElement("Frame", {
            Size = UDim2.new(1, -192, 1, 0),
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.fromScale(0.5, 0.5),
            BackgroundTransparency = 1,
            [v5.Change.AbsoluteSize] = v47.onImageResize
        }, {
            UIAspectRatioConstraint = v5.createElement("UIAspectRatioConstraint", {
                AspectRatio = 1.7777777777777777
            }),
            Item = v5.createElement(v11, {
                itemKey = l_focusIndex_1,
                imageId = v56.imageId,
                isVideo = v56.isVideo,
                userInteractionEnabled = true,
                onActivated = v47.cycleNext,
                onPlayActivated = not not v56.isVideo and v47.onVideoPlayActivated or nil
            })
        }),
        RightArrow = if not l_showArrows_0 then nil else v44(v48, "icons/actions/cycleRight", #l_itemsToShow_0 <= l_focusIndex_1, Vector2.new(0, 0.5), v47.rightArrowPosition, v47.arrowButtonSize, v47.showNextItem),
        EventConnection = not not l_showArrows_0 and v5.createElement(l_EventConnection_0, {
            event = l_UserInputService_0.InputBegan,
            callback = v47.onUserInputBegan
        }) or nil
    });
end;
return v13;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UIBlox");
local v1 = require(l_script_FirstAncestor_0.Parent.Cryo);
local v2 = require(l_script_FirstAncestor_0.Parent.React);
local v3 = require(script.Parent.MediaGallerySingle);
local v4 = require(script.Parent.MediaGalleryCarousel);
local v5 = {
    layoutMode = "Gallery"
};
return function(v6)
    local v7 = v1.Dictionary.join(v5, v6);
    if v7.layoutMode == "Carousel" then
        return v2.createElement(v4, v7);
    else
        return v2.createElement(v3, v7);
    end;
end;


local l_RunService_0 = game:GetService("RunService");
local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local l_Parent_3 = l_Parent_2.Parent;
local v5 = require(l_Parent_3.Roact);
local v6 = require(l_Parent_3.t);
local v7 = require(l_Parent_2.Core.Style.withStyle);
local v8 = require(l_Parent_3.Otter);
local l_EventConnection_0 = require(l_Parent_3.ReactUtils).EventConnection;
local v10 = require(l_Parent_1.ImageSet.getIconSize);
local v11 = require(l_Parent_1.ImageSet.Enum.IconSize);
local v12 = require(l_Parent_1.ImageSet.Images);
local v13 = require(l_Parent_1.Button.IconButton);
local v14 = require(l_Parent_0.ThumbnailButton);
local v15 = require(l_Parent_0.getShowItems);
local v16 = v10(v11.Medium);
local v17 = {
    frequency = 4,
    dampingRatio = 1
};
local v18 = v5.Component:extend("MediaGalleryPreview");
v18.validateProps = v6.strictInterface({
    layoutOrder = v6.optional(v6.integer),
    size = v6.optional(v6.UDim2),
    anchorPoint = v6.optional(v6.Vector2),
    position = v6.optional(v6.UDim2),
    items = v6.array(v6.strictInterface({
        imageId = v6.string,
        isVideo = v6.optional(v6.boolean)
    })),
    numberOfThumbnails = v6.optional(v6.integer),
    onPreviewActivated = v6.optional(v6.callback),
    onVideoPlayActivated = v6.optional(v6.callback)
});
v18.defaultProps = {
    size = UDim2.fromScale(1, 1),
    numberOfThumbnails = 5
};
v18.getDerivedStateFromProps = function(v19, v20)
    if v20.items == v19.items and v20.numberOfThumbnails == v19.numberOfThumbnails then
        return ;
    else
        local v21, v22, v23 = v15(v19);
        return {
            items = v19.items,
            numberOfThumbnails = v19.numberOfThumbnails,
            itemsToShow = v21,
            videoItemsSize = v22,
            imageItemsSize = v23,
            animationOn = v23 > 1,
            animatedIndex = v22 + 1,
            selectedIndex = v22 + 1
        };
    end;
end;
v18.init = function(v24)
    v24.state = {
        items = nil,
        numberOfThumbnails = 1,
        itemsToShow = nil,
        videoItemsSize = 0,
        imageItemsSize = 0,
        animationOn = false,
        animatedIndex = 1,
        selectedIndex = 1,
        showArrows = false,
        focusIndex = 1
    };
    v24.animationTime = 0;
    v24.scrolling = false;
    v24.scrollMotor = v8.createSingleMotor(0);
    local v25, v26 = v5.createBinding(UDim2.fromScale(1, 1));
    v24.contentSize = v25;
    v24.updateContentSize = v26;
    v25, v26 = v5.createBinding(UDim2.fromScale(1, 0.5));
    v24.previewSize = v25;
    v24.updatePreviewSize = v26;
    v25, v26 = v5.createBinding(UDim2.fromScale(1, 0.5));
    v24.paginationSize = v25;
    v24.updatePaginationSize = v26;
    v25, v26 = v5.createBinding(UDim2.fromScale(0, 0));
    v24.thumbnailSize = v25;
    v24.updateThumbnailSize = v26;
    v25, v26 = v5.createBinding(Vector2.new(0, 0));
    v24.canvasPosition = v25;
    v24.updateCanvasPosition = v26;
    v25, v26 = v5.createBinding(0);
    v24.progress = v25;
    v24.updateProgress = v26;
    v25, v26 = v5.createBinding(0);
    v24.previewTransparency = v25;
    v24.updatePreviewTransparency = v26;
    v24.onResize = function(v27)
        v24:updateSizes(v27);
        v24.updateCanvasPosition(Vector2.new(v24:getCanvasPositionX(), 0));
    end;
    v24.onMouseLeave = function(_, v29)
        if v29.UserInputType ~= Enum.UserInputType.MouseMovement then
            return ;
        else
            v24.resetAnimation();
            v24:setState(function(v30)
                local l_selectedIndex_0 = v30.selectedIndex;
                return {
                    animationOn = v30.imageItemsSize > 1,
                    animatedIndex = l_selectedIndex_0,
                    focusIndex = v24.getNextFocusIndex(l_selectedIndex_0)
                };
            end);
            return ;
        end;
    end;
    v24.onPreviewActivated = function()
        v24.resetAnimation();
        v24:setState({
            animationOn = false
        });
        if v24.props.onPreviewActivated then
            v24.props.onPreviewActivated(v24.state.itemsToShow[v24.state.selectedIndex].originalIndex);
        end;
    end;
    v24.onMouseEnterPagination = function(_, v33)
        if v33.UserInputType ~= Enum.UserInputType.MouseMovement then
            return ;
        else
            v24:setState(function(v34)
                if not v34.showArrows then
                    return {
                        showArrows = true
                    };
                else
                    return ;
                end;
            end);
            return ;
        end;
    end;
    v24.onMouseLeavePagination = function(_, v36)
        if v36.UserInputType ~= Enum.UserInputType.MouseMovement then
            return ;
        else
            v24:setState(function(v37)
                if v37.showArrows then
                    return {
                        showArrows = false
                    };
                else
                    return ;
                end;
            end);
            return ;
        end;
    end;
    v24.onCycleLeftActivated = function()
        if not v24.scrolling then
            local v38 = math.max(v24.state.focusIndex - 1, 1);
            v24.resetAnimation();
            v24:setState({
                animationOn = false,
                focusIndex = v38
            });
            return ;
        else
            return ;
        end;
    end;
    v24.onCycleRightActivated = function()
        if not v24.scrolling then
            local v39 = math.min(v24.state.focusIndex + 1, #v24.props.items);
            v24.resetAnimation();
            v24:setState({
                animationOn = false,
                focusIndex = v39
            });
            return ;
        else
            return ;
        end;
    end;
    v24.onItemActivated = function(v40)
        local l_isVideo_0 = v24.state.itemsToShow[v40].isVideo;
        v24.resetAnimation();
        v24:setState({
            animationOn = false,
            selectedIndex = not l_isVideo_0 and v40 or nil
        });
        if l_isVideo_0 then
            v24.onVideoPlayActivated(v40);
        end;
    end;
    v24.onItemPlayActivated = function(v42)
        v24.resetAnimation();
        v24:setState({
            animationOn = false
        });
        v24.onVideoPlayActivated(v42);
    end;
    v24.onVideoPlayActivated = function(v43)
        if v24.props.onVideoPlayActivated then
            v24.props.onVideoPlayActivated(v24.state.itemsToShow[v43].originalIndex);
        end;
    end;
    v24.getNextFocusIndex = function(v44)
        local l_focusIndex_0 = v24.state.focusIndex;
        local l_numberOfThumbnails_0 = v24.props.numberOfThumbnails;
        if v44 < l_focusIndex_0 then
            return v44;
        elseif l_focusIndex_0 + l_numberOfThumbnails_0 <= v44 then
            return (v44 - l_numberOfThumbnails_0) + 1;
        else
            return l_focusIndex_0;
        end;
    end;
    v24.resetAnimation = function()
        v24.animationTime = 0;
        v24.updateProgress(0);
        v24.updatePreviewTransparency(0);
    end;
    v24.renderSteppedCallback = function(v47)
        v24.animationTime = v24.animationTime + v47;
        local v48 = v24.animationTime - 4.5;
        if v24.animationTime > 5 then
            v24.animationTime = 0;
            v24.updateProgress(0);
            local l_animatedIndex_0 = v24.state.animatedIndex;
            local l_videoItemsSize_0 = v24.state.videoItemsSize;
            local v51 = ((l_animatedIndex_0 - l_videoItemsSize_0) % v24.state.imageItemsSize + 1) + l_videoItemsSize_0;
            v24:setState({
                animatedIndex = v51,
                selectedIndex = v51,
                focusIndex = v24.getNextFocusIndex(v51)
            });
            return ;
        else
            v24.updateProgress(v24.animationTime / 5);
            if v48 > 0 then
                v24.updatePreviewTransparency(v48 / 0.5);
            end;
            return ;
        end;
    end;
    v24.scrollMotorOnStep = function(v52)
        v24.updateCanvasPosition(Vector2.new(v52, 0));
    end;
    v24.scrollMotorOnComplete = function()
        v24.scrolling = false;
    end;
    v24.scrollMotor:onStep(v24.scrollMotorOnStep);
    v24.scrollMotor:onComplete(v24.scrollMotorOnComplete);
end;
v18.render = function(v53)
    local l_layoutOrder_0 = v53.props.layoutOrder;
    local l_anchorPoint_0 = v53.props.anchorPoint;
    local l_position_0 = v53.props.position;
    local l_size_0 = v53.props.size;
    local l_numberOfThumbnails_1 = v53.props.numberOfThumbnails;
    local v59 = #v53.props.items;
    local l_itemsToShow_0 = v53.state.itemsToShow;
    local l_showArrows_0 = v53.state.showArrows;
    local l_focusIndex_1 = v53.state.focusIndex;
    local l_selectedIndex_1 = v53.state.selectedIndex;
    local l_animationOn_0 = v53.state.animationOn;
    local l_videoItemsSize_1 = v53.state.videoItemsSize;
    local l_imageItemsSize_0 = v53.state.imageItemsSize;
    local v67 = false;
    if v59 > 1 then
        v67 = not l_animationOn_0;
    end;
    local v68 = not not l_animationOn_0 and ((l_selectedIndex_1 - l_videoItemsSize_1) % l_imageItemsSize_0 + 1) + l_videoItemsSize_1 or nil;
    local v69 = l_numberOfThumbnails_1 < v59;
    local v70 = l_focusIndex_1 <= 1;
    local v71 = #l_itemsToShow_0 < l_focusIndex_1 + l_numberOfThumbnails_1;
    return v7(function(v72)
        return v5.createElement("Frame", {
            LayoutOrder = l_layoutOrder_0,
            Size = l_size_0,
            AnchorPoint = l_anchorPoint_0,
            Position = l_position_0,
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            [v5.Change.AbsoluteSize] = v53.onResize,
            [v5.Event.InputEnded] = not not v67 and v53.onMouseLeave or nil
        }, {
            Content = v5.createElement("Frame", {
                Size = v53.contentSize,
                BorderSizePixel = 0,
                BackgroundTransparency = 1
            }, {
                ListLayout = v5.createElement("UIListLayout", {
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    Padding = UDim.new(0, 24)
                }),
                Preview = v5.createElement("Frame", {
                    LayoutOrder = 1,
                    Size = v53.previewSize,
                    BackgroundTransparency = 1
                }, {
                    AnimationLabel = not not l_animationOn_0 and v5.createElement("ImageLabel", {
                        Size = UDim2.fromScale(1, 1),
                        Image = v68 and l_itemsToShow_0[v68].imageId,
                        BackgroundTransparency = 1,
                        ZIndex = -1
                    }, {
                        Corner = v5.createElement("UICorner", {
                            CornerRadius = UDim.new(0, 8)
                        })
                    }) or nil,
                    Button = v5.createElement("ImageButton", {
                        Size = UDim2.fromScale(1, 1),
                        Image = l_itemsToShow_0[l_selectedIndex_1].imageId,
                        ImageTransparency = v53.previewTransparency,
                        BackgroundTransparency = 1,
                        AutoButtonColor = false,
                        ZIndex = 1,
                        [v5.Event.Activated] = v53.onPreviewActivated
                    }, {
                        Corner = v5.createElement("UICorner", {
                            CornerRadius = UDim.new(0, 8)
                        })
                    })
                }),
                Pagination = v5.createElement("Frame", {
                    LayoutOrder = 2,
                    Size = v53.paginationSize,
                    BorderSizePixel = 0,
                    BackgroundTransparency = 1,
                    [v5.Event.InputBegan] = not not v69 and v53.onMouseEnterPagination or nil,
                    [v5.Event.InputEnded] = not not v69 and v53.onMouseLeavePagination or nil
                }, {
                    LeftArrow = not not l_showArrows_0 and v5.createElement(v13, {
                        size = UDim2.new(0, v16, 1, 0),
                        anchorPoint = Vector2.new(0, 0.5),
                        position = UDim2.fromScale(0, 0.5),
                        icon = v12["icons/actions/cycleLeft"],
                        isDisabled = v70,
                        onActivated = v53.onCycleLeftActivated
                    }) or nil,
                    Scroller = v53:renderScroller(v72),
                    RightArrow = not not l_showArrows_0 and v5.createElement(v13, {
                        size = UDim2.new(0, v16, 1, 0),
                        anchorPoint = Vector2.new(1, 0.5),
                        position = UDim2.fromScale(1, 0.5),
                        icon = v12["icons/actions/cycleRight"],
                        isDisabled = v71,
                        onActivated = v53.onCycleRightActivated
                    }) or nil
                })
            }),
            EventConnection = not not l_animationOn_0 and v5.createElement(l_EventConnection_0, {
                event = l_RunService_0.RenderStepped,
                callback = v53.renderSteppedCallback
            }) or nil
        });
    end);
end;
v18.renderScroller = function(v73, v74)
    return v5.createElement("ScrollingFrame", {
        Size = UDim2.new(1, -v16 * 2, 1, 0),
        AnchorPoint = Vector2.new(0.5, 0.5),
        Position = UDim2.fromScale(0.5, 0.5),
        BackgroundTransparency = 1,
        ScrollBarThickness = 0,
        ClipsDescendants = true,
        ScrollingDirection = Enum.ScrollingDirection.X,
        AutomaticCanvasSize = Enum.AutomaticSize.XY,
        CanvasPosition = v73.canvasPosition
    }, v73:renderThumbnails(v74));
end;
v18.renderThumbnails = function(v75, v76)
    local l_selectedIndex_2 = v75.state.selectedIndex;
    local l_animationOn_1 = v75.state.animationOn;
    local l_animatedIndex_1 = v75.state.animatedIndex;
    local v80 = {
        ListLayout = v5.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 12)
        })
    };
    for v81, v82 in ipairs(v75.state.itemsToShow) do
        v80["item" .. v81] = v5.createElement("Frame", {
            LayoutOrder = v81,
            Size = v75.thumbnailSize,
            BorderSizePixel = 0,
            BackgroundTransparency = 1
        }, {
            Thumbnail = v5.createElement(v14, {
                itemKey = v81,
                imageId = v82.imageId,
                isVideo = v82.isVideo,
                isSelected = v81 == l_selectedIndex_2,
                onActivated = not not (v82.imageId and v82.imageId ~= "") and v75.onItemActivated or nil,
                onPlayActivated = not not v82.isVideo and v75.onItemPlayActivated or nil,
                useScaledPlayButton = true
            }),
            TimerBar = not not (l_animationOn_1 and v81 == l_animatedIndex_1) and v75:renderTimerBar(v76) or nil
        });
    end;
    return v80;
end;
v18.renderTimerBar = function(v83, v84)
    local l_UIDefault_0 = v84.Theme.UIDefault;
    local l_SecondaryContent_0 = v84.Theme.SecondaryContent;
    return v5.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, 2),
        AnchorPoint = Vector2.new(0, 1),
        Position = UDim2.fromScale(0, 1),
        BorderSizePixel = 0,
        BackgroundTransparency = 1,
        ClipsDescendants = true,
        ZIndex = 100
    }, {
        Background = v5.createElement("Frame", {
            Size = v83.thumbnailSize,
            AnchorPoint = Vector2.new(0, 1),
            Position = UDim2.fromScale(0, 1),
            BorderSizePixel = 0,
            BackgroundColor3 = l_UIDefault_0.Color,
            BackgroundTransparency = l_UIDefault_0.Transparency
        }, {
            Corner = v5.createElement("UICorner", {
                CornerRadius = UDim.new(0, 8)
            }),
            Progress = v5.createElement("Frame", {
                Size = v83.progress:map(function(v87)
                    return UDim2.fromScale(v87, 1);
                end),
                BorderSizePixel = 0,
                BackgroundTransparency = 1,
                ClipsDescendants = true
            }, {
                Foreground = v5.createElement("Frame", {
                    Size = v83.thumbnailSize,
                    BorderSizePixel = 0,
                    BackgroundColor3 = l_SecondaryContent_0.Color,
                    BackgroundTransparency = l_SecondaryContent_0.Transparency
                }, {
                    Corner = v5.createElement("UICorner", {
                        CornerRadius = UDim.new(0, 8)
                    })
                })
            })
        })
    });
end;
v18.didUpdate = function(v88, _, v90)
    if v88.state.focusIndex ~= v90.focusIndex then
        v88:scrollToNewIndex();
    end;
    if v88.state.selectedIndex ~= v90.selectedIndex then
        v88.updatePreviewTransparency(0);
    end;
end;
v18.calcSizesFromWidth = function(_, v92, v93)
    local v94 = v92 - v16 * 2;
    local v95 = math.floor(v94 / 1.7777777777777777);
    local v96 = math.floor(((v92 - 12 * (v93 - 1)) - v16 * 2) / v93);
    local v97 = math.floor(v96 / 1.7777777777777777);
    return {
        contentSize = UDim2.fromOffset(v92, (v95 + v97) + 24),
        previewSize = UDim2.fromOffset(v94, v95),
        paginationSize = UDim2.fromOffset(v92, v97),
        thumbnailSize = UDim2.fromOffset(v96, v97)
    };
end;
v18.calcSizesFromHeight = function(v98, v99, v100)
    return v98:calcSizesFromWidth(math.floor((((math.floor(((v99 - 24) * 1.7777777777777777) * v100) + 12 * (v100 - 1)) + v16 * 2) + (v16 * 2) * v100) / (v100 + 1)), v100);
end;
v18.updateSizes = function(v101, v102)
    local l_X_0 = v102.AbsoluteSize.X;
    local l_Y_0 = v102.AbsoluteSize.Y;
    local l_numberOfThumbnails_2 = v101.props.numberOfThumbnails;
    local v106 = v101:calcSizesFromWidth(l_X_0, l_numberOfThumbnails_2);
    if l_Y_0 < v106.contentSize.Y.Offset then
        v106 = v101:calcSizesFromHeight(l_Y_0, l_numberOfThumbnails_2);
    end;
    v101.updateContentSize(v106.contentSize);
    v101.updatePreviewSize(v106.previewSize);
    v101.updatePaginationSize(v106.paginationSize);
    v101.updateThumbnailSize(v106.thumbnailSize);
end;
v18.getCanvasPositionX = function(v107)
    return (v107.state.focusIndex - 1) * (v107.thumbnailSize:getValue().X.Offset + 12);
end;
v18.scrollToNewIndex = function(v108)
    local l_X_1 = v108.canvasPosition:getValue().X;
    local v110 = v108:getCanvasPositionX();
    v108.scrollMotor:setGoal(v8.instant(l_X_1));
    v108.scrollMotor:setGoal(v8.spring(v110, v17));
    v108.scrolling = true;
end;
return v18;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UIBlox");
local v1 = require(l_script_FirstAncestor_0.UIBloxConfig);
local v2 = require(l_script_FirstAncestor_0.Parent.Cryo);
local v3 = require(l_script_FirstAncestor_0.Parent.Otter);
local v4 = require(l_script_FirstAncestor_0.Parent.React);
local v5 = {
    itemAspectRatio = 1.7777777777777777,
    itemPadding = 16,
    dragIntent = 20,
    borderRadius = UDim.new(0, 8),
    spring = v3.spring
};
return function(v6)
    local v7 = v2.Dictionary.join(v5, v6);
    local v8, v9 = v4.useState(Vector2.new(0, 0));
    local v10, v11 = v4.useState(Vector2.new(0, 0));
    local v12 = v4.useRef(nil);
    local v13 = v4.useRef(nil);
    local v14 = v4.useRef(0);
    local v15 = v4.useRef(false);
    local v16 = v4.useRef(1);
    local v17 = nil;
    if not v1.updateMediaGallerySingle then
        v17 = 1 + math.round(v10.X / (v8.X + v7.itemPadding));
    end;
    local v19 = v4.useCallback(function(v18)
        if v18 == "Right" then
            return v17 + 1;
        else
            return v17 - 1;
        end;
    end);
    local v21 = v4.useCallback(function(v20)
        return Vector2.new((v8.X + v7.itemPadding) * (v20 - 1), 0);
    end);
    local v26 = v4.useCallback(function(v22)
        v15.current = true;
        local v23 = v3.createSingleMotor(0);
        local v24 = v21(v22);
        v23:onStep(function(v25)
            v11(v10:Lerp(v24, v25));
        end);
        v23:onComplete(function()
            v15.current = false;
        end);
        v23:setGoal(v7.spring(1, {
            frequency = 3,
            dampingRatio = 1,
            restingVelocityLimit = 0.05
        }));
    end);
    local v32 = v4.useCallback(function(v27)
        local v28 = nil;
        v28 = if v27 == "Right" then v16.current + 1 else v16.current - 1;
        if (v28 >= 1 and v28 <= #v7.items) and v7.dragIntent <= math.abs(v14.current) then
            v16.current = v28;
        end;
        local v29 = Vector2.new((v8.X + v7.itemPadding) * (v16.current - 1), 0);
        v15.current = true;
        local v30 = v3.createSingleMotor(0);
        v30:onStep(function(v31)
            v11(v10:Lerp(v29, v31));
        end);
        v30:onComplete(function()
            v15.current = false;
        end);
        v30:setGoal(v7.spring(1, {
            frequency = 3,
            dampingRatio = 1,
            restingVelocityLimit = 0.05
        }));
    end);
    local v35 = v4.useCallback(function(_, v34)
        if not v15.current then
            if not (v34.UserInputType ~= Enum.UserInputType.MouseButton1) or v34.UserInputType == Enum.UserInputType.Touch then
                v12.current = v34;
            end;
            return ;
        else
            return ;
        end;
    end);
    local v41 = v4.useCallback(function(_, v37)
        if not (not v12.current or v15.current) and (not (v37.UserInputType ~= Enum.UserInputType.MouseMovement) or v37.UserInputType == Enum.UserInputType.Touch) then
            if not v13.current then
                v13.current = v37.Position;
            end;
            local v38 = v13.current - v37.Position;
            if v38 ~= Vector3.zero then
                local l_v14_0 = v14;
                l_v14_0.current = l_v14_0.current + v38.x;
                v11(function(v40)
                    return Vector2.new(math.clamp(v40.X + v38.X, 0, math.huge), 0);
                end);
            end;
            v13.current = v37.Position;
        end;
    end);
    local v46 = v4.useCallback(function(_, v43)
        if v43 == v12.current then
            v12.current = nil;
            v13.current = nil;
            local v44 = v14.current > 1 and "Right" or "Left";
            if not v1.updateMediaGallerySingle then
                local v45 = v19(v44);
                if v45 >= 1 and v45 <= #v7.items then
                    if v7.dragIntent <= math.abs(v14.current) then
                        v26(v45);
                    else
                        v26(v17);
                    end;
                end;
            else
                v32(v44);
            end;
            v14.current = 0;
        end;
    end);
    local v47, v48 = v4.useState(math.huge);
    local v50 = v4.useCallback(function(v49)
        v9(v49.AbsoluteSize);
        v48(v49.AbsoluteSize.X / v7.itemAspectRatio);
    end, {
        v7.itemAspectRatio
    });
    local v51 = {};
    for v52, v53 in v7.items, nil, nil do
        v51["Item" .. v52] = v4.createElement("ImageLabel", {
            LayoutOrder = v52,
            Size = UDim2.new(1, 0, 0, v47),
            Image = v53.imageId,
            ScaleType = Enum.ScaleType.Crop
        }, {
            Corner = v4.createElement("UICorner", {
                CornerRadius = v7.borderRadius
            })
        });
    end;
    return v4.createElement("ScrollingFrame", {
        BackgroundTransparency = 1,
        Size = UDim2.fromScale(1, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        AutomaticCanvasSize = Enum.AutomaticSize.XY,
        CanvasPosition = v10,
        ScrollingEnabled = false,
        ScrollBarImageTransparency = 1,
        ScrollingDirection = Enum.ScrollingDirection.X,
        ClipsDescendants = false,
        [v4.Change.AbsoluteSize] = v50,
        [v4.Event.InputBegan] = v35,
        [v4.Event.InputChanged] = v41,
        [v4.Event.InputEnded] = v46
    }, {
        Layout = v4.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            Padding = UDim.new(0, v7.itemPadding)
        }),
        Items = v4.createElement(v4.Fragment, {}, v51)
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local l_Core_0 = l_Parent_1.Core;
local v4 = require(l_Parent_2.Roact);
local v5 = require(l_Parent_2.t);
local v6 = require(l_Core_0.Control.Enum.ControlState);
local v7 = require(l_Parent_1.Core.Style.withStyle);
local v8 = require(l_Parent_1.Core.ImageSet.ImageSetComponent);
local v9 = require(l_Core_0.Control.Interactable);
local v10 = require(l_Core_0.Button.HoverButtonBackground);
local v11 = require(l_Parent_0.ImageSet.getIconSize);
local v12 = require(l_Parent_0.ImageSet.Enum.IconSize);
local v13 = require(l_Parent_0.ImageSet.Images);
local v14 = require(l_Parent_0.Button.Button);
local v15 = require(l_Parent_0.Button.Enum.ButtonType);
local v16 = require(l_Parent_0.Loading.LoadableImage);
local v17 = v11(v12.Large);
local v18 = UDim2.fromScale(0.4, 0.512);
local v19 = UDim2.fromOffset(64, 48);
local v20 = UDim2.fromScale(0.25, 0.33);
local v21 = v4.Component:extend("ThumbnailButton");
v21.validateProps = v5.strictInterface({
    layoutOrder = v5.optional(v5.number),
    size = v5.optional(v5.UDim2),
    anchorPoint = v5.optional(v5.Vector2),
    position = v5.optional(v5.UDim2),
    itemKey = v5.any,
    imageId = v5.optional(v5.string),
    isVideo = v5.optional(v5.boolean),
    useScaledPlayButton = v5.optional(v5.boolean),
    isSelected = v5.optional(v5.boolean),
    userInteractionEnabled = v5.optional(v5.boolean),
    onActivated = v5.optional(v5.callback),
    onPlayActivated = v5.optional(v5.callback)
});
v21.defaultProps = {
    size = UDim2.fromScale(1, 1),
    imageId = "",
    isVideo = false,
    isSelected = false,
    userInteractionEnabled = true
};
v21.init = function(v22)
    v22:setState({
        controlState = v6.Initialize
    });
    v22.onStateChanged = function(_, v24)
        v22:setState({
            controlState = v24
        });
    end;
    v22.onActivated = function()
        if v22.props.onActivated then
            v22.props.onActivated(v22.props.itemKey);
        end;
    end;
    v22.onPlayActivated = function()
        if v22.props.onPlayActivated then
            v22.props.onPlayActivated(v22.props.itemKey);
        end;
    end;
end;
v21.renderButton = function(v25)
    local l_useScaledPlayButton_0 = v25.props.useScaledPlayButton;
    local v27 = nil;
    v27 = if not l_useScaledPlayButton_0 then v19 else v18;
    return v7(function(v28)
        local l_layoutOrder_0 = v25.props.layoutOrder;
        local l_anchorPoint_0 = v25.props.anchorPoint;
        local l_position_0 = v25.props.position;
        local l_size_0 = v25.props.size;
        local l_isSelected_0 = v25.props.isSelected;
        local l_imageId_0 = v25.props.imageId;
        local l_isVideo_0 = v25.props.isVideo;
        local l_userInteractionEnabled_0 = v25.props.userInteractionEnabled;
        local v37 = v25.state.controlState == v6.Hover;
        local v38 = not not l_isSelected_0 and v28.Theme.BackgroundDefault or v28.Theme.BackgroundUIDefault;
        return v4.createElement(v9, {
            LayoutOrder = l_layoutOrder_0,
            Size = l_size_0,
            AnchorPoint = l_anchorPoint_0,
            Position = l_position_0,
            AutoButtonColor = false,
            BackgroundColor3 = v38.Color,
            BackgroundTransparency = v38.Transparency,
            onStateChanged = v25.onStateChanged,
            userInteractionEnabled = l_userInteractionEnabled_0,
            [v4.Event.Activated] = v25.onActivated
        }, {
            Corner = v4.createElement("UICorner", {
                CornerRadius = UDim.new(0, 8)
            }),
            Tile = v4.createElement(v16, {
                Size = UDim2.fromScale(1, 1),
                cornerRadius = UDim.new(0, 8),
                Image = l_imageId_0,
                useShimmerAnimationWhileLoading = true,
                ZIndex = -1
            }),
            PlayButton = if not l_isVideo_0 then nil else v4.createElement(v14, {
                buttonType = v15.PrimaryContextual,
                size = v27,
                anchorPoint = Vector2.new(0.5, 0.5),
                position = UDim2.fromScale(0.5, 0.5),
                icon = if not l_useScaledPlayButton_0 then v13["icons/common/play"] else nil,
                onActivated = v25.onPlayActivated
            }),
            PlayIcon = if not not l_isVideo_0 and l_useScaledPlayButton_0 then v4.createElement(v8.Label, {
                Size = v20,
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.fromScale(0.5, 0.5),
                Image = v13["icons/common/play"],
                BackgroundTransparency = 1,
                ZIndex = 2
            }) else nil,
            HoverBackground = not not v37 and v4.createElement(v10) or nil
        });
    end);
end;
v21.renderEmptyState = function(v39)
    return v7(function(v40)
        return v4.createElement("Frame", {
            LayoutOrder = v39.props.layoutOrder,
            Size = v39.props.size,
            AnchorPoint = v39.props.anchorPoint,
            Position = v39.props.position,
            BackgroundColor3 = v40.Theme.BackgroundUIDefault.Color,
            BackgroundTransparency = v40.Theme.BackgroundUIDefault.Transparency
        }, {
            Corner = v4.createElement("UICorner", {
                CornerRadius = UDim.new(0, 8)
            }),
            Icon = v4.createElement(v8.Label, {
                Size = UDim2.fromOffset(v17, v17),
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.fromScale(0.5, 0.5),
                Image = v13["icons/imageUnavailable"],
                ImageColor3 = v40.Theme.UIDefault.Color,
                ImageTransparency = v40.Theme.UIDefault.Transparency,
                BackgroundTransparency = 1
            })
        });
    end);
end;
v21.render = function(v41)
    if v41.props.imageId == "" then
        return v41:renderEmptyState();
    else
        return v41:renderButton();
    end;
end;
return v21;


local v0 = require(script.Parent.Parent.Parent.Parent.Parent.Cryo);
return function(v1)
    local v2 = {};
    local v3 = {};
    for v4, v5 in ipairs(v1.items) do
        if not v5.isVideo then
            table.insert(v3, v0.Dictionary.join(v5, {
                originalIndex = v4
            }));
        else
            table.insert(v2, v0.Dictionary.join(v5, {
                originalIndex = v4
            }));
        end;
    end;
    local v6 = v0.List.join(v2, v3);
    local l_numberOfThumbnails_0 = v1.numberOfThumbnails;
    if l_numberOfThumbnails_0 then
        for v8 = #v6 + 1, l_numberOfThumbnails_0 do
            v6[v8] = {};
        end;
    end;
    return v6, #v2, #v3;
end;


local l_UserInputService_0 = game:GetService("UserInputService");
local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v3 = require(l_Parent_1.Parent.React);
local _ = require(l_Parent_0.Style.StyleTypes);
local v5 = require(l_Parent_1.Core.ImageSet.ImageSetComponent);
local _ = require(l_Parent_0.ImageSet.ImagesTypes);
return function(v7)
    local l_userInteractionEnabled_0 = v7.userInteractionEnabled;
    local l_width_0 = v7.width;
    local l_anchorPoint_0 = v7.anchorPoint;
    local l_position_0 = v7.position;
    local l_zIndex_0 = v7.zIndex;
    local l_transparency_0 = v7.transparency;
    local l_backgroundColor_0 = v7.backgroundColor;
    local l_paddingStartEnd_0 = v7.paddingStartEnd;
    local l_handleWidth_0 = v7.handleWidth;
    local l_handleColor_0 = v7.handleColor;
    local l_handleCornerRadius_0 = v7.handleCornerRadius;
    local l_handleIcon_0 = v7.handleIcon;
    local l_handleIconSize_0 = v7.handleIconSize;
    local l_handleIconColor_0 = v7.handleIconColor;
    local l_onDragging_0 = v7.onDragging;
    local l_viewSize_0 = v7.viewSize;
    local l_canvasSize_0 = v7.canvasSize;
    local l_canvasPosition_0 = v7.canvasPosition;
    local v26, v27 = v3.useState(false);
    local v28, v29 = v3.useBinding(0);
    local v30, v31 = v3.useState(false);
    local v32 = v3.useRef(0);
    local v33 = v3.useRef(0);
    local v35 = v3.useCallback(function(v34)
        v29(v34.AbsoluteSize.Y);
    end, {
        v29
    });
    local v38 = v3.useCallback(function(v36)
        local l_Parent_2 = v36.Parent;
        if l_Parent_2 ~= nil and math.ceil(v36.AbsoluteSize.Y) < l_Parent_2.AbsoluteSize.Y then
            v27(true);
            return ;
        else
            v27(false);
            return ;
        end;
    end, {
        v27
    });
    local v40 = v3.useMemo(function()
        return v3.joinBindings({
            viewSize = l_viewSize_0,
            canvasSize = l_canvasSize_0
        }):map(function(v39)
            return UDim2.new(0, l_handleWidth_0, math.clamp(v39.viewSize.Y / v39.canvasSize.Y, 0, 1), 0);
        end);
    end, {
        l_handleWidth_0,
        l_viewSize_0,
        l_canvasSize_0
    });
    local v42 = v3.useMemo(function()
        return v3.joinBindings({
            canvasPosition = l_canvasPosition_0,
            canvasSize = l_canvasSize_0
        }):map(function(v41)
            return UDim2.fromScale(0.5, v41.canvasPosition.Y / v41.canvasSize.Y);
        end);
    end, {
        l_canvasSize_0,
        l_canvasPosition_0
    });
    local v45 = v3.useCallback(function(_, v44)
        if not (not v26 or not l_userInteractionEnabled_0) and not v30 then
            if v44 and v44.UserInputType == Enum.UserInputType.MouseButton1 then
                v32.current = v44.Position.Y;
                v33.current = l_canvasPosition_0:getValue().Y;
                v31(true);
            end;
            return ;
        else
            return ;
        end;
    end, {
        v26,
        l_userInteractionEnabled_0,
        v30,
        v32,
        v33,
        l_canvasPosition_0,
        v31
    });
    local v51 = v3.useCallback(function(v46)
        if l_userInteractionEnabled_0 and v30 then
            if v46.UserInputType ~= Enum.UserInputType.MouseMovement then
                return ;
            else
                local v47 = (v46.Position.Y - v32.current) / (v28:getValue() - l_paddingStartEnd_0);
                local l_Y_0 = l_viewSize_0:getValue().Y;
                local l_current_0 = v33.current;
                local l_Y_1 = l_canvasSize_0:getValue().Y;
                l_onDragging_0((math.clamp(l_current_0 + v47 * l_Y_1, 0, l_Y_1 - l_Y_0)));
                return ;
            end;
        else
            return ;
        end;
    end, {
        l_userInteractionEnabled_0,
        v30,
        v32,
        v28,
        l_paddingStartEnd_0,
        l_viewSize_0,
        v33,
        l_canvasSize_0,
        l_onDragging_0
    });
    local v53 = v3.useCallback(function(v52)
        if l_userInteractionEnabled_0 and v30 then
            if v52 and v52.UserInputType ~= Enum.UserInputType.MouseButton1 then
                return ;
            else
                v31(false);
                return ;
            end;
        else
            return ;
        end;
    end, {
        l_userInteractionEnabled_0,
        v30,
        v31
    });
    v3.useEffect(function()
        if v26 and v30 then
            local v54 = l_UserInputService_0.InputChanged:Connect(v51);
            local v55 = l_UserInputService_0.InputEnded:Connect(v53);
            local v56 = l_UserInputService_0.WindowFocusReleased:Connect(v53);
            return function()
                v54:Disconnect();
                v55:Disconnect();
                v56:Disconnect();
            end;
        else
            return function()
            end;
        end;
    end, {
        v26,
        v30,
        v51,
        v53
    });
    local l_l_transparency_0_0 = l_transparency_0;
    if v26 then
        if v30 then
            l_l_transparency_0_0 = 0;
        end;
    else
        l_l_transparency_0_0 = 1;
    end;
    return v3.createElement("CanvasGroup", {
        Selectable = false,
        Size = UDim2.new(0, l_width_0, 1, 0),
        AnchorPoint = l_anchorPoint_0,
        Position = l_position_0,
        GroupTransparency = l_l_transparency_0_0,
        BackgroundColor3 = if not l_backgroundColor_0 then nil else l_backgroundColor_0.Color,
        BackgroundTransparency = not l_backgroundColor_0 and 1 or l_backgroundColor_0.Transparency,
        BorderSizePixel = 0,
        ZIndex = l_zIndex_0
    }, {
        Padding = if not l_paddingStartEnd_0 then nil else v3.createElement("UIPadding", {
            PaddingTop = UDim.new(0, l_paddingStartEnd_0),
            PaddingBottom = UDim.new(0, l_paddingStartEnd_0)
        }),
        Track = v3.createElement("Frame", {
            Selectable = false,
            Size = UDim2.fromScale(1, 1),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            ClipsDescendants = true,
            [v3.Change.AbsoluteSize] = v35
        }, {
            TrackUICorner = if not l_handleCornerRadius_0 then nil else v3.createElement("UICorner", {
                CornerRadius = UDim.new(0, l_handleCornerRadius_0)
            }),
            Handle = v3.createElement("Frame", {
                Active = v26 and l_userInteractionEnabled_0,
                Selectable = false,
                Size = v40,
                AnchorPoint = Vector2.new(0.5, 0),
                Position = v42,
                BackgroundColor3 = if not l_handleColor_0 then nil else l_handleColor_0.Color,
                BackgroundTransparency = not l_handleColor_0 and 0 or l_handleColor_0.Transparency,
                BorderSizePixel = 0,
                [v3.Change.AbsoluteSize] = v38,
                [v3.Event.InputBegan] = v45
            }, {
                HandleUICorner = if not l_handleCornerRadius_0 then nil else v3.createElement("UICorner", {
                    CornerRadius = UDim.new(0, l_handleCornerRadius_0)
                }),
                Icon = if not l_handleIcon_0 then nil else v3.createElement(v5.Label, {
                    Selectable = false,
                    Size = UDim2.fromOffset(l_handleIconSize_0, l_handleIconSize_0),
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    Position = UDim2.fromScale(0.5, 0.5),
                    Image = l_handleIcon_0,
                    ImageColor3 = if not l_handleIconColor_0 then nil else l_handleIconColor_0.Color,
                    ImageTransparency = if not l_handleIconColor_0 then nil else l_handleIconColor_0.Transparency,
                    BackgroundTransparency = 1
                })
            })
        })
    });
end;


local l_RunService_0 = game:GetService("RunService");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_Parent_0 = script.Parent;
local l_Parent_1 = script.Parent.Parent;
local l_Parent_2 = l_Parent_1.Parent;
local l_Parent_3 = l_Parent_2.Parent;
local v6 = require(l_Parent_3.Cryo);
local v7 = require(l_Parent_3.Otter);
local v8 = require(l_Parent_3.Roact);
local v9 = require(l_Parent_3.t);
local l_Focusable_0 = require(l_Parent_3.RoactGamepad).Focusable;
local v11 = require(l_Parent_3.UIBlox.Core.Style.withStyle);
local v12 = require(l_Parent_1.SelectionImage.CursorKind);
local v13 = require(l_Parent_1.SelectionImage.withSelectionCursorProvider);
local v14 = require(l_Parent_1.SelectionCursor.withCursor);
local v15 = require(l_Parent_1.SelectionCursor.CursorType);
local v16 = require(l_Parent_2.UIBloxConfig);
local v17 = require(l_Parent_3.UIBlox.App.ImageSet.Images);
local v18 = require(l_Parent_0.Enum.ScrollBarType);
local v19 = require(script.Parent.ScrollBar);
local v20 = {
    frequency = 3,
    dampingRatio = 1.5
};
local v21 = v8.Component:extend("VerticalScrollView");
v21.validateProps = v9.strictInterface({
    size = v9.optional(v9.UDim2),
    position = v9.optional(v9.UDim2),
    layoutOrder = v9.optional(v9.number),
    elasticBehavior = v9.optional(v9.EnumItem),
    canvasSizeY = v9.optional(v9.UDim),
    useAutomaticCanvasSize = v9.optional(v9.boolean),
    isGamepadFocusable = v9.optional(v9.boolean),
    scrollingEnabled = v9.optional(v9.boolean),
    selectable = v9.optional(v9.boolean),
    [v8.Change.CanvasPosition] = v9.optional(v9.callback),
    [v8.Change.CanvasSize] = v9.optional(v9.callback),
    scrollingFrameRef = v9.optional(v9.table),
    NextSelectionLeft = v9.optional(v9.table),
    NextSelectionRight = v9.optional(v9.table),
    NextSelectionUp = v9.optional(v9.table),
    NextSelectionDown = v9.optional(v9.table),
    [v8.Children] = v9.optional(v9.table),
    scrollBarType = v9.optional(v9.string)
});
v21.defaultProps = {
    size = UDim2.new(1, 0, 1, 0),
    canvasSizeY = UDim.new(2, 0),
    useAutomaticCanvasSize = false,
    isGamepadFocusable = false,
    selectable = nil,
    scrollingEnabled = true,
    scrollBarType = v18.Compact
};
v21.init = function(v22)
    v22.parentFrameRef = v8.createRef();
    v22.mainCanvasRef = v8.createRef();
    local v23, v24 = v8.createBinding(0);
    v22.scrollPosition = v23;
    v22.updateScroll = v24;
    v23, v24 = v8.createBinding(Vector2.new(0, 0));
    v22.mainCanvasSize = v23;
    v22.updateCanvasSize = v24;
    v22:setState({
        scrollingWithTouch = false
    });
    v23, v24 = v8.createBinding(1);
    v22.scrollBarImageTransparency = v23;
    v22.updateScrollBarImageTransparency = v24;
    v22.scrollBarImageTransparencyMotor = v7.createSingleMotor(0);
    v22.scrollBarImageTransparencyMotor:onStep(v22.updateScrollBarImageTransparency);
    v22.lastTimeCanvasPositionChanged = tick();
    v22.waitToHideSidebarConnection = nil;
    v22.waitToHideSidebar = function()
        if tick() - v22.lastTimeCanvasPositionChanged > 0.7 then
            v22.scrollBarImageTransparencyMotor:setGoal(v7.spring(1, v20));
            v22.disconnectWaitToHideSidebar();
        end;
    end;
    v22.disconnectWaitToHideSidebar = function()
        if v22.waitToHideSidebarConnection then
            v22.waitToHideSidebarConnection:Disconnect();
            v22.waitToHideSidebarConnection = nil;
        end;
    end;
    v22.inputBegan = function(_, v26)
        if v22.props.scrollingEnabled then
            if v26.UserInputType == Enum.UserInputType.MouseMovement then
                v22.disconnectWaitToHideSidebar();
                v22.scrollBarImageTransparencyMotor:setGoal(v7.instant(0));
            end;
            return ;
        else
            return ;
        end;
    end;
    v22.inputEnded = function(_, v28)
        if v22.props.scrollingEnabled then
            if v28.UserInputType == Enum.UserInputType.MouseMovement then
                v22.disconnectWaitToHideSidebar();
                v22.scrollBarImageTransparencyMotor:setGoal(v7.instant(1));
            end;
            return ;
        else
            return ;
        end;
    end;
    v22.canvasPosition = function(v29)
        v22.lastTimeCanvasPositionChanged = tick();
        if not v22.waitToHideSidebarConnection and l_UserInputService_0:GetLastInputType() == Enum.UserInputType.Touch then
            v22.scrollBarImageTransparencyMotor:setGoal(v7.instant(0));
            v22.waitToHideSidebarConnection = l_RunService_0.Heartbeat:Connect(v22.waitToHideSidebar);
        end;
        v22.updateScroll(v29.CanvasPosition.Y);
        if v22.props[v8.Change.CanvasPosition] then
            v22.props[v8.Change.CanvasPosition](v29);
        end;
    end;
    v22.onGamepadFocused = function()
        v22.scrollBarImageTransparencyMotor:setGoal(v7.instant(0));
    end;
    v22.onGamepadFocusLost = function()
        v22.scrollBarImageTransparencyMotor:setGoal(v7.instant(1));
    end;
    v22.getMainCanvasPosition = function()
        return v22.scrollPosition:map(function(v30)
            return Vector2.new(0, v30);
        end);
    end;
    v22.onMainCanvasSizeChange = function(v31)
        v22.updateCanvasSize(v31.AbsoluteCanvasSize);
    end;
    v22.getMainCanvasSize = function()
        return v22.mainCanvasSize:map(function(v32)
            return UDim2.new(0, 2, 0, v32.Y);
        end);
    end;
    v23, v24 = v8.createBinding(Vector2.new(0, 0));
    v22.viewSize = v23;
    v22.updateViewSize = v24;
    v23, v24 = v8.createBinding(Vector2.new(0, 0));
    v22.mainCanvasPosition = v23;
    v22.updateMainCanvasPosition = v24;
    v22.onScrollBarDragging = function(v33)
        v22.updateMainCanvasPosition(Vector2.new(0, v33));
    end;
    v22.onViewSizeChange = function(v34)
        v22.updateViewSize(v34.AbsoluteSize);
    end;
    v22.onSelectionChanged = function(v35, v36, _, v38)
        if not v36 and v38 == nil then
            v22.onGamepadFocusLost();
            return ;
        elseif not v36 and not v38:IsDescendantOf(v35) then
            v22.onGamepadFocusLost();
            return ;
        else
            v22.onGamepadFocused();
            return ;
        end;
    end;
end;
v21.getScrollBarStyleProps = function(_, v40, v41)
    local l_Tokens_0 = v40.Tokens;
    if v41 == v18.Wide then
        return {
            userInteractionEnabled = true,
            width = l_Tokens_0.Global.Size_200,
            handleWidth = l_Tokens_0.Global.Size_100,
            paddingStartEnd = l_Tokens_0.Global.Space_50,
            marginRight = 0
        };
    elseif v41 == v18.Gamepad then
        return {
            userInteractionEnabled = false,
            width = l_Tokens_0.Global.Space_200,
            handleWidth = l_Tokens_0.Global.Space_100,
            handleIcon = v17["icons/controls/keys/xboxRSVertical"],
            handleIconSize = l_Tokens_0.Semantic.Icon.Size.Medium,
            handleIconColor = {
                Color = l_Tokens_0.Semantic.Color.Icon.Emphasis.Color3,
                Transparency = l_Tokens_0.Semantic.Color.Icon.Emphasis.Transparency
            },
            paddingStartEnd = l_Tokens_0.Global.Space_300,
            marginRight = l_Tokens_0.Global.Space_300
        };
    else
        return {
            userInteractionEnabled = false,
            width = l_Tokens_0.Global.Space_150,
            handleWidth = l_Tokens_0.Global.Size_25,
            paddingStartEnd = l_Tokens_0.Global.Space_50,
            marginRight = 0
        };
    end;
end;
v21.renderScrollBar = function(v43, v44)
    local l_Tokens_1 = v44.Tokens;
    local v46 = v43:getScrollBarStyleProps(v44, v43.props.scrollBarType);
    return v8.createElement(v19, {
        userInteractionEnabled = v46.userInteractionEnabled,
        width = v46.width,
        anchorPoint = Vector2.new(1, 0),
        position = UDim2.new(1, -v46.marginRight, 0, 0),
        zIndex = 2,
        transparency = v43.scrollBarImageTransparency,
        backgroundColor = v46.backgroundColor,
        paddingStartEnd = v46.paddingStartEnd,
        handleWidth = v46.handleWidth,
        handleColor = {
            Color = l_Tokens_1.Semantic.Color.Ui.Emphasis.Color3,
            Transparency = l_Tokens_1.Semantic.Color.Ui.Emphasis.Transparency
        },
        handleCornerRadius = l_Tokens_1.Semantic.Radius.Circle,
        handleIcon = v46.handleIcon,
        handleIconColor = v46.handleIconColor,
        handleIconSize = v46.handleIconSize,
        onDragging = v43.onScrollBarDragging,
        viewSize = v43.viewSize,
        canvasSize = v43.mainCanvasSize,
        canvasPosition = v43.getMainCanvasPosition()
    });
end;
v21.renderWithProviders = function(v47, v48, v49, v50)
    local l_position_0 = v47.props.position;
    local l_size_0 = v47.props.size;
    local l_layoutOrder_0 = v47.props.layoutOrder;
    local l_canvasSizeY_0 = v47.props.canvasSizeY;
    local v55 = not not v47.props.useAutomaticCanvasSize and Enum.AutomaticSize.Y or nil;
    local l_isGamepadFocusable_0 = v47.props.isGamepadFocusable;
    return v8.createElement("Frame", {
        BackgroundTransparency = 1,
        Position = l_position_0,
        Size = l_size_0,
        LayoutOrder = l_layoutOrder_0,
        ClipsDescendants = true,
        [v8.Ref] = v47.parentFrameRef
    }, {
        MainCanvas = v8.createElement(not not l_isGamepadFocusable_0 and l_Focusable_0.ScrollingFrame or "ScrollingFrame", {
            Active = false,
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Size = UDim2.fromScale(1, 1),
            ElasticBehavior = v47.props.elasticBehavior,
            CanvasSize = UDim2.new(UDim.new(1, 0), l_canvasSizeY_0),
            AutomaticCanvasSize = v55,
            CanvasPosition = v47.mainCanvasPosition,
            ScrollingEnabled = v47.props.scrollingEnabled,
            ScrollingDirection = Enum.ScrollingDirection.Y,
            ScrollBarImageTransparency = 1,
            ScrollBarThickness = 0,
            Selectable = v47.props.selectable,
            SelectionImageObject = if not v16.migrateToNewSelectionCursor then v49(v12.RoundedRect) else v50,
            onFocusGained = not not l_isGamepadFocusable_0 and v47.onGamepadFocused or nil,
            onFocusLost = not not l_isGamepadFocusable_0 and v47.onGamepadFocusLost or nil,
            NextSelectionLeft = v47.props.NextSelectionLeft,
            NextSelectionRight = v47.props.NextSelectionRight,
            NextSelectionUp = v47.props.NextSelectionUp,
            NextSelectionDown = v47.props.NextSelectionDown,
            [v8.Event.InputBegan] = v47.inputBegan,
            [v8.Event.InputEnded] = v47.inputEnded,
            [v8.Change.CanvasPosition] = v47.canvasPosition,
            [v8.Change.AbsoluteCanvasSize] = v47.onMainCanvasSizeChange,
            [v8.Change.CanvasSize] = v47.props[v8.Change.CanvasSize],
            [v8.Ref] = v47.props.scrollingFrameRef,
            [v8.Change.AbsoluteSize] = v47.onViewSizeChange,
            [v8.Event.SelectionChanged] = if not l_isGamepadFocusable_0 then nil else v47.onSelectionChanged
        }, v47.props[v8.Children]),
        ScrollBar = v47:renderScrollBar(v48)
    });
end;
v21.render = function(v57)
    return v11(function(v58)
        if not v16.migrateToNewSelectionCursor then
            return (v13(function(v59)
                return v57:renderWithProviders(v58, v59);
            end));
        else
            return (v14(function(v60)
                return v57:renderWithProviders(v58, nil, (v60.getCursorByType(v15.RoundedRect)));
            end));
        end;
    end);
end;
v21.willUnmount = function(v61)
    v61.disconnectWaitToHideSidebar();
end;
return v8.forwardRef(function(v62, v63)
    return v8.createElement(v21, v6.Dictionary.join(v62, {
        scrollingFrameRef = v63
    }));
end);