1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e._posthogReleaseId=e._posthogReleaseId||`01a118ba-4f2c-0000-e63e-ca9fdc4ab9a4`;var t=new e.Error().stack;t&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[t]=`0833d596-0b91-5d26-b1b8-95db6b7fea24`)}catch{}})();import{t as e}from"./Url.constant-BTEffla1.js";import{t}from"./useFetcher-DBm6j_-I.js";var n=async(n,r,i)=>{try{await t(e.USER_SECURITY.ROLES.UPDATE_ROLE(n),i,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)})}catch(e){throw Error(`Failed to update role: ${e instanceof Error?e.message:`Unknown error`}`)}},r=async(n,r)=>{try{return await t(e.USER_SECURITY.ROLES.GET_ROLE(n),r)}catch(e){throw Error(`Failed to fetch role: ${e instanceof Error?e.message:`Unknown error`}`)}},i=async(n,r,i)=>{try{await t(e.USER_SECURITY.ROLES.RENAME_ROLE(n),i,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({RoleId:n,NewName:r})})}catch{throw Error(`Failed to rename role`)}},a=async(n,r,i)=>{try{await t(e.USER_SECURITY.ROLES.COPY_ROLE,i,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({SourceRoleId:n,NewName:r})})}catch(e){throw Error(`Failed to copy role: ${e instanceof Error?e.message:`Unknown error`}`)}},o=async(n,r)=>{try{await t(e.USER_SECURITY.ROLES.UPDATE_ROLE_ASSIGNMENT,r,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...n})})}catch(e){throw Error(`Failed to update role assignment: ${e instanceof Error?e.message:`Unknown error`}`)}},s=function(e){return e.LOAD_SUCCESS=`ROLES_LOAD_SUCCESS`,e.LOAD_FAILURE=`ROLES_LOAD_FAILURE`,e.SET_FILTER_MODE=`ROLES_SET_FILTER_MODE`,e.TOGGLE_LOADING=`ROLES_TOGGLE_LOADING`,e.TOGGLE_EDIT_PAGE_LOADING=`ROLES_TOGGLE_EDIT_PAGE_LOADING`,e.COPY_SUCCESS=`ROLES_COPY_SUCCESS`,e.COPY_FAILURE=`ROLES_COPY_FAILURE`,e.UPDATE_SUCCESS=`ROLES_UPDATE_SUCCESS`,e.UPDATE_FAILURE=`ROLES_UPDATE_FAILURE`,e.RENAME_SUCCESS=`ROLES_RENAME_SUCCESS`,e.RENAME_FAILURE=`ROLES_RENAME_FAILURE`,e.GET_ROLE_ID_SUCCESS=`ROLES_GET_ROLE_ID_SUCCESS`,e.GET_ROLE_ID_FAILURE=`ROLES_GET_ROLE_ID_FAILURE`,e.CLEAR_SELECTED_ROLE=`ROLES_CLEAR_SELECTED_ROLE`,e.INITIAL_EDIT_PAGE_DATA_LOAD=`ROLES_INITIAL_EDIT_PAGE_DATA_LOAD`,e.RESET_EDIT_PAGE_DATA_LOAD=`ROLES_RESET_EDIT_PAGE_DATA_LOAD`,e.SET_TEMP_ASSIGNMENT=`ROLES_SET_TEMP_ASSIGNMENT`,e.UNDO_ASSIGNMENT=`ROLES_UNDO_ASSIGNMENT`,e.REDO_ASSIGNMENT=`ROLES_REDO_ASSIGNMENT`,e.RESET_ASSIGNMENT=`ROLES_RESET_ASSIGNMENT`,e.SET_SELECTED_ROLE_FOR_ASSIGNMENT=`ROLES_SET_SELECTED_ROLE_FOR_ASSIGNMENT`,e.TOGGLE_ASSIGNMENT_LOADING=`ROLES_TOGGLE_ASSIGNMENT_LOADING`,e.UPDATE_ASSIGNMENT_SUCCESS=`ROLES_UPDATE_ASSIGNMENT_SUCCESS`,e.UPDATE_ASSIGNMENT_FAILURE=`ROLES_UPDATE_ASSIGNMENT_FAILURE`,e}({}),c=()=>({type:`ROLES_COPY_SUCCESS`}),l=e=>({type:`ROLES_COPY_FAILURE`,payload:e}),u=()=>({type:`ROLES_UPDATE_SUCCESS`}),d=e=>({type:`ROLES_UPDATE_FAILURE`,payload:e}),f=e=>({type:`ROLES_GET_ROLE_ID_SUCCESS`,payload:e}),p=e=>({type:`ROLES_GET_ROLE_ID_FAILURE`,payload:e}),m=()=>({type:`ROLES_RENAME_SUCCESS`}),h=e=>({type:`ROLES_RENAME_FAILURE`,payload:e}),g=()=>({type:`ROLES_CLEAR_SELECTED_ROLE`}),_=e=>({type:`ROLES_TOGGLE_LOADING`,payload:e}),v=e=>({type:`ROLES_TOGGLE_EDIT_PAGE_LOADING`,payload:e}),y=e=>({type:`ROLES_SET_FILTER_MODE`,payload:e}),b=()=>({type:`ROLES_INITIAL_EDIT_PAGE_DATA_LOAD`}),x=()=>({type:`ROLES_RESET_EDIT_PAGE_DATA_LOAD`}),S=e=>({type:`ROLES_SET_TEMP_ASSIGNMENT`,payload:e}),C=()=>({type:`ROLES_UNDO_ASSIGNMENT`}),w=()=>({type:`ROLES_REDO_ASSIGNMENT`}),T=()=>({type:`ROLES_RESET_ASSIGNMENT`}),E=e=>({type:`ROLES_TOGGLE_ASSIGNMENT_LOADING`,payload:e}),D=e=>({type:`ROLES_SET_SELECTED_ROLE_FOR_ASSIGNMENT`,payload:e}),O=(e,t)=>async(n,r)=>{let{globalData:{session:i}}=r();n(_(!0));try{await a(e,t,i),n(c())}catch(e){throw n(l(e)),e}finally{n(_(!1))}},k=(e,t)=>async(n,r)=>{let{globalData:{session:a}}=r();n(_(!0));try{await i(e,t,a),n(m())}catch(e){throw n(h(e)),e}finally{n(_(!1))}},A=e=>async(t,n)=>{let{globalData:{session:i}}=n();t(_(!0));try{let n=await r(e,i);return t(f(n)),n}catch(e){throw t(p(e)),e}finally{t(_(!1))}},j=(e,t)=>async(r,a)=>{let{globalData:{session:o},roles:{selectedRole:s}}=a();r(v(!0));try{if(s&&s.name!==t.name){r(v(!0));try{await i(e,t.name,o),r(m())}catch(e){throw r(h(e)),r(v(!1)),Error(`Name is already in use, please select a new name`)}}await n(e,t,o),r(u())}catch(e){throw r(d(e)),e}finally{r(v(!1))}},M=e=>async(t,n)=>{let{globalData:{session:r}}=n();t(E(!0));try{await o({roleId:e.roleId,adminsToAdd:Array.from(new Set(e.adminsToAdd)),adminsToRemove:Array.from(new Set(e.adminsToRemove))},r),t({type:`ROLES_UPDATE_ASSIGNMENT_SUCCESS`}),t(T())}catch(e){throw t({type:`ROLES_UPDATE_ASSIGNMENT_FAILURE`,payload:e}),e}finally{t(E(!1))}},N={GRID:{COLUMNS:{NAME:`Role`,DESCRIPTION:`Description`,TYPE:`Type`},FILTER_MODES:{CURRENT:`Current`,ALL:`All`}},BUTTONS:{RENAME:`Rename`,COPY:`Copy`,VIEW:`View`,EDIT:`Edit`,ASSIGN_USERS:`Assign Users`},MESSAGES:{RENAME_SUCCESS:`Role renamed successfully`,RENAME_ERROR:`Error renaming role`,COPY_SUCCESS:`Role copied successfully`,COPY_ERROR:`Error c
1opying role`,EDIT_SUCCESS:`Role Edited successfully`,EDIT_ERROR:`Error editing role`,ASSIGNMENT_SUCCESS:`Role assigned successfully`,ASSIGNMENT_ERROR:`Error updating role assignments`,UNREMOVABLE_ADMIN_ERROR:`Cannot remove administrators from their only role`},MODAL:{TITLES:{COPY_ROLE:`Copy Role`,RENAME_ROLE:`Rename Role`},TYPES:{COPY:`COPY`,RENAME:`RENAME`}},FIELDS:{CURRENT_NAME:`Current Name`,NEW_NAME:`New Name`}},P={groups:[{children:[{title:`Role Settings`,path:{hash:`#roleSettings`}},{title:`Contacts`,path:{hash:`#contacts`}},{title:`Companies`,path:{hash:`#companies`}},{title:`Segments`,path:{hash:`#segments`}},{title:`Campaigns`,path:{hash:`#campaigns`}},{title:`Automation`,path:{hash:`#automation`}},{title:`Contacts (SMS)`,path:{hash:`#contactsSMS`}},{title:`Assets/Editor`,path:{hash:`#assetsEditor`}},{title:`Sales`,path:{hash:`#sales`}},{title:`Analytics`,path:{hash:`#analytics`}},{title:`Settings`,path:{hash:`#settings`}}]}]},F=[{label:`Contacts`,name:`contacts`,inputs:[{fieldLabel:`View Contacts, Import History`,apiFieldName:`ViewMembers`},{fieldLabel:`Add, Copy`,apiFieldName:`AddMembers`},{fieldLabel:`Edit, Delete, Unsubscribe`,apiFieldName:`EditMembers`},{fieldLabel:`Import Contacts`,apiFieldName:`ImportMembers`},{fieldLabel:`Export Contacts`,apiFieldName:`ExportMembers`},{fieldLabel:`Manage Bans`,apiFieldName:`ManageBans`},{fieldLabel:`Remove Contacts`,apiFieldName:`RemoveContacts`},{fieldLabel:`Suppression Lists`,apiFieldName:`SuppressionLists`}]},{label:`Segments`,name:`segments`,inputs:[{fieldLabel:`View, Test`,apiFieldName:`ViewSegments`},{fieldLabel:`Add, Copy`,apiFieldName:`AddSegments`},{fieldLabel:`Edit, Delete`,apiFieldName:`EditSegments`}]},{label:`Campaigns`,name:`campaigns`,inputs:[{fieldLabel:`View, Preview, Test, Spam Analysis`,apiFieldName:`ViewDraftMailing`},{fieldLabel:`Add, Copy, Clone, Edit`,apiFieldName:`CreateEditMailing`},{fieldLabel:`Send, Schedule, Unschedule`,apiFieldName:`SendMailing`},{fieldLabel:`Select Footers`,apiFieldName:`SelectFooter`},{fieldLabel:`Delete Campaigns`,apiFieldName:`DeleteMailing`}]},{label:`Automation`,name:`automation`,inputs:[{fieldLabel:`View`,apiFieldName:`ViewAutomation`},{fieldLabel:`Manage Automations`,apiFieldName:`ManageAutomation`},{fieldLabel:`Manage Templates`,apiFieldName:`ManageAutomationTemplates`}]},{label:`Assets/Editor`,name:`assetsEditor`,inputs:[{fieldLabel:`View Templates`,apiFieldName:`ViewTemplates`},{fieldLabel:`Add, Copy Draft Templates`,apiFieldName:`AddContent`},{fieldLabel:`Edit, Rename, Delete Draft Templates`,apiFieldName:`EditContent`},{fieldLabel:`Manage Complete Templates`,apiFieldName:`ManageTemplates`},{fieldLabel:`Manage Brand Styles`,apiFieldName:`ManageBrandColors`},{fieldLabel:`Purchase Email Rendering Credits`,apiFieldName:`PurchaseLitmusCredits`},{fieldLabel:`Lock/Unlock Editor Cells`,apiFieldName:`LockUnlockEditorCells`},{fieldLabel:`Change HTML in Editors`,apiFieldName:`HtmlEditor`},{fieldLabel:`View Media`,apiFieldName:`ViewMedia`},{fieldLabel:`Manage Media`,apiFieldName:`ManageMedia`},{fieldLabel:`View Snippets`,apiFieldName:`ViewSnippets`},{fieldLabel:`Add, Copy Snippets`,apiFieldName:`AddSnippets`},{fieldLabel:`Edit, Rename, Delete Snippets`,apiFieldName:`EditSnippets`},{fieldLabel:`View Stylesheets`,apiFieldName:`ViewStylesheets`},{fieldLabel:`Add, Upload, Copy Stylesheets`,apiFieldName:`AddStylesheets`},{fieldLabel:`Edit, Rename, Delete Stylesheets`,apiFieldName:`EditStylesheets`},{fieldLabel:`Manage Landing pages`,apiFieldName:`ManageLandingPages`}]},{label:`Analytics`,name:`analytics`,inputs:[{fieldLabel:`Customer Overview Reports`,apiFieldName:`CustomerOverviewReports`},{fieldLabel:`Mailing Reports`,apiFieldName:`MailingReports`},{fieldLabel:`Wrapped`,apiFieldName:`Wrapped`},{fieldLabel:`Contact Reports`,apiFieldName:`ContactReports`},{fieldLabel:`Purchase Reports`,apiFieldName:`PurchaseReports`},{fieldLabel:`SMS Reports`,apiFieldName:`SMSReports`},{fieldLabel:`Billing Reports`,apiFieldName:`BillingReports`},{fieldLabel:`Manage Report Groups Reports`,apiFieldName:`ManageReportGroups`},{fieldLabel:`Custom Report Builder`,apiFieldName:`CustomReportBuilder`}]},{label:`Settings`,name:`settings`,inputs:[{fieldLabel:`General Account Settings`,apiFieldName:`GeneralAccountSettings`},{fieldLabel:`Advanced Engagement Scoring`,apiFieldName:`AdvancedEngagementScoring`},{fieldLabel:`Lead Scoring`,apiFieldName:`LeadScoring`},{fieldLabel:`Footers`,apiFieldName:`FootersSettings`},{fieldLabel:`Custom Fields`,apiFieldName:`CustomFields`},{fieldLabel:`Custom Tables`,apiFieldName:`ManageExtendedTables`},{fieldLabel:`Sender Addresses`,apiFieldName:`SenderAddressesSettings`},{fieldLabel:`Test Recipient Lists`,apiFieldName:`TestRecipientListsSettings`},{fieldLabel:`Reply Filters`,apiFieldName:`ReplyFiltersSettings`},{fieldLabel:`My App Connections`,apiFieldName:`MyAppConnectionsSettings`},{fieldLabel:`Forms`,apiFieldName:`FormsSettings`},{fieldLabel:`Text Messaging`,apiFieldName:`TextMessagingSettings`}
1,{fieldLabel:`Web Access Log`,apiFieldName:`WebAccessLogSettings`},{fieldLabel:`Account Administrators`,apiFieldName:`AccountAdministratorsSettings`}]}],I=[{text:N.BUTTONS.EDIT,systemRoleAllowed:!1},{text:N.BUTTONS.ASSIGN_USERS,systemRoleAllowed:!0},{text:N.BUTTONS.COPY,systemRoleAllowed:!0},{text:N.BUTTONS.RENAME,systemRoleAllowed:!1}],L=(e,t)=>e.map((e,n)=>({title:e,path:t[n]})),R={customSplit:L([`User Security`],[`/Settings/UserManagement`])},z={customSplit:L([`User Security`,`Roles`],[`/Settings/UserManagement`,`/Settings/Roles`])},B={customSplit:L([`User Security`,`Roles`],[`/Settings/UserManagement`,`/Settings/Roles`])};export{M as C,j as S,y as _,I as a,v as b,s as c,b as d,O as f,x as g,T as h,P as i,g as l,w as m,R as n,F as o,k as p,z as r,N as s,B as t,A as u,D as v,C as x,S as y}; 2//# chunkId=0833d596-0b91-5d26-b1b8-95db6b7fea24
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.