@tinyrack/tinyauth-server 0.7.0 → 0.8.0
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.
- package/dist/services/account-selection.service.d.ts.map +1 -1
- package/dist/services/account-selection.service.js +5 -2
- package/dist/services/account-selection.service.js.map +1 -1
- package/dist/services/oauth-authorize.service.d.ts.map +1 -1
- package/dist/services/oauth-authorize.service.js +3 -1
- package/dist/services/oauth-authorize.service.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/2fa-DZSOQLyd.js +2 -0
- package/public/assets/{2fa-Cteolf9l.js.map → 2fa-DZSOQLyd.js.map} +1 -1
- package/public/assets/2fa-DvD9N_wj.js +2 -0
- package/public/assets/{2fa-BMEIiDXv.js.map → 2fa-DvD9N_wj.js.map} +1 -1
- package/public/assets/{2fa-BhCgCfEc.js → 2fa-P8YqnDXC.js} +2 -2
- package/public/assets/{2fa-BhCgCfEc.js.map → 2fa-P8YqnDXC.js.map} +1 -1
- package/public/assets/{2fa-E0x3Samn.js → 2fa-fLX-LED8.js} +2 -2
- package/public/assets/{2fa-E0x3Samn.js.map → 2fa-fLX-LED8.js.map} +1 -1
- package/public/assets/{admin-CXJ0z2QN.js → admin-BLPp8bT8.js} +2 -2
- package/public/assets/{admin-CXJ0z2QN.js.map → admin-BLPp8bT8.js.map} +1 -1
- package/public/assets/{consent-C-h_pWHQ.js → consent-CjXe4bU5.js} +2 -2
- package/public/assets/{consent-C-h_pWHQ.js.map → consent-CjXe4bU5.js.map} +1 -1
- package/public/assets/consent-Cq6tCfwA.js +2 -0
- package/public/assets/{consent-B17hGrta.js.map → consent-Cq6tCfwA.js.map} +1 -1
- package/public/assets/{email-DjE7mqnX.js → email-CpOX6Ig_.js} +2 -2
- package/public/assets/email-CpOX6Ig_.js.map +1 -0
- package/public/assets/email-DvD9N_wj.js +2 -0
- package/public/assets/email-DvD9N_wj.js.map +1 -0
- package/public/assets/{error-BKXsXhdR.js → error-DMzYyopT.js} +2 -2
- package/public/assets/{error-BKXsXhdR.js.map → error-DMzYyopT.js.map} +1 -1
- package/public/assets/forgot-DvD9N_wj.js +2 -0
- package/public/assets/{forgot-BMEIiDXv.js.map → forgot-DvD9N_wj.js.map} +1 -1
- package/public/assets/{forgot-C9zSfaX9.js → forgot-RbSzzjWF.js} +2 -2
- package/public/assets/{forgot-C9zSfaX9.js.map → forgot-RbSzzjWF.js.map} +1 -1
- package/public/assets/{index-BmfaaNx6.js → index-CgkA6nnx.js} +3 -3
- package/public/assets/index-CgkA6nnx.js.map +1 -0
- package/public/assets/{login-DG1Yfmb8.js → login-BQI7QY9W.js} +2 -2
- package/public/assets/login-BQI7QY9W.js.map +1 -0
- package/public/assets/login-DvD9N_wj.js +2 -0
- package/public/assets/login-DvD9N_wj.js.map +1 -0
- package/public/assets/{passkey-BDrX3jVg.js → passkey-C0BKdldQ.js} +2 -2
- package/public/assets/passkey-C0BKdldQ.js.map +1 -0
- package/public/assets/{passkey-C-h8Fvqn.js → passkey-D9qQ8xoR.js} +2 -2
- package/public/assets/passkey-D9qQ8xoR.js.map +1 -0
- package/public/assets/password-CqjbZggE.js +2 -0
- package/public/assets/password-CqjbZggE.js.map +1 -0
- package/public/assets/password-DvD9N_wj.js +2 -0
- package/public/assets/password-DvD9N_wj.js.map +1 -0
- package/public/assets/{profile-8buOY6GT.js → profile-B5qQlPwW.js} +2 -2
- package/public/assets/{profile-8buOY6GT.js.map → profile-B5qQlPwW.js.map} +1 -1
- package/public/assets/profile-fwH7_EJ0.js +2 -0
- package/public/assets/{profile-DcpL_XUt.js.map → profile-fwH7_EJ0.js.map} +1 -1
- package/public/assets/{recovery-Csf6dtvj.js → recovery-DqEhUHzv.js} +2 -2
- package/public/assets/{recovery-Csf6dtvj.js.map → recovery-DqEhUHzv.js.map} +1 -1
- package/public/assets/{register-X6dycne4.js → register-CntgI-rd.js} +2 -2
- package/public/assets/register-CntgI-rd.js.map +1 -0
- package/public/assets/register-DvD9N_wj.js +2 -0
- package/public/assets/register-DvD9N_wj.js.map +1 -0
- package/public/assets/{reset-1nsqPlxL.js → reset-BK1XYJiv.js} +2 -2
- package/public/assets/{reset-1nsqPlxL.js.map → reset-BK1XYJiv.js.map} +1 -1
- package/public/assets/reset-DvD9N_wj.js +2 -0
- package/public/assets/{reset-BMEIiDXv.js.map → reset-DvD9N_wj.js.map} +1 -1
- package/public/assets/{select-CDdb3jyc.js → select-DeUoTgDw.js} +2 -2
- package/public/assets/{select-CDdb3jyc.js.map → select-DeUoTgDw.js.map} +1 -1
- package/public/assets/select-DvD9N_wj.js +2 -0
- package/public/assets/{select-BMEIiDXv.js.map → select-DvD9N_wj.js.map} +1 -1
- package/public/assets/{terms-CUhvMN9k.js → terms-CPEuXMaO.js} +2 -2
- package/public/assets/{terms-CUhvMN9k.js.map → terms-CPEuXMaO.js.map} +1 -1
- package/public/assets/terms-fwH7_EJ0.js +2 -0
- package/public/assets/{terms-DcpL_XUt.js.map → terms-fwH7_EJ0.js.map} +1 -1
- package/public/assets/{totp-DB9WqW4V.js → totp-B1ebEiOW.js} +2 -2
- package/public/assets/totp-B1ebEiOW.js.map +1 -0
- package/public/assets/{totp-UDT2P91H.js → totp-DWWZe-tJ.js} +2 -2
- package/public/assets/totp-DWWZe-tJ.js.map +1 -0
- package/public/assets/{use-totp-setup-9fktn_he.js → use-totp-setup-Z96pOMXt.js} +2 -2
- package/public/assets/{use-totp-setup-9fktn_he.js.map → use-totp-setup-Z96pOMXt.js.map} +1 -1
- package/public/assets/{useMutation-Iu4AJCB4.js → useMutation-Biy2-pH_.js} +2 -2
- package/public/assets/{useMutation-Iu4AJCB4.js.map → useMutation-Biy2-pH_.js.map} +1 -1
- package/public/assets/{users-Bi7gjreq.js → users-YtDGJlDl.js} +2 -2
- package/public/assets/{users-Bi7gjreq.js.map → users-YtDGJlDl.js.map} +1 -1
- package/public/index.html +1 -1
- package/public/assets/2fa-BMEIiDXv.js +0 -2
- package/public/assets/2fa-Cteolf9l.js +0 -2
- package/public/assets/consent-B17hGrta.js +0 -2
- package/public/assets/email-BMEIiDXv.js +0 -2
- package/public/assets/email-BMEIiDXv.js.map +0 -1
- package/public/assets/email-DjE7mqnX.js.map +0 -1
- package/public/assets/forgot-BMEIiDXv.js +0 -2
- package/public/assets/index-BmfaaNx6.js.map +0 -1
- package/public/assets/login-BMEIiDXv.js +0 -2
- package/public/assets/login-BMEIiDXv.js.map +0 -1
- package/public/assets/login-DG1Yfmb8.js.map +0 -1
- package/public/assets/passkey-BDrX3jVg.js.map +0 -1
- package/public/assets/passkey-C-h8Fvqn.js.map +0 -1
- package/public/assets/password-86C-hCze.js +0 -2
- package/public/assets/password-86C-hCze.js.map +0 -1
- package/public/assets/password-BMEIiDXv.js +0 -2
- package/public/assets/password-BMEIiDXv.js.map +0 -1
- package/public/assets/profile-DcpL_XUt.js +0 -2
- package/public/assets/register-BMEIiDXv.js +0 -2
- package/public/assets/register-BMEIiDXv.js.map +0 -1
- package/public/assets/register-X6dycne4.js.map +0 -1
- package/public/assets/reset-BMEIiDXv.js +0 -2
- package/public/assets/select-BMEIiDXv.js +0 -2
- package/public/assets/terms-DcpL_XUt.js +0 -2
- package/public/assets/totp-DB9WqW4V.js.map +0 -1
- package/public/assets/totp-UDT2P91H.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,o as t,r as n,s as r,t as i,u as a}from"./IconBase.es-d5KP98Ac.js";import{$ as o,Q as s,a as c,dt as l,h as u,i as d,n as f,r as p,ut as m}from"./use-theme-cVUDAjtt.js";import{t as h}from"./useMutation-Iu4AJCB4.js";import{t as g}from"./mutationOptions-Dfvzj6n2.js";import{t as _}from"./Warning.es-BPpZIJYZ.js";import{t as v}from"./page-layout-C475gs09.js";import{a as y,i as b,n as x,r as S,t as C}from"./use-totp-setup-9fktn_he.js";import{t as w}from"./Fingerprint.es-CW755VWD.js";import{t as T}from"./Key.es-l5aSxw0I.js";import{t as E}from"./Link.es-B-IJS4Q5.js";import{t as D}from"./ShieldCheck.es-CscPsYbC.js";import{t as O}from"./Trash.es-BepW9BwV.js";import{t as k}from"./zod-BItJDQBQ.js";import{C as ee,P as A,S as j,T as te,w as ne,x as re}from"./index-BmfaaNx6.js";import{t as M}from"./alert-CSXqgDVi.js";import{t as N}from"./promise-OpBtq8tG.js";import{a as P,i as F,n as I,r as L}from"./passkey-e6uvApHa.js";import{r as R,t as z}from"./standard-schema-o4V-s4uY.js";import{n as B,t as V}from"./modal-BjnpKlXn.js";import{n as ie,r as H}from"./totp-NlqqRp4a.js";function U(e,t){return o(e,l,t)}var W=a(r(),1),G=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M160,36A92.09,92.09,0,0,0,79,84.36,68,68,0,1,0,72,220h88a92,92,0,0,0,0-184Zm0,160H72a44,44,0,0,1-1.82-88A91.86,91.86,0,0,0,68,128a12,12,0,0,0,24,0,68,68,0,1,1,68,68Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,128a80,80,0,0,1-80,80H72A56,56,0,1,1,85.92,97.74l0,.1A80,80,0,0,1,240,128Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M160,40A88.09,88.09,0,0,0,81.29,88.67,64,64,0,1,0,72,216h88a88,88,0,0,0,0-176Zm0,160H72a48,48,0,0,1,0-96c1.1,0,2.2,0,3.29.11A88,88,0,0,0,72,128a8,8,0,0,0,16,0,72,72,0,1,1,72,72Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M160.06,40A88.1,88.1,0,0,0,81.29,88.67h0A87.48,87.48,0,0,0,72,127.73,8.18,8.18,0,0,1,64.57,136,8,8,0,0,1,56,128a103.66,103.66,0,0,1,5.34-32.92,4,4,0,0,0-4.75-5.18A64.09,64.09,0,0,0,8,152c0,35.19,29.75,64,65,64H160a88.09,88.09,0,0,0,87.93-91.48C246.11,77.54,207.07,40,160.06,40Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M160,42A86.11,86.11,0,0,0,82.43,90.88,62,62,0,1,0,72,214h88a86,86,0,0,0,0-172Zm0,160H72a50,50,0,0,1,0-100,50.67,50.67,0,0,1,5.91.35A85.61,85.61,0,0,0,74,128a6,6,0,0,0,12,0,74,74,0,1,1,74,74Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M160,40A88.09,88.09,0,0,0,81.29,88.67,64,64,0,1,0,72,216h88a88,88,0,0,0,0-176Zm0,160H72a48,48,0,0,1,0-96c1.1,0,2.2,0,3.29.11A88,88,0,0,0,72,128a8,8,0,0,0,16,0,72,72,0,1,1,72,72Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M160,44A84.11,84.11,0,0,0,83.59,93.12,60.71,60.71,0,0,0,72,92a60,60,0,0,0,0,120h88a84,84,0,0,0,0-168Zm0,160H72a52,52,0,1,1,8.55-103.3A83.66,83.66,0,0,0,76,128a4,4,0,0,0,8,0,76,76,0,1,1,76,76Z`}))]]),K=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,12H80A28,28,0,0,0,52,40V216a28,28,0,0,0,28,28h96a28,28,0,0,0,28-28V40A28,28,0,0,0,176,12ZM76,76H180V180H76Zm4-40h96a4,4,0,0,1,4,4V52H76V40A4,4,0,0,1,80,36Zm96,184H80a4,4,0,0,1-4-4V204H180v12A4,4,0,0,1,176,220Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,56V200H64V56Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM80,32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,18H80A22,22,0,0,0,58,40V216a22,22,0,0,0,22,22h96a22,22,0,0,0,22-22V40A22,22,0,0,0,176,18ZM70,62H186V194H70ZM80,30h96a10,10,0,0,1,10,10V50H70V40A10,10,0,0,1,80,30Zm96,196H80a10,10,0,0,1-10-10V206H186v10A10,10,0,0,1,176,226Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,20H80A20,20,0,0,0,60,40V216a20,20,0,0,0,20,20h96a20,20,0,0,0,20-20V40A20,20,0,0,0,176,20ZM68,60H188V196H68ZM80,28h96a12,12,0,0,1,12,12V52H68V40A12,12,0,0,1,80,28Zm96,200H80a12,12,0,0,1-12-12V204H188v12A12,12,0,0,1,176,228Z`}))]]),q=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z`}))]]),ae=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M195.8,60.2a28,28,0,0,0-39.51-.09L144.68,72.28a12,12,0,1,1-17.36-16.56L139,43.43l.2-.2a52,52,0,0,1,73.54,73.54l-.2.2-12.29,11.71a12,12,0,0,1-16.56-17.36l12.17-11.61A28,28,0,0,0,195.8,60.2ZM111.32,183.72,99.71,195.89a28,28,0,0,1-39.6-39.6l12.17-11.61a12,12,0,0,0-16.56-17.36L43.43,139l-.2.2a52,52,0,0,0,73.54,73.54l.2-.2,11.71-12.29a12,12,0,1,0-17.36-16.56ZM216,148H192a12,12,0,0,0,0,24h24a12,12,0,0,0,0-24ZM40,108H64a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm120,72a12,12,0,0,0-12,12v24a12,12,0,0,0,24,0V192A12,12,0,0,0,160,180ZM96,76a12,12,0,0,0,12-12V40a12,12,0,0,0-24,0V64A12,12,0,0,0,96,76Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M204.28,108.28l-96,96a40,40,0,0,1-56.56-56.56l96-96a40,40,0,0,1,56.56,56.56Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M198.63,57.37a32,32,0,0,0-45.19-.06L141.79,69.52a8,8,0,0,1-11.58-11l11.72-12.29a1.59,1.59,0,0,1,.13-.13,48,48,0,0,1,67.88,67.88,1.59,1.59,0,0,1-.13.13l-12.29,11.72a8,8,0,0,1-11-11.58l12.21-11.65A32,32,0,0,0,198.63,57.37ZM114.21,186.48l-11.65,12.21a32,32,0,0,1-45.25-45.25l12.21-11.65a8,8,0,0,0-11-11.58L46.19,141.93a1.59,1.59,0,0,0-.13.13,48,48,0,0,0,67.88,67.88,1.59,1.59,0,0,0,.13-.13l11.72-12.29a8,8,0,1,0-11.58-11ZM216,152H192a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16ZM40,104H64a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm120,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V192A8,8,0,0,0,160,184ZM96,72a8,8,0,0,0,8-8V40a8,8,0,0,0-16,0V64A8,8,0,0,0,96,72Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM96,64a8,8,0,0,1,16,0V80a8,8,0,0,1-16,0ZM64,96H80a8,8,0,0,1,0,16H64a8,8,0,0,1,0-16Zm64.08,85.66-7.21,7.21a38,38,0,1,1-53.74-53.74l7.21-7.21a8,8,0,1,1,11.32,11.31l-7.22,7.21a22,22,0,0,0,31.12,31.12l7.21-7.22a8,8,0,1,1,11.31,11.32ZM160,192a8,8,0,0,1-16,0V176a8,8,0,0,1,16,0Zm32-32H176a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm-3.13-39.13-7.21,7.21a8,8,0,1,1-11.32-11.31l7.22-7.21a22,22,0,0,0-31.12-31.12l-7.21,7.22a8,8,0,1,1-11.31-11.32l7.21-7.21a38,38,0,1,1,53.74,53.74Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,56a34,34,0,0,0-48-.05L140.34,68.14a6,6,0,1,1-8.68-8.28l11.71-12.28.1-.11a46,46,0,0,1,65.06,65.06l-.11.1-12.28,11.71a6,6,0,1,1-8.28-8.68L200.09,104A34,34,0,0,0,200,56Zm-84.38,131.9L104,200.09A34,34,0,0,1,55.91,152l12.23-11.67a6,6,0,0,0-8.28-8.68L47.58,143.37l-.11.1a46,46,0,0,0,65.06,65.06l.1-.11,11.71-12.28a6,6,0,1,0-8.68-8.28ZM216,154H192a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12ZM40,102H64a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12Zm120,84a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V192A6,6,0,0,0,160,186ZM96,70a6,6,0,0,0,6-6V40a6,6,0,0,0-12,0V64A6,6,0,0,0,96,70Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M198.63,57.37a32,32,0,0,0-45.19-.06L141.79,69.52a8,8,0,0,1-11.58-11l11.72-12.29a1.59,1.59,0,0,1,.13-.13,48,48,0,0,1,67.88,67.88,1.59,1.59,0,0,1-.13.13l-12.29,11.72a8,8,0,0,1-11-11.58l12.21-11.65A32,32,0,0,0,198.63,57.37ZM114.21,186.48l-11.65,12.21a32,32,0,0,1-45.25-45.25l12.21-11.65a8,8,0,0,0-11-11.58L46.19,141.93a1.59,1.59,0,0,0-.13.13,48,48,0,0,0,67.88,67.88,1.59,1.59,0,0,0,.13-.13l11.72-12.29a8,8,0,1,0-11.58-11ZM216,152H192a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16ZM40,104H64a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm120,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V192A8,8,0,0,0,160,184ZM96,72a8,8,0,0,0,8-8V40a8,8,0,0,0-16,0V64A8,8,0,0,0,96,72Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M201.46,54.54a36.06,36.06,0,0,0-50.92,0L138.89,66.76a4,4,0,0,1-5.78-5.52L144.82,49a44,44,0,1,1,62.29,62.15l-12.35,11.78a4,4,0,0,1-5.52-5.78l12.28-11.72A36,36,0,0,0,201.46,54.54Zm-84.35,134.7-11.65,12.22a36,36,0,0,1-51-50.85l12.28-11.72a4,4,0,0,0-5.52-5.78L48.89,144.89A44,44,0,1,0,111.18,207l11.71-12.28a4,4,0,1,0-5.78-5.52ZM216,156H192a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8ZM40,100H64a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8Zm120,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V192A4,4,0,0,0,160,188ZM96,68a4,4,0,0,0,4-4V40a4,4,0,0,0-8,0V64A4,4,0,0,0,96,68Z`}))]]),oe=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),se=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z`}))]]),J=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:G}));J.displayName=`CloudIcon`;var Y=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:K}));Y.displayName=`DeviceMobileIcon`;var X=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:q}));X.displayName=`GearIcon`;var Z=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:ae}));Z.displayName=`LinkBreakIcon`;var ce=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:oe}));ce.displayName=`PencilSimpleIcon`;var le=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:se}));le.displayName=`SignOutIcon`;var Q=t();function ue({isConfigManaged:e,isDeletionEnabled:t,onDeleteClick:r}){let{t:i}=n();return t?(0,Q.jsxs)(`div`,{className:`rounded-xl border border-base-200 border-l-4 border-l-error/60`,children:[(0,Q.jsxs)(`div`,{className:`border-base-200 border-b px-4 py-3`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(_,{className:`size-4 text-error`,weight:`fill`}),(0,Q.jsx)(`h2`,{className:`font-semibold text-error text-sm`,children:i(`profile.dangerZone.title`)})]}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-base-content/60 text-xs`,children:i(`profile.dangerZone.description`)})]}),(0,Q.jsx)(`div`,{className:`px-4 py-3`,children:(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`p`,{className:`font-medium text-sm`,children:i(`profile.deleteAccount.title`)}),(0,Q.jsx)(`p`,{className:`text-base-content/60 text-xs`,children:i(e?`profile.deleteAccount.configManaged`:`profile.deleteAccount.description`)})]}),(0,Q.jsxs)(`button`,{className:`btn btn-error btn-outline btn-sm gap-2`,"data-testid":`profile-delete-account`,disabled:e,onClick:r,type:`button`,children:[(0,Q.jsx)(O,{className:`size-4`,weight:`bold`}),i(`profile.deleteAccount.button`)]})]})})]}):null}function de({providers:e,unlinkingProvider:t,getAuthorizeUrl:r,onUnlinkRequest:i}){let{t:a}=n();return e.length===0?null:(0,Q.jsxs)(`div`,{className:`rounded-xl border border-base-200`,children:[(0,Q.jsxs)(`div`,{className:`border-base-200 border-b px-4 py-3`,children:[(0,Q.jsx)(`h2`,{className:`font-semibold text-sm`,children:a(`profile.linkedAccounts.title`)}),(0,Q.jsx)(`p`,{className:`text-base-content/60 text-xs`,children:a(`profile.linkedAccounts.description`)})]}),(0,Q.jsx)(`div`,{className:`divide-y divide-base-200`,children:e.map(e=>(0,Q.jsxs)(`div`,{className:`flex items-center justify-between p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Q.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg ${e.linked?`bg-success/10`:`bg-base-200`}`,children:(0,Q.jsx)(E,{className:`size-4 ${e.linked?`text-success`:`text-base-content/50`}`,weight:`regular`})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`font-medium text-sm`,children:e.display_name}),(0,Q.jsx)(`div`,{className:`text-base-content/60 text-xs`,children:e.linked?a(`profile.linkedAccounts.connected`):a(`profile.linkedAccounts.notConnected`)})]})]}),e.linked?(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-error`,disabled:t===e.id,onClick:()=>i(e),type:`button`,children:t===e.id?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),a(`profile.linkedAccounts.unlinking`)]}):a(`profile.linkedAccounts.unlink`)}):(0,Q.jsx)(`a`,{className:`btn btn-ghost btn-xs text-primary`,href:r(e.id,`link`,`/profile`),children:a(`profile.linkedAccounts.link`)})]},e.id))})]})}function fe({passkeyCount:e,onOpenModal:t}){let{t:r}=n();return(0,Q.jsxs)(`div`,{className:`flex items-center justify-between p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Q.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg ${e>0?`bg-success/10`:`bg-base-200`}`,children:(0,Q.jsx)(w,{className:`size-4 ${e>0?`text-success`:`text-base-content/50`}`,weight:`regular`})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`font-medium text-sm`,children:r(`profile.passkey.title`)}),(0,Q.jsx)(`div`,{className:`text-base-content/60 text-xs`,children:e>0?r(`profile.passkey.status.enabled`,{count:e}):r(`profile.passkey.status.disabled`)})]})]}),(0,Q.jsx)(`div`,{className:`flex gap-1`,children:e>0?(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,onClick:()=>t(`manage`),type:`button`,children:r(`profile.passkey.manage`)}):(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,onClick:()=>t(`setup`),type:`button`,children:r(`profile.passkey.add`)})})]})}function pe({hasPassword:e,hasLinkedOAuth:t,isConfigManaged:r,hasSecondFactorOnly:i,onOpenModal:a}){let{t:o}=n();return(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-4 p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,Q.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg ${e?`bg-success/10`:`bg-base-200`}`,children:(0,Q.jsx)(T,{className:`size-4 ${e?`text-success`:`text-base-content/50`}`,weight:`regular`})}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`div`,{className:`font-medium text-sm`,children:o(`profile.password.title`)}),(0,Q.jsx)(`div`,{className:`text-base-content/60 text-xs`,children:o(e?`profile.password.status.set`:`profile.password.status.notSet`)}),r&&(0,Q.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1 text-base-content/40 text-xs`,children:[(0,Q.jsx)(X,{className:`size-3 shrink-0`,weight:`fill`}),(0,Q.jsx)(`span`,{children:o(`profile.password.configManaged`)})]})]})]}),!r&&(0,Q.jsx)(`div`,{className:`flex shrink-0 items-center gap-1`,children:e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,"data-testid":`profile-password-change`,onClick:()=>a(`change`),type:`button`,children:o(`profile.password.change`)}),t?(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-error`,"data-testid":`profile-password-remove`,onClick:()=>a(`remove`),type:`button`,children:o(`profile.password.remove`)}):null,!t&&i&&(0,Q.jsxs)(`div`,{className:`dropdown dropdown-end`,children:[(0,Q.jsx)(`button`,{className:`btn btn-disabled btn-ghost btn-xs cursor-not-allowed text-base-content/30`,type:`button`,children:o(`profile.password.remove`)}),(0,Q.jsx)(`div`,{className:`dropdown-content z-50 w-64 rounded-xl border border-base-200 bg-base-100 p-4 shadow-lg`,children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Q.jsx)(y,{className:`size-4 shrink-0 text-warning`}),(0,Q.jsx)(`div`,{className:`text-xs`,children:o(`profile.password.removeDisabledReason`)})]})})]})]}):(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,"data-testid":`profile-password-set`,onClick:()=>a(`set`),type:`button`,children:o(`profile.password.set`)})})]})}function me({totpEnabled:e,recoveryCodesMissing:t,onOpenModal:r}){let{t:i}=n();return(0,Q.jsxs)(`div`,{className:`flex items-center justify-between p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Q.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg ${e?`bg-success/10`:`bg-base-200`}`,children:(0,Q.jsx)(D,{className:`size-4 ${e?`text-success`:`text-base-content/50`}`,weight:`regular`})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`font-medium text-sm`,children:i(`profile.totp.title`)}),(0,Q.jsx)(`div`,{className:`text-base-content/60 text-xs`,children:i(e?t?`profile.totp.status.recoveryCodesMissing`:`profile.totp.status.enabled`:`profile.totp.status.disabled`)})]})]}),(0,Q.jsx)(`div`,{className:`flex flex-wrap justify-end gap-1`,children:e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,"data-testid":`profile-totp-regenerate`,onClick:()=>r(`regenerate`),type:`button`,children:i(`profile.totp.regenerate`)}),(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-error`,"data-testid":`profile-totp-disable`,onClick:()=>r(`disable`),type:`button`,children:i(`profile.totp.disable`)})]}):(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,"data-testid":`profile-totp-enable`,onClick:()=>r(`setup`),type:`button`,children:i(`profile.totp.enable`)})})]})}var he={error:`bg-error/10 text-error`,warning:`bg-warning/10 text-warning`,info:`bg-info/10 text-info`},ge={error:A,warning:_,info:y};function $({variant:e,children:t}){let n=ge[e];return(0,Q.jsxs)(`div`,{className:`flex items-start gap-3 rounded-lg p-3 ${he[e]}`,"data-testid":`alert-banner-${e}`,children:[(0,Q.jsx)(n,{className:`mt-0.5 size-5 shrink-0`,weight:`fill`}),(0,Q.jsx)(`div`,{className:`min-w-0 flex-1 text-sm`,children:t})]})}function _e({isOpen:e,onClose:t,providerName:r,isPending:i,onConfirm:a}){let{t:o}=n(),[s,c]=(0,W.useState)(null),l=()=>{i||(c(null),t())};return(0,Q.jsx)(V,{description:o(`profile.linkedAccounts.unlinkModal.description`,{provider:r}),icon:Z,isOpen:e,onClose:l,preventClose:i,title:o(`profile.linkedAccounts.unlinkModal.title`),variant:`destructive`,children:(0,Q.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,Q.jsx)($,{variant:`warning`,children:o(`profile.linkedAccounts.unlinkModal.warning`,{provider:r})}),s&&(0,Q.jsx)($,{variant:`error`,children:s}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`unlink-oauth-cancel`,disabled:i,onClick:l,type:`button`,children:o(`profile.linkedAccounts.unlinkModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-error`,"data-testid":`unlink-oauth-unlink`,disabled:i,onClick:async()=>{c(null);try{await a(),l()}catch{c(o(`profile.linkedAccounts.unlinkError`))}},type:`button`,children:i?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),o(`profile.linkedAccounts.unlinking`)]}):o(`profile.linkedAccounts.unlink`)})]})]})})}function ve({user:e}){let{t}=n();return(0,Q.jsxs)(`div`,{className:`rounded-xl border border-base-200`,children:[(0,Q.jsxs)(`div`,{className:`border-base-200 border-b px-4 py-3`,children:[(0,Q.jsx)(`h2`,{className:`font-semibold text-sm`,children:t(`profile.account.title`)}),(0,Q.jsx)(`p`,{className:`text-base-content/60 text-xs`,children:t(`profile.account.description`)})]}),(0,Q.jsxs)(`div`,{className:`divide-y divide-base-200`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-4 py-3`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-base-content/60 text-xs`,children:t(`profile.id.label`)}),(0,Q.jsx)(`span`,{className:`truncate font-medium text-sm`,children:e.sub})]}),(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-4 py-3`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-base-content/60 text-xs`,children:t(`profile.email.label`)}),(0,Q.jsx)(`span`,{className:`truncate font-medium text-sm`,children:e.email})]})]})]})}var ye={sm:`size-8 text-sm`,md:`size-12 text-xl`,lg:`size-16 text-2xl`};function be({email:e,size:t=`md`}){let n=e.charAt(0).toUpperCase();return(0,Q.jsx)(`div`,{className:`flex shrink-0 items-center justify-center rounded-full bg-primary font-bold text-primary-content ${ye[t]}`,children:n})}var xe=g({mutationFn:async e=>c(await d.api.user.password.$post({json:e}))}),Se=g({mutationFn:async e=>c(await d.api.user.password.$put({json:e}))}),Ce=g({mutationFn:async e=>c(await d.api.user.password.$delete({json:e}))});function we({isOpen:t,onClose:r}){let{t:i}=n(),a=m(),{data:o}=s(f),c=o.auth.password.policy,l=R({resolver:z((0,W.useMemo)(()=>k.object({currentPassword:k.string().min(1,i(`validation.password.required`)),newPassword:k.string().min(c.min_length,i(`validation.password.min`,{count:c.min_length})).max(c.max_length,i(`validation.password.max`,{count:c.max_length})),confirmPassword:k.string()}).refine(e=>e.newPassword===e.confirmPassword,{message:i(`validation.confirmPassword.mismatch`),path:[`confirmPassword`]}),[c.max_length,c.min_length,i])),defaultValues:{currentPassword:``,newPassword:``,confirmPassword:``}}),u=h({...Se,onSuccess:()=>{a.invalidateQueries({queryKey:j.queryKey}),d()}}),d=()=>{l.reset(),r()},p=l.handleSubmit(async t=>{try{await u.mutateAsync({current_password:t.currentPassword,new_password:t.newPassword})}catch(t){t instanceof e&&t.code===`INVALID_CURRENT_PASSWORD`?l.setError(`currentPassword`,{message:i(`profile.password.changeModal.invalidCurrent`)}):l.setError(`root`,{message:i(`profile.password.changeModal.error`)})}});return(0,Q.jsx)(V,{description:i(`profile.password.changeModal.description`),icon:T,isOpen:t,onClose:d,title:i(`profile.password.changeModal.title`),children:(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:p,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`current-password`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.password.changeModal.currentPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${l.formState.errors.currentPassword?`input-error`:``}`,id:`current-password`,placeholder:i(`profile.password.changeModal.currentPasswordPlaceholder`),type:`password`,...l.register(`currentPassword`)}),l.formState.errors.currentPassword&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`change-password-error-currentPassword`,children:l.formState.errors.currentPassword.message})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`new-password-change`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.password.changeModal.newPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${l.formState.errors.newPassword?`input-error`:``}`,id:`new-password-change`,placeholder:i(`profile.password.changeModal.newPasswordPlaceholder`),type:`password`,...l.register(`newPassword`)}),l.formState.errors.newPassword&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`change-password-error-newPassword`,children:l.formState.errors.newPassword.message})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`confirm-password-change`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.password.changeModal.confirmPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${l.formState.errors.confirmPassword?`input-error`:``}`,id:`confirm-password-change`,placeholder:i(`profile.password.changeModal.confirmPasswordPlaceholder`),type:`password`,...l.register(`confirmPassword`)}),l.formState.errors.confirmPassword&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`change-password-error-confirmPassword`,children:l.formState.errors.confirmPassword.message})]}),l.formState.errors.root&&(0,Q.jsx)($,{variant:`error`,children:l.formState.errors.root.message}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`change-password-cancel`,disabled:u.isPending,onClick:d,type:`button`,children:i(`profile.password.changeModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary`,"data-testid":`change-password-submit`,disabled:u.isPending,type:`submit`,children:u.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),i(`profile.password.changeModal.submitting`)]}):i(`profile.password.changeModal.submit`)})]})]})})}var Te=g({mutationFn:async()=>c(await d.api.user.$delete())});function Ee({isOpen:e,onClose:t,retentionDays:r}){let{t:i}=n(),a=u(),o=m(),s=R({resolver:z((0,W.useMemo)(()=>k.object({confirmation:k.string().refine(e=>e.toLowerCase()===i(`profile.deleteAccount.modal.confirmPlaceholder`).toLowerCase(),{message:i(`validation.confirmText.mismatch`)})}),[i])),defaultValues:{confirmation:``}}),c=h({...Te,onSuccess:async()=>{o.setQueryData(j.queryKey,{user:null}),await N(),a.navigate({to:`/login`})}}),l=()=>{c.isPending||(s.reset(),t())},d=s.handleSubmit(async()=>{try{await c.mutateAsync()}catch{s.setError(`root`,{message:i(`profile.deleteAccount.error`)})}});return(0,Q.jsx)(V,{icon:O,isOpen:e,onClose:l,preventClose:c.isPending,title:i(`profile.deleteAccount.modal.title`),variant:`destructive`,children:(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:d,children:[(0,Q.jsxs)($,{variant:`error`,children:[(0,Q.jsx)(`p`,{children:i(`profile.deleteAccount.modal.description`,{days:r})}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs opacity-80`,children:i(`profile.deleteAccount.modal.warning`)})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`delete-confirmation`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.deleteAccount.modal.confirmLabel`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${s.formState.errors.confirmation?`input-error`:``}`,id:`delete-confirmation`,placeholder:i(`profile.deleteAccount.modal.confirmPlaceholder`),type:`text`,...s.register(`confirmation`),autoComplete:`off`}),s.formState.errors.confirmation&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`delete-account-error`,children:s.formState.errors.confirmation.message})]}),s.formState.errors.root&&(0,Q.jsx)($,{variant:`error`,children:s.formState.errors.root.message}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`delete-account-cancel`,disabled:c.isPending,onClick:l,type:`button`,children:i(`profile.deleteAccount.modal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-error`,"data-testid":`delete-account-submit`,disabled:c.isPending,type:`submit`,children:c.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),i(`profile.deleteAccount.modal.confirming`)]}):i(`profile.deleteAccount.modal.confirm`)})]})]})})}function De({isOpen:t,onClose:r}){let{t:i}=n(),a=m(),o=R({resolver:z((0,W.useMemo)(()=>k.object({code:k.string().length(6,i(`validation.totp.length`)).regex(/^\d{6}$/,i(`validation.totp.digits`))}),[i])),defaultValues:{code:``}}),s=h({...ie,onSuccess:()=>{a.invalidateQueries({queryKey:j.queryKey}),c()}}),c=()=>{o.reset(),r()},l=o.handleSubmit(async t=>{try{await s.mutateAsync({code:t.code})}catch(t){if(t instanceof e&&t.code===`CANNOT_REMOVE_LAST_SECOND_FACTOR`){o.setError(`code`,{message:i(`profile.totp.disableModal.cannotRemoveLastSecondFactor`)});return}o.setError(`code`,{message:i(`profile.totp.disableModal.error`)})}});return(0,Q.jsx)(V,{description:i(`profile.totp.disableModal.description`),icon:D,isOpen:t,onClose:c,title:i(`profile.totp.disableModal.title`),variant:`destructive`,children:(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:l,children:[(0,Q.jsx)($,{variant:`warning`,children:i(`profile.totp.disableModal.warning`)}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`disable-totp-code`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.totp.disableModal.codeLabel`)})}),(0,Q.jsx)(`input`,{autoComplete:`one-time-code`,className:`input input-bordered input-sm w-full text-center text-xl tracking-widest ${o.formState.errors.code?`input-error`:``}`,id:`disable-totp-code`,inputMode:`numeric`,maxLength:6,pattern:`[0-9]*`,placeholder:`000000`,type:`text`,...o.register(`code`)}),o.formState.errors.code&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`disable-totp-error`,children:o.formState.errors.code.message})]}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`disable-totp-cancel`,disabled:s.isPending,onClick:c,type:`button`,children:i(`profile.totp.disableModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-error`,"data-testid":`disable-totp-submit`,disabled:s.isPending,type:`submit`,children:s.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),i(`profile.totp.disableModal.disabling`)]}):i(`profile.totp.disableModal.disable`)})]})]})})}function Oe({isOpen:t,onClose:r,onAddNew:i}){let{t:a}=n(),o=m(),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[g,_]=(0,W.useState)(null),{data:v,isLoading:y}=U({...L,enabled:t}),b=h({...I,onSuccess:()=>{o.invalidateQueries({queryKey:p.passkeys()}),o.invalidateQueries({queryKey:j.queryKey})},onSettled:()=>{u(null)}}),x=(0,W.useCallback)(()=>{c(null),u(null),f(null),_(null),r()},[r]),S=e=>{f(e.id),_(null)},C=()=>{f(null),_(null)},T=async t=>{u(t.id),f(null);try{await b.mutateAsync({id:t.id})}catch(t){if(t instanceof e&&t.code===`CANNOT_REMOVE_LAST_SECOND_FACTOR`){_(a(`profile.passkey.manageModal.cannotRemoveLastSecondFactor`));return}_(a(`profile.passkey.manageModal.deleteError`))}},E=e=>new Date(e).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`}),D=v?.passkeys||[];return(0,Q.jsxs)(V,{icon:w,isOpen:t,onClose:x,size:`lg`,title:a(`profile.passkey.manageModal.title`),children:[(0,Q.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[g&&(0,Q.jsx)($,{variant:`error`,children:g}),y&&(0,Q.jsx)(`div`,{className:`flex justify-center py-6`,children:(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-md`})}),!y&&D.length===0&&(0,Q.jsx)(`div`,{className:`py-6 text-center text-base-content/60 text-sm`,"data-testid":`passkeys-empty`,children:(0,Q.jsx)(`p`,{children:a(`profile.passkey.manageModal.noPasskeys`)})}),!y&&D.length>0&&(0,Q.jsx)(`div`,{className:`flex flex-col gap-2`,children:D.map(e=>(0,Q.jsx)(ke,{formatDate:E,isConfirmingDelete:d===e.id,isDeleting:l===e.id,isEditing:s?.id===e.id,onCancelDelete:C,onCancelEdit:()=>c(null),onConfirmDelete:()=>T(e),onEdit:()=>c(e),onRequestDelete:()=>S(e),passkey:e},e.id))})]}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`manage-passkeys-close`,onClick:x,type:`button`,children:a(`profile.passkey.manageModal.close`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary`,"data-testid":`manage-passkeys-add-new`,onClick:()=>{x(),i()},type:`button`,children:a(`profile.passkey.manageModal.addNew`)})]})]})}function ke({passkey:e,isDeleting:t,isEditing:r,isConfirmingDelete:i,onEdit:a,onCancelEdit:o,onRequestDelete:s,onConfirmDelete:c,onCancelDelete:l,formatDate:u}){let{t:d}=n(),f=m(),g=R({resolver:z((0,W.useMemo)(()=>k.object({name:k.string().min(1,d(`validation.passkey.name.required`)).max(100,d(`validation.passkey.name.max`))}),[d])),defaultValues:{name:e.name||``}}),_=h({...P,onSuccess:()=>{f.invalidateQueries({queryKey:p.passkeys()}),o()}}),v=g.handleSubmit(async t=>{try{await _.mutateAsync({id:e.id,name:t.name})}catch{g.setError(`name`,{message:d(`profile.passkey.manageModal.renameError`)})}});return r?(0,Q.jsxs)(`form`,{className:`flex flex-col gap-1.5 rounded-lg bg-base-200 p-2`,onSubmit:v,children:[(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${g.formState.errors.name?`input-error`:``}`,"data-testid":`passkey-rename-input`,placeholder:d(`profile.passkey.manageModal.namePlaceholder`),type:`text`,...g.register(`name`)}),g.formState.errors.name&&(0,Q.jsx)(`span`,{className:`text-error text-xs`,"data-testid":`passkey-rename-error`,children:g.formState.errors.name.message}),(0,Q.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs`,disabled:_.isPending,onClick:()=>{g.reset(),o()},type:`button`,children:d(`profile.passkey.manageModal.cancelEdit`)}),(0,Q.jsx)(`button`,{className:`btn btn-primary btn-xs`,disabled:_.isPending,type:`submit`,children:_.isPending?d(`profile.passkey.manageModal.saving`):d(`profile.passkey.manageModal.save`)})]})]}):i?(0,Q.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg bg-error/10 p-2`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(O,{className:`size-4 text-error`,weight:`regular`}),(0,Q.jsx)(`span`,{className:`text-error text-xs`,children:d(`profile.passkey.manageModal.deleteConfirmInline`)})]}),(0,Q.jsxs)(`div`,{className:`flex gap-1`,children:[(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs`,onClick:l,type:`button`,children:d(`profile.passkey.manageModal.cancelEdit`)}),(0,Q.jsx)(`button`,{className:`btn btn-error btn-xs`,onClick:c,type:`button`,children:d(`profile.passkey.manageModal.delete`)})]})]}):(0,Q.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg bg-base-200 p-2`,"data-testid":`passkey-item`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.device_type===`multiDevice`?(0,Q.jsx)(J,{className:`size-4 text-primary`,weight:`regular`}):(0,Q.jsx)(Y,{className:`size-4 text-primary`,weight:`regular`}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`font-medium text-xs`,children:e.name||d(`profile.passkey.manageModal.unnamedPasskey`)}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5 text-base-content/60 text-xs`,children:[(0,Q.jsx)(`span`,{children:d(`profile.passkey.manageModal.createdAt`,{date:u(e.created_at)})}),e.backed_up&&(0,Q.jsx)(`span`,{className:`badge badge-success badge-xs`,children:d(`profile.passkey.manageModal.backedUp`)})]})]})]}),(0,Q.jsxs)(`div`,{className:`flex gap-1`,children:[(0,Q.jsx)(`button`,{"aria-label":d(`profile.passkey.manageModal.rename`),className:`btn btn-ghost btn-xs`,onClick:a,type:`button`,children:(0,Q.jsx)(ce,{className:`size-3.5`,weight:`regular`})}),(0,Q.jsx)(`button`,{"aria-label":d(`profile.passkey.manageModal.delete`),className:`btn btn-ghost btn-xs text-error`,disabled:t,onClick:s,type:`button`,children:t?(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}):(0,Q.jsx)(O,{className:`size-3.5`,weight:`regular`})})]})]})}function Ae({isOpen:t,onClose:r}){let{t:i}=n(),a=u(),o=m(),{data:c}=s(f),[l,d]=(0,W.useState)(`verify`),[p,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(null),y=h({...H,onSuccess:async e=>{g(e),d(`recovery`),await o.invalidateQueries({queryKey:j.queryKey})}}),x=(0,W.useCallback)(()=>{d(`verify`),g(null),v(null),y.reset()},[y]),C=(0,W.useCallback)(()=>{x(),r()},[r,x]),w=(0,W.useCallback)(async t=>{v(null);try{await y.mutateAsync({code:t})}catch(t){if(t instanceof e){if(t.code===`INVALID_TOTP_CODE`)throw t;if(t.code===`UNAUTHORIZED`){o.setQueryData(j.queryKey,{user:null}),await N(),a.navigate({to:`/login`});return}if(t.code===`TOTP_NOT_ENABLED`||t.code===`VALIDATION_ERROR`){await o.invalidateQueries({queryKey:j.queryKey}),C();return}}v(i(`profile.totp.regenerateModal.unexpectedError`))}},[C,y,o,a,i]);return c.auth.password.totp.enabled?(0,Q.jsx)(V,{description:i(l===`verify`?`profile.totp.regenerateModal.description`:`profile.totp.regenerateModal.recoveryDescription`),icon:D,isOpen:t,onClose:C,preventClose:l===`recovery`,size:`sm`,title:i(l===`verify`?`profile.totp.regenerateModal.title`:`profile.totp.regenerateModal.recoveryTitle`),children:l===`verify`?(0,Q.jsxs)(`div`,{className:`mt-4`,children:[_&&(0,Q.jsx)(`div`,{className:`mb-3`,children:(0,Q.jsx)($,{variant:`error`,children:_})}),(0,Q.jsx)(S,{invalidMessage:i(`profile.totp.regenerateModal.error`),isPending:y.isPending,onSubmit:w,pendingText:i(`profile.totp.regenerateModal.submitting`),submitLabel:i(`profile.totp.regenerateModal.submit`)})]}):(0,Q.jsx)(`div`,{className:`mt-4`,children:(0,Q.jsx)(b,{onConfirm:C,recoveryCodes:p?.recovery_codes??[]})})}):null}function je({isOpen:t,onClose:r}){let{t:i}=n(),a=m(),o=R({resolver:z((0,W.useMemo)(()=>k.object({currentPassword:k.string().min(1,i(`validation.password.required`))}),[i])),defaultValues:{currentPassword:``}}),s=h({...Ce,onSuccess:()=>{a.invalidateQueries({queryKey:j.queryKey}),c()}}),c=()=>{o.reset(),r()},l=o.handleSubmit(async t=>{try{await s.mutateAsync({current_password:t.currentPassword})}catch(t){if(t instanceof e){if(t.code===`INVALID_CURRENT_PASSWORD`){o.setError(`currentPassword`,{message:i(`profile.password.removeModal.invalidCurrent`)});return}if(t.code===`CANNOT_REMOVE_LAST_AUTH_METHOD`){o.setError(`root`,{message:i(`profile.password.removeModal.noOAuth`)});return}if(t.code===`CANNOT_REMOVE_PASSWORD_WITH_SECOND_FACTOR_ONLY`){o.setError(`root`,{message:i(`profile.password.removeModal.noOAuthWith2FA`)});return}}o.setError(`root`,{message:i(`profile.password.removeModal.error`)})}});return(0,Q.jsx)(V,{description:i(`profile.password.removeModal.description`),icon:T,isOpen:t,onClose:c,title:i(`profile.password.removeModal.title`),variant:`destructive`,children:(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:l,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`current-password-remove`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.password.removeModal.currentPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${o.formState.errors.currentPassword?`input-error`:``}`,id:`current-password-remove`,placeholder:i(`profile.password.removeModal.currentPasswordPlaceholder`),type:`password`,...o.register(`currentPassword`)}),o.formState.errors.currentPassword&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`remove-password-error`,children:o.formState.errors.currentPassword.message})]}),o.formState.errors.root&&(0,Q.jsx)($,{variant:`error`,children:o.formState.errors.root.message}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`remove-password-cancel`,disabled:s.isPending,onClick:c,type:`button`,children:i(`profile.password.removeModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-error`,"data-testid":`remove-password-submit`,disabled:s.isPending,type:`submit`,children:s.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),i(`profile.password.removeModal.submitting`)]}):i(`profile.password.removeModal.submit`)})]})]})})}function Me({isOpen:e,onClose:t}){let{t:r}=n(),i=m(),{data:a}=s(f),o=a.auth.password.policy,c=R({resolver:z((0,W.useMemo)(()=>k.object({password:k.string().min(o.min_length,r(`validation.password.min`,{count:o.min_length})).max(o.max_length,r(`validation.password.max`,{count:o.max_length})),confirmPassword:k.string()}).refine(e=>e.password===e.confirmPassword,{message:r(`validation.confirmPassword.mismatch`),path:[`confirmPassword`]}),[o.max_length,o.min_length,r])),defaultValues:{password:``,confirmPassword:``}}),l=h({...xe,onSuccess:()=>{i.invalidateQueries({queryKey:j.queryKey}),u()}}),u=()=>{c.reset(),t()},d=c.handleSubmit(async e=>{try{await l.mutateAsync({password:e.password})}catch{c.setError(`root`,{message:r(`profile.password.setModal.error`)})}});return(0,Q.jsx)(V,{description:r(`profile.password.setModal.description`),icon:T,isOpen:e,onClose:u,title:r(`profile.password.setModal.title`),children:(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:d,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`new-password`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:r(`profile.password.setModal.newPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${c.formState.errors.password?`input-error`:``}`,id:`new-password`,placeholder:r(`profile.password.setModal.newPasswordPlaceholder`),type:`password`,...c.register(`password`)}),c.formState.errors.password&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`set-password-error-password`,children:c.formState.errors.password.message})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`confirm-password`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:r(`profile.password.setModal.confirmPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${c.formState.errors.confirmPassword?`input-error`:``}`,id:`confirm-password`,placeholder:r(`profile.password.setModal.confirmPasswordPlaceholder`),type:`password`,...c.register(`confirmPassword`)}),c.formState.errors.confirmPassword&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`set-password-error-confirmPassword`,children:c.formState.errors.confirmPassword.message})]}),c.formState.errors.root&&(0,Q.jsx)($,{variant:`error`,children:c.formState.errors.root.message}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`set-password-cancel`,disabled:l.isPending,onClick:u,type:`button`,children:r(`profile.password.setModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary`,"data-testid":`set-password-submit`,disabled:l.isPending,type:`submit`,children:l.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),r(`profile.password.setModal.submitting`)]}):r(`profile.password.setModal.submit`)})]})]})})}function Ne({isOpen:e,onClose:t,isRequired:r=!1,canSwitchToTotp:i=!1,onSwitchToTotp:a}){let{t:o}=n(),s=m(),[c,l]=(0,W.useState)(`name`),[u,d]=(0,W.useState)(null),f=R({resolver:z((0,W.useMemo)(()=>k.object({name:k.string().max(100,o(`validation.passkey.name.max`)).optional().transform(e=>e?.trim()||void 0)}),[o])),defaultValues:{name:``}}),g=h({...F,onSuccess:()=>{s.invalidateQueries({queryKey:p.passkeys()}),s.invalidateQueries({queryKey:j.queryKey}),_()},onError:e=>{l(`name`),e.name===`NotAllowedError`?d(o(`profile.passkey.setupModal.cancelled`)):d(o(`profile.passkey.setupModal.error`))}}),_=(0,W.useCallback)(()=>{f.reset(),l(`name`),d(null),t()},[f,t]),v=f.handleSubmit(async e=>{l(`register`),d(null);try{await g.mutateAsync({name:e.name})}catch{}}),y=g.isPending;return(0,Q.jsxs)(V,{description:r?o(`profile.passkey.setupModal.requiredDescription`):void 0,icon:w,isOpen:e,onClose:_,preventClose:r,size:`sm`,title:o(`profile.passkey.setupModal.title`),children:[c===`name`&&(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:v,children:[(0,Q.jsx)(`p`,{className:`text-base-content/60 text-xs`,children:o(`profile.passkey.setupModal.description`)}),u&&(0,Q.jsx)($,{variant:`error`,children:u}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`passkey-name`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:o(`profile.passkey.setupModal.nameLabel`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${f.formState.errors.name?`input-error`:``}`,id:`passkey-name`,placeholder:o(`profile.passkey.setupModal.namePlaceholder`),type:`text`,...f.register(`name`)}),f.formState.errors.name&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`setup-passkey-error`,children:f.formState.errors.name.message}),(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-base-content/50`,children:o(`profile.passkey.setupModal.nameHint`)})]}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`setup-passkey-cancel`,onClick:_,type:`button`,children:o(`profile.passkey.setupModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary`,"data-testid":`setup-passkey-continue`,type:`submit`,children:o(`profile.passkey.setupModal.continue`)})]}),i&&a&&(0,Q.jsx)(`p`,{className:`mt-2 text-center text-xs`,children:(0,Q.jsx)(`button`,{className:`link link-primary`,onClick:a,type:`button`,children:o(`profile.passkey.setupModal.switchToTotp`)})})]}),c===`register`&&(0,Q.jsxs)(`div`,{className:`mt-4`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6`,"data-testid":`setup-passkey-loading`,children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-md`}),(0,Q.jsx)(`p`,{className:`text-center text-base-content/60 text-xs`,children:o(`profile.passkey.setupModal.waitingForDevice`)})]}),(0,Q.jsx)(B,{children:(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`setup-passkey-cancel`,disabled:y,onClick:_,type:`button`,children:o(`profile.passkey.setupModal.cancel`)})})]})]})}function Pe({isOpen:e,onClose:t,isRequired:r=!1,canSwitchToPasskey:i=!1,onSwitchToPasskey:a}){let{t:o}=n(),{step:s,setupData:c,recoveryCodes:l,isSetupPending:u,isVerifyPending:d,isConfirmPending:f,startSetup:p,verify:m,goToVerify:h,goToQr:g,confirmRecoveryCodes:_,reset:v}=C({autoStart:!1,onConfirmSuccess:()=>{v(),t()}}),y=(0,W.useCallback)(()=>{v(),t()},[t,v]),w=(0,W.useCallback)(()=>{!c&&!u&&p()},[c,u,p]);e&&!c&&!u&&s!==`error`&&w();let T=(0,W.useCallback)(async e=>{await m(e)},[m]),E=o(s===`recovery`?`setupTotp.recoveryCodes.title`:`profile.totp.setupModal.title`);return(0,Q.jsxs)(V,{description:r?o(`profile.totp.setupModal.requiredDescription`):void 0,icon:D,isOpen:e,onClose:y,preventClose:r||s===`recovery`,size:`sm`,title:E,children:[u&&(0,Q.jsx)(`div`,{className:`flex justify-center py-6`,"data-testid":`setup-totp-loading`,children:(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-md`})}),s===`error`&&(0,Q.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,Q.jsx)($,{variant:`error`,children:o(`profile.totp.setupModal.setupError`)}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,onClick:y,type:`button`,children:o(`profile.totp.setupModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary`,onClick:p,type:`button`,children:o(`profile.totp.setupModal.retry`)})]})]}),c&&s===`qr`&&(0,Q.jsx)(`div`,{className:`mt-4`,children:(0,Q.jsx)(x,{additionalActions:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(B,{children:(0,Q.jsx)(`button`,{className:`btn btn-sm`,onClick:y,type:`button`,children:o(`profile.totp.setupModal.cancel`)})}),i&&a&&(0,Q.jsx)(`p`,{className:`mt-2 text-center text-xs`,children:(0,Q.jsx)(`button`,{className:`link link-primary`,onClick:a,type:`button`,children:o(`profile.totp.setupModal.switchToPasskey`)})})]}),onNext:h,setupData:c})}),c&&s===`verify`&&(0,Q.jsx)(`div`,{className:`mt-4`,children:(0,Q.jsx)(S,{isPending:d,onBack:g,onSubmit:T})}),s===`recovery`&&l.length>0&&(0,Q.jsx)(`div`,{className:`mt-4`,children:(0,Q.jsx)(b,{isLoading:f,onConfirm:_,recoveryCodes:l})})]})}var Fe=g({mutationFn:async()=>c(await d.api.auth.logout.$post())}),Ie={access_denied:`oauth.error.accessDenied`,temporarily_unavailable:`oauth.error.temporarilyUnavailable`,server_error:`oauth.error.serverError`};function Le(){let{t:e}=n(),t=u(),r=m(),i=re.useSearch().oauth_error,a=i?e(Ie[i]??`oauth.error.failed`):void 0,[o,c]=(0,W.useState)(null),[l,d]=(0,W.useState)(null),[p,g]=(0,W.useState)(null),[_,y]=(0,W.useState)(null),[b,x]=(0,W.useState)(null),[S,C]=(0,W.useState)(!1),{data:w}=s(j),{data:T}=s(ne),{data:E}=s(f),D=h({...Fe,onSuccess:async()=>{r.setQueryData(j.queryKey,{user:null}),await N(),t.navigate({to:`/login`})},onSettled:()=>{r.invalidateQueries({queryKey:j.queryKey})}}),O=h({...te,onSuccess:()=>{r.invalidateQueries({queryKey:ne.queryKey})},onSettled:()=>{c(null)}}),k=async()=>{l&&(c(l.id),await O.mutateAsync(l.id))};if(!w.user)return null;let P=w.user,F=T.available_providers,I=F.some(e=>e.linked),L=P.managed_by===`config`,R=E.auth.password,z=E.auth.passkey,B=R.totp.enabled,V=z.enabled,ie=E.account_deletion.enabled,H=E.account_deletion.retention,U=(()=>{let e=H.match(/^(\d+)([dmy])$/);if(!e)return 30;let t=parseInt(e[1],10);switch(e[2]){case`d`:return t;case`m`:return t*30;case`y`:return t*365;default:return 30}})(),G=!L&&B,K=!L&&V,q=F.length>0;return(0,Q.jsxs)(v,{maxWidth:`xl`,responsivePadding:!0,children:[(0,Q.jsx)(`div`,{className:`border-base-200 border-b p-6`,children:(0,Q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Q.jsx)(be,{email:P.email,size:`lg`}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`h1`,{className:`font-bold text-xl`,children:e(`profile.title`)}),(0,Q.jsx)(`p`,{className:`truncate text-base-content/70 text-sm`,"data-testid":`profile-user-email`,children:P.email})]})]}),(0,Q.jsxs)(`button`,{className:`btn btn-ghost btn-sm gap-2`,"data-testid":`profile-logout`,disabled:D.isPending,onClick:()=>D.mutate(),type:`button`,children:[D.isPending?(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-sm`}):(0,Q.jsx)(le,{className:`size-4`,weight:`bold`}),(0,Q.jsx)(`span`,{className:`hidden sm:inline`,children:e(`profile.logout`)})]})]})}),a&&(0,Q.jsx)(`div`,{className:`px-6 pt-4`,children:(0,Q.jsx)(M,{icon:A,type:`error`,children:a})}),(0,Q.jsxs)(`div`,{className:`space-y-5 p-6`,children:[P&&(0,Q.jsx)(ve,{user:P}),(0,Q.jsxs)(`div`,{className:`rounded-xl border border-base-200`,children:[(0,Q.jsxs)(`div`,{className:`border-base-200 border-b px-4 py-3`,children:[(0,Q.jsx)(`h2`,{className:`font-semibold text-sm`,children:e(`profile.security.title`)}),(0,Q.jsx)(`p`,{className:`text-base-content/60 text-xs`,children:e(`profile.security.description`)})]}),G&&P.totp_recovery_codes_missing&&(0,Q.jsx)(`div`,{className:`border-base-200 border-b px-4 py-3`,"data-testid":`profile-totp-recovery-warning`,children:(0,Q.jsx)(M,{icon:A,type:`warning`,children:e(`profile.totp.recoveryCodesMissing`)})}),(0,Q.jsxs)(`div`,{className:`divide-y divide-base-200`,children:[(0,Q.jsx)(pe,{hasLinkedOAuth:I,hasPassword:P.has_password,hasSecondFactorOnly:P.has_password&&!I&&(P.totp_registered||P.passkey_count>0),isConfigManaged:L,onOpenModal:g}),G&&(0,Q.jsx)(me,{onOpenModal:y,recoveryCodesMissing:P.totp_recovery_codes_missing,totpEnabled:P.totp_registered}),K&&(0,Q.jsx)(fe,{onOpenModal:x,passkeyCount:P.passkey_count})]})]}),q&&(0,Q.jsx)(de,{getAuthorizeUrl:ee,onUnlinkRequest:e=>d({id:e.id,name:e.display_name}),providers:F,unlinkingProvider:o}),(0,Q.jsx)(ue,{isConfigManaged:L,isDeletionEnabled:ie,onDeleteClick:()=>C(!0)})]}),(0,Q.jsx)(Me,{isOpen:p===`set`,onClose:()=>g(null)}),(0,Q.jsx)(we,{isOpen:p===`change`,onClose:()=>g(null)}),(0,Q.jsx)(je,{isOpen:p===`remove`,onClose:()=>g(null)}),(0,Q.jsx)(Pe,{isOpen:_===`setup`,onClose:()=>y(null)}),(0,Q.jsx)(De,{isOpen:_===`disable`,onClose:()=>y(null)}),(0,Q.jsx)(Ae,{isOpen:_===`regenerate`,onClose:()=>y(null)}),(0,Q.jsx)(Ne,{isOpen:b===`setup`,onClose:()=>x(null)}),(0,Q.jsx)(Oe,{isOpen:b===`manage`,onAddNew:()=>x(`setup`),onClose:()=>x(null)}),(0,Q.jsx)(_e,{isOpen:l!==null,isPending:O.isPending,onClose:()=>d(null),onConfirm:k,providerName:l?.name??``}),(0,Q.jsx)(Ee,{isOpen:S,onClose:()=>C(!1),retentionDays:U})]})}export{Le as component};
|
|
2
|
-
//# sourceMappingURL=profile-
|
|
1
|
+
import{n as e,o as t,r as n,s as r,t as i,u as a}from"./IconBase.es-d5KP98Ac.js";import{$ as o,Q as s,a as c,dt as l,h as u,i as d,n as f,r as p,ut as m}from"./use-theme-cVUDAjtt.js";import{t as h}from"./useMutation-Biy2-pH_.js";import{t as g}from"./mutationOptions-Dfvzj6n2.js";import{t as _}from"./Warning.es-BPpZIJYZ.js";import{t as v}from"./page-layout-C475gs09.js";import{a as y,i as b,n as x,r as S,t as C}from"./use-totp-setup-Z96pOMXt.js";import{t as w}from"./Fingerprint.es-CW755VWD.js";import{t as T}from"./Key.es-l5aSxw0I.js";import{t as E}from"./Link.es-B-IJS4Q5.js";import{t as D}from"./ShieldCheck.es-CscPsYbC.js";import{t as O}from"./Trash.es-BepW9BwV.js";import{t as k}from"./zod-BItJDQBQ.js";import{C as ee,F as A,S as j,T as te,w as ne,x as re}from"./index-CgkA6nnx.js";import{t as M}from"./alert-CSXqgDVi.js";import{t as N}from"./promise-OpBtq8tG.js";import{a as P,i as F,n as I,r as L}from"./passkey-e6uvApHa.js";import{r as R,t as z}from"./standard-schema-o4V-s4uY.js";import{n as B,t as V}from"./modal-BjnpKlXn.js";import{n as ie,r as H}from"./totp-NlqqRp4a.js";function U(e,t){return o(e,l,t)}var W=a(r(),1),G=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M160,36A92.09,92.09,0,0,0,79,84.36,68,68,0,1,0,72,220h88a92,92,0,0,0,0-184Zm0,160H72a44,44,0,0,1-1.82-88A91.86,91.86,0,0,0,68,128a12,12,0,0,0,24,0,68,68,0,1,1,68,68Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,128a80,80,0,0,1-80,80H72A56,56,0,1,1,85.92,97.74l0,.1A80,80,0,0,1,240,128Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M160,40A88.09,88.09,0,0,0,81.29,88.67,64,64,0,1,0,72,216h88a88,88,0,0,0,0-176Zm0,160H72a48,48,0,0,1,0-96c1.1,0,2.2,0,3.29.11A88,88,0,0,0,72,128a8,8,0,0,0,16,0,72,72,0,1,1,72,72Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M160.06,40A88.1,88.1,0,0,0,81.29,88.67h0A87.48,87.48,0,0,0,72,127.73,8.18,8.18,0,0,1,64.57,136,8,8,0,0,1,56,128a103.66,103.66,0,0,1,5.34-32.92,4,4,0,0,0-4.75-5.18A64.09,64.09,0,0,0,8,152c0,35.19,29.75,64,65,64H160a88.09,88.09,0,0,0,87.93-91.48C246.11,77.54,207.07,40,160.06,40Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M160,42A86.11,86.11,0,0,0,82.43,90.88,62,62,0,1,0,72,214h88a86,86,0,0,0,0-172Zm0,160H72a50,50,0,0,1,0-100,50.67,50.67,0,0,1,5.91.35A85.61,85.61,0,0,0,74,128a6,6,0,0,0,12,0,74,74,0,1,1,74,74Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M160,40A88.09,88.09,0,0,0,81.29,88.67,64,64,0,1,0,72,216h88a88,88,0,0,0,0-176Zm0,160H72a48,48,0,0,1,0-96c1.1,0,2.2,0,3.29.11A88,88,0,0,0,72,128a8,8,0,0,0,16,0,72,72,0,1,1,72,72Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M160,44A84.11,84.11,0,0,0,83.59,93.12,60.71,60.71,0,0,0,72,92a60,60,0,0,0,0,120h88a84,84,0,0,0,0-168Zm0,160H72a52,52,0,1,1,8.55-103.3A83.66,83.66,0,0,0,76,128a4,4,0,0,0,8,0,76,76,0,1,1,76,76Z`}))]]),K=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,12H80A28,28,0,0,0,52,40V216a28,28,0,0,0,28,28h96a28,28,0,0,0,28-28V40A28,28,0,0,0,176,12ZM76,76H180V180H76Zm4-40h96a4,4,0,0,1,4,4V52H76V40A4,4,0,0,1,80,36Zm96,184H80a4,4,0,0,1-4-4V204H180v12A4,4,0,0,1,176,220Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,56V200H64V56Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM80,32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,18H80A22,22,0,0,0,58,40V216a22,22,0,0,0,22,22h96a22,22,0,0,0,22-22V40A22,22,0,0,0,176,18ZM70,62H186V194H70ZM80,30h96a10,10,0,0,1,10,10V50H70V40A10,10,0,0,1,80,30Zm96,196H80a10,10,0,0,1-10-10V206H186v10A10,10,0,0,1,176,226Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,16H80A24,24,0,0,0,56,40V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V40A24,24,0,0,0,176,16ZM72,64H184V192H72Zm8-32h96a8,8,0,0,1,8,8v8H72V40A8,8,0,0,1,80,32Zm96,192H80a8,8,0,0,1-8-8v-8H184v8A8,8,0,0,1,176,224Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,20H80A20,20,0,0,0,60,40V216a20,20,0,0,0,20,20h96a20,20,0,0,0,20-20V40A20,20,0,0,0,176,20ZM68,60H188V196H68ZM80,28h96a12,12,0,0,1,12,12V52H68V40A12,12,0,0,1,80,28Zm96,200H80a12,12,0,0,1-12-12V204H188v12A12,12,0,0,1,176,228Z`}))]]),q=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z`}))]]),ae=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M195.8,60.2a28,28,0,0,0-39.51-.09L144.68,72.28a12,12,0,1,1-17.36-16.56L139,43.43l.2-.2a52,52,0,0,1,73.54,73.54l-.2.2-12.29,11.71a12,12,0,0,1-16.56-17.36l12.17-11.61A28,28,0,0,0,195.8,60.2ZM111.32,183.72,99.71,195.89a28,28,0,0,1-39.6-39.6l12.17-11.61a12,12,0,0,0-16.56-17.36L43.43,139l-.2.2a52,52,0,0,0,73.54,73.54l.2-.2,11.71-12.29a12,12,0,1,0-17.36-16.56ZM216,148H192a12,12,0,0,0,0,24h24a12,12,0,0,0,0-24ZM40,108H64a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm120,72a12,12,0,0,0-12,12v24a12,12,0,0,0,24,0V192A12,12,0,0,0,160,180ZM96,76a12,12,0,0,0,12-12V40a12,12,0,0,0-24,0V64A12,12,0,0,0,96,76Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M204.28,108.28l-96,96a40,40,0,0,1-56.56-56.56l96-96a40,40,0,0,1,56.56,56.56Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M198.63,57.37a32,32,0,0,0-45.19-.06L141.79,69.52a8,8,0,0,1-11.58-11l11.72-12.29a1.59,1.59,0,0,1,.13-.13,48,48,0,0,1,67.88,67.88,1.59,1.59,0,0,1-.13.13l-12.29,11.72a8,8,0,0,1-11-11.58l12.21-11.65A32,32,0,0,0,198.63,57.37ZM114.21,186.48l-11.65,12.21a32,32,0,0,1-45.25-45.25l12.21-11.65a8,8,0,0,0-11-11.58L46.19,141.93a1.59,1.59,0,0,0-.13.13,48,48,0,0,0,67.88,67.88,1.59,1.59,0,0,0,.13-.13l11.72-12.29a8,8,0,1,0-11.58-11ZM216,152H192a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16ZM40,104H64a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm120,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V192A8,8,0,0,0,160,184ZM96,72a8,8,0,0,0,8-8V40a8,8,0,0,0-16,0V64A8,8,0,0,0,96,72Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM96,64a8,8,0,0,1,16,0V80a8,8,0,0,1-16,0ZM64,96H80a8,8,0,0,1,0,16H64a8,8,0,0,1,0-16Zm64.08,85.66-7.21,7.21a38,38,0,1,1-53.74-53.74l7.21-7.21a8,8,0,1,1,11.32,11.31l-7.22,7.21a22,22,0,0,0,31.12,31.12l7.21-7.22a8,8,0,1,1,11.31,11.32ZM160,192a8,8,0,0,1-16,0V176a8,8,0,0,1,16,0Zm32-32H176a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm-3.13-39.13-7.21,7.21a8,8,0,1,1-11.32-11.31l7.22-7.21a22,22,0,0,0-31.12-31.12l-7.21,7.22a8,8,0,1,1-11.31-11.32l7.21-7.21a38,38,0,1,1,53.74,53.74Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,56a34,34,0,0,0-48-.05L140.34,68.14a6,6,0,1,1-8.68-8.28l11.71-12.28.1-.11a46,46,0,0,1,65.06,65.06l-.11.1-12.28,11.71a6,6,0,1,1-8.28-8.68L200.09,104A34,34,0,0,0,200,56Zm-84.38,131.9L104,200.09A34,34,0,0,1,55.91,152l12.23-11.67a6,6,0,0,0-8.28-8.68L47.58,143.37l-.11.1a46,46,0,0,0,65.06,65.06l.1-.11,11.71-12.28a6,6,0,1,0-8.68-8.28ZM216,154H192a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12ZM40,102H64a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12Zm120,84a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V192A6,6,0,0,0,160,186ZM96,70a6,6,0,0,0,6-6V40a6,6,0,0,0-12,0V64A6,6,0,0,0,96,70Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M198.63,57.37a32,32,0,0,0-45.19-.06L141.79,69.52a8,8,0,0,1-11.58-11l11.72-12.29a1.59,1.59,0,0,1,.13-.13,48,48,0,0,1,67.88,67.88,1.59,1.59,0,0,1-.13.13l-12.29,11.72a8,8,0,0,1-11-11.58l12.21-11.65A32,32,0,0,0,198.63,57.37ZM114.21,186.48l-11.65,12.21a32,32,0,0,1-45.25-45.25l12.21-11.65a8,8,0,0,0-11-11.58L46.19,141.93a1.59,1.59,0,0,0-.13.13,48,48,0,0,0,67.88,67.88,1.59,1.59,0,0,0,.13-.13l11.72-12.29a8,8,0,1,0-11.58-11ZM216,152H192a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16ZM40,104H64a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm120,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V192A8,8,0,0,0,160,184ZM96,72a8,8,0,0,0,8-8V40a8,8,0,0,0-16,0V64A8,8,0,0,0,96,72Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M201.46,54.54a36.06,36.06,0,0,0-50.92,0L138.89,66.76a4,4,0,0,1-5.78-5.52L144.82,49a44,44,0,1,1,62.29,62.15l-12.35,11.78a4,4,0,0,1-5.52-5.78l12.28-11.72A36,36,0,0,0,201.46,54.54Zm-84.35,134.7-11.65,12.22a36,36,0,0,1-51-50.85l12.28-11.72a4,4,0,0,0-5.52-5.78L48.89,144.89A44,44,0,1,0,111.18,207l11.71-12.28a4,4,0,1,0-5.78-5.52ZM216,156H192a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8ZM40,100H64a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8Zm120,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V192A4,4,0,0,0,160,188ZM96,68a4,4,0,0,0,4-4V40a4,4,0,0,0-8,0V64A4,4,0,0,0,96,68Z`}))]]),oe=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),se=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z`}))]]),J=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:G}));J.displayName=`CloudIcon`;var Y=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:K}));Y.displayName=`DeviceMobileIcon`;var X=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:q}));X.displayName=`GearIcon`;var Z=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:ae}));Z.displayName=`LinkBreakIcon`;var ce=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:oe}));ce.displayName=`PencilSimpleIcon`;var le=W.forwardRef((e,t)=>W.createElement(i,{ref:t,...e,weights:se}));le.displayName=`SignOutIcon`;var Q=t();function ue({isConfigManaged:e,isDeletionEnabled:t,onDeleteClick:r}){let{t:i}=n();return t?(0,Q.jsxs)(`div`,{className:`rounded-xl border border-base-200 border-l-4 border-l-error/60`,children:[(0,Q.jsxs)(`div`,{className:`border-base-200 border-b px-4 py-3`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(_,{className:`size-4 text-error`,weight:`fill`}),(0,Q.jsx)(`h2`,{className:`font-semibold text-error text-sm`,children:i(`profile.dangerZone.title`)})]}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-base-content/60 text-xs`,children:i(`profile.dangerZone.description`)})]}),(0,Q.jsx)(`div`,{className:`px-4 py-3`,children:(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`p`,{className:`font-medium text-sm`,children:i(`profile.deleteAccount.title`)}),(0,Q.jsx)(`p`,{className:`text-base-content/60 text-xs`,children:i(e?`profile.deleteAccount.configManaged`:`profile.deleteAccount.description`)})]}),(0,Q.jsxs)(`button`,{className:`btn btn-error btn-outline btn-sm gap-2`,"data-testid":`profile-delete-account`,disabled:e,onClick:r,type:`button`,children:[(0,Q.jsx)(O,{className:`size-4`,weight:`bold`}),i(`profile.deleteAccount.button`)]})]})})]}):null}function de({providers:e,unlinkingProvider:t,getAuthorizeUrl:r,onUnlinkRequest:i}){let{t:a}=n();return e.length===0?null:(0,Q.jsxs)(`div`,{className:`rounded-xl border border-base-200`,children:[(0,Q.jsxs)(`div`,{className:`border-base-200 border-b px-4 py-3`,children:[(0,Q.jsx)(`h2`,{className:`font-semibold text-sm`,children:a(`profile.linkedAccounts.title`)}),(0,Q.jsx)(`p`,{className:`text-base-content/60 text-xs`,children:a(`profile.linkedAccounts.description`)})]}),(0,Q.jsx)(`div`,{className:`divide-y divide-base-200`,children:e.map(e=>(0,Q.jsxs)(`div`,{className:`flex items-center justify-between p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Q.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg ${e.linked?`bg-success/10`:`bg-base-200`}`,children:(0,Q.jsx)(E,{className:`size-4 ${e.linked?`text-success`:`text-base-content/50`}`,weight:`regular`})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`font-medium text-sm`,children:e.display_name}),(0,Q.jsx)(`div`,{className:`text-base-content/60 text-xs`,children:e.linked?a(`profile.linkedAccounts.connected`):a(`profile.linkedAccounts.notConnected`)})]})]}),e.linked?(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-error`,disabled:t===e.id,onClick:()=>i(e),type:`button`,children:t===e.id?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),a(`profile.linkedAccounts.unlinking`)]}):a(`profile.linkedAccounts.unlink`)}):(0,Q.jsx)(`a`,{className:`btn btn-ghost btn-xs text-primary`,href:r(e.id,`link`,`/profile`),children:a(`profile.linkedAccounts.link`)})]},e.id))})]})}function fe({passkeyCount:e,onOpenModal:t}){let{t:r}=n();return(0,Q.jsxs)(`div`,{className:`flex items-center justify-between p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Q.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg ${e>0?`bg-success/10`:`bg-base-200`}`,children:(0,Q.jsx)(w,{className:`size-4 ${e>0?`text-success`:`text-base-content/50`}`,weight:`regular`})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`font-medium text-sm`,children:r(`profile.passkey.title`)}),(0,Q.jsx)(`div`,{className:`text-base-content/60 text-xs`,children:e>0?r(`profile.passkey.status.enabled`,{count:e}):r(`profile.passkey.status.disabled`)})]})]}),(0,Q.jsx)(`div`,{className:`flex gap-1`,children:e>0?(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,onClick:()=>t(`manage`),type:`button`,children:r(`profile.passkey.manage`)}):(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,onClick:()=>t(`setup`),type:`button`,children:r(`profile.passkey.add`)})})]})}function pe({hasPassword:e,hasLinkedOAuth:t,isConfigManaged:r,hasSecondFactorOnly:i,onOpenModal:a}){let{t:o}=n();return(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-4 p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,Q.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg ${e?`bg-success/10`:`bg-base-200`}`,children:(0,Q.jsx)(T,{className:`size-4 ${e?`text-success`:`text-base-content/50`}`,weight:`regular`})}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`div`,{className:`font-medium text-sm`,children:o(`profile.password.title`)}),(0,Q.jsx)(`div`,{className:`text-base-content/60 text-xs`,children:o(e?`profile.password.status.set`:`profile.password.status.notSet`)}),r&&(0,Q.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1 text-base-content/40 text-xs`,children:[(0,Q.jsx)(X,{className:`size-3 shrink-0`,weight:`fill`}),(0,Q.jsx)(`span`,{children:o(`profile.password.configManaged`)})]})]})]}),!r&&(0,Q.jsx)(`div`,{className:`flex shrink-0 items-center gap-1`,children:e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,"data-testid":`profile-password-change`,onClick:()=>a(`change`),type:`button`,children:o(`profile.password.change`)}),t?(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-error`,"data-testid":`profile-password-remove`,onClick:()=>a(`remove`),type:`button`,children:o(`profile.password.remove`)}):null,!t&&i&&(0,Q.jsxs)(`div`,{className:`dropdown dropdown-end`,children:[(0,Q.jsx)(`button`,{className:`btn btn-disabled btn-ghost btn-xs cursor-not-allowed text-base-content/30`,type:`button`,children:o(`profile.password.remove`)}),(0,Q.jsx)(`div`,{className:`dropdown-content z-50 w-64 rounded-xl border border-base-200 bg-base-100 p-4 shadow-lg`,children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Q.jsx)(y,{className:`size-4 shrink-0 text-warning`}),(0,Q.jsx)(`div`,{className:`text-xs`,children:o(`profile.password.removeDisabledReason`)})]})})]})]}):(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,"data-testid":`profile-password-set`,onClick:()=>a(`set`),type:`button`,children:o(`profile.password.set`)})})]})}function me({totpEnabled:e,recoveryCodesMissing:t,onOpenModal:r}){let{t:i}=n();return(0,Q.jsxs)(`div`,{className:`flex items-center justify-between p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Q.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg ${e?`bg-success/10`:`bg-base-200`}`,children:(0,Q.jsx)(D,{className:`size-4 ${e?`text-success`:`text-base-content/50`}`,weight:`regular`})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`font-medium text-sm`,children:i(`profile.totp.title`)}),(0,Q.jsx)(`div`,{className:`text-base-content/60 text-xs`,children:i(e?t?`profile.totp.status.recoveryCodesMissing`:`profile.totp.status.enabled`:`profile.totp.status.disabled`)})]})]}),(0,Q.jsx)(`div`,{className:`flex flex-wrap justify-end gap-1`,children:e?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,"data-testid":`profile-totp-regenerate`,onClick:()=>r(`regenerate`),type:`button`,children:i(`profile.totp.regenerate`)}),(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-error`,"data-testid":`profile-totp-disable`,onClick:()=>r(`disable`),type:`button`,children:i(`profile.totp.disable`)})]}):(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs text-primary`,"data-testid":`profile-totp-enable`,onClick:()=>r(`setup`),type:`button`,children:i(`profile.totp.enable`)})})]})}var he={error:`bg-error/10 text-error`,warning:`bg-warning/10 text-warning`,info:`bg-info/10 text-info`},ge={error:A,warning:_,info:y};function $({variant:e,children:t}){let n=ge[e];return(0,Q.jsxs)(`div`,{className:`flex items-start gap-3 rounded-lg p-3 ${he[e]}`,"data-testid":`alert-banner-${e}`,children:[(0,Q.jsx)(n,{className:`mt-0.5 size-5 shrink-0`,weight:`fill`}),(0,Q.jsx)(`div`,{className:`min-w-0 flex-1 text-sm`,children:t})]})}function _e({isOpen:e,onClose:t,providerName:r,isPending:i,onConfirm:a}){let{t:o}=n(),[s,c]=(0,W.useState)(null),l=()=>{i||(c(null),t())};return(0,Q.jsx)(V,{description:o(`profile.linkedAccounts.unlinkModal.description`,{provider:r}),icon:Z,isOpen:e,onClose:l,preventClose:i,title:o(`profile.linkedAccounts.unlinkModal.title`),variant:`destructive`,children:(0,Q.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,Q.jsx)($,{variant:`warning`,children:o(`profile.linkedAccounts.unlinkModal.warning`,{provider:r})}),s&&(0,Q.jsx)($,{variant:`error`,children:s}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`unlink-oauth-cancel`,disabled:i,onClick:l,type:`button`,children:o(`profile.linkedAccounts.unlinkModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-error`,"data-testid":`unlink-oauth-unlink`,disabled:i,onClick:async()=>{c(null);try{await a(),l()}catch{c(o(`profile.linkedAccounts.unlinkError`))}},type:`button`,children:i?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),o(`profile.linkedAccounts.unlinking`)]}):o(`profile.linkedAccounts.unlink`)})]})]})})}function ve({user:e}){let{t}=n();return(0,Q.jsxs)(`div`,{className:`rounded-xl border border-base-200`,children:[(0,Q.jsxs)(`div`,{className:`border-base-200 border-b px-4 py-3`,children:[(0,Q.jsx)(`h2`,{className:`font-semibold text-sm`,children:t(`profile.account.title`)}),(0,Q.jsx)(`p`,{className:`text-base-content/60 text-xs`,children:t(`profile.account.description`)})]}),(0,Q.jsxs)(`div`,{className:`divide-y divide-base-200`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-4 py-3`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-base-content/60 text-xs`,children:t(`profile.id.label`)}),(0,Q.jsx)(`span`,{className:`truncate font-medium text-sm`,children:e.sub})]}),(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-4 py-3`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-base-content/60 text-xs`,children:t(`profile.email.label`)}),(0,Q.jsx)(`span`,{className:`truncate font-medium text-sm`,children:e.email})]})]})]})}var ye={sm:`size-8 text-sm`,md:`size-12 text-xl`,lg:`size-16 text-2xl`};function be({email:e,size:t=`md`}){let n=e.charAt(0).toUpperCase();return(0,Q.jsx)(`div`,{className:`flex shrink-0 items-center justify-center rounded-full bg-primary font-bold text-primary-content ${ye[t]}`,children:n})}var xe=g({mutationFn:async e=>c(await d.api.user.password.$post({json:e}))}),Se=g({mutationFn:async e=>c(await d.api.user.password.$put({json:e}))}),Ce=g({mutationFn:async e=>c(await d.api.user.password.$delete({json:e}))});function we({isOpen:t,onClose:r}){let{t:i}=n(),a=m(),{data:o}=s(f),c=o.auth.password.policy,l=R({resolver:z((0,W.useMemo)(()=>k.object({currentPassword:k.string().min(1,i(`validation.password.required`)),newPassword:k.string().min(c.min_length,i(`validation.password.min`,{count:c.min_length})).max(c.max_length,i(`validation.password.max`,{count:c.max_length})),confirmPassword:k.string()}).refine(e=>e.newPassword===e.confirmPassword,{message:i(`validation.confirmPassword.mismatch`),path:[`confirmPassword`]}),[c.max_length,c.min_length,i])),defaultValues:{currentPassword:``,newPassword:``,confirmPassword:``}}),u=h({...Se,onSuccess:()=>{a.invalidateQueries({queryKey:j.queryKey}),d()}}),d=()=>{l.reset(),r()},p=l.handleSubmit(async t=>{try{await u.mutateAsync({current_password:t.currentPassword,new_password:t.newPassword})}catch(t){t instanceof e&&t.code===`INVALID_CURRENT_PASSWORD`?l.setError(`currentPassword`,{message:i(`profile.password.changeModal.invalidCurrent`)}):l.setError(`root`,{message:i(`profile.password.changeModal.error`)})}});return(0,Q.jsx)(V,{description:i(`profile.password.changeModal.description`),icon:T,isOpen:t,onClose:d,title:i(`profile.password.changeModal.title`),children:(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:p,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`current-password`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.password.changeModal.currentPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${l.formState.errors.currentPassword?`input-error`:``}`,id:`current-password`,placeholder:i(`profile.password.changeModal.currentPasswordPlaceholder`),type:`password`,...l.register(`currentPassword`)}),l.formState.errors.currentPassword&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`change-password-error-currentPassword`,children:l.formState.errors.currentPassword.message})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`new-password-change`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.password.changeModal.newPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${l.formState.errors.newPassword?`input-error`:``}`,id:`new-password-change`,placeholder:i(`profile.password.changeModal.newPasswordPlaceholder`),type:`password`,...l.register(`newPassword`)}),l.formState.errors.newPassword&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`change-password-error-newPassword`,children:l.formState.errors.newPassword.message})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`confirm-password-change`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.password.changeModal.confirmPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${l.formState.errors.confirmPassword?`input-error`:``}`,id:`confirm-password-change`,placeholder:i(`profile.password.changeModal.confirmPasswordPlaceholder`),type:`password`,...l.register(`confirmPassword`)}),l.formState.errors.confirmPassword&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`change-password-error-confirmPassword`,children:l.formState.errors.confirmPassword.message})]}),l.formState.errors.root&&(0,Q.jsx)($,{variant:`error`,children:l.formState.errors.root.message}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`change-password-cancel`,disabled:u.isPending,onClick:d,type:`button`,children:i(`profile.password.changeModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary`,"data-testid":`change-password-submit`,disabled:u.isPending,type:`submit`,children:u.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),i(`profile.password.changeModal.submitting`)]}):i(`profile.password.changeModal.submit`)})]})]})})}var Te=g({mutationFn:async()=>c(await d.api.user.$delete())});function Ee({isOpen:e,onClose:t,retentionDays:r}){let{t:i}=n(),a=u(),o=m(),s=R({resolver:z((0,W.useMemo)(()=>k.object({confirmation:k.string().refine(e=>e.toLowerCase()===i(`profile.deleteAccount.modal.confirmPlaceholder`).toLowerCase(),{message:i(`validation.confirmText.mismatch`)})}),[i])),defaultValues:{confirmation:``}}),c=h({...Te,onSuccess:async()=>{o.setQueryData(j.queryKey,{user:null}),await N(),a.navigate({to:`/login`})}}),l=()=>{c.isPending||(s.reset(),t())},d=s.handleSubmit(async()=>{try{await c.mutateAsync()}catch{s.setError(`root`,{message:i(`profile.deleteAccount.error`)})}});return(0,Q.jsx)(V,{icon:O,isOpen:e,onClose:l,preventClose:c.isPending,title:i(`profile.deleteAccount.modal.title`),variant:`destructive`,children:(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:d,children:[(0,Q.jsxs)($,{variant:`error`,children:[(0,Q.jsx)(`p`,{children:i(`profile.deleteAccount.modal.description`,{days:r})}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs opacity-80`,children:i(`profile.deleteAccount.modal.warning`)})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`delete-confirmation`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.deleteAccount.modal.confirmLabel`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${s.formState.errors.confirmation?`input-error`:``}`,id:`delete-confirmation`,placeholder:i(`profile.deleteAccount.modal.confirmPlaceholder`),type:`text`,...s.register(`confirmation`),autoComplete:`off`}),s.formState.errors.confirmation&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`delete-account-error`,children:s.formState.errors.confirmation.message})]}),s.formState.errors.root&&(0,Q.jsx)($,{variant:`error`,children:s.formState.errors.root.message}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`delete-account-cancel`,disabled:c.isPending,onClick:l,type:`button`,children:i(`profile.deleteAccount.modal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-error`,"data-testid":`delete-account-submit`,disabled:c.isPending,type:`submit`,children:c.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),i(`profile.deleteAccount.modal.confirming`)]}):i(`profile.deleteAccount.modal.confirm`)})]})]})})}function De({isOpen:t,onClose:r}){let{t:i}=n(),a=m(),o=R({resolver:z((0,W.useMemo)(()=>k.object({code:k.string().length(6,i(`validation.totp.length`)).regex(/^\d{6}$/,i(`validation.totp.digits`))}),[i])),defaultValues:{code:``}}),s=h({...ie,onSuccess:()=>{a.invalidateQueries({queryKey:j.queryKey}),c()}}),c=()=>{o.reset(),r()},l=o.handleSubmit(async t=>{try{await s.mutateAsync({code:t.code})}catch(t){if(t instanceof e&&t.code===`CANNOT_REMOVE_LAST_SECOND_FACTOR`){o.setError(`code`,{message:i(`profile.totp.disableModal.cannotRemoveLastSecondFactor`)});return}o.setError(`code`,{message:i(`profile.totp.disableModal.error`)})}});return(0,Q.jsx)(V,{description:i(`profile.totp.disableModal.description`),icon:D,isOpen:t,onClose:c,title:i(`profile.totp.disableModal.title`),variant:`destructive`,children:(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:l,children:[(0,Q.jsx)($,{variant:`warning`,children:i(`profile.totp.disableModal.warning`)}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`disable-totp-code`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.totp.disableModal.codeLabel`)})}),(0,Q.jsx)(`input`,{autoComplete:`one-time-code`,className:`input input-bordered input-sm w-full text-center text-xl tracking-widest ${o.formState.errors.code?`input-error`:``}`,id:`disable-totp-code`,inputMode:`numeric`,maxLength:6,pattern:`[0-9]*`,placeholder:`000000`,type:`text`,...o.register(`code`)}),o.formState.errors.code&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`disable-totp-error`,children:o.formState.errors.code.message})]}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`disable-totp-cancel`,disabled:s.isPending,onClick:c,type:`button`,children:i(`profile.totp.disableModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-error`,"data-testid":`disable-totp-submit`,disabled:s.isPending,type:`submit`,children:s.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),i(`profile.totp.disableModal.disabling`)]}):i(`profile.totp.disableModal.disable`)})]})]})})}function Oe({isOpen:t,onClose:r,onAddNew:i}){let{t:a}=n(),o=m(),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[g,_]=(0,W.useState)(null),{data:v,isLoading:y}=U({...L,enabled:t}),b=h({...I,onSuccess:()=>{o.invalidateQueries({queryKey:p.passkeys()}),o.invalidateQueries({queryKey:j.queryKey})},onSettled:()=>{u(null)}}),x=(0,W.useCallback)(()=>{c(null),u(null),f(null),_(null),r()},[r]),S=e=>{f(e.id),_(null)},C=()=>{f(null),_(null)},T=async t=>{u(t.id),f(null);try{await b.mutateAsync({id:t.id})}catch(t){if(t instanceof e&&t.code===`CANNOT_REMOVE_LAST_SECOND_FACTOR`){_(a(`profile.passkey.manageModal.cannotRemoveLastSecondFactor`));return}_(a(`profile.passkey.manageModal.deleteError`))}},E=e=>new Date(e).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`}),D=v?.passkeys||[];return(0,Q.jsxs)(V,{icon:w,isOpen:t,onClose:x,size:`lg`,title:a(`profile.passkey.manageModal.title`),children:[(0,Q.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[g&&(0,Q.jsx)($,{variant:`error`,children:g}),y&&(0,Q.jsx)(`div`,{className:`flex justify-center py-6`,children:(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-md`})}),!y&&D.length===0&&(0,Q.jsx)(`div`,{className:`py-6 text-center text-base-content/60 text-sm`,"data-testid":`passkeys-empty`,children:(0,Q.jsx)(`p`,{children:a(`profile.passkey.manageModal.noPasskeys`)})}),!y&&D.length>0&&(0,Q.jsx)(`div`,{className:`flex flex-col gap-2`,children:D.map(e=>(0,Q.jsx)(ke,{formatDate:E,isConfirmingDelete:d===e.id,isDeleting:l===e.id,isEditing:s?.id===e.id,onCancelDelete:C,onCancelEdit:()=>c(null),onConfirmDelete:()=>T(e),onEdit:()=>c(e),onRequestDelete:()=>S(e),passkey:e},e.id))})]}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`manage-passkeys-close`,onClick:x,type:`button`,children:a(`profile.passkey.manageModal.close`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary`,"data-testid":`manage-passkeys-add-new`,onClick:()=>{x(),i()},type:`button`,children:a(`profile.passkey.manageModal.addNew`)})]})]})}function ke({passkey:e,isDeleting:t,isEditing:r,isConfirmingDelete:i,onEdit:a,onCancelEdit:o,onRequestDelete:s,onConfirmDelete:c,onCancelDelete:l,formatDate:u}){let{t:d}=n(),f=m(),g=R({resolver:z((0,W.useMemo)(()=>k.object({name:k.string().min(1,d(`validation.passkey.name.required`)).max(100,d(`validation.passkey.name.max`))}),[d])),defaultValues:{name:e.name||``}}),_=h({...P,onSuccess:()=>{f.invalidateQueries({queryKey:p.passkeys()}),o()}}),v=g.handleSubmit(async t=>{try{await _.mutateAsync({id:e.id,name:t.name})}catch{g.setError(`name`,{message:d(`profile.passkey.manageModal.renameError`)})}});return r?(0,Q.jsxs)(`form`,{className:`flex flex-col gap-1.5 rounded-lg bg-base-200 p-2`,onSubmit:v,children:[(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${g.formState.errors.name?`input-error`:``}`,"data-testid":`passkey-rename-input`,placeholder:d(`profile.passkey.manageModal.namePlaceholder`),type:`text`,...g.register(`name`)}),g.formState.errors.name&&(0,Q.jsx)(`span`,{className:`text-error text-xs`,"data-testid":`passkey-rename-error`,children:g.formState.errors.name.message}),(0,Q.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs`,disabled:_.isPending,onClick:()=>{g.reset(),o()},type:`button`,children:d(`profile.passkey.manageModal.cancelEdit`)}),(0,Q.jsx)(`button`,{className:`btn btn-primary btn-xs`,disabled:_.isPending,type:`submit`,children:_.isPending?d(`profile.passkey.manageModal.saving`):d(`profile.passkey.manageModal.save`)})]})]}):i?(0,Q.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg bg-error/10 p-2`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(O,{className:`size-4 text-error`,weight:`regular`}),(0,Q.jsx)(`span`,{className:`text-error text-xs`,children:d(`profile.passkey.manageModal.deleteConfirmInline`)})]}),(0,Q.jsxs)(`div`,{className:`flex gap-1`,children:[(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs`,onClick:l,type:`button`,children:d(`profile.passkey.manageModal.cancelEdit`)}),(0,Q.jsx)(`button`,{className:`btn btn-error btn-xs`,onClick:c,type:`button`,children:d(`profile.passkey.manageModal.delete`)})]})]}):(0,Q.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg bg-base-200 p-2`,"data-testid":`passkey-item`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.device_type===`multiDevice`?(0,Q.jsx)(J,{className:`size-4 text-primary`,weight:`regular`}):(0,Q.jsx)(Y,{className:`size-4 text-primary`,weight:`regular`}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`font-medium text-xs`,children:e.name||d(`profile.passkey.manageModal.unnamedPasskey`)}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5 text-base-content/60 text-xs`,children:[(0,Q.jsx)(`span`,{children:d(`profile.passkey.manageModal.createdAt`,{date:u(e.created_at)})}),e.backed_up&&(0,Q.jsx)(`span`,{className:`badge badge-success badge-xs`,children:d(`profile.passkey.manageModal.backedUp`)})]})]})]}),(0,Q.jsxs)(`div`,{className:`flex gap-1`,children:[(0,Q.jsx)(`button`,{"aria-label":d(`profile.passkey.manageModal.rename`),className:`btn btn-ghost btn-xs`,onClick:a,type:`button`,children:(0,Q.jsx)(ce,{className:`size-3.5`,weight:`regular`})}),(0,Q.jsx)(`button`,{"aria-label":d(`profile.passkey.manageModal.delete`),className:`btn btn-ghost btn-xs text-error`,disabled:t,onClick:s,type:`button`,children:t?(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}):(0,Q.jsx)(O,{className:`size-3.5`,weight:`regular`})})]})]})}function Ae({isOpen:t,onClose:r}){let{t:i}=n(),a=u(),o=m(),{data:c}=s(f),[l,d]=(0,W.useState)(`verify`),[p,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(null),y=h({...H,onSuccess:async e=>{g(e),d(`recovery`),await o.invalidateQueries({queryKey:j.queryKey})}}),x=(0,W.useCallback)(()=>{d(`verify`),g(null),v(null),y.reset()},[y]),C=(0,W.useCallback)(()=>{x(),r()},[r,x]),w=(0,W.useCallback)(async t=>{v(null);try{await y.mutateAsync({code:t})}catch(t){if(t instanceof e){if(t.code===`INVALID_TOTP_CODE`)throw t;if(t.code===`UNAUTHORIZED`){o.setQueryData(j.queryKey,{user:null}),await N(),a.navigate({to:`/login`});return}if(t.code===`TOTP_NOT_ENABLED`||t.code===`VALIDATION_ERROR`){await o.invalidateQueries({queryKey:j.queryKey}),C();return}}v(i(`profile.totp.regenerateModal.unexpectedError`))}},[C,y,o,a,i]);return c.auth.password.totp.enabled?(0,Q.jsx)(V,{description:i(l===`verify`?`profile.totp.regenerateModal.description`:`profile.totp.regenerateModal.recoveryDescription`),icon:D,isOpen:t,onClose:C,preventClose:l===`recovery`,size:`sm`,title:i(l===`verify`?`profile.totp.regenerateModal.title`:`profile.totp.regenerateModal.recoveryTitle`),children:l===`verify`?(0,Q.jsxs)(`div`,{className:`mt-4`,children:[_&&(0,Q.jsx)(`div`,{className:`mb-3`,children:(0,Q.jsx)($,{variant:`error`,children:_})}),(0,Q.jsx)(S,{invalidMessage:i(`profile.totp.regenerateModal.error`),isPending:y.isPending,onSubmit:w,pendingText:i(`profile.totp.regenerateModal.submitting`),submitLabel:i(`profile.totp.regenerateModal.submit`)})]}):(0,Q.jsx)(`div`,{className:`mt-4`,children:(0,Q.jsx)(b,{onConfirm:C,recoveryCodes:p?.recovery_codes??[]})})}):null}function je({isOpen:t,onClose:r}){let{t:i}=n(),a=m(),o=R({resolver:z((0,W.useMemo)(()=>k.object({currentPassword:k.string().min(1,i(`validation.password.required`))}),[i])),defaultValues:{currentPassword:``}}),s=h({...Ce,onSuccess:()=>{a.invalidateQueries({queryKey:j.queryKey}),c()}}),c=()=>{o.reset(),r()},l=o.handleSubmit(async t=>{try{await s.mutateAsync({current_password:t.currentPassword})}catch(t){if(t instanceof e){if(t.code===`INVALID_CURRENT_PASSWORD`){o.setError(`currentPassword`,{message:i(`profile.password.removeModal.invalidCurrent`)});return}if(t.code===`CANNOT_REMOVE_LAST_AUTH_METHOD`){o.setError(`root`,{message:i(`profile.password.removeModal.noOAuth`)});return}if(t.code===`CANNOT_REMOVE_PASSWORD_WITH_SECOND_FACTOR_ONLY`){o.setError(`root`,{message:i(`profile.password.removeModal.noOAuthWith2FA`)});return}}o.setError(`root`,{message:i(`profile.password.removeModal.error`)})}});return(0,Q.jsx)(V,{description:i(`profile.password.removeModal.description`),icon:T,isOpen:t,onClose:c,title:i(`profile.password.removeModal.title`),variant:`destructive`,children:(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:l,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`current-password-remove`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:i(`profile.password.removeModal.currentPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${o.formState.errors.currentPassword?`input-error`:``}`,id:`current-password-remove`,placeholder:i(`profile.password.removeModal.currentPasswordPlaceholder`),type:`password`,...o.register(`currentPassword`)}),o.formState.errors.currentPassword&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`remove-password-error`,children:o.formState.errors.currentPassword.message})]}),o.formState.errors.root&&(0,Q.jsx)($,{variant:`error`,children:o.formState.errors.root.message}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`remove-password-cancel`,disabled:s.isPending,onClick:c,type:`button`,children:i(`profile.password.removeModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-error`,"data-testid":`remove-password-submit`,disabled:s.isPending,type:`submit`,children:s.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),i(`profile.password.removeModal.submitting`)]}):i(`profile.password.removeModal.submit`)})]})]})})}function Me({isOpen:e,onClose:t}){let{t:r}=n(),i=m(),{data:a}=s(f),o=a.auth.password.policy,c=R({resolver:z((0,W.useMemo)(()=>k.object({password:k.string().min(o.min_length,r(`validation.password.min`,{count:o.min_length})).max(o.max_length,r(`validation.password.max`,{count:o.max_length})),confirmPassword:k.string()}).refine(e=>e.password===e.confirmPassword,{message:r(`validation.confirmPassword.mismatch`),path:[`confirmPassword`]}),[o.max_length,o.min_length,r])),defaultValues:{password:``,confirmPassword:``}}),l=h({...xe,onSuccess:()=>{i.invalidateQueries({queryKey:j.queryKey}),u()}}),u=()=>{c.reset(),t()},d=c.handleSubmit(async e=>{try{await l.mutateAsync({password:e.password})}catch{c.setError(`root`,{message:r(`profile.password.setModal.error`)})}});return(0,Q.jsx)(V,{description:r(`profile.password.setModal.description`),icon:T,isOpen:e,onClose:u,title:r(`profile.password.setModal.title`),children:(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:d,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`new-password`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:r(`profile.password.setModal.newPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${c.formState.errors.password?`input-error`:``}`,id:`new-password`,placeholder:r(`profile.password.setModal.newPasswordPlaceholder`),type:`password`,...c.register(`password`)}),c.formState.errors.password&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`set-password-error-password`,children:c.formState.errors.password.message})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`confirm-password`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:r(`profile.password.setModal.confirmPassword`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${c.formState.errors.confirmPassword?`input-error`:``}`,id:`confirm-password`,placeholder:r(`profile.password.setModal.confirmPasswordPlaceholder`),type:`password`,...c.register(`confirmPassword`)}),c.formState.errors.confirmPassword&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`set-password-error-confirmPassword`,children:c.formState.errors.confirmPassword.message})]}),c.formState.errors.root&&(0,Q.jsx)($,{variant:`error`,children:c.formState.errors.root.message}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`set-password-cancel`,disabled:l.isPending,onClick:u,type:`button`,children:r(`profile.password.setModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary`,"data-testid":`set-password-submit`,disabled:l.isPending,type:`submit`,children:l.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),r(`profile.password.setModal.submitting`)]}):r(`profile.password.setModal.submit`)})]})]})})}function Ne({isOpen:e,onClose:t,isRequired:r=!1,canSwitchToTotp:i=!1,onSwitchToTotp:a}){let{t:o}=n(),s=m(),[c,l]=(0,W.useState)(`name`),[u,d]=(0,W.useState)(null),f=R({resolver:z((0,W.useMemo)(()=>k.object({name:k.string().max(100,o(`validation.passkey.name.max`)).optional().transform(e=>e?.trim()||void 0)}),[o])),defaultValues:{name:``}}),g=h({...F,onSuccess:()=>{s.invalidateQueries({queryKey:p.passkeys()}),s.invalidateQueries({queryKey:j.queryKey}),_()},onError:e=>{l(`name`),e.name===`NotAllowedError`?d(o(`profile.passkey.setupModal.cancelled`)):d(o(`profile.passkey.setupModal.error`))}}),_=(0,W.useCallback)(()=>{f.reset(),l(`name`),d(null),t()},[f,t]),v=f.handleSubmit(async e=>{l(`register`),d(null);try{await g.mutateAsync({name:e.name})}catch{}}),y=g.isPending;return(0,Q.jsxs)(V,{description:r?o(`profile.passkey.setupModal.requiredDescription`):void 0,icon:w,isOpen:e,onClose:_,preventClose:r,size:`sm`,title:o(`profile.passkey.setupModal.title`),children:[c===`name`&&(0,Q.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:v,children:[(0,Q.jsx)(`p`,{className:`text-base-content/60 text-xs`,children:o(`profile.passkey.setupModal.description`)}),u&&(0,Q.jsx)($,{variant:`error`,children:u}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label w-full`,htmlFor:`passkey-name`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:o(`profile.passkey.setupModal.nameLabel`)})}),(0,Q.jsx)(`input`,{className:`input input-bordered input-sm w-full ${f.formState.errors.name?`input-error`:``}`,id:`passkey-name`,placeholder:o(`profile.passkey.setupModal.namePlaceholder`),type:`text`,...f.register(`name`)}),f.formState.errors.name&&(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-error`,"data-testid":`setup-passkey-error`,children:f.formState.errors.name.message}),(0,Q.jsx)(`span`,{className:`label-text-alt mt-0.5 text-base-content/50`,children:o(`profile.passkey.setupModal.nameHint`)})]}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`setup-passkey-cancel`,onClick:_,type:`button`,children:o(`profile.passkey.setupModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary`,"data-testid":`setup-passkey-continue`,type:`submit`,children:o(`profile.passkey.setupModal.continue`)})]}),i&&a&&(0,Q.jsx)(`p`,{className:`mt-2 text-center text-xs`,children:(0,Q.jsx)(`button`,{className:`link link-primary`,onClick:a,type:`button`,children:o(`profile.passkey.setupModal.switchToTotp`)})})]}),c===`register`&&(0,Q.jsxs)(`div`,{className:`mt-4`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-6`,"data-testid":`setup-passkey-loading`,children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-md`}),(0,Q.jsx)(`p`,{className:`text-center text-base-content/60 text-xs`,children:o(`profile.passkey.setupModal.waitingForDevice`)})]}),(0,Q.jsx)(B,{children:(0,Q.jsx)(`button`,{className:`btn btn-sm`,"data-testid":`setup-passkey-cancel`,disabled:y,onClick:_,type:`button`,children:o(`profile.passkey.setupModal.cancel`)})})]})]})}function Pe({isOpen:e,onClose:t,isRequired:r=!1,canSwitchToPasskey:i=!1,onSwitchToPasskey:a}){let{t:o}=n(),{step:s,setupData:c,recoveryCodes:l,isSetupPending:u,isVerifyPending:d,isConfirmPending:f,startSetup:p,verify:m,goToVerify:h,goToQr:g,confirmRecoveryCodes:_,reset:v}=C({autoStart:!1,onConfirmSuccess:()=>{v(),t()}}),y=(0,W.useCallback)(()=>{v(),t()},[t,v]),w=(0,W.useCallback)(()=>{!c&&!u&&p()},[c,u,p]);e&&!c&&!u&&s!==`error`&&w();let T=(0,W.useCallback)(async e=>{await m(e)},[m]),E=o(s===`recovery`?`setupTotp.recoveryCodes.title`:`profile.totp.setupModal.title`);return(0,Q.jsxs)(V,{description:r?o(`profile.totp.setupModal.requiredDescription`):void 0,icon:D,isOpen:e,onClose:y,preventClose:r||s===`recovery`,size:`sm`,title:E,children:[u&&(0,Q.jsx)(`div`,{className:`flex justify-center py-6`,"data-testid":`setup-totp-loading`,children:(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-md`})}),s===`error`&&(0,Q.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,Q.jsx)($,{variant:`error`,children:o(`profile.totp.setupModal.setupError`)}),(0,Q.jsxs)(B,{children:[(0,Q.jsx)(`button`,{className:`btn btn-sm`,onClick:y,type:`button`,children:o(`profile.totp.setupModal.cancel`)}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary`,onClick:p,type:`button`,children:o(`profile.totp.setupModal.retry`)})]})]}),c&&s===`qr`&&(0,Q.jsx)(`div`,{className:`mt-4`,children:(0,Q.jsx)(x,{additionalActions:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(B,{children:(0,Q.jsx)(`button`,{className:`btn btn-sm`,onClick:y,type:`button`,children:o(`profile.totp.setupModal.cancel`)})}),i&&a&&(0,Q.jsx)(`p`,{className:`mt-2 text-center text-xs`,children:(0,Q.jsx)(`button`,{className:`link link-primary`,onClick:a,type:`button`,children:o(`profile.totp.setupModal.switchToPasskey`)})})]}),onNext:h,setupData:c})}),c&&s===`verify`&&(0,Q.jsx)(`div`,{className:`mt-4`,children:(0,Q.jsx)(S,{isPending:d,onBack:g,onSubmit:T})}),s===`recovery`&&l.length>0&&(0,Q.jsx)(`div`,{className:`mt-4`,children:(0,Q.jsx)(b,{isLoading:f,onConfirm:_,recoveryCodes:l})})]})}var Fe=g({mutationFn:async()=>c(await d.api.auth.logout.$post())}),Ie={access_denied:`oauth.error.accessDenied`,temporarily_unavailable:`oauth.error.temporarilyUnavailable`,server_error:`oauth.error.serverError`};function Le(){let{t:e}=n(),t=u(),r=m(),i=re.useSearch().oauth_error,a=i?e(Ie[i]??`oauth.error.failed`):void 0,[o,c]=(0,W.useState)(null),[l,d]=(0,W.useState)(null),[p,g]=(0,W.useState)(null),[_,y]=(0,W.useState)(null),[b,x]=(0,W.useState)(null),[S,C]=(0,W.useState)(!1),{data:w}=s(j),{data:T}=s(ne),{data:E}=s(f),D=h({...Fe,onSuccess:async()=>{r.setQueryData(j.queryKey,{user:null}),await N(),t.navigate({to:`/login`})},onSettled:()=>{r.invalidateQueries({queryKey:j.queryKey})}}),O=h({...te,onSuccess:()=>{r.invalidateQueries({queryKey:ne.queryKey})},onSettled:()=>{c(null)}}),k=async()=>{l&&(c(l.id),await O.mutateAsync(l.id))};if(!w.user)return null;let P=w.user,F=T.available_providers,I=F.some(e=>e.linked),L=P.managed_by===`config`,R=E.auth.password,z=E.auth.passkey,B=R.totp.enabled,V=z.enabled,ie=E.account_deletion.enabled,H=E.account_deletion.retention,U=(()=>{let e=H.match(/^(\d+)([dmy])$/);if(!e)return 30;let t=parseInt(e[1],10);switch(e[2]){case`d`:return t;case`m`:return t*30;case`y`:return t*365;default:return 30}})(),G=!L&&B,K=!L&&V,q=F.length>0;return(0,Q.jsxs)(v,{maxWidth:`xl`,responsivePadding:!0,children:[(0,Q.jsx)(`div`,{className:`border-base-200 border-b p-6`,children:(0,Q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Q.jsx)(be,{email:P.email,size:`lg`}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`h1`,{className:`font-bold text-xl`,children:e(`profile.title`)}),(0,Q.jsx)(`p`,{className:`truncate text-base-content/70 text-sm`,"data-testid":`profile-user-email`,children:P.email})]})]}),(0,Q.jsxs)(`button`,{className:`btn btn-ghost btn-sm gap-2`,"data-testid":`profile-logout`,disabled:D.isPending,onClick:()=>D.mutate(),type:`button`,children:[D.isPending?(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-sm`}):(0,Q.jsx)(le,{className:`size-4`,weight:`bold`}),(0,Q.jsx)(`span`,{className:`hidden sm:inline`,children:e(`profile.logout`)})]})]})}),a&&(0,Q.jsx)(`div`,{className:`px-6 pt-4`,children:(0,Q.jsx)(M,{icon:A,type:`error`,children:a})}),(0,Q.jsxs)(`div`,{className:`space-y-5 p-6`,children:[P&&(0,Q.jsx)(ve,{user:P}),(0,Q.jsxs)(`div`,{className:`rounded-xl border border-base-200`,children:[(0,Q.jsxs)(`div`,{className:`border-base-200 border-b px-4 py-3`,children:[(0,Q.jsx)(`h2`,{className:`font-semibold text-sm`,children:e(`profile.security.title`)}),(0,Q.jsx)(`p`,{className:`text-base-content/60 text-xs`,children:e(`profile.security.description`)})]}),G&&P.totp_recovery_codes_missing&&(0,Q.jsx)(`div`,{className:`border-base-200 border-b px-4 py-3`,"data-testid":`profile-totp-recovery-warning`,children:(0,Q.jsx)(M,{icon:A,type:`warning`,children:e(`profile.totp.recoveryCodesMissing`)})}),(0,Q.jsxs)(`div`,{className:`divide-y divide-base-200`,children:[(0,Q.jsx)(pe,{hasLinkedOAuth:I,hasPassword:P.has_password,hasSecondFactorOnly:P.has_password&&!I&&(P.totp_registered||P.passkey_count>0),isConfigManaged:L,onOpenModal:g}),G&&(0,Q.jsx)(me,{onOpenModal:y,recoveryCodesMissing:P.totp_recovery_codes_missing,totpEnabled:P.totp_registered}),K&&(0,Q.jsx)(fe,{onOpenModal:x,passkeyCount:P.passkey_count})]})]}),q&&(0,Q.jsx)(de,{getAuthorizeUrl:ee,onUnlinkRequest:e=>d({id:e.id,name:e.display_name}),providers:F,unlinkingProvider:o}),(0,Q.jsx)(ue,{isConfigManaged:L,isDeletionEnabled:ie,onDeleteClick:()=>C(!0)})]}),(0,Q.jsx)(Me,{isOpen:p===`set`,onClose:()=>g(null)}),(0,Q.jsx)(we,{isOpen:p===`change`,onClose:()=>g(null)}),(0,Q.jsx)(je,{isOpen:p===`remove`,onClose:()=>g(null)}),(0,Q.jsx)(Pe,{isOpen:_===`setup`,onClose:()=>y(null)}),(0,Q.jsx)(De,{isOpen:_===`disable`,onClose:()=>y(null)}),(0,Q.jsx)(Ae,{isOpen:_===`regenerate`,onClose:()=>y(null)}),(0,Q.jsx)(Ne,{isOpen:b===`setup`,onClose:()=>x(null)}),(0,Q.jsx)(Oe,{isOpen:b===`manage`,onAddNew:()=>x(`setup`),onClose:()=>x(null)}),(0,Q.jsx)(_e,{isOpen:l!==null,isPending:O.isPending,onClose:()=>d(null),onConfirm:k,providerName:l?.name??``}),(0,Q.jsx)(Ee,{isOpen:S,onClose:()=>C(!1),retentionDays:U})]})}export{Le as component};
|
|
2
|
+
//# sourceMappingURL=profile-B5qQlPwW.js.map
|