@iblai/iblai-js 2.19.1 → 2.21.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.
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useRef, useEffect, useMemo, useCallback, useState, createContext, useContext, forwardRef, createElement as createElement$1, useLayoutEffect, useReducer, useImperativeHandle, isValidElement, Children, PureComponent, cloneElement, Component, Fragment as Fragment$2, useId as useId$2, useDebugValue, lazy, Suspense } from 'react';
3
3
  import * as dataLayer from '@iblai/data-layer';
4
- import { useGetLlmsQuery, useCreateSessionIdMutation, useTimeTrackingMutation, 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, 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, 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, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, USER_PROGRESS_DATA_POINTS, useResetTemplateMutation, useSendTestTemplateEmailMutation, useUpdateTemplateMutation, useGetTemplateDetailsQuery, USER_PROGRESS_SUMMARY_TYPE, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetLlmUsageTracesQuery, useGetLlmUsageObservationsQuery, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetAverageRatingQuery, useGetModelCostsQuery, useGetPerUserCostsQuery, useGetTenantCostQuery, useGetAgentCostQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetPlatformAuditLogsQuery, PLATFORM_AUDIT_EVENT_TYPES, PLATFORM_AUDIT_ACTION_CODES, useGetMentorMemoriesQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useLazyGetPersonnalizedSearchQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
4
+ import { useGetLlmsQuery, useCreateSessionIdMutation, useTimeTrackingMutation, 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, 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, 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, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, USER_PROGRESS_DATA_POINTS, useResetTemplateMutation, useSendTestTemplateEmailMutation, useUpdateTemplateMutation, useGetTemplateDetailsQuery, USER_PROGRESS_SUMMARY_TYPE, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetLlmUsageTracesQuery, useGetLlmUsageObservationsQuery, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetAverageRatingQuery, useGetModelCostsQuery, useGetPerUserCostsQuery, useGetTenantCostQuery, useGetAgentCostQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetPlatformAuditLogsQuery, PLATFORM_AUDIT_EVENT_TYPES, PLATFORM_AUDIT_ACTION_CODES, useGetMentorMemoriesQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useLazyGetPersonnalizedSearchQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
5
5
  import { useDispatch, useSelector } from 'react-redux';
6
6
  import { selectSessionId, selectActiveChatMessages, useCachedSessionId, chatActions, LOCAL_STORAGE_KEYS, TimeTracker, selectRbacPermissions, useCurrentTenant, canViewOtherUsersChatHistory, isPureWatcher, getInitials, useTenantMetadata, useUsername, selectStreaming, isLoggedIn, TOOL_NAME_MAP, WRITE_TODOS_TOOL, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, getVisibleAnalyticsTabs, getUserName as getUserName$2, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, WATCHER_HIDDEN_REPORTS, canViewPlatformAuditLogs, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl, useOS, selectNumberOfActiveChatMessages, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, chatInputSliceActions, removeFile, WithFormPermissions, MENTOR_VISIBILITY } from '@iblai/web-utils';
7
7
  import { toast } from 'sonner';
@@ -1776,37 +1776,58 @@ var advancedChatPrivacy$3 = {
1776
1776
  switchAriaDisabled: "User chat privacy control disabled"
1777
1777
  };
1778
1778
  var advancedCustomDomain$3 = {
1779
- dnsConfiguration: "DNS Configuration",
1779
+ dnsConfiguration: "Domains",
1780
1780
  add: "Add",
1781
- dialogTitle: "Your custom domain",
1782
- verificationNecessary: "Domain verification is necessary after making changes",
1783
- customDomainLabel: "Custom Domain",
1781
+ dialogTitle: "Add a domain",
1782
+ dialogDescription: "Point a domain you own at this organization’s sign-in site or at one of your deployed apps.",
1783
+ kindLabel: "What is this domain for?",
1784
+ kindPlatform: "Sign-in site",
1785
+ kindApp: "Deployed app",
1786
+ projectLabel: "App",
1787
+ projectPlaceholder: "Choose an app",
1788
+ noProjects: "You have not deployed any apps yet. Deploy one first, then come back to give it a domain.",
1789
+ customDomainLabel: "Domain",
1790
+ domainHelpPlatform: "Without the scheme or a leading “www.” — for example, app.example.com.",
1791
+ domainHelpApp: "Leave this empty and a subdomain will be assigned to the app for you, with no DNS records to set.",
1784
1792
  cancel: "Cancel",
1785
1793
  save: "Save",
1786
- expandAriaLabel: "Expand custom domain",
1787
- collapseAriaLabel: "Collapse custom domain",
1788
- loading: "Loading custom domain...",
1789
- verifying: "Verifying...",
1790
- verified: "Verified",
1791
- unregistered: "Unregistered",
1792
- notVerified: "Not Verified",
1793
- retry: "Retry",
1794
+ expandAriaLabel: "Expand domains",
1795
+ collapseAriaLabel: "Collapse domains",
1796
+ loading: "Loading domains…",
1797
+ verifying: "Checking…",
1798
+ reverify: "Check again",
1799
+ reverifyAriaLabel: "Check {domain} again",
1800
+ removeAriaLabel: "Remove {domain}",
1794
1801
  "delete": "Delete",
1795
- domainVerificationHeading: "Domain verification",
1796
- 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).",
1797
- domainRecords: "Domain records",
1802
+ detach: "Detach",
1803
+ statusVerified: "Verified",
1804
+ statusUnverified: "Verification required",
1805
+ statusUnregistered: "Not registered",
1806
+ statusUnknown: "Could not check",
1798
1807
  tableType: "Type",
1799
1808
  tableNameHost: "Name/Host",
1800
1809
  tableValue: "Value",
1801
- tableStatus: "Status",
1802
1810
  copyNameHostAriaLabel: "Copy name/host: {domain}",
1803
1811
  copyValueAriaLabel: "Copy value/target",
1804
- noDomainConfigured: "No custom domain configured for this application.",
1805
- deleteSuccess: "Custom domain deleted successfully",
1806
- deleteError: "Failed to delete custom domain",
1807
- pleaseEnterDomain: "Please enter a custom domain",
1808
- createSuccess: "Custom domain created successfully",
1809
- createError: "Failed to create custom domain",
1812
+ noRecordsYet: "No records yet. Check the domain again to fetch them.",
1813
+ confirmRemoveTitle: "Remove this domain?",
1814
+ confirmDeleteBody: "{domain} will stop signing users in to this organization.",
1815
+ confirmDetachBody: "{domain} will stop serving the app, here and at the hosting provider.",
1816
+ noDomainConfigured: "No domains yet.",
1817
+ deleteSuccess: "Domain removed",
1818
+ deleteError: "The domain could not be removed",
1819
+ pleaseEnterDomain: "Enter a domain",
1820
+ createSuccess: "Domain added",
1821
+ createError: "The domain could not be added",
1822
+ verifySuccess: "The domain is verified and serving",
1823
+ verifyPending: "The records are not visible yet. Add them at your registrar and check again.",
1824
+ verifyError: "The domain could not be checked",
1825
+ verifyUnavailable: "The domain could not be checked from this browser",
1826
+ errorRefused: "This domain cannot be used here",
1827
+ errorForbidden: "Domains are managed by an organization admin",
1828
+ errorRateLimited: "Too many requests — try again shortly",
1829
+ errorUpstream: "The hosting provider rejected this organization’s credential",
1830
+ errorUnavailable: "This is not available on this instance yet",
1810
1831
  copiedToClipboard: "Copied to clipboard",
1811
1832
  unableToCopy: "Unable to copy"
1812
1833
  };
@@ -3895,6 +3916,7 @@ var disclaimersTabLabels$3 = {
3895
3916
  title: "Disclaimers",
3896
3917
  description: "Configure disclaimer settings for your agent."
3897
3918
  },
3919
+ infoBox: "Show your users the fine print. Add notices — like 'This is an AI assistant' or a compliance statement — that appear in the chat so people know what to expect.",
3898
3920
  userAgreement: {
3899
3921
  title: "User Agreement",
3900
3922
  tooltip: "Controls User Agreement",
@@ -3915,7 +3937,8 @@ var disclaimersTabLabels$3 = {
3915
3937
  edit: "Edit",
3916
3938
  save: "Save",
3917
3939
  saving: "Saving...",
3918
- cancel: "Cancel"
3940
+ cancel: "Cancel",
3941
+ viewAgreements: "View Agreements"
3919
3942
  },
3920
3943
  toasts: {
3921
3944
  advisorySuccess: "Agent updated successfully",
@@ -3925,6 +3948,20 @@ var disclaimersTabLabels$3 = {
3925
3948
  userAgreementEnabled: "User agreement enabled successfully",
3926
3949
  userAgreementDisabled: "User agreement disabled successfully",
3927
3950
  toggleError: "Failed to update user agreement"
3951
+ },
3952
+ agreements: {
3953
+ title: "Agreements",
3954
+ dialogDescription: "Users who have accepted this agent's User Agreement.",
3955
+ totalAgreements: "{count} Total Agreements",
3956
+ summaryDescription: "Review the users who have accepted this agent's User Agreement. Each entry shows the user's name, email and when they agreed. Users who haven't accepted yet aren't listed. Search matches the exact username.",
3957
+ searchPlaceholder: "Search by username",
3958
+ searchAriaLabel: "Search agreements by username",
3959
+ columnUser: "User",
3960
+ columnAgreedAt: "Agreed at",
3961
+ empty: "No agreements yet",
3962
+ emptyDescription: "Users who accept the User Agreement will appear here with the time they agreed.",
3963
+ noMatches: "No users match your search",
3964
+ noMatchesDescription: "Search matches the exact username — try the full username."
3928
3965
  }
3929
3966
  };
3930
3967
  var documentSidebar$3 = {
@@ -9060,39 +9097,60 @@ var advancedChatPrivacy$2 = {
9060
9097
  switchAriaDisabled: "Contrôle de la confidentialité du chat désactivé"
9061
9098
  };
9062
9099
  var advancedCustomDomain$2 = {
9063
- dnsConfiguration: "Configuration DNS",
9100
+ dnsConfiguration: "Domaines",
9064
9101
  add: "Ajouter",
9065
- dialogTitle: "Votre domaine personnalisé",
9066
- verificationNecessary: "La vérification du domaine est nécessaire après toute modification",
9067
- customDomainLabel: "Domaine personnalisé",
9102
+ dialogTitle: "Ajouter un domaine",
9103
+ 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.",
9104
+ kindLabel: "À quoi sert ce domaine ?",
9105
+ kindPlatform: "Site de connexion",
9106
+ kindApp: "Application déployée",
9107
+ projectLabel: "Application",
9108
+ projectPlaceholder: "Choisissez une application",
9109
+ noProjects: "Vous n’avez encore déployé aucune application. Déployez-en une, puis revenez lui donner un domaine.",
9110
+ customDomainLabel: "Domaine",
9111
+ domainHelpPlatform: "Sans le schéma ni un « www. » en tête — par exemple, app.example.com.",
9112
+ domainHelpApp: "Laissez ce champ vide et un sous-domaine sera attribué à l’application, sans aucun enregistrement DNS à créer.",
9068
9113
  cancel: "Annuler",
9069
9114
  save: "Enregistrer",
9070
- expandAriaLabel: "Développer le domaine personnalisé",
9071
- collapseAriaLabel: "Réduire le domaine personnalisé",
9072
- loading: "Chargement du domaine personnalisé...",
9073
- verifying: "Vérification...",
9074
- verified: "Vérifié",
9075
- unregistered: "Non enregistré",
9076
- notVerified: "Non vérifié",
9077
- retry: "Réessayer",
9115
+ expandAriaLabel: "Déplier les domaines",
9116
+ collapseAriaLabel: "Replier les domaines",
9117
+ loading: "Chargement des domaines…",
9118
+ verifying: "Vérification…",
9119
+ reverify: "Vérifier à nouveau",
9120
+ reverifyAriaLabel: "Vérifier à nouveau {domain}",
9121
+ removeAriaLabel: "Supprimer {domain}",
9078
9122
  "delete": "Supprimer",
9079
- domainVerificationHeading: "Vérification du domaine",
9080
- 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).",
9081
- domainRecords: "Enregistrements de domaine",
9123
+ detach: "Détacher",
9124
+ statusVerified: "Vérifié",
9125
+ statusUnverified: "Vérification requise",
9126
+ statusUnregistered: "Non enregistré",
9127
+ statusUnknown: "Vérification impossible",
9082
9128
  tableType: "Type",
9083
9129
  tableNameHost: "Nom/Hôte",
9084
9130
  tableValue: "Valeur",
9085
- tableStatus: "Statut",
9086
9131
  copyNameHostAriaLabel: "Copier le nom/hôte : {domain}",
9087
9132
  copyValueAriaLabel: "Copier la valeur/cible",
9088
- noDomainConfigured: "Aucun domaine personnalisé configuré pour cette application.",
9089
- deleteSuccess: "Domaine personnalisé supprimé avec succès",
9090
- deleteError: "Échec de la suppression du domaine personnalisé",
9091
- pleaseEnterDomain: "Veuillez saisir un domaine personnalisé",
9092
- createSuccess: "Domaine personnalisé créé avec succès",
9093
- createError: "Échec de la création du domaine personnalisé",
9133
+ noRecordsYet: "Aucun enregistrement pour l’instant. Vérifiez le domaine à nouveau pour les obtenir.",
9134
+ confirmRemoveTitle: "Supprimer ce domaine ?",
9135
+ confirmDeleteBody: "{domain} ne permettra plus de se connecter à cette organisation.",
9136
+ confirmDetachBody: "{domain} cessera de servir l’application, ici comme chez l’hébergeur.",
9137
+ noDomainConfigured: "Aucun domaine pour l’instant.",
9138
+ deleteSuccess: "Domaine supprimé",
9139
+ deleteError: "Le domaine n’a pas pu être supprimé",
9140
+ pleaseEnterDomain: "Saisissez un domaine",
9141
+ createSuccess: "Domaine ajouté",
9142
+ createError: "Le domaine n’a pas pu être ajouté",
9143
+ verifySuccess: "Le domaine est vérifié et sert l’application",
9144
+ verifyPending: "Les enregistrements ne sont pas encore visibles. Ajoutez-les chez votre registraire puis vérifiez à nouveau.",
9145
+ verifyError: "Le domaine n’a pas pu être vérifié",
9146
+ verifyUnavailable: "Le domaine n’a pas pu être vérifié depuis ce navigateur",
9147
+ errorRefused: "Ce domaine ne peut pas être utilisé ici",
9148
+ errorForbidden: "Les domaines sont gérés par un administrateur de l’organisation",
9149
+ errorRateLimited: "Trop de requêtes — réessayez dans un instant",
9150
+ errorUpstream: "L’hébergeur a rejeté l’identifiant de cette organisation",
9151
+ errorUnavailable: "Ce n’est pas encore disponible sur cette instance",
9094
9152
  copiedToClipboard: "Copié dans le presse-papiers",
9095
- unableToCopy: "Impossible de copier"
9153
+ unableToCopy: "Copie impossible"
9096
9154
  };
9097
9155
  var advancedExternalMapping$2 = {
9098
9156
  regionAriaLabel: "Correspondance d'identifiants externes",
@@ -11345,6 +11403,7 @@ var disclaimersTabLabels$2 = {
11345
11403
  title: "Avertissements",
11346
11404
  description: "Configurez les paramètres d'avertissement pour votre agent."
11347
11405
  },
11406
+ infoBox: "Affichez les mentions légales à vos utilisateurs. Ajoutez des avis — comme « Ceci est un assistant IA » ou une déclaration de conformité — qui apparaissent dans la conversation pour que les gens sachent à quoi s'attendre.",
11348
11407
  userAgreement: {
11349
11408
  title: "Accord utilisateur",
11350
11409
  tooltip: "Contrôle l'accord utilisateur",
@@ -11365,7 +11424,8 @@ var disclaimersTabLabels$2 = {
11365
11424
  edit: "Modifier",
11366
11425
  save: "Enregistrer",
11367
11426
  saving: "Enregistrement...",
11368
- cancel: "Annuler"
11427
+ cancel: "Annuler",
11428
+ viewAgreements: "Voir les acceptations"
11369
11429
  },
11370
11430
  toasts: {
11371
11431
  advisorySuccess: "Agent mis à jour avec succès",
@@ -11375,6 +11435,20 @@ var disclaimersTabLabels$2 = {
11375
11435
  userAgreementEnabled: "Accord utilisateur activé avec succès",
11376
11436
  userAgreementDisabled: "Accord utilisateur désactivé avec succès",
11377
11437
  toggleError: "Échec de la mise à jour de l'accord utilisateur"
11438
+ },
11439
+ agreements: {
11440
+ title: "Acceptations",
11441
+ dialogDescription: "Utilisateurs ayant accepté l'Accord utilisateur de cet agent.",
11442
+ totalAgreements: "{count} acceptations au total",
11443
+ summaryDescription: "Consultez les utilisateurs ayant accepté l'Accord utilisateur de cet agent. Chaque entrée indique le nom et l'e-mail de l'utilisateur ainsi que la date de son acceptation. Les utilisateurs qui ne l'ont pas encore accepté n'apparaissent pas. La recherche correspond au nom d'utilisateur exact.",
11444
+ searchPlaceholder: "Rechercher par nom d'utilisateur",
11445
+ searchAriaLabel: "Rechercher les acceptations par nom d'utilisateur",
11446
+ columnUser: "Utilisateur",
11447
+ columnAgreedAt: "Accepté le",
11448
+ empty: "Aucune acceptation pour le moment",
11449
+ emptyDescription: "Les utilisateurs qui acceptent l'Accord utilisateur apparaîtront ici avec l'heure de leur acceptation.",
11450
+ noMatches: "Aucun utilisateur ne correspond à votre recherche",
11451
+ noMatchesDescription: "La recherche correspond au nom d'utilisateur exact : essayez le nom d'utilisateur complet."
11378
11452
  }
11379
11453
  };
11380
11454
  var documentSidebar$2 = {
@@ -16344,39 +16418,60 @@ var advancedChatPrivacy$1 = {
16344
16418
  switchAriaDisabled: "Control de privacidad del chat deshabilitado"
16345
16419
  };
16346
16420
  var advancedCustomDomain$1 = {
16347
- dnsConfiguration: "Configuración DNS",
16348
- add: "Agregar",
16349
- dialogTitle: "Tu dominio personalizado",
16350
- verificationNecessary: "La verificación del dominio es necesaria después de realizar cambios",
16351
- customDomainLabel: "Dominio personalizado",
16421
+ dnsConfiguration: "Dominios",
16422
+ add: "Añadir",
16423
+ dialogTitle: "Añadir un dominio",
16424
+ dialogDescription: "Dirige un dominio tuyo al sitio de inicio de sesión de esta organización o a una de tus aplicaciones desplegadas.",
16425
+ kindLabel: "¿Para qué es este dominio?",
16426
+ kindPlatform: "Sitio de inicio de sesión",
16427
+ kindApp: "Aplicación desplegada",
16428
+ projectLabel: "Aplicación",
16429
+ projectPlaceholder: "Elige una aplicación",
16430
+ noProjects: "Todavía no has desplegado ninguna aplicación. Despliega una primero y vuelve para darle un dominio.",
16431
+ customDomainLabel: "Dominio",
16432
+ domainHelpPlatform: "Sin el esquema ni un “www.” inicial — por ejemplo, app.example.com.",
16433
+ domainHelpApp: "Déjalo vacío y se asignará un subdominio a la aplicación, sin registros DNS que configurar.",
16352
16434
  cancel: "Cancelar",
16353
16435
  save: "Guardar",
16354
- expandAriaLabel: "Expandir dominio personalizado",
16355
- collapseAriaLabel: "Contraer dominio personalizado",
16356
- loading: "Cargando dominio personalizado...",
16357
- verifying: "Verificando...",
16358
- verified: "Verificado",
16359
- unregistered: "No registrado",
16360
- notVerified: "No verificado",
16361
- retry: "Reintentar",
16436
+ expandAriaLabel: "Expandir dominios",
16437
+ collapseAriaLabel: "Contraer dominios",
16438
+ loading: "Cargando dominios…",
16439
+ verifying: "Comprobando…",
16440
+ reverify: "Comprobar de nuevo",
16441
+ reverifyAriaLabel: "Comprobar {domain} de nuevo",
16442
+ removeAriaLabel: "Eliminar {domain}",
16362
16443
  "delete": "Eliminar",
16363
- domainVerificationHeading: "Verificación de dominio",
16364
- 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).",
16365
- domainRecords: "Registros de dominio",
16444
+ detach: "Desvincular",
16445
+ statusVerified: "Verificado",
16446
+ statusUnverified: "Verificación necesaria",
16447
+ statusUnregistered: "No registrado",
16448
+ statusUnknown: "No se pudo comprobar",
16366
16449
  tableType: "Tipo",
16367
16450
  tableNameHost: "Nombre/Host",
16368
16451
  tableValue: "Valor",
16369
- tableStatus: "Estado",
16370
16452
  copyNameHostAriaLabel: "Copiar nombre/host: {domain}",
16371
16453
  copyValueAriaLabel: "Copiar valor/destino",
16372
- noDomainConfigured: "No hay dominio personalizado configurado para esta aplicación.",
16373
- deleteSuccess: "Dominio personalizado eliminado correctamente",
16374
- deleteError: "Error al eliminar el dominio personalizado",
16375
- pleaseEnterDomain: "Por favor, introduce un dominio personalizado",
16376
- createSuccess: "Dominio personalizado creado correctamente",
16377
- createError: "Error al crear el dominio personalizado",
16454
+ noRecordsYet: "Aún no hay registros. Comprueba el dominio de nuevo para obtenerlos.",
16455
+ confirmRemoveTitle: "¿Eliminar este dominio?",
16456
+ confirmDeleteBody: "{domain} dejará de permitir el inicio de sesión en esta organización.",
16457
+ confirmDetachBody: "{domain} dejará de servir la aplicación, aquí y en el proveedor de alojamiento.",
16458
+ noDomainConfigured: "Todavía no hay dominios.",
16459
+ deleteSuccess: "Dominio eliminado",
16460
+ deleteError: "No se pudo eliminar el dominio",
16461
+ pleaseEnterDomain: "Introduce un dominio",
16462
+ createSuccess: "Dominio añadido",
16463
+ createError: "No se pudo añadir el dominio",
16464
+ verifySuccess: "El dominio está verificado y sirviendo",
16465
+ verifyPending: "Los registros aún no son visibles. Añádelos en tu registrador y comprueba de nuevo.",
16466
+ verifyError: "No se pudo comprobar el dominio",
16467
+ verifyUnavailable: "No se pudo comprobar el dominio desde este navegador",
16468
+ errorRefused: "Este dominio no se puede usar aquí",
16469
+ errorForbidden: "Los dominios los gestiona un administrador de la organización",
16470
+ errorRateLimited: "Demasiadas solicitudes: inténtalo de nuevo en breve",
16471
+ errorUpstream: "El proveedor de alojamiento rechazó la credencial de esta organización",
16472
+ errorUnavailable: "Esto todavía no está disponible en esta instancia",
16378
16473
  copiedToClipboard: "Copiado al portapapeles",
16379
- unableToCopy: "No se puede copiar"
16474
+ unableToCopy: "No se pudo copiar"
16380
16475
  };
16381
16476
  var advancedExternalMapping$1 = {
16382
16477
  regionAriaLabel: "Mapeo de credenciales externas",
@@ -18629,6 +18724,7 @@ var disclaimersTabLabels$1 = {
18629
18724
  title: "Avisos legales",
18630
18725
  description: "Configure los ajustes de aviso legal para su agente."
18631
18726
  },
18727
+ infoBox: "Muestra la letra pequeña a tus usuarios. Agrega avisos —como «Este es un asistente de IA» o una declaración de cumplimiento— que aparecen en el chat para que las personas sepan qué esperar.",
18632
18728
  userAgreement: {
18633
18729
  title: "Acuerdo de usuario",
18634
18730
  tooltip: "Controla el acuerdo de usuario",
@@ -18649,7 +18745,8 @@ var disclaimersTabLabels$1 = {
18649
18745
  edit: "Editar",
18650
18746
  save: "Guardar",
18651
18747
  saving: "Guardando...",
18652
- cancel: "Cancelar"
18748
+ cancel: "Cancelar",
18749
+ viewAgreements: "Ver aceptaciones"
18653
18750
  },
18654
18751
  toasts: {
18655
18752
  advisorySuccess: "Agente actualizado correctamente",
@@ -18659,6 +18756,20 @@ var disclaimersTabLabels$1 = {
18659
18756
  userAgreementEnabled: "Acuerdo de usuario habilitado correctamente",
18660
18757
  userAgreementDisabled: "Acuerdo de usuario deshabilitado correctamente",
18661
18758
  toggleError: "Error al actualizar el acuerdo de usuario"
18759
+ },
18760
+ agreements: {
18761
+ title: "Aceptaciones",
18762
+ dialogDescription: "Usuarios que han aceptado el Acuerdo de usuario de este agente.",
18763
+ totalAgreements: "{count} aceptaciones en total",
18764
+ summaryDescription: "Revisa los usuarios que han aceptado el Acuerdo de usuario de este agente. Cada entrada muestra el nombre y el correo electrónico del usuario y cuándo lo aceptó. Los usuarios que aún no lo han aceptado no aparecen. La búsqueda coincide con el nombre de usuario exacto.",
18765
+ searchPlaceholder: "Buscar por nombre de usuario",
18766
+ searchAriaLabel: "Buscar aceptaciones por nombre de usuario",
18767
+ columnUser: "Usuario",
18768
+ columnAgreedAt: "Aceptado el",
18769
+ empty: "Aún no hay aceptaciones",
18770
+ emptyDescription: "Los usuarios que acepten el Acuerdo de usuario aparecerán aquí con la hora en que lo aceptaron.",
18771
+ noMatches: "Ningún usuario coincide con tu búsqueda",
18772
+ noMatchesDescription: "La búsqueda coincide con el nombre de usuario exacto: prueba con el nombre de usuario completo."
18662
18773
  }
18663
18774
  };
18664
18775
  var documentSidebar$1 = {
@@ -23628,37 +23739,58 @@ var advancedChatPrivacy = {
23628
23739
  switchAriaDisabled: "用户聊天隐私控制已禁用"
23629
23740
  };
23630
23741
  var advancedCustomDomain = {
23631
- dnsConfiguration: "DNS 配置",
23742
+ dnsConfiguration: "域名",
23632
23743
  add: "添加",
23633
- dialogTitle: "您的自定义域名",
23634
- verificationNecessary: "更改后需要进行域名验证",
23635
- customDomainLabel: "自定义域名",
23744
+ dialogTitle: "添加域名",
23745
+ dialogDescription: "将你拥有的域名指向该组织的登录站点,或指向你已部署的某个应用。",
23746
+ kindLabel: "这个域名用于什么?",
23747
+ kindPlatform: "登录站点",
23748
+ kindApp: "已部署的应用",
23749
+ projectLabel: "应用",
23750
+ projectPlaceholder: "选择一个应用",
23751
+ noProjects: "你还没有部署任何应用。请先部署一个,然后回来为它设置域名。",
23752
+ customDomainLabel: "域名",
23753
+ domainHelpPlatform: "不要带协议前缀或开头的“www.”,例如 app.example.com。",
23754
+ domainHelpApp: "留空即可自动为该应用分配一个子域名,无需设置任何 DNS 记录。",
23636
23755
  cancel: "取消",
23637
23756
  save: "保存",
23638
- expandAriaLabel: "展开自定义域名",
23639
- collapseAriaLabel: "收起自定义域名",
23640
- loading: "正在加载自定义域名...",
23641
- verifying: "验证中...",
23642
- verified: "已验证",
23643
- unregistered: "未注册",
23644
- notVerified: "未验证",
23645
- retry: "重试",
23757
+ expandAriaLabel: "展开域名",
23758
+ collapseAriaLabel: "收起域名",
23759
+ loading: "正在加载域名…",
23760
+ verifying: "正在检查…",
23761
+ reverify: "重新检查",
23762
+ reverifyAriaLabel: "重新检查 {domain}",
23763
+ removeAriaLabel: "移除 {domain}",
23646
23764
  "delete": "删除",
23647
- domainVerificationHeading: "域名验证",
23648
- domainVerificationInstruction: "要验证您的域名所有权并使其指向您的应用程序,您需要在域名注册商(如 Namecheap、GoDaddy 或 Google Domains)处添加以下 DNS 记录。",
23649
- domainRecords: "域名记录",
23765
+ detach: "解除绑定",
23766
+ statusVerified: "已验证",
23767
+ statusUnverified: "需要验证",
23768
+ statusUnregistered: "未注册",
23769
+ statusUnknown: "无法检查",
23650
23770
  tableType: "类型",
23651
23771
  tableNameHost: "名称/主机",
23652
23772
  tableValue: "值",
23653
- tableStatus: "状态",
23654
23773
  copyNameHostAriaLabel: "复制名称/主机:{domain}",
23655
23774
  copyValueAriaLabel: "复制值/目标",
23656
- noDomainConfigured: "此应用程序未配置自定义域名。",
23657
- deleteSuccess: "自定义域名已成功删除",
23658
- deleteError: "删除自定义域名失败",
23659
- pleaseEnterDomain: "请输入自定义域名",
23660
- createSuccess: "自定义域名已成功创建",
23661
- createError: "创建自定义域名失败",
23775
+ noRecordsYet: "暂无记录。请重新检查该域名以获取记录。",
23776
+ confirmRemoveTitle: "要移除这个域名吗?",
23777
+ confirmDeleteBody: "{domain} 将不再用于登录该组织。",
23778
+ confirmDetachBody: "{domain} 将不再为该应用提供服务,本处和托管服务商处都会解除。",
23779
+ noDomainConfigured: "暂无域名。",
23780
+ deleteSuccess: "域名已移除",
23781
+ deleteError: "无法移除该域名",
23782
+ pleaseEnterDomain: "请输入域名",
23783
+ createSuccess: "域名已添加",
23784
+ createError: "无法添加该域名",
23785
+ verifySuccess: "域名已验证并正常服务",
23786
+ verifyPending: "记录尚未生效。请在域名注册商处添加后再检查。",
23787
+ verifyError: "无法检查该域名",
23788
+ verifyUnavailable: "无法从当前浏览器检查该域名",
23789
+ errorRefused: "该域名不能在此使用",
23790
+ errorForbidden: "域名由组织管理员管理",
23791
+ errorRateLimited: "请求过于频繁,请稍后再试",
23792
+ errorUpstream: "托管服务商拒绝了该组织的凭据",
23793
+ errorUnavailable: "此实例尚不支持该功能",
23662
23794
  copiedToClipboard: "已复制到剪贴板",
23663
23795
  unableToCopy: "无法复制"
23664
23796
  };
@@ -25913,6 +26045,7 @@ var disclaimersTabLabels = {
25913
26045
  title: "免责声明",
25914
26046
  description: "为您的智能体配置免责声明设置。"
25915
26047
  },
26048
+ infoBox: "向用户展示必要的声明。添加提示——例如“这是一个 AI 助手”或合规声明——它们会显示在对话中,让用户知道会得到什么。",
25916
26049
  userAgreement: {
25917
26050
  title: "用户协议",
25918
26051
  tooltip: "控制用户协议",
@@ -25933,7 +26066,8 @@ var disclaimersTabLabels = {
25933
26066
  edit: "编辑",
25934
26067
  save: "保存",
25935
26068
  saving: "保存中……",
25936
- cancel: "取消"
26069
+ cancel: "取消",
26070
+ viewAgreements: "查看同意记录"
25937
26071
  },
25938
26072
  toasts: {
25939
26073
  advisorySuccess: "智能体更新成功",
@@ -25943,6 +26077,20 @@ var disclaimersTabLabels = {
25943
26077
  userAgreementEnabled: "用户协议已成功启用",
25944
26078
  userAgreementDisabled: "用户协议已成功停用",
25945
26079
  toggleError: "更新用户协议失败"
26080
+ },
26081
+ agreements: {
26082
+ title: "同意记录",
26083
+ dialogDescription: "已接受此智能体用户协议的用户。",
26084
+ totalAgreements: "共 {count} 条同意记录",
26085
+ summaryDescription: "查看已接受此智能体用户协议的用户。每条记录显示用户的姓名、邮箱和同意时间。尚未接受的用户不会列出。搜索需与用户名完全匹配。",
26086
+ searchPlaceholder: "按用户名搜索",
26087
+ searchAriaLabel: "按用户名搜索同意记录",
26088
+ columnUser: "用户",
26089
+ columnAgreedAt: "同意时间",
26090
+ empty: "尚无同意记录",
26091
+ emptyDescription: "接受用户协议的用户将与其同意时间一起显示在此处。",
26092
+ noMatches: "没有匹配的用户",
26093
+ noMatchesDescription: "搜索需与用户名完全匹配,请尝试输入完整的用户名。"
25946
26094
  }
25947
26095
  };
25948
26096
  var documentSidebar = {
@@ -196797,6 +196945,325 @@ const PlatformMembershipContent = ({ platformKey, authURL, }) => {
196797
196945
  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" }))] })] }));
196798
196946
  };
196799
196947
 
196948
+ /**
196949
+ * Paste-tolerant: a copied address brings a scheme, a path and often a `www.`
196950
+ * with it, and a typed one may carry capitals. The backend takes only a
196951
+ * lowercase bare host and refuses anything else with a field error.
196952
+ */
196953
+ const sanitizeDomain = (domain) => domain
196954
+ .trim()
196955
+ .toLowerCase()
196956
+ .replace(/^https?:\/\//, '')
196957
+ .replace(/\/.*$/, '')
196958
+ .replace(/^www\./, '');
196959
+ const AddDomainDialog = ({ open, onOpenChange, canAddPlatformDomain, projects, isLoadingProjects, isSubmitting, onSubmitPlatformDomain, onSubmitAppDomain, }) => {
196960
+ const t = useT();
196961
+ const [mode, setMode] = useState(canAddPlatformDomain ? 'platform' : 'app');
196962
+ const [domainValue, setDomainValue] = useState('');
196963
+ const [projectId, setProjectId] = useState('');
196964
+ const reset = () => {
196965
+ setDomainValue('');
196966
+ setProjectId('');
196967
+ setMode(canAddPlatformDomain ? 'platform' : 'app');
196968
+ };
196969
+ const close = () => {
196970
+ reset();
196971
+ onOpenChange(false);
196972
+ };
196973
+ const handleSubmit = async (event) => {
196974
+ event.preventDefault();
196975
+ if (mode === 'platform') {
196976
+ await onSubmitPlatformDomain(sanitizeDomain(domainValue));
196977
+ }
196978
+ else {
196979
+ await onSubmitAppDomain(Number(projectId), sanitizeDomain(domainValue));
196980
+ }
196981
+ };
196982
+ const canSubmit = mode === 'platform' ? domainValue.trim().length > 0 : projectId.trim().length > 0;
196983
+ return (jsx(Dialog, { open: open, onOpenChange: (next) => {
196984
+ if (!next) {
196985
+ reset();
196986
+ }
196987
+ onOpenChange(next);
196988
+ }, 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 ? (
196989
+ // The backend lists only the caller's own projects, so this is
196990
+ // "you have not deployed anything", not "the platform has not".
196991
+ 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'
196992
+ ? t('advancedCustomDomain.domainHelpApp')
196993
+ : 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')] })] })] })] }) }));
196994
+ };
196995
+
196996
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
196997
+ // @__NO_SIDE_EFFECTS__
196998
+ function createSlottable(ownerName) {
196999
+ const Slottable2 = ({ children }) => {
197000
+ return /* @__PURE__ */ jsx(Fragment$1, { children });
197001
+ };
197002
+ Slottable2.displayName = `${ownerName}.Slottable`;
197003
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
197004
+ return Slottable2;
197005
+ }
197006
+
197007
+ var ROOT_NAME = "AlertDialog";
197008
+ var [createAlertDialogContext] = createContextScope$1(ROOT_NAME, [
197009
+ createDialogScope
197010
+ ]);
197011
+ var useDialogScope = createDialogScope();
197012
+ var AlertDialog$1 = (props) => {
197013
+ const { __scopeAlertDialog, ...alertDialogProps } = props;
197014
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197015
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });
197016
+ };
197017
+ AlertDialog$1.displayName = ROOT_NAME;
197018
+ var TRIGGER_NAME = "AlertDialogTrigger";
197019
+ var AlertDialogTrigger = React.forwardRef(
197020
+ (props, forwardedRef) => {
197021
+ const { __scopeAlertDialog, ...triggerProps } = props;
197022
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197023
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
197024
+ }
197025
+ );
197026
+ AlertDialogTrigger.displayName = TRIGGER_NAME;
197027
+ var PORTAL_NAME = "AlertDialogPortal";
197028
+ var AlertDialogPortal$1 = (props) => {
197029
+ const { __scopeAlertDialog, ...portalProps } = props;
197030
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197031
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });
197032
+ };
197033
+ AlertDialogPortal$1.displayName = PORTAL_NAME;
197034
+ var OVERLAY_NAME = "AlertDialogOverlay";
197035
+ var AlertDialogOverlay$1 = React.forwardRef(
197036
+ (props, forwardedRef) => {
197037
+ const { __scopeAlertDialog, ...overlayProps } = props;
197038
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197039
+ return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
197040
+ }
197041
+ );
197042
+ AlertDialogOverlay$1.displayName = OVERLAY_NAME;
197043
+ var CONTENT_NAME = "AlertDialogContent";
197044
+ var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
197045
+ var Slottable = createSlottable("AlertDialogContent");
197046
+ var AlertDialogContent$1 = React.forwardRef(
197047
+ (props, forwardedRef) => {
197048
+ const { __scopeAlertDialog, children, ...contentProps } = props;
197049
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197050
+ const contentRef = React.useRef(null);
197051
+ const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
197052
+ const cancelRef = React.useRef(null);
197053
+ return /* @__PURE__ */ jsx(
197054
+ DialogPrimitive.WarningProvider,
197055
+ {
197056
+ contentName: CONTENT_NAME,
197057
+ titleName: TITLE_NAME,
197058
+ docsSlug: "alert-dialog",
197059
+ children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(
197060
+ DialogPrimitive.Content,
197061
+ {
197062
+ role: "alertdialog",
197063
+ ...dialogScope,
197064
+ ...contentProps,
197065
+ ref: composedRefs,
197066
+ onOpenAutoFocus: composeEventHandlers$1(contentProps.onOpenAutoFocus, (event) => {
197067
+ event.preventDefault();
197068
+ cancelRef.current?.focus({ preventScroll: true });
197069
+ }),
197070
+ onPointerDownOutside: (event) => event.preventDefault(),
197071
+ onInteractOutside: (event) => event.preventDefault(),
197072
+ children: [
197073
+ /* @__PURE__ */ jsx(Slottable, { children }),
197074
+ /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })
197075
+ ]
197076
+ }
197077
+ ) })
197078
+ }
197079
+ );
197080
+ }
197081
+ );
197082
+ AlertDialogContent$1.displayName = CONTENT_NAME;
197083
+ var TITLE_NAME = "AlertDialogTitle";
197084
+ var AlertDialogTitle$1 = React.forwardRef(
197085
+ (props, forwardedRef) => {
197086
+ const { __scopeAlertDialog, ...titleProps } = props;
197087
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197088
+ return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
197089
+ }
197090
+ );
197091
+ AlertDialogTitle$1.displayName = TITLE_NAME;
197092
+ var DESCRIPTION_NAME = "AlertDialogDescription";
197093
+ var AlertDialogDescription$1 = React.forwardRef((props, forwardedRef) => {
197094
+ const { __scopeAlertDialog, ...descriptionProps } = props;
197095
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197096
+ return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
197097
+ });
197098
+ AlertDialogDescription$1.displayName = DESCRIPTION_NAME;
197099
+ var ACTION_NAME = "AlertDialogAction";
197100
+ var AlertDialogAction$1 = React.forwardRef(
197101
+ (props, forwardedRef) => {
197102
+ const { __scopeAlertDialog, ...actionProps } = props;
197103
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197104
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
197105
+ }
197106
+ );
197107
+ AlertDialogAction$1.displayName = ACTION_NAME;
197108
+ var CANCEL_NAME = "AlertDialogCancel";
197109
+ var AlertDialogCancel$1 = React.forwardRef(
197110
+ (props, forwardedRef) => {
197111
+ const { __scopeAlertDialog, ...cancelProps } = props;
197112
+ const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
197113
+ const dialogScope = useDialogScope(__scopeAlertDialog);
197114
+ const ref = useComposedRefs$1(forwardedRef, cancelRef);
197115
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });
197116
+ }
197117
+ );
197118
+ AlertDialogCancel$1.displayName = CANCEL_NAME;
197119
+ var DescriptionWarning = ({ contentRef }) => {
197120
+ const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
197121
+
197122
+ You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
197123
+
197124
+ 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}\`. 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.
197125
+
197126
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
197127
+ React.useEffect(() => {
197128
+ const hasDescription = document.getElementById(
197129
+ contentRef.current?.getAttribute("aria-describedby")
197130
+ );
197131
+ if (!hasDescription) console.warn(MESSAGE);
197132
+ }, [MESSAGE, contentRef]);
197133
+ return null;
197134
+ };
197135
+ var Root2 = AlertDialog$1;
197136
+ var Portal2 = AlertDialogPortal$1;
197137
+ var Overlay2 = AlertDialogOverlay$1;
197138
+ var Content2 = AlertDialogContent$1;
197139
+ var Action = AlertDialogAction$1;
197140
+ var Cancel = AlertDialogCancel$1;
197141
+ var Title2 = AlertDialogTitle$1;
197142
+ var Description2 = AlertDialogDescription$1;
197143
+
197144
+ const AlertDialog = Root2;
197145
+ const AlertDialogPortal = Portal2;
197146
+ 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 })));
197147
+ AlertDialogOverlay.displayName = Overlay2.displayName;
197148
+ const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (jsxs(AlertDialogPortal, { children: [jsx(AlertDialogOverlay, {}), jsx(Content2, { 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 })] })));
197149
+ AlertDialogContent.displayName = Content2.displayName;
197150
+ const AlertDialogHeader = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col space-y-2 text-center sm:text-left', className), ...props }));
197151
+ AlertDialogHeader.displayName = 'AlertDialogHeader';
197152
+ const AlertDialogFooter = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
197153
+ AlertDialogFooter.displayName = 'AlertDialogFooter';
197154
+ const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (jsx(Title2, { ref: ref, className: cn('text-lg font-semibold', className), ...props })));
197155
+ AlertDialogTitle.displayName = Title2.displayName;
197156
+ const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (jsx(Description2, { ref: ref, className: cn('text-muted-foreground text-sm', className), ...props })));
197157
+ AlertDialogDescription.displayName = Description2.displayName;
197158
+ const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (jsx(Action, { ref: ref, className: cn(buttonVariants(), className), ...props })));
197159
+ AlertDialogAction.displayName = Action.displayName;
197160
+ const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (jsx(Cancel, { ref: ref, className: cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className), ...props })));
197161
+ AlertDialogCancel.displayName = Cancel.displayName;
197162
+
197163
+ const hostedDomainStatus = (row) => {
197164
+ // A domain that was taken over keeps this organization's old `verified_at`,
197165
+ // so `lost_at` has to outrank it: the row is waiting on DNS again until a
197166
+ // re-verify reclaims it. The panel does not say who took it.
197167
+ if (row.lost_at) {
197168
+ return 'unverified';
197169
+ }
197170
+ return row.verified_at ? 'verified' : 'unverified';
197171
+ };
197172
+ /**
197173
+ * Every SPA domain CNAMEs to the same instance-wide host, so this answers "is
197174
+ * DNS pointing at us" and nothing more — it cannot tell which organization owns
197175
+ * the name. That is why it is only ever used for SPA rows.
197176
+ */
197177
+ const resolveCname = async (domain, target) => {
197178
+ var _a;
197179
+ const response = await fetch(`https://dns.google/resolve?name=${domain}&type=CNAME`, {
197180
+ cache: 'no-store',
197181
+ });
197182
+ const body = await response.json();
197183
+ 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; }));
197184
+ };
197185
+ const DomainRow = ({ row, sslValue, onReverify, onRemove, isBusy, onStatusChange, }) => {
197186
+ var _a;
197187
+ const t = useT();
197188
+ const isHosted = row.spa === VERCEL_SPA;
197189
+ const [copiedKey, setCopiedKey] = useState(null);
197190
+ const [confirmOpen, setConfirmOpen] = useState(false);
197191
+ const [spaStatus, setSpaStatus] = useState('checking');
197192
+ const checkSpaDomain = useCallback(async () => {
197193
+ if (isHosted) {
197194
+ return;
197195
+ }
197196
+ if (!row.registered_with_dns_pro) {
197197
+ setSpaStatus('unregistered');
197198
+ return;
197199
+ }
197200
+ setSpaStatus('checking');
197201
+ try {
197202
+ setSpaStatus((await resolveCname(row.custom_domain, sslValue)) ? 'verified' : 'unverified');
197203
+ }
197204
+ catch (_a) {
197205
+ // A blocked or failed lookup is not the same answer as "the record is
197206
+ // missing" — the OS content-security-policy can refuse the request
197207
+ // outright — so say so instead of showing a confident "Not verified".
197208
+ setSpaStatus('unknown');
197209
+ toast.error(t('advancedCustomDomain.verifyUnavailable'));
197210
+ }
197211
+ }, [isHosted, row.custom_domain, row.registered_with_dns_pro, sslValue, t]);
197212
+ useEffect(() => {
197213
+ void checkSpaDomain();
197214
+ }, [checkSpaDomain]);
197215
+ useEffect(() => {
197216
+ if (isHosted) {
197217
+ return;
197218
+ }
197219
+ onStatusChange === null || onStatusChange === void 0 ? void 0 : onStatusChange(row.id, spaStatus);
197220
+ }, [isHosted, onStatusChange, row.id, spaStatus]);
197221
+ const status = isHosted ? hostedDomainStatus(row) : spaStatus;
197222
+ // A hosted row's records come from the provider and carry a reason each; an
197223
+ // SPA row has none stored, and its single CNAME is the same for every
197224
+ // organization on the instance, so it is computed here.
197225
+ const records = isHosted
197226
+ ? ((_a = row.records) !== null && _a !== void 0 ? _a : [])
197227
+ : [{ type: 'CNAME', name: row.custom_domain, value: sslValue }];
197228
+ const handleCopy = async (value, key) => {
197229
+ try {
197230
+ await navigator.clipboard.writeText(value);
197231
+ setCopiedKey(key);
197232
+ toast.success(t('advancedCustomDomain.copiedToClipboard'));
197233
+ setTimeout(() => setCopiedKey(null), 5000);
197234
+ }
197235
+ catch (_a) {
197236
+ toast.error(t('advancedCustomDomain.unableToCopy'));
197237
+ }
197238
+ };
197239
+ // Spelled out rather than built from `status`: the i18n coverage check reads
197240
+ // literal t('…') calls out of the source, so a computed key is invisible to
197241
+ // it and a typo in one would only surface in the running UI.
197242
+ const statusLabel = () => {
197243
+ switch (status) {
197244
+ case 'verified':
197245
+ return t('advancedCustomDomain.statusVerified');
197246
+ case 'unregistered':
197247
+ return t('advancedCustomDomain.statusUnregistered');
197248
+ case 'unknown':
197249
+ return t('advancedCustomDomain.statusUnknown');
197250
+ default:
197251
+ return t('advancedCustomDomain.statusUnverified');
197252
+ }
197253
+ };
197254
+ const statusBadge = (jsx("span", { className: status === 'verified'
197255
+ ? 'rounded bg-green-100 px-2 py-1 text-xs text-green-800'
197256
+ : '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()) }));
197257
+ 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, { className: "table-fixed", children: [jsx(TableHeader, { children: jsxs(TableRow, { 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, { children: [jsx(TableCell, { className: "text-sm", children: record.type }), jsx(TableCell, { 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', {
197258
+ domain: record.name,
197259
+ }), 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, { 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
197260
+ ? t('advancedCustomDomain.confirmDetachBody', { domain: row.custom_domain })
197261
+ : t('advancedCustomDomain.confirmDeleteBody', { domain: row.custom_domain }) })] }), jsxs(AlertDialogFooter, { children: [jsx(AlertDialogCancel, { children: t('advancedCustomDomain.cancel') }), jsx(AlertDialogAction, { onClick: () => {
197262
+ setConfirmOpen(false);
197263
+ void onRemove(row);
197264
+ }, children: isHosted ? t('advancedCustomDomain.detach') : t('advancedCustomDomain.delete') })] })] }) })] }));
197265
+ };
197266
+
196800
197267
  const normalizeCustomDomains = (response) => {
196801
197268
  if (!response) {
196802
197269
  return [];
@@ -196815,141 +197282,196 @@ const normalizeCustomDomains = (response) => {
196815
197282
  }
196816
197283
  return [];
196817
197284
  };
196818
- const sanitizeDomain = (domain) => {
196819
- return domain
196820
- .trim()
196821
- .replace(/^https?:\/\//, '') // Remove http:// or https://
196822
- .replace(/^www\./, ''); // Remove www.
197285
+ const serverDetail = (error) => {
197286
+ const data = error === null || error === void 0 ? void 0 : error.data;
197287
+ if (typeof data === 'string') {
197288
+ return data;
197289
+ }
197290
+ const body = data;
197291
+ 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]) {
197292
+ if (typeof value === 'string' && value.trim() !== '') {
197293
+ return value;
197294
+ }
197295
+ }
197296
+ // A field error — `{"domain": ["…"]}` — is how the backend refuses a malformed
197297
+ // name; its text is the first entry of the first such list.
197298
+ for (const value of Object.values(body !== null && body !== void 0 ? body : {})) {
197299
+ const first = Array.isArray(value) ? value[0] : undefined;
197300
+ if (typeof first === 'string' && first.trim() !== '') {
197301
+ return first;
197302
+ }
197303
+ }
197304
+ return undefined;
196823
197305
  };
196824
- const CustomDomainsContent = ({ platformKey, currentSPA, currentPlatformBaseDomain, }) => {
197306
+ const CustomDomainsContent = ({ platformKey, username, currentSPA, currentPlatformBaseDomain, }) => {
197307
+ var _a;
196825
197308
  const t = useT();
196826
197309
  const [isCollapsed, setIsCollapsed] = useState(true);
196827
197310
  const [isModalOpen, setIsModalOpen] = useState(false);
196828
- const [customDomainValue, setCustomDomainValue] = useState('');
196829
- const [deletingDomainId, setDeletingDomainId] = useState(null);
196830
- const [copiedField, setCopiedField] = useState(null);
196831
- const [isVerified, setIsVerified] = useState(null);
196832
- const [isVerifying, setIsVerifying] = useState(false);
197311
+ const [busyDomainId, setBusyDomainId] = useState(null);
196833
197312
  const { data, isLoading, isFetching, refetch } = useGetCustomDomainsQuery({
196834
197313
  params: { platform_key: platformKey },
196835
197314
  });
197315
+ // Only the caller's own deployed apps are listable, and only the Add dialog
197316
+ // needs them — so this stays idle until it opens.
197317
+ const { data: projectData, isFetching: isLoadingProjects } = useGetHostingProjectsQuery({ org: platformKey, username }, { skip: !isModalOpen || !username });
196836
197318
  const [createCustomDomain, { isLoading: isCreating }] = useCreateCustomDomainMutation();
196837
197319
  const [deleteCustomDomain] = useDeleteCustomDomainMutation();
197320
+ const [createHostingProjectDomain, { isLoading: isAttaching }] = useCreateHostingProjectDomainMutation();
197321
+ const [updateHostingDomain] = useUpdateHostingDomainMutation();
197322
+ const [deleteHostingDomain] = useDeleteHostingDomainMutation();
196838
197323
  const customDomains = useMemo(() => normalizeCustomDomains(data), [data]);
196839
- const sslValue = `ssl.${currentPlatformBaseDomain && currentPlatformBaseDomain.trim() !== '' ? currentPlatformBaseDomain : typeof window !== 'undefined' ? window.location.hostname.split('.').slice(-2).join('.') : 'iblai.app'}`;
196840
- // Get the current domain for the current SPA
196841
- const currentDomain = useMemo(() => {
196842
- if (!currentSPA)
196843
- return null;
196844
- return customDomains.find((domain) => { var _a; return (_a = domain.spa) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(currentSPA.toLowerCase()); });
196845
- }, [customDomains, currentSPA]);
196846
- const verifyCustomDomain = async (domain) => {
196847
- if (!(currentDomain === null || currentDomain === void 0 ? void 0 : currentDomain.registered_with_dns_pro)) {
196848
- return;
196849
- }
196850
- setIsVerifying(true);
196851
- try {
196852
- const endpoint = `https://dns.google/resolve?name=${domain}&type=CNAME`;
196853
- const res = await fetch(endpoint, { cache: 'no-store' });
196854
- const data = await res.json();
196855
- let verified = false;
196856
- if (data.Answer) {
196857
- // Check if any CNAME record points to sslValue
196858
- verified = data.Answer.some((a) => a.data.replace(/\.$/, '') === sslValue);
196859
- }
196860
- setIsVerified(verified);
196861
- }
196862
- catch (error) {
196863
- console.error('Failed to verify domain:', error);
196864
- setIsVerified(false);
196865
- }
196866
- finally {
196867
- setIsVerifying(false);
196868
- }
196869
- };
196870
- // Auto-check verification on domain load
196871
- useEffect(() => {
196872
- if (currentDomain === null || currentDomain === void 0 ? void 0 : currentDomain.custom_domain) {
196873
- verifyCustomDomain(currentDomain.custom_domain);
196874
- }
196875
- else {
196876
- setIsVerified(null);
196877
- }
196878
- }, [currentDomain === null || currentDomain === void 0 ? void 0 : currentDomain.custom_domain]);
196879
- const handleDeleteCustomDomain = async (domain_id) => {
196880
- try {
196881
- setDeletingDomainId(domain_id);
196882
- await deleteCustomDomain({
196883
- domain_id,
196884
- platform_key: platformKey,
196885
- }).unwrap();
196886
- await refetch();
196887
- toast.success(t('advancedCustomDomain.deleteSuccess'));
196888
- }
196889
- catch (error) {
196890
- console.error('Failed to delete custom domain:', error);
196891
- toast.error(t('advancedCustomDomain.deleteError'));
196892
- }
196893
- finally {
196894
- setDeletingDomainId(null);
197324
+ // A sign-in row's answer exists only in the browser, so the row reports it up
197325
+ // to here. Two things stop a child's effect writing parent state that
197326
+ // re-renders the child that fired it, for ever: this identity never changes,
197327
+ // and an unchanged status returns the SAME object so React bails out. Either
197328
+ // alone is enough — losing both hangs the process, so the cheap second one
197329
+ // stays. Adding a dependency below is exactly how the first gets lost.
197330
+ const [spaStatuses, setSpaStatuses] = useState({});
197331
+ const handleStatusChange = useCallback((id, status) => {
197332
+ setSpaStatuses((previous) => previous[id] === status ? previous : { ...previous, [id]: status });
197333
+ }, []);
197334
+ // Verified first. Two groups rather than a full ranking — nothing was asked
197335
+ // about the order of the rest, and Array#sort is stable, so the server's
197336
+ // order survives inside each group.
197337
+ const sortedDomains = useMemo(() => {
197338
+ const isVerified = (row) => (row.spa === VERCEL_SPA ? hostedDomainStatus(row) : spaStatuses[row.id]) === 'verified';
197339
+ return [...customDomains].sort((a, b) => Number(isVerified(b)) - Number(isVerified(a)));
197340
+ }, [customDomains, spaStatuses]);
197341
+ const sslValue = `ssl.${currentPlatformBaseDomain && currentPlatformBaseDomain.trim() !== ''
197342
+ ? currentPlatformBaseDomain
197343
+ : typeof window !== 'undefined'
197344
+ ? window.location.hostname.split('.').slice(-2).join('.')
197345
+ : 'iblai.app'}`;
197346
+ // A platform gets one sign-in domain per SPA, so the Add dialog offers that
197347
+ // kind only while this SPA has none. Deployed apps have no such limit.
197348
+ const canAddPlatformDomain = useMemo(() => Boolean(currentSPA) &&
197349
+ !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]);
197350
+ /**
197351
+ * The status decides what the user should do next, so it gets its own
197352
+ * message. 409 shares 400's: both mean "not this domain, not here", and the
197353
+ * panel does not tell one organization that another is holding it.
197354
+ */
197355
+ const headlineForStatus = (status, fallback) => {
197356
+ switch (status) {
197357
+ case 400:
197358
+ case 409:
197359
+ return t('advancedCustomDomain.errorRefused');
197360
+ case 403:
197361
+ return t('advancedCustomDomain.errorForbidden');
197362
+ case 429:
197363
+ return t('advancedCustomDomain.errorRateLimited');
197364
+ case 502:
197365
+ return t('advancedCustomDomain.errorUpstream');
197366
+ case 503:
197367
+ return t('advancedCustomDomain.errorUnavailable');
197368
+ default:
197369
+ return fallback;
196895
197370
  }
196896
197371
  };
196897
- const handleResetForm = () => {
196898
- setCustomDomainValue('');
197372
+ const reportError = (error, fallback) => {
197373
+ const status = error === null || error === void 0 ? void 0 : error.status;
197374
+ // The server's own words go underneath the headline — except on 409, the
197375
+ // one status whose body names the organization holding the domain.
197376
+ const description = status === 409 ? undefined : serverDetail(error);
197377
+ toast.error(headlineForStatus(status, fallback), { description });
196899
197378
  };
196900
- const handleAddCustomDomain = async (event) => {
196901
- event.preventDefault();
196902
- if (!customDomainValue.trim()) {
197379
+ const handleAddPlatformDomain = async (domain) => {
197380
+ if (!domain) {
196903
197381
  toast.error(t('advancedCustomDomain.pleaseEnterDomain'));
196904
197382
  return;
196905
197383
  }
196906
- const sanitizedDomain = sanitizeDomain(customDomainValue);
196907
197384
  try {
196908
197385
  await createCustomDomain({
196909
197386
  requestBody: {
196910
197387
  platform_key: platformKey,
196911
- custom_domain: sanitizedDomain,
197388
+ custom_domain: domain,
196912
197389
  spa: (currentSPA.endsWith('ai') ? currentSPA : `${currentSPA}ai`),
196913
197390
  registered_with_dns_pro: true,
196914
197391
  },
196915
197392
  }).unwrap();
196916
197393
  await refetch();
196917
197394
  toast.success(t('advancedCustomDomain.createSuccess'));
196918
- handleResetForm();
196919
197395
  setIsModalOpen(false);
196920
- // Auto-verify after creation
196921
- setTimeout(() => {
196922
- verifyCustomDomain(sanitizedDomain);
196923
- }, 1000);
196924
197396
  }
196925
- catch (mutationError) {
196926
- console.error('Failed to create custom domain:', mutationError);
196927
- toast.error(t('advancedCustomDomain.createError'));
197397
+ catch (error) {
197398
+ reportError(error, t('advancedCustomDomain.createError'));
196928
197399
  }
196929
197400
  };
196930
- const handleCopyField = async (value, fieldType) => {
197401
+ const handleAddAppDomain = async (project, domain) => {
196931
197402
  try {
196932
- await navigator.clipboard.writeText(value);
196933
- setCopiedField(fieldType);
196934
- toast.success(t('advancedCustomDomain.copiedToClipboard'));
196935
- // Reset the icon after 5 seconds
196936
- setTimeout(() => {
196937
- setCopiedField(null);
196938
- }, 5000);
197403
+ // An empty domain is the "assign me a subdomain" path, which the backend
197404
+ // reads as the absent key — not as an empty string.
197405
+ await createHostingProjectDomain({
197406
+ org: platformKey,
197407
+ username,
197408
+ project,
197409
+ domain: domain || undefined,
197410
+ }).unwrap();
197411
+ await refetch();
197412
+ toast.success(t('advancedCustomDomain.createSuccess'));
197413
+ setIsModalOpen(false);
196939
197414
  }
196940
- catch (copyError) {
196941
- console.error('Failed to copy:', copyError);
196942
- toast.error(t('advancedCustomDomain.unableToCopy'));
197415
+ catch (error) {
197416
+ reportError(error, t('advancedCustomDomain.createError'));
196943
197417
  }
196944
197418
  };
196945
- 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: () => {
196946
- setIsModalOpen(false);
196947
- handleResetForm();
196948
- }, 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
197419
+ const handleReverify = async (row) => {
197420
+ setBusyDomainId(row.id);
197421
+ try {
197422
+ const result = await updateHostingDomain({
197423
+ org: platformKey,
197424
+ domainId: row.id,
197425
+ }).unwrap();
197426
+ await refetch();
197427
+ // The rule the badge is built from after the refetch: Vercel says verified
197428
+ // AND not misconfigured. `verified` alone is ownership (the TXT record); a
197429
+ // domain can hold that and still not point here, and the badge would then
197430
+ // say "required" while this toast said "serving".
197431
+ if ((result === null || result === void 0 ? void 0 : result.verified) && (result === null || result === void 0 ? void 0 : result.misconfigured) === false) {
197432
+ toast.success(t('advancedCustomDomain.verifySuccess'));
197433
+ }
197434
+ else {
197435
+ // Includes the reclaim the server refused — it answers 200, unverified,
197436
+ // and says which organization still serves it. Not relayed: from here
197437
+ // the domain is simply waiting on its records, same as any other.
197438
+ toast.message(t('advancedCustomDomain.verifyPending'));
197439
+ }
197440
+ }
197441
+ catch (error) {
197442
+ reportError(error, t('advancedCustomDomain.verifyError'));
197443
+ }
197444
+ finally {
197445
+ setBusyDomainId(null);
197446
+ }
197447
+ };
197448
+ const handleRemove = async (row) => {
197449
+ setBusyDomainId(row.id);
197450
+ try {
197451
+ // A hosted row has to go through the hosting route: deleting it here
197452
+ // would drop the record while the domain carried on serving the app.
197453
+ if (row.spa === VERCEL_SPA) {
197454
+ await deleteHostingDomain({ org: platformKey, domainId: row.id }).unwrap();
197455
+ }
197456
+ else {
197457
+ await deleteCustomDomain({ domain_id: row.id, platform_key: platformKey }).unwrap();
197458
+ }
197459
+ await refetch();
197460
+ toast.success(t('advancedCustomDomain.deleteSuccess'));
197461
+ }
197462
+ catch (error) {
197463
+ reportError(error, t('advancedCustomDomain.deleteError'));
197464
+ }
197465
+ finally {
197466
+ setBusyDomainId(null);
197467
+ }
197468
+ };
197469
+ 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: () => {
197470
+ setIsCollapsed(false);
197471
+ setIsModalOpen(true);
197472
+ }, 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
196949
197473
  ? t('advancedCustomDomain.expandAriaLabel')
196950
- : 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, { children: [jsx(TableHeader, { children: jsxs(TableRow, { 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, { children: [jsx(TableCell, { className: "text-sm", children: "CNAME" }), jsx(TableCell, { 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', {
196951
- domain: currentDomain.custom_domain,
196952
- }), 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, { 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, { 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') })) }))] }));
197474
+ : 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 })] }));
196953
197475
  };
196954
197476
 
196955
197477
  const StudentMentorCreationContent = ({ platformKey, }) => {
@@ -198620,7 +199142,7 @@ function AdvancedTab({ platformKey, username, currentSPA, authURL, currentPlatfo
198620
199142
  await handleToggleSetting(metadataItem.slug, currentValue);
198621
199143
  }, 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));
198622
199144
  }) })] }, spa)));
198623
- })()), 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 })] }))] }) }));
199145
+ })()), 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 })] }))] }) }));
198624
199146
  }
