@iblai/iblai-js 2.19.0 → 2.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { useState, useEffect, forwardRef, createElement as createElement$3, useLayoutEffect, createContext, useContext, useMemo, useReducer, useRef, useImperativeHandle, useCallback, isValidElement, Children, PureComponent, cloneElement, Component as Component$1, Fragment as Fragment$2, useId as useId$2, useDebugValue, lazy, Suspense } from 'react';
4
4
  import * as dataLayer from '@iblai/data-layer';
5
- import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useStarMentorMutation, useUnstarMentorMutation, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useGetLlmsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetSpendCapStatusQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useDeleteLtiMentorMutation, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
5
+ import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useStarMentorMutation, useUnstarMentorMutation, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useGetLlmsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, VERCEL_SPA, useGetCustomDomainsQuery, useGetHostingProjectsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useCreateHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetSpendCapStatusQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useDeleteLtiMentorMutation, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
6
6
  import { removeAuthItem, setAuthItem, isTauriEmbeddedLLMHost, selectRbacPermissions, useCurrentTenant, canViewOtherUsersChatHistory, isPureWatcher, getInitials, useTenantMetadata, useUsername, selectStreaming, isLoggedIn, TOOL_NAME_MAP, WRITE_TODOS_TOOL, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, useTenantContext, TimeTracker, advancedTabsProperties, defaultSessionIds, pickWritableFields, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$3, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, use401TokenRefresh, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
7
7
  import { useDispatch, useSelector } from 'react-redux';
8
8
  import { toast } from 'sonner';
@@ -96347,37 +96347,58 @@ var advancedChatPrivacy$3 = {
96347
96347
  switchAriaDisabled: "User chat privacy control disabled"
96348
96348
  };
96349
96349
  var advancedCustomDomain$3 = {
96350
- dnsConfiguration: "DNS Configuration",
96350
+ dnsConfiguration: "Domains",
96351
96351
  add: "Add",
96352
- dialogTitle: "Your custom domain",
96353
- verificationNecessary: "Domain verification is necessary after making changes",
96354
- customDomainLabel: "Custom Domain",
96352
+ dialogTitle: "Add a domain",
96353
+ dialogDescription: "Point a domain you own at this organization’s sign-in site or at one of your deployed apps.",
96354
+ kindLabel: "What is this domain for?",
96355
+ kindPlatform: "Sign-in site",
96356
+ kindApp: "Deployed app",
96357
+ projectLabel: "App",
96358
+ projectPlaceholder: "Choose an app",
96359
+ noProjects: "You have not deployed any apps yet. Deploy one first, then come back to give it a domain.",
96360
+ customDomainLabel: "Domain",
96361
+ domainHelpPlatform: "Without the scheme or a leading “www.” — for example, app.example.com.",
96362
+ domainHelpApp: "Leave this empty and a subdomain will be assigned to the app for you, with no DNS records to set.",
96355
96363
  cancel: "Cancel",
96356
96364
  save: "Save",
96357
- expandAriaLabel: "Expand custom domain",
96358
- collapseAriaLabel: "Collapse custom domain",
96359
- loading: "Loading custom domain...",
96360
- verifying: "Verifying...",
96361
- verified: "Verified",
96362
- unregistered: "Unregistered",
96363
- notVerified: "Not Verified",
96364
- retry: "Retry",
96365
+ expandAriaLabel: "Expand domains",
96366
+ collapseAriaLabel: "Collapse domains",
96367
+ loading: "Loading domains…",
96368
+ verifying: "Checking…",
96369
+ reverify: "Check again",
96370
+ reverifyAriaLabel: "Check {domain} again",
96371
+ removeAriaLabel: "Remove {domain}",
96365
96372
  "delete": "Delete",
96366
- domainVerificationHeading: "Domain verification",
96367
- domainVerificationInstruction: "To verify your domain ownership and enable it to point to your application, you need to add the following DNS records at your domain registrar (like Namecheap, GoDaddy, or Google Domains).",
96368
- domainRecords: "Domain records",
96373
+ detach: "Detach",
96374
+ statusVerified: "Verified",
96375
+ statusUnverified: "Verification required",
96376
+ statusUnregistered: "Not registered",
96377
+ statusUnknown: "Could not check",
96369
96378
  tableType: "Type",
96370
96379
  tableNameHost: "Name/Host",
96371
96380
  tableValue: "Value",
96372
- tableStatus: "Status",
96373
96381
  copyNameHostAriaLabel: "Copy name/host: {domain}",
96374
96382
  copyValueAriaLabel: "Copy value/target",
96375
- noDomainConfigured: "No custom domain configured for this application.",
96376
- deleteSuccess: "Custom domain deleted successfully",
96377
- deleteError: "Failed to delete custom domain",
96378
- pleaseEnterDomain: "Please enter a custom domain",
96379
- createSuccess: "Custom domain created successfully",
96380
- createError: "Failed to create custom domain",
96383
+ noRecordsYet: "No records yet. Check the domain again to fetch them.",
96384
+ confirmRemoveTitle: "Remove this domain?",
96385
+ confirmDeleteBody: "{domain} will stop signing users in to this organization.",
96386
+ confirmDetachBody: "{domain} will stop serving the app, here and at the hosting provider.",
96387
+ noDomainConfigured: "No domains yet.",
96388
+ deleteSuccess: "Domain removed",
96389
+ deleteError: "The domain could not be removed",
96390
+ pleaseEnterDomain: "Enter a domain",
96391
+ createSuccess: "Domain added",
96392
+ createError: "The domain could not be added",
96393
+ verifySuccess: "The domain is verified and serving",
96394
+ verifyPending: "The records are not visible yet. Add them at your registrar and check again.",
96395
+ verifyError: "The domain could not be checked",
96396
+ verifyUnavailable: "The domain could not be checked from this browser",
96397
+ errorRefused: "This domain cannot be used here",
96398
+ errorForbidden: "Domains are managed by an organization admin",
96399
+ errorRateLimited: "Too many requests — try again shortly",
96400
+ errorUpstream: "The hosting provider rejected this organization’s credential",
96401
+ errorUnavailable: "This is not available on this instance yet",
96381
96402
  copiedToClipboard: "Copied to clipboard",
96382
96403
  unableToCopy: "Unable to copy"
96383
96404
  };
@@ -103631,39 +103652,60 @@ var advancedChatPrivacy$2 = {
103631
103652
  switchAriaDisabled: "Contrôle de la confidentialité du chat désactivé"
103632
103653
  };
103633
103654
  var advancedCustomDomain$2 = {
103634
- dnsConfiguration: "Configuration DNS",
103655
+ dnsConfiguration: "Domaines",
103635
103656
  add: "Ajouter",
103636
- dialogTitle: "Votre domaine personnalisé",
103637
- verificationNecessary: "La vérification du domaine est nécessaire après toute modification",
103638
- customDomainLabel: "Domaine personnalisé",
103657
+ dialogTitle: "Ajouter un domaine",
103658
+ dialogDescription: "Faites pointer un domaine qui vous appartient vers le site de connexion de cette organisation ou vers l’une de vos applications déployées.",
103659
+ kindLabel: "À quoi sert ce domaine ?",
103660
+ kindPlatform: "Site de connexion",
103661
+ kindApp: "Application déployée",
103662
+ projectLabel: "Application",
103663
+ projectPlaceholder: "Choisissez une application",
103664
+ noProjects: "Vous n’avez encore déployé aucune application. Déployez-en une, puis revenez lui donner un domaine.",
103665
+ customDomainLabel: "Domaine",
103666
+ domainHelpPlatform: "Sans le schéma ni un « www. » en tête — par exemple, app.example.com.",
103667
+ domainHelpApp: "Laissez ce champ vide et un sous-domaine sera attribué à l’application, sans aucun enregistrement DNS à créer.",
103639
103668
  cancel: "Annuler",
103640
103669
  save: "Enregistrer",
103641
- expandAriaLabel: "Développer le domaine personnalisé",
103642
- collapseAriaLabel: "Réduire le domaine personnalisé",
103643
- loading: "Chargement du domaine personnalisé...",
103644
- verifying: "Vérification...",
103645
- verified: "Vérifié",
103646
- unregistered: "Non enregistré",
103647
- notVerified: "Non vérifié",
103648
- retry: "Réessayer",
103670
+ expandAriaLabel: "Déplier les domaines",
103671
+ collapseAriaLabel: "Replier les domaines",
103672
+ loading: "Chargement des domaines…",
103673
+ verifying: "Vérification…",
103674
+ reverify: "Vérifier à nouveau",
103675
+ reverifyAriaLabel: "Vérifier à nouveau {domain}",
103676
+ removeAriaLabel: "Supprimer {domain}",
103649
103677
  "delete": "Supprimer",
103650
- domainVerificationHeading: "Vérification du domaine",
103651
- domainVerificationInstruction: "Pour vérifier la propriété de votre domaine et lui permettre de pointer vers votre application, vous devez ajouter les enregistrements DNS suivants chez votre registraire de domaine (comme Namecheap, GoDaddy ou Google Domains).",
103652
- domainRecords: "Enregistrements de domaine",
103678
+ detach: "Détacher",
103679
+ statusVerified: "Vérifié",
103680
+ statusUnverified: "Vérification requise",
103681
+ statusUnregistered: "Non enregistré",
103682
+ statusUnknown: "Vérification impossible",
103653
103683
  tableType: "Type",
103654
103684
  tableNameHost: "Nom/Hôte",
103655
103685
  tableValue: "Valeur",
103656
- tableStatus: "Statut",
103657
103686
  copyNameHostAriaLabel: "Copier le nom/hôte : {domain}",
103658
103687
  copyValueAriaLabel: "Copier la valeur/cible",
103659
- noDomainConfigured: "Aucun domaine personnalisé configuré pour cette application.",
103660
- deleteSuccess: "Domaine personnalisé supprimé avec succès",
103661
- deleteError: "Échec de la suppression du domaine personnalisé",
103662
- pleaseEnterDomain: "Veuillez saisir un domaine personnalisé",
103663
- createSuccess: "Domaine personnalisé créé avec succès",
103664
- createError: "Échec de la création du domaine personnalisé",
103688
+ noRecordsYet: "Aucun enregistrement pour l’instant. Vérifiez le domaine à nouveau pour les obtenir.",
103689
+ confirmRemoveTitle: "Supprimer ce domaine ?",
103690
+ confirmDeleteBody: "{domain} ne permettra plus de se connecter à cette organisation.",
103691
+ confirmDetachBody: "{domain} cessera de servir l’application, ici comme chez l’hébergeur.",
103692
+ noDomainConfigured: "Aucun domaine pour l’instant.",
103693
+ deleteSuccess: "Domaine supprimé",
103694
+ deleteError: "Le domaine n’a pas pu être supprimé",
103695
+ pleaseEnterDomain: "Saisissez un domaine",
103696
+ createSuccess: "Domaine ajouté",
103697
+ createError: "Le domaine n’a pas pu être ajouté",
103698
+ verifySuccess: "Le domaine est vérifié et sert l’application",
103699
+ verifyPending: "Les enregistrements ne sont pas encore visibles. Ajoutez-les chez votre registraire puis vérifiez à nouveau.",
103700
+ verifyError: "Le domaine n’a pas pu être vérifié",
103701
+ verifyUnavailable: "Le domaine n’a pas pu être vérifié depuis ce navigateur",
103702
+ errorRefused: "Ce domaine ne peut pas être utilisé ici",
103703
+ errorForbidden: "Les domaines sont gérés par un administrateur de l’organisation",
103704
+ errorRateLimited: "Trop de requêtes — réessayez dans un instant",
103705
+ errorUpstream: "L’hébergeur a rejeté l’identifiant de cette organisation",
103706
+ errorUnavailable: "Ce n’est pas encore disponible sur cette instance",
103665
103707
  copiedToClipboard: "Copié dans le presse-papiers",
103666
- unableToCopy: "Impossible de copier"
103708
+ unableToCopy: "Copie impossible"
103667
103709
  };
103668
103710
  var advancedExternalMapping$2 = {
103669
103711
  regionAriaLabel: "Correspondance d'identifiants externes",
@@ -110915,39 +110957,60 @@ var advancedChatPrivacy$1 = {
110915
110957
  switchAriaDisabled: "Control de privacidad del chat deshabilitado"
110916
110958
  };
110917
110959
  var advancedCustomDomain$1 = {
110918
- dnsConfiguration: "Configuración DNS",
110919
- add: "Agregar",
110920
- dialogTitle: "Tu dominio personalizado",
110921
- verificationNecessary: "La verificación del dominio es necesaria después de realizar cambios",
110922
- customDomainLabel: "Dominio personalizado",
110960
+ dnsConfiguration: "Dominios",
110961
+ add: "Añadir",
110962
+ dialogTitle: "Añadir un dominio",
110963
+ dialogDescription: "Dirige un dominio tuyo al sitio de inicio de sesión de esta organización o a una de tus aplicaciones desplegadas.",
110964
+ kindLabel: "¿Para qué es este dominio?",
110965
+ kindPlatform: "Sitio de inicio de sesión",
110966
+ kindApp: "Aplicación desplegada",
110967
+ projectLabel: "Aplicación",
110968
+ projectPlaceholder: "Elige una aplicación",
110969
+ noProjects: "Todavía no has desplegado ninguna aplicación. Despliega una primero y vuelve para darle un dominio.",
110970
+ customDomainLabel: "Dominio",
110971
+ domainHelpPlatform: "Sin el esquema ni un “www.” inicial — por ejemplo, app.example.com.",
110972
+ domainHelpApp: "Déjalo vacío y se asignará un subdominio a la aplicación, sin registros DNS que configurar.",
110923
110973
  cancel: "Cancelar",
110924
110974
  save: "Guardar",
110925
- expandAriaLabel: "Expandir dominio personalizado",
110926
- collapseAriaLabel: "Contraer dominio personalizado",
110927
- loading: "Cargando dominio personalizado...",
110928
- verifying: "Verificando...",
110929
- verified: "Verificado",
110930
- unregistered: "No registrado",
110931
- notVerified: "No verificado",
110932
- retry: "Reintentar",
110975
+ expandAriaLabel: "Expandir dominios",
110976
+ collapseAriaLabel: "Contraer dominios",
110977
+ loading: "Cargando dominios…",
110978
+ verifying: "Comprobando…",
110979
+ reverify: "Comprobar de nuevo",
110980
+ reverifyAriaLabel: "Comprobar {domain} de nuevo",
110981
+ removeAriaLabel: "Eliminar {domain}",
110933
110982
  "delete": "Eliminar",
110934
- domainVerificationHeading: "Verificación de dominio",
110935
- domainVerificationInstruction: "Para verificar la propiedad de tu dominio y permitir que apunte a tu aplicación, debes agregar los siguientes registros DNS en tu registrador de dominio (como Namecheap, GoDaddy o Google Domains).",
110936
- domainRecords: "Registros de dominio",
110983
+ detach: "Desvincular",
110984
+ statusVerified: "Verificado",
110985
+ statusUnverified: "Verificación necesaria",
110986
+ statusUnregistered: "No registrado",
110987
+ statusUnknown: "No se pudo comprobar",
110937
110988
  tableType: "Tipo",
110938
110989
  tableNameHost: "Nombre/Host",
110939
110990
  tableValue: "Valor",
110940
- tableStatus: "Estado",
110941
110991
  copyNameHostAriaLabel: "Copiar nombre/host: {domain}",
110942
110992
  copyValueAriaLabel: "Copiar valor/destino",
110943
- noDomainConfigured: "No hay dominio personalizado configurado para esta aplicación.",
110944
- deleteSuccess: "Dominio personalizado eliminado correctamente",
110945
- deleteError: "Error al eliminar el dominio personalizado",
110946
- pleaseEnterDomain: "Por favor, introduce un dominio personalizado",
110947
- createSuccess: "Dominio personalizado creado correctamente",
110948
- createError: "Error al crear el dominio personalizado",
110993
+ noRecordsYet: "Aún no hay registros. Comprueba el dominio de nuevo para obtenerlos.",
110994
+ confirmRemoveTitle: "¿Eliminar este dominio?",
110995
+ confirmDeleteBody: "{domain} dejará de permitir el inicio de sesión en esta organización.",
110996
+ confirmDetachBody: "{domain} dejará de servir la aplicación, aquí y en el proveedor de alojamiento.",
110997
+ noDomainConfigured: "Todavía no hay dominios.",
110998
+ deleteSuccess: "Dominio eliminado",
110999
+ deleteError: "No se pudo eliminar el dominio",
111000
+ pleaseEnterDomain: "Introduce un dominio",
111001
+ createSuccess: "Dominio añadido",
111002
+ createError: "No se pudo añadir el dominio",
111003
+ verifySuccess: "El dominio está verificado y sirviendo",
111004
+ verifyPending: "Los registros aún no son visibles. Añádelos en tu registrador y comprueba de nuevo.",
111005
+ verifyError: "No se pudo comprobar el dominio",
111006
+ verifyUnavailable: "No se pudo comprobar el dominio desde este navegador",
111007
+ errorRefused: "Este dominio no se puede usar aquí",
111008
+ errorForbidden: "Los dominios los gestiona un administrador de la organización",
111009
+ errorRateLimited: "Demasiadas solicitudes: inténtalo de nuevo en breve",
111010
+ errorUpstream: "El proveedor de alojamiento rechazó la credencial de esta organización",
111011
+ errorUnavailable: "Esto todavía no está disponible en esta instancia",
110949
111012
  copiedToClipboard: "Copiado al portapapeles",
110950
- unableToCopy: "No se puede copiar"
111013
+ unableToCopy: "No se pudo copiar"
110951
111014
  };
110952
111015
  var advancedExternalMapping$1 = {
110953
111016
  regionAriaLabel: "Mapeo de credenciales externas",
@@ -118199,37 +118262,58 @@ var advancedChatPrivacy = {
118199
118262
  switchAriaDisabled: "用户聊天隐私控制已禁用"
118200
118263
  };
118201
118264
  var advancedCustomDomain = {
118202
- dnsConfiguration: "DNS 配置",
118265
+ dnsConfiguration: "域名",
118203
118266
  add: "添加",
118204
- dialogTitle: "您的自定义域名",
118205
- verificationNecessary: "更改后需要进行域名验证",
118206
- customDomainLabel: "自定义域名",
118267
+ dialogTitle: "添加域名",
118268
+ dialogDescription: "将你拥有的域名指向该组织的登录站点,或指向你已部署的某个应用。",
118269
+ kindLabel: "这个域名用于什么?",
118270
+ kindPlatform: "登录站点",
118271
+ kindApp: "已部署的应用",
118272
+ projectLabel: "应用",
118273
+ projectPlaceholder: "选择一个应用",
118274
+ noProjects: "你还没有部署任何应用。请先部署一个,然后回来为它设置域名。",
118275
+ customDomainLabel: "域名",
118276
+ domainHelpPlatform: "不要带协议前缀或开头的“www.”,例如 app.example.com。",
118277
+ domainHelpApp: "留空即可自动为该应用分配一个子域名,无需设置任何 DNS 记录。",
118207
118278
  cancel: "取消",
118208
118279
  save: "保存",
118209
- expandAriaLabel: "展开自定义域名",
118210
- collapseAriaLabel: "收起自定义域名",
118211
- loading: "正在加载自定义域名...",
118212
- verifying: "验证中...",
118213
- verified: "已验证",
118214
- unregistered: "未注册",
118215
- notVerified: "未验证",
118216
- retry: "重试",
118280
+ expandAriaLabel: "展开域名",
118281
+ collapseAriaLabel: "收起域名",
118282
+ loading: "正在加载域名…",
118283
+ verifying: "正在检查…",
118284
+ reverify: "重新检查",
118285
+ reverifyAriaLabel: "重新检查 {domain}",
118286
+ removeAriaLabel: "移除 {domain}",
118217
118287
  "delete": "删除",
118218
- domainVerificationHeading: "域名验证",
118219
- domainVerificationInstruction: "要验证您的域名所有权并使其指向您的应用程序,您需要在域名注册商(如 Namecheap、GoDaddy 或 Google Domains)处添加以下 DNS 记录。",
118220
- domainRecords: "域名记录",
118288
+ detach: "解除绑定",
118289
+ statusVerified: "已验证",
118290
+ statusUnverified: "需要验证",
118291
+ statusUnregistered: "未注册",
118292
+ statusUnknown: "无法检查",
118221
118293
  tableType: "类型",
118222
118294
  tableNameHost: "名称/主机",
118223
118295
  tableValue: "值",
118224
- tableStatus: "状态",
118225
118296
  copyNameHostAriaLabel: "复制名称/主机:{domain}",
118226
118297
  copyValueAriaLabel: "复制值/目标",
118227
- noDomainConfigured: "此应用程序未配置自定义域名。",
118228
- deleteSuccess: "自定义域名已成功删除",
118229
- deleteError: "删除自定义域名失败",
118230
- pleaseEnterDomain: "请输入自定义域名",
118231
- createSuccess: "自定义域名已成功创建",
118232
- createError: "创建自定义域名失败",
118298
+ noRecordsYet: "暂无记录。请重新检查该域名以获取记录。",
118299
+ confirmRemoveTitle: "要移除这个域名吗?",
118300
+ confirmDeleteBody: "{domain} 将不再用于登录该组织。",
118301
+ confirmDetachBody: "{domain} 将不再为该应用提供服务,本处和托管服务商处都会解除。",
118302
+ noDomainConfigured: "暂无域名。",
118303
+ deleteSuccess: "域名已移除",
118304
+ deleteError: "无法移除该域名",
118305
+ pleaseEnterDomain: "请输入域名",
118306
+ createSuccess: "域名已添加",
118307
+ createError: "无法添加该域名",
118308
+ verifySuccess: "域名已验证并正常服务",
118309
+ verifyPending: "记录尚未生效。请在域名注册商处添加后再检查。",
118310
+ verifyError: "无法检查该域名",
118311
+ verifyUnavailable: "无法从当前浏览器检查该域名",
118312
+ errorRefused: "该域名不能在此使用",
118313
+ errorForbidden: "域名由组织管理员管理",
118314
+ errorRateLimited: "请求过于频繁,请稍后再试",
118315
+ errorUpstream: "托管服务商拒绝了该组织的凭据",
118316
+ errorUnavailable: "此实例尚不支持该功能",
118233
118317
  copiedToClipboard: "已复制到剪贴板",
118234
118318
  unableToCopy: "无法复制"
118235
118319
  };
@@ -229267,6 +229351,325 @@ const PlatformMembershipContent = ({ platformKey, authURL, }) => {
229267
229351
  return (jsxs("div", { className: "flex items-center justify-between rounded-lg border px-6 py-6", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: t('advancedPlatformMembership.publicRegistrationLabel') }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": t('advancedPlatformMembership.infoAriaLabel'), className: "hidden sm:block", children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "rounded-lg bg-gray-700 px-3 py-2 text-sm font-medium whitespace-nowrap text-white shadow-sm transition-opacity duration-300 z-50", children: jsx("p", { children: t('advancedPlatformMembership.infoTooltip') }) })] }) }), (membershipData === null || membershipData === void 0 ? void 0 : membershipData.allow_self_linking) && (jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { onClick: handleCopyToClipboard, "aria-label": t('advancedPlatformMembership.copyAriaLabel'), className: "cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800 p-1 rounded transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1", children: jsx(Copy, { className: "h-4 w-4 text-gray-400 hover:text-blue-500" }) }), jsx(TooltipContent, { className: "rounded-lg bg-gray-700 px-3 py-2 text-sm font-medium whitespace-nowrap text-white shadow-sm transition-opacity duration-300 z-50", children: jsx("p", { children: t('advancedPlatformMembership.copyTooltip') }) })] }) }))] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Switch, { checked: membershipData === null || membershipData === void 0 ? void 0 : membershipData.allow_self_linking, onCheckedChange: handleToggleMembership, disabled: isUpdating, "aria-label": `${t('advancedPlatformMembership.switchAriaLabel')} ${(membershipData === null || membershipData === void 0 ? void 0 : membershipData.allow_self_linking) ? t('advancedPlatformMembership.switchEnabled') : t('advancedPlatformMembership.switchDisabled')}`, className: "cursor-pointer data-[state=checked]:bg-blue-500" }), isUpdating && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] })] }));
229268
229352
  };
229269
229353
 
229354
+ /**
229355
+ * Paste-tolerant: a copied address brings a scheme, a path and often a `www.`
229356
+ * with it, and a typed one may carry capitals. The backend takes only a
229357
+ * lowercase bare host and refuses anything else with a field error.
229358
+ */
229359
+ const sanitizeDomain = (domain) => domain
229360
+ .trim()
229361
+ .toLowerCase()
229362
+ .replace(/^https?:\/\//, '')
229363
+ .replace(/\/.*$/, '')
229364
+ .replace(/^www\./, '');
229365
+ const AddDomainDialog = ({ open, onOpenChange, canAddPlatformDomain, projects, isLoadingProjects, isSubmitting, onSubmitPlatformDomain, onSubmitAppDomain, }) => {
229366
+ const t = useT();
229367
+ const [mode, setMode] = useState(canAddPlatformDomain ? 'platform' : 'app');
229368
+ const [domainValue, setDomainValue] = useState('');
229369
+ const [projectId, setProjectId] = useState('');
229370
+ const reset = () => {
229371
+ setDomainValue('');
229372
+ setProjectId('');
229373
+ setMode(canAddPlatformDomain ? 'platform' : 'app');
229374
+ };
229375
+ const close = () => {
229376
+ reset();
229377
+ onOpenChange(false);
229378
+ };
229379
+ const handleSubmit = async (event) => {
229380
+ event.preventDefault();
229381
+ if (mode === 'platform') {
229382
+ await onSubmitPlatformDomain(sanitizeDomain(domainValue));
229383
+ }
229384
+ else {
229385
+ await onSubmitAppDomain(Number(projectId), sanitizeDomain(domainValue));
229386
+ }
229387
+ };
229388
+ const canSubmit = mode === 'platform' ? domainValue.trim().length > 0 : projectId.trim().length > 0;
229389
+ return (jsx(Dialog, { open: open, onOpenChange: (next) => {
229390
+ if (!next) {
229391
+ reset();
229392
+ }
229393
+ onOpenChange(next);
229394
+ }, children: jsxs(DialogContent, { className: "sm:max-w-[480px]", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: t('advancedCustomDomain.dialogTitle') }), jsx(DialogDescription, { children: t('advancedCustomDomain.dialogDescription') })] }), jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [jsxs("div", { className: "space-y-2", children: [jsx("label", { htmlFor: "add-domain-kind", className: "text-sm", children: t('advancedCustomDomain.kindLabel') }), jsxs(Select$1, { value: mode, onValueChange: (next) => setMode(next), children: [jsx(SelectTrigger, { id: "add-domain-kind", children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [canAddPlatformDomain && (jsx(SelectItem, { value: "platform", children: t('advancedCustomDomain.kindPlatform') })), jsx(SelectItem, { value: "app", children: t('advancedCustomDomain.kindApp') })] })] })] }), mode === 'app' && (jsxs("div", { className: "space-y-2", children: [jsx("label", { htmlFor: "add-domain-project", className: "text-sm", children: t('advancedCustomDomain.projectLabel') }), isLoadingProjects ? (jsx("p", { className: "text-sm text-[#646464]", children: t('advancedCustomDomain.loading') })) : projects.length === 0 ? (
229395
+ // The backend lists only the caller's own projects, so this is
229396
+ // "you have not deployed anything", not "the platform has not".
229397
+ jsx("p", { className: "text-sm text-[#646464]", children: t('advancedCustomDomain.noProjects') })) : (jsxs(Select$1, { value: projectId, onValueChange: setProjectId, children: [jsx(SelectTrigger, { id: "add-domain-project", children: jsx(SelectValue, { placeholder: t('advancedCustomDomain.projectPlaceholder') }) }), jsx(SelectContent, { children: projects.map((project) => (jsx(SelectItem, { value: String(project.id), children: project.name }, project.id))) })] }))] })), jsxs("div", { className: "space-y-2", children: [jsx("label", { htmlFor: "add-domain-name", className: "text-sm", children: t('advancedCustomDomain.customDomainLabel') }), jsx(Input, { id: "add-domain-name", value: domainValue, onChange: (event) => setDomainValue(event.target.value), placeholder: "example.com", className: "w-full", required: mode === 'platform' }), jsx("p", { className: "text-xs text-[#646464]", children: mode === 'app'
229398
+ ? t('advancedCustomDomain.domainHelpApp')
229399
+ : t('advancedCustomDomain.domainHelpPlatform') })] }), jsxs("div", { className: "flex justify-end gap-2", children: [jsx(Button$1, { type: "button", variant: "outline", onClick: close, children: t('advancedCustomDomain.cancel') }), jsxs(Button$1, { type: "submit", disabled: isSubmitting || !canSubmit, children: [isSubmitting && jsx(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }), t('advancedCustomDomain.save')] })] })] })] }) }));
229400
+ };
229401
+
229402
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
229403
+ // @__NO_SIDE_EFFECTS__
229404
+ function createSlottable(ownerName) {
229405
+ const Slottable2 = ({ children }) => {
229406
+ return /* @__PURE__ */ jsx(Fragment$1, { children });
229407
+ };
229408
+ Slottable2.displayName = `${ownerName}.Slottable`;
229409
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
229410
+ return Slottable2;
229411
+ }
229412
+
229413
+ var ROOT_NAME = "AlertDialog";
229414
+ var [createAlertDialogContext] = createContextScope$1(ROOT_NAME, [
229415
+ createDialogScope
229416
+ ]);
229417
+ var useDialogScope = createDialogScope();
229418
+ var AlertDialog$1 = (props) => {
229419
+ const { __scopeAlertDialog, ...alertDialogProps } = props;
229420
+ const dialogScope = useDialogScope(__scopeAlertDialog);
229421
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });
229422
+ };
229423
+ AlertDialog$1.displayName = ROOT_NAME;
229424
+ var TRIGGER_NAME$1 = "AlertDialogTrigger";
229425
+ var AlertDialogTrigger = React.forwardRef(
229426
+ (props, forwardedRef) => {
229427
+ const { __scopeAlertDialog, ...triggerProps } = props;
229428
+ const dialogScope = useDialogScope(__scopeAlertDialog);
229429
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
229430
+ }
229431
+ );
229432
+ AlertDialogTrigger.displayName = TRIGGER_NAME$1;
229433
+ var PORTAL_NAME$1 = "AlertDialogPortal";
229434
+ var AlertDialogPortal$1 = (props) => {
229435
+ const { __scopeAlertDialog, ...portalProps } = props;
229436
+ const dialogScope = useDialogScope(__scopeAlertDialog);
229437
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });
229438
+ };
229439
+ AlertDialogPortal$1.displayName = PORTAL_NAME$1;
229440
+ var OVERLAY_NAME = "AlertDialogOverlay";
229441
+ var AlertDialogOverlay$1 = React.forwardRef(
229442
+ (props, forwardedRef) => {
229443
+ const { __scopeAlertDialog, ...overlayProps } = props;
229444
+ const dialogScope = useDialogScope(__scopeAlertDialog);
229445
+ return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
229446
+ }
229447
+ );
229448
+ AlertDialogOverlay$1.displayName = OVERLAY_NAME;
229449
+ var CONTENT_NAME$2 = "AlertDialogContent";
229450
+ var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME$2);
229451
+ var Slottable = createSlottable("AlertDialogContent");
229452
+ var AlertDialogContent$1 = React.forwardRef(
229453
+ (props, forwardedRef) => {
229454
+ const { __scopeAlertDialog, children, ...contentProps } = props;
229455
+ const dialogScope = useDialogScope(__scopeAlertDialog);
229456
+ const contentRef = React.useRef(null);
229457
+ const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
229458
+ const cancelRef = React.useRef(null);
229459
+ return /* @__PURE__ */ jsx(
229460
+ DialogPrimitive.WarningProvider,
229461
+ {
229462
+ contentName: CONTENT_NAME$2,
229463
+ titleName: TITLE_NAME,
229464
+ docsSlug: "alert-dialog",
229465
+ children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(
229466
+ DialogPrimitive.Content,
229467
+ {
229468
+ role: "alertdialog",
229469
+ ...dialogScope,
229470
+ ...contentProps,
229471
+ ref: composedRefs,
229472
+ onOpenAutoFocus: composeEventHandlers$2(contentProps.onOpenAutoFocus, (event) => {
229473
+ event.preventDefault();
229474
+ cancelRef.current?.focus({ preventScroll: true });
229475
+ }),
229476
+ onPointerDownOutside: (event) => event.preventDefault(),
229477
+ onInteractOutside: (event) => event.preventDefault(),
229478
+ children: [
229479
+ /* @__PURE__ */ jsx(Slottable, { children }),
229480
+ /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })
229481
+ ]
229482
+ }
229483
+ ) })
229484
+ }
229485
+ );
229486
+ }
229487
+ );
229488
+ AlertDialogContent$1.displayName = CONTENT_NAME$2;
229489
+ var TITLE_NAME = "AlertDialogTitle";
229490
+ var AlertDialogTitle$1 = React.forwardRef(
229491
+ (props, forwardedRef) => {
229492
+ const { __scopeAlertDialog, ...titleProps } = props;
229493
+ const dialogScope = useDialogScope(__scopeAlertDialog);
229494
+ return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
229495
+ }
229496
+ );
229497
+ AlertDialogTitle$1.displayName = TITLE_NAME;
229498
+ var DESCRIPTION_NAME = "AlertDialogDescription";
229499
+ var AlertDialogDescription$1 = React.forwardRef((props, forwardedRef) => {
229500
+ const { __scopeAlertDialog, ...descriptionProps } = props;
229501
+ const dialogScope = useDialogScope(__scopeAlertDialog);
229502
+ return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
229503
+ });
229504
+ AlertDialogDescription$1.displayName = DESCRIPTION_NAME;
229505
+ var ACTION_NAME = "AlertDialogAction";
229506
+ var AlertDialogAction$1 = React.forwardRef(
229507
+ (props, forwardedRef) => {
229508
+ const { __scopeAlertDialog, ...actionProps } = props;
229509
+ const dialogScope = useDialogScope(__scopeAlertDialog);
229510
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
229511
+ }
229512
+ );
229513
+ AlertDialogAction$1.displayName = ACTION_NAME;
229514
+ var CANCEL_NAME = "AlertDialogCancel";
229515
+ var AlertDialogCancel$1 = React.forwardRef(
229516
+ (props, forwardedRef) => {
229517
+ const { __scopeAlertDialog, ...cancelProps } = props;
229518
+ const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
229519
+ const dialogScope = useDialogScope(__scopeAlertDialog);
229520
+ const ref = useComposedRefs$1(forwardedRef, cancelRef);
229521
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });
229522
+ }
229523
+ );
229524
+ AlertDialogCancel$1.displayName = CANCEL_NAME;
229525
+ var DescriptionWarning = ({ contentRef }) => {
229526
+ const MESSAGE = `\`${CONTENT_NAME$2}\` requires a description for the component to be accessible for screen reader users.
229527
+
229528
+ You can add a description to the \`${CONTENT_NAME$2}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
229529
+
229530
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME$2}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
229531
+
229532
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
229533
+ React.useEffect(() => {
229534
+ const hasDescription = document.getElementById(
229535
+ contentRef.current?.getAttribute("aria-describedby")
229536
+ );
229537
+ if (!hasDescription) console.warn(MESSAGE);
229538
+ }, [MESSAGE, contentRef]);
229539
+ return null;
229540
+ };
229541
+ var Root2$2 = AlertDialog$1;
229542
+ var Portal2 = AlertDialogPortal$1;
229543
+ var Overlay2 = AlertDialogOverlay$1;
229544
+ var Content2$1 = AlertDialogContent$1;
229545
+ var Action = AlertDialogAction$1;
229546
+ var Cancel = AlertDialogCancel$1;
229547
+ var Title2 = AlertDialogTitle$1;
229548
+ var Description2 = AlertDialogDescription$1;
229549
+
229550
+ const AlertDialog = Root2$2;
229551
+ const AlertDialogPortal = Portal2;
229552
+ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (jsx(Overlay2, { className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80', className), ...props, ref: ref })));
229553
+ AlertDialogOverlay.displayName = Overlay2.displayName;
229554
+ const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (jsxs(AlertDialogPortal, { children: [jsx(AlertDialogOverlay, {}), jsx(Content2$1, { ref: ref, className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg', className), ...props })] })));
229555
+ AlertDialogContent.displayName = Content2$1.displayName;
229556
+ const AlertDialogHeader = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col space-y-2 text-center sm:text-left', className), ...props }));
229557
+ AlertDialogHeader.displayName = 'AlertDialogHeader';
229558
+ const AlertDialogFooter = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
229559
+ AlertDialogFooter.displayName = 'AlertDialogFooter';
229560
+ const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (jsx(Title2, { ref: ref, className: cn('text-lg font-semibold', className), ...props })));
229561
+ AlertDialogTitle.displayName = Title2.displayName;
229562
+ const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (jsx(Description2, { ref: ref, className: cn('text-muted-foreground text-sm', className), ...props })));
229563
+ AlertDialogDescription.displayName = Description2.displayName;
229564
+ const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (jsx(Action, { ref: ref, className: cn(buttonVariants(), className), ...props })));
229565
+ AlertDialogAction.displayName = Action.displayName;
229566
+ const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (jsx(Cancel, { ref: ref, className: cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className), ...props })));
229567
+ AlertDialogCancel.displayName = Cancel.displayName;
229568
+
229569
+ const hostedDomainStatus = (row) => {
229570
+ // A domain that was taken over keeps this organization's old `verified_at`,
229571
+ // so `lost_at` has to outrank it: the row is waiting on DNS again until a
229572
+ // re-verify reclaims it. The panel does not say who took it.
229573
+ if (row.lost_at) {
229574
+ return 'unverified';
229575
+ }
229576
+ return row.verified_at ? 'verified' : 'unverified';
229577
+ };
229578
+ /**
229579
+ * Every SPA domain CNAMEs to the same instance-wide host, so this answers "is
229580
+ * DNS pointing at us" and nothing more — it cannot tell which organization owns
229581
+ * the name. That is why it is only ever used for SPA rows.
229582
+ */
229583
+ const resolveCname = async (domain, target) => {
229584
+ var _a;
229585
+ const response = await fetch(`https://dns.google/resolve?name=${domain}&type=CNAME`, {
229586
+ cache: 'no-store',
229587
+ });
229588
+ const body = await response.json();
229589
+ return Boolean((_a = body === null || body === void 0 ? void 0 : body.Answer) === null || _a === void 0 ? void 0 : _a.some((answer) => { var _a; return ((_a = answer.data) !== null && _a !== void 0 ? _a : '').replace(/\.$/, '') === target; }));
229590
+ };
229591
+ const DomainRow = ({ row, sslValue, onReverify, onRemove, isBusy, onStatusChange, }) => {
229592
+ var _a;
229593
+ const t = useT();
229594
+ const isHosted = row.spa === VERCEL_SPA;
229595
+ const [copiedKey, setCopiedKey] = useState(null);
229596
+ const [confirmOpen, setConfirmOpen] = useState(false);
229597
+ const [spaStatus, setSpaStatus] = useState('checking');
229598
+ const checkSpaDomain = useCallback(async () => {
229599
+ if (isHosted) {
229600
+ return;
229601
+ }
229602
+ if (!row.registered_with_dns_pro) {
229603
+ setSpaStatus('unregistered');
229604
+ return;
229605
+ }
229606
+ setSpaStatus('checking');
229607
+ try {
229608
+ setSpaStatus((await resolveCname(row.custom_domain, sslValue)) ? 'verified' : 'unverified');
229609
+ }
229610
+ catch (_a) {
229611
+ // A blocked or failed lookup is not the same answer as "the record is
229612
+ // missing" — the OS content-security-policy can refuse the request
229613
+ // outright — so say so instead of showing a confident "Not verified".
229614
+ setSpaStatus('unknown');
229615
+ toast.error(t('advancedCustomDomain.verifyUnavailable'));
229616
+ }
229617
+ }, [isHosted, row.custom_domain, row.registered_with_dns_pro, sslValue, t]);
229618
+ useEffect(() => {
229619
+ void checkSpaDomain();
229620
+ }, [checkSpaDomain]);
229621
+ useEffect(() => {
229622
+ if (isHosted) {
229623
+ return;
229624
+ }
229625
+ onStatusChange === null || onStatusChange === void 0 ? void 0 : onStatusChange(row.id, spaStatus);
229626
+ }, [isHosted, onStatusChange, row.id, spaStatus]);
229627
+ const status = isHosted ? hostedDomainStatus(row) : spaStatus;
229628
+ // A hosted row's records come from the provider and carry a reason each; an
229629
+ // SPA row has none stored, and its single CNAME is the same for every
229630
+ // organization on the instance, so it is computed here.
229631
+ const records = isHosted
229632
+ ? ((_a = row.records) !== null && _a !== void 0 ? _a : [])
229633
+ : [{ type: 'CNAME', name: row.custom_domain, value: sslValue }];
229634
+ const handleCopy = async (value, key) => {
229635
+ try {
229636
+ await navigator.clipboard.writeText(value);
229637
+ setCopiedKey(key);
229638
+ toast.success(t('advancedCustomDomain.copiedToClipboard'));
229639
+ setTimeout(() => setCopiedKey(null), 5000);
229640
+ }
229641
+ catch (_a) {
229642
+ toast.error(t('advancedCustomDomain.unableToCopy'));
229643
+ }
229644
+ };
229645
+ // Spelled out rather than built from `status`: the i18n coverage check reads
229646
+ // literal t('…') calls out of the source, so a computed key is invisible to
229647
+ // it and a typo in one would only surface in the running UI.
229648
+ const statusLabel = () => {
229649
+ switch (status) {
229650
+ case 'verified':
229651
+ return t('advancedCustomDomain.statusVerified');
229652
+ case 'unregistered':
229653
+ return t('advancedCustomDomain.statusUnregistered');
229654
+ case 'unknown':
229655
+ return t('advancedCustomDomain.statusUnknown');
229656
+ default:
229657
+ return t('advancedCustomDomain.statusUnverified');
229658
+ }
229659
+ };
229660
+ const statusBadge = (jsx("span", { className: status === 'verified'
229661
+ ? 'rounded bg-green-100 px-2 py-1 text-xs text-green-800'
229662
+ : 'rounded bg-gray-100 px-2 py-1 text-xs text-gray-600', children: status === 'checking' ? (jsxs("span", { className: "flex items-center gap-1", children: [jsx(LoaderCircle, { className: "h-3 w-3 animate-spin" }), t('advancedCustomDomain.verifying')] })) : (statusLabel()) }));
229663
+ return (jsxs("div", { className: "space-y-3 rounded-lg border border-gray-200 p-3 dark:border-gray-700", children: [jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm", children: row.custom_domain }), jsx("span", { className: "text-xs text-[#646464]", children: isHosted ? t('advancedCustomDomain.kindApp') : t('advancedCustomDomain.kindPlatform') }), statusBadge] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(Button$1, { variant: "outline", size: "sm", onClick: () => (isHosted ? void onReverify(row) : void checkSpaDomain()), disabled: isBusy || status === 'checking' || (!isHosted && !row.registered_with_dns_pro), "aria-label": t('advancedCustomDomain.reverifyAriaLabel', { domain: row.custom_domain }), children: isBusy || status === 'checking' ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" })) : (jsxs(Fragment$1, { children: [jsx(RefreshCw, { className: "mr-1 h-4 w-4", "aria-hidden": "true" }), t('advancedCustomDomain.reverify')] })) }), jsx(Button$1, { variant: "outline", size: "sm", className: "text-red-600 hover:text-red-700", onClick: () => setConfirmOpen(true), disabled: isBusy, "aria-label": t('advancedCustomDomain.removeAriaLabel', { domain: row.custom_domain }), children: isHosted ? t('advancedCustomDomain.detach') : t('advancedCustomDomain.delete') })] })] }), records.length > 0 ? (jsxs(Table$1, { className: "table-fixed", children: [jsx(TableHeader$1, { children: jsxs(TableRow$1, { children: [jsx(TableHead, { className: "w-[90px]", children: t('advancedCustomDomain.tableType') }), jsx(TableHead, { className: "w-1/3", children: t('advancedCustomDomain.tableNameHost') }), jsx(TableHead, { children: t('advancedCustomDomain.tableValue') })] }) }), jsx(TableBody, { children: records.map((record, index) => (jsxs(TableRow$1, { children: [jsx(TableCell$1, { className: "text-sm", children: record.type }), jsx(TableCell$1, { children: jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm break-all", children: record.name }), jsx(Button$1, { type: "button", variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0", onClick: () => handleCopy(record.name, `name-${index}`), "aria-label": t('advancedCustomDomain.copyNameHostAriaLabel', {
229664
+ domain: record.name,
229665
+ }), children: copiedKey === `name-${index}` ? (jsx(Check, { className: "h-4 w-4 text-blue-600", "aria-hidden": "true" })) : (jsx(Copy, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) }), jsxs(TableCell$1, { children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm break-all", children: record.value }), jsx(Button$1, { type: "button", variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0", onClick: () => handleCopy(record.value, `value-${index}`), "aria-label": t('advancedCustomDomain.copyValueAriaLabel'), children: copiedKey === `value-${index}` ? (jsx(Check, { className: "h-4 w-4 text-blue-600", "aria-hidden": "true" })) : (jsx(Copy, { className: "h-4 w-4", "aria-hidden": "true" })) })] }), record.reason && jsx("p", { className: "mt-1 text-xs text-[#646464]", children: record.reason })] })] }, `${record.type}-${record.name}-${record.value}`))) })] })) : (jsx("p", { className: "text-sm text-[#646464]", children: t('advancedCustomDomain.noRecordsYet') })), jsx(AlertDialog, { open: confirmOpen, onOpenChange: setConfirmOpen, children: jsxs(AlertDialogContent, { children: [jsxs(AlertDialogHeader, { children: [jsx(AlertDialogTitle, { children: t('advancedCustomDomain.confirmRemoveTitle') }), jsx(AlertDialogDescription, { children: isHosted
229666
+ ? t('advancedCustomDomain.confirmDetachBody', { domain: row.custom_domain })
229667
+ : t('advancedCustomDomain.confirmDeleteBody', { domain: row.custom_domain }) })] }), jsxs(AlertDialogFooter, { children: [jsx(AlertDialogCancel, { children: t('advancedCustomDomain.cancel') }), jsx(AlertDialogAction, { onClick: () => {
229668
+ setConfirmOpen(false);
229669
+ void onRemove(row);
229670
+ }, children: isHosted ? t('advancedCustomDomain.detach') : t('advancedCustomDomain.delete') })] })] }) })] }));
229671
+ };
229672
+
229270
229673
  const normalizeCustomDomains = (response) => {
229271
229674
  if (!response) {
229272
229675
  return [];
@@ -229285,141 +229688,196 @@ const normalizeCustomDomains = (response) => {
229285
229688
  }
229286
229689
  return [];
229287
229690
  };
229288
- const sanitizeDomain = (domain) => {
229289
- return domain
229290
- .trim()
229291
- .replace(/^https?:\/\//, '') // Remove http:// or https://
229292
- .replace(/^www\./, ''); // Remove www.
229691
+ const serverDetail = (error) => {
229692
+ const data = error === null || error === void 0 ? void 0 : error.data;
229693
+ if (typeof data === 'string') {
229694
+ return data;
229695
+ }
229696
+ const body = data;
229697
+ for (const value of [body === null || body === void 0 ? void 0 : body.error, body === null || body === void 0 ? void 0 : body.message, body === null || body === void 0 ? void 0 : body.detail]) {
229698
+ if (typeof value === 'string' && value.trim() !== '') {
229699
+ return value;
229700
+ }
229701
+ }
229702
+ // A field error — `{"domain": ["…"]}` — is how the backend refuses a malformed
229703
+ // name; its text is the first entry of the first such list.
229704
+ for (const value of Object.values(body !== null && body !== void 0 ? body : {})) {
229705
+ const first = Array.isArray(value) ? value[0] : undefined;
229706
+ if (typeof first === 'string' && first.trim() !== '') {
229707
+ return first;
229708
+ }
229709
+ }
229710
+ return undefined;
229293
229711
  };
229294
- const CustomDomainsContent = ({ platformKey, currentSPA, currentPlatformBaseDomain, }) => {
229712
+ const CustomDomainsContent = ({ platformKey, username, currentSPA, currentPlatformBaseDomain, }) => {
229713
+ var _a;
229295
229714
  const t = useT();
229296
229715
  const [isCollapsed, setIsCollapsed] = useState(true);
229297
229716
  const [isModalOpen, setIsModalOpen] = useState(false);
229298
- const [customDomainValue, setCustomDomainValue] = useState('');
229299
- const [deletingDomainId, setDeletingDomainId] = useState(null);
229300
- const [copiedField, setCopiedField] = useState(null);
229301
- const [isVerified, setIsVerified] = useState(null);
229302
- const [isVerifying, setIsVerifying] = useState(false);
229717
+ const [busyDomainId, setBusyDomainId] = useState(null);
229303
229718
  const { data, isLoading, isFetching, refetch } = useGetCustomDomainsQuery({
229304
229719
  params: { platform_key: platformKey },
229305
229720
  });
229721
+ // Only the caller's own deployed apps are listable, and only the Add dialog
229722
+ // needs them — so this stays idle until it opens.
229723
+ const { data: projectData, isFetching: isLoadingProjects } = useGetHostingProjectsQuery({ org: platformKey, username }, { skip: !isModalOpen || !username });
229306
229724
  const [createCustomDomain, { isLoading: isCreating }] = useCreateCustomDomainMutation();
229307
229725
  const [deleteCustomDomain] = useDeleteCustomDomainMutation();
229726
+ const [createHostingProjectDomain, { isLoading: isAttaching }] = useCreateHostingProjectDomainMutation();
229727
+ const [updateHostingDomain] = useUpdateHostingDomainMutation();
229728
+ const [deleteHostingDomain] = useDeleteHostingDomainMutation();
229308
229729
  const customDomains = useMemo(() => normalizeCustomDomains(data), [data]);
229309
- const sslValue = `ssl.${currentPlatformBaseDomain && currentPlatformBaseDomain.trim() !== '' ? currentPlatformBaseDomain : typeof window !== 'undefined' ? window.location.hostname.split('.').slice(-2).join('.') : 'iblai.app'}`;
229310
- // Get the current domain for the current SPA
229311
- const currentDomain = useMemo(() => {
229312
- if (!currentSPA)
229313
- return null;
229314
- return customDomains.find((domain) => { var _a; return (_a = domain.spa) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(currentSPA.toLowerCase()); });
229315
- }, [customDomains, currentSPA]);
229316
- const verifyCustomDomain = async (domain) => {
229317
- if (!(currentDomain === null || currentDomain === void 0 ? void 0 : currentDomain.registered_with_dns_pro)) {
229318
- return;
229319
- }
229320
- setIsVerifying(true);
229321
- try {
229322
- const endpoint = `https://dns.google/resolve?name=${domain}&type=CNAME`;
229323
- const res = await fetch(endpoint, { cache: 'no-store' });
229324
- const data = await res.json();
229325
- let verified = false;
229326
- if (data.Answer) {
229327
- // Check if any CNAME record points to sslValue
229328
- verified = data.Answer.some((a) => a.data.replace(/\.$/, '') === sslValue);
229329
- }
229330
- setIsVerified(verified);
229331
- }
229332
- catch (error) {
229333
- console.error('Failed to verify domain:', error);
229334
- setIsVerified(false);
229335
- }
229336
- finally {
229337
- setIsVerifying(false);
229338
- }
229339
- };
229340
- // Auto-check verification on domain load
229341
- useEffect(() => {
229342
- if (currentDomain === null || currentDomain === void 0 ? void 0 : currentDomain.custom_domain) {
229343
- verifyCustomDomain(currentDomain.custom_domain);
229344
- }
229345
- else {
229346
- setIsVerified(null);
229347
- }
229348
- }, [currentDomain === null || currentDomain === void 0 ? void 0 : currentDomain.custom_domain]);
229349
- const handleDeleteCustomDomain = async (domain_id) => {
229350
- try {
229351
- setDeletingDomainId(domain_id);
229352
- await deleteCustomDomain({
229353
- domain_id,
229354
- platform_key: platformKey,
229355
- }).unwrap();
229356
- await refetch();
229357
- toast.success(t('advancedCustomDomain.deleteSuccess'));
229358
- }
229359
- catch (error) {
229360
- console.error('Failed to delete custom domain:', error);
229361
- toast.error(t('advancedCustomDomain.deleteError'));
229362
- }
229363
- finally {
229364
- setDeletingDomainId(null);
229730
+ // A sign-in row's answer exists only in the browser, so the row reports it up
229731
+ // to here. Two things stop a child's effect writing parent state that
229732
+ // re-renders the child that fired it, for ever: this identity never changes,
229733
+ // and an unchanged status returns the SAME object so React bails out. Either
229734
+ // alone is enough — losing both hangs the process, so the cheap second one
229735
+ // stays. Adding a dependency below is exactly how the first gets lost.
229736
+ const [spaStatuses, setSpaStatuses] = useState({});
229737
+ const handleStatusChange = useCallback((id, status) => {
229738
+ setSpaStatuses((previous) => previous[id] === status ? previous : { ...previous, [id]: status });
229739
+ }, []);
229740
+ // Verified first. Two groups rather than a full ranking — nothing was asked
229741
+ // about the order of the rest, and Array#sort is stable, so the server's
229742
+ // order survives inside each group.
229743
+ const sortedDomains = useMemo(() => {
229744
+ const isVerified = (row) => (row.spa === VERCEL_SPA ? hostedDomainStatus(row) : spaStatuses[row.id]) === 'verified';
229745
+ return [...customDomains].sort((a, b) => Number(isVerified(b)) - Number(isVerified(a)));
229746
+ }, [customDomains, spaStatuses]);
229747
+ const sslValue = `ssl.${currentPlatformBaseDomain && currentPlatformBaseDomain.trim() !== ''
229748
+ ? currentPlatformBaseDomain
229749
+ : typeof window !== 'undefined'
229750
+ ? window.location.hostname.split('.').slice(-2).join('.')
229751
+ : 'iblai.app'}`;
229752
+ // A platform gets one sign-in domain per SPA, so the Add dialog offers that
229753
+ // kind only while this SPA has none. Deployed apps have no such limit.
229754
+ const canAddPlatformDomain = useMemo(() => Boolean(currentSPA) &&
229755
+ !customDomains.some((domain) => { var _a; return domain.spa !== VERCEL_SPA && ((_a = domain.spa) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(currentSPA.toLowerCase())); }), [customDomains, currentSPA]);
229756
+ /**
229757
+ * The status decides what the user should do next, so it gets its own
229758
+ * message. 409 shares 400's: both mean "not this domain, not here", and the
229759
+ * panel does not tell one organization that another is holding it.
229760
+ */
229761
+ const headlineForStatus = (status, fallback) => {
229762
+ switch (status) {
229763
+ case 400:
229764
+ case 409:
229765
+ return t('advancedCustomDomain.errorRefused');
229766
+ case 403:
229767
+ return t('advancedCustomDomain.errorForbidden');
229768
+ case 429:
229769
+ return t('advancedCustomDomain.errorRateLimited');
229770
+ case 502:
229771
+ return t('advancedCustomDomain.errorUpstream');
229772
+ case 503:
229773
+ return t('advancedCustomDomain.errorUnavailable');
229774
+ default:
229775
+ return fallback;
229365
229776
  }
229366
229777
  };
229367
- const handleResetForm = () => {
229368
- setCustomDomainValue('');
229778
+ const reportError = (error, fallback) => {
229779
+ const status = error === null || error === void 0 ? void 0 : error.status;
229780
+ // The server's own words go underneath the headline — except on 409, the
229781
+ // one status whose body names the organization holding the domain.
229782
+ const description = status === 409 ? undefined : serverDetail(error);
229783
+ toast.error(headlineForStatus(status, fallback), { description });
229369
229784
  };
229370
- const handleAddCustomDomain = async (event) => {
229371
- event.preventDefault();
229372
- if (!customDomainValue.trim()) {
229785
+ const handleAddPlatformDomain = async (domain) => {
229786
+ if (!domain) {
229373
229787
  toast.error(t('advancedCustomDomain.pleaseEnterDomain'));
229374
229788
  return;
229375
229789
  }
229376
- const sanitizedDomain = sanitizeDomain(customDomainValue);
229377
229790
  try {
229378
229791
  await createCustomDomain({
229379
229792
  requestBody: {
229380
229793
  platform_key: platformKey,
229381
- custom_domain: sanitizedDomain,
229794
+ custom_domain: domain,
229382
229795
  spa: (currentSPA.endsWith('ai') ? currentSPA : `${currentSPA}ai`),
229383
229796
  registered_with_dns_pro: true,
229384
229797
  },
229385
229798
  }).unwrap();
229386
229799
  await refetch();
229387
229800
  toast.success(t('advancedCustomDomain.createSuccess'));
229388
- handleResetForm();
229389
229801
  setIsModalOpen(false);
229390
- // Auto-verify after creation
229391
- setTimeout(() => {
229392
- verifyCustomDomain(sanitizedDomain);
229393
- }, 1000);
229394
229802
  }
229395
- catch (mutationError) {
229396
- console.error('Failed to create custom domain:', mutationError);
229397
- toast.error(t('advancedCustomDomain.createError'));
229803
+ catch (error) {
229804
+ reportError(error, t('advancedCustomDomain.createError'));
229398
229805
  }
229399
229806
  };
229400
- const handleCopyField = async (value, fieldType) => {
229807
+ const handleAddAppDomain = async (project, domain) => {
229401
229808
  try {
229402
- await navigator.clipboard.writeText(value);
229403
- setCopiedField(fieldType);
229404
- toast.success(t('advancedCustomDomain.copiedToClipboard'));
229405
- // Reset the icon after 5 seconds
229406
- setTimeout(() => {
229407
- setCopiedField(null);
229408
- }, 5000);
229809
+ // An empty domain is the "assign me a subdomain" path, which the backend
229810
+ // reads as the absent key — not as an empty string.
229811
+ await createHostingProjectDomain({
229812
+ org: platformKey,
229813
+ username,
229814
+ project,
229815
+ domain: domain || undefined,
229816
+ }).unwrap();
229817
+ await refetch();
229818
+ toast.success(t('advancedCustomDomain.createSuccess'));
229819
+ setIsModalOpen(false);
229409
229820
  }
229410
- catch (copyError) {
229411
- console.error('Failed to copy:', copyError);
229412
- toast.error(t('advancedCustomDomain.unableToCopy'));
229821
+ catch (error) {
229822
+ reportError(error, t('advancedCustomDomain.createError'));
229413
229823
  }
229414
229824
  };
229415
- return (jsxs("div", { className: "rounded-lg px-6 py-5 border border-gray-200 dark:border-gray-700", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex sm:items-center justify-between", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: t('advancedCustomDomain.dnsConfiguration') }), isFetching && !isLoading && (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500", "aria-hidden": "true" }))] }), jsxs("div", { className: "flex items-center gap-2 self-end sm:self-auto", children: [!currentDomain && (jsxs(Dialog, { open: isModalOpen, onOpenChange: setIsModalOpen, children: [jsx(DialogTrigger, { asChild: true, children: jsxs(Button$1, { type: "button", variant: "secondary", size: "sm", className: "gap-1", children: [jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }), t('advancedCustomDomain.add')] }) }), jsxs(DialogContent, { className: "sm:max-w-[425px]", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('advancedCustomDomain.dialogTitle') }) }), jsxs("form", { onSubmit: handleAddCustomDomain, className: "space-y-4", children: [jsxs("div", { className: "space-y-2", children: [jsx("div", { className: "bg-blue-50 border border-blue-200 rounded-md p-3", children: jsxs("div", { className: "flex items-center gap-2", children: [jsx("div", { className: "w-4 h-4 bg-blue-400 rounded-full flex items-center justify-center", children: jsx("span", { className: "text-white text-xs", children: "!" }) }), jsx("span", { className: "text-sm text-blue-800", children: t('advancedCustomDomain.verificationNecessary') })] }) }), jsxs("div", { className: "space-y-2", children: [jsx("label", { htmlFor: "custom-domain", className: "text-sm", children: t('advancedCustomDomain.customDomainLabel') }), jsx(Input, { id: "custom-domain", value: customDomainValue, onChange: (event) => setCustomDomainValue(event.target.value), placeholder: "example.com", className: "w-full", required: true })] })] }), jsxs("div", { className: "flex justify-end gap-2", children: [jsx(Button$1, { type: "button", variant: "outline", onClick: () => {
229416
- setIsModalOpen(false);
229417
- handleResetForm();
229418
- }, children: t('advancedCustomDomain.cancel') }), jsxs(Button$1, { className: "bg-gradient-to-r from-blue-500 to-blue-600 text-white hover:opacity-90", type: "submit", disabled: isCreating, children: [isCreating && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin mr-2" }), t('advancedCustomDomain.save')] })] })] })] })] })), jsx("button", { onClick: () => setIsCollapsed((previous) => !previous), className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1", "aria-label": isCollapsed
229825
+ const handleReverify = async (row) => {
229826
+ setBusyDomainId(row.id);
229827
+ try {
229828
+ const result = await updateHostingDomain({
229829
+ org: platformKey,
229830
+ domainId: row.id,
229831
+ }).unwrap();
229832
+ await refetch();
229833
+ // The rule the badge is built from after the refetch: Vercel says verified
229834
+ // AND not misconfigured. `verified` alone is ownership (the TXT record); a
229835
+ // domain can hold that and still not point here, and the badge would then
229836
+ // say "required" while this toast said "serving".
229837
+ if ((result === null || result === void 0 ? void 0 : result.verified) && (result === null || result === void 0 ? void 0 : result.misconfigured) === false) {
229838
+ toast.success(t('advancedCustomDomain.verifySuccess'));
229839
+ }
229840
+ else {
229841
+ // Includes the reclaim the server refused — it answers 200, unverified,
229842
+ // and says which organization still serves it. Not relayed: from here
229843
+ // the domain is simply waiting on its records, same as any other.
229844
+ toast.message(t('advancedCustomDomain.verifyPending'));
229845
+ }
229846
+ }
229847
+ catch (error) {
229848
+ reportError(error, t('advancedCustomDomain.verifyError'));
229849
+ }
229850
+ finally {
229851
+ setBusyDomainId(null);
229852
+ }
229853
+ };
229854
+ const handleRemove = async (row) => {
229855
+ setBusyDomainId(row.id);
229856
+ try {
229857
+ // A hosted row has to go through the hosting route: deleting it here
229858
+ // would drop the record while the domain carried on serving the app.
229859
+ if (row.spa === VERCEL_SPA) {
229860
+ await deleteHostingDomain({ org: platformKey, domainId: row.id }).unwrap();
229861
+ }
229862
+ else {
229863
+ await deleteCustomDomain({ domain_id: row.id, platform_key: platformKey }).unwrap();
229864
+ }
229865
+ await refetch();
229866
+ toast.success(t('advancedCustomDomain.deleteSuccess'));
229867
+ }
229868
+ catch (error) {
229869
+ reportError(error, t('advancedCustomDomain.deleteError'));
229870
+ }
229871
+ finally {
229872
+ setBusyDomainId(null);
229873
+ }
229874
+ };
229875
+ return (jsxs("div", { className: "rounded-lg border border-gray-200 px-6 py-5 dark:border-gray-700", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsxs("div", { className: "flex justify-between sm:items-center", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: t('advancedCustomDomain.dnsConfiguration') }), isFetching && !isLoading && (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin text-blue-500", "aria-hidden": "true" }))] }), jsxs("div", { className: "flex items-center gap-2 self-end sm:self-auto", children: [jsxs(Button$1, { type: "button", variant: "secondary", size: "sm", className: "gap-1", onClick: () => {
229876
+ setIsCollapsed(false);
229877
+ setIsModalOpen(true);
229878
+ }, children: [jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }), t('advancedCustomDomain.add')] }), jsx("button", { onClick: () => setIsCollapsed((previous) => !previous), className: "rounded p-1 hover:bg-gray-100 focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 focus:outline-none dark:hover:bg-gray-800", "aria-label": isCollapsed
229419
229879
  ? t('advancedCustomDomain.expandAriaLabel')
229420
- : t('advancedCustomDomain.collapseAriaLabel'), type: "button", children: isCollapsed ? (jsx(ChevronDown, { className: "h-5 w-5 text-gray-400", "aria-hidden": "true" })) : (jsx(ChevronUp, { className: "h-5 w-5 text-gray-400", "aria-hidden": "true" })) })] })] }), !isCollapsed && (jsx("div", { className: "mt-4", children: isLoading ? (jsx("div", { className: "p-4 text-gray-500", children: t('advancedCustomDomain.loading') })) : currentDomain ? (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "flex items-center justify-between p-3 bg-gray-50 rounded-lg", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { children: currentDomain.custom_domain }), isVerifying ? (jsxs("span", { className: "px-2 py-1 text-xs bg-gray-100 text-gray-600 rounded flex items-center gap-1", children: [jsx(LoaderCircle, { className: "h-3 w-3 animate-spin" }), t('advancedCustomDomain.verifying')] })) : isVerified ? (jsx("span", { className: "px-2 py-1 text-xs bg-green-100 text-green-800 rounded", children: t('advancedCustomDomain.verified') })) : !currentDomain.registered_with_dns_pro ? (jsx("span", { className: "px-2 py-1 text-xs bg-yellow-100 text-yellow-800 rounded", children: t('advancedCustomDomain.unregistered') })) : isVerified === false ? (jsx("span", { className: "px-2 py-1 text-xs bg-yellow-100 text-yellow-800 rounded", children: t('advancedCustomDomain.notVerified') })) : null] }), jsxs("div", { className: "flex items-center gap-2", children: [!isVerified && isVerified !== null && currentDomain.registered_with_dns_pro && (jsx(Button$1, { variant: "outline", size: "sm", onClick: () => verifyCustomDomain(currentDomain.custom_domain), disabled: isVerifying, children: isVerifying ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" })) : (jsxs(Fragment$1, { children: [jsx(RefreshCw, { className: "h-4 w-4 mr-1" }), t('advancedCustomDomain.retry')] })) })), jsx(Button$1, { variant: "outline", size: "sm", className: "text-red-600 hover:text-red-700", onClick: () => handleDeleteCustomDomain(currentDomain.id), disabled: deletingDomainId === currentDomain.id, children: deletingDomainId === currentDomain.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" })) : (t('advancedCustomDomain.delete')) })] })] }), jsx("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: jsxs("div", { className: "flex items-start gap-2", children: [jsx("div", { className: "w-5 h-5 bg-blue-500 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5", children: jsx("span", { className: "text-white text-xs", children: "i" }) }), jsxs("div", { className: "space-y-2", children: [jsx("h4", { className: "font-medium text-blue-900", children: t('advancedCustomDomain.domainVerificationHeading') }), jsx("p", { className: "text-sm text-blue-800", children: t('advancedCustomDomain.domainVerificationInstruction') })] })] }) }), jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "flex items-center justify-between", children: jsx("h5", { children: t('advancedCustomDomain.domainRecords') }) }), jsx("div", { className: "", children: jsxs(Table$1, { children: [jsx(TableHeader$1, { children: jsxs(TableRow$1, { children: [jsx(TableHead, { className: "w-[100px]", children: t('advancedCustomDomain.tableType') }), jsx(TableHead, { children: t('advancedCustomDomain.tableNameHost') }), jsx(TableHead, { children: t('advancedCustomDomain.tableValue') }), jsx(TableHead, { className: "w-[100px]", children: t('advancedCustomDomain.tableStatus') })] }) }), jsx(TableBody, { children: jsxs(TableRow$1, { children: [jsx(TableCell$1, { className: "text-sm", children: "CNAME" }), jsx(TableCell$1, { children: jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm", children: currentDomain.custom_domain }), jsx(Button$1, { type: "button", variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0", onClick: () => handleCopyField(currentDomain.custom_domain, 'name'), "aria-label": t('advancedCustomDomain.copyNameHostAriaLabel', {
229421
- domain: currentDomain.custom_domain,
229422
- }), children: copiedField === 'name' ? (jsx(Check, { className: "h-4 w-4 text-blue-600", "aria-hidden": "true" })) : (jsx(Copy, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) }), jsx(TableCell$1, { children: jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm", children: sslValue }), jsx(Button$1, { type: "button", variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0", onClick: () => handleCopyField(sslValue, 'value'), "aria-label": t('advancedCustomDomain.copyValueAriaLabel'), children: copiedField === 'value' ? (jsx(Check, { className: "h-4 w-4 text-blue-600", "aria-hidden": "true" })) : (jsx(Copy, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) }), jsx(TableCell$1, { children: isVerifying ? (jsxs("span", { className: "px-2 py-1 text-xs bg-gray-100 text-gray-600 rounded flex items-center gap-1 w-fit", children: [jsx(LoaderCircle, { className: "h-3 w-3 animate-spin" }), t('advancedCustomDomain.verifying')] })) : isVerified ? (jsx("span", { className: "px-2 py-1 text-xs bg-green-100 text-green-800 rounded", children: t('advancedCustomDomain.verified') })) : !currentDomain.registered_with_dns_pro ? (jsx("span", { className: "px-2 py-1 text-xs bg-yellow-100 text-yellow-800 rounded", children: t('advancedCustomDomain.unregistered') })) : isVerified === false ? (jsxs(Button$1, { variant: "outline", size: "sm", onClick: () => verifyCustomDomain(currentDomain.custom_domain), disabled: isVerifying, className: "h-7 text-xs", children: [jsx(RefreshCw, { className: "h-3 w-3 mr-1" }), t('advancedCustomDomain.retry')] })) : null })] }) })] }) })] })] })) : (jsx("div", { className: "p-4 text-sm text-gray-500 text-center", children: t('advancedCustomDomain.noDomainConfigured') })) }))] }));
229880
+ : t('advancedCustomDomain.collapseAriaLabel'), type: "button", children: isCollapsed ? (jsx(ChevronDown, { className: "h-5 w-5 text-gray-400", "aria-hidden": "true" })) : (jsx(ChevronUp, { className: "h-5 w-5 text-gray-400", "aria-hidden": "true" })) })] })] }), !isCollapsed && (jsx("div", { className: "mt-4", children: isLoading ? (jsx("div", { className: "p-4 text-gray-500", children: t('advancedCustomDomain.loading') })) : customDomains.length > 0 ? (jsx("div", { className: "space-y-3", children: sortedDomains.map((row) => (jsx(DomainRow, { row: row, sslValue: sslValue, onReverify: handleReverify, onRemove: handleRemove, isBusy: busyDomainId === row.id, onStatusChange: handleStatusChange }, row.id))) })) : (jsx("div", { className: "p-4 text-center text-sm text-gray-500", children: t('advancedCustomDomain.noDomainConfigured') })) })), jsx(AddDomainDialog, { open: isModalOpen, onOpenChange: setIsModalOpen, canAddPlatformDomain: canAddPlatformDomain, projects: (_a = projectData === null || projectData === void 0 ? void 0 : projectData.projects) !== null && _a !== void 0 ? _a : [], isLoadingProjects: isLoadingProjects, isSubmitting: isCreating || isAttaching, onSubmitPlatformDomain: handleAddPlatformDomain, onSubmitAppDomain: handleAddAppDomain })] }));
229423
229881
  };
