t,{N:()=>s});var n=a(0xe874a88a),r=a(0x22a29f141),l=a(0x1dfdeb1c8),i=a(0x1ec68d6a3),o=a(0xe747dd27);let s=(0,l.A)("apps.auth.external.list generated fetcher",(e,t,a)=>new n.S((n,l)=>{let{abortSignal:s,reason:c,...d}=a,u=(0,o.VA)(d);e((0,r.apiCall)({method:"apps.auth.external.list",args:u,abortSignal:s,reason:c})).then(e=>{n(e)}).catch(e=>{(0,i.A)({getState:t}).error(`API call to apps.auth.external.list
						with reason ${c} failed, initiated by generated fetcher`),l(e)})}));s.meta={name:"appsAuthExternalListFetcher",key:"createFetcherAppsAuthExternalListFetcher",description:"apps.auth.external.list generated fetcher"}},0x15cf285c:(e,t,a)=>{"use strict";a.d(t,{y:()=>s});var n=a(0xe874a88a),r=a(0x22a29f141),l=a(0x1dfdeb1c8),i=a(0x1ec68d6a3),o=a(0xe747dd27);let s=(0,l.A)("apps.datasources.external.schema.resync generated fetcher",(e,t,a)=>new n.S((n,l)=>{let{abortSignal:s,reason:c,...d}=a,u=(0,o.VA)(d);e((0,r.apiCall)({method:"apps.datasources.external.schema.resync",args:u,abortSignal:s,reason:c})).then(e=>{n(e)}).catch(e=>{(0,i.A)({getState:t}).error(`API call to apps.datasources.external.schema.resync
						with reason ${c} failed, initiated by generated fetcher`),l(e)})}));s.meta={name:"appsDatasourcesExternalSchemaResyncFetcher",key:"createFetcherAppsDatasourcesExternalSchemaResyncFetcher",description:"apps.datasources.external.schema.resync generated fetcher"}},0x1c95ff254:(e,t,a)=>{"use strict";a.d(t,{T:()=>s});var n=a(0xe874a88a),r=a(0x22a29f141),l=a(0x1dfdeb1c8),i=a(0x1ec68d6a3),o=a(0xe747dd27);let s={UnknownMethod:"unknown_method",AccessDenied:"access_denied",InvalidInput:"invalid_input",InternalError:"internal_error",AuthenticationFailure:"authentication_failure",TokenNotFound:"token_not_found",InstanceUrlUnavailable:"instance_url_unavailable",FailedToEnsureSalesforceOrgConfig:"failed_to_ensure_salesforce_org_config",ErrorConnectingToSalesforce:"error_connecting_to_salesforce",SalesforceOrganizationNameNotFound:"salesforce_organization_name_not_found",RestrictedAction:"restricted_action",FailedToUpsertSalesforceOrg:"failed_to_upsert_salesforce_org",CreateNotSupported:"create_not_supported"};(0,l.A)("apps.datasources.external.add generated fetcher",(e,t,a)=>new n.S((n,l)=>{let{abortSignal:s,reason:c,...d}=a,u=(0,o.VA)(d);e((0,r.apiCall)({method:"apps.datasources.external.add",args:u,abortSignal:s,reason:c})).then(e=>{n(e)}).catch(e=>{(0,i.A)({getState:t}).error(`API call to apps.datasources.external.add
						with reason ${c} failed, initiated by generated fetcher`),l(e)})})).meta={name:"appsDatasourcesExternalAddFetcher",key:"createFetcherAppsDatasourcesExternalAddFetcher",description:"apps.datasources.external.add generated fetcher"}},0x4872ed8e:(e,t,a)=>{"use strict";a.d(t,{K:()=>s});var n=a(0xe874a88a),r=a(0x22a29f141),l=a(0x1dfdeb1c8),i=a(0x1ec68d6a3),o=a(0xe747dd27);let s=(0,l.A)("apps.datasources.external.delete generated fetcher",(e,t,a)=>new n.S((n,l)=>{let{abortSignal:s,reason:c,...d}=a,u=(0,o.VA)(d);e((0,r.apiCall)({method:"apps.datasources.external.delete",args:u,abortSignal:s,reason:c})).then(e=>{n(e)}).catch(e=>{(0,i.A)({getState:t}).error(`API call to apps.datasources.external.delete
						with reason ${c} failed, initiated by generated fetcher`),l(e)})}));s.meta={name:"appsDatasourcesExternalDeleteFetcher",key:"createFetcherAppsDatasourcesExternalDeleteFetcher",description:"apps.datasources.external.delete generated fetcher"}},0xa58468ed:(e,t,a)=>{"use strict";a.d(t,{H:()=>s});var n=a(0xe874a88a),r=a(0x22a29f141),l=a(0x1dfdeb1c8),i=a(0x1ec68d6a3),o=a(0xe747dd27);let s=(0,l.A)("apps.datasources.external.info generated fetcher",(e,t,a)=>new n.S((n,l)=>{let{abortSignal:s,reason:c,...d}=a,u=(0,o.VA)(d);e((0,r.apiCall)({method:"apps.datasources.external.info",args:u,abortSignal:s,reason:c})).then(e=>{n(e)}).catch(e=>{(0,i.A)({getState:t}).error(`API call to apps.datasources.external.info
						with reason ${c} failed, initiated by generated fetcher`),l(e)})}));s.meta={name:"appsDatasourcesExternalInfoFetcher",key:"createFetcherAppsDatasourcesExternalInfoFetcher",description:"apps.datasources.external.info generated fetcher"}},0x20937584:(e,t,a)=>{"use strict";a.d(t,{H:()=>s,o:()=>c});var n=a(0xe874a88a),r=a(0x22a29f141),l=a(0x1dfdeb1c8),i=a(0x1ec68d6a3),o=a(0xe747dd27);let s={UnknownMethod:"unknown_method",AccessDenied:"access_denied",InvalidInput:"invalid_input",InternalError:"internal_error",AuthenticationFailure:"authentication_failure",TokenNotFound:"token_not_found",DatasourceNotFound:"datasource_not_found",PermissionsFailedToUpdate:"permissions_failed_to_update",StatusUpdateNotValid:"status_update_not_valid",FailedToEnsureSalesforceOrgConfig:"failed_to_ensure_salesforce_org_config",CannotChangeSalesforceOrganization:"cannot_change_salesforce_organization",RestrictedAction:"restricted_action"},c=(0,l.A)("apps.datasources.external.update generated fetcher",(e,t,a)=>new n.S((n,l)=>{let{abortSignal:s,reason:c,...d}=a,u=(0,o.VA)(d);e((0,r.apiCall)({method:"apps.datasources.external.update",args:u,abortSignal:s,reason:c})).then(e=>{n(e)}).catch(e=>{(0,i.A)({getState:t}).error(`API call to apps.datasources.external.update
						with reason ${c} failed, initiated by generated fetcher`),l(e)})}));c.meta={name:"appsDatasourcesExternalUpdateFetcher",key:"createFetcherAppsDatasourcesExternalUpdateFetcher",description:"apps.datasources.external.update generated fetcher"}},0x6a5b3b61:(e,t,a)=>{"use strict";a.d(t,{r:()=>s});var n=a(0xe874a88a),r=a(0x22a29f141),l=a(0x1dfdeb1c8),i=a(0x1ec68d6a3),o=a(0xe747dd27);let s=(0,l.A)("apps.team.variables.delete generated fetcher",(e,t,a)=>new n.S((n,l)=>{let{abortSignal:s,reason:c,...d}=a,u=(0,o.VA)(d);e((0,r.apiCall)({method:"apps.team.variables.delete",args:u,abortSignal:s,reason:c})).then(e=>{n(e)}).catch(e=>{(0,i.A)({getState:t}).error(`API call to apps.team.variables.delete
						with reason ${c} failed, initiated by generated fetcher`),l(e)})}));s.meta={name:"appsTeamVariablesDeleteFetcher",key:"createFetcherAppsTeamVariablesDeleteFetcher",description:"apps.team.variables.delete generated fetcher"}},0x178d2d3fe:(e,t,a)=>{"use strict";a.d(t,{Y:()=>s});var n=a(0xe874a88a),r=a(0x22a29f141),l=a(0x1dfdeb1c8),i=a(0x1ec68d6a3),o=a(0xe747dd27);let s=(0,l.A)("apps.team.variables.get generated fetcher",(e,t,a)=>new n.S((n,l)=>{let{abortSignal:s,reason:c,...d}=a,u=(0,o.VA)(d);e((0,r.apiCall)({method:"apps.team.variables.get",args:u,abortSignal:s,reason:c})).then(e=>{n(e)}).catch(e=>{(0,i.A)({getState:t}).error(`API call to apps.team.variables.get
						with reason ${c} failed, initiated by generated fetcher`),l(e)})}));s.meta={name:"appsTeamVariablesGetFetcher",key:"createFetcherAppsTeamVariablesGetFetcher",description:"apps.team.variables.get generated fetcher"}},0x6ebb4c7a:(e,t,a)=>{"use strict";a.d(t,{Y:()=>s});var n=a(0xe874a88a),r=a(0x22a29f141),l=a(0x1dfdeb1c8),i=a(0x1ec68d6a3),o=a(0xe747dd27);let s=(0,l.A)("apps.team.variables.set generated fetcher",(e,t,a)=>new n.S((n,l)=>{let{abortSignal:s,reason:c,...d}=a,u=(0,o.VA)(d);e((0,r.apiCall)({method:"apps.team.variables.set",args:u,abortSignal:s,reason:c})).then(e=>{n(e)}).catch(e=>{(0,i.A)({getState:t}).error(`API call to apps.team.variables.set
						with reason ${c} failed, initiated by generated fetcher`),l(e)})}));s.meta={name:"appsTeamVariablesSetFetcher",key:"createFetcherAppsTeamVariablesSetFetcher",description:"apps.team.variables.set generated fetcher"}},0xe2e863bc:(e,t,a)=>{"use strict";a.d(t,{n:()=>s});var n=a(0xe874a88a),r=a(0x22a29f141),l=a(0x1dfdeb1c8),i=a(0x1ec68d6a3),o=a(0xe747dd27);let s=(0,l.A)("salesHome.admin.listOrgs generated fetcher",(e,t,a)=>new n.S((n,l)=>{let{abortSignal:s,reason:c,...d}=a,u=(0,o.VA)(d);e((0,r.apiCall)({method:"salesHome.admin.listOrgs",args:u,abortSignal:s,reason:c})).then(e=>{n(e)}).catch(e=>{(0,i.A)({getState:t}).error(`API call to salesHome.admin.listOrgs
						with reason ${c} failed, initiated by generated fetcher`),l(e)})}));s.meta={name:"salesHomeAdminListOrgsFetcher",key:"createFetcherSalesHomeAdminListOrgsFetcher",description:"salesHome.admin.listOrgs generated fetcher"}},0x1c36bfb24:(e,t,a)=>{"use strict";a.d(t,{FH:()=>r,eo:()=>l,iD:()=>o,uC:()=>s,zc:()=>i});var n=a(0xcf658893);let r=(0,n.Ay)("Sets the connectors");r.meta={name:"setConnectors",key:"createActionSetConnectors",description:"Sets the connectors"};let l=(0,n.Ay)("Sets the custom connectors");l.meta={name:"setCustomConnectors",key:"createActionSetCustomConnectors",description:"Sets the custom connectors"};let i=(0,n.Ay)("Updates a connector");i.meta={name:"updateConnector",key:"createActionUpdateConnector",description:"Updates a connector"};let o=(0,n.Ay)("Updates a custom connector");o.meta={name:"updateCustomConnector",key:"createActionUpdateCustomConnector",description:"Updates a custom connector"};let s=(0,n.Ay)("Sets the isEnterpriseV2");s.meta={name:"setIsEnterpriseV2",key:"createActionSetIsEnterpriseV2",description:"Sets the isEnterpriseV2"}},0x1006f9645:(e,t,a)=>{"use strict";a.d(t,{$k:()=>r,Um:()=>o,ki:()=>i,or:()=>l,uF:()=>s});var n=a(0x1cf0d97e1);let r=(0,n.Ay)(e=>e.enterpriseSearchSettings?.connectors??null);r.meta={name:"getConnectors",key:"createSelectorGetConnectors",description:e=>e.enterpriseSearchSettings?.connectors??null};let l=(0,n.Ay)(e=>e.enterpriseSearchSettings?.customConnectors??null);l.meta={name:"getCustomConnectors",key:"createSelectorGetCustomConnectors",description:e=>e.enterpriseSearchSettings?.customConnectors??null};let i=(0,n.Ay)((e,t)=>{let a=(e.enterpriseSearchSettings?.connectors??[]).find(e=>e.app_id===t);return a?.input_validation_rules??null});i.meta={name:"getConnectorValidations",key:"createSelectorGetConnectorValidations",description:(e,t)=>{let a=(e.enterpriseSearchSettings?.connectors??[]).find(e=>e.app_id===t);return a?.input_validation_rules??null}};let o=(0,n.Ay)((e,t)=>{let a=(e.enterpriseSearchSettings?.connectors??[]).find(e=>e.app_id===t);return a?.is_valid===!0});o.meta={name:"isConnectorValid",key:"createSelectorIsConnectorValid",description:(e,t)=>{let a=(e.enterpriseSearchSettings?.connectors??[]).find(e=>e.app_id===t);return a?.is_valid===!0}};let s=(0,n.Ay)(e=>e.enterpriseSearchSettings?.isEnterpriseV2??!1);s.meta={name:"isEnterpriseV2",key:"createSelectorIsEnterpriseV2",description:e=>e.enterpriseSearchSettings?.isEnterpriseV2??!1}},0xe6bb445e:(e,t,a)=>{"use strict";a.d(t,{DM:()=>r,Ho:()=>s,Nz:()=>o,Rg:()=>p,VF:()=>c,cU:()=>i,ch:()=>u,j_:()=>m,ur:()=>l,wP:()=>d});var n=a(0xcf658893);let r=(0,n.Ay)("Insert list of integrations");r.meta={name:"insertIntegrations",key:"createActionInsertIntegrations",description:"Insert list of integrations"};let l=(0,n.Ay)("Insert list of apps with their environment variable configuration");l.meta={name:"insertConfiguredEnvironments",key:"createActionInsertConfiguredEnvironments",description:"Insert list of apps with their environment variable configuration"};let i=(0,n.Ay)("Insert list of apps with their datasource configuration");i.meta={name:"insertConfiguredDatasources",key:"createActionInsertConfiguredDatasources",description:"Insert list of apps with their datasource configuration"};let o=(0,n.Ay)("Update or insert data source item using id");o.meta={name:"upsertDataSource",key:"createActionUpsertDataSource",description:"Update or insert data source item using id"};let s=(0,n.Ay)("Update or insert env config item using id");s.meta={name:"upsertEnvConfig",key:"createActionUpsertEnvConfig",description:"Update or insert env config item using id"};let c=(0,n.Ay)("Delete integration item using id");c.meta={name:"deleteIntegrationItem",key:"createActionDeleteIntegrationItem",description:"Delete integration item using id"};let d=(0,n.Ay)("Update list of OAuth providers by app id");d.meta={name:"upsertProviders",key:"createActionUpsertProviders",description:"Update list of OAuth providers by app id"};let u=(0,n.Ay)("Clear the OauthResponse");u.meta={name:"resetOAuthResponse",key:"createActionResetOAuthResponse",description:"Clear the OauthResponse"};let m=(0,n.Ay)("Sets the status of data sources items store");m.meta={name:"setItemsStatus",key:"createActionSetItemsStatus",description:"Sets the status of data sources items store"};let p=(0,n.Ay)("Sets the status of data sources system providers");p.meta={name:"setProvidersStatus",key:"createActionSetProvidersStatus",description:"Sets the status of data sources system providers"}},0x14c785814:(e,t,a)=>{"use strict";a.d(t,{vE:()=>forceRefetch,ap:()=>isObjectFresh,D1:()=>markObjectsAsStale,ez:()=>maybeRefetch});var n=a(0xca924ee1),r=a(0x1cbd9cf82),l=a(0x34ecbfe7),i=a(0x1fd440889),o=a(0x178d2d3fe),s=a(0xe2e863bc),c=a(0x1a8cc04e1),d=a(0x145d46a61),u=a(0xaf5a1707),m=a(0x1c7cb6e50),p=a(0x1ec68d6a3),h=a(0x11c82607b),f=a(0x9b971e7e),g=a(0x1266f1359),b=a(0x65561a6f),x=a(0xe6bb445e),_=a(0xf3582c6f),E=a(0x177986c74),A=a(0x220a941b7);let y="_external_integrations",S=(0,h.Ay)("Call API to fetch list of environment variables",(e,t)=>{let a,n=t(),l=(0,f.JY)(n),i=(0,_.T)(n),s=(a=new Set,Object.values(i).forEach(({variables:e})=>{Object.keys(e).forEach(e=>{a.add(e)})}),Array.from(a));return i&&l&&(0,u.E)(s)?e((0,o.Y)({reason:"fetch-env-vars",team:l,names:s})).then(({variables:e})=>{let t=Object.keys(i).reduce((t,a)=>{let n=i[a],l=[],o=Object.keys(n.variables);if(!(o.length&&o.every(t=>!n.variables[t]?.isRequired||!!(0,r.oq)(e,t)?.value)))return t;let s=Object.keys(n.variables).reduce((t,a)=>{let i=n.variables[a],{source:o,...s}=(0,r.oq)(e,a)??{};return"value"in s&&(l.push(s.audit_info?.date_value_updated??0),t[(0,A.A)(a)]={...i,...(0,m.t)(s),name:a}),t},{}),c=Math.max(...l);return t.push({...n,id:a,lastSyncedTs:c,thirdPartyOauth2Provider:(0,r.Wk)(a,n),variables:s}),t},[]);if(t.length)return t}):Promise.resolve(void 0)});function mapConfigurableApps(e,t){let a=e.filter(e=>e.configOptions.variables.length>0||e.configOptions.specialConfigMessage?.length).filter(e=>void 0!==e.profile),n={};for(let e of a){if(0===e.configOptions.variables.length&&!e.configOptions.specialConfigMessage?.length)continue;if(!e.profile||!e.profile.name){(0,p.A)({getState:t}).error("Skipping env configurable app without profile or name",{app:e});continue}let a={};for(let t of e.configOptions.variables)a[t.name]=t;n[e.id]={name:e.profile.name,variables:a,specialConfigMessage:e.configOptions.specialConfigMessage}}return n}function mapConfigurableDatasourceApps(e,t){let a=e.filter(e=>Object.prototype.hasOwnProperty.call(e.configOptions,"datasource")&&e.configOptions.datasource?.enabled===!0),n={};for(let e of a){if(!e.profile?.name){(0,p.A)({getState:t}).error("Skipping datasource configurable app without profile or name",{app:e});continue}n[e.id]={name:e.profile.name,requireTroops:e.configOptions.datasource?.requireTroops??!1}}return n}S.meta={name:"fetchConfiguredEnvApps",key:"createThunkFetchConfiguredEnvApps",description:"Call API to fetch list of environment variables"};let v=(0,h.Ay)("Call API to fetch list of integrations",async(e,t)=>{try{let a=t(),n=(0,r.KG)();e((0,x.j_)({status:E.G.FETCHING}));let o=await e((0,b.o)());if((0,d.RK)(a)&&!n){let a=mapConfigurableApps(o?.apps||[],t);e((0,x.ur)({configurableEnvApps:a}))}if((0,d.a$)(a)&&!n){let a=mapConfigurableDatasourceApps(o?.apps||[],t);e((0,x.cU)({configurableDatasourceApps:a}))}let c=(0,d.AC)(a),u=[],fetchDataSources=async t=>{let{datasources:a}=await e((0,i.z)({reason:"fetch-data-sources-ui",creationSource:t}));if(n){let t=await e((0,s.n)({reason:"manage_integrations_multi_org"}));if(!t.ok)return a;let n=new Set(t.salesforce_orgs?.map(({datasource_id:e})=>e)),r=t.salesforce_orgs?.filter(e=>!e.is_legacy_elevate_org);return a.reduce((e,t)=>(r.some(e=>e.datasource_id===t.id)||e.push({...t,isConfiguredForLob:n.has(t.id)}),e),[])}return a};(0,d.SU)(a)&&(n?u.push(fetchDataSources(l.N$.SalesElevate)):(u.push(fetchDataSources(l.N$.Integrations)),c&&u.push(fetchDataSources(l.N$.SalesElevate)))),(0,d.RK)(a)&&!n&&u.push(e(S()));let p=(await Promise.all(u)).flat().filter(Boolean);e((0,x.DM)({integrationItems:(0,m.t)(p)})),e((0,x.j_)({status:E.G.COMPLETE}))}catch(a){(0,p.A)({getState:t}).error("Error fetching integrations",a),e((0,x.j_)({status:E.G.ERROR}))}});v.meta={name:"fetchAndInsertIntegrations",key:"createThunkFetchAndInsertIntegrations",description:"Call API to fetch list of integrations"};let C=(0,n.A)(()=>new c.Ay({storeKey:"integrations",fetch:e=>(0,g.Qw)(e,v()),isEnabled:()=>!0,maxAge:()=>3600})),isObjectFresh=e=>C().isObjectFresh(e,y),maybeRefetch=e=>C().maybeRefetch(e,y),markObjectsAsStale=e=>C().markObjectsAsStale(e,[y]),forceRefetch=async e=>{await (0,g.Qw)(e,v()),C().markObjectsAsFresh(e,[y])}},0x1d37834d3:(e,t,a)=>{"use strict";a.d(t,{BZ:()=>b,Ij:()=>h,Ix:()=>m,L8:()=>x,N0:()=>y,P9:()=>A,R4:()=>_,Wj:()=>E,nH:()=>u,rg:()=>p,zi:()=>f});var n=a(0x21f3c49e8),r=a(0x1df96de4c),l=a(0x1cf0d97e1),i=a(0x9b971e7e),o=a(0x1bc4b3ad8),s=a(0x14c785814),c=a(0x2060b5f00),d=a(0x177986c74);let u=(0,l.Ay)(e=>{let t=(0,i.ZT)(e);return t&&(0,s.ez)(t),e?.integrations??r.t0});u.meta={name:"getIntegrationsState",key:"createSelectorGetIntegrationsState",description:e=>{let t=(0,i.ZT)(e);return t&&(0,s.ez)(t),e?.integrations??r.t0}};let m=(0,o.F)(u,e=>{let t=e.items;return(0,n.A)(t)?r.Ml:Object.values(t)}),p=(0,l.Ay)((e,t)=>u(e).items[t]??r.t0);p.meta={name:"getIntegration",key:"createSelectorGetIntegration",description:(e,t)=>u(e).items[t]??r.t0};let h=(0,l.Ay)(e=>!(0,n.A)(e.integrations.items));h.meta={name:"hasIntegrationsList",key:"createSelectorHasIntegrationsList",description:e=>!(0,n.A)(e.integrations.items)};let f=(0,l.Ay)(e=>m(e).length);f.meta={name:"getIntegrationsCount",key:"createSelectorGetIntegrationsCount",description:e=>m(e).length};let g=(0,l.Ay)((e,t)=>{if(!(0,c.x)(e,t))return r.Ml;let{providers:a}=u(e);return a&&a[t]?a[t]:r.Ml});g.meta={name:"getAppProviders",key:"createSelectorGetAppProviders",description:(e,t)=>{if(!(0,c.x)(e,t))return r.Ml;let{providers:a}=u(e);return a&&a[t]?a[t]:r.Ml}};let b=(0,l.Ay)((e,t)=>t.flatMap(t=>g(e,t).map(e=>({...e,appId:t}))));b.meta={name:"getProvidersFromApps",key:"createSelectorGetProvidersFromApps",description:(e,t)=>t.flatMap(t=>g(e,t).map(e=>({...e,appId:t})))};let x=(0,l.Ay)((e,t,a)=>{for(let n of u(e)?.providers?.[t]??r.Ml)if(n.providerKey===a)return n});x.meta={name:"getAppProvider",key:"createSelectorGetAppProvider",description:(e,t,a)=>{for(let n of u(e)?.providers?.[t]??r.Ml)if(n.providerKey===a)return n}};let _=(0,l.Ay)(e=>u(e).oAuthResponse);_.meta={name:"getOAuthResponse",key:"createSelectorGetOAuthResponse",description:e=>u(e).oAuthResponse};let E=(0,l.Ay)(e=>e.integrations.itemsStatus===d.G.FETCHING);E.meta={name:"isIntegrationsFetching",key:"createSelectorIsIntegrationsFetching",description:e=>e.integrations.itemsStatus===d.G.FETCHING};let A=(0,l.Ay)(e=>e.integrations.providersStatus===d.G.FETCHING);A.meta={name:"isProvidersFetching",key:"createSelectorIsProvidersFetching",description:e=>e.integrations.providersStatus===d.G.FETCHING};let y=(0,l.Ay)(e=>e.integrations.itemsStatus===d.G.ERROR);y.meta={name:"isIntegrationsFetchingErrored",key:"createSelectorIsIntegrationsFetchingErrored",description:e=>e.integrations.itemsStatus===d.G.ERROR}},0x31d6f8cb:(e,t,a)=>{"use strict";a.d(t,{v:()=>r});var n=a(0x1df96de4c);let r=(0,a(0x1cf0d97e1).Ay)(e=>e?.integrations?.configurableDatasourceApps??n.t0);r.meta={name:"getConfigurableDatasourceApps",key:"createSelectorGetConfigurableDatasourceApps",description:e=>e?.integrations?.configurableDatasourceApps??n.t0}},0xf3582c6f:(e,t,a)=>{"use strict";a.d(t,{T:()=>r});var n=a(0x1df96de4c);let r=(0,a(0x1cf0d97e1).Ay)(e=>e?.integrations?.configurableEnvApps??n.t0);r.meta={name:"getConfigurableEnvApps",key:"createSelectorGetConfigurableEnvApps",description:e=>e?.integrations?.configurableEnvApps??n.t0}},0x15565199f:(e,t,a)=>{"use strict";a.d(t,{P:()=>h});var n=a(0x1cbd9cf82),r=a(0x1cf0d97e1),l=a(0x1d37834d3),i=a(0x1df96de4c),o=a(0x31d6f8cb);let s=(0,r.Ay)((e,t)=>(0,o.v)(e)[t]??i.t0);s.meta={name:"getDsAppConfigById",key:"createSelectorGetDsAppConfigById",description:(e,t)=>(0,o.v)(e)[t]??i.t0};var c=a(0x244ec9a59),d=a(0xf3582c6f),u=a(0x2060b5f00);let m=(0,r.Ay)(e=>{let t=(0,d.T)(e);return Object.keys(t).reduce((a,n)=>((0,u.x)(e,n)&&(a[n]=t[n]),a),{})});m.meta={name:"getInstalledEnvApps",key:"createSelectorGetInstalledEnvApps",description:e=>{let t=(0,d.T)(e);return Object.keys(t).reduce((a,n)=>((0,u.x)(e,n)&&(a[n]=t[n]),a),{})}};let p=(0,r.Ay)(e=>{let{items:t}=(0,l.nH)(e),a=m(e);return Object.keys(a).reduce((e,n)=>(t[n]||(e[n]=a[n]),e),{})});p.meta={name:"getUnconfiguredEnvApps",key:"createSelectorGetUnconfiguredEnvApps",description:e=>{let{items:t}=(0,l.nH)(e),a=m(e);return Object.keys(a).reduce((e,n)=>(t[n]||(e[n]=a[n]),e),{})}};let h=(0,r.Ay)(e=>{let t=[(0,n.Io)()];(0,n.KG)()||(t=(0,c.w)(e));let a=(0,l.BZ)(e,t),r=p(e),i=a;return(0,n.KG)()||(i=a.map(t=>({...t,providerAppLabel:t.providerName?.concat(" - ").concat(s(e,t.appId??"").name)}))),Object.keys(r).map(e=>(0,n.Wk)(e,r[e])).concat(i)});h.meta={name:"getIntegrationServices",key:"createSelectorGetIntegrationServices",description:e=>{let t=[(0,n.Io)()];(0,n.KG)()||(t=(0,c.w)(e));let a=(0,l.BZ)(e,t),r=p(e),i=a;return(0,n.KG)()||(i=a.map(t=>({...t,providerAppLabel:t.providerName?.concat(" - ").concat(s(e,t.appId??"").name)}))),Object.keys(r).map(e=>(0,n.Wk)(e,r[e])).concat(i)}}},0x244ec9a59:(e,t,a)=>{"use strict";a.d(t,{w:()=>i});var n=a(0x1df96de4c),r=a(0x1bc4b3ad8),l=a(0x31d6f8cb);let i=(0,r.F)(l.v,e=>Object.keys(e??n.t0))},0x2060b5f00:(e,t,a)=>{"use strict";a.d(t,{x:()=>s});var n=a(0x121a53a99),r=a(0x1cf0d97e1),l=a(0x5dd1c0f2),i=a(0x19561ce96),o=a(0x184767f39);let s=(0,r.Ay)((e,t)=>{let a=(0,i.Ez)(e,t),r=a&&a!==o.pY.APP_DENIED,s=!(0,i.n_)(e,t)&&(0,n.Sr)((0,l.sO)(e,t));return r||s});s.meta={name:"isAppAvailable",key:"createSelectorIsAppAvailable",description:(e,t)=>{let a=(0,i.Ez)(e,t),r=a&&a!==o.pY.APP_DENIED,s=!(0,i.n_)(e,t)&&(0,n.Sr)((0,l.sO)(e,t));return r||s}}},0x1fd1646fe:(e,t,a)=>{"use strict";a.d(t,{BJ:()=>D,DQ:()=>T,J1:()=>N,MR:()=>P,NF:()=>O,WR:()=>I,pL:()=>w});var n=a(0x220a941b7),r=a(0xe874a88a),l=a(0x1805097c),i=a(0x1cbd9cf82),o=a(0x766d71f),s=a(0x229c7d410),c=a(0x1da23af39),d=a(0x1dae64d6f),u=a(0x15cf285c),m=a(0x34ecbfe7),p=a(0x4872ed8e),h=a(0x20937584),f=a(0x6a5b3b61),g=a(0x6ebb4c7a),b=a(0xaf5a1707),x=a(0x1c7cb6e50),_=a(0x1ec68d6a3),E=a(0x11c82607b),A=a(0x9b971e7e),y=a(0x1c36bfb24),S=a(0xe6bb445e),v=a(0x14c785814),C=a(0x1d37834d3),k=a(0x177986c74);let w=(0,E.Ay)("Call API to fetch list of OAuth providers",async(e,t,{appIds:a})=>{try{e((0,S.Rg)({status:k.G.FETCHING})),await Promise.all(a.map(async t=>{let{authorizations:a}=await e((0,d.N)({appId:t,reason:"get-auth-providers"})),n=(0,x.t)(a);e((0,S.wP)({appId:t,appProviders:n}))})),e((0,S.Rg)({status:k.G.COMPLETE}))}catch(a){(0,_.A)({getState:t}).error("Error fetching OAuth Providers",a),e((0,S.Rg)({status:k.G.ERROR}))}});w.meta={name:"fetchAndUpsertProviders",key:"createThunkFetchAndUpsertProviders",description:"Call API to fetch list of OAuth providers"};let D=(0,E.Ay)("Call API to save new data source",async(e,t,{name:a,thirdPartyOauth2TokenId:n,dataSourceAccessPermission:r,userIds:l,creationSource:i})=>{try{let s=(0,A.ZT)(t()),{datasource:c}=await e((0,o.m)({name:a,third_party_oauth2_token_id:n,data_source_access_permission:r,user_ids:l,creation_source:i}));if(c)e((0,S.Nz)({dataSourceItem:(0,x.t)(c)})),s&&(0,v.D1)(s);else throw Error("Datasource response is undefined")}catch(e){throw(0,_.A)({getState:t}).error("Error saving new data source",e),e}});D.meta={name:"addNewDataSource",key:"createThunkAddNewDataSource",description:"Call API to save new data source"};let I=(0,E.Ay)("Call API to delete existing data source",(e,t,a)=>e((0,p.K)({reason:"delete-data-source",datasourceId:a.id})).then(()=>{e((0,S.VF)(a))}));I.meta={name:"deleteExistingDataSource",key:"createThunkDeleteExistingDataSource",description:"Call API to delete existing data source"};let N=(0,E.Ay)("Call API to disconnect existing data source",(e,t,a)=>{let n=(0,A.ZT)(t()),r={datasourceId:a.dataSourceId,status:m.VW.Disconnected,reason:"disconnect-data-source"};return e((0,h.o)(r)).then(()=>{e((0,S.Nz)({dataSourceItem:r})),n&&(0,v.D1)(n)})});N.meta={name:"disconnectExistingDataSource",key:"createThunkDisconnectExistingDataSource",description:"Call API to disconnect existing data source"};let O=(0,E.Ay)("Call API to resync existing data source",(e,t,a)=>{let n=(0,A.ZT)(t()),r=a.dataSourceId;return e((0,u.y)({datasourceId:r,reason:"resync-data-source"})).then(t=>{if(t)e((0,S.Nz)({dataSourceItem:{id:r,status:t.datasource.status}})),n&&(0,v.D1)(n);else throw Error("Datasource Schema re-sync response is undefined")})});O.meta={name:"resyncExistingDataSource",key:"createThunkResyncExistingDataSource",description:"Call API to resync existing data source"};let T=(0,E.Ay)("Call API to save new environment variables",async(e,t,{variables:a,envConfig:o,appId:s})=>{try{let d=t(),u=(0,A.JY)(d);if(!u)return;let m=[];if(s){let n=a[0]?.name||"",r=a[0]?.value||"",i=u??(0,A.ZT)(t()),o=(0,l.hf)(i);m.push(e((0,c.w)({token:o,name:n,configValue:r,appId:s,reason:"admin-set-config"})))}else{let t=a.filter(({value:e})=>!!e);(0,b.E)(t)&&m.push(e((0,g.Y)({reason:"set-env-vars",team:u,variables:t})));let r=a.filter(({name:e,value:t})=>!!o.variables[(0,n.A)(e)]?.value&&!t).map(({name:e})=>e);(0,b.E)(r)&&m.push(e((0,f.r)({reason:"delete-empty-env-config-vars",team:u,names:r})))}if(await r.S.all(m).catch(e=>{throw Error(e)}),m.length){let t=a.reduce((e,t)=>{let{isSecret:a,value:r}=t,l=(0,n.A)(t.name),s=o.variables[l];return e[l]={...s,...t,value:a?i.Tz:r},e},{});e((0,S.Ho)({envConfig:{...o,variables:t}})),u&&(0,v.D1)(u),s&&e((0,y.zc)({appId:s,isValid:!0}))}}catch(e){throw(0,_.A)({getState:t}).error("Error saving env variables",e),e}});T.meta={name:"setEnvVariables",key:"createThunkSetEnvVariables",description:"Call API to save new environment variables"};let P=(0,E.Ay)("Call API to delete existing env config",(e,t,{id:a,appId:n})=>{try{let r,i=t(),o=(0,A.JY)(i);if(!o)throw Error("No team is set in `deleteExistingEnvConfig` thunk");let c=(0,C.rg)(i,a);if(!c||!("variables"in c))throw Error("Could not find valid environment config based on id passed to `deleteExistingEnvConfig` thunk");let d=Object.values(c.variables).map(({name:e})=>e);if(!(0,b.E)(d))throw Error("No variables are set in the config passed to `deleteExistingEnvConfig` thunk");if(n){let a=o??(0,A.ZT)(t()),i=d[0]||"",c=(0,l.hf)(a);r=e((0,s.N)({reason:"delete-env-config-vars",token:c,name:i,appId:n}))}else r=e((0,f.r)({reason:"delete-env-config-vars",team:o,names:d}));return r.then(()=>{e((0,S.VF)({id:a}))})}catch(e){throw(0,_.A)({getState:t}).error("Error deleting environment config",e),e}});P.meta={name:"deleteExistingEnvConfig",key:"createThunkDeleteExistingEnvConfig",description:"Call API to delete existing env config"}},0x177986c74:(e,t,a)=>{"use strict";a.d(t,{G:()=>r});var n,r=((n={}).FETCHING="fetching",n.UNKNOWN="unknown",n.COMPLETE="complete",n.ERROR="error",n)},0x1134434e0:(e,t,a)=>{"use strict";a.d(t,{Cl:()=>h,Ds:()=>m,Is:()=>f,Jt:()=>s,Nd:()=>n,QF:()=>p,Rj:()=>i,aE:()=>r,aW:()=>u,cX:()=>g,eo:()=>b,qB:()=>o,qC:()=>c,ty:()=>l,vN:()=>d});let n=100,r="whitelistApps",l="app_whitelist_enabled",i="app_management_apps",o="has_compliance_export",s="app_dir_only",c="magic_unfurls_enabled",d="commands_only_regular",u="app_whitelist_requests_enabled",m="app_whitelist_requests_require_comment_enabled",p="sign_in_with_slack_disabled",h="who_can_manage_integrations",f=50,g="ai_apps_settings",b="work_object_unfurl_visibility"},0x283db413:(e,t,a)=>{"use strict";a.d(t,{FB:()=>u,FY:()=>d,lm:()=>requireTopLevelAppApproval,xF:()=>h});var n=a(0xbe2be077),r=a(0xb8504a42),l=a(0x1cf0d97e1),i=a(0xb1f0729f),o=a(0x1d600678),s=a(0x1134434e0),c=a(0x1ee439e69);let d=(0,l.Ay)(e=>e.adminAppsManage?.manageAccessList??!1);d.meta={name:"userCanManageAccessList",key:"createSelectorUserCanManageAccessList",description:e=>e.adminAppsManage?.manageAccessList??!1};let u=(0,l.Ay)(e=>e.adminAppsManage?.isAppmin??!1);function requireTopLevelAppApproval(e){let t=(0,c.Yc)(e);return(0,r.kA)(t)||(0,r.tz)(t)||((0,o.x)(e,"requireAppApproval")??!1)}u.meta={name:"isUserAppmin",key:"createSelectorIsUserAppmin",description:e=>e.adminAppsManage?.isAppmin??!1};let m=(0,l.Ay)(e=>!!(0,i.fl)(e)[s.ty]);m.meta={name:"isAAAOnForOrg",key:"createSelectorIsAAAOnForOrg",description:e=>!!(0,i.fl)(e)[s.ty]};let p=(0,l.Ay)(e=>!!(0,o.x)(e,s.ty));p.meta={name:"isAAAOnForWorkspace",key:"createSelectorIsAAAOnForWorkspace",description:e=>!!(0,o.x)(e,s.ty)};let h=(0,l.Ay)(e=>(0,n.k)(e)?m(e):p(e));h.meta={name:"isAAAOn",key:"createSelectorIsAAAOn",description:e=>(0,n.k)(e)?m(e):p(e)}},0x1b729a17a:(e,t,a)=>{"use strict";a.d(t,{P:()=>s});var n=a(0x12185e091),r=a(0x21dd74f4c),l=a(0x1cf0d97e1),i=a(0x1ccef1c6f),o=a(0x217553e42);let s=(0,l.Ay)(e=>{let t=!(0,i.ty)(e,"activity_include_threads_in_badge_count"),a=e?.unreadCounts?.countsPerChannel,l=0;for(let[t,i]of Object.entries(a)){let a=(0,o.OL)(e,t);if((0,n.JM)(a)){if(!i?.unreadHighlightCnt)continue;(0,r.G)(e,t)||(l+=i?.unreadHighlightCnt||0)}}return l+(t?e?.unreadCounts?.totalUnreadHighlightsWithoutDmsAndThreadUnreads||0:e?.unreadCounts?.totalUnreadHighlightsWithoutDms||0)});s.meta={name:"getTotalUnreadHighlights",key:"createSelectorGetTotalUnreadHighlights",description:e=>{let t=!(0,i.ty)(e,"activity_include_threads_in_badge_count"),a=e?.unreadCounts?.countsPerChannel,l=0;for(let[t,i]of Object.entries(a)){let a=(0,o.OL)(e,t);if((0,n.JM)(a)){if(!i?.unreadHighlightCnt)continue;(0,r.G)(e,t)||(l+=i?.unreadHighlightCnt||0)}}return l+(t?e?.unreadCounts?.totalUnreadHighlightsWithoutDmsAndThreadUnreads||0:e?.unreadCounts?.totalUnreadHighlightsWithoutDms||0)}}},0x6b861638:(e,t,a)=>{"use strict";a.d(t,{_:()=>i});var n=a(0xd35ac109),r=a(0x12c020c3),l=a(0x126485977);let i={get:e=>e.reduce((e,t)=>(e[t]=(0,n.nT)(window.location.search)[t],e),{}),set:(e={},t={})=>{let{paramsToClear:a=[],clearFalseyParams:n=!0}=t;a?.length&&(0,l.y_)({queryParams:a});let i=Object.entries(e).reduce((e,[t,a])=>t?a?(0,r.M6)(e,t,a):(n&&!a&&(0,l.y_)({queryParams:[t]}),e):e,window.location.href);return window.location.href!==i&&window.history.replaceState({path:i},"",i),{}},remove:e=>(0,l.y_)({queryParams:e})}},0x12bc54835:(e,t,a)=>{"use strict";a.d(t,{x:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),l=a.n(r),i=a(0x6add6a0e),o=a.n(i);let s=n.forwardRef(({className:e=null,main:t=!1,children:a},r)=>t?n.createElement("div",{ref:r,className:l()(o().container,o().main,e)},a):n.createElement("div",{ref:r,className:l()(o().container,e)},a))},0x24a66f655:(e,t,a)=>{"use strict";a.r(t),a.d(t,{PageManageIntegrations:()=>Y,default:()=>Z,workflowBuilderPermissions:()=>J});var n=a(0xbad225b5),r=a(0x20482ad21),l=a(0x16ac9b089),i=a(0xb1ea448c),o=a(0x6b861638),s=a(0x12bc54835),c=a(0x1cbdfeceb),d=a(0x742207c8),u=a(0x15f8e452a),m=a(0x129ec1993),p=a(0x224ccea12),h=a.n(p);let f=new r.Ay("manage_integrations"),NavigateBack=({backRouteName:e=d.o,backRouteParams:t,onRouteClick:a=c.A})=>n.createElement(m.Wt,{routeName:e,params:t,ariaLabel:f.t("Back"),onClick:a,"data-qa":"data-sources-header__back",className:h().link},n.createElement(u.A,{type:"chevron-large-left"}));NavigateBack.displayName="NavigateBack";var g=a(0x16cf1da63),b=a(0x11a296110),x=a(0x19b81a722),_=a(0x46dbff89);let E=new r.Ay("manage_integrations"),AddIntegrationButton=({text:e=E.t("Add Integration"),...t})=>{let a=(0,g.wA)(),r=(0,n.useCallback)(()=>{a((0,_.q)({element:n.createElement(x.J,null),isStackable:!0}))},[a]);return n.createElement(b.Ay,{onClick:r,type:"primary","data-qa":"add-data-source-btn",...t},e)};AddIntegrationButton.displayName="AddIntegrationButton";var A=a(0x1cbd9cf82),y=a(0x226892387),S=a(0x14c785814),v=a(0x1d37834d3),C=a(0x1f419cd24),k=a.n(C);let w=new r.Ay("manage_integrations"),IntegrationsHeader=({teamId:e,...t})=>{let a=!(0,A.KG)(),r=(0,y.d4)(v.Ij),l=(0,y.d4)(v.Wj),i=a&&r&&((0,S.ap)(e)||!l);return n.createElement("div",{className:k().header},a&&n.createElement(NavigateBack,t),n.createElement("h1",{className:k().title},w.t("Manage integrations")),i&&n.createElement(AddIntegrationButton,null))};IntegrationsHeader.displayName="IntegrationsHeader";var D=a(0x10994a903),I=a(0x18d1449dc),N=a.n(I);let O=new r.Ay("manage_integrations"),IntegrationsList=()=>{let e=(0,y.d4)(v.zi);return n.createElement(n.Fragment,null,n.createElement("div",{className:N().table_header_wrapper},n.createElement("span",{className:N().table_title},O.rt("Integrations {length}",{length:n.createElement("span",{className:"normal","data-qa":"integrations-count"},"(",e,")")}))),n.createElement(D.Y,null))};IntegrationsList.displayName="IntegrationsList";var T=a(0xa59ddeb4),P=a(0x1c2af7242),M=a(0x249d8d1aa),R=a.n(M);let F=new r.Ay("manage_integrations"),ConnectIntegration=()=>{let e=!(0,A.KG)();return n.createElement("div",{"data-qa":"connect-integration",className:R().container},n.createElement("div",null,n.createElement("h3",{className:"margin_bottom_50"},F.t("Configure an integration")),n.createElement("p",null,F.t("You can configure integrations and data sources that can be used by your team.")),e&&n.createElement(AddIntegrationButton,null)),n.createElement("img",{src:P,alt:F.t("Illustration for configure an integration"),className:R().img}))};ConnectIntegration.displayName="ConnectIntegration";var L=a(0xad14d02e),B=a(0x1f2fa5a0f),H=a(0x145d46a61),U=a(0xa1832ae4),z=a(0x1655a8085),q=a(0x1c91944c9),j=a(0x1266f1359),$=a(0x203f8f1b),G=a(0xe4af74fc),Q=a(0x1ee439e69),K=a(0x213b634ee),V=a.n(K);let W=new r.Ay("manage_integrations"),J=[z.p.VIEW_DATA_SOURCE,z.p.CREATE_DATA_SOURCE,z.p.UPDATE_DATA_SOURCE,z.p.MANAGE_SALES_HOME,z.p.MANAGE_SALES_HOME_DATA_SOURCE],PrimitivePageManageIntegrations=({teamId:e,team:t,loadIntegrations:a,loadSalesElevatePermissions:r})=>{let c=(0,A.KG)(),d=(0,U.F1)(t),u=(0,y.d4)(v.Wj),m=(0,y.d4)(v.Ij),p=(0,y.d4)(H.Gx),h=(0,y.d4)(e=>(0,G.l)(e,J)),f=!c||h,g=u&&!(0,S.ap)(e),b=!f||g,x=!b&&!m,_=(0,n.useMemo)(()=>{let e=o._.get(["back_to_workflow_id"]);return e?.back_to_workflow_id?{backRouteName:B.Bs,backRouteParams:{workflowId:e.back_to_workflow_id}}:{}},[]),E=(0,n.useCallback)(()=>{o._.remove(["back_to_workflow_id"])},[]);return(0,n.useEffect)(()=>{f?p&&a(e):r(e)},[f,a,r,e,p]),n.createElement("div",null,n.createElement(T.A,{title:W.t("Manage integrations | Workflow Builder | {teamName}",{teamName:(0,l.Ay)(d)})}),n.createElement(s.x,{main:!0,className:V().container},n.createElement(IntegrationsHeader,{teamId:e,backRouteName:_.backRouteName,backRouteParams:_.backRouteParams,onRouteClick:E}),b&&n.createElement(i.A,null),x&&n.createElement(ConnectIntegration,null),!b&&!x&&n.createElement(IntegrationsList,null)),n.createElement(L.A,null))};PrimitivePageManageIntegrations.displayName="PrimitivePageManageIntegrations";let Y=(0,q.N)((e,{teamId:t})=>({team:(0,Q._J)(e,t)}),()=>({loadIntegrations:e=>(0,S.vE)(e),loadSalesElevatePermissions:async e=>(0,j.Qw)(e,(0,$.yh)())}))(PrimitivePageManageIntegrations),Z=Y},0x1c2af7242:(e,t,a)=>{"use strict";e.exports=a.p+"illustration-1-3420d92.svg"}}]);
//# sourceMappingURL=https://slack.com/source-maps/bv1-13/gantry-v2-async-workflow-builder-page-integrations.f68a3ece5b5610c5c874.min.js.mapØA
—Eoúô