198625
199147
 
198626
199148
  function StripeConnect({ platformKey }) {
@@ -228881,173 +229403,6 @@ function WatcherEmailSection({ isSaving, isCustomized, onCustomizedChange, subje
228881
229403
  : t('componentsWatcherEmailSection.bodyFallbackHelper') }), jsx(SummerNoteTextEditor, { value: body, onChange: onBodyChange, placeholder: t('componentsWatcherEmailSection.bodyPlaceholder'), exportFormat: "html", disabled: isSaving, id: "watcher-email-body", ariaLabelledBy: bodyLabelId, ariaDescribedBy: bodyError ? `${bodyHelperId} ${bodyErrorId}` : bodyHelperId, ariaInvalid: Boolean(bodyError) }), bodyError && (jsx("p", { id: bodyErrorId, className: "text-sm text-red-600", role: "alert", children: bodyError }))] }), jsx(TemplateVariablesHelper, { context: context })] }))] }));
228882
229404
  }
228883
229405
 
228884
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
228885
- // @__NO_SIDE_EFFECTS__
228886
- function createSlottable(ownerName) {
228887
- const Slottable2 = ({ children }) => {
228888
- return /* @__PURE__ */ jsx(Fragment$1, { children });
228889
- };
228890
- Slottable2.displayName = `${ownerName}.Slottable`;
228891
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
228892
- return Slottable2;
228893
- }
228894
-
228895
- var ROOT_NAME = "AlertDialog";
228896
- var [createAlertDialogContext] = createContextScope$1(ROOT_NAME, [
228897
- createDialogScope
228898
- ]);
228899
- var useDialogScope = createDialogScope();
228900
- var AlertDialog$1 = (props) => {
228901
- const { __scopeAlertDialog, ...alertDialogProps } = props;
228902
- const dialogScope = useDialogScope(__scopeAlertDialog);
228903
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });
228904
- };
228905
- AlertDialog$1.displayName = ROOT_NAME;
228906
- var TRIGGER_NAME = "AlertDialogTrigger";
228907
- var AlertDialogTrigger = React.forwardRef(
228908
- (props, forwardedRef) => {
228909
- const { __scopeAlertDialog, ...triggerProps } = props;
228910
- const dialogScope = useDialogScope(__scopeAlertDialog);
228911
- return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
228912
- }
228913
- );
228914
- AlertDialogTrigger.displayName = TRIGGER_NAME;
228915
- var PORTAL_NAME = "AlertDialogPortal";
228916
- var AlertDialogPortal$1 = (props) => {
228917
- const { __scopeAlertDialog, ...portalProps } = props;
228918
- const dialogScope = useDialogScope(__scopeAlertDialog);
228919
- return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });
228920
- };
228921
- AlertDialogPortal$1.displayName = PORTAL_NAME;
228922
- var OVERLAY_NAME = "AlertDialogOverlay";
228923
- var AlertDialogOverlay$1 = React.forwardRef(
228924
- (props, forwardedRef) => {
228925
- const { __scopeAlertDialog, ...overlayProps } = props;
228926
- const dialogScope = useDialogScope(__scopeAlertDialog);
228927
- return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
228928
- }
228929
- );
228930
- AlertDialogOverlay$1.displayName = OVERLAY_NAME;
228931
- var CONTENT_NAME = "AlertDialogContent";
228932
- var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
228933
- var Slottable = createSlottable("AlertDialogContent");
228934
- var AlertDialogContent$1 = React.forwardRef(
228935
- (props, forwardedRef) => {
228936
- const { __scopeAlertDialog, children, ...contentProps } = props;
228937
- const dialogScope = useDialogScope(__scopeAlertDialog);
228938
- const contentRef = React.useRef(null);
228939
- const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
228940
- const cancelRef = React.useRef(null);
228941
- return /* @__PURE__ */ jsx(
228942
- DialogPrimitive.WarningProvider,
228943
- {
228944
- contentName: CONTENT_NAME,
228945
- titleName: TITLE_NAME,
228946
- docsSlug: "alert-dialog",
228947
- children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(
228948
- DialogPrimitive.Content,
228949
- {
228950
- role: "alertdialog",
228951
- ...dialogScope,
228952
- ...contentProps,
228953
- ref: composedRefs,
228954
- onOpenAutoFocus: composeEventHandlers$1(contentProps.onOpenAutoFocus, (event) => {
228955
- event.preventDefault();
228956
- cancelRef.current?.focus({ preventScroll: true });
228957
- }),
228958
- onPointerDownOutside: (event) => event.preventDefault(),
228959
- onInteractOutside: (event) => event.preventDefault(),
228960
- children: [
228961
- /* @__PURE__ */ jsx(Slottable, { children }),
228962
- /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })
228963
- ]
228964
- }
228965
- ) })
228966
- }
228967
- );
228968
- }
228969
- );
228970
- AlertDialogContent$1.displayName = CONTENT_NAME;
228971
- var TITLE_NAME = "AlertDialogTitle";
228972
- var AlertDialogTitle$1 = React.forwardRef(
228973
- (props, forwardedRef) => {
228974
- const { __scopeAlertDialog, ...titleProps } = props;
228975
- const dialogScope = useDialogScope(__scopeAlertDialog);
228976
- return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
228977
- }
228978
- );
228979
- AlertDialogTitle$1.displayName = TITLE_NAME;
228980
- var DESCRIPTION_NAME = "AlertDialogDescription";
228981
- var AlertDialogDescription$1 = React.forwardRef((props, forwardedRef) => {
228982
- const { __scopeAlertDialog, ...descriptionProps } = props;
228983
- const dialogScope = useDialogScope(__scopeAlertDialog);
228984
- return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
228985
- });
228986
- AlertDialogDescription$1.displayName = DESCRIPTION_NAME;
228987
- var ACTION_NAME = "AlertDialogAction";
228988
- var AlertDialogAction$1 = React.forwardRef(
228989
- (props, forwardedRef) => {
228990
- const { __scopeAlertDialog, ...actionProps } = props;
228991
- const dialogScope = useDialogScope(__scopeAlertDialog);
228992
- return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
228993
- }
228994
- );
228995
- AlertDialogAction$1.displayName = ACTION_NAME;
228996
- var CANCEL_NAME = "AlertDialogCancel";
228997
- var AlertDialogCancel$1 = React.forwardRef(
228998
- (props, forwardedRef) => {
228999
- const { __scopeAlertDialog, ...cancelProps } = props;
229000
- const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
229001
- const dialogScope = useDialogScope(__scopeAlertDialog);
229002
- const ref = useComposedRefs$1(forwardedRef, cancelRef);
229003
- return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });
229004
- }
229005
- );
229006
- AlertDialogCancel$1.displayName = CANCEL_NAME;
229007
- var DescriptionWarning = ({ contentRef }) => {
229008
- const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
229009
-
229010
- You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
229011
-
229012
- 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}\`. 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.
229013
-
229014
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
229015
- React.useEffect(() => {
229016
- const hasDescription = document.getElementById(
229017
- contentRef.current?.getAttribute("aria-describedby")
229018
- );
229019
- if (!hasDescription) console.warn(MESSAGE);
229020
- }, [MESSAGE, contentRef]);
229021
- return null;
229022
- };
229023
- var Root2 = AlertDialog$1;
229024
- var Portal2 = AlertDialogPortal$1;
229025
- var Overlay2 = AlertDialogOverlay$1;
229026
- var Content2 = AlertDialogContent$1;
229027
- var Action = AlertDialogAction$1;
229028
- var Cancel = AlertDialogCancel$1;
229029
- var Title2 = AlertDialogTitle$1;
229030
- var Description2 = AlertDialogDescription$1;
229031
-
229032
- const AlertDialog = Root2;
229033
- const AlertDialogPortal = Portal2;
229034
- 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 })));
229035
- AlertDialogOverlay.displayName = Overlay2.displayName;
229036
- const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (jsxs(AlertDialogPortal, { children: [jsx(AlertDialogOverlay, {}), jsx(Content2, { 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 })] })));
229037
- AlertDialogContent.displayName = Content2.displayName;
229038
- const AlertDialogHeader = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col space-y-2 text-center sm:text-left', className), ...props }));
229039
- AlertDialogHeader.displayName = 'AlertDialogHeader';
229040
- const AlertDialogFooter = ({ className, ...props }) => (jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
229041
- AlertDialogFooter.displayName = 'AlertDialogFooter';
229042
- const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (jsx(Title2, { ref: ref, className: cn('text-lg font-semibold', className), ...props })));
229043
- AlertDialogTitle.displayName = Title2.displayName;
229044
- const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (jsx(Description2, { ref: ref, className: cn('text-muted-foreground text-sm', className), ...props })));
229045
- AlertDialogDescription.displayName = Description2.displayName;
229046
- const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (jsx(Action, { ref: ref, className: cn(buttonVariants(), className), ...props })));
229047
- AlertDialogAction.displayName = Action.displayName;
229048
- const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (jsx(Cancel, { ref: ref, className: cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className), ...props })));
229049
- AlertDialogCancel.displayName = Cancel.displayName;
229050
-
229051
229406
  /** Rough client-side check; the server remains the authority. */
229052
229407
  const isProbableEmail = (value) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value.trim());
229053
229408
  /**