@wso2/am-core-ui 0.0.18 → 0.0.20

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.
Files changed (48) hide show
  1. package/dist/APIKeysManager-C0phJriD.js +241 -0
  2. package/dist/CatalogKindListing-DvUuZEpc.js +137 -0
  3. package/dist/CodeBlock-B2Ecl916.js +21736 -0
  4. package/dist/EnvironmentCard-CIXhDhlZ.js +319 -0
  5. package/dist/EnvironmentSelector-D8S6nO9u.js +48 -0
  6. package/dist/IsolationTierIndicator-cf90kgjL.js +81 -0
  7. package/dist/LabelChips-7rA7_yre.js +139 -0
  8. package/dist/MCPLogo-D9IJzzl7.js +30 -0
  9. package/dist/PolicyListSection-D6aVSKwP.js +1143 -0
  10. package/dist/ResourceListShell-DFisKftq.js +463 -0
  11. package/dist/SwaggerSpecViewer-DzjR6U6W.js +106 -0
  12. package/dist/clipboard-YAzStmkw.js +23 -0
  13. package/dist/debounce-D17ObVdG.js +208 -0
  14. package/dist/format-wlHhWjGo.js +29 -0
  15. package/dist/formatDistanceToNow-DyjnT7l9.js +100 -0
  16. package/dist/gatewayScripts-D4ZDEDPS.js +72 -0
  17. package/dist/highlight-BsUzxSR3.js +454 -0
  18. package/dist/{index-CnXsN5I3.js → index-3K-zqdp-.js} +34 -33
  19. package/dist/index-6liAPSDn.js +1564 -0
  20. package/dist/index-B3ASENUJ.js +1290 -0
  21. package/dist/index-B7Pf4oPq.js +3069 -0
  22. package/dist/index-BNO3FhZK.js +2304 -0
  23. package/dist/index-BUZSfCl5.js +335 -0
  24. package/dist/index-BXiG1r_o.js +1409 -0
  25. package/dist/index-BYy7Iaam.js +459 -0
  26. package/dist/index-BbB_yx4V.js +1397 -0
  27. package/dist/index-BjWJ95lH.js +2728 -0
  28. package/dist/index-ByEInFlf.js +26408 -0
  29. package/dist/index-C8WIhzyz.js +123 -0
  30. package/dist/index-CnzvaT6b.js +2368 -0
  31. package/dist/index-CrnCf-hJ.js +763 -0
  32. package/dist/index-Cvsho9xg.js +2346 -0
  33. package/dist/index-CxnAo1_c.js +119 -0
  34. package/dist/{index-DYV1jEai.js → index-Cz7-AZwE.js} +22 -20
  35. package/dist/index-DBdRFjxm.js +1264 -0
  36. package/dist/index-DFsSvmMZ.js +7981 -0
  37. package/dist/index-DslzOSGN.js +2549 -0
  38. package/dist/index-DvpYvchM.js +2341 -0
  39. package/dist/index-PWsNvJB-.js +546 -0
  40. package/dist/index.d.ts +1398 -481
  41. package/dist/index.js +539 -438
  42. package/dist/js-yaml-CvhD-clg.js +1335 -0
  43. package/dist/llmProviderPayload-BPzWDy7n.js +332 -0
  44. package/dist/schemas-DFScWdSL.js +2969 -0
  45. package/package.json +1 -1
  46. package/dist/index-B47EJCom.js +0 -236
  47. package/dist/index-Bl1Y7Sro.js +0 -3037
  48. package/dist/index-DlS9Lybj.js +0 -80691
