1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`20260924-39003-d97a9715`},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:textmagic-web-app":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`0d62bd4c-965a-45b6-bdd7-c91490846ec6`,e._sentryDebugIdIdentifier=`sentry-dbid-0d62bd4c-965a-45b6-bdd7-c91490846ec6`)}catch{}})();import{E as e,Ft as t,H as n,kt as r,nt as i}from"./B_mscWxu.js";import{Es as a,Yf as o,_a as s}from"./Cf_pgd7T.js";import{$c as c,fp as l,fu as u}from"./BmC5PC1V.js";import{n as d}from"./xslpWSsY2.js";n(),r();var f=n=>{let r=t([]),a=e(()=>r.value.map(e=>e.name)),o=t([]),s=e(()=>o.value),c=(e,t)=>{r.value.push({name:e,rollbackFn:t})},l=async e=>{try{o.value.push(e),await n()}finally{let t=o.value.findIndex(t=>t===e);o.value.splice(t,1)}d(e)},u=e=>{r.value.find(t=>t.name===e).rollbackFn(),d(e)},d=e=>{let t=r.value.findIndex(t=>t.name===e);r.value.splice(t,1)};return{editedFieldNames:a,beginEditField:c,saveEditField:l,savedProcessFields:s,rollbackEditField:u,resetOnUnmountedHook:()=>{i(()=>{r.value.forEach(e=>e.rollbackFn())})}}},p=(e,t,n,r)=>{t.setHook(`change`,async i=>{if(i.fieldType!==e)return;let a=!i.value,o=i.id.replace(`${i.formId}.`,``);n.beginEditField(o,()=>{t.setFieldValueById(i.id,a)});try{await n.saveEditField(o),r?.()}catch(e){c().contactSupport(e),n.rollbackEditField(o)}})},m=e=>{let{formService:t,submit:n}=s(`SubAccountEditPermissionsFormService`),r=f(n);return t.setSubAccountId(e),p(`checkbox`,t,r),{formService:t,saveEditField:e=>r.saveEditField(e),beginEditField:r.beginEditField,rollbackEditField:r.rollbackEditField,resetOnUnmountedHook:r.resetOnUnmountedHook,savedProcessFields:r.savedProcessFields}},h=()=>{let{currentUser:e}=d(),t=u(),n=l(),r=a.WorkspaceUsersDetailsOverview,i=e=>n.findEntityByIdOrNull(e)?.subaccountType===o.SUPER_ADMIN;return n=>{if(e.value.id===n)return{name:a.AccountDetails};if(!(!t.isAllowAccessToRoute(r)||i(n)))return{name:r,params:{subAccountId:n}}}};export{h as n,m as t}; 2//# sourceMappingURL=DTExG4t22.js.map
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.