@iblai/iblai-js 1.25.3 → 1.26.1
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.
|
@@ -52891,7 +52891,7 @@ function useCallbackRef$1(initialValue, callback) {
|
|
|
52891
52891
|
return ref.facade;
|
|
52892
52892
|
}
|
|
52893
52893
|
|
|
52894
|
-
var useIsomorphicLayoutEffect$
|
|
52894
|
+
var useIsomorphicLayoutEffect$3 = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
52895
52895
|
var currentValues = new WeakMap();
|
|
52896
52896
|
/**
|
|
52897
52897
|
* Merges two or more refs together providing a single interface to set their value
|
|
@@ -52912,7 +52912,7 @@ function useMergeRefs(refs, defaultValue) {
|
|
|
52912
52912
|
return refs.forEach(function (ref) { return assignRef(ref, newValue); });
|
|
52913
52913
|
});
|
|
52914
52914
|
// handle refs changes - added or removed
|
|
52915
|
-
useIsomorphicLayoutEffect$
|
|
52915
|
+
useIsomorphicLayoutEffect$3(function () {
|
|
52916
52916
|
var oldValue = currentValues.get(callbackRef);
|
|
52917
52917
|
if (oldValue) {
|
|
52918
52918
|
var prevRefs_1 = new Set(oldValue);
|
|
@@ -59731,6 +59731,7 @@ var advancePagination$3 = {
|
|
|
59731
59731
|
var advancedAdvanced$3 = {
|
|
59732
59732
|
failedToUpdateSetting: "Failed to update setting",
|
|
59733
59733
|
settingUpdatedSuccessfully: "Setting updated successfully",
|
|
59734
|
+
save: "Save",
|
|
59734
59735
|
agentSettingUpdatedSuccessfully: "Agent setting updated successfully",
|
|
59735
59736
|
chatAreaSizeUpdatedSuccessfully: "Chat area size updated successfully",
|
|
59736
59737
|
moreInfoAbout: "More info about {label}",
|
|
@@ -62308,7 +62309,8 @@ var modalsPaywallModal$3 = {
|
|
|
62308
62309
|
subscribeToGetAccess: "Subscribe to get access to {itemName}",
|
|
62309
62310
|
redirecting: "Redirecting...",
|
|
62310
62311
|
pay: "Pay",
|
|
62311
|
-
thisIncludes: "This includes:"
|
|
62312
|
+
thisIncludes: "This includes:",
|
|
62313
|
+
secureCheckout: "Secure checkout"
|
|
62312
62314
|
};
|
|
62313
62315
|
var modalsPromptGalleryModal$3 = {
|
|
62314
62316
|
promptGallery: "Prompt Gallery",
|
|
@@ -63068,7 +63070,8 @@ var projectsProjectsPage$3 = {
|
|
|
63068
63070
|
"delete": "Delete",
|
|
63069
63071
|
agentCount: "{count} {count, plural, one {agent} other {agents}}",
|
|
63070
63072
|
noProjectsFound: "No projects found",
|
|
63071
|
-
createFirstProject: "Create your first project"
|
|
63073
|
+
createFirstProject: "Create your first project",
|
|
63074
|
+
searching: "Searching..."
|
|
63072
63075
|
};
|
|
63073
63076
|
var projectsRenameProjectModal$3 = {
|
|
63074
63077
|
title: "Rename Project",
|
|
@@ -65110,6 +65113,7 @@ var advancePagination$2 = {
|
|
|
65110
65113
|
var advancedAdvanced$2 = {
|
|
65111
65114
|
failedToUpdateSetting: "Échec de la mise à jour du paramètre",
|
|
65112
65115
|
settingUpdatedSuccessfully: "Paramètre mis à jour avec succès",
|
|
65116
|
+
save: "Enregistrer",
|
|
65113
65117
|
agentSettingUpdatedSuccessfully: "Paramètre de l'agent mis à jour avec succès",
|
|
65114
65118
|
chatAreaSizeUpdatedSuccessfully: "Taille de la zone de discussion mise à jour avec succès",
|
|
65115
65119
|
moreInfoAbout: "Plus d'informations sur {label}",
|
|
@@ -67687,7 +67691,8 @@ var modalsPaywallModal$2 = {
|
|
|
67687
67691
|
subscribeToGetAccess: "Abonnez-vous pour accéder à {itemName}",
|
|
67688
67692
|
redirecting: "Redirection en cours...",
|
|
67689
67693
|
pay: "Payer",
|
|
67690
|
-
thisIncludes: "Cela comprend :"
|
|
67694
|
+
thisIncludes: "Cela comprend :",
|
|
67695
|
+
secureCheckout: "Paiement sécurisé"
|
|
67691
67696
|
};
|
|
67692
67697
|
var modalsPromptGalleryModal$2 = {
|
|
67693
67698
|
promptGallery: "Galerie d'invites",
|
|
@@ -68447,7 +68452,8 @@ var projectsProjectsPage$2 = {
|
|
|
68447
68452
|
"delete": "Supprimer",
|
|
68448
68453
|
agentCount: "{count} {count, plural, one {agent} other {agents}}",
|
|
68449
68454
|
noProjectsFound: "Aucun projet trouvé",
|
|
68450
|
-
createFirstProject: "Créer votre premier projet"
|
|
68455
|
+
createFirstProject: "Créer votre premier projet",
|
|
68456
|
+
searching: "Recherche..."
|
|
68451
68457
|
};
|
|
68452
68458
|
var projectsRenameProjectModal$2 = {
|
|
68453
68459
|
title: "Renommer le projet",
|
|
@@ -70489,6 +70495,7 @@ var advancePagination$1 = {
|
|
|
70489
70495
|
var advancedAdvanced$1 = {
|
|
70490
70496
|
failedToUpdateSetting: "Error al actualizar la configuración",
|
|
70491
70497
|
settingUpdatedSuccessfully: "Configuración actualizada correctamente",
|
|
70498
|
+
save: "Guardar",
|
|
70492
70499
|
agentSettingUpdatedSuccessfully: "Configuración del agente actualizada correctamente",
|
|
70493
70500
|
chatAreaSizeUpdatedSuccessfully: "Tamaño del área de chat actualizado correctamente",
|
|
70494
70501
|
moreInfoAbout: "Más información sobre {label}",
|
|
@@ -73066,7 +73073,8 @@ var modalsPaywallModal$1 = {
|
|
|
73066
73073
|
subscribeToGetAccess: "Suscríbete para acceder a {itemName}",
|
|
73067
73074
|
redirecting: "Redirigiendo...",
|
|
73068
73075
|
pay: "Pagar",
|
|
73069
|
-
thisIncludes: "Esto incluye:"
|
|
73076
|
+
thisIncludes: "Esto incluye:",
|
|
73077
|
+
secureCheckout: "Pago seguro"
|
|
73070
73078
|
};
|
|
73071
73079
|
var modalsPromptGalleryModal$1 = {
|
|
73072
73080
|
promptGallery: "Galería de instrucciones",
|
|
@@ -73826,7 +73834,8 @@ var projectsProjectsPage$1 = {
|
|
|
73826
73834
|
"delete": "Eliminar",
|
|
73827
73835
|
agentCount: "{count} {count, plural, one {agente} other {agentes}}",
|
|
73828
73836
|
noProjectsFound: "No se encontraron proyectos",
|
|
73829
|
-
createFirstProject: "Crear tu primer proyecto"
|
|
73837
|
+
createFirstProject: "Crear tu primer proyecto",
|
|
73838
|
+
searching: "Buscando..."
|
|
73830
73839
|
};
|
|
73831
73840
|
var projectsRenameProjectModal$1 = {
|
|
73832
73841
|
title: "Renombrar proyecto",
|
|
@@ -75868,6 +75877,7 @@ var advancePagination = {
|
|
|
75868
75877
|
var advancedAdvanced = {
|
|
75869
75878
|
failedToUpdateSetting: "更新设置失败",
|
|
75870
75879
|
settingUpdatedSuccessfully: "设置已成功更新",
|
|
75880
|
+
save: "保存",
|
|
75871
75881
|
agentSettingUpdatedSuccessfully: "代理设置已成功更新",
|
|
75872
75882
|
chatAreaSizeUpdatedSuccessfully: "聊天区域大小已成功更新",
|
|
75873
75883
|
moreInfoAbout: "关于 {label} 的更多信息",
|
|
@@ -78445,7 +78455,8 @@ var modalsPaywallModal = {
|
|
|
78445
78455
|
subscribeToGetAccess: "订阅以获取 {itemName} 的访问权限",
|
|
78446
78456
|
redirecting: "正在跳转...",
|
|
78447
78457
|
pay: "支付",
|
|
78448
|
-
thisIncludes: "包含以下内容:"
|
|
78458
|
+
thisIncludes: "包含以下内容:",
|
|
78459
|
+
secureCheckout: "安全结账"
|
|
78449
78460
|
};
|
|
78450
78461
|
var modalsPromptGalleryModal = {
|
|
78451
78462
|
promptGallery: "提示库",
|
|
@@ -79205,7 +79216,8 @@ var projectsProjectsPage = {
|
|
|
79205
79216
|
"delete": "删除",
|
|
79206
79217
|
agentCount: "{count} 个代理",
|
|
79207
79218
|
noProjectsFound: "未找到项目",
|
|
79208
|
-
createFirstProject: "创建您的第一个项目"
|
|
79219
|
+
createFirstProject: "创建您的第一个项目",
|
|
79220
|
+
searching: "搜索中..."
|
|
79209
79221
|
};
|
|
79210
79222
|
var projectsRenameProjectModal = {
|
|
79211
79223
|
title: "重命名项目",
|
|
@@ -83530,7 +83542,7 @@ function getOwnKeys(obj) {
|
|
|
83530
83542
|
);
|
|
83531
83543
|
}
|
|
83532
83544
|
|
|
83533
|
-
const useIsomorphicLayoutEffect$
|
|
83545
|
+
const useIsomorphicLayoutEffect$2 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
83534
83546
|
|
|
83535
83547
|
function useField(opts) {
|
|
83536
83548
|
const [fieldApi] = useState(() => {
|
|
@@ -83543,8 +83555,8 @@ function useField(opts) {
|
|
|
83543
83555
|
extendedApi.Field = Field;
|
|
83544
83556
|
return extendedApi;
|
|
83545
83557
|
});
|
|
83546
|
-
useIsomorphicLayoutEffect$
|
|
83547
|
-
useIsomorphicLayoutEffect$
|
|
83558
|
+
useIsomorphicLayoutEffect$2(fieldApi.mount, [fieldApi]);
|
|
83559
|
+
useIsomorphicLayoutEffect$2(() => {
|
|
83548
83560
|
fieldApi.update(opts);
|
|
83549
83561
|
});
|
|
83550
83562
|
useStore(
|
|
@@ -83603,9 +83615,9 @@ function useForm(opts) {
|
|
|
83603
83615
|
};
|
|
83604
83616
|
return extendedApi;
|
|
83605
83617
|
});
|
|
83606
|
-
useIsomorphicLayoutEffect$
|
|
83618
|
+
useIsomorphicLayoutEffect$2(formApi.mount, []);
|
|
83607
83619
|
useStore(formApi.store, (state) => state.isSubmitting);
|
|
83608
|
-
useIsomorphicLayoutEffect$
|
|
83620
|
+
useIsomorphicLayoutEffect$2(() => {
|
|
83609
83621
|
formApi.update(opts);
|
|
83610
83622
|
});
|
|
83611
83623
|
return formApi;
|
|
@@ -138896,6 +138908,10 @@ function Profile({ tenant, username, tenants, onClose, customization = {}, isAdm
|
|
|
138896
138908
|
: activeTab === 'experience' && experienceSubTab === 'resume'
|
|
138897
138909
|
? { onClick: handleAddResume, upload: true, ariaLabel: t('profileIndex.ariaAddResume') }
|
|
138898
138910
|
: null;
|
|
138911
|
+
// Rendered inline on the sub-tabs row (education/experience/resume), pushed to
|
|
138912
|
+
// the far right. `headerAdd` already encodes which sub-tab is active, so this
|
|
138913
|
+
// only appears on the sub-tabs that support adding/uploading.
|
|
138914
|
+
const headerAddButton = headerAdd && (jsx(Button$1, { size: "icon", onClick: headerAdd.onClick, className: "text-gray-700 bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white flex-shrink-0", "aria-label": headerAdd.ariaLabel, children: headerAdd.upload ? jsx(Upload, { className: "h-4 w-4" }) : jsx(Plus, { className: "h-4 w-4" }) }));
|
|
138899
138915
|
const tabDescription = (id) => {
|
|
138900
138916
|
const key = (isReadOnly && TAB_DESC_PREVIEW_KEYS[id]) || TAB_DESC_KEYS[id];
|
|
138901
138917
|
return key ? t(`profileIndex.${key}`) : '';
|
|
@@ -138910,10 +138926,10 @@ function Profile({ tenant, username, tenants, onClose, customization = {}, isAdm
|
|
|
138910
138926
|
? 'bg-blue-50 text-blue-700 font-medium'
|
|
138911
138927
|
: 'hover:bg-gray-50 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100'}`, children: [jsx(tab.renderIcon, { className: "h-5 w-5 mr-3 flex-shrink-0", "aria-hidden": "true" }), jsx("span", { className: "truncate", children: tab.label })] }, tab.id))) }) }) })] }), jsx("nav", { className: "lg:hidden", "aria-label": t('profileIndex.ariaProfileTabsMobile'), children: jsx("div", { className: "w-full justify-start px-6 py-2 bg-white border-b border-gray-200 rounded-none h-auto overflow-x-auto", children: jsx("div", { className: "flex space-x-2", role: "tablist", "aria-orientation": "horizontal", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab-mobile`, onClick: () => setActiveTab(tab.id), className: `flex items-center gap-2 px-3 py-2 rounded-lg whitespace-nowrap text-sm transition-all ${activeTab === tab.id
|
|
138912
138928
|
? 'bg-blue-50 text-blue-600 font-medium'
|
|
138913
|
-
: 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(tab.renderIcon, { className: "h-4 w-4", "aria-hidden": "true" }), jsx("span", { className: "hidden sm:inline", children: tab.label }), jsx("span", { className: "sm:hidden", children: tab.label })] }, tab.id))) }) }) }), jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", style: { height: '100%' }, children: [jsx("div", { className: "hidden lg:block flex-shrink-0 p-6 border-b border-gray-200 bg-white dark:bg-gray-900", children:
|
|
138929
|
+
: 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(tab.renderIcon, { className: "h-4 w-4", "aria-hidden": "true" }), jsx("span", { className: "hidden sm:inline", children: tab.label }), jsx("span", { className: "sm:hidden", children: tab.label })] }, tab.id))) }) }) }), jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", style: { height: '100%' }, children: [jsx("div", { className: "hidden lg:block flex-shrink-0 p-6 border-b border-gray-200 bg-white dark:bg-gray-900", children: jsx("div", { className: "flex items-center justify-between", children: jsxs("div", { children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2", children: (_f = (_e = TABS.find((t) => t.id === activeTab)) === null || _e === void 0 ? void 0 : _e.label) !== null && _f !== void 0 ? _f : activeTab }), jsx("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: tabDescription(activeTab) })] }) }) }), jsxs("div", { className: "flex-1 p-6 space-y-6", style: {
|
|
138914
138930
|
overflowY: 'auto',
|
|
138915
138931
|
overflowX: 'hidden',
|
|
138916
|
-
}, role: "tabpanel", id: `${activeTab}-tabpanel`, "aria-labelledby": `${activeTab}-tab`, tabIndex: 0, children: [jsx("div", { className: "lg:hidden mb-6", children:
|
|
138932
|
+
}, role: "tabpanel", id: `${activeTab}-tabpanel`, "aria-labelledby": `${activeTab}-tab`, tabIndex: 0, children: [jsx("div", { className: "lg:hidden mb-6", children: jsx("div", { className: "flex flex-row items-center sm:justify-between gap-3", children: jsxs("div", { children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2", children: (_h = (_g = TABS.find((t) => t.id === activeTab)) === null || _g === void 0 ? void 0 : _g.label) !== null && _h !== void 0 ? _h : activeTab }), jsx("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: tabDescription(activeTab) })] }) }) }), activeTab === 'basic' && (jsx("div", { className: "space-y-6", children: jsxs("form", { onSubmit: (formEvent) => {
|
|
138917
138933
|
formEvent.preventDefault();
|
|
138918
138934
|
formEvent.stopPropagation();
|
|
138919
138935
|
if (isReadOnly)
|
|
@@ -138988,7 +139004,7 @@ function Profile({ tenant, username, tenants, onClose, customization = {}, isAdm
|
|
|
138988
139004
|
var _a;
|
|
138989
139005
|
return (jsxs(Fragment$1, { children: [jsxs("div", { className: "relative mb-0", children: [jsx("div", { className: "absolute inset-y-0 left-4 flex items-center pointer-events-none", "aria-hidden": "true", children: jsx("div", { className: "bg-black text-white rounded w-8 h-8 flex items-center justify-center", children: jsx("span", { className: "font-bold text-sm", children: "X" }) }) }), jsx(Input, { id: "x", className: "w-full bg-gray-50 border-gray-200 focus:ring-blue-500 focus:border-blue-500 text-base py-3 pl-16 h-10", placeholder: t('profileIndex.placeholderX'), value: field.state.value, onChange: (e) => handleSocialLinkChange(e.target.value, field.handleChange, X_URL_PREFIX), disabled: socialForm.state.isSubmitting || isReadOnly })] }), jsx("p", { className: "text-red-500 dark:text-gray-400 text-sm", role: ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) ? 'alert' : undefined, "aria-live": "polite", children: field.state.meta.errors })] }));
|
|
138990
139006
|
},
|
|
138991
|
-
})] })] }) })), activeTab === 'education' && (jsxs(Tabs, { value: educationSubTab, onValueChange: setEducationSubTab, className: "space-y-4", children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "education", children: t('profileIndex.tabEducation') }), jsx(TabsTrigger, { value: "credentials", children: t('gradebookGradebookTab.typeCredentials') }), jsx(TabsTrigger, { value: "skills", children: t('gradebookGradebookTab.typeSkills') })] }), jsx(TabsContent, { value: "education", children: jsx(EducationTab, { org: tenant, username: username }) }), jsx(TabsContent, { value: "credentials", children: jsx(CredentialsList, { org: tenant, username: username }) }), jsx(TabsContent, { value: "skills", children: jsx(SkillsList, { org: tenant, username: username }) })] })), activeTab === 'gradebook' && jsx(GradebookTab, { org: tenant, username: username }), activeTab === 'experience' && (jsxs(Tabs, { value: experienceSubTab, onValueChange: setExperienceSubTab, className: "space-y-4", children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "experience", children: t('profileIndex.tabExperience') }), jsx(TabsTrigger, { value: "resume", children: t('profileIndex.tabResume') })] }), jsx(TabsContent, { value: "experience", children: jsx(ExperienceTab, { org: tenant, username: username }) }), jsx(TabsContent, { value: "resume", children: jsx(ResumeTab, { org: tenant, username: username }) })] })), activeTab === 'purchases' && jsx(PurchasesTab, { org: tenant, username: username }), activeTab === 'memory' && jsx(MemoryTab, { org: tenant, username: username }), activeTab === 'privacy' && jsx(ChatPrivacyTab, { org: tenant, username: username }), !isReadOnly && activeTab === 'security' && (jsx(Security, { app: currentSPA || '', email: (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email) || '', platformKey: tenant, onAccountDeleted: onAccountDeleted })), activeTab === 'advanced' && (localLLMProps || systemControlProps) && (jsxs("div", { className: "space-y-6", children: [localLLMProps && (jsx(LocalModelsContent, { isAvailable: localLLMProps.isAvailable, state: localLLMProps.state, ollamaStatus: localLLMProps.ollamaStatus, systemMemory: localLLMProps.systemMemory, isUsingFoundry: localLLMProps.isUsingFoundry, foundryModels: localLLMProps.foundryModels, selectedFoundryModel: localLLMProps.selectedFoundryModel, foundryStatus: localLLMProps.foundryStatus, onStartDownload: localLLMProps.onStartDownload, onCancelDownload: localLLMProps.onCancelDownload, onInstallOllama: localLLMProps.onInstallOllama, onStopManager: localLLMProps.onStopManager, onInstallFoundry: localLLMProps.onInstallFoundry, onCheckStatus: localLLMProps.onCheckStatus, onResetState: localLLMProps.onResetState, onSelectFoundryModel: localLLMProps.onSelectFoundryModel })), systemControlProps && (jsx(SystemControlContent, { isAvailable: systemControlProps.isAvailable, state: systemControlProps.state, status: systemControlProps.status, requiredSizeGb: systemControlProps.requiredSizeGb, ollamaStatus: systemControlProps.ollamaStatus, systemMemory: systemControlProps.systemMemory, accessibilityPermission: systemControlProps.accessibilityPermission, onInstall: systemControlProps.onInstall, onStop: systemControlProps.onStop, onCheckStatus: systemControlProps.onCheckStatus, onResetState: systemControlProps.onResetState, onRequestAccessibilityPermission: systemControlProps.onRequestAccessibilityPermission, onDownloadModel: systemControlProps.onDownloadModel }))] }))] }), !isReadOnly && ['basic', 'social'].includes(activeTab) && (jsx("div", { className: "flex-shrink-0 border-t border-gray-200 p-6 bg-white dark:bg-gray-900", children: jsxs("div", { className: "flex justify-end gap-3", children: [jsx(Button$1, { onClick: onClose, variant: "outline", children: t('profileIndex.buttonCancel') }), jsx(Button$1, { onClick: () => {
|
|
139007
|
+
})] })] }) })), activeTab === 'education' && (jsxs(Tabs, { value: educationSubTab, onValueChange: setEducationSubTab, className: "space-y-4", children: [jsxs("div", { className: "flex items-center justify-between gap-3", children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "education", children: t('profileIndex.tabEducation') }), jsx(TabsTrigger, { value: "credentials", children: t('gradebookGradebookTab.typeCredentials') }), jsx(TabsTrigger, { value: "skills", children: t('gradebookGradebookTab.typeSkills') })] }), headerAddButton] }), jsx(TabsContent, { value: "education", children: jsx(EducationTab, { org: tenant, username: username }) }), jsx(TabsContent, { value: "credentials", children: jsx(CredentialsList, { org: tenant, username: username }) }), jsx(TabsContent, { value: "skills", children: jsx(SkillsList, { org: tenant, username: username }) })] })), activeTab === 'gradebook' && jsx(GradebookTab, { org: tenant, username: username }), activeTab === 'experience' && (jsxs(Tabs, { value: experienceSubTab, onValueChange: setExperienceSubTab, className: "space-y-4", children: [jsxs("div", { className: "flex items-center justify-between gap-3", children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "experience", children: t('profileIndex.tabExperience') }), jsx(TabsTrigger, { value: "resume", children: t('profileIndex.tabResume') })] }), headerAddButton] }), jsx(TabsContent, { value: "experience", children: jsx(ExperienceTab, { org: tenant, username: username }) }), jsx(TabsContent, { value: "resume", children: jsx(ResumeTab, { org: tenant, username: username }) })] })), activeTab === 'purchases' && jsx(PurchasesTab, { org: tenant, username: username }), activeTab === 'memory' && jsx(MemoryTab, { org: tenant, username: username }), activeTab === 'privacy' && jsx(ChatPrivacyTab, { org: tenant, username: username }), !isReadOnly && activeTab === 'security' && (jsx(Security, { app: currentSPA || '', email: (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email) || '', platformKey: tenant, onAccountDeleted: onAccountDeleted })), activeTab === 'advanced' && (localLLMProps || systemControlProps) && (jsxs("div", { className: "space-y-6", children: [localLLMProps && (jsx(LocalModelsContent, { isAvailable: localLLMProps.isAvailable, state: localLLMProps.state, ollamaStatus: localLLMProps.ollamaStatus, systemMemory: localLLMProps.systemMemory, isUsingFoundry: localLLMProps.isUsingFoundry, foundryModels: localLLMProps.foundryModels, selectedFoundryModel: localLLMProps.selectedFoundryModel, foundryStatus: localLLMProps.foundryStatus, onStartDownload: localLLMProps.onStartDownload, onCancelDownload: localLLMProps.onCancelDownload, onInstallOllama: localLLMProps.onInstallOllama, onStopManager: localLLMProps.onStopManager, onInstallFoundry: localLLMProps.onInstallFoundry, onCheckStatus: localLLMProps.onCheckStatus, onResetState: localLLMProps.onResetState, onSelectFoundryModel: localLLMProps.onSelectFoundryModel })), systemControlProps && (jsx(SystemControlContent, { isAvailable: systemControlProps.isAvailable, state: systemControlProps.state, status: systemControlProps.status, requiredSizeGb: systemControlProps.requiredSizeGb, ollamaStatus: systemControlProps.ollamaStatus, systemMemory: systemControlProps.systemMemory, accessibilityPermission: systemControlProps.accessibilityPermission, onInstall: systemControlProps.onInstall, onStop: systemControlProps.onStop, onCheckStatus: systemControlProps.onCheckStatus, onResetState: systemControlProps.onResetState, onRequestAccessibilityPermission: systemControlProps.onRequestAccessibilityPermission, onDownloadModel: systemControlProps.onDownloadModel }))] }))] }), !isReadOnly && ['basic', 'social'].includes(activeTab) && (jsx("div", { className: "flex-shrink-0 border-t border-gray-200 p-6 bg-white dark:bg-gray-900", children: jsxs("div", { className: "flex justify-end gap-3", children: [jsx(Button$1, { onClick: onClose, variant: "outline", children: t('profileIndex.buttonCancel') }), jsx(Button$1, { onClick: () => {
|
|
138992
139008
|
if (activeTab === 'basic') {
|
|
138993
139009
|
basicForm.handleSubmit();
|
|
138994
139010
|
}
|
|
@@ -148987,26 +149003,19 @@ const ChatPrivacyContent = ({ platformKey, username }) => {
|
|
|
148987
149003
|
};
|
|
148988
149004
|
|
|
148989
149005
|
function StringSettingInput({ value, defaultValue, disabled, onSave, }) {
|
|
148990
|
-
const
|
|
148991
|
-
const
|
|
149006
|
+
const t = useT();
|
|
149007
|
+
const savedValue = value || defaultValue;
|
|
149008
|
+
const [localValue, setLocalValue] = useState(savedValue);
|
|
148992
149009
|
useEffect(() => {
|
|
148993
|
-
setLocalValue(
|
|
148994
|
-
}, [
|
|
148995
|
-
const
|
|
148996
|
-
|
|
148997
|
-
if (
|
|
148998
|
-
|
|
148999
|
-
|
|
149000
|
-
onSave(newValue);
|
|
149001
|
-
}, 800);
|
|
149010
|
+
setLocalValue(savedValue);
|
|
149011
|
+
}, [savedValue]);
|
|
149012
|
+
const isDirty = localValue !== savedValue;
|
|
149013
|
+
const handleSave = () => {
|
|
149014
|
+
if (!isDirty || disabled)
|
|
149015
|
+
return;
|
|
149016
|
+
onSave(localValue);
|
|
149002
149017
|
};
|
|
149003
|
-
|
|
149004
|
-
return () => {
|
|
149005
|
-
if (debounceRef.current)
|
|
149006
|
-
clearTimeout(debounceRef.current);
|
|
149007
|
-
};
|
|
149008
|
-
}, []);
|
|
149009
|
-
return (jsxs("div", { className: "flex items-center gap-2", children: [jsx(Input, { value: localValue, onChange: (e) => handleChange(e.target.value), disabled: disabled, className: "max-w-[240px] w-[110px] sm:w-[230px] font-medium text-[#646464] text-sm" }), disabled && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] }));
|
|
149018
|
+
return (jsxs("div", { className: "flex items-center gap-2", children: [isDirty && (jsx(Button$1, { type: "button", size: "sm", onClick: handleSave, disabled: disabled, className: "h-8 bg-blue-500 hover:bg-blue-600 text-white", children: t('advancedAdvanced.save') })), jsx(Input, { value: localValue, onChange: (e) => setLocalValue(e.target.value), disabled: disabled, className: "max-w-[240px] w-[110px] sm:w-[230px] font-medium text-[#646464] text-sm" }), disabled && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] }));
|
|
149010
149019
|
}
|
|
149011
149020
|
function AdvancedTab({ platformKey, username, currentSPA, authURL, currentPlatformBaseDomain, }) {
|
|
149012
149021
|
const t = useT();
|
|
@@ -149052,6 +149061,7 @@ function AdvancedTab({ platformKey, username, currentSPA, authURL, currentPlatfo
|
|
|
149052
149061
|
'overall_default_mentor',
|
|
149053
149062
|
'help_center_url',
|
|
149054
149063
|
'monetization_base_path',
|
|
149064
|
+
'skills_welcome_tagline',
|
|
149055
149065
|
];
|
|
149056
149066
|
const configurableMetadatas = allMetadatas.filter((metadata) => (typeof metadata.defaultValue === 'boolean' ||
|
|
149057
149067
|
(typeof metadata.defaultValue === 'string' &&
|
|
@@ -169827,7 +169837,7 @@ var EditorContentWithKey = forwardRef(
|
|
|
169827
169837
|
}
|
|
169828
169838
|
);
|
|
169829
169839
|
var EditorContent = React__default.memo(EditorContentWithKey);
|
|
169830
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
169840
|
+
var useIsomorphicLayoutEffect$1 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
169831
169841
|
var EditorStateManager = class {
|
|
169832
169842
|
constructor(initialEditor) {
|
|
169833
169843
|
this.transactionNumber = 0;
|
|
@@ -169895,7 +169905,7 @@ function useEditorState(options) {
|
|
|
169895
169905
|
options.selector,
|
|
169896
169906
|
(_a = options.equalityFn) != null ? _a : deepEqual
|
|
169897
169907
|
);
|
|
169898
|
-
useIsomorphicLayoutEffect(() => {
|
|
169908
|
+
useIsomorphicLayoutEffect$1(() => {
|
|
169899
169909
|
return editorStateManager.watch(options.editor);
|
|
169900
169910
|
}, [options.editor, editorStateManager]);
|
|
169901
169911
|
useDebugValue(selectedState);
|
|
@@ -223008,11 +223018,44 @@ function formatInterval(interval) {
|
|
|
223008
223018
|
return '';
|
|
223009
223019
|
return `/${interval}`;
|
|
223010
223020
|
}
|
|
223021
|
+
// Avoids the SSR warning while still measuring/aligning before the browser paints.
|
|
223022
|
+
const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
223011
223023
|
function PaywallModal({ pricing, platformKey, itemId, itemType, open, onClose, closable = true, buttonClassName, }) {
|
|
223012
223024
|
const t = useT();
|
|
223013
223025
|
const [createCheckout, { isLoading: isCheckoutLoading }] = useCreateCheckoutMutation();
|
|
223014
223026
|
const [selectedPriceId, setSelectedPriceId] = useState(null);
|
|
223015
223027
|
const activePrices = pricing.prices;
|
|
223028
|
+
// Keep the title/description block the same height on every card (the tallest
|
|
223029
|
+
// one's height) so the price + Pay button below always line up, regardless of
|
|
223030
|
+
// how long each plan's title or description is.
|
|
223031
|
+
const gridRef = useRef(null);
|
|
223032
|
+
const headerRefs = useRef([]);
|
|
223033
|
+
headerRefs.current.length = activePrices.length;
|
|
223034
|
+
const equalizeHeaderHeights = useCallback(() => {
|
|
223035
|
+
const headers = headerRefs.current.filter((el) => el != null && el.isConnected);
|
|
223036
|
+
// Reset first so we measure each header's natural height, not a stale value.
|
|
223037
|
+
headers.forEach((el) => {
|
|
223038
|
+
el.style.minHeight = '';
|
|
223039
|
+
});
|
|
223040
|
+
if (headers.length <= 1)
|
|
223041
|
+
return;
|
|
223042
|
+
const maxHeight = headers.reduce((max, el) => Math.max(max, el.offsetHeight), 0);
|
|
223043
|
+
headers.forEach((el) => {
|
|
223044
|
+
el.style.minHeight = `${maxHeight}px`;
|
|
223045
|
+
});
|
|
223046
|
+
}, []);
|
|
223047
|
+
useIsomorphicLayoutEffect(() => {
|
|
223048
|
+
if (!open)
|
|
223049
|
+
return;
|
|
223050
|
+
equalizeHeaderHeights();
|
|
223051
|
+
const grid = gridRef.current;
|
|
223052
|
+
if (!grid || typeof ResizeObserver === 'undefined')
|
|
223053
|
+
return;
|
|
223054
|
+
// Re-run when the grid resizes (viewport changes wrap the descriptions).
|
|
223055
|
+
const observer = new ResizeObserver(() => equalizeHeaderHeights());
|
|
223056
|
+
observer.observe(grid);
|
|
223057
|
+
return () => observer.disconnect();
|
|
223058
|
+
}, [open, activePrices, equalizeHeaderHeights]);
|
|
223016
223059
|
const handleCheckout = async (price) => {
|
|
223017
223060
|
setSelectedPriceId(price.id);
|
|
223018
223061
|
try {
|
|
@@ -223032,16 +223075,35 @@ function PaywallModal({ pricing, platformKey, itemId, itemType, open, onClose, c
|
|
|
223032
223075
|
setSelectedPriceId(null);
|
|
223033
223076
|
}
|
|
223034
223077
|
};
|
|
223078
|
+
const preventClose = (e) => {
|
|
223079
|
+
if (!closable)
|
|
223080
|
+
e.preventDefault();
|
|
223081
|
+
};
|
|
223082
|
+
// Single pricing tier: render the focused, card-style layout that matches
|
|
223083
|
+
// UpgradePackageModal instead of a lone card floating in the wide grid modal.
|
|
223084
|
+
if (activePrices.length === 1) {
|
|
223085
|
+
const price = activePrices[0];
|
|
223086
|
+
const isThisLoading = isCheckoutLoading && selectedPriceId === price.id;
|
|
223087
|
+
return (jsx(Dialog, { open: open, onOpenChange: (isOpen) => {
|
|
223088
|
+
if (!isOpen && closable)
|
|
223089
|
+
onClose();
|
|
223090
|
+
}, children: jsxs(DialogContent, { className: cn('max-w-md gap-0 p-0 overflow-hidden rounded-[10px] border border-[#e5e5e5] shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1),0_4px_6px_-4px_rgba(0,0,0,0.1)]', !closable && '[&>button.absolute]:hidden'), onPointerDownOutside: preventClose, onEscapeKeyDown: preventClose, children: [jsxs("div", { className: "relative flex flex-col items-center px-6 pt-8 pb-6 bg-[linear-gradient(135deg,#f5f8ff_0%,#ffffff_100%)] border-b border-[#e5e7eb]", children: [jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full mb-4", style: {
|
|
223091
|
+
background: 'linear-gradient(to right, rgb(56, 161, 229), rgb(114, 132, 255))',
|
|
223092
|
+
boxShadow: '0 4px 12px -2px rgba(56, 161, 229, 0.4)',
|
|
223093
|
+
}, children: jsx(Sparkles, { className: "h-6 w-6 text-white" }) }), jsxs("span", { className: "inline-flex items-baseline gap-1 rounded-full px-3 py-1 text-[13px] font-semibold leading-4 mb-3", style: {
|
|
223094
|
+
backgroundColor: '#f5f8ff',
|
|
223095
|
+
color: '#155dfc',
|
|
223096
|
+
border: '1px solid #d0e0ff',
|
|
223097
|
+
}, children: [formatPrice(price.amount, price.currency), price.interval !== 'one_time' && (jsx("span", { className: "text-[11px] font-normal opacity-80", children: formatInterval(price.interval) }))] }), jsxs(DialogHeader, { className: "text-center sm:text-center space-y-2", children: [jsx(DialogTitle, { className: "text-[18px] font-medium leading-7 text-[#101828] tracking-tight", children: price.name || t('modalsPaywallModal.chooseYourPlan') }), jsx(DialogDescription, { className: "text-[14px] font-normal leading-[22.75px] text-[#4a5565] max-w-[320px] mx-auto", children: price.description ||
|
|
223098
|
+
t('modalsPaywallModal.subscribeToGetAccess', { itemName: pricing.item_name }) })] })] }), jsxs("div", { className: "px-6 py-5", children: [price.features.length > 0 && (jsx("ul", { className: "space-y-3 mb-6", children: price.features.map((feature, idx) => (jsxs("li", { className: "flex items-start gap-3 text-[14px] leading-5 text-[#364153]", children: [jsx("span", { className: "mt-0.5 flex h-5 w-5 items-center justify-center rounded-full bg-[#f5f8ff] shrink-0", children: jsx(Check, { className: "h-3 w-3 text-[#155dfc]", strokeWidth: 3 }) }), jsx("span", { className: "font-normal", children: feature })] }, idx))) })), jsx(Button$1, { type: "button", onClick: () => handleCheckout(price), disabled: isCheckoutLoading, className: cn('w-full h-9 px-6 py-2 rounded-lg border-0 text-white text-[14px] font-medium leading-5 bg-[linear-gradient(to_right,rgb(56,161,229),rgb(114,132,255))] hover:opacity-90 transition-opacity disabled:opacity-70', buttonClassName), children: isThisLoading ? (jsxs(Fragment$1, { children: [jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" }), jsx("span", { children: t('modalsPaywallModal.redirecting') })] })) : (t('modalsPaywallModal.pay')) }), jsxs("div", { className: "mt-3 flex items-center justify-center gap-1.5 text-[12px] font-normal leading-4 text-[#6a7282]", children: [jsx(CreditCard, { className: "h-3.5 w-3.5", "aria-hidden": "true" }), jsx("span", { children: t('modalsPaywallModal.secureCheckout') })] })] })] }) }));
|
|
223099
|
+
}
|
|
223035
223100
|
return (jsx(Dialog, { open: open, onOpenChange: (isOpen) => {
|
|
223036
223101
|
if (!isOpen && closable)
|
|
223037
223102
|
onClose();
|
|
223038
|
-
}, children: jsxs(DialogContent, { className: cn('max-w-5xl gap-0 overflow-y-auto max-h-[90vh] p-8', !closable && '[&>button.absolute]:hidden'), onPointerDownOutside: (
|
|
223039
|
-
|
|
223040
|
-
|
|
223041
|
-
|
|
223042
|
-
if (!closable)
|
|
223043
|
-
e.preventDefault();
|
|
223044
|
-
}, children: [jsxs(DialogHeader, { className: "text-center sm:text-center mb-8", children: [jsx(DialogTitle, { className: "text-3xl font-bold tracking-tight", children: t('modalsPaywallModal.chooseYourPlan') }), jsx(DialogDescription, { className: "text-base text-muted-foreground mt-2", children: t('modalsPaywallModal.subscribeToGetAccess', { itemName: pricing.item_name }) })] }), jsx("div", { className: cn('grid gap-5', activePrices.length === 1 && 'grid-cols-1 max-w-sm mx-auto', activePrices.length === 2 && 'grid-cols-1 sm:grid-cols-2 max-w-2xl mx-auto', activePrices.length === 3 && 'grid-cols-1 sm:grid-cols-2 lg:grid-cols-3', activePrices.length >= 4 && 'grid-cols-1 sm:grid-cols-2 lg:grid-cols-4'), children: activePrices.map((price) => (jsxs("div", { className: "rounded-xl bg-muted/50 p-6 flex flex-col gap-5", children: [jsxs("div", { children: [jsx("h3", { className: "text-xl font-bold", children: price.name }), price.description && (jsx("p", { className: "text-sm text-muted-foreground mt-2 leading-relaxed", children: price.description }))] }), jsxs("div", { className: "flex items-baseline gap-1", children: [jsx("span", { className: "text-4xl font-bold tracking-tight", children: formatPrice(price.amount, price.currency) }), price.interval !== 'one_time' && (jsx("span", { className: "text-sm text-muted-foreground", children: formatInterval(price.interval) }))] }), jsx(Button$1, { onClick: () => handleCheckout(price), disabled: isCheckoutLoading, className: cn('w-full h-11 text-sm font-medium', buttonClassName), children: isCheckoutLoading && selectedPriceId === price.id
|
|
223103
|
+
}, children: jsxs(DialogContent, { className: cn('max-w-5xl gap-0 overflow-y-auto max-h-[90vh] p-8', !closable && '[&>button.absolute]:hidden'), onPointerDownOutside: preventClose, onEscapeKeyDown: preventClose, children: [jsxs(DialogHeader, { className: "text-center sm:text-center mb-8", children: [jsx(DialogTitle, { className: "text-3xl font-bold tracking-tight", children: t('modalsPaywallModal.chooseYourPlan') }), jsx(DialogDescription, { className: "text-base text-muted-foreground mt-2", children: t('modalsPaywallModal.subscribeToGetAccess', { itemName: pricing.item_name }) })] }), jsx("div", { ref: gridRef, className: cn('grid gap-5 items-stretch', activePrices.length === 2 &&
|
|
223104
|
+
'grid-cols-1 sm:grid-cols-2 sm:auto-cols-fr max-w-2xl mx-auto', activePrices.length === 3 && 'grid-cols-1 sm:grid-cols-2 lg:grid-cols-3', activePrices.length >= 4 && 'grid-cols-1 sm:grid-cols-2 lg:grid-cols-4'), children: activePrices.map((price, index) => (jsxs("div", { className: "rounded-xl bg-muted/50 p-6 flex flex-col gap-5 min-w-[16rem]", children: [jsxs("div", { ref: (el) => {
|
|
223105
|
+
headerRefs.current[index] = el;
|
|
223106
|
+
}, children: [jsx("h3", { className: "text-xl font-bold", children: price.name }), price.description && (jsx("p", { className: "text-sm text-muted-foreground mt-2 leading-relaxed", children: price.description }))] }), jsxs("div", { className: "flex items-baseline gap-1", children: [jsx("span", { className: "text-4xl font-bold tracking-tight", children: formatPrice(price.amount, price.currency) }), price.interval !== 'one_time' && (jsx("span", { className: "text-sm text-muted-foreground", children: formatInterval(price.interval) }))] }), jsx(Button$1, { onClick: () => handleCheckout(price), disabled: isCheckoutLoading, className: cn('w-full h-11 text-sm font-medium', buttonClassName), children: isCheckoutLoading && selectedPriceId === price.id
|
|
223045
223107
|
? t('modalsPaywallModal.redirecting')
|
|
223046
223108
|
: t('modalsPaywallModal.pay') }), price.features.length > 0 && (jsxs("div", { children: [jsx("p", { className: "text-sm font-medium mb-3", children: t('modalsPaywallModal.thisIncludes') }), jsx("ul", { className: "space-y-3", children: price.features.map((feature, idx) => (jsxs("li", { className: "flex items-start gap-2.5 text-sm", children: [jsx(CircleCheckBig, { className: "h-4 w-4 text-primary shrink-0 mt-0.5" }), jsx("span", { className: "leading-snug", children: feature })] }, idx))) })] }))] }, price.id))) })] }) }));
|
|
223047
223109
|
}
|
|
@@ -223580,6 +223642,57 @@ function CreditBalance({ tenant, username, mainPlatformKey, currentUserEmail, re
|
|
|
223580
223642
|
: t('creditBalance.manageBilling')] })) }))] }), jsx(AutoRechargeModal, { tenant: tenant, isOpen: isAutoRechargeModalOpen, onClose: () => setIsAutoRechargeModalOpen(false) }), jsx(AddCreditsModal, { tenant: tenant, isOpen: isAddCreditsModalOpen, onClose: () => setIsAddCreditsModalOpen(false) }), jsx(AppleRestrictionModal, { isOpen: isAppleRestrictionModalOpen, onClose: () => setIsAppleRestrictionModalOpen(false) })] }));
|
|
223581
223643
|
}
|
|
223582
223644
|
|
|
223645
|
+
function c(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i(r,n){return r===n}function a(n,t,a){var o=i,f=useRef(n),l=useState({})[1],v=c(useCallback(function(r){f.current=r,l({});},[l]),t,a),m=useRef(n);return o(m.current,n)||(v(n),m.current=n),[f.current,v]}
|
|
223646
|
+
|
|
223647
|
+
const DEFAULT_ITEMS_PER_PAGE = 10;
|
|
223648
|
+
const DEFAULT_DEBOUNCE_MS = 500;
|
|
223649
|
+
/** Manages the projects list: debounced search, pagination, and the paged query. */
|
|
223650
|
+
function useProjects({ tenantKey, username, itemsPerPage = DEFAULT_ITEMS_PER_PAGE, debounceMs = DEFAULT_DEBOUNCE_MS, }) {
|
|
223651
|
+
var _a, _b;
|
|
223652
|
+
const [searchValue, setSearchValue] = useState('');
|
|
223653
|
+
const [debouncedSearch] = a(searchValue, debounceMs);
|
|
223654
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
223655
|
+
// A new search yields a different result set, so any page beyond the first is
|
|
223656
|
+
// meaningless. This is adjusted during render rather than in an effect so that
|
|
223657
|
+
// `page` is already correct on this pass — an effect would let the query fire
|
|
223658
|
+
// once for the stale offset before the reset landed.
|
|
223659
|
+
const [prevDebouncedSearch, setPrevDebouncedSearch] = useState(debouncedSearch);
|
|
223660
|
+
let page = currentPage;
|
|
223661
|
+
if (prevDebouncedSearch !== debouncedSearch) {
|
|
223662
|
+
setPrevDebouncedSearch(debouncedSearch);
|
|
223663
|
+
setCurrentPage(1);
|
|
223664
|
+
page = 1;
|
|
223665
|
+
}
|
|
223666
|
+
const { data, isLoading, isFetching, error } = useGetUserProjectsQuery({
|
|
223667
|
+
tenantKey,
|
|
223668
|
+
username,
|
|
223669
|
+
params: {
|
|
223670
|
+
limit: itemsPerPage,
|
|
223671
|
+
offset: (page - 1) * itemsPerPage,
|
|
223672
|
+
search: debouncedSearch || undefined,
|
|
223673
|
+
},
|
|
223674
|
+
}, { skip: !username || !tenantKey });
|
|
223675
|
+
const projects = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
|
|
223676
|
+
const totalPages = Math.ceil(((_b = data === null || data === void 0 ? void 0 : data.count) !== null && _b !== void 0 ? _b : 0) / itemsPerPage);
|
|
223677
|
+
// Spans the debounce window (searchValue ahead of debouncedSearch) and the
|
|
223678
|
+
// fetch that follows. Gated on an active term so paging an unfiltered list
|
|
223679
|
+
// doesn't register as searching.
|
|
223680
|
+
const isSearching = searchValue !== debouncedSearch || (isFetching && debouncedSearch !== '');
|
|
223681
|
+
return {
|
|
223682
|
+
projects,
|
|
223683
|
+
totalPages,
|
|
223684
|
+
page,
|
|
223685
|
+
setPage: setCurrentPage,
|
|
223686
|
+
searchValue,
|
|
223687
|
+
setSearchValue,
|
|
223688
|
+
debouncedSearch,
|
|
223689
|
+
isLoading,
|
|
223690
|
+
isFetching,
|
|
223691
|
+
isSearching,
|
|
223692
|
+
error,
|
|
223693
|
+
};
|
|
223694
|
+
}
|
|
223695
|
+
|
|
223583
223696
|
const CreateProjectModal$1 = lazy(() => Promise.resolve().then(function () { return createProjectModal; }).then((mod) => ({
|
|
223584
223697
|
default: mod.CreateProjectModal,
|
|
223585
223698
|
})));
|
|
@@ -223591,19 +223704,10 @@ const DeleteProjectModal$1 = lazy(() => Promise.resolve().then(function () { ret
|
|
|
223591
223704
|
})));
|
|
223592
223705
|
function ProjectsPage({ tenantKey, username, onOpenProject, navigateToMentorInProject, executeWithTrialCheck = (fn) => fn(), }) {
|
|
223593
223706
|
const t = useT();
|
|
223594
|
-
const
|
|
223707
|
+
const { projects, totalPages, page, setPage, searchValue, setSearchValue, isLoading, isFetching, isSearching, error, } = useProjects({ tenantKey, username });
|
|
223595
223708
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
|
|
223596
223709
|
const [renameModalData, setRenameModalData] = useState({ isOpen: false, projectId: '', currentName: '' });
|
|
223597
223710
|
const [deleteModalData, setDeleteModalData] = useState({ isOpen: false, projectId: '', projectName: '' });
|
|
223598
|
-
const { data, isLoading, error } = useGetUserProjectsQuery({
|
|
223599
|
-
tenantKey: tenantKey,
|
|
223600
|
-
username: username,
|
|
223601
|
-
params: {
|
|
223602
|
-
limit: 50,
|
|
223603
|
-
search: searchValue || undefined,
|
|
223604
|
-
},
|
|
223605
|
-
}, { skip: !username || !tenantKey });
|
|
223606
|
-
const projects = useMemo(() => { var _a; return (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : []; }, [data]);
|
|
223607
223711
|
const handleRenameProject = (projectId, currentName) => {
|
|
223608
223712
|
setRenameModalData({ isOpen: true, projectId, currentName });
|
|
223609
223713
|
};
|
|
@@ -223619,13 +223723,13 @@ function ProjectsPage({ tenantKey, username, onOpenProject, navigateToMentorInPr
|
|
|
223619
223723
|
if (error) {
|
|
223620
223724
|
return (jsx("div", { className: "flex h-full items-center justify-center", children: jsxs("div", { className: "text-center", children: [jsx(CircleAlert, { className: "mx-auto mb-4 h-12 w-12 text-red-500" }), jsx("p", { className: "text-gray-600", children: t('projectsProjectsPage.failedToLoadProjects') })] }) }));
|
|
223621
223725
|
}
|
|
223622
|
-
return (jsxs("div", { className: "flex h-full overflow-hidden", children: [jsx("div", { className: "scrollbar-hide flex-1 overflow-y-auto", children: jsxs("div", { className: "mx-auto max-w-[920px] px-3 py-6 md:px-6 md:py-8", children: [jsxs("div", { className: "mb-6", children: [jsx("h1", { className: "mb-2 text-2xl font-semibold text-gray-700", children: t('projectsProjectsPage.heading') }), jsx("p", { className: "text-sm text-gray-600", children: t('projectsProjectsPage.subheading') })] }), jsxs("div", { className: "mb-6 flex flex-col gap-4 sm:flex-row", children: [jsxs("div", { className: "relative flex-1", children: [jsx(Search, { className: "absolute top-1/2 left-4 h-5 w-5 -translate-y-1/2 transform text-gray-400" }), jsx(Input, { placeholder: t('projectsProjectsPage.searchPlaceholder'), value: searchValue, onChange: (e) => setSearchValue(e.target.value), className:
|
|
223726
|
+
return (jsxs("div", { className: "flex h-full overflow-hidden", children: [jsx("div", { className: "scrollbar-hide flex-1 overflow-y-auto", children: jsxs("div", { className: "mx-auto max-w-[920px] px-3 py-6 md:px-6 md:py-8", children: [jsxs("div", { className: "mb-6", children: [jsx("h1", { className: "mb-2 text-2xl font-semibold text-gray-700", children: t('projectsProjectsPage.heading') }), jsx("p", { className: "text-sm text-gray-600", children: t('projectsProjectsPage.subheading') })] }), jsxs("div", { className: "mb-6 flex flex-col gap-4 sm:flex-row", children: [jsxs("div", { className: "relative flex-1", children: [jsx(Search, { className: "absolute top-1/2 left-4 h-5 w-5 -translate-y-1/2 transform text-gray-400" }), jsx(Input, { placeholder: t('projectsProjectsPage.searchPlaceholder'), value: searchValue, onChange: (e) => setSearchValue(e.target.value), className: `w-full rounded-lg border-gray-300 py-3 pl-12 text-base focus:border-blue-500 focus:ring-2 focus:ring-blue-500 ${isSearching ? 'pr-11' : 'pr-4'}` }), isSearching && (jsx(LoaderCircle, { role: "status", "aria-label": t('projectsProjectsPage.searching'), className: "absolute top-1/2 right-4 h-5 w-5 -translate-y-1/2 transform animate-spin text-blue-500" }))] }), jsxs(Button$1, { className: "rounded-lg bg-gradient-to-r from-[#38A1E5] to-[#7284FF] px-6 py-3 whitespace-nowrap text-white hover:from-[#2E8BD1] hover:to-[#5F6FE8]", onClick: () => executeWithTrialCheck(() => setIsCreateModalOpen(true)), children: [jsx(Plus, { className: "mr-2 h-5 w-5" }), t('projectsProjectsPage.newProject')] })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-12", children: jsx(LoaderCircle, { className: "h-8 w-8 animate-spin text-gray-400" }) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: projects.map((project) => (jsx(Card, { className: "cursor-pointer rounded-lg border border-[#D0E0FF] bg-[#F5F8FF] transition-shadow hover:shadow-md", onClick: () => executeWithTrialCheck(() => onOpenProject(project)), children: jsxs(CardContent, { className: "p-6", children: [jsxs("div", { className: "mb-3 flex items-start justify-between gap-2", children: [jsx("h3", { className: "text-base font-semibold text-gray-900", children: project.name }), jsxs(DropdownMenu, { modal: false, children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { variant: "ghost", size: "icon", className: "h-7 w-7 flex-shrink-0 text-gray-500 hover:bg-[#c9d8f8]", "aria-label": t('projectsProjectsPage.projectActions'), onClick: (e) => e.stopPropagation(), children: jsx(EllipsisVertical, { className: "h-4 w-4" }) }) }), jsxs(DropdownMenuContent, { align: "end", onClick: (e) => e.stopPropagation(), children: [jsxs(DropdownMenuItem, { onClick: (e) => {
|
|
223623
223727
|
e.stopPropagation();
|
|
223624
223728
|
executeWithTrialCheck(() => handleRenameProject(String(project.id), project.name));
|
|
223625
|
-
}, children: [jsx(Pencil, { className: "mr-2 h-4 w-4" }), t('projectsProjectsPage.rename')] }), jsxs(DropdownMenuItem, {
|
|
223729
|
+
}, children: [jsx(Pencil, { className: "mr-2 h-4 w-4" }), t('projectsProjectsPage.rename')] }), jsxs(DropdownMenuItem, { onClick: (e) => {
|
|
223626
223730
|
e.stopPropagation();
|
|
223627
223731
|
executeWithTrialCheck(() => handleDeleteProject(String(project.id), project.name));
|
|
223628
|
-
}, children: [jsx(Trash2, { className: "mr-2 h-4 w-4" }), t('projectsProjectsPage.delete')] })] })] })] }), jsx("div", { className: "flex items-center text-xs text-gray-500", children: jsx("span", { children: t('projectsProjectsPage.agentCount', { count: project.mentor_count }) }) })] }) }, project.id))) }), projects.length === 0 && !
|
|
223732
|
+
}, children: [jsx(Trash2, { className: "mr-2 h-4 w-4" }), t('projectsProjectsPage.delete')] })] })] })] }), jsx("div", { className: "flex items-center text-xs text-gray-500", children: jsx("span", { children: t('projectsProjectsPage.agentCount', { count: project.mentor_count }) }) })] }) }, project.id))) }), totalPages > 1 && (jsx("div", { className: "mt-8", children: jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isFetching }) })), projects.length === 0 && !isFetching && (jsxs("div", { className: "py-12 text-center", children: [jsx("p", { className: "mb-4 text-gray-500", children: t('projectsProjectsPage.noProjectsFound') }), jsxs(Button$1, { variant: "outline", onClick: () => executeWithTrialCheck(() => setIsCreateModalOpen(true)), className: "border-gray-300", children: [jsx(Plus, { className: "mr-2 h-4 w-4" }), t('projectsProjectsPage.createFirstProject')] })] }))] }))] }) }), isCreateModalOpen && (jsx(Suspense, { fallback: null, children: jsx(CreateProjectModal$1, { isOpen: isCreateModalOpen, onClose: () => setIsCreateModalOpen(false), tenantKey: tenantKey, username: username, navigateToMentorInProject: navigateToMentorInProject }) })), renameModalData.isOpen && (jsx(Suspense, { fallback: null, children: jsx(RenameProjectModal$1, { isOpen: renameModalData.isOpen, onClose: handleCloseRenameModal, projectId: renameModalData.projectId, currentName: renameModalData.currentName, tenantKey: tenantKey, username: username }) })), deleteModalData.isOpen && (jsx(Suspense, { fallback: null, children: jsx(DeleteProjectModal$1, { isOpen: deleteModalData.isOpen, onClose: handleCloseDeleteModal, projectId: deleteModalData.projectId, projectName: deleteModalData.projectName, tenantKey: tenantKey, username: username }) }))] }));
|
|
223629
223733
|
}
|
|
223630
223734
|
|
|
223631
223735
|
const DeepSearchIcon = ({ className }) => (jsx("svg", { width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M17.2743 17.9886C17.2743 16.7316 16.2549 15.7124 14.9979 15.7122C13.7408 15.7122 12.7216 16.7315 12.7216 17.9886C12.7217 19.2456 13.7409 20.265 14.9979 20.265C16.2549 20.2649 17.2742 19.2456 17.2743 17.9886ZM5.70935 13.0653C4.92914 13.39 4.52833 14.2595 4.78943 15.0633L5.28895 16.5971L5.34607 16.748C5.6666 17.4806 6.48392 17.8782 7.26941 17.6576L10.9535 16.6205C11.5241 14.9329 13.1178 13.7171 14.9979 13.7171C16.0406 13.7172 16.9956 14.0911 17.7372 14.7118L19.6386 14.1771L19.5404 13.9208L17.6493 8.10094L5.70935 13.0653ZM21.893 4.58677L21.7011 4.62925L20.456 5.03356C19.6044 5.31043 19.1378 6.22539 19.4144 7.077L21.4389 13.3041L21.4974 13.4593C21.8292 14.2111 22.6839 14.605 23.4824 14.3456L24.7274 13.9398L24.9062 13.8607C25.2414 13.6704 25.433 13.2961 25.3895 12.9129L25.3485 12.7225L22.9199 5.24888C22.7753 4.80483 22.3397 4.53635 21.893 4.58677ZM19.2695 17.9886C19.2693 19.382 18.5982 20.6148 17.5658 21.3944L20.4267 25.9706L20.516 26.1522C20.6781 26.5869 20.519 27.0905 20.1102 27.3461C19.7015 27.6015 19.179 27.524 18.8592 27.1878L18.7347 27.0282L15.7128 22.1942C15.48 22.2335 15.2418 22.26 14.9979 22.2602C14.7526 22.2602 14.5127 22.2339 14.2787 22.1942L11.2582 27.0282L11.1337 27.1878C10.8139 27.524 10.2914 27.6015 9.8827 27.3461C9.41571 27.054 9.27436 26.4377 9.56629 25.9706L12.4257 21.3929C11.5843 20.7564 10.9867 19.8186 10.7953 18.7371L7.80994 19.578C6.05816 20.0706 4.23476 19.1844 3.51941 17.5506L3.39197 17.2137L2.89246 15.68C2.3098 13.8868 3.20363 11.9463 4.94471 11.2225L17.3813 6.05015C17.5755 4.73435 18.4886 3.5757 19.8393 3.13658L21.0858 2.73082L21.3773 2.6517C22.8447 2.33417 24.3429 3.17504 24.8168 4.63364L27.2456 12.1058L27.3246 12.3988C27.6204 13.7681 26.9088 15.1646 25.6269 15.7298L25.3442 15.8382L24.0975 16.2425C23.031 16.5888 21.9203 16.4129 21.0419 15.8558L18.9735 16.4358C19.1618 16.9175 19.2695 17.4404 19.2695 17.9886Z", fill: "currentColor" }) }));
|
|
@@ -223712,8 +223816,6 @@ function ProjectMentorsList({ projectMentors, onMentorRemoved, onAddMentorClick,
|
|
|
223712
223816
|
}) }), showMinimumMentorAlert && (jsx(Suspense, { fallback: null, children: jsx(MinimumMentorAlert$1, { open: showMinimumMentorAlert, onOpenChange: setShowMinimumMentorAlert }) }))] }));
|
|
223713
223817
|
}
|
|
223714
223818
|
|
|
223715
|
-
function c(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i(r,n){return r===n}function a(n,t,a){var o=i,f=useRef(n),l=useState({})[1],v=c(useCallback(function(r){f.current=r,l({});},[l]),t,a),m=useRef(n);return o(m.current,n)||(v(n),m.current=n),[f.current,v]}
|
|
223716
|
-
|
|
223717
223819
|
const AgentSettingsContext = React__default.createContext(null);
|
|
223718
223820
|
function AgentSettingsProvider({ children, ...value }) {
|
|
223719
223821
|
const ctx = React__default.useMemo(() => value,
|
|
@@ -96962,6 +96962,7 @@ var advancePagination$3 = {
|
|
|
96962
96962
|
var advancedAdvanced$3 = {
|
|
96963
96963
|
failedToUpdateSetting: "Failed to update setting",
|
|
96964
96964
|
settingUpdatedSuccessfully: "Setting updated successfully",
|
|
96965
|
+
save: "Save",
|
|
96965
96966
|
agentSettingUpdatedSuccessfully: "Agent setting updated successfully",
|
|
96966
96967
|
chatAreaSizeUpdatedSuccessfully: "Chat area size updated successfully",
|
|
96967
96968
|
moreInfoAbout: "More info about {label}",
|
|
@@ -99539,7 +99540,8 @@ var modalsPaywallModal$3 = {
|
|
|
99539
99540
|
subscribeToGetAccess: "Subscribe to get access to {itemName}",
|
|
99540
99541
|
redirecting: "Redirecting...",
|
|
99541
99542
|
pay: "Pay",
|
|
99542
|
-
thisIncludes: "This includes:"
|
|
99543
|
+
thisIncludes: "This includes:",
|
|
99544
|
+
secureCheckout: "Secure checkout"
|
|
99543
99545
|
};
|
|
99544
99546
|
var modalsPromptGalleryModal$3 = {
|
|
99545
99547
|
promptGallery: "Prompt Gallery",
|
|
@@ -100299,7 +100301,8 @@ var projectsProjectsPage$3 = {
|
|
|
100299
100301
|
"delete": "Delete",
|
|
100300
100302
|
agentCount: "{count} {count, plural, one {agent} other {agents}}",
|
|
100301
100303
|
noProjectsFound: "No projects found",
|
|
100302
|
-
createFirstProject: "Create your first project"
|
|
100304
|
+
createFirstProject: "Create your first project",
|
|
100305
|
+
searching: "Searching..."
|
|
100303
100306
|
};
|
|
100304
100307
|
var projectsRenameProjectModal$3 = {
|
|
100305
100308
|
title: "Rename Project",
|
|
@@ -102341,6 +102344,7 @@ var advancePagination$2 = {
|
|
|
102341
102344
|
var advancedAdvanced$2 = {
|
|
102342
102345
|
failedToUpdateSetting: "Échec de la mise à jour du paramètre",
|
|
102343
102346
|
settingUpdatedSuccessfully: "Paramètre mis à jour avec succès",
|
|
102347
|
+
save: "Enregistrer",
|
|
102344
102348
|
agentSettingUpdatedSuccessfully: "Paramètre de l'agent mis à jour avec succès",
|
|
102345
102349
|
chatAreaSizeUpdatedSuccessfully: "Taille de la zone de discussion mise à jour avec succès",
|
|
102346
102350
|
moreInfoAbout: "Plus d'informations sur {label}",
|
|
@@ -104918,7 +104922,8 @@ var modalsPaywallModal$2 = {
|
|
|
104918
104922
|
subscribeToGetAccess: "Abonnez-vous pour accéder à {itemName}",
|
|
104919
104923
|
redirecting: "Redirection en cours...",
|
|
104920
104924
|
pay: "Payer",
|
|
104921
|
-
thisIncludes: "Cela comprend :"
|
|
104925
|
+
thisIncludes: "Cela comprend :",
|
|
104926
|
+
secureCheckout: "Paiement sécurisé"
|
|
104922
104927
|
};
|
|
104923
104928
|
var modalsPromptGalleryModal$2 = {
|
|
104924
104929
|
promptGallery: "Galerie d'invites",
|
|
@@ -105678,7 +105683,8 @@ var projectsProjectsPage$2 = {
|
|
|
105678
105683
|
"delete": "Supprimer",
|
|
105679
105684
|
agentCount: "{count} {count, plural, one {agent} other {agents}}",
|
|
105680
105685
|
noProjectsFound: "Aucun projet trouvé",
|
|
105681
|
-
createFirstProject: "Créer votre premier projet"
|
|
105686
|
+
createFirstProject: "Créer votre premier projet",
|
|
105687
|
+
searching: "Recherche..."
|
|
105682
105688
|
};
|
|
105683
105689
|
var projectsRenameProjectModal$2 = {
|
|
105684
105690
|
title: "Renommer le projet",
|
|
@@ -107720,6 +107726,7 @@ var advancePagination$1 = {
|
|
|
107720
107726
|
var advancedAdvanced$1 = {
|
|
107721
107727
|
failedToUpdateSetting: "Error al actualizar la configuración",
|
|
107722
107728
|
settingUpdatedSuccessfully: "Configuración actualizada correctamente",
|
|
107729
|
+
save: "Guardar",
|
|
107723
107730
|
agentSettingUpdatedSuccessfully: "Configuración del agente actualizada correctamente",
|
|
107724
107731
|
chatAreaSizeUpdatedSuccessfully: "Tamaño del área de chat actualizado correctamente",
|
|
107725
107732
|
moreInfoAbout: "Más información sobre {label}",
|
|
@@ -110297,7 +110304,8 @@ var modalsPaywallModal$1 = {
|
|
|
110297
110304
|
subscribeToGetAccess: "Suscríbete para acceder a {itemName}",
|
|
110298
110305
|
redirecting: "Redirigiendo...",
|
|
110299
110306
|
pay: "Pagar",
|
|
110300
|
-
thisIncludes: "Esto incluye:"
|
|
110307
|
+
thisIncludes: "Esto incluye:",
|
|
110308
|
+
secureCheckout: "Pago seguro"
|
|
110301
110309
|
};
|
|
110302
110310
|
var modalsPromptGalleryModal$1 = {
|
|
110303
110311
|
promptGallery: "Galería de instrucciones",
|
|
@@ -111057,7 +111065,8 @@ var projectsProjectsPage$1 = {
|
|
|
111057
111065
|
"delete": "Eliminar",
|
|
111058
111066
|
agentCount: "{count} {count, plural, one {agente} other {agentes}}",
|
|
111059
111067
|
noProjectsFound: "No se encontraron proyectos",
|
|
111060
|
-
createFirstProject: "Crear tu primer proyecto"
|
|
111068
|
+
createFirstProject: "Crear tu primer proyecto",
|
|
111069
|
+
searching: "Buscando..."
|
|
111061
111070
|
};
|
|
111062
111071
|
var projectsRenameProjectModal$1 = {
|
|
111063
111072
|
title: "Renombrar proyecto",
|
|
@@ -113099,6 +113108,7 @@ var advancePagination = {
|
|
|
113099
113108
|
var advancedAdvanced = {
|
|
113100
113109
|
failedToUpdateSetting: "更新设置失败",
|
|
113101
113110
|
settingUpdatedSuccessfully: "设置已成功更新",
|
|
113111
|
+
save: "保存",
|
|
113102
113112
|
agentSettingUpdatedSuccessfully: "代理设置已成功更新",
|
|
113103
113113
|
chatAreaSizeUpdatedSuccessfully: "聊天区域大小已成功更新",
|
|
113104
113114
|
moreInfoAbout: "关于 {label} 的更多信息",
|
|
@@ -115676,7 +115686,8 @@ var modalsPaywallModal = {
|
|
|
115676
115686
|
subscribeToGetAccess: "订阅以获取 {itemName} 的访问权限",
|
|
115677
115687
|
redirecting: "正在跳转...",
|
|
115678
115688
|
pay: "支付",
|
|
115679
|
-
thisIncludes: "包含以下内容:"
|
|
115689
|
+
thisIncludes: "包含以下内容:",
|
|
115690
|
+
secureCheckout: "安全结账"
|
|
115680
115691
|
};
|
|
115681
115692
|
var modalsPromptGalleryModal = {
|
|
115682
115693
|
promptGallery: "提示库",
|
|
@@ -116436,7 +116447,8 @@ var projectsProjectsPage = {
|
|
|
116436
116447
|
"delete": "删除",
|
|
116437
116448
|
agentCount: "{count} 个代理",
|
|
116438
116449
|
noProjectsFound: "未找到项目",
|
|
116439
|
-
createFirstProject: "创建您的第一个项目"
|
|
116450
|
+
createFirstProject: "创建您的第一个项目",
|
|
116451
|
+
searching: "搜索中..."
|
|
116440
116452
|
};
|
|
116441
116453
|
var projectsRenameProjectModal = {
|
|
116442
116454
|
title: "重命名项目",
|
|
@@ -173722,6 +173734,10 @@ function Profile({ tenant, username, tenants, onClose, customization = {}, isAdm
|
|
|
173722
173734
|
: activeTab === 'experience' && experienceSubTab === 'resume'
|
|
173723
173735
|
? { onClick: handleAddResume, upload: true, ariaLabel: t('profileIndex.ariaAddResume') }
|
|
173724
173736
|
: null;
|
|
173737
|
+
// Rendered inline on the sub-tabs row (education/experience/resume), pushed to
|
|
173738
|
+
// the far right. `headerAdd` already encodes which sub-tab is active, so this
|
|
173739
|
+
// only appears on the sub-tabs that support adding/uploading.
|
|
173740
|
+
const headerAddButton = headerAdd && (jsx(Button$1, { size: "icon", onClick: headerAdd.onClick, className: "text-gray-700 bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white flex-shrink-0", "aria-label": headerAdd.ariaLabel, children: headerAdd.upload ? jsx(Upload, { className: "h-4 w-4" }) : jsx(Plus, { className: "h-4 w-4" }) }));
|
|
173725
173741
|
const tabDescription = (id) => {
|
|
173726
173742
|
const key = (isReadOnly && TAB_DESC_PREVIEW_KEYS[id]) || TAB_DESC_KEYS[id];
|
|
173727
173743
|
return key ? t(`profileIndex.${key}`) : '';
|
|
@@ -173736,10 +173752,10 @@ function Profile({ tenant, username, tenants, onClose, customization = {}, isAdm
|
|
|
173736
173752
|
? 'bg-blue-50 text-blue-700 font-medium'
|
|
173737
173753
|
: 'hover:bg-gray-50 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100'}`, children: [jsx(tab.renderIcon, { className: "h-5 w-5 mr-3 flex-shrink-0", "aria-hidden": "true" }), jsx("span", { className: "truncate", children: tab.label })] }, tab.id))) }) }) })] }), jsx("nav", { className: "lg:hidden", "aria-label": t('profileIndex.ariaProfileTabsMobile'), children: jsx("div", { className: "w-full justify-start px-6 py-2 bg-white border-b border-gray-200 rounded-none h-auto overflow-x-auto", children: jsx("div", { className: "flex space-x-2", role: "tablist", "aria-orientation": "horizontal", children: TABS.map((tab) => (jsxs("button", { role: "tab", "aria-selected": activeTab === tab.id, "aria-controls": `${tab.id}-tabpanel`, id: `${tab.id}-tab-mobile`, onClick: () => setActiveTab(tab.id), className: `flex items-center gap-2 px-3 py-2 rounded-lg whitespace-nowrap text-sm transition-all ${activeTab === tab.id
|
|
173738
173754
|
? 'bg-blue-50 text-blue-600 font-medium'
|
|
173739
|
-
: 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(tab.renderIcon, { className: "h-4 w-4", "aria-hidden": "true" }), jsx("span", { className: "hidden sm:inline", children: tab.label }), jsx("span", { className: "sm:hidden", children: tab.label })] }, tab.id))) }) }) }), jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", style: { height: '100%' }, children: [jsx("div", { className: "hidden lg:block flex-shrink-0 p-6 border-b border-gray-200 bg-white dark:bg-gray-900", children:
|
|
173755
|
+
: 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(tab.renderIcon, { className: "h-4 w-4", "aria-hidden": "true" }), jsx("span", { className: "hidden sm:inline", children: tab.label }), jsx("span", { className: "sm:hidden", children: tab.label })] }, tab.id))) }) }) }), jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", style: { height: '100%' }, children: [jsx("div", { className: "hidden lg:block flex-shrink-0 p-6 border-b border-gray-200 bg-white dark:bg-gray-900", children: jsx("div", { className: "flex items-center justify-between", children: jsxs("div", { children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2", children: (_f = (_e = TABS.find((t) => t.id === activeTab)) === null || _e === void 0 ? void 0 : _e.label) !== null && _f !== void 0 ? _f : activeTab }), jsx("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: tabDescription(activeTab) })] }) }) }), jsxs("div", { className: "flex-1 p-6 space-y-6", style: {
|
|
173740
173756
|
overflowY: 'auto',
|
|
173741
173757
|
overflowX: 'hidden',
|
|
173742
|
-
}, role: "tabpanel", id: `${activeTab}-tabpanel`, "aria-labelledby": `${activeTab}-tab`, tabIndex: 0, children: [jsx("div", { className: "lg:hidden mb-6", children:
|
|
173758
|
+
}, role: "tabpanel", id: `${activeTab}-tabpanel`, "aria-labelledby": `${activeTab}-tab`, tabIndex: 0, children: [jsx("div", { className: "lg:hidden mb-6", children: jsx("div", { className: "flex flex-row items-center sm:justify-between gap-3", children: jsxs("div", { children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2", children: (_h = (_g = TABS.find((t) => t.id === activeTab)) === null || _g === void 0 ? void 0 : _g.label) !== null && _h !== void 0 ? _h : activeTab }), jsx("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: tabDescription(activeTab) })] }) }) }), activeTab === 'basic' && (jsx("div", { className: "space-y-6", children: jsxs("form", { onSubmit: (formEvent) => {
|
|
173743
173759
|
formEvent.preventDefault();
|
|
173744
173760
|
formEvent.stopPropagation();
|
|
173745
173761
|
if (isReadOnly)
|
|
@@ -173814,7 +173830,7 @@ function Profile({ tenant, username, tenants, onClose, customization = {}, isAdm
|
|
|
173814
173830
|
var _a;
|
|
173815
173831
|
return (jsxs(Fragment$1, { children: [jsxs("div", { className: "relative mb-0", children: [jsx("div", { className: "absolute inset-y-0 left-4 flex items-center pointer-events-none", "aria-hidden": "true", children: jsx("div", { className: "bg-black text-white rounded w-8 h-8 flex items-center justify-center", children: jsx("span", { className: "font-bold text-sm", children: "X" }) }) }), jsx(Input, { id: "x", className: "w-full bg-gray-50 border-gray-200 focus:ring-blue-500 focus:border-blue-500 text-base py-3 pl-16 h-10", placeholder: t('profileIndex.placeholderX'), value: field.state.value, onChange: (e) => handleSocialLinkChange(e.target.value, field.handleChange, X_URL_PREFIX), disabled: socialForm.state.isSubmitting || isReadOnly })] }), jsx("p", { className: "text-red-500 dark:text-gray-400 text-sm", role: ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) ? 'alert' : undefined, "aria-live": "polite", children: field.state.meta.errors })] }));
|
|
173816
173832
|
},
|
|
173817
|
-
})] })] }) })), activeTab === 'education' && (jsxs(Tabs, { value: educationSubTab, onValueChange: setEducationSubTab, className: "space-y-4", children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "education", children: t('profileIndex.tabEducation') }), jsx(TabsTrigger, { value: "credentials", children: t('gradebookGradebookTab.typeCredentials') }), jsx(TabsTrigger, { value: "skills", children: t('gradebookGradebookTab.typeSkills') })] }), jsx(TabsContent, { value: "education", children: jsx(EducationTab, { org: tenant, username: username }) }), jsx(TabsContent, { value: "credentials", children: jsx(CredentialsList, { org: tenant, username: username }) }), jsx(TabsContent, { value: "skills", children: jsx(SkillsList, { org: tenant, username: username }) })] })), activeTab === 'gradebook' && jsx(GradebookTab, { org: tenant, username: username }), activeTab === 'experience' && (jsxs(Tabs, { value: experienceSubTab, onValueChange: setExperienceSubTab, className: "space-y-4", children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "experience", children: t('profileIndex.tabExperience') }), jsx(TabsTrigger, { value: "resume", children: t('profileIndex.tabResume') })] }), jsx(TabsContent, { value: "experience", children: jsx(ExperienceTab, { org: tenant, username: username }) }), jsx(TabsContent, { value: "resume", children: jsx(ResumeTab, { org: tenant, username: username }) })] })), activeTab === 'purchases' && jsx(PurchasesTab, { org: tenant, username: username }), activeTab === 'memory' && jsx(MemoryTab, { org: tenant, username: username }), activeTab === 'privacy' && jsx(ChatPrivacyTab, { org: tenant, username: username }), !isReadOnly && activeTab === 'security' && (jsx(Security, { app: currentSPA || '', email: (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email) || '', platformKey: tenant, onAccountDeleted: onAccountDeleted })), activeTab === 'advanced' && (localLLMProps || systemControlProps) && (jsxs("div", { className: "space-y-6", children: [localLLMProps && (jsx(LocalModelsContent, { isAvailable: localLLMProps.isAvailable, state: localLLMProps.state, ollamaStatus: localLLMProps.ollamaStatus, systemMemory: localLLMProps.systemMemory, isUsingFoundry: localLLMProps.isUsingFoundry, foundryModels: localLLMProps.foundryModels, selectedFoundryModel: localLLMProps.selectedFoundryModel, foundryStatus: localLLMProps.foundryStatus, onStartDownload: localLLMProps.onStartDownload, onCancelDownload: localLLMProps.onCancelDownload, onInstallOllama: localLLMProps.onInstallOllama, onStopManager: localLLMProps.onStopManager, onInstallFoundry: localLLMProps.onInstallFoundry, onCheckStatus: localLLMProps.onCheckStatus, onResetState: localLLMProps.onResetState, onSelectFoundryModel: localLLMProps.onSelectFoundryModel })), systemControlProps && (jsx(SystemControlContent, { isAvailable: systemControlProps.isAvailable, state: systemControlProps.state, status: systemControlProps.status, requiredSizeGb: systemControlProps.requiredSizeGb, ollamaStatus: systemControlProps.ollamaStatus, systemMemory: systemControlProps.systemMemory, accessibilityPermission: systemControlProps.accessibilityPermission, onInstall: systemControlProps.onInstall, onStop: systemControlProps.onStop, onCheckStatus: systemControlProps.onCheckStatus, onResetState: systemControlProps.onResetState, onRequestAccessibilityPermission: systemControlProps.onRequestAccessibilityPermission, onDownloadModel: systemControlProps.onDownloadModel }))] }))] }), !isReadOnly && ['basic', 'social'].includes(activeTab) && (jsx("div", { className: "flex-shrink-0 border-t border-gray-200 p-6 bg-white dark:bg-gray-900", children: jsxs("div", { className: "flex justify-end gap-3", children: [jsx(Button$1, { onClick: onClose, variant: "outline", children: t('profileIndex.buttonCancel') }), jsx(Button$1, { onClick: () => {
|
|
173833
|
+
})] })] }) })), activeTab === 'education' && (jsxs(Tabs, { value: educationSubTab, onValueChange: setEducationSubTab, className: "space-y-4", children: [jsxs("div", { className: "flex items-center justify-between gap-3", children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "education", children: t('profileIndex.tabEducation') }), jsx(TabsTrigger, { value: "credentials", children: t('gradebookGradebookTab.typeCredentials') }), jsx(TabsTrigger, { value: "skills", children: t('gradebookGradebookTab.typeSkills') })] }), headerAddButton] }), jsx(TabsContent, { value: "education", children: jsx(EducationTab, { org: tenant, username: username }) }), jsx(TabsContent, { value: "credentials", children: jsx(CredentialsList, { org: tenant, username: username }) }), jsx(TabsContent, { value: "skills", children: jsx(SkillsList, { org: tenant, username: username }) })] })), activeTab === 'gradebook' && jsx(GradebookTab, { org: tenant, username: username }), activeTab === 'experience' && (jsxs(Tabs, { value: experienceSubTab, onValueChange: setExperienceSubTab, className: "space-y-4", children: [jsxs("div", { className: "flex items-center justify-between gap-3", children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "experience", children: t('profileIndex.tabExperience') }), jsx(TabsTrigger, { value: "resume", children: t('profileIndex.tabResume') })] }), headerAddButton] }), jsx(TabsContent, { value: "experience", children: jsx(ExperienceTab, { org: tenant, username: username }) }), jsx(TabsContent, { value: "resume", children: jsx(ResumeTab, { org: tenant, username: username }) })] })), activeTab === 'purchases' && jsx(PurchasesTab, { org: tenant, username: username }), activeTab === 'memory' && jsx(MemoryTab, { org: tenant, username: username }), activeTab === 'privacy' && jsx(ChatPrivacyTab, { org: tenant, username: username }), !isReadOnly && activeTab === 'security' && (jsx(Security, { app: currentSPA || '', email: (userMetadata === null || userMetadata === void 0 ? void 0 : userMetadata.email) || '', platformKey: tenant, onAccountDeleted: onAccountDeleted })), activeTab === 'advanced' && (localLLMProps || systemControlProps) && (jsxs("div", { className: "space-y-6", children: [localLLMProps && (jsx(LocalModelsContent, { isAvailable: localLLMProps.isAvailable, state: localLLMProps.state, ollamaStatus: localLLMProps.ollamaStatus, systemMemory: localLLMProps.systemMemory, isUsingFoundry: localLLMProps.isUsingFoundry, foundryModels: localLLMProps.foundryModels, selectedFoundryModel: localLLMProps.selectedFoundryModel, foundryStatus: localLLMProps.foundryStatus, onStartDownload: localLLMProps.onStartDownload, onCancelDownload: localLLMProps.onCancelDownload, onInstallOllama: localLLMProps.onInstallOllama, onStopManager: localLLMProps.onStopManager, onInstallFoundry: localLLMProps.onInstallFoundry, onCheckStatus: localLLMProps.onCheckStatus, onResetState: localLLMProps.onResetState, onSelectFoundryModel: localLLMProps.onSelectFoundryModel })), systemControlProps && (jsx(SystemControlContent, { isAvailable: systemControlProps.isAvailable, state: systemControlProps.state, status: systemControlProps.status, requiredSizeGb: systemControlProps.requiredSizeGb, ollamaStatus: systemControlProps.ollamaStatus, systemMemory: systemControlProps.systemMemory, accessibilityPermission: systemControlProps.accessibilityPermission, onInstall: systemControlProps.onInstall, onStop: systemControlProps.onStop, onCheckStatus: systemControlProps.onCheckStatus, onResetState: systemControlProps.onResetState, onRequestAccessibilityPermission: systemControlProps.onRequestAccessibilityPermission, onDownloadModel: systemControlProps.onDownloadModel }))] }))] }), !isReadOnly && ['basic', 'social'].includes(activeTab) && (jsx("div", { className: "flex-shrink-0 border-t border-gray-200 p-6 bg-white dark:bg-gray-900", children: jsxs("div", { className: "flex justify-end gap-3", children: [jsx(Button$1, { onClick: onClose, variant: "outline", children: t('profileIndex.buttonCancel') }), jsx(Button$1, { onClick: () => {
|
|
173818
173834
|
if (activeTab === 'basic') {
|
|
173819
173835
|
basicForm.handleSubmit();
|
|
173820
173836
|
}
|
|
@@ -183813,26 +183829,19 @@ const ChatPrivacyContent = ({ platformKey, username }) => {
|
|
|
183813
183829
|
};
|
|
183814
183830
|
|
|
183815
183831
|
function StringSettingInput({ value, defaultValue, disabled, onSave, }) {
|
|
183816
|
-
const
|
|
183817
|
-
const
|
|
183832
|
+
const t = useT();
|
|
183833
|
+
const savedValue = value || defaultValue;
|
|
183834
|
+
const [localValue, setLocalValue] = useState(savedValue);
|
|
183818
183835
|
useEffect(() => {
|
|
183819
|
-
setLocalValue(
|
|
183820
|
-
}, [
|
|
183821
|
-
const
|
|
183822
|
-
|
|
183823
|
-
if (
|
|
183824
|
-
|
|
183825
|
-
|
|
183826
|
-
onSave(newValue);
|
|
183827
|
-
}, 800);
|
|
183836
|
+
setLocalValue(savedValue);
|
|
183837
|
+
}, [savedValue]);
|
|
183838
|
+
const isDirty = localValue !== savedValue;
|
|
183839
|
+
const handleSave = () => {
|
|
183840
|
+
if (!isDirty || disabled)
|
|
183841
|
+
return;
|
|
183842
|
+
onSave(localValue);
|
|
183828
183843
|
};
|
|
183829
|
-
|
|
183830
|
-
return () => {
|
|
183831
|
-
if (debounceRef.current)
|
|
183832
|
-
clearTimeout(debounceRef.current);
|
|
183833
|
-
};
|
|
183834
|
-
}, []);
|
|
183835
|
-
return (jsxs("div", { className: "flex items-center gap-2", children: [jsx(Input, { value: localValue, onChange: (e) => handleChange(e.target.value), disabled: disabled, className: "max-w-[240px] w-[110px] sm:w-[230px] font-medium text-[#646464] text-sm" }), disabled && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] }));
|
|
183844
|
+
return (jsxs("div", { className: "flex items-center gap-2", children: [isDirty && (jsx(Button$1, { type: "button", size: "sm", onClick: handleSave, disabled: disabled, className: "h-8 bg-blue-500 hover:bg-blue-600 text-white", children: t('advancedAdvanced.save') })), jsx(Input, { value: localValue, onChange: (e) => setLocalValue(e.target.value), disabled: disabled, className: "max-w-[240px] w-[110px] sm:w-[230px] font-medium text-[#646464] text-sm" }), disabled && (jsx("div", { className: "w-4 h-4 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }))] }));
|
|
183836
183845
|
}
|
|
183837
183846
|
function AdvancedTab({ platformKey, username, currentSPA, authURL, currentPlatformBaseDomain, }) {
|
|
183838
183847
|
const t = useT();
|
|
@@ -183878,6 +183887,7 @@ function AdvancedTab({ platformKey, username, currentSPA, authURL, currentPlatfo
|
|
|
183878
183887
|
'overall_default_mentor',
|
|
183879
183888
|
'help_center_url',
|
|
183880
183889
|
'monetization_base_path',
|
|
183890
|
+
'skills_welcome_tagline',
|
|
183881
183891
|
];
|
|
183882
183892
|
const configurableMetadatas = allMetadatas.filter((metadata) => (typeof metadata.defaultValue === 'boolean' ||
|
|
183883
183893
|
(typeof metadata.defaultValue === 'string' &&
|
|
@@ -248508,6 +248518,8 @@ function getLLMProviderDetails(llmProvider, llmName) {
|
|
|
248508
248518
|
}
|
|
248509
248519
|
}
|
|
248510
248520
|
|
|
248521
|
+
function c$3(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i$8(r,n){return r===n}function a$3(n,t,a){var o=i$8,f=useRef(n),l=useState({})[1],v=c$3(useCallback(function(r){f.current=r,l({});},[l]),t,a),m=useRef(n);return o(m.current,n)||(v(n),m.current=n),[f.current,v]}
|
|
248522
|
+
|
|
248511
248523
|
lazy(() => Promise.resolve().then(function () { return createProjectModal; }).then((mod) => ({
|
|
248512
248524
|
default: mod.CreateProjectModal,
|
|
248513
248525
|
})));
|
|
@@ -248602,8 +248614,6 @@ function ProjectMentorsList({ projectMentors, onMentorRemoved, onAddMentorClick,
|
|
|
248602
248614
|
}) }), showMinimumMentorAlert && (jsx(Suspense, { fallback: null, children: jsx(MinimumMentorAlert$1, { open: showMinimumMentorAlert, onOpenChange: setShowMinimumMentorAlert }) }))] }));
|
|
248603
248615
|
}
|
|
248604
248616
|
|
|
248605
|
-
function c$3(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i$8(r,n){return r===n}function a$3(n,t,a){var o=i$8,f=useRef(n),l=useState({})[1],v=c$3(useCallback(function(r){f.current=r,l({});},[l]),t,a),m=useRef(n);return o(m.current,n)||(v(n),m.current=n),[f.current,v]}
|
|
248606
|
-
|
|
248607
248617
|
const AgentSettingsContext = React__default.createContext(null);
|
|
248608
248618
|
function AgentSettingsProvider({ children, ...value }) {
|
|
248609
248619
|
const ctx = React__default.useMemo(() => value,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iblai/iblai-js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.1",
|
|
4
4
|
"description": "Unified JavaScript SDK for IBL.ai — re-exports data-layer, web-containers, and web-utils under a single package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"winston": "3.19.0",
|
|
69
69
|
"@iblai/data-layer": "1.9.3",
|
|
70
70
|
"@iblai/mcp": "1.8.0",
|
|
71
|
-
"@iblai/web-containers": "1.
|
|
72
|
-
"@iblai/web-utils": "1.
|
|
71
|
+
"@iblai/web-containers": "1.15.1",
|
|
72
|
+
"@iblai/web-utils": "1.13.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@radix-ui/react-dialog": "^1.1.7",
|