import{n as r,e as k,c as g,d as _,i as R,h as f,p as U,q as C,r as S,t as T,s}from"./index-CsRk2AqG.js";import{k as N}from"./dataProvider-CZSEeRvI.js";import{V as B,a as D}from"./VRow-DHfYjRE7.js";import{V as G}from"./VForm-Df2xYgvp.js";import{V as n}from"./VTextField-Bo6WlR6l.js";import{V as F}from"./VContainer-C6YXnkuM.js";import{b as i,a3 as K,X as Y,Y as j,Z as t,j as e,a1 as o,S as c,e as y}from"./vendor-vue-wu2SJQxD.js";import"./vendor-vuetify-BaOIwHiz.js";import"./vendor-utils-DwjQ18Dh.js";import"./serverRotation-BLypxz6S.js";const I="kvinit.redirecting",W={__name:"debug-init",setup(q){const d=i(r("server.provider")||"kv-server"),m=i(r("server.kvToken")||""),v=i(r("device.uuid")||"00000000-0000-4000-8000-000000000000"),p=i(r("server.authDomain")||"https://cs.example.com"),b=()=>{s("server.provider",d.value),s("server.kvToken",m.value),s("device.uuid",v.value),s("server.authDomain",p.value),location.reload()},w=()=>{try{sessionStorage.removeItem(I)}catch(u){console.debug(u)}},x=()=>{N.loadNamespaceInfo=async()=>{throw new Error("模拟加载错误")},location.reload()},E=y(()=>{try{return sessionStorage.getItem(I)}catch(u){return String(u)}}),L=y(()=>JSON.stringify({provider:r("server.provider"),kvToken:r("server.kvToken"),uuid:r("device.uuid"),authDomain:r("server.authDomain")},null,2));return(u,l)=>{const V=K("v-list-item-content");return Y(),j(F,null,{default:t(()=>[e(B,null,{default:t(()=>[e(D,{cols:"12",md:"6"},{default:t(()=>[e(k,null,{default:t(()=>[e(g,null,{default:t(()=>[...l[4]||(l[4]=[o("KvInitialize 调试面板",-1)])]),_:1}),e(_,null,{default:t(()=>[e(G,null,{default:t(()=>[e(n,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=a=>d.value=a),label:"server.provider (kv-server/classworkscloud/other)"},null,8,["modelValue"]),e(n,{modelValue:m.value,"onUpdate:modelValue":l[1]||(l[1]=a=>m.value=a),label:"server.kvToken (空表示未授权)"},null,8,["modelValue"]),e(n,{modelValue:v.value,"onUpdate:modelValue":l[2]||(l[2]=a=>v.value=a),label:"device.uuid"},null,8,["modelValue"]),e(n,{modelValue:p.value,"onUpdate:modelValue":l[3]||(l[3]=a=>p.value=a),label:"server.authDomain"},null,8,["modelValue"])]),_:1}),e(R,{class:"my-4"}),e(f,{class:"me-2",color:"primary",onClick:b},{default:t(()=>[...l[5]||(l[5]=[o(" 应用设置 ",-1)])]),_:1}),e(f,{class:"me-2",color:"secondary",onClick:w},{default:t(()=>[...l[6]||(l[6]=[o(" 清除重定向守卫 ",-1)])]),_:1}),e(f,{color:"error",onClick:x},{default:t(()=>[...l[7]||(l[7]=[o(" 模拟命名空间加载错误 ",-1)])]),_:1}),e(U,{"two-line":""},{default:t(()=>[e(C,null,{default:t(()=>[e(V,null,{default:t(()=>[e(S,null,{default:t(()=>[...l[8]||(l[8]=[o("当前 sessionGuard",-1)])]),_:1}),e(T,null,{default:t(()=>[o(c(E.value),1)]),_:1})]),_:1})]),_:1}),e(C,null,{default:t(()=>[e(V,null,{default:t(()=>[e(S,null,{default:t(()=>[...l[9]||(l[9]=[o("当前 settings",-1)])]),_:1}),e(T,null,{default:t(()=>[o(c(L.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e(D,{cols:"12",md:"6"},{default:t(()=>[e(k,null,{default:t(()=>[e(g,null,{default:t(()=>[...l[10]||(l[10]=[o("初始化组件已替换",-1)])]),_:1}),e(_,null,{default:t(()=>[...l[11]||(l[11]=[o(" 已迁移为首页内联的 InitServiceChooser 组件。 ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}};export{W as default};