@@ -0,0 +1,454 @@
1
+ import O from "react";
2
+ function ge(e, t) {
3
+ if (e == null) return {};
4
+ var c = {};
5
+ for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
6
+ if (t.indexOf(n) !== -1) continue;
7
+ c[n] = e[n];
8
+ }
9
+ return c;
10
+ }
11
+ function me(e, t) {
12
+ if (e == null) return {};
13
+ var c, n, o = ge(e, t);
14
+ if (Object.getOwnPropertySymbols) {
15
+ var a = Object.getOwnPropertySymbols(e);
16
+ for (n = 0; n < a.length; n++) c = a[n], t.indexOf(c) === -1 && {}.propertyIsEnumerable.call(e, c) && (o[c] = e[c]);
17
+ }
18
+ return o;
19
+ }
20
+ function q(e, t) {
21
+ (t == null || t > e.length) && (t = e.length);
22
+ for (var c = 0, n = Array(t); c < t; c++) n[c] = e[c];
23
+ return n;
24
+ }
25
+ function ye(e) {
26
+ if (Array.isArray(e)) return q(e);
27
+ }
28
+ function pe(e) {
29
+ if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
30
+ }
31
+ function fe(e, t) {
32
+ if (e) {
33
+ if (typeof e == "string") return q(e, t);
34
+ var c = {}.toString.call(e).slice(8, -1);
35
+ return c === "Object" && e.constructor && (c = e.constructor.name), c === "Map" || c === "Set" ? Array.from(e) : c === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c) ? q(e, t) : void 0;
36
+ }
37
+ }
38
+ function de() {
39
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
40
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
41
+ }
42
+ function z(e) {
43
+ return ye(e) || pe(e) || fe(e) || de();
44
+ }
45
+ function D(e) {
46
+ "@babel/helpers - typeof";
47
+ return D = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
48
+ return typeof t;
49
+ } : function(t) {
50
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
51
+ }, D(e);
52
+ }
53
+ function ve(e, t) {
54
+ if (D(e) != "object" || !e) return e;
55
+ var c = e[Symbol.toPrimitive];
56
+ if (c !== void 0) {
57
+ var n = c.call(e, t);
58
+ if (D(n) != "object") return n;
59
+ throw new TypeError("@@toPrimitive must return a primitive value.");
60
+ }
61
+ return (t === "string" ? String : Number)(e);
62
+ }
63
+ function be(e) {
64
+ var t = ve(e, "string");
65
+ return D(t) == "symbol" ? t : t + "";
66
+ }
67
+ function ne(e, t, c) {
68
+ return (t = be(t)) in e ? Object.defineProperty(e, t, {
69
+ value: c,
70
+ enumerable: !0,
71
+ configurable: !0,
72
+ writable: !0
73
+ }) : e[t] = c, e;
74
+ }
75
+ function Q() {
76
+ return Q = Object.assign ? Object.assign.bind() : function(e) {
77
+ for (var t = 1; t < arguments.length; t++) {
78
+ var c = arguments[t];
79
+ for (var n in c) ({}).hasOwnProperty.call(c, n) && (e[n] = c[n]);
80
+ }
81
+ return e;
82
+ }, Q.apply(null, arguments);
83
+ }
84
+ function _(e, t) {
85
+ var c = Object.keys(e);
86
+ if (Object.getOwnPropertySymbols) {
87
+ var n = Object.getOwnPropertySymbols(e);
88
+ t && (n = n.filter(function(o) {
89
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
90
+ })), c.push.apply(c, n);
91
+ }
92
+ return c;
93
+ }
94
+ function $(e) {
95
+ for (var t = 1; t < arguments.length; t++) {
96
+ var c = arguments[t] != null ? arguments[t] : {};
97
+ t % 2 ? _(Object(c), !0).forEach(function(n) {
98
+ ne(e, n, c[n]);
99
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(c)) : _(Object(c)).forEach(function(n) {
100
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(c, n));
101
+ });
102
+ }
103
+ return e;
104
+ }
105
+ function he(e) {
106
+ var t = e.length;
107
+ if (t === 0 || t === 1) return e;
108
+ if (t === 2)
109
+ return [e[0], e[1], "".concat(e[0], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0])];
110
+ if (t === 3)
111
+ return [e[0], e[1], e[2], "".concat(e[0], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(e[0]), "".concat(e[1], ".").concat(e[2]), "".concat(e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[1], ".").concat(e[2]), "".concat(e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0])];
112
+ if (t >= 4)
113
+ return [e[0], e[1], e[2], e[3], "".concat(e[0], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2]), "".concat(e[0], ".").concat(e[3]), "".concat(e[1], ".").concat(e[0]), "".concat(e[1], ".").concat(e[2]), "".concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[1]), "".concat(e[2], ".").concat(e[3]), "".concat(e[3], ".").concat(e[0]), "".concat(e[3], ".").concat(e[1]), "".concat(e[3], ".").concat(e[2]), "".concat(e[0], ".").concat(e[1], ".").concat(e[2]), "".concat(e[0], ".").concat(e[1], ".").concat(e[3]), "".concat(e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2], ".").concat(e[3]), "".concat(e[0], ".").concat(e[3], ".").concat(e[1]), "".concat(e[0], ".").concat(e[3], ".").concat(e[2]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(e[0], ".").concat(e[3]), "".concat(e[1], ".").concat(e[2], ".").concat(e[0]), "".concat(e[1], ".").concat(e[2], ".").concat(e[3]), "".concat(e[1], ".").concat(e[3], ".").concat(e[0]), "".concat(e[1], ".").concat(e[3], ".").concat(e[2]), "".concat(e[2], ".").concat(e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(e[0], ".").concat(e[3]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0]), "".concat(e[2], ".").concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(e[3], ".").concat(e[0]), "".concat(e[2], ".").concat(e[3], ".").concat(e[1]), "".concat(e[3], ".").concat(e[0], ".").concat(e[1]), "".concat(e[3], ".").concat(e[0], ".").concat(e[2]), "".concat(e[3], ".").concat(e[1], ".").concat(e[0]), "".concat(e[3], ".").concat(e[1], ".").concat(e[2]), "".concat(e[3], ".").concat(e[2], ".").concat(e[0]), "".concat(e[3], ".").concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[1], ".").concat(e[2], ".").concat(e[3]), "".concat(e[0], ".").concat(e[1], ".").concat(e[3], ".").concat(e[2]), "".concat(e[0], ".").concat(e[2], ".").concat(e[1], ".").concat(e[3]), "".concat(e[0], ".").concat(e[2], ".").concat(e[3], ".").concat(e[1]), "".concat(e[0], ".").concat(e[3], ".").concat(e[1], ".").concat(e[2]), "".concat(e[0], ".").concat(e[3], ".").concat(e[2], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2], ".").concat(e[3]), "".concat(e[1], ".").concat(e[0], ".").concat(e[3], ".").concat(e[2]), "".concat(e[1], ".").concat(e[2], ".").concat(e[0], ".").concat(e[3]), "".concat(e[1], ".").concat(e[2], ".").concat(e[3], ".").concat(e[0]), "".concat(e[1], ".").concat(e[3], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(e[3], ".").concat(e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[0], ".").concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(e[0], ".").concat(e[3], ".").concat(e[1]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0], ".").concat(e[3]), "".concat(e[2], ".").concat(e[1], ".").concat(e[3], ".").concat(e[0]), "".concat(e[2], ".").concat(e[3], ".").concat(e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(e[3], ".").concat(e[1], ".").concat(e[0]), "".concat(e[3], ".").concat(e[0], ".").concat(e[1], ".").concat(e[2]), "".concat(e[3], ".").concat(e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[3], ".").concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[3], ".").concat(e[1], ".").concat(e[2], ".").concat(e[0]), "".concat(e[3], ".").concat(e[2], ".").concat(e[0], ".").concat(e[1]), "".concat(e[3], ".").concat(e[2], ".").concat(e[1], ".").concat(e[0])];
114
+ }
115
+ var M = {};
116
+ function re(e) {
117
+ if (e.length === 0 || e.length === 1) return e;
118
+ var t = e.join(".");
119
+ return M[t] || (M[t] = he(e)), M[t];
120
+ }
121
+ function Ne(e) {
122
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = arguments.length > 2 ? arguments[2] : void 0, n = e.filter(function(a) {
123
+ return a !== "token";
124
+ }), o = re(n);
125
+ return o.reduce(function(a, l) {
126
+ return $($({}, a), c[l]);
127
+ }, t);
128
+ }
129
+ function ee(e) {
130
+ return e.join(" ");
131
+ }
132
+ function Se(e, t) {
133
+ var c = 0;
134
+ return function(n) {
135
+ return c += 1, n.map(function(o, a) {
136
+ return ce({
137
+ node: o,
138
+ stylesheet: e,
139
+ useInlineStyles: t,
140
+ key: "code-segment-".concat(c, "-").concat(a)
141
+ });
142
+ });
143
+ };
144
+ }
145
+ function ce(e) {
146
+ var t = e.node, c = e.stylesheet, n = e.style, o = n === void 0 ? {} : n, a = e.useInlineStyles, l = e.key, i = t.properties, h = t.type, d = t.tagName, u = t.value;
147
+ if (h === "text")
148
+ return u;
149
+ if (d) {
150
+ var s = Se(c, a), y;
151
+ if (!a)
152
+ y = $($({}, i), {}, {
153
+ className: ee(i.className)
154
+ });
155
+ else {
156
+ var m = Object.keys(c).reduce(function(b, S) {
157
+ return S.split(".").forEach(function(w) {
158
+ b.includes(w) || b.push(w);
159
+ }), b;
160
+ }, []), p = i.className && i.className.includes("token") ? ["token"] : [], N = i.className && p.concat(i.className.filter(function(b) {
161
+ return !m.includes(b);
162
+ }));
163
+ y = $($({}, i), {}, {
164
+ className: ee(N) || void 0,
165
+ style: Ne(i.className, Object.assign({}, i.style, o), c)
166
+ });
167
+ }
168
+ var r = s(t.children);
169
+ return /* @__PURE__ */ O.createElement(d, Q({
170
+ key: l
171
+ }, y), r);
172
+ }
173
+ }
174
+ const we = (function(e, t) {
175
+ var c = e.listLanguages();
176
+ return c.indexOf(t) !== -1;
177
+ });
178
+ var Le = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
179
+ function te(e, t) {
180
+ var c = Object.keys(e);
181
+ if (Object.getOwnPropertySymbols) {
182
+ var n = Object.getOwnPropertySymbols(e);
183
+ t && (n = n.filter(function(o) {
184
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
185
+ })), c.push.apply(c, n);
186
+ }
187
+ return c;
188
+ }
189
+ function j(e) {
190
+ for (var t = 1; t < arguments.length; t++) {
191
+ var c = arguments[t] != null ? arguments[t] : {};
192
+ t % 2 ? te(Object(c), !0).forEach(function(n) {
193
+ ne(e, n, c[n]);
194
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(c)) : te(Object(c)).forEach(function(n) {
195
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(c, n));
196
+ });
197
+ }
198
+ return e;
199
+ }
200
+ var Oe = /\n/g;
201
+ function je(e) {
202
+ return e.match(Oe);
203
+ }
204
+ function Pe(e) {
205
+ var t = e.lines, c = e.startingLineNumber, n = e.style;
206
+ return t.map(function(o, a) {
207
+ var l = a + c;
208
+ return /* @__PURE__ */ O.createElement("span", {
209
+ key: "line-".concat(a),
210
+ className: "react-syntax-highlighter-line-number",
211
+ style: typeof n == "function" ? n(l) : n
212
+ }, "".concat(l, `
213
+ `));
214
+ });
215
+ }
216
+ function Ce(e) {
217
+ var t = e.codeString, c = e.codeStyle, n = e.containerStyle, o = n === void 0 ? {
218
+ float: "left",
219
+ paddingRight: "10px"
220
+ } : n, a = e.numberStyle, l = a === void 0 ? {} : a, i = e.startingLineNumber;
221
+ return /* @__PURE__ */ O.createElement("code", {
222
+ style: Object.assign({}, c, o)
223
+ }, Pe({
224
+ lines: t.replace(/\n$/, "").split(`
225
+ `),
226
+ style: l,
227
+ startingLineNumber: i
228
+ }));
229
+ }
230
+ function xe(e) {
231
+ return "".concat(e.toString().length, ".25em");
232
+ }
233
+ function oe(e, t) {
234
+ return {
235
+ type: "element",
236
+ tagName: "span",
237
+ properties: {
238
+ key: "line-number--".concat(e),
239
+ className: ["comment", "linenumber", "react-syntax-highlighter-line-number"],
240
+ style: t
241
+ },
242
+ children: [{
243
+ type: "text",
244
+ value: e
245
+ }]
246
+ };
247
+ }
248
+ function ae(e, t, c) {
249
+ var n = {
250
+ display: "inline-block",
251
+ minWidth: xe(c),
252
+ paddingRight: "1em",
253
+ textAlign: "right",
254
+ userSelect: "none"
255
+ }, o = typeof e == "function" ? e(t) : e, a = j(j({}, n), o);
256
+ return a;
257
+ }
258
+ function U(e) {
259
+ var t = e.children, c = e.lineNumber, n = e.lineNumberStyle, o = e.largestLineNumber, a = e.showInlineLineNumbers, l = e.lineProps, i = l === void 0 ? {} : l, h = e.className, d = h === void 0 ? [] : h, u = e.showLineNumbers, s = e.wrapLongLines, y = e.wrapLines, m = y === void 0 ? !1 : y, p = m ? j({}, typeof i == "function" ? i(c) : i) : {};
260
+ if (p.className = p.className ? [].concat(z(p.className.trim().split(/\s+/)), z(d)) : d, c && a) {
261
+ var N = ae(n, c, o);
262
+ t.unshift(oe(c, N));
263
+ }
264
+ return s & u && (p.style = j({
265
+ display: "flex"
266
+ }, p.style)), {
267
+ type: "element",
268
+ tagName: "span",
269
+ properties: p,
270
+ children: t
271
+ };
272
+ }
273
+ function ie(e) {
274
+ for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], n = 0; n < e.length; n++) {
275
+ var o = e[n];
276
+ if (o.type === "text")
277
+ c.push(U({
278
+ children: [o],
279
+ className: z(new Set(t))
280
+ }));
281
+ else if (o.children) {
282
+ var a = t.concat(o.properties.className);
283
+ ie(o.children, a).forEach(function(l) {
284
+ return c.push(l);
285
+ });
286
+ }
287
+ }
288
+ return c;
289
+ }
290
+ function Ie(e, t, c, n, o, a, l, i, h) {
291
+ var d, u = ie(e.value), s = [], y = -1, m = 0;
292
+ function p(v, g) {
293
+ var f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
294
+ return U({
295
+ children: v,
296
+ lineNumber: g,
297
+ lineNumberStyle: i,
298
+ largestLineNumber: l,
299
+ showInlineLineNumbers: o,
300
+ lineProps: c,
301
+ className: f,
302
+ showLineNumbers: n,
303
+ wrapLongLines: h,
304
+ wrapLines: t
305
+ });
306
+ }
307
+ function N(v, g) {
308
+ if (n && g && o) {
309
+ var f = ae(i, g, l);
310
+ v.unshift(oe(g, f));
311
+ }
312
+ return v;
313
+ }
314
+ function r(v, g) {
315
+ var f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
316
+ return t || f.length > 0 ? p(v, g, f) : N(v, g);
317
+ }
318
+ for (var b = function() {
319
+ var g = u[m], f = g.children[0].value, W = je(f);
320
+ if (W) {
321
+ var C = f.split(`
322
+ `);
323
+ C.forEach(function(E, G) {
324
+ var L = n && s.length + a, k = {
325
+ type: "text",
326
+ value: "".concat(E, `
327
+ `)
328
+ };
329
+ if (G === 0) {
330
+ var R = u.slice(y + 1, m).concat(U({
331
+ children: [k],
332
+ className: g.properties.className
333
+ })), H = r(R, L);
334
+ s.push(H);
335
+ } else if (G === C.length - 1) {
336
+ var K = u[m + 1] && u[m + 1].children && u[m + 1].children[0], A = {
337
+ type: "text",
338
+ value: "".concat(E)
339
+ };
340
+ if (K) {
341
+ var x = U({
342
+ children: [A],
343
+ className: g.properties.className
344
+ });
345
+ u.splice(m + 1, 0, x);
346
+ } else {
347
+ var P = [A], I = r(P, L, g.properties.className);
348
+ s.push(I);
349
+ }
350
+ } else {
351
+ var V = [k], F = r(V, L, g.properties.className);
352
+ s.push(F);
353
+ }
354
+ }), y = m;
355
+ }
356
+ m++;
357
+ }; m < u.length; )
358
+ b();
359
+ if (y !== u.length - 1) {
360
+ var S = u.slice(y + 1, u.length);
361
+ if (S && S.length) {
362
+ var w = n && s.length + a, B = r(S, w);
363
+ s.push(B);
364
+ }
365
+ }
366
+ return t ? s : (d = []).concat.apply(d, s);
367
+ }
368
+ function Te(e) {
369
+ var t = e.rows, c = e.stylesheet, n = e.useInlineStyles;
370
+ return t.map(function(o, a) {
371
+ return ce({
372
+ node: o,
373
+ stylesheet: c,
374
+ useInlineStyles: n,
375
+ key: "code-segement".concat(a)
376
+ });
377
+ });
378
+ }
379
+ function le(e) {
380
+ return e && typeof e.highlightAuto < "u";
381
+ }
382
+ function $e(e) {
383
+ var t = e.astGenerator, c = e.language, n = e.code, o = e.defaultCodeValue;
384
+ if (le(t)) {
385
+ var a = we(t, c);
386
+ return c === "text" ? {
387
+ value: o,
388
+ language: "text"
389
+ } : a ? t.highlight(c, n) : t.highlightAuto(n);
390
+ }
391
+ try {
392
+ return c && c !== "text" ? {
393
+ value: t.highlight(n, c)
394
+ } : {
395
+ value: o
396
+ };
397
+ } catch {
398
+ return {
399
+ value: o
400
+ };
401
+ }
402
+ }
403
+ function ke(e, t) {
404
+ return function(n) {
405
+ var o = n.language, a = n.children, l = n.style, i = l === void 0 ? t : l, h = n.customStyle, d = h === void 0 ? {} : h, u = n.codeTagProps, s = u === void 0 ? {
406
+ className: o ? "language-".concat(o) : void 0,
407
+ style: j(j({}, i['code[class*="language-"]']), i['code[class*="language-'.concat(o, '"]')])
408
+ } : u, y = n.useInlineStyles, m = y === void 0 ? !0 : y, p = n.showLineNumbers, N = p === void 0 ? !1 : p, r = n.showInlineLineNumbers, b = r === void 0 ? !0 : r, S = n.startingLineNumber, w = S === void 0 ? 1 : S, B = n.lineNumberContainerStyle, v = n.lineNumberStyle, g = v === void 0 ? {} : v, f = n.wrapLines, W = n.wrapLongLines, C = W === void 0 ? !1 : W, E = n.lineProps, G = E === void 0 ? {} : E, L = n.renderer, k = n.PreTag, R = k === void 0 ? "pre" : k, H = n.CodeTag, K = H === void 0 ? "code" : H, A = n.code, x = A === void 0 ? (Array.isArray(a) ? a[0] : a) || "" : A, P = n.astGenerator, I = me(n, Le);
409
+ P = P || e;
410
+ var V = N ? /* @__PURE__ */ O.createElement(Ce, {
411
+ containerStyle: B,
412
+ codeStyle: s.style || {},
413
+ numberStyle: g,
414
+ startingLineNumber: w,
415
+ codeString: x
416
+ }) : null, F = i.hljs || i['pre[class*="language-"]'] || {
417
+ backgroundColor: "#fff"
418
+ }, X = le(P) ? "hljs" : "prismjs", Y = m ? Object.assign({}, I, {
419
+ style: Object.assign({}, F, d)
420
+ }) : Object.assign({}, I, {
421
+ className: I.className ? "".concat(X, " ").concat(I.className) : X,
422
+ style: Object.assign({}, d)
423
+ });
424
+ if (C ? s.style = j({
425
+ whiteSpace: "pre-wrap"
426
+ }, s.style) : s.style = j({
427
+ whiteSpace: "pre"
428
+ }, s.style), !P)
429
+ return /* @__PURE__ */ O.createElement(R, Y, V, /* @__PURE__ */ O.createElement(K, s, x));
430
+ (f === void 0 && L || C) && (f = !0), L = L || Te;
431
+ var Z = [{
432
+ type: "text",
433
+ value: x
434
+ }], T = $e({
435
+ astGenerator: P,
436
+ language: o,
437
+ code: x,
438
+ defaultCodeValue: Z
439
+ });
440
+ T.language === null && (T.value = Z);
441
+ var J = T.value.length;
442
+ J === 1 && T.value[0].type === "text" && (J = T.value[0].value.split(`
443
+ `).length);
444
+ var se = J + w, ue = Ie(T, f, G, N, b, w, se, g, C);
445
+ return /* @__PURE__ */ O.createElement(R, Y, /* @__PURE__ */ O.createElement(K, s, !b && V, L({
446
+ rows: ue,
447
+ stylesheet: i,
448
+ useInlineStyles: m
449
+ })));
450
+ };
451
+ }
452
+ export {
453
+ ke as h
454
+ };
@@ -1,18 +1,19 @@
1
1
  import { jsx as i, jsxs as N } from "react/jsx-runtime";
