1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8217],{24823:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/roles",function(){return t(2924)}])},58432:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(85893),s=t(33299),o=t(41664);function i(){return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:"p-10 grid justify-items-center",children:(0,r.jsx)("div",{className:" w-full lg:max-w-full flex items-stretch",children:(0,r.jsxs)("div",{className:"border-r border-b border-l border-t border-gray-400 lg:border-t lg:border-gray-400 bg-white rounded-b lg:rounded-b-none lg:rounded-r p-4 flex flex-col justify-between leading-normal py-4",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsxs)("p",{className:"text-sm text-gray-600 flex items-center",children:[(0,r.jsx)("svg",{className:"fill-current text-gray-500 w-3 h-3 mr-2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{d:"M4 8V6a6 6 0 1 1 12 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h1zm5 6.73V17h2v-2.27a2 2 0 1 0-2 0zM7 6v2h6V6a3 3 0 0 0-6 0z"})}),"Members only"]}),(0,r.jsx)("div",{className:"text-gray-900 font-bold text-xl mb-2",children:"Access denied"}),(0,r.jsx)("p",{className:"text-gray-700 text-base",children:"Bitte einloggen um auf Inhalte zuzugreifen."}),(0,r.jsx)(o.default,{href:"/api/auth/signin",children:(0,r.jsx)("a",{onClick:function(e){e.preventDefault(),(0,s.signIn)()},children:(0,r.jsx)("button",{type:"button",className:"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Login"})})})]}),(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)("div",{className:"text-sm"})})]})})})})}},20921:function(e,n,t){"use strict";var r=t(85893);n.Z=function(e){var n=e.className;return(0,r.jsx)("div",{className:"".concat(n," w-8 h-8 overflow-hidden"),children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",style:{margin:"auto",background:"transparent",display:"block"},width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:(0,r.jsx)("circle",{cx:"50",cy:"50",r:"32",strokeWidth:"8",stroke:"currentColor",strokeDasharray:"50.26548245743669 50.26548245743669",fill:"none",strokeLinecap:"round",children:(0,r.jsx)("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",keyTimes:"0;1",values:"0 50 50;360 50 50"})})})})}},92422:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(85893),s={primary:"inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-boni-red text-base font-medium text-white hover:bg-boni-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:text-sm disabled:opacity-50",secondary:"inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-gray-200 text-base font-medium text-dark hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:text-sm disabled:opacity-50",accept:"inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-green-500 text-base font-medium text-dark hover:bg-green-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:text-sm disabled:opacity-50",later:"inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-gray-400 text-base font-medium text-dark hover:bg-boni-gold focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:text-sm disabled:opacity-50",decline:"inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-500 text-base font-medium text-dark hover:bg-red-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:text-sm disabled:opacity-50"};function o(e){var n=e.children,t=e.disabled,o=e.label,i=e.onClick,a=e.color,l=e.type,c=e.className;return(0,r.jsx)("button",{className:s[a]+(null!==c&&void 0!==c?c:""),disabled:t,onClick:i,type:l,children:n||o})}},88490:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var r=t(85893);function s(e){var n=e.id,t=e.label,s=e.value,o=e.onChange,i=e.removeBorder?"relative rounded-md rounded-b-none px-3 py-2 ":"relative border border-gray-300 rounded-md rounded-b-none px-3 py-2 ";return(0,r.jsx)("div",{className:i,children:(0,r.jsxs)("div",{className:"flex items-center h-5",children:[(0,r.jsx)("input",{id:n,"aria-describedby":n+"description",name:n,type:"checkbox",className:"focus:ring-boni-blue h-4 w-4 text-boni-blue border-gray-300 rounded",checked:s,onChange:function(e){return o(e.target.checked)}}),(0,r.jsx)("label",{htmlFor:n,className:"font-medium sm:text-sm text-gray-700 pl-2",children:t})]})})}},44e3:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var r=t(85893);function s(e){var n=e.id,t=e.label,s=e.value,o=e.inputType,i=void 0===o?"text":o,a=e.onChange,l=e.invalid,c=e.error,u=e.disabled,d=e.noBorder;return(0,r.jsxs)("div",{className:"\n relative px-3 py-2 text-gray-900\n ".concat(d?"":"border border-gray-300 rounded-md rounded-b-none","\n ").concat(!!l&&"border-red-400 text-red-600","\n ").concat(u&&"opacity-50 cursor-not-allowed","\n "),children:[(0,r.jsx)("label",{htmlFor:n,className:"block text-xs font-medium",children:t}),(0,r.jsx)("input",{type:i,name:n,id:n,className:"block w-full border-0 p-0 placeholder-gray-500 sm:text-sm focus-within:ring-0 focus-within:ring-indigo-0 focus-within:border-indigo-600",placeholder:"",value:s,onChange:function(e){return a(e.target.value)},disabled:u}),!!c&&(0,r.jsx)("p",{className:"text-xs text-red-600",children:c})]})}},30103:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(85893),s=t(73933),o=t(20921);function i(e){var n=e.checked,t=e.loading,i=void 0!==t&&t,a=e.onChange,l=e.disabled,c=e.label;return(0,r.jsxs)(s.r,{checked:n,onChange:a,disabled:l,className:"".concat(n?"bg-boni-blue":"bg-gray-400","\n relative inline-flex h-[28px] w-[56px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 items-center\n ").concat(l?"opacity-50 cursor-not-allowed":""),children:[(0,r.jsx)("span",{className:"sr-only",children:c}),i?(0,r.jsx)(o.Z,{className:"h-[24px] w-[24px] absolute text-white"}):(0,r.jsx)("span",{"aria-hidden":"true",className:"".concat(n?"translate-x-7":"translate-x-0","\n pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out")})]})}},35390:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(85893),s=t(44080),o=t(71272),i=t(67294),a=t(28309);function l(e){var n=e.title,t=e.children,l=e.open,c=e.onClose,u=e.icon,d=e.iconColor,m=void 0===d?"gray":d,f=e.style;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(s.u.Root,{show:l,as:i.Fragment,children:(0,r.jsx)(o.V,{as:"div",className:"fixed z-10
1inset-0 overflow-y-auto",onClose:c,children:(0,r.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,r.jsx)(s.u.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,r.jsx)(o.V.Overlay,{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),(0,r.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"\u200b"}),(0,r.jsx)(s.u.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,r.jsx)("div",{className:"relative inline-block align-bottom bg-white rounded-lg px-4 pt-5 pb-4 text-left shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-2xl sm:w-full sm:p-6",style:f,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-"+m+"-100",children:(0,r.jsx)(a.e,{icon:u,className:"h-6 w-6 text-"+m+"-600"})}),(0,r.jsxs)("div",{className:"mt-3 text-center sm:mt-5",children:[(0,r.jsx)(o.V.Title,{as:"h3",className:"text-lg leading-6 font-semibold",children:n}),(0,r.jsx)("div",{className:"mt-2",children:t})]})]})})})]})})})})}},66628:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(85893),s=t(67294),o=t(20921),i=t(92422),a=t(35390);function l(e){var n=e.title,t=e.body,l=e.onClose,c=e.onConfirm,u=e.open,d=e.icon,m=void 0===d?"ExclamationCircleIcon":d,f=e.iconColor,p=void 0===f?"red":f,x=e.style,h=e.confirmButtonColor,b=void 0===h?"primary":h,v=(0,s.useState)(!1),g=v[0],y=v[1];return(0,s.useEffect)((function(){y(!1)}),[u]),(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(a.Z,{title:n,icon:m,iconColor:p,open:u,onClose:l,style:x,children:[(0,r.jsx)("div",{className:"isolate -space-y-px rounded-md mb-2 text-slate-600 text-sm",dangerouslySetInnerHTML:{__html:t}}),(0,r.jsxs)("div",{className:"mt-4 flex gap-4",children:[(0,r.jsx)(i.Z,{color:"secondary",label:"Abbrechen",onClick:l,type:"button"}),(0,r.jsxs)(i.Z,{color:b,disabled:g,label:"Ok",onClick:function(e){y(!0),c(e)},type:"submit",children:[g&&(0,r.jsx)(o.Z,{className:"h-5 w-5 mr-2"}),"Ok"]})]})]})})}},2924:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return V},default:function(){return $}});var r=t(85893),s=t(34051),o=t.n(s),i=t(67294),a=t(33299),l=t(58432),c=t(17283),u=t(37887),d=t(50319),m=t(66628),f=t(44e3),p=t(88490),x=t(92422),h=t(35390),b=t(20921);function v(e){var n,t,s=e.role,o=e.onClose,a=e.onSubmit,l=e.open,c=(0,i.useState)(!1),u=c[0],d=c[1],m=(0,i.useState)(null!==(n=s.name)&&void 0!==n?n:""),v=m[0],g=m[1],y=(0,i.useState)(null!==(t=s.active)&&void 0!==t&&t),w=y[0],j=y[1];return(0,i.useEffect)((function(){l&&(d(!1),function(){var e,n;g(null!==(e=s.name)&&void 0!==e?e:""),j(null!==(n=s.active)&&void 0!==n&&n)}())}),[l]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(h.Z,{title:s.id?"Edit role":"Create role",icon:"PencilIcon",open:l,onClose:o,children:(0,r.jsxs)("form",{onSubmit:function(e){e.preventDefault(),function(e){d(!0);var n=JSON.parse(JSON.stringify(s));n.name=v,n.active=w,n.permissions||(n.permissions=[]),a(e,n)}(e)},children:[(0,r.jsxs)("div",{className:"isolate -space-y-px rounded-md shadow-sm",children:[(0,r.jsx)(f.Z,{label:"Name",id:"name",value:v,onChange:function(e){return g(e)}}),(0,r.jsx)(p.Z,{label:"Active Role",id:"active",value:w,onChange:function(e){return j(e)}})]}),(0,r.jsxs)("div",{className:"mt-5 flex",children:[(0,r.jsx)(x.Z,{color:"secondary",type:"button",label:"Abbrechen",onClick:o,className:"mr-2"}),(0,r.jsxs)(x.Z,{color:"primary",type:"submit",label:s.id?"Update":"Create",onClick:function(){return null},disabled:u,children:[u&&(0,r.jsx)(b.Z,{className:"h-5 w-5 mr-2"}),s.id?"Update":"Create"]})]})]})})})}var g=t(30103),y=t(77e3),w=t(78017),j=t(6558),_=t(97568),N=t(47153);function k(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function C(e,n,t,r,s,o,i){try{var a=e[o](i),l=a.value}catch(c){return void t(c)}a.done?n(l):Promise.resolve(l).then(r,s)}function S(e){return function(){var n=this,t=arguments;return new Promise((function(r,s){var o=e.apply(n,t);function i(e){C(o,r,s,i,a,"next",e)}function a(e){C(o,r,s,i,a,"throw",e)}i(void 0)}))}}function Z(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){Z(e,n,t[n])}))}return e}function O(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,s,o=[],i=!0,a=!1;try{for(t=t.call(e);!(i=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);i=!0);}catch(l){a=!0,s=l}finally{try{i||null==t.return||t.return()}finally{if(a)throw s}}return o}}
1(e,n)||T(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function F(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,n){if(e){if("string"===typeof e)return k(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?k(e,n):void 0}}function R(){var e=A(["\n query getRoles {\n user_roles(order_by: { name: asc }) {\n id\n name\n permissions\n }\n }\n"]);return R=function(){return e},e}function z(){var e=A(["\n mutation upsertRole($data: user_roles_insert_input!) {\n insert_user_roles_one(\n object: $data\n on_conflict: { constraint: user_roles_pkey, update_columns: [name, permissions, active] }\n ) {\n id\n }\n }\n"]);return z=function(){return e},e}function E(){var e=A(["\n mutation deleteUserRole($role_id: uuid!) {\n delete_user_roles(where: { id: { _eq: $role_id } }) {\n affected_rows\n }\n }\n"]);return E=function(){return e},e}var D=["analysedata_export","applicationtexts_show","apptext_create","apptext_update","apptext_delete","blog_show_all","blog_show","blog_create","blog_update","blog_delete","content_show_all","content_show","content_create","content_update","content_delete","group_show","group_show_all","group_create","group_update","group_delete","group_add_user","group_remove_user","importexport_show","log_show","log_export","log_delete","medialibrary_show","menu_show","quiz_show","quiz_create","quiz_update","quiz_delete","prayer_show","prayer_create","prayer_update","prayer_delete","rolespermissions_show","rolespermissions_create","rolespermissions_update","rolespermissions_delete","survey_show","survey_create","survey_update","survey_delete","gallery_show","gallery_create","gallery_update","gallery_delete","task_show","task_create","task_update","task_delete","task_review","taskresult_show","taskresult_review","user_show_all","user_show","user_create","user_update","user_delete","standardcontent_edit"],I=D.reduce((function(e,n){var t=O("".concat(n).split("_"),1)[0];return e.includes(t)||e.push(t),e}),[]).sort(),M=(0,c.Ps)(R()),U=(0,c.Ps)(z()),q=(0,c.Ps)(E());function B(e){e.title;var n,t,s=(0,_.$G)(["roles","contentmanagement","actionlog"]).t,c=(0,a.useSession)(),f=c.data,p=c.status,x=(0,i.useState)({}),h=x[0],b=x[1],k=(0,i.useState)([]),C=(k[0],k[1]),Z=(0,i.useState)(""),A=Z[0],T=Z[1],R=(0,i.useState)(!1),z=R[0],E=R[1],B=(0,i.useState)(!1),V=B[0],$=B[1],L=(0,i.useState)({}),X=L[0],H=L[1],J=(0,u.a)(M),G=O((0,d.D)(q),1)[0],W=O((0,d.D)(U),1)[0],Y=function(){var e=S(o().mark((function e(n,t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),e.next=4,W({variables:{data:{name:t.name,active:t.active}}});case 4:return E(!1),e.next=7,J.refetch();case 7:(0,N.xN)(null===(r=f.user)||void 0===r?void 0:r.id,N.pp.Update,N.rP.RolesPermission,s("actionlog:texts.role_permission.create",{rolename:t.name}));case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),K=function(){var e=S(o().mark((function e(n,t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),e.next=4,updateRole({variables:{uid:t._id,name:t.name,active:t.active,permissions:t.permissions}});case 4:(0,N.xN)(null===(r=f.user)||void 0===r?void 0:r.id,N.pp.Update,N.rP.RolesPermission,s("actionlog:texts.role_permission.update",{rolename:t.name}));case 5:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Q=function(){var e=S(o().mark((function e(n,t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),e.next=4,G({variables:{role_id:t.id}});case 4:return $(!1),b({}),e.next=8,J.refetch();case 8:(0,N.xN)(null===(r=f.user)||void 0===r?void 0:r.id,N.pp.Delete,N.rP.RolesPermission,s("actionlog:texts.role_permission.delete",{rolename:t.name}));case 9:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ee=function(){var e=S(o().mark((function e(n,t,r){var i,a,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(t),a=F(n.permissions||[]),(l=
1a.findIndex((function(e){return e===t})))>=0&&a.splice(l,1),r&&a.push(t),e.next=8,W({variables:{data:{id:n.id,name:n.name,active:n.active,permissions:a}}});case 8:return b(P({},n,{permissions:a})),e.next=11,J.refetch();case 11:(0,N.xN)(null===(i=f.user)||void 0===i?void 0:i.id,N.pp.Update,N.rP.RolesPermission,s("actionlog:texts.role_permission.update",{rolename:n.name})),T("");case 13:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}();return"loading"===p?null:f?(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex p-4",children:[(0,r.jsxs)("div",{className:"pr-4 w-72",children:[(0,r.jsxs)("h1",{className:"flex justify-between mb-6 text-xl font-semibold text-gray-900",children:["Roles",(0,r.jsx)("button",{type:"button",className:"inline-flex items-center justify-center px-4 py-2 text-sm font-medium text-white border border-transparent rounded-md shadow-sm bg-boni-blue hover:bg-boni-gold focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 sm:w-auto",onClick:function(){return H({}),void E(!0)},children:(0,r.jsx)(y.Z,{className:"w-4"})})]}),(0,r.jsx)("ul",{children:null===(n=J.data)||void 0===n||null===(t=n.user_roles)||void 0===t?void 0:t.map((function(e){return(0,r.jsxs)("li",{className:"flex justify-between items-center cursor-pointer p-2"+(h.id==e.id?" bg-gray-300":""),onClick:function(){b(e),C(e.permissions)},children:[["admin","moderator","group_leader","user"].includes(e.name)?(0,r.jsx)("span",{children:s("roles.".concat(e.name))}):(0,r.jsx)("span",{children:e.name}),!["admin","moderator","group_leader","user"].includes(e.name)&&(0,r.jsx)("a",{href:"#",className:"text-boni-red hover:text-boni-gold",onClick:function(){return function(e){H(e),$(!0)}(e)},children:(0,r.jsx)(w.Z,{className:"w-4"})})]},e.id)}))})]}),(0,r.jsx)("ul",{children:h.id&&I&&Array.from(I).map((function(e,n){return(0,r.jsx)("li",{children:(0,r.jsx)("ul",{children:(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h1",{className:"mb-6 text-xl font-semibold text-gray-900",children:s("roles.".concat(e,"_title"))}),(0,r.jsx)("ul",{children:D.filter((function(n){return n.match(e)})).map((function(e){var n;return(0,r.jsxs)("li",{className:"relative flex items-center justify-between p-2",children:[s("roles.".concat(e)),(0,r.jsx)(g.Z,{checked:null===(n=h.permissions)||void 0===n?void 0:n.includes(e),label:s("roles.".concat(e)),onChange:function(n){return ee(h,e,n)}}),A==e&&(0,r.jsx)(j.Z,{className:"absolute w-5 h-5 animate-spin direction-reverse",style:{right:-18}})]},e)}))})]})})},e)}))}),(0,r.jsx)(v,{role:X,onClose:function(){return E(!1)}
1,onSubmit:function(e,n){n.id?K(e,n):Y(e,n)},open:z}),(0,r.jsx)(m.Z,{title:"Delete role",body:"Are you sure you want to delete role <b>".concat(X.name,"</b>?"),onClose:function(){return $(!1)},onConfirm:function(e){return Q(e,X)},open:V})]})}):(0,r.jsx)(l.Z,{})}var V=!0;function $(e){e.roles,e.permissionTypes;var n=(0,a.useSession)();n.data,n.status;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(B,{title:"Roles and Permissions"})})}}},function(e){e.O(0,[7887,927,7153,9774,2888,179],(function(){return n=24823,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.