import {
    G as T,
    B as C,
    N as s,
    I as p,
    O as b,
    Q as R,
    J as e,
    P as S,
    an as G,
    K as B,
    M as x,
    ay as P,
    ao as E,
    aD as le,
    n as se,
    C as J,
    az as V,
    aw as z,
    z as oe,
    R as ae,
    H as ee,
    aA as re,
    r as g,
    at as D,
    au as $,
    aB as Ee,
    aC as Be,
    aS as xe,
    aT as he,
    X as We,
    aq as te,
    $ as ke,
    V as qe,
    a7 as Fe,
    E as ze,
    ax as Ve,
    W as Xe
} from "./common.modules-af1f85b9.js";
import {
    i as U,
    y as Ge,
    b as ye,
    _ as H,
    g as Me
} from "./page-activity-ActivityDetail-09e806d3.js";
const je = {
        class: "hot_container"
    },
    Pe = {
        key: 0,
        class: "platform"
    },
    Je = {
        key: 0,
        class: "title"
    },
    Ue = {
        class: "list"
    },
    Ke = ["onClick"],
    Ye = {
        class: "item"
    },
    Qe = ["src", "data-img"],
    Ze = {
        key: 0,
        class: "win-odds"
    },
    et = {
        key: 0,
        class: "title"
    },
    tt = {
        class: "list"
    },
    at = ["onClick"],
    nt = {
        class: "item"
    },
    lt = ["src", "data-img"],
    st = {
        key: 0,
        class: "win-odds"
    },
    it = T({
        __name: "HotGameItem",
        props: {
            platformList: {
                type: Array,
                required: !0
            },
            clicksTopList: {
                type: Array,
                required: !0
            },
            isAll: {
                type: Boolean,
                required: !0
            }
        },
        emits: ["onItemClick"],
        setup(t, {
            emit: a
        }) {
            const {
                platformList: l,
                clicksTopList: v
            } = t, {
                homeState: n
            } = U(), d = C(() => JSON.parse(JSON.stringify(n.allGameList))), k = le(() => se(() =>
                import ("./gameHot-cfe2fc1c.js"), ["assets/js/gameHot-cfe2fc1c.js", "assets/js/common.modules-af1f85b9.js", "assets/css/common-e210f711.css", "assets/js/page-activity-ActivityDetail-09e806d3.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-2c2af617.js", "assets/js/en-8dc3e88f.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css"])), u = le(() => se(() =>
                import ("./gameRec-2f39f33b.js"), ["assets/js/gameRec-2f39f33b.js", "assets/js/common.modules-af1f85b9.js", "assets/css/common-e210f711.css", "assets/js/page-activity-ActivityDetail-09e806d3.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-2c2af617.js", "assets/js/en-8dc3e88f.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css"])), r = le(() => se(() =>
                import ("./noticeBarHot-d83b21e6.js"), ["assets/js/noticeBarHot-d83b21e6.js", "assets/js/common.modules-af1f85b9.js", "assets/css/common-e210f711.css", "assets/js/page-activity-ActivityDetail-09e806d3.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-2c2af617.js", "assets/js/en-8dc3e88f.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css"]));
            let _ = l,
                f = v;
            l || (_ = d.value.popular.platformList, f = d.value.popular.clicksTopList);
            const i = Ge(),
                y = h => {
                    a("onItemClick", h)
                };
            return (h, w) => {
                var o, I;
                return s(), p("div", je, [((o = b(_)) == null ? void 0 : o.length) > 0 && !h.isAll ? (s(), p("div", Pe, [h.isAll ? G("v-if", !0) : (s(), p("div", Je, [R(b(u), {
                    class: "gameRec"
                }), e("span", null, S(h.$t("platRecom")), 1)])), e("div", Ue, [(s(!0), p(B, null, x(b(_), m => (s(), p("div", {
                    key: m.vendorId,
                    onClick: L => y(m)
                }, [e("div", Ye, [R(b(k), {
                    class: "hot_bage"
                }), e("img", {
                    src: m.imgUrl,
                    alt: "",
                    "data-img": b(ye)("images", "avatar")
                }, null, 8, Qe)]), b(i).isShowHotGameWinOdds ? (s(), p("div", Ze, [e("span", null, S(h.$t("winOdds")), 1), e("span", null, S(m.winOdds) + "%", 1), e("div", {
                    class: "win-p",
                    style: P({
                        width: `${Math.min(m.winOdds,100)}%`
                    })
                }, null, 4)])) : G("v-if", !0)], 8, Ke))), 128))])])) : G("v-if", !0), ((I = b(_)) == null ? void 0 : I.length) > 0 ? (s(), p("div", {
                    key: 1,
                    class: E(["popular", {
                        pupularAll: h.isAll
                    }])
                }, [h.isAll ? G("v-if", !0) : (s(), p("div", et, [R(b(r), {
                    class: "hotGames"
                }), e("span", null, S(h.$t("hot")), 1)])), e("div", tt, [(s(!0), p(B, null, x(b(f), m => (s(), p("div", {
                    key: m.vendorId,
                    onClick: L => y(m)
                }, [e("div", nt, [e("img", {
                    src: m.imgUrl,
                    alt: "",
                    "data-img": b(ye)("images", "avatar")
                }, null, 8, lt)]), b(i).isShowHotGameWinOdds ? (s(), p("div", st, [e("span", null, S(h.$t("winOdds")), 1), e("span", null, S(m.winOdds) + "%", 1), e("div", {
                    class: "win-p",
                    style: P({
                        width: `${Math.min(m.winOdds,100)}%`
                    })
                }, null, 4)])) : G("v-if", !0)], 8, at))), 128))])], 2)) : G("v-if", !0)])
            }
        }
    });