2
- import { useCallback as V, useMemo as A, useEffect as z, useState as B } from "react";
3
- import { Alert as G, Box as L, Collapse as D, Button as T, Form as b, TextField as F, Stack as M, CircularProgress as O, Typography as C, Select as H, MenuItem as k } from "@wso2/oxygen-ui";
4
- import { useParams as $, useNavigate as J, generatePath as R } from "react-router-dom";
5
- import { o as K, s as w, y as Q, M as U, j as X, A as Y, f as Z, N as _, O as ee, g as I, P as te } from "./index-DlS9Lybj.js";
6
- import { c as W } from "react/compiler-runtime";
2
+ import { useCallback as V, useMemo as W, useEffect as z, useState as B } from "react";
3
+ import { Alert as $, Box as L, Collapse as H, Button as F, Form as b, TextField as T, Stack as M, CircularProgress as G, Typography as C, Select as D, MenuItem as k } from "@wso2/oxygen-ui";
4
+ import { useParams as O, useNavigate as J, generatePath as R } from "react-router-dom";
5
+ import { cM as K, F as Q, G as U, a$ as X, y as Y, H as Z, cW as _, g as I, P as ee } from "./index-ByEInFlf.js";
6
+ import { o as te, s as w } from "./schemas-DFScWdSL.js";
7
+ import { c as A } from "react/compiler-runtime";
7
8
  import "@tanstack/react-query";
