@ansible/ansible-ui-framework 2.4.2716 → 2.4.2718

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,4 +1,4 @@
1
- import { u as He, j as M } from "./index-B6eiEny4.js";
1
+ import { u as He, j as M } from "./index-BBemku3R.js";
2
2
  import { useContext as je, createContext as Oe, useState as Se, useEffect as Be, useRef as Ze } from "react";
3
3
  import Ye from "react-dom";
4
4
  import { A as Te } from "./ansible-chatbot-jXPBfTRi.js";
@@ -1,4 +1,4 @@
1
- import { u as a, j as e, d as i } from "./index-B6eiEny4.js";
1
+ import { u as a, j as e, d as i } from "./index-BBemku3R.js";
2
2
  import { t as s, a as r, X as n } from "./ansible-chatbot-jXPBfTRi.js";
3
3
  import "@patternfly/react-core";
4
4
  import "react";
@@ -9,4 +9,4 @@ export interface ErrorOutput {
9
9
  genericErrors: GenericErrorDetail[];
10
10
  fieldErrors: FieldErrorDetail[];
11
11
  }
12
- export type ErrorAdapter = (error: unknown, mappedKeys?: Record<string, string>) => ErrorOutput;
12
+ export type ErrorAdapter = (error: unknown, mappedKeys?: Record<string, string>, configurationFields?: string[]) => ErrorOutput;
@@ -3042,7 +3042,7 @@ const j4 = tn({
3042
3042
  chatbotState: "disabled",
3043
3043
  setChatbotState: () => {
3044
3044
  }
3045
- }), D4 = () => mt(j4), M4 = GT(() => import("./ChatbotPortal-bsVTL2fx.js")), P4 = () => /* @__PURE__ */ g.jsx(YT, { fallback: /* @__PURE__ */ g.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ g.jsx(M4, {}) }), I4 = GT(() => import("./ChatbotSideBarHeader-CAzr7PsG.js")), L4 = () => {
3045
+ }), D4 = () => mt(j4), M4 = GT(() => import("./ChatbotPortal-C5DnmbU4.js")), P4 = () => /* @__PURE__ */ g.jsx(YT, { fallback: /* @__PURE__ */ g.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ g.jsx(M4, {}) }), I4 = GT(() => import("./ChatbotSideBarHeader-D7AY3qUq.js")), L4 = () => {
3046
3046
  const { t: e } = Me();
3047
3047
  return /* @__PURE__ */ g.jsx(YT, { fallback: /* @__PURE__ */ g.jsx("span", { children: e("Loading...") }), children: /* @__PURE__ */ g.jsx(I4, {}) });
3048
3048
  }, R4 = Te(JP)`
@@ -9717,6 +9717,7 @@ function F$(e) {
9717
9717
  {
9718
9718
  style: { maxWidth: "100%" },
9719
9719
  "data-cy": String(e.text).toLocaleLowerCase() + "-status",
9720
+ "data-testid": String(e.text).toLocaleLowerCase() + "-status",
9720
9721
  children: /* @__PURE__ */ g.jsx(
9721
9722
  "div",
9722
9723
  {
@@ -31820,7 +31821,7 @@ function pi(e) {
31820
31821
  shouldFocusToggleOnSelect: !0,
31821
31822
  innerRef: h,
31822
31823
  children: [
31823
- /* @__PURE__ */ g.jsx(tk, { children: /* @__PURE__ */ g.jsx(nk, { "data-cy": "search-input", children: /* @__PURE__ */ g.jsx(
31824
+ /* @__PURE__ */ g.jsx(tk, { children: /* @__PURE__ */ g.jsx(nk, { "data-cy": "search-input", "data-testid": "search-input", children: /* @__PURE__ */ g.jsx(
31824
31825
  rk,
31825
31826
  {
31826
31827
  id: `${n}-search`,
@@ -31879,6 +31880,7 @@ function AO(e) {
31879
31880
  value: t.key !== void 0 ? t.key : t.label,
31880
31881
  description: t.description,
31881
31882
  "data-cy": n,
31883
+ "data-testid": n,
31882
31884
  children: t.label
31883
31885
  },
31884
31886
  t.key !== void 0 ? t.key : t.label
@@ -32110,7 +32112,7 @@ function lie(e) {
32110
32112
  break;
32111
32113
  }
32112
32114
  return /* @__PURE__ */ g.jsxs(zd, { children: [
32113
- /* @__PURE__ */ g.jsx(vl, { children: /* @__PURE__ */ g.jsxs(ak, { "data-cy": "text-input", style: { minWidth: 220 }, children: [
32115
+ /* @__PURE__ */ g.jsx(vl, { children: /* @__PURE__ */ g.jsxs(ak, { "data-cy": "text-input", "data-testid": "text-input", style: { minWidth: 220 }, children: [
32114
32116
  /* @__PURE__ */ g.jsx(
32115
32117
  ok,
32116
32118
  {
@@ -32180,7 +32182,7 @@ function ty(e) {
32180
32182
  );
32181
32183
  return pe(() => {
32182
32184
  e.hasKey || r("");
32183
- }, [e.hasKey]), /* @__PURE__ */ g.jsx(zd, { children: /* @__PURE__ */ g.jsx(vl, { children: /* @__PURE__ */ g.jsxs(ak, { "data-cy": "text-input", style: { minWidth: 220 }, children: [
32185
+ }, [e.hasKey]), /* @__PURE__ */ g.jsx(zd, { children: /* @__PURE__ */ g.jsx(vl, { children: /* @__PURE__ */ g.jsxs(ak, { "data-cy": "text-input", "data-testid": "text-input", style: { minWidth: 220 }, children: [
32184
32186
  /* @__PURE__ */ g.jsx(
32185
32187
  ok,
32186
32188
  {
@@ -32259,6 +32261,7 @@ function jO(e) {
32259
32261
  })),
32260
32262
  placeholder: "",
32261
32263
  "data-cy": o,
32264
+ "data-testid": o,
32262
32265
  disableSortOptions: !0,
32263
32266
  isRequired: !0,
32264
32267
  disableMaxDropdownWidth: !0
@@ -42864,6 +42867,7 @@ function Lue(e) {
42864
42867
  KT,
42865
42868
  {
42866
42869
  "data-cy": f + "-toggle",
42870
+ "data-testid": f + "-toggle",
42867
42871
  "aria-label": a,
42868
42872
  isChecked: p,
42869
42873
  onChange: (x) => h(x),
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as s, B as o, A as t, C as r, aW as l, aY as i, aV as n, aX as g, aZ as b, aU as u, aQ as P, D as d, af as m, ae as C, E as c, bo as T, bm as D, F as p, G as S, bs as h, ab as F, H as v, k as B, I as f, L as I, a2 as A, P as y, r as N, q as x, s as k, t as w, w as E, y as O, z as L, J as M, M as V, N as R, Q as W, O as j, K as G, U as z, X as U, V as H, Y as q, aP as Q, Z as J, _ as K, a4 as X, W as Y, an as Z, aq as _, ac as $, ad as aa, ao as ea, ai as sa, ap as oa, aj as ta, ak as ra, al as la, ar as ia, as as na, at as ga, au as ba, av as ua, aF as Pa, aH as da, ay as ma, a9 as Ca, aa as ca, aw as Ta, aL as Da, aM as pa, bg as Sa, aN as ha, aR as Fa, aT as va, bf as Ba, ax as fa, bh as Ia, bj as Aa, br as ya, R as Na, S as xa, a8 as ka, aO as wa, a_ as Ea, T as Oa, bn as La, bi as Ma, bq as Va, bp as Ra, aC as Wa, aD as ja, aE as Ga, bz as za, by as Ua, bx as Ha, bw as qa, x as Qa, bB as Ja, aA as Ka, g as Xa, bk as Ya, ah as Za, bA as _a, a as $a, e as ae, c as ee, f as se, p as oe, i as te, h as re, b as le, az as ie, aB as ne, bl as ge, n as be, a0 as ue, a1 as Pe, aS as de, b8 as me, b7 as Ce, b3 as ce, b5 as Te, b6 as De, bd as pe, am as Se, bt as he, aJ as Fe, bu as ve, a3 as Be, o as fe, v as Ie, a6 as Ae, a5 as ye, aI as Ne, aG as xe, aK as ke, u as we, be as Ee, l as Oe, a7 as Le, ba as Me, bb as Ve, bc as Re, b9 as We, bv as je, b1 as Ge, b4 as ze, b0 as Ue, b2 as He, a$ as qe, m as Qe, ag as Je } from "./index-B6eiEny4.js";
1
+ import { $ as s, B as o, A as t, C as r, aW as l, aY as i, aV as n, aX as g, aZ as b, aU as u, aQ as P, D as d, af as m, ae as C, E as c, bo as T, bm as D, F as p, G as S, bs as h, ab as F, H as v, k as B, I as f, L as I, a2 as A, P as y, r as N, q as x, s as k, t as w, w as E, y as O, z as L, J as M, M as V, N as R, Q as W, O as j, K as G, U as z, X as U, V as H, Y as q, aP as Q, Z as J, _ as K, a4 as X, W as Y, an as Z, aq as _, ac as $, ad as aa, ao as ea, ai as sa, ap as oa, aj as ta, ak as ra, al as la, ar as ia, as as na, at as ga, au as ba, av as ua, aF as Pa, aH as da, ay as ma, a9 as Ca, aa as ca, aw as Ta, aL as Da, aM as pa, bg as Sa, aN as ha, aR as Fa, aT as va, bf as Ba, ax as fa, bh as Ia, bj as Aa, br as ya, R as Na, S as xa, a8 as ka, aO as wa, a_ as Ea, T as Oa, bn as La, bi as Ma, bq as Va, bp as Ra, aC as Wa, aD as ja, aE as Ga, bz as za, by as Ua, bx as Ha, bw as qa, x as Qa, bB as Ja, aA as Ka, g as Xa, bk as Ya, ah as Za, bA as _a, a as $a, e as ae, c as ee, f as se, p as oe, i as te, h as re, b as le, az as ie, aB as ne, bl as ge, n as be, a0 as ue, a1 as Pe, aS as de, b8 as me, b7 as Ce, b3 as ce, b5 as Te, b6 as De, bd as pe, am as Se, bt as he, aJ as Fe, bu as ve, a3 as Be, o as fe, v as Ie, a6 as Ae, a5 as ye, aI as Ne, aG as xe, aK as ke, u as we, be as Ee, l as Oe, a7 as Le, ba as Me, bb as Ve, bc as Re, b9 as We, bv as je, b1 as Ge, b4 as ze, b0 as Ue, b2 as He, a$ as qe, m as Qe, ag as Je } from "./index-BBemku3R.js";
2
2
  export {
3
3
  s as BulkActionDialog,
4
4
  o as BulkSelector,
package/index.umd.cjs CHANGED
@@ -195,7 +195,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[aT]+=1);const oT=Cn.button`
195
195
  * LICENSE file in the root directory of this source tree.