const ot = H(it, [
        ["__scopeId", "data-v-d06787cb"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/components/Home/RedHome/GameList/HotGameItem.vue"]
    ]),
    rt = ["onClick"],
    ct = T({
        __name: "OnlineGamesItem",
        props: {
            gameData: {
                type: Array,
                required: !0
            },
            isAll: {
                type: Boolean,
                required: !0
            },
            gameType: {
                type: String,
                required: !0
            }
        },
        emits: ["onItemClick"],
        setup(t, {
            emit: a
        }) {
            const l = t,
                v = C(() => l.isAll ? l.gameData : l.gameData.length > 8 ? l.gameData.slice(0, 8) : l.gameData),
                n = d => {
                    a("onItemClick", d)
                };
            return J(() => {}), (d, k) => {
                const u = V("lazy");
                return s(), p("div", {
                    class: E(["minGame_container", {
                        all_game: d.isAll
                    }])
                }, [(s(!0), p(B, null, x(v.value, r => (s(), p("div", {
                    class: E(["onlineGamesItem", d.gameType]),
                    key: r.gameID,
                    onClick: _ => n(r)
                }, [z((s(), p("img", {
                    class: E(d.gameType === "fish" ? "fish_img" : "min_game_img"),
                    key: r.gameID
                }, null, 2)), [
                    [u, r.img]
                ])], 10, rt))), 128))], 2)
            }
        }
    });
const ut = H(ct, [
        ["__scopeId", "data-v-860d7030"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/components/Home/RedHome/GameList/OnlineGamesItem.vue"]
    ]),
    dt = {
        class: "lottery_container"
    },
    vt = ["onClick"],
    mt = T({
        __name: "LotterySlotItem",
        props: {
            gameData: {
                type: Array,
                required: !0
            },
            isAll: {
                type: Boolean,
                required: !0
            }
        },
        setup(t) {
            const {
                isAlowGame: a,
                openThirdGame: l,
                isSassLotteryGame: v
            } = U(), {
                t: n
            } = oe(), d = ae(), k = f => {
                if (f) {
                    let i = f;
                    switch (i) {
                        case "Trx Win Go":
                            i = "Trx Win";
                            break;
                        case "FXOSO":
                            i = n("FXOSO");
                        default:
                            i = i
                    }
                    return i
                }
                return ""
            }, u = f => {
                if (f) {
                    let i = [];
                    switch (f) {
                        case "Win Go":
                        case "Trx Win Go":
                            i = [n("lotteryHintStr1"), n("lotteryHintStr2")];
                            break;
                        case "5D":
                        case "K3":
                            i = [n("lotteryHintStr3"), n("lotteryHintStr4")];
                            break;
                        case "XOSO":
                        case "FXOSO":
                            i = [n("lotteryHintStr5"), n("lotteryHintStr6")];
                            break;
                        case "Bingo18":
                            i = [n("lotteryHintStr5"), n("lotteryHintStr6")];
                            break;
                        case "4D":
                            i = [n("lotteryHintStr7"), n("lotteryHintStr6")];
                            break;
                        case "MotoRace":
                            i = [n("moto8"), n("moto9")];
                            break;
                        case "VideoWinGo":
                            i = [n("VideoWinGoTip"), n("VideoWinGoTip2")];
                            break;
                        default:
                            i = []
                    }
                    return i
                }
                return ""
            }, r = [{
                value: 1,
                path: "WinGo"
            }, {
                value: 3,
                path: "5D"
            }, {
                value: 2,
                path: "K3"
            }, {
                value: 4,
                path: "WinTrx"
            }, {
                value: 5,
                path: "XoSo"
            }, {
                value: 6,
                path: "XoSo"
            }, {
                value: 7,
                path: "Binguo"
            }, {
                value: 8,
                path: "4D"
            }], _ = f => {
                if (v(f)) return l({ ...f,
                    vendorCode: "ARLottery"
                });
                d.push({
                    name: "AllLotteryGames-" + r[r.findIndex(i => i.value === f.id)].path,
                    query: {
                        id: f.id
                    }
                })
            };
            return (f, i) => {
                const y = V("lazy");
                return s(), p("div", dt, [(s(!0), p(B, null, x(f.gameData, h => (s(), p("div", {
                    class: "lotterySlotItem",
                    key: h.id,
                    onClick: w => b(a)(h, _)
                }, [z(e("img", null, null, 512), [
                    [y, h.categoryImg]
                ]), e("span", null, S(k(h.categoryCode)), 1), e("h4", null, [e("div", null, S(u(h.categoryCode)[0]), 1), e("div", null, S(u(h.categoryCode)[1]), 1)])], 8, vt))), 128))])
            }
        }
    });
const _t = H(mt, [
        ["__scopeId", "data-v-acaadf81"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/components/Home/RedHome/GameList/LotterySlotItem.vue"]
    ]),
    ft = {
        class: "lotterySlotItem__container"
    },
    pt = {
        class: "title"
    },
    gt = {
        class: "tit"
    },
    yt = {
        class: "game_img"
    },
    ht = T({
        __name: "OtherGameItem",
        props: {
            info: {
                type: null,
                required: !0
            },
            isAll: {
                type: Boolean,
                required: !0
            },
            gameType: {
                type: String,
                required: !0
            }
        },
        setup(t) {
            const {
                t: a
            } = oe(), l = {
                sport: a("sport"),
                video: a("live"),
                chess: a("chess")
            };
            return (v, n) => {
                const d = V("lazy");
                return s(), p("div", ft, [e("div", pt, [e("div", gt, S(l[v.gameType]), 1), G(' <div class="desc">{{ getArrayKey(rootConfig.gameAllName, info.slotsTypeID) }}</div> ')]), z(e("img", yt, null, 512), [
                    [d, v.info.vendorImg]
                ])])
            }
        }
    });
const kt = H(ht, [
        ["__scopeId", "data-v-1153e4fd"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/components/Home/RedHome/GameList/OtherGameItem.vue"]
    ]),
    Gt = ["onClick"],
    bt = {
        class: "gameImg"
    },
    It = T({
        __name: "ElectronicItem",
        props: {
            gameData: {
                type: Array,
                default: []
            },
            isAll: {
                type: Boolean,
                default: !1
            }
        },
        emits: ["handleOpenGame"],
        setup(t, {
            emit: a
        }) {
            const l = t,
                v = C(() => l.isAll ? l.gameData : l.gameData.slice(0, 6)),
                n = d => {
                    a("handleOpenGame", d, "slot")
                };
            return J(() => {}), (d, k) => {
                const u = V("lazy");
                return s(), p("div", {
                    class: E(["onlineGamesItem__container", {
                        allGame: t.isAll
                    }])
                }, [(s(!0), p(B, null, x(v.value, r => (s(), p("div", {
                    key: r.slotsTypeID,
                    class: "item",
                    onClick: _ => n(r)
                }, [z(e("img", bt, null, 512), [
                    [u, r.vendorImg]
                ]), G(' <van-image :src="getIcons(`home/dianzi/onlineSlot`, item.slotsName)" class="slot_img">\n				<template v-slot:error>加载失败</template>\n			</van-image> ')], 8, Gt))), 128))], 2)
            }
        }
    });
const St = H(It, [
        ["__scopeId", "data-v-54337c48"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/components/Home/RedHome/GameList/ElectronicItem.vue"]
    ]),
    wt = {
        alt: ""
    },
    At = T({
        __name: "ElectronicWinRate",
        setup(t) {
            const a = Ge(),
                l = C(() => a.winRate.electronicWinRateImgUrl || ""),
                v = C(() => !!(a.winRate.isShowElectronicWinRateExternalLink && l.value)),
                n = () => {
                    a.winRate.electronicWinRateExternalLink && window.open(a.winRate.electronicWinRateExternalLink)
                };
            return (d, k) => {
                const u = V("lazy");
                return v.value ? (s(), p("div", {
                    key: 0,
                    class: "WinRate",
                    onClick: n
                }, [z(e("img", wt, null, 512), [
                    [u, l.value]
                ])])) : G("v-if", !0)
            }
        }
    });
const be = H(At, [
        ["__scopeId", "data-v-0d36c546"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/components/Home/RedHome/GameList/ElectronicWinRate.vue"]
    ]),
    Lt = {
        class: "slot_list"
    },
    Ct = {
        class: "slot_title"
    },
    $t = {
        class: "slot_img_box"
    },
    Tt = ["onClick"],
    Ot = ["onClick"],
    Dt = T({
        __name: "index",
        setup(t) {
            const a = ae(),
                {
                    getSlotList: l,
                    homeState: v,
                    onItemClick: n
                } = U(),
                d = u => {
                    let r = u;
                    return u.indexOf("_") === -1 ? u : (r = u.split("_")[0], r = r.replace("G9", "9G"), r = r.replace("AG", "PA"), r)
                },
                k = u => {
                    const r = v.allGameList.slot.find(_ => _.slotsName === u.vendorCode);
                    sessionStorage.setItem("slotGamesList", JSON.stringify(v.allGameList.slot)), sessionStorage.setItem("gameType", JSON.stringify("slot")), sessionStorage.setItem("clickedItem", JSON.stringify(r)), a.push({
                        name: "AllOnlineGames"
                    })
                };
            return l(), (u, r) => {
                const _ = ee("svg-icon"),
                    f = V("lazy");
                return s(), p("div", Lt, [R(be), (s(!0), p(B, null, x(b(v).slotsGame, i => (s(), p("div", {
                    class: "slot_item",
                    key: i.vendorCode
                }, [e("div", Ct, [G(`				<img :src="getIcons('home/slots', item.vendorCode)" alt="" />`), R(_, {
                    name: i.vendorCode
                }, null, 8, ["name"]), re(" " + S(d(i.vendorCode)) + S(u.$t("electric")), 1)]), e("div", $t, [(s(!0), p(B, null, x(i.childList.slice(0, 6), y => z((s(), p("img", {
                    key: y.gameID + i.vendorCode,
                    onClick: h => b(n)(y)
                }, null, 8, Tt)), [
                    [f, y.img]
                ])), 128))]), e("div", {
                    class: "all_slot",
                    onClick: () => k(i)
                }, S(u.$t("allGame")), 9, Ot)]))), 128))])
            }
        }
    });
const Rt = H(Dt, [
        ["__scopeId", "data-v-1b7d97f8"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/components/Home/Electronic/Slot/index.vue"]
    ]),
    K = t => (Ee("data-v-df3cc798"), t = t(), Be(), t),
    Nt = K(() => e("div", {
        class: "skeleton_hot"
    }, [e("div", {
        class: "hot_tit"
    }), e("div", {
        class: "hot_list"
    }, [e("div"), e("div"), e("div"), e("div"), e("div"), e("div")]), e("div", {
        class: "hot_tit"
    }), e("div", {
        class: "hot_list"
    }, [e("div"), e("div"), e("div"), e("div"), e("div"), e("div"), e("div"), e("div"), e("div")])], -1)),
    Ht = K(() => e("div", {
        class: "skeleton_other"
    }, [e("div"), e("div"), e("div"), e("div")], -1)),
    Et = {
        class: "otherGame"
    },
    Bt = K(() => e("div", {
        class: "skeleton_slot"
    }, [e("div"), e("div"), e("div"), e("div"), e("div"), e("div")], -1)),
    xt = K(() => e("div", {
        class: "skeleton_other"
    }, [e("div"), e("div"), e("div"), e("div")], -1)),
    Wt = K(() => e("div", {
        class: "skeleton_flash"
    }, [e("div"), e("div"), e("div"), e("div"), e("div"), e("div"), e("div"), e("div")], -1)),
    qt = ["src"],
    Ft = T({
        __name: "GameListGrid",
        props: {
            currentGame: {
                type: String,
                default: ""
            },
            isAll: {
                type: Boolean,
                default: !1
            }
        },
        setup(t) {
            const a = t,
                l = ae(),
                v = g(!0),
                n = C(() => l.currentRoute.value.name !== "AllGames"),
                {
                    onItemClick: d,
                    getAllGame: k,
                    homeState: u
                } = U(),
                r = C(() => JSON.parse(JSON.stringify(u.allGameList))),
                _ = C(() => a.currentGame === "popular" ? 1 : ["sport", "chess", "video"].includes(a.currentGame) ? 2 : a.currentGame === "lottery" ? 3 : a.currentGame === "slot" ? 4 : a.currentGame === "flash" || a.currentGame === "fish" ? 5 : -1),
                f = async () => {
                    var o, I;
                    await k(), r.value.popular = [(o = u.allGameList) == null ? void 0 : o.popular.platformList, (I = u.allGameList) == null ? void 0 : I.popular.clicksTopList], v.value = !1
                },
                i = () => {
                    l.push({
                        name: "AllGames",
                        query: {
                            type: a.currentGame
                        }
                    })
                },
                y = C(() => r.value[a.currentGame].length < 1 ? [] : r.value[a.currentGame][0] || []),
                h = C(() => r.value[a.currentGame].length < 1 ? [] : a.isAll ? r.value[a.currentGame][1] || [] : r.value[a.currentGame][1].slice(0, 9) || []),
                w = async (o, I) => {
                    ["chess", "slot"].includes(I) ? (sessionStorage.setItem("slotGamesList", JSON.stringify(r.value[a.currentGame])), sessionStorage.setItem("gameType", JSON.stringify(a.currentGame)), sessionStorage.setItem("clickedItem", JSON.stringify(o)), l.push({
                        name: "AllOnlineGames"
                    })) : d(o)
                };
            return f(), (o, I) => {
                const m = ee("van-skeleton");
                return s(), p("div", {
                    class: E(["gameListGrid__container", {
                        all_container: t.isAll
                    }])
                }, [t.currentGame === "popular" ? (s(), D(m, {
                    key: 0,
                    loading: v.value
                }, {
                    template: $(() => [Nt]),
                    default: $(() => [R(ot, {
                        platformList: y.value,
                        clicksTopList: h.value,
                        onOnItemClick: b(d),
                        isAll: t.isAll
                    }, null, 8, ["platformList", "clicksTopList", "onOnItemClick", "isAll"])]),
                    _: 1
                }, 8, ["loading"])) : G("v-if", !0), _.value === 2 ? (s(), D(m, {
                    key: 1,
                    loading: v.value
                }, {
                    template: $(() => [Ht]),
                    default: $(() => [e("div", Et, [(s(!0), p(B, null, x(r.value[t.currentGame], (L, N) => (s(), D(kt, {
                        key: N,
                        info: L,
                        gameType: t.currentGame,
                        isAll: t.isAll,
                        onClick: W => w(L, t.currentGame)
                    }, null, 8, ["info", "gameType", "isAll", "onClick"]))), 128))])]),
                    _: 1
                }, 8, ["loading"])) : G("v-if", !0), _.value === 4 ? (s(), D(m, {
                    key: 2,
                    loading: v.value
                }, {
                    template: $(() => [Bt]),
                    default: $(() => [t.isAll ? G("v-if", !0) : (s(), D(be, {
                        key: 0
                    })), n.value ? (s(), D(St, {
                        key: 1,
                        gameData: r.value[t.currentGame],
                        isAll: t.isAll,
                        onHandleOpenGame: w
                    }, null, 8, ["gameData", "isAll"])) : (s(), D(Rt, {
                        key: 2
                    }))]),
                    _: 1
                }, 8, ["loading"])) : G("v-if", !0), _.value === 3 ? (s(), D(m, {
                    key: 3,
                    loading: v.value
                }, {
                    template: $(() => [xt]),
                    default: $(() => [R(_t, {
                        gameData: r.value[t.currentGame],
                        isAll: t.isAll
                    }, null, 8, ["gameData", "isAll"])]),
                    _: 1
                }, 8, ["loading"])) : G("v-if", !0), G(" 小游戏、捕鱼 "), _.value === 5 ? (s(), D(m, {
                    key: 4,
                    loading: v.value
                }, {
                    template: $(() => [Wt]),
                    default: $(() => [R(ut, {
                        gameData: r.value[t.currentGame],
                        gameType: t.currentGame,
                        isAll: t.isAll,
                        onOnItemClick: b(d)
                    }, null, 8, ["gameData", "gameType", "isAll", "onOnItemClick"])]),
                    _: 1
                }, 8, ["loading"])) : G("v-if", !0), t.isAll ? G("v-if", !0) : (s(), p("button", {
                    key: 5,
                    onClick: i,
                    class: "look_all"
                }, [e("img", {
                    src: b(Me)("home", "all"),
                    alt: ""
                }, null, 8, qt), re(" " + S(o.$t("viewAll")), 1)]))], 2)
            }
        }
    });
const zt = H(Ft, [
        ["__scopeId", "data-v-df3cc798"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/components/Home/RedHome/GameList/GameListGrid.vue"]
    ]),
    Vt = {
        class: "gamesList__container"
    },
    Xt = {
        class: "gamesList__container-title"
    },
    Mt = T({
        __name: "GameList",
        props: {
            gameData: {
                type: Object,
                required: !0
            },
            title: {
                type: String,
                required: !0
            },
            gameType: {
                type: String,
                required: !0
            }
        },
        setup(t) {
            return (a, l) => (s(), p("div", Vt, [e("div", Xt, S(a.title), 1), R(zt, {
                currentGame: a.gameType,
                isAll: !0
            }, null, 8, ["currentGame"])]))
        }
    });
const jt = H(Mt, [
        ["__scopeId", "data-v-e4c17073"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/components/Home/RedHome/AllGames/GameList.vue"]
    ]),
    Ie = Symbol();
var Se = (t, a) => {
    const l = t.__vccOpts || t;
    for (const [v, n] of a) l[v] = n;
    return l
};
const Pt = T({
        name: "FunTabItem",
        props: {
            title: String,
            name: [String, Number],
            badge: [String, Number]
        },
        setup(t) {
            const a = xe(Ie),
                l = g(),
                v = C(() => (a == null ? void 0 : a.activeValue.value) === t.name ? {
                    color: a == null ? void 0 : a.activeColor.value
                } : {}),
                n = () => {
                    a == null || a.setActiveValue(t.name)
                },
                d = {
                    name: he(t, "name"),
                    el: l
                };
            return J(() => {
                var k;
                (k = a.addItem) == null || k.call(a, d)
            }), We(() => {
                var k;
                (k = a.removeItem) == null || k.call(a, d)
            }), {
                el: l,
                style: v,
                handleClick: n
            }
        }
    }),
    Jt = {
        class: "fun-tab-item__wrap"
    },
    Ut = {
        class: "fun-tab-item__label"
    },
    Kt = {
        key: 0,
        class: "fun-tab-item__badge"
    };

function Yt(t, a, l, v, n, d) {
    return s(), p("div", {
        ref: "el",
        style: P(t.style),
        class: "fun-tab-item",
        onClick: a[0] || (a[0] = (...k) => t.handleClick && t.handleClick(...k))
    }, [e("div", Jt, [te(t.$slots, "icon"), e("div", Ut, [te(t.$slots, "default", {}, () => [re(S(t.title), 1)])]), t.badge ? (s(), p("div", Kt, S(t.badge), 1)) : G("v-if", !0)])], 4)
}
var Qt = Se(Pt, [
    ["render", Yt],
    ["__file", "/Users/scoutyin/Documents/ScoutYin/fun-tab/src/tab-item.vue"]
]);
const ie = window;

function Zt() {
    let t = 0;
    const a = ["webkit", "moz"];
    for (let l = 0; l < a.length && !window.requestAnimationFrame; ++l) window.requestAnimationFrame = ie[a[l] + "RequestAnimationFrame"], window.cancelAnimationFrame = ie[a[l] + "CancelAnimationFrame"] || ie[a[l] + "CancelRequestAnimationFrame"];
    window.requestAnimationFrame || (window.requestAnimationFrame = function(l) {
        const v = Date.now(),
            n = v - t,
            d = Math.max(0, 16.7 - n),
            k = window.setTimeout(function() {
                l(n)
            }, d);
        return t = v + d, k
    }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function(l) {
        clearTimeout(l)
    })
}
const ea = T({
        name: "FunTabs",
        props: {
            modelValue: {
                type: [String, Number],
                default: ""
            },
            lineWidth: {
                type: [Number, String],
                default: 30
            },
            lineHeight: {
                type: Number,
                default: 3
            },
            activeColor: {
                type: String,
                default: "#1677ff"
            },
            additionalX: {
                type: Number,
                default: 50
            },
            reBoundExponent: {
                type: Number,
                default: 10,
                validator(t) {
                    return t > 0
                }
            },
            inertialDuration: {
                type: Number,
                default: 1e3,
                validator(t) {
                    return t > 0
                }
            },
            reBoundingDuration: {
                type: Number,
                default: 360
            }
        },
        emits: ["update:modelValue", "change"],
        setup(t, {
            emit: a,
            expose: l
        }) {
            let v = null;
            const n = [],
                d = g(),
                k = g(),
                u = g(t.modelValue),
                r = g(0),
                _ = g(0),
                f = g(0),
                i = g(0),
                y = g(0),
                h = g(!1),
                w = g(!1),
                o = g(0),
                I = g(0),
                m = g(0),
                L = g(0),
                N = g(0),
                W = g(0),
                X = g(16.7),
                Y = g(0),
                Q = g(0),
                M = g(0),
                ce = g(.001),
                q = g(.001),
                we = C(() => {
                    const c = w.value && !h.value ? t.reBoundingDuration : 0;
                    return {
                        transitionTimingFunction: w.value ? "cubic-bezier(0.25, 0.46, 0.45, 0.94)" : "cubic-bezier(0.1, 0.57, 0.1, 1)",
                        transitionDuration: `${c}ms`,
                        transform: `translate3d(${o.value}px, 0px, 0px)`
                    }
                }),
                Ae = C(() => ({
                    transition: "all 300ms",
                    width: `${_.value}px`,
                    height: `${t.lineHeight}px`,
                    transform: `translate3d(${r.value}px, 0, 0)`,
                    backgroundColor: t.activeColor
                })),
                ne = C(() => L.value <= I.value);
            ke(() => t.modelValue, c => {
                u.value = c, Z()
            });
            const Z = () => {
                    v || (v = new Promise(c => {
                        qe(() => {
                            ue(), c(), v = null
                        })
                    }))
                },
                Le = c => {
                    u.value = c, a("update:modelValue", c), a("change", c)
                },
                Ce = c => {
                    n.push(c), Z()
                },
                $e = c => {
                    const A = n.findIndex(O => O.name === c.name);
                    A !== -1 && (n.splice(A, 1), Z())
                },
                Te = {
                    activeValue: u,
                    activeColor: he(t, "activeColor"),
                    addItem: Ce,
                    removeItem: $e,
                    setActiveValue: Le
                };
            Fe(Ie, Te);
            const ue = () => {
                    var c, A;
                    f.value = ((c = d.value) == null ? void 0 : c.offsetWidth) || 0, i.value = ((A = k.value) == null ? void 0 : A.offsetWidth) - f.value, Re(), De()
                },
                de = () => (w.value = !1, o.value > 0 ? (w.value = !0, o.value = 0) : o.value < -i.value && (w.value = !0, o.value = -i.value), w.value),
                Oe = () => {
                    ne.value ? o.value <= 0 && o.value + i.value > 0 || o.value > 0 ? o.value += L.value - m.value : o.value + i.value <= 0 && (o.value += t.additionalX * (L.value - m.value) / (f.value + Math.abs(o.value + i.value))) : o.value >= 0 ? o.value += t.additionalX * (L.value - m.value) / (f.value + o.value) : (o.value <= 0 && o.value + i.value >= 0 || o.value + i.value <= 0) && (o.value += L.value - m.value), m.value = L.value
                },
                ve = () => {
                    if (Q.value = Date.now(), X.value = Q.value - Y.value, ne.value ? o.value <= -i.value ? (q.value *= (t.reBoundExponent + Math.abs(o.value + i.value)) / t.reBoundExponent, y.value = Math.min(y.value - q.value, 0)) : y.value = Math.min(y.value - q.value * X.value, 0) : o.value >= 0 ? (q.value *= (t.reBoundExponent + o.value) / t.reBoundExponent, y.value = Math.max(y.value - q.value, 0)) : y.value = Math.max(y.value - q.value * X.value, 0), o.value += y.value * X.value / 2, Math.abs(y.value) <= ce.value) {
                        de();
                        return
                    }
                    Y.value = Q.value, M.value = requestAnimationFrame(ve)
                },
                me = () => {
                    if (!n.length) return;
                    const c = n.find(A => A.name.value === u.value);
                    return c && c.el.value
                },
                De = () => {
                    const c = me();
                    if (!c) return;
                    const A = c.offsetWidth,
                        O = c.offsetLeft,
                        {
                            lineWidth: F
                        } = t;
                    F === "auto" ? _.value = A : F < 1 ? _.value = A * F : _.value = F, r.value = O + (A - _.value) / 2
                },
                Re = () => {
                    const c = me();
                    if (!c) return;
                    const A = c.offsetLeft,
                        O = (f.value - c.offsetWidth) / 2;
                    let F = 0;
                    const ge = Math.abs(o.value);
                    A <= ge + O ? F = O - (A + o.value) : F = -(A - ge - O);
                    let j = F + o.value;
                    j > 0 && (j = 0), j < -i.value && (j = -i.value), w.value = !0, o.value = j
                },
                _e = c => {
                    c.stopPropagation(), cancelAnimationFrame(M.value), m.value = c.touches[0].clientX
                },
                fe = c => {
                    i.value <= 0 || (c.preventDefault(), c.stopPropagation(), h.value = !0, N.value = W.value, I.value = m.value, L.value = c.touches[0].clientX, Oe(), W.value = c.timeStamp)
                },
                pe = c => {
                    if (h.value = !1, de()) cancelAnimationFrame(M.value);
                    else {
                        let A = c.timeStamp - W.value,
                            O = W.value - N.value;
                        if (O = O > 0 ? O : 8, A > 100) return;
                        y.value = (m.value - I.value) / O, q.value = y.value / t.inertialDuration, Y.value = Date.now(), M.value = requestAnimationFrame(ve)
                    }
                },
                Ne = () => {
                    const c = d.value;
                    c.addEventListener("touchstart", _e, !1), c.addEventListener("touchmove", fe, !1), c.addEventListener("touchend", pe, !1)
                },
                He = () => {
                    const c = d.value;
                    c.removeEventListener("touchstart", _e), c.removeEventListener("touchmove", fe), c.removeEventListener("touchend", pe)
                };
            return J(() => {
                Zt(), Ne(), Z()
            }), ze(() => {
                He()
            }), l({
                resize: ue
            }), {
                viewAreaRef: d,
                listRef: k,
                activeValue: u,
                lineOffset: r,
                activeLineWidth: _,
                viewAreaWidth: f,
                offsetX: i,
                speed: y,
                touching: h,
                reBounding: w,
                translateX: o,
                startX: I,
                lastX: m,
                currentX: L,
                startMoveTime: N,
                endMoveTime: W,
                frameTime: X,
                frameStartTime: Y,
                frameEndTime: Q,
                inertiaFrame: M,
                zeroSpeed: ce,
                acceleration: q,
                listStyle: we,
                activeBarStyle: Ae,
                isMoveLeft: ne
            }
        }
    }),
    ta = {
        ref: "viewAreaRef",
        class: "fun-tabs"
    };

function aa(t, a, l, v, n, d) {
    return s(), p("div", ta, [e("div", {
        ref: "listRef",
        style: P(t.listStyle),
        class: "fun-tabs__tab-list"
    }, [te(t.$slots, "default"), e("div", {
        style: P(t.activeBarStyle),
        class: "fun-tabs__active-line"
    }, null, 4)], 4)], 512)
}
var na = Se(ea, [
    ["render", aa],
    ["__file", "/Users/scoutyin/Documents/ScoutYin/fun-tab/src/tabs.vue"]
]);
const la = T({
        __name: "NavBar",
        props: {
            list: {
                type: Array,
                required: !0
            },
            tabClassName: {
                type: String,
                required: !0
            },
            active: {
                type: Number,
                required: !0,
                default: 0
            },
            tabItemClassName: {
                type: String,
                required: !1
            }
        },
        emits: ["update:active", "onClickTab"],
        setup(t, {
            expose: a,
            emit: l
        }) {
            const v = t,
                n = g(),
                d = g(0),
                k = (u, r) => {
                    l("update:active", d.value), l("onClickTab", {
                        item: u,
                        index: r
                    })
                };
            return ke(() => v.active, u => {
                d.value = u
            }), a({
                funtabRef: n
            }), (u, r) => (s(), D(b(na), {
                modelValue: d.value,
                "onUpdate:modelValue": r[0] || (r[0] = _ => d.value = _),
                class: E(u.tabClassName),
                lineWidth: "0",
                ref_key: "funtabRef",
                ref: n
            }, {
                default: $(() => [(s(!0), p(B, null, x(u.list, (_, f) => z((s(), D(b(Qt), {
                    name: f,
                    key: f,
                    class: E([u.tabItemClassName, {
                        activeClassName: u.active === f
                    }]),
                    onClick: i => k(_, f)
                }, {
                    default: $(() => [te(u.$slots, "default", {
                        item: _,
                        index: f
                    })]),
                    _: 2
                }, 1032, ["name", "class", "onClick"])), [
                    [Ve, _.isShow !== void 0 ? _.isShow : !0]
                ])), 128))]),
                _: 3
            }, 8, ["modelValue", "class"]))
        }
    }),
    sa = H(la, [
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/components/FunTab/NavBar.vue"]
    ]),
    ia = {
        class: "allGames__container"
    },
    oa = T({
        __name: "index",
        setup(t) {
            const {
                homeState: a,
                getGameType: l,
                getAllGame: v
            } = U(), n = g(0), d = g(null), k = g(), u = ae(), {
                t: r
            } = oe(), _ = g([]), f = g({});

            function i() {
                u.go(-1)
            }
            const y = C(() => _.value[n.value]);
            J(() => {
                h()
            }), Xe(() => {
                h()
            });
            const h = async () => {
                var o, I;
                !a.gameTypeList.length && await l(), !a.allGameList && await v(), _.value = [], a.gameTypeList.forEach(m => {
                    m.categoryCode === "BigAward" || m.state !== 1 || _.value.push({
                        isShow: m.state === 1,
                        title: r("code" + m.typeNameCode),
                        img: m.categoryImg,
                        key: m.categoryCode.toLocaleLowerCase()
                    })
                }), f.value = a.allGameList || {}, f.value.popular = [(o = f.value) == null ? void 0 : o.popular.platformList, (I = f.value) == null ? void 0 : I.popular.clicksTopList];
                const w = u.currentRoute.value.query.type || "";
                n.value = _.value.findIndex(m => m.key + "" === w) || 0
            };
            return (w, o) => {
                const I = ee("NavBar"),
                    m = ee("van-sticky"),
                    L = V("lazy");
                return s(), p("div", ia, [R(I, {
                    title: w.$t("all"),
                    "left-arrow": "",
                    onClickLeft: i
                }, null, 8, ["title"]), R(m, {
                    class: "alGames__container-sticky"
                }, {
                    default: $(() => [R(sa, {
                        list: _.value,
                        active: n.value,
                        "onUpdate:active": o[0] || (o[0] = N => n.value = N),
                        tabClassName: "tabs",
                        activeClassName: "tab_active",
                        ref_key: "tabRefs",
                        ref: k
                    }, {
                        default: $(({
                            item: N,
                            index: W
                        }) => [N.isShow ? (s(), p("div", {
                            key: 0,
                            class: E(["tab_item", {
                                tab_active: W === n.value
                            }])
                        }, [z(e("img", null, null, 512), [
                            [L, N.img]
                        ]), e("span", null, S(N.title), 1)], 2)) : G("v-if", !0)]),
                        _: 1
                    }, 8, ["list", "active"])]),
                    _: 1
                }), e("div", {
                    class: "allGames__container-list",
                    ref_key: "allGamesContainer",
                    ref: d
                }, [_.value.length > 0 ? (s(), D(jt, {
                    key: 0,
                    gameType: y.value.key,
                    title: y.value.title,
                    gameData: f.value[y.value.key]
                }, null, 8, ["gameType", "title", "gameData"])) : G("v-if", !0)], 512)])
            }
        }
    });
const ra = H(oa, [
        ["__scopeId", "data-v-0a9bf0c5"],
        ["__file", "/usr/local/jenkins-prod/workspace/ar055-india-bdg/src/views/home/AllGames/index.vue"]
    ]),
    da = Object.freeze(Object.defineProperty({
        __proto__: null,
        default: ra
    }, Symbol.toStringTag, {
        value: "Module"
    }));
export {
    na as F, sa as N, Qt as a, da as i
};