@epam/ai-dial-toolset-editor 1.2.0-dev.176 → 1.2.0-dev.181

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,5 +1,8 @@
1
1
  import { FC } from 'react';
2
2
  import { GeneralFormProps } from '../../models/general-form-props';
3
- /** General (metadata) form shared by the Toolset and Custom App editors: name, description, avatar, version, tags, and additional locales. */
3
+ /**
4
+ * General (metadata) form shared by the Toolset and Custom App editors.
5
+ * @deprecated Render `MetadataForm` from `@epam/ai-dial-builder-form` and supply `avatarPicker.resolveAttachedIconUrl` instead.
6
+ */
4
7
  export declare const GeneralForm: FC<GeneralFormProps>;
5
8
  //# sourceMappingURL=GeneralForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeneralForm.d.ts","sourceRoot":"","sources":["../../../src/components/GeneralForm/GeneralForm.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AA+DxE,8IAA8I;AAC9I,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAuE5C,CAAC"}
1
+ {"version":3,"file":"GeneralForm.d.ts","sourceRoot":"","sources":["../../../src/components/GeneralForm/GeneralForm.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAmCxE;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAmE5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToolsetEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsetEditor/ToolsetEditor.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAyC5E,uKAAuK;AACvK,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAkYhD,CAAC"}
1
+ {"version":3,"file":"ToolsetEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsetEditor/ToolsetEditor.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAgD5E,uKAAuK;AACvK,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAqahD,CAAC"}
package/index.css CHANGED
@@ -1 +1 @@
1
- .sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.visible{visibility:visible}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.max-w-\[1060px\]{max-width:1060px}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.border-0{border-width:0}.border-t{border-top-width:1px}.border-tertiary{border-color:var(--stroke-tertiary,#e0e6f0)}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-start{text-align:start}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}@media (min-width:1280px){.desktop\:not-sr-only{height:auto;margin:0;overflow:visible;padding:0;position:static;width:auto;clip:auto;white-space:normal}.desktop\:p-6{padding:1.5rem}}
1
+ .sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.visible{visibility:visible}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.max-w-\[1060px\]{max-width:1060px}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.border-t{border-top-width:1px}.border-tertiary{border-color:var(--stroke-tertiary,#e0e6f0)}.px-2{padding-left:.5rem;padding-right:.5rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-start{text-align:start}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}@media (min-width:1280px){.desktop\:not-sr-only{height:auto;margin:0;overflow:visible;padding:0;position:static;width:auto;clip:auto;white-space:normal}}
package/index.js CHANGED
@@ -1,62 +1,83 @@
1
- import { AvatarPickerModal as e, DeploymentCreationFieldErrorCode as t, DeploymentCreationForm as n, EditorLayout as r, EditorSection as i, validateDeploymentCreationFields as a } from "@epam/ai-dial-builder-form";
1
+ import { DeploymentCreationFieldErrorCode as e, EntityEditor as t, MetadataField as n, MetadataForm as r, useMetadataForm as i, validateDeploymentCreationFields as a } from "@epam/ai-dial-builder-form";
2
2
  import { ToolsetAuthTypes as o, ToolsetCredentialsLevel as s, WithLogin as c, dialFileToAttachment as l, getApiErrorDetails as u } from "@epam/ai-dial-chat-hooks";
3
3
  import { CopyButton as d, ENTITY_DESCRIPTION_MAX_LENGTH as f, ENTITY_NAME_MAX_LENGTH as p, TAG_INPUT_TAG_CLASS_NAME as m, mergeClasses as h, useCodeCopy as g } from "@epam/ai-dial-chat-shared";
4
- import { ConfirmationPopup as _, ConfirmationPopupVariant as v, DIAL_ICON_SIZE as y, DIAL_KIT_ICON_STROKE as b, Input as x, NeutralButton as S, PasswordInput as ee, PrimaryButton as C, Radio as w, RadioGroup as T, SegmentedControl as te, Select as E, TagInput as D } from "@epam/ai-dial-ui-kit";
5
- import { memo as O, useCallback as k, useEffect as A, useMemo as j, useRef as ne, useState as M } from "react";
6
- import { IconBrandOauth as N, IconKey as P, IconLockOff as F, IconLogin as re, IconLogout as I } from "@tabler/icons-react";
7
- import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
4
+ import { memo as _, useCallback as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
5
+ import { IconBrandOauth as C, IconKey as w, IconLockOff as ee, IconLogin as te, IconLogout as T } from "@tabler/icons-react";
6
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
7
+ import { ConfirmationPopup as ne, ConfirmationPopupVariant as re, DIAL_ICON_SIZE as O, DIAL_KIT_ICON_STROKE as k, Input as A, NeutralButton as j, PasswordInput as M, Radio as N, RadioGroup as P, SegmentedControl as F, Select as I, TagInput as L } from "@epam/ai-dial-ui-kit";
8
8
  //#region src/constants/public-class-names.ts
9
- var B = {
9
+ var R = {
10
10
  metadataSection: "dial-toolset-editor-metadata-section",
11
11
  setupSection: "dial-toolset-editor-setup-section"
12
- }, V = /* @__PURE__ */ function(e) {
12
+ }, z = /* @__PURE__ */ function(e) {
13
13
  return e.Http = "HTTP", e.Sse = "SSE", e;
14
- }({}), H = "New toolset", U = "0.0.1", W = {
15
- [o.OAuth]: N,
16
- [o.ApiKey]: P,
17
- [o.None]: F
18
- }, G = ({ defaultName: e = H, existingNames: t }) => {
14
+ }({}), B = "New toolset", V = "0.0.1", H = {
15
+ [o.OAuth]: C,
16
+ [o.ApiKey]: w,
17
+ [o.None]: ee
18
+ }, U = ({ defaultName: e = B, existingNames: t }) => {
19
19
  let n = new Set(t);
20
20
  if (!n.has(e)) return e;
21
21
  let r = 1;
22
22
  for (; n.has(`${e} ${r}`);) r += 1;
23
23
  return `${e} ${r}`;
24
- }, ie = () => ({
24
+ }, W = () => ({
25
25
  authenticationType: o.None,
26
26
  withLogin: c.WithoutLogin,
27
27
  isLoggedIn: !1
28
- }), K = (e = []) => ({
29
- name: G({ existingNames: e }),
30
- version: U,
28
+ }), G = (e = []) => ({
29
+ name: U({ existingNames: e }),
30
+ version: V,
31
31
  iconUrl: "",
32
32
  description: "",
33
33
  topics: [],
34
34
  otherLocales: [],
35
35
  endpoint: "",
36
- protocol: V.Http,
36
+ protocol: z.Http,
37
37
  allowedTools: [],
38
- auth: ie()
39
- }), q = (e) => {
38
+ auth: W()
39
+ }), K = (e) => {
40
40
  if (!/^https?:\/\//.test(e) || e.endsWith(".") || e.endsWith("//")) return !1;
41
41
  try {
42
42
  return !!new URL(e);
43
43
  } catch {
44
44
  return !1;
45
45
  }
46
- }, J = (e) => q(e.trim()), Y = (e) => e.replace(/^(https?):\/([^/])/, "$1://$2"), X = (e) => {
46
+ }, q = (e) => K(e.trim()), ie = (e) => e.replace(/^(https?):\/([^/])/, "$1://$2"), J = (e) => {
47
47
  let t = e?.trim() ?? "";
48
- if (!t || q(t)) return t;
48
+ if (!t || K(t)) return t;
49
49
  let n = [t];
50
50
  try {
51
51
  let e = decodeURIComponent(t);
52
52
  e !== t && n.push(e);
53
53
  } catch {}
54
54
  for (let e of n) {
55
- let t = Y(e);
56
- if (q(t)) return t;
55
+ let t = ie(e);
56
+ if (K(t)) return t;
57
57
  }
58
58
  return t;
59
- }, Z = (e) => !e?.trim() || J(e), Q = (e, t = !1) => e.isLoggedIn ? !0 : e.authenticationType === o.ApiKey ? e.keyHeader?.trim() ? e.withLogin === c.WithoutLogin ? !0 : !!(e.keyHeader?.trim() && e.apiKey?.trim()) : !1 : e.authenticationType === o.OAuth && e.withLogin === c.WithConfig ? !!e.clientId?.trim() && (t || !!e.clientSecret?.trim()) && Z(e.authorizationEndpoint) && Z(e.tokenEndpoint) : !0, ae = (e, t = !1) => Object.keys(a(e, { validateVersionPattern: !0 })).length === 0 && J(e.endpoint) && Q(e.auth, t), oe = {
59
+ }, Y = (e) => !e?.trim() || q(e), X = (e, t = !1) => e.isLoggedIn ? !0 : e.authenticationType === o.ApiKey ? e.keyHeader?.trim() ? e.withLogin === c.WithoutLogin ? !0 : !!(e.keyHeader?.trim() && e.apiKey?.trim()) : !1 : e.authenticationType === o.OAuth && e.withLogin === c.WithConfig ? !!e.clientId?.trim() && (t || !!e.clientSecret?.trim()) && Y(e.authorizationEndpoint) && Y(e.tokenEndpoint) : !0, ae = (e, t = !1) => Object.keys(a(e, { validateVersionPattern: !0 })).length === 0 && q(e.endpoint) && X(e.auth, t), oe = new Set([
60
+ "name",
61
+ "description",
62
+ "iconUrl",
63
+ "version",
64
+ "topics",
65
+ "otherLocales"
66
+ ]), se = (e) => ({
67
+ name: e.name,
68
+ description: e.description,
69
+ iconUrl: e.iconUrl,
70
+ version: e.version,
71
+ topics: e.topics,
72
+ otherLocales: e.otherLocales
73
+ }), ce = (e) => {
74
+ let t = {}, n = {};
75
+ for (let [r, i] of Object.entries(e)) (oe.has(r) ? t : n)[r] = i;
76
+ return {
77
+ metadata: t,
78
+ setup: n
79
+ };
80
+ }, Z = {
60
81
  name: {
61
82
  label: "Name",
62
83
  placeholder: "Enter name"
@@ -95,105 +116,81 @@ var B = {
95
116
  saveLabel: "Save"
96
117
  },
97
118
  ariaLabel: "General"
98
- }, se = {
99
- title: "Add avatar",
100
- attachLabel: "Attach",
101
- emptyTitle: "This folder is empty",
102
- emptyDescription: "",
103
- errorMessage: "Failed to load files",
104
- retryLabel: "Retry",
105
- hiddenFilesLabel: "Hidden files",
106
- showHiddenFilesLabel: "Show hidden files",
107
- hideHiddenFilesLabel: "Hide hidden files",
108
- getSelectionLabel: (e) => e === 1 ? "item selected" : "items selected",
109
- uploadFilesLabel: "Files",
110
- newFolderLabel: "Folder",
111
- downloadLabel: "Download",
112
- downloadingLabel: "Preparing download…",
113
- deleteLabel: "Delete",
114
- deletingLabel: "Deleting…",
115
- deleteConfirmTitleSingle: "Confirm deleting",
116
- deleteConfirmTitleMultiple: "Confirm deleting items",
117
- deleteConfirmSingleText: "Are you sure you want to delete",
118
- deleteConfirmMultipleText: "Do you want to delete following",
119
- deleteConfirmItemsLabel: "items?",
120
- deleteConfirmLabel: "Delete",
121
- deleteCancelLabel: "Cancel"
122
- }, ce = ({ form: t, errors: r, bucket: i, FileManagerModal: a, resolveIconUrl: o, allowedMimeTypes: s, maxFileSizeBytes: c, availableLocaleOptions: u, onChange: d, onNameBlur: f, onVersionBlur: p, labels: m }) => {
123
- let [h, g] = M(!1), _ = m?.form ?? oe, v = m?.avatarPicker ?? se, y = j(() => o(t.iconUrl), [t.iconUrl, o]);
124
- return /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R(n, {
125
- values: {
126
- name: t.name,
127
- description: t.description,
128
- iconUrl: t.iconUrl,
129
- version: t.version,
130
- topics: t.topics,
131
- otherLocales: t.otherLocales
132
- },
133
- errors: r,
134
- onChange: d,
135
- onNameBlur: f,
136
- onVersionBlur: p,
137
- iconPreviewUrl: y,
138
- onAddAvatarClick: () => g(!0),
139
- labels: _,
140
- availableLocaleOptions: u
141
- }), /* @__PURE__ */ R(e, {
142
- isOpen: h,
143
- onClose: () => g(!1),
144
- onAttach: (e) => {
145
- let [t] = e.files, n = t ? l(t, i, { resolvePreviewUrl: o }) : null;
146
- n?.url && d({ iconUrl: n.url }), g(!1);
147
- },
148
- bucket: i,
149
- FileManagerModal: a,
150
- allowedMimeTypes: s,
151
- maxFileSizeBytes: c,
152
- labels: v
153
- })] });
154
- }, $ = /* @__PURE__ */ function(e) {
119
+ }, le = ({ form: e, errors: t, bucket: n, FileManagerModal: i, resolveIconUrl: a, allowedMimeTypes: o, maxFileSizeBytes: s, availableLocaleOptions: c, onChange: u, onNameBlur: d, onVersionBlur: f, labels: p }) => {
120
+ let m = v((e) => {
121
+ let [t] = e.files;
122
+ return (t ? l(t, n, { resolvePreviewUrl: a }) : null)?.url;
123
+ }, [n, a]);
124
+ return /* @__PURE__ */ E(r, {
125
+ values: e,
126
+ errors: t,
127
+ onChange: u,
128
+ onNameBlur: d,
129
+ onVersionBlur: f,
130
+ avatarPicker: b(() => ({
131
+ bucket: n,
132
+ FileManagerModal: i,
133
+ resolveIconUrl: a,
134
+ resolveAttachedIconUrl: m,
135
+ allowedMimeTypes: o,
136
+ maxFileSizeBytes: s
137
+ }), [
138
+ n,
139
+ i,
140
+ a,
141
+ m,
142
+ o,
143
+ s
144
+ ]),
145
+ availableLocaleOptions: c,
146
+ labels: b(() => ({
147
+ form: p?.form ?? Z,
148
+ avatarPicker: p?.avatarPicker
149
+ }), [p?.form, p?.avatarPicker])
150
+ });
151
+ }, Q = /* @__PURE__ */ function(e) {
155
152
  return e.Success = "success", e.Cancelled = "cancelled", e.PopupBlocked = "popup-blocked", e.InvalidConfig = "invalid-config", e.Failed = "failed", e;
156
- }({}), le = (e, t) => e === o.None ? c.WithoutLogin : e === o.OAuth && !t ? c.WithConfig : c.WithLogin, ue = (e, t) => e === o.None ? t?.typeNone ?? "Open access" : e === o.OAuth ? t?.typeOAuth ?? "OAuth" : t?.typeApiKey ?? "API Key", de = ({ auth: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, endpoint: a, authActions: l, onOAuthLogin: d, onNotifySuccess: f, onNotifyError: p, onAuthChange: h, onEnsureSaved: g, labels: C }) => {
157
- let [T, E] = M(!1), [O, k] = M(!1), A = e.isLoggedIn || n || T, j = J(a) && Q(e, i) && !A, ne = (t) => {
158
- A || t === e.authenticationType || h({
153
+ }({}), ue = (e, t) => e === o.None ? c.WithoutLogin : e === o.OAuth && !t ? c.WithConfig : c.WithLogin, de = (e, t) => e === o.None ? t?.typeNone ?? "Open access" : e === o.OAuth ? t?.typeOAuth ?? "OAuth" : t?.typeApiKey ?? "API Key", fe = ({ auth: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, endpoint: a, authActions: l, onOAuthLogin: d, onNotifySuccess: f, onNotifyError: p, onAuthChange: h, onEnsureSaved: g, labels: _ }) => {
154
+ let [v, y] = S(!1), [b, x] = S(!1), C = e.isLoggedIn || n || v, w = q(a) && X(e, i) && !C, ee = (t) => {
155
+ C || t === e.authenticationType || h({
159
156
  authenticationType: t,
160
- withLogin: le(t, !!e.clientId?.trim())
157
+ withLogin: ue(t, !!e.clientId?.trim())
161
158
  });
162
- }, N = (e) => {
163
- h({ withLogin: e });
164
159
  }, P = (e) => {
160
+ h({ withLogin: e });
161
+ }, I = (e) => {
165
162
  switch (e.auth != null && h(e.auth), e.status) {
166
- case $.Success:
167
- h({ isLoggedIn: !0 }), f(C?.loginSuccessMessage ?? "Successfully logged in.");
163
+ case Q.Success:
164
+ h({ isLoggedIn: !0 }), f(_?.loginSuccessMessage ?? "Successfully logged in.");
168
165
  return;
169
- case $.PopupBlocked:
170
- p(C?.errorPopupBlocked ?? "The login popup was blocked by your browser. Please allow popups for this site and try again.");
166
+ case Q.PopupBlocked:
167
+ p(_?.errorPopupBlocked ?? "The login popup was blocked by your browser. Please allow popups for this site and try again.");
171
168
  return;
172
- case $.InvalidConfig:
173
- p(C?.errorOAuthConfigMissing ?? "The OAuth provider did not return a valid client configuration. Please check the endpoint or contact your administrator.");
169
+ case Q.InvalidConfig:
170
+ p(_?.errorOAuthConfigMissing ?? "The OAuth provider did not return a valid client configuration. Please check the endpoint or contact your administrator.");
174
171
  return;
175
- case $.Failed:
176
- p(C?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", e.traceId);
172
+ case Q.Failed:
173
+ p(_?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", e.traceId);
177
174
  return;
178
- case $.Cancelled: return;
175
+ case Q.Cancelled: return;
179
176
  }
180
- }, F = async () => {
181
- if (!j) return;
177
+ }, R = async () => {
178
+ if (!w) return;
182
179
  if (e.authenticationType === o.OAuth) {
183
- E(!0);
180
+ y(!0);
184
181
  try {
185
- P(await d({
182
+ I(await d({
186
183
  auth: e,
187
184
  ensureSaved: g
188
185
  }));
189
186
  } finally {
190
- E(!1);
187
+ y(!1);
191
188
  }
192
189
  return;
193
190
  }
194
191
  let t = await g();
195
192
  if (t) {
196
- E(!0);
193
+ y(!0);
197
194
  try {
198
195
  let n = {
199
196
  url: t,
@@ -201,173 +198,173 @@ var B = {
201
198
  authenticationType: e.authenticationType,
202
199
  apiKey: e.apiKey?.trim()
203
200
  };
204
- await l.login(t, n), h({ isLoggedIn: !0 }), f(C?.loginSuccessMessage ?? "Successfully logged in.");
201
+ await l.login(t, n), h({ isLoggedIn: !0 }), f(_?.loginSuccessMessage ?? "Successfully logged in.");
205
202
  } catch (e) {
206
203
  let { traceId: t } = await u(e);
207
- p(C?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
204
+ p(_?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
208
205
  } finally {
209
- E(!1);
206
+ y(!1);
210
207
  }
211
208
  }
212
- }, L = async () => {
213
- E(!0);
209
+ }, z = async () => {
210
+ y(!0);
214
211
  try {
215
212
  let t = {
216
213
  url: r,
217
214
  credentialsLevel: s.User,
218
215
  authenticationType: e.authenticationType
219
216
  };
220
- await l.logout(r, t), h({ isLoggedIn: !1 }), k(!1), f(C?.logoutSuccessMessage ?? "Successfully logged out.");
217
+ await l.logout(r, t), h({ isLoggedIn: !1 }), x(!1), f(_?.logoutSuccessMessage ?? "Successfully logged out.");
221
218
  } catch (e) {
222
219
  let { traceId: t } = await u(e);
223
- p(C?.errorLogoutFailed ?? "Failed to log out. Please try again.", t);
220
+ p(_?.errorLogoutFailed ?? "Failed to log out. Please try again.", t);
224
221
  } finally {
225
- E(!1);
222
+ y(!1);
226
223
  }
227
- }, B = () => e.isLoggedIn ? /* @__PURE__ */ R("div", {
224
+ }, B = () => e.isLoggedIn ? /* @__PURE__ */ E("div", {
228
225
  className: "flex",
229
- children: /* @__PURE__ */ R(S, {
230
- label: C?.logOutLabel ?? "Log out",
231
- iconBefore: /* @__PURE__ */ R(I, {
232
- size: y.MD,
233
- stroke: b
226
+ children: /* @__PURE__ */ E(j, {
227
+ label: _?.logOutLabel ?? "Log out",
228
+ iconBefore: /* @__PURE__ */ E(T, {
229
+ size: O.MD,
230
+ stroke: k
234
231
  }),
235
- onClick: () => k(!0),
236
- disabled: n || T
232
+ onClick: () => x(!0),
233
+ disabled: n || v
237
234
  })
238
- }) : /* @__PURE__ */ R("div", {
235
+ }) : /* @__PURE__ */ E("div", {
239
236
  className: "flex",
240
- children: /* @__PURE__ */ R(S, {
241
- label: C?.logInLabel ?? "Log in",
242
- iconBefore: /* @__PURE__ */ R(re, {
243
- size: y.MD,
244
- stroke: b
237
+ children: /* @__PURE__ */ E(j, {
238
+ label: _?.logInLabel ?? "Log in",
239
+ iconBefore: /* @__PURE__ */ E(te, {
240
+ size: O.MD,
241
+ stroke: k
245
242
  }),
246
- onClick: F,
247
- disabled: !j
243
+ onClick: R,
244
+ disabled: !w
248
245
  })
249
246
  });
250
- return /* @__PURE__ */ z("section", {
247
+ return /* @__PURE__ */ D("section", {
251
248
  className: "flex flex-col gap-2",
252
249
  children: [
253
- /* @__PURE__ */ R("h3", {
250
+ /* @__PURE__ */ E("h3", {
254
251
  className: "dial-h3-text",
255
- children: C?.sectionTitle ?? "Authentication"
252
+ children: _?.sectionTitle ?? "Authentication"
256
253
  }),
257
- /* @__PURE__ */ R(te, {
258
- "aria-label": C?.sectionTitle ?? "Authentication",
254
+ /* @__PURE__ */ E(F, {
255
+ "aria-label": _?.sectionTitle ?? "Authentication",
259
256
  value: e.authenticationType,
260
- onChange: (e) => ne(e),
257
+ onChange: (e) => ee(e),
261
258
  segmentClassName: "px-2",
262
259
  items: [
263
260
  o.None,
264
261
  o.OAuth,
265
262
  o.ApiKey
266
263
  ].map((t) => {
267
- let n = W[t];
264
+ let n = H[t];
268
265
  return {
269
266
  value: t,
270
- label: /* @__PURE__ */ z("div", {
267
+ label: /* @__PURE__ */ D("div", {
271
268
  className: "flex items-center gap-2",
272
- children: [/* @__PURE__ */ R(n, {
269
+ children: [/* @__PURE__ */ E(n, {
273
270
  className: "shrink-0",
274
- size: y.SM,
275
- stroke: b,
271
+ size: O.SM,
272
+ stroke: k,
276
273
  "aria-hidden": !0
277
- }), /* @__PURE__ */ R("span", {
274
+ }), /* @__PURE__ */ E("span", {
278
275
  className: "sr-only desktop:not-sr-only",
279
- children: ue(t, C)
276
+ children: de(t, _)
280
277
  })]
281
278
  }),
282
- disabled: A && e.authenticationType !== t
279
+ disabled: C && e.authenticationType !== t
283
280
  };
284
281
  })
285
282
  }),
286
- e.authenticationType === o.None && /* @__PURE__ */ R("p", {
283
+ e.authenticationType === o.None && /* @__PURE__ */ E("p", {
287
284
  className: "dial-small-text pt-2 text-secondary",
288
- children: C?.openAccessDescription ?? "Open endpoint, no credentials"
285
+ children: _?.openAccessDescription ?? "Open endpoint, no credentials"
289
286
  }),
290
- e.authenticationType === o.OAuth && /* @__PURE__ */ z("div", {
287
+ e.authenticationType === o.OAuth && /* @__PURE__ */ D("div", {
291
288
  className: "flex flex-col gap-3 pt-2",
292
289
  children: [
293
- /* @__PURE__ */ z("div", {
290
+ /* @__PURE__ */ D("div", {
294
291
  className: "flex flex-col gap-2",
295
- children: [/* @__PURE__ */ R(w, {
292
+ children: [/* @__PURE__ */ E(N, {
296
293
  name: "oauth-login-mode",
297
294
  id: "oauth-with-login",
298
295
  value: c.WithLogin,
299
- labelProps: { label: C?.withLoginOAuthLabel ?? "Standard login" },
296
+ labelProps: { label: _?.withLoginOAuthLabel ?? "Standard login" },
300
297
  isSelected: e.withLogin === c.WithLogin,
301
- disabled: A,
302
- onChange: N
303
- }), /* @__PURE__ */ R(w, {
298
+ disabled: C,
299
+ onChange: P
300
+ }), /* @__PURE__ */ E(N, {
304
301
  name: "oauth-login-mode",
305
302
  id: "oauth-with-config",
306
303
  value: c.WithConfig,
307
- labelProps: { label: C?.withConfigOAuthLabel ?? "Custom login" },
304
+ labelProps: { label: _?.withConfigOAuthLabel ?? "Custom login" },
308
305
  isSelected: e.withLogin === c.WithConfig,
309
- disabled: A,
310
- onChange: N
306
+ disabled: C,
307
+ onChange: P
311
308
  })]
312
309
  }),
313
- e.withLogin === c.WithConfig && /* @__PURE__ */ z("div", {
310
+ e.withLogin === c.WithConfig && /* @__PURE__ */ D("div", {
314
311
  className: "flex flex-col gap-3",
315
312
  children: [
316
- /* @__PURE__ */ R(x, {
313
+ /* @__PURE__ */ E(A, {
317
314
  id: "toolset-client-id",
318
315
  value: e.clientId ?? "",
319
316
  onChange: (e) => h({ clientId: e ?? "" }),
320
317
  labelProps: {
321
- label: C?.clientIdLabel ?? "Client ID",
318
+ label: _?.clientIdLabel ?? "Client ID",
322
319
  required: !0
323
320
  },
324
- placeholder: C?.clientIdPlaceholder ?? "Enter client ID",
321
+ placeholder: _?.clientIdPlaceholder ?? "Enter client ID",
325
322
  error: t.clientId || void 0,
326
323
  invalid: !!t.clientId,
327
- disabled: A
324
+ disabled: C
328
325
  }),
329
- /* @__PURE__ */ R(ee, {
326
+ /* @__PURE__ */ E(M, {
330
327
  id: "toolset-client-secret",
331
328
  value: e.clientSecret ?? "",
332
329
  onChange: (e) => h({ clientSecret: e ?? "" }),
333
330
  labelProps: {
334
- label: C?.clientSecretLabel ?? "Client secret",
331
+ label: _?.clientSecretLabel ?? "Client secret",
335
332
  required: !i
336
333
  },
337
- placeholder: C?.clientSecretPlaceholder ?? "Enter client secret",
338
- showPasswordLabel: C?.showClientSecretLabel ?? "Show client secret",
339
- hidePasswordLabel: C?.hideClientSecretLabel ?? "Hide client secret",
334
+ placeholder: _?.clientSecretPlaceholder ?? "Enter client secret",
335
+ showPasswordLabel: _?.showClientSecretLabel ?? "Show client secret",
336
+ hidePasswordLabel: _?.hideClientSecretLabel ?? "Hide client secret",
340
337
  error: t.clientSecret || void 0,
341
338
  invalid: !!t.clientSecret,
342
- disabled: A
339
+ disabled: C
343
340
  }),
344
- /* @__PURE__ */ R(x, {
341
+ /* @__PURE__ */ E(A, {
345
342
  id: "toolset-authorization-endpoint",
346
343
  value: e.authorizationEndpoint ?? "",
347
344
  onChange: (e) => h({ authorizationEndpoint: e ?? "" }),
348
- labelProps: { label: C?.authorizationEndpointLabel ?? "Authorization endpoint" },
349
- placeholder: C?.authorizationEndpointPlaceholder ?? "Enter authorization endpoint",
345
+ labelProps: { label: _?.authorizationEndpointLabel ?? "Authorization endpoint" },
346
+ placeholder: _?.authorizationEndpointPlaceholder ?? "Enter authorization endpoint",
350
347
  error: t.authorizationEndpoint || void 0,
351
348
  invalid: !!t.authorizationEndpoint,
352
- disabled: A
349
+ disabled: C
353
350
  }),
354
- /* @__PURE__ */ R(x, {
351
+ /* @__PURE__ */ E(A, {
355
352
  id: "toolset-token-endpoint",
356
353
  value: e.tokenEndpoint ?? "",
357
354
  onChange: (e) => h({ tokenEndpoint: e ?? "" }),
358
- labelProps: { label: C?.tokenEndpointLabel ?? "Token endpoint" },
359
- placeholder: C?.tokenEndpointPlaceholder ?? "Enter token endpoint",
355
+ labelProps: { label: _?.tokenEndpointLabel ?? "Token endpoint" },
356
+ placeholder: _?.tokenEndpointPlaceholder ?? "Enter token endpoint",
360
357
  error: t.tokenEndpoint || void 0,
361
358
  invalid: !!t.tokenEndpoint,
362
- disabled: A
359
+ disabled: C
363
360
  }),
364
- /* @__PURE__ */ R(D, {
361
+ /* @__PURE__ */ E(L, {
365
362
  id: "toolset-scopes",
366
- labelProps: { label: C?.scopesLabel ?? "Scopes" },
367
- placeholder: C?.scopesPlaceholder ?? "Enter scopes",
363
+ labelProps: { label: _?.scopesLabel ?? "Scopes" },
364
+ placeholder: _?.scopesPlaceholder ?? "Enter scopes",
368
365
  value: e.scopes ?? [],
369
366
  onChange: (e) => h({ scopes: e }),
370
- disabled: A,
367
+ disabled: C,
371
368
  tagClassName: m
372
369
  })
373
370
  ]
@@ -375,99 +372,99 @@ var B = {
375
372
  B()
376
373
  ]
377
374
  }),
378
- e.authenticationType === o.ApiKey && /* @__PURE__ */ z("div", {
375
+ e.authenticationType === o.ApiKey && /* @__PURE__ */ D("div", {
379
376
  className: "flex flex-col gap-3 pt-2",
380
377
  children: [
381
- /* @__PURE__ */ z("div", {
378
+ /* @__PURE__ */ D("div", {
382
379
  className: "flex flex-col gap-2",
383
- children: [/* @__PURE__ */ R(w, {
380
+ children: [/* @__PURE__ */ E(N, {
384
381
  name: "apikey-login-mode",
385
382
  id: "apikey-with-login",
386
383
  value: c.WithLogin,
387
- labelProps: { label: C?.withLoginLabel ?? "With login" },
384
+ labelProps: { label: _?.withLoginLabel ?? "With login" },
388
385
  isSelected: e.withLogin === c.WithLogin,
389
- disabled: A,
390
- onChange: N
391
- }), /* @__PURE__ */ R(w, {
386
+ disabled: C,
387
+ onChange: P
388
+ }), /* @__PURE__ */ E(N, {
392
389
  name: "apikey-login-mode",
393
390
  id: "apikey-without-login",
394
391
  value: c.WithoutLogin,
395
- labelProps: { label: C?.withoutLoginLabel ?? "Without login" },
392
+ labelProps: { label: _?.withoutLoginLabel ?? "Without login" },
396
393
  isSelected: e.withLogin === c.WithoutLogin,
397
- disabled: A,
398
- onChange: N
394
+ disabled: C,
395
+ onChange: P
399
396
  })]
400
397
  }),
401
- /* @__PURE__ */ z("div", {
398
+ /* @__PURE__ */ D("div", {
402
399
  className: "flex flex-col gap-3",
403
- children: [/* @__PURE__ */ R(x, {
400
+ children: [/* @__PURE__ */ E(A, {
404
401
  id: "toolset-key-header",
405
402
  value: e.keyHeader ?? "",
406
403
  onChange: (e) => h({ keyHeader: e ?? "" }),
407
404
  labelProps: {
408
- label: C?.keyHeaderLabel ?? "API Key parameter name",
405
+ label: _?.keyHeaderLabel ?? "API Key parameter name",
409
406
  required: !0
410
407
  },
411
- placeholder: C?.keyHeaderPlaceholder ?? "Enter API key parameter name",
408
+ placeholder: _?.keyHeaderPlaceholder ?? "Enter API key parameter name",
412
409
  error: t.keyHeader || void 0,
413
410
  invalid: !!t.keyHeader,
414
- disabled: A
415
- }), e.withLogin === c.WithLogin && /* @__PURE__ */ R(ee, {
411
+ disabled: C
412
+ }), e.withLogin === c.WithLogin && /* @__PURE__ */ E(M, {
416
413
  id: "toolset-api-key",
417
414
  value: e.apiKey ?? "",
418
415
  onChange: (e) => h({ apiKey: e ?? "" }),
419
416
  labelProps: {
420
- label: C?.apiKeyLabel ?? "API key",
417
+ label: _?.apiKeyLabel ?? "API key",
421
418
  required: !0
422
419
  },
423
- placeholder: C?.apiKeyPlaceholder ?? "Enter API key",
424
- showPasswordLabel: C?.showApiKeyLabel ?? "Show API key",
425
- hidePasswordLabel: C?.hideApiKeyLabel ?? "Hide API key",
420
+ placeholder: _?.apiKeyPlaceholder ?? "Enter API key",
421
+ showPasswordLabel: _?.showApiKeyLabel ?? "Show API key",
422
+ hidePasswordLabel: _?.hideApiKeyLabel ?? "Hide API key",
426
423
  error: t.apiKey || void 0,
427
424
  invalid: !!t.apiKey,
428
- disabled: A
425
+ disabled: C
429
426
  })]
430
427
  }),
431
428
  e.withLogin !== c.WithoutLogin && B()
432
429
  ]
433
430
  }),
434
- O && /* @__PURE__ */ R(_, {
435
- open: O,
436
- header: C?.logoutConfirmTitle ?? "Log out?",
437
- description: C?.logoutConfirmDescription ?? "Are you sure you want to log out? You will need to re-enter your credentials to use this toolset again.",
438
- confirmLabel: C?.logOutLabel ?? "Log out",
439
- cancelLabel: C?.cancelLabel ?? "Cancel",
440
- variant: v.Danger,
441
- isLoading: T,
442
- disableConfirmButton: T,
443
- onConfirm: L,
444
- onCancel: () => k(!1),
445
- onClose: () => k(!1)
431
+ b && /* @__PURE__ */ E(ne, {
432
+ open: b,
433
+ header: _?.logoutConfirmTitle ?? "Log out?",
434
+ description: _?.logoutConfirmDescription ?? "Are you sure you want to log out? You will need to re-enter your credentials to use this toolset again.",
435
+ confirmLabel: _?.logOutLabel ?? "Log out",
436
+ cancelLabel: _?.cancelLabel ?? "Cancel",
437
+ variant: re.Danger,
438
+ isLoading: v,
439
+ disableConfirmButton: v,
440
+ onConfirm: z,
441
+ onCancel: () => x(!1),
442
+ onClose: () => x(!1)
446
443
  })
447
444
  ]
448
445
  });
449
- }, fe = O(({ url: e, className: t, labels: n }) => {
446
+ }, pe = _(({ url: e, className: t, labels: n }) => {
450
447
  let { isCopied: r, copy: i } = g(e), a = n?.copiedLabel ?? "Copied!";
451
- return /* @__PURE__ */ z("div", {
448
+ return /* @__PURE__ */ D("div", {
452
449
  className: h("flex flex-col gap-3", t),
453
450
  children: [
454
- /* @__PURE__ */ z("div", {
451
+ /* @__PURE__ */ D("div", {
455
452
  className: "flex flex-col gap-1",
456
- children: [/* @__PURE__ */ R("p", {
453
+ children: [/* @__PURE__ */ E("p", {
457
454
  className: "dial-body-semi-text text-start text-primary",
458
455
  children: n?.title ?? "Connect toolset"
459
- }), /* @__PURE__ */ R("p", {
456
+ }), /* @__PURE__ */ E("p", {
460
457
  className: "dial-small-text text-start text-secondary",
461
458
  children: n?.description ?? "Copy endpoint URL to easily integrate toolset into your workflows"
462
459
  })]
463
460
  }),
464
- /* @__PURE__ */ R("div", { children: /* @__PURE__ */ R(d, {
461
+ /* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(d, {
465
462
  copiedLabel: a,
466
463
  copyLabel: n?.copyLabel ?? "Copy URL",
467
464
  isCopied: r,
468
465
  onClick: i
469
466
  }) }),
470
- /* @__PURE__ */ R("span", {
467
+ /* @__PURE__ */ E("span", {
471
468
  role: "status",
472
469
  "aria-live": "polite",
473
470
  className: "sr-only",
@@ -475,16 +472,16 @@ var B = {
475
472
  })
476
473
  ]
477
474
  });
478
- }), pe = ({ form: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, connectUrl: a, listToolNames: o, authActions: s, onOAuthLogin: c, onNotifySuccess: l, onNotifyError: u, onChange: d, onAuthChange: f, onEnsureSaved: p, labels: h }) => {
479
- let [g, _] = M(null), v = !!a && !!r, y = j(() => [{
480
- value: V.Http,
475
+ }), me = ({ form: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, connectUrl: a, listToolNames: o, authActions: s, onOAuthLogin: c, onNotifySuccess: l, onNotifyError: u, onChange: d, onAuthChange: f, onEnsureSaved: p, labels: h }) => {
476
+ let [g, _] = S(null), v = !!a && !!r, x = b(() => [{
477
+ value: z.Http,
481
478
  label: "HTTP"
482
479
  }, {
483
- value: V.Sse,
480
+ value: z.Sse,
484
481
  label: "SSE"
485
482
  }], []);
486
- return A(() => {
487
- if (!r || !o || !Q(e.auth, i)) {
483
+ return y(() => {
484
+ if (!r || !o || !X(e.auth, i)) {
488
485
  _(null);
489
486
  return;
490
487
  }
@@ -505,10 +502,10 @@ var B = {
505
502
  e.auth,
506
503
  e.endpoint,
507
504
  o
508
- ]), /* @__PURE__ */ z("div", {
505
+ ]), /* @__PURE__ */ D("div", {
509
506
  className: "flex max-w-[1060px] flex-col gap-4",
510
507
  children: [
511
- /* @__PURE__ */ R(x, {
508
+ /* @__PURE__ */ E(A, {
512
509
  id: "toolset-endpoint",
513
510
  value: e.endpoint,
514
511
  onChange: (e) => d({ endpoint: e ?? "" }),
@@ -521,19 +518,19 @@ var B = {
521
518
  error: t.endpoint || void 0,
522
519
  invalid: !!t.endpoint
523
520
  }),
524
- /* @__PURE__ */ R(T, {
521
+ /* @__PURE__ */ E(P, {
525
522
  labelProps: {
526
523
  label: h?.protocolLabel ?? "Protocol",
527
524
  required: !0
528
525
  },
529
526
  id: "toolset-protocol",
530
- items: y,
527
+ items: x,
531
528
  value: e.protocol,
532
529
  onChange: (e) => {
533
530
  d({ protocol: e });
534
531
  }
535
532
  }),
536
- g ? /* @__PURE__ */ R(E, {
533
+ g ? /* @__PURE__ */ E(I, {
537
534
  id: "toolset-allowed-tools",
538
535
  multiple: !0,
539
536
  searchable: !0,
@@ -546,7 +543,7 @@ var B = {
546
543
  })),
547
544
  value: e.allowedTools,
548
545
  onChange: (e) => d({ allowedTools: e })
549
- }) : /* @__PURE__ */ R(D, {
546
+ }) : /* @__PURE__ */ E(L, {
550
547
  id: "toolset-allowed-tools",
551
548
  labelProps: { label: h?.allowedToolsLabel ?? "Allowed tools" },
552
549
  placeholder: h?.allowedToolsPlaceholder ?? "Add tools, comma separated",
@@ -554,7 +551,7 @@ var B = {
554
551
  onChange: (e) => d({ allowedTools: e }),
555
552
  tagClassName: m
556
553
  }),
557
- /* @__PURE__ */ R(de, {
554
+ /* @__PURE__ */ E(fe, {
558
555
  auth: e.auth,
559
556
  errors: t,
560
557
  isSaving: n,
@@ -569,179 +566,187 @@ var B = {
569
566
  onEnsureSaved: p,
570
567
  labels: h?.auth
571
568
  }),
572
- v && /* @__PURE__ */ R(fe, {
569
+ v && /* @__PURE__ */ E(pe, {
573
570
  url: a ?? "",
574
571
  labels: h?.connect,
575
572
  className: "border-t border-tertiary pt-4"
576
573
  })
577
574
  ]
578
575
  });
579
- }, me = [
576
+ }, he = [
580
577
  "keyHeader",
581
578
  "apiKey",
582
579
  "clientId",
583
580
  "clientSecret",
584
581
  "authorizationEndpoint",
585
582
  "tokenEndpoint"
586
- ], he = [
587
- "name",
588
- "version",
589
- "description",
590
- "endpoint",
591
- ...me
592
- ], ge = new Set(he), _e = (e) => {
583
+ ], ge = ["endpoint", ...he], $ = new Set(ge), _e = { validateVersionPattern: !0 }, ve = (e) => {
593
584
  let t = {};
594
- for (let n of Object.keys(e)) ge.has(n) && (t[n] = !0);
585
+ for (let n of Object.keys(e)) $.has(n) && (t[n] = !0);
595
586
  return t;
596
- }, ve = ({ initialForm: e, toolsetId: n, onPersist: s, onPostSaveLogin: l, onToolsetsChanged: d, onSaveSuccess: m, onSaveComplete: g, onBack: _, buildMcpUrl: v, listToolNames: y, authActions: b, onOAuthLogin: x, onNotifySuccess: ee, onNotifyError: w, bucket: T, FileManagerModal: te, resolveIconUrl: E, allowedMimeTypes: D, maxFileSizeBytes: O, availableLocaleOptions: N, labels: P }) => {
597
- let F = !!n, [re, I] = M(""), V = n || re, [H, U] = M(e), [W, G] = M(!1), [ie, K] = M({}), [q, Y] = M({}), X = ne(null);
598
- A(() => {
599
- U(e), X.current = e, K({}), Y({}), I("");
600
- }, [e]);
601
- let Z = k((e) => {
602
- U((t) => ({
603
- ...t,
604
- ...e
605
- })), Y((t) => ({
606
- ...t,
607
- ..._e(e)
608
- })), K((t) => {
609
- let n = { ...t };
610
- for (let t of Object.keys(e)) delete n[t];
611
- return n;
612
- });
613
- }, []), Q = k((e) => {
614
- U((t) => ({
587
+ }, ye = ({ initialForm: r, toolsetId: a, onPersist: s, onPostSaveLogin: l, onToolsetsChanged: d, onSaveSuccess: m, onSaveComplete: h, onBack: g, buildMcpUrl: _, listToolNames: C, authActions: w, onOAuthLogin: ee, onNotifySuccess: te, onNotifyError: T, bucket: D, FileManagerModal: ne, resolveIconUrl: re, allowedMimeTypes: O, maxFileSizeBytes: k, availableLocaleOptions: A, labels: j }) => {
588
+ let M = !!a, [N, P] = S(""), F = a || N, [I, L] = S({
589
+ initialForm: r,
590
+ key: 0
591
+ });
592
+ I.initialForm !== r && L({
593
+ initialForm: r,
594
+ key: I.key + 1
595
+ });
596
+ let { values: z, setValues: B, markTouched: V, visibleErrorCodes: H, attemptSubmit: U } = i({
597
+ initialValues: b(() => se(r), [r]),
598
+ validationOptions: _e,
599
+ reseedKey: I.key
600
+ }), [W, G] = S(r), K = b(() => ({
601
+ ...W,
602
+ ...z
603
+ }), [W, z]), [ie, J] = S(!1), [Y, X] = S({}), [oe, Z] = S({}), Q = x(null);
604
+ y(() => {
605
+ G(r), Q.current = r, X({}), Z({}), P("");
606
+ }, [r]);
607
+ let ue = v((e) => {
608
+ let { metadata: t, setup: r } = ce(e);
609
+ Object.keys(t).length > 0 && (B(t), "name" in t && V(n.Name), "version" in t && V(n.Version)), Object.keys(r).length !== 0 && (G((e) => ({
610
+ ...e,
611
+ ...r
612
+ })), Z((e) => ({
613
+ ...e,
614
+ ...ve(r)
615
+ })), X((e) => {
616
+ let t = { ...e };
617
+ for (let e of Object.keys(r)) delete t[e];
618
+ return t;
619
+ }));
620
+ }, [B, V]), de = v((e) => {
621
+ G((t) => ({
615
622
  ...t,
616
623
  auth: {
617
624
  ...t.auth,
618
625
  ...e
619
626
  }
620
- })), Y((t) => ({
627
+ })), Z((t) => ({
621
628
  ...t,
622
- ..._e(e)
623
- })), K((t) => {
629
+ ...ve(e)
630
+ })), X((t) => {
624
631
  let n = { ...t };
625
- if ("authenticationType" in e || "withLogin" in e || "isLoggedIn" in e) for (let e of me) delete n[e];
632
+ if ("authenticationType" in e || "withLogin" in e || "isLoggedIn" in e) for (let e of he) delete n[e];
626
633
  else for (let t of Object.keys(e)) delete n[t];
627
634
  return n;
628
635
  }), "isLoggedIn" in e && d();
629
- }, [d]), oe = k(async () => {
630
- if (V && X.current != null && JSON.stringify(X.current) === JSON.stringify(H)) return V;
631
- G(!0);
636
+ }, [d]), fe = v(async () => {
637
+ if (F && Q.current != null && JSON.stringify(Q.current) === JSON.stringify(K)) return F;
638
+ J(!0);
632
639
  try {
633
- let e = await s(H, V);
634
- return e ? (V || I(e), X.current = H, await d(), e) : null;
640
+ let e = await s(K, F);
641
+ return e ? (F || P(e), Q.current = K, await d(), e) : null;
635
642
  } catch {
636
643
  return null;
637
644
  } finally {
638
- G(!1);
645
+ J(!1);
639
646
  }
640
647
  }, [
641
- H,
642
- V,
648
+ K,
649
+ F,
643
650
  s,
644
651
  d
645
- ]), se = k(async () => await oe() ?? !1, [oe]), $ = k((e) => {
646
- let n = P?.validation, r = {}, i = a(e, { validateVersionPattern: !0 });
647
- return i.name === t.Required ? r.name = n?.nameRequired ?? "Name is required" : i.name === t.TooLong ? r.name = n?.nameTooLong ?? `Use ${p} characters or fewer.` : i.name === t.ControlCharacters && (r.name = n?.nameControlCharacters ?? "Remove line breaks, tabs and other control characters."), i.description === t.TooLong && (r.description = n?.descriptionTooLong ?? `Use ${f} characters or fewer.`), i.version === t.InvalidFormat && (r.version = n?.versionInvalid ?? "Version may only contain letters, digits, dots, underscores, and dashes"), e.endpoint.trim() ? J(e.endpoint) || (r.endpoint = n?.endpointInvalid ?? "Enter a valid http(s) URL") : r.endpoint = n?.endpointRequired ?? "Endpoint is required", e.auth.isLoggedIn || (e.auth.authenticationType === o.ApiKey && (e.auth.keyHeader?.trim() || (r.keyHeader = n?.keyHeaderRequired ?? "Key name is required"), e.auth.withLogin === c.WithLogin && !e.auth.apiKey?.trim() && (r.apiKey = n?.apiKeyRequired ?? "API key is required")), e.auth.authenticationType === o.OAuth && e.auth.withLogin === c.WithConfig && (e.auth.clientId?.trim() || (r.clientId = n?.clientIdRequired ?? "Client ID is required"), !F && !e.auth.clientSecret?.trim() && (r.clientSecret = n?.clientSecretRequired ?? "Client secret is required"), e.auth.authorizationEndpoint?.trim() && !J(e.auth.authorizationEndpoint) && (r.authorizationEndpoint = n?.endpointInvalid ?? "Enter a valid http(s) URL"), e.auth.tokenEndpoint?.trim() && !J(e.auth.tokenEndpoint) && (r.tokenEndpoint = n?.endpointInvalid ?? "Enter a valid http(s) URL"))), r;
648
- }, [P, F]), le = k(async () => {
649
- let e = $(H);
650
- if (Object.keys(e).length > 0) {
651
- K(e);
652
+ ]), pe = v(async () => await fe() ?? !1, [fe]), $ = v((e) => {
653
+ let t = j?.validation, n = {};
654
+ return e.endpoint.trim() ? q(e.endpoint) || (n.endpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL") : n.endpoint = t?.endpointRequired ?? "Endpoint is required", e.auth.isLoggedIn || (e.auth.authenticationType === o.ApiKey && (e.auth.keyHeader?.trim() || (n.keyHeader = t?.keyHeaderRequired ?? "Key name is required"), e.auth.withLogin === c.WithLogin && !e.auth.apiKey?.trim() && (n.apiKey = t?.apiKeyRequired ?? "API key is required")), e.auth.authenticationType === o.OAuth && e.auth.withLogin === c.WithConfig && (e.auth.clientId?.trim() || (n.clientId = t?.clientIdRequired ?? "Client ID is required"), !M && !e.auth.clientSecret?.trim() && (n.clientSecret = t?.clientSecretRequired ?? "Client secret is required"), e.auth.authorizationEndpoint?.trim() && !q(e.auth.authorizationEndpoint) && (n.authorizationEndpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL"), e.auth.tokenEndpoint?.trim() && !q(e.auth.tokenEndpoint) && (n.tokenEndpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL"))), n;
655
+ }, [j, M]), ye = v(async () => {
656
+ let e = U(), t = $(K);
657
+ if (!e || Object.keys(t).length > 0) {
658
+ X(t);
652
659
  return;
653
660
  }
654
- K({}), G(!0);
661
+ X({}), J(!0);
655
662
  try {
656
- let e = await s(H, V);
663
+ let e = await s(K, F);
657
664
  if (!e) return;
658
- await d(), m(H);
665
+ await d(), m(K);
659
666
  try {
660
- await l(e, H.auth), g();
667
+ await l(e, K.auth), h();
661
668
  } catch (e) {
662
669
  let { traceId: t } = await u(e);
663
- w(P?.settings?.auth?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
670
+ T(j?.settings?.auth?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
664
671
  }
665
672
  } catch {} finally {
666
- G(!1);
673
+ J(!1);
667
674
  }
668
675
  }, [
669
- H,
676
+ U,
677
+ K,
670
678
  $,
671
- V,
679
+ F,
672
680
  s,
673
681
  d,
674
682
  m,
675
- g,
683
+ h,
676
684
  l,
677
- w,
678
- P
679
- ]), ue = j(() => !ae(H, F), [H, F]), de = j(() => {
680
- let e = $(H), t = { ...ie };
681
- for (let n of he) {
682
- if (!q[n]) continue;
683
- let r = e[n];
684
- r ? t[n] = r : delete t[n];
685
+ T,
686
+ j
687
+ ]), be = b(() => !ae(K, M), [K, M]), xe = b(() => {
688
+ let t = j?.validation, n = $(K), r = { ...Y };
689
+ for (let e of ge) {
690
+ if (!oe[e]) continue;
691
+ let t = n[e];
692
+ t ? r[e] = t : delete r[e];
685
693
  }
686
- return t;
694
+ return H.name === e.Required ? r.name = t?.nameRequired ?? "Name is required" : H.name === e.TooLong ? r.name = t?.nameTooLong ?? `Use ${p} characters or fewer.` : H.name === e.ControlCharacters && (r.name = t?.nameControlCharacters ?? "Remove line breaks, tabs and other control characters."), H.description === e.TooLong && (r.description = t?.descriptionTooLong ?? `Use ${f} characters or fewer.`), H.version === e.InvalidFormat && (r.version = t?.versionInvalid ?? "Version may only contain letters, digits, dots, underscores, and dashes"), r;
687
695
  }, [
688
- q,
689
- ie,
696
+ oe,
697
+ Y,
698
+ K,
699
+ j,
690
700
  H,
691
701
  $
692
- ]), fe = v && V ? v(V) : void 0;
693
- return /* @__PURE__ */ R(r, {
694
- title: F ? P?.layout?.editTitle ?? "Edit toolset" : P?.layout?.createTitle ?? "Create toolset",
695
- onBack: _,
696
- backAriaLabel: P?.layout?.backAriaLabel ?? "Back to catalog",
697
- isSaving: W,
698
- labels: { savingStatusLabel: P?.layout?.savingStatusLabel ?? "Saving" },
699
- actions: /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R(S, {
700
- label: P?.layout?.cancelLabel ?? "Cancel",
701
- onClick: _
702
- }), /* @__PURE__ */ R(C, {
703
- label: F ? P?.layout?.saveLabel ?? "Save" : P?.layout?.createLabel ?? "Create",
704
- disabled: ue,
705
- onClick: le
706
- })] }),
707
- leftContent: /* @__PURE__ */ R(i, {
708
- title: P?.layout?.metadataSectionTitle ?? "Metadata",
709
- className: h("border-0 p-4 desktop:p-6", B.metadataSection),
710
- children: /* @__PURE__ */ R(ce, {
711
- form: H,
712
- errors: de,
713
- bucket: T,
714
- FileManagerModal: te,
715
- resolveIconUrl: E,
716
- allowedMimeTypes: D,
717
- maxFileSizeBytes: O,
718
- availableLocaleOptions: N,
719
- onChange: Z,
720
- labels: P?.general
721
- })
702
+ ]), Se = _ && F ? _(F) : void 0;
703
+ return /* @__PURE__ */ E(t, {
704
+ title: M ? j?.layout?.editTitle ?? "Edit toolset" : j?.layout?.createTitle ?? "Create toolset",
705
+ onBack: g,
706
+ onCancel: g,
707
+ onSubmit: ye,
708
+ submitLabel: M ? j?.layout?.saveLabel ?? "Save" : j?.layout?.createLabel ?? "Create",
709
+ isSubmitting: ie,
710
+ isSubmitDisabled: be,
711
+ metadataSectionClassName: R.metadataSection,
712
+ setupSectionClassName: R.setupSection,
713
+ labels: {
714
+ backAriaLabel: j?.layout?.backAriaLabel ?? "Back to catalog",
715
+ savingStatusLabel: j?.layout?.savingStatusLabel ?? "Saving",
716
+ metadataTitle: j?.layout?.metadataSectionTitle ?? "Metadata",
717
+ setupTitle: j?.layout?.setupSectionTitle ?? "Setup",
718
+ cancelLabel: j?.layout?.cancelLabel ?? "Cancel"
719
+ },
720
+ metadata: /* @__PURE__ */ E(le, {
721
+ form: K,
722
+ errors: xe,
723
+ bucket: D,
724
+ FileManagerModal: ne,
725
+ resolveIconUrl: re,
726
+ allowedMimeTypes: O,
727
+ maxFileSizeBytes: k,
728
+ availableLocaleOptions: A,
729
+ onChange: ue,
730
+ labels: j?.general
722
731
  }),
723
- rightContent: /* @__PURE__ */ R(i, {
724
- title: P?.layout?.setupSectionTitle ?? "Setup",
725
- className: h("border-0 p-4 desktop:p-6", B.setupSection),
726
- children: /* @__PURE__ */ R(pe, {
727
- form: H,
728
- errors: de,
729
- isSaving: W,
730
- toolsetId: V,
731
- isEditMode: F,
732
- connectUrl: fe,
733
- listToolNames: y,
734
- authActions: b,
735
- onOAuthLogin: x,
736
- onNotifySuccess: ee,
737
- onNotifyError: w,
738
- onChange: Z,
739
- onAuthChange: Q,
740
- onEnsureSaved: se,
741
- labels: P?.settings
742
- })
732
+ setup: /* @__PURE__ */ E(me, {
733
+ form: K,
734
+ errors: xe,
735
+ isSaving: ie,
736
+ toolsetId: F,
737
+ isEditMode: M,
738
+ connectUrl: Se,
739
+ listToolNames: C,
740
+ authActions: w,
741
+ onOAuthLogin: ee,
742
+ onNotifySuccess: te,
743
+ onNotifyError: T,
744
+ onChange: ue,
745
+ onAuthChange: de,
746
+ onEnsureSaved: pe,
747
+ labels: j?.settings
743
748
  })
744
749
  });
745
750
  };
746
751
  //#endregion
747
- export { W as AUTH_TYPE_ICONS, H as DEFAULT_TOOLSET_NAME, U as DEFAULT_TOOLSET_VERSION, ce as GeneralForm, B as TOOLSET_EDITOR_CLASS, ve as ToolsetEditor, $ as ToolsetOAuthLoginStatus, V as ToolsetTransportType, K as getDefaultToolsetForm, G as getStorageSafeUniqueToolsetName, Q as isToolsetAuthValid, ae as isToolsetFormValid, J as isValidEndpointUrl, X as normalizeReturnedEndpointUrl };
752
+ export { H as AUTH_TYPE_ICONS, B as DEFAULT_TOOLSET_NAME, V as DEFAULT_TOOLSET_VERSION, le as GeneralForm, R as TOOLSET_EDITOR_CLASS, ye as ToolsetEditor, Q as ToolsetOAuthLoginStatus, z as ToolsetTransportType, G as getDefaultToolsetForm, U as getStorageSafeUniqueToolsetName, X as isToolsetAuthValid, ae as isToolsetFormValid, q as isValidEndpointUrl, J as normalizeReturnedEndpointUrl };
@@ -5,6 +5,7 @@ import { DeploymentGeneralFormData, ToolsetFormErrors } from './toolset-form';
5
5
  * Pre-translated labels for the general (metadata) form. Each group is
6
6
  * optional and replaced as a whole; omitting one falls back to the library's
7
7
  * English defaults.
8
+ * @deprecated Use `MetadataFormLabels` from `@epam/ai-dial-builder-form`.
8
9
  */
9
10
  export interface GeneralFormLabels {
10
11
  /** Labels for the embedded `DeploymentCreationForm` fields. */
@@ -12,7 +13,10 @@ export interface GeneralFormLabels {
12
13
  /** Labels for the avatar picker modal. */
13
14
  avatarPicker?: AvatarPickerModalLabels;
14
15
  }
15
- /** Props of the general (metadata) form shared by the Toolset and Custom App editors. */
16
+ /**
17
+ * Props of the general (metadata) form shared by the Toolset and Custom App editors.
18
+ * @deprecated Use `MetadataFormProps` from `@epam/ai-dial-builder-form`.
19
+ */
16
20
  export interface GeneralFormProps {
17
21
  /** Current general form values. */
18
22
  form: DeploymentGeneralFormData;
@@ -1 +1 @@
1
- {"version":3,"file":"general-form-props.d.ts","sourceRoot":"","sources":["../../src/models/general-form-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,uBAAuB,EACvB,4BAA4B,EAC5B,kCAAkC,EACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAExB;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,4BAA4B,CAAC;IACpC,0CAA0C;IAC1C,YAAY,CAAC,EAAE,uBAAuB,CAAC;CACxC;AAED,yFAAyF;AACzF,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,IAAI,EAAE,yBAAyB,CAAC;IAChC,oFAAoF;IACpF,MAAM,EAAE,iBAAiB,CAAC;IAC1B,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,gBAAgB,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;IACnE,sEAAsE;IACtE,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,4CAA4C;IAC5C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,sBAAsB,EAAE,kCAAkC,EAAE,CAAC;IAC7D,6DAA6D;IAC7D,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,yBAAyB,CAAC,KAAK,IAAI,CAAC;IAC9D,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,wEAAwE;IACxE,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B"}
1
+ {"version":3,"file":"general-form-props.d.ts","sourceRoot":"","sources":["../../src/models/general-form-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,uBAAuB,EACvB,4BAA4B,EAC5B,kCAAkC,EACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAExB;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,4BAA4B,CAAC;IACpC,0CAA0C;IAC1C,YAAY,CAAC,EAAE,uBAAuB,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,IAAI,EAAE,yBAAyB,CAAC;IAChC,oFAAoF;IACpF,MAAM,EAAE,iBAAiB,CAAC;IAC1B,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,gBAAgB,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;IACnE,sEAAsE;IACtE,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,4CAA4C;IAC5C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,sBAAsB,EAAE,kCAAkC,EAAE,CAAC;IAC7D,6DAA6D;IAC7D,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,yBAAyB,CAAC,KAAK,IAAI,CAAC;IAC9D,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,wEAAwE;IACxE,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-toolset-editor",
3
3
  "description": "Host-agnostic form for authoring and editing a DIAL MCP toolset",
4
- "version": "1.2.0-dev.176",
4
+ "version": "1.2.0-dev.181",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tabler/icons-react": "^3.44.0",
21
- "@epam/ai-dial-builder-form": "1.2.0-dev.176"
21
+ "@epam/ai-dial-builder-form": "1.2.0-dev.181"
22
22
  },
23
23
  "peerDependencies": {
24
- "@epam/ai-dial-chat-hooks": "1.2.0-dev.176",
25
- "@epam/ai-dial-chat-shared": "1.2.0-dev.176",
24
+ "@epam/ai-dial-chat-hooks": "1.2.0-dev.181",
25
+ "@epam/ai-dial-chat-shared": "1.2.0-dev.181",
26
26
  "@epam/ai-dial-ui-kit": "^0.15.0-dev.21",
27
27
  "react": "^19.2.8"
28
28
  },
@@ -1,3 +1,4 @@
1
+ import { DeploymentCreationFormValues } from '../../../builder-form/src/index.ts';
1
2
  import { ToolsetAuthFormData, ToolsetFormData } from '../models/toolset-form';
2
3
  /**
3
4
  * Returns a storage-safe toolset name that does not collide with any existing
@@ -30,4 +31,11 @@ export declare const normalizeReturnedEndpointUrl: (value?: string) => string;
30
31
  export declare const isToolsetAuthValid: (auth: ToolsetAuthFormData, isEditMode?: boolean) => boolean;
31
32
  /** Returns whether the editor form can be saved without surfacing validation errors. */
32
33
  export declare const isToolsetFormValid: (form: ToolsetFormData, isEditMode?: boolean) => boolean;
34
+ /** Returns the Metadata-section slice of a toolset form. */
35
+ export declare const pickToolsetMetadata: (form: ToolsetFormData) => DeploymentCreationFormValues;
36
+ /** Splits a toolset form patch into its Metadata part and its Setup part. */
37
+ export declare const splitToolsetFormPatch: (patch: Partial<ToolsetFormData>) => {
38
+ metadata: Partial<DeploymentCreationFormValues>;
39
+ setup: Partial<ToolsetFormData>;
40
+ };
33
41
  //# sourceMappingURL=toolsets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/utils/toolsets.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,+BAA+B,GAAI,iCAG7C;IACD,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,KAAG,MAOH,CAAC;AAQF,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,GAChC,gBAAe,MAAM,EAAO,KAC3B,eAWD,CAAC;AAmBH,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,OACR,CAAC;AAK5C;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,QAAQ,MAAM,KAAG,MAkB7D,CAAC;AAKF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,mBAAmB,EACzB,oBAAkB,KACjB,OAmBF,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,GAC7B,MAAM,eAAe,EACrB,oBAAkB,KACjB,OAKwC,CAAC"}
1
+ {"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/utils/toolsets.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,4BAA4B,CAAC;AAOpC,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,+BAA+B,GAAI,iCAG7C;IACD,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,KAAG,MAOH,CAAC;AAQF,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,GAChC,gBAAe,MAAM,EAAO,KAC3B,eAWD,CAAC;AAmBH,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,OACR,CAAC;AAK5C;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,QAAQ,MAAM,KAAG,MAkB7D,CAAC;AAKF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,mBAAmB,EACzB,oBAAkB,KACjB,OAmBF,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,GAC7B,MAAM,eAAe,EACrB,oBAAkB,KACjB,OAKwC,CAAC;AAW5C,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,GAC9B,MAAM,eAAe,KACpB,4BAOD,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,GAChC,OAAO,OAAO,CAAC,eAAe,CAAC,KAC9B;IACD,QAAQ,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAChD,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAWjC,CAAC"}