import {
    G as le,
    z as fe,
    r as g,
    R as ue,
    B as K,
    $ as ie,
    C as ce,
    aK as de,
    H as G,
    I as M,
    Q as _,
    J as s,
    O as c,
    P as v,
    ao as N,
    au as he,
    ax as q,
    ay as Y,
    aF as be,
    av as ve,
    b5 as we,
    u as f,
    F as ye,
    V as ee,
    aC as Se,
    aD as ke,
    N as P,
    aB as Ie,
    a$ as Ce,
    am as Re,
    n as xe,
    ap as W
} from "./common.modules-5cfe2cf4.js";
import {
    d as qe,
    V as Ge,
    P as te,
    v as X,
    S as Te,
    E as Le,
    b as He,
    c as pe,
    e as Ke
} from "./page-login-index.vue_vue_type_script_setup_true_lang.ts-f69c0404.js";
import {
    y as Je,
    a3 as ge,
    cQ as ae,
    bx as Pe,
    a4 as je,
    cR as De,
    cn as _e,
    A as J,
    bE as ze,
    bF as Fe,
    aO as $e,
    G as me,
    cS as Be,
    bI as Ee,
    bb as Ae,
    _ as Me,
    bK as Qe,
    n as Ze,
    cT as We
} from "./page-activity-ActivityDetail-a58ec568.js";
const Xe = y => (Se("data-v-e26f70e7"), y = y(), ke(), y),
    Ye = ["onKeydown"],
    et = {
        class: "tip"
    },
    tt = {
        key: 0,
        class: "red"
    },
    at = {
        key: 1,
        class: "red"
    },
    st = {
        class: "register__container-tip"
    },
    rt = Xe(() => s("div", {
        class: "tipbg"
    }, null, -1)),
    ot = {
        class: "register__container-tips"
    },
    nt = {
        class: "register__container-invitation"
    },
    it = {
        class: "register__container-invitation__label"
    },
    lt = {
        class: "register__container-invitation__input"
    },
    ut = ["placeholder", "disabled"],
    ct = {
        class: "register__container-remember"
    },
    dt = {
        class: "register__container-button"
    },
    vt = {
        class: "account"
    },
    gt = {
        class: "loginin"
    },
    mt = le({
        __name: "Register",
        props: {
            registerData: {
                type: Object,
                required: !0
            }
        },
        emits: ["submit"],
        setup(y, {
            expose: L,
            emit: H
        }) {
            const C = y,
                {
                    t: e
                } = fe(),
                b = Je(),
                i = ge(),
                o = g(!1),
                t = g({
                    number: "",
                    numberType: i.rPwdForm.numberType,
                    smsvcode: "",
                    password: "",
                    rePassword: "",
                    invitecode: "",
                    registerType: "mobile",
                    packId: ae.getPackId() || ""
                }),
                D = g("register");
            t.value.number = "", sessionStorage.getItem("register_a") && (t.value = JSON.parse(sessionStorage.getItem("register_a") || ""), sessionStorage.setItem("register_a", ""));
            const R = ue(),
                F = g(!1),
                w = g(!1),
                $ = g({}),
                n = Pe(),
                m = K(() => {
                    var a, r, p, h, u;
                    return !!((r = (a = $.value) == null ? void 0 : a.apkInfo) != null && r.invitationCode || (p = R.currentRoute.value.query) != null && p.invitationCode || (u = (h = R.currentRoute.value.query) == null ? void 0 : h.r_code) != null && u.toString() || n.invitationCode || sessionStorage.getItem("invitecode"))
                }),
                S = K(() => C.registerData.isInvitecode == "1" ? e("plsEnterInvitationCode") : e("notNecessary")),
                B = b.isOpenRegisterPhoneFirstZeroSwitch;
            ie(() => t.value.number, a => {
                i.setCountDown(0)
            }, {
                flush: "post"
            }), ie(() => i.rPwdForm.numberType, a => {
                !t.value.numberType && (t.value.numberType = a)
            }, {
                flush: "post"
            });

            function O() {
                R.push({
                    name: "login"
                })
            }
            const V = async () => {
                if (!_e(t.value.numberType, t.value.number.trim().length)) return i.setCountDown(0), f({
                    message: e("wrongTel"),
                    wordBreak: "break-word"
                });
                await J(ze({
                    phone: t.value.numberType.replace("+", "") + t.value.number,
                    codeType: Fe.Registr
                })) ? ye(e("sendSuccess")) : setTimeout(() => {
                    i.setCountDown(0)
                }, 500)
            };
            K(() => {
                var h;
                let a = e("regTip2").match(/\d+/);
                "" + t.value.numberType;
                const r = (h = b.getAreaPhoneLenList.find(u => (u == null ? void 0 : u.area) == "+" + t.value.numberType)) == null ? void 0 : h.len;
                let p = 9;
                return (r == null ? void 0 : r.indexOf("-")) != -1 ? p = r == null ? void 0 : r.toString().split("-")[0] : p = r, a ? a[0].substr(0, p) : ""
            });
            const x = a => {
                    const r = a.target;
                    r.value = r.value.replace(/[\s\n\t\r]/g, "")
                },
                U = async () => {
                    if (!_e(t.value.numberType, t.value.number.trim().length)) return f({
                        message: e("wrongTel"),
                        wordBreak: "break-word"
                    });
                    if (t.value.number.charAt(0) === "0" && b.isOpenRegisterPhoneFirstZeroSwitch) return f({
                        message: e("registerNumberTip"),
                        wordBreak: "break-word"
                    });
                    if (C.registerData.registerMobileState !== "1") return f({
                        message: e("registerClose"),
                        wordBreak: "break-word"
                    });
                    if (!t.value.number.trim() || F.value) {
                        F.value = !0;
                        return
                    }
                    if (C.registerData.isOpenRegisterSMS !== "0")
                        if (t.value.smsvcode.trim()) {
                            if (t.value.smsvcode.trim().length != 6) return f({
                                message: e("verifyCode6Digits"),
                                wordBreak: "break-word"
                            })
                        } else return f({
                            message: e("registerTip1"),
                            wordBreak: "break-word"
                        });
                    if (!t.value.password.trim()) return f({
                        message: e("registerTip2"),
                        wordBreak: "break-word"
                    });
                    if (!X.passReg3.test(t.value.password)) {
                        o.value = !0;
                        return
                    }
                    if (!t.value.rePassword.trim()) return f({
                        message: e("registerTip3"),
                        wordBreak: "break-word"
                    });
                    if (t.value.rePassword !== t.value.password) {
                        w.value = !0;
                        return
                    } else w.value = !1;
                    if (!i.userForm.termAndPolicy) return f({
                        message: e("registerDesc1"),
                        wordBreak: "break-word"
                    });
                    C.registerData.hasRegisterCaptcha === "1" ? A() : k("")
                },
                T = a => {
                    t.value.numberType = a
                },
                j = a => {
                    t.value.number = a
                },
                z = () => {
                    Re("toPath", "ResetPassword"), R.push({
                        name: "About-AboutDetail"
                    })
                },
                E = g(),
                d = g(""),
                {
                    setLoading: l
                } = je(),
                k = async a => {
                    ee(async () => {
                        l(!0), E.value.startRequestVerify();
                        const {
                            number: r,
                            numberType: p,
                            smsvcode: h,
                            password: u,
                            invitecode: Q,
                            packId: se
                        } = t.value;
                        let re = {
                            username: p.replace("+", "") + r,
                            smsvcode: h,
                            registerType: t.value.registerType,
                            pwd: u,
                            invitecode: Q,
                            packId: se,
                            domainurl: window.location.hostname,
                            phonetype: $e(),
                            captchaId: d.value,
                            track: a,
                            deviceId: localStorage.getItem("arvId") || ae.getDeviceId()
                        };
                        i.register(re).then(async I => {
                            var Z;
                            if (I) {
                                l(!1);
                                const Ne = me(),
                                    {
                                        token: oe,
                                        tokenHeader: Oe,
                                        parentUserId: Ve
                                    } = I == null ? void 0 : I.data;
                                Ne.setToken(oe), localStorage.setItem("tokenHeader", Oe), localStorage.setItem("numberType", i.getUserForm.numberType), localStorage.setItem("number", i.userForm.number), H("submit"), R.replace("/"), await i.getUserInfo({
                                    signature: oe
                                });
                                const ne = await i.getUserInfo({
                                    signature: oe
                                });
                                Be("prediction", "userId", [Ve]);
                                const {
                                    onTriggerRegister: Ue
                                } = Ae();
                                Ue((Z = ne == null ? void 0 : ne.data) == null ? void 0 : Z.userId)
                            }
                        }).catch(I => {
                            console.log(i.countDown)
                        }).finally(() => {
                            var I;
                            l(!1), (I = E.value) == null || I.setShowHiden(!1)
                        })
                    })
                },
                A = async () => {
                    ee(async () => {
                        E.value.startRequestGenerate();
                        const a = await J(Ee());
                        a ? (d.value = a.data.captchaId, E.value.endRequestGenerate(a.data.backgroundImage, a.data.sliderImage)) : E.value.endRequestGenerate(null, null)
                    })
                };
            return ce(async () => {
                var r, p, h, u;
                i.setCountDown(0), $.value = await De(["apkInfo"]);
                const a = ((p = (r = $.value) == null ? void 0 : r.apkInfo) == null ? void 0 : p.invitationCode) || ((h = R.currentRoute.value.query.invitationCode) == null ? void 0 : h.toString()) || ((u = R.currentRoute.value.query.r_code) == null ? void 0 : u.toString()) || sessionStorage.getItem("invitecode") || n.invitationCode || "";
                a && (t.value.invitecode = a, sessionStorage.setItem("invitecode", a))
            }), de((a, r) => {
                a.name == "About-AboutDetail" ? sessionStorage.setItem("register_a", JSON.stringify(t.value)) : sessionStorage.setItem("register_a", "")
            }), L({
                showPhoneValidate: F
            }), (a, r) => {
                const p = G("svg-icon"),
                    h = G("van-checkbox");
                return P(), M("div", {
                    class: "register__container",
                    onKeydown: we(U, ["enter"])
                }, [_(qe, {
                    "show-validate": F.value,
                    "onUpdate:showValidate": r[0] || (r[0] = u => F.value = u),
                    number: t.value.number,
                    "onUpdate:number": r[1] || (r[1] = u => t.value.number = u),
                    "number-type": t.value.numberType,
                    type: D.value,
                    onChangeT: T,
                    onChangeN: j,
                    typeP: "register"
                }, null, 8, ["show-validate", "number", "number-type", "type"]), s("div", et, [c(B) ? (P(), M("span", tt, v(c(e)("regTip1")), 1)) : N("v-if", !0), c(B) ? (P(), M("p", at, v(c(e)("regTip2")), 1)) : N("v-if", !0), N("{{ truncateNumber }} ")]), a.registerData.isOpenRegisterSMS !== "0" ? (P(), he(Ge, {
                    key: 0,
                    value: t.value.smsvcode,
                    "onUpdate:value": r[2] || (r[2] = u => t.value.smsvcode = u),
                    sendFunc: V,
                    number: t.value.number,
                    numberType: t.value.numberType
                }, null, 8, ["value", "number", "numberType"])) : N("v-if", !0), _(te, {
                    value: t.value.password,
                    "onUpdate:value": r[3] || (r[3] = u => t.value.password = u),
                    label: c(e)("setPsw")
                }, null, 8, ["value", "label"]), q(s("div", st, [rt, s("span", null, v(c(e)("pswRule")), 1)], 512), [
                    [Y, o.value]
                ]), _(te, {
                    value: t.value.rePassword,
                    "onUpdate:value": r[4] || (r[4] = u => t.value.rePassword = u),
                    label: c(e)("comfirmPsw")
                }, null, 8, ["value", "label"]), q(s("div", ot, [s("span", null, v(c(e)("unmatchedInput")), 1)], 512), [
                    [Y, w.value]
                ]), s("div", nt, [s("div", it, [_(p, {
                    name: "invitation"
                }), s("span", null, v(c(e)("invitationCode")), 1)]), s("div", lt, [q(s("input", {
                    type: "text",
                    "auto-complete": "new-password",
                    autocomplete: "off",
                    name: "userNumber",
                    "onUpdate:modelValue": r[5] || (r[5] = u => t.value.invitecode = u),
                    placeholder: S.value,
                    disabled: m.value,
                    maxlength: "20",
                    onInput: x
                }, null, 40, ut), [
                    [be, t.value.invitecode, void 0, {
                        trim: !0
                    }]
                ])])]), s("div", ct, [_(h, {
                    modelValue: c(i).userForm.termAndPolicy,
                    "onUpdate:modelValue": r[7] || (r[7] = u => c(i).userForm.termAndPolicy = u)
                }, {
                    default: ve(() => [Ie(v(c(e)("readNagree")) + " ", 1), s("span", {
                        onClick: r[6] || (r[6] = Ce(u => z(), ["stop"]))
                    }, v(c(e)("desPrivacy")), 1)]),
                    _: 1
                }, 8, ["modelValue"])]), s("div", dt, [s("button", {
                    onClick: U
                }, v(c(e)("register")), 1), s("button", {
                    class: "login",
                    onClick: O
                }, [s("div", vt, v(c(e)("iHaveAcount")), 1), s("div", gt, v(c(e)("goLogin")), 1)])]), _(Te, {
                    ref_key: "captchaRef",
                    ref: E,
                    "refresh-color": "#FFFFFF",
                    "show-refresh": !0,
                    onFinish: k,
                    onRefresh: A
                }, null, 512)], 40, Ye)
            }
        }
    });