8
9
  import { Link as ne, PackagePlus as ie, FolderPlus as ae } from "@wso2/oxygen-ui-icons-react";
9
- const re = K({
10
+ const re = te({
10
11
  displayName: w().trim().min(1, "Display name is required").min(3, "Display name must be at least 3 characters").max(100, "Display name must be at most 100 characters"),
11
12
  name: w().trim().max(50, "Name must be at most 50 characters"),
12
13
  description: w().trim().optional(),
13
14
  deploymentPipeline: w().trim().min(1, "Deployment pipeline is required")
14
15
  }), oe = (a) => {
15
- const e = W(22), {
16
+ const e = A(22), {
16
17
  lastSubmittedValidationErrors: t,
17
18
  isPending: d,
18
19
  onCancel: c,
@@ -24,16 +25,16 @@ const re = K({
24
25
  e[0] !== t ? (y = Object.values(t), e[0] = t, e[1] = y) : y = e[1];
25
26
  const u = y, v = u.length > 0;
26
27
  let g;
27
- e[2] !== u ? (g = /* @__PURE__ */ i(G, { severity: "error", children: u.map(le) }), e[2] = u, e[3] = g) : g = e[3];
28
+ e[2] !== u ? (g = /* @__PURE__ */ i($, { severity: "error", children: u.map(le) }), e[2] = u, e[3] = g) : g = e[3];
28
29
  let h;
29
- e[4] !== v || e[5] !== g ? (h = /* @__PURE__ */ i(D, { in: v, timeout: "auto", unmountOnExit: !0, children: g }), e[4] = v, e[5] = g, e[6] = h) : h = e[6];
30
+ e[4] !== v || e[5] !== g ? (h = /* @__PURE__ */ i(H, { in: v, timeout: "auto", unmountOnExit: !0, children: g }), e[4] = v, e[5] = g, e[6] = h) : h = e[6];
30
31
  let n;
31
- e[7] !== c ? (n = /* @__PURE__ */ i(T, { variant: "outlined", color: "primary", size: "medium", onClick: c, children: "Cancel" }), e[7] = c, e[8] = n) : n = e[8];
32
+ e[7] !== c ? (n = /* @__PURE__ */ i(F, { variant: "outlined", color: "primary", size: "medium", onClick: c, children: "Cancel" }), e[7] = c, e[8] = n) : n = e[8];
32
33
  let r;
33
34
  e[9] !== P ? (r = P ? /* @__PURE__ */ i(ne, { size: 16 }) : /* @__PURE__ */ i(ie, { size: 16 }), e[9] = P, e[10] = r) : r = e[10];
34
35
  const m = d || E, f = P ? "Register" : "Create";
35
36
  let j;
36
- e[11] !== s || e[12] !== r || e[13] !== m || e[14] !== f ? (j = /* @__PURE__ */ i(T, { variant: "contained", color: "primary", size: "medium", startIcon: r, onClick: s, disabled: m, children: f }), e[11] = s, e[12] = r, e[13] = m, e[14] = f, e[15] = j) : j = e[15];
37
+ e[11] !== s || e[12] !== r || e[13] !== m || e[14] !== f ? (j = /* @__PURE__ */ i(F, { variant: "contained", color: "primary", size: "medium", startIcon: r, onClick: s, disabled: m, children: f }), e[11] = s, e[12] = r, e[13] = m, e[14] = f, e[15] = j) : j = e[15];
37
38
  let x;
38
39
  e[16] !== j || e[17] !== n ? (x = /* @__PURE__ */ N(L, { display: "flex", flexDirection: "row", gap: 1, alignItems: "center", children: [
39
40
  n,
@@ -52,7 +53,7 @@ function q(a, e) {
52
53
  return a.promotionPaths.length === 0 ? null : [...a.promotionPaths.map((d) => d.sourceEnvironmentRef), a.promotionPaths[a.promotionPaths.length - 1]?.targetEnvironmentRefs[0]?.name].filter(Boolean).map((d) => e.get(d) ?? d).join(" → ");
53
54
  }
54
55
  function se(a) {
55
- const e = W(10), {
56
+ const e = A(10), {
56
57
  pipeline: t,
57
58
  envDisplayNameMap: d
58
59
  } = a;
@@ -70,7 +71,7 @@ function se(a) {
70
71
  ] }), e[7] = l, e[8] = o, e[9] = p) : p = e[9], p;
71
72
  }
72
73
  function ce(a) {
73
- const e = W(10), {
74
+ const e = A(10), {
74
75
  pipeline: t,
75
76
  envDisplayNameMap: d
76
77
  } = a;
@@ -97,7 +98,7 @@ const de = ({
97
98
  }) => {
98
99
  const {
99
100
  orgId: l
100
- } = $(), o = V((n, r) => {
101
+ } = O(), o = V((n, r) => {
101
102
  const m = {
102
103
  ...a,
103
104
  [n]: r
@@ -108,18 +109,18 @@ const de = ({
108
109
  }, [a, e, s, d, c]), {
109
110
  mutate: p,
110
111
  isPending: E
111
- } = Q({
112
+ } = K({
112
113
  orgName: l
113
114
  }), {
114
115
  data: P,
115
116
  isLoading: y
116
- } = U({
117
+ } = Q({
117
118
  orgName: l
118
119
  }), u = P?.deploymentPipelines ?? [], {
119
120
  data: v
120
- } = X({
121
+ } = U({
121
122
  orgName: l
122
- }), g = A(() => {
123
+ }), g = W(() => {
123
124
  const n = /* @__PURE__ */ new Map();
124
125
  return (v ?? []).forEach((r) => n.set(r.name, r.displayName ?? r.name)), n;
125
126
  }, [v]);
@@ -135,8 +136,8 @@ const de = ({
135
136
  });
136
137
  }
137
138
  }, [u, a.deploymentPipeline, e, s]);
138
- const h = A(
139
- () => Y.debounce((n) => {
139
+ const h = W(
140
+ () => X.debounce((n) => {
140
141
  if (n.length < 3) {
141
142
  o("name", "");
142
143
  return;
@@ -172,17 +173,17 @@ const de = ({
172
173
  }, [a.displayName, e, h]), /* @__PURE__ */ i(b.Stack, { spacing: 3, children: /* @__PURE__ */ N(b.Section, { children: [
173
174
  /* @__PURE__ */ i(b.Subheader, { children: "Project Details" }),
174
175
  /* @__PURE__ */ N(b.Stack, { spacing: 2, children: [
175
- /* @__PURE__ */ i(b.ElementWrapper, { label: "Name", name: "displayName", children: /* @__PURE__ */ i(F, { id: "displayName", value: a.displayName, onChange: (n) => o("displayName", n.target.value), placeholder: "e.g., Customer Support Platform", error: !!t.displayName, helperText: E ? /* @__PURE__ */ N(M, { direction: "row", alignItems: "center", gap: 1, children: [
176
- /* @__PURE__ */ i(O, { size: 12 }),
176
+ /* @__PURE__ */ i(b.ElementWrapper, { label: "Name", name: "displayName", children: /* @__PURE__ */ i(T, { id: "displayName", value: a.displayName, onChange: (n) => o("displayName", n.target.value), placeholder: "e.g., Customer Support Platform", error: !!t.displayName, helperText: E ? /* @__PURE__ */ N(M, { direction: "row", alignItems: "center", gap: 1, children: [
177
+ /* @__PURE__ */ i(G, { size: 12 }),
177
178
  /* @__PURE__ */ i(C, { variant: "caption", children: "Validating name..." })
178
179
  ] }) : t.displayName, fullWidth: !0 }) }),
179
- /* @__PURE__ */ i(b.ElementWrapper, { label: "Description (optional)", name: "description", children: /* @__PURE__ */ i(F, { id: "description", value: a.description, onChange: (n) => o("description", n.target.value), placeholder: "Short description of this project", multiline: !0, minRows: 2, maxRows: 6, error: !!t.description, helperText: t.description, fullWidth: !0 }) }),
180
- /* @__PURE__ */ i(b.ElementWrapper, { label: "Deployment Pipeline", name: "deploymentPipeline", children: /* @__PURE__ */ N(H, { id: "deploymentPipeline", value: a.deploymentPipeline, onChange: (n) => o("deploymentPipeline", n.target.value), error: !!t.deploymentPipeline, disabled: y, displayEmpty: !0, renderValue: (n) => {
180
+ /* @__PURE__ */ i(b.ElementWrapper, { label: "Description (optional)", name: "description", children: /* @__PURE__ */ i(T, { id: "description", value: a.description, onChange: (n) => o("description", n.target.value), placeholder: "Short description of this project", multiline: !0, minRows: 2, maxRows: 6, error: !!t.description, helperText: t.description, fullWidth: !0 }) }),
181
+ /* @__PURE__ */ i(b.ElementWrapper, { label: "Deployment Pipeline", name: "deploymentPipeline", children: /* @__PURE__ */ N(D, { id: "deploymentPipeline", value: a.deploymentPipeline, onChange: (n) => o("deploymentPipeline", n.target.value), error: !!t.deploymentPipeline, disabled: y, displayEmpty: !0, renderValue: (n) => {
181
182
  const r = u.find((m) => m.name === n);
182
183
  return r ? /* @__PURE__ */ i(se, { pipeline: r, envDisplayNameMap: g }) : n;
183
184
  }, fullWidth: !0, children: [
184
185
  y && /* @__PURE__ */ i(k, { value: "", disabled: !0, children: /* @__PURE__ */ N(M, { direction: "row", alignItems: "center", gap: 1, children: [
185
- /* @__PURE__ */ i(O, { size: 12 }),
186
+ /* @__PURE__ */ i(G, { size: 12 }),
186
187
  /* @__PURE__ */ i(C, { variant: "caption", children: "Loading pipelines..." })
187
188
  ] }) }),
188
189
  !y && u.length === 0 && /* @__PURE__ */ i(k, { value: "", disabled: !0, children: "No deployment pipelines available" }),
@@ -193,7 +194,7 @@ const de = ({
193
194
  }, pe = () => {
194
195
  const a = J(), {
195
196
  orgId: e
196
- } = $(), [t, d] = B({
197
+ } = O(), [t, d] = B({
197
198
  name: "",
198
199
  displayName: "",
199
200
  description: "",
@@ -204,16 +205,16 @@ const de = ({
204
205
  validateForm: l,
205
206
  clearErrors: o,
206
207
  setFieldError: p
207
- } = Z(re), {
208
+ } = Y(re), {
208
209
  checkDirty: E,
209
210
  resetDirty: P
210
- } = _(t), y = A(() => ({
211
+ } = Z(t), y = W(() => ({
211
212
  orgName: e ?? "default"
212
213
  }), [e]), {
213
214
  mutate: u,
214
215
  isPending: v,
215
216
  error: g
216
- } = ee(y), h = V(() => {
217
+ } = _(y), h = V(() => {
217
218
  a(R(I.children.org.path, {
218
219
  orgId: e ?? ""
219
220
  }));
@@ -241,16 +242,16 @@ const de = ({
241
242
  }
242
243
  });
243
244
  }, [t, l, u, a, y.orgName, P, o, c]);
244
- return /* @__PURE__ */ i(te, { title: "Create a New Project", description: "Create a new project to organize and manage your agents.", disableIcon: !0, backHref: R(I.children.org.path, {
245
+ return /* @__PURE__ */ i(ee, { title: "Create a New Project", description: "Create a new project to organize and manage your agents.", disableIcon: !0, backHref: R(I.children.org.path, {
245
246
  orgId: e ?? ""
246
247
  }), backLabel: "Back to Organization", children: /* @__PURE__ */ N(L, { display: "flex", flexDirection: "column", gap: 2, children: [
247
248
  /* @__PURE__ */ i(de, { formData: t, setFormData: d, errors: c, validateField: s, setFieldError: p, checkDirty: E }),
248
- !!g && /* @__PURE__ */ i(G, { severity: "error", sx: {
249
+ !!g && /* @__PURE__ */ i($, { severity: "error", sx: {
249
250
  mt: 2
250
251
  }, children: g instanceof Error ? g.message : "Failed to create project" }),
251
252
  /* @__PURE__ */ i(oe, { lastSubmittedValidationErrors: n, isPending: v, onCancel: h, onSubmit: m, isNameEmpty: !t.name.trim(), mode: "deploy" })
252
253
  ] }) });
253
- }, ve = {
254
+ }, be = {
254
255
  title: "Add New Project",
255
256
  description: "A page component for Add New Project",
256
257
  icon: ae,
@@ -259,5 +260,5 @@ const de = ({
259
260
  };
260
261
  export {
261
262
  pe as AddNewProject,
262
- ve as metaData
263
+ be as metaData
263
264
  };