229424
229882
 
229425
229883
  const StudentMentorCreationContent = ({ platformKey, }) => {
@@ -231090,7 +231548,7 @@ function AdvancedTab({ platformKey, username, currentSPA, authURL, currentPlatfo
231090
231548
  await handleToggleSetting(metadataItem.slug, currentValue);
231091
231549
  }, disabled: isUpdatingTenantMetadata, "aria-label": `${metadataItem.label} ${currentValue ? t('advancedAdvanced.enabled') : t('advancedAdvanced.disabled')}`, className: "cursor-pointer data-[state=checked]:bg-blue-500" }), isUpdatingTenantMetadata && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] })) })] }, metadataItem.slug));
231092
231550
  }) })] }, spa)));
231093
- })()), jsx(StartScreenContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(ContentViewWrapper, { currentSPA: currentSPA, spas: ['mentor'], children: jsx(ChatAreaWidth, { chatAreaSize: metadata === null || metadata === void 0 ? void 0 : metadata.chat_area_size, isUpdating: isUpdatingTenantMetadata, onUpdate: handleChatAreaSizeUpdate, onError: handleChatAreaSizeError }) }), jsx(AuthSpaCustomizationContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(AdvancedCssContent, { platformKey: platformKey, currentSPA: currentSPA || '' }), jsx(RecommendationSystemPromptsContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(StudentMentorCreationContent, { platformKey: platformKey }), jsx(ChatPrivacyContent, { platformKey: platformKey, username: username }), jsx(MemsearchConfigContent, { platformKey: platformKey, userId: username }), jsx(PlatformMembershipContent, { platformKey: platformKey, authURL: authURL }), jsx(CustomDomainsContent, { platformKey: platformKey, currentSPA: currentSPA || '', currentPlatformBaseDomain: currentPlatformBaseDomain || '' }), jsx(SmtpContent, { platformKey: platformKey }), (currentSPA === null || currentSPA === void 0 ? void 0 : currentSPA.includes('skills')) && (jsxs(Fragment$1, { children: [jsx(ProviderConfigContent, { platformKey: platformKey, username: username }), jsx(ExternalMappingContent, { platformKey: platformKey, username: username })] }))] }) }));
231551
+ })()), jsx(StartScreenContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(ContentViewWrapper, { currentSPA: currentSPA, spas: ['mentor'], children: jsx(ChatAreaWidth, { chatAreaSize: metadata === null || metadata === void 0 ? void 0 : metadata.chat_area_size, isUpdating: isUpdatingTenantMetadata, onUpdate: handleChatAreaSizeUpdate, onError: handleChatAreaSizeError }) }), jsx(AuthSpaCustomizationContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(AdvancedCssContent, { platformKey: platformKey, currentSPA: currentSPA || '' }), jsx(RecommendationSystemPromptsContent, { platformKey: platformKey, currentSPA: currentSPA }), jsx(StudentMentorCreationContent, { platformKey: platformKey }), jsx(ChatPrivacyContent, { platformKey: platformKey, username: username }), jsx(MemsearchConfigContent, { platformKey: platformKey, userId: username }), jsx(PlatformMembershipContent, { platformKey: platformKey, authURL: authURL }), jsx(CustomDomainsContent, { platformKey: platformKey, username: username, currentSPA: currentSPA || '', currentPlatformBaseDomain: currentPlatformBaseDomain || '' }), jsx(SmtpContent, { platformKey: platformKey }), (currentSPA === null || currentSPA === void 0 ? void 0 : currentSPA.includes('skills')) && (jsxs(Fragment$1, { children: [jsx(ProviderConfigContent, { platformKey: platformKey, username: username }), jsx(ExternalMappingContent, { platformKey: platformKey, username: username })] }))] }) }));
231094
231552
  }
