paskia 0.9.1__py3-none-any.whl → 0.10.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. paskia/_version.py +2 -2
  2. paskia/bootstrap.py +8 -7
  3. paskia/db/__init__.py +2 -0
  4. paskia/db/background.py +5 -8
  5. paskia/db/jsonl.py +2 -2
  6. paskia/db/logging.py +130 -45
  7. paskia/db/operations.py +25 -4
  8. paskia/db/structs.py +3 -2
  9. paskia/fastapi/__main__.py +33 -19
  10. paskia/fastapi/admin.py +2 -2
  11. paskia/fastapi/api.py +7 -3
  12. paskia/fastapi/authz.py +11 -9
  13. paskia/fastapi/logging.py +64 -21
  14. paskia/fastapi/mainapp.py +8 -5
  15. paskia/fastapi/remote.py +11 -37
  16. paskia/fastapi/user.py +22 -0
  17. paskia/fastapi/ws.py +12 -35
  18. paskia/fastapi/wschat.py +55 -2
  19. paskia/fastapi/wsutil.py +2 -7
  20. paskia/frontend-build/auth/admin/index.html +7 -6
  21. paskia/frontend-build/auth/assets/{AccessDenied-DPkUS8LZ.css → AccessDenied-CVQZxSIL.css} +1 -1
  22. paskia/frontend-build/auth/assets/AccessDenied-Licr0tqA.js +8 -0
  23. paskia/frontend-build/auth/assets/{RestrictedAuth-CvR33_Z0.css → RestrictedAuth-0MFeNWS2.css} +1 -1
  24. paskia/frontend-build/auth/assets/{RestrictedAuth-DsJXicIw.js → RestrictedAuth-DWKMTEV3.js} +1 -1
  25. paskia/frontend-build/auth/assets/_plugin-vue_export-helper-DJsHCwvl.js +33 -0
  26. paskia/frontend-build/auth/assets/_plugin-vue_export-helper-DUBf8-iM.css +1 -0
  27. paskia/frontend-build/auth/assets/{admin-DzzjSg72.css → admin-B1H4YqM_.css} +1 -1
  28. paskia/frontend-build/auth/assets/admin-CZKsX1OI.js +1 -0
  29. paskia/frontend-build/auth/assets/{auth-C7k64Wad.css → auth-B4EpDxom.css} +1 -1
  30. paskia/frontend-build/auth/assets/auth-Pe-PKe8b.js +1 -0
  31. paskia/frontend-build/auth/assets/forward-BC0p23CH.js +1 -0
  32. paskia/frontend-build/auth/assets/{pow-2N9bxgAo.js → pow-DUr-T9XX.js} +1 -1
  33. paskia/frontend-build/auth/assets/reset-B8PlNXuP.css +1 -0
  34. paskia/frontend-build/auth/assets/reset-CkY9h28U.js +1 -0
  35. paskia/frontend-build/auth/assets/restricted-C9cJlHkd.js +1 -0
  36. paskia/frontend-build/auth/assets/theme-C2WysaSw.js +1 -0
  37. paskia/frontend-build/auth/index.html +8 -7
  38. paskia/frontend-build/auth/restricted/index.html +7 -6
  39. paskia/frontend-build/int/forward/index.html +6 -6
  40. paskia/frontend-build/int/reset/index.html +4 -4
  41. paskia/frontend-build/paskia.webp +0 -0
  42. paskia/util/__init__.py +0 -0
  43. paskia/util/apistructs.py +110 -0
  44. paskia/util/frontend.py +75 -0
  45. paskia/util/hostutil.py +75 -0
  46. paskia/util/htmlutil.py +47 -0
  47. paskia/util/passphrase.py +20 -0
  48. paskia/util/permutil.py +43 -0
  49. paskia/util/pow.py +45 -0
  50. paskia/util/querysafe.py +11 -0
  51. paskia/util/sessionutil.py +38 -0
  52. paskia/util/startupbox.py +103 -0
  53. paskia/util/timeutil.py +47 -0
  54. paskia/util/useragent.py +10 -0
  55. paskia/util/userinfo.py +63 -0
  56. paskia/util/vitedev.py +71 -0
  57. paskia/util/wordlist.py +54 -0
  58. {paskia-0.9.1.dist-info → paskia-0.10.2.dist-info}/METADATA +14 -11
  59. paskia-0.10.2.dist-info/RECORD +78 -0
  60. paskia/frontend-build/auth/assets/AccessDenied-Fmeb6EtF.js +0 -8
  61. paskia/frontend-build/auth/assets/_plugin-vue_export-helper-BTzJAQlS.css +0 -1
  62. paskia/frontend-build/auth/assets/_plugin-vue_export-helper-nhjnO_bd.js +0 -2
  63. paskia/frontend-build/auth/assets/admin-CPE1pLMm.js +0 -1
  64. paskia/frontend-build/auth/assets/auth-YIZvPlW_.js +0 -1
  65. paskia/frontend-build/auth/assets/forward-DmqVHZ7e.js +0 -1
  66. paskia/frontend-build/auth/assets/reset-Chtv69AT.css +0 -1
  67. paskia/frontend-build/auth/assets/reset-s20PATTN.js +0 -1
  68. paskia/frontend-build/auth/assets/restricted-D3AJx3_6.js +0 -1
  69. paskia-0.9.1.dist-info/RECORD +0 -60
  70. {paskia-0.9.1.dist-info → paskia-0.10.2.dist-info}/WHEEL +0 -0
  71. {paskia-0.9.1.dist-info → paskia-0.10.2.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,8 @@
1
+ import{k as F,M as At,P as Rt,Q as Yt,R as Qt,S as ue,T as Tt,U as Gt,V as Wt,W as Zt,X as Xt,n as xe,Y as en,m as x,w as Oe,z as Q,l as tn,Z as nn,$ as on,u as U,b as T,c as M,d as v,t as D,e as se,g as L,_ as Y,F as oe,r as ce,A as z,E as Mt,j as de,a0 as Nt,a1 as Pt,a2 as Dt,a3 as Lt,o as qt,a4 as rn,a as Ft,B as sn,h as $e,i as an,a5 as ln,L as un,q as cn}from"./_plugin-vue_export-helper-DJsHCwvl.js";import{f as G,h as ae,g as We}from"./helpers-DzjFIx78.js";import{u as dn}from"./theme-C2WysaSw.js";let Ut;const fe=e=>Ut=e,Kt=Symbol();function je(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var re;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(re||(re={}));function Sr(){const e=Rt(!0),s=e.run(()=>F({}));let r=[],t=[];const n=At({install(o){fe(n),n._a=o,o.provide(Kt,n),o.config.globalProperties.$pinia=n,t.forEach(i=>r.push(i)),t=[]},use(o){return this._a?r.push(o):t.push(o),this},_p:r,_a:null,_e:e,_s:new Map,state:s});return n}const Vt=()=>{};function Ze(e,s,r,t=Vt){e.add(s);const n=()=>{e.delete(s)&&t()};return!r&&Wt()&&Zt(n),n}function ee(e,...s){e.forEach(r=>{r(...s)})}const fn=e=>e(),Xe=Symbol(),we=Symbol();function ze(e,s){e instanceof Map&&s instanceof Map?s.forEach((r,t)=>e.set(t,r)):e instanceof Set&&s instanceof Set&&s.forEach(e.add,e);for(const r in s){if(!s.hasOwnProperty(r))continue;const t=s[r],n=e[r];je(n)&&je(t)&&e.hasOwnProperty(r)&&!ue(t)&&!Tt(t)?e[r]=ze(n,t):e[r]=t}return e}const hn=Symbol();function gn(e){return!je(e)||!Object.prototype.hasOwnProperty.call(e,hn)}const{assign:J}=Object;function mn(e){return!!(ue(e)&&e.effect)}function yn(e,s,r,t){const{state:n,actions:o,getters:i}=s,l=r.state.value[e];let a;function u(){l||(r.state.value[e]=n?n():{});const d=en(r.state.value[e]);return J(d,o,Object.keys(i||{}).reduce((p,b)=>(p[b]=At(x(()=>{fe(r);const f=r._s.get(e);return i[b].call(f,f)})),p),{}))}return a=Ht(e,u,s,r,t,!0),a}function Ht(e,s,r={},t,n,o){let i;const l=J({actions:{}},r),a={deep:!0};let u,d,p=new Set,b=new Set,f;const w=t.state.value[e];!o&&!w&&(t.state.value[e]={});let h;function _(m){let g;u=d=!1,typeof m=="function"?(m(t.state.value[e]),g={type:re.patchFunction,storeId:e,events:f}):(ze(t.state.value[e],m),g={type:re.patchObject,payload:m,storeId:e,events:f});const E=h=Symbol();xe().then(()=>{h===E&&(u=!0)}),d=!0,ee(p,g,t.state.value[e])}const A=o?function(){const{state:g}=r,E=g?g():{};this.$patch(k=>{J(k,E)})}:Vt;function P(){i.stop(),p.clear(),b.clear(),t._s.delete(e)}const c=(m,g="")=>{if(Xe in m)return m[we]=g,m;const E=function(){fe(t);const k=Array.from(arguments),B=new Set,I=new Set;function N(q){B.add(q)}function V(q){I.add(q)}ee(b,{args:k,name:E[we],store:R,after:N,onError:V});let K;try{K=m.apply(this&&this.$id===e?this:R,k)}catch(q){throw ee(I,q),q}return K instanceof Promise?K.then(q=>(ee(B,q),q)).catch(q=>(ee(I,q),Promise.reject(q))):(ee(B,K),K)};return E[Xe]=!0,E[we]=g,E},S={_p:t,$id:e,$onAction:Ze.bind(null,b),$patch:_,$reset:A,$subscribe(m,g={}){const E=Ze(p,m,g.detached,()=>k()),k=i.run(()=>Oe(()=>t.state.value[e],B=>{(g.flush==="sync"?d:u)&&m({storeId:e,type:re.direct,events:f},B)},J({},a,g)));return E},$dispose:P},R=Xt(S);t._s.set(e,R);const y=(t._a&&t._a.runWithContext||fn)(()=>t._e.run(()=>(i=Rt()).run(()=>s({action:c}))));for(const m in y){const g=y[m];if(ue(g)&&!mn(g)||Tt(g))o||(w&&gn(g)&&(ue(g)?g.value=w[m]:ze(g,w[m])),t.state.value[e][m]=g);else if(typeof g=="function"){const E=c(g,m);y[m]=E,l.actions[m]=g}}return J(R,y),J(Gt(R),y),Object.defineProperty(R,"$state",{get:()=>t.state.value[e],set:m=>{_(g=>{J(g,m)})}}),t._p.forEach(m=>{J(R,i.run(()=>m({store:R,app:t._a,pinia:t,options:l})))}),w&&o&&r.hydrate&&r.hydrate(R.$state,w),u=!0,d=!0,R}function pn(e,s,r){let t;const n=typeof s=="function";t=n?r:s;function o(i,l){const a=Qt();return i=i||(a?Yt(Kt,null):null),i&&fe(i),i=Ut,i._s.has(e)||(n?Ht(e,s,t,i):yn(e,t,i)),i._s.get(e)}return o.$id=e,o}const he=pn("auth",{state:()=>({userInfo:null,isLoading:!1,settings:null,currentView:"login",status:{message:"",type:"info",show:!1}}),getters:{},actions:{setLoading(e){this.isLoading=!!e},showMessage(e,s="info",r=null){const t=r??(s==="error"?5e3:3e3);this.status={message:e,type:s,show:!0},t>0&&setTimeout(()=>{this.status.show=!1},t)},async setSessionCookie(e){if(!e?.session_token)throw console.error("setSessionCookie called with missing session_token:",e),new Error("Authentication response missing session_token");return await Q("/auth/api/set-session",{method:"POST",headers:{Authorization:`Bearer ${e.session_token}`}})},async register(){this.isLoading=!0;try{const e=await on();return await this.setSessionCookie(e),await this.loadUserInfo(),this.selectView(),e}finally{this.isLoading=!1}},async authenticate(){this.isLoading=!0;try{const e=await nn();return await this.setSessionCookie(e),await this.loadUserInfo(),this.selectView(),e}finally{this.isLoading=!1}},selectView(){this.userInfo?this.currentView="profile":this.currentView="login"},async loadSettings(){this.settings=await tn()},async loadUserInfo(){try{this.userInfo=await Q("/auth/api/user-info",{method:"POST"}),dn(this.userInfo?.ctx),console.log("User info loaded:",this.userInfo)}catch(e){throw e.status===401||e.status===403?console.log("Authentication required:",e.message):this.showMessage(e.message||"Failed to load user info","error",5e3),e}},async deleteCredential(e){await Q(`/auth/api/user/credential/${e}`,{method:"DELETE"}),await this.loadUserInfo()},async terminateSession(e){try{if((await Q(`/auth/api/user/session/${e}`,{method:"DELETE"}))?.current_session_terminated){sessionStorage.clear(),location.reload();return}await this.loadUserInfo(),this.showMessage("Session terminated","success",2500)}catch(s){throw console.error("Terminate session error:",s),s}},async logout(){try{await Q("/auth/api/logout",{method:"POST"}),sessionStorage.clear(),location.reload()}catch(e){console.error("Logout error:",e),e.status!==401&&e.status!==403&&this.showMessage(e.message,"error")}},async logoutEverywhere(){try{await Q("/auth/api/user/logout-all",{method:"POST"}),sessionStorage.clear(),location.reload()}catch(e){console.error("Logout-all error:",e),e.status!==401&&e.status!==403&&this.showMessage(e.message,"error")}}}}),wn={key:0,class:"global-status",style:{display:"block"}},Er={__name:"StatusMessage",setup(e){const s=he();return(r,t)=>U(s).status.show?(T(),M("div",wn,[v("div",{class:se(["status",U(s).status.type])},D(U(s).status.message),3)])):L("",!0)}},bn=["href"],vn={key:0,class:"sep"},Cn={__name:"Breadcrumbs",props:{entries:{type:Array,default:()=>[]},showHome:{type:Boolean,default:!0},homeHref:{type:String,default:"/"}},setup(e,{expose:s}){const r=e,t=F(null),n=x(()=>r.showHome&&r.entries.length>0&&r.entries[0].href===r.homeHref?[{label:"🏠 "+r.entries[0].label,href:r.homeHref},...r.entries.slice(1)]:[...r.showHome?[{label:"🏠",href:r.homeHref}]:[],...r.entries]),o=x(()=>{const u=window.location.hash||window.location.pathname;for(let d=n.value.length-1;d>=0;d--){const p=n.value[d].href;if(p===u||p&&u.startsWith(p))return d}return n.value.length-1});function i(u){if(u.target===t.value){const d=t.value.querySelectorAll("a"),p=Math.min(o.value,d.length-1);d[p]&&d[p].focus()}}function l(u){const d=z(u);d&&(d==="left"||d==="right")&&(u.preventDefault(),Mt(t.value,u.target,d,{itemSelector:"a"}))}function a(){const u=t.value?.querySelectorAll("a");if(u?.length){const d=Math.min(o.value,u.length-1);u[d]?.focus()}}return s({focusCurrent:a}),(u,d)=>n.value.length>1?(T(),M("nav",{key:0,ref_key:"navRef",ref:t,class:"breadcrumbs","aria-label":"Breadcrumb",tabindex:"0",onFocusin:i,onKeydown:l},[v("ol",null,[(T(!0),M(oe,null,ce(n.value,(p,b)=>(T(),M("li",{key:b},[v("a",{href:p.href,tabindex:"-1"},D(p.label),9,bn),b<n.value.length-1?(T(),M("span",vn," — ")):L("",!0)]))),128))])],544)):L("",!0)}},_r=Y(Cn,[["__scopeId","data-v-6344dbb8"]]),Sn={key:0},En={key:1},_n=["onFocusin","onKeydown"],kn={class:"item-top"},Bn={class:"item-icon"},In=["src","alt"],An={key:1,class:"auth-emoji"},Rn={class:"item-title"},Tn={class:"item-actions"},Mn={key:0,class:"badge badge-current"},Nn={key:1,class:"badge badge-current"},Pn={key:2,class:"badge badge-current"},Dn=["onClick","disabled","title"],Ln={class:"item-details"},qn={class:"credential-dates"},Fn={class:"date-value"},Un={class:"date-value"},Kn={class:"date-value"},kr={__name:"CredentialList",props:{credentials:{type:Array,default:()=>[]},aaguidInfo:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1},allowDelete:{type:Boolean,default:!1},hoveredCredentialUuid:{type:String,default:null},hoveredSessionCredentialUuid:{type:String,default:null},navigationDisabled:{type:Boolean,default:!1}},emits:["delete","credentialHover","navigate-out"],setup(e,{emit:s}){const r=e,t=s,n=f=>{t("credentialHover",f)},o=f=>{f.currentTarget.contains(f.relatedTarget)||t("credentialHover",null)},i=f=>{f.currentTarget.matches(":focus")||(f.currentTarget.focus(),f.stopPropagation())},l=(f,w)=>{Pt(f,()=>{r.allowDelete&&!w.is_current_session&&t("delete",w)})},a=f=>{if(r.navigationDisabled)return;const w=f.currentTarget;if(f.target===w){const h=w.querySelector(".credential-item");h&&h.focus()}},u=f=>{r.navigationDisabled||Dt(f,w=>t("navigate-out",w))},d=(f,w)=>{if(l(f,w),f.defaultPrevented||r.navigationDisabled)return;const h=z(f);if(h){f.preventDefault();const _=f.currentTarget.closest(".credential-list");Nt(_,f.currentTarget,h,{itemSelector:".credential-item"})==="boundary"&&t("navigate-out",h)}},p=f=>{const w=r.aaguidInfo?.[f.aaguid];return w?w.name:"Unknown Authenticator"},b=f=>{const w=r.aaguidInfo?.[f.aaguid];if(!w)return null;const _=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"icon_dark":"icon_light";return w[_]||null};return(f,w)=>(T(),M("div",{class:"credential-list",tabindex:"0",onFocusin:a,onKeydown:u},[e.loading?(T(),M("div",Sn,[...w[2]||(w[2]=[v("p",null,"Loading credentials...",-1)])])):e.credentials?.length?(T(!0),M(oe,{key:2},ce(e.credentials,h=>(T(),M("div",{key:h.credential,class:se(["credential-item",{"current-session":h.is_current_session&&!e.hoveredCredentialUuid&&!e.hoveredSessionCredentialUuid,"is-hovered":e.hoveredCredentialUuid===h.credential,"is-linked-session":e.hoveredSessionCredentialUuid===h.credential}]),tabindex:"-1",onMousedown:w[0]||(w[0]=de(()=>{},["prevent"])),onClickCapture:i,onFocusin:_=>n(h.credential),onFocusout:w[1]||(w[1]=_=>o(_)),onKeydown:_=>d(_,h)},[v("div",kn,[v("div",Bn,[b(h)?(T(),M("img",{key:0,src:b(h),alt:p(h),class:"auth-icon",width:"32",height:"32"},null,8,In)):(T(),M("span",An,"🔑"))]),v("h4",Rn,D(p(h)),1),v("div",Tn,[h.is_current_session&&!e.hoveredCredentialUuid&&!e.hoveredSessionCredentialUuid?(T(),M("span",Mn,"Current")):e.hoveredCredentialUuid===h.credential?(T(),M("span",Nn,"Selected")):e.hoveredSessionCredentialUuid===h.credential?(T(),M("span",Pn,"Linked")):L("",!0),e.allowDelete?(T(),M("button",{key:3,onClick:_=>f.$emit("delete",h),class:"btn-card-delete",disabled:h.is_current_session,title:h.is_current_session?"Cannot delete current session credential":"Delete passkey and terminate any linked sessions.",tabindex:"-1"},"❌",8,Dn)):L("",!0)])]),v("div",Ln,[v("div",qn,[w[4]||(w[4]=v("span",{class:"date-label"},"Created:",-1)),v("span",Fn,D(U(G)(h.created_at)),1),w[5]||(w[5]=v("span",{class:"date-label"},"Last used:",-1)),v("span",Un,D(U(G)(h.last_used)),1),w[6]||(w[6]=v("span",{class:"date-label"},"Last verified:",-1)),v("span",Kn,D(U(G)(h.last_verified)),1)])])],42,_n))),128)):(T(),M("div",En,[...w[3]||(w[3]=[v("p",null,"No passkeys found.",-1)])]))],32))}},Vn={class:"user-name-heading"},Hn={class:"user-name-row"},On=["title"],jn={key:0,class:"org-role-sub"},zn={key:0,class:"org-line"},xn={key:1,class:"role-line"},$n={class:"user-details"},Jn={class:"date-value"},Yn={class:"date-value"},Qn={class:"date-value"},Gn={key:1,class:"user-info-extra"},Wn={__name:"UserBasicInfo",props:{name:{type:String,required:!0},visits:{type:[Number,String],default:0},createdAt:{type:[String,Number,Date],default:null},lastSeen:{type:[String,Number,Date],default:null},updateEndpoint:{type:String,default:null},canEdit:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},orgDisplayName:{type:String,default:""},roleName:{type:String,default:""}},emits:["saved","editName"],setup(e,{emit:s}){const r=e,t=s;he();const n=x(()=>!!r.name);return(o,i)=>n.value?(T(),M("div",{key:0,class:se(["user-info",{"has-extra":o.$slots.default}])},[v("h3",Vn,[i[1]||(i[1]=v("span",{class:"icon"},"👤",-1)),v("span",Hn,[v("span",{class:"display-name",title:e.name},D(e.name),9,On),e.canEdit&&e.updateEndpoint?(T(),M("button",{key:0,class:"mini-btn",onClick:i[0]||(i[0]=l=>t("editName")),title:"Edit name"},"✏️")):L("",!0)])]),e.orgDisplayName||e.roleName?(T(),M("div",jn,[e.orgDisplayName?(T(),M("div",zn,D(e.orgDisplayName),1)):L("",!0),e.roleName?(T(),M("div",xn,D(e.roleName),1)):L("",!0)])):L("",!0),v("div",$n,[i[2]||(i[2]=v("span",{class:"date-label"},[v("strong",null,"Visits:")],-1)),v("span",Jn,D(e.visits||0),1),i[3]||(i[3]=v("span",{class:"date-label"},[v("strong",null,"Registered:")],-1)),v("span",Yn,D(U(G)(e.createdAt)),1),i[4]||(i[4]=v("span",{class:"date-label"},[v("strong",null,"Last seen:")],-1)),v("span",Qn,D(U(G)(e.lastSeen)),1)]),o.$slots.default?(T(),M("div",Gn,[Lt(o.$slots,"default",{},void 0)])):L("",!0)],2)):L("",!0)}},Br=Y(Wn,[["__scopeId","data-v-ce373d6c"]]),Zn={__name:"Modal",props:{focusFallback:{type:[HTMLElement,Object],default:null},focusIndex:{type:Number,default:-1},focusSiblingSelector:{type:String,default:""}},emits:["close"],setup(e){const s=e,r=F(null),t=F(null),n=()=>{const i=t.value;if(!i)return;if(document.body.contains(i)&&!i.disabled){i.focus();return}if(s.focusSiblingSelector&&s.focusIndex>=0){const a=[s.focusFallback?.$el||s.focusFallback,i.closest("[data-nav-group]"),i.parentElement?.closest("section"),document.querySelector(".view-root")].filter(Boolean);for(const u of a){if(!u)continue;const d=u.querySelectorAll(s.focusSiblingSelector);if(d.length>0){const p=Math.min(s.focusIndex,d.length-1),b=d[p];if(b&&!b.disabled){b.focus();return}}}}const l=s.focusFallback?.$el||s.focusFallback;if(l&&document.body.contains(l)){const a=l.querySelector?.('button:not([disabled]), a, [tabindex="0"]')||l;if(a?.focus){a.focus();return}}},o=i=>{const l=z(i);if(!l)return;const a=i.target,u=a.closest(".modal-actions");if(u&&(l==="left"||l==="right"))i.preventDefault(),Mt(u,a,l,{itemSelector:"button"});else if(l==="up"&&u){i.preventDefault();const p=(u.closest("form")||u.closest(".modal-form"))?.querySelectorAll("input, textarea, select, button:not(.modal-actions button)");p&&p.length>0&&p[p.length-1].focus()}else if(l==="down"&&!u){const d=a.closest("form")||a.closest(".modal-form");if(d){i.preventDefault();const p=d.querySelector(".modal-actions");p&&sn(p,{primarySelector:".btn-primary",itemSelector:"button"})}}};return qt(()=>{t.value=document.activeElement,xe(()=>{if(r.value){r.value.showModal();const i=r.value.querySelector(".modal-actions .btn-primary");i&&i.setAttribute("data-nav-primary",""),rn(r.value)}})}),Ft(()=>{n()}),(i,l)=>(T(),M("dialog",{ref_key:"dialog",ref:r,onClose:l[0]||(l[0]=a=>i.$emit("close")),onKeydown:o},[Lt(i.$slots,"default",{},void 0)],544))}},Ir=Y(Zn,[["__scopeId","data-v-2ebcbb0a"]]),Xn={class:"name-edit-form"},eo=["for"],to=["id","type","placeholder","disabled"],no={key:0,class:"error small"},oo=["disabled"],ro=["disabled"],so={__name:"NameEditForm",props:{modelValue:{type:String,default:""},label:{type:String,default:"Name"},placeholder:{type:String,default:""},submitText:{type:String,default:"Save"},cancelText:{type:String,default:"Cancel"},busy:{type:Boolean,default:!1},error:{type:String,default:""},autoFocus:{type:Boolean,default:!0},autoSelect:{type:Boolean,default:!0},inputId:{type:String,default:null},inputType:{type:String,default:"text"}},emits:["update:modelValue","cancel"],setup(e,{emit:s}){const r=e,t=s,n=F(null),o=`name-edit-${Math.random().toString(36).slice(2,10)}`,i=x({get:()=>r.modelValue,set:d=>t("update:modelValue",d)}),l=x(()=>r.inputId||o),a=d=>{if(z(d)==="up"){d.preventDefault(),n.value?.focus();return}};function u(){t("cancel")}return(d,p)=>(T(),M("div",Xn,[v("label",{for:l.value},[$e(D(e.label)+" ",1),an(v("input",{id:l.value,ref_key:"inputRef",ref:n,type:e.inputType,placeholder:e.placeholder,"onUpdate:modelValue":p[0]||(p[0]=b=>i.value=b),disabled:e.busy,required:""},null,8,to),[[ln,i.value]])],8,eo),e.error?(T(),M("div",no,D(e.error),1)):L("",!0),v("div",{class:"modal-actions",onKeydown:a},[v("button",{type:"button",class:"btn-secondary",onClick:u,disabled:e.busy},D(e.cancelText),9,oo),v("button",{type:"submit",class:"btn-primary",disabled:e.busy,"data-nav-primary":""},D(e.submitText),9,ro)],32)]))}},Ar=Y(so,[["__scopeId","data-v-b73321cf"]]),io={class:"section-block","data-component":"session-list-section"},ao={class:"section-header"},lo={class:"section-description"},uo={class:"section-body"},co=["onKeydown"],fo=["href"],ho={class:"session-list"},go=["onFocusin","onKeydown"],mo={class:"item-top"},yo={class:"item-title"},po={class:"item-actions"},wo={key:0,class:"badge badge-current"},bo={key:1,class:"badge badge-current"},vo={key:2,class:"badge badge-current"},Co={key:3,class:"badge"},So=["onClick","disabled","title"],Eo={class:"item-details"},_o={class:"session-dates"},ko={class:"date-label"},Bo=["onClick"],Io={key:1,class:"empty-state"},Rr={__name:"SessionList",props:{sessions:{type:Array,default:()=>[]},emptyMessage:{type:String,default:"You currently have no other active sessions."},sectionDescription:{type:String,default:"Review where you're signed in and end any sessions you no longer recognize."},terminatingSessions:{type:Object,default:()=>({})},hoveredCredentialUuid:{type:String,default:null},navigationDisabled:{type:Boolean,default:!1}},emits:["terminate","sessionHover","navigate-out"],setup(e,{emit:s}){const r=e,t=s,n=he(),o=F(null),i=F(null),l=c=>{i.value=c,o.value=c.ip||null,t("sessionHover",c)},a=c=>{c.currentTarget.contains(c.relatedTarget)||(i.value=null,o.value=null,t("sessionHover",null))},u=c=>{c.currentTarget.matches(":focus")||(c.currentTarget.focus(),c.stopPropagation())},d=c=>!!r.terminatingSessions[c],p=(c,S)=>{const R=c.currentTarget,y=R.querySelector(".session-list")?.querySelectorAll(".session-item"),m=Array.from(document.querySelectorAll(".session-group")),g=m.indexOf(R);if(c.key==="Enter"&&c.target===R){S&&R.querySelector("a")?.click();return}if(r.navigationDisabled)return;const E=z(c);if(["down","right"].includes(E)&&c.target===R){c.preventDefault(),y?.[0]?.focus();return}if(["up","left"].includes(E)&&c.target===R){c.preventDefault(),g>0?m[g-1].focus():t("navigate-out","up");return}Dt(c,k=>t("navigate-out",k))},b=(c,S)=>{if(Pt(c,()=>{d(S.id)||t("terminate",S)}),c.defaultPrevented||r.navigationDisabled)return;const R=z(c);if(R){c.preventDefault();const C=c.currentTarget.closest(".session-group"),y=C.querySelector(".session-list");if(Nt(y,c.currentTarget,R,{itemSelector:".session-item"})==="boundary"){if(R==="left"||R==="up")C?.focus();else if(R==="down"||R==="right"){const g=Array.from(document.querySelectorAll(".session-group")),E=g.indexOf(C);E<g.length-1?g[E+1].focus():t("navigate-out","down")}}}c.key==="Escape"&&(c.preventDefault(),c.currentTarget.closest(".session-group")?.focus())},f=c=>`${c.includes(":")?"http":"https"}://${c}`,w=async c=>{if(c)try{await navigator.clipboard.writeText(c),n.showMessage("Full IP copied to clipboard!","success",2e3)}catch(S){console.error("Failed to copy IP:",S),n.showMessage("Failed to copy IP","error",3e3)}},h=c=>ae(c)??c,_=x(()=>{if(o.value)return ae(o.value);const c=r.sessions.find(S=>S.is_current);return c?ae(c.ip):null}),A=c=>_.value&&ae(c)===_.value,P=x(()=>{const c={};for(const y of r.sessions){const m=y.host||"";c[m]||(c[m]={sessions:[],isCurrentSite:!1}),c[m].sessions.push(y),y.is_current_host&&(c[m].isCurrentSite=!0)}for(const y in c)c[y].sessions.sort((m,g)=>new Date(g.last_renewed)-new Date(m.last_renewed));const S=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),R=Object.keys(c).sort(S.compare),C={};for(const y of R)C[y]=c[y];return C});return(c,S)=>(T(),M("section",io,[v("div",ao,[S[2]||(S[2]=v("h2",null,"Active Sessions",-1)),v("p",lo,D(e.sectionDescription),1)]),v("div",uo,[v("div",null,[Array.isArray(e.sessions)&&e.sessions.length?(T(!0),M(oe,{key:0},ce(P.value,(R,C)=>(T(),M("div",{key:C,class:"session-group",tabindex:"0",onKeydown:y=>p(y,C)},[v("span",{class:se(["session-group-host",{"is-current-site":R.isCurrentSite}])},[S[3]||(S[3]=v("span",{class:"session-group-icon"},"🌐",-1)),C?(T(),M("a",{key:0,href:f(C),tabindex:"-1",target:"_blank",rel:"noopener noreferrer"},D(C),9,fo)):(T(),M(oe,{key:1},[$e("Unbound host")],64))],2),v("div",ho,[(T(!0),M(oe,null,ce(R.sessions,y=>(T(),M("div",{key:y.id,class:se(["session-item",{"is-current":y.is_current&&!o.value&&!e.hoveredCredentialUuid,"is-hovered":i.value?.id===y.id,"is-linked-credential":e.hoveredCredentialUuid===y.credential}]),tabindex:"-1",onMousedown:S[0]||(S[0]=de(()=>{},["prevent"])),onClickCapture:u,onFocusin:m=>l(y),onFocusout:S[1]||(S[1]=m=>a(m)),onKeydown:m=>b(m,y)},[v("div",mo,[v("h4",yo,D(y.user_agent),1),v("div",po,[y.is_current&&!o.value&&!e.hoveredCredentialUuid?(T(),M("span",wo,"Current")):i.value?.id===y.id?(T(),M("span",bo,"Selected")):e.hoveredCredentialUuid===y.credential?(T(),M("span",vo,"Linked")):!e.hoveredCredentialUuid&&A(y.ip)?(T(),M("span",Co,"Same IP")):L("",!0),v("button",{onClick:m=>c.$emit("terminate",y),class:"btn-card-delete",disabled:d(y.id),title:d(y.id)?"Terminating...":"Terminate session",tabindex:"-1"},"❌",8,So)])]),v("div",Eo,[v("div",_o,[v("span",ko,D(U(G)(y.last_renewed)),1),v("span",{class:"date-value",onClick:m=>w(y.ip),title:"Click to copy full IP"},D(h(y.ip)),9,Bo)])])],42,go))),128))])],40,co))),128)):(T(),M("div",Io,[v("p",null,D(e.emptyMessage),1)]))])])]))}};function Ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var te={},be,et;function Ro(){return et||(et=1,be=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),be}var ve={},$={},tt;function W(){if(tt)return $;tt=1;let e;const s=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return $.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17},$.getSymbolTotalCodewords=function(t){return s[t]},$.getBCHDigit=function(r){let t=0;for(;r!==0;)t++,r>>>=1;return t},$.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');e=t},$.isKanjiModeEnabled=function(){return typeof e<"u"},$.toSJIS=function(t){return e(t)},$}var Ce={},nt;function Je(){return nt||(nt=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function s(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return s(t)}catch{return n}}})(Ce)),Ce}var Se,ot;function To(){if(ot)return Se;ot=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(s){const r=Math.floor(s/8);return(this.buffer[r]>>>7-s%8&1)===1},put:function(s,r){for(let t=0;t<r;t++)this.putBit((s>>>r-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(s){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),s&&(this.buffer[r]|=128>>>this.length%8),this.length++}},Se=e,Se}var Ee,rt;function Mo(){if(rt)return Ee;rt=1;function e(s){if(!s||s<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=s,this.data=new Uint8Array(s*s),this.reservedBit=new Uint8Array(s*s)}return e.prototype.set=function(s,r,t,n){const o=s*this.size+r;this.data[o]=t,n&&(this.reservedBit[o]=!0)},e.prototype.get=function(s,r){return this.data[s*this.size+r]},e.prototype.xor=function(s,r,t){this.data[s*this.size+r]^=t},e.prototype.isReserved=function(s,r){return this.reservedBit[s*this.size+r]},Ee=e,Ee}var _e={},st;function No(){return st||(st=1,(function(e){const s=W().getSymbolSize;e.getRowColCoords=function(t){if(t===1)return[];const n=Math.floor(t/7)+2,o=s(t),i=o===145?26:Math.ceil((o-13)/(2*n-2))*2,l=[o-7];for(let a=1;a<n-1;a++)l[a]=l[a-1]-i;return l.push(6),l.reverse()},e.getPositions=function(t){const n=[],o=e.getRowColCoords(t),i=o.length;for(let l=0;l<i;l++)for(let a=0;a<i;a++)l===0&&a===0||l===0&&a===i-1||l===i-1&&a===0||n.push([o[l],o[a]]);return n}})(_e)),_e}var ke={},it;function Po(){if(it)return ke;it=1;const e=W().getSymbolSize,s=7;return ke.getPositions=function(t){const n=e(t);return[[0,0],[n-s,0],[0,n-s]]},ke}var Be={},at;function Do(){return at||(at=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const s={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const o=n.size;let i=0,l=0,a=0,u=null,d=null;for(let p=0;p<o;p++){l=a=0,u=d=null;for(let b=0;b<o;b++){let f=n.get(p,b);f===u?l++:(l>=5&&(i+=s.N1+(l-5)),u=f,l=1),f=n.get(b,p),f===d?a++:(a>=5&&(i+=s.N1+(a-5)),d=f,a=1)}l>=5&&(i+=s.N1+(l-5)),a>=5&&(i+=s.N1+(a-5))}return i},e.getPenaltyN2=function(n){const o=n.size;let i=0;for(let l=0;l<o-1;l++)for(let a=0;a<o-1;a++){const u=n.get(l,a)+n.get(l,a+1)+n.get(l+1,a)+n.get(l+1,a+1);(u===4||u===0)&&i++}return i*s.N2},e.getPenaltyN3=function(n){const o=n.size;let i=0,l=0,a=0;for(let u=0;u<o;u++){l=a=0;for(let d=0;d<o;d++)l=l<<1&2047|n.get(u,d),d>=10&&(l===1488||l===93)&&i++,a=a<<1&2047|n.get(d,u),d>=10&&(a===1488||a===93)&&i++}return i*s.N3},e.getPenaltyN4=function(n){let o=0;const i=n.data.length;for(let a=0;a<i;a++)o+=n.data[a];return Math.abs(Math.ceil(o*100/i/5)-10)*s.N4};function r(t,n,o){switch(t){case e.Patterns.PATTERN000:return(n+o)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return o%3===0;case e.Patterns.PATTERN011:return(n+o)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case e.Patterns.PATTERN101:return n*o%2+n*o%3===0;case e.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case e.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}e.applyMask=function(n,o){const i=o.size;for(let l=0;l<i;l++)for(let a=0;a<i;a++)o.isReserved(a,l)||o.xor(a,l,r(n,a,l))},e.getBestMask=function(n,o){const i=Object.keys(e.Patterns).length;let l=0,a=1/0;for(let u=0;u<i;u++){o(u),e.applyMask(u,n);const d=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(u,n),d<a&&(a=d,l=u)}return l}})(Be)),Be}var le={},lt;function Ot(){if(lt)return le;lt=1;const e=Je(),s=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return le.getBlocksCount=function(n,o){switch(o){case e.L:return s[(n-1)*4+0];case e.M:return s[(n-1)*4+1];case e.Q:return s[(n-1)*4+2];case e.H:return s[(n-1)*4+3];default:return}},le.getTotalCodewordsCount=function(n,o){switch(o){case e.L:return r[(n-1)*4+0];case e.M:return r[(n-1)*4+1];case e.Q:return r[(n-1)*4+2];case e.H:return r[(n-1)*4+3];default:return}},le}var Ie={},ne={},ut;function Lo(){if(ut)return ne;ut=1;const e=new Uint8Array(512),s=new Uint8Array(256);return(function(){let t=1;for(let n=0;n<255;n++)e[n]=t,s[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)e[n]=e[n-255]})(),ne.log=function(t){if(t<1)throw new Error("log("+t+")");return s[t]},ne.exp=function(t){return e[t]},ne.mul=function(t,n){return t===0||n===0?0:e[s[t]+s[n]]},ne}var ct;function qo(){return ct||(ct=1,(function(e){const s=Lo();e.mul=function(t,n){const o=new Uint8Array(t.length+n.length-1);for(let i=0;i<t.length;i++)for(let l=0;l<n.length;l++)o[i+l]^=s.mul(t[i],n[l]);return o},e.mod=function(t,n){let o=new Uint8Array(t);for(;o.length-n.length>=0;){const i=o[0];for(let a=0;a<n.length;a++)o[a]^=s.mul(n[a],i);let l=0;for(;l<o.length&&o[l]===0;)l++;o=o.slice(l)}return o},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,s.exp(o)]));return n}})(Ie)),Ie}var Ae,dt;function Fo(){if(dt)return Ae;dt=1;const e=qo();function s(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return s.prototype.initialize=function(t){this.degree=t,this.genPoly=e.generateECPolynomial(this.degree)},s.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const o=e.mod(n,this.genPoly),i=this.degree-o.length;if(i>0){const l=new Uint8Array(this.degree);return l.set(o,i),l}return o},Ae=s,Ae}var Re={},Te={},Me={},ft;function jt(){return ft||(ft=1,Me.isValid=function(s){return!isNaN(s)&&s>=1&&s<=40}),Me}var H={},ht;function zt(){if(ht)return H;ht=1;const e="[0-9]+",s="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const t="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
2
+ ]))+`;H.KANJI=new RegExp(r,"g"),H.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),H.BYTE=new RegExp(t,"g"),H.NUMERIC=new RegExp(e,"g"),H.ALPHANUMERIC=new RegExp(s,"g");const n=new RegExp("^"+r+"$"),o=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return H.testKanji=function(a){return n.test(a)},H.testNumeric=function(a){return o.test(a)},H.testAlphanumeric=function(a){return i.test(a)},H}var gt;function Z(){return gt||(gt=1,(function(e){const s=jt(),r=zt();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,i){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!s.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?o.ccBits[0]:i<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return r.testNumeric(o)?e.NUMERIC:r.testAlphanumeric(o)?e.ALPHANUMERIC:r.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(o,i){if(e.isValid(o))return o;try{return t(o)}catch{return i}}})(Te)),Te}var mt;function Uo(){return mt||(mt=1,(function(e){const s=W(),r=Ot(),t=Je(),n=Z(),o=jt(),i=7973,l=s.getBCHDigit(i);function a(b,f,w){for(let h=1;h<=40;h++)if(f<=e.getCapacity(h,w,b))return h}function u(b,f){return n.getCharCountIndicator(b,f)+4}function d(b,f){let w=0;return b.forEach(function(h){const _=u(h.mode,f);w+=_+h.getBitsLength()}),w}function p(b,f){for(let w=1;w<=40;w++)if(d(b,w)<=e.getCapacity(w,f,n.MIXED))return w}e.from=function(f,w){return o.isValid(f)?parseInt(f,10):w},e.getCapacity=function(f,w,h){if(!o.isValid(f))throw new Error("Invalid QR Code version");typeof h>"u"&&(h=n.BYTE);const _=s.getSymbolTotalCodewords(f),A=r.getTotalCodewordsCount(f,w),P=(_-A)*8;if(h===n.MIXED)return P;const c=P-u(h,f);switch(h){case n.NUMERIC:return Math.floor(c/10*3);case n.ALPHANUMERIC:return Math.floor(c/11*2);case n.KANJI:return Math.floor(c/13);case n.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(f,w){let h;const _=t.from(w,t.M);if(Array.isArray(f)){if(f.length>1)return p(f,_);if(f.length===0)return 1;h=f[0]}else h=f;return a(h.mode,h.getLength(),_)},e.getEncodedBits=function(f){if(!o.isValid(f)||f<7)throw new Error("Invalid QR Code version");let w=f<<12;for(;s.getBCHDigit(w)-l>=0;)w^=i<<s.getBCHDigit(w)-l;return f<<12|w}})(Re)),Re}var Ne={},yt;function Ko(){if(yt)return Ne;yt=1;const e=W(),s=1335,r=21522,t=e.getBCHDigit(s);return Ne.getEncodedBits=function(o,i){const l=o.bit<<3|i;let a=l<<10;for(;e.getBCHDigit(a)-t>=0;)a^=s<<e.getBCHDigit(a)-t;return(l<<10|a)^r},Ne}var Pe={},De,pt;function Vo(){if(pt)return De;pt=1;const e=Z();function s(r){this.mode=e.NUMERIC,this.data=r.toString()}return s.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(t){let n,o,i;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),i=parseInt(o,10),t.put(i,10);const l=this.data.length-n;l>0&&(o=this.data.substr(n),i=parseInt(o,10),t.put(i,l*3+1))},De=s,De}var Le,wt;function Ho(){if(wt)return Le;wt=1;const e=Z(),s=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(t){this.mode=e.ALPHANUMERIC,this.data=t}return r.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(n){let o;for(o=0;o+2<=this.data.length;o+=2){let i=s.indexOf(this.data[o])*45;i+=s.indexOf(this.data[o+1]),n.put(i,11)}this.data.length%2&&n.put(s.indexOf(this.data[o]),6)},Le=r,Le}var qe,bt;function Oo(){if(bt)return qe;bt=1;const e=Z();function s(r){this.mode=e.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return s.getBitsLength=function(t){return t*8},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(r){for(let t=0,n=this.data.length;t<n;t++)r.put(this.data[t],8)},qe=s,qe}var Fe,vt;function jo(){if(vt)return Fe;vt=1;const e=Z(),s=W();function r(t){this.mode=e.KANJI,this.data=t}return r.getBitsLength=function(n){return n*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let o=s.toSJIS(this.data[n]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+`
3
+ Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),t.put(o,13)}},Fe=r,Fe}var Ue={exports:{}},Ct;function zo(){return Ct||(Ct=1,(function(e){var s={single_source_shortest_paths:function(r,t,n){var o={},i={};i[t]=0;var l=s.PriorityQueue.make();l.push(t,0);for(var a,u,d,p,b,f,w,h,_;!l.empty();){a=l.pop(),u=a.value,p=a.cost,b=r[u]||{};for(d in b)b.hasOwnProperty(d)&&(f=b[d],w=p+f,h=i[d],_=typeof i[d]>"u",(_||h>w)&&(i[d]=w,l.push(d,w),o[d]=u))}if(typeof n<"u"&&typeof i[n]>"u"){var A=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(A)}return o},extract_shortest_path_from_predecessor_list:function(r,t){for(var n=[],o=t;o;)n.push(o),r[o],o=r[o];return n.reverse(),n},find_path:function(r,t,n){var o=s.single_source_shortest_paths(r,t,n);return s.extract_shortest_path_from_predecessor_list(o,n)},PriorityQueue:{make:function(r){var t=s.PriorityQueue,n={},o;r=r||{};for(o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);return n.queue=[],n.sorter=r.sorter||t.default_sorter,n},default_sorter:function(r,t){return r.cost-t.cost},push:function(r,t){var n={value:r,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=s})(Ue)),Ue.exports}var St;function xo(){return St||(St=1,(function(e){const s=Z(),r=Vo(),t=Ho(),n=Oo(),o=jo(),i=zt(),l=W(),a=zo();function u(A){return unescape(encodeURIComponent(A)).length}function d(A,P,c){const S=[];let R;for(;(R=A.exec(c))!==null;)S.push({data:R[0],index:R.index,mode:P,length:R[0].length});return S}function p(A){const P=d(i.NUMERIC,s.NUMERIC,A),c=d(i.ALPHANUMERIC,s.ALPHANUMERIC,A);let S,R;return l.isKanjiModeEnabled()?(S=d(i.BYTE,s.BYTE,A),R=d(i.KANJI,s.KANJI,A)):(S=d(i.BYTE_KANJI,s.BYTE,A),R=[]),P.concat(c,S,R).sort(function(y,m){return y.index-m.index}).map(function(y){return{data:y.data,mode:y.mode,length:y.length}})}function b(A,P){switch(P){case s.NUMERIC:return r.getBitsLength(A);case s.ALPHANUMERIC:return t.getBitsLength(A);case s.KANJI:return o.getBitsLength(A);case s.BYTE:return n.getBitsLength(A)}}function f(A){return A.reduce(function(P,c){const S=P.length-1>=0?P[P.length-1]:null;return S&&S.mode===c.mode?(P[P.length-1].data+=c.data,P):(P.push(c),P)},[])}function w(A){const P=[];for(let c=0;c<A.length;c++){const S=A[c];switch(S.mode){case s.NUMERIC:P.push([S,{data:S.data,mode:s.ALPHANUMERIC,length:S.length},{data:S.data,mode:s.BYTE,length:S.length}]);break;case s.ALPHANUMERIC:P.push([S,{data:S.data,mode:s.BYTE,length:S.length}]);break;case s.KANJI:P.push([S,{data:S.data,mode:s.BYTE,length:u(S.data)}]);break;case s.BYTE:P.push([{data:S.data,mode:s.BYTE,length:u(S.data)}])}}return P}function h(A,P){const c={},S={start:{}};let R=["start"];for(let C=0;C<A.length;C++){const y=A[C],m=[];for(let g=0;g<y.length;g++){const E=y[g],k=""+C+g;m.push(k),c[k]={node:E,lastCount:0},S[k]={};for(let B=0;B<R.length;B++){const I=R[B];c[I]&&c[I].node.mode===E.mode?(S[I][k]=b(c[I].lastCount+E.length,E.mode)-b(c[I].lastCount,E.mode),c[I].lastCount+=E.length):(c[I]&&(c[I].lastCount=E.length),S[I][k]=b(E.length,E.mode)+4+s.getCharCountIndicator(E.mode,P))}}R=m}for(let C=0;C<R.length;C++)S[R[C]].end=0;return{map:S,table:c}}function _(A,P){let c;const S=s.getBestModeForData(A);if(c=s.from(P,S),c!==s.BYTE&&c.bit<S.bit)throw new Error('"'+A+'" cannot be encoded with mode '+s.toString(c)+`.
4
+ Suggested mode is: `+s.toString(S));switch(c===s.KANJI&&!l.isKanjiModeEnabled()&&(c=s.BYTE),c){case s.NUMERIC:return new r(A);case s.ALPHANUMERIC:return new t(A);case s.KANJI:return new o(A);case s.BYTE:return new n(A)}}e.fromArray=function(P){return P.reduce(function(c,S){return typeof S=="string"?c.push(_(S,null)):S.data&&c.push(_(S.data,S.mode)),c},[])},e.fromString=function(P,c){const S=p(P,l.isKanjiModeEnabled()),R=w(S),C=h(R,c),y=a.find_path(C.map,"start","end"),m=[];for(let g=1;g<y.length-1;g++)m.push(C.table[y[g]].node);return e.fromArray(f(m))},e.rawSplit=function(P){return e.fromArray(p(P,l.isKanjiModeEnabled()))}})(Pe)),Pe}var Et;function $o(){if(Et)return ve;Et=1;const e=W(),s=Je(),r=To(),t=Mo(),n=No(),o=Po(),i=Do(),l=Ot(),a=Fo(),u=Uo(),d=Ko(),p=Z(),b=xo();function f(C,y){const m=C.size,g=o.getPositions(y);for(let E=0;E<g.length;E++){const k=g[E][0],B=g[E][1];for(let I=-1;I<=7;I++)if(!(k+I<=-1||m<=k+I))for(let N=-1;N<=7;N++)B+N<=-1||m<=B+N||(I>=0&&I<=6&&(N===0||N===6)||N>=0&&N<=6&&(I===0||I===6)||I>=2&&I<=4&&N>=2&&N<=4?C.set(k+I,B+N,!0,!0):C.set(k+I,B+N,!1,!0))}}function w(C){const y=C.size;for(let m=8;m<y-8;m++){const g=m%2===0;C.set(m,6,g,!0),C.set(6,m,g,!0)}}function h(C,y){const m=n.getPositions(y);for(let g=0;g<m.length;g++){const E=m[g][0],k=m[g][1];for(let B=-2;B<=2;B++)for(let I=-2;I<=2;I++)B===-2||B===2||I===-2||I===2||B===0&&I===0?C.set(E+B,k+I,!0,!0):C.set(E+B,k+I,!1,!0)}}function _(C,y){const m=C.size,g=u.getEncodedBits(y);let E,k,B;for(let I=0;I<18;I++)E=Math.floor(I/3),k=I%3+m-8-3,B=(g>>I&1)===1,C.set(E,k,B,!0),C.set(k,E,B,!0)}function A(C,y,m){const g=C.size,E=d.getEncodedBits(y,m);let k,B;for(k=0;k<15;k++)B=(E>>k&1)===1,k<6?C.set(k,8,B,!0):k<8?C.set(k+1,8,B,!0):C.set(g-15+k,8,B,!0),k<8?C.set(8,g-k-1,B,!0):k<9?C.set(8,15-k-1+1,B,!0):C.set(8,15-k-1,B,!0);C.set(g-8,8,1,!0)}function P(C,y){const m=C.size;let g=-1,E=m-1,k=7,B=0;for(let I=m-1;I>0;I-=2)for(I===6&&I--;;){for(let N=0;N<2;N++)if(!C.isReserved(E,I-N)){let V=!1;B<y.length&&(V=(y[B]>>>k&1)===1),C.set(E,I-N,V),k--,k===-1&&(B++,k=7)}if(E+=g,E<0||m<=E){E-=g,g=-g;break}}}function c(C,y,m){const g=new r;m.forEach(function(N){g.put(N.mode.bit,4),g.put(N.getLength(),p.getCharCountIndicator(N.mode,C)),N.write(g)});const E=e.getSymbolTotalCodewords(C),k=l.getTotalCodewordsCount(C,y),B=(E-k)*8;for(g.getLengthInBits()+4<=B&&g.put(0,4);g.getLengthInBits()%8!==0;)g.putBit(0);const I=(B-g.getLengthInBits())/8;for(let N=0;N<I;N++)g.put(N%2?17:236,8);return S(g,C,y)}function S(C,y,m){const g=e.getSymbolTotalCodewords(y),E=l.getTotalCodewordsCount(y,m),k=g-E,B=l.getBlocksCount(y,m),I=g%B,N=B-I,V=Math.floor(g/B),K=Math.floor(k/B),q=K+1,Ye=V-K,$t=new a(Ye);let ge=0;const ie=new Array(B),Qe=new Array(B);let me=0;const Jt=new Uint8Array(C.buffer);for(let X=0;X<B;X++){const pe=X<N?K:q;ie[X]=Jt.slice(ge,ge+pe),Qe[X]=$t.encode(ie[X]),ge+=pe,me=Math.max(me,pe)}const ye=new Uint8Array(g);let Ge=0,O,j;for(O=0;O<me;O++)for(j=0;j<B;j++)O<ie[j].length&&(ye[Ge++]=ie[j][O]);for(O=0;O<Ye;O++)for(j=0;j<B;j++)ye[Ge++]=Qe[j][O];return ye}function R(C,y,m,g){let E;if(Array.isArray(C))E=b.fromArray(C);else if(typeof C=="string"){let V=y;if(!V){const K=b.rawSplit(C);V=u.getBestVersionForData(K,m)}E=b.fromString(C,V||40)}else throw new Error("Invalid data");const k=u.getBestVersionForData(E,m);if(!k)throw new Error("The amount of data is too big to be stored in a QR Code");if(!y)y=k;else if(y<k)throw new Error(`
5
+ The chosen QR Code version cannot contain this amount of data.
6
+ Minimum version required to store current data is: `+k+`.
7
+ `);const B=c(y,m,E),I=e.getSymbolSize(y),N=new t(I);return f(N,y),w(N),h(N,y),A(N,m,0),y>=7&&_(N,y),P(N,B),isNaN(g)&&(g=i.getBestMask(N,A.bind(null,N,m))),i.applyMask(g,N),A(N,m,g),{modules:N,version:y,errorCorrectionLevel:m,maskPattern:g,segments:E}}return ve.create=function(y,m){if(typeof y>"u"||y==="")throw new Error("No input text");let g=s.M,E,k;return typeof m<"u"&&(g=s.from(m.errorCorrectionLevel,s.M),E=u.from(m.version),k=i.from(m.maskPattern),m.toSJISFunc&&e.setToSJISFunction(m.toSJISFunc)),R(y,E,g,k)},ve}var Ke={},Ve={},_t;function xt(){return _t||(_t=1,(function(e){function s(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let t=r.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+r);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(o){return[o,o]}))),t.length===6&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+t.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,o=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:o,scale:o?4:i,margin:n,color:{dark:s(t.color.dark||"#000000ff"),light:s(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,n){return n.width&&n.width>=t+n.margin*2?n.width/(t+n.margin*2):n.scale},e.getImageWidth=function(t,n){const o=e.getScale(t,n);return Math.floor((t+n.margin*2)*o)},e.qrToImageData=function(t,n,o){const i=n.modules.size,l=n.modules.data,a=e.getScale(i,o),u=Math.floor((i+o.margin*2)*a),d=o.margin*a,p=[o.color.light,o.color.dark];for(let b=0;b<u;b++)for(let f=0;f<u;f++){let w=(b*u+f)*4,h=o.color.light;if(b>=d&&f>=d&&b<u-d&&f<u-d){const _=Math.floor((b-d)/a),A=Math.floor((f-d)/a);h=p[l[_*i+A]?1:0]}t[w++]=h.r,t[w++]=h.g,t[w++]=h.b,t[w]=h.a}}})(Ve)),Ve}var kt;function Jo(){return kt||(kt=1,(function(e){const s=xt();function r(n,o,i){n.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=i,o.width=i,o.style.height=i+"px",o.style.width=i+"px"}function t(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(o,i,l){let a=l,u=i;typeof a>"u"&&(!i||!i.getContext)&&(a=i,i=void 0),i||(u=t()),a=s.getOptions(a);const d=s.getImageWidth(o.modules.size,a),p=u.getContext("2d"),b=p.createImageData(d,d);return s.qrToImageData(b.data,o,a),r(p,u,d),p.putImageData(b,0,0),u},e.renderToDataURL=function(o,i,l){let a=l;typeof a>"u"&&(!i||!i.getContext)&&(a=i,i=void 0),a||(a={});const u=e.render(o,i,a),d=a.type||"image/png",p=a.rendererOpts||{};return u.toDataURL(d,p.quality)}})(Ke)),Ke}var He={},Bt;function Yo(){if(Bt)return He;Bt=1;const e=xt();function s(n,o){const i=n.a/255,l=o+'="'+n.hex+'"';return i<1?l+" "+o+'-opacity="'+i.toFixed(2).slice(1)+'"':l}function r(n,o,i){let l=n+o;return typeof i<"u"&&(l+=" "+i),l}function t(n,o,i){let l="",a=0,u=!1,d=0;for(let p=0;p<n.length;p++){const b=Math.floor(p%o),f=Math.floor(p/o);!b&&!u&&(u=!0),n[p]?(d++,p>0&&b>0&&n[p-1]||(l+=u?r("M",b+i,.5+f+i):r("m",a,0),a=0,u=!1),b+1<o&&n[p+1]||(l+=r("h",d),d=0)):a++}return l}return He.render=function(o,i,l){const a=e.getOptions(i),u=o.modules.size,d=o.modules.data,p=u+a.margin*2,b=a.color.light.a?"<path "+s(a.color.light,"fill")+' d="M0 0h'+p+"v"+p+'H0z"/>':"",f="<path "+s(a.color.dark,"stroke")+' d="'+t(d,u,a.margin)+'"/>',w='viewBox="0 0 '+p+" "+p+'"',_='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+w+' shape-rendering="crispEdges">'+b+f+`</svg>
8
+ `;return typeof l=="function"&&l(null,_),_},He}var It;function Qo(){if(It)return te;It=1;const e=Ro(),s=$o(),r=Jo(),t=Yo();function n(o,i,l,a,u){const d=[].slice.call(arguments,1),p=d.length,b=typeof d[p-1]=="function";if(!b&&!e())throw new Error("Callback required as last argument");if(b){if(p<2)throw new Error("Too few arguments provided");p===2?(u=l,l=i,i=a=void 0):p===3&&(i.getContext&&typeof u>"u"?(u=a,a=void 0):(u=a,a=l,l=i,i=void 0))}else{if(p<1)throw new Error("Too few arguments provided");return p===1?(l=i,i=a=void 0):p===2&&!i.getContext&&(a=l,l=i,i=void 0),new Promise(function(f,w){try{const h=s.create(l,a);f(o(h,i,a))}catch(h){w(h)}})}try{const f=s.create(l,a);u(null,o(f,i,a))}catch(f){u(f)}}return te.create=s.create,te.toCanvas=n.bind(null,r.render),te.toDataURL=n.bind(null,r.renderToDataURL),te.toString=n.bind(null,function(o,i,l){return t.render(o,l)}),te}var Go=Qo();const Wo=Ao(Go),Zo={class:"qr-display"},Xo={class:"qr-section"},er=["href","onKeydown"],tr={key:0,class:"link-text"},nr={__name:"QRCodeDisplay",props:{url:{type:String,required:!0},showLink:{type:Boolean,default:!1}},emits:["copied"],setup(e,{emit:s}){const r=e,t=s,n=F(null),o=x(()=>r.url?r.url.replace(/^https?:\/\//,""):"");function i(){if(!(!r.url||!n.value))try{n.value.getContext("2d").clearRect(0,0,n.value.width,n.value.height),Wo.toCanvas(n.value,r.url,{scale:6,margin:0,color:{dark:"#000000",light:"#FFFFFF"}}),n.value.removeAttribute("style")}catch(a){console.error("QR code generation failed:",a)}}async function l(){if(r.url)try{await navigator.clipboard.writeText(r.url),t("copied")}catch(a){console.error("Failed to copy link:",a)}}return Oe(()=>r.url,()=>{i()},{immediate:!0}),Oe(n,()=>{n.value&&r.url&&i()},{immediate:!0}),(a,u)=>(T(),M("div",Zo,[v("div",Xo,[v("a",{href:e.url,onClick:de(l,["prevent"]),class:"qr-link",title:"Click to copy link",tabindex:"0",onKeydown:un(de(l,["prevent"]),["enter"])},[v("canvas",{ref_key:"qrCanvas",ref:n,class:"qr-code"},null,512),e.showLink&&e.url?(T(),M("div",tr,D(o.value),1)):L("",!0)],40,er)])]))}},or=Y(nr,[["__scopeId","data-v-727427c4"]]),rr={class:"device-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"regTitle"},sr={class:"reg-header-row"},ir={id:"regTitle",class:"reg-title"},ar={key:0},lr={key:1},ur={class:"device-link-section"},cr={key:0,class:"expiry-note"},dr={__name:"RegistrationLinkModal",props:{endpoint:{type:String,required:!0},userName:{type:String,default:""}},emits:["close","copied"],setup(e,{emit:s}){const r=e,t=s,n=he(),o=F(null),i=F(null),l=F(null),a=F(null),u=F(null);async function d(){try{const h=await Q(r.endpoint,{method:"POST"});if(h.url){if(i.value=h.url,l.value=h.expires?new Date(h.expires):null,await xe(),o.value){o.value.showModal();const _=a.value;(_?.querySelector(".btn-primary")||_?.querySelector("button"))?.focus()}}else t("close")}catch(h){n.showMessage(h.message||"Failed to generate link","error"),t("close")}}function p(){t("copied")}const b=h=>{const _=z(h)},f=h=>{const _=z(h);_&&(h.preventDefault(),(_==="down"||_==="up")&&a.value?.querySelector("button")?.focus())},w=h=>{const _=z(h);_&&(h.preventDefault(),(_==="up"||_==="down")&&document.querySelector(".qr-link")?.focus())};return qt(()=>{u.value=document.activeElement,d()}),Ft(()=>{const h=u.value;h&&document.body.contains(h)&&!h.disabled&&h.focus()}),(h,_)=>(T(),M("dialog",{ref_key:"dialog",ref:o,onClose:_[2]||(_[2]=A=>h.$emit("close")),onKeydown:b},[v("div",rr,[v("div",sr,[v("h2",ir,[_[3]||(_[3]=$e(" 📱 ",-1)),e.userName?(T(),M("span",ar,"Registration for "+D(e.userName),1)):(T(),M("span",lr,"Add Another Device"))]),v("button",{class:"icon-btn",onClick:_[0]||(_[0]=A=>h.$emit("close")),"aria-label":"Close",tabindex:"-1"},"✕")]),v("div",ur,[_[4]||(_[4]=v("p",{class:"reg-help"}," Scan this QR code on the new device, or copy the link and open it there. ",-1)),cn(or,{url:i.value,"show-link":!0,onCopied:p,onKeydown:f},null,8,["url"]),l.value?(T(),M("p",cr," This link expires "+D(U(G)(l.value).toLowerCase())+". ",1)):L("",!0)]),v("div",{class:"reg-actions",ref_key:"actionsRow",ref:a,onKeydown:w},[v("button",{class:"btn-secondary",onClick:_[1]||(_[1]=A=>h.$emit("close"))},"Close")],544)])],544))}},Tr=Y(dr,[["__scopeId","data-v-26360b56"]]),fr={class:"loading-container"},hr={__name:"LoadingView",props:{message:{type:String,default:"Loading..."}},setup(e){return(s,r)=>(T(),M("div",fr,[r[0]||(r[0]=v("div",{class:"loading-spinner"},null,-1)),v("p",null,D(e.message),1)]))}},Mr=Y(hr,[["__scopeId","data-v-130f5abf"]]),gr={class:"message-container"},mr={class:"message-content"},yr={key:0,class:"error-detail"},pr={class:"button-row"},wr={__name:"AccessDenied",props:{title:{type:String,default:"Access Denied"},icon:{type:String,default:"🔒"},message:{type:String,default:null}},setup(e){function s(){window.location.reload()}return(r,t)=>(T(),M("div",gr,[v("div",mr,[v("h2",null,D(e.icon)+" "+D(e.title),1),e.message?(T(),M("p",yr,D(e.message),1)):L("",!0),v("div",pr,[v("button",{class:"btn-secondary",onClick:t[0]||(t[0]=(...n)=>U(We)&&U(We)(...n))},"Back"),v("button",{class:"btn-primary",onClick:s},"Reload Page")])])]))}},Nr=Y(wr,[["__scopeId","data-v-a7b258e7"]]);export{Nr as A,_r as B,Mr as L,Ir as M,Ar as N,Tr as R,Br as U,kr as _,Rr as a,Er as b,Sr as c,he as u};
@@ -1 +1 @@
1
- .remote-auth-inline[data-v-1280e25b]{display:flex;flex-direction:column;gap:1rem;width:100%}.loading-section[data-v-1280e25b]{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:2rem 1rem;min-height:180px;justify-content:center}.loading-section p[data-v-1280e25b]{margin:0;color:var(--color-text-muted);font-size:.95rem}.spinner[data-v-1280e25b]{width:40px;height:40px;border:3px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;animation:spin-1280e25b .8s linear infinite}@keyframes spin-1280e25b{to{transform:rotate(360deg)}}.auth-display[data-v-1280e25b]{display:flex;flex-direction:column;gap:1.25rem;width:100%;min-height:180px}.auth-content[data-v-1280e25b]{display:flex;gap:2rem;align-items:center;justify-content:center;flex-wrap:nowrap}.loading-placeholder[data-v-1280e25b]{display:flex;flex-direction:column;align-items:center;gap:.75rem;width:100%;padding:1rem}.loading-placeholder p[data-v-1280e25b]{margin:0;color:var(--color-text-muted);font-size:.95rem}.pairing-code-section[data-v-1280e25b]{flex:0 0 auto;display:flex;flex-direction:column;gap:.5rem;width:280px;max-width:100%}.pairing-label[data-v-1280e25b]{margin:0;font-size:.875rem;color:var(--color-text-muted);font-weight:500;text-align:center}.slot-machine[data-v-1280e25b]{padding:.875rem 1rem;background:var(--color-surface-hover, rgba(0, 0, 0, .03));border:2px solid var(--color-border);border-radius:var(--radius-sm, 6px);font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;display:flex;align-items:center;-webkit-user-select:none;user-select:none;pointer-events:none;white-space:nowrap;overflow:hidden}.slot-reel[data-v-1280e25b]{overflow:hidden;background:var(--color-surface, rgba(255, 255, 255, .5))}.slot-machine:not(.stopped) .slot-reel[data-v-1280e25b]:nth-child(1){animation:slotSpin-1280e25b .14s ease-in-out infinite}.slot-machine:not(.stopped) .slot-reel[data-v-1280e25b]:nth-child(2){animation:slotSpin-1280e25b .17s ease-in-out infinite}.slot-machine:not(.stopped) .slot-reel[data-v-1280e25b]:nth-child(3){animation:slotSpin-1280e25b .2s ease-in-out infinite}.slot-word[data-v-1280e25b]{font-size:1.25rem;font-weight:600;letter-spacing:.05em;text-align:center;width:100%}.slot-machine:not(.stopped) .slot-reel:nth-child(1) .slot-word[data-v-1280e25b]{animation:wordRoll-1280e25b .14s ease-in-out infinite}.slot-machine:not(.stopped) .slot-reel:nth-child(2) .slot-word[data-v-1280e25b]{animation:wordRoll-1280e25b .17s ease-in-out infinite}.slot-machine:not(.stopped) .slot-reel:nth-child(3) .slot-word[data-v-1280e25b]{animation:wordRoll-1280e25b .2s ease-in-out infinite}@keyframes slotSpin-1280e25b{0%{box-shadow:inset 0 2px 4px #0000001a}50%{box-shadow:inset 0 4px 8px #0003}to{box-shadow:inset 0 2px 4px #0000001a}}@keyframes wordRoll-1280e25b{0%{transform:translateY(-30%) scale(.9);opacity:.4;filter:blur(1.5px)}25%{transform:translateY(-10%) scale(.95);opacity:.6;filter:blur(1px)}50%{transform:translateY(0) scale(1);opacity:1;filter:blur(0)}75%{transform:translateY(10%) scale(.95);opacity:.6;filter:blur(1px)}to{transform:translateY(30%) scale(.9);opacity:.4;filter:blur(1.5px)}}.site-url[data-v-1280e25b]{margin:.5rem 0 0;font-size:.8rem;color:var(--color-text-muted);text-align:center;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;opacity:.8}.waiting-indicator[data-v-1280e25b]{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.75rem;background:var(--color-surface-hover, rgba(0, 0, 0, .02));border-radius:var(--radius-sm, 6px);font-size:.875rem;color:var(--color-text-muted)}.spinner-small[data-v-1280e25b]{width:16px;height:16px;border:2px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;animation:spin-1280e25b .8s linear infinite}.success-section[data-v-1280e25b]{padding:1rem;text-align:center;min-height:180px;display:flex;align-items:center;justify-content:center}.success-message[data-v-1280e25b]{margin:0;font-size:1rem;color:var(--color-success, #10b981);font-weight:500}.error-section[data-v-1280e25b]{padding:1rem;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;min-height:180px}.error-message[data-v-1280e25b]{margin:0;font-size:.95rem;color:var(--color-error, #ef4444)}@media(max-width:640px){.auth-content[data-v-1280e25b]{gap:1.5rem;flex-direction:column;align-items:center}.pairing-code-section[data-v-1280e25b]{width:100%;max-width:280px}}@media(max-width:480px){.pairing-code[data-v-1280e25b]{font-size:1.1rem;padding:.75rem .875rem}.pairing-code-section[data-v-1280e25b]{width:100%;max-width:100%}}.button-row.center[data-v-5c04d110]{display:flex;justify-content:center;gap:.75rem;flex-wrap:wrap}.user-line[data-v-5c04d110]{margin:.5rem 0 0;font-weight:500;color:var(--color-text)}main.view-root[data-v-5c04d110]{min-height:100vh;align-items:center;justify-content:center;padding:2rem 1rem}.surface.surface--tight[data-v-5c04d110]{max-width:520px;margin:0 auto;width:100%;display:flex;flex-direction:column;gap:1.75rem}.auth-view[data-v-5c04d110]{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%}.view-lede[data-v-5c04d110] .inline-link{color:var(--color-primary);text-decoration:none;transition:opacity .15s;font-weight:400}.view-lede[data-v-5c04d110] .inline-link:hover{opacity:.8;text-decoration:underline}
1
+ .remote-auth-inline[data-v-1280e25b]{display:flex;flex-direction:column;gap:1rem;width:100%}.loading-section[data-v-1280e25b]{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:2rem 1rem;min-height:180px;justify-content:center}.loading-section p[data-v-1280e25b]{margin:0;color:var(--color-text-muted);font-size:.95rem}.spinner[data-v-1280e25b]{width:40px;height:40px;border:3px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;animation:spin-1280e25b .8s linear infinite}@keyframes spin-1280e25b{to{transform:rotate(360deg)}}.auth-display[data-v-1280e25b]{display:flex;flex-direction:column;gap:1.25rem;width:100%;min-height:180px}.auth-content[data-v-1280e25b]{display:flex;gap:2rem;align-items:center;justify-content:center;flex-wrap:nowrap}.loading-placeholder[data-v-1280e25b]{display:flex;flex-direction:column;align-items:center;gap:.75rem;width:100%;padding:1rem}.loading-placeholder p[data-v-1280e25b]{margin:0;color:var(--color-text-muted);font-size:.95rem}.pairing-code-section[data-v-1280e25b]{flex:0 0 auto;display:flex;flex-direction:column;gap:.5rem;width:280px;max-width:100%}.pairing-label[data-v-1280e25b]{margin:0;font-size:.875rem;color:var(--color-text-muted);font-weight:500;text-align:center}.slot-machine[data-v-1280e25b]{padding:.875rem 1rem;background:var(--color-surface-hover, rgba(0, 0, 0, .03));border:2px solid var(--color-border);border-radius:var(--radius-sm, 6px);font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;display:flex;align-items:center;-webkit-user-select:none;user-select:none;pointer-events:none;white-space:nowrap;overflow:hidden}.slot-reel[data-v-1280e25b]{overflow:hidden;background:var(--color-surface, rgba(255, 255, 255, .5))}.slot-machine:not(.stopped) .slot-reel[data-v-1280e25b]:nth-child(1){animation:slotSpin-1280e25b .14s ease-in-out infinite}.slot-machine:not(.stopped) .slot-reel[data-v-1280e25b]:nth-child(2){animation:slotSpin-1280e25b .17s ease-in-out infinite}.slot-machine:not(.stopped) .slot-reel[data-v-1280e25b]:nth-child(3){animation:slotSpin-1280e25b .2s ease-in-out infinite}.slot-word[data-v-1280e25b]{font-size:1.25rem;font-weight:600;letter-spacing:.05em;text-align:center;width:100%}.slot-machine:not(.stopped) .slot-reel:nth-child(1) .slot-word[data-v-1280e25b]{animation:wordRoll-1280e25b .14s ease-in-out infinite}.slot-machine:not(.stopped) .slot-reel:nth-child(2) .slot-word[data-v-1280e25b]{animation:wordRoll-1280e25b .17s ease-in-out infinite}.slot-machine:not(.stopped) .slot-reel:nth-child(3) .slot-word[data-v-1280e25b]{animation:wordRoll-1280e25b .2s ease-in-out infinite}@keyframes slotSpin-1280e25b{0%{box-shadow:inset 0 2px 4px #0000001a}50%{box-shadow:inset 0 4px 8px #0003}to{box-shadow:inset 0 2px 4px #0000001a}}@keyframes wordRoll-1280e25b{0%{transform:translateY(-30%) scale(.9);opacity:.4;filter:blur(1.5px)}25%{transform:translateY(-10%) scale(.95);opacity:.6;filter:blur(1px)}50%{transform:translateY(0) scale(1);opacity:1;filter:blur(0)}75%{transform:translateY(10%) scale(.95);opacity:.6;filter:blur(1px)}to{transform:translateY(30%) scale(.9);opacity:.4;filter:blur(1.5px)}}.site-url[data-v-1280e25b]{margin:.5rem 0 0;font-size:.8rem;color:var(--color-text-muted);text-align:center;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;opacity:.8}.waiting-indicator[data-v-1280e25b]{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.75rem;background:var(--color-surface-hover, rgba(0, 0, 0, .02));border-radius:var(--radius-sm, 6px);font-size:.875rem;color:var(--color-text-muted)}.spinner-small[data-v-1280e25b]{width:16px;height:16px;border:2px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;animation:spin-1280e25b .8s linear infinite}.success-section[data-v-1280e25b]{padding:1rem;text-align:center;min-height:180px;display:flex;align-items:center;justify-content:center}.success-message[data-v-1280e25b]{margin:0;font-size:1rem;color:var(--color-success, #10b981);font-weight:500}.error-section[data-v-1280e25b]{padding:1rem;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;min-height:180px}.error-message[data-v-1280e25b]{margin:0;font-size:.95rem;color:var(--color-error, #ef4444)}@media(max-width:640px){.auth-content[data-v-1280e25b]{gap:1.5rem;flex-direction:column;align-items:center}.pairing-code-section[data-v-1280e25b]{width:100%;max-width:280px}}@media(max-width:480px){.pairing-code[data-v-1280e25b]{font-size:1.1rem;padding:.75rem .875rem}.pairing-code-section[data-v-1280e25b]{width:100%;max-width:100%}}.button-row.center[data-v-3295ed62]{display:flex;justify-content:center;gap:.75rem;flex-wrap:wrap}.user-line[data-v-3295ed62]{margin:.5rem 0 0;font-weight:500;color:var(--color-text)}main.view-root[data-v-3295ed62]{min-height:100vh;align-items:center;justify-content:center;padding:2rem 1rem}.surface.surface--tight[data-v-3295ed62]{max-width:520px;margin:0 auto;width:100%;display:flex;flex-direction:column;gap:1.75rem}.auth-view[data-v-3295ed62]{display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%}.view-lede[data-v-3295ed62] .inline-link{color:var(--color-primary);text-decoration:none;transition:opacity .15s;font-weight:400}.view-lede[data-v-3295ed62] .inline-link:hover{opacity:.8;text-decoration:underline}
@@ -1 +1 @@
1
- import{_ as G,r as m,c as S,w as Y,o as J,a as K,b as i,d as l,e as t,t as _,F as N,i as j,f as P,m as Q,p as Z,O as ee,g as te,a1 as se,x as ae,a7 as O,a6 as H,G as ne,n as oe,a8 as ie,a4 as le}from"./_plugin-vue_export-helper-nhjnO_bd.js";import{c as re,s as ce,b as ue,w as z}from"./pow-2N9bxgAo.js";const de={class:"remote-auth-inline"},he={key:0,class:"success-section"},ve={class:"success-message"},fe={key:1,class:"error-section"},me={class:"error-message"},ge={key:2,class:"auth-display"},pe={class:"auth-content"},_e={class:"pairing-code-section"},we={class:"slot-machine","aria-hidden":"true"},ye={class:"slot-word"},ke={class:"site-url"},be={key:3,class:"auth-display"},$e={class:"auth-content"},Ae={key:0,class:"pairing-code-section"},Re={class:"slot-machine stopped"},Se={class:"slot-word"},Ce={class:"site-url"},Pe={class:"waiting-indicator"},Te={__name:"RemoteAuthRequest",props:{active:{type:Boolean,default:!1}},emits:["authenticated","cancelled","error","register"],setup(w,{expose:I,emit:x}){const $=w,g=x,v=m(null),y=m(!1),n=m(null),A=m("connecting"),p=m(null),u=m(["","",""]);let a=null,k=null;const W=S(()=>v.value?v.value.replace(/\./g," "):""),b=S(()=>{if(!p.value)return"";const s=(p.value.auth_site_url||`${location.protocol}//${location.host}/auth/`).replace(/^https?:\/\//,"");return s.endsWith("/")?s.slice(0,-1):s}),E=S(()=>A.value==="authenticating"?"Complete on another device…":"Waiting for authentication…"),B=S(()=>"Authenticated successfully!");function C(){return z[Math.floor(Math.random()*z.length)]}function F(){u.value=[C(),C(),C()];const c=20,s=[setInterval(()=>{const o=[...u.value];o[0]=C(),u.value=o},140),setInterval(()=>{const o=[...u.value];o[1]=C(),u.value=o},170),setInterval(()=>{const o=[...u.value];o[2]=C(),u.value=o},200)];k=s,setTimeout(()=>{s.forEach(o=>clearInterval(o)),k=null},c*170)}function f(){k&&(Array.isArray(k)?k.forEach(c=>clearInterval(c)):clearInterval(k),k=null)}async function L(){n.value=null,y.value=!1,v.value=null,A.value="connecting",F();try{p.value=await Q();const c=p.value?.auth_host,s="/auth/ws/remote-auth/request",o=c&&location.host!==c?`//${c}${s}`:s;a=await Z(o);const R=await a.receive_json();if(R.pow){const h=re(R.pow.challenge),V=await ce(h,R.pow.work);a.send_json({pow:ue(V),action:"login"})}const T=await a.receive_json();if(T.status)throw new Error(T.detail||`Failed to create remote auth request: ${T.status}`);for(v.value=T.pairing_code,f(),A.value="waiting";;){const h=await a.receive_json();if(h.status==="locked")A.value="authenticating";else if(h.status==="paired")A.value="authenticating";else if(h.status==="authenticated"){y.value=!0,g("authenticated",{session_token:h.session_token});break}else{if(h.status==="denied")throw new Error("Access denied");if(h.status==="completed"){h.reset_token&&(y.value=!0,g("register",h.reset_token));break}else if(h.status==="error"||h.detail)throw new Error(h.detail||"Remote authentication failed")}}}catch(c){console.error("Remote authentication error:",c);const s=c.message||"Authentication failed";n.value=s,g("error",s)}finally{a&&(a.close(),a=null)}}function M(){L()}function U(){a&&(a.close(),a=null),g("cancelled")}return Y(()=>$.active,c=>{c&&!v.value&&!n.value&&!y.value&&L()}),J(()=>{$.active&&L()}),K(()=>{a&&(a.close(),a=null),f()}),I({retry:M,cancel:U}),(c,s)=>(l(),i("div",de,[y.value?(l(),i("div",he,[t("p",ve,"✅ "+_(B.value),1)])):n.value?(l(),i("div",fe,[t("p",me,_(n.value),1),t("button",{class:"btn-primary",onClick:M,style:{"margin-top":"0.75rem"}},"Try Again")])):A.value==="connecting"?(l(),i("div",ge,[t("div",pe,[t("div",_e,[s[0]||(s[0]=t("p",{class:"pairing-label"},"Enter the code words:",-1)),t("div",we,[(l(!0),i(N,null,j(u.value,(o,R)=>(l(),i("div",{class:"slot-reel",key:R},[t("div",ye,_(o),1)]))),128))]),t("p",ke,_(b.value),1)])]),s[1]||(s[1]=t("div",{class:"waiting-indicator"},[t("div",{class:"spinner-small"}),t("span",null,"Generating code…")],-1))])):(l(),i("div",be,[t("div",$e,[v.value?(l(),i("div",Ae,[s[2]||(s[2]=t("p",{class:"pairing-label"},"Enter the code words:",-1)),t("div",Re,[(l(!0),i(N,null,j(W.value.split(" "),(o,R)=>(l(),i("div",{class:"slot-reel",key:R},[t("div",Se,_(o),1)]))),128))]),t("p",Ce,_(b.value),1)])):P("",!0)]),t("div",Pe,[s[3]||(s[3]=t("div",{class:"spinner-small"},null,-1)),t("span",null,_(E.value),1)])]))]))}},Ee=G(Te,[["__scopeId","data-v-1280e25b"]]),We={class:"app-shell"},Le={key:0,class:"global-status",style:{display:"block"}},Me={class:"view-root"},Ue={key:0,class:"surface surface--tight"},Ie={class:"view-header center"},xe={key:0,class:"user-line"},Be=["innerHTML"],Fe={class:"section-block"},Ve={class:"section-body center"},Oe={key:0,class:"auth-view"},qe=["disabled"],De=["disabled"],Ne=["disabled"],je=["disabled"],He={key:1,class:"auth-view"},ze={__name:"RestrictedAuth",props:{mode:{type:String,default:"login",validator:w=>["login","reauth","forbidden"].includes(w)}},emits:["authenticated","forbidden","logout","back","home","auth-error"],setup(w,{expose:I,emit:x}){const $=w,g=x,v=ee({show:!1,message:"",type:"info"}),y=m(!0),n=m(!1),A=m(null),p=m(null),u=m("initial"),a=m("local"),k=m(null);let W=null;const b=S(()=>!!p.value),E=S(()=>y.value?!1:$.mode==="reauth"?!0:u.value!=="forbidden"),B=S(()=>$.mode==="reauth"?"🔐 Additional Authentication":u.value==="forbidden"?"🚫 Forbidden":`🔐 ${A.value?.rp_name||location.origin}`),C=S(()=>$.mode==="reauth"?"Please verify your identity to continue with this action.":u.value==="forbidden"?"You lack the required permissions.":a.value==="remote"?'Confirm from your other device. Or <a href="#" class="inline-link" data-action="local">this device</a>.':E.value&&$.mode!=="reauth"?'Please sign in with your passkey. Or use <a href="#" class="inline-link" data-action="remote">another device</a>.':"Please sign in with your passkey."),F=S(()=>p.value?.ctx.user.display_name||"User");function f(e,r="info",d=3e3){v.show=!0,v.message=e,v.type=r,W&&clearTimeout(W),d>0&&(W=setTimeout(()=>{v.show=!1},d))}async function L(){try{const e=await Q();if(A.value=e,e?.rp_name){const r=$.mode==="reauth"?"Verify Identity":b.value?"Forbidden":"Sign In";document.title=`${e.rp_name} · ${r}`}}catch(e){console.warn("Unable to load settings",e)}}async function M(){try{p.value=await O("/auth/api/validate",{method:"POST"}),b.value&&$.mode!=="reauth"?(u.value="forbidden",g("forbidden",p.value)):u.value="login"}catch(e){p.value=null,u.value="login",e.status!==401&&e.status!==403&&f(H(e),"error",4e3)}}async function U(){if(!E.value||n.value)return;n.value=!0,f("Starting authentication…","info");let e;try{e=await ne.authenticate()}catch(r){n.value=!1;const d=r?.message||"Passkey authentication cancelled",D=d==="Passkey authentication cancelled";f(d,D?"info":"error",4e3),g("auth-error",{message:d,cancelled:D});return}try{await o(e)}catch(r){n.value=!1;const d=r?.message||"Failed to establish session";f(d,"error",4e3),g("auth-error",{message:d,cancelled:!1});return}n.value=!1,g("authenticated",e)}async function c(){if(!n.value){n.value=!0;try{await O("/auth/api/logout",{method:"POST"}),p.value=null,u.value="login",f("Logged out. You can sign in with a different account.","info",3e3)}catch(e){f(H(e),"error",4e3)}finally{n.value=!1}g("logout")}}function s(){const e=window.open("/auth/","passkey_auth_profile");e&&e.focus()}async function o(e){if(!e?.session_token)throw console.error("setSessionCookie called with missing session_token:",e),new Error("Authentication response missing session_token");return await O("/auth/api/set-session",{method:"POST",headers:{Authorization:`Bearer ${e.session_token}`}})}function R(){a.value="remote"}function T(){a.value="local"}async function h(e){f("Authenticated from another device!","success",2e3);try{await o(e)}catch(r){const d=r?.message||"Failed to establish session";f(d,"error",4e3),g("auth-error",{message:d,cancelled:!1});return}g("authenticated",e)}function V(e){f("Registration approved! Redirecting...","success",2e3);const r=le()||"/auth/";window.location.href=`${r}${e}`}function X(e){}function q(e){const r=e.target;if(r.tagName==="A"&&r.classList.contains("inline-link")){e.preventDefault();const d=r.dataset.action;d==="remote"?R():d==="local"&&T()}}return Y(y,e=>{e||oe(()=>ie(k.value))}),J(async()=>{await L(),await M(),y.value=!1,document.addEventListener("click",q)}),K(()=>{document.removeEventListener("click",q)}),I({showMessage:f,isAuthenticated:b,session:p}),(e,r)=>(l(),i("div",We,[v.show?(l(),i("div",Le,[t("div",{class:te(["status",v.type])},_(v.message),3)])):P("",!0),t("main",Me,[y.value?P("",!0):(l(),i("div",Ue,[t("header",Ie,[t("h1",null,_(B.value),1),b.value?(l(),i("p",xe,"👤 "+_(F.value),1)):P("",!0),t("p",{class:"view-lede",innerHTML:C.value},null,8,Be)]),t("section",Fe,[t("div",Ve,[a.value==="local"?(l(),i("div",Oe,[t("div",{class:"button-row center",ref_key:"buttonRow",ref:k},[se(e.$slots,"actions",{loading:n.value,canAuthenticate:E.value,isAuthenticated:b.value,authenticate:U,logout:c,mode:w.mode},()=>[t("button",{class:"btn-secondary",disabled:n.value,onClick:r[0]||(r[0]=d=>e.$emit("back"))},"Back",8,qe),E.value?(l(),i("button",{key:0,class:"btn-primary",disabled:n.value,onClick:U},_(n.value?w.mode==="reauth"?"Verifying…":"Signing in…":w.mode==="reauth"?"Verify":"Login"),9,De)):P("",!0),b.value&&w.mode!=="reauth"?(l(),i("button",{key:1,class:"btn-danger",disabled:n.value,onClick:c},"Logout",8,Ne)):P("",!0),b.value&&w.mode!=="reauth"?(l(),i("button",{key:2,class:"btn-primary",disabled:n.value,onClick:s},"Profile",8,je)):P("",!0)])],512)])):a.value==="remote"?(l(),i("div",He,[ae(Ee,{active:a.value==="remote",onAuthenticated:h,onRegister:V,onCancelled:T,onError:X},null,8,["active"])])):P("",!0)])])]))])]))}},Je=G(ze,[["__scopeId","data-v-5c04d110"]]);export{Je as R};
1
+ import{_ as Y,w as G,o as X,a as J,b as i,c as l,d as t,t as _,F as N,r as O,g as P,k as m,l as K,p as Z,m as S,n as ee,a9 as te,e as se,a3 as ae,q as ne,aa as q,a7 as j,X as oe,H as ie,a8 as le}from"./_plugin-vue_export-helper-DJsHCwvl.js";import{c as re,s as ce,b as ue,w as z}from"./pow-DUr-T9XX.js";const de={class:"remote-auth-inline"},he={key:0,class:"success-section"},ve={class:"success-message"},fe={key:1,class:"error-section"},me={class:"error-message"},ge={key:2,class:"auth-display"},pe={class:"auth-content"},_e={class:"pairing-code-section"},we={class:"slot-machine","aria-hidden":"true"},ye={class:"slot-word"},ke={class:"site-url"},be={key:3,class:"auth-display"},$e={class:"auth-content"},Ae={key:0,class:"pairing-code-section"},Re={class:"slot-machine stopped"},Se={class:"slot-word"},Ce={class:"site-url"},Pe={class:"waiting-indicator"},Te={__name:"RemoteAuthRequest",props:{active:{type:Boolean,default:!1}},emits:["authenticated","cancelled","error","register"],setup(w,{expose:M,emit:x}){const $=w,g=x,v=m(null),y=m(!1),n=m(null),A=m("connecting"),p=m(null),u=m(["","",""]);let a=null,k=null;const W=S(()=>v.value?v.value.replace(/\./g," "):""),b=S(()=>{if(!p.value)return"";const s=(p.value.auth_site_url||`${location.protocol}//${location.host}/auth/`).replace(/^https?:\/\//,"");return s.endsWith("/")?s.slice(0,-1):s}),E=S(()=>A.value==="authenticating"?"Complete on another device…":"Waiting for authentication…"),B=S(()=>"Authenticated successfully!");function C(){return z[Math.floor(Math.random()*z.length)]}function V(){u.value=[C(),C(),C()];const c=20,s=[setInterval(()=>{const o=[...u.value];o[0]=C(),u.value=o},140),setInterval(()=>{const o=[...u.value];o[1]=C(),u.value=o},170),setInterval(()=>{const o=[...u.value];o[2]=C(),u.value=o},200)];k=s,setTimeout(()=>{s.forEach(o=>clearInterval(o)),k=null},c*170)}function f(){k&&(Array.isArray(k)?k.forEach(c=>clearInterval(c)):clearInterval(k),k=null)}async function L(){n.value=null,y.value=!1,v.value=null,A.value="connecting",V();try{p.value=await K();const c=p.value?.auth_host,s="/auth/ws/remote-auth/request",o=c&&location.host!==c?`//${c}${s}`:s;a=await Z(o);const R=await a.receive_json();if(R.pow){const h=re(R.pow.challenge),F=await ce(h,R.pow.work);a.send_json({pow:ue(F),action:"login"})}const T=await a.receive_json();if(T.status)throw new Error(T.detail||`Failed to create remote auth request: ${T.status}`);for(v.value=T.pairing_code,f(),A.value="waiting";;){const h=await a.receive_json();if(h.status==="locked")A.value="authenticating";else if(h.status==="paired")A.value="authenticating";else if(h.status==="authenticated"){y.value=!0,g("authenticated",{session_token:h.session_token});break}else{if(h.status==="denied")throw new Error("Access denied");if(h.status==="completed"){h.reset_token&&(y.value=!0,g("register",h.reset_token));break}else if(h.status==="error"||h.detail)throw new Error(h.detail||"Remote authentication failed")}}}catch(c){console.error("Remote authentication error:",c);const s=c.message||"Authentication failed";n.value=s,g("error",s)}finally{a&&(a.close(),a=null)}}function U(){L()}function I(){a&&(a.close(),a=null),g("cancelled")}return G(()=>$.active,c=>{c&&!v.value&&!n.value&&!y.value&&L()}),X(()=>{$.active&&L()}),J(()=>{a&&(a.close(),a=null),f()}),M({retry:U,cancel:I}),(c,s)=>(i(),l("div",de,[y.value?(i(),l("div",he,[t("p",ve,"✅ "+_(B.value),1)])):n.value?(i(),l("div",fe,[t("p",me,_(n.value),1),t("button",{class:"btn-primary",onClick:U,style:{"margin-top":"0.75rem"}},"Try Again")])):A.value==="connecting"?(i(),l("div",ge,[t("div",pe,[t("div",_e,[s[0]||(s[0]=t("p",{class:"pairing-label"},"Enter the code words:",-1)),t("div",we,[(i(!0),l(N,null,O(u.value,(o,R)=>(i(),l("div",{class:"slot-reel",key:R},[t("div",ye,_(o),1)]))),128))]),t("p",ke,_(b.value),1)])]),s[1]||(s[1]=t("div",{class:"waiting-indicator"},[t("div",{class:"spinner-small"}),t("span",null,"Generating code…")],-1))])):(i(),l("div",be,[t("div",$e,[v.value?(i(),l("div",Ae,[s[2]||(s[2]=t("p",{class:"pairing-label"},"Enter the code words:",-1)),t("div",Re,[(i(!0),l(N,null,O(W.value.split(" "),(o,R)=>(i(),l("div",{class:"slot-reel",key:R},[t("div",Se,_(o),1)]))),128))]),t("p",Ce,_(b.value),1)])):P("",!0)]),t("div",Pe,[s[3]||(s[3]=t("div",{class:"spinner-small"},null,-1)),t("span",null,_(E.value),1)])]))]))}},Ee=Y(Te,[["__scopeId","data-v-1280e25b"]]),We={class:"app-shell"},Le={key:0,class:"global-status",style:{display:"block"}},Ue={class:"view-root"},Ie={key:0,class:"surface surface--tight"},Me={class:"view-header center"},xe={key:0,class:"user-line"},Be=["innerHTML"],Ve={class:"section-block"},Fe={class:"section-body center"},qe={key:0,class:"auth-view"},De=["disabled"],He=["disabled"],Ne=["disabled"],Oe=["disabled"],je={key:1,class:"auth-view"},ze={__name:"RestrictedAuth",props:{mode:{type:String,default:"login",validator:w=>["login","reauth","forbidden"].includes(w)}},emits:["authenticated","forbidden","logout","back","home","auth-error"],setup(w,{expose:M,emit:x}){const $=w,g=x,v=oe({show:!1,message:"",type:"info"}),y=m(!0),n=m(!1),A=m(null),p=m(null),u=m("initial"),a=m("local"),k=m(null);let W=null;const b=S(()=>!!p.value),E=S(()=>y.value?!1:$.mode==="reauth"?!0:u.value!=="forbidden"),B=S(()=>$.mode==="reauth"?"🔐 Additional Authentication":u.value==="forbidden"?"🚫 Forbidden":`🔐 ${A.value?.rp_name||location.origin}`),C=S(()=>$.mode==="reauth"?"Please verify your identity to continue with this action.":u.value==="forbidden"?"You lack the required permissions.":a.value==="remote"?'Confirm from your other device. Or <a href="#" class="inline-link" data-action="local">this device</a>.':E.value&&$.mode!=="reauth"?'Please sign in with your passkey. Or use <a href="#" class="inline-link" data-action="remote">another device</a>.':"Please sign in with your passkey."),V=S(()=>p.value?.ctx.user.display_name||"User");function f(e,r="info",d=3e3){v.show=!0,v.message=e,v.type=r,W&&clearTimeout(W),d>0&&(W=setTimeout(()=>{v.show=!1},d))}async function L(){try{const e=await K();if(A.value=e,e?.rp_name){const r=$.mode==="reauth"?"Verify Identity":b.value?"Forbidden":"Sign In";document.title=`${e.rp_name} · ${r}`}}catch(e){console.warn("Unable to load settings",e)}}async function U(){try{p.value=await q("/auth/api/validate",{method:"POST"}),b.value&&$.mode!=="reauth"?(u.value="forbidden",g("forbidden",p.value)):u.value="login"}catch(e){p.value=null,u.value="login",e.status!==401&&e.status!==403&&f(j(e),"error",4e3)}}async function I(){if(!E.value||n.value)return;n.value=!0,f("Starting authentication…","info");let e;try{e=await ie.authenticate()}catch(r){n.value=!1;const d=r?.message||"Passkey authentication cancelled",H=d==="Passkey authentication cancelled";f(d,H?"info":"error",4e3),g("auth-error",{message:d,cancelled:H});return}try{await o(e)}catch(r){n.value=!1;const d=r?.message||"Failed to establish session";f(d,"error",4e3),g("auth-error",{message:d,cancelled:!1});return}n.value=!1,g("authenticated",e)}async function c(){if(!n.value){n.value=!0;try{await q("/auth/api/logout",{method:"POST"}),p.value=null,u.value="login",f("Logged out. You can sign in with a different account.","info",3e3)}catch(e){f(j(e),"error",4e3)}finally{n.value=!1}g("logout")}}function s(){const e=window.open("/auth/","passkey_auth_profile");e&&e.focus()}async function o(e){if(!e?.session_token)throw console.error("setSessionCookie called with missing session_token:",e),new Error("Authentication response missing session_token");return await q("/auth/api/set-session",{method:"POST",headers:{Authorization:`Bearer ${e.session_token}`}})}function R(){a.value="remote"}function T(){a.value="local"}async function h(e){f("Authenticated from another device!","success",2e3);try{await o(e)}catch(r){const d=r?.message||"Failed to establish session";f(d,"error",4e3),g("auth-error",{message:d,cancelled:!1});return}g("authenticated",e)}function F(e){f("Registration approved! Redirecting...","success",2e3);const r=le()||"/auth/";window.location.href=`${r}${e}`}function Q(e){}function D(e){const r=e.target;if(r.tagName==="A"&&r.classList.contains("inline-link")){e.preventDefault();const d=r.dataset.action;d==="remote"?R():d==="local"&&T()}}return G(y,e=>{e||ee(()=>te(k.value))}),X(async()=>{await L(),await U(),y.value=!1,document.addEventListener("click",D)}),J(()=>{document.removeEventListener("click",D)}),M({showMessage:f,isAuthenticated:b,session:p}),(e,r)=>(i(),l("div",We,[v.show?(i(),l("div",Le,[t("div",{class:se(["status",v.type])},_(v.message),3)])):P("",!0),t("main",Ue,[y.value?P("",!0):(i(),l("div",Ie,[t("header",Me,[t("h1",null,_(B.value),1),b.value?(i(),l("p",xe,"👤 "+_(V.value),1)):P("",!0),t("p",{class:"view-lede",innerHTML:C.value},null,8,Be)]),t("section",Ve,[t("div",Fe,[a.value==="local"?(i(),l("div",qe,[t("div",{class:"button-row center",ref_key:"buttonRow",ref:k},[ae(e.$slots,"actions",{loading:n.value,canAuthenticate:E.value,isAuthenticated:b.value,authenticate:I,logout:c,mode:w.mode},()=>[t("button",{class:"btn-secondary",disabled:n.value,onClick:r[0]||(r[0]=d=>e.$emit("back"))},"Back",8,De),E.value?(i(),l("button",{key:0,class:"btn-primary",disabled:n.value,onClick:I},_(n.value?w.mode==="reauth"?"Verifying…":"Signing in…":w.mode==="reauth"?"Verify":"Login"),9,He)):P("",!0),b.value&&w.mode!=="reauth"?(i(),l("button",{key:1,class:"btn-danger",disabled:n.value,onClick:c},"Logout",8,Ne)):P("",!0),b.value&&w.mode!=="reauth"?(i(),l("button",{key:2,class:"btn-primary",disabled:n.value,onClick:s},"Profile",8,Oe)):P("",!0)])],512)])):a.value==="remote"?(i(),l("div",je,[ne(Ee,{active:a.value==="remote",onAuthenticated:h,onRegister:F,onCancelled:T,onError:Q},null,8,["active"])])):P("",!0)])])]))])]))}},Xe=Y(ze,[["__scopeId","data-v-3295ed62"]]);export{Xe as R};
@@ -0,0 +1,33 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();function Qn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const K={},ut=[],Te=()=>{},cr=()=>!1,dn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),es=e=>e.startsWith("onUpdate:"),Q=Object.assign,ts=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ci=Object.prototype.hasOwnProperty,U=(e,t)=>Ci.call(e,t),R=Array.isArray,ft=e=>Kt(e)==="[object Map]",yt=e=>Kt(e)==="[object Set]",Ts=e=>Kt(e)==="[object Date]",P=e=>typeof e=="function",q=e=>typeof e=="string",pe=e=>typeof e=="symbol",k=e=>e!==null&&typeof e=="object",ar=e=>(k(e)||P(e))&&P(e.then)&&P(e.catch),ur=Object.prototype.toString,Kt=e=>ur.call(e),Oi=e=>Kt(e).slice(8,-1),fr=e=>Kt(e)==="[object Object]",hn=e=>q(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,At=Qn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),pn=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Ii=/-\w/g,We=pn(e=>e.replace(Ii,t=>t.slice(1).toUpperCase())),Pi=/\B([A-Z])/g,Je=pn(e=>e.replace(Pi,"-$1").toLowerCase()),dr=pn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rn=pn(e=>e?`on${dr(e)}`:""),Be=(e,t)=>!Object.is(e,t),Xt=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},hr=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},gn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let As;const mn=()=>As||(As=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ns(e){if(R(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=q(s)?Fi(s):ns(s);if(r)for(const i in r)t[i]=r[i]}return t}else if(q(e)||k(e))return e}const Mi=/;(?![^(]*\))/g,Ni=/:([^]+)/,Di=/\/\*[^]*?\*\//g;function Fi(e){const t={};return e.replace(Di,"").split(Mi).forEach(n=>{if(n){const s=n.split(Ni);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ss(e){let t="";if(q(e))t=e;else if(R(e))for(let n=0;n<e.length;n++){const s=ss(e[n]);s&&(t+=s+" ")}else if(k(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ui="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Li=Qn(Ui);function pr(e){return!!e||e===""}function Ki(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=it(e[s],t[s]);return n}function it(e,t){if(e===t)return!0;let n=Ts(e),s=Ts(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=pe(e),s=pe(t),n||s)return e===t;if(n=R(e),s=R(t),n||s)return n&&s?Ki(e,t):!1;if(n=k(e),s=k(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const o in e){const l=e.hasOwnProperty(o),c=t.hasOwnProperty(o);if(l&&!c||!l&&c||!it(e[o],t[o]))return!1}}return String(e)===String(t)}function rs(e,t){return e.findIndex(n=>it(n,t))}const gr=e=>!!(e&&e.__v_isRef===!0),ji=e=>q(e)?e:e==null?"":R(e)||k(e)&&(e.toString===ur||!P(e.toString))?gr(e)?ji(e.value):JSON.stringify(e,mr,2):String(e),mr=(e,t)=>gr(t)?mr(e,t.value):ft(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[Cn(s,i)+" =>"]=r,n),{})}:yt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Cn(n))}:pe(t)?Cn(t):k(t)&&!R(t)&&!fr(t)?String(t):t,Cn=(e,t="")=>{var n;return pe(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let z;class br{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=z,!t&&z&&(this.index=(z.scopes||(z.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=z;try{return z=this,t()}finally{z=n}}}on(){++this._on===1&&(this.prevScope=z,z=this)}off(){this._on>0&&--this._on===0&&(z=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function jc(e){return new br(e)}function Hi(){return z}function Hc(e,t=!1){z&&z.cleanups.push(e)}let $;const On=new WeakSet;class yr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,z&&z.active&&z.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,On.has(this)&&(On.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||wr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Rs(this),vr(this);const t=$,n=he;$=this,he=!0;try{return this.fn()}finally{Er(this),$=t,he=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ls(t);this.deps=this.depsTail=void 0,Rs(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?On.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Hn(this)&&this.run()}get dirty(){return Hn(this)}}let _r=0,Rt,Ct;function wr(e,t=!1){if(e.flags|=8,t){e.next=Ct,Ct=e;return}e.next=Rt,Rt=e}function is(){_r++}function os(){if(--_r>0)return;if(Ct){let t=Ct;for(Ct=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Rt;){let t=Rt;for(Rt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function vr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Er(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),ls(s),$i(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Hn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Sr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Sr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Nt)||(e.globalVersion=Nt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Hn(e))))return;e.flags|=2;const t=e.dep,n=$,s=he;$=e,he=!0;try{vr(e);const r=e.fn(e._value);(t.version===0||Be(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{$=n,he=s,Er(e),e.flags&=-3}}function ls(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)ls(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function $i(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let he=!0;const xr=[];function Ne(){xr.push(he),he=!1}function De(){const e=xr.pop();he=e===void 0?!0:e}function Rs(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=$;$=void 0;try{t()}finally{$=n}}}let Nt=0;class ki{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class cs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!$||!he||$===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==$)n=this.activeLink=new ki($,this),$.deps?(n.prevDep=$.depsTail,$.depsTail.nextDep=n,$.depsTail=n):$.deps=$.depsTail=n,Tr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=$.depsTail,n.nextDep=void 0,$.depsTail.nextDep=n,$.depsTail=n,$.deps===n&&($.deps=s)}return n}trigger(t){this.version++,Nt++,this.notify(t)}notify(t){is();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{os()}}}function Tr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Tr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const sn=new WeakMap,nt=Symbol(""),$n=Symbol(""),Dt=Symbol("");function X(e,t,n){if(he&&$){let s=sn.get(e);s||sn.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new cs),r.map=s,r.key=n),r.track()}}function Ie(e,t,n,s,r,i){const o=sn.get(e);if(!o){Nt++;return}const l=c=>{c&&c.trigger()};if(is(),t==="clear")o.forEach(l);else{const c=R(e),d=c&&hn(n);if(c&&n==="length"){const f=Number(s);o.forEach((p,E)=>{(E==="length"||E===Dt||!pe(E)&&E>=f)&&l(p)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),d&&l(o.get(Dt)),t){case"add":c?d&&l(o.get("length")):(l(o.get(nt)),ft(e)&&l(o.get($n)));break;case"delete":c||(l(o.get(nt)),ft(e)&&l(o.get($n)));break;case"set":ft(e)&&l(o.get(nt));break}}os()}function Vi(e,t){const n=sn.get(e);return n&&n.get(t)}function ot(e){const t=F(e);return t===e?t:(X(t,"iterate",Dt),fe(e)?t:t.map(ge))}function bn(e){return X(e=F(e),"iterate",Dt),e}function He(e,t){return Fe(e)?pt(st(e)?ge(t):t):ge(t)}const Bi={__proto__:null,[Symbol.iterator](){return In(this,Symbol.iterator,e=>He(this,e))},concat(...e){return ot(this).concat(...e.map(t=>R(t)?ot(t):t))},entries(){return In(this,"entries",e=>(e[1]=He(this,e[1]),e))},every(e,t){return Ce(this,"every",e,t,void 0,arguments)},filter(e,t){return Ce(this,"filter",e,t,n=>n.map(s=>He(this,s)),arguments)},find(e,t){return Ce(this,"find",e,t,n=>He(this,n),arguments)},findIndex(e,t){return Ce(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ce(this,"findLast",e,t,n=>He(this,n),arguments)},findLastIndex(e,t){return Ce(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ce(this,"forEach",e,t,void 0,arguments)},includes(...e){return Pn(this,"includes",e)},indexOf(...e){return Pn(this,"indexOf",e)},join(e){return ot(this).join(e)},lastIndexOf(...e){return Pn(this,"lastIndexOf",e)},map(e,t){return Ce(this,"map",e,t,void 0,arguments)},pop(){return St(this,"pop")},push(...e){return St(this,"push",e)},reduce(e,...t){return Cs(this,"reduce",e,t)},reduceRight(e,...t){return Cs(this,"reduceRight",e,t)},shift(){return St(this,"shift")},some(e,t){return Ce(this,"some",e,t,void 0,arguments)},splice(...e){return St(this,"splice",e)},toReversed(){return ot(this).toReversed()},toSorted(e){return ot(this).toSorted(e)},toSpliced(...e){return ot(this).toSpliced(...e)},unshift(...e){return St(this,"unshift",e)},values(){return In(this,"values",e=>He(this,e))}};function In(e,t,n){const s=bn(e),r=s[t]();return s!==e&&!fe(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const Wi=Array.prototype;function Ce(e,t,n,s,r,i){const o=bn(e),l=o!==e&&!fe(e),c=o[t];if(c!==Wi[t]){const p=c.apply(e,i);return l?ge(p):p}let d=n;o!==e&&(l?d=function(p,E){return n.call(this,He(e,p),E,e)}:n.length>2&&(d=function(p,E){return n.call(this,p,E,e)}));const f=c.call(o,d,s);return l&&r?r(f):f}function Cs(e,t,n,s){const r=bn(e);let i=n;return r!==e&&(fe(e)?n.length>3&&(i=function(o,l,c){return n.call(this,o,l,c,e)}):i=function(o,l,c){return n.call(this,o,He(e,l),c,e)}),r[t](i,...s)}function Pn(e,t,n){const s=F(e);X(s,"iterate",Dt);const r=s[t](...n);return(r===-1||r===!1)&&yn(n[0])?(n[0]=F(n[0]),s[t](...n)):r}function St(e,t,n=[]){Ne(),is();const s=F(e)[t].apply(e,n);return os(),De(),s}const qi=Qn("__proto__,__v_isRef,__isVue"),Ar=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(pe));function Ji(e){pe(e)||(e=String(e));const t=F(this);return X(t,"has",e),t.hasOwnProperty(e)}class Rr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?so:Pr:i?Ir:Or).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=R(t);if(!r){let c;if(o&&(c=Bi[n]))return c;if(n==="hasOwnProperty")return Ji}const l=Reflect.get(t,n,G(t)?t:s);if((pe(n)?Ar.has(n):qi(n))||(r||X(t,"get",n),i))return l;if(G(l)){const c=o&&hn(n)?l:l.value;return r&&k(c)?Vn(c):c}return k(l)?r?Vn(l):us(l):l}}class Cr extends Rr{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=R(t)&&hn(n);if(!this._isShallow){const d=Fe(i);if(!fe(s)&&!Fe(s)&&(i=F(i),s=F(s)),!o&&G(i)&&!G(s))return d||(i.value=s),!0}const l=o?Number(n)<t.length:U(t,n),c=Reflect.set(t,n,s,G(t)?t:r);return t===F(r)&&(l?Be(s,i)&&Ie(t,"set",n,s):Ie(t,"add",n,s)),c}deleteProperty(t,n){const s=U(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&Ie(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!pe(n)||!Ar.has(n))&&X(t,"has",n),s}ownKeys(t){return X(t,"iterate",R(t)?"length":nt),Reflect.ownKeys(t)}}class Gi extends Rr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Yi=new Cr,zi=new Gi,Xi=new Cr(!0);const kn=e=>e,qt=e=>Reflect.getPrototypeOf(e);function Zi(e,t,n){return function(...s){const r=this.__v_raw,i=F(r),o=ft(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,d=r[e](...s),f=n?kn:t?pt:ge;return!t&&X(i,"iterate",c?$n:nt),Q(Object.create(d),{next(){const{value:p,done:E}=d.next();return E?{value:p,done:E}:{value:l?[f(p[0]),f(p[1])]:f(p),done:E}}})}}function Jt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Qi(e,t){const n={get(r){const i=this.__v_raw,o=F(i),l=F(r);e||(Be(r,l)&&X(o,"get",r),X(o,"get",l));const{has:c}=qt(o),d=t?kn:e?pt:ge;if(c.call(o,r))return d(i.get(r));if(c.call(o,l))return d(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&X(F(r),"iterate",nt),r.size},has(r){const i=this.__v_raw,o=F(i),l=F(r);return e||(Be(r,l)&&X(o,"has",r),X(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=F(l),d=t?kn:e?pt:ge;return!e&&X(c,"iterate",nt),l.forEach((f,p)=>r.call(i,d(f),d(p),o))}};return Q(n,e?{add:Jt("add"),set:Jt("set"),delete:Jt("delete"),clear:Jt("clear")}:{add(r){!t&&!fe(r)&&!Fe(r)&&(r=F(r));const i=F(this);return qt(i).has.call(i,r)||(i.add(r),Ie(i,"add",r,r)),this},set(r,i){!t&&!fe(i)&&!Fe(i)&&(i=F(i));const o=F(this),{has:l,get:c}=qt(o);let d=l.call(o,r);d||(r=F(r),d=l.call(o,r));const f=c.call(o,r);return o.set(r,i),d?Be(i,f)&&Ie(o,"set",r,i):Ie(o,"add",r,i),this},delete(r){const i=F(this),{has:o,get:l}=qt(i);let c=o.call(i,r);c||(r=F(r),c=o.call(i,r)),l&&l.call(i,r);const d=i.delete(r);return c&&Ie(i,"delete",r,void 0),d},clear(){const r=F(this),i=r.size!==0,o=r.clear();return i&&Ie(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Zi(r,e,t)}),n}function as(e,t){const n=Qi(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(U(n,r)&&r in s?n:s,r,i)}const eo={get:as(!1,!1)},to={get:as(!1,!0)},no={get:as(!0,!1)};const Or=new WeakMap,Ir=new WeakMap,Pr=new WeakMap,so=new WeakMap;function ro(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function io(e){return e.__v_skip||!Object.isExtensible(e)?0:ro(Oi(e))}function us(e){return Fe(e)?e:fs(e,!1,Yi,eo,Or)}function oo(e){return fs(e,!1,Xi,to,Ir)}function Vn(e){return fs(e,!0,zi,no,Pr)}function fs(e,t,n,s,r){if(!k(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=io(e);if(i===0)return e;const o=r.get(e);if(o)return o;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function st(e){return Fe(e)?st(e.__v_raw):!!(e&&e.__v_isReactive)}function Fe(e){return!!(e&&e.__v_isReadonly)}function fe(e){return!!(e&&e.__v_isShallow)}function yn(e){return e?!!e.__v_raw:!1}function F(e){const t=e&&e.__v_raw;return t?F(t):e}function lo(e){return!U(e,"__v_skip")&&Object.isExtensible(e)&&hr(e,"__v_skip",!0),e}const ge=e=>k(e)?us(e):e,pt=e=>k(e)?Vn(e):e;function G(e){return e?e.__v_isRef===!0:!1}function $c(e){return co(e,!1)}function co(e,t){return G(e)?e:new ao(e,t)}class ao{constructor(t,n){this.dep=new cs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:F(t),this._value=n?t:ge(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||fe(t)||Fe(t);t=s?t:F(t),Be(t,n)&&(this._rawValue=t,this._value=s?t:ge(t),this.dep.trigger())}}function Mr(e){return G(e)?e.value:e}const uo={get:(e,t,n)=>t==="__v_raw"?e:Mr(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return G(r)&&!G(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Nr(e){return st(e)?e:new Proxy(e,uo)}function kc(e){const t=R(e)?new Array(e.length):{};for(const n in e)t[n]=ho(e,n);return t}class fo{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=F(t);let r=!0,i=t;if(!R(t)||!hn(String(n)))do r=!yn(i)||fe(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Mr(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&G(this._raw[this._key])){const n=this._object[this._key];if(G(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Vi(this._raw,this._key)}}function ho(e,t,n){return new fo(e,t,n)}class po{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new cs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Nt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&$!==this)return wr(this,!0),!0}get value(){const t=this.dep.track();return Sr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function go(e,t,n=!1){let s,r;return P(e)?s=e:(s=e.get,r=e.set),new po(s,r,n)}const Gt={},rn=new WeakMap;let Qe;function mo(e,t=!1,n=Qe){if(n){let s=rn.get(n);s||rn.set(n,s=[]),s.push(e)}}function bo(e,t,n=K){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,d=O=>r?O:fe(O)||r===!1||r===0?Pe(O,1):Pe(O);let f,p,E,x,C=!1,N=!1;if(G(e)?(p=()=>e.value,C=fe(e)):st(e)?(p=()=>d(e),C=!0):R(e)?(N=!0,C=e.some(O=>st(O)||fe(O)),p=()=>e.map(O=>{if(G(O))return O.value;if(st(O))return d(O);if(P(O))return c?c(O,2):O()})):P(e)?t?p=c?()=>c(e,2):e:p=()=>{if(E){Ne();try{E()}finally{De()}}const O=Qe;Qe=f;try{return c?c(e,3,[x]):e(x)}finally{Qe=O}}:p=Te,t&&r){const O=p,J=r===!0?1/0:r;p=()=>Pe(O(),J)}const ee=Hi(),D=()=>{f.stop(),ee&&ee.active&&ts(ee.effects,f)};if(i&&t){const O=t;t=(...J)=>{O(...J),D()}}let V=N?new Array(e.length).fill(Gt):Gt;const W=O=>{if(!(!(f.flags&1)||!f.dirty&&!O))if(t){const J=f.run();if(r||C||(N?J.some((Ke,me)=>Be(Ke,V[me])):Be(J,V))){E&&E();const Ke=Qe;Qe=f;try{const me=[J,V===Gt?void 0:N&&V[0]===Gt?[]:V,x];V=J,c?c(t,3,me):t(...me)}finally{Qe=Ke}}}else f.run()};return l&&l(W),f=new yr(p),f.scheduler=o?()=>o(W,!1):W,x=O=>mo(O,!1,f),E=f.onStop=()=>{const O=rn.get(f);if(O){if(c)c(O,4);else for(const J of O)J();rn.delete(f)}},t?s?W(!0):V=f.run():o?o(W.bind(null,!0),!0):f.run(),D.pause=f.pause.bind(f),D.resume=f.resume.bind(f),D.stop=D,D}function Pe(e,t=1/0,n){if(t<=0||!k(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,G(e))Pe(e.value,t,n);else if(R(e))for(let s=0;s<e.length;s++)Pe(e[s],t,n);else if(yt(e)||ft(e))e.forEach(s=>{Pe(s,t,n)});else if(fr(e)){for(const s in e)Pe(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Pe(e[s],t,n)}return e}function jt(e,t,n,s){try{return s?e(...s):e()}catch(r){_n(r,t,n)}}function Re(e,t,n,s){if(P(e)){const r=jt(e,t,n,s);return r&&ar(r)&&r.catch(i=>{_n(i,t,n)}),r}if(R(e)){const r=[];for(let i=0;i<e.length;i++)r.push(Re(e[i],t,n,s));return r}}function _n(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||K;if(t){let l=t.parent;const c=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const f=l.ec;if(f){for(let p=0;p<f.length;p++)if(f[p](e,c,d)===!1)return}l=l.parent}if(i){Ne(),jt(i,null,10,[e,c,d]),De();return}}yo(e,n,r,s,o)}function yo(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const se=[];let Ee=-1;const dt=[];let $e=null,lt=0;const Dr=Promise.resolve();let on=null;function Fr(e){const t=on||Dr;return e?t.then(this?e.bind(this):e):t}function _o(e){let t=Ee+1,n=se.length;for(;t<n;){const s=t+n>>>1,r=se[s],i=Ft(r);i<e||i===e&&r.flags&2?t=s+1:n=s}return t}function ds(e){if(!(e.flags&1)){const t=Ft(e),n=se[se.length-1];!n||!(e.flags&2)&&t>=Ft(n)?se.push(e):se.splice(_o(t),0,e),e.flags|=1,Ur()}}function Ur(){on||(on=Dr.then(Kr))}function wo(e){R(e)?dt.push(...e):$e&&e.id===-1?$e.splice(lt+1,0,e):e.flags&1||(dt.push(e),e.flags|=1),Ur()}function Os(e,t,n=Ee+1){for(;n<se.length;n++){const s=se[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;se.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Lr(e){if(dt.length){const t=[...new Set(dt)].sort((n,s)=>Ft(n)-Ft(s));if(dt.length=0,$e){$e.push(...t);return}for($e=t,lt=0;lt<$e.length;lt++){const n=$e[lt];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}$e=null,lt=0}}const Ft=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Kr(e){try{for(Ee=0;Ee<se.length;Ee++){const t=se[Ee];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),jt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ee<se.length;Ee++){const t=se[Ee];t&&(t.flags&=-2)}Ee=-1,se.length=0,Lr(),on=null,(se.length||dt.length)&&Kr()}}let Z=null,jr=null;function ln(e){const t=Z;return Z=e,jr=e&&e.type.__scopeId||null,t}function vo(e,t=Z,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&js(-1);const i=ln(t);let o;try{o=e(...r)}finally{ln(i),s._d&&js(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Vc(e,t){if(Z===null)return e;const n=Sn(Z),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[i,o,l,c=K]=t[r];i&&(P(i)&&(i={mounted:i,updated:i}),i.deep&&Pe(o),s.push({dir:i,instance:n,value:o,oldValue:void 0,arg:l,modifiers:c}))}return e}function Xe(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const l=r[o];i&&(l.oldValue=i[o].value);let c=l.dir[s];c&&(Ne(),Re(c,n,8,[e.el,l,e,t]),De())}}function Eo(e,t){if(re){let n=re.provides;const s=re.parent&&re.parent.provides;s===n&&(n=re.provides=Object.create(s)),n[e]=t}}function Zt(e,t,n=!1){const s=di();if(s||rt){let r=rt?rt._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&P(t)?t.call(s&&s.proxy):t}}function Bc(){return!!(di()||rt)}const So=Symbol.for("v-scx"),xo=()=>Zt(So);function Mn(e,t,n){return Hr(e,t,n)}function Hr(e,t,n=K){const{immediate:s,deep:r,flush:i,once:o}=n,l=Q({},n),c=t&&s||!t&&i!=="post";let d;if(Lt){if(i==="sync"){const x=xo();d=x.__watcherHandles||(x.__watcherHandles=[])}else if(!c){const x=()=>{};return x.stop=Te,x.resume=Te,x.pause=Te,x}}const f=re;l.call=(x,C,N)=>Re(x,f,C,N);let p=!1;i==="post"?l.scheduler=x=>{ce(x,f&&f.suspense)}:i!=="sync"&&(p=!0,l.scheduler=(x,C)=>{C?x():ds(x)}),l.augmentJob=x=>{t&&(x.flags|=4),p&&(x.flags|=2,f&&(x.id=f.uid,x.i=f))};const E=bo(e,t,l);return Lt&&(d?d.push(E):c&&E()),E}function To(e,t,n){const s=this.proxy,r=q(e)?e.includes(".")?$r(s,e):()=>s[e]:e.bind(s,s);let i;P(t)?i=t:(i=t.handler,n=t);const o=Ht(this),l=Hr(r,i.bind(s),n);return o(),l}function $r(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const Ao=Symbol("_vte"),Ro=e=>e.__isTeleport,Co=Symbol("_leaveCb");function hs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,hs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function kr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const cn=new WeakMap;function Ot(e,t,n,s,r=!1){if(R(e)){e.forEach((C,N)=>Ot(C,t&&(R(t)?t[N]:t),n,s,r));return}if(ht(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Ot(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Sn(s.component):s.el,o=r?null:i,{i:l,r:c}=e,d=t&&t.r,f=l.refs===K?l.refs={}:l.refs,p=l.setupState,E=F(p),x=p===K?cr:C=>U(E,C);if(d!=null&&d!==c){if(Is(t),q(d))f[d]=null,x(d)&&(p[d]=null);else if(G(d)){d.value=null;const C=t;C.k&&(f[C.k]=null)}}if(P(c))jt(c,l,12,[o,f]);else{const C=q(c),N=G(c);if(C||N){const ee=()=>{if(e.f){const D=C?x(c)?p[c]:f[c]:c.value;if(r)R(D)&&ts(D,i);else if(R(D))D.includes(i)||D.push(i);else if(C)f[c]=[i],x(c)&&(p[c]=f[c]);else{const V=[i];c.value=V,e.k&&(f[e.k]=V)}}else C?(f[c]=o,x(c)&&(p[c]=o)):N&&(c.value=o,e.k&&(f[e.k]=o))};if(o){const D=()=>{ee(),cn.delete(e)};D.id=-1,cn.set(e,D),ce(D,n)}else Is(e),ee()}}}function Is(e){const t=cn.get(e);t&&(t.flags|=8,cn.delete(e))}mn().requestIdleCallback;mn().cancelIdleCallback;const ht=e=>!!e.type.__asyncLoader,Vr=e=>e.type.__isKeepAlive;function Oo(e,t){Br(e,"a",t)}function Io(e,t){Br(e,"da",t)}function Br(e,t,n=re){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(wn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Vr(r.parent.vnode)&&Po(s,t,n,r),r=r.parent}}function Po(e,t,n,s){const r=wn(t,e,s,!0);Wr(()=>{ts(s[t],r)},n)}function wn(e,t,n=re,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Ne();const l=Ht(n),c=Re(t,n,e,o);return l(),De(),c});return s?r.unshift(i):r.push(i),i}}const Le=e=>(t,n=re)=>{(!Lt||e==="sp")&&wn(e,(...s)=>t(...s),n)},Mo=Le("bm"),No=Le("m"),Do=Le("bu"),Fo=Le("u"),Uo=Le("bum"),Wr=Le("um"),Lo=Le("sp"),Ko=Le("rtg"),jo=Le("rtc");function Ho(e,t=re){wn("ec",e,t)}const $o=Symbol.for("v-ndc");function Wc(e,t,n,s){let r;const i=n,o=R(e);if(o||q(e)){const l=o&&st(e);let c=!1,d=!1;l&&(c=!fe(e),d=Fe(e),e=bn(e)),r=new Array(e.length);for(let f=0,p=e.length;f<p;f++)r[f]=t(c?d?pt(ge(e[f])):ge(e[f]):e[f],f,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,i)}else if(k(e))if(e[Symbol.iterator])r=Array.from(e,(l,c)=>t(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,d=l.length;c<d;c++){const f=l[c];r[c]=t(e[f],f,c,i)}}else r=[];return r}function qc(e,t,n={},s,r){if(Z.ce||Z.parent&&ht(Z.parent)&&Z.parent.ce){const d=Object.keys(n).length>0;return t!=="default"&&(n.name=t),Gn(),Yn(ae,null,[Ae("slot",n,s&&s())],d?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),Gn();const o=i&&qr(i(n)),l=n.key||o&&o.key,c=Yn(ae,{key:(l&&!pe(l)?l:`_${t}`)+(!o&&s?"_fb":"")},o||(s?s():[]),o&&e._===1?64:-2);return i&&i._c&&(i._d=!0),c}function qr(e){return e.some(t=>ms(t)?!(t.type===Ue||t.type===ae&&!qr(t.children)):!0)?e:null}const Bn=e=>e?hi(e)?Sn(e):Bn(e.parent):null,It=Q(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Bn(e.parent),$root:e=>Bn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Gr(e),$forceUpdate:e=>e.f||(e.f=()=>{ds(e.update)}),$nextTick:e=>e.n||(e.n=Fr.bind(e.proxy)),$watch:e=>To.bind(e)}),Nn=(e,t)=>e!==K&&!e.__isScriptSetup&&U(e,t),ko={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;if(t[0]!=="$"){const E=o[t];if(E!==void 0)switch(E){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Nn(s,t))return o[t]=1,s[t];if(r!==K&&U(r,t))return o[t]=2,r[t];if(U(i,t))return o[t]=3,i[t];if(n!==K&&U(n,t))return o[t]=4,n[t];Wn&&(o[t]=0)}}const d=It[t];let f,p;if(d)return t==="$attrs"&&X(e.attrs,"get",""),d(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==K&&U(n,t))return o[t]=4,n[t];if(p=c.config.globalProperties,U(p,t))return p[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return Nn(r,t)?(r[t]=n,!0):s!==K&&U(s,t)?(s[t]=n,!0):U(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},l){let c;return!!(n[l]||e!==K&&l[0]!=="$"&&U(e,l)||Nn(t,l)||U(i,l)||U(s,l)||U(It,l)||U(r.config.globalProperties,l)||(c=o.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:U(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ps(e){return R(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Wn=!0;function Vo(e){const t=Gr(e),n=e.proxy,s=e.ctx;Wn=!1,t.beforeCreate&&Ms(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:d,created:f,beforeMount:p,mounted:E,beforeUpdate:x,updated:C,activated:N,deactivated:ee,beforeDestroy:D,beforeUnmount:V,destroyed:W,unmounted:O,render:J,renderTracked:Ke,renderTriggered:me,errorCaptured:je,serverPrefetch:$t,expose:Ge,inheritAttrs:_t,components:kt,directives:Vt,filters:Tn}=t;if(d&&Bo(d,s,null),o)for(const B in o){const j=o[B];P(j)&&(s[B]=j.bind(n))}if(r){const B=r.call(n,n);k(B)&&(e.data=us(B))}if(Wn=!0,i)for(const B in i){const j=i[B],Ye=P(j)?j.bind(n,n):P(j.get)?j.get.bind(n,n):Te,Bt=!P(j)&&P(j.set)?j.set.bind(n):Te,ze=Rl({get:Ye,set:Bt});Object.defineProperty(s,B,{enumerable:!0,configurable:!0,get:()=>ze.value,set:be=>ze.value=be})}if(l)for(const B in l)Jr(l[B],s,n,B);if(c){const B=P(c)?c.call(n):c;Reflect.ownKeys(B).forEach(j=>{Eo(j,B[j])})}f&&Ms(f,e,"c");function te(B,j){R(j)?j.forEach(Ye=>B(Ye.bind(n))):j&&B(j.bind(n))}if(te(Mo,p),te(No,E),te(Do,x),te(Fo,C),te(Oo,N),te(Io,ee),te(Ho,je),te(jo,Ke),te(Ko,me),te(Uo,V),te(Wr,O),te(Lo,$t),R(Ge))if(Ge.length){const B=e.exposed||(e.exposed={});Ge.forEach(j=>{Object.defineProperty(B,j,{get:()=>n[j],set:Ye=>n[j]=Ye,enumerable:!0})})}else e.exposed||(e.exposed={});J&&e.render===Te&&(e.render=J),_t!=null&&(e.inheritAttrs=_t),kt&&(e.components=kt),Vt&&(e.directives=Vt),$t&&kr(e)}function Bo(e,t,n=Te){R(e)&&(e=qn(e));for(const s in e){const r=e[s];let i;k(r)?"default"in r?i=Zt(r.from||s,r.default,!0):i=Zt(r.from||s):i=Zt(r),G(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Ms(e,t,n){Re(R(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Jr(e,t,n,s){let r=s.includes(".")?$r(n,s):()=>n[s];if(q(e)){const i=t[e];P(i)&&Mn(r,i)}else if(P(e))Mn(r,e.bind(n));else if(k(e))if(R(e))e.forEach(i=>Jr(i,t,n,s));else{const i=P(e.handler)?e.handler.bind(n):t[e.handler];P(i)&&Mn(r,i,e)}}function Gr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(d=>an(c,d,o,!0)),an(c,t,o)),k(t)&&i.set(t,c),c}function an(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&an(e,i,n,!0),r&&r.forEach(o=>an(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Wo[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Wo={data:Ns,props:Ds,emits:Ds,methods:Tt,computed:Tt,beforeCreate:ne,created:ne,beforeMount:ne,mounted:ne,beforeUpdate:ne,updated:ne,beforeDestroy:ne,beforeUnmount:ne,destroyed:ne,unmounted:ne,activated:ne,deactivated:ne,errorCaptured:ne,serverPrefetch:ne,components:Tt,directives:Tt,watch:Jo,provide:Ns,inject:qo};function Ns(e,t){return t?e?function(){return Q(P(e)?e.call(this,this):e,P(t)?t.call(this,this):t)}:t:e}function qo(e,t){return Tt(qn(e),qn(t))}function qn(e){if(R(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ne(e,t){return e?[...new Set([].concat(e,t))]:t}function Tt(e,t){return e?Q(Object.create(null),e,t):t}function Ds(e,t){return e?R(e)&&R(t)?[...new Set([...e,...t])]:Q(Object.create(null),Ps(e),Ps(t??{})):t}function Jo(e,t){if(!e)return t;if(!t)return e;const n=Q(Object.create(null),e);for(const s in t)n[s]=ne(e[s],t[s]);return n}function Yr(){return{app:null,config:{isNativeTag:cr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Go=0;function Yo(e,t){return function(s,r=null){P(s)||(s=Q({},s)),r!=null&&!k(r)&&(r=null);const i=Yr(),o=new WeakSet,l=[];let c=!1;const d=i.app={_uid:Go++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:Cl,get config(){return i.config},set config(f){},use(f,...p){return o.has(f)||(f&&P(f.install)?(o.add(f),f.install(d,...p)):P(f)&&(o.add(f),f(d,...p))),d},mixin(f){return i.mixins.includes(f)||i.mixins.push(f),d},component(f,p){return p?(i.components[f]=p,d):i.components[f]},directive(f,p){return p?(i.directives[f]=p,d):i.directives[f]},mount(f,p,E){if(!c){const x=d._ceVNode||Ae(s,r);return x.appContext=i,E===!0?E="svg":E===!1&&(E=void 0),e(x,f,E),c=!0,d._container=f,f.__vue_app__=d,Sn(x.component)}},onUnmount(f){l.push(f)},unmount(){c&&(Re(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(f,p){return i.provides[f]=p,d},runWithContext(f){const p=rt;rt=d;try{return f()}finally{rt=p}}};return d}}let rt=null;const zo=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${We(t)}Modifiers`]||e[`${Je(t)}Modifiers`];function Xo(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||K;let r=n;const i=t.startsWith("update:"),o=i&&zo(s,t.slice(7));o&&(o.trim&&(r=n.map(f=>q(f)?f.trim():f)),o.number&&(r=n.map(gn)));let l,c=s[l=Rn(t)]||s[l=Rn(We(t))];!c&&i&&(c=s[l=Rn(Je(t))]),c&&Re(c,e,6,r);const d=s[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Re(d,e,6,r)}}const Zo=new WeakMap;function zr(e,t,n=!1){const s=n?Zo:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!P(e)){const c=d=>{const f=zr(d,t,!0);f&&(l=!0,Q(o,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(k(e)&&s.set(e,null),null):(R(i)?i.forEach(c=>o[c]=null):Q(o,i),k(e)&&s.set(e,o),o)}function vn(e,t){return!e||!dn(t)?!1:(t=t.slice(2).replace(/Once$/,""),U(e,t[0].toLowerCase()+t.slice(1))||U(e,Je(t))||U(e,t))}function Fs(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:d,renderCache:f,props:p,data:E,setupState:x,ctx:C,inheritAttrs:N}=e,ee=ln(e);let D,V;try{if(n.shapeFlag&4){const O=r||s,J=O;D=Se(d.call(J,O,f,p,x,E,C)),V=l}else{const O=t;D=Se(O.length>1?O(p,{attrs:l,slots:o,emit:c}):O(p,null)),V=t.props?l:Qo(l)}}catch(O){Pt.length=0,_n(O,e,1),D=Ae(Ue)}let W=D;if(V&&N!==!1){const O=Object.keys(V),{shapeFlag:J}=W;O.length&&J&7&&(i&&O.some(es)&&(V=el(V,i)),W=gt(W,V,!1,!0))}return n.dirs&&(W=gt(W,null,!1,!0),W.dirs=W.dirs?W.dirs.concat(n.dirs):n.dirs),n.transition&&hs(W,n.transition),D=W,ln(ee),D}const Qo=e=>{let t;for(const n in e)(n==="class"||n==="style"||dn(n))&&((t||(t={}))[n]=e[n]);return t},el=(e,t)=>{const n={};for(const s in e)(!es(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function tl(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,d=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Us(s,o,d):!!o;if(c&8){const f=t.dynamicProps;for(let p=0;p<f.length;p++){const E=f[p];if(o[E]!==s[E]&&!vn(d,E))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===o?!1:s?o?Us(s,o,d):!0:!!o;return!1}function Us(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const i=s[r];if(t[i]!==e[i]&&!vn(n,i))return!0}return!1}function nl({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const Xr={},Zr=()=>Object.create(Xr),Qr=e=>Object.getPrototypeOf(e)===Xr;function sl(e,t,n,s=!1){const r={},i=Zr();e.propsDefaults=Object.create(null),ei(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:oo(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function rl(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=F(r),[c]=e.propsOptions;let d=!1;if((s||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let p=0;p<f.length;p++){let E=f[p];if(vn(e.emitsOptions,E))continue;const x=t[E];if(c)if(U(i,E))x!==i[E]&&(i[E]=x,d=!0);else{const C=We(E);r[C]=Jn(c,l,C,x,e,!1)}else x!==i[E]&&(i[E]=x,d=!0)}}}else{ei(e,t,r,i)&&(d=!0);let f;for(const p in l)(!t||!U(t,p)&&((f=Je(p))===p||!U(t,f)))&&(c?n&&(n[p]!==void 0||n[f]!==void 0)&&(r[p]=Jn(c,l,p,void 0,e,!0)):delete r[p]);if(i!==l)for(const p in i)(!t||!U(t,p))&&(delete i[p],d=!0)}d&&Ie(e.attrs,"set","")}function ei(e,t,n,s){const[r,i]=e.propsOptions;let o=!1,l;if(t)for(let c in t){if(At(c))continue;const d=t[c];let f;r&&U(r,f=We(c))?!i||!i.includes(f)?n[f]=d:(l||(l={}))[f]=d:vn(e.emitsOptions,c)||(!(c in s)||d!==s[c])&&(s[c]=d,o=!0)}if(i){const c=F(n),d=l||K;for(let f=0;f<i.length;f++){const p=i[f];n[p]=Jn(r,c,p,d[p],e,!U(d,p))}}return o}function Jn(e,t,n,s,r,i){const o=e[n];if(o!=null){const l=U(o,"default");if(l&&s===void 0){const c=o.default;if(o.type!==Function&&!o.skipFactory&&P(c)){const{propsDefaults:d}=r;if(n in d)s=d[n];else{const f=Ht(r);s=d[n]=c.call(null,t),f()}}else s=c;r.ce&&r.ce._setProp(n,s)}o[0]&&(i&&!l?s=!1:o[1]&&(s===""||s===Je(n))&&(s=!0))}return s}const il=new WeakMap;function ti(e,t,n=!1){const s=n?il:t.propsCache,r=s.get(e);if(r)return r;const i=e.props,o={},l=[];let c=!1;if(!P(e)){const f=p=>{c=!0;const[E,x]=ti(p,t,!0);Q(o,E),x&&l.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!c)return k(e)&&s.set(e,ut),ut;if(R(i))for(let f=0;f<i.length;f++){const p=We(i[f]);Ls(p)&&(o[p]=K)}else if(i)for(const f in i){const p=We(f);if(Ls(p)){const E=i[f],x=o[p]=R(E)||P(E)?{type:E}:Q({},E),C=x.type;let N=!1,ee=!0;if(R(C))for(let D=0;D<C.length;++D){const V=C[D],W=P(V)&&V.name;if(W==="Boolean"){N=!0;break}else W==="String"&&(ee=!1)}else N=P(C)&&C.name==="Boolean";x[0]=N,x[1]=ee,(N||U(x,"default"))&&l.push(p)}}const d=[o,l];return k(e)&&s.set(e,d),d}function Ls(e){return e[0]!=="$"&&!At(e)}const ps=e=>e==="_"||e==="_ctx"||e==="$stable",gs=e=>R(e)?e.map(Se):[Se(e)],ol=(e,t,n)=>{if(t._n)return t;const s=vo((...r)=>gs(t(...r)),n);return s._c=!1,s},ni=(e,t,n)=>{const s=e._ctx;for(const r in e){if(ps(r))continue;const i=e[r];if(P(i))t[r]=ol(r,i,s);else if(i!=null){const o=gs(i);t[r]=()=>o}}},si=(e,t)=>{const n=gs(t);e.slots.default=()=>n},ri=(e,t,n)=>{for(const s in t)(n||!ps(s))&&(e[s]=t[s])},ll=(e,t,n)=>{const s=e.slots=Zr();if(e.vnode.shapeFlag&32){const r=t._;r?(ri(s,t,n),n&&hr(s,"_",r,!0)):ni(t,s)}else t&&si(e,t)},cl=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=K;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:ri(r,t,n):(i=!t.$stable,ni(t,r)),o=t}else t&&(si(e,t),o={default:1});if(i)for(const l in r)!ps(l)&&o[l]==null&&delete r[l]},ce=hl;function al(e){return ul(e)}function ul(e,t){const n=mn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:d,setElementText:f,parentNode:p,nextSibling:E,setScopeId:x=Te,insertStaticContent:C}=e,N=(a,u,h,y=null,g=null,m=null,v=void 0,w=null,_=!!u.dynamicChildren)=>{if(a===u)return;a&&!xt(a,u)&&(y=Wt(a),be(a,g,m,!0),a=null),u.patchFlag===-2&&(_=!1,u.dynamicChildren=null);const{type:b,ref:A,shapeFlag:S}=u;switch(b){case En:ee(a,u,h,y);break;case Ue:D(a,u,h,y);break;case Fn:a==null&&V(u,h,y,v);break;case ae:kt(a,u,h,y,g,m,v,w,_);break;default:S&1?J(a,u,h,y,g,m,v,w,_):S&6?Vt(a,u,h,y,g,m,v,w,_):(S&64||S&128)&&b.process(a,u,h,y,g,m,v,w,_,vt)}A!=null&&g?Ot(A,a&&a.ref,m,u||a,!u):A==null&&a&&a.ref!=null&&Ot(a.ref,null,m,a,!0)},ee=(a,u,h,y)=>{if(a==null)s(u.el=l(u.children),h,y);else{const g=u.el=a.el;u.children!==a.children&&d(g,u.children)}},D=(a,u,h,y)=>{a==null?s(u.el=c(u.children||""),h,y):u.el=a.el},V=(a,u,h,y)=>{[a.el,a.anchor]=C(a.children,u,h,y,a.el,a.anchor)},W=({el:a,anchor:u},h,y)=>{let g;for(;a&&a!==u;)g=E(a),s(a,h,y),a=g;s(u,h,y)},O=({el:a,anchor:u})=>{let h;for(;a&&a!==u;)h=E(a),r(a),a=h;r(u)},J=(a,u,h,y,g,m,v,w,_)=>{if(u.type==="svg"?v="svg":u.type==="math"&&(v="mathml"),a==null)Ke(u,h,y,g,m,v,w,_);else{const b=a.el&&a.el._isVueCE?a.el:null;try{b&&b._beginPatch(),$t(a,u,g,m,v,w,_)}finally{b&&b._endPatch()}}},Ke=(a,u,h,y,g,m,v,w)=>{let _,b;const{props:A,shapeFlag:S,transition:T,dirs:I}=a;if(_=a.el=o(a.type,m,A&&A.is,A),S&8?f(_,a.children):S&16&&je(a.children,_,null,y,g,Dn(a,m),v,w),I&&Xe(a,null,y,"created"),me(_,a,a.scopeId,v,y),A){for(const H in A)H!=="value"&&!At(H)&&i(_,H,null,A[H],m,y);"value"in A&&i(_,"value",null,A.value,m),(b=A.onVnodeBeforeMount)&&ve(b,y,a)}I&&Xe(a,null,y,"beforeMount");const M=fl(g,T);M&&T.beforeEnter(_),s(_,u,h),((b=A&&A.onVnodeMounted)||M||I)&&ce(()=>{b&&ve(b,y,a),M&&T.enter(_),I&&Xe(a,null,y,"mounted")},g)},me=(a,u,h,y,g)=>{if(h&&x(a,h),y)for(let m=0;m<y.length;m++)x(a,y[m]);if(g){let m=g.subTree;if(u===m||ci(m.type)&&(m.ssContent===u||m.ssFallback===u)){const v=g.vnode;me(a,v,v.scopeId,v.slotScopeIds,g.parent)}}},je=(a,u,h,y,g,m,v,w,_=0)=>{for(let b=_;b<a.length;b++){const A=a[b]=w?ke(a[b]):Se(a[b]);N(null,A,u,h,y,g,m,v,w)}},$t=(a,u,h,y,g,m,v)=>{const w=u.el=a.el;let{patchFlag:_,dynamicChildren:b,dirs:A}=u;_|=a.patchFlag&16;const S=a.props||K,T=u.props||K;let I;if(h&&Ze(h,!1),(I=T.onVnodeBeforeUpdate)&&ve(I,h,u,a),A&&Xe(u,a,h,"beforeUpdate"),h&&Ze(h,!0),(S.innerHTML&&T.innerHTML==null||S.textContent&&T.textContent==null)&&f(w,""),b?Ge(a.dynamicChildren,b,w,h,y,Dn(u,g),m):v||j(a,u,w,null,h,y,Dn(u,g),m,!1),_>0){if(_&16)_t(w,S,T,h,g);else if(_&2&&S.class!==T.class&&i(w,"class",null,T.class,g),_&4&&i(w,"style",S.style,T.style,g),_&8){const M=u.dynamicProps;for(let H=0;H<M.length;H++){const L=M[H],ie=S[L],oe=T[L];(oe!==ie||L==="value")&&i(w,L,ie,oe,g,h)}}_&1&&a.children!==u.children&&f(w,u.children)}else!v&&b==null&&_t(w,S,T,h,g);((I=T.onVnodeUpdated)||A)&&ce(()=>{I&&ve(I,h,u,a),A&&Xe(u,a,h,"updated")},y)},Ge=(a,u,h,y,g,m,v)=>{for(let w=0;w<u.length;w++){const _=a[w],b=u[w],A=_.el&&(_.type===ae||!xt(_,b)||_.shapeFlag&198)?p(_.el):h;N(_,b,A,null,y,g,m,v,!0)}},_t=(a,u,h,y,g)=>{if(u!==h){if(u!==K)for(const m in u)!At(m)&&!(m in h)&&i(a,m,u[m],null,g,y);for(const m in h){if(At(m))continue;const v=h[m],w=u[m];v!==w&&m!=="value"&&i(a,m,w,v,g,y)}"value"in h&&i(a,"value",u.value,h.value,g)}},kt=(a,u,h,y,g,m,v,w,_)=>{const b=u.el=a?a.el:l(""),A=u.anchor=a?a.anchor:l("");let{patchFlag:S,dynamicChildren:T,slotScopeIds:I}=u;I&&(w=w?w.concat(I):I),a==null?(s(b,h,y),s(A,h,y),je(u.children||[],h,A,g,m,v,w,_)):S>0&&S&64&&T&&a.dynamicChildren&&a.dynamicChildren.length===T.length?(Ge(a.dynamicChildren,T,h,g,m,v,w),(u.key!=null||g&&u===g.subTree)&&ii(a,u,!0)):j(a,u,h,A,g,m,v,w,_)},Vt=(a,u,h,y,g,m,v,w,_)=>{u.slotScopeIds=w,a==null?u.shapeFlag&512?g.ctx.activate(u,h,y,v,_):Tn(u,h,y,g,m,v,_):_s(a,u,_)},Tn=(a,u,h,y,g,m,v)=>{const w=a.component=vl(a,y,g);if(Vr(a)&&(w.ctx.renderer=vt),El(w,!1,v),w.asyncDep){if(g&&g.registerDep(w,te,v),!a.el){const _=w.subTree=Ae(Ue);D(null,_,u,h),a.placeholder=_.el}}else te(w,a,u,h,g,m,v)},_s=(a,u,h)=>{const y=u.component=a.component;if(tl(a,u,h))if(y.asyncDep&&!y.asyncResolved){B(y,u,h);return}else y.next=u,y.update();else u.el=a.el,y.vnode=u},te=(a,u,h,y,g,m,v)=>{const w=()=>{if(a.isMounted){let{next:S,bu:T,u:I,parent:M,vnode:H}=a;{const _e=oi(a);if(_e){S&&(S.el=H.el,B(a,S,v)),_e.asyncDep.then(()=>{a.isUnmounted||w()});return}}let L=S,ie;Ze(a,!1),S?(S.el=H.el,B(a,S,v)):S=H,T&&Xt(T),(ie=S.props&&S.props.onVnodeBeforeUpdate)&&ve(ie,M,S,H),Ze(a,!0);const oe=Fs(a),ye=a.subTree;a.subTree=oe,N(ye,oe,p(ye.el),Wt(ye),a,g,m),S.el=oe.el,L===null&&nl(a,oe.el),I&&ce(I,g),(ie=S.props&&S.props.onVnodeUpdated)&&ce(()=>ve(ie,M,S,H),g)}else{let S;const{el:T,props:I}=u,{bm:M,m:H,parent:L,root:ie,type:oe}=a,ye=ht(u);Ze(a,!1),M&&Xt(M),!ye&&(S=I&&I.onVnodeBeforeMount)&&ve(S,L,u),Ze(a,!0);{ie.ce&&ie.ce._def.shadowRoot!==!1&&ie.ce._injectChildStyle(oe);const _e=a.subTree=Fs(a);N(null,_e,h,y,a,g,m),u.el=_e.el}if(H&&ce(H,g),!ye&&(S=I&&I.onVnodeMounted)){const _e=u;ce(()=>ve(S,L,_e),g)}(u.shapeFlag&256||L&&ht(L.vnode)&&L.vnode.shapeFlag&256)&&a.a&&ce(a.a,g),a.isMounted=!0,u=h=y=null}};a.scope.on();const _=a.effect=new yr(w);a.scope.off();const b=a.update=_.run.bind(_),A=a.job=_.runIfDirty.bind(_);A.i=a,A.id=a.uid,_.scheduler=()=>ds(A),Ze(a,!0),b()},B=(a,u,h)=>{u.component=a;const y=a.vnode.props;a.vnode=u,a.next=null,rl(a,u.props,y,h),cl(a,u.children,h),Ne(),Os(a),De()},j=(a,u,h,y,g,m,v,w,_=!1)=>{const b=a&&a.children,A=a?a.shapeFlag:0,S=u.children,{patchFlag:T,shapeFlag:I}=u;if(T>0){if(T&128){Bt(b,S,h,y,g,m,v,w,_);return}else if(T&256){Ye(b,S,h,y,g,m,v,w,_);return}}I&8?(A&16&&wt(b,g,m),S!==b&&f(h,S)):A&16?I&16?Bt(b,S,h,y,g,m,v,w,_):wt(b,g,m,!0):(A&8&&f(h,""),I&16&&je(S,h,y,g,m,v,w,_))},Ye=(a,u,h,y,g,m,v,w,_)=>{a=a||ut,u=u||ut;const b=a.length,A=u.length,S=Math.min(b,A);let T;for(T=0;T<S;T++){const I=u[T]=_?ke(u[T]):Se(u[T]);N(a[T],I,h,null,g,m,v,w,_)}b>A?wt(a,g,m,!0,!1,S):je(u,h,y,g,m,v,w,_,S)},Bt=(a,u,h,y,g,m,v,w,_)=>{let b=0;const A=u.length;let S=a.length-1,T=A-1;for(;b<=S&&b<=T;){const I=a[b],M=u[b]=_?ke(u[b]):Se(u[b]);if(xt(I,M))N(I,M,h,null,g,m,v,w,_);else break;b++}for(;b<=S&&b<=T;){const I=a[S],M=u[T]=_?ke(u[T]):Se(u[T]);if(xt(I,M))N(I,M,h,null,g,m,v,w,_);else break;S--,T--}if(b>S){if(b<=T){const I=T+1,M=I<A?u[I].el:y;for(;b<=T;)N(null,u[b]=_?ke(u[b]):Se(u[b]),h,M,g,m,v,w,_),b++}}else if(b>T)for(;b<=S;)be(a[b],g,m,!0),b++;else{const I=b,M=b,H=new Map;for(b=M;b<=T;b++){const le=u[b]=_?ke(u[b]):Se(u[b]);le.key!=null&&H.set(le.key,b)}let L,ie=0;const oe=T-M+1;let ye=!1,_e=0;const Et=new Array(oe);for(b=0;b<oe;b++)Et[b]=0;for(b=I;b<=S;b++){const le=a[b];if(ie>=oe){be(le,g,m,!0);continue}let we;if(le.key!=null)we=H.get(le.key);else for(L=M;L<=T;L++)if(Et[L-M]===0&&xt(le,u[L])){we=L;break}we===void 0?be(le,g,m,!0):(Et[we-M]=b+1,we>=_e?_e=we:ye=!0,N(le,u[we],h,null,g,m,v,w,_),ie++)}const Es=ye?dl(Et):ut;for(L=Es.length-1,b=oe-1;b>=0;b--){const le=M+b,we=u[le],Ss=u[le+1],xs=le+1<A?Ss.el||li(Ss):y;Et[b]===0?N(null,we,h,xs,g,m,v,w,_):ye&&(L<0||b!==Es[L]?ze(we,h,xs,2):L--)}}},ze=(a,u,h,y,g=null)=>{const{el:m,type:v,transition:w,children:_,shapeFlag:b}=a;if(b&6){ze(a.component.subTree,u,h,y);return}if(b&128){a.suspense.move(u,h,y);return}if(b&64){v.move(a,u,h,vt);return}if(v===ae){s(m,u,h);for(let S=0;S<_.length;S++)ze(_[S],u,h,y);s(a.anchor,u,h);return}if(v===Fn){W(a,u,h);return}if(y!==2&&b&1&&w)if(y===0)w.beforeEnter(m),s(m,u,h),ce(()=>w.enter(m),g);else{const{leave:S,delayLeave:T,afterLeave:I}=w,M=()=>{a.ctx.isUnmounted?r(m):s(m,u,h)},H=()=>{m._isLeaving&&m[Co](!0),S(m,()=>{M(),I&&I()})};T?T(m,M,H):H()}else s(m,u,h)},be=(a,u,h,y=!1,g=!1)=>{const{type:m,props:v,ref:w,children:_,dynamicChildren:b,shapeFlag:A,patchFlag:S,dirs:T,cacheIndex:I}=a;if(S===-2&&(g=!1),w!=null&&(Ne(),Ot(w,null,h,a,!0),De()),I!=null&&(u.renderCache[I]=void 0),A&256){u.ctx.deactivate(a);return}const M=A&1&&T,H=!ht(a);let L;if(H&&(L=v&&v.onVnodeBeforeUnmount)&&ve(L,u,a),A&6)Ri(a.component,h,y);else{if(A&128){a.suspense.unmount(h,y);return}M&&Xe(a,null,u,"beforeUnmount"),A&64?a.type.remove(a,u,h,vt,y):b&&!b.hasOnce&&(m!==ae||S>0&&S&64)?wt(b,u,h,!1,!0):(m===ae&&S&384||!g&&A&16)&&wt(_,u,h),y&&ws(a)}(H&&(L=v&&v.onVnodeUnmounted)||M)&&ce(()=>{L&&ve(L,u,a),M&&Xe(a,null,u,"unmounted")},h)},ws=a=>{const{type:u,el:h,anchor:y,transition:g}=a;if(u===ae){Ai(h,y);return}if(u===Fn){O(a);return}const m=()=>{r(h),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(a.shapeFlag&1&&g&&!g.persisted){const{leave:v,delayLeave:w}=g,_=()=>v(h,m);w?w(a.el,m,_):_()}else m()},Ai=(a,u)=>{let h;for(;a!==u;)h=E(a),r(a),a=h;r(u)},Ri=(a,u,h)=>{const{bum:y,scope:g,job:m,subTree:v,um:w,m:_,a:b}=a;Ks(_),Ks(b),y&&Xt(y),g.stop(),m&&(m.flags|=8,be(v,a,u,h)),w&&ce(w,u),ce(()=>{a.isUnmounted=!0},u)},wt=(a,u,h,y=!1,g=!1,m=0)=>{for(let v=m;v<a.length;v++)be(a[v],u,h,y,g)},Wt=a=>{if(a.shapeFlag&6)return Wt(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const u=E(a.anchor||a.el),h=u&&u[Ao];return h?E(h):u};let An=!1;const vs=(a,u,h)=>{let y;a==null?u._vnode&&(be(u._vnode,null,null,!0),y=u._vnode.component):N(u._vnode||null,a,u,null,null,null,h),u._vnode=a,An||(An=!0,Os(y),Lr(),An=!1)},vt={p:N,um:be,m:ze,r:ws,mt:Tn,mc:je,pc:j,pbc:Ge,n:Wt,o:e};return{render:vs,hydrate:void 0,createApp:Yo(vs)}}function Dn({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ze({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function fl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ii(e,t,n=!1){const s=e.children,r=t.children;if(R(s)&&R(r))for(let i=0;i<s.length;i++){const o=s[i];let l=r[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[i]=ke(r[i]),l.el=o.el),!n&&l.patchFlag!==-2&&ii(o,l)),l.type===En&&(l.patchFlag!==-1?l.el=o.el:l.__elIndex=i+(e.type===ae?1:0)),l.type===Ue&&!l.el&&(l.el=o.el)}}function dl(e){const t=e.slice(),n=[0];let s,r,i,o,l;const c=e.length;for(s=0;s<c;s++){const d=e[s];if(d!==0){if(r=n[n.length-1],e[r]<d){t[s]=r,n.push(s);continue}for(i=0,o=n.length-1;i<o;)l=i+o>>1,e[n[l]]<d?i=l+1:o=l;d<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function oi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:oi(t)}function Ks(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function li(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?li(t.subTree):null}const ci=e=>e.__isSuspense;function hl(e,t){t&&t.pendingBranch?R(e)?t.effects.push(...e):t.effects.push(e):wo(e)}const ae=Symbol.for("v-fgt"),En=Symbol.for("v-txt"),Ue=Symbol.for("v-cmt"),Fn=Symbol.for("v-stc"),Pt=[];let ue=null;function Gn(e=!1){Pt.push(ue=e?null:[])}function pl(){Pt.pop(),ue=Pt[Pt.length-1]||null}let Ut=1;function js(e,t=!1){Ut+=e,e<0&&ue&&t&&(ue.hasOnce=!0)}function ai(e){return e.dynamicChildren=Ut>0?ue||ut:null,pl(),Ut>0&&ue&&ue.push(e),e}function Jc(e,t,n,s,r,i){return ai(fi(e,t,n,s,r,i,!0))}function Yn(e,t,n,s,r){return ai(Ae(e,t,n,s,r,!0))}function ms(e){return e?e.__v_isVNode===!0:!1}function xt(e,t){return e.type===t.type&&e.key===t.key}const ui=({key:e})=>e??null,Qt=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?q(e)||G(e)||P(e)?{i:Z,r:e,k:t,f:!!n}:e:null);function fi(e,t=null,n=null,s=0,r=null,i=e===ae?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ui(t),ref:t&&Qt(t),scopeId:jr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Z};return l?(bs(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=q(n)?8:16),Ut>0&&!o&&ue&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&ue.push(c),c}const Ae=gl;function gl(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===$o)&&(e=Ue),ms(e)){const l=gt(e,t,!0);return n&&bs(l,n),Ut>0&&!i&&ue&&(l.shapeFlag&6?ue[ue.indexOf(e)]=l:ue.push(l)),l.patchFlag=-2,l}if(Al(e)&&(e=e.__vccOpts),t){t=ml(t);let{class:l,style:c}=t;l&&!q(l)&&(t.class=ss(l)),k(c)&&(yn(c)&&!R(c)&&(c=Q({},c)),t.style=ns(c))}const o=q(e)?1:ci(e)?128:Ro(e)?64:k(e)?4:P(e)?2:0;return fi(e,t,n,s,r,o,i,!0)}function ml(e){return e?yn(e)||Qr(e)?Q({},e):e:null}function gt(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,d=t?yl(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&ui(d),ref:t&&t.ref?n&&i?R(i)?i.concat(Qt(t)):[i,Qt(t)]:Qt(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ae?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&gt(e.ssContent),ssFallback:e.ssFallback&&gt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&hs(f,c.clone(f)),f}function bl(e=" ",t=0){return Ae(En,null,e,t)}function Gc(e="",t=!1){return t?(Gn(),Yn(Ue,null,e)):Ae(Ue,null,e)}function Se(e){return e==null||typeof e=="boolean"?Ae(Ue):R(e)?Ae(ae,null,e.slice()):ms(e)?ke(e):Ae(En,null,String(e))}function ke(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:gt(e)}function bs(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(R(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),bs(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Qr(t)?t._ctx=Z:r===3&&Z&&(Z.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else P(t)?(t={default:t,_ctx:Z},n=32):(t=String(t),s&64?(n=16,t=[bl(t)]):n=8);e.children=t,e.shapeFlag|=n}function yl(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=ss([t.class,s.class]));else if(r==="style")t.style=ns([t.style,s.style]);else if(dn(r)){const i=t[r],o=s[r];o&&i!==o&&!(R(i)&&i.includes(o))&&(t[r]=i?[].concat(i,o):o)}else r!==""&&(t[r]=s[r])}return t}function ve(e,t,n,s=null){Re(e,t,7,[n,s])}const _l=Yr();let wl=0;function vl(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||_l,i={uid:wl++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new br(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ti(s,r),emitsOptions:zr(s,r),emit:null,emitted:null,propsDefaults:K,inheritAttrs:s.inheritAttrs,ctx:K,data:K,props:K,attrs:K,slots:K,refs:K,setupState:K,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Xo.bind(null,i),e.ce&&e.ce(i),i}let re=null;const di=()=>re||Z;let un,zn;{const e=mn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};un=t("__VUE_INSTANCE_SETTERS__",n=>re=n),zn=t("__VUE_SSR_SETTERS__",n=>Lt=n)}const Ht=e=>{const t=re;return un(e),e.scope.on(),()=>{e.scope.off(),un(t)}},Hs=()=>{re&&re.scope.off(),un(null)};function hi(e){return e.vnode.shapeFlag&4}let Lt=!1;function El(e,t=!1,n=!1){t&&zn(t);const{props:s,children:r}=e.vnode,i=hi(e);sl(e,s,i,t),ll(e,r,n||t);const o=i?Sl(e,t):void 0;return t&&zn(!1),o}function Sl(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ko);const{setup:s}=n;if(s){Ne();const r=e.setupContext=s.length>1?Tl(e):null,i=Ht(e),o=jt(s,e,0,[e.props,r]),l=ar(o);if(De(),i(),(l||e.sp)&&!ht(e)&&kr(e),l){if(o.then(Hs,Hs),t)return o.then(c=>{$s(e,c)}).catch(c=>{_n(c,e,0)});e.asyncDep=o}else $s(e,o)}else pi(e)}function $s(e,t,n){P(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:k(t)&&(e.setupState=Nr(t)),pi(e)}function pi(e,t,n){const s=e.type;e.render||(e.render=s.render||Te);{const r=Ht(e);Ne();try{Vo(e)}finally{De(),r()}}}const xl={get(e,t){return X(e,"get",""),e[t]}};function Tl(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,xl),slots:e.slots,emit:e.emit,expose:t}}function Sn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Nr(lo(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in It)return It[n](e)},has(t,n){return n in t||n in It}})):e.proxy}function Al(e){return P(e)&&"__vccOpts"in e}const Rl=(e,t)=>go(e,t,Lt),Cl="3.5.27";let Xn;const ks=typeof window<"u"&&window.trustedTypes;if(ks)try{Xn=ks.createPolicy("vue",{createHTML:e=>e})}catch{}const gi=Xn?e=>Xn.createHTML(e):e=>e,Ol="http://www.w3.org/2000/svg",Il="http://www.w3.org/1998/Math/MathML",Oe=typeof document<"u"?document:null,Vs=Oe&&Oe.createElement("template"),Pl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Oe.createElementNS(Ol,e):t==="mathml"?Oe.createElementNS(Il,e):n?Oe.createElement(e,{is:n}):Oe.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Oe.createTextNode(e),createComment:e=>Oe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Vs.innerHTML=gi(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=Vs.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ml=Symbol("_vtc");function Nl(e,t,n){const s=e[Ml];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Bs=Symbol("_vod"),Dl=Symbol("_vsh"),Fl=Symbol(""),Ul=/(?:^|;)\s*display\s*:/;function Ll(e,t,n){const s=e.style,r=q(n);let i=!1;if(n&&!r){if(t)if(q(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&en(s,l,"")}else for(const o in t)n[o]==null&&en(s,o,"");for(const o in n)o==="display"&&(i=!0),en(s,o,n[o])}else if(r){if(t!==n){const o=s[Fl];o&&(n+=";"+o),s.cssText=n,i=Ul.test(n)}}else t&&e.removeAttribute("style");Bs in e&&(e[Bs]=i?s.display:"",e[Dl]&&(s.display="none"))}const Ws=/\s*!important$/;function en(e,t,n){if(R(n))n.forEach(s=>en(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Kl(e,t);Ws.test(n)?e.setProperty(Je(s),n.replace(Ws,""),"important"):e[s]=n}}const qs=["Webkit","Moz","ms"],Un={};function Kl(e,t){const n=Un[t];if(n)return n;let s=We(t);if(s!=="filter"&&s in e)return Un[t]=s;s=dr(s);for(let r=0;r<qs.length;r++){const i=qs[r]+s;if(i in e)return Un[t]=i}return t}const Js="http://www.w3.org/1999/xlink";function Gs(e,t,n,s,r,i=Li(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Js,t.slice(6,t.length)):e.setAttributeNS(Js,t,n):n==null||i&&!pr(n)?e.removeAttribute(t):e.setAttribute(t,i?"":pe(n)?String(n):n)}function Ys(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?gi(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(l!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=pr(n):n==null&&l==="string"?(n="",o=!0):l==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(r||t)}function Me(e,t,n,s){e.addEventListener(t,n,s)}function jl(e,t,n,s){e.removeEventListener(t,n,s)}const zs=Symbol("_vei");function Hl(e,t,n,s,r=null){const i=e[zs]||(e[zs]={}),o=i[t];if(s&&o)o.value=s;else{const[l,c]=$l(t);if(s){const d=i[t]=Bl(s,r);Me(e,l,d,c)}else o&&(jl(e,l,o,c),i[t]=void 0)}}const Xs=/(?:Once|Passive|Capture)$/;function $l(e){let t;if(Xs.test(e)){t={};let s;for(;s=e.match(Xs);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Je(e.slice(2)),t]}let Ln=0;const kl=Promise.resolve(),Vl=()=>Ln||(kl.then(()=>Ln=0),Ln=Date.now());function Bl(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Re(Wl(s,n.value),t,5,[s])};return n.value=e,n.attached=Vl(),n}function Wl(e,t){if(R(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Zs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ql=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Nl(e,s,o):t==="style"?Ll(e,n,s):dn(t)?es(t)||Hl(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Jl(e,t,s,o))?(Ys(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Gs(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!q(s))?Ys(e,We(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Gs(e,t,s,o))};function Jl(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Zs(t)&&P(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Zs(t)&&q(n)?!1:t in e}const qe=e=>{const t=e.props["onUpdate:modelValue"]||!1;return R(t)?n=>Xt(t,n):t};function Gl(e){e.target.composing=!0}function Qs(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const de=Symbol("_assign");function er(e,t,n){return t&&(e=e.trim()),n&&(e=gn(e)),e}const tr={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[de]=qe(r);const i=s||r.props&&r.props.type==="number";Me(e,t?"change":"input",o=>{o.target.composing||e[de](er(e.value,n,i))}),(n||i)&&Me(e,"change",()=>{e.value=er(e.value,n,i)}),t||(Me(e,"compositionstart",Gl),Me(e,"compositionend",Qs),Me(e,"change",Qs))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[de]=qe(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?gn(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c))}},Yl={deep:!0,created(e,t,n){e[de]=qe(n),Me(e,"change",()=>{const s=e._modelValue,r=mt(e),i=e.checked,o=e[de];if(R(s)){const l=rs(s,r),c=l!==-1;if(i&&!c)o(s.concat(r));else if(!i&&c){const d=[...s];d.splice(l,1),o(d)}}else if(yt(s)){const l=new Set(s);i?l.add(r):l.delete(r),o(l)}else o(mi(e,i))})},mounted:nr,beforeUpdate(e,t,n){e[de]=qe(n),nr(e,t,n)}};function nr(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(R(t))r=rs(t,s.props.value)>-1;else if(yt(t))r=t.has(s.props.value);else{if(t===n)return;r=it(t,mi(e,!0))}e.checked!==r&&(e.checked=r)}const zl={created(e,{value:t},n){e.checked=it(t,n.props.value),e[de]=qe(n),Me(e,"change",()=>{e[de](mt(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[de]=qe(s),t!==n&&(e.checked=it(t,s.props.value))}},Xl={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=yt(t);Me(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?gn(mt(o)):mt(o));e[de](e.multiple?r?new Set(i):i:i[0]),e._assigning=!0,Fr(()=>{e._assigning=!1})}),e[de]=qe(s)},mounted(e,{value:t}){sr(e,t)},beforeUpdate(e,t,n){e[de]=qe(n)},updated(e,{value:t}){e._assigning||sr(e,t)}};function sr(e,t){const n=e.multiple,s=R(t);if(!(n&&!s&&!yt(t))){for(let r=0,i=e.options.length;r<i;r++){const o=e.options[r],l=mt(o);if(n)if(s){const c=typeof l;c==="string"||c==="number"?o.selected=t.some(d=>String(d)===String(l)):o.selected=rs(t,l)>-1}else o.selected=t.has(l);else if(it(mt(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function mt(e){return"_value"in e?e._value:e.value}function mi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Yc={created(e,t,n){Yt(e,t,n,null,"created")},mounted(e,t,n){Yt(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){Yt(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){Yt(e,t,n,s,"updated")}};function Zl(e,t){switch(e){case"SELECT":return Xl;case"TEXTAREA":return tr;default:switch(t){case"checkbox":return Yl;case"radio":return zl;default:return tr}}}function Yt(e,t,n,s,r){const o=Zl(e.tagName,n.props&&n.props.type)[r];o&&o(e,t,n,s)}const Ql=["ctrl","shift","alt","meta"],ec={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ql.some(n=>e[`${n}Key`]&&!t.includes(n))},zc=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...i)=>{for(let o=0;o<t.length;o++){const l=ec[t[o]];if(l&&l(r,t))return}return e(r,...i)}))},tc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Xc=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(r=>{if(!("key"in r))return;const i=Je(r.key);if(t.some(o=>o===i||tc[o]===i))return e(r)}))},nc=Q({patchProp:ql},Pl);let rr;function sc(){return rr||(rr=al(nc))}const Zc=((...e)=>{const t=sc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=ic(s);if(!r)return;const i=t._component;!P(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,rc(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t});function rc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ic(e){return q(e)?document.querySelector(e):e}function xe(e){const t=new Uint8Array(e);let n="";for(const r of t)n+=String.fromCharCode(r);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function fn(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,s=t.padEnd(t.length+n,"="),r=atob(s),i=new ArrayBuffer(r.length),o=new Uint8Array(i);for(let l=0;l<r.length;l++)o[l]=r.charCodeAt(l);return i}function ys(){return oc.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential=="function")}const oc={stubThis:e=>e};function bi(e){const{id:t}=e;return{...e,id:fn(t),transports:e.transports}}function yi(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}class Y extends Error{constructor({message:t,code:n,cause:s,name:r}){super(t,{cause:s}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??s.name,this.code=n}}function lc({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Y({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(n.authenticatorSelection?.requireResidentKey===!0)return new Y({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&n.authenticatorSelection?.userVerification==="required")return new Y({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(n.authenticatorSelection?.userVerification==="required")return new Y({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Y({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Y({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return n.pubKeyCredParams.filter(r=>r.type==="public-key").length===0?new Y({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Y({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const s=globalThis.location.hostname;if(yi(s)){if(n.rp.id!==s)return new Y({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Y({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Y({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Y({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}class cc{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const _i=new cc,ac=["cross-platform","platform"];function wi(e){if(e&&!(ac.indexOf(e)<0))return e}async function uc(e){!e.optionsJSON&&e.challenge&&(console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useAutoRegister:n=!1}=e;if(!ys())throw new Error("WebAuthn is not supported in this browser");const s={...t,challenge:fn(t.challenge),user:{...t.user,id:fn(t.user.id)},excludeCredentials:t.excludeCredentials?.map(bi)},r={};n&&(r.mediation="conditional"),r.publicKey=s,r.signal=_i.createNewAbortSignal();let i;try{i=await navigator.credentials.create(r)}catch(C){throw lc({error:C,options:r})}if(!i)throw new Error("Registration was not completed");const{id:o,rawId:l,response:c,type:d}=i;let f;typeof c.getTransports=="function"&&(f=c.getTransports());let p;if(typeof c.getPublicKeyAlgorithm=="function")try{p=c.getPublicKeyAlgorithm()}catch(C){Kn("getPublicKeyAlgorithm()",C)}let E;if(typeof c.getPublicKey=="function")try{const C=c.getPublicKey();C!==null&&(E=xe(C))}catch(C){Kn("getPublicKey()",C)}let x;if(typeof c.getAuthenticatorData=="function")try{x=xe(c.getAuthenticatorData())}catch(C){Kn("getAuthenticatorData()",C)}return{id:o,rawId:xe(l),response:{attestationObject:xe(c.attestationObject),clientDataJSON:xe(c.clientDataJSON),transports:f,publicKeyAlgorithm:p,publicKey:E,authenticatorData:x},type:d,clientExtensionResults:i.getClientExtensionResults(),authenticatorAttachment:wi(i.authenticatorAttachment)}}function Kn(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
2
+ `,t)}function fc(){if(!ys())return jn.stubThis(new Promise(t=>t(!1)));const e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?jn.stubThis(new Promise(t=>t(!1))):jn.stubThis(e.isConditionalMediationAvailable())}const jn={stubThis:e=>e};function dc({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Y({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Y({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const s=globalThis.location.hostname;if(yi(s)){if(n.rpId!==s)return new Y({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Y({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Y({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}async function hc(e){!e.optionsJSON&&e.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:s=!0}=e;if(!ys())throw new Error("WebAuthn is not supported in this browser");let r;t.allowCredentials?.length!==0&&(r=t.allowCredentials?.map(bi));const i={...t,challenge:fn(t.challenge),allowCredentials:r},o={};if(n){if(!await fc())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&s)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation="conditional",i.allowCredentials=[]}o.publicKey=i,o.signal=_i.createNewAbortSignal();let l;try{l=await navigator.credentials.get(o)}catch(x){throw dc({error:x,options:o})}if(!l)throw new Error("Authentication was not completed");const{id:c,rawId:d,response:f,type:p}=l;let E;return f.userHandle&&(E=xe(f.userHandle)),{id:c,rawId:xe(d),response:{authenticatorData:xe(f.authenticatorData),clientDataJSON:xe(f.clientDataJSON),signature:xe(f.signature),userHandle:E},type:p,clientExtensionResults:l.getClientExtensionResults(),authenticatorAttachment:wi(l.authenticatorAttachment)}}class pc extends WebSocket{#n=[];#e=[];#t=null;#s=!1;constructor(t,n,s,r,i){super(new URL(s,document.baseURI.replace(/^http/,"ws")),r),this.binaryType=i||"blob",this.onopen=()=>{this.#s=!0,t(this)},this.onmessage=o=>{this.#e.length?this.#e.shift().resolve(o.data):this.#n.push(o.data)},this.onclose=o=>{if(!this.#s){n(new Error(`Failed to connect to server (code ${o.code})`));return}let l;if(o.wasClean)switch(o.code){case 1e3:l="Connection closed normally";break;case 1001:l="Server is going away";break;case 1002:l="Protocol error";break;case 1003:l="Unsupported data received";break;case 1006:l="Connection lost unexpectedly";break;case 1007:l="Invalid data received";break;case 1008:l="Policy violation";break;case 1009:l="Message too large";break;case 1010:l="Extension negotiation failed";break;case 1011:l="Server encountered an error";break;case 1012:l="Server is restarting";break;case 1013:l="Server is overloaded, try again later";break;case 1014:l="Bad gateway";break;case 1015:l="TLS handshake failed";break;default:l=`Connection closed (code ${o.code})`}else l=o.code===1006?"Connection lost unexpectedly":`Connection closed with error (code ${o.code})`;this.#t=new Error(l),this.#e.splice(0).forEach(c=>c.reject(this.#t))}}receive(){return this.#n.length?Promise.resolve(this.#n.shift()):this.#t?Promise.reject(this.#t):new Promise((t,n)=>this.#e.push({resolve:t,reject:n}))}async receive_bytes(){const t=await this.receive();if(typeof t=="string")throw console.error("WebSocket received text data, expected a binary message",t),new Error("WebSocket received text data, expected a binary message");return t instanceof Blob?t.bytes():new Uint8Array(t)}async receive_json(){const t=await this.receive();if(typeof t!="string")throw console.error("WebSocket received binary data, expected JSON string",t),new Error("WebSocket received binary data, expected JSON string");try{return JSON.parse(t)}catch(n){throw console.error("Failed to parse JSON from WebSocket message",t,n),new Error("Failed to parse JSON from WebSocket message")}}send_json(t){let n;try{n=JSON.stringify(t)}catch(s){throw new Error(`Failed to stringify data for WebSocket: ${s.message}`)}this.send(n)}}function vi(e,t={}){const{protocols:n,binaryType:s}=t;return new Promise((r,i)=>{new pc(r,i,e,n,s)})}let zt=null,et=null;async function gc(){return et||zt||(zt=fetch("/auth/api/settings").then(e=>e.ok?e.json():{}).then(e=>(et=e||{},et)).catch(()=>(et={},et)),zt)}function Mt(){const e=et?.ui_base_path||"/auth/";return e==="/"?"/":e.endsWith("/")?e:e+"/"}function Qc(){return Mt()==="/"?"/admin/":Mt()+"admin/"}function ea(e=""){const t=e.startsWith("/")?e.slice(1):e;return t?Mt()==="/"?"/"+t:Mt()+t:Mt()}const bt="paskia-iframe",ir="paskia-dialog",mc=`body::before {
3
+ content: '';
4
+ position: fixed;
5
+ inset: 0;
6
+ z-index: 1099;
7
+ background: transparent;
8
+ backdrop-filter: blur(0) brightness(1);
9
+ -webkit-backdrop-filter: blur(0) brightness(1);
10
+ pointer-events: none;
11
+ visibility: hidden;
12
+ transition: all 0.2s ease-out;
13
+ }
14
+ body.paskia-backdrop::before {
15
+ -webkit-backdrop-filter: blur(.2rem) brightness(0.5);
16
+ backdrop-filter: blur(.2rem) brightness(0.5);
17
+ visibility: visible;
18
+ }
19
+ body.paskia-backdrop {
20
+ overflow: auto;
21
+ }
22
+ #${bt} {
23
+ border: none;
24
+ position: fixed;
25
+ top: 0;
26
+ left: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ z-index: 9999;
30
+ color-scheme: auto;
31
+ background: transparent;
32
+ }
33
+ `;let Ve=null,tt=null,ct=null,at=null,or=!1,tn=0;function Ei(){if(document.getElementById(ir))return;const e=document.createElement("style");e.id=ir,e.textContent=mc,document.head.insertBefore(e,document.head.firstChild)}class bc extends Error{constructor(){super("Authentication cancelled"),this.name="AuthCancelledError"}}function yc(){tn++,document.body.classList.add("paskia-backdrop")}function _c(){tn=Math.max(0,tn-1),tn===0&&document.body.classList.remove("paskia-backdrop")}function Zn(){Ve&&(Ve.remove(),Ve=null,_c())}function wc(e){const t=e.data;if(t?.type)switch(t.type){case"auth-success":Zn(),ct&&(ct(),tt=null,ct=null,at=null);break;case"auth-back":Zn(),at&&(at(new bc),tt=null,ct=null,at=null);break}}function vc(){or||typeof window<"u"&&(window.addEventListener("message",wc),or=!0)}function Si(e,t="Authentication"){return Ei(),vc(),tt||(document.getElementById(bt)?(tt=new Promise((n,s)=>{ct=n,at=s}),tt):(tt=new Promise((n,s)=>{ct=n,at=s}),Zn(),yc(),Ve=document.createElement("iframe"),Ve.id=bt,Ve.title=t,Ve.src=e,document.body.appendChild(Ve),tt))}function ta(e,t="Authentication"){Ei();const n=document.getElementById(bt);n&&n.remove();const s=document.createElement("iframe");return s.id=bt,s.title=t,s.src=e,document.body.appendChild(s),s}function na(){const e=document.getElementById(bt);e&&e.remove()}const Ec=1e3;class xi extends Error{constructor(t,n,s){super(s?.detail||`Request failed: ${n.status}`),this.name="ApiError",this.url=t,this.status=n.status,this.statusText=n.statusText,this.data=s}}class nn extends Error{constructor(t,n=null){super(t),this.name="NetworkError",this.originalError=n}}async function Sc(e,t={}){const{timeout:n=Ec,...s}=t;for(s.credentials=s.credentials||"include";;){let r;try{r=await fetch(e,{...s,signal:n?AbortSignal.timeout(n):void 0})}catch(i){const o=i;throw o.name==="TimeoutError"?new nn("Request timed out",o):o.name==="AbortError"?i:o.name==="TypeError"&&o.message==="Failed to fetch"?new nn("Unable to connect to server",o):new nn(o.message||"Network error",o)}if(r.status===401||r.status===403){let i=null;try{i=await r.clone().json()}catch{}if(i?.auth?.iframe&&window===window.top){await Si(i.auth.iframe);continue}}return r}}async function xc(e,t={}){return Tc(e,t,Sc)}async function Tc(e,t={},n=fetch){const s={Accept:"application/json",...t.headers};let r;t.body&&typeof t.body=="object"&&!(t.body instanceof FormData)?(s["Content-Type"]="application/json",r=JSON.stringify(t.body)):r=t.body;const i={...t,headers:s,body:r},o=await n(e,i),l=await o.json();if(!o.ok)throw new xi(e,o,l);return l}function sa(e){return e instanceof nn||e instanceof xi?e.message:e.name==="TimeoutError"?"Request timed out":e.name==="TypeError"&&e.message==="Failed to fetch"?"Unable to connect to server":e.message||"An error occurred"}const Ac=60*1e3,Rc=300*1e3;class ra{constructor(t,n){this.pollTimer=null,this.idleTimer=null,this.active=!1,this.userUuidGetter=t,this.onSessionLost=n,this.resetIdleTimer=this.resetIdleTimer.bind(this)}resetIdleTimer(){this.idleTimer&&clearTimeout(this.idleTimer),this.active||this.startPolling(),this.idleTimer=setTimeout(()=>this.stopPolling(),Rc)}async validate(){try{(await xc("/auth/api/validate",{method:"POST"})).ctx?.user?.uuid!==this.userUuidGetter()&&window.location.reload()}catch(t){t.name!=="NetworkError"&&(this.stopPolling(),this.onSessionLost(t))}}startPolling(){this.active||(this.active=!0,this.pollTimer=setInterval(()=>this.validate(),Ac))}stopPolling(){this.active=!1,this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}start(){window.addEventListener("pointermove",this.resetIdleTimer),window.addEventListener("pointerdown",this.resetIdleTimer),this.resetIdleTimer()}stop(){window.removeEventListener("pointermove",this.resetIdleTimer),window.removeEventListener("pointerdown",this.resetIdleTimer),this.idleTimer&&clearTimeout(this.idleTimer),this.stopPolling()}}async function Ti(e){const n=(await gc())?.auth_host;return n&&location.host!==n?`//${n}${e}`:e}async function Cc(e=null,t=null,n=null){let s=[];e&&s.push(`reset=${encodeURIComponent(e)}`),t&&s.push(`name=${encodeURIComponent(t)}`);const r=s.length?`?${s.join("&")}`:"";for(;;){const i=await vi(await Ti(`/auth/ws/register${r}`));try{const o=await i.receive_json();if((o.status===401||o.status===403)&&o.auth?.iframe){i.close(),await Si(o.auth.iframe);continue}if(o.status)throw new Error(o.detail||`Registration failed: ${o.status}`);n&&n();const l=await uc(o);i.send_json(l);const c=await i.receive_json();if(c.status)throw new Error(c.detail||`Registration failed: ${c.status}`);return c}catch(o){throw i.close(),console.error("Registration error:",o),Error(o.name==="NotAllowedError"?"Passkey registration cancelled":o.message)}}}async function Oc(){const e=await vi(await Ti("/auth/ws/authenticate"));try{let t=await e.receive_json();if(t.status>=400)throw new Error(t.detail||`Authentication failed: ${t.status}`);const n=await hc(t);if(e.send_json(n),t=await e.receive_json(),t.status>=400)throw new Error(t.detail||`Authentication failed: ${t.status}`);return t}catch(t){throw console.error("Authentication error:",t),Error(t.name==="NotAllowedError"?"Passkey authentication cancelled":t.message)}finally{e.close()}}const ia={authenticate:Oc,register:Cc},Ic={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"},Pc=new Set(["text","email","password","search","tel","url","number"]),Mc=e=>{const t=Ic[e.key];if(!t)return null;const n=e.target;return(n.tagName==="INPUT"&&Pc.has(n.type)||n.tagName==="TEXTAREA")&&(t==="left"||t==="right")&&n.value!==""?null:t},xn=(e,t=null)=>{if(!e)return[];const n=t||e.dataset?.navItems||'button:not([disabled]), a, [tabindex="0"], [tabindex="-1"]:not([disabled])';return Array.from(e.querySelectorAll(n))},Nc=(e,t)=>{const n=xn(e,t);if(n.length===0)return null;const s=n[0].getBoundingClientRect().top;let r=0;for(const i of n)if(Math.abs(i.getBoundingClientRect().top-s)<5)r++;else break;return{items:n,cols:Math.max(1,r)}},Dc=(e,t,n,s={})=>{const r=xn(e,s.itemSelector);if(r.length===0)return"none";const i=r.indexOf(t);return i===-1?"none":n==="left"?i>0?(r[i-1].focus(),"moved"):"boundary":n==="right"&&i<r.length-1?(r[i+1].focus(),"moved"):"boundary"},oa=(e,t,n,s={})=>{const r=Nc(e,s.itemSelector);if(!r)return"none";const{items:i,cols:o}=r,l=i.indexOf(t);if(l===-1)return"none";const c=Math.floor(l/o),d=l%o;let f=l;switch(n){case"left":if(d===0)return"boundary";f=l-1;break;case"right":if(l>=i.length-1)return"boundary";f=l+1;break;case"up":if(c===0)return"boundary";f=l-o;break;case"down":if(l+o>=i.length)return"boundary";f=l+o;break;default:return"none"}return f!==l?(i[f].focus(),"moved"):"none"},la=(e,t={})=>{if(!e)return null;const n=e.querySelector("[data-nav-primary]")||t.primarySelector&&e.querySelector(t.primarySelector);if(n)return n.focus(),n;const s=xn(e,t.itemSelector);return s.length>0?(s[0].focus(),s[0]):null},ca=(e,t,n={})=>{if(!e)return null;const s=xn(e,n.itemSelector);if(s.length===0)return null;const r=t<0?s.length+t:t;return r>=0&&r<s.length?(s[r].focus(),s[r]):null},aa=(e,t,n)=>e.key!=="Escape"?!1:(e.preventDefault(),t?.("up"),!0),ua=(e,t)=>{const n=navigator.userAgent.includes("Mac OS");return e.key==="Delete"||n&&e.key==="Backspace"?(e.preventDefault(),t?.(),!0):!1},Fc=e=>{if(!e)return null;const t=[".btn-primary:not([disabled])",".btn-secondary:not([disabled])","button:not([disabled])"];for(const n of t){const s=e.querySelector(n);if(s)return s.focus(),s}return null},fa=e=>{if(!e)return null;const t=e.querySelector('input:not([disabled]):not([type="hidden"]), textarea:not([disabled])');return t?(t.focus(),typeof t.select=="function"&&t.select(),t):Fc(e)},Uc=".button-row, .modal-actions, .actions, .role-actions, .ancillary-actions",Lc=e=>{const t=Mc(e);if(!t)return;const n=e.target;if(n.tagName!=="BUTTON"&&n.tagName!=="A")return;const s=n.closest(Uc);s&&(t==="left"||t==="right")&&(e.preventDefault(),Dc(s,n,t,{itemSelector:"button:not([disabled]), a"}))};let lr=!1;const da=()=>{lr||typeof document>"u"||(document.addEventListener("keydown",Lc),lr=!0)},ha=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n};export{Cc as $,Mc as A,la as B,ea as C,Qc as D,Dc as E,ae as F,ca as G,ia as H,ta as I,Zc as J,da as K,Xc as L,lo as M,ra as N,na as O,jc as P,Zt as Q,Bc as R,G as S,st as T,F as U,Hi as V,Hc as W,us as X,kc as Y,Oc as Z,ha as _,Wr as a,oa as a0,ua as a1,aa as a2,qc as a3,fa as a4,Yc as a5,xi as a6,sa as a7,Mt as a8,Fc as a9,Tc as aa,Gn as b,Jc as c,fi as d,ss as e,ns as f,Gc as g,bl as h,Vc as i,zc as j,$c as k,gc as l,Rl as m,Fr as n,No as o,vi as p,Ae as q,Wc as r,hc as s,ji as t,Mr as u,tr as v,Mn as w,Yn as x,vo as y,xc as z};
@@ -0,0 +1 @@
1
+ :root{--font-sans: "Inter", "Inter var", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;--font-mono: "DM Mono", "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;--color-canvas: #ffffff;--color-surface: #eff6ff;--color-surface-subtle: #dbeafe;--color-border: #2563eb;--color-border-strong: #1e40af;--color-heading: #1e3a8a;--color-text: #1e293b;--color-text-muted: #475569;--color-link: #1d4ed8;--color-link-hover: #1e40af;--color-accent: #2563eb;--color-accent-strong: #1e40af;--color-accent-contrast: #ffffff;--color-success-text: #166534;--color-success-bg: #dcfce7;--color-error-text: #b91c1c;--color-error-bg: #fee2e2;--color-info-text: #1e40af;--color-info-bg: #dbeafe;--color-danger: #dc2626;--shadow-soft: 0 10px 30px rgba(30, 64, 175, .15);--radius-none: 0;--radius-sm: 4px;--radius-md: 6px;--radius-lg: 10px;--space-xxs: .25rem;--space-xs: .5rem;--space-sm: .75rem;--space-md: 1rem;--space-lg: 1.5rem;--space-xl: 2.25rem;--space-xxl: 3.5rem;--layout-padding: clamp(1.5rem, 3vw + 1rem, 3.25rem);--transition-base: .16s ease;--focus-ring: 0 0 0 2px var(--color-accent)}@media(prefers-color-scheme:dark){:root{--color-canvas: #0f172a;--color-surface: #141b2f;--color-surface-subtle: #1b243b;--color-border: #25304a;--color-border-strong: #3d4d6b;--color-heading: #fff;--color-text: #e2e8f0;--color-text-muted: #94a3b8;--color-link: #60a5fa;--color-link-hover: #93c5fd;--color-accent: #60a5fa;--color-accent-strong: #3b82f6;--color-accent-contrast: #0b1120;--color-success-text: #34d399;--color-success-bg: #1a4d2e;--color-error-text: #fca5a5;--color-error-bg: #4a1f1f;--color-info-text: #bae6fd;--color-info-bg: #1e3a5f;--color-danger: #f87171;--shadow-soft: 0 0 0 #000000}}*,*:before,*:after{box-sizing:border-box}html{overflow:clip;height:100%;background:var(--color-canvas)}body{overflow:auto;scrollbar-gutter:stable;height:100%;margin:0;font-family:var(--font-sans);background:none;color:var(--color-text);line-height:1.55;-webkit-font-smoothing:antialiased;text-align:justify;hyphens:auto;-webkit-hyphens:auto;-moz-hyphens:auto}body,#app,#admin-app{display:flex;flex-direction:column;min-height:100vh}#app,#admin-app{flex:1}a,a:visited{color:var(--color-link);text-decoration:none}a:hover,a:focus-visible{color:var(--color-link-hover)}.app-shell{flex:1;display:flex;flex-direction:column;min-height:100vh}.app-main{flex:1;display:flex;flex-direction:column}.view-root{position:relative;flex:1;width:100%;display:flex;flex-direction:column;gap:2rem;padding:var(--layout-padding);box-sizing:border-box;margin:0 auto}.view-root--wide{width:min(100%,1200px)}.view-root--narrow{max-width:540px}.view-header{display:flex;flex-direction:column;gap:.75rem}.view-header h1{margin:0;font-weight:600;color:var(--color-heading)}.view-lede{margin:0;color:var(--color-text-muted);font-size:1rem}.section-block{display:flex;flex-direction:column;gap:1rem}.section-block h2{margin:0;font-size:clamp(1.25rem,1.5vw + 1rem,1.65rem);font-weight:600;color:var(--color-heading)}.section-body{display:flex;flex-direction:column;gap:1rem}.section-description{margin:0;color:var(--color-text-muted)}.button-row{display:flex;flex-wrap:nowrap;gap:.75rem;justify-content:flex-start}.button-row button{min-width:0}.surface{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-lg);box-shadow:var(--shadow-soft)}.surface--tight{padding:var(--space-md)}button{font-family:inherit;font-size:1rem;font-weight:500;border-radius:var(--radius-sm);border:1px solid transparent;padding:.65rem 1.1rem;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;background:var(--color-surface);color:var(--color-text)}button:disabled{cursor:not-allowed;filter:opacity(.6)}.btn-primary{background:var(--color-accent);color:var(--color-accent-contrast);border-color:var(--color-accent);box-shadow:var(--shadow-soft)}.btn-primary:hover:not(:disabled){background:var(--color-accent-strong);border-color:var(--color-accent-strong)}.btn-secondary{background:transparent;color:var(--color-text);border-color:var(--color-border)}.btn-secondary:hover:not(:disabled){border-color:var(--color-border-strong);background:var(--color-surface-subtle)}.btn-danger{background:var(--color-danger);color:var(--color-accent-contrast);border-color:transparent}.btn-danger:hover:not(:disabled){filter:brightness(.92)}.btn-primary:focus-visible,.btn-secondary:focus-visible,.btn-danger:focus-visible{outline:1px solid var(-webkit-focus-ring-color)}input[type=text],input[type=search],input[type=email],textarea,select{font:inherit;width:100%;padding:.65rem .75rem;border-radius:var(--radius-sm);border:1px solid var(--color-border);background:var(--color-surface);color:var(--color-text);transition:border-color var(--transition-base),box-shadow var(--transition-base)}label{display:flex;flex-direction:column;gap:.5rem;color:var(--color-text)}p{margin:0;color:var(--color-text)}small{color:var(--color-text-muted)}.table-wrapper{overflow-x:auto;background:var(--color-surface);border:1px solid var(--color-border)}table{width:100%;border-collapse:collapse;font-size:.95rem}thead tr{background:var(--color-surface-subtle);color:var(--color-text-muted)}td,th{padding:.65rem .75rem;border-bottom:1px solid var(--color-border);text-align:left}.center{text-align:center}.badge{display:inline-flex;align-items:center;gap:.35rem;padding:.2rem .6rem;border-radius:var(--radius-sm);background:var(--color-surface-subtle);border:1px solid var(--color-border);color:var(--color-text-muted);font-size:.75rem}.global-status{position:fixed;top:1.5rem;left:0;right:0;margin:0 auto;z-index:1200;width:fit-content;min-width:min(520px,calc(100% - 2rem));max-width:calc(100% - 2rem);display:none}.global-status .status{display:flex;align-items:center;justify-content:center;padding:.85rem 1.25rem;border-radius:var(--radius-sm);border-width:1px;border-style:solid;background:var(--color-surface);box-shadow:var(--shadow-soft);font-weight:550}.status.info{border-color:#3b82f6;color:var(--color-info-text);background:var(--color-info-bg)}.status.success{border-color:#16a34a;color:var(--color-success-text);background:var(--color-success-bg)}.status.error{border-color:#dc2626;color:var(--color-error-text);background:var(--color-error-bg)}.dialog-overlay{position:fixed;inset:0;background:transparent;z-index:1100;display:flex;align-items:center;justify-content:center;padding:1.5rem}.device-dialog,.modal{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);width:min(520px,100%);max-height:calc(100vh - 3rem);overflow-y:auto;padding:1.75rem;box-shadow:var(--shadow-soft);color:var(--color-text)}.qr-container{display:flex;flex-direction:column;align-items:center;gap:.75rem;text-align:center;color:var(--color-text-muted)}.qr-code{padding:1rem;background:#fff;box-shadow:var(--shadow-soft)}.link-container,.token-display,.token-info{background:var(--color-surface-subtle);border:1px solid var(--color-border);border-radius:var(--radius-sm);padding:.75rem;color:var(--color-text)}:root{--card-width: 16rem}.record-list,.credential-list,.session-list{width:100%;display:grid;grid-auto-flow:row;grid-template-columns:repeat(auto-fill,minmax(var(--card-width),1fr));justify-content:start;gap:.5rem;align-items:stretch;margin:0 auto;outline:none}@media(max-width:720px){.record-list{display:flex;flex-direction:column;max-width:100%}}.record-item,.credential-item,.session-item{display:flex;flex-direction:column;padding:.5rem;border-radius:var(--radius-md);background:var(--color-surface);height:100%;transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease;position:relative;cursor:pointer}.record-item:hover,.credential-item:hover,.session-item:hover{border-color:var(--color-border-strong);box-shadow:0 10px 24px #0f172a1f;transform:translateY(-1px)}.record-item.is-current,.credential-item.current-session,.credential-item.is-hovered,.session-item.is-current,.session-item.is-hovered,.credential-item.is-linked-session,.session-item.is-linked-credential{border-color:var(--color-accent);background-color:var(--color-surface-subtle)}.credential-item:focus,.session-item:focus{outline:1px solid var(-webkit-focus-ring-color)}.item-top{display:flex;align-items:center;height:2.5rem}.item-icon{width:40px;height:40px;display:grid;place-items:center;flex-shrink:0}.auth-icon{border-radius:var(--radius-sm)}.icon{flex:0 0 auto;font-size:1.5em;width:40px}.item-title{flex:1;margin:0;font-size:1rem;font-weight:600;color:var(--color-heading);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-actions{flex-shrink:0;display:flex;align-items:center}.item-actions .badge+.btn-card-delete{margin-left:.25rem}.item-actions .badge+.badge{margin-left:.25rem}.item-details{margin-left:40px}.credential-dates,.session-dates{display:grid;grid-auto-flow:row;grid-template-columns:8em 1fr;font-size:.75rem;align-items:center}.date-label{font-weight:500;color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis}.date-value{color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.btn-card-delete{background:transparent;border:none;color:var(--color-danger);padding:.35rem .5rem;font-size:1.05rem;line-height:1;border-radius:var(--radius-sm);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.btn-card-delete:hover:not(:disabled){background:#fee}.btn-card-delete:disabled{filter:opacity(.4);cursor:not-allowed}.session-emoji{font-size:1.2rem}.session-group{position:relative}.session-group:focus-visible{outline:1px solid var(-webkit-focus-ring-color)}.session-group-host{display:flex;align-items:center;font-size:1.5rem;font-weight:600;margin:.5rem 0}.session-group-icon{margin-left:-1.5rem}.session-group-host a{color:var(--color-text);text-decoration:none}.session-group:focus-visible .session-group-host,.session-group:focus-visible .session-group-host a{color:var(--color-heading)}.btn-card-delete{display:none}.session-item:focus .btn-card-delete{display:block}.badge{padding:.2rem .5rem;border-radius:var(--radius-sm);font-size:.8rem;font-weight:500;white-space:nowrap}.badge-current{background:var(--color-accent);color:var(--color-accent-contrast);box-shadow:0 0 0 1px var(--color-accent) inset}.badge:not(.badge-current){background:var(--color-surface-subtle);color:var(--color-text-muted);border:1px solid var(--color-border)}.session-meta-info{font-size:.75rem;color:var(--color-text-muted);font-family:monospace}.empty-state{text-align:center;padding:var(--space-lg);color:var(--color-text-muted)}.empty-state p{margin:0}.user-info{display:grid;border-radius:var(--radius-md);background:var(--color-surface);padding:1.1rem 1.25rem}.user-details{display:grid;grid-template-columns:7em 1fr;gap:0 .5rem;padding-left:40px;font-size:.75rem}.toggle-link{color:var(--color-link);cursor:pointer}.toggle-link:hover{color:var(--color-link-hover)}.token-info code{font-family:var(--font-mono)}@media(max-width:720px){.view-root{padding:clamp(1rem,3vw + .75rem,2rem);gap:1.75rem}.global-status{top:1rem}}.dialog-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;background:transparent;backdrop-filter:blur(.1rem) brightness(.7);-webkit-backdrop-filter:blur(.1rem) brightness(.7);display:flex;align-items:center;justify-content:center;z-index:1000}.dialog-container{max-width:90vw;max-height:90vh;overflow-y:auto}.dialog-content{flex:none;width:100%;max-width:480px;padding:2rem;background:var(--color-surface);border-radius:var(--radius-lg);box-shadow:0 20px 60px #1e293b;border:1px solid var(--color-border)}.dialog-content--wide{max-width:540px}.dialog-content--narrow{max-width:420px}@media(max-width:720px){.dialog-content{padding:1.5rem}}.slot-machine{padding:.875rem 1rem;background:var(--color-surface-hover, rgba(0, 0, 0, .03));border:1px solid var(--color-border);border-radius:var(--radius-sm);font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;display:flex;align-items:center;-webkit-user-select:none;user-select:none;pointer-events:none;white-space:nowrap;overflow:hidden}.slot-reel{display:inline-flex;align-items:center;justify-content:center;flex:1;min-width:0;height:1.8em;position:relative}
@@ -1 +1 @@
1
- .permissions-section[data-v-56228c4a]{margin-bottom:var(--space-xl)}.permissions-section h2[data-v-56228c4a]{margin-bottom:var(--space-md)}.actions[data-v-56228c4a]{display:flex;flex-wrap:wrap;gap:var(--space-sm);align-items:center}.actions button[data-v-56228c4a]{width:auto}.org-table a[data-v-56228c4a]{text-decoration:none;color:var(--color-link)}.org-table a[data-v-56228c4a]:hover{text-decoration:underline}.org-table .center[data-v-56228c4a]{width:6rem;min-width:6rem}.org-table .role-names[data-v-56228c4a]{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.perm-name-cell[data-v-56228c4a]{display:flex;flex-direction:column;gap:.3rem}.perm-title[data-v-56228c4a]{font-weight:600;color:var(--color-heading)}.perm-id-info[data-v-56228c4a]{font-size:.8rem;color:var(--color-text-muted);display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.perm-domain[data-v-56228c4a]{color:var(--color-text-muted);font-size:.9rem}.icon-btn[data-v-56228c4a]{background:none;border:none;color:var(--color-text-muted);padding:.2rem;border-radius:var(--radius-sm);cursor:pointer;transition:background .2s ease,color .2s ease}.icon-btn[data-v-56228c4a]:hover{color:var(--color-heading);background:var(--color-surface-muted)}.delete-icon[data-v-56228c4a]{color:var(--color-danger)}.delete-icon[data-v-56228c4a]:hover{background:var(--color-danger-bg);color:var(--color-danger-text)}.matrix-wrapper[data-v-56228c4a]{margin:var(--space-md) 0;padding:var(--space-lg)}.matrix-scroll[data-v-56228c4a]{overflow-x:auto}.matrix-hint[data-v-56228c4a]{font-size:.8rem;color:var(--color-text-muted)}.perm-matrix-grid[data-v-56228c4a]{display:inline-grid;gap:.25rem;align-items:stretch}.perm-matrix-grid[data-v-56228c4a]>*{padding:.35rem .45rem;font-size:.75rem}.perm-matrix-grid .grid-head[data-v-56228c4a]{color:var(--color-text-muted);text-transform:uppercase;font-weight:600;letter-spacing:.05em}.perm-matrix-grid .perm-head[data-v-56228c4a]{display:flex;align-items:flex-end;justify-content:flex-start;padding:.35rem .45rem;font-size:.75rem}.perm-matrix-grid .org-head[data-v-56228c4a]{display:flex;align-items:flex-end;justify-content:center}.perm-matrix-grid .org-head span[data-v-56228c4a]{writing-mode:vertical-rl;transform:rotate(180deg);font-size:.65rem}.perm-name[data-v-56228c4a]{font-weight:600;color:var(--color-heading);padding:.35rem .45rem;font-size:.75rem}.display-text[data-v-56228c4a]{margin-right:var(--space-xs)}.edit-display-btn[data-v-56228c4a]{padding:.1rem .2rem;font-size:.8rem}.edit-org-btn[data-v-56228c4a]{padding:.1rem .2rem;font-size:.8rem;margin-left:var(--space-xs)}.perm-actions[data-v-56228c4a],.center[data-v-56228c4a]{text-align:center}.muted[data-v-56228c4a]{color:var(--color-text-muted)}.card.surface[data-v-f76fbbc3]{padding:var(--space-lg)}.org-title[data-v-f76fbbc3]{display:flex;align-items:center;gap:var(--space-sm);margin-bottom:var(--space-lg)}.org-name[data-v-f76fbbc3]{font-size:1.5rem;font-weight:600;color:var(--color-heading)}.icon-btn[data-v-f76fbbc3]{background:none;border:none;color:var(--color-text-muted);padding:.2rem;border-radius:var(--radius-sm);cursor:pointer;transition:background .2s ease,color .2s ease}.icon-btn[data-v-f76fbbc3]:hover{color:var(--color-heading);background:var(--color-surface-muted)}.matrix-wrapper[data-v-f76fbbc3]{margin:var(--space-md) 0;padding:var(--space-lg)}.matrix-scroll[data-v-f76fbbc3]{overflow-x:auto}.matrix-hint[data-v-f76fbbc3]{font-size:.8rem;color:var(--color-text-muted)}.perm-matrix-grid[data-v-f76fbbc3]{display:inline-grid;gap:.25rem;align-items:stretch}.perm-matrix-grid[data-v-f76fbbc3]>*{padding:.35rem .45rem;font-size:.75rem}.perm-matrix-grid .grid-head[data-v-f76fbbc3]{color:var(--color-text-muted);text-transform:uppercase;font-weight:600;letter-spacing:.05em}.perm-matrix-grid .perm-head[data-v-f76fbbc3]{display:flex;align-items:flex-end;justify-content:flex-start;padding:.35rem .45rem;font-size:.75rem}.perm-matrix-grid .role-head[data-v-f76fbbc3]{display:flex;align-items:flex-end;justify-content:center}.perm-matrix-grid .role-head span[data-v-f76fbbc3]{writing-mode:vertical-rl;transform:rotate(180deg);font-size:.65rem}.perm-matrix-grid .add-role-head[data-v-f76fbbc3]{cursor:pointer}.perm-name[data-v-f76fbbc3]{font-weight:600;color:var(--color-heading);padding:.35rem .45rem;font-size:.75rem}.roles-grid[data-v-f76fbbc3]{display:flex;gap:var(--space-lg);margin-top:var(--space-lg)}.role-column[data-v-f76fbbc3]{flex:1;min-width:200px;border:1px solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-md)}.role-header[data-v-f76fbbc3]{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--space-md)}.role-name[data-v-f76fbbc3]{display:flex;align-items:center;gap:var(--space-xs);font-size:1.1rem;color:var(--color-heading)}.role-actions[data-v-f76fbbc3]{display:flex;gap:var(--space-xs)}.plus-btn[data-v-f76fbbc3]{background:var(--color-accent-soft);color:var(--color-accent);border:none;border-radius:var(--radius-sm);padding:.25rem .45rem;font-size:1.1rem;cursor:pointer}.plus-btn[data-v-f76fbbc3]:hover{background:#2563eb2e}.user-list[data-v-f76fbbc3]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:var(--space-xs)}.user-chip[data-v-f76fbbc3]{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:.45rem .6rem;display:flex;justify-content:space-between;gap:var(--space-sm);cursor:grab}.user-chip[data-v-f76fbbc3]:focus{outline:2px solid var(--color-accent);outline-offset:1px}.user-chip .meta[data-v-f76fbbc3]{font-size:.7rem;color:var(--color-text-muted)}.empty-role[data-v-f76fbbc3]{border:1px dashed var(--color-border-strong);border-radius:var(--radius-md);padding:var(--space-sm);display:flex;flex-direction:column;gap:var(--space-xs);align-items:flex-start}.empty-text[data-v-f76fbbc3]{margin:0}.delete-icon[data-v-f76fbbc3]{color:var(--color-danger)}.delete-icon[data-v-f76fbbc3]:hover{background:var(--color-danger-bg);color:var(--color-danger-text)}.muted[data-v-f76fbbc3]{color:var(--color-text-muted)}@media(max-width:720px){.roles-grid[data-v-f76fbbc3]{flex-direction:column}}.user-detail[data-v-0b259926]{display:flex;flex-direction:column;gap:var(--space-lg)}.actions[data-v-0b259926]{display:flex;flex-wrap:wrap;gap:var(--space-sm);align-items:center}.ancillary-actions[data-v-0b259926]{margin-top:-.5rem}.reg-token-btn[data-v-0b259926]{align-self:flex-start}.registration-actions[data-v-0b259926]{display:flex;flex-direction:column;gap:.5rem}.icon-btn[data-v-0b259926]{background:none;border:none;color:var(--color-text-muted);padding:.2rem;border-radius:var(--radius-sm);cursor:pointer;transition:background .2s ease,color .2s ease}.icon-btn[data-v-0b259926]:hover{color:var(--color-heading);background:var(--color-surface-muted)}.matrix-hint[data-v-0b259926]{font-size:.8rem;color:var(--color-text-muted)}.error[data-v-0b259926]{color:var(--color-danger-text)}.small[data-v-0b259926]{font-size:.9rem}.muted[data-v-0b259926]{color:var(--color-text-muted)}.error[data-v-8d16c6cc]{color:var(--color-danger-text)}.small[data-v-8d16c6cc]{font-size:.9rem}.muted[data-v-8d16c6cc]{color:var(--color-text-muted)}.optional[data-v-8d16c6cc]{font-weight:400;color:var(--color-text-muted);font-size:.85em}.view-admin[data-v-1d1c1f6a]{padding-bottom:var(--space-3xl)}.view-header[data-v-1d1c1f6a]{display:flex;flex-direction:column;gap:var(--space-sm)}.admin-section[data-v-1d1c1f6a]{margin-top:var(--space-xl)}.admin-section-body[data-v-1d1c1f6a],.admin-panels[data-v-1d1c1f6a]{display:flex;flex-direction:column;gap:var(--space-xl)}
1
+ .permissions-section[data-v-56228c4a]{margin-bottom:var(--space-xl)}.permissions-section h2[data-v-56228c4a]{margin-bottom:var(--space-md)}.actions[data-v-56228c4a]{display:flex;flex-wrap:wrap;gap:var(--space-sm);align-items:center}.actions button[data-v-56228c4a]{width:auto}.org-table a[data-v-56228c4a]{text-decoration:none;color:var(--color-link)}.org-table a[data-v-56228c4a]:hover{text-decoration:underline}.org-table .center[data-v-56228c4a]{width:6rem;min-width:6rem}.org-table .role-names[data-v-56228c4a]{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.perm-name-cell[data-v-56228c4a]{display:flex;flex-direction:column;gap:.3rem}.perm-title[data-v-56228c4a]{font-weight:600;color:var(--color-heading)}.perm-id-info[data-v-56228c4a]{font-size:.8rem;color:var(--color-text-muted);display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.perm-domain[data-v-56228c4a]{color:var(--color-text-muted);font-size:.9rem}.icon-btn[data-v-56228c4a]{background:none;border:none;color:var(--color-text-muted);padding:.2rem;border-radius:var(--radius-sm);cursor:pointer;transition:background .2s ease,color .2s ease}.icon-btn[data-v-56228c4a]:hover{color:var(--color-heading);background:var(--color-surface-muted)}.delete-icon[data-v-56228c4a]{color:var(--color-danger)}.delete-icon[data-v-56228c4a]:hover{background:var(--color-danger-bg);color:var(--color-danger-text)}.matrix-wrapper[data-v-56228c4a]{margin:var(--space-md) 0;padding:var(--space-lg)}.matrix-scroll[data-v-56228c4a]{overflow-x:auto}.matrix-hint[data-v-56228c4a]{font-size:.8rem;color:var(--color-text-muted)}.perm-matrix-grid[data-v-56228c4a]{display:inline-grid;gap:.25rem;align-items:stretch}.perm-matrix-grid[data-v-56228c4a]>*{padding:.35rem .45rem;font-size:.75rem}.perm-matrix-grid .grid-head[data-v-56228c4a]{color:var(--color-text-muted);text-transform:uppercase;font-weight:600;letter-spacing:.05em}.perm-matrix-grid .perm-head[data-v-56228c4a]{display:flex;align-items:flex-end;justify-content:flex-start;padding:.35rem .45rem;font-size:.75rem}.perm-matrix-grid .org-head[data-v-56228c4a]{display:flex;align-items:flex-end;justify-content:center}.perm-matrix-grid .org-head span[data-v-56228c4a]{writing-mode:vertical-rl;transform:rotate(180deg);font-size:.65rem}.perm-name[data-v-56228c4a]{font-weight:600;color:var(--color-heading);padding:.35rem .45rem;font-size:.75rem}.display-text[data-v-56228c4a]{margin-right:var(--space-xs)}.edit-display-btn[data-v-56228c4a]{padding:.1rem .2rem;font-size:.8rem}.edit-org-btn[data-v-56228c4a]{padding:.1rem .2rem;font-size:.8rem;margin-left:var(--space-xs)}.perm-actions[data-v-56228c4a],.center[data-v-56228c4a]{text-align:center}.muted[data-v-56228c4a]{color:var(--color-text-muted)}.card.surface[data-v-f76fbbc3]{padding:var(--space-lg)}.org-title[data-v-f76fbbc3]{display:flex;align-items:center;gap:var(--space-sm);margin-bottom:var(--space-lg)}.org-name[data-v-f76fbbc3]{font-size:1.5rem;font-weight:600;color:var(--color-heading)}.icon-btn[data-v-f76fbbc3]{background:none;border:none;color:var(--color-text-muted);padding:.2rem;border-radius:var(--radius-sm);cursor:pointer;transition:background .2s ease,color .2s ease}.icon-btn[data-v-f76fbbc3]:hover{color:var(--color-heading);background:var(--color-surface-muted)}.matrix-wrapper[data-v-f76fbbc3]{margin:var(--space-md) 0;padding:var(--space-lg)}.matrix-scroll[data-v-f76fbbc3]{overflow-x:auto}.matrix-hint[data-v-f76fbbc3]{font-size:.8rem;color:var(--color-text-muted)}.perm-matrix-grid[data-v-f76fbbc3]{display:inline-grid;gap:.25rem;align-items:stretch}.perm-matrix-grid[data-v-f76fbbc3]>*{padding:.35rem .45rem;font-size:.75rem}.perm-matrix-grid .grid-head[data-v-f76fbbc3]{color:var(--color-text-muted);text-transform:uppercase;font-weight:600;letter-spacing:.05em}.perm-matrix-grid .perm-head[data-v-f76fbbc3]{display:flex;align-items:flex-end;justify-content:flex-start;padding:.35rem .45rem;font-size:.75rem}.perm-matrix-grid .role-head[data-v-f76fbbc3]{display:flex;align-items:flex-end;justify-content:center}.perm-matrix-grid .role-head span[data-v-f76fbbc3]{writing-mode:vertical-rl;transform:rotate(180deg);font-size:.65rem}.perm-matrix-grid .add-role-head[data-v-f76fbbc3]{cursor:pointer}.perm-name[data-v-f76fbbc3]{font-weight:600;color:var(--color-heading);padding:.35rem .45rem;font-size:.75rem}.roles-grid[data-v-f76fbbc3]{display:flex;gap:var(--space-lg);margin-top:var(--space-lg)}.role-column[data-v-f76fbbc3]{flex:1;min-width:200px;border:1px solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-md)}.role-header[data-v-f76fbbc3]{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--space-md)}.role-name[data-v-f76fbbc3]{display:flex;align-items:center;gap:var(--space-xs);font-size:1.1rem;color:var(--color-heading)}.role-actions[data-v-f76fbbc3]{display:flex;gap:var(--space-xs)}.plus-btn[data-v-f76fbbc3]{background:var(--color-accent-soft);color:var(--color-accent);border:none;border-radius:var(--radius-sm);padding:.25rem .45rem;font-size:1.1rem;cursor:pointer}.plus-btn[data-v-f76fbbc3]:hover{background:#2563eb2e}.user-list[data-v-f76fbbc3]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:var(--space-xs)}.user-chip[data-v-f76fbbc3]{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:.45rem .6rem;display:flex;justify-content:space-between;gap:var(--space-sm);cursor:grab}.user-chip[data-v-f76fbbc3]:focus{outline:2px solid var(--color-accent);outline-offset:1px}.user-chip .meta[data-v-f76fbbc3]{font-size:.7rem;color:var(--color-text-muted)}.empty-role[data-v-f76fbbc3]{border:1px dashed var(--color-border-strong);border-radius:var(--radius-md);padding:var(--space-sm);display:flex;flex-direction:column;gap:var(--space-xs);align-items:flex-start}.empty-text[data-v-f76fbbc3]{margin:0}.delete-icon[data-v-f76fbbc3]{color:var(--color-danger)}.delete-icon[data-v-f76fbbc3]:hover{background:var(--color-danger-bg);color:var(--color-danger-text)}.muted[data-v-f76fbbc3]{color:var(--color-text-muted)}@media(max-width:720px){.roles-grid[data-v-f76fbbc3]{flex-direction:column}}.user-detail[data-v-738bccea]{display:flex;flex-direction:column;gap:var(--space-lg)}.actions[data-v-738bccea]{display:flex;flex-wrap:wrap;gap:var(--space-sm);align-items:center}.ancillary-actions[data-v-738bccea]{margin-top:-.5rem}.reg-token-btn[data-v-738bccea]{align-self:flex-start}.registration-actions[data-v-738bccea]{display:flex;flex-direction:column;gap:.5rem}.icon-btn[data-v-738bccea]{background:none;border:none;color:var(--color-text-muted);padding:.2rem;border-radius:var(--radius-sm);cursor:pointer;transition:background .2s ease,color .2s ease}.icon-btn[data-v-738bccea]:hover{color:var(--color-heading);background:var(--color-surface-muted)}.matrix-hint[data-v-738bccea]{font-size:.8rem;color:var(--color-text-muted)}.error[data-v-738bccea]{color:var(--color-danger-text)}.small[data-v-738bccea]{font-size:.9rem}.muted[data-v-738bccea]{color:var(--color-text-muted)}.error[data-v-8d16c6cc]{color:var(--color-danger-text)}.small[data-v-8d16c6cc]{font-size:.9rem}.muted[data-v-8d16c6cc]{color:var(--color-text-muted)}.optional[data-v-8d16c6cc]{font-weight:400;color:var(--color-text-muted);font-size:.85em}.view-admin[data-v-6d820553]{padding-bottom:var(--space-3xl)}.view-header[data-v-6d820553]{display:flex;flex-direction:column;gap:var(--space-sm)}.admin-section[data-v-6d820553]{margin-top:var(--space-xl)}.admin-section-body[data-v-6d820553],.admin-panels[data-v-6d820553]{display:flex;flex-direction:column;gap:var(--space-xl)}