@patternfly/react-core
Version:
This library provides a set of common React components for use with the PatternFly reference implementation.
11 lines • 556 kB
JavaScript
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).PatternFlyReact={},e.React,e.ReactDOM)}(this,(function(e,n,t){"use strict";function a(e){var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var i=a(t);function s(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(t[a[i]]=e[a[i]])}return t}function l(e,n,t,a){return new(t||(t=Promise))((function(i,s){function l(e){try{r(a.next(e))}catch(e){s(e)}}function o(e){try{r(a.throw(e))}catch(e){s(e)}}function r(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(l,o)}r((a=a.apply(e,n||[])).next())}))}function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var r={exports:{}},c={},d=n,p=Symbol.for("react.element"),m=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,u=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function h(e,n,t){var a,i={},s=null,l=null;for(a in void 0!==t&&(s=""+t),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(l=n.ref),n)f.call(n,a)&&!g.hasOwnProperty(a)&&(i[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps)void 0===i[a]&&(i[a]=n[a]);return{$$typeof:p,type:e,key:s,ref:l,props:i,_owner:u.current}}c.Fragment=m,c.jsx=h,c.jsxs=h,r.exports=c;var x=r.exports;function v(...e){const n=[],t={}.hasOwnProperty;return e.filter(Boolean).forEach((e=>{const a=typeof e;if("string"===a||"number"===a)n.push(e);else if(Array.isArray(e)&&e.length){const t=v(...e);t&&n.push(t)}else if("object"===a)for(const a in e)t.call(e,a)&&e[a]&&n.push(a)})),n.join(" ")}const b="--pf-v6-c-about-modal-box--BackgroundImage";var y="pf-v6-c-about-modal-box",O="pf-v6-c-about-modal-box__brand",w="pf-v6-c-about-modal-box__brand-image",j="pf-v6-c-about-modal-box__close",N="pf-v6-c-about-modal-box__content",C="pf-v6-c-about-modal-box__header",S="pf-v6-c-about-modal-box__strapline",_="pf-v6-c-content",L="pf-v6-c-content--a",k="pf-v6-c-content--blockquote",I="pf-v6-c-content--dd",T="pf-v6-c-content--dl",E="pf-v6-c-content--dt",R="pf-v6-c-content--h1",M="pf-v6-c-content--h2",D="pf-v6-c-content--h3",P="pf-v6-c-content--h4",A="pf-v6-c-content--h5",B="pf-v6-c-content--h6",F="pf-v6-c-content--hr",z="pf-v6-c-content--li",G="pf-v6-c-content--ol",V="pf-v6-c-content--p",H="pf-v6-c-content--pre",X="pf-v6-c-content--small",$="pf-v6-c-content--ul",W={editorial:"pf-m-editorial",visited:"pf-m-visited",plain:"pf-m-plain"};const q=e=>{var{children:n,trademark:t,hasNoContentContainer:a=!1}=e,i=s(e,["children","trademark","hasNoContentContainer"]);return x.jsxs("div",Object.assign({className:v(N)},i,{children:[x.jsx("div",{className:v(`${y}__body`),children:a?n:x.jsx("div",{className:v(_),children:n})}),x.jsx("p",{className:v(S),children:t})]}))};q.displayName="AboutModalBoxContent";var U={modifiers:{"4xl":"pf-m-4xl","3xl":"pf-m-3xl","2xl":"pf-m-2xl",xl:"pf-m-xl",lg:"pf-m-lg",md:"pf-m-md",h1:"pf-m-h1",h2:"pf-m-h2",h3:"pf-m-h3",h4:"pf-m-h4",h5:"pf-m-h5",h6:"pf-m-h6",pageTitle:"pf-m-page-title"},title:"pf-v6-c-title"};const K="48rem",Y="62rem",Z="75rem",J="90.625rem";let Q=0;function ee({name:e,xOffset:t=0,yOffset:a=0,width:i,height:l,svgPath:o,svgClassName:r}){var c;return c=class extends n.Component{constructor(){super(...arguments),this.id="icon-title-"+Q++}render(){const e=this.props,{title:n,className:r}=e,c=s(e,["title","className"]),d=Boolean(n),p=[t,a,i,l].join(" "),m=["pf-v6-svg"];return r&&m.push(r),x.jsxs("svg",Object.assign({className:m.join(" "),viewBox:p,fill:"currentColor","aria-labelledby":d?this.id:null,"aria-hidden":!d||null,role:"img",width:"1em",height:"1em"},c,{children:[d&&x.jsx("title",{id:this.id,children:n}),Array.isArray(o)?o.map(((e,n)=>x.jsx("path",{className:e.className,d:e.path},`${e.path}-${n}`))):x.jsx("path",{d:o})]}))}},c.displayName=e,c}const ne=ee({name:"CheckCircleIcon",height:512,width:512,svgPath:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z",yOffset:0,xOffset:0,svgClassName:void 0}),te=ee({name:"ExclamationCircleIcon",height:512,width:512,svgPath:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z",yOffset:0,xOffset:0,svgClassName:void 0}),ae=ee({name:"ExclamationTriangleIcon",height:512,width:576,svgPath:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z",yOffset:0,xOffset:0,svgClassName:void 0}),ie=ee({name:"InfoCircleIcon",height:512,width:512,svgPath:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z",yOffset:0,xOffset:0,svgClassName:void 0}),se=ee({name:"BellIcon",height:1024,width:896,svgPath:"M448,0 C465.333333,0 480.333333,6.33333333 493,19 C505.666667,31.6666667 512,46.6666667 512,64 L512,106 L514.23,106.45 C587.89,121.39 648.48,157.24 696,214 C744,271.333333 768,338.666667 768,416 C768,500 780,568.666667 804,622 C818.666667,652.666667 841.333333,684 872,716 C873.773676,718.829136 875.780658,721.505113 878,724 C890,737.333333 896,752.333333 896,769 C896,785.666667 890,800.333333 878,813 C866,825.666667 850.666667,832 832,832 L63.3,832 C44.9533333,831.84 29.8533333,825.506667 18,813 C6,800.333333 0,785.666667 0,769 C0,752.333333 6,737.333333 18,724 L24,716 L25.06,714.9 C55.1933333,683.28 77.5066667,652.313333 92,622 C116,568.666667 128,500 128,416 C128,338.666667 152,271.333333 200,214 C248,156.666667 309.333333,120.666667 384,106 L384,63.31 C384.166667,46.27 390.5,31.5 403,19 C415.666667,6.33333333 430.666667,0 448,0 Z M576,896 L576,897.08 C575.74,932.6 563.073333,962.573333 538,987 C512.666667,1011.66667 482.666667,1024 448,1024 C413.333333,1024 383.333333,1011.66667 358,987 C332.666667,962.333333 320,932 320,896 L576,896 Z",yOffset:0,xOffset:0,svgClassName:void 0}),le={RIGHT:"right",LEFT:"left",BOTH:"both",NONE:"none"};var oe;e.ValidatedOptions=void 0,(oe=e.ValidatedOptions||(e.ValidatedOptions={})).success="success",oe.error="error",oe.warning="warning",oe.default="default";const re={Tab:"Tab",Space:" ",Escape:"Escape",Enter:"Enter",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},ce={sm:16*parseInt("36rem"),md:16*parseInt(K),lg:16*parseInt(Y),xl:16*parseInt(Z),"2xl":16*parseInt(J)},de={sm:16*parseInt("0rem"),md:16*parseInt("40rem"),lg:16*parseInt("48rem"),xl:16*parseInt("60rem"),"2xl":16*parseInt("80rem")},pe={success:ne,danger:te,warning:ae,info:ie,custom:se};
/*!
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/
var me=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],fe=me.join(","),ue="undefined"==typeof Element,ge=ue?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,he=!ue&&Element.prototype.getRootNode?function(e){var n;return null==e||null===(n=e.getRootNode)||void 0===n?void 0:n.call(e)}:function(e){return null==e?void 0:e.ownerDocument},xe=function e(n,t){var a;void 0===t&&(t=!0);var i=null==n||null===(a=n.getAttribute)||void 0===a?void 0:a.call(n,"inert");return""===i||"true"===i||t&&n&&e(n.parentNode)},ve=function(e,n,t){if(xe(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(fe));return n&&ge.call(e,fe)&&a.unshift(e),a=a.filter(t)},be=function e(n,t,a){for(var i=[],s=Array.from(n);s.length;){var l=s.shift();if(!xe(l,!1))if("SLOT"===l.tagName){var o=l.assignedElements(),r=e(o.length?o:l.children,!0,a);a.flatten?i.push.apply(i,r):i.push({scopeParent:l,candidates:r})}else{ge.call(l,fe)&&a.filter(l)&&(t||!n.includes(l))&&i.push(l);var c=l.shadowRoot||"function"==typeof a.getShadowRoot&&a.getShadowRoot(l),d=!xe(c,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(l));if(c&&d){var p=e(!0===c?l.children:c.children,!0,a);a.flatten?i.push.apply(i,p):i.push({scopeParent:l,candidates:p})}else s.unshift.apply(s,l.children)}}return i},ye=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Oe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var n,t=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"contenteditable");return""===t||"true"===t}(e))&&!ye(e)?0:e.tabIndex},we=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},je=function(e){return"INPUT"===e.tagName},Ne=function(e){return function(e){return je(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var n,t=e.form||he(e),a=function(e){return t.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)n=a(window.CSS.escape(e.name));else try{n=a(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=function(e,n){for(var t=0;t<e.length;t++)if(e[t].checked&&e[t].form===n)return e[t]}(n,e.form);return!i||i===e}(e)},Ce=function(e){var n=e.getBoundingClientRect(),t=n.width,a=n.height;return 0===t&&0===a},Se=function(e,n){var t=n.displayCheck,a=n.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=ge.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ge.call(i,"details:not([open]) *"))return!0;if(t&&"full"!==t&&"legacy-full"!==t){if("non-zero-area"===t)return Ce(e)}else{if("function"==typeof a){for(var s=e;e;){var l=e.parentElement,o=he(e);if(l&&!l.shadowRoot&&!0===a(l))return Ce(e);e=e.assignedSlot?e.assignedSlot:l||o===e.ownerDocument?l:o.host}e=s}if(function(e){var n,t,a,i,s=e&&he(e),l=null===(n=s)||void 0===n?void 0:n.host,o=!1;if(s&&s!==e)for(o=!!(null!==(t=l)&&void 0!==t&&null!==(a=t.ownerDocument)&&void 0!==a&&a.contains(l)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!o&&l;){var r,c,d;o=!(null===(c=l=null===(r=s=he(l))||void 0===r?void 0:r.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(l))}return o}(e))return!e.getClientRects().length;if("legacy-full"!==t)return!0}return!1},_e=function(e,n){return!(n.disabled||xe(n)||function(e){return je(e)&&"hidden"===e.type}(n)||Se(n,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(n)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if("FIELDSET"===n.tagName&&n.disabled){for(var t=0;t<n.children.length;t++){var a=n.children.item(t);if("LEGEND"===a.tagName)return!!ge.call(n,"fieldset[disabled] *")||!a.contains(e)}return!0}n=n.parentElement}return!1}(n))},Le=function(e,n){return!(Ne(n)||Oe(n)<0||!_e(e,n))},ke=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ie=function e(n){var t=[],a=[];return n.forEach((function(n,i){var s=!!n.scopeParent,l=s?n.scopeParent:n,o=function(e,n){var t=Oe(e);return t<0&&n&&!ye(e)?0:t}(l,s),r=s?e(n.candidates):l;0===o?s?t.push.apply(t,r):t.push(l):a.push({documentOrder:i,tabIndex:o,item:n,isScope:s,content:r})})),a.sort(we).reduce((function(e,n){return n.isScope?e.push.apply(e,n.content):e.push(n.content),e}),[]).concat(t)},Te=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return!1!==ge.call(e,fe)&&Le(n,e)},Ee=me.concat("iframe").join(","),Re=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return!1!==ge.call(e,Ee)&&_e(n,e)};
/*!
* focus-trap 7.6.4
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/
function Me(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function De(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,n);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Pe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function Ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(t),!0).forEach((function(n){De(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Be(e){return function(e){if(Array.isArray(e))return Me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return Me(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Me(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Fe=function(e,n){if(e.length>0){var t=e[e.length-1];t!==n&&t._setPausedState(!0)}var a=e.indexOf(n);-1===a||e.splice(a,1),e.push(n)},ze=function(e,n){var t=e.indexOf(n);-1!==t&&e.splice(t,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)},Ge=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},Ve=function(e){return Ge(e)&&!e.shiftKey},He=function(e){return Ge(e)&&e.shiftKey},Xe=function(e){return setTimeout(e,0)},$e=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];return"function"==typeof e?e.apply(void 0,t):e},We=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},qe=[],Ue=function(e,n){var t,a=(null==n?void 0:n.document)||document,i=(null==n?void 0:n.trapStack)||qe,s=Ae({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Ve,isKeyBackward:He},n),l={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o=function(e,n,t){return e&&void 0!==e[n]?e[n]:s[t||n]},r=function(e,n){var t="function"==typeof(null==n?void 0:n.composedPath)?n.composedPath():void 0;return l.containerGroups.findIndex((function(n){var a=n.container,i=n.tabbableNodes;return a.contains(e)||(null==t?void 0:t.includes(a))||i.find((function(n){return n===e}))}))},c=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.hasFallback,i=void 0!==t&&t,l=n.params,o=void 0===l?[]:l,r=s[e];if("function"==typeof r&&(r=r.apply(void 0,Be(o))),!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var c=r;if("string"==typeof r){try{c=a.querySelector(r)}catch(n){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(n.message,'"'))}if(!c&&!i)throw new Error("`".concat(e,"` as selector refers to no known node"))}return c},d=function(){var e=c("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!Re(e,s.tabbableOptions))if(r(a.activeElement)>=0)e=a.activeElement;else{var n=l.tabbableGroups[0];e=n&&n.firstTabbableNode||c("fallbackFocus")}else null===e&&(e=c("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},p=function(){if(l.containerGroups=l.containers.map((function(e){var n=function(e,n){var t;return t=(n=n||{}).getShadowRoot?be([e],n.includeContainer,{filter:Le.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ke}):ve(e,n.includeContainer,Le.bind(null,n)),Ie(t)}(e,s.tabbableOptions),t=function(e,n){return(n=n||{}).getShadowRoot?be([e],n.includeContainer,{filter:_e.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):ve(e,n.includeContainer,_e.bind(null,n))}(e,s.tabbableOptions),a=n.length>0?n[0]:void 0,i=n.length>0?n[n.length-1]:void 0,l=t.find((function(e){return Te(e)})),o=t.slice().reverse().find((function(e){return Te(e)})),r=!!n.find((function(e){return Oe(e)>0}));return{container:e,tabbableNodes:n,focusableNodes:t,posTabIndexesFound:r,firstTabbableNode:a,lastTabbableNode:i,firstDomTabbableNode:l,lastDomTabbableNode:o,nextTabbableNode:function(e){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=n.indexOf(e);return i<0?a?t.slice(t.indexOf(e)+1).find((function(e){return Te(e)})):t.slice(0,t.indexOf(e)).reverse().find((function(e){return Te(e)})):n[i+(a?1:-1)]}}})),l.tabbableGroups=l.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),l.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(l.containerGroups.find((function(e){return e.posTabIndexesFound}))&&l.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(e){var n=e.activeElement;if(n)return n.shadowRoot&&null!==n.shadowRoot.activeElement?m(n.shadowRoot):n},f=function(e){!1!==e&&e!==m(document)&&(e&&e.focus?(e.focus({preventScroll:!!s.preventScroll}),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):f(d()))},u=function(e){var n=c("setReturnFocus",{params:[e]});return n||!1!==n&&e},g=function(e){var n=e.target,t=e.event,a=e.isBackward,i=void 0!==a&&a;n=n||We(t),p();var o=null;if(l.tabbableGroups.length>0){var d=r(n,t),m=d>=0?l.containerGroups[d]:void 0;if(d<0)o=i?l.tabbableGroups[l.tabbableGroups.length-1].lastTabbableNode:l.tabbableGroups[0].firstTabbableNode;else if(i){var f=l.tabbableGroups.findIndex((function(e){var t=e.firstTabbableNode;return n===t}));if(f<0&&(m.container===n||Re(n,s.tabbableOptions)&&!Te(n,s.tabbableOptions)&&!m.nextTabbableNode(n,!1))&&(f=d),f>=0){var u=0===f?l.tabbableGroups.length-1:f-1,g=l.tabbableGroups[u];o=Oe(n)>=0?g.lastTabbableNode:g.lastDomTabbableNode}else Ge(t)||(o=m.nextTabbableNode(n,!1))}else{var h=l.tabbableGroups.findIndex((function(e){var t=e.lastTabbableNode;return n===t}));if(h<0&&(m.container===n||Re(n,s.tabbableOptions)&&!Te(n,s.tabbableOptions)&&!m.nextTabbableNode(n))&&(h=d),h>=0){var x=h===l.tabbableGroups.length-1?0:h+1,v=l.tabbableGroups[x];o=Oe(n)>=0?v.firstTabbableNode:v.firstDomTabbableNode}else Ge(t)||(o=m.nextTabbableNode(n))}}else o=c("fallbackFocus");return o},h=function(e){var n=We(e);r(n,e)>=0||($e(s.clickOutsideDeactivates,e)?t.deactivate({returnFocus:s.returnFocusOnDeactivate}):$e(s.allowOutsideClick,e)||e.preventDefault())},x=function(e){var n=We(e),t=r(n,e)>=0;if(t||n instanceof Document)t&&(l.mostRecentlyFocusedNode=n);else{var a;e.stopImmediatePropagation();var i=!0;if(l.mostRecentlyFocusedNode)if(Oe(l.mostRecentlyFocusedNode)>0){var o=r(l.mostRecentlyFocusedNode),c=l.containerGroups[o].tabbableNodes;if(c.length>0){var p=c.findIndex((function(e){return e===l.mostRecentlyFocusedNode}));p>=0&&(s.isKeyForward(l.recentNavEvent)?p+1<c.length&&(a=c[p+1],i=!1):p-1>=0&&(a=c[p-1],i=!1))}}else l.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return Oe(e)>0}))}))||(i=!1);else i=!1;i&&(a=g({target:l.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(l.recentNavEvent)})),f(a||(l.mostRecentlyFocusedNode||d()))}l.recentNavEvent=void 0},v=function(e){(s.isKeyForward(e)||s.isKeyBackward(e))&&function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l.recentNavEvent=e;var t=g({event:e,isBackward:n});t&&(Ge(e)&&e.preventDefault(),f(t))}(e,s.isKeyBackward(e))},b=function(e){var n;"Escape"!==(null==(n=e)?void 0:n.key)&&"Esc"!==(null==n?void 0:n.key)&&27!==(null==n?void 0:n.keyCode)||!1===$e(s.escapeDeactivates,e)||(e.preventDefault(),t.deactivate())},y=function(e){var n=We(e);r(n,e)>=0||$e(s.clickOutsideDeactivates,e)||$e(s.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},O=function(){if(l.active)return Fe(i,t),l.delayInitialFocusTimer=s.delayInitialFocus?Xe((function(){f(d())})):f(d()),a.addEventListener("focusin",x,!0),a.addEventListener("mousedown",h,{capture:!0,passive:!1}),a.addEventListener("touchstart",h,{capture:!0,passive:!1}),a.addEventListener("click",y,{capture:!0,passive:!1}),a.addEventListener("keydown",v,{capture:!0,passive:!1}),a.addEventListener("keydown",b),t},w=function(){if(l.active)return a.removeEventListener("focusin",x,!0),a.removeEventListener("mousedown",h,!0),a.removeEventListener("touchstart",h,!0),a.removeEventListener("click",y,!0),a.removeEventListener("keydown",v,!0),a.removeEventListener("keydown",b),t},j="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===l.mostRecentlyFocusedNode}))}))&&f(d())})):void 0,N=function(){j&&(j.disconnect(),l.active&&!l.paused&&l.containers.map((function(e){j.observe(e,{subtree:!0,childList:!0})})))};return t={get active(){return l.active},get paused(){return l.paused},activate:function(e){if(l.active)return this;var n=o(e,"onActivate"),t=o(e,"onPostActivate"),i=o(e,"checkCanFocusTrap");i||p(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=a.activeElement,null==n||n();var s=function(){i&&p(),O(),N(),null==t||t()};return i?(i(l.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(e){if(!l.active)return this;var n=Ae({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},e);clearTimeout(l.delayInitialFocusTimer),l.delayInitialFocusTimer=void 0,w(),l.active=!1,l.paused=!1,N(),ze(i,t);var a=o(n,"onDeactivate"),r=o(n,"onPostDeactivate"),c=o(n,"checkCanReturnFocus"),d=o(n,"returnFocus","returnFocusOnDeactivate");null==a||a();var p=function(){Xe((function(){d&&f(u(l.nodeFocusedBeforeActivation)),null==r||r()}))};return d&&c?(c(u(l.nodeFocusedBeforeActivation)).then(p,p),this):(p(),this)},pause:function(e){return l.active?(l.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return l.active?(l.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,e)):this},updateContainerElements:function(e){var n=[].concat(e).filter(Boolean);return l.containers=n.map((function(e){return"string"==typeof e?a.querySelector(e):e})),l.active&&p(),N(),this}},Object.defineProperties(t,{_isManuallyPaused:{value:function(){return l.manuallyPaused}},_setPausedState:{value:function(e,n){if(l.paused===e)return this;if(l.paused=e,e){var t=o(n,"onPause"),a=o(n,"onPostPause");null==t||t(),w(),N(),null==a||a()}else{var i=o(n,"onUnpause"),s=o(n,"onPostUnpause");null==i||i(),p(),O(),N(),null==s||s()}return this}}}),t.updateContainerElements(e),t};const Ke=n.forwardRef((function(e,t){var{active:a=!0,paused:i=!1,focusTrapOptions:l={},preventScrollOnDeactivate:o=!1}=e,r=s(e,["active","paused","focusTrapOptions","preventScrollOnDeactivate"]);const c=n.useRef(null);n.useImperativeHandle(t,(()=>c.current));const d=n.useRef(null);n.useEffect((()=>{const e=Ue(c.current,Object.assign(Object.assign({},l),{returnFocusOnDeactivate:!1}));return d.current=e,()=>{e.deactivate()}}),[]),n.useEffect((()=>{const e=d.current;a?null==e||e.activate():null==e||e.deactivate()}),[a]),n.useEffect((()=>{const e=d.current;i?null==e||e.pause():null==e||e.unpause()}),[i]);const p=n.useRef("undefined"!=typeof document?document.activeElement:null);return function(e){const t=n.useRef(e);t.current=e,n.useEffect((()=>()=>{t.current()}),[])}((()=>{!1!==l.returnFocusOnDeactivate&&p.current instanceof HTMLElement&&p.current.focus({preventScroll:o})})),x.jsx("div",Object.assign({ref:c},r))}));function Ye(e){return e[0].toUpperCase()+e.substring(1)}function Ze(e="pf"){return`${e}-${(new Date).getTime()+Math.random().toString(36).slice(2)}`}function Je(e,n){let t;return(...a)=>{clearTimeout(t),t=setTimeout((()=>e.apply(this,a)),n)}}function Qe(e,n,t,a=!1){if(!e||!n)return!1;const i=e.getBoundingClientRect(),s=n.getBoundingClientRect(),l=Math.ceil(i.left),o=Math.floor(i.right),r=Math.ceil(s.left),c=Math.floor(s.right),d=r>=l&&c<=o,p=(t||!a&&i.width<s.width)&&(r<l&&c>l||c>o&&r<o);return d||p}function en(e,n){return e.replace(/\${(.*?)}/g,((e,t)=>n[t]||""))}function nn(e,n,t){return t||(t=`${n}s`),`${e||0} ${1===e?n:t}`}Ke.displayName="FocusTrap";const tn=(e,n)=>Object.entries(e||{}).reduce(((e,[t,a])=>"default"===t?Object.assign(Object.assign({},e),{[n]:a}):Object.assign(Object.assign({},e),{[`${n}-on-${t}`]:a})),{}),an=(e,n,t="",a,i)=>{if(!e)return"";if(a&&!i){if(a in e)return n.modifiers[rn(`${t}${e[a]}`)];const i=["2xl","xl","lg","md","sm","default"];for(let s=i.indexOf(a);s<i.length;s++)if(i[s]in e)return n.modifiers[rn(`${t}${e[i[s]]}`)];return""}return Object.entries(e||{}).map((([e,n])=>`${t}${n}${"default"!==e?`-on-${e}`:""}${i&&"default"!==e?"-height":""}`)).map(rn).map((e=>e.replace(/-?(\dxl)/gi,((e,n)=>`_${n}`)))).map((e=>n.modifiers[e])).filter(Boolean).join(" ")},sn=e=>null===e?null:e>=de["2xl"]?"2xl":e>=de.xl?"xl":e>=de.lg?"lg":e>=de.md?"md":e>=de.sm?"sm":"default",ln=e=>null===e?null:e>=ce["2xl"]?"2xl":e>=ce.xl?"xl":e>=ce.lg?"lg":e>=ce.md?"md":e>=ce.sm?"sm":"default",on=e=>e.toUpperCase().replace("-","").replace("_",""),rn=e=>e.replace(/([-_][a-z])/gi,on),cn=!("undefined"==typeof window||!window.document||!window.document.createElement),dn=(e,n)=>{const t=getComputedStyle(n),a=document.createElement("canvas").getContext("2d");return a.font=t.font||(()=>{let e="";const n={"50%":"ultra-condensed","62.5%":"extra-condensed","75%":"condensed","87.5%":"semi-condensed","100%":"normal","112.5%":"semi-expanded","125%":"expanded","150%":"extra-expanded","200%":"ultra-expanded"};let a;return a=t.fontStretch in n?n[t.fontStretch]:"normal",e=t.fontStyle+" "+t.fontVariant+" "+t.fontWeight+" "+a+" "+t.fontSize+"/"+t.lineHeight+" "+t.fontFamily,e})(),a.measureText(e).width},pn=e=>{const n=getComputedStyle(e);let t=e.clientWidth,a=e.clientHeight;return a-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),{height:a,width:t}},mn=(e,n)=>{const t=pn(e).width;let a=n;if(dn(n,e)>t){for(;dn(`...${a}`,e)>t;)a=a.substring(1);e.value?e.value=`...${a}`:e.innerText=`...${a}`}else e.value?e.value=n:e.innerText=n},fn=e=>{e.forEach((e=>{e.current&&clearTimeout(e.current)}))},un=(e,n="ltr")=>{if(!e)return n;const t=getComputedStyle(e).getPropertyValue("direction");return["ltr","rtl"].includes(t)?t:n},gn=e=>e instanceof HTMLElement?e:"function"==typeof e?e():null==e?void 0:e.current,hn=(e,n,t="offset")=>{if(!e)return;const a=`${t}Left`;if(!("rtl"===un(e)))return e[a];const i=`${t}Width`;return n[i]-(e[a]+e[i])};let xn=0;class vn extends n.Component{constructor(){super(...arguments),this.uniqueElement=this.props.isRandom?"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Ze():xn++,this.id=`${this.props.prefix}${this.uniqueElement}`}render(){return this.props.children(this.id)}}vn.displayName="GenerateId",vn.defaultProps={prefix:"pf-random-id-",isRandom:!1};let bn=0;const yn="OUIA-Generated-",On={};function wn(e,n,t=!0){return{"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":t,"data-ouia-component-id":n}}const jn=(e,n,t=!0,a)=>({"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":t,"data-ouia-component-id":Nn(e,n,a)}),Nn=(e,t,a)=>{const i=n.useMemo((()=>Cn(e,a)),[e,a]);return null!=t?t:i};function Cn(e,n){try{let t;return t="undefined"!=typeof window?`${window.location.href}-${e}-${n||""}`:`${e}-${n||""}`,On[t]||(On[t]=0),`${yn}${e}-${n?`${n}-`:""}${++On[t]}`}catch(t){return`${yn}${e}-${n?`${n}-`:""}${++bn}`}}function Sn(e){const n=e.getBoundingClientRect();return{width:n.width,height:n.height,top:n.top,right:n.right,bottom:n.bottom,left:n.left,x:n.left,y:n.top}}function _n(e){if("[object Window]"!==e.toString()){const n=e.ownerDocument;return n?n.defaultView:window}return e}function Ln(e){const n=_n(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function kn(e){return e instanceof _n(e).Element||e instanceof Element}function In(e){return e instanceof _n(e).HTMLElement||e instanceof HTMLElement}function Tn(e){return e?(e.nodeName||"").toLowerCase():null}function En(e){return(kn(e)?e.ownerDocument:e.document).documentElement}function Rn(e){return Sn(En(e)).left+Ln(e).scrollLeft}function Mn(e){return _n(e).getComputedStyle(e)}function Dn(e){const{overflow:n,overflowX:t,overflowY:a}=Mn(e);return/auto|scroll|overlay|hidden/.test(n+a+t)}function Pn(e,n,t=!1){const a=En(n),i=Sn(e),s=In(n);let l={scrollLeft:0,scrollTop:0},o={x:0,y:0};var r,c;return(s||!s&&!t)&&(("body"!==Tn(n)||Dn(a))&&(l=(r=n)!==_n(r)&&In(r)?{scrollLeft:(c=r).scrollLeft,scrollTop:c.scrollTop}:Ln(r)),In(n)?(o=Sn(n),o.x+=n.clientLeft,o.y+=n.clientTop):a&&(o.x=Rn(a))),{x:i.left+l.scrollLeft-o.x,y:i.top+l.scrollTop-o.y,width:i.width,height:i.height}}function An(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function Bn(e){return"html"===Tn(e)?e:e.assignedSlot||e.parentNode||e.host||En(e)}function Fn(e){return["html","body","#document"].indexOf(Tn(e))>=0?e.ownerDocument.body:In(e)&&Dn(e)?e:Fn(Bn(e))}function zn(e,n=[]){const t=Fn(e),a="body"===Tn(t),i=_n(t),s=a?[i].concat(i.visualViewport||[],Dn(t)?t:[]):t,l=n.concat(s);return a?l:l.concat(zn(Bn(s)))}function Gn(e){return["table","td","th"].indexOf(Tn(e))>=0}function Vn(e){if(!In(e)||"fixed"===Mn(e).position)return null;const n=e.offsetParent;if(n){const e=En(n);if("body"===Tn(n)&&"static"===Mn(n).position&&"static"!==Mn(e).position)return e}return n}function Hn(e){const n=_n(e);let t=Vn(e);for(;t&&Gn(t)&&"static"===Mn(t).position;)t=Vn(t);return t&&"body"===Tn(t)&&"static"===Mn(t).position?n:t||function(e){let n=Bn(e);for(;In(n)&&["html","body"].indexOf(Tn(n))<0;){const e=Mn(n);if("none"!==e.transform||"none"!==e.perspective||e.willChange&&"auto"!==e.willChange)return n;n=n.parentNode}return null}(e)||n}const Xn="top",$n="bottom",Wn="right",qn="left",Un="auto",Kn=[Xn,$n,Wn,qn],Yn="start",Zn="end",Jn="clippingParents",Qn="viewport",et="popper",nt="reference",tt=Kn.reduce(((e,n)=>e.concat([`${n}-${Yn}`,`${n}-${Zn}`])),[]),at=[...Kn,Un].reduce(((e,n)=>e.concat([n,`${n}-${Yn}`,`${n}-${Zn}`])),[]),it=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function st(e){const n=new Map,t=new Set,a=[];function i(e){t.add(e.name);[...e.requires||[],...e.requiresIfExists||[]].forEach((e=>{if(!t.has(e)){const t=n.get(e);t&&i(t)}})),a.push(e)}return e.forEach((e=>{n.set(e.name,e)})),e.forEach((e=>{t.has(e.name)||i(e)})),a}function lt(e){let n;return()=>(n||(n=new Promise((t=>{Promise.resolve().then((()=>{n=void 0,t(e())}))}))),n)}function ot(e){return e.split("-")[0]}function rt(e,n){const t=Boolean(n.getRootNode&&n.getRootNode().host);if(e.contains(n))return!0;if(t){let t=n;do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t)}return!1}function ct(e){return Object.assign(Object.assign({},e),{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function dt(e,n){return n===Qn?ct(function(e){const n=_n(e),t=En(e),a=n.visualViewport;let i=t.clientWidth,s=t.clientHeight,l=0,o=0;return a&&(i=a.width,s=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=a.offsetLeft,o=a.offsetTop)),{width:i,height:s,x:l+Rn(e),y:o}}(e)):In(n)?function(e){const n=Sn(e);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(n):ct(function(e){const n=En(e),t=Ln(e),a=e.ownerDocument.body,i=Math.max(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),s=Math.max(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);let l=-t.scrollLeft+Rn(e);const o=-t.scrollTop;return"rtl"===Mn(a||n).direction&&(l+=Math.max(n.clientWidth,a?a.clientWidth:0)-i),{width:i,height:s,x:l,y:o}}(En(e)))}function pt(e,n,t){const a="clippingParents"===n?function(e){const n=zn(Bn(e)),t=["absolute","fixed"].indexOf(Mn(e).position)>=0&&In(e)?Hn(e):e;return kn(t)?n.filter((e=>kn(e)&&rt(e,t)&&"body"!==Tn(e))):[]}(e):[].concat(n),i=[...a,t],s=i[0],l=i.reduce(((n,t)=>{const a=dt(e,t);return n.top=Math.max(a.top,n.top),n.right=Math.min(a.right,n.right),n.bottom=Math.min(a.bottom,n.bottom),n.left=Math.max(a.left,n.left),n}),dt(e,s));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function mt(e){return e.split("-")[1]}function ft(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ut({reference:e,element:n,placement:t}){const a=t?ot(t):null,i=t?mt(t):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2;let o;switch(a){case Xn:o={x:s,y:e.y-n.height};break;case $n:o={x:s,y:e.y+e.height};break;case Wn:o={x:e.x+e.width,y:l};break;case qn:o={x:e.x-n.width,y:l};break;default:o={x:e.x,y:e.y}}const r=a?ft(a):null;if(null!=r){const t="y"===r?"height":"width";switch(i){case Yn:o[r]=Math.floor(o[r])-Math.floor(e[t]/2-n[t]/2);break;case Zn:o[r]=Math.floor(o[r])+Math.ceil(e[t]/2-n[t]/2)}}return o}function gt(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function ht(e,n){return n.reduce(((n,t)=>(n[t]=e,n)),{})}function xt(e,n={}){const{placement:t=e.placement,boundary:a=Jn,rootBoundary:i=Qn,elementContext:s=et,altBoundary:l=!1,padding:o=0}=n,r=gt("number"!=typeof o?o:ht(o,Kn)),c=s===et?nt:et,d=e.elements.reference,p=e.rects.popper,m=e.elements[l?c:s],f=pt(kn(m)?m:m.contextElement||En(e.elements.popper),a,i),u=Sn(d),g=ut({reference:u,element:p,placement:t}),h=ct(Object.assign(Object.assign({},p),g)),x=s===et?h:u,v={top:f.top-x.top+r.top,bottom:x.bottom-f.bottom+r.bottom,left:f.left-x.left+r.left,right:x.right-f.right+r.right},b=e.modifiersData.offset;if(s===et&&b){const e=b[t];Object.keys(v).forEach((n=>{const t=[Wn,$n].indexOf(n)>=0?1:-1,a=[Xn,$n].indexOf(n)>=0?"y":"x";v[n]+=e[a]*t}))}return v}const vt={placement:"bottom",modifiers:[],strategy:"absolute"};function bt(...e){return!e.some((e=>!(e&&"function"==typeof e.getBoundingClientRect)))}function yt(e={}){const{defaultModifiers:n=[],defaultOptions:t=vt}=e;return function(e,a,i=t){let s={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},vt),t),modifiersData:{},elements:{reference:e,popper:a},attributes:{},styles:{}},l=[],o=!1;const r={state:s,setOptions(i){c(),s.options=Object.assign(Object.assign(Object.assign({},t),s.options),i),s.scrollParents={reference:kn(e)?zn(e):e.contextElement?zn(e.contextElement):[],popper:zn(a)};const o=function(e){const n=st(e);return it.reduce(((e,t)=>e.concat(n.filter((e=>e.phase===t)))),[])}(function(e){const n=e.reduce(((e,n)=>{const t=e[n.name];return e[n.name]=t?Object.assign(Object.assign(Object.assign({},t),n),{options:Object.assign(Object.assign({},t.options),n.options),data:Object.assign(Object.assign({},t.data),n.data)}):n,e}),{});return Object.keys(n).map((e=>n[e]))}([...n,...s.options.modifiers]));return s.orderedModifiers=o.filter((e=>e.enabled)),s.orderedModifiers.forEach((({name:e,options:n={},effect:t})=>{if("function"==typeof t){const a=t({state:s,name:e,instance:r,options:n}),i=()=>{};l.push(a||i)}})),r.update()},forceUpdate(){if(o)return;const{reference:e,popper:n}=s.elements;if(bt(e,n)){s.rects={reference:Pn(e,Hn(n),"fixed"===s.options.strategy),popper:An(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((e=>s.modifiersData[e.name]=Object.assign({},e.data)));for(let e=0;e<s.orderedModifiers.length;e++){if(!0===s.reset){s.reset=!1,e=-1;continue}const{fn:n,options:t={},name:a}=s.orderedModifiers[e];"function"==typeof n&&(s=n({state:s,options:t,name:a,instance:r})||s)}}},update:lt((()=>new Promise((e=>{r.forceUpdate(),e(s)})))),destroy(){c(),o=!0}};if(!bt(e,a))return r;function c(){l.forEach((e=>e())),l=[]}return r.setOptions(i).then((e=>{!o&&i.onFirstUpdate&&i.onFirstUpdate(e)})),r}}yt();const Ot={passive:!0};const wt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function jt({popper:e,popperRect:n,placement:t,offsets:a,position:i,gpuAcceleration:s,adaptive:l}){let{x:o,y:r}=function({x:e,y:n}){const t=window.devicePixelRatio||1;return{x:Math.round(e*t)/t||0,y:Math.round(n*t)/t||0}}(a);const c=a.hasOwnProperty("x"),d=a.hasOwnProperty("y");let p=qn,m=Xn;const f=window;if(l){let a=Hn(e);a===_n(e)&&(a=En(e)),t===Xn&&(m=$n,r-=a.clientHeight-n.height,r*=s?1:-1),t===qn&&(p=Wn,o-=a.clientWidth-n.width,o*=s?1:-1)}const u=Object.assign({position:i},l&&wt);return s?Object.assign(Object.assign({},u),{[m]:d?"0":"",[p]:c?"0":"",transform:(f.devicePixelRatio||1)<2?`translate(${o}px, ${r}px)`:`translate3d(${o}px, ${r}px, 0)`}):Object.assign(Object.assign({},u),{[m]:d?`${r}px`:"",[p]:c?`${o}px`:"",transform:""})}var Nt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function({state:e,options:n,name:t}){const{offset:a=[0,0]}=n,i=at.reduce(((n,t)=>(n[t]=function(e,n,t){const a=ot(e),i=[qn,Xn].indexOf(a)>=0?-1:1;let[s,l]="function"==typeof t?t(Object.assign(Object.assign({},n),{placement:e})):t;return s=s||0,l=(l||0)*i,[qn,Wn].indexOf(a)>=0?{x:l,y:s}:{x:s,y:l}}(t,e.rects,a),n)),{}),{x:s,y:l}=i[e.placement];null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=s,e.modifiersData.popperOffsets.y+=l),e.modifiersData[t]=i}};const Ct={left:"right",right:"left",bottom:"top",top:"bottom"};function St(e){return e.replace(/left|right|bottom|top/g,(e=>Ct[e]))}const _t={start:"end",end:"start"};function Lt(e){return e.replace(/start|end/g,(e=>_t[e]))}function kt(e,n={}){const{placement:t,boundary:a,rootBoundary:i,padding:s,flipVariations:l,allowedAutoPlacements:o=at}=n,r=mt(t),c=r?l?tt:tt.filter((e=>mt(e)===r)):Kn;let d=c.filter((e=>o.indexOf(e)>=0));0===d.length&&(d=c);const p=d.reduce(((n,t)=>(n[t]=xt(e,{placement:t,boundary:a,rootBoundary:i,padding:s})[ot(t)],n)),{});return Object.keys(p).sort(((e,n)=>p[e]-p[n]))}var It={name:"flip",enabled:!0,phase:"main",fn:function({state:e,options:n,name:t}){if(e.modifiersData[t]._skip)return;const{mainAxis:a=!0,altAxis:i=!0,fallbackPlacements:s,padding:l,boundary:o,rootBoundary:r,altBoundary:c,flipVariations:d=!0,allowedAutoPlacements:p}=n,m=e.options.placement,f=ot(m),u=[m,...s||(f===m||!d?[St(m)]:function(e){if(ot(e)===Un)return[];const n=St(e);return[Lt(e),n,Lt(n)]}(m))].reduce(((n,t)=>n.concat(ot(t)===Un?kt(e,{placement:t,boundary:o,rootBoundary:r,padding:l,flipVariations:d,allowedAutoPlacements:p}):t)),[]),g=e.rects.reference,h=e.rects.popper,x=new Map;let v=!0,b=u[0];for(let n=0;n<u.length;n++){const t=u[n],s=ot(t),d=mt(t)===Yn,p=[Xn,$n].indexOf(s)>=0,m=p?"width":"height",f=xt(e,{placement:t,boundary:o,rootBoundary:r,altBoundary:c,padding:l});let y=p?d?Wn:qn:d?$n:Xn;g[m]>h[m]&&(y=St(y));const O=St(y),w=[];if(a&&w.push(f[s]<=0),i&&w.push(f[y]<=0,f[O]<=0),w.every((e=>e))){b=t,v=!1;break}x.set(t,w)}if(v){for(let e=d?3:1;e>0;e--){const n=u.find((n=>{const t=x.get(n);if(t)return t.slice(0,e).every((e=>e))}));if(n){b=n;break}}}e.placement!==b&&(e.modifiersData[t]._skip=!0,e.placement=b,e.reset=!0)},requiresIfExists:["offset"],data:{_skip:!1}};function Tt(e,n,t){return Math.max(e,Math.min(n,t))}var Et={name:"preventOverflow",enabled:!0,phase:"main",fn:function({state:e,options:n,name:t}){const{mainAxis:a=!0,altAxis:i=!1,boundary:s,rootBoundary:l,altBoundary:o,padding:r,tether:c=!0,tetherOffset:d=0}=n,p=xt(e,{boundary:s,rootBoundary:l,padding:r,altBoundary:o}),m=ot(e.placement),f=mt(e.placement),u=!f,g=ft(m),h="x"===g?"y":"x",x=e.modifiersData.popperOffsets,v=e.rects.reference,b=e.rects.popper,y="function"==typeof d?d(Object.assign(Object.assign({},e.rects),{placement:e.placement})):d,O={x:0,y:0};if(x){if(a){const n="y"===g?Xn:qn,t="y"===g?$n:Wn,a="y"===g?"height":"width",i=x[g],s=x[g]+p[n],l=x[g]-p[t],o=c?-b[a]/2:0,r=f===Yn?v[a]:b[a],d=f===Yn?-b[a]:-v[a],m=e.elements.arrow,h=c&&m?An(m):{width:0,height:0},w=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},j=w[n],N=w[t],C=Tt(0,v[a],h[a]),S=u?v[a]/2-o-C-j-y:r-C-j-y,_=u?-v[a]/2+o+C+N+y:d+C+N+y,L=e.elements.arrow&&Hn(e.elements.arrow),k=L?"y"===g?L.clientTop||0:L.clientLeft||0:0,I=e.modifiersData.offset?e.modifiersData.offset[e.placement][g]:0,T=x[g]+S-I-k,E=x[g]+_-I,R=Tt(c?Math.min(s,T):s,i,c?Math.max(l,E):l);x[g]=R,O[g]=R-i}if(i){const e="x"===g?Xn:qn,n="x"===g?$n:Wn,t=x[h],a=Tt(t+p[e],t,t-p[n]);x[h]=a,O[h]=a-t}e.modifiersData[t]=O}},requiresIfExists:["offset"]};var Rt={name:"arrow",enabled:!0,phase:"main",fn:function({state:e,name:n}){const t=e.elements.arrow,a=e.modifiersData.popperOffsets,i=ot(e.placement),s=ft(i),l=[qn,Wn].indexOf(i)>=0?"height":"width";if(!t||!a)return;const o=e.modifiersData[`${n}#persistent`].padding,r=An(t),c="y"===s?Xn:qn,d="y"===s?$n:Wn,p=e.rects.reference[l]+e.rects.reference[s]-a[s]-e.rects.popper[l],m=a[s]-e.rects.reference[s],f=Hn(t),u=f?"y"===s?f.clientHeight||0:f.clientWidth||0:0,g=p/2-m/2,h=o[c],x=u-r[l]-o[d],v=u/2-r[l]/2+g,b=Tt(h,v,x),y=s;e.modifiersData[n]={[y]:b,centerOffset:b-v}},effect:function({state:e,options:n,name:t}){let{element:a="[data-popper-arrow]",padding:i=0}=n;null!=a&&("string"!=typeof a||(a=e.elements.popper.querySelector(a),a))&&rt(e.elements.popper,a)&&(e.elements.arrow=a,e.modifiersData[`${t}#persistent`]={padding:gt("number"!=typeof i?i:ht(i,Kn))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Mt(e,n,t={x:0,y:0}){return{top:e.top-n.height-t.y,right:e.right-n.width+t.x,bottom:e.bottom-n.height+t.y,left:e.left-n.width-t.x}}function Dt(e){return[Xn,Wn,$n,qn].some((n=>e[n]>=0))}const Pt=yt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:()=>{},effect:function({state:e,instance:n,options:t}){const{scroll:a=!0,resize:i=!0}=t,s=_n(e.elements.popper),l=[...e.scrollParents.reference,...e.scrollParents.popper];return a&&l.forEach((e=>{e.addEventListener("scroll",n.update,Ot)})),i&&s.addEventListener("resize",n.update,Ot),()=>{a&&l.forEach((e=>{e.removeEventListener("scroll",n.update,Ot)})),i&&s.removeEventListener("resize",n.update,Ot)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function({state:e,name:n}){e.modifiersData[n]=ut({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function({state:e,options:n}){const{gpuAcceleration:t=!0,adaptive:a=!0}=n,i={placement:ot(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:t};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign(Object.assign({},e.styles.popper),jt(Object.assign(Object.assign({},i),{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign(Object.assign({},e.styles.arrow),jt(Object.assign(Object.assign({},i),{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((n=>{const t=e.styles[n]||{},a=e.attributes[n]||{},i=e.elements[n];In(i)&&Tn(i)&&(Object.assign(i.style,t),Object.keys(a).forEach((e=>{const n=a[e];!1===n?i.removeAttribute(e):i.setAttribute(e,!0===n?"":n)})))}))},effect:function({state:e}){const n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),()=>{Object.keys(e.elements).forEach((t=>{const a=e.elements[t],i=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(((e,n)=>(e[n]="",e)),{});In(a)&&Tn(a)&&(Object.assign(a.style,s),Object.keys(i).forEach((e=>{a.removeAttribute(e)})))}))}},requires:["computeStyles"]},Nt,It,Et,Rt,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function({state:e,name:n}){const t=e.rects.reference,a=e.rects.popper,i=e.modifiersData.preventOverflow,s=xt(e,{elementContext:"reference"}),l=xt(e,{altBoundary:!0}),o=Mt(s,t),r=Mt(l,a,i),c=Dt(o),d=Dt(r);e.modifiersData[n]={referenceClippingOffsets:o,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})}}]}),At=cn?n.useLayoutEffect:n.useEffect,Bt=e=>e.reduce(((e,[n,t])=>(e[n]=t,e)),{}),Ft=[],zt=(e,t,a={})=>{const i=n.useRef(null),s={onFirstUpdate:a.onFirstUpdate,placement:a.placement||"bottom",strategy:a.strategy||"absolute",modifiers:a.modifiers||Ft},[l,o]=n.useState({styles:{popper:{position:s.strategy,left:"0",top:"0"}},attributes:{}}),r=n.useMemo((()=>({name:"updateState",enabled:!0,phase:"write",fn:({state:e})=>{const n=Object.keys(e.elements);o({styles:Bt(n.map((n=>[n,e.styles[n]||{}]))),attributes:Bt(n.map((n=>[n,e.attributes[n]])))})},requires:["computeStyles"]})),[]),c=n.useMemo((()=>{const e={onFirstUpdate:s.onFirstUpdate,placement:s.placement,strategy:s.strategy,modifiers:[...s.modifiers,r,{name:"applyStyles",enabled:!1}]};return n=i.current,t=e,JSON.stringify(n)===JSON.stringify(t)?i.current||e:(i.current=e,e);var n,t}),[s.onFirstUpdate,s.placement,s.strategy,s.modifiers,r]),d=n.useRef(void 0);return At((()=>{d&&d.current&&d.current.setOptions(c)}),[c]),At((()=>{if(null==e||null==t)return;const n=(a.createPopper||Pt)(e,t,c);return d.current=n,()=>{n.destroy(),d.current=null}}),[e,t,a.createPopper]),{state:d.current?d.current.state:null,styles:l.styles,attributes:l.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}},Gt={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"},Vt=e=>`opacity ${e}ms cubic-bezier(.54, 1.5, .38, 1.11)`,Ht=({trigger:e,popper:t,direction:a="down",position:s="start",placement:l,width:o,minWidth:r="trigger",maxWidth:c,appendTo:d=(()=>document.body),zIndex:p=9999,isVisible:m=!0,positionModifiers:f,distance:u=0,onMouseEnter:g,onMouseLeave:h,onFocus:b,onBlur:y,onDocumentClick:O,onTriggerClick:w,onTriggerEnter:j,onPopperClick:N,onPopperMouseEnter:C,onPopperMouseLeave:S,onDocumentKeyDown:_,enableFlip:L=!0,flipBehavior:k="flip",triggerRef:I,popperRef:T,animationDuration:E=0,entryDelay:R=0,exitDelay:M=0,onHidden:D=(()=>{}),onHide:P=(()=>{}),onMount:A=(()=>{}),onShow:B=(()=>{}),onShown:F=(()=>{}),preventOverflow:z=!1})=>{var G;const[V,H]=n.useState(null),[X,$]=n.useState(null),[W,q]=n.useState(null),[U,K]=n.useState(null),[Y,Z]=n.useState(!1),[J,Q]=n.useState(0),[ee,ne]=n.useState(m),te=n.useRef(null),ae=n.useRef(null),ie=n.useRef(null),se=n.useRef(void 0),le=X||V,oe=m||ee,re=null===(G=(null==I?void 0:I.current)||V)||void 0===G?void 0:G.parentElement,ce=un(re),de=n.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)}[ce][s]}),[s,ce]),pe=n.useCallback((e=>O(e,le,W)),[oe,V,X,W,O]);n.useEffect((()=>{Z(!0),A()}),[]),n.useEffect((()=>()=>{fn([te,ie,ae])}),[]),n.useEffect((()=>{I&&(I.current?$(I.current):"function"==typeof I&&$(I()))}),[I,e]),n.useEffect((()=>{T&&(T.current?q(T.current):"function"==typeof T&&q