All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.RealmSettingsSection-2oj_-SB8.js Maven / Gradle / Ivy

There is a newer version: 26.0.7
Show newest version
import{jsx as e,jsxs as c,Fragment as J}from"react/jsx-runtime";import{_ as Na,dL as Oa,m as Va,cI as Ka,dM as Ma,dN as Fa,dm as Ha,dA as oa,dB as Ua,cK as Ga,dO as Ba,dD as _a,dP as za,ci as $a,u as le,dt as it,w as Ue,a as B,c as ne,f as Te,g as ve,ab as He,P as re,F as Ge,bt as Se,y as fe,dQ as kt,ac as R,ae as G,bS as xt,ai as ca,bq as ja,ay as ht,dR as qa,L as Pe,bx as Wa,A as Ie,i as N,k as ie,a3 as We,aH as Mt,aI as Ft,aq as Ja,aJ as It,v as nt,ad as V,aX as da,aY as Fe,a8 as qt,Q as Ve,a4 as be,M as je,q as Xe,B as se,aa as st,Z as Re,r as rt,aW as Xa,a_ as lt,ar as Be,b5 as ge,U as te,p as pt,d as Ye,T as ma,R as ft,dS as Wt,a2 as Ae,dT as Ya,dU as Dt,dV as Qa,dW as Za,b as _e,b6 as ke,b0 as en,ao as Jt,am as yt,dy as tn,b_ as an,b$ as nn,$ as Ht,dX as ot,at as ln,b3 as Ut,a9 as sn,dY as Xt,J as ua,K as pa,aB as ha,N as fa,D as tt,aC as ct,dJ as Rt,dK as Gt,a0 as ba,ba as rn,bb as on,bc as Yt,bd as ga,dZ as cn,s as dn,d_ as we,x as mn,ag as Qe,ah as Je,d$ as Ne,e0 as Lt,e1 as un,c3 as pn,bD as Qt,af as Pt,e2 as Zt,e3 as hn,a1 as fn,cp as bn,e4 as gn,e5 as ea,e6 as ta,e7 as va,c8 as At,I as aa,bH as vn,c6 as yn,au as Tn,S as Cn,a6 as Sn,bE as kn,a7 as In}from"./main-C7ps2lmX.js";import Ln,{useState as u,useEffect as Ee,useMemo as at}from"react";import{u as ye}from"./ConfirmDialog-hx7XKLbN.js";import{R as bt,u as gt}from"./RoutableTabs-T8JTILEW.js";import{F as Nt,V as Pn}from"./ViewHeader-B7eeFzFA.js";import{u as Bt}from"./useLocale-BsnKjfE6.js";import{F as ae,b as An}from"./FormAccess-DyLNkc18.js";import{u as qe}from"./useToggle-K3Kx99tM.js";/* empty css                               */import{a as Et}from"./KeySelect-jKxsKqdI.js";import{U as Ze}from"./userProfileMetadata-CFgHgJ2w.js";import{D as Ot}from"./SwitchControl-C_9Y74oV.js";import{K as En}from"./KeyValueInput-B0tpVTv9.js";import{J as wn}from"./JsonFileUpload-DGJ9M0nq.js";import{l as xn,K as ze}from"./KeycloakDataTable-DbY4la1D.js";import{d as ya,D as Ta,a as Ca,b as Sa,c as Vt}from"./DataListItemRow-BC0LurDd.js";import{L as xe,P as Dn}from"./PaginatingTableToolbar-Cjsz5Jh4.js";import{b as Rn}from"./_baseSlice-F8doVSIJ.js";import{a as Nn,s as On,o as Vn}from"./_baseFlatten-eIEJR-AJ.js";import{F as _t,a as Oe}from"./FlexItem-BzZfUnQ1.js";import{C as zt,L as $t}from"./CodeEditor-C-nZkUJx.js";import{T as Q,t as Kn}from"./TimeSelector-DcQmr_f3.js";import{R as Mn}from"./AddRoleMappingModal-DW8o4W0z.js";import{G as Fn}from"./GroupPickerDialog-C09EjRTA.js";import{T as vt}from"./Trans-DcGUccv9.js";import{Q as Hn}from"./question-circle-icon-dDThmv9d.js";import{T as Tt,a as $,b as j}from"./Tabs-CMdqT4Cg.js";import{T as ka}from"./TimeSelectorControl-BxG2OWnt.js";import{i as Ia}from"./isEqual-BWOcMitS.js";import{u as Un}from"./useFormatDate-X7HJ5iYO.js";import{T as $e,U as Gn,V as Bn,W as na,X as dt,Y as _n,Z as mt,a2 as zn}from"./Td-D2hVFK0Z.js";import{F as La}from"./filter-icon-DO0QNij3.js";import{D as Pa}from"./DraggableTable-yOogAvJ0.js";import{KeyProviderForm as $n}from"./KeyProviderForm-BJnAxavo.js";import{D as jn}from"./DropdownPanel-BoHoC5Zg.js";import{p as qn}from"./pickBy-CtMuUSbs.js";import{P as Wn}from"./pencil-alt-icon-BJd8WcEw.js";import{u as jt,U as Jn}from"./UserProfileContext-BkGsi2EQ.js";import"react-dom";import"./PageHandler-P2CRgucq.js";import"./DynamicComponents-DvaX3FJx.js";import"./ClientSelect-B9UqjyP6.js";import"./FileUpload-CumNwlWc.js";import"./EmptyStateFooter-DqmBOP2I.js";import"./MultiLineInput-DiPNQ1LE.js";import"./useParams-B67lSY02.js";import"./PageList-s9OtSlkz.js";import"./EmptyStateActions-DWNUFByn.js";import"./grip-vertical-icon-BxF7V59o.js";import"./copy-icon-ACZmDH8e.js";import"./FileUploadForm-BgyzQxBE.js";const Kt=l=>{var{children:n,className:a,label:t}=l,i=Na(l,["children","className","label"]);return Ln.createElement(Oa,Object.assign({className:Va(a),label:t},i),n)};Kt.displayName="SelectGroup";function Xn(l){var n=l==null?0:l.length;return n?Nn(l):[]}function Yn(l){return On(Vn(l,void 0,Xn),l+"")}var Qn="[object Object]",Zn=Function.prototype,el=Object.prototype,Aa=Zn.toString,tl=el.hasOwnProperty,al=Aa.call(Object);function nl(l){if(!Ka(l)||Ma(l)!=Qn)return!1;var n=Fa(l);if(n===null)return!0;var a=tl.call(n,"constructor")&&n.constructor;return typeof a=="function"&&a instanceof a&&Aa.call(a)==al}function ll(l,n){return n.length<2?l:Ha(l,Rn(n,0,-1))}function il(l,n){return n=oa(n,l),l=ll(l,n),l==null||delete l[Ua(xn(n))]}function sl(l){return nl(l)?void 0:l}var rl=1,ol=2,cl=4,Ea=Yn(function(l,n){var a={};if(l==null)return a;var t=!1;n=Ga(n,function(s){return s=oa(s,l),t||(t=s.length>1),s}),Ba(l,_a(l),a),t&&(a=za(a,rl|ol|cl,sl));for(var i=n.length;i--;)il(a,n[i]);return a});function dl(l,n){return n=typeof n=="function"?n:void 0,l&&l.length?$a(l,void 0,n):[]}function ml(){const{adminClient:l}=le(),{whoAmI:n}=it(),[a,t]=u(),i=n.getUserId();return Ue(()=>l.users.findOne({id:i}),t,[i]),a}const ul=({realm:l,save:n})=>{const{adminClient:a}=le(),{t}=B(),{realm:i}=ne(),{addAlert:s,addError:p}=Te(),d=ml(),h=ve({defaultValues:l}),{control:o,handleSubmit:m,watch:P,reset:S,getValues:O}=h,y=()=>S(l),f=P("smtpServer.from",""),r=P("smtpServer.host",""),[b,v]=qe(),w=He({control:o,name:"smtpServer.auth",defaultValue:""}),E=async()=>{const x=F=>Number(F),k=F=>F==="true",L=new Map([["port",x],["ssl",k],["starttls",k],["auth",k]]),D={...O().smtpServer};for(const[F,g]of L.entries())D[F]=g(D[F]);D.port===0&&(D.port=null);try{v(),await a.realms.testSMTPConnection({realm:l.realm},D),s(t("testConnectionSuccess"),ie.success)}catch(F){p("testConnectionError",F)}v()};return e(re,{variant:"light",children:c(Ge,{...h,children:[e(Se,{title:t("template"),className:"kc-email-template",children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-v5-u-mt-lg",onSubmit:m(n),children:[e(fe,{name:"smtpServer.from",label:t("from"),type:"email",placeholder:t("smtpFromPlaceholder"),rules:{pattern:{value:kt,message:t("emailInvalid")},required:t("required")}}),e(fe,{name:"smtpServer.fromDisplayName",label:t("fromDisplayName"),labelIcon:t("fromDisplayNameHelp"),placeholder:t("smtpFromDisplayPlaceholder")}),e(fe,{name:"smtpServer.replyTo",label:t("replyTo"),type:"email",placeholder:t("replyToEmailPlaceholder"),rules:{pattern:{value:kt,message:t("emailInvalid")}}}),e(fe,{name:"smtpServer.replyToDisplayName",label:t("replyToDisplayName"),labelIcon:t("replyToDisplayNameHelp"),placeholder:t("replyToDisplayPlaceholder")}),e(fe,{name:"smtpServer.envelopeFrom",label:t("envelopeFrom"),labelIcon:t("envelopeFromHelp"),placeholder:t("senderEnvelopePlaceholder")})]})}),e(Se,{className:"kc-email-connection",title:t("connectionAndAuthentication"),children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-v5-u-mt-lg",onSubmit:m(n),children:[e(fe,{name:"smtpServer.host",label:t("host"),rules:{required:t("required")}}),e(fe,{name:"smtpServer.port",label:t("port"),placeholder:t("smtpPortPlaceholder")}),c(R,{label:t("encryption"),fieldId:"kc-html-display-name",children:[e(G,{name:"smtpServer.ssl",control:o,defaultValue:"false",render:({field:x})=>e(xt,{id:"kc-enable-ssl","data-testid":"enable-ssl",label:t("enableSSL"),isChecked:x.value==="true",onChange:(k,L)=>x.onChange(""+L)})}),e(G,{name:"smtpServer.starttls",control:o,defaultValue:"false",render:({field:x})=>e(xt,{id:"kc-enable-start-tls","data-testid":"enable-start-tls",label:t("enableStartTLS"),isChecked:x.value==="true",onChange:(k,L)=>x.onChange(""+L)})})]}),e(ca,{name:"smtpServer.auth",label:t("authentication"),defaultValue:"",labelOn:t("enabled"),labelOff:t("disabled"),stringify:!0}),w==="true"&&c(J,{children:[e(fe,{name:"smtpServer.user",label:t("username"),placeholder:t("loginUsernamePlaceholder"),rules:{required:t("required")}}),e(ja,{name:"smtpServer.password",label:t("password"),labelIcon:t("passwordHelp"),rules:{required:t("required")}})]}),d&&e(R,{id:"descriptionTestConnection",children:d.email?e(ht,{variant:"info",component:"h2",isInline:!0,title:t("testConnectionHint.withEmail",{email:d.email})}):e(ht,{variant:"warning",component:"h2",isInline:!0,title:t("testConnectionHint.withoutEmail",{userName:d.username}),actionLinks:e(qa,{component:x=>e(Pe,{...x,to:Wa({realm:i,id:d.id,tab:"settings"})}),children:t("testConnectionHint.withoutEmailAction")})})}),c(Ie,{children:[e(Et,{children:e(N,{variant:"primary",type:"submit","data-testid":"email-tab-save",children:t("save")})}),e(Et,{children:e(N,{variant:"secondary",onClick:()=>E(),"data-testid":"test-connection-button",isDisabled:!(kt.test(f)&&r)||!d?.email,"aria-describedby":"descriptionTestConnection",isLoading:b,spinnerAriaValueText:t("testingConnection"),children:t("testConnection")})}),e(Et,{children:e(N,{variant:"link",onClick:y,"data-testid":"email-tab-revert",children:t("revert")})})]})]})})]})})},pl=({realm:l,save:n})=>{const{adminClient:a}=le(),{realm:t}=ne(),[i,s]=u();return Ue(()=>a.users.getProfile({realm:t}),p=>s(p),[]),i?e(fl,{realm:l,save:n,userProfileConfig:i}):e(We,{})},hl=["all","external","none"],wt=[Ze.Disabled,Ze.Enabled,Ze.AdminView,Ze.AdminEdit];function fl({realm:l,save:n,userProfileConfig:a}){const{adminClient:t}=le(),{t:i}=B(),{realm:s}=ne(),p=ve(),{control:d,handleSubmit:h,setValue:o,formState:{isDirty:m,errors:P}}=p,O=Mt()(Ft.Organizations),y=()=>{if(Ve(l,o),o("unmanagedAttributePolicy",a.unmanagedAttributePolicy||wt[0]),l.attributes?.["acr.loa.map"]){const r=Object.entries(JSON.parse(l.attributes["acr.loa.map"])).flatMap(([b,v])=>({key:b,value:v}));r.concat({key:"",value:""}),o(It("attributes.acr.loa.map"),r)}};Ee(y,[]);const f=h(async({unmanagedAttributePolicy:r,...b})=>{const v={...a};r===Ze.Disabled?delete v.unmanagedAttributePolicy:v.unmanagedAttributePolicy=r,await n({...b,upConfig:v})});return e(re,{variant:"light",children:e(Ge,{...p,children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-u-mt-lg",onSubmit:f,children:[c(R,{label:i("realmId"),fieldId:"kc-realm-id",isRequired:!0,children:[e(G,{name:"realm",control:d,rules:{required:{value:!0,message:i("required")}},defaultValue:"",render:({field:r})=>e(An,{"data-testid":"realmName",onChange:r.onChange,children:r.value})}),P.realm&&e(Ja,{"data-testid":"realm-id-error",message:P.realm.message})]}),e(fe,{name:"displayName",label:i("displayName")}),e(fe,{name:"displayNameHtml",label:i("htmlDisplayName")}),e(fe,{name:It("attributes.frontendUrl"),type:"url",label:i("frontendUrl"),labelIcon:i("frontendUrlHelp")}),e(nt,{name:"sslRequired",label:i("requireSsl"),labelIcon:i("requireSslHelp"),controller:{defaultValue:"none"},options:hl.map(r=>({key:r,value:i(`sslType.${r}`)}))}),e(R,{label:i("acrToLoAMapping"),fieldId:"acrToLoAMapping",labelIcon:e(V,{helpText:i("acrToLoAMappingHelp"),fieldLabelId:"acrToLoAMapping"}),children:e(En,{label:i("acrToLoAMapping"),name:It("attributes.acr.loa.map")})}),e(Ot,{name:"userManagedAccessAllowed",label:i("userManagedAccess"),labelIcon:i("userManagedAccessHelp")}),O&&e(Ot,{name:"organizationsEnabled",label:i("organizationsEnabled"),labelIcon:i("organizationsEnabledHelp")}),e(nt,{name:"unmanagedAttributePolicy",label:i("unmanagedAttributes"),labelIcon:i("unmanagedAttributesHelpText"),controller:{defaultValue:wt[0]},options:wt.map(r=>({key:r,value:i(`unmanagedAttributePolicy.${r}`)}))}),e(R,{label:i("endpoints"),labelIcon:e(V,{helpText:i("endpointsHelp"),fieldLabelId:"endpoints"}),fieldId:"kc-endpoints",children:c(da,{children:[e(Fe,{children:e(Nt,{href:`${qt(t.baseUrl)}realms/${s}/.well-known/openid-configuration`,title:i("openIDEndpointConfiguration")})}),e(Fe,{children:e(Nt,{href:`${qt(t.baseUrl)}realms/${s}/protocol/saml/descriptor`,title:i("samlIdentityProviderMetadata")})})]})}),c(Ie,{children:[e(N,{variant:"primary",type:"submit","data-testid":"general-tab-save",isDisabled:!m,children:i("save")}),e(N,{"data-testid":"general-tab-revert",variant:"link",onClick:y,children:i("revert")})]})]})})})}const bl=({realm:l,refresh:n})=>{const{adminClient:a}=le(),{t}=B(),{addAlert:i,addError:s}=Te(),{realm:p}=ne(),d=async h=>{const o=Array.isArray(h)?Object.keys(h[0])[0]:Object.keys(h)[0];try{await a.realms.update({realm:p},Array.isArray(h)?h.reduce((m,P)=>Object.assign(m,P),l):Object.assign(l,h)),i(t("enableSwitchSuccess",{switch:t(o)})),n()}catch(m){s(t("enableSwitchError"),m)}};return c(re,{variant:"light",children:[e(Se,{className:"kc-login-screen",title:t("loginScreenCustomization"),children:c(ae,{isHorizontal:!0,role:"manage-realm",children:[e(R,{label:t("registrationAllowed"),fieldId:"kc-user-reg",labelIcon:e(V,{helpText:t("userRegistrationHelpText"),fieldLabelId:"registrationAllowed"}),hasNoPaddingTop:!0,children:e(be,{id:"kc-user-reg-switch","data-testid":"user-reg-switch",value:l.registrationAllowed?"on":"off",label:t("on"),labelOff:t("off"),isChecked:l.registrationAllowed,onChange:(h,o)=>{d({registrationAllowed:o})},"aria-label":t("registrationAllowed")})}),e(R,{label:t("resetPasswordAllowed"),fieldId:"kc-forgot-pw",labelIcon:e(V,{helpText:t("forgotPasswordHelpText"),fieldLabelId:"resetPasswordAllowed"}),hasNoPaddingTop:!0,children:e(be,{id:"kc-forgot-pw-switch","data-testid":"forgot-pw-switch",name:"resetPasswordAllowed",value:l.resetPasswordAllowed?"on":"off",label:t("on"),labelOff:t("off"),isChecked:l.resetPasswordAllowed,onChange:(h,o)=>{d({resetPasswordAllowed:o})},"aria-label":t("resetPasswordAllowed")})}),e(R,{label:t("rememberMe"),fieldId:"kc-remember-me",labelIcon:e(V,{helpText:t("rememberMeHelpText"),fieldLabelId:"rememberMe"}),hasNoPaddingTop:!0,children:e(be,{id:"kc-remember-me-switch","data-testid":"remember-me-switch",value:l.rememberMe?"on":"off",label:t("on"),labelOff:t("off"),isChecked:l.rememberMe,onChange:(h,o)=>{d({rememberMe:o})},"aria-label":t("rememberMe")})})]})}),e(Se,{className:"kc-email-settings",title:t("emailSettings"),children:c(ae,{isHorizontal:!0,role:"manage-realm",children:[e(R,{label:t("registrationEmailAsUsername"),fieldId:"kc-email-as-username",labelIcon:e(V,{helpText:t("emailAsUsernameHelpText"),fieldLabelId:"registrationEmailAsUsername"}),hasNoPaddingTop:!0,children:e(be,{id:"kc-email-as-username-switch","data-testid":"email-as-username-switch",value:l.registrationEmailAsUsername?"on":"off",label:t("on"),labelOff:t("off"),isChecked:l.registrationEmailAsUsername,onChange:(h,o)=>{d([{registrationEmailAsUsername:o},{duplicateEmailsAllowed:!1}])},"aria-label":t("registrationEmailAsUsername")})}),e(R,{label:t("loginWithEmailAllowed"),fieldId:"kc-login-with-email",labelIcon:e(V,{helpText:t("loginWithEmailHelpText"),fieldLabelId:"loginWithEmailAllowed"}),hasNoPaddingTop:!0,children:e(be,{id:"kc-login-with-email-switch","data-testid":"login-with-email-switch",value:l.loginWithEmailAllowed?"on":"off",label:t("on"),labelOff:t("off"),isChecked:l.loginWithEmailAllowed,onChange:(h,o)=>{d([{loginWithEmailAllowed:o},{duplicateEmailsAllowed:!1}])},"aria-label":t("loginWithEmailAllowed")})}),e(R,{label:t("duplicateEmailsAllowed"),fieldId:"kc-duplicate-emails",labelIcon:e(V,{helpText:t("duplicateEmailsHelpText"),fieldLabelId:"duplicateEmailsAllowed"}),hasNoPaddingTop:!0,children:e(be,{id:"kc-duplicate-emails-switch","data-testid":"duplicate-emails-switch",label:t("on"),labelOff:t("off"),isChecked:l.duplicateEmailsAllowed,onChange:(h,o)=>{d({duplicateEmailsAllowed:o})},isDisabled:l.loginWithEmailAllowed||l.registrationEmailAsUsername,"aria-label":t("duplicateEmailsAllowed")})}),e(R,{label:t("verifyEmail"),fieldId:"kc-verify-email",labelIcon:e(V,{helpText:t("verifyEmailHelpText"),fieldLabelId:"verifyEmail"}),hasNoPaddingTop:!0,children:e(be,{id:"kc-verify-email-switch","data-testid":"verify-email-switch",name:"verifyEmail",value:l.verifyEmail?"on":"off",label:t("on"),labelOff:t("off"),isChecked:l.verifyEmail,onChange:(h,o)=>{d({verifyEmail:o})},"aria-label":t("verifyEmail")})})]})}),e(Se,{className:"kc-user-info-settings",title:t("userInfoSettings"),children:e(ae,{isHorizontal:!0,role:"manage-realm",children:e(R,{label:t("editUsernameAllowed"),fieldId:"kc-edit-username",labelIcon:e(V,{helpText:t("editUsernameHelp"),fieldLabelId:"editUsernameAllowed"}),hasNoPaddingTop:!0,children:e(be,{id:"kc-edit-username-switch","data-testid":"edit-username-switch",value:l.editUsernameAllowed?"on":"off",label:t("on"),labelOff:t("off"),isChecked:l.editUsernameAllowed,onChange:(h,o)=>{d({editUsernameAllowed:o})},"aria-label":t("editUsernameAllowed")})})})})]})},gl=({isOpen:l,onClose:n})=>{const{adminClient:a}=le(),{t}=B(),{realm:i}=ne(),{addAlert:s,addError:p}=Te(),[d,h]=u(!1),[o,m]=u(!1),[P,S]=u(!1),O=d||o;async function y(){S(!0);try{const f=await a.realms.export({realm:i,exportClients:o,exportGroupsAndRoles:d});Xa.saveAs(new Blob([lt(f)],{type:"application/json"}),"realm-export.json"),s(t("exportSuccess"),ie.success),n()}catch(f){p("exportFail",f)}S(!1)}return c(je,{variant:Xe.small,title:t("partialExport"),isOpen:l,onClose:n,actions:[e(N,{"data-testid":"export-button",isDisabled:P,onClick:y,children:t("export")},"export"),e(N,{"data-testid":"cancel-button",variant:se.link,onClick:n,children:t("cancel")},"cancel")],children:[e(st,{children:e(Re,{children:t("partialExportHeaderText")})}),c(rt,{isHorizontal:!0,className:"keycloak__realm-settings__partial-import_form",children:[e(R,{label:t("includeGroupsAndRoles"),fieldId:"include-groups-and-roles-check",hasNoPaddingTop:!0,children:e(be,{id:"include-groups-and-roles-check","data-testid":"include-groups-and-roles-check",isChecked:d,onChange:(f,r)=>h(r),label:t("on"),labelOff:t("off"),"aria-label":t("includeGroupsAndRoles")})}),e(R,{label:t("includeClients"),fieldId:"include-clients-check",hasNoPaddingTop:!0,children:e(be,{id:"include-clients-check","data-testid":"include-clients-check",onChange:(f,r)=>m(r),isChecked:o,label:t("on"),labelOff:t("off"),"aria-label":t("includeClients")})})]}),O&&e(ht,{"data-testid":"warning-message",variant:"warning",component:"p",title:t("exportWarningTitle"),isInline:!0,children:t("exportWarningDescription")})]})},la={users:!1,clients:!1,groups:!1,identityProviders:!1,realmRoles:!1,clientRoles:!1},vl=l=>{const{adminClient:n}=le(),{t:a}=B(),{realm:t}=ne(),[i,s]=u(),p=!!i,[d,h]=u(!1),[o,m]=u(!1),[P,S]=u(!1),[O,y]=u("FAIL"),[f,r]=u({}),[b,v]=u(),{addError:w}=Te(),[E,x]=u(la),k=Object.values(E).some(T=>T),L=()=>{x(la)},D=()=>{s(void 0),r({}),y("FAIL"),L()};Ee(()=>{S(!1),v(void 0),D()},[l.open]);const F=T=>{D(),s(T),Array.isArray(T)?T.length>0&&r(T[0]):r(T)},g=T=>{r(T),h(!1),L()},I=(T,ee)=>{const De=ee.currentTarget.name;x({...E,[De]:T})},M=T=>T.map(ee=>e(te,{value:ee,"data-testid":ee.id+"-select-option",children:ee.realm||ee.id},ee.id)),_=T=>{y(T),m(!1)},K=()=>[e(te,{value:"FAIL",children:a("FAIL")},"fail"),e(te,{value:"SKIP",children:a("SKIP")},"skip"),e(te,{value:"OVERWRITE",children:a("OVERWRITE")},"overwrite")],q=()=>X("users")||X("groups")||X("clients")||X("identityProviders")||me()||ue(),X=T=>{const ee=f[T];return ee!==void 0&&ee.length>0},me=()=>{const T=f.roles?.realm;return T!==void 0&&T.length>0},ue=()=>{const T=f.roles?.client;return T!==void 0&&Object.keys(T).length>0},Le=T=>p?T==="realmRoles"?f.roles?.realm?.length??0:T==="clientRoles"?ue()?pe(f.roles.client):0:f[T]?.length??0:0,pe=T=>Object.values(T).reduce((ee,De)=>ee+De.length,0),ce=(T,ee)=>e(Ta,{"aria-labelledby":`${T}-list-item`,children:e(Ca,{children:e(Sa,{dataListCells:[e(Vt,{children:e(xt,{id:`${T}-checkbox`,label:`${Le(T)} ${ee}`,"aria-labelledby":`${T}-checkbox`,name:T,isChecked:E[T],onChange:(De,Ct)=>I(Ct,De),"data-testid":T+"-checkbox"})},T)]})})}),Ce=()=>{const T={ifResourceExists:O,id:f.id,realm:f.realm};return E.users&&(T.users=f.users),E.groups&&(T.groups=f.groups),E.identityProviders&&(T.identityProviders=f.identityProviders),E.clients&&(T.clients=f.clients),(E.realmRoles||E.clientRoles)&&(T.roles=f.roles,E.realmRoles||delete T.roles?.realm,E.clientRoles||delete T.roles?.client),T};async function C(){if(!P){S(!0);try{const T=await n.realms.partialImport({realm:t,rep:Ce()});v(T)}catch(T){w("importFail",T)}S(!1)}}const A=()=>e(je,{variant:Xe.medium,title:a("partialImport"),isOpen:l.open,onClose:l.toggleDialog,actions:[e(N,{id:"modal-import","data-testid":"import-button",isDisabled:!k,onClick:()=>{C()},children:a("import")},"import"),e(N,{id:"modal-cancel","data-testid":"cancel-button",variant:se.link,onClick:()=>{l.toggleDialog()},children:a("cancel")},"cancel")],children:c(da,{hasGutter:!0,children:[e(Fe,{children:e(st,{children:e(Re,{children:a("partialImportHeaderText")})})}),e(Fe,{children:e(wn,{id:"partial-import-file",allowEditingUploadedText:!0,onChange:F})}),p&&q()&&c(J,{children:[e(Fe,{children:e(Be,{})}),Array.isArray(i)&&i.length>1&&c(Fe,{children:[c(Re,{children:[a("selectRealm"),":"]}),e(ge,{toggleId:"realm-selector",isOpen:d,typeAheadAriaLabel:a("realmSelector"),"aria-label":"realmSelector",onToggle:()=>h(!d),onSelect:T=>g(T),placeholderText:f.realm||f.id,children:M(i)})]}),c(Fe,{children:[c(Re,{children:[a("chooseResources"),":"]}),c(ya,{"aria-label":a("resourcesToImport"),isCompact:!0,children:[X("users")&&ce("users",a("users")),X("groups")&&ce("groups",a("groups")),X("clients")&&ce("clients",a("clients")),X("identityProviders")&&ce("identityProviders",a("identityProviders")),me()&&ce("realmRoles",a("realmRoles")),ue()&&ce("clientRoles",a("clientRoles"))]})]}),c(Fe,{children:[c(Re,{children:[a("selectIfResourceExists"),":"]}),e(ge,{isOpen:o,direction:"up",onToggle:()=>{m(!o)},onSelect:_,placeholderText:a(O),children:K()})]})]})]})}),Z=()=>`${a("importAdded",{count:b?.added})}  ${a("importSkipped",{count:b?.skipped})} ${a("importOverwritten",{count:b?.overwritten})}`,H=async(T=0,ee=15)=>{if(!b)return[];const De=Math.min(T+ee,b.results.length);return b.results.slice(T,De)},de=T=>{switch(T.action){case"ADDED":return e(pt,{color:"green",children:a("added")},T.id);case"SKIPPED":return e(pt,{color:"orange",children:a("skipped")},T.id);case"OVERWRITTEN":return e(pt,{color:"purple",children:a("overwritten")},T.id);default:return""}},W=T=>{const ee=new Map([["CLIENT",a("clients")],["REALM_ROLE",a("realmRoles")],["USER",a("users")],["CLIENT_ROLE",a("clientRoles")],["IDP",a("identityProviders")],["GROUP",a("groups")]]);return e("span",{children:ee.get(T.resourceType)})},he=()=>c(je,{variant:Xe.medium,title:a("partialImport"),isOpen:l.open,onClose:l.toggleDialog,actions:[e(N,{id:"modal-close","data-testid":"close-button",variant:se.primary,onClick:()=>{l.toggleDialog()},children:a("close")},"close")],children:[e(ht,{variant:"success",component:"p",isInline:!0,title:Z()}),e(ze,{loader:H,isPaginated:!0,ariaLabelKey:"partialImport",columns:[{name:"action",displayKey:"action",cellRenderer:de},{name:"resourceType",displayKey:"type",cellRenderer:W},{name:"resourceName",displayKey:"name"},{name:"id",displayKey:"id"}]})]});return b?he():A()},yl=()=>{const{adminClient:l}=le(),{t:n}=B(),{addAlert:a,addError:t}=Te(),{realm:i}=ne(),s=Ye(),[p,d]=u(!1),[h,o]=u(),[m,P]=u(),[S,O]=u(0),[y,f]=u(),[r,b]=u(),v=()=>O(S+1),w=ve({mode:"onChange"});Ue(()=>l.clientPolicies.listPolicies({includeGlobalPolicies:!0}),g=>{const I=g.globalPolicies?.map(K=>({...K,global:!0})),M=g.policies?.map(K=>({...K,global:!1})),_=I?.concat(M??[]);o(_),b(_||[]),f(lt(_))},[S]);const E=async()=>h??[],x=async()=>{const g=w.getValues(),I=h?.filter(M=>!M.global).map(M=>{const _=g[M.name],K={...M,enabled:_};return delete K.global,K});try{await l.clientPolicies.updatePolicy({policies:I}),s(Dt({realm:i,tab:"policies"})),a(n("updateClientPolicySuccess"),ie.success)}catch(M){t("updateClientPolicyError",M)}},k=g=>Ea(g,"global"),L=async()=>{if(y)try{const g=JSON.parse(y),I=g.filter(_=>!_.global).map(_=>k(_)),M=g.filter(_=>_.global).map(_=>k(_));try{await l.clientPolicies.updatePolicy({policies:I,globalPolicies:M}),a(n("updateClientPoliciesSuccess"),ie.success),v()}catch(_){t("updateClientPoliciesError",_)}}catch(g){console.warn("Invalid json, ignoring value using {}"),t("invalidJsonClientPoliciesError",g)}},[D,F]=ye({titleKey:n("deleteClientPolicyConfirmTitle"),messageKey:n("deleteClientPolicyConfirm",{policyName:m?.name}),continueButtonLabel:n("delete"),continueButtonVariant:se.danger,onConfirm:async()=>{const g=h?.filter(I=>!I.global&&I.name!==m?.name).map(I=>{const M={...I};return delete M.global,M});try{await l.clientPolicies.updatePolicy({policies:g}),a(n("deleteClientPolicySuccess"),ie.success),v()}catch(I){t(n("deleteClientPolicyError"),I)}}});return h?c(J,{children:[e(F,{}),e(re,{children:c(_t,{className:"kc-policies-config-section",children:[e(Oe,{children:e(ma,{headingLevel:"h1",size:"md",children:n("policiesConfigType")})}),e(Oe,{children:e(ft,{isChecked:!p,name:"policiesView",onChange:()=>d(!1),label:n("policiesConfigTypes.formView"),id:"formView-policiesView","data-testid":"formView-policiesView",className:"kc-form-radio-btn pf-v5-u-mr-sm pf-v5-u-ml-sm"})}),e(Oe,{children:e(ft,{isChecked:p,name:"policiesView",onChange:()=>d(!0),label:n("policiesConfigTypes.jsonEditor"),id:"jsonEditor-policiesView","data-testid":"jsonEditor-policiesView",className:"kc-editor-radio-btn"})})]})}),e(Be,{}),p?c(J,{children:[e("div",{className:"pf-v5-u-mt-md pf-v5-u-ml-lg",children:e(zt,{isLineNumbersVisible:!0,isLanguageLabelVisible:!0,isReadOnly:!1,code:y,language:$t.json,height:"30rem",onChange:f})}),c("div",{className:"pf-v5-u-mt-md",children:[e(N,{variant:se.primary,className:"pf-v5-u-mr-md pf-v5-u-ml-lg","data-testid":"jsonEditor-policies-saveBtn",onClick:L,children:n("save")}),e(N,{variant:se.link,"data-testid":"jsonEditor-reloadBtn",onClick:()=>{f(lt(r))},children:n("reload")})]})]}):e(ze,{emptyState:e(xe,{message:n("noClientPolicies"),instructions:n("noClientPoliciesInstructions"),primaryActionText:n("createClientPolicy"),onPrimaryAction:()=>s(Wt({realm:i}))}),ariaLabelKey:"clientPolicies",searchPlaceholderKey:"clientPolicySearch",loader:E,toolbarItem:e(Ae,{children:e(N,{id:"createPolicy",component:g=>e(Pe,{...g,to:Wt({realm:i})}),"data-testid":"createPolicy",children:n("createClientPolicy")})}),isRowDisabled:g=>!!g.global,actions:[{title:n("delete"),onRowClick:g=>{D(),P(g)}}],columns:[{name:"name",cellRenderer:({name:g})=>e(Pe,{to:Ya({realm:i,policyName:g}),children:g})},{name:"enabled",displayKey:"status",cellRenderer:g=>e(Tl,{clientPolicy:g,form:w,saveStatus:x,onConfirm:()=>{w.setValue(g.name,!1),x()}})},{name:"description"}]},h.length)]}):e(We,{})},Tl=({clientPolicy:l,form:n,saveStatus:a,onConfirm:t})=>{const{t:i}=B(),[s,p]=ye({titleKey:"disablePolicyConfirmTitle",messageKey:"disablePolicyConfirm",continueButtonLabel:"disable",onConfirm:t});return c(J,{children:[e(p,{}),e(G,{name:l.name,"data-testid":`${l.name}-switch`,defaultValue:l.enabled,control:n.control,render:({field:d})=>e(be,{label:i("enabled"),labelOff:i("disabled"),isChecked:d.value,isDisabled:l.global,onChange:(h,o)=>{o?(d.onChange(o),a()):s()},"aria-label":l.name})})]})};function Cl(){const{adminClient:l}=le(),{t:n}=B(),{realm:a}=ne(),{addAlert:t,addError:i}=Te(),[s,p]=u(),[d,h]=u(),[o,m]=u(),[P,S]=u(!1),[O,y]=u(),[f,r]=u(0);Ue(()=>l.clientPolicies.listProfiles({includeGlobalProfiles:!0}),L=>{h(L.globalProfiles);const D=L.globalProfiles?.map(I=>({...I,global:!0})),F=L.profiles?.map(I=>({...I,global:!1})),g=D?.concat(F??[]);p(g||[]),y(JSON.stringify(g,null,2))},[f]);const b=async()=>s??[],v=L=>Ea(L,"global"),[w,E]=ye({titleKey:n("deleteClientProfileConfirmTitle"),messageKey:n("deleteClientProfileConfirm",{profileName:o?.name}),continueButtonLabel:n("delete"),continueButtonVariant:se.danger,onConfirm:async()=>{const L=s?.filter(D=>D.name!==o?.name&&!D.global).map(D=>v(D));try{await l.clientPolicies.createProfiles({profiles:L,globalProfiles:d}),t(n("deleteClientSuccess"),ie.success),r(f+1)}catch(D){i(n("deleteClientError"),D)}}}),x=L=>c(Pe,{to:Za({realm:a,profileName:L.name}),children:[L.name," ",L.global&&e(pt,{color:"blue",children:n("global")})]},L.name);if(!s)return e(We,{});const k=async()=>{if(O)try{const L=JSON.parse(O),D=L.filter(g=>!g.global).map(g=>v(g)),F=L.filter(g=>g.global).map(g=>v(g));try{await l.clientPolicies.createProfiles({profiles:D,globalProfiles:F}),t(n("updateClientProfilesSuccess"),ie.success),r(f+1)}catch(g){i("updateClientProfilesError",g)}}catch(L){i("invalidJsonClientProfilesError",L)}};return c(J,{children:[e(E,{}),e(re,{children:c(_t,{className:"kc-profiles-config-section",children:[e(Oe,{children:e(ma,{headingLevel:"h1",size:"md",children:n("profilesConfigType")})}),e(Oe,{children:e(ft,{isChecked:!P,name:"profilesView",onChange:()=>S(!1),label:n("profilesConfigTypes.formView"),id:"formView-profilesView",className:"kc-form-radio-btn pf-v5-u-mr-sm pf-v5-u-ml-sm","data-testid":"formView-profilesView"})}),e(Oe,{children:e(ft,{isChecked:P,name:"profilesView",onChange:()=>S(!0),label:n("profilesConfigTypes.jsonEditor"),id:"jsonEditor-profilesView",className:"kc-editor-radio-btn","data-testid":"jsonEditor-profilesView"})})]})}),e(Be,{}),P?c(R,{fieldId:"jsonEditor",children:[e("div",{className:"pf-v5-u-mt-md pf-v5-u-ml-lg",children:e(zt,{isLineNumbersVisible:!0,isLanguageLabelVisible:!0,isReadOnly:!1,code:O,language:$t.json,height:"30rem",onChange:L=>{y(L??"")}})}),e(Ie,{children:c("div",{className:"pf-v5-u-mt-md",children:[e(N,{variant:se.primary,className:"pf-v5-u-mr-md pf-v5-u-ml-lg",onClick:k,"data-testid":"jsonEditor-saveBtn",children:n("save")}),e(N,{variant:se.link,onClick:()=>{y(lt(s))},"data-testid":"jsonEditor-reloadBtn",children:n("reload")})]})})]}):e(ze,{ariaLabelKey:"profiles",searchPlaceholderKey:"clientProfileSearch",loader:b,toolbarItem:e(Ae,{children:e(N,{id:"createProfile",component:L=>e(Pe,{...L,to:Qa({realm:a,tab:"profiles"})}),"data-testid":"createProfile",children:n("createClientProfile")})}),isRowDisabled:L=>L.global,actions:[{title:n("delete"),onRowClick:L=>{m(L),w()}}],columns:[{name:"name",displayKey:n("name"),cellRenderer:x},{name:"description",displayKey:n("clientProfileDescription")}],emptyState:e(xe,{message:n("emptyClientProfiles"),instructions:n("emptyClientProfilesInstructions")})},s.length)]})}const Sl=({realm:l,save:n})=>{const{t:a}=B(),{setValue:t,control:i,handleSubmit:s,formState:p}=ve(),d=He({control:i,name:"offlineSessionMaxLifespanEnabled"}),h=()=>{Ve(l,t)};return Ee(h,[]),c(re,{variant:"light",children:[e(Se,{title:a("SSOSessionSettings"),className:"kc-sso-session-template",children:c(ae,{isHorizontal:!0,role:"manage-realm",onSubmit:s(n),children:[e(R,{label:a("SSOSessionIdle"),fieldId:"SSOSessionIdle",labelIcon:e(V,{helpText:a("ssoSessionIdle"),fieldLabelId:"SSOSessionIdle"}),children:e(G,{name:"ssoSessionIdleTimeout",defaultValue:l.ssoSessionIdleTimeout,control:i,render:({field:o})=>e(Q,{className:"kc-sso-session-idle","data-testid":"sso-session-idle-input",value:o.value,onChange:o.onChange,units:["minute","hour","day"]})})}),e(R,{label:a("SSOSessionMax"),fieldId:"SSOSessionMax",labelIcon:e(V,{helpText:a("ssoSessionMax"),fieldLabelId:"SSOSessionMax"}),children:e(G,{name:"ssoSessionMaxLifespan",control:i,render:({field:o})=>e(Q,{className:"kc-sso-session-max","data-testid":"sso-session-max-input",value:o.value,onChange:o.onChange,units:["minute","hour","day"]})})}),e(R,{label:a("SSOSessionIdleRememberMe"),fieldId:"SSOSessionIdleRememberMe",labelIcon:e(V,{helpText:a("ssoSessionIdleRememberMe"),fieldLabelId:"SSOSessionIdleRememberMe"}),children:e(G,{name:"ssoSessionIdleTimeoutRememberMe",control:i,render:({field:o})=>e(Q,{className:"kc-sso-session-idle-remember-me","data-testid":"sso-session-idle-remember-me-input",value:o.value,onChange:o.onChange,units:["minute","hour","day"]})})}),e(R,{label:a("SSOSessionMaxRememberMe"),fieldId:"SSOSessionMaxRememberMe",labelIcon:e(V,{helpText:a("ssoSessionMaxRememberMe"),fieldLabelId:"SSOSessionMaxRememberMe"}),children:e(G,{name:"ssoSessionMaxLifespanRememberMe",control:i,render:({field:o})=>e(Q,{className:"kc-sso-session-max-remember-me","data-testid":"sso-session-max-remember-me-input",value:o.value,onChange:o.onChange,units:["minute","hour","day"]})})})]})}),e(Se,{title:a("clientSessionSettings"),className:"kc-client-session-template",children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-v5-u-mt-lg",onSubmit:s(n),children:[e(R,{label:a("clientSessionIdle"),fieldId:"clientSessionIdle",labelIcon:e(V,{helpText:a("clientSessionIdleHelp"),fieldLabelId:"clientSessionIdle"}),children:e(G,{name:"clientSessionIdleTimeout",control:i,render:({field:o})=>e(Q,{className:"kc-client-session-idle","data-testid":"client-session-idle-input",value:o.value,onChange:o.onChange,units:["minute","hour","day"]})})}),e(R,{label:a("clientSessionMax"),fieldId:"clientSessionMax",labelIcon:e(V,{helpText:a("clientSessionMaxHelp"),fieldLabelId:"clientSessionMax"}),children:e(G,{name:"clientSessionMaxLifespan",control:i,render:({field:o})=>e(Q,{className:"kc-client-session-max","data-testid":"client-session-max-input",value:o.value,onChange:o.onChange,units:["minute","hour","day"]})})})]})}),e(Se,{title:a("offlineSessionSettings"),className:"kc-offline-session-template",children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-v5-u-mt-lg",onSubmit:s(n),children:[e(R,{label:a("offlineSessionIdle"),fieldId:"offlineSessionIdle",labelIcon:e(V,{helpText:a("offlineSessionIdleHelp"),fieldLabelId:"offlineSessionIdle"}),children:e(G,{name:"offlineSessionIdleTimeout",control:i,render:({field:o})=>e(Q,{className:"kc-offline-session-idle","data-testid":"offline-session-idle-input","aria-label":"offline-session-idle-input",value:o.value,onChange:o.onChange,units:["minute","hour","day"]})})}),e(R,{hasNoPaddingTop:!0,label:a("offlineSessionMaxLimited"),fieldId:"kc-offlineSessionMaxLimited",labelIcon:e(V,{helpText:a("offlineSessionMaxLimitedHelp"),fieldLabelId:"offlineSessionMaxLimited"}),children:e(G,{name:"offlineSessionMaxLifespanEnabled",control:i,defaultValue:!1,render:({field:o})=>e(be,{id:"kc-offline-session-max","data-testid":"offline-session-max-switch","aria-label":a("offlineSessionMaxLimited"),label:a("enabled"),labelOff:a("disabled"),isChecked:o.value,onChange:o.onChange})})}),d&&e(R,{label:a("offlineSessionMax"),fieldId:"offlineSessionMax",id:"offline-session-max-label",labelIcon:e(V,{helpText:a("offlineSessionMaxHelp"),fieldLabelId:"offlineSessionMax"}),children:e(G,{name:"offlineSessionMaxLifespan",control:i,render:({field:o})=>e(Q,{className:"kc-offline-session-max","data-testid":"offline-session-max-input",value:o.value,onChange:o.onChange,units:["minute","hour","day"]})})})]})}),e(Se,{className:"kc-login-settings-template",title:a("loginSettings"),children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-v5-u-mt-lg",onSubmit:s(n),children:[e(R,{label:a("loginTimeout"),id:"kc-login-timeout-label",fieldId:"offlineSessionIdle",labelIcon:e(V,{helpText:a("loginTimeoutHelp"),fieldLabelId:"loginTimeout"}),children:e(G,{name:"accessCodeLifespanLogin",control:i,render:({field:o})=>e(Q,{className:"kc-login-timeout","data-testid":"login-timeout-input","aria-label":"login-timeout-input",value:o.value,onChange:o.onChange,units:["minute","hour","day"]})})}),e(R,{label:a("loginActionTimeout"),fieldId:"loginActionTimeout",id:"login-action-timeout-label",labelIcon:e(V,{helpText:a("loginActionTimeoutHelp"),fieldLabelId:"loginActionTimeout"}),children:e(G,{name:"accessCodeLifespanUserAction",control:i,render:({field:o})=>e(Q,{className:"kc-login-action-timeout","data-testid":"login-action-timeout-input",value:o.value,onChange:o.onChange,units:["minute","hour","day"]})})}),c(Ie,{children:[e(N,{variant:"primary",type:"submit","data-testid":"sessions-tab-save",isDisabled:!p.isDirty,children:a("save")}),e(N,{variant:"link",onClick:h,children:a("revert")})]})]})})]})},kl=({realm:l,save:n})=>{const{t:a}=B(),[t,i]=u(!1),[s,p]=u(!1),[d,h]=u(!1),[o,m]=u(!1),{control:P,handleSubmit:S,setValue:O}=ve(),y=_e().themes,f=()=>{Ve(l,O)};return Ee(f,[]),e(re,{variant:"light",children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-v5-u-mt-lg",onSubmit:S(n),children:[e(R,{label:a("loginTheme"),fieldId:"kc-login-theme",labelIcon:e(V,{helpText:a("loginThemeHelp"),fieldLabelId:"loginTheme"}),children:e(G,{name:"loginTheme",control:P,defaultValue:"",render:({field:r})=>e(ge,{toggleId:"kc-login-theme",onToggle:()=>i(!t),onSelect:b=>{r.onChange(b),i(!1)},selections:r.value,variant:ke.single,isOpen:t,placeholderText:a("selectATheme"),"data-testid":"select-login-theme","aria-label":a("selectLoginTheme"),children:y.login.map((b,v)=>e(te,{selected:b.name===r.value,value:b.name,children:a(b.name)},`login-theme-${v}`))})})}),e(R,{label:a("accountTheme"),fieldId:"kc-account-theme",labelIcon:e(V,{helpText:a("accountThemeHelp"),fieldLabelId:"accountTheme"}),children:e(G,{name:"accountTheme",control:P,defaultValue:"",render:({field:r})=>e(ge,{toggleId:"kc-account-theme",onToggle:()=>p(!s),onSelect:b=>{r.onChange(b),p(!1)},selections:r.value,variant:ke.single,"aria-label":a("selectAccountTheme"),isOpen:s,placeholderText:a("selectATheme"),"data-testid":"select-account-theme",children:y.account.filter(b=>b.name!=="base").map((b,v)=>e(te,{selected:b.name===r.value,value:b.name,children:a(b.name)},`account-theme-${v}`))})})}),e(R,{label:a("adminTheme"),fieldId:"kc-admin-ui-theme",labelIcon:e(V,{helpText:a("adminThemeHelp"),fieldLabelId:"adminTheme"}),children:e(G,{name:"adminTheme",control:P,defaultValue:"",render:({field:r})=>e(ge,{toggleId:"kc-admin-ui-theme",onToggle:()=>h(!d),onSelect:b=>{r.onChange(b),h(!1)},selections:r.value,variant:ke.single,isOpen:d,placeholderText:a("selectATheme"),"data-testid":"select-admin-theme","aria-label":a("selectAdminTheme"),children:y.admin.filter(b=>b.name!=="base").map((b,v)=>e(te,{selected:b.name===r.value,value:b.name,children:a(b.name)},`admin-theme-${v}`))})})}),e(R,{label:a("emailTheme"),fieldId:"kc-email-theme",labelIcon:e(V,{helpText:a("emailThemeHelp"),fieldLabelId:"emailTheme"}),children:e(G,{name:"emailTheme",control:P,defaultValue:"",render:({field:r})=>e(ge,{toggleId:"kc-email-theme",onToggle:()=>m(!o),onSelect:b=>{r.onChange(b),m(!1)},selections:r.value,variant:ke.single,isOpen:o,placeholderText:a("selectATheme"),"data-testid":"select-email-theme","aria-label":a("selectEmailTheme"),children:y.email.map((b,v)=>e(te,{selected:b.name===r.value,value:b.name,children:a(b.name)},`email-theme-${v}`))})})}),c(Ie,{children:[e(N,{variant:"primary",type:"submit","data-testid":"themes-tab-save",children:a("save")}),e(N,{variant:"link",onClick:f,children:a("revert")})]})]})})},Il=({realm:l,reset:n,save:a})=>{const{t}=B(),i=_e(),s=Mt(),{whoAmI:p}=it(),[d,h]=u(!1),o=en(i.providers.signature.providers),m=ve(),{setValue:P,control:S}=m,O=He({control:S,name:"offlineSessionMaxLifespanEnabled",defaultValue:l.offlineSessionMaxLifespanEnabled}),y=He({control:S,name:"ssoSessionIdleTimeout",defaultValue:36e3}),f=He({control:S,name:"revokeRefreshToken",defaultValue:!1});return Ee(()=>{Ve(l,P)},[]),c(re,{variant:"light",children:[e(Se,{title:t("general"),className:"kc-sso-session-template",children:c(ae,{isHorizontal:!0,role:"manage-realm",onSubmit:m.handleSubmit(a),children:[e(R,{label:t("defaultSigAlg"),fieldId:"kc-default-signature-algorithm",labelIcon:e(V,{helpText:t("defaultSigAlgHelp"),fieldLabelId:"algorithm"}),children:e(G,{name:"defaultSignatureAlgorithm",defaultValue:"RS256",control:m.control,render:({field:r})=>e(ge,{toggleId:"kc-default-sig-alg",onToggle:()=>h(!d),onSelect:b=>{r.onChange(b.toString()),h(!1)},selections:r.value?.toString(),variant:ke.single,"aria-label":t("defaultSigAlg"),isOpen:d,"data-testid":"select-default-sig-alg",children:o.map((b,v)=>e(te,{selected:b===r.value,value:b,children:b},`default-sig-alg-${v}`))})})}),s(Ft.DeviceFlow)&&c(J,{children:[e(R,{label:t("oAuthDeviceCodeLifespan"),fieldId:"oAuthDeviceCodeLifespan",labelIcon:e(V,{helpText:t("oAuthDeviceCodeLifespanHelp"),fieldLabelId:"oAuthDeviceCodeLifespan"}),children:e(G,{name:"oauth2DeviceCodeLifespan",defaultValue:0,control:m.control,render:({field:r})=>e(Q,{id:"oAuthDeviceCodeLifespan","data-testid":"oAuthDeviceCodeLifespan",value:r.value||0,onChange:r.onChange,units:["minute","hour","day"]})})}),e(R,{label:t("oAuthDevicePollingInterval"),fieldId:"oAuthDevicePollingInterval",labelIcon:e(V,{helpText:t("oAuthDevicePollingIntervalHelp"),fieldLabelId:"oAuthDevicePollingInterval"}),children:e(G,{name:"oauth2DevicePollingInterval",defaultValue:0,control:m.control,render:({field:r})=>e(Jt,{id:"oAuthDevicePollingInterval",value:r.value,min:0,onPlus:()=>r.onChange(Number(r?.value)+1),onMinus:()=>r.onChange(Number(r?.value)>0?Number(r?.value)-1:0),onChange:b=>{const v=Number(b.currentTarget.value);r.onChange(isNaN(v)?0:v)},placeholder:t("oAuthDevicePollingInterval")})})}),e(R,{label:t("shortVerificationUri"),fieldId:"shortVerificationUri",labelIcon:e(V,{helpText:t("shortVerificationUriTooltipHelp"),fieldLabelId:"shortVerificationUri"}),children:e(yt,{id:"shortVerificationUri",placeholder:t("shortVerificationUri"),...m.register("attributes.shortVerificationUri")})}),e(R,{label:t("parRequestUriLifespan"),fieldId:"parRequestUriLifespan",labelIcon:e(V,{helpText:t("parRequestUriLifespanHelp"),fieldLabelId:"parRequestUriLifespan"}),children:e(G,{name:"attributes.parRequestUriLifespan",control:m.control,render:({field:r})=>e(Q,{id:"parRequestUriLifespan",className:"par-request-uri-lifespan","data-testid":"par-request-uri-lifespan-input","aria-label":"par-request-uri-lifespan",value:r.value,onChange:r.onChange})})})]})]})}),e(Se,{title:t("refreshTokens"),className:"kc-client-session-template",children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-v5-u-mt-lg",onSubmit:m.handleSubmit(a),children:[e(R,{hasNoPaddingTop:!0,label:t("revokeRefreshToken"),fieldId:"kc-revoke-refresh-token",labelIcon:e(V,{helpText:t("revokeRefreshTokenHelp"),fieldLabelId:"revokeRefreshToken"}),children:e(G,{name:"revokeRefreshToken",control:m.control,defaultValue:!1,render:({field:r})=>e(be,{id:"kc-revoke-refresh-token","data-testid":"revoke-refresh-token-switch","aria-label":t("revokeRefreshToken"),label:t("enabled"),labelOff:t("disabled"),isChecked:r.value,onChange:r.onChange})})}),f&&e(R,{label:t("refreshTokenMaxReuse"),labelIcon:e(V,{helpText:t("refreshTokenMaxReuseHelp"),fieldLabelId:"refreshTokenMaxReuse"}),fieldId:"refreshTokenMaxReuse",children:e(G,{name:"refreshTokenMaxReuse",defaultValue:0,control:m.control,render:({field:r})=>e(Jt,{type:"text",id:"refreshTokenMaxReuseMs",value:r.value,onPlus:()=>r.onChange(r.value+1),onMinus:()=>r.onChange(r.value-1),onChange:b=>r.onChange(Number(b.target.value))})})})]})}),e(Se,{title:t("accessTokens"),className:"kc-offline-session-template",children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-v5-u-mt-lg",onSubmit:m.handleSubmit(a),children:[c(R,{label:t("accessTokenLifespan"),fieldId:"accessTokenLifespan",labelIcon:e(V,{helpText:t("accessTokenLifespanHelp"),fieldLabelId:"accessTokenLifespan"}),children:[e(G,{name:"accessTokenLifespan",control:m.control,render:({field:r})=>e(Q,{validated:r.value>y?"warning":"default",className:"kc-access-token-lifespan","data-testid":"access-token-lifespan-input","aria-label":"access-token-lifespan",value:r.value,onChange:r.onChange,units:["minute","hour","day"]})}),e(tn,{children:e(an,{children:e(nn,{children:t("recommendedSsoTimeout",{time:Kn(y,p.getLocale())})})})})]}),e(R,{label:t("accessTokenLifespanImplicitFlow"),fieldId:"accessTokenLifespanImplicitFlow",labelIcon:e(V,{helpText:t("accessTokenLifespanImplicitFlow"),fieldLabelId:"accessTokenLifespanImplicitFlow"}),children:e(G,{name:"accessTokenLifespanForImplicitFlow",control:m.control,render:({field:r})=>e(Q,{className:"kc-access-token-lifespan-implicit","data-testid":"access-token-lifespan-implicit-input",value:r.value,onChange:r.onChange,units:["minute","hour","day"]})})}),e(R,{label:t("clientLoginTimeout"),fieldId:"clientLoginTimeout",labelIcon:e(V,{helpText:t("clientLoginTimeoutHelp"),fieldLabelId:"clientLoginTimeout"}),children:e(G,{name:"accessCodeLifespan",control:m.control,render:({field:r})=>e(Q,{className:"kc-client-login-timeout","data-testid":"client-login-timeout-input","aria-label":"client-login-timeout",value:r.value,onChange:r.onChange,units:["minute","hour","day"]})})}),O&&e(R,{label:t("offlineSessionMax"),fieldId:"offlineSessionMax",id:"offline-session-max-label",labelIcon:e(V,{helpText:t("offlineSessionMaxHelp"),fieldLabelId:"offlineSessionMax"}),children:e(G,{name:"offlineSessionMaxLifespan",control:m.control,render:({field:r})=>e(Q,{className:"kc-offline-session-max","data-testid":"offline-session-max-input",value:r.value,onChange:r.onChange,units:["minute","hour","day"]})})})]})}),e(Se,{className:"kc-login-settings-template",title:t("actionTokens"),children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-v5-u-mt-lg",onSubmit:m.handleSubmit(a),children:[e(R,{label:t("userInitiatedActionLifespan"),id:"kc-user-initiated-action-lifespan",fieldId:"userInitiatedActionLifespan",labelIcon:e(V,{helpText:t("userInitiatedActionLifespanHelp"),fieldLabelId:"userInitiatedActionLifespan"}),children:e(G,{name:"actionTokenGeneratedByUserLifespan",control:m.control,render:({field:r})=>e(Q,{className:"kc-user-initiated-action-lifespan","data-testid":"user-initiated-action-lifespan","aria-label":"user-initiated-action-lifespan",value:r.value,onChange:r.onChange,units:["minute","hour","day"]})})}),e(R,{label:t("defaultAdminInitiated"),fieldId:"defaultAdminInitiated",id:"default-admin-initiated-label",labelIcon:e(V,{helpText:t("defaultAdminInitiatedActionLifespanHelp"),fieldLabelId:"defaultAdminInitiated"}),children:e(G,{name:"actionTokenGeneratedByAdminLifespan",control:m.control,render:({field:r})=>e(Q,{className:"kc-default-admin-initiated","data-testid":"default-admin-initated-input","aria-label":"default-admin-initated-input",value:r.value,onChange:r.onChange,units:["minute","hour","day"]})})}),e(Re,{className:"kc-override-action-tokens-subtitle",component:Ht.h1,children:t("overrideActionTokens")}),e(R,{label:t("emailVerification"),fieldId:"emailVerification",id:"email-verification",labelIcon:e(V,{helpText:t("emailVerificationHelp"),fieldLabelId:"emailVerification"}),children:e(G,{name:`attributes.${ot("actionTokenGeneratedByUserLifespan.verify-email")}`,defaultValue:"",control:m.control,render:({field:r})=>e(Q,{className:"kc-email-verification","data-testid":"email-verification-input",value:r.value,onChange:b=>r.onChange(b.toString()),units:["minute","hour","day"]})})}),e(R,{label:t("idpAccountEmailVerification"),fieldId:"idpAccountEmailVerification",id:"idp-acct-label",labelIcon:e(V,{helpText:t("idpAccountEmailVerificationHelp"),fieldLabelId:"idpAccountEmailVerification"}),children:e(G,{name:`attributes.${ot("actionTokenGeneratedByUserLifespan.idp-verify-account-via-email")}`,defaultValue:"",control:m.control,render:({field:r})=>e(Q,{className:"kc-idp-email-verification","data-testid":"idp-email-verification-input",value:r.value,onChange:r.onChange,units:["minute","hour","day"]})})}),e(R,{label:t("forgotPassword"),fieldId:"forgotPassword",id:"forgot-password-label",labelIcon:e(V,{helpText:t("forgotPasswordHelp"),fieldLabelId:"forgotPassword"}),children:e(G,{name:`attributes.${ot("actionTokenGeneratedByUserLifespan.reset-credentials")}`,defaultValue:"",control:m.control,render:({field:r})=>e(Q,{className:"kc-forgot-pw","data-testid":"forgot-pw-input",value:r.value,onChange:r.onChange,units:["minute","hour","day"]})})}),e(R,{label:t("executeActions"),fieldId:"executeActions",id:"execute-actions",labelIcon:e(V,{helpText:t("executeActionsHelp"),fieldLabelId:"executeActions"}),children:e(G,{name:`attributes.${ot("actionTokenGeneratedByUserLifespan.execute-actions")}`,defaultValue:"",control:m.control,render:({field:r})=>e(Q,{className:"kc-execute-actions","data-testid":"execute-actions-input",value:r.value,onChange:r.onChange,units:["minute","hour","day"]})})}),c(Ie,{children:[e(N,{variant:"primary",type:"submit","data-testid":"tokens-tab-save",isDisabled:!m.formState.isDirty,children:t("save")}),e(N,{variant:"link",onClick:n,children:t("revert")})]})]})})]})},Ll=()=>{const{adminClient:l}=le(),{t:n}=B(),[a,t]=qe(),[i,s]=qe(),[p,d]=u(),[h,o]=u([]),[m,P]=u(0),[S,O]=u(0),y=()=>O(S+1),{realm:f}=ne(),{addAlert:r,addError:b}=Te(),{enabled:v}=ln(),{hasAccess:w}=Ut(),E=w("view-users","manage-realm");Ue(()=>l.realms.getDefaultGroups({realm:f}),g=>{d(g),P(m+1)},[S]);const x=()=>Promise.resolve(p),k=async()=>{try{await Promise.all(h.map(g=>l.realms.removeDefaultGroup({realm:f,id:g.id}))),r(n("groupRemove",{count:h.length}),ie.success),o([])}catch(g){b("groupRemoveError",g)}y()},L=async g=>{try{await Promise.all(g.map(I=>l.realms.addDefaultGroup({realm:f,id:I.id}))),r(n("defaultGroupAdded",{count:g.length}),ie.success)}catch(I){b("defaultGroupAddedError",I)}y()},[D,F]=ye({titleKey:n("removeConfirmTitle",{count:h.length}),messageKey:n("removeConfirm",{count:h.length}),continueButtonLabel:"delete",continueButtonVariant:se.danger,onConfirm:k});return p?c(J,{children:[e(F,{}),i&&e(Fn,{type:"selectMany",text:{title:"addDefaultGroups",ok:"add"},onConfirm:g=>{L(g||[]),s()},onClose:s}),v&&e(sn,{bodyContent:c(vt,{i18nKey:"defaultGroupsHelp",children:[" ",e(Pe,{to:Xt({realm:f})}),"."]}),children:e(st,{className:"keycloak__section_intro__help",style:{paddingLeft:"var(--pf-v5-c-page__main-section--PaddingLeft)"},children:c(Re,{children:[e(Hn,{})," ",n("whatIsDefaultGroups")]})})}),e(ze,{canSelectAll:!0,onSelect:g=>o([...g]),loader:x,ariaLabelKey:"defaultGroups",searchPlaceholderKey:"searchForGroups",toolbarItem:E&&c(J,{children:[e(Ae,{children:e(N,{"data-testid":"openCreateGroupModal",variant:"primary",onClick:s,children:n("addGroups")})}),e(Ae,{children:e(ua,{onOpenChange:t,toggle:g=>e(pa,{ref:g,isExpanded:a,variant:"plain",onClick:t,isDisabled:h.length===0,children:e(ha,{})}),isOpen:a,shouldFocusToggleOnSelect:!0,children:e(fa,{children:e(tt,{component:"button",onClick:()=>{D(),t()},children:n("remove")},"action")})})})]}),actions:E?[{title:n("remove"),onRowClick:g=>(o([g]),D(),Promise.resolve(!1))}]:[],columns:[{name:"name",displayKey:"groupName"},{name:"path",displayKey:"path"}],emptyState:e(xe,{hasIcon:!0,message:n("noDefaultGroups"),instructions:c(vt,{i18nKey:"noDefaultGroupsInstructions",children:[" ",e(Pe,{className:"pf-v5-u-font-weight-light",to:Xt({realm:f}),role:"navigation","aria-label":n("identityBrokeringLink")}),"Add groups..."]}),primaryActionText:E?n("addGroups"):"",onPrimaryAction:s})},m)]}):e(We,{})},Pl=()=>{const{adminClient:l}=le(),{t:n}=B(),[a,t]=u(10),{realmRepresentation:i}=ne(),[s,p]=u(0),{addAlert:d,addError:h}=Te(),{realm:o}=ne(),m=async P=>{const S=P;try{await l.roles.createComposite({roleId:i?.defaultRole.id,realm:o},S),p(s+1),d(n("addAssociatedRolesSuccess"),ie.success)}catch(O){h("addAssociatedRolesError",O)}};return c(Tt,{activeKey:a,onSelect:(P,S)=>t(S),children:[e($,{id:"roles",eventKey:10,title:e(j,{children:n("defaultRoles")}),"data-testid":"default-roles-tab",children:e(Mn,{name:i?.defaultRole.name,id:i?.defaultRole.id,type:"roles",isManager:!0,save:P=>m(P.map(S=>S.role))})},s),e($,{id:"groups",eventKey:20,title:e(j,{children:n("defaultGroups")}),"data-testid":"default-groups-tab",children:e(Ll,{})})]})};function wa({ariaLabelKey:l="userEventsRegistered",eventTypes:n,addTypes:a,onSelect:t,onDelete:i}){const{t:s}=B(),p=n.map(d=>({id:d,name:s(`eventTypes.${d}.name`),description:s(`eventTypes.${d}.description`)}));return e(ze,{ariaLabelKey:l,searchPlaceholderKey:"searchEventType",loader:p,onSelect:t||void 0,canSelectAll:!!t,toolbarItem:a&&e(Ae,{children:e(N,{id:"addTypes",onClick:a,"data-testid":"addTypes",children:s("addSavedTypes")})}),actions:i?[{title:s("remove"),onRowClick:i}]:[],columns:[{name:"name",displayKey:"eventType"},{name:"description",displayKey:"description"}],emptyState:e(xe,{message:s("emptyEvents"),instructions:s("emptyEventsInstructions")})})}const Al=({onConfirm:l,onClose:n,configured:a})=>{const{t}=B(),{enums:i}=_e(),[s,p]=u([]);return e(je,{variant:Xe.medium,title:t("addTypes"),isOpen:!0,onClose:n,actions:[e(N,{"data-testid":"addEventTypeConfirm",variant:"primary",onClick:()=>l(s),children:t("add")},"confirm"),e(N,{"data-testid":"moveCancel",variant:"link",onClick:n,children:t("cancel")},"cancel")],children:e(wa,{ariaLabelKey:"addTypes",onSelect:d=>p(d),eventTypes:i.eventType.filter(d=>!a.includes(d))})})},ia=({type:l,form:n,reset:a,clear:t})=>{const{t:i}=B(),{control:s,watch:p,setValue:d,formState:{isDirty:h}}=n,o=l==="admin"?"adminEventsEnabled":"eventsEnabled",m=p(o),[P,S]=ye({titleKey:"events-disable-title",messageKey:"events-disable-confirm",continueButtonLabel:"confirm",onConfirm:()=>d(o,!1,{shouldDirty:!0})});return c(Ge,{...n,children:[e(S,{}),e(R,{hasNoPaddingTop:!0,label:i("saveEvents"),fieldId:o,labelIcon:e(V,{helpText:i(`save-${l}-eventsHelp`),fieldLabelId:"saveEvents"}),children:e(G,{name:o,defaultValue:!1,control:s,render:({field:O})=>e(be,{"data-testid":o,id:`${o}-switch`,label:i("on"),labelOff:i("off"),isChecked:O.value,onChange:(y,f)=>{f?O.onChange(f):P()},"aria-label":i("saveEvents")})})}),m&&c(J,{children:[l==="admin"&&e(Ot,{name:"adminEventsDetailsEnabled",label:i("includeRepresentation"),labelIcon:i("includeRepresentationHelp")}),e(ka,{name:l==="user"?"eventsExpiration":"adminEventsExpiration",label:i("expiration"),labelIcon:i("expirationHelp"),defaultValue:"",units:["minute","hour","day"],controller:{defaultValue:""}})]}),c(Ie,{children:[e(N,{variant:"primary",type:"submit",id:`save-${l}`,"data-testid":`save-${l}`,isDisabled:!h,children:i("save")}),e(N,{variant:"link",onClick:a,children:i("revert")})]}),e(Be,{}),e(R,{label:i(l==="user"?"clearUserEvents":"clearAdminEvents"),fieldId:`clear-${l}-events`,labelIcon:e(V,{helpText:i(`${l}-clearEventsHelp`),fieldLabelId:`clear-${l}-events`}),children:e(N,{variant:"danger",id:`clear-${l}-events`,"data-testid":`clear-${l}-events`,onClick:()=>t(),children:i(l==="user"?"clearUserEvents":"clearAdminEvents")})})]})},El=({form:l,reset:n})=>{const{t:a}=B(),i=_e().providers?.eventsListener.providers;return c(Ge,{...l,children:[e(nt,{name:"eventsListeners",label:a("eventListeners"),labelIcon:a("eventListenersHelpTextHelp"),controller:{defaultValue:""},className:"kc_eventListeners_select",chipGroupProps:{numChips:3,expandedText:a("hide"),collapsedText:a("showRemaining")},variant:ke.typeaheadMulti,options:Object.keys(i)}),c(Ie,{children:[e(N,{variant:"primary",type:"submit","data-testid":"saveEventListenerBtn",children:a("save")}),e(N,{variant:"link","data-testid":"revertEventListenerBtn",onClick:n,children:a("revert")})]})]})},wl=({realm:l})=>{const{adminClient:n}=le(),{t:a}=B(),t=ve(),{setValue:i,handleSubmit:s}=t,[p,d]=u(0),h=()=>d(new Date().getTime()),[o,m]=u(0),P=()=>m(new Date().getTime()),[S,O]=u("event"),[y,f]=u(),[r,b]=u(),[v,w]=u(!1),{addAlert:E,addError:x}=Te(),{realm:k}=ne(),L=K=>{f(K),Ve(K||{},i)},D=async K=>{b(K),F()},[F,g]=ye({titleKey:"deleteEvents",messageKey:"deleteEventsConfirm",continueButtonLabel:"clear",continueButtonVariant:se.danger,onConfirm:async()=>{try{switch(r){case"admin":await n.realms.clearAdminEvents({realm:k});break;case"user":await n.realms.clearEvents({realm:k});break}E(a(`${r}-events-cleared`),ie.success)}catch(K){x(`${r}-events-cleared-error`,K)}}});Ue(()=>n.realms.getConfigEvents({realm:k}),K=>{L({...K,adminEventsExpiration:l.attributes?.adminEventsExpiration}),P()},[p]);const I=async K=>{const q=!Ia(y?.eventsListeners,K.eventsListeners),{adminEventsExpiration:X,...me}=K;l.attributes?.adminEventsExpiration!==X&&await n.realms.update({realm:k},{...l,attributes:{...l.attributes||{},adminEventsExpiration:X}});try{await n.realms.updateConfigEvents({realm:k},me),L({...y,...me,adminEventsExpiration:X}),E(a(q?"saveEventListenersSuccess":"eventConfigSuccessfully"),ie.success)}catch(ue){x(a(q?"saveEventListenersError":"eventConfigError"),ue)}},M=async K=>{const q=K.map(me=>me.id),X=y.enabledEventTypes?.concat(q);await _(X)},_=async(K=[])=>{const q={...t.getValues(),enabledEventTypes:K};await I(q),w(!1),h()};return c(J,{children:[e(g,{}),v&&e(Al,{onConfirm:K=>M(K),configured:y?.enabledEventTypes||[],onClose:()=>w(!1)}),c(Tt,{activeKey:S,onSelect:(K,q)=>O(q),children:[e($,{eventKey:"event",title:e(j,{children:a("eventListeners")}),"data-testid":"rs-event-listeners-tab",children:e(re,{children:e(ae,{role:"manage-events",isHorizontal:!0,onSubmit:s(I),children:e(El,{form:t,reset:()=>L(y)})})})}),c($,{eventKey:"user",title:e(j,{children:a("userEventsSettings")}),"data-testid":"rs-events-tab",children:[e(re,{children:e(ae,{role:"manage-events",isHorizontal:!0,onSubmit:s(I),children:e(ia,{type:"user",form:t,reset:()=>L(y),clear:()=>D("user")})})}),e(re,{children:e(wa,{addTypes:()=>w(!0),eventTypes:y?.enabledEventTypes||[],onDelete:K=>{const q=y?.enabledEventTypes?.filter(X=>X!==K.id);_(q),f({...y,enabledEventTypes:q})}},o)})]}),e($,{eventKey:"admin",title:e(j,{children:a("adminEventsSettings")}),"data-testid":"rs-admin-events-tab",children:e(re,{children:e(ae,{role:"manage-events",isHorizontal:!0,onSubmit:s(I),children:e(ia,{type:"admin",form:t,reset:()=>L(y),clear:()=>D("admin")})})})})]})]})},et=["ACTIVE","PASSIVE","DISABLED"],xl=({onFilter:l})=>{const{t:n}=B(),[a,t]=u(et[0]),[i,s]=qe();return e(ge,{width:300,"data-testid":"filter-type-select",isOpen:i,className:"kc-filter-type-select",variant:ke.single,onToggle:s,toggleIcon:e(La,{}),onSelect:p=>{const d=et.find(h=>h===p.toString())||et[0];t(d),l(d),s()},selections:a,"aria-label":n("selectFilterType"),children:et.map(p=>e(te,{"data-testid":`${p}-option`,value:p,children:n(`keysFilter.${p}`)},p))})},Dl=({realmComponents:l})=>{const{adminClient:n}=le(),{t:a}=B(),t=Ye(),i=Un(),[s,p]=u(""),[d,h]=u(""),{realm:o}=ne(),[m,P]=u(),[S,O]=u();Ue(async()=>(await n.realms.getKeys({realm:o})).keys?.map(w=>{const E=l.find(x=>x.id===w.providerId);return{...w,provider:E?.name}}),P,[]);const[y,f]=ye({titleKey:a("publicKey"),messageKey:s,continueButtonLabel:"close",continueButtonVariant:se.primary,onConfirm:()=>Promise.resolve()}),[r,b]=ye({titleKey:a("certificate"),messageKey:d,continueButtonLabel:"close",continueButtonVariant:se.primary,onConfirm:()=>Promise.resolve()});return m?c(re,{variant:"light",padding:{default:"noPadding"},children:[e(f,{}),e(b,{}),e(ze,{isNotCompact:!0,className:"kc-keys-list",loader:S||m,ariaLabelKey:"keysList",searchPlaceholderKey:"searchKey",searchTypeComponent:e(xl,{onFilter:v=>O(v!==et[0]?m.filter(({status:w})=>w===v):void 0)}),columns:[{name:"algorithm",displayKey:"algorithm",cellFormatters:[ct()],transforms:[$e(15)]},{name:"type",displayKey:"type",cellFormatters:[ct()],transforms:[$e(10)]},{name:"kid",displayKey:"kid",cellFormatters:[ct()],transforms:[$e(10)]},{name:"use",displayKey:"use",cellFormatters:[ct()],transforms:[$e(10)]},{name:"provider",displayKey:"provider",cellRenderer:({provider:v})=>v||"-",transforms:[$e(10)]},{name:"validTo",displayKey:"validTo",cellRenderer:({validTo:v})=>v?i(new Date(v)):"-",transforms:[$e(10)]},{name:"publicKeys",displayKey:"publicKeys",cellRenderer:({type:v,publicKey:w,certificate:E})=>v==="EC"?e(N,{onClick:()=>{y(),p(w)},variant:"secondary",id:"kc-public-key",children:a("publicKey")}):v==="RSA"?c("div",{className:"button-wrapper",children:[e(N,{onClick:()=>{y(),p(w)},variant:"secondary",id:w,children:a("publicKey")}),e(N,{onClick:()=>{r(),h(E)},variant:"secondary",id:E,className:"kc-certificate",children:a("certificate")})]}):v==="OKP"?e(N,{onClick:()=>{y(),p(w)},variant:"secondary",id:"kc-public-key",children:a("publicKey")}):"",transforms:[$e(20)]}],isSearching:!!S,emptyState:e(xe,{hasIcon:!0,message:a("noKeys"),instructions:a("noKeysDescription"),primaryActionText:a("addProvider"),onPrimaryAction:()=>t(Rt({realm:o,tab:"providers"}))})})]}):e(We,{})},Rl="_dialog_121se_2",Nl={dialog:Rl},Ol=({providerType:l,onClose:n})=>{const{t:a}=B();return e(je,{className:Nl.dialog,variant:Xe.medium,title:a("addProvider"),isOpen:!0,onClose:n,children:e($n,{providerType:l,onClose:n})})},Vl=({onConfirm:l,onClose:n})=>{const{t:a}=B(),i=_e().componentTypes?.[Gt]??[];return e(je,{variant:"medium",title:a("addProvider"),isOpen:!0,onClose:n,children:e(ya,{onSelectDataListItem:(s,p)=>{l(p)},"aria-label":a("addPredefinedMappers"),isCompact:!0,children:i.map(s=>e(Ta,{"aria-label":s.id,id:s.id,children:e(Ca,{children:e(Sa,{dataListCells:[e(Vt,{"data-testid":`option-${s.id}`,children:s.id},`name-${s.id}`),e(Vt,{width:2,children:s.helpText},`helpText-${s.helpText}`)]})})},s.id))})})},Kl=({realmComponents:l,refresh:n})=>{const{adminClient:a}=le(),{t}=B(),{addAlert:i,addError:s}=Te(),{realm:p}=ne(),[d,h]=u(""),[o,m]=u([]),[P,S]=qe(),y=_e().componentTypes?.[Gt]??[],[f,r]=qe(),[b,v]=u(),[w,E]=u(),x=at(()=>l.map(I=>{const M=y.find(_=>I.providerId===_.id);return{...I,providerDescription:M?.helpText}}),[l]),[k,L]=ye({titleKey:"deleteProviderTitle",messageKey:t("deleteProviderConfirm",{provider:w?.name}),continueButtonLabel:"delete",continueButtonVariant:se.danger,onConfirm:async()=>{try{await a.components.del({id:w.id,realm:p}),n(),i(t("deleteProviderSuccess"),ie.success)}catch(I){s("deleteProviderError",I)}}}),D=()=>{if(d!==""){h(d);const I=x.filter(M=>M.name?.includes(d)||M.providerId?.includes(d));m(I)}else h(""),m(x)},F=I=>{I.key==="Enter"&&D()},g=I=>{h(I)};return c(J,{children:[f&&e(Vl,{onClose:()=>r(),onConfirm:I=>{S(),v(I),r()}}),P&&b&&e(Ol,{providerType:b,onClose:()=>{S(),n()}}),e(L,{}),c(re,{variant:"light",padding:{default:"noPadding"},children:[e(ba,{children:c(rn,{className:"providers-toolbar",children:[e(Ae,{children:c(on,{children:[e(Yt,{isFill:!0,children:e(yt,{name:"inputGroupName",id:"inputGroupName","data-testid":"provider-search-input",type:"search","aria-label":t("search"),placeholder:t("search"),onChange:(I,M)=>g(M),onKeyDown:F})}),e(Yt,{children:e(N,{variant:se.control,"aria-label":t("search"),onClick:D,children:e(ga,{})})})]})}),e(Ae,{children:e(N,{"data-testid":"addProviderDropdown",className:"add-provider-dropdown",onClick:()=>r(),children:t("addProvider")})})]})}),e(Pa,{variant:"compact",className:"kc-draggable-table",keyField:"id",data:o.length===0?x:o,onDragFinish:async(I,M)=>{const _=x.map(K=>{const q={...K};return delete q.providerDescription,a.components.update({id:K.id},{...q,config:{priority:[(M.length-M.indexOf(K.id)+100).toString()]}})});try{await Promise.all(_),n(),i(t("saveProviderListSuccess"),ie.success)}catch(K){s("saveProviderError",K)}},columns:[{name:"name",displayKey:"name",cellRenderer:I=>e(Pe,{"data-testid":"provider-name-link",to:cn({realm:p,id:I.id,providerType:I.providerId}),children:I.name},I.name)},{name:"providerId",displayKey:"provider"},{name:"providerDescription",displayKey:"providerDescription"}],actions:[{title:t("delete"),onClick:(I,M,_)=>{E(_),k()}}]})]})]})},Ml=l=>[...l].sort((a,t)=>{const i=Number(a.config?.priority),s=Number(t.config?.priority);return(isNaN(s)?0:s)-(isNaN(i)?0:i)}),Fl=()=>{const{adminClient:l}=le(),{t:n}=B(),{realm:a}=ne(),[t,i]=u(),[s,p]=u(0),d=()=>{p(s+1)};Ue(()=>l.components.find({type:Gt,realm:a}),P=>i(Ml(P)),[s]);const h=P=>gt(Rt({realm:a,tab:P})),o=h("list"),m=h("providers");return t?c(bt,{mountOnEnter:!0,unmountOnExit:!0,defaultLocation:Rt({realm:a,tab:"list"}),children:[e($,{id:"keysList","data-testid":"rs-keys-list-tab","aria-label":"keys-list-subtab",title:e(j,{children:n("keysList")}),...o,children:e(Dl,{realmComponents:t})}),e($,{id:"providers","data-testid":"rs-providers-tab","aria-label":"rs-providers-tab",title:e(j,{children:n("providers")}),...m,children:e(Kl,{realmComponents:t,refresh:d})})]}):e(We,{})},sa={theme:"",themeType:"",locale:"",hasWords:[]},Hl=({defaultSupportedLocales:l,defaultLocales:n})=>{const{adminClient:a}=le(),{t}=B(),{realm:i}=ne(),s=_e(),{whoAmI:p}=it(),d=dn(),[h,o]=u(!1),[m,P]=u(!1),[S,O]=u(!1),[y,f]=u(!1),[r,b]=u(!1),[v,w]=u({}),[E,x]=u(0),k=s.themes,L=at(()=>k?d(Object.keys(k),C=>C):[],[k]),D=at(()=>k?d(Object.values(k).flatMap(C=>C.map(A=>A.name)).filter((C,A,Z)=>Z.indexOf(C)===A),C=>C):[],[k]),F=at(()=>Array.from(new Set([...n,...l])),[n,l]),g={theme:t("theme"),themeType:t("themeType"),locale:t("language"),hasWords:t("hasWords")},{getValues:I,reset:M,formState:{isDirty:_,isValid:K},control:q}=ve({mode:"onChange",defaultValues:sa}),X=async()=>{try{const C=I();if(["theme","themeType","locale"].some(he=>!C[he]))return[];const H=await a.serverInfo.findEffectiveMessageBundles({realm:i,...C,locale:C.locale||we,source:!0}),de=C.hasWords.length>0?H.filter(he=>C.hasWords.some(T=>he.value.includes(T)||he.key.includes(T))):H;return d([...de],mn("key"))}catch{return[]}};function me(){o(!1),ce()}function ue(){M(),ce()}function Le(C){const A={...I()};delete A[C],M({...sa,...A}),ce()}function pe(C,A){const Z=I(),H=Z[C],de=Array.isArray(H)?H.filter(W=>W!==A):H;M({...Z,[C]:de}),ce()}function ce(){const C=qn(I(),A=>A!==""||Array.isArray(A)&&A.length>0);w(C),x(E+1)}const Ce=()=>c(_t,{direction:{default:"column"},spaceItems:{default:"spaceItemsNone"},children:[e(Oe,{children:e(st,{children:e(Re,{className:"pf-v5-u-mb-md pf-v5-u-mt-0 pf-v5-u-mr-md",component:Ht.p,children:t("effectiveMessageBundlesDescription")})})}),e(Oe,{children:e(jn,{buttonText:t("searchForEffectiveMessageBundles"),setSearchDropdownOpen:o,searchDropdownOpen:h,marginRight:"2.5rem",width:"15vw",children:c(rt,{isHorizontal:!0,className:"pf-v5-u-w-25vw","data-testid":"effectiveMessageBundlesSearchForm",onSubmit:C=>C.preventDefault(),children:[e(R,{label:t("theme"),fieldId:"kc-theme",isRequired:!0,children:e(G,{name:"theme",control:q,defaultValue:"",rules:{validate:C=>(C||"").length>0},render:({field:C})=>e(ge,{"data-testid":"effective_message_bundles-theme-searchField",chipGroupProps:{numChips:1,expandedText:t("hide"),collapsedText:t("showRemaining")},variant:ke.single,typeAheadAriaLabel:"Select",onToggle:A=>O(A),selections:C.value,onSelect:A=>{C.onChange(A.toString()),O(!1)},onClear:()=>{C.onChange("")},isOpen:S,"aria-label":t("selectTheme"),chipGroupComponent:e(Qe,{children:e(Je,{onClick:A=>{A.stopPropagation(),C.onChange("")},children:C.value},C.value)}),children:[e(te,{label:t("selectTheme"),isDisabled:!0,children:t("selectTheme")},"theme_placeholder")].concat(D.map(A=>e(te,{value:A,children:A},A)))})})}),e(R,{label:t("themeType"),fieldId:"kc-themeType",isRequired:!0,children:e(G,{name:"themeType",control:q,defaultValue:"",rules:{validate:C=>(C||"").length>0},render:({field:C})=>e(ge,{"data-testid":"effective-message-bundles-feature-searchField",chipGroupProps:{numChips:1,expandedText:t("hide"),collapsedText:t("showRemaining")},variant:ke.single,typeAheadAriaLabel:"Select",onToggle:A=>f(A),selections:C.value,onSelect:A=>{C.onChange(A.toString()),f(!1)},onClear:()=>{C.onChange("")},isOpen:y,"aria-label":t("selectThemeType"),chipGroupComponent:e(Qe,{children:e(Je,{onClick:A=>{A.stopPropagation(),C.onChange("")},children:C.value},C.value)}),children:[e(te,{label:t("selectThemeType"),isDisabled:!0,children:t("selectThemeType")},"themeType_placeholder")].concat(L.map(A=>e(te,{value:A,children:A},A)))})})}),e(R,{label:t("language"),fieldId:"kc-language",isRequired:!0,children:e(G,{name:"locale",control:q,defaultValue:"",rules:{validate:C=>(C||"").length>0},render:({field:C})=>e(ge,{"data-testid":"effective-message-bundles-language-searchField",chipGroupProps:{numChips:1,expandedText:t("hide"),collapsedText:t("showRemaining")},variant:ke.single,typeAheadAriaLabel:"Select",onToggle:A=>b(A),selections:C.value,onSelect:A=>{C.onChange(A.toString()),b(!1)},onClear:()=>{C.onChange("")},isOpen:r,"aria-labelledby":"language",chipGroupComponent:e(Qe,{children:C.value?e(Je,{onClick:A=>{A.stopPropagation(),C.onChange("")},children:Ne(C.value,p.getLocale())},C.value):null}),children:[e(te,{label:t("selectLanguage"),isDisabled:!0,children:t("selectLanguage")},"language_placeholder")].concat(F.map(A=>e(te,{value:A,children:Ne(A,p.getLocale())},A)))})})}),e(R,{label:t("hasWords"),fieldId:"kc-hasWords",children:e(G,{name:"hasWords",control:q,render:({field:C})=>c("div",{children:[e(yt,{id:"kc-hasWords","data-testid":"effective-message-bundles-hasWords-searchField",value:C.value.join(" "),onChange:A=>{const H=A.target.value;if(H.trim().length===0)C.onChange([]);else{const de=H.split(" ").map(W=>W.trim());C.onChange(de)}}}),e(Qe,{children:C.value.map((A,Z)=>e(Je,{onClick:H=>{H.stopPropagation();const de=C.value.filter((W,he)=>he!==Z);C.onChange(de)},children:A},Z))})]})})}),c(Ie,{className:"pf-v5-u-mt-sm",children:[e(N,{variant:"primary",onClick:()=>{P(!0),me()},"data-testid":"search-effective-message-bundles-btn",isDisabled:!K,children:t("search")}),e(N,{variant:"secondary",onClick:ue,"data-testid":"reset-search-effective-message-bundles-btn",isDisabled:!_,children:t("reset")})]})]})})}),e(Oe,{children:Object.entries(v).length>0&&e(J,{children:Object.entries(v).map(C=>{const[A,Z]=C;return e(Qe,{className:"pf-v5-u-mt-md pf-v5-u-mr-md",categoryName:g[A],isClosable:!0,onClick:()=>Le(A),children:typeof Z=="string"?e(Je,{isReadOnly:!0,children:A==="locale"?Ne(Z,p.getLocale())?.toLowerCase():Z}):Z.map(H=>e(Je,{onClick:()=>pe(A,H),children:H},H))},A)})})})]});return m?e(ze,{loader:X,ariaLabelKey:"effectiveMessageBundles",toolbarItem:Ce(),columns:[{name:"key",displayKey:"key"},{name:"value",displayKey:"value"}],emptyState:e(xe,{message:t("noSearchResults"),instructions:t("noSearchResultsInstructions")}),isSearching:Object.keys(v).length>0},E):c(J,{children:[e("div",{className:"pf-v5-u-py-lg pf-v5-u-pl-md",children:Ce()}),e(Be,{}),e(xe,{message:t("emptyEffectiveMessageBundles"),instructions:t("emptyEffectiveMessageBundlesInstructions"),isSearchVariant:!0})]})},Ul=({handleModalToggle:l,save:n,form:a})=>{const{t}=B();return e(je,{variant:Xe.small,title:t("addTranslation"),isOpen:!0,onClose:l,actions:[e(N,{"data-testid":"add-translation-confirm-button",variant:"primary",type:"submit",form:"translation-form",children:t("create")},"confirm"),e(N,{id:"modal-cancel","data-testid":"cancel",variant:se.link,onClick:()=>{l()},children:t("cancel")},"cancel")],children:e(rt,{id:"translation-form",isHorizontal:!0,onSubmit:a.handleSubmit(n),children:c(Ge,{...a,children:[e(fe,{name:"key",label:t("key"),autoFocus:!0,rules:{required:t("required")}}),e(fe,{name:"value",label:t("value"),rules:{required:t("required")}})]})})})},Gl=({internationalizationEnabled:l,watchSupportedLocales:n,realm:a,tableData:t})=>{const{adminClient:i}=le(),{t:s}=B(),[p,d]=u(!1),[h,o]=u(!1),[m,P]=u([]),[S,O]=u(we),[y,f]=u(!1),{getValues:r,handleSubmit:b}=ve(),[v,w]=u(!1),[E,x]=u([]),[k,L]=u(0),[D,F]=u(10),[g,I]=u(0),[M,_]=u(""),K=ve({mode:"onChange"}),{addAlert:q,addError:X}=Te(),{realm:me}=ne(),{whoAmI:ue}=it(),[Le,pe]=u([]),[ce,Ce]=u(!1),[C,A]=u({}),[Z,H]=u(""),de=()=>{L(k+1)};Ee(()=>{(async()=>{try{let z=await i.realms.getRealmLocalizationTexts({first:g,max:D,realm:a.realm,selectedLocale:S||r("defaultLocale")||ue.getLocale()});if(M){const oe=Ke=>Object.entries(z).filter(St=>St[Ke].includes(M)),Y=dl(oe(0).concat(oe(1)),Ia);z=Object.fromEntries(Y)}return Object.entries(z).slice(g,g+D)}catch{return[]}})().then(z=>{P(z);const oe=z.map(Y=>({rowEditBtnAriaLabel:()=>s("rowEditBtnAriaLabel",{translation:Y[1]}),rowSaveBtnAriaLabel:()=>s("rowSaveBtnAriaLabel",{translation:Y[1]}),rowCancelBtnAriaLabel:()=>s("rowCancelBtnAriaLabel",{translation:Y[1]}),cells:[{title:Y[0],props:{value:Y[0]}},{title:Y[1],props:{value:Y[1]}}]}));x(oe)})},[k,t,g,D,M]);const W=()=>{d(!p)},he=[e(Kt,{label:s("defaultLocale"),children:e(te,{value:we,children:Ne(we,ue.getDisplayName())},we)},"group1"),e(Be,{},"divider"),e(Kt,{label:s("supportedLocales"),children:n.map(U=>e(te,{value:U,children:Ne(U,ue.getLocale())},U))},"group2")],T=async U=>{try{await i.realms.addLocalization({realm:me,selectedLocale:S||r("defaultLocale")||we,key:U.key},U.value),i.setConfig({realmName:me}),de(),K.setValue("key",""),K.setValue("value",""),Lt.reloadResources(),q(s("addTranslationSuccess"),ie.success)}catch(z){X(s("addTranslationError"),z)}},[ee,De]=ye({titleKey:"deleteConfirmTranslationTitle",messageKey:s("translationDeleteConfirmDialog",{count:Le.length}),continueButtonLabel:"delete",continueButtonVariant:se.danger,onCancel:()=>{pe([]),Ce(!1)},onConfirm:async()=>{try{for(const U of Le)delete Lt.store.data[ue.getLocale()][me][U],await i.realms.deleteRealmLocalizationTexts({realm:me,selectedLocale:S,key:U});Ce(!1),pe([]),de(),q(s("deleteAllTranslationsSuccess"),ie.success)}catch(U){X("deleteAllTranslationsError",U)}}}),Ct=(U,z)=>{const oe=(E[z].cells?.[0]).props.value;U.target.checked?pe(Y=>[...Y,oe]):pe(Y=>Y.filter(Ke=>Ke!==oe)),Ce(E.length===Le.length+(U.target.checked?1:-1))},xa=()=>{pe(ce?[]:E.map(U=>(U.cells?.[0]).props.value)),Ce(!ce)},Da=U=>Le.includes(U),Ra=async(U,z)=>{const oe=Qt(E),Y=Qt(oe[z]);(Y.cells?.[1]).props.value=U,oe[z]=Y;try{const Ke=(Y.cells?.[0]).props.value,St=(Y.cells?.[1]).props.value;await i.realms.addLocalization({realm:a.realm,selectedLocale:S||r("defaultLocale")||we,key:Ke},St),Lt.reloadResources(),q(s("updateTranslationSuccess"),ie.success),x(oe)}catch{q(s("updateTranslationError"),ie.danger)}A(Ke=>({...Ke,[z]:!1}))};return c(J,{children:[e(De,{}),p&&e(Ul,{handleModalToggle:W,save:U=>{T(U),W()},form:K}),e(st,{children:e(Re,{className:"pf-v5-u-mt-lg pf-v5-u-ml-md",component:Ht.p,children:s("realmOverridesDescription")})}),c(Dn,{count:m.length,first:g,max:D,onNextClick:I,onPreviousClick:I,onPerPageSelect:(U,z)=>{I(U),F(z)},inputGroupName:"search",inputGroupOnEnter:U=>{_(U),I(0),F(10)},inputGroupPlaceholder:s("searchForTranslation"),toolbarItem:c(J,{children:[e(N,{"data-testid":"add-translationBtn",onClick:()=>{d(!0),Ce(!1),pe([])},children:s("addTranslation")}),e(Ae,{children:e(ua,{onOpenChange:U=>f(U),toggle:U=>e(pa,{ref:U,onClick:()=>f(!y),variant:"plain",isExpanded:y,"data-testid":"toolbar-deleteBtn","aria-label":"kebab",children:e(ha,{})}),isOpen:y,isPlain:!0,children:e(fa,{children:e(tt,{component:"button","data-testid":"delete-selected-TranslationBtn",isDisabled:m.length===0||Le.length===0,onClick:()=>{ee(),f(!1)},children:s("delete")},"action")})})})]}),searchTypeComponent:e(Ae,{children:e(ge,{width:180,isOpen:h,className:"kc-filter-by-locale-select",variant:ke.single,isDisabled:!l,onToggle:U=>o(U),onSelect:U=>{O(U.toString()),w(!0),de(),o(!1)},selections:v?Ne(S,ue.getLocale()):a.defaultLocale!==""?Ne(we,ue.getLocale()):s("placeholderText"),children:he})}),children:[m.length===0&&!M&&e(xe,{hasIcon:!0,message:s("noTranslations"),instructions:s("noTranslationsInstructions"),onPrimaryAction:W}),m.length===0&&M&&e(xe,{hasIcon:!0,icon:ga,isSearchVariant:!0,message:s("noSearchResults"),instructions:s("noRealmOverridesSearchResultsInstructions")}),m.length!==0&&c(Gn,{"aria-label":s("editableRowsTable"),"data-testid":"editable-rows-table",children:[e(Bn,{children:c(na,{children:[e(dt,{className:"pf-v5-u-px-lg",children:e("input",{type:"checkbox","aria-label":s("selectAll"),checked:ce,onChange:xa,"data-testid":"selectAll"})}),e(dt,{className:"pf-v5-u-py-lg",children:s("key")}),e(dt,{className:"pf-v5-u-py-lg",children:s("value")}),e(dt,{"aria-hidden":"true"})]})}),e(_n,{children:E.map((U,z)=>c(na,{children:[e(mt,{className:"pf-v5-u-px-lg",select:{rowIndex:z,onSelect:oe=>Ct(oe,z),isSelected:Da((U.cells?.[0]).props.value)}}),e(mt,{className:"pf-m-sm pf-v5-u-px-sm",dataLabel:s("key"),children:(U.cells?.[0]).props.value}),e(mt,{className:"pf-m-sm pf-v5-u-px-sm",dataLabel:s("value"),children:e(rt,{isHorizontal:!0,className:"kc-form-translationValue",onSubmit:b(()=>{Ra(Z,z)}),children:e(R,{fieldId:"kc-translationValue",className:"pf-v5-u-display-inline-block",children:C[z]?c(J,{children:[e(yt,{"aria-label":s("editTranslationValue"),type:"text",className:"pf-v5-u-w-initial","data-testid":`editTranslationValueInput-${z}`,value:Z,onChange:(oe,Y)=>{H(Y)}},`edit-input-${z}`),e(N,{variant:"link",className:"pf-m-plain","data-testid":`editTranslationAcceptBtn-${z}`,type:"submit","aria-label":s("acceptBtn"),icon:e(un,{})}),e(N,{variant:"link",className:"pf-m-plain","data-testid":`editTranslationCancelBtn-${z}`,icon:e(pn,{}),"aria-label":s("cancelBtn"),onClick:()=>{A(oe=>({...oe,[z]:!1}))}})]}):c(J,{children:[e("span",{children:(U.cells?.[1]).props.value}),e(N,{onClick:()=>{const oe=(E[z].cells?.[1]).props.value;H(oe),A(Y=>({...Y,[z]:!0}))},"aria-label":s("editBtn"),variant:"link",className:"pf-m-plain","data-testid":`editTranslationBtn-${z}`,children:e(Wn,{})},`edit-button-${z}`)]})})})},z),e(mt,{isActionCell:!0,children:e(zn,{items:[{title:s("delete"),onClick:()=>{pe([(U.cells?.[0]).props.value]),m.length===1&&Ce(!0),ee(),f(!1)}}]})})]},(U.cells?.[0]).props.value))})]})]})]})},Bl=({save:l,realm:n,tableData:a})=>{const{t}=B(),{whoAmI:i}=it(),[s,p]=u(0),d=ve(),{setValue:h,control:o,handleSubmit:m,formState:P}=d,S=n.supportedLocales?.length?n.supportedLocales:[we],O=_e().themes,y=at(()=>{const w=Object.values(O).flatMap(E=>E.flatMap(({locales:x})=>x||[]));return Array.from(new Set(w))},[O]),f=()=>{Ve(n,h),h("supportedLocales",S)};Ee(f,[]);const r=He({control:o,name:"supportedLocales",defaultValue:S}),b=He({control:o,name:"internationalizationEnabled",defaultValue:n.internationalizationEnabled}),v=He({name:"defaultLocale",control:o,defaultValue:n.defaultLocale?[n.defaultLocale]:[]});return c(Tt,{activeKey:s,onSelect:(w,E)=>p(E),children:[e($,{id:"locales",eventKey:0,title:e(j,{children:t("locales")}),"data-testid":"rs-localization-locales-tab",children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"pf-v5-u-mt-lg pf-v5-u-ml-md",onSubmit:m(l),children:[c(Ge,{...d,children:[e(ca,{name:"internationalizationEnabled",label:t("internationalization"),labelIcon:t("internationalizationHelp"),labelOn:t("enabled"),labelOff:t("disabled"),"aria-label":t("internationalization")}),b&&c(J,{children:[e(nt,{name:"supportedLocales",isScrollable:!0,label:t("supportedLocales"),controller:{defaultValue:S},variant:"typeaheadMulti",placeholderText:t("selectLocales"),options:y.map(w=>({key:w,value:Ne(w,i.getLocale())||w}))}),e(nt,{name:"defaultLocale",label:t("defaultLocale"),controller:{defaultValue:we},"data-testid":"select-default-locale",options:r.map(w=>({key:w,value:Ne(w,i.getLocale())||w}))})]})]}),c(Ie,{children:[e(N,{variant:"primary",isDisabled:!P.isDirty,type:"submit","data-testid":"localization-tab-save",children:t("save")}),e(N,{variant:"link",onClick:f,children:t("revert")})]})]})}),e($,{id:"realm-overrides",eventKey:1,title:c(j,{children:[t("realmOverrides")," "]}),"data-testid":"rs-localization-realm-overrides-tab",children:e(Gl,{internationalizationEnabled:b,watchSupportedLocales:r,realm:n,tableData:a})}),e($,{id:"effective-message-bundles",eventKey:2,title:e(j,{children:t("effectiveMessageBundles")}),"data-testid":"rs-localization-effective-message-bundles-tab",children:e(Hl,{defaultSupportedLocales:S,defaultLocales:v})})]})},Me=({fieldName:l,url:n})=>{const{t:a}=B(),t=l.substr(l.indexOf(".")+1);return e(fe,{name:l,label:a(t),labelIcon:c(vt,{i18nKey:`${t}Help`,children:["Default value prevents pages from being included",e(Nt,{href:n,title:a("learnMore")})]})})},_l=({realm:l,save:n})=>{const{t:a}=B(),t=ve(),{setValue:i,formState:{isDirty:s},handleSubmit:p}=t,d=()=>Ve(l,i);return Ee(d,[]),e(Ge,{...t,children:c(ae,{isHorizontal:!0,role:"manage-realm",className:"keycloak__security-defences__form",onSubmit:p(n),children:[e(Me,{fieldName:"browserSecurityHeaders.xFrameOptions",url:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options"}),e(Me,{fieldName:"browserSecurityHeaders.contentSecurityPolicy",url:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy"}),e(Me,{fieldName:"browserSecurityHeaders.contentSecurityPolicyReportOnly",url:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only"}),e(Me,{fieldName:"browserSecurityHeaders.xContentTypeOptions",url:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options"}),e(Me,{fieldName:"browserSecurityHeaders.xRobotsTag",url:"https://developers.google.com/search/docs/advanced/robots/robots_meta_tag"}),e(Me,{fieldName:"browserSecurityHeaders.xXSSProtection",url:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection"}),e(Me,{fieldName:"browserSecurityHeaders.strictTransportSecurity",url:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security"}),e(Me,{fieldName:"browserSecurityHeaders.referrerPolicy",url:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy"}),c(Ie,{children:[e(N,{variant:"primary",type:"submit","data-testid":"headers-form-tab-save",isDisabled:!s,children:a("save")}),e(N,{variant:"link",onClick:d,children:a("revert")})]})]})})},ut=({name:l,style:n})=>{const{t:a}=B();return e(ka,{name:l,style:n,label:a(l),labelIcon:a(`${l}Help`),controller:{defaultValue:"",rules:{required:a("required")}}})},zl=({realm:l,save:n})=>{const{t:a}=B(),t=ve(),{setValue:i,handleSubmit:s,formState:{isDirty:p}}=t,[d,h]=u(!1),[o,m]=u(!1);let P;(f=>{f.Disabled="Disabled",f.PermanentLockout="PermanentLockout",f.TemporaryLockout="TemporaryLockout",f.PermanentAfterTemporaryLockout="PermanentAfterTemporaryLockout"})(P||(P={}));const S=["Disabled","PermanentLockout","TemporaryLockout","PermanentAfterTemporaryLockout"],O=()=>{Ve(l,i),m(!1)};Ee(O,[]);const y=t.getValues("bruteForceProtected")?t.getValues("permanentLockout")?t.getValues("maxTemporaryLockouts")==0?"PermanentLockout":"PermanentAfterTemporaryLockout":"TemporaryLockout":"Disabled";return e(Ge,{...t,children:c(ae,{role:"manage-realm",isHorizontal:!0,onSubmit:s(n),children:[e(R,{label:a("bruteForceMode"),fieldId:"kc-brute-force-mode",labelIcon:e(V,{helpText:a("bruteForceModeHelpText"),fieldLabelId:"bruteForceMode"}),children:e(ge,{toggleId:"kc-brute-force-mode",onToggle:()=>h(!d),onSelect:f=>{switch(f){case"Disabled":t.setValue("bruteForceProtected",!1),t.setValue("permanentLockout",!1),t.setValue("maxTemporaryLockouts",0);break;case"TemporaryLockout":t.setValue("bruteForceProtected",!0),t.setValue("permanentLockout",!1),t.setValue("maxTemporaryLockouts",0);break;case"PermanentLockout":t.setValue("bruteForceProtected",!0),t.setValue("permanentLockout",!0),t.setValue("maxTemporaryLockouts",0);break;case"PermanentAfterTemporaryLockout":t.setValue("bruteForceProtected",!0),t.setValue("permanentLockout",!0),t.setValue("maxTemporaryLockouts",1);break}m(!0),h(!1)},selections:y,variant:ke.single,isOpen:d,"data-testid":"select-brute-force-mode","aria-label":a("selectUnmanagedAttributePolicy"),children:S.map(f=>e(te,{value:f,children:a(`bruteForceMode.${f}`)},f))})}),y!=="Disabled"&&c(J,{children:[e(Pt,{name:"failureFactor",label:a("failureFactor"),labelIcon:a("failureFactorHelp"),controller:{defaultValue:0,rules:{required:a("required")}}}),y==="PermanentAfterTemporaryLockout"&&e(Pt,{name:"maxTemporaryLockouts",label:a("maxTemporaryLockouts"),labelIcon:a("maxTemporaryLockoutsHelp"),controller:{defaultValue:0}}),(y==="TemporaryLockout"||y==="PermanentAfterTemporaryLockout")&&c(J,{children:[e(ut,{name:"waitIncrementSeconds"}),e(ut,{name:"maxFailureWaitSeconds"}),e(ut,{name:"maxDeltaTimeSeconds"})]}),e(Pt,{name:"quickLoginCheckMilliSeconds",label:a("quickLoginCheckMilliSeconds"),labelIcon:a("quickLoginCheckMilliSecondsHelp"),controller:{defaultValue:0}}),e(ut,{name:"minimumQuickLoginWaitSeconds"})]}),c(Ie,{children:[e(N,{variant:"primary",type:"submit","data-testid":"brute-force-tab-save",isDisabled:!p&&!o,children:a("save")}),e(N,{variant:"link",onClick:O,children:a("revert")})]})]})})},$l=({realm:l,save:n})=>{const{t:a}=B(),[t,i]=u(10);return c(Tt,{activeKey:t,onSelect:(s,p)=>i(p),children:[e($,{id:"headers",eventKey:10,"data-testid":"security-defenses-headers-tab",title:e(j,{children:a("headers")}),children:e(re,{variant:"light",children:e(_l,{realm:l,save:n})})}),e($,{id:"bruteForce",eventKey:20,"data-testid":"security-defenses-brute-force-tab",title:e(j,{children:a("bruteForceDetection")}),children:e(re,{variant:"light",children:e(zl,{realm:l,save:n})})})]})},jl=({setTableData:l})=>{const{adminClient:n}=le(),{config:a,save:t}=jt(),{t:i}=B(),s=Bt(),p=Ye(),{realm:d}=ne(),[h,o]=u(0),[m,P]=u();Ee(()=>o(r=>r+1),[a]);async function S(){return a?.groups??[]}const[O,y]=ye({titleKey:"deleteDialogTitle",children:c(vt,{i18nKey:"deleteDialogDescription",children:[" ",e("strong",{children:{group:m?.name}}),"."]}),continueButtonLabel:"delete",continueButtonVariant:se.danger,onConfirm:async()=>{const r=(a?.groups??[]).filter(w=>w!==m),b=m?.displayHeader?.substring(2,m?.displayHeader.length-1),v=m?.displayDescription?.substring(2,m?.displayDescription.length-1);try{await Promise.all(s.map(async w=>{try{if(await n.realms.getRealmLocalizationTexts({realm:d,selectedLocale:w})){await n.realms.deleteRealmLocalizationTexts({realm:d,selectedLocale:w,key:b}),await n.realms.deleteRealmLocalizationTexts({realm:d,selectedLocale:w,key:v});const x=await n.realms.getRealmLocalizationTexts({realm:d,selectedLocale:w});l([x])}}catch{console.error(`Error removing translations for ${w}`)}})),t({...a,groups:r},{successMessageKey:"deleteSuccess",errorMessageKey:"deleteAttributeGroupError"})}catch(w){console.error(`Error removing translations or updating attributes group: ${w}`)}}});function f(r){P(r),O()}return c(re,{variant:"light",className:"pf-v5-u-p-0",children:[e(y,{}),e(ze,{loader:S,ariaLabelKey:"tableTitle",toolbarItem:e(Ae,{children:e(N,{component:r=>e(Pe,{"data-testid":"create-attributes-groups-action",...r,to:Zt({realm:d})}),children:i("createGroupText")})}),columns:[{name:"name",displayKey:"columnName",cellRenderer:r=>e(Pe,{to:hn({realm:d,name:r.name}),children:r.name})},{name:"displayHeader",displayKey:"columnDisplayName"},{name:"displayDescription",displayKey:"columnDisplayDescription"}],actions:[{title:i("delete"),onRowClick:f}],emptyState:e(xe,{message:i("emptyStateMessage"),instructions:i("emptyStateInstructions"),primaryActionText:i("createGroupText"),onPrimaryAction:()=>p(Zt({realm:d}))})},h)]})},ra=["username","email"],ql=({setTableData:l})=>{const{adminClient:n}=le(),{config:a,save:t}=jt(),{realm:i}=ne(),{t:s}=B(),p=Bt(),d=Ye(),[h,o]=u("allGroups"),[m,P]=qe(),[S,O]=u(a?.attributes),[y,f]=u(""),[r,b]=ye({titleKey:s("deleteAttributeConfirmTitle"),messageKey:s("deleteAttributeConfirm",{attributeName:y}),continueButtonLabel:s("delete"),continueButtonVariant:se.danger,onConfirm:async()=>{if(!a?.attributes)return;const k=a.attributes.find(D=>D.name===y)?.displayName,L=k?.substring(2,k.length-1);try{await Promise.all(p.map(async F=>{try{if(await n.realms.getRealmLocalizationTexts({realm:i,selectedLocale:F})){await n.realms.deleteRealmLocalizationTexts({realm:i,selectedLocale:F,key:L});const I=await n.realms.getRealmLocalizationTexts({realm:i,selectedLocale:F});l([I])}}catch{console.error(`Error removing translations for ${F}`)}}));const D=a.attributes.filter(F=>F.name!==y);t({...a,attributes:D,groups:a.groups},{successMessageKey:"deleteAttributeSuccess",errorMessageKey:"deleteAttributeError"}),f("")}catch(D){console.error(`Error removing translations or updating attributes: ${D}`)}}});if(!a)return e(We,{});const v=a.attributes??[],w=a.groups??[],E=async(k,L)=>{const D=v.findIndex(g=>g.name===k.name);let F={};F=v[D],v.splice(D,1),v.splice(L,0,F),t({attributes:v,groups:w},{successMessageKey:"updatedUserProfileSuccess",errorMessageKey:"updatedUserProfileError"})},x=k=>e(Pe,{to:ea({realm:i,attributeName:k.name}),children:k.name},k.name);return c(J,{children:[e(ba,{children:c(fn,{children:[e(Ae,{children:e(ge,{toggleId:"kc-group-filter",width:200,"data-testid":"filter-select",isOpen:m,variant:ke.single,onToggle:P,toggleIcon:e(La,{}),onSelect:k=>{const L=k.toString();o(L),O(L==="allGroups"?v:v.filter(D=>D.group===L)),P()},selections:h==="allGroups"?s(h):h,children:[e(te,{"data-testid":"all-groups",value:"allGroups",children:s("allGroups")},"allGroups"),...bn(v.filter(k=>!!k.group),"group").map(k=>e(te,{value:k.group,children:k.group},k.group))]})}),e(Ae,{className:"kc-toolbar-attributesTab",children:e(N,{"data-testid":"createAttributeBtn",variant:"primary",component:k=>e(Pe,{...k,to:gn({realm:i})}),children:s("createAttribute")})})]})}),e(Be,{}),e(b,{}),e(Pa,{keyField:"name",onDragFinish:async(k,L)=>{const D=v.map(M=>M.name),F=L.indexOf(k),g=D.indexOf(k),I=v[g];I.name&&E(I,F)},actions:[{title:s("edit"),onClick:(k,L,D)=>{d(ea({realm:i,attributeName:D.name}))}},{title:s("delete"),isActionable:({name:k})=>!ra.includes(k),isDisabled:ra.includes(name),onClick:(k,L,D)=>{f(D.name),r()}}],columns:[{name:"name",displayKey:s("attributeName"),cellRenderer:x},{name:"displayName",displayKey:s("attributeDisplayName")},{name:"group",displayKey:s("attributeGroup")}],data:S??v})]})},Wl=()=>{const{config:l,save:n,isSaving:a}=jt(),{t}=B(),{addError:i}=Te(),[s,p]=u();Ee(()=>d(),[l,s]);function d(){s?.setValue(l?lt(l):"")}async function h(){const o=s?.getValue();if(o)try{await n(JSON.parse(o))}catch(m){i("invalidJsonError",m);return}}return c(re,{variant:"light",children:[e(zt,{language:$t.json,height:"30rem",onEditorDidMount:o=>p(o),isLanguageLabelVisible:!0}),e(rt,{children:c(Ie,{children:[e(N,{"data-testid":"save",variant:"primary",onClick:h,isDisabled:a,children:t("save")}),e(N,{variant:"link",onClick:d,isDisabled:a,children:t("revert")})]})})]})},Jl=({setTableData:l})=>{const{realm:n}=ne(),{t:a}=B(),t=d=>gt(ta({realm:n,tab:d})),i=t("attributes"),s=t("attributes-group"),p=t("json-editor");return e(Jn,{children:c(bt,{defaultLocation:ta({realm:n,tab:"attributes"}),mountOnEnter:!0,children:[e($,{title:e(j,{children:a("attributes")}),"data-testid":"attributesTab",...i,children:e(ql,{setTableData:l})}),e($,{title:e(j,{children:a("attributesGroup")}),"data-testid":"attributesGroupTab",...s,children:e(jl,{setTableData:l})}),e($,{title:e(j,{children:a("jsonEditor")}),"data-testid":"jsonEditorTab",...p,children:e(Wl,{})})]})})},Xl=({save:l,onChange:n,value:a,realmName:t,refresh:i})=>{const{adminClient:s}=le(),{environment:p}=vn(),{t:d}=B(),{refresh:h}=va(),{addAlert:o,addError:m}=Te(),P=Ye(),[S,O]=u(!1),[y,f]=u(!1),{hasAccess:r}=Ut(),b=r("manage-realm"),[v,w]=ye({titleKey:"disableConfirmTitle",messageKey:"disableConfirmRealm",continueButtonLabel:"disable",onConfirm:()=>{n(!a),l()}}),[E,x]=ye({titleKey:"deleteConfirmTitle",messageKey:"deleteConfirmRealmSetting",continueButtonLabel:"delete",continueButtonVariant:se.danger,onConfirm:async()=>{try{await s.realms.del({realm:t}),o(d("deletedSuccessRealmSetting"),ie.success),await h(),P(yn({realm:p.masterRealm})),i()}catch(k){m("deleteErrorRealmSetting",k)}}});return c(J,{children:[e(w,{}),e(x,{}),e(vl,{open:S,toggleDialog:()=>O(!S)}),e(gl,{isOpen:y,onClose:()=>f(!1)}),e(Pn,{titleKey:t,subKey:"realmSettingsExplain",helpUrl:Tn.realmSettingsUrl,divider:!1,dropdownItems:[e(tt,{"data-testid":"openPartialImportModal",isDisabled:!b,onClick:()=>{O(!0)},children:d("partialImport")},"import"),e(tt,{"data-testid":"openPartialExportModal",isDisabled:!b,onClick:()=>f(!0),children:d("partialExport")},"export"),e(Be,{},"separator"),e(tt,{isDisabled:!b,onClick:E,children:d("delete")},"delete")],isEnabled:a,isReadOnly:!b,onToggle:k=>{k?(n(k),l()):v()}})]})},Yl=()=>{const{adminClient:l}=le(),{t:n}=B(),{addAlert:a,addError:t}=Te(),{realm:i,realmRepresentation:s,refresh:p}=ne(),{refresh:d}=va(),h=Bt(),o=Ye(),m=Mt(),[P,S]=u(void 0),{control:O,setValue:y,getValues:f}=ve({mode:"onChange"}),[r,b]=u(0),v=()=>{b(r+1)},w=(H=s)=>{Ve(H,y)};Ee(()=>{w(),(async()=>{try{await Promise.all(h.map(async de=>{try{const W=await l.realms.getRealmLocalizationTexts({realm:i,selectedLocale:de});W&&S([W])}catch{return[]}}))}catch{return[]}})()},[y,s]);const E=async H=>{H=Cn(H),H.attributes?.["acr.loa.map"]&&typeof H.attributes["acr.loa.map"]!="string"&&(H.attributes["acr.loa.map"]=JSON.stringify(Object.fromEntries(H.attributes["acr.loa.map"].filter(({key:W})=>W!=="").map(({key:W,value:he})=>[W,he]))));try{const W={...s,...H,id:H.realm};W.smtpServer?.port===""&&(W.smtpServer={...W.smtpServer,port:null});const he=await Sn(kn(l.baseUrl,`admin/realms/${i}/ui-ext`),{method:"PUT",body:JSON.stringify(W),headers:{"Content-Type":"application/json",...In(await l.getAccessToken())}});if(!he.ok)throw new Error(he.statusText);a(n("realmSaveSuccess"),ie.success)}catch(W){t("realmSaveError",W)}i!==(H.realm||s?.realm)&&(await d(),o(At({realm:H.realm,tab:"general"}))),p()},x=H=>gt(At({realm:i,tab:H})),k=x("general"),L=x("login"),D=x("email"),F=x("themes"),g=x("keys"),I=x("events"),M=x("localization"),_=x("security-defenses"),K=x("sessions"),q=x("tokens"),X=x("client-policies"),me=x("user-profile"),ue=x("user-registration"),{hasAccess:Le,hasSomeAccess:pe}=Ut(),ce=Le("view-realm")&&pe("view-events","manage-events"),Ce=Le("view-realm")&&pe("view-clients","manage-clients"),C=H=>gt(Dt({realm:i,tab:H})),A=C("profiles"),Z=C("policies");return c(J,{children:[e(G,{name:"enabled",defaultValue:!0,control:O,render:({field:H})=>e(Xl,{value:H.value,onChange:H.onChange,realmName:i,refresh:v,save:()=>E(f())})}),e(re,{variant:"light",className:"pf-v5-u-p-0",children:c(bt,{isBox:!0,mountOnEnter:!0,"aria-label":"realm-settings-tabs",defaultLocation:At({realm:i,tab:"general"}),children:[e($,{title:e(j,{children:n("general")}),"data-testid":"rs-general-tab",...k,children:e(pl,{realm:s,save:E})}),e($,{title:e(j,{children:n("login")}),"data-testid":"rs-login-tab",...L,children:e(bl,{refresh:p,realm:s})}),e($,{title:e(j,{children:n("email")}),"data-testid":"rs-email-tab",...D,children:e(ul,{realm:s,save:E})}),e($,{title:e(j,{children:n("themes")}),"data-testid":"rs-themes-tab",...F,children:e(kl,{realm:s,save:E})}),e($,{title:e(j,{children:n("keys")}),"data-testid":"rs-keys-tab",...g,children:e(Fl,{})}),ce&&e($,{title:e(j,{children:n("events")}),"data-testid":"rs-realm-events-tab",...I,children:e(wl,{realm:s})}),e($,{title:e(j,{children:n("localization")}),"data-testid":"rs-localization-tab",...M,children:e(Bl,{save:E,realm:s,tableData:P},r)}),e($,{title:e(j,{children:n("securityDefences")}),"data-testid":"rs-security-defenses-tab",..._,children:e($l,{realm:s,save:E})}),e($,{title:e(j,{children:n("sessions")}),"data-testid":"rs-sessions-tab",...K,children:e(Sl,{realm:s,save:E},r)}),e($,{title:e(j,{children:n("tokens")}),"data-testid":"rs-tokens-tab",...q,children:e(Il,{save:E,realm:s})}),m(Ft.ClientPolicies)&&e($,{title:e(j,{children:n("clientPolicies")}),"data-testid":"rs-clientPolicies-tab",...X,children:c(bt,{mountOnEnter:!0,defaultLocation:Dt({realm:i,tab:"profiles"}),children:[e($,{id:"profiles","data-testid":"rs-policies-clientProfiles-tab","aria-label":n("clientProfilesSubTab"),title:e(j,{children:n("profiles")}),tooltip:e(aa,{content:n("clientPoliciesProfilesHelpText")}),...A,children:e(Cl,{})}),e($,{id:"policies","data-testid":"rs-policies-clientPolicies-tab","aria-label":n("clientPoliciesSubTab"),...Z,title:e(j,{children:n("policies")}),tooltip:e(aa,{content:n("clientPoliciesPoliciesHelpText")}),children:e(yl,{})})]})}),e($,{title:e(j,{children:n("userProfile")}),"data-testid":"rs-user-profile-tab",...me,children:e(Jl,{setTableData:S})}),Ce&&e($,{title:e(j,{children:n("userRegistration")}),"data-testid":"rs-userRegistration-tab",...ue,children:e(Pl,{})})]})})]})};function Xi(){return e(Yl,{})}export{Xi as default};
//# sourceMappingURL=RealmSettingsSection-2oj_-SB8.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy