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:`f071606d256de3b2e5001e8c91951dd823c43bd6`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`b57d9b02-34e8-438c-b78c-504a1604fb6e`,e._sentryDebugIdIdentifier=`sentry-dbid-b57d9b02-34e8-438c-b78c-504a1604fb6e`)}catch{}})();import{Ao as e,No as t}from"./BikK9A2q.js";import{n,o as r}from"./wL3AHm3v.js";import{m as i,o as a}from"./lRMFeX13.js";import{M as o,N as s,j as c,n as l,t as u}from"./XlfeqFZn.js";import{d,l as f,s as p,u as m}from"./7wupeNNb.js";import{r as h}from"./BqRyXPSU.js";var g=t(`2ba021c60bdf#handleDeactivateOrganization`,e,void 0,void 0,`handleDeactivateOrganization`),_={UPDATE_ORG_CONFIG:[`update-org-config`],UPDATE_ORG_RND_DATA:[`update-org-rnd-data`],UPDATE_ORG_ADD_DATA:[`update-org-add-data`],SET_ORG_TASK_STATUS:[`set-org-task-status`],DEACTIVATE_ORGANIZATION:[`deactivate-organization`],UPLOAD_CUSTOMER_DOCUMENTS:[`upload-customer-documents`]},v=()=>a({mutationKey:_.UPDATE_ORG_CONFIG,mutationFn:async e=>s({organizationId:e.organizationId,payload:e.payload})}),y=()=>{let e=i();return a({mutationKey:_.SET_ORG_TASK_STATUS,mutationFn:async e=>{if(e.status===`pending`)return m({orgTaskId:e.orgTaskId});if(e.status===`not_applicable_confirmed`)return f({orgTaskId:e.orgTaskId});if(e.status===`confirmed`)return p({orgTaskId:e.orgTaskId})},onError:(t,n,r)=>{let i=u.ORGANIZATION_TASKS_WITH_FILES(n.organizationId),a=e.getQueryData(i);e.setQueryData(i,a)},onMutate:t=>{let n=u.ORGANIZATION_TASKS_WITH_FILES(t.organizationId),r=e.getQueryData(n);e.setQueryData(n,{...r,processedTasks:r?.processedTasks.map(e=>e.id===t.orgTaskId?{...e,status:t.status}:e)})}})},b=()=>a({mutationKey:_.UPDATE_ORG_CONFIG,mutationFn:async e=>c({organizationId:e.organizationId,payload:e.payload})}),x=()=>a({mutationKey:[`ingest-quickbooks-account-charts`],mutationFn:async e=>h({organizationId:e})}),S=e=>{let t=i();return a({mutationKey:_.UPDATE_ORG_ADD_DATA,mutationFn:async e=>o({organizationId:e.organizationId,additionalData:e.additionalData}),onSuccess:()=>{t.invalidateQueries({queryKey:u.ORGANIZATION(e)})}})},C=()=>{let e=i();return a({mutationKey:_.DEACTIVATE_ORGANIZATION,mutationFn:async e=>g(e),onSuccess:(t,i)=>{if(!t.ok)return;let a=l.ORGANIZATION(i.organizationId).queryKey,o=l.ORGANIZATION_GENERAL_DATA(i.organizationId).queryKey;e.setQueryData(a,e=>{if(!e)return e;let i=r(e,null);return i?n({...i,deletedAt:t.data.deactivatedAt}):e}),e.setQueryData(o,e=>e?.generalData?.organization?{...e,generalData:{...e.generalData,organization:{...e.generalData.organization,deletedAt:t.data.deactivatedAt}}}:e),e.invalidateQueries({queryKey:u.ORGANIZATIONS_IN_SAME_GROUP(i.organizationId)}),e.invalidateQueries({queryKey:u.ORGANIZATION_NAMES_AND_IDS}),e.invalidateQueries({queryKey:u.ORGANIZATION_METADATA})}})},w=()=>{let e=i();return a({mutationKey:_.UPLOAD_CUSTOMER_DOCUMENTS,mutationFn:async e=>d(e),onSuccess:(t,n)=>
1{t.ok&&e.invalidateQueries({queryKey:u.ORGANIZATION_TASKS_WITH_FILES(n.organizationId)})}})};export{S as a,y as i,x as n,v as o,b as r,w as s,C as t};
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.