231095
231553
 
231096
231554
  function StripeConnect({ platformKey }) {
@@ -259491,173 +259949,6 @@ function TenantSwitcher({ currentTenantKey, tenants, visitingTenant, onTenantCha
259491
259949
  tenantList.map((tenant) => (jsx(SelectItem, { value: tenant === null || tenant === void 0 ? void 0 : tenant.key, children: (tenant === null || tenant === void 0 ? void 0 : tenant.name) || (tenant === null || tenant === void 0 ? void 0 : tenant.key) }, tenant === null || tenant === void 0 ? void 0 : tenant.key))) })] }))] }) }));
259492
259950
  }
259493
259951
 
259494
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
259495
- // @__NO_SIDE_EFFECTS__
259496
- function createSlottable(ownerName) {
259497
- const Slottable2 = ({ children }) => {
259498
- return /* @__PURE__ */ jsx(Fragment$1, { children });
259499
- };
259500
- Slottable2.displayName = `${ownerName}.Slottable`;
259501
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
259502
- return Slottable2;
259503
- }
259504
-
259505
- var ROOT_NAME = "AlertDialog";
259506
- var [createAlertDialogContext] = createContextScope$1(ROOT_NAME, [
259507
- createDialogScope
259508
- ]);
259509
- var useDialogScope = createDialogScope();
259510
- var AlertDialog$1 = (props) => {
259511
- const { __scopeAlertDialog, ...alertDialogProps } = props;
259512
- const dialogScope = useDialogScope(__scopeAlertDialog);
259513
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });
259514
- };
259515
- AlertDialog$1.displayName = ROOT_NAME;
259516
- var TRIGGER_NAME$1 = "AlertDialogTrigger";
259517
- var AlertDialogTrigger = React.forwardRef(
259518
- (props, forwardedRef) => {
259519
- const { __scopeAlertDialog, ...triggerProps } = props;
259520
- const dialogScope = useDialogScope(__scopeAlertDialog);
259521
- return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
259522
- }
259523
- );
259524
- AlertDialogTrigger.displayName = TRIGGER_NAME$1;
259525
- var PORTAL_NAME$1 = "AlertDialogPortal";
259526
- var AlertDialogPortal$1 = (props) => {
259527
- const { __scopeAlertDialog, ...portalProps } = props;
259528
- const dialogScope = useDialogScope(__scopeAlertDialog);
259529
- return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });
259530
- };
259531
- AlertDialogPortal$1.displayName = PORTAL_NAME$1;
259532
- var OVERLAY_NAME = "AlertDialogOverlay";
259533
- var AlertDialogOverlay$1 = React.forwardRef(
259534
- (props, forwardedRef) => {
259535
- const { __scopeAlertDialog, ...overlayProps } = props;
259536
- const dialogScope = useDialogScope(__scopeAlertDialog);
259537
- return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
259538
- }
259539
- );
259540
- AlertDialogOverlay$1.displayName = OVERLAY_NAME;
259541
- var CONTENT_NAME$2 = "AlertDialogContent";
259542
- var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME$2);
259543
- var Slottable = createSlottable("AlertDialogContent");
259544
- var AlertDialogContent$1 = React.forwardRef(
259545
- (props, forwardedRef) => {
259546
- const { __scopeAlertDialog, children, ...contentProps } = props;
259547
- const dialogScope = useDialogScope(__scopeAlertDialog);
259548
- const contentRef = React.useRef(null);
259549
- const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
259550
- const cancelRef = React.useRef(null);
259551
- return /* @__PURE__ */ jsx(
259552
- DialogPrimitive.WarningProvider,
259553
- {
259554
- contentName: CONTENT_NAME$2,
259555
- titleName: TITLE_NAME,
259556
- docsSlug: "alert-dialog",
259557
- children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(
259558
- DialogPrimitive.Content,
259559
- {
259560
- role: "alertdialog",
259561
- ...dialogScope,
259562
- ...contentProps,
259563
- ref: composedRefs,
259564
- onOpenAutoFocus: composeEventHandlers$2(contentProps.onOpenAutoFocus, (event) => {
259565
- event.preventDefault();
259566
- cancelRef.current?.focus({ preventScroll: true });
259567
- }),
259568
- onPointerDownOutside: (event) => event.preventDefault(),
259569
- onInteractOutside: (event) => event.preventDefault(),
259570
- children: [
259571
- /* @__PURE__ */ jsx(Slottable, { children }),
259572
- /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })
259573
- ]
259574
- }
259575
- ) })
259576
- }
259577
- );
259578
- }
259579
- );
259580
- AlertDialogContent$1.displayName = CONTENT_NAME$2;
259581
- var TITLE_NAME = "AlertDialogTitle";
259582
- var AlertDialogTitle$1 = React.forwardRef(
259583
- (props, forwardedRef) => {
259584
- const { __scopeAlertDialog, ...titleProps } = props;
259585
- const dialogScope = useDialogScope(__scopeAlertDialog);
259586
- return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
259587
- }
259588
- );
259589
- AlertDialogTitle$1.displayName = TITLE_NAME;
259590
- var DESCRIPTION_NAME = "AlertDialogDescription";
259591
- var AlertDialogDescription$1 = React.forwardRef((props, forwardedRef) => {
259592
- const { __scopeAlertDialog, ...descriptionProps } = props;
259593
- const dialogScope = useDialogScope(__scopeAlertDialog);
259594
- return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
259595
- });
259596
- AlertDialogDescription$1.displayName = DESCRIPTION_NAME;
259597
- var ACTION_NAME = "AlertDialogAction";
259598
- var AlertDialogAction$1 = React.forwardRef(
259599
- (props, forwardedRef) => {
259600
- const { __scopeAlertDialog, ...actionProps } = props;
259601
- const dialogScope = useDialogScope(__scopeAlertDialog);
259602
- return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
259603
- }
259604
- );
259605
- AlertDialogAction$1.displayName = ACTION_NAME;
259606
- var CANCEL_NAME = "AlertDialogCancel";
259607
- var AlertDialogCancel$1 = React.forwardRef(
259608
- (props, forwardedRef) => {
259609
- const { __scopeAlertDialog, ...cancelProps } = props;
259610
- const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
259611
- const dialogScope = useDialogScope(__scopeAlertDialog);
259612
- const ref = useComposedRefs$1(forwardedRef, cancelRef);
259613
- return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });
259614
- }
259615
- );
259616
- AlertDialogCancel$1.displayName = CANCEL_NAME;
259617
- var DescriptionWarning = ({ contentRef }) => {
259618
- const MESSAGE = `\`${CONTENT_NAME$2}\` requires a description for the component to be accessible for screen reader users.
259619
-
259620
- You can add a description to the \`${CONTENT_NAME$2}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
259621
-
259622
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME$2}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
259623
-
259624
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
259625
- React.useEffect(() => {
259626
- const hasDescription = document.getElementById(
259627
- contentRef.current?.getAttribute("aria-describedby")
259628
- );
259629
- if (!hasDescription) console.warn(MESSAGE);
259630
- }, [MESSAGE, contentRef]);
259631
- return null;
259632
- };
259633
- var Root2$2 = AlertDialog$1;
259634
- var Portal2 = AlertDialogPortal$1;
259635
- var Overlay2 = AlertDialogOverlay$1;
259636
- var Content2$1 = AlertDialogContent$1;
259637
- var Action = AlertDialogAction$1;
259638
- var Cancel = AlertDialogCancel$1;
259639
- var Title2 = AlertDialogTitle$1;
259640
- var Description2 = AlertDialogDescription$1;
259641
-
259642
- const AlertDialog = Root2$2;
259643
- const AlertDialogPortal = Portal2;
259644
- const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (jsx(Overlay2, { className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80', className), ...props, ref: ref })));
259645
- AlertDialogOverlay.displayName = Overlay2.displayName;
259646
- const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (jsxs(AlertDialogPortal, { children: [jsx(AlertDialogOverlay, {}), jsx(Content2$1, { ref: ref, className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg', className), ...props })] })));
259647
- AlertDialogContent.displayName = Content2$1.displayName;
259648
- const AlertDialogHeader = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col space-y-2 text-center sm:text-left', className), ...props }));
259649
- AlertDialogHeader.displayName = 'AlertDialogHeader';
259650
- const AlertDialogFooter = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
259651
- AlertDialogFooter.displayName = 'AlertDialogFooter';
259652
- const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (jsx(Title2, { ref: ref, className: cn('text-lg font-semibold', className), ...props })));
259653
- AlertDialogTitle.displayName = Title2.displayName;
259654
- const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (jsx(Description2, { ref: ref, className: cn('text-muted-foreground text-sm', className), ...props })));
259655
- AlertDialogDescription.displayName = Description2.displayName;
259656
- const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (jsx(Action, { ref: ref, className: cn(buttonVariants(), className), ...props })));
259657
- AlertDialogAction.displayName = Action.displayName;
259658
- const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (jsx(Cancel, { ref: ref, className: cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className), ...props })));
259659
- AlertDialogCancel.displayName = Cancel.displayName;
259660
-
259661
259952
  // Notification bodies are arbitrary (often email) HTML: long unbroken URLs and
259662
259953
  // fixed-width tables would otherwise bleed out of the panel. Break long words,
259663
259954
  // cap every descendant at the container width, and let anything that still