196
196
  */var gee;function X5e(){return gee||(gee=1,process.env.NODE_ENV!=="production"&&function(){function e(v,b){return v===b&&(v!==0||1/v===1/b)||v!==v&&b!==b}function t(v,b){p||a.startTransition===void 0||(p=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=b();if(!f){var x=b();o(y,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}x=i({inst:{value:y,getSnapshot:b}});var E=x[0].inst,C=x[1];return s(function(){E.value=y,E.getSnapshot=b,n(E)&&C({inst:E})},[v,y,b]),l(function(){return n(E)&&C({inst:E}),v(function(){n(E)&&C({inst:E})})},[v]),c(y),y}function n(v){var b=v.getSnapshot;v=v.value;try{var y=b();return!o(v,y)}catch{return!0}}function r(v,b){return b()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=w,o=typeof Object.is=="function"?Object.is:e,i=a.useState,l=a.useEffect,s=a.useLayoutEffect,c=a.useDebugValue,p=!1,f=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;VD.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),VD}var vee;function Z5e(){return vee||(vee=1,process.env.NODE_ENV==="production"?AT.exports=Q5e():AT.exports=X5e()),AT.exports}Z5e();var hee=Object.prototype.hasOwnProperty;function YD(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&YD(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(hee.call(e,n)&&++r&&!hee.call(t,n)||!(n in t)||!YD(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const ym=new WeakMap,xm=()=>{},Is=xm(),PT=Object,dd=e=>e===Is,Sm=e=>typeof e=="function",gv=(e,t)=>({...e,...t}),J5e=e=>Sm(e.then),KD={},DT={},bee="undefined",QD=typeof window!=bee,XD=typeof document!=bee,$5e=(e,t)=>{const n=ym.get(e);return[()=>!dd(t)&&e.get(t)||KD,r=>{if(!dd(t)){const a=e.get(t);t in DT||(DT[t]=a),n[5](t,gv(a,r),a||KD)}},n[6],()=>!dd(t)&&t in DT?DT[t]:!dd(t)&&e.get(t)||KD]};let ZD=!0;const eBe=()=>ZD,[JD,$D]=QD&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[xm,xm],tBe=()=>{const e=XD&&document.visibilityState;return dd(e)||e!=="hidden"},nBe=e=>(XD&&document.addEventListener("visibilitychange",e),JD("focus",e),()=>{XD&&document.removeEventListener("visibilitychange",e),$D("focus",e)}),rBe=e=>{const t=()=>{ZD=!0,e()},n=()=>{ZD=!1};return JD("online",t),JD("offline",n),()=>{$D("online",t),$D("offline",n)}},aBe={isOnline:eBe,isVisible:tBe},oBe={initFocus:nBe,initReconnect:rBe};w.useId;const eM=!QD||"Deno"in globalThis,iBe=eM?w.useEffect:w.useLayoutEffect,tM=typeof navigator<"u"&&navigator.connection,_ee=!eM&&tM&&(["slow-2g","2g"].includes(tM.effectiveType)||tM.saveData),MT=new WeakMap,nM=(e,t)=>PT.prototype.toString.call(e)===`[object ${t}]`;let lBe=0;const rM=e=>{const t=typeof e,n=nM(e,"Date"),r=nM(e,"RegExp"),a=nM(e,"Object");let o,i;if(PT(e)===e&&!n&&!r){if(o=MT.get(e),o)return o;if(o=++lBe+"~",MT.set(e,o),Array.isArray(e)){for(o="@",i=0;i<e.length;i++)o+=rM(e[i])+",";MT.set(e,o)}if(a){o="#";const l=PT.keys(e).sort();for(;!dd(i=l.pop());)dd(e[i])||(o+=i+":"+rM(e[i])+",");MT.set(e,o)}}else o=n?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},yee=e=>{if(Sm(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?rM(e):"",[e,t]};let sBe=0;const xee=()=>++sBe,cBe=0,dBe=1,uBe=2;async function pBe(...e){const[t,n,r,a]=e,o=gv({populateCache:!0,throwOnError:!0},typeof a=="boolean"?{revalidate:a}:a||{});let i=o.populateCache;const l=o.rollbackOnError;let s=o.optimisticData;const c=g=>typeof l=="function"?l(g):l!==!1,p=o.throwOnError;if(Sm(n)){const g=n,v=[],b=t.keys();for(const y of b)!/^\$(inf|sub)\$/.test(y)&&g(t.get(y)._k)&&v.push(y);return Promise.all(v.map(f))}return f(n);async function f(g){const[v]=yee(g);if(!v)return;const[b,y]=$5e(t,v),[x,E,C,R]=ym.get(t),N=()=>{const q=x[v];return(Sm(o.revalidate)?o.revalidate(b().data,g):o.revalidate!==!1)&&(delete C[v],delete R[v],q&&q[0])?q[0](uBe).then(()=>b().data):b().data};if(e.length<3)return N();let O=r,P;const M=xee();E[v]=[M,0];const L=!dd(s),W=b(),G=W.data,B=W._c,j=dd(B)?G:B;if(L&&(s=Sm(s)?s(j,G):s,y({data:s,_c:j})),Sm(O))try{O=O(j)}catch(q){P=q}if(O&&J5e(O))if(O=await O.catch(q=>{P=q}),M!==E[v][0]){if(P)throw P;return O}else P&&L&&c(P)&&(i=!0,y({data:j,_c:Is}));if(i&&!P)if(Sm(i)){const q=i(O,j);y({data:q,error:Is,_c:Is})}else y({data:O,error:Is,_c:Is});if(E[v][1]=xee(),Promise.resolve(N()).then(()=>{y({_c:Is})}),P){if(p)throw P;return}return O}}const See=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Eee=(e,t)=>{if(!ym.has(e)){const n=gv(oBe,t),r={},a=pBe.bind(Is,e);let o=xm;const i={},l=(p,f)=>{const g=i[p]||[];return i[p]=g,g.push(f),()=>g.splice(g.indexOf(f),1)},s=(p,f,g)=>{e.set(p,f);const v=i[p];if(v)for(const b of v)b(f,g)},c=()=>{if(!ym.has(e)&&(ym.set(e,[r,{},{},{},a,s,l]),!eM)){const p=n.initFocus(setTimeout.bind(Is,See.bind(Is,r,cBe))),f=n.initReconnect(setTimeout.bind(Is,See.bind(Is,r,dBe)));o=()=>{p&&p(),f&&f(),ym.delete(e)}}};return c(),[e,a,c,o]}return[e,ym.get(e)[4]]},fBe=(e,t,n,r,a)=>{const o=n.errorRetryCount,i=a.retryCount,l=~~((Math.random()+.5)*(1<<(i<8?i:8)))*n.errorRetryInterval;!dd(o)&&i>o||setTimeout(r,l,a)},mBe=YD,[aM,gBe]=Eee(new Map),vBe=gv({onLoadingSlow:xm,onSuccess:xm,onError:xm,onErrorRetry:fBe,onDiscarded:xm,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:_ee?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:_ee?5e3:3e3,compare:mBe,isPaused:()=>!1,cache:aM,mutate:gBe,fallback:{}},aBe),hBe=(e,t)=>{const n=gv(e,t);if(t){const{use:r,fallback:a}=e,{use:o,fallback:i}=t;r&&o&&(n.use=r.concat(o)),a&&i&&(n.fallback=gv(a,i))}return n},wee=w.createContext({}),bBe=e=>{const{value:t}=e,n=w.useContext(wee),r=Sm(t),a=w.useMemo(()=>r?t(n):t,[r,n,t]),o=w.useMemo(()=>r?a:hBe(n,a),[r,n,a]),i=a&&a.provider,l=w.useRef(Is);i&&!l.current&&(l.current=Eee(i(o.cache||aM),a));const s=l.current;return s&&(o.cache=s[0],o.mutate=s[1]),iBe(()=>{if(s)return s[2]&&s[2](),s[3]},[]),w.createElement(wee.Provider,gv(e,{value:o}))},_Be="$inf$",Cee=QD&&window.__SWR_DEVTOOLS_USE__,yBe=Cee?window.__SWR_DEVTOOLS_USE__:[],xBe=()=>{Cee&&(window.__SWR_DEVTOOLS_REACT__=w)},SBe=e=>(t,n,r)=>e(t,n&&((...o)=>{const[i]=yee(t),[,,,l]=ym.get(aM);if(i.startsWith(_Be))return n(...o);const s=l[i];return dd(s)?n(...o):(delete l[i],s)}),r);yBe.concat(SBe),xBe(),w.use;const EBe=PT.defineProperty(bBe,"defaultValue",{value:vBe}),vv=w.createContext([{},()=>null]);function Em(){const[e]=w.useContext(vv);return e}function kee(e){const[t,n]=w.useState(()=>{const o=localStorage.getItem("user-preferences");let i={};if(o)try{i=JSON.parse(o)}catch{}return i={refreshInterval:e.defaultRefreshInterval,theme:"system",tableLayout:"comfortable",formColumns:"multiple",formLayout:"vertical",dateFormat:"date-time",dataEditorFormat:"yaml",...i},i}),r=w.useCallback(o=>{localStorage.setItem("user-preferences",JSON.stringify(o)),n(o)},[]),a=w.useMemo(()=>t.theme!=="light"&&t.theme!=="dark"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t.theme,[t.theme]);return w.useEffect(()=>{n(o=>o.activeTheme===a?o:{...o,activeTheme:a}),a==="dark"?document.documentElement.classList.add("pf-v6-theme-dark"):document.documentElement.classList.remove("pf-v6-theme-dark")},[a]),I.jsx(EBe,{value:{refreshInterval:t.refreshInterval?t.refreshInterval*1e3:0},children:I.jsx(vv.Provider,{value:[t,r],children:e.children})})}function wBe(e){return e?(typeof e=="string"&&(e=new Date(e)),e.toLocaleString()):""}function CBe(e){const t=new Date(e.value);return I.jsxs(Q.Split,{hasGutter:!0,children:[I.jsx(Q.SplitItem,{children:t.toLocaleDateString()}),I.jsx(Q.SplitItem,{children:t.toLocaleTimeString()})]})}const kBe=Cn.span`
197
197
  white-space: nowrap;
198
- `;function Tee(e){const{t}=jn(),[n]=Na(),{author:r,onClick:a}=e,[o,i]=w.useState(null),l=Em(),s=l.dateFormat?l.dateFormat:"date-time",c=w.useCallback((p,f)=>{let g;switch(typeof p=="number"?g=On.fromMillis(p):g=On.fromISO(p),f){case"since":{On.now().toMillis()-g.toMillis()<60*1e3?i(t("Less than a minute ago")):i(g.toRelative());break}default:i(wBe(g.toJSDate()));break}},[t]);return w.useEffect(()=>{if(c(e.value,s),s==="since"){const p=setInterval(()=>c(e.value,s),1e3);return()=>clearTimeout(p)}},[s,e.value,c]),e.value?I.jsxs(kBe,{className:"date-time",children:[o,r&&I.jsxs("span",{children:[" ",n.by," "]}),a?I.jsx(Q.Button,{variant:"link",isInline:!0,onClick:a,children:r}):I.jsx("span",{children:r})]}):I.jsx(I.Fragment,{})}function TBe(e){const t=w.useMemo(()=>new Date(e.start??0).valueOf(),[e.start]),n=w.useMemo(()=>new Date(e.finish??0).valueOf(),[e.finish]),[r,a]=w.useState(Math.max(0,n-t.valueOf()));w.useEffect(()=>{const p=setInterval(()=>{t&&(e.finish?a(Math.max(0,n-t)):a(Math.max(0,Date.now()-t)))},1e3);return()=>clearTimeout(p)},[t,n,e.finish]);const o=Math.floor(r/1e3),i=Math.floor(o%60),l=Math.floor(o/60%60),s=Math.floor(o/60/60%24),c=Math.floor(o/60/60/24);return t?I.jsxs(Q.Split,{children:[c!==0&&I.jsxs(Q.SplitItem,{children:[c,"d"," "]}),s!==0&&I.jsxs(Q.SplitItem,{children:[s,"h"," "]}),l!==0&&I.jsxs(Q.SplitItem,{children:[l,"m"," "]}),I.jsxs(Q.SplitItem,{children:[i,"s"]})]}):I.jsx(I.Fragment,{})}function Iee(e){return I.jsx(Q.LabelGroup,{numLabels:e.numLabels??999,style:e.noWrap?{flexWrap:"nowrap"}:void 0,children:e.labels?e.labels.map(t=>I.jsx(Q.Label,{children:t},t)):e.labelsWithLinks.map(t=>I.jsx(Q.Label,{color:"blue",isClickable:!0,render:({content:n,className:r})=>I.jsx(fa.Link,{className:r,to:t.link,children:n}),children:t.name},t.name))})}function CS(e){const t={};e.color&&(t.color=gS(e.color)),e.size&&(t.size=e.size);let n=0;if(e.padRight)switch(e.size){case"sm":n=6;break;case"md":n=6;break;case"lg":n=8;break;case"xl":n=12;break}let r=0;if(e.padLeft)switch(e.size){case"sm":r=6;break;case"md":r=6;break;case"lg":r=8;break;case"xl":r=12;break}const a=w.Children.toArray(e.children).map(o=>w.isValidElement(o)?w.cloneElement(o,t):o);return I.jsx("div",{style:{paddingRight:n,paddingLeft:r},children:a})}function Ree(e){const t=fa.useNavigate();return I.jsxs(Q.Flex,{spaceItems:{default:"spaceItemsNone"},flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsBaseline"},children:[e.icon&&((e==null?void 0:e.iconAlign)===void 0||e.iconAlign&&e.iconAlign!=="right")&&I.jsx(Q.FlexItem,{alignSelf:{default:"alignSelfCenter"},children:I.jsx(CS,{size:e.iconSize??"sm",color:e.iconColor??e.color,padRight:!0,children:e.icon})}),e.text&&I.jsx(Q.Tooltip,{trigger:e.tooltip?void 0:"manual",content:e.tooltip,children:I.jsx(Q.FlexItem,{style:{maxWidth:"100%"},"data-cy":String(e.text).toLocaleLowerCase()+"-status",children:I.jsx("div",{style:{maxWidth:e.maxWidth??"100%",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},children:!e.disableLinks&&(e.to||e.onClick)?I.jsx("a",{href:e.to,onClick:n=>{if(n.preventDefault(),e.onClick)e.onClick();else{if(!e.to)return;t(e.to)}},children:e.text}):I.jsx(I.Fragment,{children:e.text})})})},e.tooltipId),e.icon&&e.iconAlign==="right"&&I.jsx(Q.FlexItem,{alignSelf:{default:"alignSelfCenter"},children:I.jsx(CS,{size:e.iconSize??"sm",padLeft:!0,color:e.iconColor??e.color,children:e.icon})})]})}function LT(e){var o,i;const t=w.useRef(null),[n,r]=w.useState({width:((o=t.current)==null?void 0:o.clientWidth)??0,height:((i=t.current)==null?void 0:i.clientWidth)??0}),a=w.useCallback(()=>r(l=>{var c,p;const s={width:((c=t.current)==null?void 0:c.clientWidth)??0,height:((p=t.current)==null?void 0:p.clientHeight)??0};return s.width!==l.width||s.height!==l.height?s:l}),[]);return w.useEffect(()=>a(),[t,a]),rd(t,()=>a()),I.jsx(IBe,{ref:t,className:e.className,style:{height:e.height},children:I.jsx(RBe,{children:e.children(n)})})}const IBe=Cn.div`
198
+ `;function Tee(e){const{t}=jn(),[n]=Na(),{author:r,onClick:a}=e,[o,i]=w.useState(null),l=Em(),s=l.dateFormat?l.dateFormat:"date-time",c=w.useCallback((p,f)=>{let g;switch(typeof p=="number"?g=On.fromMillis(p):g=On.fromISO(p),f){case"since":{On.now().toMillis()-g.toMillis()<60*1e3?i(t("Less than a minute ago")):i(g.toRelative());break}default:i(wBe(g.toJSDate()));break}},[t]);return w.useEffect(()=>{if(c(e.value,s),s==="since"){const p=setInterval(()=>c(e.value,s),1e3);return()=>clearTimeout(p)}},[s,e.value,c]),e.value?I.jsxs(kBe,{className:"date-time",children:[o,r&&I.jsxs("span",{children:[" ",n.by," "]}),a?I.jsx(Q.Button,{variant:"link",isInline:!0,onClick:a,children:r}):I.jsx("span",{children:r})]}):I.jsx(I.Fragment,{})}function TBe(e){const t=w.useMemo(()=>new Date(e.start??0).valueOf(),[e.start]),n=w.useMemo(()=>new Date(e.finish??0).valueOf(),[e.finish]),[r,a]=w.useState(Math.max(0,n-t.valueOf()));w.useEffect(()=>{const p=setInterval(()=>{t&&(e.finish?a(Math.max(0,n-t)):a(Math.max(0,Date.now()-t)))},1e3);return()=>clearTimeout(p)},[t,n,e.finish]);const o=Math.floor(r/1e3),i=Math.floor(o%60),l=Math.floor(o/60%60),s=Math.floor(o/60/60%24),c=Math.floor(o/60/60/24);return t?I.jsxs(Q.Split,{children:[c!==0&&I.jsxs(Q.SplitItem,{children:[c,"d"," "]}),s!==0&&I.jsxs(Q.SplitItem,{children:[s,"h"," "]}),l!==0&&I.jsxs(Q.SplitItem,{children:[l,"m"," "]}),I.jsxs(Q.SplitItem,{children:[i,"s"]})]}):I.jsx(I.Fragment,{})}function Iee(e){return I.jsx(Q.LabelGroup,{numLabels:e.numLabels??999,style:e.noWrap?{flexWrap:"nowrap"}:void 0,children:e.labels?e.labels.map(t=>I.jsx(Q.Label,{children:t},t)):e.labelsWithLinks.map(t=>I.jsx(Q.Label,{color:"blue",isClickable:!0,render:({content:n,className:r})=>I.jsx(fa.Link,{className:r,to:t.link,children:n}),children:t.name},t.name))})}function CS(e){const t={};e.color&&(t.color=gS(e.color)),e.size&&(t.size=e.size);let n=0;if(e.padRight)switch(e.size){case"sm":n=6;break;case"md":n=6;break;case"lg":n=8;break;case"xl":n=12;break}let r=0;if(e.padLeft)switch(e.size){case"sm":r=6;break;case"md":r=6;break;case"lg":r=8;break;case"xl":r=12;break}const a=w.Children.toArray(e.children).map(o=>w.isValidElement(o)?w.cloneElement(o,t):o);return I.jsx("div",{style:{paddingRight:n,paddingLeft:r},children:a})}function Ree(e){const t=fa.useNavigate();return I.jsxs(Q.Flex,{spaceItems:{default:"spaceItemsNone"},flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsBaseline"},children:[e.icon&&((e==null?void 0:e.iconAlign)===void 0||e.iconAlign&&e.iconAlign!=="right")&&I.jsx(Q.FlexItem,{alignSelf:{default:"alignSelfCenter"},children:I.jsx(CS,{size:e.iconSize??"sm",color:e.iconColor??e.color,padRight:!0,children:e.icon})}),e.text&&I.jsx(Q.Tooltip,{trigger:e.tooltip?void 0:"manual",content:e.tooltip,children:I.jsx(Q.FlexItem,{style:{maxWidth:"100%"},"data-cy":String(e.text).toLocaleLowerCase()+"-status","data-testid":String(e.text).toLocaleLowerCase()+"-status",children:I.jsx("div",{style:{maxWidth:e.maxWidth??"100%",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},children:!e.disableLinks&&(e.to||e.onClick)?I.jsx("a",{href:e.to,onClick:n=>{if(n.preventDefault(),e.onClick)e.onClick();else{if(!e.to)return;t(e.to)}},children:e.text}):I.jsx(I.Fragment,{children:e.text})})})},e.tooltipId),e.icon&&e.iconAlign==="right"&&I.jsx(Q.FlexItem,{alignSelf:{default:"alignSelfCenter"},children:I.jsx(CS,{size:e.iconSize??"sm",padLeft:!0,color:e.iconColor??e.color,children:e.icon})})]})}function LT(e){var o,i;const t=w.useRef(null),[n,r]=w.useState({width:((o=t.current)==null?void 0:o.clientWidth)??0,height:((i=t.current)==null?void 0:i.clientWidth)??0}),a=w.useCallback(()=>r(l=>{var c,p;const s={width:((c=t.current)==null?void 0:c.clientWidth)??0,height:((p=t.current)==null?void 0:p.clientHeight)??0};return s.width!==l.width||s.height!==l.height?s:l}),[]);return w.useEffect(()=>a(),[t,a]),rd(t,()=>a()),I.jsx(IBe,{ref:t,className:e.className,style:{height:e.height},children:I.jsx(RBe,{children:e.children(n)})})}const IBe=Cn.div`
199
199
  width: 100%;
200
200
  height: 100%;
201
201
  flex-grow: 1;
@@ -425,12 +425,12 @@ See https://s-c.sh/2BAXzed for more info.`),window[aT]+=1);const oT=Cn.button`
425
425
  `;function GJe(e){const{t}=jn(),[n,r]=w.useState(!1),[a,o]=w.useState(!1),[i,l]=w.useState(),[s,c]=w.useState(0),[p,f]=w.useState(),[g,v]=w.useState(!1),b=w.useRef(),[y,x]=w.useState(""),E=w.useCallback(Q.debounce(L=>x(L),200),[]),C=w.useRef(e.queryOptions).current,R=w.useRef(null),N=w.useCallback(()=>{R.current&&R.current.abort();const L=new AbortController;return R.current=L,r(()=>(o(!1),l(void 0),f(W=>{if(W)return W}),C({next:b.current,signal:L.signal,search:y}).then(W=>{L.signal.aborted||(b.current=W.next,W.remaining||o(!0),f(G=>{if(L.signal.aborted)return G;let B=[...G??[],...W.options];const j=new Set;return B=B.filter(q=>j.has(q.value)?!1:(j.add(q.value),!0)),B.sort((q,Y)=>{const K=q.label.toLowerCase(),ae=Y.label.toLowerCase();return K<ae?-1:K>ae?1:0}),c(W.remaining+B.length),B}))}).catch(W=>{L.signal.aborted||l(W instanceof Error?W:new Error(t("Unknown error")))}).finally(()=>{L.signal.aborted||r(!1)}),!0)),()=>L.abort()},[C,y,t]),O=w.useCallback(L=>{L.preventDefault(),L.stopPropagation(),N()},[N]),P=w.useCallback(L=>{L.preventDefault(),L.stopPropagation(),c(0),f([]),b.current=void 0,N()},[N]);w.useEffect(()=>{g&&(c(0),f([]),b.current=void 0,N())},[g,N]);const M=I.jsxs(Q.Stack,{hasGutter:!0,children:[I.jsxs(Q.Flex,{children:[I.jsx(Q.FlexItem,{grow:{default:"grow"},children:I.jsxs(Q.ActionList,{children:[e.onBrowse&&I.jsx(Q.ActionListItem,{children:I.jsx(Q.Button,{id:"browse",onClick:L=>{var W;L.preventDefault(),L.stopPropagation(),v(!1),(W=e.onBrowse)==null||W.call(e)},children:t("Browse")})}),!a&&I.jsx(Q.ActionListItem,{children:I.jsx(Q.Button,{id:"load-more",isLoading:n,onClick:O,isDisabled:n,children:t(n?"Loading...":"Load more")})})]})}),!a&&s!==0&&I.jsx(Q.FlexItem,{children:t("Loaded {{count}} of {{total}}",{count:(p==null?void 0:p.length)??0,total:s})})]}),e.footer]});return i?I.jsx(qJe,{id:e.id,variant:"secondary",isDanger:!0,icon:I.jsx(Ht.SyncAltIcon,{}),iconPosition:"right",onClick:P,children:typeof e.queryErrorText=="function"?e.queryErrorText(i):e.queryErrorText??t("Error loading options")}):I.jsx(jue,{id:e.id,icon:e.icon,placeholder:e.placeholder,options:p??[],values:e.values,onSelect:e.onSelect,variant:e.variant,footer:M,open:g,setOpen:v,searchValue:y,setSearchValue:E,isLoading:n,disableClearSelection:e.disableClearSelection,disableClearChips:e.disableClearChips,queryLabel:e.queryLabel,compareOptionValues:e.compareOptionValues,disableMaxDropdownWidth:e.disableMaxDropdownWidth})}const qJe=Cn(Q.Button)`
426
426
  width: 100%;
427
427
  text-align: left;
428
- `;var NR={exports:{}},zue;function HJe(){if(zue)return NR.exports;zue=1;function e(t,n=100,r={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(n<0)throw new RangeError("`wait` must not be negative.");const{immediate:a}=typeof r=="boolean"?{immediate:r}:r;let o,i,l,s,c;function p(){const v=o,b=i;return o=void 0,i=void 0,c=t.apply(v,b),c}function f(){const v=Date.now()-s;v<n&&v>=0?l=setTimeout(f,n-v):(l=void 0,a||(c=p()))}const g=function(...v){if(o&&this!==o&&Object.getPrototypeOf(this)===Object.getPrototypeOf(o))throw new Error("Debounced method called with different contexts of the same prototype.");o=this,i=v,s=Date.now();const b=a&&!l;return l||(l=setTimeout(f,n)),b&&(c=p()),c};return Object.defineProperty(g,"isPending",{get(){return l!==void 0}}),g.clear=()=>{l&&(clearTimeout(l),l=void 0)},g.flush=()=>{l&&g.trigger()},g.trigger=()=>{c=p(),g.clear()},g}return NR.exports.debounce=e,NR.exports=e,NR.exports}var WJe=HJe();const bj=er(WJe);function Yp(e){const{t}=jn(),{id:n,icon:r,value:a,onSelect:o,options:i,placeholder:l,queryLabel:s}=e,[c,p]=OR(e.open??!1,e.setOpen);w.useEffect(()=>{c&&setTimeout(()=>{var O;return(O=C.current)==null?void 0:O.focus()},1)},[c]);const[f,g]=OR(e.searchValue??"",e.setSearchValue),v=w.useRef(null),b=w.useMemo(()=>i.find(O=>a===O.value),[i,a]),y=w.useMemo(()=>{let O=b==null?void 0:b.label;return!O&&a!==void 0&&a!==""&&a!==null&&(O=s==null?void 0:s(a)),O},[s,b==null?void 0:b.label,a]),x=O=>I.jsx(Q.Tooltip,{content:e.isDisabled,trigger:e.isDisabled?void 0:"manual",children:I.jsxs(Q.Flex,{flexWrap:{default:"nowrap"},children:[I.jsx(Q.MenuToggle,{id:n,"data-cy":n,"data-testid":n,ref:O,icon:r??(b==null?void 0:b.icon),onClick:()=>p(!c),isExpanded:c,isDisabled:!!e.isDisabled,style:{pointerEvents:e.isDisabled?"unset":void 0,cursor:e.isDisabled?"not-allowed":void 0},onKeyDown:P=>{switch(P.key){case"Tab":case"Shift":break;default:P.preventDefault(),P.key.length===1&&g(P.key),p(!0),setTimeout(()=>{C.current&&P.key.length===1&&(C.current.value=P.key+C.current.value)},1);break}},isFullWidth:!0,children:y||I.jsx("span",{style:{opacity:.7},children:l})}),!e.isRequired&&y&&!(e!=null&&e.isDisabled)&&I.jsx(Q.Button,{icon:I.jsx(Q.Icon,{size:"md",style:{opacity:.7},children:I.jsx(Ht.TimesIcon,{"aria-hidden":!0,style:{padding:0,margin:0}})}),variant:"control","data-cy":"reset",onClick:()=>{var P;p(!1),o(null),O!==null&&"current"in O&&((P=O.current)==null||P.focus())}})]})}),E=w.useCallback((O,P)=>{const M=i.find(L=>L.key!==void 0?L.key===P:L.label===P);M&&(o(M.value),p(!1))},[o,i,p]),C=w.useRef(null);w.useEffect(()=>{c||g("")},[c,g]),w.useEffect(()=>{!e.disableAutoSelect&&e.isRequired&&!b&&i.length===1&&o(i[0].value)},[o,i,e.disableAutoSelect,e.isRequired,b]);const R=w.useMemo(()=>{let O=i;return e.setSearchValue||(O=O.filter(P=>f===""?!0:P.label.toLowerCase().includes(f.toLowerCase()))),e.disableSortOptions||(O=O.sort((P,M)=>{const L=P.label.toLowerCase(),W=M.label.toLowerCase();return L<W?-1:L>W?1:0})),O},[i,e.disableSortOptions,e.setSearchValue,f]),N=w.useMemo(()=>{if(i.some(P=>!!P.group)){const P={};for(const M of R){const L=M.group??"";P[L]||(P[L]=[]),P[L].push(M)}return P}},[i,R]);return I.jsx(que.Provider,{value:{open:c,setOpen:p},children:I.jsxs(Q.Select,{id:`${n}-select`,selected:b,onSelect:E,isOpen:c,onOpenChange:p,toggle:e.toggle??x,popperProps:{appendTo:()=>document.body,preventOverflow:!0,enableFlip:!0,maxWidth:e.disableMaxDropdownWidth?void 0:"trigger"},shouldFocusToggleOnSelect:!0,innerRef:v,children:[I.jsx(Q.MenuSearch,{children:I.jsx(Q.MenuSearchInput,{"data-cy":"search-input",children:I.jsx(Q.SearchInput,{id:`${n}-search`,ref:C,value:f,onChange:(O,P)=>g(P),onClear:O=>{O.stopPropagation(),g("")},resultsCount:R.length!==i.length?`${R.length} / ${i.length}`:void 0,onKeyDown:O=>{var P;switch(O.key){case"ArrowDown":case"Tab":{O.preventDefault(),O.stopPropagation();const M=(P=v==null?void 0:v.current)==null?void 0:P.querySelector("li button:not(:disabled),li input:not(:disabled)");M&&M.focus();break}}}})})}),I.jsx(Q.Divider,{}),R.length===0?I.jsx(I.Fragment,{children:e.isLoading?I.jsx(Q.Bullseye,{style:{padding:16},children:I.jsx(Q.Spinner,{size:"lg"})}):I.jsx(Q.SelectOption,{isDisabled:!0,children:t("No results found")},"no result")}):I.jsx(VJe,{children:N?I.jsx(I.Fragment,{children:Object.keys(N).map(O=>I.jsxs(Q.SelectGroup,{label:O,children:[I.jsx(Gue,{searchRef:C,options:N[O]}),I.jsx(Q.Divider,{})]},O))}):I.jsx(Gue,{searchRef:C,options:R})}),e.footer&&I.jsx(Q.MenuFooter,{children:e.footer})]})})}function Gue(e){return I.jsx(Q.SelectList,{onKeyDown:t=>{var n;switch(t.key){case"Tab":t.preventDefault(),t.stopPropagation(),(n=e.searchRef.current)==null||n.focus();break}},children:e.options.map(t=>{const n=ad(t);return I.jsx(Q.SelectOption,{id:n,icon:t.icon,value:t.key!==void 0?t.key:t.label,description:t.description,"data-cy":n,children:t.label},t.key!==void 0?t.key:t.label)})})}const VJe=Cn(uu)`
428
+ `;var NR={exports:{}},zue;function HJe(){if(zue)return NR.exports;zue=1;function e(t,n=100,r={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(n<0)throw new RangeError("`wait` must not be negative.");const{immediate:a}=typeof r=="boolean"?{immediate:r}:r;let o,i,l,s,c;function p(){const v=o,b=i;return o=void 0,i=void 0,c=t.apply(v,b),c}function f(){const v=Date.now()-s;v<n&&v>=0?l=setTimeout(f,n-v):(l=void 0,a||(c=p()))}const g=function(...v){if(o&&this!==o&&Object.getPrototypeOf(this)===Object.getPrototypeOf(o))throw new Error("Debounced method called with different contexts of the same prototype.");o=this,i=v,s=Date.now();const b=a&&!l;return l||(l=setTimeout(f,n)),b&&(c=p()),c};return Object.defineProperty(g,"isPending",{get(){return l!==void 0}}),g.clear=()=>{l&&(clearTimeout(l),l=void 0)},g.flush=()=>{l&&g.trigger()},g.trigger=()=>{c=p(),g.clear()},g}return NR.exports.debounce=e,NR.exports=e,NR.exports}var WJe=HJe();const bj=er(WJe);function Yp(e){const{t}=jn(),{id:n,icon:r,value:a,onSelect:o,options:i,placeholder:l,queryLabel:s}=e,[c,p]=OR(e.open??!1,e.setOpen);w.useEffect(()=>{c&&setTimeout(()=>{var O;return(O=C.current)==null?void 0:O.focus()},1)},[c]);const[f,g]=OR(e.searchValue??"",e.setSearchValue),v=w.useRef(null),b=w.useMemo(()=>i.find(O=>a===O.value),[i,a]),y=w.useMemo(()=>{let O=b==null?void 0:b.label;return!O&&a!==void 0&&a!==""&&a!==null&&(O=s==null?void 0:s(a)),O},[s,b==null?void 0:b.label,a]),x=O=>I.jsx(Q.Tooltip,{content:e.isDisabled,trigger:e.isDisabled?void 0:"manual",children:I.jsxs(Q.Flex,{flexWrap:{default:"nowrap"},children:[I.jsx(Q.MenuToggle,{id:n,"data-cy":n,"data-testid":n,ref:O,icon:r??(b==null?void 0:b.icon),onClick:()=>p(!c),isExpanded:c,isDisabled:!!e.isDisabled,style:{pointerEvents:e.isDisabled?"unset":void 0,cursor:e.isDisabled?"not-allowed":void 0},onKeyDown:P=>{switch(P.key){case"Tab":case"Shift":break;default:P.preventDefault(),P.key.length===1&&g(P.key),p(!0),setTimeout(()=>{C.current&&P.key.length===1&&(C.current.value=P.key+C.current.value)},1);break}},isFullWidth:!0,children:y||I.jsx("span",{style:{opacity:.7},children:l})}),!e.isRequired&&y&&!(e!=null&&e.isDisabled)&&I.jsx(Q.Button,{icon:I.jsx(Q.Icon,{size:"md",style:{opacity:.7},children:I.jsx(Ht.TimesIcon,{"aria-hidden":!0,style:{padding:0,margin:0}})}),variant:"control","data-cy":"reset",onClick:()=>{var P;p(!1),o(null),O!==null&&"current"in O&&((P=O.current)==null||P.focus())}})]})}),E=w.useCallback((O,P)=>{const M=i.find(L=>L.key!==void 0?L.key===P:L.label===P);M&&(o(M.value),p(!1))},[o,i,p]),C=w.useRef(null);w.useEffect(()=>{c||g("")},[c,g]),w.useEffect(()=>{!e.disableAutoSelect&&e.isRequired&&!b&&i.length===1&&o(i[0].value)},[o,i,e.disableAutoSelect,e.isRequired,b]);const R=w.useMemo(()=>{let O=i;return e.setSearchValue||(O=O.filter(P=>f===""?!0:P.label.toLowerCase().includes(f.toLowerCase()))),e.disableSortOptions||(O=O.sort((P,M)=>{const L=P.label.toLowerCase(),W=M.label.toLowerCase();return L<W?-1:L>W?1:0})),O},[i,e.disableSortOptions,e.setSearchValue,f]),N=w.useMemo(()=>{if(i.some(P=>!!P.group)){const P={};for(const M of R){const L=M.group??"";P[L]||(P[L]=[]),P[L].push(M)}return P}},[i,R]);return I.jsx(que.Provider,{value:{open:c,setOpen:p},children:I.jsxs(Q.Select,{id:`${n}-select`,selected:b,onSelect:E,isOpen:c,onOpenChange:p,toggle:e.toggle??x,popperProps:{appendTo:()=>document.body,preventOverflow:!0,enableFlip:!0,maxWidth:e.disableMaxDropdownWidth?void 0:"trigger"},shouldFocusToggleOnSelect:!0,innerRef:v,children:[I.jsx(Q.MenuSearch,{children:I.jsx(Q.MenuSearchInput,{"data-cy":"search-input","data-testid":"search-input",children:I.jsx(Q.SearchInput,{id:`${n}-search`,ref:C,value:f,onChange:(O,P)=>g(P),onClear:O=>{O.stopPropagation(),g("")},resultsCount:R.length!==i.length?`${R.length} / ${i.length}`:void 0,onKeyDown:O=>{var P;switch(O.key){case"ArrowDown":case"Tab":{O.preventDefault(),O.stopPropagation();const M=(P=v==null?void 0:v.current)==null?void 0:P.querySelector("li button:not(:disabled),li input:not(:disabled)");M&&M.focus();break}}}})})}),I.jsx(Q.Divider,{}),R.length===0?I.jsx(I.Fragment,{children:e.isLoading?I.jsx(Q.Bullseye,{style:{padding:16},children:I.jsx(Q.Spinner,{size:"lg"})}):I.jsx(Q.SelectOption,{isDisabled:!0,children:t("No results found")},"no result")}):I.jsx(VJe,{children:N?I.jsx(I.Fragment,{children:Object.keys(N).map(O=>I.jsxs(Q.SelectGroup,{label:O,children:[I.jsx(Gue,{searchRef:C,options:N[O]}),I.jsx(Q.Divider,{})]},O))}):I.jsx(Gue,{searchRef:C,options:R})}),e.footer&&I.jsx(Q.MenuFooter,{children:e.footer})]})})}function Gue(e){return I.jsx(Q.SelectList,{onKeyDown:t=>{var n;switch(t.key){case"Tab":t.preventDefault(),t.stopPropagation(),(n=e.searchRef.current)==null||n.focus();break}},children:e.options.map(t=>{const n=ad(t);return I.jsx(Q.SelectOption,{id:n,icon:t.icon,value:t.key!==void 0?t.key:t.label,description:t.description,"data-cy":n,"data-testid":n,children:t.label},t.key!==void 0?t.key:t.label)})})}const VJe=Cn(uu)`
429
429
  max-height: 40vh;
430
430
  `,que=w.createContext({open:!1,setOpen:()=>{}});function Hue(e){const{t}=jn(),{queryOptions:n,writeInOption:r}=e,[a,o]=w.useState(!1),[i,l]=w.useState(!1),[s,c]=w.useState(),[p,f]=w.useState(0),[g,v]=w.useState(),[b,y]=w.useState(!1),x=w.useRef(),[E,C]=w.useState(""),R=w.useCallback(bj(G=>C(G),200),[]),N=w.useRef(e.onSelect).current,O=w.useRef(null),P=w.useCallback(()=>{O.current&&O.current.abort();const G=new AbortController;return O.current=G,o(()=>(l(!1),c(void 0),v(B=>{if(B)return B}),n({next:x.current,signal:G.signal,search:E}).then(B=>{G.signal.aborted||(x.current=B.next,B.remaining||l(!0),v(j=>{let q=[...j??[],...B.options];const Y=new Set;return q=q.filter(K=>Y.has(K.value)?!1:(Y.add(K.value),!0)),q.sort((K,ae)=>{const oe=K.label.toLowerCase(),te=ae.label.toLowerCase();return oe<te?-1:oe>te?1:0}),!E&&B.remaining===0&&q.length===1&&setTimeout(()=>N(q[0].value),0),f(B.remaining+q.length),r&&B.remaining+q.length===0&&q.push(r(E)),q}))}).catch(B=>{G.signal.aborted||c(B instanceof Error?B:new Error(t("Unknown error")))}).finally(()=>{G.signal.aborted||o(!1)}),!0)),()=>G.abort()},[N,n,E,t,r]),M=w.useCallback(G=>{G.preventDefault(),G.stopPropagation(),P()},[P]),L=w.useCallback(G=>{G.preventDefault(),G.stopPropagation(),f(0),v([]),y(!0),x.current=void 0,P()},[P]);w.useEffect(()=>{b&&(f(0),v([]),x.current=void 0,P())},[b,P]),w.useEffect(()=>{s&&y(!1)},[s]);const W=I.jsxs(Q.Stack,{hasGutter:!0,children:[I.jsxs(Q.Flex,{children:[I.jsx(Q.FlexItem,{grow:{default:"grow"},children:I.jsxs(Q.ActionList,{children:[!i&&I.jsx(Q.ActionListItem,{children:I.jsx(Q.Button,{id:"load-more",isLoading:a,onClick:M,isDisabled:a,children:t(a?"Loading...":"Load more")})}),e.onBrowse&&I.jsx(Q.ActionListItem,{children:I.jsx(Q.Button,{id:"browse",onClick:G=>{var B;G.preventDefault(),G.stopPropagation(),y(!1),(B=e.onBrowse)==null||B.call(e)},variant:"secondary",children:t("Browse")})})]})}),!i&&p!==0&&I.jsx(Q.FlexItem,{children:t("Loaded {{count}} of {{total}}",{count:(g==null?void 0:g.length)??0,total:p})})]}),e.footer]});return I.jsx(Yp,{id:e.id,icon:e.icon,placeholder:e.placeholder,options:g??[],value:e.value,onSelect:e.onSelect,isDisabled:e.isDisabled,footer:W,open:b,setOpen:y,searchValue:E,setSearchValue:R,isLoading:a,queryLabel:e.queryLabel,disableAutoSelect:!0,isRequired:e.isRequired,toggle:s?G=>I.jsx(YJe,{ref:G,id:e.id,variant:"secondary",isDanger:!0,icon:I.jsx(Ht.SyncAltIcon,{}),onClick:L,children:typeof e.queryErrorText=="function"?e.queryErrorText(s):e.queryErrorText??t("Error loading options")}):void 0,disableMaxDropdownWidth:e.disableMaxDropdownWidth})}const YJe=Cn(Q.Button)`
431
431
  width: 100%;
432
432
  text-align: left;
433
- `;var ay=(e=>(e.LastHour="lastHour",e.Last24Hours="last24hours",e.LastWeek="last7days",e.LastMonth="last30days",e))(ay||{});function Wue(e){const{filterValues:t,id:n,setFilterValues:r,placeholder:a,isRequired:o,defaultValue:i}=e,l=t&&t.length>0?t[0]:void 0,s=e.options.find(b=>b.value===l);o&&!s&&r(()=>[i??e.options[0].value]);function c(b){if(b===null)return;e.options.find(x=>x.value===b)&&r(()=>[b])}const[p,f]=w.useState(()=>{if(t&&t.length>1)return t[1]}),[g,v]=w.useState(()=>{if(t&&t.length>2)return t[2]});return w.useEffect(()=>{if(s&&s.isCustom){const b=[s.value];p&&(b.push(p),g&&b.push(g)),r(()=>b)}},[s,p,g,r]),I.jsxs(Q.ToolbarItem,{children:[I.jsx(Yp,{value:(s==null?void 0:s.value)??"",id:n,onSelect:c,options:e.options,placeholder:a,disableSortOptions:!0}),s&&s.isCustom&&I.jsx(Vue,{to:g,setTo:v,from:p,setFrom:f})]})}function Vue(e){const{to:t,setTo:n,from:r,setFrom:a}=e,{t:o}=jn(),i=(p,f)=>{a(f)},l=(p,f)=>{n(f)},s=r?new Date(r):void 0,c=p=>s?Q.isValidDate(s)&&p>=s?"":o('The "to" date must be after the "from" date'):"";return I.jsxs(I.Fragment,{children:[I.jsx(Q.DatePicker,{value:r,onChange:i,"aria-label":"Start date",placeholder:"YYYY-MM-DD","data-cy":"toolbar-date-picker"}),I.jsx("div",{style:{alignSelf:"baseline",padding:6},children:o("to")}),I.jsx(Q.DatePicker,{value:t,onChange:l,isDisabled:!s||!Q.isValidDate(s),rangeStart:s,validators:[c],"aria-label":"End date",placeholder:o("now"),invalidFormatText:o("Invalid date format")}),t!==void 0&&I.jsx(Q.Button,{icon:I.jsx(Ht.TimesCircleIcon,{}),variant:"control",style:{alignSelf:"flex-start"},onClick:()=>n(void 0)})]})}function Yue(e){const{t}=jn(),[n,r]=w.useState("");let a=e.placeholder;if(!a)switch(e.comparison){case"contains":a=t("contains");break;case"startsWith":a=t("starts with");break;case"endsWith":a=t("ends with");break;case"equals":a=t("equals");break;case"iregex":a=t("iregex");break}return I.jsxs(Q.InputGroup,{children:[I.jsx(Q.InputGroupItem,{children:I.jsxs(Q.TextInputGroup,{"data-cy":"text-input",style:{minWidth:220},children:[I.jsx(Q.TextInputGroupMain,{id:e.id,value:n,onChange:(o,i)=>{r(typeof o=="string"?o:i)},onKeyUp:o=>{n&&o.key==="Enter"&&(e.addFilter(n),r(""))},placeholder:a}),n!==""&&I.jsx(Q.TextInputGroupUtilities,{children:I.jsx(Q.Button,{icon:I.jsx(Ht.TimesIcon,{}),variant:"plain","aria-label":"clear filter",onClick:()=>r(""),style:{opacity:n?void 0:0},tabIndex:-1})})]})}),I.jsx(Q.InputGroupItem,{children:I.jsx(Q.Button,{icon:I.jsx(Ht.ArrowRightIcon,{}),variant:n?"primary":"control","data-cy":"apply-filter","aria-label":"apply filter",onClick:()=>{e.addFilter(n),r("")},tabIndex:-1,isDisabled:!n})})]})}function AR(e){const{t}=jn(),[n,r]=w.useState(e.value??"");let a=e.placeholder??"";if(!a)switch(e.comparison){case"contains":a=t("contains");break;case"startsWith":a=t("starts with");break;case"endsWith":a=t("ends with");break;case"equals":a=t("equals");break;case"iregex":a=t("iregex");break}const o=w.useCallback(bj(i=>e.setValue(i),200),[]);return w.useEffect(()=>{e.hasKey||r("")},[e.hasKey]),I.jsx(Q.InputGroup,{children:I.jsx(Q.InputGroupItem,{children:I.jsxs(Q.TextInputGroup,{"data-cy":"text-input",style:{minWidth:220},children:[I.jsx(Q.TextInputGroupMain,{id:e.id,value:n,onChange:(i,l)=>{typeof i=="string"?(r(i),o(i)):(r(l),o(l))},placeholder:a}),n!==""&&I.jsx(Q.TextInputGroupUtilities,{children:I.jsx(Q.Button,{icon:I.jsx(Ht.TimesIcon,{}),variant:"plain","aria-label":"clear filter",onClick:()=>{r(""),e.setValue("")},style:{opacity:n?void 0:0},tabIndex:-1})})]})})})}function _j(e){const[t,n]=w.useState(!1),r=i=>{n(!t)},{activeGroup:a,setActiveGroup:o}=w.useContext(Kue);return w.useEffect(()=>{t&&o(e.id)},[t,o,e.id]),w.useEffect(()=>{a!==e.id&&n(!1)},[a,e.id]),I.jsx(Q.ToolbarToggleGroup,{...e,isExpanded:t,onToggle:r})}const Kue=w.createContext({activeGroup:"",setActiveGroup:()=>{}});var yj=(e=>(e[e.Search=0]="Search",e[e.SingleText=1]="SingleText",e[e.MultiText=2]="MultiText",e[e.SingleSelect=3]="SingleSelect",e[e.MultiSelect=4]="MultiSelect",e[e.DateRange=5]="DateRange",e[e.AsyncSingleSelect=6]="AsyncSingleSelect",e[e.AsyncMultiSelect=7]="AsyncMultiSelect",e))(yj||{});function Que(e){var s;const{toolbarFilters:t,filterState:n,setFilterState:r}=e,[a,o]=w.useState(()=>t&&(t==null?void 0:t.length)>0?t[0].key:""),i=t==null?void 0:t.find(c=>c.key===a);if(!i)return I.jsx(I.Fragment,{});if(!t)return I.jsx(I.Fragment,{});if(t.length===0)return I.jsx(I.Fragment,{});let l=t.length===1;return t.length>=1&&t[0].type===3&&t[0].isPinned&&(n[t[0].key]===void 0||((s=n[t[0].key])==null?void 0:s.length)===0)&&(l=!1),I.jsx(I.Fragment,{children:t.length===1?I.jsxs(Q.ToolbarItem,{children:[l&&I.jsx("div",{style:{marginTop:6,marginRight:6,whiteSpace:"nowrap"},children:t[0].label}),I.jsx(Zue,{id:"filter-input",filter:i,filterState:n,setFilterState:r,"data-cy":i,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation})]}):I.jsxs(Q.ToolbarGroup,{variant:"filter-group",children:[I.jsx(Q.ToolbarItem,{children:I.jsx(Yp,{id:"filter",value:a,onSelect:o,icon:i.type===0?I.jsx(Ht.SearchIcon,{}):I.jsx(Ht.FilterIcon,{}),options:t.map(c=>({label:c.label,value:c.key})),placeholder:"","data-cy":i,disableSortOptions:!0,isRequired:!0,disableMaxDropdownWidth:!0})}),I.jsx(Q.ToolbarItem,{children:I.jsx(Zue,{id:"filter-input",filter:i,filterState:n,setFilterState:r,"data-cy":i,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation})})]})})}function Xue(e){const{toolbarFilters:t,setFilterState:n,filterState:r}=e,[a]=Na(),o=!Fl("md");if(!t)return I.jsx(I.Fragment,{});if(t.length===0)return I.jsx(I.Fragment,{});const i=t.filter(s=>!s.isPinned),l=t.filter(s=>!!s.isPinned);return I.jsxs(_j,{toggleIcon:I.jsx(Ht.FilterIcon,{}),breakpoint:"md",id:"filters",children:[o&&I.jsx(Q.ToolbarItem,{variant:"label",children:a.filter}),I.jsx(Que,{toolbarFilters:i,setFilterState:n,filterState:r,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation}),l==null?void 0:l.map(s=>I.jsx(Que,{toolbarFilters:[s],setFilterState:n,filterState:r,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation},s.key)),t==null?void 0:t.map(s=>{const c=(r==null?void 0:r[s.key])||[];return s.isPinned&&s.type===3||s.isPinned&&s.type===5?null:I.jsx(Q.ToolbarFilter,{categoryName:s.label,labels:[...c.map(p=>{var f,g;switch(s.type){case 3:case 4:case 5:return((g=(f=s.options)==null?void 0:f.find(v=>v.value===p))==null?void 0:g.label)??p;case 6:case 7:return{key:p,node:s.queryLabel(p)};default:return p}})],deleteLabel:(p,f)=>{n==null||n(g=>{var y;const v={...g};switch(f=typeof f=="string"?f:f.key,s.type){case 3:case 4:case 5:f=((y=s.options.find(x=>x.label===f))==null?void 0:y.value)??f;break}let b=g[s.key];return b&&(b=b.filter(x=>x!==f),b.length===0?delete v[s.key]:v[s.key]=b),v})},deleteLabelGroup:()=>{n==null||n(p=>{const f={...p};return delete f[s.key],f})},showToolbarItem:!1,children:I.jsx(I.Fragment,{})},s.label)})]})}function Zue(e){const{filter:t,filterState:n,setFilterState:r}=e,a=n==null?void 0:n[t.key],o=w.useCallback(s=>{r(c=>{const p={...c},f=p[t.key]??[];return p[t.key]=s(f),p})},[t.key,r]),i=w.useCallback(s=>{r(c=>{const p={...c},f=p[t.key]??[];return p[t.key]=[...f,s],p})},[t.key,r]);let l=!1;if(n)for(const s in n){if(s===t.key)continue;const c=n[s];if(c&&(c==null?void 0:c.length)>=2){l=!0;break}}switch(t.type){case 0:return I.jsx(AR,{id:e.id??t.key,placeholder:t.placeholder,setValue:s=>o(()=>s?[s]:[]),value:a&&(a==null?void 0:a.length)>0?a[0]:"",hasKey:!!(n!=null&&n[t.key])},t.key);case 1:return I.jsx(AR,{id:e.id??t.key,placeholder:t.placeholder,comparison:t.comparison,setValue:s=>o(()=>s?[s]:[]),value:a&&(a==null?void 0:a.length)>0?a[0]:"",hasKey:!!(n!=null&&n[t.key])},t.key);case 2:return l&&e.limitFiltersToOneOrOperation?I.jsx(AR,{id:e.id??t.key,placeholder:t.placeholder,comparison:t.comparison,setValue:s=>o(()=>s?[s]:[]),value:a&&(a==null?void 0:a.length)>0?a[0]:"",hasKey:!!(n!=null&&n[t.key])},t.key):I.jsx(Yue,{id:e.id??t.key,addFilter:i,placeholder:t.placeholder,comparison:t.comparison},t.key);case 3:return I.jsx(Yp,{id:e.id??t.key,placeholder:t.placeholder,value:a&&(a==null?void 0:a.length)>0?a[0]:"",onSelect:s=>o(()=>[s]),options:t.options,isRequired:t.isRequired||!t.isPinned,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0,disableAutoSelect:!0},t.key);case 6:return I.jsx(Hue,{id:e.id??t.key,value:a&&(a==null?void 0:a.length)>0?a[0]:"",onSelect:s=>o(()=>[s]),placeholder:t.placeholder||"",queryOptions:t.queryOptions,queryErrorText:t.queryErrorText,queryPlaceholder:t.queryPlaceholder,isRequired:t.isRequired,footer:t.openBrowse?I.jsx(que.Consumer,{children:s=>I.jsx(Q.Button,{variant:"link",onClick:()=>{var c;s.setOpen(!1),(c=t.openBrowse)==null||c.call(t,p=>o(()=>[p]),a&&a.length>0?a[0]:void 0)},children:"Browse"})}):void 0,queryLabel:t.queryLabel,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0},t.key);case 7:return l&&e.limitFiltersToOneOrOperation?I.jsx(Hue,{id:e.id??t.key,value:a&&(a==null?void 0:a.length)>0?a[0]:"",onSelect:s=>o(()=>[s]),placeholder:t.placeholder||"",queryOptions:t.queryOptions,queryErrorText:t.queryErrorText,queryPlaceholder:t.queryPlaceholder,isRequired:t.isRequired,footer:t.openBrowse?I.jsx(Q.Button,{variant:"link",onClick:()=>{var s;(s=t.openBrowse)==null||s.call(t,c=>o(()=>[c.length?c[0]:""]),a&&a.length>0?a:void 0)},children:"Browse"}):void 0,queryLabel:t.queryLabel,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0},t.key):I.jsx(GJe,{id:e.id??t.key,values:a,onSelect:o,placeholder:t.placeholder||"",queryOptions:t.queryOptions,queryErrorText:t.queryErrorText,queryPlaceholder:t.queryPlaceholder,footer:t.openBrowse?I.jsx(Q.Button,{variant:"link",onClick:()=>{var s;(s=t.openBrowse)==null||s.call(t,c=>o(()=>c),a)},children:"Browse"}):void 0,variant:"count",disableClearSelection:!0,queryLabel:t.queryLabel,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0},t.key);case 4:return l&&e.limitFiltersToOneOrOperation?I.jsx(Yp,{id:e.id??t.key,placeholder:t.placeholder,value:a&&(a==null?void 0:a.length)>0?a[0]:"",onSelect:s=>o(()=>[s]),options:t.options,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0},t.key):I.jsx(jue,{id:e.id??t.key,placeholder:t.placeholder,values:a,onSelect:o,options:t.options,variant:"count",disableClearSelection:!0,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0},t.key);case 5:return I.jsx(Wue,{id:e.id??t.key,label:t.label,placeholder:t.placeholder??"",filterValues:a,setFilterValues:o,options:t.options,isRequired:t.isRequired,defaultValue:t.defaultValue},t.key)}}function KJe(e){const{sort:t,setSort:n,sortDirection:r,setSortDirection:a,sortOptions:o}=e,i=o==null?void 0:o.find(p=>p.value===t),l=i?i.type:void 0,[s]=Na(),c=w.useMemo(()=>{switch(l){case"text":switch(r){case"asc":return I.jsx(Ht.SortAlphaUpIcon,{});case"desc":return I.jsx(Ht.SortAlphaDownAltIcon,{})}break;case"number":switch(r){case"asc":return I.jsx(Ht.SortNumericUpIcon,{});case"desc":return I.jsx(Ht.SortNumericDownAltIcon,{})}break;default:switch(r){case"asc":return I.jsx(Ht.SortAmountUpIcon,{});case"desc":return I.jsx(Ht.SortAmountDownIcon,{})}break}return I.jsx(I.Fragment,{})},[r,l]);return!o||o.length<=0?I.jsx(I.Fragment,{}):I.jsxs(_j,{breakpoint:"2xl",toggleIcon:c,id:"sort",children:[I.jsx(Q.ToolbarItem,{variant:"label",children:s.sort}),I.jsxs(Q.ToolbarGroup,{variant:"filter-group",children:[I.jsx(Q.ToolbarItem,{children:I.jsx(QJe,{sortOptions:o,sort:t,setSort:n,setSortDirection:a})}),I.jsx(Q.ToolbarItem,{children:I.jsx(Q.Button,{variant:"control",icon:c,onClick:()=>{r==="asc"?a==null||a("desc"):a==null||a("asc")}})})]})]})}function QJe(e){const{sortOptions:t,sort:n,setSort:r,setSortDirection:a}=e,o=w.useCallback(i=>{if(i){const l=t.find(s=>s.value===i);l&&n!==i&&l.defaultDirection&&(a==null||a(l.defaultDirection)),r==null||r(i)}},[t,r,a,n]);return I.jsx(Yp,{id:"toolbar-sort-select-expand",placeholder:"",value:n,onSelect:o,options:t.map(i=>({label:i.label,value:i.value})),disableMaxDropdownWidth:!0,isRequired:!0})}function XJe(e){return w.useMemo(()=>{const n=[];for(const r of e)if(r.sort){if(r.defaultSort){n.push({label:r.header,value:r.sort,type:"text",defaultDirection:r.defaultSortDirection});continue}switch(r.type){case"count":n.push({label:r.header,value:r.sort,type:"number",defaultDirection:r.defaultSortDirection});break;case"text":n.push({label:r.header,value:r.sort,type:"text",defaultDirection:r.defaultSortDirection});break;default:n.push({label:r.header,value:r.sort,defaultDirection:r.defaultSortDirection});break}}return n},[e])}function ZJe(e){const{viewType:t,setViewType:n,openColumnModal:r}=e,[a]=Na();let o=0;e.disableTableView||o++,e.disableCardView||o++,e.disableListView||o++;let i=I.jsx(Ht.TableIcon,{});return t===kr.Cards&&(i=I.jsx(Ht.ThLargeIcon,{})),t===kr.List&&(i=I.jsx(Ht.ListIcon,{})),I.jsx(_j,{breakpoint:"md",toggleIcon:i,id:"view",children:I.jsx(Q.ToolbarGroup,{variant:"action-group",style:{justifyContent:"end",marginRight:0},children:I.jsx(Q.ToolbarItem,{children:I.jsxs(Q.Split,{hasGutter:!0,children:[r&&I.jsx(Q.Tooltip,{content:a.manageColumns,children:I.jsx(Q.Button,{variant:"plain",icon:I.jsx(Ht.ColumnsIcon,{}),onClick:r})}),o>1&&I.jsx(Q.ToggleGroup,{"data-cy":"table-view-toggle","aria-label":"table view toggle",children:[!e.disableTableView&&kr.Table,!e.disableListView&&kr.List,!e.disableCardView&&kr.Cards].filter(l=>l).map(l=>{switch(l){case kr.Cards:return I.jsx(Q.ToggleGroupItem,{icon:I.jsx(Ht.ThLargeIcon,{}),isSelected:t===kr.Cards,onClick:()=>n==null?void 0:n(kr.Cards),"aria-label":"card view","data-cy":"card-view"},"card-view");case kr.List:return I.jsx(Q.ToggleGroupItem,{icon:I.jsx(Ht.ListIcon,{}),isSelected:t===kr.List,onClick:()=>n==null?void 0:n(kr.List),"aria-label":"list view","data-cy":"list-view"},"list-view");case kr.Table:return I.jsx(Q.ToggleGroupItem,{icon:I.jsx(Ht.TableIcon,{}),isSelected:t===kr.Table,onClick:()=>n==null?void 0:n(kr.Table),"aria-label":"table view","data-cy":"table-view"},"table-view")}})})]})})})})}function Jue(e){const{itemCount:t,toolbarFilters:n,selectedItems:r,filterState:a,setFilterState:o,openColumnModal:i,sort:l,setSort:s,sortDirection:c,setSortDirection:p,sortOptions:f,clearAllFilters:g}=e,v=w.useCallback(()=>{g?g():o&&o({})},[o,g]),b=Fl("md"),{viewType:y,setViewType:x}=e;let{toolbarActions:E}=e;E=E??[];const[C,R]=w.useState(""),N=n!==void 0,O=E!==void 0&&E.length>0,P=e.showSelect===!0||r!==void 0&&E&&E.find(L=>"selection"in L&&L.selection===vr.Multiple);return P||N||O?t===void 0?I.jsx(Q.Toolbar,{className:"page-table-toolbar",style:{paddingBottom:b?void 0:8,paddingTop:b?void 0:8},children:I.jsx(Q.ToolbarContent,{children:I.jsx(Q.ToolbarItem,{style:{width:"100%"},children:I.jsx(Q.Skeleton,{height:"36px"})})})}):I.jsx(Kue.Provider,{value:{activeGroup:C,setActiveGroup:R},children:I.jsx(Q.Toolbar,{ouiaId:"page-toolbar","data-cy":"page-toolbar",clearAllFilters:v,className:"page-table-toolbar",style:{paddingBottom:b?void 0:8,paddingTop:b?void 0:8},inset:{default:"insetMd",sm:"insetMd",md:"insetMd",lg:"insetMd",xl:"insetLg","2xl":"insetLg"},children:I.jsxs(Q.ToolbarContent,{children:[y!=="table"&&P&&I.jsx(Q.ToolbarGroup,{children:I.jsx(Q.ToolbarItem,{children:I.jsx(IZ,{...e})})}),a&&o&&I.jsx(Xue,{toolbarFilters:n,filterState:a,setFilterState:o,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation}),e.toolbarContent,I.jsx(Q.ToolbarGroup,{variant:"action-group",children:I.jsx(pu,{dropDownAriaLabel:"toolbar actions",actions:E,selectedItems:r,wrapper:Q.ToolbarItem})}),I.jsxs(Q.ToolbarGroup,{align:{default:"alignEnd"},children:[y!=="table"&&I.jsx(KJe,{sort:l,setSort:s,sortDirection:c,setSortDirection:p,sortOptions:f}),y&&x&&I.jsx(ZJe,{disableTableView:e.disableTableView,disableListView:e.disableListView,disableCardView:e.disableCardView,viewType:y,setViewType:x,openColumnModal:i})]})]})})}):I.jsx(w.Fragment,{})}function JJe(e){const{t}=jn(),n=t("Something went wrong"),r=t("Please refresh the page by using the button below."),a=t("Refresh"),{titleProp:o,message:i}=e;return I.jsxs(Q.EmptyState,{headingLevel:"h2",icon:Ht.ExclamationCircleIcon,titleText:I.jsx(I.Fragment,{children:o||n}),isFullHeight:!0,children:[I.jsx(Q.EmptyStateBody,{children:i}),I.jsxs(Q.EmptyStateFooter,{children:[I.jsx(Q.EmptyStateBody,{children:r}),I.jsx(Q.Button,{variant:"primary",onClick:()=>window.location.reload(),children:a})]})]})}function $Je(e){const{title:t,description:n,icon:r,button:a,footNote:o,image:i,variant:l,style:s}=e;return I.jsxs(Q.EmptyState,{icon:r,headingLevel:"h4",titleText:I.jsx(I.Fragment,{children:t}),variant:l||Q.EmptyStateVariant.full,style:s,isFullHeight:!0,children:[I.jsx(Q.EmptyStateBody,{"data-cy":e.description,children:n}),I.jsxs(Q.EmptyStateFooter,{children:[a&&I.jsx(Q.EmptyStateActions,{children:a}),i&&I.jsxs(I.Fragment,{children:[" ",I.jsx("br",{})," ",I.jsx(Q.EmptyStateBody,{children:i})]}),o&&I.jsx(Q.EmptyStateBody,{children:o})]})]})}function e$e(e){const{button:t,description:n,title:r,variant:a,icon:o}=e;return I.jsx($Je,{icon:o??(t?Ht.PlusCircleIcon:Ht.CubesIcon),title:r,description:n,button:t,variant:a})}const $ue=w.createContext({dialogs:[],clearDialogs:()=>{},pushDialog:e=>{},popDialog:()=>{}}),epe=w.createContext(!1);function tpe(){return w.useContext(epe)}function npe(e){const[t,n]=w.useState([]),r=w.useCallback(()=>n(l=>l.length?[]:l),[n]),a=w.useCallback(l=>n(s=>[...s,l]),[n]),o=w.useCallback(()=>n(l=>l.slice(0,-1)),[n]),i=w.useMemo(()=>({dialogs:t,clearDialogs:r,pushDialog:a,popDialog:o}),[r,t,o,a]);return I.jsxs($ue.Provider,{value:i,children:[I.jsx(epe.Provider,{value:!0,children:t.length>0&&t[t.length-1]}),e.children]})}function rpe(){return w.useContext($ue)}function Kp(){const{dialogs:e,clearDialogs:t,pushDialog:n}=rpe(),r=w.useMemo(()=>e.length>0?e[e.length-1]:void 0,[e]),a=w.useCallback(o=>{t(),o!==void 0&&n(o)},[t,n]);return w.useMemo(()=>[r,a],[r,a])}function t$e(e,t,n){const{selectedItems:r,selectItem:a,unselectItem:o,isSelected:i,selectItems:l,unselectAll:s,allSelected:c}=xj(e,t),{sorted:p,sort:f,setSort:g}=Sj(e),{filtered:v,setFilterFn:b}=Ej(p,t),{searched:y,search:x,setSearch:E,setSearchFn:C}=n$e(v,t,n==null?void 0:n.search),{paged:R,page:N,setPage:O,perPage:P,setPerPage:M}=xE(y),L=w.useCallback(()=>l(R),[R,l]),W=w.useCallback(()=>l(y),[y,l]);return w.useMemo(()=>({allSelected:c,filtered:v,isSelected:i,page:N,paged:R,perPage:P,search:x,searched:y,selectAll:W,selectItem:a,selectPage:L,selectedItems:r,setFilterFn:b,setPage:O,setPerPage:M,setSearch:E,setSearchFn:C,setSort:g,sort:f,sorted:p,unselectAll:s,unselectItem:o}),[c,v,i,N,R,P,x,y,W,a,L,r,b,O,M,E,C,g,f,p,s,o])}function xj(e,t,n){const[r,a]=w.useState(()=>n?n.reduce((y,x)=>(y[`item-${t(x)}`]=x,y),{}):{});w.useEffect(()=>{a(y=>{let x=!1;return e.forEach(E=>{const C=`item-${t(E)}`;y[C]&&y[C]!==E&&(x=!0,y[C]=E)}),x?{...y}:y})},[e,t]);const o=w.useCallback(y=>{a(x=>{const E=`item-${t(y)}`;return x[E]!==y&&(x={...x},x[E]=y),x})},[t]),i=w.useCallback(y=>{a(x=>{const E=`item-${t(y)}`;return x[E]&&(x={...x},delete x[E]),x})},[t]),l=w.useCallback(y=>{const x=`item-${t(y)}`;return r[x]!==void 0},[t,r]),s=w.useCallback(y=>{a(x=>{x={...x};for(const E of y){const C=`item-${t(E)}`;x[C]=E}return x})},[t]),c=w.useRef(e);w.useEffect(()=>{c.current=e},[e]);const p=w.useCallback(()=>s(c.current),[s]),f=w.useCallback(y=>{for(const x of y)i(x)},[i]),g=w.useCallback(()=>{a(y=>Object.keys(y).length>0?{}:y)},[]),v=w.useMemo(()=>Object.values(r),[r]),b=w.useMemo(()=>v.length===e.length,[e.length,v.length]);return w.useMemo(()=>({selectedItems:v,selectItem:o,unselectItem:i,isSelected:l,selectItems:s,selectAll:p,unselectAll:g,allSelected:b,keyFn:t,unselectItems:f}),[b,l,t,p,o,s,v,g,i,f])}function ape(e,t){const[n,r]=w.useState({});w.useEffect(()=>{r(v=>{let b=!1;const y=e?e.reduce((C,R)=>{const N=t(R);return C[N]=R,v[N]&&v[N]!==R&&(b=!0,v[N]=R),C},{}):{},x={};for(const C in v)y[C]||(x[C]=!0);const E=Object.keys(x);if(E.length){b=!0;for(const C of E)delete v[C]}return b?{...v}:v})},[e,t]);const a=w.useCallback(v=>{r(b=>{const y=t(v);return b[y]!==v&&(b={...b},b[y]=v),b})},[t]),o=w.useCallback(v=>{r(b=>{const y=t(v);return b[y]&&(b={...b},delete b[y]),b})},[t]),i=w.useCallback(v=>{for(const b of v)o(b)},[o]),l=w.useCallback(v=>{const b=t(v);return n[b]!==void 0},[t,n]),s=w.useCallback(v=>{r(b=>{b={...b};for(const y of v){const x=t(y);b[x]=y}return b})},[t]),c=w.useCallback(()=>{s(e??[])},[e,s]),p=w.useCallback(()=>{r(v=>Object.keys(v).length>0?{}:v)},[]),f=w.useMemo(()=>Object.values(n),[n]),g=w.useMemo(()=>f.length===(e==null?void 0:e.length),[e,f.length]);return w.useMemo(()=>({selectedItems:f,selectItem:a,unselectItem:o,isSelected:l,selectItems:s,selectAll:c,unselectAll:p,allSelected:g,keyFn:t,unselectItems:i}),[g,l,t,c,a,s,f,p,o,i])}function Sj(e){const[t,n]=w.useState(),{direction:r,sortFn:a}=t??{},o=w.useMemo(()=>e?a?r==="asc"?[...e.sort(a)]:[...e.sort(a).reverse()]:e:[],[r,e,a]);return w.useMemo(()=>({sorted:o,sort:t,setSort:n}),[t,o])}function Ej(e,t){const n=w.useRef({map:{}}),[r,a]=w.useState(),o=w.useCallback(c=>a(()=>c),[]),[i,l]=w.useState([]);w.useEffect(()=>{n.current.map={}},[r]);const s=w.useCallback(c=>{const p=t(c);let f=n.current.map[p];return f?f.item!==c&&(f.item=c,f.passes=r?r(c):!0):(f={item:c,passes:r?r(c):!0},n.current.map[p]=f),f.passes},[r,t]);return w.useEffect(()=>{l(r?e.filter(s):e)},[e,r,s]),w.useMemo(function(){return{filtered:i,setFilterFn:o}},[i,o])}function n$e(e,t,n){const r=w.useRef({map:{}}),[a,o]=w.useState(),i=w.useCallback(v=>o(()=>v),[]),[l,s]=w.useState([]),[c,p]=w.useState(n??""),f=w.useCallback(bj(v=>p(v),200),[]);w.useEffect(()=>{r.current.map={}},[c,a]);const g=w.useCallback(v=>{const b=t(v);let y=r.current.map[b];return y?y.item!==v&&(y.item=v,y.score=a?a(v,c):0):(y={item:v,score:a?a(v,c):0},r.current.map[b]=y),y},[t,a,c]);return w.useEffect(()=>{s(a&&c?e.map(g).filter(v=>v.score<.5).sort((v,b)=>v.score-b.score).map(v=>v.item):e)},[c,e,a,g]),w.useMemo(function(){return{searched:l,search:c,setSearch:f,setSearchFn:i}},[l,c,f,i])}function xE(e){const[t,n]=w.useState([]),[r,a]=w.useState(1),[o,i]=w.useState(10);return w.useEffect(()=>{n(l=>{const s=e.slice((r-1)*o,r*o);if(l.length!==s.length)return s;let c=0;for(const p of s)if(l[c++]!==p)return s;return l})},[r,o,e]),w.useEffect(()=>{r>Math.ceil(e.length/o)&&a(1)},[r,o,e.length]),w.useMemo(()=>({paged:t,page:r,setPage:a,perPage:o,setPerPage:i}),[r,t,o])}const wj={modifiers:{ghostRow:"pf-m-ghost-row",dragOver:"pf-m-drag-over"}},r$e=Cn(Xn.Tbody)`
433
+ `;var ay=(e=>(e.LastHour="lastHour",e.Last24Hours="last24hours",e.LastWeek="last7days",e.LastMonth="last30days",e))(ay||{});function Wue(e){const{filterValues:t,id:n,setFilterValues:r,placeholder:a,isRequired:o,defaultValue:i}=e,l=t&&t.length>0?t[0]:void 0,s=e.options.find(b=>b.value===l);o&&!s&&r(()=>[i??e.options[0].value]);function c(b){if(b===null)return;e.options.find(x=>x.value===b)&&r(()=>[b])}const[p,f]=w.useState(()=>{if(t&&t.length>1)return t[1]}),[g,v]=w.useState(()=>{if(t&&t.length>2)return t[2]});return w.useEffect(()=>{if(s&&s.isCustom){const b=[s.value];p&&(b.push(p),g&&b.push(g)),r(()=>b)}},[s,p,g,r]),I.jsxs(Q.ToolbarItem,{children:[I.jsx(Yp,{value:(s==null?void 0:s.value)??"",id:n,onSelect:c,options:e.options,placeholder:a,disableSortOptions:!0}),s&&s.isCustom&&I.jsx(Vue,{to:g,setTo:v,from:p,setFrom:f})]})}function Vue(e){const{to:t,setTo:n,from:r,setFrom:a}=e,{t:o}=jn(),i=(p,f)=>{a(f)},l=(p,f)=>{n(f)},s=r?new Date(r):void 0,c=p=>s?Q.isValidDate(s)&&p>=s?"":o('The "to" date must be after the "from" date'):"";return I.jsxs(I.Fragment,{children:[I.jsx(Q.DatePicker,{value:r,onChange:i,"aria-label":"Start date",placeholder:"YYYY-MM-DD","data-cy":"toolbar-date-picker"}),I.jsx("div",{style:{alignSelf:"baseline",padding:6},children:o("to")}),I.jsx(Q.DatePicker,{value:t,onChange:l,isDisabled:!s||!Q.isValidDate(s),rangeStart:s,validators:[c],"aria-label":"End date",placeholder:o("now"),invalidFormatText:o("Invalid date format")}),t!==void 0&&I.jsx(Q.Button,{icon:I.jsx(Ht.TimesCircleIcon,{}),variant:"control",style:{alignSelf:"flex-start"},onClick:()=>n(void 0)})]})}function Yue(e){const{t}=jn(),[n,r]=w.useState("");let a=e.placeholder;if(!a)switch(e.comparison){case"contains":a=t("contains");break;case"startsWith":a=t("starts with");break;case"endsWith":a=t("ends with");break;case"equals":a=t("equals");break;case"iregex":a=t("iregex");break}return I.jsxs(Q.InputGroup,{children:[I.jsx(Q.InputGroupItem,{children:I.jsxs(Q.TextInputGroup,{"data-cy":"text-input","data-testid":"text-input",style:{minWidth:220},children:[I.jsx(Q.TextInputGroupMain,{id:e.id,value:n,onChange:(o,i)=>{r(typeof o=="string"?o:i)},onKeyUp:o=>{n&&o.key==="Enter"&&(e.addFilter(n),r(""))},placeholder:a}),n!==""&&I.jsx(Q.TextInputGroupUtilities,{children:I.jsx(Q.Button,{icon:I.jsx(Ht.TimesIcon,{}),variant:"plain","aria-label":"clear filter",onClick:()=>r(""),style:{opacity:n?void 0:0},tabIndex:-1})})]})}),I.jsx(Q.InputGroupItem,{children:I.jsx(Q.Button,{icon:I.jsx(Ht.ArrowRightIcon,{}),variant:n?"primary":"control","data-cy":"apply-filter","aria-label":"apply filter",onClick:()=>{e.addFilter(n),r("")},tabIndex:-1,isDisabled:!n})})]})}function AR(e){const{t}=jn(),[n,r]=w.useState(e.value??"");let a=e.placeholder??"";if(!a)switch(e.comparison){case"contains":a=t("contains");break;case"startsWith":a=t("starts with");break;case"endsWith":a=t("ends with");break;case"equals":a=t("equals");break;case"iregex":a=t("iregex");break}const o=w.useCallback(bj(i=>e.setValue(i),200),[]);return w.useEffect(()=>{e.hasKey||r("")},[e.hasKey]),I.jsx(Q.InputGroup,{children:I.jsx(Q.InputGroupItem,{children:I.jsxs(Q.TextInputGroup,{"data-cy":"text-input","data-testid":"text-input",style:{minWidth:220},children:[I.jsx(Q.TextInputGroupMain,{id:e.id,value:n,onChange:(i,l)=>{typeof i=="string"?(r(i),o(i)):(r(l),o(l))},placeholder:a}),n!==""&&I.jsx(Q.TextInputGroupUtilities,{children:I.jsx(Q.Button,{icon:I.jsx(Ht.TimesIcon,{}),variant:"plain","aria-label":"clear filter",onClick:()=>{r(""),e.setValue("")},style:{opacity:n?void 0:0},tabIndex:-1})})]})})})}function _j(e){const[t,n]=w.useState(!1),r=i=>{n(!t)},{activeGroup:a,setActiveGroup:o}=w.useContext(Kue);return w.useEffect(()=>{t&&o(e.id)},[t,o,e.id]),w.useEffect(()=>{a!==e.id&&n(!1)},[a,e.id]),I.jsx(Q.ToolbarToggleGroup,{...e,isExpanded:t,onToggle:r})}const Kue=w.createContext({activeGroup:"",setActiveGroup:()=>{}});var yj=(e=>(e[e.Search=0]="Search",e[e.SingleText=1]="SingleText",e[e.MultiText=2]="MultiText",e[e.SingleSelect=3]="SingleSelect",e[e.MultiSelect=4]="MultiSelect",e[e.DateRange=5]="DateRange",e[e.AsyncSingleSelect=6]="AsyncSingleSelect",e[e.AsyncMultiSelect=7]="AsyncMultiSelect",e))(yj||{});function Que(e){var s;const{toolbarFilters:t,filterState:n,setFilterState:r}=e,[a,o]=w.useState(()=>t&&(t==null?void 0:t.length)>0?t[0].key:""),i=t==null?void 0:t.find(c=>c.key===a);if(!i)return I.jsx(I.Fragment,{});if(!t)return I.jsx(I.Fragment,{});if(t.length===0)return I.jsx(I.Fragment,{});let l=t.length===1;return t.length>=1&&t[0].type===3&&t[0].isPinned&&(n[t[0].key]===void 0||((s=n[t[0].key])==null?void 0:s.length)===0)&&(l=!1),I.jsx(I.Fragment,{children:t.length===1?I.jsxs(Q.ToolbarItem,{children:[l&&I.jsx("div",{style:{marginTop:6,marginRight:6,whiteSpace:"nowrap"},children:t[0].label}),I.jsx(Zue,{id:"filter-input",filter:i,filterState:n,setFilterState:r,"data-cy":i,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation})]}):I.jsxs(Q.ToolbarGroup,{variant:"filter-group",children:[I.jsx(Q.ToolbarItem,{children:I.jsx(Yp,{id:"filter",value:a,onSelect:o,icon:i.type===0?I.jsx(Ht.SearchIcon,{}):I.jsx(Ht.FilterIcon,{}),options:t.map(c=>({label:c.label,value:c.key})),placeholder:"","data-cy":i,"data-testid":i,disableSortOptions:!0,isRequired:!0,disableMaxDropdownWidth:!0})}),I.jsx(Q.ToolbarItem,{children:I.jsx(Zue,{id:"filter-input",filter:i,filterState:n,setFilterState:r,"data-cy":i,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation})})]})})}function Xue(e){const{toolbarFilters:t,setFilterState:n,filterState:r}=e,[a]=Na(),o=!Fl("md");if(!t)return I.jsx(I.Fragment,{});if(t.length===0)return I.jsx(I.Fragment,{});const i=t.filter(s=>!s.isPinned),l=t.filter(s=>!!s.isPinned);return I.jsxs(_j,{toggleIcon:I.jsx(Ht.FilterIcon,{}),breakpoint:"md",id:"filters",children:[o&&I.jsx(Q.ToolbarItem,{variant:"label",children:a.filter}),I.jsx(Que,{toolbarFilters:i,setFilterState:n,filterState:r,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation}),l==null?void 0:l.map(s=>I.jsx(Que,{toolbarFilters:[s],setFilterState:n,filterState:r,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation},s.key)),t==null?void 0:t.map(s=>{const c=(r==null?void 0:r[s.key])||[];return s.isPinned&&s.type===3||s.isPinned&&s.type===5?null:I.jsx(Q.ToolbarFilter,{categoryName:s.label,labels:[...c.map(p=>{var f,g;switch(s.type){case 3:case 4:case 5:return((g=(f=s.options)==null?void 0:f.find(v=>v.value===p))==null?void 0:g.label)??p;case 6:case 7:return{key:p,node:s.queryLabel(p)};default:return p}})],deleteLabel:(p,f)=>{n==null||n(g=>{var y;const v={...g};switch(f=typeof f=="string"?f:f.key,s.type){case 3:case 4:case 5:f=((y=s.options.find(x=>x.label===f))==null?void 0:y.value)??f;break}let b=g[s.key];return b&&(b=b.filter(x=>x!==f),b.length===0?delete v[s.key]:v[s.key]=b),v})},deleteLabelGroup:()=>{n==null||n(p=>{const f={...p};return delete f[s.key],f})},showToolbarItem:!1,children:I.jsx(I.Fragment,{})},s.label)})]})}function Zue(e){const{filter:t,filterState:n,setFilterState:r}=e,a=n==null?void 0:n[t.key],o=w.useCallback(s=>{r(c=>{const p={...c},f=p[t.key]??[];return p[t.key]=s(f),p})},[t.key,r]),i=w.useCallback(s=>{r(c=>{const p={...c},f=p[t.key]??[];return p[t.key]=[...f,s],p})},[t.key,r]);let l=!1;if(n)for(const s in n){if(s===t.key)continue;const c=n[s];if(c&&(c==null?void 0:c.length)>=2){l=!0;break}}switch(t.type){case 0:return I.jsx(AR,{id:e.id??t.key,placeholder:t.placeholder,setValue:s=>o(()=>s?[s]:[]),value:a&&(a==null?void 0:a.length)>0?a[0]:"",hasKey:!!(n!=null&&n[t.key])},t.key);case 1:return I.jsx(AR,{id:e.id??t.key,placeholder:t.placeholder,comparison:t.comparison,setValue:s=>o(()=>s?[s]:[]),value:a&&(a==null?void 0:a.length)>0?a[0]:"",hasKey:!!(n!=null&&n[t.key])},t.key);case 2:return l&&e.limitFiltersToOneOrOperation?I.jsx(AR,{id:e.id??t.key,placeholder:t.placeholder,comparison:t.comparison,setValue:s=>o(()=>s?[s]:[]),value:a&&(a==null?void 0:a.length)>0?a[0]:"",hasKey:!!(n!=null&&n[t.key])},t.key):I.jsx(Yue,{id:e.id??t.key,addFilter:i,placeholder:t.placeholder,comparison:t.comparison},t.key);case 3:return I.jsx(Yp,{id:e.id??t.key,placeholder:t.placeholder,value:a&&(a==null?void 0:a.length)>0?a[0]:"",onSelect:s=>o(()=>[s]),options:t.options,isRequired:t.isRequired||!t.isPinned,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0,disableAutoSelect:!0},t.key);case 6:return I.jsx(Hue,{id:e.id??t.key,value:a&&(a==null?void 0:a.length)>0?a[0]:"",onSelect:s=>o(()=>[s]),placeholder:t.placeholder||"",queryOptions:t.queryOptions,queryErrorText:t.queryErrorText,queryPlaceholder:t.queryPlaceholder,isRequired:t.isRequired,footer:t.openBrowse?I.jsx(que.Consumer,{children:s=>I.jsx(Q.Button,{variant:"link",onClick:()=>{var c;s.setOpen(!1),(c=t.openBrowse)==null||c.call(t,p=>o(()=>[p]),a&&a.length>0?a[0]:void 0)},children:"Browse"})}):void 0,queryLabel:t.queryLabel,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0},t.key);case 7:return l&&e.limitFiltersToOneOrOperation?I.jsx(Hue,{id:e.id??t.key,value:a&&(a==null?void 0:a.length)>0?a[0]:"",onSelect:s=>o(()=>[s]),placeholder:t.placeholder||"",queryOptions:t.queryOptions,queryErrorText:t.queryErrorText,queryPlaceholder:t.queryPlaceholder,isRequired:t.isRequired,footer:t.openBrowse?I.jsx(Q.Button,{variant:"link",onClick:()=>{var s;(s=t.openBrowse)==null||s.call(t,c=>o(()=>[c.length?c[0]:""]),a&&a.length>0?a:void 0)},children:"Browse"}):void 0,queryLabel:t.queryLabel,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0},t.key):I.jsx(GJe,{id:e.id??t.key,values:a,onSelect:o,placeholder:t.placeholder||"",queryOptions:t.queryOptions,queryErrorText:t.queryErrorText,queryPlaceholder:t.queryPlaceholder,footer:t.openBrowse?I.jsx(Q.Button,{variant:"link",onClick:()=>{var s;(s=t.openBrowse)==null||s.call(t,c=>o(()=>c),a)},children:"Browse"}):void 0,variant:"count",disableClearSelection:!0,queryLabel:t.queryLabel,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0},t.key);case 4:return l&&e.limitFiltersToOneOrOperation?I.jsx(Yp,{id:e.id??t.key,placeholder:t.placeholder,value:a&&(a==null?void 0:a.length)>0?a[0]:"",onSelect:s=>o(()=>[s]),options:t.options,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0},t.key):I.jsx(jue,{id:e.id??t.key,placeholder:t.placeholder,values:a,onSelect:o,options:t.options,variant:"count",disableClearSelection:!0,disableSortOptions:t.disableSortOptions,disableMaxDropdownWidth:!0},t.key);case 5:return I.jsx(Wue,{id:e.id??t.key,label:t.label,placeholder:t.placeholder??"",filterValues:a,setFilterValues:o,options:t.options,isRequired:t.isRequired,defaultValue:t.defaultValue},t.key)}}function KJe(e){const{sort:t,setSort:n,sortDirection:r,setSortDirection:a,sortOptions:o}=e,i=o==null?void 0:o.find(p=>p.value===t),l=i?i.type:void 0,[s]=Na(),c=w.useMemo(()=>{switch(l){case"text":switch(r){case"asc":return I.jsx(Ht.SortAlphaUpIcon,{});case"desc":return I.jsx(Ht.SortAlphaDownAltIcon,{})}break;case"number":switch(r){case"asc":return I.jsx(Ht.SortNumericUpIcon,{});case"desc":return I.jsx(Ht.SortNumericDownAltIcon,{})}break;default:switch(r){case"asc":return I.jsx(Ht.SortAmountUpIcon,{});case"desc":return I.jsx(Ht.SortAmountDownIcon,{})}break}return I.jsx(I.Fragment,{})},[r,l]);return!o||o.length<=0?I.jsx(I.Fragment,{}):I.jsxs(_j,{breakpoint:"2xl",toggleIcon:c,id:"sort",children:[I.jsx(Q.ToolbarItem,{variant:"label",children:s.sort}),I.jsxs(Q.ToolbarGroup,{variant:"filter-group",children:[I.jsx(Q.ToolbarItem,{children:I.jsx(QJe,{sortOptions:o,sort:t,setSort:n,setSortDirection:a})}),I.jsx(Q.ToolbarItem,{children:I.jsx(Q.Button,{variant:"control",icon:c,onClick:()=>{r==="asc"?a==null||a("desc"):a==null||a("asc")}})})]})]})}function QJe(e){const{sortOptions:t,sort:n,setSort:r,setSortDirection:a}=e,o=w.useCallback(i=>{if(i){const l=t.find(s=>s.value===i);l&&n!==i&&l.defaultDirection&&(a==null||a(l.defaultDirection)),r==null||r(i)}},[t,r,a,n]);return I.jsx(Yp,{id:"toolbar-sort-select-expand",placeholder:"",value:n,onSelect:o,options:t.map(i=>({label:i.label,value:i.value})),disableMaxDropdownWidth:!0,isRequired:!0})}function XJe(e){return w.useMemo(()=>{const n=[];for(const r of e)if(r.sort){if(r.defaultSort){n.push({label:r.header,value:r.sort,type:"text",defaultDirection:r.defaultSortDirection});continue}switch(r.type){case"count":n.push({label:r.header,value:r.sort,type:"number",defaultDirection:r.defaultSortDirection});break;case"text":n.push({label:r.header,value:r.sort,type:"text",defaultDirection:r.defaultSortDirection});break;default:n.push({label:r.header,value:r.sort,defaultDirection:r.defaultSortDirection});break}}return n},[e])}function ZJe(e){const{viewType:t,setViewType:n,openColumnModal:r}=e,[a]=Na();let o=0;e.disableTableView||o++,e.disableCardView||o++,e.disableListView||o++;let i=I.jsx(Ht.TableIcon,{});return t===kr.Cards&&(i=I.jsx(Ht.ThLargeIcon,{})),t===kr.List&&(i=I.jsx(Ht.ListIcon,{})),I.jsx(_j,{breakpoint:"md",toggleIcon:i,id:"view",children:I.jsx(Q.ToolbarGroup,{variant:"action-group",style:{justifyContent:"end",marginRight:0},children:I.jsx(Q.ToolbarItem,{children:I.jsxs(Q.Split,{hasGutter:!0,children:[r&&I.jsx(Q.Tooltip,{content:a.manageColumns,children:I.jsx(Q.Button,{variant:"plain",icon:I.jsx(Ht.ColumnsIcon,{}),onClick:r})}),o>1&&I.jsx(Q.ToggleGroup,{"data-cy":"table-view-toggle","aria-label":"table view toggle",children:[!e.disableTableView&&kr.Table,!e.disableListView&&kr.List,!e.disableCardView&&kr.Cards].filter(l=>l).map(l=>{switch(l){case kr.Cards:return I.jsx(Q.ToggleGroupItem,{icon:I.jsx(Ht.ThLargeIcon,{}),isSelected:t===kr.Cards,onClick:()=>n==null?void 0:n(kr.Cards),"aria-label":"card view","data-cy":"card-view"},"card-view");case kr.List:return I.jsx(Q.ToggleGroupItem,{icon:I.jsx(Ht.ListIcon,{}),isSelected:t===kr.List,onClick:()=>n==null?void 0:n(kr.List),"aria-label":"list view","data-cy":"list-view"},"list-view");case kr.Table:return I.jsx(Q.ToggleGroupItem,{icon:I.jsx(Ht.TableIcon,{}),isSelected:t===kr.Table,onClick:()=>n==null?void 0:n(kr.Table),"aria-label":"table view","data-cy":"table-view"},"table-view")}})})]})})})})}function Jue(e){const{itemCount:t,toolbarFilters:n,selectedItems:r,filterState:a,setFilterState:o,openColumnModal:i,sort:l,setSort:s,sortDirection:c,setSortDirection:p,sortOptions:f,clearAllFilters:g}=e,v=w.useCallback(()=>{g?g():o&&o({})},[o,g]),b=Fl("md"),{viewType:y,setViewType:x}=e;let{toolbarActions:E}=e;E=E??[];const[C,R]=w.useState(""),N=n!==void 0,O=E!==void 0&&E.length>0,P=e.showSelect===!0||r!==void 0&&E&&E.find(L=>"selection"in L&&L.selection===vr.Multiple);return P||N||O?t===void 0?I.jsx(Q.Toolbar,{className:"page-table-toolbar",style:{paddingBottom:b?void 0:8,paddingTop:b?void 0:8},children:I.jsx(Q.ToolbarContent,{children:I.jsx(Q.ToolbarItem,{style:{width:"100%"},children:I.jsx(Q.Skeleton,{height:"36px"})})})}):I.jsx(Kue.Provider,{value:{activeGroup:C,setActiveGroup:R},children:I.jsx(Q.Toolbar,{ouiaId:"page-toolbar","data-cy":"page-toolbar",clearAllFilters:v,className:"page-table-toolbar",style:{paddingBottom:b?void 0:8,paddingTop:b?void 0:8},inset:{default:"insetMd",sm:"insetMd",md:"insetMd",lg:"insetMd",xl:"insetLg","2xl":"insetLg"},children:I.jsxs(Q.ToolbarContent,{children:[y!=="table"&&P&&I.jsx(Q.ToolbarGroup,{children:I.jsx(Q.ToolbarItem,{children:I.jsx(IZ,{...e})})}),a&&o&&I.jsx(Xue,{toolbarFilters:n,filterState:a,setFilterState:o,limitFiltersToOneOrOperation:e.limitFiltersToOneOrOperation}),e.toolbarContent,I.jsx(Q.ToolbarGroup,{variant:"action-group",children:I.jsx(pu,{dropDownAriaLabel:"toolbar actions",actions:E,selectedItems:r,wrapper:Q.ToolbarItem})}),I.jsxs(Q.ToolbarGroup,{align:{default:"alignEnd"},children:[y!=="table"&&I.jsx(KJe,{sort:l,setSort:s,sortDirection:c,setSortDirection:p,sortOptions:f}),y&&x&&I.jsx(ZJe,{disableTableView:e.disableTableView,disableListView:e.disableListView,disableCardView:e.disableCardView,viewType:y,setViewType:x,openColumnModal:i})]})]})})}):I.jsx(w.Fragment,{})}function JJe(e){const{t}=jn(),n=t("Something went wrong"),r=t("Please refresh the page by using the button below."),a=t("Refresh"),{titleProp:o,message:i}=e;return I.jsxs(Q.EmptyState,{headingLevel:"h2",icon:Ht.ExclamationCircleIcon,titleText:I.jsx(I.Fragment,{children:o||n}),isFullHeight:!0,children:[I.jsx(Q.EmptyStateBody,{children:i}),I.jsxs(Q.EmptyStateFooter,{children:[I.jsx(Q.EmptyStateBody,{children:r}),I.jsx(Q.Button,{variant:"primary",onClick:()=>window.location.reload(),children:a})]})]})}function $Je(e){const{title:t,description:n,icon:r,button:a,footNote:o,image:i,variant:l,style:s}=e;return I.jsxs(Q.EmptyState,{icon:r,headingLevel:"h4",titleText:I.jsx(I.Fragment,{children:t}),variant:l||Q.EmptyStateVariant.full,style:s,isFullHeight:!0,children:[I.jsx(Q.EmptyStateBody,{"data-cy":e.description,children:n}),I.jsxs(Q.EmptyStateFooter,{children:[a&&I.jsx(Q.EmptyStateActions,{children:a}),i&&I.jsxs(I.Fragment,{children:[" ",I.jsx("br",{})," ",I.jsx(Q.EmptyStateBody,{children:i})]}),o&&I.jsx(Q.EmptyStateBody,{children:o})]})]})}function e$e(e){const{button:t,description:n,title:r,variant:a,icon:o}=e;return I.jsx($Je,{icon:o??(t?Ht.PlusCircleIcon:Ht.CubesIcon),title:r,description:n,button:t,variant:a})}const $ue=w.createContext({dialogs:[],clearDialogs:()=>{},pushDialog:e=>{},popDialog:()=>{}}),epe=w.createContext(!1);function tpe(){return w.useContext(epe)}function npe(e){const[t,n]=w.useState([]),r=w.useCallback(()=>n(l=>l.length?[]:l),[n]),a=w.useCallback(l=>n(s=>[...s,l]),[n]),o=w.useCallback(()=>n(l=>l.slice(0,-1)),[n]),i=w.useMemo(()=>({dialogs:t,clearDialogs:r,pushDialog:a,popDialog:o}),[r,t,o,a]);return I.jsxs($ue.Provider,{value:i,children:[I.jsx(epe.Provider,{value:!0,children:t.length>0&&t[t.length-1]}),e.children]})}function rpe(){return w.useContext($ue)}function Kp(){const{dialogs:e,clearDialogs:t,pushDialog:n}=rpe(),r=w.useMemo(()=>e.length>0?e[e.length-1]:void 0,[e]),a=w.useCallback(o=>{t(),o!==void 0&&n(o)},[t,n]);return w.useMemo(()=>[r,a],[r,a])}function t$e(e,t,n){const{selectedItems:r,selectItem:a,unselectItem:o,isSelected:i,selectItems:l,unselectAll:s,allSelected:c}=xj(e,t),{sorted:p,sort:f,setSort:g}=Sj(e),{filtered:v,setFilterFn:b}=Ej(p,t),{searched:y,search:x,setSearch:E,setSearchFn:C}=n$e(v,t,n==null?void 0:n.search),{paged:R,page:N,setPage:O,perPage:P,setPerPage:M}=xE(y),L=w.useCallback(()=>l(R),[R,l]),W=w.useCallback(()=>l(y),[y,l]);return w.useMemo(()=>({allSelected:c,filtered:v,isSelected:i,page:N,paged:R,perPage:P,search:x,searched:y,selectAll:W,selectItem:a,selectPage:L,selectedItems:r,setFilterFn:b,setPage:O,setPerPage:M,setSearch:E,setSearchFn:C,setSort:g,sort:f,sorted:p,unselectAll:s,unselectItem:o}),[c,v,i,N,R,P,x,y,W,a,L,r,b,O,M,E,C,g,f,p,s,o])}function xj(e,t,n){const[r,a]=w.useState(()=>n?n.reduce((y,x)=>(y[`item-${t(x)}`]=x,y),{}):{});w.useEffect(()=>{a(y=>{let x=!1;return e.forEach(E=>{const C=`item-${t(E)}`;y[C]&&y[C]!==E&&(x=!0,y[C]=E)}),x?{...y}:y})},[e,t]);const o=w.useCallback(y=>{a(x=>{const E=`item-${t(y)}`;return x[E]!==y&&(x={...x},x[E]=y),x})},[t]),i=w.useCallback(y=>{a(x=>{const E=`item-${t(y)}`;return x[E]&&(x={...x},delete x[E]),x})},[t]),l=w.useCallback(y=>{const x=`item-${t(y)}`;return r[x]!==void 0},[t,r]),s=w.useCallback(y=>{a(x=>{x={...x};for(const E of y){const C=`item-${t(E)}`;x[C]=E}return x})},[t]),c=w.useRef(e);w.useEffect(()=>{c.current=e},[e]);const p=w.useCallback(()=>s(c.current),[s]),f=w.useCallback(y=>{for(const x of y)i(x)},[i]),g=w.useCallback(()=>{a(y=>Object.keys(y).length>0?{}:y)},[]),v=w.useMemo(()=>Object.values(r),[r]),b=w.useMemo(()=>v.length===e.length,[e.length,v.length]);return w.useMemo(()=>({selectedItems:v,selectItem:o,unselectItem:i,isSelected:l,selectItems:s,selectAll:p,unselectAll:g,allSelected:b,keyFn:t,unselectItems:f}),[b,l,t,p,o,s,v,g,i,f])}function ape(e,t){const[n,r]=w.useState({});w.useEffect(()=>{r(v=>{let b=!1;const y=e?e.reduce((C,R)=>{const N=t(R);return C[N]=R,v[N]&&v[N]!==R&&(b=!0,v[N]=R),C},{}):{},x={};for(const C in v)y[C]||(x[C]=!0);const E=Object.keys(x);if(E.length){b=!0;for(const C of E)delete v[C]}return b?{...v}:v})},[e,t]);const a=w.useCallback(v=>{r(b=>{const y=t(v);return b[y]!==v&&(b={...b},b[y]=v),b})},[t]),o=w.useCallback(v=>{r(b=>{const y=t(v);return b[y]&&(b={...b},delete b[y]),b})},[t]),i=w.useCallback(v=>{for(const b of v)o(b)},[o]),l=w.useCallback(v=>{const b=t(v);return n[b]!==void 0},[t,n]),s=w.useCallback(v=>{r(b=>{b={...b};for(const y of v){const x=t(y);b[x]=y}return b})},[t]),c=w.useCallback(()=>{s(e??[])},[e,s]),p=w.useCallback(()=>{r(v=>Object.keys(v).length>0?{}:v)},[]),f=w.useMemo(()=>Object.values(n),[n]),g=w.useMemo(()=>f.length===(e==null?void 0:e.length),[e,f.length]);return w.useMemo(()=>({selectedItems:f,selectItem:a,unselectItem:o,isSelected:l,selectItems:s,selectAll:c,unselectAll:p,allSelected:g,keyFn:t,unselectItems:i}),[g,l,t,c,a,s,f,p,o,i])}function Sj(e){const[t,n]=w.useState(),{direction:r,sortFn:a}=t??{},o=w.useMemo(()=>e?a?r==="asc"?[...e.sort(a)]:[...e.sort(a).reverse()]:e:[],[r,e,a]);return w.useMemo(()=>({sorted:o,sort:t,setSort:n}),[t,o])}function Ej(e,t){const n=w.useRef({map:{}}),[r,a]=w.useState(),o=w.useCallback(c=>a(()=>c),[]),[i,l]=w.useState([]);w.useEffect(()=>{n.current.map={}},[r]);const s=w.useCallback(c=>{const p=t(c);let f=n.current.map[p];return f?f.item!==c&&(f.item=c,f.passes=r?r(c):!0):(f={item:c,passes:r?r(c):!0},n.current.map[p]=f),f.passes},[r,t]);return w.useEffect(()=>{l(r?e.filter(s):e)},[e,r,s]),w.useMemo(function(){return{filtered:i,setFilterFn:o}},[i,o])}function n$e(e,t,n){const r=w.useRef({map:{}}),[a,o]=w.useState(),i=w.useCallback(v=>o(()=>v),[]),[l,s]=w.useState([]),[c,p]=w.useState(n??""),f=w.useCallback(bj(v=>p(v),200),[]);w.useEffect(()=>{r.current.map={}},[c,a]);const g=w.useCallback(v=>{const b=t(v);let y=r.current.map[b];return y?y.item!==v&&(y.item=v,y.score=a?a(v,c):0):(y={item:v,score:a?a(v,c):0},r.current.map[b]=y),y},[t,a,c]);return w.useEffect(()=>{s(a&&c?e.map(g).filter(v=>v.score<.5).sort((v,b)=>v.score-b.score).map(v=>v.item):e)},[c,e,a,g]),w.useMemo(function(){return{searched:l,search:c,setSearch:f,setSearchFn:i}},[l,c,f,i])}function xE(e){const[t,n]=w.useState([]),[r,a]=w.useState(1),[o,i]=w.useState(10);return w.useEffect(()=>{n(l=>{const s=e.slice((r-1)*o,r*o);if(l.length!==s.length)return s;let c=0;for(const p of s)if(l[c++]!==p)return s;return l})},[r,o,e]),w.useEffect(()=>{r>Math.ceil(e.length/o)&&a(1)},[r,o,e.length]),w.useMemo(()=>({paged:t,page:r,setPage:a,perPage:o,setPerPage:i}),[r,t,o])}const wj={modifiers:{ghostRow:"pf-m-ghost-row",dragOver:"pf-m-drag-over"}},r$e=Cn(Xn.Tbody)`
434
434
  --pf-v6-c-table--cell--LineHeight: 2;
435
435
  `;function a$e(e){const{t}=jn(),{columns:n,keyFn:r,items:a,setItems:o,isSelected:i,selectItem:l,unselectItem:s,allSelected:c,selectAll:p,unselectAll:f,hideColumnHeaders:g,isSelectableWithCheckbox:v}=e,[b,y]=w.useState(null),[x,E]=w.useState(null),[C,R]=w.useState(!1),N=w.useRef(null),O=Y=>{if(N.current){const K=N.current.getBoundingClientRect();return Y.clientX>K.x&&Y.clientX<K.x+K.width&&Y.clientY>K.y&&Y.clientY<K.y+K.height}return!1},P=Y=>{O(Y)||M()},M=()=>{N.current&&Array.from(N.current.children).forEach(Y=>{Y.classList.remove(wj.modifiers.ghostRow),Y.setAttribute("aria-pressed","false")}),E(null),y(null),R(!1)},L=Y=>{Y.preventDefault();const K=Y.target.closest("tr");if(!K||!(N.current&&N.current.contains(K))||K.id===x)return null;{const ae=K.id,oe=Array.from(N.current.children).findIndex(te=>te.id===ae);if(oe!==b&&x){const te=W([...a],x,oe);o(te)}}return null},W=(Y,K,ae)=>{const oe=Y.findIndex(ee=>r(ee)===K);if(oe===ae)return Y;const te=Y.splice(oe,1);return Y.splice(ae,0,te[0]),Y},G=Y=>{O(Y)||y(null)},B=Y=>{const K=Y.target;K.classList.remove(wj.modifiers.ghostRow),K.setAttribute("aria-pressed","false"),E(null),y(null),R(!1)},j=Y=>{if(N.current){Y.dataTransfer.effectAllowed="move";const K=Y.currentTarget.id,ae=Array.from(N.current.children).findIndex(oe=>oe.id===Y.currentTarget.id);Y.currentTarget.setAttribute("aria-pressed","true"),E(K),y(ae)}},q=w.useCallback(Y=>{const K=a.findIndex(oe=>r(oe)===r(Y)),ae=[...a];ae[K]=Y,o(ae)},[a,o,r]);return I.jsxs(Xn.Table,{"aria-label":t("Table with draggable rows"),className:C?wj.modifiers.dragOver:"",variant:"compact",gridBreakPoint:"",children:[!g&&I.jsx(Xn.Thead,{children:I.jsxs(Xn.Tr,{children:[I.jsx(Xn.Th,{}),v&&I.jsx(Xn.Th,{select:{onSelect:(Y,K)=>{K?p():f()},isSelected:c}}),n.map((Y,K)=>I.jsx(Xn.Th,{children:Y.header},K))]})}),I.jsx(r$e,{ref:N,onDragOver:L,onDragLeave:G,children:a.map((Y,K)=>{const ae=r(Y);return I.jsxs(Xn.Tr,{id:ae.toString(),draggable:!0,onDrop:P,onDragEnd:B,onDragStart:j,children:[I.jsx(Xn.Td,{draggableRow:{id:`draggable-row-${ae.toString()}`}}),v&&I.jsx(Xn.Td,{select:{rowIndex:K,variant:"checkbox",onSelect:(oe,te)=>{te?l(Y):s(Y)},isSelected:i(Y)}}),n.map(oe=>I.jsx(Xn.Td,{children:oe.cell(Y,q)},oe.header))]},ae)})})]})}function o$e(e){const[t,n]=Kp(),[r]=w.useState(()=>e.keyFn),[a]=w.useState(()=>e.saveFn),[o]=w.useState(()=>e.loadFn),[i,l]=w.useState(()=>{try{const g=localStorage.getItem(e.id);if(typeof g=="string"){const v=JSON.parse(g);if(Array.isArray(v)&&v.every(b=>typeof b=="object")&&v.every(b=>"key"in b&&"enabled"in b))return v}}catch{}}),s=w.useMemo(()=>i?e.items.map(g=>{if(o){const v=i.find(b=>b.key===r(g));v&&v.state&&o(g,v.state)}return g}).sort((g,v)=>{const b=i.findIndex(x=>x.key===r(g)),y=i.findIndex(x=>x.key===r(v));return b===-1&&y===-1?0:b===-1?1:y===-1?-1:b-y}):e.items,[i,r,o,e.items]),c=w.useMemo(()=>i?s.filter(g=>{const v=i.find(b=>b.key===r(g));return v?v.enabled:!0}):s,[s,i,r]),p=w.useCallback((g,v)=>{const b=g.map(y=>({key:r(y),enabled:v.includes(y),state:a?a(y):void 0}));l(b),localStorage.setItem(e.id,JSON.stringify(b)),e.onSubmit&&e.onSubmit(g)},[r,e,a]);return{openManageItems:()=>n(I.jsx(i$e,{...e,keyFn:r,items:s,defaultSelectedItems:c,onApplyChanges:p})),managedItems:c}}function i$e(e){const{t}=jn(),{title:n,description:r,columns:a,onApplyChanges:o}=e,[i]=w.useState(()=>e.keyFn),[l,s]=Kp(),c=()=>s(void 0),[p,f]=w.useState(()=>e.items),{selectedItems:g,isSelected:v,selectItem:b,unselectItem:y,allSelected:x,selectAll:E,unselectAll:C}=xj(p,i,e.defaultSelectedItems),R=()=>{o(p,g),s(void 0)};return I.jsxs(Q.Modal,{"aria-label":n,ouiaId:n,variant:e.variant??Q.ModalVariant.medium,isOpen:!0,onClose:c,children:[I.jsx(Q.ModalHeader,{title:n,description:I.jsx("div",{style:{marginBottom:16},children:r})}),I.jsx(Q.Divider,{}),I.jsx(Q.ModalBody,{style:{padding:0},children:I.jsx(a$e,{keyFn:i,items:p,setItems:f,columns:a,isSelected:v,selectItem:b,unselectItem:y,allSelected:x,selectAll:E,unselectAll:C,hideColumnHeaders:e.hideColumnHeaders,isSelectableWithCheckbox:e.hideSelection!==!0})}),I.jsx(Q.Divider,{}),I.jsxs(Q.ModalFooter,{children:[I.jsx(Q.Button,{variant:"primary",onClick:R,children:t`Apply`},"apply"),I.jsx(Q.Button,{variant:"link",onClick:c,children:t`Cancel`},"cancel")]})]})}function l$e(e,t,n,r,a){const{t:o}=jn(),i=w.useMemo(()=>{const f=[{header:o("Name"),cell:g=>g.header}];return n||f.push({header:o("Table"),cell:(g,v)=>I.jsx(Yp,{value:g.table??"",onSelect:b=>{switch(b){case"":v({...g,table:void 0});break;case jm.description:case jm.expanded:case jm.hidden:v({...g,table:b});break}},placeholder:o("Column"),options:[{value:"",label:o("Column"),description:o("Show the column in the table.")},{value:jm.description,label:o("Description"),description:o("Show the column when the item is expanded as a full width description.")},{value:jm.expanded,label:o("Expanded"),description:o("Show the column when the item is expanded as a detail.")},{value:jm.hidden,label:o("Hidden"),description:o("Hide the column.")}],isRequired:!0})}),r||f.push({header:o("List"),cell:(g,v)=>I.jsx(Yp,{value:g.list??"",onSelect:b=>{switch(b){case"":v({...g,list:void 0});break;case"name":case"subtitle":case"description":case"primary":case"secondary":case"hidden":v({...g,list:b});break}},options:[{value:"name",label:o("Name"),description:o("Show the column as the name of the list item.")},{value:"subtitle",label:o("Subtitle"),description:o("Show the column as the subtitle under the name on the list.")},{value:"description",label:o("Description"),description:o("Show the column as the list item description.")},{value:"primary",label:o("Left side"),description:o("Show the column on the left side of the list.")},{value:"secondary",label:o("Right side"),description:o("Show the column on the right side of the list.")},{value:"hidden",label:o("Hidden"),description:o("Hide the column on the list.")}],placeholder:o("Left side"),isRequired:!0})}),a||f.push({header:o("Card"),cell:(g,v)=>I.jsx(Yp,{value:g.card??"",onSelect:b=>{switch(b){case"":v({...g,card:void 0});break;case"name":case"subtitle":case"description":case"hidden":v({...g,card:b});break}},placeholder:o("Detail"),options:[{value:"name",label:o("Name"),description:o("Show the column as the name on the card.")},{value:"subtitle",label:o("Subtitle"),description:o("Show the column as the subtitle under the name on the card.")},{value:"description",label:o("Description"),description:o("Show the column as the card description.")},{value:"",label:o("Detail"),description:o("Show the column one of the details on the card.")},{value:"hidden",label:o("Hidden"),description:o("Hide the column on the card.")}],isRequired:!0})}),f},[a,r,n,o]),l=w.useCallback((f,g)=>{typeof g=="object"&&g!==null&&("table"in g&&typeof g.table=="string"?f.table=g.table:f.table=void 0,"list"in g&&typeof g.list=="string"?f.list=g.list:f.list=void 0,"card"in g&&typeof g.card=="string"?f.card=g.card:f.card=void 0)},[]),s=w.useCallback(f=>{const{table:g,list:v,card:b}=f;return{table:g,list:v,card:b}},[]),{openManageItems:c,managedItems:p}=o$e({id:e,title:o("Manage Columns"),description:o("Manage the order, placement, and format of columns."),items:t,keyFn:f=>f.id??f.header,columns:i,loadFn:l,saveFn:s,hideSelection:!0});return{openColumnManagement:c,managedColumns:p}}function s$e({rows:e=10}){return I.jsx(Xn.Table,{gridBreakPoint:"",className:"page-table",children:I.jsx(Xn.Tbody,{children:new Array(e).fill(0).map((t,n)=>I.jsx(Xn.Tr,{children:I.jsx(Xn.Td,{children:I.jsx(Q.Skeleton,{height:"27px"})})},n))})})}function c$e(e){const{setPage:t,setPerPage:n}=e,r=w.useCallback((i,l)=>t(l),[t]),a=w.useCallback((i,l)=>n(l),[n]),o=!Fl("md");return I.jsx(Q.Pagination,{"data-cy":"pagination",variant:Q.PaginationVariant.bottom,itemCount:e.itemCount,page:e.page,perPage:e.perPage,onSetPage:r,onPerPageSelect:a,perPageOptions:e.perPageOptions,style:{...e.style,boxShadow:"none",zIndex:400,paddingTop:o?4:6,paddingBottom:o?4:6}})}function d$e(e){const t=e.size??350,n=w.useRef(null),[r,a]=w.useState("1fr"),o=w.useCallback(l=>{let s=Math.min(e.maxColumns??12,Math.max(Math.floor(l/t),1));s<1&&(s=1),a(()=>new Array(s).fill("1fr").join(" "))},[e.maxColumns,t]);return rd(n,l=>o(l.contentRect.width)),w.useLayoutEffect(()=>{var l;o(((l=n.current)==null?void 0:l.clientWidth)??0)},[o]),I.jsx("div",{ref:n,style:{display:"grid",gridAutoRows:"1fr",gridTemplateColumns:r,gap:16},children:e.children})}const ope=Cn.small`
436
436
  opacity: 0.7;
@@ -544,7 +544,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
544
544
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zrt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Grt(e){if(Array.isArray(e))return mU(e)}function fU(e,t){return Wrt(e)||Hrt(e,t)||Wme(e,t)||qrt()}function qrt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
545
545
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wme(e,t){if(e){if(typeof e=="string")return mU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mU(e,t)}}function mU(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hrt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,o=!1,i,l;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));a=!0);}catch(s){o=!0,l=s}finally{try{!a&&n.return!=null&&n.return()}finally{if(o)throw l}}return r}}function Wrt(e){if(Array.isArray(e))return e}function Vme(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vme(Object(n),!0).forEach(function(r){gU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vme(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nO(e,t){if(e==null)return{};var n=Vrt(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vrt(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var vU=w.forwardRef(function(e,t){var n=e.children,r=nO(e,Mrt),a=Kme(r),o=a.open,i=nO(a,Lrt);return w.useImperativeHandle(t,function(){return{open:o}},[o]),w.createElement(w.Fragment,null,n(_a(_a({},i),{},{open:o})))});vU.displayName="Dropzone";var Yme={disabled:!1,getFilesFromEvent:nrt,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};vU.defaultProps=Yme,vU.propTypes={children:zr.func,accept:zr.objectOf(zr.arrayOf(zr.string)),multiple:zr.bool,preventDropOnDocument:zr.bool,noClick:zr.bool,noKeyboard:zr.bool,noDrag:zr.bool,noDragEventsBubbling:zr.bool,minSize:zr.number,maxSize:zr.number,maxFiles:zr.number,disabled:zr.bool,getFilesFromEvent:zr.func,onFileDialogCancel:zr.func,onFileDialogOpen:zr.func,useFsAccessApi:zr.bool,autoFocus:zr.bool,onDragEnter:zr.func,onDragLeave:zr.func,onDragOver:zr.func,onDrop:zr.func,onDropAccepted:zr.func,onDropRejected:zr.func,onError:zr.func,validator:zr.func};var hU={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Kme(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_a(_a({},Yme),e),n=t.accept,r=t.disabled,a=t.getFilesFromEvent,o=t.maxSize,i=t.minSize,l=t.multiple,s=t.maxFiles,c=t.onDragEnter,p=t.onDragLeave,f=t.onDragOver,g=t.onDrop,v=t.onDropAccepted,b=t.onDropRejected,y=t.onFileDialogCancel,x=t.onFileDialogOpen,E=t.useFsAccessApi,C=t.autoFocus,R=t.preventDropOnDocument,N=t.noClick,O=t.noKeyboard,P=t.noDrag,M=t.noDragEventsBubbling,L=t.onError,W=t.validator,G=w.useMemo(function(){return Art(n)},[n]),B=w.useMemo(function(){return Nrt(n)},[n]),j=w.useMemo(function(){return typeof x=="function"?x:Qme},[x]),q=w.useMemo(function(){return typeof y=="function"?y:Qme},[y]),Y=w.useRef(null),K=w.useRef(null),ae=w.useReducer(Yrt,hU),oe=fU(ae,2),te=oe[0],ee=oe[1],z=te.isFocused,re=te.isFileDialogActive,ce=w.useRef(typeof window<"u"&&window.isSecureContext&&E&&Ort()),$=function(){!ce.current&&re&&setTimeout(function(){if(K.current){var Se=K.current.files;Se.length||(ee({type:"closeDialog"}),q())}},300)};w.useEffect(function(){return window.addEventListener("focus",$,!1),function(){window.removeEventListener("focus",$,!1)}},[K,re,q,ce]);var de=w.useRef([]),be=function(Se){Y.current&&Y.current.contains(Se.target)||(Se.preventDefault(),de.current=[])};w.useEffect(function(){return R&&(document.addEventListener("dragover",Gme,!1),document.addEventListener("drop",be,!1)),function(){R&&(document.removeEventListener("dragover",Gme),document.removeEventListener("drop",be))}},[Y,R]),w.useEffect(function(){return!r&&C&&Y.current&&Y.current.focus(),function(){}},[Y,C,r]);var ue=w.useCallback(function(ve){L?L(ve):console.error(ve)},[L]),ke=w.useCallback(function(ve){ve.preventDefault(),ve.persist(),Ee(ve),de.current=[].concat(jrt(de.current),[ve.target]),tO(ve)&&Promise.resolve(a(ve)).then(function(Se){if(!(eO(ve)&&!M)){var _e=Se.length,Ae=_e>0&&krt({files:Se,accept:G,minSize:i,maxSize:o,multiple:l,maxFiles:s,validator:W}),Ue=_e>0&&!Ae;ee({isDragAccept:Ae,isDragReject:Ue,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ve)}}).catch(function(Se){return ue(Se)})},[a,c,ue,M,G,i,o,l,s,W]),Ce=w.useCallback(function(ve){ve.preventDefault(),ve.persist(),Ee(ve);var Se=tO(ve);if(Se&&ve.dataTransfer)try{ve.dataTransfer.dropEffect="copy"}catch{}return Se&&f&&f(ve),!1},[f,M]),he=w.useCallback(function(ve){ve.preventDefault(),ve.persist(),Ee(ve);var Se=de.current.filter(function(Ae){return Y.current&&Y.current.contains(Ae)}),_e=Se.indexOf(ve.target);_e!==-1&&Se.splice(_e,1),de.current=Se,!(Se.length>0)&&(ee({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),tO(ve)&&p&&p(ve))},[Y,p,M]),xe=w.useCallback(function(ve,Se){var _e=[],Ae=[];ve.forEach(function(Ue){var De=Ume(Ue,G),Ve=fU(De,2),Qe=Ve[0],bt=Ve[1],ut=zme(Ue,i,o),Yt=fU(ut,2),It=Yt[0],ye=Yt[1],Me=W?W(Ue):null;if(Qe&&It&&!Me)_e.push(Ue);else{var Xe=[bt,ye];Me&&(Xe=Xe.concat(Me)),Ae.push({file:Ue,errors:Xe.filter(function(At){return At})})}}),(!l&&_e.length>1||l&&s>=1&&_e.length>s)&&(_e.forEach(function(Ue){Ae.push({file:Ue,errors:[Crt]})}),_e.splice(0)),ee({acceptedFiles:_e,fileRejections:Ae,isDragReject:Ae.length>0,type:"setFiles"}),g&&g(_e,Ae,Se),Ae.length>0&&b&&b(Ae,Se),_e.length>0&&v&&v(_e,Se)},[ee,l,G,i,o,s,g,v,b,W]),Pe=w.useCallback(function(ve){ve.preventDefault(),ve.persist(),Ee(ve),de.current=[],tO(ve)&&Promise.resolve(a(ve)).then(function(Se){eO(ve)&&!M||xe(Se,ve)}).catch(function(Se){return ue(Se)}),ee({type:"reset"})},[a,xe,ue,M]),ie=w.useCallback(function(){if(ce.current){ee({type:"openDialog"}),j();var ve={multiple:l,types:B};window.showOpenFilePicker(ve).then(function(Se){return a(Se)}).then(function(Se){xe(Se,null),ee({type:"closeDialog"})}).catch(function(Se){Prt(Se)?(q(Se),ee({type:"closeDialog"})):Drt(Se)?(ce.current=!1,K.current?(K.current.value=null,K.current.click()):ue(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ue(Se)});return}K.current&&(ee({type:"openDialog"}),j(),K.current.value=null,K.current.click())},[ee,j,q,E,xe,ue,B,l]),tt=w.useCallback(function(ve){!Y.current||!Y.current.isEqualNode(ve.target)||(ve.key===" "||ve.key==="Enter"||ve.keyCode===32||ve.keyCode===13)&&(ve.preventDefault(),ie())},[Y,ie]),rt=w.useCallback(function(){ee({type:"focus"})},[]),lt=w.useCallback(function(){ee({type:"blur"})},[]),St=w.useCallback(function(){N||(Rrt()?setTimeout(ie,0):ie())},[N,ie]),st=function(Se){return r?null:Se},pe=function(Se){return O?null:st(Se)},fe=function(Se){return P?null:st(Se)},Ee=function(Se){M&&Se.stopPropagation()},qe=w.useMemo(function(){return function(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Se=ve.refKey,_e=Se===void 0?"ref":Se,Ae=ve.role,Ue=ve.onKeyDown,De=ve.onFocus,Ve=ve.onBlur,Qe=ve.onClick,bt=ve.onDragEnter,ut=ve.onDragOver,Yt=ve.onDragLeave,It=ve.onDrop,ye=nO(ve,Brt);return _a(_a(gU({onKeyDown:pe(Tu(Ue,tt)),onFocus:pe(Tu(De,rt)),onBlur:pe(Tu(Ve,lt)),onClick:st(Tu(Qe,St)),onDragEnter:fe(Tu(bt,ke)),onDragOver:fe(Tu(ut,Ce)),onDragLeave:fe(Tu(Yt,he)),onDrop:fe(Tu(It,Pe)),role:typeof Ae=="string"&&Ae!==""?Ae:"presentation"},_e,Y),!r&&!O?{tabIndex:0}:{}),ye)}},[Y,tt,rt,lt,St,ke,Ce,he,Pe,O,P,r]),Ke=w.useCallback(function(ve){ve.stopPropagation()},[]),ze=w.useMemo(function(){return function(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Se=ve.refKey,_e=Se===void 0?"ref":Se,Ae=ve.onChange,Ue=ve.onClick,De=nO(ve,Frt),Ve=gU({accept:G,multiple:l,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:st(Tu(Ae,Pe)),onClick:st(Tu(Ue,Ke)),tabIndex:-1},_e,K);return _a(_a({},Ve),De)}},[K,n,l,Pe,r]);return _a(_a({},te),{},{isFocused:z&&!r,getRootProps:qe,getInputProps:ze,rootRef:Y,inputRef:K,open:st(ie)})}function Yrt(e,t){switch(t.type){case"focus":return _a(_a({},e),{},{isFocused:!0});case"blur":return _a(_a({},e),{},{isFocused:!1});case"openDialog":return _a(_a({},hU),{},{isFileDialogActive:!0});case"closeDialog":return _a(_a({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return _a(_a({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return _a(_a({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return _a({},hU);default:return e}}function Qme(){}function Krt(e){const{t}=jn(),n=lT(),{onDrop:r}=e,a=w.useCallback(l=>{if(!l||l.length===0)return;const s=l[0],c=new FileReader;c.onload=()=>{const p=c.result;if(typeof p=="string"){const f={variant:"success",title:t("File uploaded"),timeout:!0};n.addAlert(f),r(p)}},c.onerror=()=>{const p={variant:"danger",title:t("Failed to upload file"),children:t("Unable to upload")};n.addAlert(p)},c.readAsText(s)},[t,n,r]),{getRootProps:o,getInputProps:i}=Kme({onDrop:a,noClick:!0,accept:e.accept??{"application/json":[".json"],"text/yaml":[".yaml",".yml"]}});return I.jsxs("div",{id:"code-editor-dropzone",...o({disabled:!0}),style:{width:"100%",height:"100%"},children:[I.jsx("input",{id:"code-editor-dropzone-input",...i(),ref:e.inputRef}),e.children]})}function Qrt(e){return I.jsx(Q.Icon,{size:e.size??"md",children:I.jsx(Ht.AngleDownIcon,{"data-cy":"expandable",style:{transform:e.isExpanded?"rotate(0deg)":e.direction==="left"?"rotate(90deg)":"rotate(-90deg)",transition:"transform 0.2s",alignSelf:"center"},onClick:()=>e.setExpanded(!e.isExpanded),"aria-label":e.isExpanded?AE("Collapse"):AE("Expand")})})}function Xrt(e,t,n="txt"){const r=new Blob(t.split("/n"),{type:"text/plain"}),a=document.createElement("a");a.href=URL.createObjectURL(r),a.download=e+"."+n,document.body.appendChild(a),a.click(),document.body.removeChild(a)}function zE(e){const{children:t,helperText:n,helperTextInvalid:r,isRequired:a,labelHelp:o,labelHelpTitle:i,label:l,fullWidth:s}=e;return I.jsxs(Q.FormGroup,{id:`${e.fieldId}-form-group`,fieldId:e.fieldId,label:I.jsxs(I.Fragment,{children:[e.icon,l]}),labelHelp:o?I.jsx(fS,{title:i,help:o}):void 0,labelInfo:e.additionalControls,isRequired:a,"data-cy":`${e.fieldId}-form-group`,style:{gridColumn:s?"span 12":void 0},children:[t,(n||r)&&I.jsx(Q.FormHelperText,{children:I.jsx(Q.HelperText,{children:I.jsx(Q.HelperTextItem,{variant:r?"error":void 0,children:r||n})})})]})}function Zrt(e){const{t}=jn(),{name:n,format:r,disableCopy:a,disableUpload:o,disableDownload:i,disableExpand:l,validate:s,isArray:c}=e,p=Cp(e),{formState:{isSubmitting:f,isValidating:g},setError:v,getValues:b,clearErrors:y,control:x}=xu(),C=Em().dataEditorFormat??"yaml",[R,N]=w.useState(C),[O,P]=w.useState(!e.defaultCollapsed),[M,L]=w.useState(()=>{const ue=b(n);return typeof ue=="string"?ue:xc(ue,C)}),[W,G]=w.useState(null),B=w.useCallback((ue,ke)=>{if(W){if(ke==="yaml")return W;if(ke==="json")try{return xc(Iu(W,c),"json")}catch{return xc(Iu(ue,c),ke)}}return xc(Iu(ue,c),ke)},[W,c]),j=lT(),{writeToClipboard:q}=BJ(),Y=w.useCallback(()=>q(xc(Iu(b(n),c),R)),[b,c,R,n,q]),K=w.useCallback(ue=>{L(xc(Iu(ue,c),R))},[c,R]),ae=w.useRef(null),oe=w.useCallback(()=>{var ue;return(ue=ae.current)==null?void 0:ue.click()},[]),te=w.useCallback(()=>{const ue=n||"data",ke=R==="json"?"json":"yaml";Xrt(ue,xc(Iu(b(n),c),R),ke),j.addAlert({variant:"success",title:t("File downloaded"),timeout:!0})},[j,b,c,R,n,t]);w.useLayoutEffect(()=>{const ue=b(n);typeof ue=="string"&&rO(ue)&&!W&&G(ue);const ke=B(ue,R);L(ke)},[b,c,R,n,B,W]);const[ee,z]=w.useState(!1),re=Tpe({name:n});w.useEffect(()=>{if(ee)return;typeof re=="string"&&rO(re)&&!W&&G(re);const ue=B(re,R);L(ue)},[ee,re,c,R,B,W]);const{setValue:ce,formState:{defaultValues:$}}=xu(),de=PE(e.label,e.isRequired),be=cy($,e.name);return I.jsx(oy,{name:n,control:x,shouldUnregister:!0,render:({field:{value:ue,name:ke,onChange:Ce},fieldState:{error:he}})=>{var Pe;function xe(ie){try{const tt=Iu(ie,c);switch(R==="yaml"&&rO(ie)&&G(ie),r){case"object":if(typeof tt=="object"&&tt!==null&&"__preserveYamlString"in tt){const rt=tt,lt=jE.load(rt.__preserveYamlString);Ce(lt);return}Ce(tt);return;case"yaml":if(typeof tt=="object"&&tt!==null&&"__preserveYamlString"in tt){Ce(tt.__preserveYamlString);return}Ce(xc(tt,r));break;default:Ce(xc(tt,r));break}y(ke)}catch(tt){tt instanceof Error&&v(ke,{message:tt.message})}}return I.jsxs(zE,{fieldId:p,icon:!l&&I.jsx(Qrt,{isExpanded:O,setExpanded:P}),label:e.label,labelHelpTitle:e.labelHelpTitle??e.label,labelHelp:e.labelHelp,additionalControls:I.jsx(Zme,{handleCopy:!a&&Y,handleUpload:!o&&oe,handleDownload:!i&&te,language:R,setLanguage:N,children:e.additionalControls}),helperText:e.helperText,helperTextInvalid:!(s&&g)&&((Pe=he==null?void 0:he.message)==null?void 0:Pe.split(`
546
546
  `)),isRequired:e.isRequired,children:[O&&I.jsxs("div",{style:{display:"flex"},children:[I.jsx(Krt,{onDrop:K,isDisabled:f||e.isReadOnly,inputRef:ae,children:I.jsx(Hnt,{"data-cy":p,id:p,name:ke,language:R,value:M,onChange:xe,setError:ie=>{ie?v(ke,{message:ie}):y(ke)},isReadOnly:e.isReadOnly||f,className:e.isReadOnly?"pf-v6-c-form-control pf-m-disabled":"pf-v6-c-form-control",onFocus:()=>z(!0),onBlur:()=>z(!1)})}),I.jsx(pu,{actions:[{label:t("Undo changes"),type:Nr.Button,selection:vr.None,onClick:()=>{ce(e.name,be),L(""),setTimeout(()=>{L(xc(Iu(be,c),R))},0)},isHidden:()=>!e.enableUndo||dfe(ue,be)},{label:t("Reset to default"),type:Nr.Button,selection:vr.None,onClick:()=>{ce(e.name,e.defaultValue),L(""),setTimeout(()=>{L(xc(Iu(e.defaultValue,c),R))},0)},isHidden:()=>!e.enableReset||dfe(ue,e.defaultValue)}],position:"right"})]}),!O&&I.jsx("div",{className:"pf-v6-c-form-control"})]})},rules:{required:de,validate:e.validate}})}function Xme(e){const{t}=jn(),{handleCopy:n,handleDownload:r,handleUpload:a}=e;return!n&&!r&&!a?I.jsx(I.Fragment,{}):I.jsxs(Q.Flex,{spaceItems:{default:"spaceItemsMd"},children:[n&&I.jsx(Q.FlexItem,{children:I.jsx(oT,{id:"copy-button","data-cy":"copy-button","aria-label":t("Copy to clipboard"),type:"button",onClick:n,children:I.jsx(Q.Icon,{size:"md",children:I.jsx(Ht.CopyIcon,{})})})}),a&&I.jsx(Q.FlexItem,{children:I.jsx(oT,{id:"upload-button","data-cy":"upload-button","aria-label":t("Upload from file"),type:"button",onClick:a,children:I.jsx(Q.Icon,{size:"md",children:I.jsx(Ht.UploadIcon,{})})})}),r&&I.jsx(Q.FlexItem,{children:I.jsx(oT,{id:"download-button","data-cy":"download-button","aria-label":t("Download file"),type:"button",onClick:r,children:I.jsx(Q.Icon,{size:"md",children:I.jsx(Ht.DownloadIcon,{})})})})]})}function Zme(e){const{t}=jn(),{handleCopy:n,handleDownload:r,handleUpload:a,language:o,setLanguage:i}=e;return I.jsxs(Q.Flex,{spaceItems:{default:"spaceItemsLg"},children:[I.jsx(Q.FlexItem,{children:e.children}),I.jsx(Xme,{handleCopy:n,handleDownload:r,handleUpload:a}),I.jsx(Q.FlexItem,{align:{default:"alignRight"},children:I.jsxs(Q.ToggleGroup,{isCompact:!0,children:[I.jsx(Q.ToggleGroupItem,{id:"toggle-yaml","data-cy":"toggle-yaml","aria-label":t("Toggle to YAML"),isSelected:o==="yaml",text:"YAML",type:"button",onChange:()=>i("yaml")}),I.jsx(Q.ToggleGroupItem,{id:"toggle-json","data-cy":"toggle-json","aria-label":t("Toggle to JSON"),isSelected:o==="json",text:"JSON",type:"button",onChange:()=>i("json")})]})})]})}function rO(e){return e.split(`
547
- `).some(n=>{const r=n.trim();return r.startsWith("#")||r.includes("#")&&!/^[^#]*["'][^"']*#[^"']*["'][^#]*$/.exec(r)})}function Iu(e,t){const n=t?[]:{};if(e==null)return n;const a=()=>{try{e=jE.load(e)}catch(o){return o instanceof Error||o instanceof nU?new Error(o.message):{}}};if(typeof e=="string"){if(rO(e))try{return jE.load(e),{__preserveYamlString:e}}catch{}try{e=JSON.parse(e)}catch{a()}}return t?Array.isArray(e)?e:[]:Array.isArray(e)?{}:e}function xc(e,t){if(e==null)return"";if(e instanceof Error)return e.message;if(typeof e=="object"&&e!==null&&"__preserveYamlString"in e){const n=e;if(t==="yaml")return n.__preserveYamlString;try{const r=jE.load(n.__preserveYamlString);return JSON.stringify(r,null,2)}catch{return n.__preserveYamlString}}switch(t){case"json":return JSON.stringify(e,null,2);case"yaml":try{const n=jE.dump(e).trimEnd();switch(n){case"null":case"{}":case"[]":return"";default:return n}}catch(n){return n instanceof Error||n instanceof nU?n.message:""}default:return""}}function Jrt(e){const{additionalControls:t,footer:n,helperText:r,isDisabled:a,isReadOnly:o,isRequired:i,label:l,labelHelp:s,labelHelpTitle:c,name:p,options:f,placeholderText:g,validate:v}=e,b=Cp(e),{t:y}=jn(),{control:x,setValue:E,getValues:C,formState:{isSubmitting:R,isValidating:N,defaultValues:O}}=xu(),[P,M]=w.useState(!1),L=w.useCallback(()=>M(!P),[P]),[W]=Na(),G=PE(e.label,e.isRequired),B=cy(O,e.name);w.useEffect(()=>{C(e.name)||f.length===1&&i&&E(e.name,f[0].value)},[C,i,f,e.name,E]);const j=(q,Y)=>I.jsx(Q.MenuToggle,{"data-cy":`${b}-form-group`,id:`${b}-form-group-toggle`,isDisabled:a||o||R,ref:q,onClick:L,isExpanded:P,isFullWidth:!0,children:Y??g});return I.jsx(oy,{name:p,control:x,defaultValue:e.defaultValue,shouldUnregister:!0,render:({field:{onChange:q,value:Y},fieldState:{error:K}})=>{const ae=(ee,z)=>{const re=f.find(ce=>ce.value===z);re&&(q(re.value),e.onChange&&e.onChange(re.value)),M(!1)},oe=K!=null&&K.message?v&&N?W.validating:K==null?void 0:K.message:void 0,te=f.find(ee=>ee.value===Y);return I.jsx(zE,{fieldId:b,label:l,labelHelpTitle:c??l,labelHelp:s,additionalControls:t,helperText:r,helperTextInvalid:oe,isRequired:i,children:I.jsxs("div",{style:{display:"flex"},children:[I.jsx(Q.Select,{"aria-describedby":`${b}-form-group-select`,"data-cy":b,id:b,isOpen:P,itemID:b,onOpenChange:ee=>M(ee),onSelect:ae,ouiaId:"menu-select",shouldFocusToggleOnSelect:!0,toggle:ee=>j(ee,te==null?void 0:te.label),isScrollable:!0,popperProps:{enableFlip:!0,preventOverflow:!0},children:I.jsxs(I.Fragment,{children:[I.jsx(Q.SelectList,{children:f.map(ee=>{const z=ad(ee);return I.jsx(Q.SelectOption,{id:z,value:ee.value,label:ee.label,description:ee.description,"data-cy":z,children:ee.label},ee.label)})}),n&&I.jsx(Q.MenuFooter,{children:n})]})}),I.jsx(pu,{actions:[{label:y("Undo changes"),type:Nr.Button,selection:vr.None,onClick:()=>{E(e.name,B)},isHidden:()=>!e.enableUndo||Y===B},{label:y("Reset to default"),type:Nr.Button,selection:vr.None,onClick:()=>{E(e.name,e.defaultValue)},isHidden:()=>!e.enableReset||Y===e.defaultValue}],variant:Q.ButtonVariant.control,position:"right"})]})})},rules:{required:G,validate:v}})}function $rt(e){const{name:t,helperText:n,validate:r,additionalControls:a,label:o,labelHelp:i,labelHelpTitle:l,labelOn:s}=e,{control:c,formState:{isSubmitting:p,isValidating:f}}=xu(),g=Cp(e);return I.jsx(oy,{name:t,control:c,shouldUnregister:!0,render:({field:{onChange:v,value:b},fieldState:{error:y}})=>{const x=r&&f||y==null?void 0:y.message;return I.jsx(zE,{fieldId:g,"data-cy":g+"-form-group",label:o,labelHelpTitle:l??o,labelHelp:i,helperText:n,helperTextInvalid:x,additionalControls:a,children:I.jsx(Q.Switch,{"data-cy":g+"-toggle","aria-label":o,isChecked:b,onChange:E=>v(E),isDisabled:p,label:s})})}})}function eat(e){const{type:t,name:n,label:r,labelHelpTitle:a,labelHelp:o,additionalControls:i,placeholder:l,button:s,helperText:c,isDisabled:p,isReadOnly:f,isRequired:g,validate:v,minLength:b,maxLength:y,min:x,max:E,pattern:C,selectTitle:R,selectOpen:N,selectValue:O,autoFocus:P,autoComplete:M,disableAutoResize:L}=e,W=Cp(e),{control:G,setValue:B,formState:{isSubmitting:j,isValidating:q}}=xu(),[Y,K]=w.useState(!1),[ae]=Na(),oe=PE(e.label,e.isRequired);return I.jsx(oy,{name:n,control:G,shouldUnregister:!0,render:({field:{onChange:te,value:ee,name:z},fieldState:{error:re}})=>{const ce=re!=null&&re.message?v&&q?ae.validating:re==null?void 0:re.message:void 0;function $(de){te(de.trimStart())}return I.jsx(zE,{fieldId:W,label:r,labelHelpTitle:a??r,labelHelp:o,additionalControls:i,helperText:c,helperTextInvalid:ce,isRequired:g,fullWidth:!0,children:I.jsxs(Q.InputGroup,{children:[I.jsx(Q.InputGroupItem,{isFill:!0,children:I.jsx(Q.TextArea,{id:W,placeholder:l,onChange:(de,be)=>$(be),value:ee??"","aria-describedby":W?`${W}-form-group`:void 0,validated:ce?"error":void 0,type:t==="password"?Y?"text":"password":t,readOnlyVariant:f?"default":void 0,isDisabled:p,autoFocus:P,autoComplete:M||(t==="password"?"new-password":"off"),"data-cy":W,autoResize:L===void 0?!0:!L,rows:1,resizeOrientation:"vertical"})}),t==="password"&&I.jsx(Q.Button,{variant:"control",onClick:()=>K(!Y),isDisabled:p||f,children:Y?I.jsx(Ht.EyeIcon,{}):I.jsx(Ht.EyeSlashIcon,{})}),R&&I.jsx(Q.Button,{icon:I.jsx(Ht.SearchIcon,{}),ouiaId:`lookup-${z}-button`,variant:"control",onClick:()=>N==null?void 0:N(de=>{if(O){const be=O(de);B(z,be,{shouldValidate:!0})}},R),"aria-label":"Options menu",isDisabled:p||j}),s]})})},rules:{required:oe,validate:v,minLength:typeof r=="string"&&typeof b=="number"?{value:b,message:`${Cu(r.toLocaleLowerCase())} must be at least ${b} characters.`}:b,maxLength:typeof r=="string"&&typeof y=="number"?{value:y,message:`${Cu(r.toLocaleLowerCase())} cannot be greater than ${y} characters.`}:y,min:typeof r=="string"&&(typeof x=="number"||typeof x=="string")?{value:x,message:`${Cu(r.toLocaleLowerCase())} must be less than ${x}.`}:b,max:typeof r=="string"&&(typeof E=="number"||typeof E=="string")?{value:E,message:`${Cu(r.toLocaleLowerCase())} cannot be greater than ${E}.`}:b,pattern:C}})}function tat(e){const{type:t,name:n,label:r,labelHelpTitle:a,labelHelp:o,additionalControls:i,placeholder:l,button:s,helperText:c,isDisabled:p,isReadOnly:f,isRequired:g,validate:v,minLength:b,maxLength:y,min:x,max:E,pattern:C,selectTitle:R,selectOpen:N,selectValue:O,autoFocus:P,autoComplete:M,fullWidth:L}=e,W=Cp(e),{t:G}=jn(),{control:B,setValue:j,formState:{isSubmitting:q,isValidating:Y,defaultValues:K}}=xu(),[ae,oe]=w.useState(!1),[te]=Na(),ee=PE(e.label,e.isRequired),z=cy(K,e.name);return I.jsx(oy,{name:n,control:B,shouldUnregister:e.shouldUnregister!==!1,defaultValue:e.defaultValue,render:({field:{onChange:re,value:ce,name:$},fieldState:{error:de}})=>{const be=de!=null&&de.message?v&&Y?te.validating:de==null?void 0:de.message:void 0;let ue=ce;switch(t){case"datetime-local":if(ce){const Ce=new Date(ce);ue=new Date(Ce.getTime()-Ce.getTimezoneOffset()*6e4).toISOString().slice(0,16)}break}function ke(Ce){switch(e.type){case"datetime-local":{re(new Date(Ce).toISOString());break}case"number":{let he=Number(Ce);if(Ce===""||isNaN(he)){j($,null),re(null);return}E!==void 0&&he>Number(E)&&(he=Number(E)),x!==void 0&&he<Number(x)&&(he=Number(x)),j($,he),re(he);break}default:re(Ce.trimStart())}}return I.jsx(zE,{fieldId:W,label:r,labelHelpTitle:a??r,labelHelp:o,additionalControls:i,helperText:c,helperTextInvalid:be,isRequired:g,fullWidth:L,children:I.jsxs(Q.InputGroup,{children:[I.jsx(Q.InputGroupItem,{isFill:!0,children:I.jsx(Q.TextInput,{id:W,placeholder:l,onChange:(Ce,he)=>ke(he),value:ue??"","aria-describedby":W?`${W}-form-group`:void 0,validated:be?"error":void 0,type:t==="password"?ae?"text":"password":t,readOnlyVariant:f?"default":void 0,isDisabled:p,autoFocus:P,autoComplete:M||(t==="password"?"new-password":"off"),"data-cy":W})}),t==="password"&&I.jsx(Q.Button,{variant:"control",onClick:()=>oe(!ae),isDisabled:p||f,children:ae?I.jsx(Ht.EyeIcon,{}):I.jsx(Ht.EyeSlashIcon,{})}),R&&I.jsx(Q.Button,{icon:I.jsx(Ht.SearchIcon,{"data-cy":"lookup-button"}),ouiaId:`lookup-${$}-button`,variant:"control",onClick:()=>N==null?void 0:N(Ce=>{if(O){const he=O(Ce);j($,he,{shouldValidate:!0})}},R),"aria-label":"Options menu",isDisabled:p||q}),s,I.jsx(pu,{actions:[{label:G("Undo changes"),type:Nr.Button,selection:vr.None,onClick:()=>{j(e.name,z)},isHidden:()=>!e.enableUndo||ce===z},{label:G("Reset to default"),type:Nr.Button,selection:vr.None,onClick:()=>{j(e.name,e.defaultValue)},isHidden:()=>!e.enableReset||ce===e.defaultValue}],variant:Q.ButtonVariant.control,position:"right"})]})})},rules:{required:ee,validate:v,minLength:typeof r=="string"&&typeof b=="number"?{value:b,message:`${Cu(r.toLocaleLowerCase())} must be at least ${b} characters.`}:b,maxLength:typeof r=="string"&&typeof y=="number"?{value:y,message:`${Cu(r.toLocaleLowerCase())} cannot be greater than ${y} characters.`}:y,min:typeof r=="string"&&(typeof x=="number"||typeof x=="string")?{value:x,message:`${Cu(r.toLocaleLowerCase())} must be greater or equal to ${x}.`}:b,max:typeof r=="string"&&(typeof E=="number"||typeof E=="string")?{value:E,message:`${Cu(r.toLocaleLowerCase())} cannot be greater than ${E}.`}:E,pattern:C}})}const Jme=w.createContext({tabBreadcrumb:{},setTabBreadcrumb:()=>{}});function nat(e){const[t,n]=w.useState();return I.jsx(Jme.Provider,{value:{tabBreadcrumb:t,setTabBreadcrumb:n},children:e.children})}const rat=()=>w.useContext(Jme);function aat(e){return I.jsx(kZ,{children:I.jsx(kee,{defaultRefreshInterval:e.defaultRefreshInterval,children:I.jsx(MMe,{children:I.jsx(npe,{children:I.jsx(TJ,{children:I.jsx(RJ,{children:I.jsx(nat,{children:e.children})})})})})})})}function oat(e){const t=fa.useNavigate();return e.breadcrumbs?I.jsx(Q.Breadcrumb,{style:e.style,children:e.breadcrumbs.map((n,r)=>n.label?I.jsx(Q.BreadcrumbItem,{"data-cy":n.label,id:n.id,component:n.component,isActive:n.to===void 0,children:n.to?I.jsx("a",{href:n.to,"data-cy":n.label,onClick:a=>{a.preventDefault(),n.to&&t(n.to)},children:n.label}):n.label},r):I.jsx(w.Fragment,{},r))}):I.jsx(w.Fragment,{})}function iat(e){const{title:t,description:n,controls:r,headerActions:a,footer:o}=e,i=Fl("lg"),l=Fl("xl"),s=Fl("md"),[c]=Na(),{tabBreadcrumb:p}=rat(),f=w.useMemo(()=>{const g=[];return e.breadcrumbs&&(g.push(...e.breadcrumbs),p&&g.push(p)),g},[e.breadcrumbs,p]);return I.jsx(Q.PageSection,{hasBodyWrapper:!1,style:{paddingBlock:l?16:12},children:I.jsxs(Q.Stack,{hasGutter:!0,children:[I.jsxs(Q.Flex,{flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsStretch"},children:[I.jsxs(Q.FlexItem,{grow:{default:"grow"},children:[f.length>0&&I.jsx(oat,{breadcrumbs:f!=null&&f.length?f:void 0,style:{paddingBottom:i?6:4}}),t?e.titleHelp?I.jsx(Q.Popover,{headerContent:e.titleHelpTitle??e.title,bodyContent:I.jsxs(Q.Stack,{hasGutter:!0,children:[typeof e.titleHelp=="string"?I.jsx(Q.StackItem,{children:e.titleHelp}):e.titleHelp.map((g,v)=>I.jsx(Q.StackItem,{children:g},v)),e.titleDocLink&&I.jsx(Q.StackItem,{children:I.jsx(Q.Button,{icon:I.jsx(Ht.ExternalLinkAltIcon,{}),variant:"link",onClick:()=>window.open(e.titleDocLink,"_blank"),isInline:!0,iconPosition:"end",children:c.documentation})})]}),position:"bottom-start",children:I.jsxs(Q.Title,{"data-testid":"page-title","data-cy":"page-title",headingLevel:"h1",children:[t,I.jsx(Q.Button,{icon:I.jsx(Ht.OutlinedQuestionCircleIcon,{}),variant:"link",style:{padding:0,marginTop:1,marginLeft:8,verticalAlign:"top"}})]})}):I.jsx(Q.Title,{"data-cy":"page-title",headingLevel:"h1",children:t}):null,s&&n&&I.jsx("div",{"data-cy":"app-description",style:{paddingTop:l?4:2,opacity:.8},children:n})]}),t&&(a||r)&&I.jsxs(Q.Flex,{"data-cy":"manage-view",direction:{default:"column"},spaceItems:{default:"spaceItemsSm",xl:"spaceItemsMd"},justifyContent:{default:"justifyContentCenter"},children:[r&&I.jsx(Q.FlexItem,{grow:{default:"grow"},children:r}),a&&I.jsx(Q.FlexItem,{children:a})]})]}),o]})})}function $me(e){const[t]=Na();return I.jsx(LJ,{message:t.errorText,children:e.children})}function lat(e){return I.jsxs(Q.Masthead,{display:{default:"inline"},children:[I.jsxs(Q.MastheadMain,{children:[I.jsx(ege,{}),I.jsx(Q.MastheadBrand,{children:I.jsx(Q.MastheadLogo,{component:t=>I.jsx(fa.Link,{...t,to:"/",style:{textDecoration:"none",color:"light-dark(black, white)"}}),children:e.brand})})]}),I.jsx(Q.MastheadContent,{style:{marginLeft:0,minHeight:0},children:I.jsx(Q.Toolbar,{id:"toolbar","data-cy":"toolbar",inset:{default:"insetNone"},style:{padding:0},children:I.jsx(Q.ToolbarContent,{children:e.children})})})]})}function ege(){const e=cT();return I.jsx(Q.MastheadToggle,{onClick:()=>e.setState({isOpen:!e.isOpen}),children:I.jsx(Q.PageToggleButton,{isHamburgerButton:!0,"data-cy":"nav-toggle",variant:"plain","aria-label":"Global navigation"})})}function sat(){const{setNotificationsDrawerOpen:e,notificationGroups:t}=s_(),{isNotificationRead:n}=pT(),r=Object.values(t).reduce((a,o)=>{const i=o.notifications.filter(l=>typeof l.id!="string"?!1:!n(l.id));return a+i.length},0);return I.jsx(Q.NotificationBadge,{"data-cy":"notification-badge",variant:r===0?"read":"unread",count:r,onClick:()=>e(a=>!a)})}function cat(){const[e,t]=w.useContext(vv);return e.activeTheme==="dark"?I.jsx(Q.Button,{icon:I.jsx(Ht.MoonIcon,{}),"data-cy":"settings-icon",variant:"plain",onClick:()=>t({...e,theme:"light"})}):I.jsx(Q.Button,{icon:I.jsx(Ht.SunIcon,{}),"data-cy":"theme-icon",variant:"plain",onClick:()=>t({...e,theme:"dark"})})}function dat(e){return e.replace(/^\//,"")}function tge(e,t){for(const n of e){if("id"in n&&n.id===t)return n;if("children"in n){const r=tge(n.children,t);if(r)return r}}}function nge(e,t){for(let n=0;n<e.length;n++){const r=e[n];if("id"in r&&r.id===t)return e.splice(n,1),r;if("children"in r){const a=nge(r.children,t);if(a)return a}}}function rge(e,t,n){for(const r of e)if("id"in r&&r.id===t){const a=r;"children"in r||(a.children=[]),a.children.push(n);return}else"children"in r&&rge(r.children,t,n)}function age(e,t,n){for(let r=0;r<e.length;r++){const a=e[r];if("id"in a&&a.id===t){e.splice(r+1,0,n);return}else"children"in a&&age(a.children,t,n)}}function oge(e,t,n){for(let r=0;r<e.length;r++){const a=e[r];if("id"in a&&a.id===t){e.splice(r,0,n);return}else"children"in a&&oge(a.children,t,n)}}function ige(){const e=PMe();return w.useCallback((t,n)=>{let r=e[t]??"";const a=n==null?void 0:n.params,o=n==null?void 0:n.query;return r&&(a&&(r=Object.keys(a).reduce((i,l)=>{let s=a[l];if(s==null)return i;s=encodeURIComponent(s.toString());const c=":"+l,p=new RegExp(c+"(?!.*"+c+")","g");return i.replace(p,s)},r)),o&&(r=`${r}?${Object.keys(o).map(i=>{let l=o[i];return l===void 0?"":(l=encodeURIComponent(l.toString()),`${i}=${l}`)}).join("&").replace("/&&/g","&")}`)),r},[e])}function uat(){const e=fa.useNavigate(),t=ige();return w.useCallback((n,r)=>{const a=t(n,r);a&&e(a)},[e,t])}function pat(e){const{loading:t}=e,[n,r]=w.useState((e==null?void 0:e.initialTabIndex)??0),a=w.useCallback((s,c)=>r(c),[r]),o=w.Children.toArray(e.children),i=o.map((s,c)=>{if(w.isValidElement(s)&&s.type===bU){const p=s.props.label;return I.jsx(Q.Tab,{title:p||I.jsx(Q.Skeleton,{width:"60px"}),eventKey:c},p??c)}return s}),l=o[n];return t?I.jsx(Q.Tabs,{children:I.jsx(bU,{children:I.jsx(Q.PageSection,{hasBodyWrapper:!1,children:I.jsx(Q.Skeleton,{})})})}):I.jsxs(I.Fragment,{children:[I.jsx(Q.Tabs,{activeKey:n,onSelect:a,inset:{default:"insetSm"},className:"pf-v6-u-mb-md",children:i}),l]})}function bU(e){return I.jsx(I.Fragment,{children:e.children})}function fat(e,t,n,r){return(a,o)=>{e(i=>{r?r(i):a(i.map(l=>t(l)))},o?o.map(i=>n(i)):[])}}function mat(e,t,n,r){return(a,o)=>{e(i=>{r?r(i):a(t(i))},o?n(o):void 0)}}function gat(){const[e,t]=w.useState(!0);return w.useEffect(()=>()=>{t(!1)},[]),e}function vat(){const e=w.useRef({isMounted:!0});return w.useEffect(()=>()=>{e.current.isMounted=!1},[]),e}function lge(){const e=gat(),[t,n]=w.useState(e?window.location:void 0),r=w.useCallback(()=>{n(window.location)},[]);w.useEffect(()=>{if(e)return t||r(),window.addEventListener("popstate",r),()=>{window.removeEventListener("popstate",r)}},[e,t,r]);const a=w.useCallback(i=>{window.history.pushState(null,"",i),r()},[r]),o=w.useCallback(i=>{window.history.replaceState(null,"",i),r()},[r]);return{location:t,push:a,update:o}}function sge(){var a,o;const e=lge(),t=((a=e.location)==null?void 0:a.pathname)||"/",n=w.useMemo(()=>{var l;let i=(l=e.location)==null?void 0:l.search;return i&&i.includes("?specPath=")?i=i.substring(0,i.indexOf("?specPath=")):i&&i.includes("&specPath=")&&(i=i.substring(0,i.indexOf("&specPath="))),new URLSearchParams(i??"/")},[(o=e.location)==null?void 0:o.search]),r=w.useCallback(i=>{const l=i.toString();l?e.update("?"+l):e.update(t)},[e,t]);return[n,r]}const cge=w.createContext({});function Xv(){return w.useContext(cge)}function hat(e,t){return!e.hidden||!e.hidden(t)?e:null}function Zp(e){return(e==null?void 0:e.substeps)!==void 0}function bat(e){const{steps:t,onSubmit:n}=e,[r,a]=w.useState(!1),[o,i]=w.useState(null),[l,s]=w.useState({}),[c,p]=w.useState(e.stepDefaults??{}),[f,g]=w.useState({}),[v,b]=w.useState(),[y,x]=w.useState(!1),[E,C]=sge(),R=w.useMemo(()=>_at(t),[t]);w.useEffect(()=>{if(process.env.NODE_ENV==="development")for(const M in e.stepDefaults)t.find(L=>L.id===M)||console.warn(`PageWizardProvider: defaultValue key '${M}' not found in steps.`)},[e.stepDefaults,t]),w.useEffect(()=>{const M=aO(t,l);o||!M.length||(M[0].substeps?i(M[0].substeps[0]):i(M[0]))},[o,t,l]);const N=w.useCallback(async(M={})=>{var j;const L=dge(t,{...l,...M});if(o===null)return Promise.resolve();if(!Zp(o)&&o.validate&&await o.validate(M,l),(o==null?void 0:o.id)===((j=L[L.length-1])==null?void 0:j.id)){x(!0);try{await n(l)}catch(q){b(q instanceof Error?q:new Error(AE("An error occurred.")))}finally{x(!1)}return}const G=L.findIndex(q=>q.id===(o==null?void 0:o.id)),B=Zp(L[G+1])?L[G+2]:L[G+1];return C(new URLSearchParams("")),s(q=>({...q,...M})),p(q=>({...q,[o==null?void 0:o.id]:M})),i(B),Promise.resolve()},[o,t,n,C,l,b]),O=w.useCallback(()=>{const M=aO(R,l),L=M.findIndex(G=>G.id===(o==null?void 0:o.id)),W=Zp(M[L-1])?M[L-2]:M[L-1];C(new URLSearchParams("")),i(W)},[o==null?void 0:o.id,R,C,l]),P=w.useMemo(()=>({wizardData:l,setWizardData:s,stepData:c,setStepData:p,steps:e.steps,visibleSteps:aO(t,l),visibleStepsFlattened:dge(t,l),activeStep:o,setActiveStep:i,stepError:f,setStepError:g,submitError:v,setSubmitError:b,isToggleExpanded:r,setToggleExpanded:a,onNext:N,onBack:O,isSubmitting:y}),[l,s,c,p,e.steps,t,o,i,f,g,v,b,r,a,N,O,y]);return I.jsx(cge.Provider,{value:P,children:e.children})}function _at(e){return e.reduce((t,n)=>(t.push(n),Zp(n)&&t.push(...n.substeps),t),[])}function aO(e,t){return e.filter(n=>hat(n,t))}function dge(e,t){return aO(e,t).reduce((r,a)=>(r.push(a),Zp(a)&&r.push(...a.substeps),r),[])}function uge(e){const{t}=jn(),{activeStep:n,visibleStepsFlattened:r,setSubmitError:a}=Xv(),o=(n==null?void 0:n.id)===r[r.length-1].id,i=t(o?"Finish":"Next"),l=Zp(r[0])?(n==null?void 0:n.id)===r[1].id:(n==null?void 0:n.id)===r[0].id,s=l?"pf-v6-c-button pf-m-disabled":"pf-v6-c-button pf-m-secondary";return I.jsx("footer",{className:"pf-v6-c-wizard__footer","data-cy":"wizard-footer",children:I.jsxs(Q.ActionList,{children:[I.jsxs(Q.ActionListGroup,{children:[I.jsx(Q.ActionListItem,{children:n!==null&&"inputs"in n?I.jsx(Mj,{style:{minWidth:10},children:i}):I.jsx("button",{"data-cy":"wizard-next",className:"pf-v6-c-button pf-m-primary",type:"submit",onClick:()=>{var c;a(void 0),(c=e.onNext)==null||c.call(e)},children:i})}),I.jsx(Q.ActionListItem,{children:I.jsx("button",{type:"button","data-cy":"wizard-back",className:s,disabled:l,onClick:()=>{var c;a(void 0),(c=e.onBack)==null||c.call(e)},children:t("Back")})})]}),I.jsx(Q.ActionListItem,{children:I.jsx("div",{"data-cy":"wizard-cancel",className:"pf-v6-c-wizard__footer-cancel",children:I.jsx("button",{className:"pf-v6-c-button pf-m-link",type:"button",onClick:e.onCancel,children:t("Cancel")})})})]})})}function yat({onCancel:e,disableGrid:t,errorAdapter:n,isVertical:r,singleColumn:a}){const o=fa.useNavigate(),{activeStep:i,stepData:l,onNext:s,onBack:c,submitError:p,isSubmitting:f}=Xv(),g=w.useCallback(()=>{e?e():o(-1)},[o,e]);return f?I.jsx(Q.Bullseye,{children:I.jsx(Q.Spinner,{})}):I.jsxs($me,{children:[I.jsx(Sat,{error:p}),i!==null&&("inputs"in i?I.jsxs(Vpe,{onSubmit:s,footer:I.jsx(uge,{onBack:c,onCancel:g}),defaultValue:l[i.id],errorAdapter:n,disableGrid:t,isVertical:r,singleColumn:a,isWizard:!0,children:[I.jsx(xat,{}),i.inputs]},i.id):I.jsxs("div",{"data-cy":`wizard-section-${i.id}`,style:{display:"flex",flexDirection:"column",flexGrow:1,overflow:"hidden"},children:[I.jsx(Q.PageSection,{hasBodyWrapper:!1,"aria-label":AE("Wizard step content"),hasOverflowScroll:!0,isFilled:!0,children:i==null?void 0:i.element}),I.jsx(uge,{onNext:()=>void s({}),onBack:c,onCancel:g})]}))]})}function xat(){const{activeStep:e,setStepError:t}=Xv(),{errors:n}=Ij(),r=JSON.stringify(n);return w.useEffect(()=>{Object.keys(n).length===0?t({}):e&&t({[e.id]:n})},[n,e,t,r]),null}function Sat(e){const{t}=jn(),n=e.error;if(!e.error)return null;if(!(e.error instanceof Error))return typeof e.error=="string"?I.jsx(Q.Alert,{variant:"danger",title:e.error}):I.jsx(Q.Alert,{variant:"danger",title:t("An error occurred.")});if("message"in e.error&&!n.json)return I.jsx(Q.Alert,{variant:"danger",title:e.error.message});if(n.json)return I.jsx(Q.Alert,{variant:"danger",title:n.message,isInline:!0,children:Object.values(n.json).map((r,a)=>I.jsx("div",{children:r},a))})}function Ru(...e){const t=[],n={}.hasOwnProperty;return e.filter(Boolean).forEach(r=>{const a=typeof r;if(a==="string"||a==="number")t.push(r);else if(Array.isArray(r)&&r.length){const o=Ru(...r);o&&t.push(o)}else if(a==="object")for(const o in r)n.call(r,o)&&r[o]&&t.push(o)}),t.join(" ")}const Jp={wizardClose:"pf-v6-c-wizard__close",wizardHeader:"pf-v6-c-wizard__header",wizardTitle:"pf-v6-c-wizard__title",wizardTitleText:"pf-v6-c-wizard__title-text",wizardToggle:"pf-v6-c-wizard__toggle",wizardToggleIcon:"pf-v6-c-wizard__toggle-icon",wizardToggleList:"pf-v6-c-wizard__toggle-list",wizardToggleListItem:"pf-v6-c-wizard__toggle-list-item",wizardToggleNum:"pf-v6-c-wizard__toggle-num"},Eat=Cn.div`
547
+ `).some(n=>{const r=n.trim();return r.startsWith("#")||r.includes("#")&&!/^[^#]*["'][^"']*#[^"']*["'][^#]*$/.exec(r)})}function Iu(e,t){const n=t?[]:{};if(e==null)return n;const a=()=>{try{e=jE.load(e)}catch(o){return o instanceof Error||o instanceof nU?new Error(o.message):{}}};if(typeof e=="string"){if(rO(e))try{return jE.load(e),{__preserveYamlString:e}}catch{}try{e=JSON.parse(e)}catch{a()}}return t?Array.isArray(e)?e:[]:Array.isArray(e)?{}:e}function xc(e,t){if(e==null)return"";if(e instanceof Error)return e.message;if(typeof e=="object"&&e!==null&&"__preserveYamlString"in e){const n=e;if(t==="yaml")return n.__preserveYamlString;try{const r=jE.load(n.__preserveYamlString);return JSON.stringify(r,null,2)}catch{return n.__preserveYamlString}}switch(t){case"json":return JSON.stringify(e,null,2);case"yaml":try{const n=jE.dump(e).trimEnd();switch(n){case"null":case"{}":case"[]":return"";default:return n}}catch(n){return n instanceof Error||n instanceof nU?n.message:""}default:return""}}function Jrt(e){const{additionalControls:t,footer:n,helperText:r,isDisabled:a,isReadOnly:o,isRequired:i,label:l,labelHelp:s,labelHelpTitle:c,name:p,options:f,placeholderText:g,validate:v}=e,b=Cp(e),{t:y}=jn(),{control:x,setValue:E,getValues:C,formState:{isSubmitting:R,isValidating:N,defaultValues:O}}=xu(),[P,M]=w.useState(!1),L=w.useCallback(()=>M(!P),[P]),[W]=Na(),G=PE(e.label,e.isRequired),B=cy(O,e.name);w.useEffect(()=>{C(e.name)||f.length===1&&i&&E(e.name,f[0].value)},[C,i,f,e.name,E]);const j=(q,Y)=>I.jsx(Q.MenuToggle,{"data-cy":`${b}-form-group`,id:`${b}-form-group-toggle`,isDisabled:a||o||R,ref:q,onClick:L,isExpanded:P,isFullWidth:!0,children:Y??g});return I.jsx(oy,{name:p,control:x,defaultValue:e.defaultValue,shouldUnregister:!0,render:({field:{onChange:q,value:Y},fieldState:{error:K}})=>{const ae=(ee,z)=>{const re=f.find(ce=>ce.value===z);re&&(q(re.value),e.onChange&&e.onChange(re.value)),M(!1)},oe=K!=null&&K.message?v&&N?W.validating:K==null?void 0:K.message:void 0,te=f.find(ee=>ee.value===Y);return I.jsx(zE,{fieldId:b,label:l,labelHelpTitle:c??l,labelHelp:s,additionalControls:t,helperText:r,helperTextInvalid:oe,isRequired:i,children:I.jsxs("div",{style:{display:"flex"},children:[I.jsx(Q.Select,{"aria-describedby":`${b}-form-group-select`,"data-cy":b,id:b,isOpen:P,itemID:b,onOpenChange:ee=>M(ee),onSelect:ae,ouiaId:"menu-select",shouldFocusToggleOnSelect:!0,toggle:ee=>j(ee,te==null?void 0:te.label),isScrollable:!0,popperProps:{enableFlip:!0,preventOverflow:!0},children:I.jsxs(I.Fragment,{children:[I.jsx(Q.SelectList,{children:f.map(ee=>{const z=ad(ee);return I.jsx(Q.SelectOption,{id:z,value:ee.value,label:ee.label,description:ee.description,"data-cy":z,children:ee.label},ee.label)})}),n&&I.jsx(Q.MenuFooter,{children:n})]})}),I.jsx(pu,{actions:[{label:y("Undo changes"),type:Nr.Button,selection:vr.None,onClick:()=>{E(e.name,B)},isHidden:()=>!e.enableUndo||Y===B},{label:y("Reset to default"),type:Nr.Button,selection:vr.None,onClick:()=>{E(e.name,e.defaultValue)},isHidden:()=>!e.enableReset||Y===e.defaultValue}],variant:Q.ButtonVariant.control,position:"right"})]})})},rules:{required:G,validate:v}})}function $rt(e){const{name:t,helperText:n,validate:r,additionalControls:a,label:o,labelHelp:i,labelHelpTitle:l,labelOn:s}=e,{control:c,formState:{isSubmitting:p,isValidating:f}}=xu(),g=Cp(e);return I.jsx(oy,{name:t,control:c,shouldUnregister:!0,render:({field:{onChange:v,value:b},fieldState:{error:y}})=>{const x=r&&f||y==null?void 0:y.message;return I.jsx(zE,{fieldId:g,"data-cy":g+"-form-group",label:o,labelHelpTitle:l??o,labelHelp:i,helperText:n,helperTextInvalid:x,additionalControls:a,children:I.jsx(Q.Switch,{"data-cy":g+"-toggle","data-testid":g+"-toggle","aria-label":o,isChecked:b,onChange:E=>v(E),isDisabled:p,label:s})})}})}function eat(e){const{type:t,name:n,label:r,labelHelpTitle:a,labelHelp:o,additionalControls:i,placeholder:l,button:s,helperText:c,isDisabled:p,isReadOnly:f,isRequired:g,validate:v,minLength:b,maxLength:y,min:x,max:E,pattern:C,selectTitle:R,selectOpen:N,selectValue:O,autoFocus:P,autoComplete:M,disableAutoResize:L}=e,W=Cp(e),{control:G,setValue:B,formState:{isSubmitting:j,isValidating:q}}=xu(),[Y,K]=w.useState(!1),[ae]=Na(),oe=PE(e.label,e.isRequired);return I.jsx(oy,{name:n,control:G,shouldUnregister:!0,render:({field:{onChange:te,value:ee,name:z},fieldState:{error:re}})=>{const ce=re!=null&&re.message?v&&q?ae.validating:re==null?void 0:re.message:void 0;function $(de){te(de.trimStart())}return I.jsx(zE,{fieldId:W,label:r,labelHelpTitle:a??r,labelHelp:o,additionalControls:i,helperText:c,helperTextInvalid:ce,isRequired:g,fullWidth:!0,children:I.jsxs(Q.InputGroup,{children:[I.jsx(Q.InputGroupItem,{isFill:!0,children:I.jsx(Q.TextArea,{id:W,placeholder:l,onChange:(de,be)=>$(be),value:ee??"","aria-describedby":W?`${W}-form-group`:void 0,validated:ce?"error":void 0,type:t==="password"?Y?"text":"password":t,readOnlyVariant:f?"default":void 0,isDisabled:p,autoFocus:P,autoComplete:M||(t==="password"?"new-password":"off"),"data-cy":W,autoResize:L===void 0?!0:!L,rows:1,resizeOrientation:"vertical"})}),t==="password"&&I.jsx(Q.Button,{variant:"control",onClick:()=>K(!Y),isDisabled:p||f,children:Y?I.jsx(Ht.EyeIcon,{}):I.jsx(Ht.EyeSlashIcon,{})}),R&&I.jsx(Q.Button,{icon:I.jsx(Ht.SearchIcon,{}),ouiaId:`lookup-${z}-button`,variant:"control",onClick:()=>N==null?void 0:N(de=>{if(O){const be=O(de);B(z,be,{shouldValidate:!0})}},R),"aria-label":"Options menu",isDisabled:p||j}),s]})})},rules:{required:oe,validate:v,minLength:typeof r=="string"&&typeof b=="number"?{value:b,message:`${Cu(r.toLocaleLowerCase())} must be at least ${b} characters.`}:b,maxLength:typeof r=="string"&&typeof y=="number"?{value:y,message:`${Cu(r.toLocaleLowerCase())} cannot be greater than ${y} characters.`}:y,min:typeof r=="string"&&(typeof x=="number"||typeof x=="string")?{value:x,message:`${Cu(r.toLocaleLowerCase())} must be less than ${x}.`}:b,max:typeof r=="string"&&(typeof E=="number"||typeof E=="string")?{value:E,message:`${Cu(r.toLocaleLowerCase())} cannot be greater than ${E}.`}:b,pattern:C}})}function tat(e){const{type:t,name:n,label:r,labelHelpTitle:a,labelHelp:o,additionalControls:i,placeholder:l,button:s,helperText:c,isDisabled:p,isReadOnly:f,isRequired:g,validate:v,minLength:b,maxLength:y,min:x,max:E,pattern:C,selectTitle:R,selectOpen:N,selectValue:O,autoFocus:P,autoComplete:M,fullWidth:L}=e,W=Cp(e),{t:G}=jn(),{control:B,setValue:j,formState:{isSubmitting:q,isValidating:Y,defaultValues:K}}=xu(),[ae,oe]=w.useState(!1),[te]=Na(),ee=PE(e.label,e.isRequired),z=cy(K,e.name);return I.jsx(oy,{name:n,control:B,shouldUnregister:e.shouldUnregister!==!1,defaultValue:e.defaultValue,render:({field:{onChange:re,value:ce,name:$},fieldState:{error:de}})=>{const be=de!=null&&de.message?v&&Y?te.validating:de==null?void 0:de.message:void 0;let ue=ce;switch(t){case"datetime-local":if(ce){const Ce=new Date(ce);ue=new Date(Ce.getTime()-Ce.getTimezoneOffset()*6e4).toISOString().slice(0,16)}break}function ke(Ce){switch(e.type){case"datetime-local":{re(new Date(Ce).toISOString());break}case"number":{let he=Number(Ce);if(Ce===""||isNaN(he)){j($,null),re(null);return}E!==void 0&&he>Number(E)&&(he=Number(E)),x!==void 0&&he<Number(x)&&(he=Number(x)),j($,he),re(he);break}default:re(Ce.trimStart())}}return I.jsx(zE,{fieldId:W,label:r,labelHelpTitle:a??r,labelHelp:o,additionalControls:i,helperText:c,helperTextInvalid:be,isRequired:g,fullWidth:L,children:I.jsxs(Q.InputGroup,{children:[I.jsx(Q.InputGroupItem,{isFill:!0,children:I.jsx(Q.TextInput,{id:W,placeholder:l,onChange:(Ce,he)=>ke(he),value:ue??"","aria-describedby":W?`${W}-form-group`:void 0,validated:be?"error":void 0,type:t==="password"?ae?"text":"password":t,readOnlyVariant:f?"default":void 0,isDisabled:p,autoFocus:P,autoComplete:M||(t==="password"?"new-password":"off"),"data-cy":W})}),t==="password"&&I.jsx(Q.Button,{variant:"control",onClick:()=>oe(!ae),isDisabled:p||f,children:ae?I.jsx(Ht.EyeIcon,{}):I.jsx(Ht.EyeSlashIcon,{})}),R&&I.jsx(Q.Button,{icon:I.jsx(Ht.SearchIcon,{"data-cy":"lookup-button"}),ouiaId:`lookup-${$}-button`,variant:"control",onClick:()=>N==null?void 0:N(Ce=>{if(O){const he=O(Ce);j($,he,{shouldValidate:!0})}},R),"aria-label":"Options menu",isDisabled:p||q}),s,I.jsx(pu,{actions:[{label:G("Undo changes"),type:Nr.Button,selection:vr.None,onClick:()=>{j(e.name,z)},isHidden:()=>!e.enableUndo||ce===z},{label:G("Reset to default"),type:Nr.Button,selection:vr.None,onClick:()=>{j(e.name,e.defaultValue)},isHidden:()=>!e.enableReset||ce===e.defaultValue}],variant:Q.ButtonVariant.control,position:"right"})]})})},rules:{required:ee,validate:v,minLength:typeof r=="string"&&typeof b=="number"?{value:b,message:`${Cu(r.toLocaleLowerCase())} must be at least ${b} characters.`}:b,maxLength:typeof r=="string"&&typeof y=="number"?{value:y,message:`${Cu(r.toLocaleLowerCase())} cannot be greater than ${y} characters.`}:y,min:typeof r=="string"&&(typeof x=="number"||typeof x=="string")?{value:x,message:`${Cu(r.toLocaleLowerCase())} must be greater or equal to ${x}.`}:b,max:typeof r=="string"&&(typeof E=="number"||typeof E=="string")?{value:E,message:`${Cu(r.toLocaleLowerCase())} cannot be greater than ${E}.`}:E,pattern:C}})}const Jme=w.createContext({tabBreadcrumb:{},setTabBreadcrumb:()=>{}});function nat(e){const[t,n]=w.useState();return I.jsx(Jme.Provider,{value:{tabBreadcrumb:t,setTabBreadcrumb:n},children:e.children})}const rat=()=>w.useContext(Jme);function aat(e){return I.jsx(kZ,{children:I.jsx(kee,{defaultRefreshInterval:e.defaultRefreshInterval,children:I.jsx(MMe,{children:I.jsx(npe,{children:I.jsx(TJ,{children:I.jsx(RJ,{children:I.jsx(nat,{children:e.children})})})})})})})}function oat(e){const t=fa.useNavigate();return e.breadcrumbs?I.jsx(Q.Breadcrumb,{style:e.style,children:e.breadcrumbs.map((n,r)=>n.label?I.jsx(Q.BreadcrumbItem,{"data-cy":n.label,id:n.id,component:n.component,isActive:n.to===void 0,children:n.to?I.jsx("a",{href:n.to,"data-cy":n.label,onClick:a=>{a.preventDefault(),n.to&&t(n.to)},children:n.label}):n.label},r):I.jsx(w.Fragment,{},r))}):I.jsx(w.Fragment,{})}function iat(e){const{title:t,description:n,controls:r,headerActions:a,footer:o}=e,i=Fl("lg"),l=Fl("xl"),s=Fl("md"),[c]=Na(),{tabBreadcrumb:p}=rat(),f=w.useMemo(()=>{const g=[];return e.breadcrumbs&&(g.push(...e.breadcrumbs),p&&g.push(p)),g},[e.breadcrumbs,p]);return I.jsx(Q.PageSection,{hasBodyWrapper:!1,style:{paddingBlock:l?16:12},children:I.jsxs(Q.Stack,{hasGutter:!0,children:[I.jsxs(Q.Flex,{flexWrap:{default:"nowrap"},alignItems:{default:"alignItemsStretch"},children:[I.jsxs(Q.FlexItem,{grow:{default:"grow"},children:[f.length>0&&I.jsx(oat,{breadcrumbs:f!=null&&f.length?f:void 0,style:{paddingBottom:i?6:4}}),t?e.titleHelp?I.jsx(Q.Popover,{headerContent:e.titleHelpTitle??e.title,bodyContent:I.jsxs(Q.Stack,{hasGutter:!0,children:[typeof e.titleHelp=="string"?I.jsx(Q.StackItem,{children:e.titleHelp}):e.titleHelp.map((g,v)=>I.jsx(Q.StackItem,{children:g},v)),e.titleDocLink&&I.jsx(Q.StackItem,{children:I.jsx(Q.Button,{icon:I.jsx(Ht.ExternalLinkAltIcon,{}),variant:"link",onClick:()=>window.open(e.titleDocLink,"_blank"),isInline:!0,iconPosition:"end",children:c.documentation})})]}),position:"bottom-start",children:I.jsxs(Q.Title,{"data-testid":"page-title","data-cy":"page-title",headingLevel:"h1",children:[t,I.jsx(Q.Button,{icon:I.jsx(Ht.OutlinedQuestionCircleIcon,{}),variant:"link",style:{padding:0,marginTop:1,marginLeft:8,verticalAlign:"top"}})]})}):I.jsx(Q.Title,{"data-cy":"page-title",headingLevel:"h1",children:t}):null,s&&n&&I.jsx("div",{"data-cy":"app-description",style:{paddingTop:l?4:2,opacity:.8},children:n})]}),t&&(a||r)&&I.jsxs(Q.Flex,{"data-cy":"manage-view",direction:{default:"column"},spaceItems:{default:"spaceItemsSm",xl:"spaceItemsMd"},justifyContent:{default:"justifyContentCenter"},children:[r&&I.jsx(Q.FlexItem,{grow:{default:"grow"},children:r}),a&&I.jsx(Q.FlexItem,{children:a})]})]}),o]})})}function $me(e){const[t]=Na();return I.jsx(LJ,{message:t.errorText,children:e.children})}function lat(e){return I.jsxs(Q.Masthead,{display:{default:"inline"},children:[I.jsxs(Q.MastheadMain,{children:[I.jsx(ege,{}),I.jsx(Q.MastheadBrand,{children:I.jsx(Q.MastheadLogo,{component:t=>I.jsx(fa.Link,{...t,to:"/",style:{textDecoration:"none",color:"light-dark(black, white)"}}),children:e.brand})})]}),I.jsx(Q.MastheadContent,{style:{marginLeft:0,minHeight:0},children:I.jsx(Q.Toolbar,{id:"toolbar","data-cy":"toolbar",inset:{default:"insetNone"},style:{padding:0},children:I.jsx(Q.ToolbarContent,{children:e.children})})})]})}function ege(){const e=cT();return I.jsx(Q.MastheadToggle,{onClick:()=>e.setState({isOpen:!e.isOpen}),children:I.jsx(Q.PageToggleButton,{isHamburgerButton:!0,"data-cy":"nav-toggle",variant:"plain","aria-label":"Global navigation"})})}function sat(){const{setNotificationsDrawerOpen:e,notificationGroups:t}=s_(),{isNotificationRead:n}=pT(),r=Object.values(t).reduce((a,o)=>{const i=o.notifications.filter(l=>typeof l.id!="string"?!1:!n(l.id));return a+i.length},0);return I.jsx(Q.NotificationBadge,{"data-cy":"notification-badge",variant:r===0?"read":"unread",count:r,onClick:()=>e(a=>!a)})}function cat(){const[e,t]=w.useContext(vv);return e.activeTheme==="dark"?I.jsx(Q.Button,{icon:I.jsx(Ht.MoonIcon,{}),"data-cy":"settings-icon",variant:"plain",onClick:()=>t({...e,theme:"light"})}):I.jsx(Q.Button,{icon:I.jsx(Ht.SunIcon,{}),"data-cy":"theme-icon",variant:"plain",onClick:()=>t({...e,theme:"dark"})})}function dat(e){return e.replace(/^\//,"")}function tge(e,t){for(const n of e){if("id"in n&&n.id===t)return n;if("children"in n){const r=tge(n.children,t);if(r)return r}}}function nge(e,t){for(let n=0;n<e.length;n++){const r=e[n];if("id"in r&&r.id===t)return e.splice(n,1),r;if("children"in r){const a=nge(r.children,t);if(a)return a}}}function rge(e,t,n){for(const r of e)if("id"in r&&r.id===t){const a=r;"children"in r||(a.children=[]),a.children.push(n);return}else"children"in r&&rge(r.children,t,n)}function age(e,t,n){for(let r=0;r<e.length;r++){const a=e[r];if("id"in a&&a.id===t){e.splice(r+1,0,n);return}else"children"in a&&age(a.children,t,n)}}function oge(e,t,n){for(let r=0;r<e.length;r++){const a=e[r];if("id"in a&&a.id===t){e.splice(r,0,n);return}else"children"in a&&oge(a.children,t,n)}}function ige(){const e=PMe();return w.useCallback((t,n)=>{let r=e[t]??"";const a=n==null?void 0:n.params,o=n==null?void 0:n.query;return r&&(a&&(r=Object.keys(a).reduce((i,l)=>{let s=a[l];if(s==null)return i;s=encodeURIComponent(s.toString());const c=":"+l,p=new RegExp(c+"(?!.*"+c+")","g");return i.replace(p,s)},r)),o&&(r=`${r}?${Object.keys(o).map(i=>{let l=o[i];return l===void 0?"":(l=encodeURIComponent(l.toString()),`${i}=${l}`)}).join("&").replace("/&&/g","&")}`)),r},[e])}function uat(){const e=fa.useNavigate(),t=ige();return w.useCallback((n,r)=>{const a=t(n,r);a&&e(a)},[e,t])}function pat(e){const{loading:t}=e,[n,r]=w.useState((e==null?void 0:e.initialTabIndex)??0),a=w.useCallback((s,c)=>r(c),[r]),o=w.Children.toArray(e.children),i=o.map((s,c)=>{if(w.isValidElement(s)&&s.type===bU){const p=s.props.label;return I.jsx(Q.Tab,{title:p||I.jsx(Q.Skeleton,{width:"60px"}),eventKey:c},p??c)}return s}),l=o[n];return t?I.jsx(Q.Tabs,{children:I.jsx(bU,{children:I.jsx(Q.PageSection,{hasBodyWrapper:!1,children:I.jsx(Q.Skeleton,{})})})}):I.jsxs(I.Fragment,{children:[I.jsx(Q.Tabs,{activeKey:n,onSelect:a,inset:{default:"insetSm"},className:"pf-v6-u-mb-md",children:i}),l]})}function bU(e){return I.jsx(I.Fragment,{children:e.children})}function fat(e,t,n,r){return(a,o)=>{e(i=>{r?r(i):a(i.map(l=>t(l)))},o?o.map(i=>n(i)):[])}}function mat(e,t,n,r){return(a,o)=>{e(i=>{r?r(i):a(t(i))},o?n(o):void 0)}}function gat(){const[e,t]=w.useState(!0);return w.useEffect(()=>()=>{t(!1)},[]),e}function vat(){const e=w.useRef({isMounted:!0});return w.useEffect(()=>()=>{e.current.isMounted=!1},[]),e}function lge(){const e=gat(),[t,n]=w.useState(e?window.location:void 0),r=w.useCallback(()=>{n(window.location)},[]);w.useEffect(()=>{if(e)return t||r(),window.addEventListener("popstate",r),()=>{window.removeEventListener("popstate",r)}},[e,t,r]);const a=w.useCallback(i=>{window.history.pushState(null,"",i),r()},[r]),o=w.useCallback(i=>{window.history.replaceState(null,"",i),r()},[r]);return{location:t,push:a,update:o}}function sge(){var a,o;const e=lge(),t=((a=e.location)==null?void 0:a.pathname)||"/",n=w.useMemo(()=>{var l;let i=(l=e.location)==null?void 0:l.search;return i&&i.includes("?specPath=")?i=i.substring(0,i.indexOf("?specPath=")):i&&i.includes("&specPath=")&&(i=i.substring(0,i.indexOf("&specPath="))),new URLSearchParams(i??"/")},[(o=e.location)==null?void 0:o.search]),r=w.useCallback(i=>{const l=i.toString();l?e.update("?"+l):e.update(t)},[e,t]);return[n,r]}const cge=w.createContext({});function Xv(){return w.useContext(cge)}function hat(e,t){return!e.hidden||!e.hidden(t)?e:null}function Zp(e){return(e==null?void 0:e.substeps)!==void 0}function bat(e){const{steps:t,onSubmit:n}=e,[r,a]=w.useState(!1),[o,i]=w.useState(null),[l,s]=w.useState({}),[c,p]=w.useState(e.stepDefaults??{}),[f,g]=w.useState({}),[v,b]=w.useState(),[y,x]=w.useState(!1),[E,C]=sge(),R=w.useMemo(()=>_at(t),[t]);w.useEffect(()=>{if(process.env.NODE_ENV==="development")for(const M in e.stepDefaults)t.find(L=>L.id===M)||console.warn(`PageWizardProvider: defaultValue key '${M}' not found in steps.`)},[e.stepDefaults,t]),w.useEffect(()=>{const M=aO(t,l);o||!M.length||(M[0].substeps?i(M[0].substeps[0]):i(M[0]))},[o,t,l]);const N=w.useCallback(async(M={})=>{var j;const L=dge(t,{...l,...M});if(o===null)return Promise.resolve();if(!Zp(o)&&o.validate&&await o.validate(M,l),(o==null?void 0:o.id)===((j=L[L.length-1])==null?void 0:j.id)){x(!0);try{await n(l)}catch(q){b(q instanceof Error?q:new Error(AE("An error occurred.")))}finally{x(!1)}return}const G=L.findIndex(q=>q.id===(o==null?void 0:o.id)),B=Zp(L[G+1])?L[G+2]:L[G+1];return C(new URLSearchParams("")),s(q=>({...q,...M})),p(q=>({...q,[o==null?void 0:o.id]:M})),i(B),Promise.resolve()},[o,t,n,C,l,b]),O=w.useCallback(()=>{const M=aO(R,l),L=M.findIndex(G=>G.id===(o==null?void 0:o.id)),W=Zp(M[L-1])?M[L-2]:M[L-1];C(new URLSearchParams("")),i(W)},[o==null?void 0:o.id,R,C,l]),P=w.useMemo(()=>({wizardData:l,setWizardData:s,stepData:c,setStepData:p,steps:e.steps,visibleSteps:aO(t,l),visibleStepsFlattened:dge(t,l),activeStep:o,setActiveStep:i,stepError:f,setStepError:g,submitError:v,setSubmitError:b,isToggleExpanded:r,setToggleExpanded:a,onNext:N,onBack:O,isSubmitting:y}),[l,s,c,p,e.steps,t,o,i,f,g,v,b,r,a,N,O,y]);return I.jsx(cge.Provider,{value:P,children:e.children})}function _at(e){return e.reduce((t,n)=>(t.push(n),Zp(n)&&t.push(...n.substeps),t),[])}function aO(e,t){return e.filter(n=>hat(n,t))}function dge(e,t){return aO(e,t).reduce((r,a)=>(r.push(a),Zp(a)&&r.push(...a.substeps),r),[])}function uge(e){const{t}=jn(),{activeStep:n,visibleStepsFlattened:r,setSubmitError:a}=Xv(),o=(n==null?void 0:n.id)===r[r.length-1].id,i=t(o?"Finish":"Next"),l=Zp(r[0])?(n==null?void 0:n.id)===r[1].id:(n==null?void 0:n.id)===r[0].id,s=l?"pf-v6-c-button pf-m-disabled":"pf-v6-c-button pf-m-secondary";return I.jsx("footer",{className:"pf-v6-c-wizard__footer","data-cy":"wizard-footer",children:I.jsxs(Q.ActionList,{children:[I.jsxs(Q.ActionListGroup,{children:[I.jsx(Q.ActionListItem,{children:n!==null&&"inputs"in n?I.jsx(Mj,{style:{minWidth:10},children:i}):I.jsx("button",{"data-cy":"wizard-next",className:"pf-v6-c-button pf-m-primary",type:"submit",onClick:()=>{var c;a(void 0),(c=e.onNext)==null||c.call(e)},children:i})}),I.jsx(Q.ActionListItem,{children:I.jsx("button",{type:"button","data-cy":"wizard-back",className:s,disabled:l,onClick:()=>{var c;a(void 0),(c=e.onBack)==null||c.call(e)},children:t("Back")})})]}),I.jsx(Q.ActionListItem,{children:I.jsx("div",{"data-cy":"wizard-cancel",className:"pf-v6-c-wizard__footer-cancel",children:I.jsx("button",{className:"pf-v6-c-button pf-m-link",type:"button",onClick:e.onCancel,children:t("Cancel")})})})]})})}function yat({onCancel:e,disableGrid:t,errorAdapter:n,isVertical:r,singleColumn:a}){const o=fa.useNavigate(),{activeStep:i,stepData:l,onNext:s,onBack:c,submitError:p,isSubmitting:f}=Xv(),g=w.useCallback(()=>{e?e():o(-1)},[o,e]);return f?I.jsx(Q.Bullseye,{children:I.jsx(Q.Spinner,{})}):I.jsxs($me,{children:[I.jsx(Sat,{error:p}),i!==null&&("inputs"in i?I.jsxs(Vpe,{onSubmit:s,footer:I.jsx(uge,{onBack:c,onCancel:g}),defaultValue:l[i.id],errorAdapter:n,disableGrid:t,isVertical:r,singleColumn:a,isWizard:!0,children:[I.jsx(xat,{}),i.inputs]},i.id):I.jsxs("div",{"data-cy":`wizard-section-${i.id}`,style:{display:"flex",flexDirection:"column",flexGrow:1,overflow:"hidden"},children:[I.jsx(Q.PageSection,{hasBodyWrapper:!1,"aria-label":AE("Wizard step content"),hasOverflowScroll:!0,isFilled:!0,children:i==null?void 0:i.element}),I.jsx(uge,{onNext:()=>void s({}),onBack:c,onCancel:g})]}))]})}function xat(){const{activeStep:e,setStepError:t}=Xv(),{errors:n}=Ij(),r=JSON.stringify(n);return w.useEffect(()=>{Object.keys(n).length===0?t({}):e&&t({[e.id]:n})},[n,e,t,r]),null}function Sat(e){const{t}=jn(),n=e.error;if(!e.error)return null;if(!(e.error instanceof Error))return typeof e.error=="string"?I.jsx(Q.Alert,{variant:"danger",title:e.error}):I.jsx(Q.Alert,{variant:"danger",title:t("An error occurred.")});if("message"in e.error&&!n.json)return I.jsx(Q.Alert,{variant:"danger",title:e.error.message});if(n.json)return I.jsx(Q.Alert,{variant:"danger",title:n.message,isInline:!0,children:Object.values(n.json).map((r,a)=>I.jsx("div",{children:r},a))})}function Ru(...e){const t=[],n={}.hasOwnProperty;return e.filter(Boolean).forEach(r=>{const a=typeof r;if(a==="string"||a==="number")t.push(r);else if(Array.isArray(r)&&r.length){const o=Ru(...r);o&&t.push(o)}else if(a==="object")for(const o in r)n.call(r,o)&&r[o]&&t.push(o)}),t.join(" ")}const Jp={wizardClose:"pf-v6-c-wizard__close",wizardHeader:"pf-v6-c-wizard__header",wizardTitle:"pf-v6-c-wizard__title",wizardTitleText:"pf-v6-c-wizard__title-text",wizardToggle:"pf-v6-c-wizard__toggle",wizardToggleIcon:"pf-v6-c-wizard__toggle-icon",wizardToggleList:"pf-v6-c-wizard__toggle-list",wizardToggleListItem:"pf-v6-c-wizard__toggle-list-item",wizardToggleNum:"pf-v6-c-wizard__toggle-num"},Eat=Cn.div`
548
548
  background-color: var(--pf-t--global--background--color--primary--default);
549
549
  color: var(--pf-t--global--text--color--regular);
550
550
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "A framework for building applications using PatternFly.",
4
- "version": "2.4.2716",
4
+ "version": "2.4.2718",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,155 +1,155 @@
1
- import { $ as s } from "./index-B6eiEny4.js";
2
- import { B as o } from "./index-B6eiEny4.js";
3
- import { A as t } from "./index-B6eiEny4.js";
4
- import { C as r } from "./index-B6eiEny4.js";
5
- import { aW as l } from "./index-B6eiEny4.js";
6
- import { aY as i } from "./index-B6eiEny4.js";
7
- import { aV as n } from "./index-B6eiEny4.js";
8
- import { aX as g } from "./index-B6eiEny4.js";
9
- import { aZ as b } from "./index-B6eiEny4.js";
10
- import { aU as u } from "./index-B6eiEny4.js";
11
- import { aQ as P } from "./index-B6eiEny4.js";
12
- import { D as d } from "./index-B6eiEny4.js";
13
- import { af as m } from "./index-B6eiEny4.js";
14
- import { ae as C } from "./index-B6eiEny4.js";
15
- import { E as c } from "./index-B6eiEny4.js";
16
- import { bo as T } from "./index-B6eiEny4.js";
17
- import { bm as D } from "./index-B6eiEny4.js";
18
- import { F as p } from "./index-B6eiEny4.js";
19
- import { G as S } from "./index-B6eiEny4.js";
20
- import { bs as h } from "./index-B6eiEny4.js";
21
- import { ab as F } from "./index-B6eiEny4.js";
22
- import { H as v } from "./index-B6eiEny4.js";
23
- import { k as B } from "./index-B6eiEny4.js";
24
- import { I as f } from "./index-B6eiEny4.js";
25
- import { L as I } from "./index-B6eiEny4.js";
26
- import { a2 as A } from "./index-B6eiEny4.js";
27
- import { P as y } from "./index-B6eiEny4.js";
28
- import { r as N } from "./index-B6eiEny4.js";
29
- import { q as x } from "./index-B6eiEny4.js";
30
- import { s as k } from "./index-B6eiEny4.js";
31
- import { t as w } from "./index-B6eiEny4.js";
32
- import { w as E } from "./index-B6eiEny4.js";
33
- import { y as O } from "./index-B6eiEny4.js";
34
- import { z as L } from "./index-B6eiEny4.js";
35
- import { J as M } from "./index-B6eiEny4.js";
36
- import { M as V } from "./index-B6eiEny4.js";
37
- import { N as R } from "./index-B6eiEny4.js";
38
- import { Q as W } from "./index-B6eiEny4.js";
39
- import { O as j } from "./index-B6eiEny4.js";
40
- import { K as G } from "./index-B6eiEny4.js";
41
- import { U as z } from "./index-B6eiEny4.js";
42
- import { X as U } from "./index-B6eiEny4.js";
43
- import { V as H } from "./index-B6eiEny4.js";
44
- import { Y as q } from "./index-B6eiEny4.js";
45
- import { aP as Q } from "./index-B6eiEny4.js";
46
- import { Z as J } from "./index-B6eiEny4.js";
47
- import { _ as K } from "./index-B6eiEny4.js";
48
- import { a4 as X } from "./index-B6eiEny4.js";
49
- import { W as Y } from "./index-B6eiEny4.js";
50
- import { an as Z } from "./index-B6eiEny4.js";
51
- import { aq as _ } from "./index-B6eiEny4.js";
52
- import { ac as $ } from "./index-B6eiEny4.js";
53
- import { ad as aa } from "./index-B6eiEny4.js";
54
- import { ao as ea } from "./index-B6eiEny4.js";
55
- import { ai as sa } from "./index-B6eiEny4.js";
56
- import { ap as oa } from "./index-B6eiEny4.js";
57
- import { aj as ta } from "./index-B6eiEny4.js";
58
- import { ak as ra } from "./index-B6eiEny4.js";
59
- import { al as la } from "./index-B6eiEny4.js";
60
- import { ar as ia } from "./index-B6eiEny4.js";
61
- import { as as na } from "./index-B6eiEny4.js";
62
- import { at as ga } from "./index-B6eiEny4.js";
63
- import { au as ba } from "./index-B6eiEny4.js";
64
- import { av as ua } from "./index-B6eiEny4.js";
65
- import { aF as Pa } from "./index-B6eiEny4.js";
66
- import { aH as da } from "./index-B6eiEny4.js";
67
- import { ay as ma } from "./index-B6eiEny4.js";
68
- import { a9 as Ca } from "./index-B6eiEny4.js";
69
- import { aa as ca } from "./index-B6eiEny4.js";
70
- import { aw as Ta } from "./index-B6eiEny4.js";
71
- import { aL as Da } from "./index-B6eiEny4.js";
72
- import { aM as pa } from "./index-B6eiEny4.js";
73
- import { bg as Sa } from "./index-B6eiEny4.js";
74
- import { aN as ha } from "./index-B6eiEny4.js";
75
- import { aR as Fa } from "./index-B6eiEny4.js";
76
- import { aT as va } from "./index-B6eiEny4.js";
77
- import { bf as Ba } from "./index-B6eiEny4.js";
78
- import { ax as fa } from "./index-B6eiEny4.js";
79
- import { bh as Ia } from "./index-B6eiEny4.js";
80
- import { bj as Aa } from "./index-B6eiEny4.js";
81
- import { br as ya } from "./index-B6eiEny4.js";
82
- import { R as Na } from "./index-B6eiEny4.js";
83
- import { S as xa } from "./index-B6eiEny4.js";
84
- import { a8 as ka } from "./index-B6eiEny4.js";
85
- import { aO as wa } from "./index-B6eiEny4.js";
86
- import { a_ as Ea } from "./index-B6eiEny4.js";
87
- import { T as Oa } from "./index-B6eiEny4.js";
88
- import { bn as La } from "./index-B6eiEny4.js";
89
- import { bi as Ma } from "./index-B6eiEny4.js";
90
- import { bq as Va } from "./index-B6eiEny4.js";
91
- import { bp as Ra } from "./index-B6eiEny4.js";
92
- import { aC as Wa } from "./index-B6eiEny4.js";
93
- import { aD as ja } from "./index-B6eiEny4.js";
94
- import { aE as Ga } from "./index-B6eiEny4.js";
95
- import { bz as za } from "./index-B6eiEny4.js";
96
- import { by as Ua } from "./index-B6eiEny4.js";
97
- import { bx as Ha } from "./index-B6eiEny4.js";
98
- import { bw as qa } from "./index-B6eiEny4.js";
99
- import { x as Qa } from "./index-B6eiEny4.js";
100
- import { bB as Ja } from "./index-B6eiEny4.js";
101
- import { aA as Ka } from "./index-B6eiEny4.js";
102
- import { g as Xa } from "./index-B6eiEny4.js";
103
- import { bk as Ya } from "./index-B6eiEny4.js";
104
- import { ah as Za } from "./index-B6eiEny4.js";
105
- import { bA as _a } from "./index-B6eiEny4.js";
106
- import { a as $a } from "./index-B6eiEny4.js";
107
- import { e as ae } from "./index-B6eiEny4.js";
108
- import { c as ee } from "./index-B6eiEny4.js";
109
- import { f as se } from "./index-B6eiEny4.js";
110
- import { p as oe } from "./index-B6eiEny4.js";
111
- import { i as te } from "./index-B6eiEny4.js";
112
- import { h as re } from "./index-B6eiEny4.js";
113
- import { b as le } from "./index-B6eiEny4.js";
114
- import { az as ie } from "./index-B6eiEny4.js";
115
- import { aB as ne } from "./index-B6eiEny4.js";
116
- import { bl as ge } from "./index-B6eiEny4.js";
117
- import { n as be } from "./index-B6eiEny4.js";
118
- import { a0 as ue } from "./index-B6eiEny4.js";
119
- import { a1 as Pe } from "./index-B6eiEny4.js";
120
- import { aS as de } from "./index-B6eiEny4.js";
121
- import { b8 as me } from "./index-B6eiEny4.js";
122
- import { b7 as Ce } from "./index-B6eiEny4.js";
123
- import { b3 as ce } from "./index-B6eiEny4.js";
124
- import { b5 as Te } from "./index-B6eiEny4.js";
125
- import { b6 as De } from "./index-B6eiEny4.js";
126
- import { bd as pe } from "./index-B6eiEny4.js";
127
- import { am as Se } from "./index-B6eiEny4.js";
128
- import { bt as he } from "./index-B6eiEny4.js";
129
- import { aJ as Fe } from "./index-B6eiEny4.js";
130
- import { bu as ve } from "./index-B6eiEny4.js";
131
- import { a3 as Be } from "./index-B6eiEny4.js";
132
- import { o as fe } from "./index-B6eiEny4.js";
133
- import { v as Ie } from "./index-B6eiEny4.js";
134
- import { a6 as Ae } from "./index-B6eiEny4.js";
135
- import { a5 as ye } from "./index-B6eiEny4.js";
136
- import { aI as Ne } from "./index-B6eiEny4.js";
137
- import { aG as xe } from "./index-B6eiEny4.js";
138
- import { aK as ke } from "./index-B6eiEny4.js";
139
- import { u as we } from "./index-B6eiEny4.js";
140
- import { be as Ee } from "./index-B6eiEny4.js";
141
- import { l as Oe } from "./index-B6eiEny4.js";
142
- import { a7 as Le } from "./index-B6eiEny4.js";
143
- import { ba as Me } from "./index-B6eiEny4.js";
144
- import { bb as Ve } from "./index-B6eiEny4.js";
145
- import { bc as Re } from "./index-B6eiEny4.js";
146
- import { b9 as We } from "./index-B6eiEny4.js";
147
- import { bv as je } from "./index-B6eiEny4.js";
148
- import { b1 as Ge } from "./index-B6eiEny4.js";
149
- import { b4 as ze } from "./index-B6eiEny4.js";
150
- import { b0 as Ue } from "./index-B6eiEny4.js";
151
- import { b2 as He } from "./index-B6eiEny4.js";
152
- import { a$ as qe } from "./index-B6eiEny4.js";
153
- import { m as Qe } from "./index-B6eiEny4.js";
154
- import { ag as Je } from "./index-B6eiEny4.js";
1
+ import { $ as s } from "./index-BBemku3R.js";
2
+ import { B as o } from "./index-BBemku3R.js";
3
+ import { A as t } from "./index-BBemku3R.js";
4
+ import { C as r } from "./index-BBemku3R.js";
5
+ import { aW as l } from "./index-BBemku3R.js";
6
+ import { aY as i } from "./index-BBemku3R.js";
7
+ import { aV as n } from "./index-BBemku3R.js";
8
+ import { aX as g } from "./index-BBemku3R.js";
9
+ import { aZ as b } from "./index-BBemku3R.js";
10
+ import { aU as u } from "./index-BBemku3R.js";
11
+ import { aQ as P } from "./index-BBemku3R.js";
12
+ import { D as d } from "./index-BBemku3R.js";
13
+ import { af as m } from "./index-BBemku3R.js";
14
+ import { ae as C } from "./index-BBemku3R.js";
15
+ import { E as c } from "./index-BBemku3R.js";
16
+ import { bo as T } from "./index-BBemku3R.js";
17
+ import { bm as D } from "./index-BBemku3R.js";
18
+ import { F as p } from "./index-BBemku3R.js";
19
+ import { G as S } from "./index-BBemku3R.js";
20
+ import { bs as h } from "./index-BBemku3R.js";
21
+ import { ab as F } from "./index-BBemku3R.js";
22
+ import { H as v } from "./index-BBemku3R.js";
23
+ import { k as B } from "./index-BBemku3R.js";
24
+ import { I as f } from "./index-BBemku3R.js";
25
+ import { L as I } from "./index-BBemku3R.js";
26
+ import { a2 as A } from "./index-BBemku3R.js";
27
+ import { P as y } from "./index-BBemku3R.js";
28
+ import { r as N } from "./index-BBemku3R.js";
29
+ import { q as x } from "./index-BBemku3R.js";
30
+ import { s as k } from "./index-BBemku3R.js";
31
+ import { t as w } from "./index-BBemku3R.js";
32
+ import { w as E } from "./index-BBemku3R.js";
33
+ import { y as O } from "./index-BBemku3R.js";
34
+ import { z as L } from "./index-BBemku3R.js";
35
+ import { J as M } from "./index-BBemku3R.js";
36
+ import { M as V } from "./index-BBemku3R.js";
37
+ import { N as R } from "./index-BBemku3R.js";
38
+ import { Q as W } from "./index-BBemku3R.js";
39
+ import { O as j } from "./index-BBemku3R.js";
40
+ import { K as G } from "./index-BBemku3R.js";
41
+ import { U as z } from "./index-BBemku3R.js";
42
+ import { X as U } from "./index-BBemku3R.js";
43
+ import { V as H } from "./index-BBemku3R.js";
44
+ import { Y as q } from "./index-BBemku3R.js";
45
+ import { aP as Q } from "./index-BBemku3R.js";
46
+ import { Z as J } from "./index-BBemku3R.js";
47
+ import { _ as K } from "./index-BBemku3R.js";
48
+ import { a4 as X } from "./index-BBemku3R.js";
49
+ import { W as Y } from "./index-BBemku3R.js";
50
+ import { an as Z } from "./index-BBemku3R.js";
51
+ import { aq as _ } from "./index-BBemku3R.js";
52
+ import { ac as $ } from "./index-BBemku3R.js";
53
+ import { ad as aa } from "./index-BBemku3R.js";
54
+ import { ao as ea } from "./index-BBemku3R.js";
55
+ import { ai as sa } from "./index-BBemku3R.js";
56
+ import { ap as oa } from "./index-BBemku3R.js";
57
+ import { aj as ta } from "./index-BBemku3R.js";
58
+ import { ak as ra } from "./index-BBemku3R.js";
59
+ import { al as la } from "./index-BBemku3R.js";
60
+ import { ar as ia } from "./index-BBemku3R.js";
61
+ import { as as na } from "./index-BBemku3R.js";
62
+ import { at as ga } from "./index-BBemku3R.js";
63
+ import { au as ba } from "./index-BBemku3R.js";
64
+ import { av as ua } from "./index-BBemku3R.js";
65
+ import { aF as Pa } from "./index-BBemku3R.js";
66
+ import { aH as da } from "./index-BBemku3R.js";
67
+ import { ay as ma } from "./index-BBemku3R.js";
68
+ import { a9 as Ca } from "./index-BBemku3R.js";
69
+ import { aa as ca } from "./index-BBemku3R.js";
70
+ import { aw as Ta } from "./index-BBemku3R.js";
71
+ import { aL as Da } from "./index-BBemku3R.js";
72
+ import { aM as pa } from "./index-BBemku3R.js";
73
+ import { bg as Sa } from "./index-BBemku3R.js";
74
+ import { aN as ha } from "./index-BBemku3R.js";
75
+ import { aR as Fa } from "./index-BBemku3R.js";
76
+ import { aT as va } from "./index-BBemku3R.js";
77
+ import { bf as Ba } from "./index-BBemku3R.js";
78
+ import { ax as fa } from "./index-BBemku3R.js";
79
+ import { bh as Ia } from "./index-BBemku3R.js";
80
+ import { bj as Aa } from "./index-BBemku3R.js";
81
+ import { br as ya } from "./index-BBemku3R.js";
82
+ import { R as Na } from "./index-BBemku3R.js";
83
+ import { S as xa } from "./index-BBemku3R.js";
84
+ import { a8 as ka } from "./index-BBemku3R.js";
85
+ import { aO as wa } from "./index-BBemku3R.js";
86
+ import { a_ as Ea } from "./index-BBemku3R.js";
87
+ import { T as Oa } from "./index-BBemku3R.js";
88
+ import { bn as La } from "./index-BBemku3R.js";
89
+ import { bi as Ma } from "./index-BBemku3R.js";
90
+ import { bq as Va } from "./index-BBemku3R.js";
91
+ import { bp as Ra } from "./index-BBemku3R.js";
92
+ import { aC as Wa } from "./index-BBemku3R.js";
93
+ import { aD as ja } from "./index-BBemku3R.js";
94
+ import { aE as Ga } from "./index-BBemku3R.js";
95
+ import { bz as za } from "./index-BBemku3R.js";
96
+ import { by as Ua } from "./index-BBemku3R.js";
97
+ import { bx as Ha } from "./index-BBemku3R.js";
98
+ import { bw as qa } from "./index-BBemku3R.js";
99
+ import { x as Qa } from "./index-BBemku3R.js";
100
+ import { bB as Ja } from "./index-BBemku3R.js";
101
+ import { aA as Ka } from "./index-BBemku3R.js";
102
+ import { g as Xa } from "./index-BBemku3R.js";
103
+ import { bk as Ya } from "./index-BBemku3R.js";
104
+ import { ah as Za } from "./index-BBemku3R.js";
105
+ import { bA as _a } from "./index-BBemku3R.js";
106
+ import { a as $a } from "./index-BBemku3R.js";
107
+ import { e as ae } from "./index-BBemku3R.js";
108
+ import { c as ee } from "./index-BBemku3R.js";
109
+ import { f as se } from "./index-BBemku3R.js";
110
+ import { p as oe } from "./index-BBemku3R.js";
111
+ import { i as te } from "./index-BBemku3R.js";
112
+ import { h as re } from "./index-BBemku3R.js";
113
+ import { b as le } from "./index-BBemku3R.js";
114
+ import { az as ie } from "./index-BBemku3R.js";
115
+ import { aB as ne } from "./index-BBemku3R.js";
116
+ import { bl as ge } from "./index-BBemku3R.js";
117
+ import { n as be } from "./index-BBemku3R.js";
118
+ import { a0 as ue } from "./index-BBemku3R.js";
119
+ import { a1 as Pe } from "./index-BBemku3R.js";
120
+ import { aS as de } from "./index-BBemku3R.js";
121
+ import { b8 as me } from "./index-BBemku3R.js";
122
+ import { b7 as Ce } from "./index-BBemku3R.js";
123
+ import { b3 as ce } from "./index-BBemku3R.js";
124
+ import { b5 as Te } from "./index-BBemku3R.js";
125
+ import { b6 as De } from "./index-BBemku3R.js";
126
+ import { bd as pe } from "./index-BBemku3R.js";
127
+ import { am as Se } from "./index-BBemku3R.js";
128
+ import { bt as he } from "./index-BBemku3R.js";
129
+ import { aJ as Fe } from "./index-BBemku3R.js";
130
+ import { bu as ve } from "./index-BBemku3R.js";
131
+ import { a3 as Be } from "./index-BBemku3R.js";
132
+ import { o as fe } from "./index-BBemku3R.js";
133
+ import { v as Ie } from "./index-BBemku3R.js";
134
+ import { a6 as Ae } from "./index-BBemku3R.js";
135
+ import { a5 as ye } from "./index-BBemku3R.js";
136
+ import { aI as Ne } from "./index-BBemku3R.js";
137
+ import { aG as xe } from "./index-BBemku3R.js";
138
+ import { aK as ke } from "./index-BBemku3R.js";
139
+ import { u as we } from "./index-BBemku3R.js";
140
+ import { be as Ee } from "./index-BBemku3R.js";
141
+ import { l as Oe } from "./index-BBemku3R.js";
142
+ import { a7 as Le } from "./index-BBemku3R.js";
143
+ import { ba as Me } from "./index-BBemku3R.js";
144
+ import { bb as Ve } from "./index-BBemku3R.js";
145
+ import { bc as Re } from "./index-BBemku3R.js";
146
+ import { b9 as We } from "./index-BBemku3R.js";
147
+ import { bv as je } from "./index-BBemku3R.js";
148
+ import { b1 as Ge } from "./index-BBemku3R.js";
149
+ import { b4 as ze } from "./index-BBemku3R.js";
150
+ import { b0 as Ue } from "./index-BBemku3R.js";
151
+ import { b2 as He } from "./index-BBemku3R.js";
152
+ import { a$ as qe } from "./index-BBemku3R.js";
153
+ import { m as Qe } from "./index-BBemku3R.js";
154
+ import { ag as Je } from "./index-BBemku3R.js";
155
155
  export { s as BulkActionDialog, o as BulkSelector, t as BytesCell, r as Collapse, l as ColumnCardOption, i as ColumnDashboardOption, n as ColumnListOption, g as ColumnModalOption, b as ColumnPriority, u as ColumnTableOption, P as ColumnsDiv, d as CopyCell, m as DataEditorActions, C as DataEditorButtons, c as DateCell, T as DateRange, D as DateRangeFilterPresets, p as DateTimeCell, S as ElapsedTimeCell, h as FrameworkTranslationsProvider, F as GenericForm, v as Help, B as LabelColorE, f as LabelsCell, I as LoadingPage, A as MultiSelectDialog, y as PFColorE, N as PageActionSelection, x as PageActionType, k as PageActions, w as PageAlertToasterContext, E as PageAlertToasterProvider, O as PageApp, L as PageBody, M as PageChartContainer, V as PageDashboard, R as PageDashboardCard, W as PageDashboardChart, j as PageDashboardChartVariantE, G as PageDashboardContext, z as PageDashboardCount, U as PageDashboardDonutCard, H as PageDashboardGettingStarted, q as PageDetail, Q as PageDetailDiv, J as PageDetails, K as PageDetailsFromColumns, X as PageDialogProvider, Y as PageDonutChart, Z as PageForm, _ as PageFormCancelButton, $ as PageFormCheckbox, aa as PageFormDataEditor, ea as PageFormGrid, sa as PageFormSelect, oa as PageFormSubmitButton, ta as PageFormSwitch, ra as PageFormTextArea, la as PageFormTextInput, ia as PageFramework, na as PageHeader, ga as PageLayout, ba as PageMasthead, ua as PageMastheadToggle, Pa as PageNavSideBarContext, da as PageNavSideBarProvider, ma as PageNavigation, Ca as PageNotFound, ca as PageNotImplemented, Ta as PageNotificationsIcon, Da as PageSettingsContext, pa as PageSettingsProvider, Sa as PageTab, ha as PageTable, Fa as PageTableCard, va as PageTableCards, Ba as PageTabs, fa as PageThemeSwitcher, Ia as PageToolbar, Aa as PageToolbarFilters, ya as PageWizard, Na as RunningIcon, xa as Scrollable, ka as SelectDialog, wa as Small, Ea as TableColumnCell, Oa as TextCell, La as ToolbarDateRangeFilter, Ma as ToolbarFilterType, Va as ToolbarSingleTextFilter, Ra as ToolbarTextMultiFilter, Wa as addNavigationItem, ja as addNavigationItemAfter, Ga as addNavigationItemBefore, za as buildQueryString, Ua as compareNumbers, Ha as compareStrings, qa as compareUnknowns, Qa as errorToAlertProps, Ja as filtersToSearchObj, Ka as findNavigationItemById, Xa as getPatternflyColor, Ya as multiSelectBrowseAdapter, Za as objectToString, _a as paramsToSearchObj, $a as pfDanger, ae as pfDisabled, ee as pfInfo, se as pfLink, oe as pfSuccess, te as pfTopologyInfo, re as pfUnreachable, le as pfWarning, ie as removeLeadingSlash, ne as removeNavigationItemById, ge as singleSelectBrowseAdapter, be as useBreakpoint, ue as useBulkActionDialog, Pe as useBulkConfirmation, de as useColumnsToTableCardFn, me as useColumnsWithoutExpandedRow, Ce as useColumnsWithoutSort, ce as useDashboardColumns, Te as useDescriptionColumns, De as useExpandedColumns, pe as useFiltered, Se as useFormErrors, he as useFrameworkTranslations, Fe as useGetPageUrl, ve as useInMemoryView, Be as useIsPageDialog, fe as useOrientation, Ie as usePageAlertToaster, Ae as usePageDialog, ye as usePageDialogs, Ne as usePageNavBarClick, xe as usePageNavSideBar, ke as usePageNavigate, we as usePageSettings, Ee as usePaged, Oe as useScrollableState, Le as useSelectDialog, Me as useSelected, Ve as useSelectedInMemory, Re as useSorted, We as useTableItems, je as useView, Ge as useVisibleCardColumns, ze as useVisibleColumns, Ue as useVisibleListColumns, He as useVisibleModalColumns, qe as useVisibleTableColumns, Qe as useWindowSize, Je as valueToObject };