@patternfly/react-templates 6.6.0-prerelease.6 → 6.6.0-prerelease.7
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.
- package/components/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/package.json +6 -7
- package/src/components/Dropdown/examples/DropdownTemplates.md +1 -1
- package/src/components/Dropdown/examples/SimpleDropdownExample.tsx +2 -2
- package/LICENSE +0 -21
- package/dist/umd/assets/output-nU3YyZ7I.css +0 -4090
- package/dist/umd/react-templates.min.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).PatternFlyTemplates={},e.React,e.ReactDOM)}(this,(function(e,t,n){"use strict";function i(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var s=i(n);function o(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}"function"==typeof SuppressedError&&SuppressedError;var a={exports:{}},l={},r=t,c=Symbol.for("react.element"),d=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,p=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function m(e,t,n){var i,s={},o=null,a=null;for(i in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(a=t.ref),t)u.call(t,i)&&!f.hasOwnProperty(i)&&(s[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===s[i]&&(s[i]=t[i]);return{$$typeof:c,type:e,key:o,ref:a,props:s,_owner:p.current}}l.Fragment=d,l.jsx=m,l.jsxs=m,a.exports=l;var g=a.exports;function h(...e){const t=[],n={}.hasOwnProperty;return e.filter(Boolean).forEach((e=>{const i=typeof e;if("string"===i||"number"===i)t.push(e);else if(Array.isArray(e)&&e.length){const n=h(...e);n&&t.push(n)}else if("object"===i)for(const i in e)n.call(e,i)&&e[i]&&t.push(i)})),t.join(" ")}var b="pf-v6-c-divider",v="pf-v6-c-menu",x="pf-v6-c-menu__content",y="pf-v6-c-menu__item",O="pf-v6-c-menu__item-action",j="pf-v6-c-menu__item-check",w="pf-v6-c-menu__item-description",N="pf-v6-c-menu__item-external-icon",C="pf-v6-c-menu__item-icon",S="pf-v6-c-menu__item-main",I="pf-v6-c-menu__item-select-icon",E="pf-v6-c-menu__item-text",D="pf-v6-c-menu__item-toggle-icon",k="pf-v6-c-menu__list",R="pf-v6-c-menu__list-item",T="pf-v6-c-menu__search",M={disabled:"pf-m-disabled",ariaDisabled:"pf-m-aria-disabled",flyout:"pf-m-flyout",left:"pf-m-left",drilldown:"pf-m-drilldown",drilledIn:"pf-m-drilled-in",currentPath:"pf-m-current-path",plain:"pf-m-plain",scrollable:"pf-m-scrollable",load:"pf-m-load",loading:"pf-m-loading",danger:"pf-m-danger",selected:"pf-m-selected",favorited:"pf-m-favorited"},L="pf-v6-c-breadcrumb__link";let P=0;function _(e){return e&&Array.isArray(e)?e.map(((e,t)=>g.jsx("path",{className:e.className,d:e.path},`${e.path}-${t}`))):g.jsx("path",{d:e})}const A=(e,t)=>{const{xOffset:n,yOffset:i,width:s,height:o,svgPathData:a,svgClassName:l}=null!=e?e:{},r=[null!=n?n:0,null!=i?i:0,s,o].join(" "),c=[];return l&&c.push(l),t&&c.push(t),g.jsx("svg",{viewBox:r,className:c.join(" "),children:_(a)})};function F({name:e,icon:n,rhUiIcon:i=null}){var s;return null==n&&console.warn(`@patternfly/react-icons: createIconBase is missing an \`icon\` definition (name: ${null!=e?e:"unknown"}).`),s=class extends t.Component{constructor(){super(...arguments),this.id="icon-title-"+P++}render(){const t=this.props,{title:s,className:a,set:l,noDefaultStyle:r}=t,c=o(t,["title","className","set","noDefaultStyle"]),d=Boolean(s),u=["pf-v6-svg"];if(a&&u.push(a),"rh-ui"===l&&null===i&&console.warn(`Set "rh-ui" was provided for ${e}, but no rh-ui icon data exists for this icon. The default icon will be rendered.`),void 0===l&&null===i||void 0!==l){const e=void 0!==l&&"rh-ui"===l&&null!==i?i:n,{xOffset:t,yOffset:o,width:a,height:p,svgPathData:f,svgClassName:m}=null!=e?e:{},h=[null!=t?t:0,null!=o?o:0,a,p].join(" ");return m&&!r&&u.push(m),g.jsxs("svg",Object.assign({className:u.join(" "),fill:"currentColor",viewBox:h,"aria-labelledby":d?this.id:null,"aria-hidden":!d||null,role:"img",width:"1em",height:"1em"},c,{children:[d&&g.jsx("title",{id:this.id,children:s}),_(f)]}))}return g.jsxs("svg",Object.assign({className:u.join(" "),fill:"currentColor","aria-labelledby":d?this.id:null,"aria-hidden":!d||null,role:"img",width:"1em",height:"1em"},c,{children:[d&&g.jsx("title",{id:this.id,children:s}),n&&A(n,"pf-v6-icon-default"),i&&A(i,"pf-v6-icon-rh-ui")]}))}},s.displayName=e,s.defaultProps={noDefaultStyle:!1},s}const H=F({name:"RhUiCheckCircleFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm7.795 11.795-8.646 8.646c-.317.317-.733.475-1.149.475s-.832-.158-1.149-.475l-4.646-4.646a1.126 1.126 0 0 1 1.591-1.591l4.205 4.205 8.205-8.205a1.126 1.126 0 0 1 1.591 1.591Z"},rhUiIcon:null}),B=F({name:"RhUiErrorFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm-1.5 8a1.5 1.5 0 1 1 3 0v7a1.5 1.5 0 1 1-3 0V9ZM16 25.001a2 2 0 1 1-.001-3.999A2 2 0 0 1 16 25.001Z"},rhUiIcon:null}),$=F({name:"RhUiWarningFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"m31.874 28.514-15.011-27a1.001 1.001 0 0 0-1.748 0l-15.011 27A1 1 0 0 0 .978 30H31a1 1 0 0 0 .874-1.486ZM14.5 12a1.5 1.5 0 0 1 3 0v5a1.5 1.5 0 0 1-3 0v-5ZM16 26.001a2 2 0 1 1-.001-3.999A2 2 0 0 1 16 26.001Z"},rhUiIcon:null}),W=F({name:"RhUiInformationFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm1.5 22a1.5 1.5 0 1 1-3 0v-5.157l-.188.04a1.5 1.5 0 0 1-.625-2.934l1.956-.416c.112-.024.223-.032.333-.03l.024-.002a1.5 1.5 0 0 1 1.5 1.5v7Zm-.08-12.58c-.38.37-.89.58-1.42.58a1.998 1.998 0 0 1-1.851-2.76c.051-.13.11-.24.19-.35.07-.11.15-.21.25-.3.74-.75 2.08-.75 2.83 0 .09.09.17.19.24.3.08.11.14.22.189.35.05.12.09.24.11.37.03.13.04.26.04.39 0 .53-.21 1.04-.58 1.42Z"},rhUiIcon:null}),U=F({name:"RhUiNotificationFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M28.75 22v3.5c0 .689-.561 1.25-1.25 1.25h-7.521c.005.084.021.166.021.25 0 2.206-1.794 4-4 4s-4-1.794-4-4c0-.084.016-.166.021-.25H4.5c-.689 0-1.25-.561-1.25-1.25V22a.75.75 0 0 1 .75-.75c1.24 0 2.25-1.009 2.25-2.25v-4c0-4.826 3.528-8.833 8.138-9.605A2.482 2.482 0 0 1 13.5 3.5C13.5 2.122 14.621 1 16 1s2.5 1.122 2.5 2.5c0 .761-.349 1.436-.888 1.895 4.61.772 8.138 4.779 8.138 9.605v4c0 1.241 1.01 2.25 2.25 2.25a.75.75 0 0 1 .75.75Z"},rhUiIcon:null});var V;!function(e){e.success="success",e.error="error",e.warning="warning",e.default="default"}(V||(V={}));const z="Escape",q="Enter",G={success:H,danger:B,warning:$},X="function"==typeof t.useId?t.useId:void 0;let Z=0;const K=X?function(e="pf-"){return`${e}${X()}`}:function(e="pf-"){const[n]=t.useState((()=>`${e}${++Z}`));return n},Y=({prefix:e="pf-random-id-",children:t})=>t(K(e));Y.displayName="GenerateId";function J(e,t,n=!0){return{"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":n,"data-ouia-component-id":t}}const Q=(e,t,n=!0,i)=>({"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":n,"data-ouia-component-id":ee(e,t,i)}),ee=(e,t,n)=>{const i=K(`OUIA-Generated-${e}-${n?`${n}-`:""}`);return null!=t?t:i};const te=(e,t,n="",i,s)=>e?Object.entries(e||{}).map((([e,t])=>`${n}${t}${"default"!==e?`-on-${e}`:""}`)).map(ie).map((e=>e.replace(/-?(\dxl)/gi,((e,t)=>`_${t}`)))).map((e=>t.modifiers[e])).filter(Boolean).join(" "):"",ne=e=>e.toUpperCase().replace("-","").replace("_",""),ie=e=>e.replace(/([-_][a-z])/gi,ne),se=!("undefined"==typeof window||!window.document||!window.document.createElement),oe=e=>{e.forEach((e=>{e.current&&clearTimeout(e.current)}))};function ae(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function le(e){if("[object Window]"!==e.toString()){const t=e.ownerDocument;return t?t.defaultView:window}return e}function re(e){const t=le(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ce(e){return e instanceof le(e).Element||e instanceof Element}function de(e){return e instanceof le(e).HTMLElement||e instanceof HTMLElement}function ue(e){return e?(e.nodeName||"").toLowerCase():null}function pe(e){return((ce(e)?e.ownerDocument:e.document)||window.document).documentElement}function fe(e){return ae(pe(e)).left+re(e).scrollLeft}function me(e){return le(e).getComputedStyle(e)}function ge(e){const{overflow:t,overflowX:n,overflowY:i}=me(e);return/auto|scroll|overlay|hidden/.test(t+i+n)}function he(e,t,n=!1){const i=pe(t),s=ae(e),o=de(t);let a={scrollLeft:0,scrollTop:0},l={x:0,y:0};var r,c;return(o||!o&&!n)&&(("body"!==ue(t)||ge(i))&&(a=(r=t)!==le(r)&&de(r)?{scrollLeft:(c=r).scrollLeft,scrollTop:c.scrollTop}:re(r)),de(t)?(l=ae(t),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=fe(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function be(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function ve(e){return"html"===ue(e)?e:e.assignedSlot||e.parentNode||e.host||pe(e)}function xe(e){return["html","body","#document"].indexOf(ue(e))>=0?e.ownerDocument.body:de(e)&&ge(e)?e:xe(ve(e))}function ye(e,t=[]){const n=xe(e),i="body"===ue(n),s=le(n),o=i?[s].concat(s.visualViewport||[],ge(n)?n:[]):n,a=t.concat(o);return i?a:a.concat(ye(ve(o)))}function Oe(e){return["table","td","th"].indexOf(ue(e))>=0}function je(e){if(!de(e)||"fixed"===me(e).position)return null;const t=e.offsetParent;if(t){const e=pe(t);if("body"===ue(t)&&"static"===me(t).position&&"static"!==me(e).position)return e}return t}function we(e){const t=le(e);let n=je(e);for(;n&&Oe(n)&&"static"===me(n).position;)n=je(n);return n&&"body"===ue(n)&&"static"===me(n).position?t:n||function(e){let t=ve(e);for(;de(t)&&["html","body"].indexOf(ue(t))<0;){const e=me(t);if("none"!==e.transform||"none"!==e.perspective||e.willChange&&"auto"!==e.willChange)return t;t=t.parentNode}return null}(e)||t}const Ne="top",Ce="bottom",Se="right",Ie="left",Ee="auto",De=[Ne,Ce,Se,Ie],ke="start",Re="end",Te="clippingParents",Me="viewport",Le="popper",Pe="reference",_e=De.reduce(((e,t)=>e.concat([`${t}-${ke}`,`${t}-${Re}`])),[]),Ae=[...De,Ee].reduce(((e,t)=>e.concat([t,`${t}-${ke}`,`${t}-${Re}`])),[]),Fe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function He(e){const t=new Map,n=new Set,i=[];function s(e){n.add(e.name);[...e.requires||[],...e.requiresIfExists||[]].forEach((e=>{if(!n.has(e)){const n=t.get(e);n&&s(n)}})),i.push(e)}return e.forEach((e=>{t.set(e.name,e)})),e.forEach((e=>{n.has(e.name)||s(e)})),i}function Be(e){let t;return()=>(t||(t=new Promise((n=>{Promise.resolve().then((()=>{t=void 0,n(e())}))}))),t)}function $e(e){return e.split("-")[0]}function We(e,t){const n=Boolean(t.getRootNode&&t.getRootNode().host);if(e.contains(t))return!0;if(n){let n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ue(e){return Object.assign(Object.assign({},e),{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ve(e,t){return t===Me?Ue(function(e){const t=le(e),n=pe(e),i=t.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;return i&&(s=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=i.offsetLeft,l=i.offsetTop)),{width:s,height:o,x:a+fe(e),y:l}}(e)):de(t)?function(e){const t=ae(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Ue(function(e){const t=pe(e),n=re(e),i=e.ownerDocument.body,s=Math.max(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Math.max(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let a=-n.scrollLeft+fe(e);const l=-n.scrollTop;return"rtl"===me(i||t).direction&&(a+=Math.max(t.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}(pe(e)))}function ze(e,t,n){const i="clippingParents"===t?function(e){const t=ye(ve(e)),n=["absolute","fixed"].indexOf(me(e).position)>=0&&de(e)?we(e):e;return ce(n)?t.filter((e=>ce(e)&&We(e,n)&&"body"!==ue(e))):[]}(e):[].concat(t),s=[...i,n],o=s[0],a=s.reduce(((t,n)=>{const i=Ve(e,n);return t.top=Math.max(i.top,t.top),t.right=Math.min(i.right,t.right),t.bottom=Math.min(i.bottom,t.bottom),t.left=Math.max(i.left,t.left),t}),Ve(e,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function qe(e){return e.split("-")[1]}function Ge(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Xe({reference:e,element:t,placement:n}){const i=n?$e(n):null,s=n?qe(n):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2;let l;switch(i){case Ne:l={x:o,y:e.y-t.height};break;case Ce:l={x:o,y:e.y+e.height};break;case Se:l={x:e.x+e.width,y:a};break;case Ie:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}const r=i?Ge(i):null;if(null!=r){const n="y"===r?"height":"width";switch(s){case ke:l[r]=Math.floor(l[r])-Math.floor(e[n]/2-t[n]/2);break;case Re:l[r]=Math.floor(l[r])+Math.ceil(e[n]/2-t[n]/2)}}return l}function Ze(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function Ke(e,t){return t.reduce(((t,n)=>(t[n]=e,t)),{})}function Ye(e,t={}){const{placement:n=e.placement,boundary:i=Te,rootBoundary:s=Me,elementContext:o=Le,altBoundary:a=!1,padding:l=0}=t,r=Ze("number"!=typeof l?l:Ke(l,De)),c=o===Le?Pe:Le,d=e.elements.reference,u=e.rects.popper,p=e.elements[a?c:o],f=ze(ce(p)?p:p.contextElement||pe(e.elements.popper),i,s),m=ae(d),g=Xe({reference:m,element:u,placement:n}),h=Ue(Object.assign(Object.assign({},u),g)),b=o===Le?h:m,v={top:f.top-b.top+r.top,bottom:b.bottom-f.bottom+r.bottom,left:f.left-b.left+r.left,right:b.right-f.right+r.right},x=e.modifiersData.offset;if(o===Le&&x){const e=x[n];Object.keys(v).forEach((t=>{const n=[Se,Ce].indexOf(t)>=0?1:-1,i=[Ne,Ce].indexOf(t)>=0?"y":"x";v[t]+=e[i]*n}))}return v}const Je={placement:"bottom",modifiers:[],strategy:"absolute"};function Qe(...e){return!e.some((e=>!(e&&"function"==typeof e.getBoundingClientRect)))}function et(e={}){const{defaultModifiers:t=[],defaultOptions:n=Je}=e;return function(e,i,s=n){let o={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},Je),n),modifiersData:{},elements:{reference:e,popper:i},attributes:{},styles:{}},a=[],l=!1;const r={state:o,setOptions(s){c(),o.options=Object.assign(Object.assign(Object.assign({},n),o.options),s),o.scrollParents={reference:ce(e)?ye(e):e.contextElement?ye(e.contextElement):[],popper:ye(i)};const l=function(e){const t=He(e);return Fe.reduce(((e,n)=>e.concat(t.filter((e=>e.phase===n)))),[])}(function(e){const t=e.reduce(((e,t)=>{const n=e[t.name];return e[t.name]=n?Object.assign(Object.assign(Object.assign({},n),t),{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((e=>t[e]))}([...t,...o.options.modifiers]));return o.orderedModifiers=l.filter((e=>e.enabled)),o.orderedModifiers.forEach((({name:e,options:t={},effect:n})=>{if("function"==typeof n){const i=n({state:o,name:e,instance:r,options:t}),s=()=>{};a.push(i||s)}})),r.update()},forceUpdate(){if(l)return;const{reference:e,popper:t}=o.elements;if(Qe(e,t)){o.rects={reference:he(e,we(t),"fixed"===o.options.strategy),popper:be(t)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((e=>o.modifiersData[e.name]=Object.assign({},e.data)));for(let e=0;e<o.orderedModifiers.length;e++){if(!0===o.reset){o.reset=!1,e=-1;continue}const{fn:t,options:n={},name:i}=o.orderedModifiers[e];"function"==typeof t&&(o=t({state:o,options:n,name:i,instance:r})||o)}}},update:Be((()=>new Promise((e=>{r.forceUpdate(),e(o)})))),destroy(){c(),l=!0}};if(!Qe(e,i))return r;function c(){a.forEach((e=>e())),a=[]}return r.setOptions(s).then((e=>{!l&&s.onFirstUpdate&&s.onFirstUpdate(e)})),r}}et();const tt={passive:!0};const nt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function it({popper:e,popperRect:t,placement:n,offsets:i,position:s,gpuAcceleration:o,adaptive:a}){let{x:l,y:r}=function({x:e,y:t}){const n=window.devicePixelRatio||1;return{x:Math.round(e*n)/n||0,y:Math.round(t*n)/n||0}}(i);const c=i.hasOwnProperty("x"),d=i.hasOwnProperty("y");let u=Ie,p=Ne;const f=window;if(a){let i=we(e);i===le(e)&&(i=pe(e)),n===Ne&&(p=Ce,r-=i.clientHeight-t.height,r*=o?1:-1),n===Ie&&(u=Se,l-=i.clientWidth-t.width,l*=o?1:-1)}const m=Object.assign({position:s},a&&nt);return o?Object.assign(Object.assign({},m),{[p]:d?"0":"",[u]:c?"0":"",transform:(f.devicePixelRatio||1)<2?`translate(${l}px, ${r}px)`:`translate3d(${l}px, ${r}px, 0)`}):Object.assign(Object.assign({},m),{[p]:d?`${r}px`:"",[u]:c?`${l}px`:"",transform:""})}var st={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function({state:e,options:t,name:n}){const{offset:i=[0,0]}=t,s=Ae.reduce(((t,n)=>(t[n]=function(e,t,n){const i=$e(e),s=[Ie,Ne].indexOf(i)>=0?-1:1;let[o,a]="function"==typeof n?n(Object.assign(Object.assign({},t),{placement:e})):n;return o=o||0,a=(a||0)*s,[Ie,Se].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}(n,e.rects,i),t)),{}),{x:o,y:a}=s[e.placement];null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=o,e.modifiersData.popperOffsets.y+=a),e.modifiersData[n]=s}};const ot={left:"right",right:"left",bottom:"top",top:"bottom"};function at(e){return e.replace(/left|right|bottom|top/g,(e=>ot[e]))}const lt={start:"end",end:"start"};function rt(e){return e.replace(/start|end/g,(e=>lt[e]))}function ct(e,t={}){const{placement:n,boundary:i,rootBoundary:s,padding:o,flipVariations:a,allowedAutoPlacements:l=Ae}=t,r=qe(n),c=r?a?_e:_e.filter((e=>qe(e)===r)):De;let d=c.filter((e=>l.indexOf(e)>=0));0===d.length&&(d=c);const u=d.reduce(((t,n)=>(t[n]=Ye(e,{placement:n,boundary:i,rootBoundary:s,padding:o})[$e(n)],t)),{});return Object.keys(u).sort(((e,t)=>u[e]-u[t]))}var dt={name:"flip",enabled:!0,phase:"main",fn:function({state:e,options:t,name:n}){if(e.modifiersData[n]._skip)return;const{mainAxis:i=!0,altAxis:s=!0,fallbackPlacements:o,padding:a,boundary:l,rootBoundary:r,altBoundary:c,flipVariations:d=!0,allowedAutoPlacements:u}=t,p=e.options.placement,f=$e(p),m=[p,...o||(f===p||!d?[at(p)]:function(e){if($e(e)===Ee)return[];const t=at(e);return[rt(e),t,rt(t)]}(p))].reduce(((t,n)=>t.concat($e(n)===Ee?ct(e,{placement:n,boundary:l,rootBoundary:r,padding:a,flipVariations:d,allowedAutoPlacements:u}):n)),[]),g=e.rects.reference,h=e.rects.popper,b=new Map;let v=!0,x=m[0];for(let t=0;t<m.length;t++){const n=m[t],o=$e(n),d=qe(n)===ke,u=[Ne,Ce].indexOf(o)>=0,p=u?"width":"height",f=Ye(e,{placement:n,boundary:l,rootBoundary:r,altBoundary:c,padding:a});let y=u?d?Se:Ie:d?Ce:Ne;g[p]>h[p]&&(y=at(y));const O=at(y),j=[];if(i&&j.push(f[o]<=0),s&&j.push(f[y]<=0,f[O]<=0),j.every((e=>e))){x=n,v=!1;break}b.set(n,j)}if(v){for(let e=d?3:1;e>0;e--){const t=m.find((t=>{const n=b.get(t);if(n)return n.slice(0,e).every((e=>e))}));if(t){x=t;break}}}e.placement!==x&&(e.modifiersData[n]._skip=!0,e.placement=x,e.reset=!0)},requiresIfExists:["offset"],data:{_skip:!1}};function ut(e,t,n){return Math.max(e,Math.min(t,n))}var pt={name:"preventOverflow",enabled:!0,phase:"main",fn:function({state:e,options:t,name:n}){const{mainAxis:i=!0,altAxis:s=!1,boundary:o,rootBoundary:a,altBoundary:l,padding:r,tether:c=!0,tetherOffset:d=0}=t,u=Ye(e,{boundary:o,rootBoundary:a,padding:r,altBoundary:l}),p=$e(e.placement),f=qe(e.placement),m=!f,g=Ge(p),h="x"===g?"y":"x",b=e.modifiersData.popperOffsets,v=e.rects.reference,x=e.rects.popper,y="function"==typeof d?d(Object.assign(Object.assign({},e.rects),{placement:e.placement})):d,O={x:0,y:0};if(b){if(i){const t="y"===g?Ne:Ie,n="y"===g?Ce:Se,i="y"===g?"height":"width",s=b[g],o=b[g]+u[t],a=b[g]-u[n],l=c?-x[i]/2:0,r=f===ke?v[i]:x[i],d=f===ke?-x[i]:-v[i],p=e.elements.arrow,h=c&&p?be(p):{width:0,height:0},j=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},w=j[t],N=j[n],C=ut(0,v[i],h[i]),S=m?v[i]/2-l-C-w-y:r-C-w-y,I=m?-v[i]/2+l+C+N+y:d+C+N+y,E=e.elements.arrow&&we(e.elements.arrow),D=E?"y"===g?E.clientTop||0:E.clientLeft||0:0,k=e.modifiersData.offset?e.modifiersData.offset[e.placement][g]:0,R=b[g]+S-k-D,T=b[g]+I-k,M=ut(c?Math.min(o,R):o,s,c?Math.max(a,T):a);b[g]=M,O[g]=M-s}if(s){const e="x"===g?Ne:Ie,t="x"===g?Ce:Se,n=b[h],i=ut(n+u[e],n,n-u[t]);b[h]=i,O[h]=i-n}e.modifiersData[n]=O}},requiresIfExists:["offset"]};var ft={name:"arrow",enabled:!0,phase:"main",fn:function({state:e,name:t}){const n=e.elements.arrow,i=e.modifiersData.popperOffsets,s=$e(e.placement),o=Ge(s),a=[Ie,Se].indexOf(s)>=0?"height":"width";if(!n||!i)return;const l=e.modifiersData[`${t}#persistent`].padding,r=be(n),c="y"===o?Ne:Ie,d="y"===o?Ce:Se,u=e.rects.reference[a]+e.rects.reference[o]-i[o]-e.rects.popper[a],p=i[o]-e.rects.reference[o],f=we(n),m=f?"y"===o?f.clientHeight||0:f.clientWidth||0:0,g=u/2-p/2,h=l[c],b=m-r[a]-l[d],v=m/2-r[a]/2+g,x=ut(h,v,b),y=o;e.modifiersData[t]={[y]:x,centerOffset:x-v}},effect:function({state:e,options:t,name:n}){let{element:i="[data-popper-arrow]",padding:s=0}=t;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i),i))&&We(e.elements.popper,i)&&(e.elements.arrow=i,e.modifiersData[`${n}#persistent`]={padding:Ze("number"!=typeof s?s:Ke(s,De))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function mt(e,t,n={x:0,y:0}){return{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function gt(e){return[Ne,Se,Ce,Ie].some((t=>e[t]>=0))}const ht=et({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:()=>{},effect:function({state:e,instance:t,options:n}){const{scroll:i=!0,resize:s=!0}=n,o=le(e.elements.popper),a=[...e.scrollParents.reference,...e.scrollParents.popper];return i&&a.forEach((e=>{e.addEventListener("scroll",t.update,tt)})),s&&o.addEventListener("resize",t.update,tt),()=>{i&&a.forEach((e=>{e.removeEventListener("scroll",t.update,tt)})),s&&o.removeEventListener("resize",t.update,tt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function({state:e,name:t}){e.modifiersData[t]=Xe({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function({state:e,options:t}){const{gpuAcceleration:n=!0,adaptive:i=!0}=t,s={placement:$e(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign(Object.assign({},e.styles.popper),it(Object.assign(Object.assign({},s),{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:i})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign(Object.assign({},e.styles.arrow),it(Object.assign(Object.assign({},s),{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1})))),e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function({state:e}){Object.keys(e.elements).forEach((t=>{const n=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];de(s)&&ue(s)&&(Object.assign(s.style,n),Object.keys(i).forEach((e=>{const t=i[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)})))}))},effect:function({state:e}){const t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),()=>{Object.keys(e.elements).forEach((n=>{const i=e.elements[n],s=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]).reduce(((e,t)=>(e[t]="",e)),{});de(i)&&ue(i)&&(Object.assign(i.style,o),Object.keys(s).forEach((e=>{i.removeAttribute(e)})))}))}},requires:["computeStyles"]},st,dt,pt,ft,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function({state:e,name:t}){const n=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,o=Ye(e,{elementContext:"reference"}),a=Ye(e,{altBoundary:!0}),l=mt(o,n),r=mt(a,i,s),c=gt(l),d=gt(r);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:r,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}),bt=se?t.useLayoutEffect:t.useEffect,vt=e=>e.reduce(((e,[t,n])=>(e[t]=n,e)),{}),xt=[];const yt=(e,n,i={})=>{const s=t.useRef(null),o={onFirstUpdate:i.onFirstUpdate,placement:i.placement||"bottom",strategy:i.strategy||"absolute",modifiers:i.modifiers||xt},[a,l]=t.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"}},attributes:{}}),r=t.useMemo((()=>({name:"updateState",enabled:!0,phase:"write",fn:({state:e})=>{const t=Object.keys(e.elements);l({styles:vt(t.map((t=>[t,e.styles[t]||{}]))),attributes:vt(t.map((t=>[t,e.attributes[t]])))})},requires:["computeStyles"]})),[]),c=t.useMemo((()=>{const e={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[...o.modifiers,r,{name:"applyStyles",enabled:!1}]};return t=s.current,n=e,JSON.stringify(t)===JSON.stringify(n)?s.current||e:(s.current=e,e);var t,n}),[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,r]),d=t.useRef(void 0);return bt((()=>{d&&d.current&&d.current.setOptions(c)}),[c]),bt((()=>{if(null==e||null==n)return;if(!function(e){if(e instanceof Element)return e.isConnected;const{contextElement:t}=e;return!(t instanceof Element)||t.isConnected}(e)||!n.isConnected)return;const t=(i.createPopper||ht)(e,n,c);return d.current=t,()=>{t.destroy(),d.current=null}}),[e,n,i.createPopper]),{state:d.current?d.current.state:null,styles:a.styles,attributes:a.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}},Ot={left:"right",right:"left",bottom:"top",top:"bottom","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},jt=e=>`opacity ${e}ms cubic-bezier(.54, 1.5, .38, 1.11)`,wt=({trigger:e,popper:n,direction:i="down",position:o="start",placement:a,width:l,minWidth:r="trigger",maxWidth:c,appendTo:d=(()=>document.body),zIndex:u=9999,isVisible:p=!0,positionModifiers:f,distance:m=0,offset:b,onMouseEnter:v,onMouseLeave:x,onFocus:y,onBlur:O,onDocumentClick:j,onTriggerClick:w,onTriggerEnter:N,onPopperClick:C,onPopperMouseEnter:S,onPopperMouseLeave:I,onDocumentKeyDown:E,enableFlip:D=!0,flipBehavior:k="flip",triggerRef:R,popperRef:T,animationDuration:M=0,entryDelay:L=0,exitDelay:P=0,onHidden:_=(()=>{}),onHide:A=(()=>{}),onMount:F=(()=>{}),onShow:H=(()=>{}),onShown:B=(()=>{}),preventOverflow:$=!1})=>{var W;const[U,V]=t.useState(null),[z,q]=t.useState(null),[G,X]=t.useState(null),[Z,K]=t.useState(null),[Y,J]=t.useState(!1),[Q,ee]=t.useState(0),[te,ne]=t.useState(p),ie=t.useRef(null),se=t.useRef(null),ae=t.useRef(null),le=t.useRef(void 0),re=z||U,ce=p||te,de=((e,t="ltr")=>{if(!e)return t;const n=getComputedStyle(e).getPropertyValue("direction");return["ltr","rtl"].includes(n)?n:t})(null===(W=(null==R?void 0:R.current)||U)||void 0===W?void 0:W.parentElement),ue=t.useMemo((()=>{const e={left:"left",right:"right",center:"center"};return{ltr:Object.assign({start:"left",end:"right"},e),rtl:Object.assign({start:"right",end:"left"},e)}[de][o]}),[o,de]),pe=t.useCallback((e=>j(e,re,G)),[ce,U,z,G,j]);t.useEffect((()=>{J(!0),F()}),[]),t.useEffect((()=>()=>{oe([ie,ae,se])}),[]),t.useEffect((()=>{R&&(R.current?q(R.current):"function"==typeof R&&q(R()))}),[R,e]),t.useEffect((()=>{T&&(T.current?X(T.current):"function"==typeof T&&X(T()))}),[ce,T]),t.useEffect((()=>{const e=new MutationObserver((()=>{Oe&&Oe()}));return G&&e.observe(G,{attributes:!0,childList:!0,subtree:!0}),()=>{e.disconnect()}}),[G]);const fe=(e,t,n,i=!1)=>{e&&t&&t.addEventListener(n,e,{capture:i})},me=(e,t,n,i=!1)=>{e&&t&&t.removeEventListener(n,e,{capture:i})};t.useEffect((()=>(fe(v,re,"mouseenter"),fe(x,re,"mouseleave"),fe(y,re,"focus"),fe(O,re,"blur"),fe(w,re,"click"),fe(N,re,"keydown"),fe(C,G,"click"),fe(S,G,"mouseenter"),fe(I,G,"mouseleave"),j&&fe(pe,document,"click",!0),fe(E,document,"keydown",!0),()=>{me(v,re,"mouseenter"),me(x,re,"mouseleave"),me(y,re,"focus"),me(O,re,"blur"),me(w,re,"click"),me(N,re,"keydown"),me(C,G,"click"),me(S,G,"mouseenter"),me(I,G,"mouseleave"),j&&me(pe,document,"click",!0),me(E,document,"keydown",!0)})),[U,G,v,x,y,O,w,N,C,S,I,j,E,z]);const ge=()=>{if(a)return a;let e="up"===i?"top":"bottom";return"center"!==ue&&(e=`${e}-${"right"===ue?"end":"start"}`),e},he=t.useMemo(ge,[i,ue,a]),be=t.useMemo((()=>(e=>e.replace(/left|right|bottom|top|top-start|top-end|bottom-start|bottom-end|right-start|right-end|left-start|left-end/g,(e=>Ot[e])))(ge())),[i,ue,a]),ve=t.useMemo((()=>({name:"widthMods",enabled:void 0!==l||void 0!==r||void 0!==c,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{const t=e.rects.reference.width;l&&(e.styles.popper.width="trigger"===l?`${t}px`:l),r&&(e.styles.popper.minWidth="trigger"===r?`${t}px`:r),c&&(e.styles.popper.maxWidth="trigger"===c?`${t}px`:c)},effect:({state:e})=>{const t=e.elements.reference.offsetWidth;return l&&(e.elements.popper.style.width="trigger"===l?`${t}px`:l),r&&(e.elements.popper.style.minWidth="trigger"===r?`${t}px`:r),c&&(e.elements.popper.style.maxWidth="trigger"===c?`${t}px`:c),()=>{}}})),[l,r,c]),{styles:xe,attributes:ye,update:Oe,forceUpdate:je}=yt(re,G,{placement:he,modifiers:[{name:"offset",options:{offset:b||[0,m]}},{name:"preventOverflow",enabled:$},{name:"hide",enabled:!0},{name:"flip",enabled:he.startsWith("auto")||D,options:{fallbackPlacements:"flip"===k?[be]:k}},ve]});t.useEffect((()=>{var e,t,i,s,o,a,l;const r=(null===(s=null===(i=null===(t=null===(e=null==n?void 0:n.props)||void 0===e?void 0:e.children)||void 0===t?void 0:t[1])||void 0===i?void 0:i.props)||void 0===s?void 0:s.children)||(null===(l=null===(a=null===(o=null==n?void 0:n.props)||void 0===o?void 0:o.children)||void 0===a?void 0:a.props)||void 0===l?void 0:l.children);K(r),r&&Z&&r!==Z&&je&&je()}),[n]),t.useEffect((()=>{le.current<P&&(oe([ie,ae]),ae.current=setTimeout((()=>{ie.current=setTimeout((()=>{ne(!1)}),M)}),P)),le.current=P}),[P]);t.useEffect((()=>{p?(H(),oe([ie,ae]),se.current=setTimeout((()=>{ne(!0),ee(1),B()}),L)):(A(),oe([se]),ae.current=setTimeout((()=>{ee(0),ie.current=setTimeout((()=>{ne(!1),X(null),_()}),M)}),P))}),[p]);const we=Object.assign({className:h(n.props&&n.props.className,f&&(()=>{if(ye&&ye.popper&&ye.popper["data-popper-placement"]){const e=ye.popper["data-popper-placement"];return f[e]}return f.top})()),style:Object.assign(Object.assign(Object.assign({},n.props&&n.props.style||{}),xe.popper),{zIndex:u,opacity:Q,transition:jt(M)})},ye.popper),Ne=()=>{const e=t.cloneElement(n,we);return T?e:g.jsx("div",{style:{display:"contents"},ref:e=>{X(null==e?void 0:e.firstElementChild)},children:e})};return g.jsxs(g.Fragment,{children:[!R&&e&&t.isValidElement(e)&&g.jsx("div",{style:{display:"contents"},ref:e=>{V(null==e?void 0:e.firstElementChild)},children:e}),R&&e&&t.isValidElement(e)&&e,Y&&ce&&(()=>{if("inline"===d)return Ne();{const e="function"==typeof d?d():d;return s.createPortal(Ne(),e)}})()]})};wt.displayName="Popper";const Nt=({prefix:e,ouiaComponentType:t,children:n})=>{var i;const s=K(e),o=K(t?`OUIA-Generated-${t}-`:"pf-unused-");return null!==(i=n(s,t?o:void 0))&&void 0!==i?i:null};Nt.displayName="SSRSafeIds";const Ct=(e,t)=>{var n;if("ArrowDown"!==e.key&&"ArrowUp"!==e.key)return;e.preventDefault();const i=Array.from(null===(n=t.current)||void 0===n?void 0:n.querySelectorAll("li")).map((e=>e.querySelector('button:not(:disabled),input:not(:disabled),a:not([aria-disabled="true"])'))).filter((e=>null!==e));let s;s="ArrowDown"===e.key?i[0]:i[i.length-1],s&&s.focus()};class St extends t.Component{constructor(){super(...arguments),this.keyHandler=e=>{const{isEventFromContainer:t}=this.props;if(t?!t(e):!this._isEventFromContainer(e))return;const{isActiveElement:n,getFocusableElement:i,noVerticalArrowHandling:s,noHorizontalArrowHandling:o,noEnterHandling:a,noSpaceHandling:l,updateTabIndex:r,validSiblingTags:c,additionalKeyHandler:d,createNavigableElements:u,onlyTraverseSiblings:p}=this.props;d&&d(e);const f=u();if(!f)return void console.warn("No navigable elements have been passed to the KeyboardHandler. Keyboard navigation provided by this component will be ignored.");const m=e.key;a||"Enter"===m&&(e.preventDefault(),e.stopImmediatePropagation(),document.activeElement.click()),l||" "===m&&(e.preventDefault(),e.stopImmediatePropagation(),document.activeElement.click()),((e,t,n=(e=>document.activeElement.contains(e)),i=(e=>e),s=["A","BUTTON","INPUT"],o=!1,a=!1,l=!0,r=!0)=>{const c=document.activeElement,d=e.key;let u=null;if(!o&&["ArrowUp","ArrowDown"].includes(d)){e.preventDefault(),e.stopImmediatePropagation();let s=-1;t.forEach(((e,o)=>{if(n(e)){let e=0;for(;!u&&e<t.length&&-1*e<t.length;)"ArrowUp"===d?e--:e++,s=o+e,s>=t.length&&(s=0),s<0&&(s=t.length-1),u=i(t[s])}}))}if(!a&&["ArrowLeft","ArrowRight"].includes(d)){e.preventDefault(),e.stopImmediatePropagation();let i=-1;t.forEach(((o,a)=>{var l;if(n(o)){const n=t[a].querySelectorAll(s.join(","));if(!n.length||r){let e=c;for(;e;){const t=e.parentElement===o?e:e.parentElement;if(e="ArrowLeft"===d?t.previousElementSibling:t.nextElementSibling,e){if(s.includes(null==e?void 0:e.tagName)){u=e;break}if(s.includes(null===(l=e.children[0])||void 0===l?void 0:l.tagName)){u=e.children[0];break}}}}else n.forEach(((t,s)=>{e.target===t&&(i=s+("ArrowLeft"===d?-1:1),i>=n.length&&(i=0),i<0&&(i=n.length-1),u=n[i])}))}}))}u&&(l&&(c.tabIndex=-1,u.tabIndex=0),u.focus())})(e,f,n,i,c,s,o,r,p)},this._isEventFromContainer=e=>{const{containerRef:t}=this.props;return t.current&&t.current.contains(e.target)}}componentDidMount(){se&&window.addEventListener("keydown",this.keyHandler)}componentWillUnmount(){se&&window.removeEventListener("keydown",this.keyHandler)}render(){return null}}St.displayName="KeyboardHandler",St.defaultProps={containerRef:null,createNavigableElements:()=>null,isActiveElement:e=>document.activeElement===e,getFocusableElement:e=>e,validSiblingTags:["BUTTON","A"],onlyTraverseSiblings:!0,updateTabIndex:!0,noHorizontalArrowHandling:!1,noVerticalArrowHandling:!1,noEnterHandling:!1,noSpaceHandling:!1};const It=t.createContext({menuId:null,parentMenu:null,onActionClick:()=>null,onSelect:()=>null,activeItemId:null,selected:null,drilledInMenus:[],drilldownItemPath:[],onDrillIn:null,onDrillOut:null,onGetMenuHeight:()=>null,flyoutRef:null,setFlyoutRef:()=>null,disableHover:!1,role:"menu"}),Et=t.createContext({itemId:null,isDisabled:!1});class Dt extends t.Component{constructor(e){super(e),this.menuRef=t.createRef(),this.activeMenu=null,this.state={transitionMoveTarget:null,flyoutRef:null,currentDrilldownMenuId:this.props.id},this.handleDrilldownTransition=e=>{const t=this.menuRef.current;if(t&&(t===e.target.closest(`.${v}`)||Array.from(t.getElementsByClassName(v)).includes(e.target.closest(`.${v}`))))if(this.state.transitionMoveTarget)this.state.transitionMoveTarget.focus(),this.setState({transitionMoveTarget:null});else{const e=t.querySelector("#"+this.props.activeMenu)||t||null,n=e.getElementsByTagName("UL");if(0===n.length)return;const i=Array.from(n[0].children);if(this.state.currentDrilldownMenuId&&e.id===this.state.currentDrilldownMenuId)return;this.setState({currentDrilldownMenuId:e.id});const s=i.filter((e=>!(e.classList.contains("pf-m-disabled")||e.classList.contains(b))))[0].firstChild;s.focus(),s.tabIndex=0}},this.handleExtraKeys=e=>{const t=this.props.containsDrilldown,n=document.activeElement;if(e.target.closest(`.${v}`)===this.activeMenu||e.target.classList.contains(L)||(this.activeMenu=e.target.closest(`.${v}`)),"INPUT"===e.target.tagName)return;const i=this.activeMenu,s=e.key,o=n.classList.contains(L);if(" "===s||"Enter"===s){if(e.preventDefault(),t&&!o){if(n.closest("li").classList.contains("pf-m-current-path")&&"LI"===i.parentElement.tagName)n.tabIndex=-1,i.parentElement.firstChild.tabIndex=0,this.setState({transitionMoveTarget:i.parentElement.firstChild});else if(n.nextElementSibling&&n.nextElementSibling.classList.contains(v)){const e=Array.from(n.nextElementSibling.getElementsByTagName("UL")[0].children).filter((e=>!(e.classList.contains("pf-m-disabled")||e.classList.contains(b))));n.tabIndex=-1,e[0].firstChild.tabIndex=0,this.setState({transitionMoveTarget:e[0].firstChild})}}document.activeElement.click()}},this.createNavigableElements=()=>this.props.containsDrilldown?this.activeMenu?Array.from(this.activeMenu.getElementsByTagName("UL")[0].children).filter((e=>!(e.classList.contains("pf-m-disabled")||e.classList.contains(b)))):[]:this.menuRef.current?Array.from(this.menuRef.current.getElementsByTagName("LI")).filter((e=>!(e.classList.contains("pf-m-disabled")||e.classList.contains(b)))):[],e.innerRef&&(this.menuRef=e.innerRef)}allowTabFirstItem(){const e=this.menuRef.current;if(e){const t=e.querySelector("ul button:not(:disabled), ul a:not(:disabled)");t&&(t.tabIndex=0)}}componentDidMount(){se&&this.props.containsDrilldown&&this.props.isRootMenu&&window.addEventListener("transitionend",this.handleDrilldownTransition),this.allowTabFirstItem()}componentWillUnmount(){se&&this.props.containsDrilldown&&this.props.isRootMenu&&window.removeEventListener("transitionend",this.handleDrilldownTransition)}componentDidUpdate(e){e.children!==this.props.children&&this.allowTabFirstItem()}render(){const e=this.props,{id:t,children:n,className:i,onSelect:s,selected:a=null,onActionClick:l,ouiaId:r,ouiaSafe:c,containsFlyout:d,containsDrilldown:u,isMenuDrilledIn:p,isPlain:f,isScrollable:m,drilldownItemPath:b,drilledInMenus:x,onDrillIn:y,onDrillOut:O,onGetMenuHeight:j,parentMenu:w=null,activeItemId:N=null,innerRef:C,isRootMenu:S,activeMenu:I,role:E,isNavFlyout:D}=e,k=o(e,["id","children","className","onSelect","selected","onActionClick","ouiaId","ouiaSafe","containsFlyout","containsDrilldown","isMenuDrilledIn","isPlain","isScrollable","drilldownItemPath","drilledInMenus","onDrillIn","onDrillOut","onGetMenuHeight","parentMenu","activeItemId","innerRef","isRootMenu","activeMenu","role","isNavFlyout"]),R=p||x&&x.includes(t)||!1;return g.jsx(Nt,{prefix:"pf-",ouiaComponentType:kt.displayName,children:(e,o)=>{var p,C;return g.jsxs(It.Provider,{value:{menuId:t,parentMenu:w||t,onSelect:s,onActionClick:l,activeItemId:N,selected:a,drilledInMenus:x,drilldownItemPath:b,onDrillIn:y,onDrillOut:O,onGetMenuHeight:j,flyoutRef:this.state.flyoutRef,setFlyoutRef:e=>this.setState({flyoutRef:e}),disableHover:null!==(C=null===(p=this.context)||void 0===p?void 0:p.disableHover)&&void 0!==C&&C,role:E},children:[S&&g.jsx(St,{containerRef:this.menuRef||null,additionalKeyHandler:this.handleExtraKeys,createNavigableElements:this.createNavigableElements,isActiveElement:e=>document.activeElement.closest("li")===e||document.activeElement.parentElement===e||document.activeElement.closest(`.${T}`)===e||document.activeElement.closest("ol")&&document.activeElement.closest("ol").firstChild===e,getFocusableElement:e=>{var t,n;return"DIV"===(null==e?void 0:e.tagName)&&e.querySelector("input")||"LABEL"===(null===(t=e.firstChild)||void 0===t?void 0:t.tagName)&&e.querySelector("input")||"DIV"===(null===(n=e.firstChild)||void 0===n?void 0:n.tagName)&&e.querySelector("a, button, input")||e.firstChild},noHorizontalArrowHandling:document.activeElement&&(document.activeElement.classList.contains(L)||"INPUT"===document.activeElement.tagName),noEnterHandling:!0,noSpaceHandling:!0}),g.jsx("div",Object.assign({id:t,className:h(v,f&&M.plain,m&&M.scrollable,d&&M.flyout,D&&"pf-m-nav",u&&M.drilldown,R&&M.drilledIn,i),ref:this.menuRef},J(kt.displayName,void 0!==r?r:o,c),k,{children:n}))]})}})}}Dt.displayName="Menu",Dt.contextType=It,Dt.defaultProps={ouiaSafe:!0,isRootMenu:!0,isPlain:!1,isScrollable:!1,role:"menu"};const kt=t.forwardRef(((e,t)=>g.jsx(Dt,Object.assign({},e,{innerRef:t}))));kt.displayName="Menu";const Rt="--pf-v6-c-menu__content--Height",Tt="--pf-v6-c-menu__content--MaxHeight",Mt=t.forwardRef(((e,n)=>{const{getHeight:i,children:s,menuHeight:a,maxMenuHeight:l}=e,r=o(e,["getHeight","children","menuHeight","maxMenuHeight"]);t.createRef();return g.jsx(It.Consumer,{children:({menuId:t,onGetMenuHeight:n})=>g.jsx("div",Object.assign({},r,{className:h(x,e.className),ref:e=>{((e,t,n)=>{if(e){let s=e.clientHeight,o=null,a=e.closest(`.${k}`);for(;null!==a&&1===a.nodeType;)a.classList.contains(k)&&(o=a),a=a.parentElement;if(o){const e=getComputedStyle(o);s+=parseFloat(e.getPropertyValue("padding-top").replace(/px/g,""))+parseFloat(e.getPropertyValue("padding-bottom").replace(/px/g,""))+parseFloat(getComputedStyle(o.parentElement).getPropertyValue("border-bottom-width").replace(/px/g,""))}n&&n(t,s),i&&i(s.toString())}})(e,t,n)},style:Object.assign(Object.assign({},a&&{[Rt]:a}),l&&{[Tt]:l}),children:s}))})}));Mt.displayName="MenuContent";const Lt="--pf-v6-c-menu--m-flyout__menu--top-offset",Pt="--pf-v6-c-menu--m-flyout__menu--m-left--right-offset",_t="--pf-v6-c-menu--m-flyout__menu--left-offset",At=F({name:"ExternalLinkAltIcon",icon:{xOffset:0,yOffset:0,width:512,height:512,svgPathData:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"},rhUiIcon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M28.5 2h-25C2.673 2 2 2.673 2 3.5v25c0 .827.673 1.5 1.5 1.5h25c.827 0 1.5-.673 1.5-1.5v-25c0-.827-.673-1.5-1.5-1.5Zm-3.375 17a1.125 1.125 0 0 1-2.25 0v-8.284L11.796 21.795a1.122 1.122 0 0 1-1.592 0 1.127 1.127 0 0 1 0-1.591l11.08-11.08H13a1.125 1.125 0 0 1 0-2.25h10.5c.896 0 1.625.729 1.625 1.625v10.5Z"}}),Ft=F({name:"RhMicronsCaretLeftIcon",icon:{xOffset:0,yOffset:0,width:20,height:20,svgPathData:"m6.41 10 7.29-7.29.02-.02c.38-.4.37-1.03-.02-1.41-.4-.38-1.03-.37-1.41.02L4.64 8.95a1.49 1.49 0 0 0 0 2.12l7.65 7.65c.19.19.44.29.71.29.27 0 .52-.11.71-.29a.996.996 0 0 0 0-1.41l-7.29-7.29Z"},rhUiIcon:null}),Ht=F({name:"RhMicronsCaretRightIcon",icon:{xOffset:0,yOffset:0,width:20,height:20,svgPathData:"M14.35 8.94 6.71 1.29l-.02-.02c-.4-.38-1.03-.37-1.41.02-.38.4-.37 1.03.02 1.41l7.29 7.29-7.29 7.29a1.003 1.003 0 0 0 1.42 1.42l7.65-7.65c.59-.59.59-1.54 0-2.12Z"},rhUiIcon:null}),Bt=F({name:"CheckIcon",icon:{xOffset:0,yOffset:0,width:512,height:512,svgPathData:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},rhUiIcon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M11 26.792c-.384 0-.769-.146-1.061-.438l-8.646-8.647a.999.999 0 1 1 1.414-1.414L11 24.586 29.293 6.293a.999.999 0 1 1 1.414 1.414L12.061 26.354a1.497 1.497 0 0 1-1.061.438Z"}});var $t="pf-v6-c-check",Wt="pf-v6-c-check__body",Ut="pf-v6-c-check__description",Vt="pf-v6-c-check__input",zt="pf-v6-c-check__label",qt="pf-v6-c-check__label-required",Gt={standalone:"pf-m-standalone",disabled:"pf-m-disabled"};const Xt=()=>{};class Zt extends t.Component{constructor(){super(...arguments),this.handleChange=e=>{this.props.onChange(e,e.currentTarget.checked)}}render(){const e=this.props,{"aria-label":t,"aria-describedby":n,className:i,inputClassName:s,onChange:a,isLabelWrapped:l,labelPosition:r="end",isValid:c,isDisabled:d,isRequired:u,isChecked:p,label:f,checked:m,defaultChecked:b,description:v,body:x,ouiaId:y,ouiaSafe:O,component:j}=e,w=o(e,["aria-label","aria-describedby","className","inputClassName","onChange","isLabelWrapped","labelPosition","isValid","isDisabled","isRequired","isChecked","label","checked","defaultChecked","description","body","ouiaId","ouiaSafe","component"]);w.id||console.error("Checkbox:","id is required to make input accessible");const N={};return([!0,!1].includes(m)||!0===p)&&(N.checked=m||p),a!==Xt&&(N.checked=p),[!1,!0].includes(b)&&(N.defaultChecked=b),g.jsx(Nt,{prefix:"pf-checkbox-description-",ouiaComponentType:"Checkbox",children:(e,o)=>{let a;void 0!==n?a=""===n?void 0:n:v&&(a=e);const m=g.jsx("input",Object.assign({},w,{className:h(Vt,s),type:"checkbox",onChange:this.handleChange,"aria-invalid":!c,"aria-label":t,"aria-describedby":a,disabled:d,required:u,ref:e=>{e&&(e.indeterminate=null===p)}},N,J(Zt.displayName,void 0!==y?y:o,O))),b=l&&!j||"label"===j,C=b?"span":"label",S=f?g.jsxs(C,{className:h(zt,d&&Gt.disabled),htmlFor:b?void 0:w.id,children:[f,u&&g.jsx("span",{className:h(qt),"aria-hidden":"true",children:"*"})]}):null,I=null!=j?j:b?"label":"div";return N.checked=null!==N.checked&&N.checked,g.jsxs(I,{className:h($t,!f&&Gt.standalone,i),htmlFor:b?w.id:void 0,children:["start"===r?g.jsxs(g.Fragment,{children:[S,m]}):g.jsxs(g.Fragment,{children:[m,S]}),v&&g.jsx("span",{id:e,className:h(Ut),children:v}),x&&g.jsx("span",{className:h(Wt),children:x})]})}})}}Zt.displayName="Checkbox",Zt.defaultProps={className:"",isLabelWrapped:!1,isValid:!0,isDisabled:!1,isRequired:!1,isChecked:!1,onChange:Xt,ouiaSafe:!0};var Kt={button:"pf-v6-c-button",buttonCount:"pf-v6-c-button__count",buttonHamburgerIcon:"pf-v6-c-button--hamburger-icon",buttonHamburgerIconArrow:"pf-v6-c-button--hamburger-icon--arrow",buttonHamburgerIconBottom:"pf-v6-c-button--hamburger-icon--bottom",buttonHamburgerIconMiddle:"pf-v6-c-button--hamburger-icon--middle",buttonHamburgerIconTop:"pf-v6-c-button--hamburger-icon--top",buttonIcon:"pf-v6-c-button__icon",buttonProgress:"pf-v6-c-button__progress",modifiers:{primary:"pf-m-primary",unread:"pf-m-unread",secondary:"pf-m-secondary",danger:"pf-m-danger",tertiary:"pf-m-tertiary",link:"pf-m-link",inline:"pf-m-inline",displayLg:"pf-m-display-lg",warning:"pf-m-warning",control:"pf-m-control",plain:"pf-m-plain",noPadding:"pf-m-no-padding",stateful:"pf-m-stateful",read:"pf-m-read",attention:"pf-m-attention",block:"pf-m-block",small:"pf-m-small",favorite:"pf-m-favorite",favorited:"pf-m-favorited",settings:"pf-m-settings",hamburger:"pf-m-hamburger",expand:"pf-m-expand",collapse:"pf-m-collapse",circle:"pf-m-circle",clicked:"pf-m-clicked",disabled:"pf-m-disabled",ariaDisabled:"pf-m-aria-disabled",progress:"pf-m-progress",inProgress:"pf-m-in-progress",notify:"pf-m-notify",docked:"pf-m-docked",textExpanded:"pf-m-text-expanded",start:"pf-m-start",end:"pf-m-end"}},Yt={modifiers:{inline:"pf-m-inline",xs:"pf-m-xs",sm:"pf-m-sm",md:"pf-m-md",lg:"pf-m-lg",xl:"pf-m-xl"},spinner:"pf-v6-c-spinner",spinnerPath:"pf-v6-c-spinner__path"};const Jt="--pf-v6-c-spinner--diameter";var Qt;!function(e){e.sm="sm",e.md="md",e.lg="lg",e.xl="xl"}(Qt||(Qt={}));const en=e=>{var{className:t="",size:n="xl","aria-valuetext":i="Loading...",diameter:s,isInline:a=!1,"aria-label":l,"aria-labelledBy":r}=e,c=o(e,["className","size","aria-valuetext","diameter","isInline","aria-label","aria-labelledBy"]);return g.jsx("svg",Object.assign({className:h(Yt.spinner,a?Yt.modifiers.inline:Yt.modifiers[n],t),role:"progressbar","aria-valuetext":i,viewBox:"0 0 100 100"},s&&{style:{[Jt]:s}},l&&{"aria-label":l},r&&{"aria-labelledBy":r},!l&&!r&&{"aria-label":"Contents"},c,{children:g.jsx("circle",{className:Yt.spinnerPath,cx:"50",cy:"50",r:"45",fill:"none"})}))};en.displayName="Spinner";var tn="pf-v6-c-badge",nn={read:"pf-m-read",unread:"pf-m-unread",disabled:"pf-m-disabled"};const sn=e=>{var{isRead:t=!1,isDisabled:n=!1,className:i="",children:s="",screenReaderText:a}=e,l=o(e,["isRead","isDisabled","className","children","screenReaderText"]);return g.jsxs("span",Object.assign({},l,{className:h(tn,t?nn.read:nn.unread,n&&nn.disabled,i),children:[s,a&&g.jsx("span",{className:"pf-v6-screen-reader",children:a})]}))};sn.displayName="Badge";const on=F({name:"RhUiStarFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"m30.844 12.76-7.749 6.619 1.885 9.425a.998.998 0 0 1-.98 1.197c-.184 0-.368-.051-.53-.152L16 25.181l-7.47 4.668a.998.998 0 0 1-1.51-1.044l1.885-9.425-7.749-6.62a1 1 0 0 1 .557-1.756l10.245-.945 3.119-7.446a1 1 0 0 1 1.844 0l3.119 7.446 10.245.945a1 1 0 0 1 .557 1.756Z"},rhUiIcon:null}),an=F({name:"RhUiStarIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M24 30c-.184 0-.368-.051-.53-.152L16 25.18l-7.47 4.668a.998.998 0 0 1-1.51-1.044l1.885-9.425-7.749-6.619a1 1 0 0 1 .557-1.756l10.245-.945 3.119-7.446a1 1 0 0 1 1.844 0l3.119 7.446 10.245.945a1 1 0 0 1 .557 1.756l-7.749 6.619 1.885 9.425a.998.998 0 0 1-.98 1.197Zm-8-7c.184 0 .368.051.53.152l6.035 3.771-1.545-7.728a1.002 1.002 0 0 1 .331-.957l6.394-5.461-8.485-.783a1 1 0 0 1-.831-.609L16 5.587l-2.429 5.798a.998.998 0 0 1-.831.609l-8.485.783 6.394 5.461c.275.235.402.602.331.957l-1.545 7.728 6.035-3.771A.993.993 0 0 1 16 23Z"},rhUiIcon:null}),ln=F({name:"RhUiSettingsFillIcon",icon:{xOffset:0,yOffset:0,width:32,height:32,svgPathData:"M26.463 16.845a9.635 9.635 0 0 0-.002-1.688l3.41-1.974a.5.5 0 0 0 .235-.548 14.47 14.47 0 0 0-4.142-7.167.5.5 0 0 0-.594-.07l-3.404 1.97c-.469-.326-.96-.61-1.466-.85V2.58a.5.5 0 0 0-.356-.48 14.662 14.662 0 0 0-8.288 0 .5.5 0 0 0-.356.48v3.944c-.513.245-1.003.528-1.462.846L6.63 5.397a.5.5 0 0 0-.594.07 14.47 14.47 0 0 0-4.142 7.168.5.5 0 0 0 .236.548l3.407 1.972a9.635 9.635 0 0 0 .002 1.688l-3.41 1.974a.5.5 0 0 0-.235.548 14.47 14.47 0 0 0 4.142 7.167c.16.154.405.18.594.07l3.404-1.97c.469.326.96.61 1.466.85v3.938a.5.5 0 0 0 .356.48c1.333.398 2.728.6 4.144.6s2.81-.202 4.144-.6a.5.5 0 0 0 .356-.48v-3.944a10.449 10.449 0 0 0 1.462-.846l3.408 1.973a.5.5 0 0 0 .594-.07 14.47 14.47 0 0 0 4.142-7.168.5.5 0 0 0-.236-.548l-3.407-1.972ZM16 21c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5Z"},rhUiIcon:null}),rn=g.jsxs("svg",{viewBox:"0 0 10 10",className:h(Kt.buttonHamburgerIcon,"pf-v6-svg"),width:"1em",height:"1em",children:[g.jsx("path",{className:h(Kt.buttonHamburgerIconTop),d:"M1,1 L9,1"}),g.jsx("path",{className:h(Kt.buttonHamburgerIconMiddle),d:"M1,5 L9,5"}),g.jsx("path",{className:h(Kt.buttonHamburgerIconArrow),d:"M1,5 L1,5 L1,5"}),g.jsx("path",{className:h(Kt.buttonHamburgerIconBottom),d:"M9,9 L1,9"})]});var cn,dn,un,pn;!function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary",e.danger="danger",e.warning="warning",e.link="link",e.plain="plain",e.control="control",e.stateful="stateful"}(cn||(cn={})),function(e){e.button="button",e.submit="submit",e.reset="reset"}(dn||(dn={})),function(e){e.default="default",e.sm="sm",e.lg="lg"}(un||(un={})),function(e){e.read="read",e.unread="unread",e.attention="attention"}(pn||(pn={}));const fn=e=>{var{children:t=null,className:n="",component:i="button",isClicked:s=!1,isBlock:a=!1,isDisabled:l=!1,isAriaDisabled:r=!1,isLoading:c=null,isDanger:d=!1,isExpanded:u,isSettings:p,isHamburger:f,hamburgerVariant:m,isCircle:b,isDocked:v=!1,isTextExpanded:x=!1,spinnerAriaValueText:y,spinnerAriaLabelledBy:O,spinnerAriaLabel:j,size:w=un.default,inoperableEvents:N=["onClick","onKeyPress"],isInline:C=!1,isFavorite:S=!1,isFavorited:I=!1,type:E=dn.button,variant:D=cn.primary,state:k=pn.unread,hasNoPadding:R=!1,iconPosition:T="start","aria-label":M=null,icon:L=null,role:P,ouiaId:_,ouiaSafe:A=!0,tabIndex:F=null,innerRef:H,countOptions:B}=e,$=o(e,["children","className","component","isClicked","isBlock","isDisabled","isAriaDisabled","isLoading","isDanger","isExpanded","isSettings","isHamburger","hamburgerVariant","isCircle","isDocked","isTextExpanded","spinnerAriaValueText","spinnerAriaLabelledBy","spinnerAriaLabel","size","inoperableEvents","isInline","isFavorite","isFavorited","type","variant","state","hasNoPadding","iconPosition","aria-label","icon","role","ouiaId","ouiaSafe","tabIndex","innerRef","countOptions"]);f&&![!0,!1].includes(u)&&console.error("Button: when the isHamburger property is passed in, you must also pass in a boolean value to the isExpanded property. It is expected that a hamburger button controls the expansion of other content."),!(p||f||S)||M||t||$["aria-labelledby"]||console.error("Button: you must provide either visible text content or an accessible name via the aria-label or aria-labelledby properties.");const W=Q(mn.displayName,_,A,D),U=i,V="button"===U,z=C&&"span"===U,q="end"===T||"right"===T,G=p||f||S,X=N.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:e=>{e.preventDefault()}})),{}),Z=(()=>{let e;return S&&(e=g.jsxs(g.Fragment,{children:[g.jsx("span",{className:h("pf-v6-c-button__icon-favorite"),children:g.jsx(an,{})}),g.jsx("span",{className:h("pf-v6-c-button__icon-favorited"),children:g.jsx(on,{})})]})),p&&(e=g.jsx(ln,{})),f&&(e=rn),L&&!G&&(e=L),e&&g.jsx("span",{className:h(Kt.buttonIcon,t&&Kt.modifiers[q?"end":"start"]),children:e})})(),K=t&&g.jsx("span",{className:h("pf-v6-c-button__text"),children:t}),Y=r||!V&&l;return g.jsxs(U,Object.assign({"aria-expanded":u},$,r?X:null,Y&&{"aria-disabled":!0},{"aria-label":M,className:h(Kt.button,Kt.modifiers[D],p&&Kt.modifiers.settings,f&&Kt.modifiers.hamburger,f&&m&&Kt.modifiers[m],a&&Kt.modifiers.block,l&&!V&&Kt.modifiers.disabled,r&&Kt.modifiers.ariaDisabled,s&&Kt.modifiers.clicked,C&&D===cn.link&&Kt.modifiers.inline,S&&Kt.modifiers.favorite,S&&I&&Kt.modifiers.favorited,d&&(D===cn.secondary||D===cn.link)&&Kt.modifiers.danger,null!==c&&D!==cn.plain&&Kt.modifiers.progress,c&&Kt.modifiers.inProgress,R&&D===cn.plain&&Kt.modifiers.noPadding,D===cn.stateful&&Kt.modifiers[k],w===un.sm&&Kt.modifiers.small,w===un.lg&&Kt.modifiers.displayLg,b&&Kt.modifiers.circle,v&&Kt.modifiers.docked,v&&x&&Kt.modifiers.textExpanded,n),disabled:V?l:null,tabIndex:null!==F?F:l?V?null:-1:r?null:z?0:void 0,type:V||z?E:null,role:z?"button":P,ref:H},W,{children:[c&&g.jsx("span",{className:h(Kt.buttonProgress),children:g.jsx(en,{size:Qt.md,isInline:C,"aria-valuetext":y,"aria-label":j,"aria-labelledby":O})}),q?g.jsxs(g.Fragment,{children:[K,Z]}):g.jsxs(g.Fragment,{children:[Z,K]}),B&&g.jsx("span",{className:h(Kt.buttonCount,B.className),children:g.jsx(sn,{isRead:B.isRead,isDisabled:l,children:B.count})})]}))},mn=t.forwardRef(((e,t)=>g.jsx(fn,Object.assign({innerRef:t},e))));mn.displayName="Button";const gn=e=>{var{className:t,icon:n,onClick:i,"aria-label":s,isFavorited:a=null,isDisabled:l,actionId:r,innerRef:c}=e,d=o(e,["className","icon","onClick","aria-label","isFavorited","isDisabled","actionId","innerRef"]);return g.jsx(It.Consumer,{children:({onActionClick:e})=>g.jsx(Et.Consumer,{children:({itemId:o,isDisabled:u})=>g.jsx("div",Object.assign({className:h(O,null!==a&&"pf-m-favorite",a&&M.favorited,t)},d,{children:g.jsx(mn,{"aria-label":s,onClick:t=>{i&&i(t),e&&e(t,o,r)},ref:c,role:"menuitem",variant:"plain",isFavorite:null!==a,isFavorited:null!=a&&a,tabIndex:-1,isDisabled:l||u,icon:null===a?n:void 0})}))})})},hn=t.forwardRef(((e,t)=>g.jsx(gn,Object.assign({},e,{innerRef:t}))));hn.displayName="MenuItemAction";var bn={top:"pf-m-top",topLeft:"pf-m-top-left",topRight:"pf-m-top-right",bottom:"pf-m-bottom",bottomLeft:"pf-m-bottom-left",bottomRight:"pf-m-bottom-right",left:"pf-m-left",leftTop:"pf-m-left-top",leftBottom:"pf-m-left-bottom",right:"pf-m-right",rightTop:"pf-m-right-top",rightBottom:"pf-m-right-bottom",textAlignLeft:"pf-m-text-align-left"},vn="pf-v6-c-tooltip",xn="pf-v6-c-tooltip__arrow",yn="pf-v6-c-tooltip__content";const On=e=>{var{className:t,children:n,isLeftAligned:i}=e,s=o(e,["className","children","isLeftAligned"]);return g.jsx("div",Object.assign({className:h(yn,i&&bn.textAlignLeft,t)},s,{children:n}))};On.displayName="TooltipContent";const jn=e=>{var{className:t}=e,n=o(e,["className"]);return g.jsx("div",Object.assign({className:h(xn,t)},n))};jn.displayName="TooltipArrow";const wn={value:"18.75rem"};var Nn;!function(e){e.auto="auto",e.top="top",e.bottom="bottom",e.left="left",e.right="right",e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end"}(Nn||(Nn={}));const Cn=e=>{var{content:n,position:i="top",trigger:s="mouseenter focus",isVisible:a=!1,isContentLeftAligned:l=!1,enableFlip:r=!0,className:c="",entryDelay:d=300,exitDelay:u=300,appendTo:p=(()=>document.body),zIndex:f=9999,minWidth:m,maxWidth:b=wn.value,distance:v=15,aria:x="describedby",flipBehavior:y=["top","right","bottom","left","top","right","bottom"],id:O,children:j,animationDuration:w=300,triggerRef:N,"aria-live":C=(N?"polite":"off"),onTooltipHidden:S=(()=>{})}=e,I=o(e,["content","position","trigger","isVisible","isContentLeftAligned","enableFlip","className","entryDelay","exitDelay","appendTo","zIndex","minWidth","maxWidth","distance","aria","flipBehavior","id","children","animationDuration","triggerRef","aria-live","onTooltipHidden"]);const E=K("pf-tooltip-"),D=null!=O?O:E,k=s.includes("mouseenter"),R=s.includes("focus"),T=s.includes("click"),M="manual"===s,[L,P]=t.useState(!1),_=t.createRef(),A=()=>"none"!==x?`aria-${x}`:null,F=e=>{if("none"===x||!N||j)return;const t="function"==typeof N?N():N&&"object"==typeof N&&"current"in N?N.current:N instanceof HTMLElement?N:null;t&&(e?(e=>{const t=A();if(!e||!t)return;const n=e.getAttribute(t);if(!n||!n.includes(D)){const i=n?`${n} ${D}`:D;e.setAttribute(t,i)}})(t):(e=>{const t=A();if(!e||!t)return;const n=e.getAttribute(t);if(!n)return;const i=n.split(/\s+/).filter((e=>e!==D)).join(" ");i?e.setAttribute(t,i):e.removeAttribute(t)})(t))};t.useEffect((()=>(F(L),()=>{F(!1)})),[L,x,N,j,D]);t.useEffect((()=>{a?H():B()}),[a]);const H=()=>{P(!0)},B=()=>{P(!1)},$={top:bn.top,bottom:bn.bottom,left:bn.left,right:bn.right,"top-start":bn.topLeft,"top-end":bn.topRight,"bottom-start":bn.bottomLeft,"bottom-end":bn.bottomRight,"left-start":bn.leftTop,"left-end":bn.leftBottom,"right-start":bn.rightTop,"right-end":bn.rightBottom},W=b!==wn.value,U=g.jsxs("div",Object.assign({"aria-live":C,className:h(vn,c),role:"tooltip",id:D,style:{maxWidth:W?b:null},ref:_},I,{children:[g.jsx(jn,{}),g.jsx(On,{isLeftAligned:l,children:n})]}));return g.jsx(wt,{trigger:"none"!==x&&L?(()=>{if(j)return"describedby"===x&&j.props&&!j.props["aria-describedby"]?t.cloneElement(j,{"aria-describedby":D}):"labelledby"===x&&j.props&&!j.props["aria-labelledby"]?t.cloneElement(j,{"aria-labelledby":D}):j})():j,triggerRef:N,popper:U,popperRef:_,minWidth:void 0!==m?m:"revert",appendTo:p,isVisible:L,positionModifiers:$,distance:v,placement:i,onMouseEnter:k&&H,onMouseLeave:k&&B,onPopperMouseEnter:k&&H,onPopperMouseLeave:k&&B,onFocus:R&&H,onBlur:R&&B,onDocumentClick:T&&((e,t)=>{L?B():e.target===t&&H()}),onDocumentKeyDown:M?null:e=>{M||e.key===z&&L&&B()},onTriggerEnter:M?null:e=>{e.key===q&&(L?B():H())},enableFlip:r,zIndex:f,flipBehavior:y,animationDuration:w,entryDelay:d,exitDelay:u,onHidden:S})};Cn.displayName="Tooltip";const Sn=t.createContext({direction:"right"}),In=e=>{var{children:n,className:i,itemId:s=null,to:a,hasCheckbox:l=!1,isActive:r=null,isFavorited:c=null,isLoadButton:d=!1,isLoading:u=!1,flyoutMenu:p,direction:f,description:m=null,onClick:x=(()=>{}),component:O="button",isDisabled:k=!1,isAriaDisabled:T=!1,isExternalLink:L=!1,isSelected:P=null,isFocused:_,isDanger:A=!1,icon:F,actions:H,onShowFlyout:B,drilldownMenu:$,isOnPath:W,innerRef:U,id:V,"aria-label":z,tooltipProps:q,rel:G,target:X,download:Z}=e,Y=o(e,["children","className","itemId","to","hasCheckbox","isActive","isFavorited","isLoadButton","isLoading","flyoutMenu","direction","description","onClick","component","isDisabled","isAriaDisabled","isExternalLink","isSelected","isFocused","isDanger","icon","actions","onShowFlyout","drilldownMenu","isOnPath","innerRef","id","aria-label","tooltipProps","rel","target","download"]);const{menuId:J,parentMenu:Q,onSelect:ee,onActionClick:te,activeItemId:ne,selected:ie,drilldownItemPath:oe,onDrillIn:ae,onDrillOut:le,flyoutRef:re,setFlyoutRef:ce,disableHover:de,role:ue}=t.useContext(It);let pe=a?"a":O;l&&!a&&(pe="label");const[fe,me]=t.useState(null),ge=t.useContext(Sn),[he,be]=t.useState(ge.direction),ve=t.useRef(void 0),xe=t.useRef(void 0),ye=U||xe,Oe=ve===re,je=K(),we=void 0!==p,Ne=e=>{!Oe&&e?ce(ve):Oe&&!e&&ce(null),B&&e&&B()};bt((()=>{if(we&&ve.current&&se){const e=ve.current.lastElementChild;if(e&&e.classList.contains(v)){const t=ve.current.getClientRects()[0],n=e.getClientRects()[0];if(t&&n){const i=t.x-n.width,s=window.innerWidth-t.x-t.width-n.width;let o=he;s<0&&"left"!==o?(be("left"),o="left"):i<0&&"right"!==o&&(be("right"),o="right");let a=0;i<0&&s<0&&(a="right"===o?-s:-i),"left"===o?(e.classList.add(M.left),e.style.setProperty(Pt,`-${a}px`)):e.style.setProperty(_t,`-${a}px`);const l=window.innerHeight-t.y-n.height;window.innerHeight-n.height<0&&l<0||l<0&&e.style.setProperty(Lt,`${l}px`)}}}}),[Oe,p]),t.useEffect((()=>{be(ge.direction)}),[ge]),t.useEffect((()=>{var e,t,n;if(fe)if(Oe){const i=fe.nextElementSibling;null===(n=null===(t=Array.from((null===(e=null==i?void 0:i.getElementsByTagName("UL")[0])||void 0===e?void 0:e.children)||[]).filter((e=>!(e.classList.contains("pf-m-disabled")||e.classList.contains(b))))[0])||void 0===t?void 0:t.firstChild)||void 0===n||n.focus()}else fe.focus()}),[Oe,fe]);const Ce=e=>{const t=e.key,n=e.target,i=e.type;" "!==t&&"Enter"!==t&&"ArrowRight"!==t&&"click"!==i||(e.stopPropagation(),e.preventDefault(),Oe||(Ne(!0),me(n))),"Escape"!==t&&"ArrowLeft"!==t||Oe&&(e.stopPropagation(),Ne(!1))},Se=(e,t)=>{T||(t&&t(e,s),x&&x(e))},Ie=W&&W||oe&&oe.includes(s)||!1;let Ee;f&&(Ee="down"===f?e=>ae&&ae(e,J,"function"==typeof $?$().props.id:$.props.id,s):e=>le&&le(e,Q,s));let De={};"a"===pe?De={href:a,"aria-disabled":!(!k&&!T)||null,disabled:null,target:L?"_blank":X,rel:G,download:Z}:"button"===pe&&(De={type:"button","aria-disabled":!!T||null}),W?De["aria-expanded"]=!0:we&&(De["aria-haspopup"]="menu",De["aria-expanded"]=Oe);const ke=()=>null!==P?P:null!==ie&&null!==s&&(Array.isArray(ie)&&ie.includes(s)||s===ie);t.useEffect((()=>{if(_&&ve.current){const e=ve.current,t=e.parentElement;if(t){const n=e.offsetTop-t.offsetTop<t.scrollTop,i=e.offsetTop-t.offsetTop+e.clientHeight;(n||i)&&e.scrollIntoView({behavior:"auto",block:"nearest"})}}}),[_]);const Re="listbox"===ue,Te=g.jsxs(g.Fragment,{children:[g.jsxs(pe,Object.assign({id:V,tabIndex:-1,className:h(y,ke()&&!l&&M.selected,i),"aria-current":null!==r?r?"page":null:null!==s&&null!==ne?s===ne:null},!l&&{disabled:k,"aria-label":z},!l&&!p&&{role:Re?"option":"menuitem"},!l&&!p&&Re&&{"aria-selected":ke()},{ref:ye},!l&&{onClick:e=>{T?e.preventDefault():(Se(e,ee),Ee&&Ee(e),p&&Ce(e))}},l&&{htmlFor:je},De,{children:[g.jsxs("span",{className:h(S),children:["up"===f&&g.jsx("span",{className:h(D),children:g.jsx(Ft,{})}),F&&g.jsx("span",{className:h(C),children:F}),l&&g.jsx("span",{className:h(j),children:g.jsx(Zt,{id:je,component:"span",isChecked:P||!1,onChange:e=>Se(e,ee),isDisabled:k,"aria-disabled":T})}),g.jsx("span",{className:h(E),children:n}),L&&g.jsx("span",{className:h(N),children:g.jsx(At,{})}),(p||"down"===f)&&g.jsx("span",{className:h(D),children:g.jsx(Ht,{})}),ke()&&g.jsx("span",{className:h(I),children:g.jsx(Bt,{})})]}),m&&"up"!==f&&g.jsx("span",{className:h(w),children:g.jsx("span",{children:m})})]})),Oe&&g.jsx(It.Provider,{value:{disableHover:de},children:g.jsx(Sn.Provider,{value:{direction:he},children:p})}),"function"==typeof $?$():$,g.jsxs(Et.Provider,{value:{itemId:s,isDisabled:k},children:[H,null!==c&&g.jsx(hn,{icon:"favorites",isFavorited:c,"aria-label":c?"starred":"not starred",onClick:e=>te(e,s),tabIndex:-1,actionId:"fav"})]})]});return g.jsxs(g.Fragment,{children:[g.jsx("li",Object.assign({className:h(R,k&&M.disabled,T&&M.ariaDisabled,Ie&&M.currentPath,d&&M.load,u&&M.loading,_&&"pf-m-focus",A&&M.danger,i),onMouseOver:()=>{T||de||(we?Ne(!0):ce(null))}},p&&!T&&{onKeyDown:Ce},{ref:ve,role:l?"menuitem":"none"},l&&{"aria-label":z},Y,{children:Te})),q&&g.jsx(Cn,Object.assign({},q,{triggerRef:ye}))]})},En=t.forwardRef(((e,t)=>g.jsx(In,Object.assign({},e,{innerRef:t}))));En.displayName="MenuItem";const Dn=e=>{var{children:n=null,className:i,isAriaMultiselectable:s=!1,"aria-label":a}=e,l=o(e,["children","className","isAriaMultiselectable","aria-label"]);const{role:r}=t.useContext(It);return g.jsx("ul",Object.assign({role:r},"listbox"===r&&{"aria-multiselectable":s},{className:h(k,i),"aria-label":a},l,{children:n}))};Dn.displayName="MenuList";const kn=e=>{var{children:n,className:i,onSelect:s,isOpen:a,toggle:l,shouldFocusToggleOnSelect:r=!1,onOpenChange:c,onToggleKeydown:d,isPlain:u,isScrollable:p,innerRef:f,ouiaId:m,ouiaSafe:b=!0,zIndex:v=9999,popperProps:x,onOpenChangeKeys:y=["Escape","Tab"],menuHeight:O,maxMenuHeight:j,shouldFocusFirstItemOnOpen:w=!1,shouldPreventScrollOnItemFocus:N=!0,focusTimeoutDelay:C=0,containerOuiaId:S,containerOuiaSafe:I=!0,containerComponent:E="span"}=e,D=o(e,["children","className","onSelect","isOpen","toggle","shouldFocusToggleOnSelect","onOpenChange","onToggleKeydown","isPlain","isScrollable","innerRef","ouiaId","ouiaSafe","zIndex","popperProps","onOpenChangeKeys","menuHeight","maxMenuHeight","shouldFocusFirstItemOnOpen","shouldPreventScrollOnItemFocus","focusTimeoutDelay","containerOuiaId","containerOuiaSafe","containerComponent"]);const k=t.useRef(void 0),R=t.useRef(void 0),T=Q(Rn.displayName,m,b),M=E,L=Q("Dropdown container",S,I),P=f||k,_="function"==typeof l||"function"!=typeof l&&!l.toggleRef?R:null==l?void 0:l.toggleRef,A=t.useRef(a);t.useEffect((()=>{!1===A.current&&!0===a&&w&&setTimeout((()=>{var e;const t=null===(e=null==P?void 0:P.current)||void 0===e?void 0:e.querySelector('li button:not(:disabled),li input:not(:disabled),li a:not([aria-disabled="true"])');t&&t.focus({preventScroll:N})}),C),A.current=a}),[a]),t.useEffect((()=>{const e=e=>{var t,n,i,s;a&&c&&((null===(t=P.current)||void 0===t?void 0:t.contains(e.target))||(null===(n=_.current)||void 0===n?void 0:n.contains(e.target)))&&y.includes(e.key)&&(c(!1),null===(i=_.current)||void 0===i||i.focus()),(null===(s=_.current)||void 0===s?void 0:s.contains(e.target))&&(d?d(e):a&&Ct(e,P))},t=e=>{var t,n;a&&c&&!(null===(t=null==_?void 0:_.current)||void 0===t?void 0:t.contains(e.target))&&a&&!(null===(n=P.current)||void 0===n?void 0:n.contains(e.target))&&c(!1)};return window.addEventListener("keydown",e),window.addEventListener("click",t),()=>{window.removeEventListener("keydown",e),window.removeEventListener("click",t)}}),[a,P,_,c,y,d,N,w,C]);const F=void 0!==j||void 0!==O||p,H=g.jsx(kt,Object.assign({className:h(i),ref:P,onSelect:(e,t)=>{var n;s&&s(e,t),r&&(null===(n=_.current)||void 0===n||n.focus())},isPlain:u,isScrollable:F},D,T,{children:g.jsx(Mt,{menuHeight:O,maxMenuHeight:j,children:n})})),B=g.jsx(wt,Object.assign({trigger:"function"==typeof l?l(_):l.toggleNode,triggerRef:_,popper:H,popperRef:P,isVisible:a,zIndex:v},x));return S?g.jsx(M,Object.assign({},L,{children:B})):B},Rn=t.forwardRef(((e,t)=>g.jsx(kn,Object.assign({innerRef:t},e))));Rn.displayName="Dropdown";const Tn=e=>{var{children:t,className:n,description:i,isDisabled:s,isAriaDisabled:a,value:l,onClick:r,ouiaId:c,ouiaSafe:d,innerRef:u,tooltipProps:p}=e,f=o(e,["children","className","description","isDisabled","isAriaDisabled","value","onClick","ouiaId","ouiaSafe","innerRef","tooltipProps"]);const m=Q(Mn.displayName,c,d);return g.jsx(En,Object.assign({className:h(n),description:i,isDisabled:s,isAriaDisabled:a,itemId:l,onClick:r,tooltipProps:p,ref:u},m,f,{children:t}))},Mn=t.forwardRef(((e,t)=>g.jsx(Tn,Object.assign({},e,{innerRef:t}))));Mn.displayName="DropdownItem";const Ln=e=>{var{children:t,className:n}=e,i=o(e,["children","className"]);return g.jsx(Dn,Object.assign({className:h(n)},i,{children:t}))};Ln.displayName="DropdownList";var Pn={menuToggle:"pf-v6-c-menu-toggle",menuToggleButton:"pf-v6-c-menu-toggle__button",menuToggleControls:"pf-v6-c-menu-toggle__controls",menuToggleCount:"pf-v6-c-menu-toggle__count",menuToggleIcon:"pf-v6-c-menu-toggle__icon",menuToggleStatusIcon:"pf-v6-c-menu-toggle__status-icon",menuToggleText:"pf-v6-c-menu-toggle__text",menuToggleToggleIcon:"pf-v6-c-menu-toggle__toggle-icon",modifiers:{primary:"pf-m-primary",secondary:"pf-m-secondary",fullHeight:"pf-m-full-height",fullWidth:"pf-m-full-width",form:"pf-m-form",plain:"pf-m-plain",circle:"pf-m-circle",expanded:"pf-m-expanded",disabled:"pf-m-disabled",small:"pf-m-small",success:"pf-m-success",warning:"pf-m-warning",danger:"pf-m-danger",settings:"pf-m-settings",placeholder:"pf-m-placeholder",docked:"pf-m-docked",textExpanded:"pf-m-text-expanded",splitButton:"pf-m-split-button",standalone:"pf-m-standalone",typeahead:"pf-m-typeahead",text:"pf-m-text",avatar:"pf-m-avatar"}};const _n=F({name:"RhMicronsCaretDownIcon",icon:{xOffset:0,yOffset:0,width:20,height:20,svgPathData:"M18.71 5.29a.996.996 0 0 0-1.41 0l-7.29 7.29-7.3-7.29a.987.987 0 0 0-1.41-.02.987.987 0 0 0-.02 1.41l.02.02 7.65 7.65c.29.29.68.44 1.06.44s.77-.15 1.06-.44l7.65-7.65a.996.996 0 0 0 0-1.41Z"},rhUiIcon:null});var An,Fn;!function(e){e.success="success",e.danger="danger",e.warning="warning"}(An||(An={})),function(e){e.default="default",e.sm="sm"}(Fn||(Fn={}));class Hn extends t.Component{constructor(){super(...arguments),this.displayName="MenuToggleBase"}render(){const e=this.props,{children:n,className:i,icon:s,badge:a,isExpanded:l,isDisabled:r,isFullHeight:c,isFullWidth:d,isInForm:u,isPlaceholder:p,isCircle:f,isSettings:m,isDocked:b,isTextExpanded:v,splitButtonItems:x,variant:y,status:O,statusIcon:j,innerRef:w,onClick:N,"aria-label":C,ouiaId:S,ouiaSafe:I,size:E}=e,D=o(e,["children","className","icon","badge","isExpanded","isDisabled","isFullHeight","isFullWidth","isInForm","isPlaceholder","isCircle","isSettings","isDocked","isTextExpanded","splitButtonItems","variant","status","statusIcon","innerRef","onClick","aria-label","ouiaId","ouiaSafe","size"]),k="plain"===y,R="plainText"===y,T="typeahead"===y;return g.jsx(Nt,{prefix:"pf-",ouiaComponentType:"MenuToggle"+(y?`-${y}`:""),children:(e,o)=>{const M=J(Bn.displayName,null!=S?S:o,I);let L=j;if(!j)switch(O){case An.success:L=g.jsx(H,{});break;case An.warning:L=g.jsx($,{});break;case An.danger:L=g.jsx(B,{})}const P=g.jsxs("span",{className:h(Pn.menuToggleControls),children:[void 0!==O&&g.jsx("span",{className:h(Pn.menuToggleStatusIcon),children:L}),g.jsx("span",{className:h(Pn.menuToggleToggleIcon),children:g.jsx(_n,{})})]}),_=g.jsxs(g.Fragment,{children:[(s||m)&&g.jsx("span",{className:h(Pn.menuToggleIcon),children:m?g.jsx(ln,{}):s}),T?n:n&&g.jsx("span",{className:h(Pn.menuToggleText),children:n}),t.isValidElement(a)&&g.jsx("span",{className:h(Pn.menuToggleCount),children:a}),T?g.jsx("button",Object.assign({type:"button",className:h(Pn.menuToggleButton),"aria-expanded":l,onClick:N,"aria-label":C||"Menu toggle",tabIndex:-1},M,{children:P})):!k&&P]}),A=h(Pn.menuToggle,l&&Pn.modifiers.expanded,"primary"===y&&Pn.modifiers.primary,"secondary"===y&&Pn.modifiers.secondary,O&&Pn.modifiers[O],(k||R)&&Pn.modifiers.plain,R&&Pn.modifiers.text,c&&Pn.modifiers.fullHeight,d&&Pn.modifiers.fullWidth,u&&Pn.modifiers.form,r&&Pn.modifiers.disabled,p&&Pn.modifiers.placeholder,m&&Pn.modifiers.settings,b&&Pn.modifiers.docked,b&&v&&Pn.modifiers.textExpanded,E===Fn.sm&&Pn.modifiers.small,i),F=Object.assign(Object.assign({children:_},r&&{disabled:!0}),D);return T?g.jsx("div",Object.assign({ref:w,className:h(A,Pn.modifiers.typeahead)},F)):x?g.jsxs("div",{ref:w,className:h(A,Pn.modifiers.splitButton),children:[x,g.jsxs("button",Object.assign({className:h(Pn.menuToggleButton,n&&Pn.modifiers.text),type:"button","aria-expanded":l,"aria-label":C,disabled:r,onClick:N},D,M,{children:[n&&g.jsx("span",{className:h(Pn.menuToggleText),children:n}),P]}))]}):g.jsx("button",Object.assign({className:h(A,f&&k&&Pn.modifiers.circle),type:"button","aria-label":C,"aria-expanded":l,ref:w,disabled:r,onClick:N},F,M))}})}}Hn.defaultProps={className:"",isExpanded:!1,isDisabled:!1,isFullWidth:!1,isFullHeight:!1,isInForm:!1,isPlaceholder:!1,isCircle:!1,isDocked:!1,isTextExpanded:!1,size:"default",ouiaSafe:!0};const Bn=t.forwardRef(((e,t)=>g.jsx(Hn,Object.assign({innerRef:t},e))));Bn.displayName="MenuToggle";var $n,Wn={divider:"pf-v6-c-divider",modifiers:{hidden:"pf-m-hidden",hiddenOnSm:"pf-m-hidden-on-sm",visibleOnSm:"pf-m-visible-on-sm",hiddenOnMd:"pf-m-hidden-on-md",visibleOnMd:"pf-m-visible-on-md",hiddenOnLg:"pf-m-hidden-on-lg",visibleOnLg:"pf-m-visible-on-lg",hiddenOnXl:"pf-m-hidden-on-xl",visibleOnXl:"pf-m-visible-on-xl",hiddenOn_2xl:"pf-m-hidden-on-2xl",visibleOn_2xl:"pf-m-visible-on-2xl",horizontal:"pf-m-horizontal",vertical:"pf-m-vertical",insetNone:"pf-m-inset-none",insetXs:"pf-m-inset-xs",insetSm:"pf-m-inset-sm",insetMd:"pf-m-inset-md",insetLg:"pf-m-inset-lg",insetXl:"pf-m-inset-xl",inset_2xl:"pf-m-inset-2xl",inset_3xl:"pf-m-inset-3xl",horizontalOnSm:"pf-m-horizontal-on-sm",verticalOnSm:"pf-m-vertical-on-sm",insetNoneOnSm:"pf-m-inset-none-on-sm",insetXsOnSm:"pf-m-inset-xs-on-sm",insetSmOnSm:"pf-m-inset-sm-on-sm",insetMdOnSm:"pf-m-inset-md-on-sm",insetLgOnSm:"pf-m-inset-lg-on-sm",insetXlOnSm:"pf-m-inset-xl-on-sm",inset_2xlOnSm:"pf-m-inset-2xl-on-sm",inset_3xlOnSm:"pf-m-inset-3xl-on-sm",horizontalOnMd:"pf-m-horizontal-on-md",verticalOnMd:"pf-m-vertical-on-md",insetNoneOnMd:"pf-m-inset-none-on-md",insetXsOnMd:"pf-m-inset-xs-on-md",insetSmOnMd:"pf-m-inset-sm-on-md",insetMdOnMd:"pf-m-inset-md-on-md",insetLgOnMd:"pf-m-inset-lg-on-md",insetXlOnMd:"pf-m-inset-xl-on-md",inset_2xlOnMd:"pf-m-inset-2xl-on-md",inset_3xlOnMd:"pf-m-inset-3xl-on-md",horizontalOnLg:"pf-m-horizontal-on-lg",verticalOnLg:"pf-m-vertical-on-lg",insetNoneOnLg:"pf-m-inset-none-on-lg",insetXsOnLg:"pf-m-inset-xs-on-lg",insetSmOnLg:"pf-m-inset-sm-on-lg",insetMdOnLg:"pf-m-inset-md-on-lg",insetLgOnLg:"pf-m-inset-lg-on-lg",insetXlOnLg:"pf-m-inset-xl-on-lg",inset_2xlOnLg:"pf-m-inset-2xl-on-lg",inset_3xlOnLg:"pf-m-inset-3xl-on-lg",horizontalOnXl:"pf-m-horizontal-on-xl",verticalOnXl:"pf-m-vertical-on-xl",insetNoneOnXl:"pf-m-inset-none-on-xl",insetXsOnXl:"pf-m-inset-xs-on-xl",insetSmOnXl:"pf-m-inset-sm-on-xl",insetMdOnXl:"pf-m-inset-md-on-xl",insetLgOnXl:"pf-m-inset-lg-on-xl",insetXlOnXl:"pf-m-inset-xl-on-xl",inset_2xlOnXl:"pf-m-inset-2xl-on-xl",inset_3xlOnXl:"pf-m-inset-3xl-on-xl",horizontalOn_2xl:"pf-m-horizontal-on-2xl",verticalOn_2xl:"pf-m-vertical-on-2xl",insetNoneOn_2xl:"pf-m-inset-none-on-2xl",insetXsOn_2xl:"pf-m-inset-xs-on-2xl",insetSmOn_2xl:"pf-m-inset-sm-on-2xl",insetMdOn_2xl:"pf-m-inset-md-on-2xl",insetLgOn_2xl:"pf-m-inset-lg-on-2xl",insetXlOn_2xl:"pf-m-inset-xl-on-2xl",inset_2xlOn_2xl:"pf-m-inset-2xl-on-2xl",inset_3xlOn_2xl:"pf-m-inset-3xl-on-2xl"}};!function(e){e.hr="hr",e.li="li",e.div="div"}($n||($n={}));const Un=e=>{var{className:t,component:n=$n.hr,inset:i,orientation:s,role:a="separator"}=e,l=o(e,["className","component","inset","orientation","role"]);const r=n;return g.jsx(r,Object.assign({className:h(Wn.divider,te(i,Wn),te(s,Wn),t)},"hr"!==n&&{role:a},l))};Un.displayName="Divider";const Vn=e=>{var{innerRef:n,initialItems:i,onSelect:s,onToggle:a,isDisabled:l,toggleAriaLabel:r,toggleContent:c,isToggleFullWidth:d,toggleVariant:u="default",toggleWidth:p,toggleProps:f,shouldFocusToggleOnSelect:m}=e,h=o(e,["innerRef","initialItems","onSelect","onToggle","isDisabled","toggleAriaLabel","toggleContent","isToggleFullWidth","toggleVariant","toggleWidth","toggleProps","shouldFocusToggleOnSelect"]);const[b,v]=t.useState(!1),x=()=>{a&&a(!b),v(!b)},y=null==i?void 0:i.map((e=>{const{content:t,onClick:n,to:i,value:s,isDivider:a}=e,l=o(e,["content","onClick","to","value","isDivider"]);return a?g.jsx(Un,{component:"li"},s):g.jsx(Mn,Object.assign({onClick:n,to:i,value:s},l,{children:t}),s)}));return g.jsx(Rn,Object.assign({toggle:e=>g.jsx(Bn,Object.assign({ref:e,onClick:x,isExpanded:b,isDisabled:l,variant:u,"aria-label":r,isFullWidth:d,style:{width:p}},f,{children:c})),isOpen:b,onSelect:(e,t)=>{s&&s(e,t),a&&a(!1),v(!1)},shouldFocusToggleOnSelect:m,onOpenChange:e=>{a&&a(e),v(e)},ref:n},h,{children:g.jsx(Ln,{children:y})}))},zn=t.forwardRef(((e,t)=>g.jsx(Vn,Object.assign({},e,{innerRef:t}))));zn.displayName="SimpleDropdown";const qn=e=>{var{children:n,className:i,onSelect:s,isOpen:a,selected:l,toggle:r,shouldFocusToggleOnSelect:c=!1,shouldFocusFirstItemOnOpen:d=!1,onOpenChange:u,onOpenChangeKeys:p=["Escape","Tab"],onToggleKeydown:f,variant:m,isPlain:b,innerRef:v,zIndex:x=9999,role:y="listbox",popperProps:O,menuHeight:j,maxMenuHeight:w,isScrollable:N,shouldPreventScrollOnItemFocus:C=!0,focusTimeoutDelay:S=0}=e,I=o(e,["children","className","onSelect","isOpen","selected","toggle","shouldFocusToggleOnSelect","shouldFocusFirstItemOnOpen","onOpenChange","onOpenChangeKeys","onToggleKeydown","variant","isPlain","innerRef","zIndex","role","popperProps","menuHeight","maxMenuHeight","isScrollable","shouldPreventScrollOnItemFocus","focusTimeoutDelay"]);const E=ee(Gn.displayName,I.ouiaId),D=t.useRef(void 0),k=t.useRef(void 0),R=v||D,T="function"==typeof r||"function"!=typeof r&&!r.toggleRef?k:null==r?void 0:r.toggleRef,M=t.useRef(a);t.useEffect((()=>{!1===M.current&&!0===a&&d&&setTimeout((()=>{var e;const t=null===(e=null==R?void 0:R.current)||void 0===e?void 0:e.querySelector("li button:not(:disabled),li input:not(:disabled)");t&&t.focus({preventScroll:C})}),S),M.current=a}),[a]),t.useEffect((()=>{const e=e=>{var t,n,i,s;a&&u&&((null===(t=R.current)||void 0===t?void 0:t.contains(e.target))||(null===(n=T.current)||void 0===n?void 0:n.contains(e.target)))&&p.includes(e.key)&&(e.preventDefault(),u(!1),null===(i=T.current)||void 0===i||i.focus()),(null===(s=T.current)||void 0===s?void 0:s.contains(e.target))&&(f?f(e):a&&"typeahead"!==m&&Ct(e,R))},t=e=>{var t,n;a&&u&&!(null===(t=null==T?void 0:T.current)||void 0===t?void 0:t.contains(e.target))&&a&&!(null===(n=R.current)||void 0===n?void 0:n.contains(e.target))&&u(!1)};return window.addEventListener("keydown",e),window.addEventListener("click",t),()=>{window.removeEventListener("keydown",e),window.removeEventListener("click",t)}}),[a,R,T,u,p,f,C,d,S]);const L=g.jsx(kt,Object.assign({role:y,className:h(i),ref:R,onSelect:(e,t)=>{s&&s(e,t),c&&T.current.focus()},isPlain:b,selected:l,isScrollable:null!=N?N:void 0!==j||void 0!==w},J(Gn.displayName,E,void 0===I.ouiaSafe||I.ouiaSafe),I,{children:g.jsx(Mt,{menuHeight:j,maxMenuHeight:w,children:n})}));return g.jsx(wt,Object.assign({trigger:"function"==typeof r?r(T):r.toggleNode,triggerRef:T,popper:L,popperRef:R,isVisible:a,zIndex:x},O))},Gn=t.forwardRef(((e,t)=>g.jsx(qn,Object.assign({innerRef:t},e))));Gn.displayName="Select";const Xn=e=>{var{children:t,className:n,isAriaMultiselectable:i=!1}=e,s=o(e,["children","className","isAriaMultiselectable"]);return g.jsx(Dn,Object.assign({isAriaMultiselectable:i,className:h(n)},s,{children:t}))};Xn.displayName="SelectList";const Zn=e=>{var{children:t,className:n,innerRef:i,value:s}=e,a=o(e,["children","className","innerRef","value"]);return g.jsx(En,Object.assign({itemId:s,ref:i,className:h(n)},a,{children:t}))},Kn=t.forwardRef(((e,t)=>g.jsx(Zn,Object.assign({},e,{innerRef:t}))));Kn.displayName="SelectOption";const Yn=e=>{var{innerRef:n,initialOptions:i,isDisabled:s,onSelect:a,onToggle:l,toggleContent:r,toggleWidth:c="200px",toggleProps:d,placeholder:u="Select a value"}=e,p=o(e,["innerRef","initialOptions","isDisabled","onSelect","onToggle","toggleContent","toggleWidth","toggleProps","placeholder"]);const[f,m]=t.useState(!1),[h,b]=t.useState();t.useEffect((()=>{const e=null==i?void 0:i.find((e=>e.selected));b(e)}),[i]);const v=null==i?void 0:i.map((e=>{const{content:t,value:n}=e,i=o(e,["content","value"]),s=(null==h?void 0:h.value)===n;return g.jsx(Kn,Object.assign({value:n,isSelected:s},i,{children:t}),n)})),x=()=>{l&&l(!f),m(!f)};return g.jsx(Gn,Object.assign({isOpen:f,selected:h,onSelect:(e,t)=>{a&&a(e,t),b(i.find((e=>e.value===t))),l&&l(!0),m(!1)},onOpenChange:e=>{l&&l(e),m(e)},toggle:e=>g.jsx(Bn,Object.assign({ref:e,onClick:x,isExpanded:f,isDisabled:s,style:{width:c}},d,{children:r||((null==h?void 0:h.content)||u)})),shouldFocusToggleOnSelect:!0,ref:n},p,{children:g.jsx(Xn,{children:v})}))},Jn=t.forwardRef(((e,t)=>g.jsx(Yn,Object.assign({},e,{innerRef:t}))));Jn.displayName="SimpleSelect";const Qn=e=>{var{innerRef:n,initialOptions:i,isDisabled:s,onSelect:a,onToggle:l,toggleContent:r,toggleWidth:c="200px",toggleProps:d}=e,u=o(e,["innerRef","initialOptions","isDisabled","onSelect","onToggle","toggleContent","toggleWidth","toggleProps"]);const[p,f]=t.useState(!1),[m,h]=t.useState([]);t.useEffect((()=>{var e;const t=null==i?void 0:i.filter((e=>e.selected));h(null!==(e=null==t?void 0:t.map((e=>String(e.value))))&&void 0!==e?e:[])}),[i]);const b=null==i?void 0:i.map((e=>{const{content:t,value:n}=e,i=o(e,["content","value"]),s=m.includes(`${n}`);return g.jsx(Kn,Object.assign({value:n,hasCheckbox:!0,isSelected:s},i,{children:t}),n)})),v=()=>{l&&l(!p),f(!p)},x=g.jsxs(g.Fragment,{children:["Filter by status",m.length>0&&g.jsx(sn,{isRead:!0,children:m.length})]});return g.jsx(Gn,Object.assign({isOpen:p,selected:m,onSelect:(e,t)=>{const n=`${t}`;m.includes(n)?h((e=>e.filter((e=>e!==n)))):h((e=>[...e,n])),a&&a(e,t)},onOpenChange:e=>{l&&l(e),f(e)},toggle:e=>g.jsx(Bn,Object.assign({ref:e,onClick:v,isExpanded:p,isDisabled:s,style:{width:c}},d,{children:r||x})),ref:n,role:"menu"},u,{children:g.jsx(Xn,{children:b})}))},ei=t.forwardRef(((e,t)=>g.jsx(Qn,Object.assign({},e,{innerRef:t}))));var ti={modifiers:{disabled:"pf-m-disabled",plain:"pf-m-plain",success:"pf-m-success",warning:"pf-m-warning",error:"pf-m-error",status:"pf-m-status",icon:"pf-m-icon",hint:"pf-m-hint"},textInputGroup:"pf-v6-c-text-input-group",textInputGroupIcon:"pf-v6-c-text-input-group__icon",textInputGroupMain:"pf-v6-c-text-input-group__main",textInputGroupText:"pf-v6-c-text-input-group__text",textInputGroupTextInput:"pf-v6-c-text-input-group__text-input",textInputGroupUtilities:"pf-v6-c-text-input-group__utilities"};const ni=t.createContext({isDisabled:!1}),ii=e=>{var{children:n,className:i,isDisabled:s,isPlain:a,validated:l,innerRef:r}=e,c=o(e,["children","className","isDisabled","isPlain","validated","innerRef"]);const d=t.useRef(null),u=r||d,p=["success","error","warning"].includes(l);return g.jsx(ni.Provider,{value:{isDisabled:s,validated:l},children:g.jsx("div",Object.assign({ref:u,className:h(ti.textInputGroup,s&&ti.modifiers.disabled,a&&ti.modifiers.plain,p&&ti.modifiers[l],i)},c,{children:n}))})};ii.displayName="TextInputGroup";const si=e=>{var{children:t,className:n,isStatus:i}=e,s=o(e,["children","className","isStatus"]);return g.jsx("span",Object.assign({className:h(ti.textInputGroupIcon,i&&ti.modifiers.status,n)},s,{children:t}))};si.displayName="TextInputGroupIcon";const oi=e=>{var{children:n,className:i,icon:s,type:a="text",hint:l,onChange:r=(()=>{}),onFocus:c,onBlur:d,"aria-label":u="Type to filter",value:p,placeholder:f,innerRef:m,name:b,"aria-activedescendant":v,role:x,isExpanded:y,"aria-controls":O,inputId:j,inputProps:w}=e,N=o(e,["children","className","icon","type","hint","onChange","onFocus","onBlur","aria-label","value","placeholder","innerRef","name","aria-activedescendant","role","isExpanded","aria-controls","inputId","inputProps"]);const{isDisabled:C,validated:S}=t.useContext(ni),I=t.useRef(null),E=m||I,D=["success","error","warning"].includes(S),k=(()=>{if(D)return"error"===S?G.danger:"success"===S?G.success:G.warning})();return g.jsxs("div",Object.assign({className:h(ti.textInputGroupMain,s&&ti.modifiers.icon,i)},N,{children:[n,g.jsxs("span",{className:h(ti.textInputGroupText),children:[l&&g.jsx("input",{className:h(ti.textInputGroupTextInput,ti.modifiers.hint),type:"text",disabled:!0,"aria-hidden":"true",value:l,id:j}),s&&g.jsx(si,{children:s}),g.jsx("input",Object.assign({ref:E,type:a,className:h(ti.textInputGroupTextInput),"aria-label":u,disabled:C,onChange:e=>{r(e,e.currentTarget.value)},onFocus:c,onBlur:d,value:p||"",placeholder:f,name:b,"aria-activedescendant":v,id:j},x&&{role:x},void 0!==y&&{"aria-expanded":y},O&&{"aria-controls":O},w)),D&&g.jsx(si,{isStatus:!0,children:g.jsx(k,{})})]})]}))},ai=t.forwardRef(((e,t)=>g.jsx(oi,Object.assign({innerRef:t},e))));ai.displayName="TextInputGroupMain";const li=e=>{var{children:t,className:n}=e,i=o(e,["children","className"]);return g.jsx("div",Object.assign({className:h(ti.textInputGroupUtilities,n)},i,{children:t}))};li.displayName="TextInputGroupUtilities";const ri=F({name:"RhMicronsCloseIcon",icon:{xOffset:0,yOffset:0,width:20,height:20,svgPathData:"M17.8 16.2 11.59 10l6.21-6.21c.42-.46.39-1.17-.07-1.59-.43-.4-1.09-.4-1.52 0l-6.2 6.2-6.22-6.19c-.44-.44-1.15-.44-1.59 0-.44.44-.44 1.15 0 1.59l6.2 6.21-6.2 6.2c-.42.46-.39 1.17.07 1.59.43.4 1.09.4 1.52 0L10 11.59l6.2 6.2c.44.44 1.15.44 1.59 0 .44-.45.44-1.16 0-1.6Z"},rhUiIcon:null}),ci=e=>`No results found for "${e}"`,di=e=>`Create "${e}"`,ui=e=>{var n,i,s,a,{innerRef:l,initialOptions:r,onSelect:c,onToggle:d,onInputChange:u,onInputKeyDown:p,onClearSelection:f,placeholder:m="Select an option",noOptionsAvailableMessage:h="No options are available",noOptionsFoundMessage:b=ci,isCreatable:v=!1,isCreateOptionOnTop:x=!1,createOptionMessage:y=di,isDisabled:O,toggleWidth:j,toggleProps:w}=e,N=o(e,["innerRef","initialOptions","onSelect","onToggle","onInputChange","onInputKeyDown","onClearSelection","placeholder","noOptionsAvailableMessage","noOptionsFoundMessage","isCreatable","isCreateOptionOnTop","createOptionMessage","isDisabled","toggleWidth","toggleProps"]);const[C,S]=t.useState(!1),[I,E]=t.useState(String(null!==(i=null===(n=r.find((e=>e.selected)))||void 0===n?void 0:n.content)&&void 0!==i?i:"")),[D,k]=t.useState(String(null!==(a=null===(s=r.find((e=>e.selected)))||void 0===s?void 0:s.content)&&void 0!==a?a:"")),[R,T]=t.useState(""),[M,L]=t.useState(r),[P,_]=t.useState(null),[A,F]=t.useState(null),H=t.useRef(void 0),B="no results";t.useEffect((()=>{let e=r;if(R){if(e=r.filter((e=>String(e.content).toLowerCase().includes(R.toLowerCase()))),v&&R&&!r.find((e=>String(e.content).toLowerCase()===R.toLowerCase()))){const t={content:"string"==typeof y?y:y(R),value:R};e=x?[t,...e]:[...e,t]}e.length||(e=[{isAriaDisabled:!0,content:"string"==typeof b?b:b(R),value:B}]),W()}e.length||(e=[{isAriaDisabled:!0,content:h,value:B}]),L(e)}),[R,r,b,v,x,y,h]),t.useEffect((()=>{var e;const t=r.find((e=>e.selected));D===I&&(null==t?void 0:t.value)!==I&&k(String(null!==(e=null==t?void 0:t.content)&&void 0!==e?e:""))}),[r]);const $=()=>{_(null),F(null)},W=()=>{C||(d&&d(!0),S(!0))},U=(e=!0)=>{if(d&&d(!1),S(!1),$(),e){const e=r.find((e=>e.value===I));e&&k(String(e.content)),T("")}},V=()=>{C?D||U():W()},z=(e,t)=>{c&&c(e,t.value),k(String(t.content)),T(""),E(String(t.value)),U(!1)},q=(e,t)=>{k(t),u&&u(t),T(t),$()},G=e=>{let t=0;if(W(),!M.every((e=>e.isDisabled))){if("ArrowUp"===e)for(t=null===P||0===P?M.length-1:P-1;M[t].isDisabled;)t--,-1===t&&(t=M.length-1);if("ArrowDown"===e)for(t=null===P||P===M.length-1?0:P+1;M[t].isDisabled;)t++,t===M.length&&(t=0);(e=>{_(e);const t=M[e];F(String(t.value))})(t)}},X=e=>{p?p(e):(e=>{const t=null!==P?M[P]:null;switch(e.key){case"Enter":e.preventDefault(),C&&t&&t.value!==B&&!t.isAriaDisabled&&z(e,t),W();break;case"ArrowUp":case"ArrowDown":e.preventDefault(),G(e.key)}})(e)},Z=()=>{var e;d&&d(!C),S(!C),null===(e=H.current)||void 0===e||e.focus()},K=()=>{var e;E(""),k(""),u&&u(""),T(""),$(),null===(e=H.current)||void 0===e||e.focus(),f&&f()};return g.jsx(Gn,Object.assign({isOpen:C,selected:I,onSelect:(e,t)=>{if(t&&t!==B){const n=M.find((e=>e.value===t));z(e,n)}},onOpenChange:e=>{!e&&U()},toggle:e=>g.jsx(Bn,Object.assign({ref:e,variant:"typeahead","aria-label":"Typeahead menu toggle",onClick:Z,isExpanded:C,isDisabled:O,isFullWidth:!0,style:{width:j}},w,{children:g.jsxs(ii,{isPlain:!0,children:[g.jsx(ai,Object.assign({value:D,onClick:V,onChange:q,onKeyDown:X,autoComplete:"off",innerRef:H,placeholder:m},A&&{"aria-activedescendant":A},{role:"combobox",isExpanded:C,"aria-controls":"select-typeahead-listbox"})),g.jsx(li,Object.assign({},D?{}:{style:{display:"none"}},{children:g.jsx(mn,{variant:"plain",onClick:K,"aria-label":"Clear input value",icon:g.jsx(ri,{})})}))]})})),variant:"typeahead",ref:l},N,{children:g.jsx(Xn,{children:M.map(((e,t)=>{const{content:n,value:i}=e,s=o(e,["content","value"]);return g.jsx(Kn,Object.assign({value:i,isFocused:P===t},s,{children:n}),i)}))})}))};ui.displayName="TypeaheadSelectBase";const pi=t.forwardRef(((e,t)=>g.jsx(ui,Object.assign({},e,{innerRef:t}))));pi.displayName="TypeaheadSelect";var fi={label:"pf-v6-c-label",labelActions:"pf-v6-c-label__actions",labelContent:"pf-v6-c-label__content",labelIcon:"pf-v6-c-label__icon",labelText:"pf-v6-c-label__text",modifiers:{blue:"pf-m-blue",red:"pf-m-red",orange:"pf-m-orange",orangered:"pf-m-orangered",yellow:"pf-m-yellow",green:"pf-m-green",teal:"pf-m-teal",purple:"pf-m-purple",success:"pf-m-success",warning:"pf-m-warning",danger:"pf-m-danger",info:"pf-m-info",custom:"pf-m-custom",compact:"pf-m-compact",filled:"pf-m-filled",outline:"pf-m-outline",editable:"pf-m-editable",editableActive:"pf-m-editable-active",overflow:"pf-m-overflow",add:"pf-m-add",clickable:"pf-m-clickable",disabled:"pf-m-disabled"}},mi="pf-v6-c-label-group",gi="pf-v6-c-label-group__close",hi="pf-v6-c-label-group__label",bi="pf-v6-c-label-group__list",vi="pf-v6-c-label-group__list-item",xi="pf-v6-c-label-group__main",yi="pf-v6-c-label-group__textarea",Oi={category:"pf-m-category",vertical:"pf-m-vertical",editable:"pf-m-editable",textarea:"pf-m-textarea"};const ji="--pf-v6-c-label__text--MaxWidth";var wi,Ni;!function(e){e.success="success",e.warning="warning",e.danger="danger",e.info="info",e.custom="custom"}(wi||(wi={})),function(e){e.blue="blue",e.teal="teal",e.green="green",e.orange="orange",e.purple="purple",e.red="red",e.orangered="orangered",e.grey="grey",e.yellow="yellow"}(Ni||(Ni={}));const Ci={[Ni.blue]:fi.modifiers.blue,[Ni.teal]:fi.modifiers.teal,[Ni.green]:fi.modifiers.green,[Ni.orange]:fi.modifiers.orange,[Ni.purple]:fi.modifiers.purple,[Ni.red]:fi.modifiers.red,[Ni.orangered]:fi.modifiers.orangered,[Ni.yellow]:fi.modifiers.yellow,[Ni.grey]:""},Si={[wi.success]:g.jsx(H,{}),[wi.warning]:g.jsx($,{}),[wi.danger]:g.jsx(B,{}),[wi.info]:g.jsx(W,{}),[wi.custom]:g.jsx(U,{})},Ii=e=>{var{children:n,className:i="",color:s=Ni.grey,variant:a="filled",status:l,isCompact:r=!1,isDisabled:c=!1,isEditable:d=!1,isClickable:u=!1,editableProps:p,textMaxWidth:f,tooltipPosition:m,icon:b,onClose:v,onClick:x,onEditCancel:y,onEditComplete:O,closeBtn:j,closeBtnAriaLabel:w,closeBtnProps:N,href:C,render:S}=e,I=o(e,["children","className","color","variant","status","isCompact","isDisabled","isEditable","isClickable","editableProps","textMaxWidth","tooltipPosition","icon","onClose","onClick","onEditCancel","onEditComplete","closeBtn","closeBtnAriaLabel","closeBtnProps","href","render"]);const[E,D]=t.useState(!1),[k,R]=t.useState(n),T=t.useRef(void 0),M=t.useRef(void 0),L="overflow"===a,P="add"===a,_=u||x&&!L&&!P||C;let A;l&&(A=Si[l]),b&&(A=b),t.useEffect((()=>{const e=e=>{E&&M&&M.current&&!M.current.contains(e.target)&&(M.current.value&&O&&O(e,M.current.value),D(!1))},t=e=>{var t,i;const s=e.key;if((E||T&&T.current&&T.current.contains(e.target))&&(!E||M&&M.current&&M.current.contains(e.target))&&(!E||"Enter"!==s&&"Tab"!==s||(e.preventDefault(),e.stopImmediatePropagation(),M.current.value&&O&&O(e,M.current.value),D(!1),null===(t=null==T?void 0:T.current)||void 0===t||t.focus()),E&&"Escape"===s&&(e.preventDefault(),e.stopImmediatePropagation(),M.current.value&&(M.current.value=n,y&&y(e,n)),D(!1),null===(i=null==T?void 0:T.current)||void 0===i||i.focus()),!E&&"Enter"===s)){e.preventDefault(),e.stopImmediatePropagation(),D(!0);const t=e.target,n=document.createRange(),i=window.getSelection();n.selectNodeContents(t),n.collapse(!1),i.removeAllRanges(),i.addRange(n)}};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}}),[E,M,T,O,y,n]),t.useEffect((()=>{x&&C?console.warn("Link labels cannot have onClick passed, this results in invalid HTML. Please remove either the href or onClick prop."):x&&d&&console.warn("Editable labels cannot have onClick passed, clicking starts the label edit process. Please remove either the isEditable or onClick prop.")}),[x,C,d]);const F=(C||x)&&c,H=g.jsx(mn,Object.assign({type:"button",variant:"plain",hasNoPadding:!0,onClick:v,"aria-label":w||`Close ${n}`},F&&{isDisabled:!0},N,{icon:g.jsx(ri,{})})),B=g.jsx("span",{className:h(fi.labelActions),children:j||H}),$=t.createRef(),W=t.useRef(void 0),[U,V]=t.useState(!1);bt((()=>{const e=d?T:$;E||V(e.current&&e.current.offsetWidth<e.current.scrollWidth)}),[E]);const z=g.jsxs(t.Fragment,{children:[A&&g.jsx("span",{className:h(fi.labelIcon),children:A}),g.jsx("span",Object.assign({ref:$,className:h(fi.labelText)},f&&{style:{[ji]:f}},{children:n}))]});t.useEffect((()=>{E&&M&&M.current&&M.current.focus()}),[M,E]);let q="span";C?q="a":(d||x&&!L&&!P)&&(q="button");const G={type:"button",onClick:x},X="button"===q,Z=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({className:h(fi.labelContent,_&&fi.modifiers.clickable)},U&&{tabIndex:0}),C&&{href:C}),C&&c&&{onClick:e=>e.preventDefault()}),X&&G),d&&Object.assign({ref:T,onClick:e=>{D(!0),e.stopPropagation()}},p)),F&&X&&{disabled:!0}),F&&C&&{tabIndex:-1,"aria-disabled":!0});let K=g.jsx(q,Object.assign({},Z,{children:z}));S?K=g.jsxs(t.Fragment,{children:[U&&g.jsx(Cn,{triggerRef:W,content:n,position:m}),S({className:fi.labelContent,content:z,componentRef:W})]}):U&&(K=g.jsx(Cn,{content:n,position:m,children:K}));const Y=L||P?"button":"span";return g.jsxs(Y,Object.assign({},I,{className:h(fi.label,F&&fi.modifiers.disabled,Ci[s],"filled"===a&&fi.modifiers.filled,"outline"===a&&fi.modifiers.outline,l&&fi.modifiers[l],L&&fi.modifiers.overflow,r&&fi.modifiers.compact,d&&Oi.editable,E&&fi.modifiers.editableActive,_&&fi.modifiers.clickable,P&&fi.modifiers.add,i),onClick:L||P?x:void 0},"button"===Y&&{type:"button"},{children:[!E&&K,!E&&v&&B,E&&g.jsx("input",Object.assign({className:h(fi.labelContent),type:"text",id:"editable-input",ref:M,value:k,onChange:()=>{R(M.current.value)}},p))]}))};Ii.displayName="Label";class Ei extends t.Component{constructor(e){super(e),this.headingRef=t.createRef(),this.toggleCollapse=()=>{this.setState((e=>({isOpen:!e.isOpen,isTooltipVisible:Boolean(this.headingRef.current&&this.headingRef.current.offsetWidth<this.headingRef.current.scrollWidth)})))},this.state={isOpen:this.props.defaultIsOpen,isTooltipVisible:!1}}componentDidMount(){this.setState({isTooltipVisible:Boolean(this.headingRef.current&&this.headingRef.current.offsetWidth<this.headingRef.current.scrollWidth)})}renderLabel(e){const{categoryName:t,tooltipPosition:n}=this.props,{isTooltipVisible:i}=this.state;return i?g.jsx(Cn,{position:n,content:t,children:g.jsx("span",{tabIndex:0,ref:this.headingRef,className:h(hi),children:g.jsx("span",{"aria-hidden":"true",id:e,children:t})})}):g.jsx("span",{ref:this.headingRef,className:h(hi),"aria-hidden":"true",id:e,children:t})}render(){const e=this.props,{categoryName:n,children:i,className:s,isClosable:a,isCompact:l,closeBtnAriaLabel:r,"aria-label":c,onClick:d,numLabels:u,expandedText:p,collapsedText:f,defaultIsOpen:m,tooltipPosition:b,isVertical:v,isEditable:x,hasEditableTextArea:y,editableTextAreaProps:O,addLabelControl:j}=e,w=o(e,["categoryName","children","className","isClosable","isCompact","closeBtnAriaLabel","aria-label","onClick","numLabels","expandedText","collapsedText","defaultIsOpen","tooltipPosition","isVertical","isEditable","hasEditableTextArea","editableTextAreaProps","addLabelControl"]),{isOpen:N}=this.state,C=t.Children.toArray(i),S=C.length,I=(E={remaining:S-u},f.replace(/\${(.*?)}/g,((e,t)=>E[t]||"")));var E;const D=e=>{const i=N?C:C.slice(0,u),o=g.jsxs(t.Fragment,{children:[n&&this.renderLabel(e),g.jsxs("ul",Object.assign({className:h(bi)},n&&{"aria-labelledby":e},!n&&{"aria-label":c},{role:"list"},w,{children:[i.map(((e,t)=>g.jsx("li",{className:h(vi),children:e},t))),S>u&&g.jsx("li",{className:h(vi),children:g.jsx(Ii,{variant:"overflow",onClick:this.toggleCollapse,className:h(l&&fi.modifiers.compact),children:N?p:I})}),j&&g.jsx("li",{className:h(vi),children:j}),x&&y&&g.jsx("li",{className:h(vi,Oi.textarea),children:g.jsx("textarea",Object.assign({className:h(yi),rows:1,tabIndex:0},O))})]}))]}),f=g.jsx("div",{className:h(gi),children:g.jsx(mn,{variant:"plain",size:"sm","aria-label":r,onClick:d,id:`remove_group_${e}`,"aria-labelledby":`remove_group_${e} ${e}`,icon:g.jsx(ri,{})})});return g.jsxs("div",{className:h(mi,s,n&&Oi.category,v&&Oi.vertical,x&&Oi.editable),children:[g.jsx("div",{className:h(xi),children:o}),a&&f]})};return 0===S&&void 0===j?null:g.jsx(Y,{children:e=>D(this.props.id||e)})}}Ei.displayName="LabelGroup",Ei.defaultProps={expandedText:"Show Less",collapsedText:"${remaining} more",categoryName:"",defaultIsOpen:!1,numLabels:3,isClosable:!1,isCompact:!1,onClick:e=>{},closeBtnAriaLabel:"Close label group",tooltipPosition:"top","aria-label":"Label group category",isVertical:!1,isEditable:!1,hasEditableTextArea:!1};const Di=e=>{var n,{innerRef:i,initialOptions:s,onSelectionChange:a,onToggle:l,onInputChange:r,onInputKeyDown:c,placeholder:d="Select an option",noOptionsFoundMessage:u=(e=>`No results found for "${e}"`),isDisabled:p,toggleWidth:f,toggleProps:m,labelProps:h,initialInputValue:b}=e,v=o(e,["innerRef","initialOptions","onSelectionChange","onToggle","onInputChange","onInputKeyDown","placeholder","noOptionsFoundMessage","isDisabled","toggleWidth","toggleProps","labelProps","initialInputValue"]);const[x,y]=t.useState(!1),[O,j]=t.useState((null!==(n=null==s?void 0:s.filter((e=>e.selected)))&&void 0!==n?n:[]).map((e=>e.value))),[w,N]=t.useState(b),[C,S]=t.useState(s),[I,E]=t.useState(null),[D,k]=t.useState(null),R=t.useRef(void 0),T="no results",M=()=>{l&&l(!0),y(!0)};t.useEffect((()=>{let e=s;w&&(e=s.filter((e=>String(e.content).toLowerCase().includes(w.toLowerCase()))),e.length||(e=[{isAriaDisabled:!0,content:"string"==typeof u?u:u(w),value:T}])),S(e)}),[w,s]),t.useEffect((()=>{var e;return j((null!==(e=null==s?void 0:s.filter((e=>e.selected)))&&void 0!==e?e:[]).map((e=>e.value)))}),[s]);const L=()=>{E(null),k(null)},P=()=>{l&&l(!1),y(!1),L(),N("")},_=()=>{x?w||P():M()},A=(e,t)=>{const n=O.includes(t)?O.filter((e=>t!==e)):[...O,t];a&&a(e,n),j(n)},F=(e,t)=>{N(t),r&&r(t),t&&!x&&M(),L()},H=e=>{let t=0;if(x||M(),!C.every((e=>e.isDisabled))){if("ArrowUp"===e)for(t=null===I||0===I?C.length-1:I-1;C[t].isDisabled;)t--,-1===t&&(t=C.length-1);if("ArrowDown"===e)for(t=null===I||I===C.length-1?0:I+1;C[t].isDisabled;)t++,t===C.length&&(t=0);(e=>{E(e);const t=C[e];k(t.value)})(t)}},B=e=>{c?c(e):(e=>{const t=null!==I?C[I]:null;switch(e.key){case"Enter":e.preventDefault(),x&&t&&t.value!==T&&!t.isAriaDisabled&&A(e,null==t?void 0:t.value),x||(l&&l(!0),y(!0));break;case"ArrowUp":case"ArrowDown":e.preventDefault(),H(e.key)}})(e)},$=()=>{var e;l&&l(!x),y(!x),null===(e=null==R?void 0:R.current)||void 0===e||e.focus()},W=e=>{var t;j([]),r&&r(""),L(),null===(t=null==R?void 0:R.current)||void 0===t||t.focus(),a&&a(e,[])};return g.jsx(Gn,Object.assign({isOpen:x,selected:O,onSelect:(e,t)=>{t&&t!==T&&A(e,t)},onOpenChange:e=>{!e&&P()},toggle:e=>g.jsx(Bn,Object.assign({ref:e,variant:"typeahead","aria-label":"Multi select Typeahead menu toggle",onClick:$,isExpanded:x,isDisabled:p,isFullWidth:!0,style:{width:f}},m,{children:g.jsxs(ii,{isPlain:!0,children:[g.jsx(ai,Object.assign({value:w,onClick:_,onChange:F,onKeyDown:B,autoComplete:"off",innerRef:R,placeholder:d},D&&{"aria-activedescendant":D},{role:"combobox",isExpanded:x,"aria-controls":"select-typeahead-listbox",children:g.jsx(Ei,{"aria-label":"Current selections",children:O.map(((e,t)=>{var n;return g.jsx(Ii,Object.assign({"datatest-id":`${e}-chip`,onClose:t=>{t.stopPropagation(),((e,t)=>{const n=O.filter((e=>t!==e));a&&a(e,n),j(n)})(t,e)}},h,{children:null===(n=s.find((t=>t.value===e)))||void 0===n?void 0:n.content}),t)}))})})),g.jsx(li,Object.assign({},0===O.length?{style:{display:"none"}}:{},{children:g.jsx(mn,{variant:"plain",onClick:W,"aria-label":"Clear input value",children:g.jsx(ri,{})})}))]})})),variant:"typeahead",ref:i},v,{children:g.jsx(Xn,{children:C.map(((e,t)=>{const{content:n,value:i}=e,s=o(e,["content","value"]);return g.jsx(Kn,Object.assign({value:i,isFocused:I===t},s,{children:n}),i)}))})}))};Di.displayName="MultiTypeaheadSelectBase";const ki=t.forwardRef(((e,t)=>g.jsx(Di,Object.assign({},e,{innerRef:t}))));ki.displayName="MultiTypeaheadSelect",e.CheckboxSelect=ei,e.MultiTypeaheadSelect=ki,e.MultiTypeaheadSelectBase=Di,e.SimpleDropdown=zn,e.SimpleSelect=Jn,e.TypeaheadSelect=pi,e.TypeaheadSelectBase=ui}));
|