const pt = Me(mt, [
        ["__scopeId", "data-v-e26f70e7"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/components/Login/Register.vue"]
    ]),
    _t = y => (Se("data-v-1679e191"), y = y(), ke(), y),
    ft = ["onKeydown"],
    ht = {
        class: "register__container-tip"
    },
    bt = _t(() => s("div", {
        class: "tipbg"
    }, null, -1)),
    wt = {
        class: "register__container-tips"
    },
    yt = {
        class: "register__container-invitation"
    },
    St = {
        class: "register__container-invitation__label"
    },
    kt = {
        class: "register__container-invitation__input"
    },
    It = ["placeholder", "disabled"],
    Ct = {
        class: "register__container-remember"
    },
    Rt = {
        class: "register__container-button"
    },
    Tt = {
        class: "account"
    },
    Pt = {
        class: "loginin"
    },
    Dt = le({
        __name: "EmailRegister",
        props: {
            registerData: {
                type: Object,
                required: !0
            }
        },
        emits: ["submit"],
        setup(y, {
            expose: L,
            emit: H
        }) {
            const C = y,
                {
                    t: e
                } = fe(),
                b = g(!1),
                i = ge(),
                o = g({
                    smsvcode: "",
                    password: "",
                    rePassword: "",
                    invitecode: "",
                    email: "",
                    registerType: "email",
                    packId: ae.getPackId() || ""
                }),
                t = g("register");
            sessionStorage.getItem("register") && (o.value = JSON.parse(sessionStorage.getItem("register") || ""), sessionStorage.setItem("register", ""));
            const D = ue(),
                R = Pe(),
                F = g(!1),
                w = g(!1),
                $ = g({}),
                n = K(() => {
                    var d, l, k;
                    return !!((l = (d = $.value) == null ? void 0 : d.apkInfo) != null && l.invitationCode || (k = D.currentRoute.value.query) != null && k.invitationCode)
                }),
                m = K(() => C.registerData.isInvitecode == "1" ? e("plsEnterInvitationCode") : e("notNecessary"));
            ie(() => o.value.email, d => {
                i.setCountDown(0)
            }, {
                flush: "post"
            });

            function S() {
                D.push({
                    name: "login"
                })
            }
            const B = async () => {
                    if (!X.email1.test(o.value.email)) return i.setCountEmailDown(0), f({
                        message: e(pe.email),
                        wordBreak: "break-word"
                    });
                    await J(Qe({
                        email: o.value.email,
                        emailType: Fe.Registr
                    })) ? ye(e("sendSuccess")) : i.setCountEmailDown(0)
                },
                O = d => {
                    const l = d.target;
                    console.log("ggg", l.value.replace(/\s/g, "")), l.value = l.value.replace(/[\s\n\t\r]/g, "")
                },
                V = async () => {
                    if (C.registerData.registerEmailState !== "1") return f({
                        message: e("registerClose"),
                        wordBreak: "break-word"
                    });
                    if (C.registerData.isOpenRegisterEmail !== "0")
                        if (o.value.smsvcode.trim()) {
                            if (o.value.smsvcode.trim().length != 6) return f({
                                message: e("verifyCode6Digits"),
                                wordBreak: "break-word"
                            })
                        } else return f({
                            message: e("registerTip6"),
                            wordBreak: "break-word"
                        });
                    if (!X.email1.test(o.value.email)) return f({
                        message: e(pe.email),
                        wordBreak: "break-word"
                    });
                    if (!o.value.password.trim()) return f({
                        message: e("registerTip2"),
                        wordBreak: "break-word"
                    });
                    if (!X.passReg3.test(o.value.password)) {
                        b.value = !0;
                        return
                    }
                    if (!o.value.rePassword.trim()) return f({
                        message: e("registerTip3"),
                        wordBreak: "break-word"
                    });
                    if (o.value.rePassword !== o.value.password) {
                        w.value = !0;
                        return
                    } else w.value = !1;
                    if (!i.userForm.termAndPolicy) return f({
                        message: e("registerDesc1"),
                        wordBreak: "break-word"
                    });
                    C.registerData.hasRegisterCaptcha === "1" ? E() : z("")
                },
                x = d => {
                    o.value.email = d
                },
                U = () => {
                    Re("toPath", "ResetPassword"), D.push({
                        name: "About-AboutDetail"
                    })
                },
                T = g(),
                j = g(""),
                z = async d => {
                    ee(async () => {
                        T.value.startRequestVerify();
                        const {
                            smsvcode: l,
                            password: k,
                            invitecode: A,
                            packId: a
                        } = o.value;
                        let r = {
                            username: o.value.email,
                            smsvcode: l,
                            registerType: o.value.registerType,
                            pwd: k,
                            invitecode: A,
                            domainurl: window.location.hostname,
                            phonetype: $e(),
                            captchaId: j.value,
                            track: d,
                            deviceId: localStorage.getItem("arvId") || ae.getDeviceId(),
                            packId: a
                        };
                        i.register(r).then(async p => {
                            var h;
                            if (p) {
                                const u = me(),
                                    {
                                        token: Q,
                                        tokenHeader: se,
                                        parentUserId: re
                                    } = p == null ? void 0 : p.data;
                                u.setToken(Q), localStorage.setItem("tokenHeader", se), localStorage.setItem("numberType", i.getUserForm.numberType), localStorage.setItem("number", i.userForm.number), H("submit"), D.replace("/");
                                const I = await i.getUserInfo({
                                    signature: Q
                                });
                                Be("prediction", "userId", [re || ""]);
                                const {
                                    onTriggerRegister: Z
                                } = Ae();
                                Z((h = I == null ? void 0 : I.data) == null ? void 0 : h.userId)
                            }
                        }).catch(p => {
                            console.log(i.countEmailDown)
                        }).finally(() => {
                            T.value.setShowHiden(!1)
                        })
                    })
                },
                E = async () => {
                    ee(async () => {
                        T.value.startRequestGenerate();
                        const d = await J(Ee());
                        d ? (j.value = d.data.captchaId, T.value.endRequestGenerate(d.data.backgroundImage, d.data.sliderImage)) : T.value.endRequestGenerate(null, null)
                    })
                };
            return ce(async () => {
                var l, k, A, a;
                i.setCountEmailDown(0), $.value = await De(["apkInfo"]);
                const d = ((k = (l = $.value) == null ? void 0 : l.apkInfo) == null ? void 0 : k.invitationCode) || ((A = D.currentRoute.value.query.invitationCode) == null ? void 0 : A.toString()) || ((a = D.currentRoute.value.query.r_code) == null ? void 0 : a.toString()) || sessionStorage.getItem("invitecode") || R.invitationCode || "";
                d && (o.value.invitecode = d)
            }), de((d, l) => {
                d.name == "About-AboutDetail" ? sessionStorage.setItem("register", JSON.stringify(o.value)) : sessionStorage.setItem("register", "")
            }), L({
                showPhoneValidate: F
            }), (d, l) => {
                const k = G("svg-icon"),
                    A = G("van-checkbox");
                return P(), M("div", {
                    class: "register__container",
                    onKeydown: we(V, ["enter"])
                }, [_(Le, {
                    ref: "email",
                    type: t.value,
                    email: o.value.email,
                    onChangeN: x
                }, null, 8, ["type", "email"]), d.registerData.isOpenRegisterEmail !== "0" ? (P(), he(He, {
                    key: 0,
                    value: o.value.smsvcode,
                    "onUpdate:value": l[0] || (l[0] = a => o.value.smsvcode = a),
                    sendFunc: B,
                    email: o.value.email
                }, null, 8, ["value", "email"])) : N("v-if", !0), _(te, {
                    value: o.value.password,
                    "onUpdate:value": l[1] || (l[1] = a => o.value.password = a),
                    label: c(e)("setPsw")
                }, null, 8, ["value", "label"]), q(s("div", ht, [bt, s("span", null, v(c(e)("pswRule")), 1)], 512), [
                    [Y, b.value]
                ]), _(te, {
                    value: o.value.rePassword,
                    "onUpdate:value": l[2] || (l[2] = a => o.value.rePassword = a),
                    label: c(e)("comfirmPsw")
                }, null, 8, ["value", "label"]), q(s("div", wt, [s("span", null, v(c(e)("unmatchedInput")), 1)], 512), [
                    [Y, w.value]
                ]), s("div", yt, [s("div", St, [_(k, {
                    name: "invitation"
                }), s("span", null, v(c(e)("invitationCode")), 1)]), s("div", kt, [q(s("input", {
                    type: "text",
                    "auto-complete": "new-password",
                    autocomplete: "off",
                    name: "userNumber",
                    "onUpdate:modelValue": l[3] || (l[3] = a => o.value.invitecode = a),
                    placeholder: m.value,
                    disabled: n.value,
                    maxlength: "20",
                    onInput: O
                }, null, 40, It), [
                    [be, o.value.invitecode, void 0, {
                        trim: !0
                    }]
                ])])]), s("div", Ct, [_(A, {
                    modelValue: c(i).userForm.termAndPolicy,
                    "onUpdate:modelValue": l[5] || (l[5] = a => c(i).userForm.termAndPolicy = a)
                }, {
                    default: ve(() => [Ie(v(c(e)("readNagree")) + " ", 1), s("span", {
                        onClick: l[4] || (l[4] = Ce(a => U(), ["stop"]))
                    }, v(c(e)("desPrivacy")), 1)]),
                    _: 1
                }, 8, ["modelValue"])]), s("div", Rt, [s("button", {
                    onClick: V
                }, v(c(e)("register")), 1), s("button", {
                    class: "login",
                    onClick: S
                }, [s("div", Tt, v(c(e)("iHaveAcount")), 1), s("div", Pt, v(c(e)("goLogin")), 1)])]), _(Te, {
                    ref_key: "captchaRef",
                    ref: T,
                    "refresh-color": "#FFFFFF",
                    "show-refresh": !0,
                    onFinish: z,
                    onRefresh: E
                }, null, 512)], 40, ft)
            }
        }
    });
const Ft = Me(Dt, [
        ["__scopeId", "data-v-1679e191"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/components/Login/EmailRegister.vue"]
    ]),
    $t = {
        class: "resgister__C"
    },
    Bt = {
        class: "resgister__C-heading"
    },
    Et = {
        class: "resgister__C-heading__title"
    },
    At = {
        class: "resgister__C-heading__subTitle"
    },
    Mt = {
        class: "login_container-tab"
    },
    Nt = {
        class: "resgister__C-form"
    },
    xt = le({
        __name: "index",
        setup(y) {
            const {
                openAll: L
            } = Ze(), H = me(), C = ge();
            g("");
            const e = g({
                    isRegisterState: "1",
                    SMSstate: "0",
                    registerStateMsg: "",
                    hasRegisterCaptcha: "0",
                    registerEmailState: "0",
                    registerMobileState: "0",
                    isOpenRegisterSMS: "0",
                    isOpenRegisterEmail: "0",
                    isInvitecode: "0"
                }),
                b = g("phone"),
                i = ue();
            H.token && i.push({
                name: "home"
            });
            const o = n => {
                b.value = n
            };
            de((n, m, S) => {
                S(), n.name === "home" && L()
            });
            const t = g();

            function D() {
                i.push({
                    name: "home"
                })
            }
            async function R() {
                var m, S, B, O, V, x, U, T;
                const n = await J(We());
                n && (e.value.isRegisterState = n.data.registerState, e.value.registerStateMsg = n.data.registerStateMsg, e.value.registerEmailState = n.data.registerEmailState, e.value.registerMobileState = (m = n.data) == null ? void 0 : m.registerMobileState, e.value.isOpenRegisterSMS = (S = n.data) == null ? void 0 : S.isOpenRegisterSMS, e.value.isOpenRegisterEmail = (B = n.data) == null ? void 0 : B.isOpenRegisterEmail, e.value.hasRegisterCaptcha = n.data.isOpenRegisterCaptcha, e.value.isInvitecode = (O = n.data) == null ? void 0 : O.isInvitecode, C.setTermAndPolicy(((V = n.data) == null ? void 0 : V.registerPrivacyChecked) === "1"), console.log("res", n), Number(n.data.registerEmailState) + Number((x = n.data) == null ? void 0 : x.registerMobileState) == 0 ? (((U = n.data) == null ? void 0 : U.isOpenRegisterSMS) !== "1" && (b.value = "email"), i.push({
                    name: "login"
                })) : (e.value.registerSMSState = n.data.registerSMSState, e.value.registerEmailState !== "0" && ((T = n.data) == null ? void 0 : T.registerMobileState) == "0" && (b.value = "email")))
            }
            R();

            function F() {
                const m = window.location.hash.match(/invitationCode=([\d]+)/);
                return m ? m[1] : null
            }
            const w = g(null),
                $ = () => {
                    w.value && (console.log("提交邀请码:", w.value), window.gtag && window.gtag("event", "register_button_click", {
                        invitation_code: w.value
                    }))
                };
            return F(), ce(async () => {
                w.value = F(), w.value && (window.gtag ? (window.gtag("event", "page_view_with_invitation", {
                    invitation_code: w.value
                }), console.log("Google Analytics 已初始化，发送页面浏览事件")) : console.warn("Google Analytics 未初始化，无法发送事件"));
                const {
                    default: n
                } = await xe(() =>
                    import ("./chunk.fingerprintjs-e0490b82.js"), ["assets/js/chunk.fingerprintjs-e0490b82.js", "assets/js/common.modules-5cfe2cf4.js", "assets/css/common-05d2aa17.css"]);
                localStorage.getItem("arvId") || n.load().then(m => {
                    m.get().then(S => {
                        localStorage.setItem("arvId", S.visitorId)
                    })
                }).catch(m => {
                    console.error("Error generating fingerprint:", m)
                })
            }), (n, m) => {
                const S = G("NavBar"),
                    B = G("svg-icon");
                return P(), M("div", $t, [_(S, {
                    onClickLeft: D,
                    leftArrow: !0,
                    headLogo: !0,
                    class: "main"
                }, {
                    right: ve(() => [_(Ke)]),
                    _: 1
                }), s("div", Bt, [s("h1", Et, v(n.$t("register")), 1), s("div", At, [s("span", null, v(n.$t("registerbyphoneoremail")), 1)])]), s("div", Mt, [e.value.registerMobileState != "0" ? (P(), M("div", {
                    key: 0,
                    class: W(["tab", [b.value == "phone" ? "active" : ""]]),
                    onClick: m[0] || (m[0] = O => o("phone"))
                }, [_(B, {
                    name: "phone"
                }), s("div", null, v(n.$t("phoneregister")), 1)], 2)) : N("v-if", !0), e.value.registerEmailState != "0" ? (P(), M("div", {
                    key: 1,
                    class: W(["tab", [b.value == "email" ? "active" : ""]]),
                    onClick: m[1] || (m[1] = O => o("email"))
                }, [_(B, {
                    name: "email"
                }), s("div", null, v(n.$t("emailregister")), 1)], 2)) : N("v-if", !0)]), s("div", Nt, [e.value.registerMobileState != "0" ? (P(), M("div", {
                    key: 0,
                    class: W(["tab-content", [b.value == "phone" ? "activecontent" : ""]])
                }, [_(pt, {
                    ref_key: "register",
                    ref: t,
                    registerData: e.value,
                    onSubmit: $
                }, null, 8, ["registerData"])], 2)) : N("v-if", !0), e.value.registerEmailState != "0" ? (P(), M("div", {
                    key: 1,
                    class: W(["tab-content", [b.value == "email" ? "activecontent" : ""]])
                }, [_(Ft, {
                    ref_key: "register",
                    ref: t,
                    registerData: e.value,
                    onSubmit: $
                }, null, 8, ["registerData"])], 2)) : N("v-if", !0)])])
            }
        }
    });
export {
    xt as _
};