@emporix/component-library 2.4.1 → 2.4.2

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/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as o, a as t, b as e, B as T, C as i, c as n, D as r, d as l, e as A, f as c, h as u, i as d, j as B, E as p, F as D, k as E, l as S, I as b, L as P, M as m, m as L, P as M, n as _, o as F, R as g, S as x, p as I, q as C, r as f, T as h, s as k, t as y, u as U, v, w } from "./index-Cc9uulfe.js";
1
+ import { A as o, a as t, b as e, B as T, C as i, c as n, D as r, d as l, e as A, f as c, h as u, i as d, j as B, E as p, F as D, k as E, l as S, I as b, L as P, M as m, m as L, P as M, n as _, o as F, R as g, S as x, p as I, q as C, r as f, T as h, s as k, t as y, u as U, v, w } from "./index-T-8W-v0x.js";
2
2
  export {
3
3
  o as Accordion,
4
4
  t as AccordionTab,
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(ot,ue){typeof exports=="object"&&typeof module<"u"?ue(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],ue):(ot=typeof globalThis<"u"?globalThis:ot||self,ue(ot.EmporixComponentLibrary={},ot.React,ot.React,ot.ReactDOM))})(this,(function(ot,ue,Oe,Rn){"use strict";function jo(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}function qo(e,r){for(var t=0;t<r.length;t++){const n=r[t];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(n,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const w=jo(Oe),Gr={primaryButton:"_primaryButton_gvcke_1",primaryButtonDisabled:"_primaryButtonDisabled_gvcke_33",spinner:"_spinner_gvcke_41"};var hi={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},mi=Oe.createContext&&Oe.createContext(hi),zo=["attr","size","title"];function $o(e,r){if(e==null)return{};var t,n,a=Ho(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Ho(e,r){if(e==null)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(r.indexOf(n)!==-1)continue;t[n]=e[n]}return t}function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},hr.apply(null,arguments)}function gi(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function mr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?gi(Object(t),!0).forEach(function(n){Uo(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gi(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Uo(e,r,t){return(r=Ko(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ko(e){var r=Wo(e,"string");return typeof r=="symbol"?r:r+""}function Wo(e,r){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function yi(e){return e&&e.map((r,t)=>Oe.createElement(r.tag,mr({key:t},r.attr),yi(r.child)))}function Kt(e){return r=>Oe.createElement(Vo,hr({attr:mr({},e.attr)},r),yi(e.child))}function Vo(e){var r=t=>{var{attr:n,size:a,title:l}=e,f=$o(e,zo),o=a||t.size||"1em",c;return t.className&&(c=t.className),e.className&&(c=(c?c+" ":"")+e.className),Oe.createElement("svg",hr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,f,{className:c,style:mr(mr({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),l&&Oe.createElement("title",null,l),e.children)};return mi!==void 0?Oe.createElement(mi.Consumer,null,t=>r(t)):r(hi)}function Go(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}const bi=({children:e,disabled:r=!1,loading:t=!1,onClick:n,className:a="","data-testid":l,...f})=>{const o=[Gr.primaryButton,r?Gr.primaryButtonDisabled:"",a].filter(Boolean).join(" ");return ue.jsxs("button",{type:"button",className:o,disabled:r||t,onClick:n,"data-testid":l,...f,children:[t&&ue.jsx(Go,{className:Gr.spinner,size:12}),e]})},pi={secondaryButton:"_secondaryButton_15dkw_1",secondaryButtonDisabled:"_secondaryButtonDisabled_15dkw_32"},Ei=({children:e,disabled:r=!1,onClick:t,className:n="","data-testid":a,...l})=>{const f=[pi.secondaryButton,r?pi.secondaryButtonDisabled:"",n].filter(Boolean).join(" ");return ue.jsx("button",{type:"button",className:f,disabled:r,onClick:t,"data-testid":a,...l,children:e})},Wt={tabsContainer:"_tabsContainer_6vpel_1",fullWidth:"_fullWidth_6vpel_7",tabsHeader:"_tabsHeader_6vpel_7",tabItem:"_tabItem_6vpel_10",headerFill:"_headerFill_6vpel_13",tabContent:"_tabContent_6vpel_39",tabLabel:"_tabLabel_6vpel_61",tabLine:"_tabLine_6vpel_71",active:"_active_6vpel_85",inactive:"_inactive_6vpel_96",tabPanels:"_tabPanels_6vpel_104"},Yo=({tabs:e,activeTabId:r,onTabChange:t,className:n="",fullWidth:a=!1,"data-testid":l,...f})=>{var c;const o=[Wt.tabsContainer,a?Wt.fullWidth:"",n].filter(Boolean).join(" ");return ue.jsxs("div",{className:o,"data-testid":l,...f,children:[ue.jsxs("div",{className:Wt.tabsHeader,children:[e.map(s=>{const g=s.id===r,d=[Wt.tabItem,g?Wt.active:Wt.inactive].filter(Boolean).join(" ");return ue.jsxs("button",{type:"button",className:d,onClick:()=>t(s.id),"data-testid":`${l}-tab-${s.id}`,children:[ue.jsx("div",{className:Wt.tabContent,children:ue.jsx("span",{className:Wt.tabLabel,children:s.label})}),ue.jsx("div",{className:Wt.tabLine})]},s.id)}),ue.jsx("div",{className:Wt.headerFill,"aria-hidden":"true"})]}),ue.jsx("div",{className:Wt.tabPanels,children:(c=e.find(s=>s.id===r))==null?void 0:c.content})]})};function Xo(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function Zo(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(e)}function Jo(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"},child:[]}]})(e)}function Qo(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function Yr(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}const gr={anchorWrap:"_anchorWrap_h9mnj_1",panel:"_panel_h9mnj_7",panelInteractive:"_panelInteractive_h9mnj_23",panelPassThrough:"_panelPassThrough_h9mnj_27"},$n=8,yr=8;function Hn(...e){return r=>{e.forEach(t=>t==null?void 0:t(r))}}function eu(e){if(e==="top"||e==="bottom"||e==="left"||e==="right"||e==="mouse")return e}function tu(e){const{anchorRect:r,tooltipRect:t,placement:n,pointer:a,mouseTrack:l,mouseTrackTop:f,mouseTrackLeft:o}=e;if(n==="mouse"||l)return{top:a.y+f,left:a.x+o};let c=0,s=0;switch(n){case"top":c=r.top-t.height-$n,s=r.left+r.width/2-t.width/2;break;case"bottom":c=r.bottom+$n,s=r.left+r.width/2-t.width/2;break;case"left":c=r.top+r.height/2-t.height/2,s=r.left-t.width-$n;break;case"right":c=r.top+r.height/2-t.height/2,s=r.right+$n;break;default:c=r.top-t.height-$n,s=r.left+r.width/2-t.width/2}const g=window.innerWidth,d=window.innerHeight;return s=Math.min(Math.max(s,yr),g-t.width-yr),c=Math.min(Math.max(c,yr),d-t.height-yr),{top:c,left:s}}function Xr(e,r){const t=e.getAttribute("data-pr-tooltip");return t!=null&&t!==""?t:r??""}function nu(e){return e==null?!0:typeof e=="string"||typeof e=="number"?String(e)==="":!1}const ru=({children:e,className:r,eventMode:t,onAnchorMouseEnter:n,onAnchorMouseMove:a,onAnchorMouseLeave:l,onAnchorFocusIn:f,onAnchorFocusOut:o})=>{const c=Oe.Children.toArray(e);if(c.length!==1||!Oe.isValidElement(c[0])){const p=[gr.anchorWrap,r].filter(Boolean).join(" "),m=t==="hover"||t==="both"?{onMouseEnter:n,onMouseMove:a,onMouseLeave:l}:{},b=t==="focus"||t==="both"?{onFocusCapture:f,onBlurCapture:o}:{};return ue.jsx("span",{className:p,...m,...b,children:e})}const g=c[0],d=t==="hover"||t==="both"?{onMouseEnter:Hn(n,g.props.onMouseEnter),onMouseMove:Hn(a,g.props.onMouseMove),onMouseLeave:Hn(l,g.props.onMouseLeave)}:{},u=t==="focus"||t==="both"?{onFocusCapture:Hn(f,g.props.onFocusCapture),onBlurCapture:Hn(o,g.props.onBlurCapture)}:{},i=[r,g.props.className].filter(Boolean).join(" ");return Oe.cloneElement(g,{...d,...u,...i?{className:i}:{},ref:g.props.ref})},wi=({target:e,content:r,position:t="top",event:n="hover",showDelay:a=0,hideDelay:l=0,autoHide:f=!0,mouseTrack:o=!1,mouseTrackTop:c=0,mouseTrackLeft:s=0,disabled:g=!1,className:d="",panelClassName:u="",id:i,children:p,"data-testid":m})=>{const b=Oe.useId().replace(/:/g,""),v=i??`emporix-tooltip-${b}`,[h,E]=Oe.useState(!1),[y,S]=Oe.useState({top:0,left:0}),[P,x]=Oe.useState(null),T=Oe.useRef(null),I=Oe.useRef(null),R=Oe.useRef({x:0,y:0}),O=Oe.useRef(),C=Oe.useRef(),k=Oe.useCallback(()=>{O.current!=null&&(clearTimeout(O.current),O.current=void 0)},[]),L=Oe.useCallback(()=>{C.current!=null&&(clearTimeout(C.current),C.current=void 0)},[]),M=Oe.useCallback(()=>{const z=T.current;if(z){const V=eu(z.getAttribute("data-pr-position"));if(V)return V}return t},[t]),B=Oe.useCallback(()=>{const z=T.current,V=I.current;if(!z||!V)return;const Q=z.getBoundingClientRect(),Ce=V.getBoundingClientRect(),fe=M();S(tu({anchorRect:Q,tooltipRect:Ce,placement:fe,pointer:R.current,mouseTrack:o,mouseTrackTop:c,mouseTrackLeft:s}))},[M,o,c,s]),q=Oe.useCallback(()=>{k(),L();const z=T.current;z instanceof HTMLElement&&z.removeAttribute("aria-describedby"),E(!1),T.current=null},[L,k]),J=Oe.useCallback((z,V)=>{g||nu(V)||(L(),k(),T.current=z,x(V),O.current=setTimeout(()=>{E(!0),z instanceof HTMLElement&&z.setAttribute("aria-describedby",v)},a))},[L,k,g,a,v]),$=Oe.useCallback(()=>{k(),L(),C.current=setTimeout(()=>{q()},l)},[L,k,q,l]),N=Oe.useCallback(z=>{!f&&I.current&&z instanceof Node&&I.current.contains(z)||$()},[f,$]);Oe.useLayoutEffect(()=>{h&&B()},[h,P,B]),Oe.useEffect(()=>{if(!h)return;const z=()=>B();window.addEventListener("scroll",z,!0),window.addEventListener("resize",z);const V=Q=>{R.current={x:Q.clientX,y:Q.clientY},(o||M()==="mouse")&&B()};return(o||M()==="mouse")&&window.addEventListener("mousemove",V),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z),window.removeEventListener("mousemove",V)}},[h,o,M,B]),Oe.useEffect(()=>{if(!h)return;const z=V=>{V.key==="Escape"&&q()};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[h,q]),Oe.useEffect(()=>{if(h)if(e){const z=T.current;z&&x(Xr(z,r))}else x(r??null)},[r,h,e]),Oe.useEffect(()=>{if(!e)return;let z=[];try{z=Array.from(document.querySelectorAll(e))}catch{return}const V=Te=>{const Ke=Te.currentTarget;R.current={x:Te.clientX,y:Te.clientY},J(Ke,Xr(Ke,r))},Q=Te=>{R.current={x:Te.clientX,y:Te.clientY}},Ce=Te=>{N(Te.relatedTarget)},fe=Te=>{const Ke=Te.currentTarget;J(Ke,Xr(Ke,r))},qe=Te=>{N(Te.relatedTarget)};return z.forEach(Te=>{(n==="hover"||n==="both")&&(Te.addEventListener("mouseenter",V),Te.addEventListener("mousemove",Q),Te.addEventListener("mouseleave",Ce)),(n==="focus"||n==="both")&&(Te.addEventListener("focusin",fe),Te.addEventListener("focusout",qe))}),()=>{z.forEach(Te=>{(n==="hover"||n==="both")&&(Te.removeEventListener("mouseenter",V),Te.removeEventListener("mousemove",Q),Te.removeEventListener("mouseleave",Ce)),(n==="focus"||n==="both")&&(Te.removeEventListener("focusin",fe),Te.removeEventListener("focusout",qe))})}},[e,r,n,J,N]);const _=Oe.useCallback(z=>{const V=z.currentTarget;R.current={x:z.clientX,y:z.clientY},T.current=V,J(V,r)},[r,J]),D=Oe.useCallback(z=>{R.current={x:z.clientX,y:z.clientY}},[]),j=Oe.useCallback(z=>{N(z.relatedTarget)},[N]),K=Oe.useCallback(z=>{const V=z.currentTarget;T.current=V,J(V,r)},[r,J]),H=Oe.useCallback(z=>{N(z.relatedTarget)},[N]),A=[gr.panel,f?gr.panelPassThrough:gr.panelInteractive,u].filter(Boolean).join(" "),F=typeof document<"u"&&h&&P!=null?Rn.createPortal(ue.jsx("div",{ref:I,id:v,role:"tooltip",className:A,style:{top:y.top,left:y.left},onMouseEnter:f?void 0:()=>{L()},onMouseLeave:f?void 0:()=>{$()},"data-testid":m?`${m}-panel`:void 0,children:P}),document.body):null;return e?ue.jsx(ue.Fragment,{children:F}):ue.jsxs(ue.Fragment,{children:[p!=null?ue.jsx(ru,{className:d,eventMode:n,onAnchorMouseEnter:_,onAnchorMouseMove:D,onAnchorMouseLeave:j,onAnchorFocusIn:K,onAnchorFocusOut:H,children:p}):null,F]})},Zr={fieldLabel:"_fieldLabel_1993i_1",required:"_required_1993i_12",tooltipIcon:"_tooltipIcon_1993i_17"},Pn=({children:e,htmlFor:r,required:t=!1,tooltip:n,className:a="","data-testid":l})=>{const f=[Zr.fieldLabel,a].filter(Boolean).join(" ");return ue.jsxs("label",{htmlFor:r,className:f,"data-testid":l,children:[e,t?ue.jsx("span",{className:Zr.required,children:"*"}):null,n!=null&&n!==""?ue.jsx(wi,{content:n,position:"top",showDelay:200,children:ue.jsx("span",{className:Zr.tooltipIcon,"aria-label":n,children:ue.jsx(Jo,{"aria-hidden":!0})})}):null]})},dt={dropdown:"_dropdown_pfk12_1",control:"_control_pfk12_9",controlDisabled:"_controlDisabled_pfk12_34",controlInput:"_controlInput_pfk12_43",value:"_value_pfk12_61",placeholder:"_placeholder_pfk12_70",chipDisplay:"_chipDisplay_pfk12_76",chipEmpty:"_chipEmpty_pfk12_84",chipValue:"_chipValue_pfk12_89",chipItem:"_chipItem_pfk12_98",chipLabel:"_chipLabel_pfk12_112",chipRemove:"_chipRemove_pfk12_118",chipOverflow:"_chipOverflow_pfk12_137",chevron:"_chevron_pfk12_142",open:"_open_pfk12_149",panel:"_panel_pfk12_173",panelClosing:"_panelClosing_pfk12_190",filterWrapper:"_filterWrapper_pfk12_194",filterInput:"_filterInput_pfk12_201",filterIcon:"_filterIcon_pfk12_220",list:"_list_pfk12_231",option:"_option_pfk12_240",checkboxContainer:"_checkboxContainer_pfk12_255",checkbox:"_checkbox_pfk12_255",optionLabel:"_optionLabel_pfk12_272",optionSelected:"_optionSelected_pfk12_277",optionDisabled:"_optionDisabled_pfk12_281",empty:"_empty_pfk12_290",disabled:"_disabled_pfk12_297",error:"_error_pfk12_301"},an=(e,r)=>{const n=e[r];return n!=null?String(n):""},fn=(e,r)=>e[r],dn=(e,r)=>r==null?!1:!!e[r],Jr=(e,r)=>{if(e===r)return!0;if(e==null||r==null||typeof e!="object"||typeof r!="object")return!1;const t=e.id,n=r.id;return t!=null&&n!=null&&(typeof t=="string"||typeof t=="number")&&(typeof n=="string"||typeof n=="number")?t===n:!1},Qr=(e,r)=>e.some(t=>Jr(t,r)),Si=(e,r,t)=>{if(e==null)return`option-${t}`;const n=typeof e;if(n==="string"||n==="number"||n==="boolean")return`option-${String(e)}`;if(n==="object"){const a=e,l=a.id??a.value??a.code??a.key;return l!=null&&(typeof l=="string"||typeof l=="number")?`option-${l}`:`option-${t}-${r}`}return`option-${t}`},au=({value:e,onChange:r,multiple:t=!1,display:n="comma",maxSelectedLabels:a,selectedItemsLabel:l="{0} items selected",removeIcon:f,onEditEnd:o,options:c,optionLabel:s="label",optionValue:g="value",optionDisabled:d,placeholder:u="Select",filter:i=!1,editable:p=!1,disabled:m=!1,required:b=!1,label:v,error:h,inputId:E,className:y="",panelClassName:S="",valueTemplate:P,itemTemplate:x,"data-testid":T})=>{const I=p&&!t,R=Oe.useMemo(()=>t&&Array.isArray(e)?e:[],[t,e]),O=c.find(G=>!t&&fn(G,g)===e),C=Oe.useMemo(()=>t?c.filter(G=>Qr(R,fn(G,g))):[],[t,c,g,R]),k=O?an(O,s):"",L=C.map(G=>an(G,s)).filter(Boolean).join(", "),[M,B]=Oe.useState(!1),[q,J]=Oe.useState(!1),[$,N]=Oe.useState(""),[_,D]=Oe.useState(k),j=Oe.useRef(null),K=Oe.useRef(null),H=Oe.useRef(null),A=Oe.useRef(null),F=Oe.useRef(!1),z=Oe.useMemo(()=>i&&!I?c.filter(G=>an(G,s).toLowerCase().includes($.toLowerCase())):c,[i,I,c,s,$]);Oe.useEffect(()=>{I&&D(k)},[I,e,k]),Oe.useEffect(()=>{M&&i&&!I&&(N(""),setTimeout(()=>{var G;return(G=H.current)==null?void 0:G.focus()},0))},[M,i,I]);const V=()=>{F.current=!0,J(!0)},Q=G=>{var se;(F.current||(se=G.animationName)!=null&&se.includes("menuOut"))&&(F.current=!1,B(!1),J(!1),I&&D(k))};Oe.useEffect(()=>{if(!M&&!q)return;const G=se=>{j.current&&!j.current.contains(se.target)&&(I&&D(k),V())};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[M,q,I,k]);const Ce=()=>{m||B(G=>!G)},fe=(G,se)=>{se.preventDefault(),se.stopPropagation(),qe(G,se)},qe=(G,se)=>{if(dn(G,d))return;const Pe=fn(G,g);if(I&&D(an(G,s)),t){const We=Pe??null;if(We==null)return;const Je=Qr(R,We)?R.filter(tt=>!Jr(tt,We)):[...R,We];r==null||r({value:Je,originalEvent:se});return}r==null||r({value:Pe??null,originalEvent:se}),V()},Te=G=>{if(!M){if(G.key==="Enter"&&I&&_.trim()){G.preventDefault();const se=_.trim(),Pe=se.toLowerCase(),We=c.find(Je=>{const tt=an(Je,s).toLowerCase();return tt===Pe||tt.startsWith(Pe)}),Ye=We&&!dn(We,d)?fn(We,g):null;We&&!dn(We,d)&&(D(an(We,s)),r==null||r({value:Ye,originalEvent:G})),o==null||o({value:se,selectedValue:Ye,originalEvent:G});return}(G.key==="Enter"||G.key===" "||G.key==="ArrowDown")&&(G.preventDefault(),B(!0));return}if(G.key==="Escape"){G.preventDefault(),V();return}if(G.key==="Enter"){if(G.preventDefault(),I){const se=_.trim();if(se){const Pe=se.toLowerCase(),We=c.find(Je=>{const tt=an(Je,s).toLowerCase();return tt===Pe||tt.startsWith(Pe)}),Ye=We&&!dn(We,d)?fn(We,g):null;We&&!dn(We,d)&&qe(We,G),o==null||o({value:se,selectedValue:Ye,originalEvent:G})}else o==null||o({value:"",selectedValue:null,originalEvent:G})}else if(z.length>0){const se=z.find(Pe=>!dn(Pe,d));se&&!dn(se,d)&&qe(se,G)}}},Ke=t&&n==="chip",rt=(G,se)=>{if(se.stopPropagation(),m)return;const Pe=fn(G,g);if(Pe==null)return;const We=R.filter(Ye=>!Jr(Ye,Pe));r==null||r({value:We,originalEvent:se})},et=Oe.useMemo(()=>a==null?null:Math.max(0,a),[a]),ce=Oe.useMemo(()=>!Ke||et==null?C:C.slice(0,et),[Ke,et,C]),me=Ke&&et!=null?Math.max(0,C.length-et):0,be=[dt.dropdown,m?dt.disabled:"",M?dt.open:"",y].filter(Boolean).join(" "),Le=[dt.control,m?dt.controlDisabled:"",Ke?dt.chipDisplay:"",Ke&&C.length===0?dt.chipEmpty:""].filter(Boolean).join(" "),de=[dt.panel,q?dt.panelClosing:"",S].filter(Boolean).join(" "),he=Oe.useId(),oe=E??`dropdown-${he.replace(/[^a-zA-Z0-9_-]/g,"")}`,Z=`${oe}-panel`,ke=h==null?void 0:`${oe}-error`,Be=h==null?{}:{"aria-invalid":"true"},pe=ke==null?{}:{"aria-describedby":ke};return ue.jsxs("div",{className:be,ref:j,"data-testid":T,children:[v!=null?ue.jsx(Pn,{htmlFor:oe,required:b,children:v}):null,ue.jsxs("div",{id:I?void 0:oe,role:"combobox","aria-expanded":M||q,"aria-haspopup":"listbox","aria-controls":M||q?Z:void 0,"aria-disabled":m,"aria-label":typeof v=="string"?v:void 0,...I?{}:Be,...I?{}:pe,tabIndex:I||m?-1:0,className:Le,onClick:I?void 0:Ce,onKeyDown:I?void 0:Te,"data-testid":T&&!I?`${T}-control`:void 0,children:[I?ue.jsx("input",{ref:A,id:oe,type:"text",className:dt.controlInput,value:_,onChange:G=>{D(G.target.value),!M&&!q&&B(!0)},onFocus:()=>{!m&&!M&&!q&&B(!0)},onKeyDown:Te,placeholder:u,disabled:m,"aria-autocomplete":"list","aria-controls":M||q?Z:void 0,"aria-expanded":M||q,...Be,...pe,"data-testid":T?`${T}-control`:void 0}):Ke?ue.jsx("span",{className:dt.chipValue,children:C.length===0?ue.jsx("span",{className:dt.placeholder,children:u}):ue.jsxs(ue.Fragment,{children:[ce.map((G,se)=>{const Pe=an(G,s),We=fn(G,g),Ye=Si(We,Pe,se);return ue.jsxs("span",{className:dt.chipItem,children:[ue.jsx("span",{className:dt.chipLabel,children:x?x(G):Pe}),!m&&ue.jsx("button",{type:"button",className:dt.chipRemove,onClick:Je=>rt(G,Je),onKeyDown:Je=>{(Je.key==="Enter"||Je.key===" ")&&Je.stopPropagation()},"aria-label":`Remove ${Pe}`,"data-testid":T?`${T}-chip-remove-${se}`:void 0,children:f??ue.jsx(Xo,{size:"1rem","aria-hidden":!0})})]},Ye)}),me>0&&ue.jsx("span",{className:dt.chipOverflow,children:l.replace("{0}",String(C.length))})]})}):ue.jsx("span",{className:dt.value,children:P&&!t?P(O??null):(t?L:k)||ue.jsx("span",{className:dt.placeholder,children:u})}),ue.jsx(Yr,{className:dt.chevron,"aria-hidden":!0,onClick:I?Ce:void 0})]}),(M||q)&&ue.jsxs("div",{ref:K,id:Z,className:de,role:"presentation",onAnimationEnd:Q,"data-testid":T?`${T}-panel`:void 0,children:[i&&!I&&ue.jsxs("div",{className:dt.filterWrapper,children:[ue.jsx("input",{ref:H,type:"text",className:dt.filterInput,value:$,onChange:G=>{N(G.target.value)},onKeyDown:G=>{G.key==="Escape"&&B(!1),G.stopPropagation()},placeholder:"Search...","aria-label":"Filter options",title:"Filter options","data-testid":T?`${T}-filter`:void 0}),ue.jsx(Zo,{className:dt.filterIcon,"aria-hidden":!0})]}),ue.jsx("ul",{className:dt.list,role:"listbox","aria-label":"Options",children:z.length===0?ue.jsx("li",{className:dt.empty,children:"No results"}):z.map((G,se)=>{const Pe=fn(G,g),We=an(G,s),Ye=dn(G,d),Je=t?Qr(R,Pe):e===Pe,tt=Si(Pe,We,se);return ue.jsxs("li",{role:"option","aria-selected":Je,"aria-disabled":Ye,className:[dt.option,Je?dt.optionSelected:"",Ye?dt.optionDisabled:""].filter(Boolean).join(" "),onMouseDown:bt=>fe(G,bt),"data-testid":T?`${T}-option-${se}`:void 0,children:[t&&ue.jsx("span",{className:dt.checkboxContainer,"aria-hidden":!0,children:ue.jsx("input",{type:"checkbox",checked:Je,readOnly:!0,tabIndex:-1,className:dt.checkbox})}),ue.jsx("span",{className:dt.optionLabel,children:x?x(G):We})]},tt)})})]}),h==null?null:ue.jsx("div",{id:ke,className:dt.error,role:"alert",children:h})]})},Un={inputText:"_inputText_1wva8_1",input:"_input_1wva8_1",inputTextarea:"_inputTextarea_1wva8_44",error:"_error_1wva8_51",inputTextDisabled:"_inputTextDisabled_1wva8_60"},iu=({label:e,tooltip:r,required:t=!1,inputId:n,textarea:a=!1,rows:l,error:f,className:o="","data-testid":c,disabled:s=!1,...g})=>{const{type:d="text",...u}=g,i=Oe.useId(),p=n??`input-text-${i.replace(/[^a-zA-Z0-9_-]/g,"")}`,m=[Un.inputText,s?Un.inputTextDisabled:"",o].filter(Boolean).join(" "),b=u["aria-invalid"];let v;b===void 0?v=void 0:b===!0?v="true":b===!1?v="false":v=b;const h=t?{"aria-required":"true"}:{"aria-required":"false"},E=v===void 0&&f==null?{}:{"aria-invalid":v??"true"},y=f==null?void 0:`${p}-error`,S=[Un.input,a?Un.inputTextarea:""].filter(Boolean).join(" "),P={id:p,className:S,disabled:s,...h,...E,"aria-describedby":y,"data-testid":c?`${c}-input`:void 0};return ue.jsxs("div",{className:m,"data-testid":c,children:[e!=null?ue.jsx(Pn,{htmlFor:p,required:t,tooltip:r,children:e}):null,a?ue.jsx("textarea",{...u,...P,rows:l??3}):ue.jsx("input",{...u,...P,type:d}),f==null?null:ue.jsx("div",{id:y,className:Un.error,role:"alert",children:f})]})},Oi={dateValue:"_dateValue_1p8tp_1",time:"_time_1p8tp_9"},lu="--",ou=({date:e,locale:r,showTime:t,nullText:n,timeZone:a,hour12:l})=>{if(!e)return{dateText:n};const f=e instanceof Date?e:new Date(e);if(Number.isNaN(f.getTime()))return{dateText:n};const o=l??new Intl.DateTimeFormat(r).resolvedOptions().hour12,c={year:"numeric",month:"2-digit",day:"2-digit",...a?{timeZone:a}:{}};try{const s=new Intl.DateTimeFormat(r,c).format(f);if(!t)return{dateText:s};const g={hour:"2-digit",minute:"2-digit",hour12:o,...a?{timeZone:a}:{}},d=new Intl.DateTimeFormat(r,g).format(f);return{dateText:s,timeText:d}}catch(s){return console.error(s),{dateText:n}}},uu=({date:e,locale:r="en",showTime:t=!1,nullText:n=lu,timeZone:a,hour12:l,className:f="","data-testid":o})=>{const{dateText:c,timeText:s}=Oe.useMemo(()=>ou({date:e,locale:r,showTime:t,nullText:n,timeZone:a,hour12:l}),[e,l,r,n,t,a]);return ue.jsxs("div",{className:[Oi.dateValue,f].filter(Boolean).join(" "),"data-testid":o,children:[ue.jsx("span",{children:c}),t&&s?ue.jsx("span",{className:Oi.time,children:s}):null]})};function Ci(e){return Kt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"},child:[]}]})(e)}function cu(e){return Kt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8m7.5-6.923c-.67.204-1.335.82-1.887 1.855A8 8 0 0 0 5.145 4H7.5zM4.09 4a9.3 9.3 0 0 1 .64-1.539 7 7 0 0 1 .597-.933A7.03 7.03 0 0 0 2.255 4zm-.582 3.5c.03-.877.138-1.718.312-2.5H1.674a7 7 0 0 0-.656 2.5zM4.847 5a12.5 12.5 0 0 0-.338 2.5H7.5V5zM8.5 5v2.5h2.99a12.5 12.5 0 0 0-.337-2.5zM4.51 8.5a12.5 12.5 0 0 0 .337 2.5H7.5V8.5zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5zM5.145 12q.208.58.468 1.068c.552 1.035 1.218 1.65 1.887 1.855V12zm.182 2.472a7 7 0 0 1-.597-.933A9.3 9.3 0 0 1 4.09 12H2.255a7 7 0 0 0 3.072 2.472M3.82 11a13.7 13.7 0 0 1-.312-2.5h-2.49c.062.89.291 1.733.656 2.5zm6.853 3.472A7 7 0 0 0 13.745 12H11.91a9.3 9.3 0 0 1-.64 1.539 7 7 0 0 1-.597.933M8.5 12v2.923c.67-.204 1.335-.82 1.887-1.855q.26-.487.468-1.068zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.7 13.7 0 0 1-.312 2.5m2.802-3.5a7 7 0 0 0-.656-2.5H12.18c.174.782.282 1.623.312 2.5zM11.27 2.461c.247.464.462.98.64 1.539h1.835a7 7 0 0 0-3.072-2.472c.218.284.418.598.597.933M10.855 4a8 8 0 0 0-.468-1.068C9.835 1.897 9.17 1.282 8.5 1.077V4z"},child:[]}]})(e)}function ea(e){return Kt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2"},child:[]}]})(e)}function _i(e){return Kt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"},child:[]}]})(e)}function su(e){return Kt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8"},child:[]}]})(e)}const fu={backButton:"_backButton_1a9n2_1"},du=({onClick:e,className:r="",disabled:t=!1,ariaLabel:n="Back","data-testid":a="back-button"})=>ue.jsx("button",{type:"button",className:[fu.backButton,r].filter(Boolean).join(" "),onClick:e,disabled:t,"aria-label":n,"data-testid":a,children:ue.jsx(su,{size:16,"aria-hidden":!0})}),xi=e=>{if(e!=null)return Object.fromEntries(Object.entries(e).map(([r,t])=>[r.toLowerCase(),t]))},vu=(e,r)=>{if(e.length===0)return[];if(r==null||r==="")return[...e];const t=r.toLowerCase(),n=e.find(l=>l.id.toLowerCase()===t),a=e.filter(l=>l.id.toLowerCase()!==t);return n?[n,...a]:[...e]},hu=(e,r,t)=>{const n={...e??{},[r]:t};return t===""&&delete n[r],Object.keys(n).length===0?void 0:n},mu=(e,r)=>{if(e==null)return;const t=e[r];if(t!=null)return typeof t=="string"?t:t.message},Ht={localizedInput:"_localizedInput_b3s84_1",row:"_row_b3s84_7",inputGroup:"_inputGroup_b3s84_11",addon:"_addon_b3s84_17",addonInvalid:"_addonInvalid_b3s84_34",input:"_input_b3s84_11",inputInvalid:"_inputInvalid_b3s84_75",languageError:"_languageError_b3s84_82",error:"_error_b3s84_90",toggle:"_toggle_b3s84_98",toggleLabel:"_toggleLabel_b3s84_111",toggleIcon:"_toggleIcon_b3s84_119"},gu=({value:e,onChange:r,languages:t,selectedLanguage:n,label:a,tooltip:l,required:f=!1,inputId:o,showLanguagesLabel:c,hideLanguagesLabel:s,displayOnly:g=!1,disabled:d=!1,error:u,errors:i,showAllLanguages:p=!1,placeholder:m,className:b="","data-testid":v="localized-inputs"})=>{const h=Oe.useId(),E=o??`localized-input-${h.replace(/[^a-zA-Z0-9_-]/g,"")}`,[y,S]=Oe.useState(()=>xi(e)),[P,x]=Oe.useState(p);Oe.useEffect(()=>{S(xi(e))},[e]),Oe.useEffect(()=>{x(p)},[p]);const T=Oe.useMemo(()=>vu(t,n),[t,n]),I=Oe.useCallback((k,L)=>{const M=hu(y,k,L);S(M),r(M)},[y,r]),R=d||g,O=u!=null&&u!==!1&&u!=="",C=[Ht.localizedInput,b].filter(Boolean).join(" ");return ue.jsxs("div",{className:C,"data-testid":v,children:[a!=null?ue.jsx(Pn,{htmlFor:E,required:f,tooltip:l,children:a}):null,T.map((k,L)=>{const M=k.id.toLowerCase(),B=mu(i,k.id),q=!!B||O;return L===0||P?ue.jsxs("div",{className:Ht.row,children:[ue.jsxs("div",{className:Ht.inputGroup,children:[ue.jsx("span",{className:[Ht.addon,q?Ht.addonInvalid:""].filter(Boolean).join(" "),children:k.id.toUpperCase()}),ue.jsx("input",{id:L===0?E:void 0,type:"text",className:[Ht.input,q?Ht.inputInvalid:""].filter(Boolean).join(" "),disabled:R,value:(y==null?void 0:y[M])??"",placeholder:m,"aria-invalid":q||void 0,"aria-required":L===0?f:void 0,"data-testid":v?`${v}-${M}`:void 0,onChange:$=>I(M,$.target.value)})]}),B!=null&&B!==""?ue.jsx("small",{className:Ht.languageError,role:"alert",children:B}):null]},k.id):null}),O?ue.jsx("small",{className:Ht.error,role:"alert",children:u}):null,T.length>1?ue.jsxs("button",{type:"button",className:Ht.toggle,onClick:()=>x(k=>!k),"data-testid":v?`${v}-toggle`:void 0,children:[ue.jsx(cu,{className:Ht.toggleIcon,"aria-hidden":!0}),ue.jsx("span",{className:Ht.toggleLabel,children:P?s:c})]}):null]})},An={checkbox:"_checkbox_16tdt_1",input:"_input_16tdt_12",box:"_box_16tdt_26",checkboxDisabled:"_checkboxDisabled_16tdt_39",checkboxInvalid:"_checkboxInvalid_16tdt_63",checkboxReadOnly:"_checkboxReadOnly_16tdt_83"},yu=({checked:e,value:r,onChange:t,inputId:n,disabled:a=!1,invalid:l=!1,className:f="",name:o,readOnly:c,required:s,tabIndex:g,"aria-label":d,"aria-labelledby":u,"data-testid":i,...p})=>{const m=Oe.useId(),b=n??`checkbox-${m.replace(/[^a-zA-Z0-9_-]/g,"")}`,v=y=>{a||c||t==null||t({originalEvent:y,checked:y.currentTarget.checked,...r!=null?{value:r}:{},stopPropagation:()=>y.stopPropagation(),preventDefault:()=>y.preventDefault()})},h=[An.checkbox,l?An.checkboxInvalid:"",a?An.checkboxDisabled:"",c?An.checkboxReadOnly:"",f].filter(Boolean).join(" "),E=a;return ue.jsxs("div",{className:h,"data-testid":i,children:[ue.jsx("input",{...p,type:"checkbox",id:b,...e!==void 0?{checked:e}:{},...r!=null?{value:String(r)}:{},onChange:v,disabled:E,readOnly:c,onClick:y=>{c&&y.preventDefault()},onKeyDown:y=>{c&&y.key===" "&&y.preventDefault()},required:s,name:o,tabIndex:g,"aria-label":d,"aria-labelledby":u,"aria-invalid":l?!0:void 0,className:An.input,"data-testid":i?`${i}-input`:void 0}),ue.jsx("span",{className:An.box,"aria-hidden":"true"})]})},Jt={root:"_root_1hhdk_1",inputWrap:"_inputWrap_1hhdk_7",inputWrapDisabled:"_inputWrapDisabled_1hhdk_20",inputWrapInvalid:"_inputWrapInvalid_1hhdk_26",input:"_input_1hhdk_7",dropdownButton:"_dropdownButton_1hhdk_47",panel:"_panel_1hhdk_63",option:"_option_1hhdk_80",optionHighlighted:"_optionHighlighted_1hhdk_86",error:"_error_1hhdk_90"},bu=300,Ti=(e,r)=>{if(r){const n=e[r];return n!=null?String(n):""}const t=Object.values(e).find(n=>typeof n=="string");return t!=null?String(t):""},ki=({value:e,suggestions:r,completeMethod:t,field:n,onChange:a,onSelect:l,dropdown:f=!1,disabled:o=!1,placeholder:c,label:s,error:g,className:d="",inputId:u,"data-testid":i})=>{const[p,m]=Oe.useState(!1),[b,v]=Oe.useState(-1),h=Oe.useRef(null),E=Oe.useRef(null),y=Oe.useRef(),S=Oe.useId(),P=u??`autocomplete-${S.replace(/[^a-zA-Z0-9_-]/g,"")}`,x=`${P}-list`,T=g==null?void 0:`${P}-error`,I=p&&r.length>0;Oe.useEffect(()=>{v(q=>r.length===0?-1:q<0?q:q>=r.length?r.length-1:q)},[r]);const R=Oe.useMemo(()=>r.map(q=>Ti(q,n)),[r,n]),O=Oe.useCallback(q=>{y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{t({query:q})},bu)},[t]);Oe.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]),Oe.useEffect(()=>{if(!p)return;const q=J=>{h.current&&!h.current.contains(J.target)&&(m(!1),v(-1))};return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[p]);const C=q=>{const J=q.target.value;a({value:J,originalEvent:q}),O(J),m(!0),v(-1)},k=(q,J)=>{y.current&&(clearTimeout(y.current),y.current=void 0);const $=Ti(q,n);a({value:$,originalEvent:J}),l==null||l({value:q,originalEvent:J}),m(!1),v(-1)},L=q=>{if(q.key==="ArrowDown"){q.preventDefault(),m(!0),v(J=>J<r.length-1?J+1:J);return}if(q.key==="ArrowUp"){if(q.preventDefault(),!p)return;v(J=>J>0?J-1:0);return}if(q.key==="Enter"&&p&&b>=0&&r[b]){q.preventDefault(),k(r[b],q);return}q.key==="Escape"&&(m(!1),v(-1))},M=[Jt.root,d].filter(Boolean).join(" "),B=[Jt.inputWrap,o?Jt.inputWrapDisabled:"",g?Jt.inputWrapInvalid:""].filter(Boolean).join(" ");return ue.jsxs("div",{className:M,ref:h,"data-testid":i,children:[s!=null?ue.jsx(Pn,{htmlFor:P,children:s}):null,ue.jsxs("div",{className:B,children:[ue.jsx("input",{ref:E,id:P,type:"text",className:Jt.input,value:e,onChange:C,onKeyDown:L,onFocus:()=>{o||m(!0)},onBlur:q=>{var J;(J=h.current)!=null&&J.contains(q.relatedTarget)||(m(!1),v(-1))},disabled:o,placeholder:c,role:"combobox","aria-expanded":I,"aria-haspopup":"listbox","aria-controls":I?x:void 0,"aria-activedescendant":I&&b>=0?`${P}-option-${b}`:void 0,"aria-autocomplete":"list","aria-invalid":g?!0:void 0,"aria-describedby":T,"data-testid":i?`${i}-input`:void 0}),f&&ue.jsx("button",{type:"button",className:Jt.dropdownButton,disabled:o,onClick:()=>{var q;o||(m(J=>{const $=!J;return $&&O(e),$}),(q=E.current)==null||q.focus())},"aria-label":"Show suggestions","data-testid":i?`${i}-dropdown`:void 0,children:ue.jsx(Yr,{"aria-hidden":!0})})]}),I&&ue.jsx("ul",{id:x,className:Jt.panel,role:"listbox","data-testid":i?`${i}-panel`:void 0,children:r.map((q,J)=>{const $=R[J],N=`${P}-option-${J}`;return ue.jsx("li",{id:N,role:"option","aria-selected":J===b,className:[Jt.option,J===b?Jt.optionHighlighted:""].filter(Boolean).join(" "),onMouseDown:_=>{_.preventDefault(),k(q,_)},"data-testid":i?`${i}-option-${J}`:void 0,children:$},N)})}),g!=null&&ue.jsx("div",{id:T,className:Jt.error,role:"alert",children:g})]})};ki.displayName="AutoComplete";const Qt={accordion:"_accordion_l1hoq_1",tab:"_tab_l1hoq_6",headerButton:"_headerButton_l1hoq_11",headerContent:"_headerContent_l1hoq_39",icon:"_icon_l1hoq_45",panel:"_panel_l1hoq_53",panelCollapsed:"_panelCollapsed_l1hoq_58",panelOpen:"_panelOpen_l1hoq_64",panelContent:"_panelContent_l1hoq_70",noBorderLast:"_noBorderLast_l1hoq_74"},ta=e=>null;ta.displayName="AccordionTab";const pu=(e,r)=>e==null?[]:Array.isArray(e)?r?e:e.slice(0,1):[e],Eu=e=>e.replace(/[^a-zA-Z0-9_-]/g,""),Ni=({activeIndex:e,multiple:r=!1,expandIcon:t,collapseIcon:n,onTabChange:a,onTabOpen:l,onTabClose:f,className:o="",transitionOptions:c,pt:s,ptOptions:g,unstyled:d,children:u,...i})=>{const p=Oe.useId(),m=Eu(p),b=Oe.useMemo(()=>Oe.Children.toArray(u).filter(k=>Oe.isValidElement(k)&&k.type===ta),[u]),v=e!==void 0,h=Oe.useMemo(()=>pu(e,r),[e,r]),[E,y]=Oe.useState([]),S=v?h:E,P=typeof c=="object"&&c!=null&&typeof c.timeout=="number"?c.timeout:void 0,x=ue.jsx(Qo,{"aria-hidden":!0}),T=ue.jsx(Yr,{"aria-hidden":!0}),I=t??x,R=n??T,O=(C,k)=>{const L=S.includes(C);if(r){const q=L?S.filter(J=>J!==C):[...S,C];v||y(q),a==null||a({index:q,originalEvent:k}),L?f==null||f({index:C,originalEvent:k}):l==null||l({index:C,originalEvent:k});return}const M=S.length?S[0]:null,B=L?[]:[C];if(v||y(B),a==null||a({index:B,originalEvent:k}),L){f==null||f({index:C,originalEvent:k});return}M!=null&&(f==null||f({index:M,originalEvent:k})),l==null||l({index:C,originalEvent:k})};return ue.jsx("div",{className:[Qt.accordion,o].filter(Boolean).join(" "),...i,children:b.map((C,k)=>{var K;const L=C.props,M=S.includes(k),B=!!L.disabled,q=`${m}-header-${k}`,J=`${m}-content-${k}`,$=L.headerTemplate!=null?typeof L.headerTemplate=="function"?L.headerTemplate({index:k,selected:M,disabled:B,count:b.length,first:k===0,last:k===b.length-1}):L.headerTemplate:L.header,N=M?R:I,_=[Qt.headerButton,L.headerClassName??""].filter(Boolean).join(" "),D=[Qt.tab,L.className??"",k===b.length-1?Qt.noBorderLast:""].filter(Boolean).join(" "),j=typeof $=="string"?$:void 0;return ue.jsxs("div",{className:D,style:L.style,children:[ue.jsxs("button",{id:q,type:"button",disabled:B,className:_,style:L.headerStyle,"aria-controls":J,"aria-expanded":M,"aria-disabled":B,tabIndex:L.tabIndex,onClick:H=>O(k,H),...L.headerProps,"aria-label":((K=L.headerProps)==null?void 0:K["aria-label"])??j,children:[ue.jsx("span",{className:Qt.headerContent,children:$}),ue.jsx("span",{className:Qt.icon,"aria-hidden":!0,children:N})]}),ue.jsx("div",{id:J,role:"region","aria-labelledby":q,"aria-hidden":!M,className:[Qt.panel,M?Qt.panelOpen:Qt.panelCollapsed].join(" "),style:{transitionDuration:P?`${P}ms`:void 0},children:ue.jsx("div",{className:[Qt.panelContent,L.contentClassName??""].filter(Boolean).join(" "),style:L.contentStyle,children:L.children})})]},k)})})};Ni.displayName="Accordion";const Sn={selectButton:"_selectButton_1u3fo_1",selectButtonDisabled:"_selectButtonDisabled_1u3fo_9",selectButtonInvalid:"_selectButtonInvalid_1u3fo_14",button:"_button_1u3fo_14",buttonFirst:"_buttonFirst_1u3fo_47",buttonLast:"_buttonLast_1u3fo_51",buttonSelected:"_buttonSelected_1u3fo_59"},Ri=(e,r)=>{const n=e[r];return n!=null?String(n):""},na=(e,r)=>e[r],Pi=(e,r)=>r==null?!1:!!e[r],wu=({value:e,onChange:r,options:t,optionLabel:n="label",optionValue:a="value",optionDisabled:l,multiple:f=!1,itemTemplate:o,disabled:c=!1,invalid:s=!1,className:g="","data-testid":d})=>{const u=m=>{const b=na(m,a);return f&&Array.isArray(e)?e.includes(b):e===b},i=(m,b)=>{if(c||Pi(m,l))return;const v=na(m,a);if(v===void 0)return;let h;if(f){const E=Array.isArray(e)?e:[];h=E.includes(v)?E.filter(S=>S!==v):[...E,v]}else h=e===v?null:v;r==null||r({value:h,originalEvent:b})},p=[Sn.selectButton,c?Sn.selectButtonDisabled:"",s?Sn.selectButtonInvalid:"",g].filter(Boolean).join(" ");return ue.jsx("div",{className:p,role:"group","aria-disabled":c,"data-testid":d,children:t.map((m,b)=>{const v=na(m,a),h=v!=null?String(v):`option-${b}`,E=Pi(m,l),y=u(m);return ue.jsx("button",{type:"button","aria-pressed":y,"aria-disabled":E||c,"aria-label":Ri(m,n),disabled:c||E,className:[Sn.button,y?Sn.buttonSelected:"",b===0?Sn.buttonFirst:"",b===t.length-1?Sn.buttonLast:""].filter(Boolean).join(" "),onClick:S=>i(m,S),onKeyDown:S=>{(S.key===" "||S.key==="Enter")&&(S.preventDefault(),i(m,S))},"data-testid":d?`${d}-option-${b}`:void 0,children:o?o(m):Ri(m,n)},h)})})},br={radioButton:"_radioButton_1gxkv_1",radioButtonDisabled:"_radioButtonDisabled_1gxkv_10",label:"_label_1gxkv_14",input:"_input_1gxkv_18"},Su=({inputId:e,name:r,value:t,checked:n,onChange:a,disabled:l=!1,label:f,className:o="","data-testid":c,...s})=>{const g=Oe.useId(),d=e??`radiobutton-${g.replace(/[^a-zA-Z0-9_-]/g,"")}`,u=p=>{a==null||a({value:t,originalEvent:p})},i=[br.radioButton,l?br.radioButtonDisabled:"",o].filter(Boolean).join(" ");return ue.jsxs("div",{className:i,"data-testid":c,children:[ue.jsx("input",{...s,type:"radio",id:d,name:r,value:String(t),...n!==void 0?{checked:n}:{},disabled:l,onChange:u,className:br.input,"data-testid":c?`${c}-input`:void 0}),f!=null&&ue.jsx("label",{htmlFor:d,className:br.label,children:f})]})};function Ou(e){if(Array.isArray(e))return e}function Cu(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,a,l,f,o=[],c=!0,s=!1;try{if(l=(t=t.call(e)).next,r!==0)for(;!(c=(n=l.call(t)).done)&&(o.push(n.value),o.length!==r);c=!0);}catch(g){s=!0,a=g}finally{try{if(!c&&t.return!=null&&(f=t.return(),Object(f)!==f))return}finally{if(s)throw a}}return o}}function ra(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Ai(e,r){if(e){if(typeof e=="string")return ra(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ra(e,r)}}function _u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ (function(ot,ue){typeof exports=="object"&&typeof module<"u"?ue(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],ue):(ot=typeof globalThis<"u"?globalThis:ot||self,ue(ot.EmporixComponentLibrary={},ot.React,ot.React,ot.ReactDOM))})(this,(function(ot,ue,Oe,Rn){"use strict";function jo(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}function qo(e,r){for(var t=0;t<r.length;t++){const n=r[t];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(n,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const w=jo(Oe),Gr={primaryButton:"_primaryButton_gvcke_1",primaryButtonDisabled:"_primaryButtonDisabled_gvcke_33",spinner:"_spinner_gvcke_41"};var hi={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},mi=Oe.createContext&&Oe.createContext(hi),zo=["attr","size","title"];function $o(e,r){if(e==null)return{};var t,n,a=Ho(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Ho(e,r){if(e==null)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(r.indexOf(n)!==-1)continue;t[n]=e[n]}return t}function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},hr.apply(null,arguments)}function gi(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function mr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?gi(Object(t),!0).forEach(function(n){Uo(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gi(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Uo(e,r,t){return(r=Ko(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ko(e){var r=Wo(e,"string");return typeof r=="symbol"?r:r+""}function Wo(e,r){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function yi(e){return e&&e.map((r,t)=>Oe.createElement(r.tag,mr({key:t},r.attr),yi(r.child)))}function Kt(e){return r=>Oe.createElement(Vo,hr({attr:mr({},e.attr)},r),yi(e.child))}function Vo(e){var r=t=>{var{attr:n,size:a,title:l}=e,f=$o(e,zo),o=a||t.size||"1em",c;return t.className&&(c=t.className),e.className&&(c=(c?c+" ":"")+e.className),Oe.createElement("svg",hr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,f,{className:c,style:mr(mr({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),l&&Oe.createElement("title",null,l),e.children)};return mi!==void 0?Oe.createElement(mi.Consumer,null,t=>r(t)):r(hi)}function Go(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}const bi=({children:e,disabled:r=!1,loading:t=!1,onClick:n,className:a="","data-testid":l,...f})=>{const o=[Gr.primaryButton,r?Gr.primaryButtonDisabled:"",a].filter(Boolean).join(" ");return ue.jsxs("button",{type:"button",className:o,disabled:r||t,onClick:n,"data-testid":l,...f,children:[t&&ue.jsx(Go,{className:Gr.spinner,size:12}),e]})},pi={secondaryButton:"_secondaryButton_15dkw_1",secondaryButtonDisabled:"_secondaryButtonDisabled_15dkw_32"},Ei=({children:e,disabled:r=!1,onClick:t,className:n="","data-testid":a,...l})=>{const f=[pi.secondaryButton,r?pi.secondaryButtonDisabled:"",n].filter(Boolean).join(" ");return ue.jsx("button",{type:"button",className:f,disabled:r,onClick:t,"data-testid":a,...l,children:e})},Wt={tabsContainer:"_tabsContainer_6vpel_1",fullWidth:"_fullWidth_6vpel_7",tabsHeader:"_tabsHeader_6vpel_7",tabItem:"_tabItem_6vpel_10",headerFill:"_headerFill_6vpel_13",tabContent:"_tabContent_6vpel_39",tabLabel:"_tabLabel_6vpel_61",tabLine:"_tabLine_6vpel_71",active:"_active_6vpel_85",inactive:"_inactive_6vpel_96",tabPanels:"_tabPanels_6vpel_104"},Yo=({tabs:e,activeTabId:r,onTabChange:t,className:n="",fullWidth:a=!1,"data-testid":l,...f})=>{var c;const o=[Wt.tabsContainer,a?Wt.fullWidth:"",n].filter(Boolean).join(" ");return ue.jsxs("div",{className:o,"data-testid":l,...f,children:[ue.jsxs("div",{className:Wt.tabsHeader,children:[e.map(s=>{const g=s.id===r,d=[Wt.tabItem,g?Wt.active:Wt.inactive].filter(Boolean).join(" ");return ue.jsxs("button",{type:"button",className:d,onClick:()=>t(s.id),"data-testid":`${l}-tab-${s.id}`,children:[ue.jsx("div",{className:Wt.tabContent,children:ue.jsx("span",{className:Wt.tabLabel,children:s.label})}),ue.jsx("div",{className:Wt.tabLine})]},s.id)}),ue.jsx("div",{className:Wt.headerFill,"aria-hidden":"true"})]}),ue.jsx("div",{className:Wt.tabPanels,children:(c=e.find(s=>s.id===r))==null?void 0:c.content})]})};function Xo(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function Zo(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(e)}function Jo(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12.01",y2:"8"},child:[]}]})(e)}function Qo(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function Yr(e){return Kt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}const gr={anchorWrap:"_anchorWrap_1768z_1",panel:"_panel_1768z_7",panelInteractive:"_panelInteractive_1768z_24",panelPassThrough:"_panelPassThrough_1768z_28"},$n=8,yr=8;function Hn(...e){return r=>{e.forEach(t=>t==null?void 0:t(r))}}function eu(e){if(e==="top"||e==="bottom"||e==="left"||e==="right"||e==="mouse")return e}function tu(e){const{anchorRect:r,tooltipRect:t,placement:n,pointer:a,mouseTrack:l,mouseTrackTop:f,mouseTrackLeft:o}=e;if(n==="mouse"||l)return{top:a.y+f,left:a.x+o};let c=0,s=0;switch(n){case"top":c=r.top-t.height-$n,s=r.left+r.width/2-t.width/2;break;case"bottom":c=r.bottom+$n,s=r.left+r.width/2-t.width/2;break;case"left":c=r.top+r.height/2-t.height/2,s=r.left-t.width-$n;break;case"right":c=r.top+r.height/2-t.height/2,s=r.right+$n;break;default:c=r.top-t.height-$n,s=r.left+r.width/2-t.width/2}const g=window.innerWidth,d=window.innerHeight;return s=Math.min(Math.max(s,yr),g-t.width-yr),c=Math.min(Math.max(c,yr),d-t.height-yr),{top:c,left:s}}function Xr(e,r){const t=e.getAttribute("data-pr-tooltip");return t!=null&&t!==""?t:r??""}function nu(e){return e==null?!0:typeof e=="string"||typeof e=="number"?String(e)==="":!1}const ru=({children:e,className:r,eventMode:t,onAnchorMouseEnter:n,onAnchorMouseMove:a,onAnchorMouseLeave:l,onAnchorFocusIn:f,onAnchorFocusOut:o})=>{const c=Oe.Children.toArray(e);if(c.length!==1||!Oe.isValidElement(c[0])){const p=[gr.anchorWrap,r].filter(Boolean).join(" "),m=t==="hover"||t==="both"?{onMouseEnter:n,onMouseMove:a,onMouseLeave:l}:{},b=t==="focus"||t==="both"?{onFocusCapture:f,onBlurCapture:o}:{};return ue.jsx("span",{className:p,...m,...b,children:e})}const g=c[0],d=t==="hover"||t==="both"?{onMouseEnter:Hn(n,g.props.onMouseEnter),onMouseMove:Hn(a,g.props.onMouseMove),onMouseLeave:Hn(l,g.props.onMouseLeave)}:{},u=t==="focus"||t==="both"?{onFocusCapture:Hn(f,g.props.onFocusCapture),onBlurCapture:Hn(o,g.props.onBlurCapture)}:{},i=[r,g.props.className].filter(Boolean).join(" ");return Oe.cloneElement(g,{...d,...u,...i?{className:i}:{},ref:g.props.ref})},wi=({target:e,content:r,position:t="top",event:n="hover",showDelay:a=0,hideDelay:l=0,autoHide:f=!0,mouseTrack:o=!1,mouseTrackTop:c=0,mouseTrackLeft:s=0,disabled:g=!1,className:d="",panelClassName:u="",id:i,children:p,"data-testid":m})=>{const b=Oe.useId().replace(/:/g,""),v=i??`emporix-tooltip-${b}`,[h,E]=Oe.useState(!1),[y,S]=Oe.useState({top:0,left:0}),[P,x]=Oe.useState(null),T=Oe.useRef(null),I=Oe.useRef(null),R=Oe.useRef({x:0,y:0}),O=Oe.useRef(),C=Oe.useRef(),k=Oe.useCallback(()=>{O.current!=null&&(clearTimeout(O.current),O.current=void 0)},[]),L=Oe.useCallback(()=>{C.current!=null&&(clearTimeout(C.current),C.current=void 0)},[]),M=Oe.useCallback(()=>{const z=T.current;if(z){const V=eu(z.getAttribute("data-pr-position"));if(V)return V}return t},[t]),B=Oe.useCallback(()=>{const z=T.current,V=I.current;if(!z||!V)return;const Q=z.getBoundingClientRect(),Ce=V.getBoundingClientRect(),fe=M();S(tu({anchorRect:Q,tooltipRect:Ce,placement:fe,pointer:R.current,mouseTrack:o,mouseTrackTop:c,mouseTrackLeft:s}))},[M,o,c,s]),q=Oe.useCallback(()=>{k(),L();const z=T.current;z instanceof HTMLElement&&z.removeAttribute("aria-describedby"),E(!1),T.current=null},[L,k]),J=Oe.useCallback((z,V)=>{g||nu(V)||(L(),k(),T.current=z,x(V),O.current=setTimeout(()=>{E(!0),z instanceof HTMLElement&&z.setAttribute("aria-describedby",v)},a))},[L,k,g,a,v]),$=Oe.useCallback(()=>{k(),L(),C.current=setTimeout(()=>{q()},l)},[L,k,q,l]),N=Oe.useCallback(z=>{!f&&I.current&&z instanceof Node&&I.current.contains(z)||$()},[f,$]);Oe.useLayoutEffect(()=>{h&&B()},[h,P,B]),Oe.useEffect(()=>{if(!h)return;const z=()=>B();window.addEventListener("scroll",z,!0),window.addEventListener("resize",z);const V=Q=>{R.current={x:Q.clientX,y:Q.clientY},(o||M()==="mouse")&&B()};return(o||M()==="mouse")&&window.addEventListener("mousemove",V),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z),window.removeEventListener("mousemove",V)}},[h,o,M,B]),Oe.useEffect(()=>{if(!h)return;const z=V=>{V.key==="Escape"&&q()};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[h,q]),Oe.useEffect(()=>{if(h)if(e){const z=T.current;z&&x(Xr(z,r))}else x(r??null)},[r,h,e]),Oe.useEffect(()=>{if(!e)return;let z=[];try{z=Array.from(document.querySelectorAll(e))}catch{return}const V=Te=>{const Ke=Te.currentTarget;R.current={x:Te.clientX,y:Te.clientY},J(Ke,Xr(Ke,r))},Q=Te=>{R.current={x:Te.clientX,y:Te.clientY}},Ce=Te=>{N(Te.relatedTarget)},fe=Te=>{const Ke=Te.currentTarget;J(Ke,Xr(Ke,r))},qe=Te=>{N(Te.relatedTarget)};return z.forEach(Te=>{(n==="hover"||n==="both")&&(Te.addEventListener("mouseenter",V),Te.addEventListener("mousemove",Q),Te.addEventListener("mouseleave",Ce)),(n==="focus"||n==="both")&&(Te.addEventListener("focusin",fe),Te.addEventListener("focusout",qe))}),()=>{z.forEach(Te=>{(n==="hover"||n==="both")&&(Te.removeEventListener("mouseenter",V),Te.removeEventListener("mousemove",Q),Te.removeEventListener("mouseleave",Ce)),(n==="focus"||n==="both")&&(Te.removeEventListener("focusin",fe),Te.removeEventListener("focusout",qe))})}},[e,r,n,J,N]);const _=Oe.useCallback(z=>{const V=z.currentTarget;R.current={x:z.clientX,y:z.clientY},T.current=V,J(V,r)},[r,J]),D=Oe.useCallback(z=>{R.current={x:z.clientX,y:z.clientY}},[]),j=Oe.useCallback(z=>{N(z.relatedTarget)},[N]),K=Oe.useCallback(z=>{const V=z.currentTarget;T.current=V,J(V,r)},[r,J]),H=Oe.useCallback(z=>{N(z.relatedTarget)},[N]),A=[gr.panel,f?gr.panelPassThrough:gr.panelInteractive,u].filter(Boolean).join(" "),F=typeof document<"u"&&h&&P!=null?Rn.createPortal(ue.jsx("div",{ref:I,id:v,role:"tooltip",className:A,style:{top:y.top,left:y.left},onMouseEnter:f?void 0:()=>{L()},onMouseLeave:f?void 0:()=>{$()},"data-testid":m?`${m}-panel`:void 0,children:P}),document.body):null;return e?ue.jsx(ue.Fragment,{children:F}):ue.jsxs(ue.Fragment,{children:[p!=null?ue.jsx(ru,{className:d,eventMode:n,onAnchorMouseEnter:_,onAnchorMouseMove:D,onAnchorMouseLeave:j,onAnchorFocusIn:K,onAnchorFocusOut:H,children:p}):null,F]})},Zr={fieldLabel:"_fieldLabel_1993i_1",required:"_required_1993i_12",tooltipIcon:"_tooltipIcon_1993i_17"},Pn=({children:e,htmlFor:r,required:t=!1,tooltip:n,className:a="","data-testid":l})=>{const f=[Zr.fieldLabel,a].filter(Boolean).join(" ");return ue.jsxs("label",{htmlFor:r,className:f,"data-testid":l,children:[e,t?ue.jsx("span",{className:Zr.required,children:"*"}):null,n!=null&&n!==""?ue.jsx(wi,{content:n,position:"top",showDelay:200,children:ue.jsx("span",{className:Zr.tooltipIcon,"aria-label":n,children:ue.jsx(Jo,{"aria-hidden":!0})})}):null]})},dt={dropdown:"_dropdown_pfk12_1",control:"_control_pfk12_9",controlDisabled:"_controlDisabled_pfk12_34",controlInput:"_controlInput_pfk12_43",value:"_value_pfk12_61",placeholder:"_placeholder_pfk12_70",chipDisplay:"_chipDisplay_pfk12_76",chipEmpty:"_chipEmpty_pfk12_84",chipValue:"_chipValue_pfk12_89",chipItem:"_chipItem_pfk12_98",chipLabel:"_chipLabel_pfk12_112",chipRemove:"_chipRemove_pfk12_118",chipOverflow:"_chipOverflow_pfk12_137",chevron:"_chevron_pfk12_142",open:"_open_pfk12_149",panel:"_panel_pfk12_173",panelClosing:"_panelClosing_pfk12_190",filterWrapper:"_filterWrapper_pfk12_194",filterInput:"_filterInput_pfk12_201",filterIcon:"_filterIcon_pfk12_220",list:"_list_pfk12_231",option:"_option_pfk12_240",checkboxContainer:"_checkboxContainer_pfk12_255",checkbox:"_checkbox_pfk12_255",optionLabel:"_optionLabel_pfk12_272",optionSelected:"_optionSelected_pfk12_277",optionDisabled:"_optionDisabled_pfk12_281",empty:"_empty_pfk12_290",disabled:"_disabled_pfk12_297",error:"_error_pfk12_301"},an=(e,r)=>{const n=e[r];return n!=null?String(n):""},fn=(e,r)=>e[r],dn=(e,r)=>r==null?!1:!!e[r],Jr=(e,r)=>{if(e===r)return!0;if(e==null||r==null||typeof e!="object"||typeof r!="object")return!1;const t=e.id,n=r.id;return t!=null&&n!=null&&(typeof t=="string"||typeof t=="number")&&(typeof n=="string"||typeof n=="number")?t===n:!1},Qr=(e,r)=>e.some(t=>Jr(t,r)),Si=(e,r,t)=>{if(e==null)return`option-${t}`;const n=typeof e;if(n==="string"||n==="number"||n==="boolean")return`option-${String(e)}`;if(n==="object"){const a=e,l=a.id??a.value??a.code??a.key;return l!=null&&(typeof l=="string"||typeof l=="number")?`option-${l}`:`option-${t}-${r}`}return`option-${t}`},au=({value:e,onChange:r,multiple:t=!1,display:n="comma",maxSelectedLabels:a,selectedItemsLabel:l="{0} items selected",removeIcon:f,onEditEnd:o,options:c,optionLabel:s="label",optionValue:g="value",optionDisabled:d,placeholder:u="Select",filter:i=!1,editable:p=!1,disabled:m=!1,required:b=!1,label:v,error:h,inputId:E,className:y="",panelClassName:S="",valueTemplate:P,itemTemplate:x,"data-testid":T})=>{const I=p&&!t,R=Oe.useMemo(()=>t&&Array.isArray(e)?e:[],[t,e]),O=c.find(G=>!t&&fn(G,g)===e),C=Oe.useMemo(()=>t?c.filter(G=>Qr(R,fn(G,g))):[],[t,c,g,R]),k=O?an(O,s):"",L=C.map(G=>an(G,s)).filter(Boolean).join(", "),[M,B]=Oe.useState(!1),[q,J]=Oe.useState(!1),[$,N]=Oe.useState(""),[_,D]=Oe.useState(k),j=Oe.useRef(null),K=Oe.useRef(null),H=Oe.useRef(null),A=Oe.useRef(null),F=Oe.useRef(!1),z=Oe.useMemo(()=>i&&!I?c.filter(G=>an(G,s).toLowerCase().includes($.toLowerCase())):c,[i,I,c,s,$]);Oe.useEffect(()=>{I&&D(k)},[I,e,k]),Oe.useEffect(()=>{M&&i&&!I&&(N(""),setTimeout(()=>{var G;return(G=H.current)==null?void 0:G.focus()},0))},[M,i,I]);const V=()=>{F.current=!0,J(!0)},Q=G=>{var se;(F.current||(se=G.animationName)!=null&&se.includes("menuOut"))&&(F.current=!1,B(!1),J(!1),I&&D(k))};Oe.useEffect(()=>{if(!M&&!q)return;const G=se=>{j.current&&!j.current.contains(se.target)&&(I&&D(k),V())};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[M,q,I,k]);const Ce=()=>{m||B(G=>!G)},fe=(G,se)=>{se.preventDefault(),se.stopPropagation(),qe(G,se)},qe=(G,se)=>{if(dn(G,d))return;const Pe=fn(G,g);if(I&&D(an(G,s)),t){const We=Pe??null;if(We==null)return;const Je=Qr(R,We)?R.filter(tt=>!Jr(tt,We)):[...R,We];r==null||r({value:Je,originalEvent:se});return}r==null||r({value:Pe??null,originalEvent:se}),V()},Te=G=>{if(!M){if(G.key==="Enter"&&I&&_.trim()){G.preventDefault();const se=_.trim(),Pe=se.toLowerCase(),We=c.find(Je=>{const tt=an(Je,s).toLowerCase();return tt===Pe||tt.startsWith(Pe)}),Ye=We&&!dn(We,d)?fn(We,g):null;We&&!dn(We,d)&&(D(an(We,s)),r==null||r({value:Ye,originalEvent:G})),o==null||o({value:se,selectedValue:Ye,originalEvent:G});return}(G.key==="Enter"||G.key===" "||G.key==="ArrowDown")&&(G.preventDefault(),B(!0));return}if(G.key==="Escape"){G.preventDefault(),V();return}if(G.key==="Enter"){if(G.preventDefault(),I){const se=_.trim();if(se){const Pe=se.toLowerCase(),We=c.find(Je=>{const tt=an(Je,s).toLowerCase();return tt===Pe||tt.startsWith(Pe)}),Ye=We&&!dn(We,d)?fn(We,g):null;We&&!dn(We,d)&&qe(We,G),o==null||o({value:se,selectedValue:Ye,originalEvent:G})}else o==null||o({value:"",selectedValue:null,originalEvent:G})}else if(z.length>0){const se=z.find(Pe=>!dn(Pe,d));se&&!dn(se,d)&&qe(se,G)}}},Ke=t&&n==="chip",rt=(G,se)=>{if(se.stopPropagation(),m)return;const Pe=fn(G,g);if(Pe==null)return;const We=R.filter(Ye=>!Jr(Ye,Pe));r==null||r({value:We,originalEvent:se})},et=Oe.useMemo(()=>a==null?null:Math.max(0,a),[a]),ce=Oe.useMemo(()=>!Ke||et==null?C:C.slice(0,et),[Ke,et,C]),me=Ke&&et!=null?Math.max(0,C.length-et):0,be=[dt.dropdown,m?dt.disabled:"",M?dt.open:"",y].filter(Boolean).join(" "),Le=[dt.control,m?dt.controlDisabled:"",Ke?dt.chipDisplay:"",Ke&&C.length===0?dt.chipEmpty:""].filter(Boolean).join(" "),de=[dt.panel,q?dt.panelClosing:"",S].filter(Boolean).join(" "),he=Oe.useId(),oe=E??`dropdown-${he.replace(/[^a-zA-Z0-9_-]/g,"")}`,Z=`${oe}-panel`,ke=h==null?void 0:`${oe}-error`,Be=h==null?{}:{"aria-invalid":"true"},pe=ke==null?{}:{"aria-describedby":ke};return ue.jsxs("div",{className:be,ref:j,"data-testid":T,children:[v!=null?ue.jsx(Pn,{htmlFor:oe,required:b,children:v}):null,ue.jsxs("div",{id:I?void 0:oe,role:"combobox","aria-expanded":M||q,"aria-haspopup":"listbox","aria-controls":M||q?Z:void 0,"aria-disabled":m,"aria-label":typeof v=="string"?v:void 0,...I?{}:Be,...I?{}:pe,tabIndex:I||m?-1:0,className:Le,onClick:I?void 0:Ce,onKeyDown:I?void 0:Te,"data-testid":T&&!I?`${T}-control`:void 0,children:[I?ue.jsx("input",{ref:A,id:oe,type:"text",className:dt.controlInput,value:_,onChange:G=>{D(G.target.value),!M&&!q&&B(!0)},onFocus:()=>{!m&&!M&&!q&&B(!0)},onKeyDown:Te,placeholder:u,disabled:m,"aria-autocomplete":"list","aria-controls":M||q?Z:void 0,"aria-expanded":M||q,...Be,...pe,"data-testid":T?`${T}-control`:void 0}):Ke?ue.jsx("span",{className:dt.chipValue,children:C.length===0?ue.jsx("span",{className:dt.placeholder,children:u}):ue.jsxs(ue.Fragment,{children:[ce.map((G,se)=>{const Pe=an(G,s),We=fn(G,g),Ye=Si(We,Pe,se);return ue.jsxs("span",{className:dt.chipItem,children:[ue.jsx("span",{className:dt.chipLabel,children:x?x(G):Pe}),!m&&ue.jsx("button",{type:"button",className:dt.chipRemove,onClick:Je=>rt(G,Je),onKeyDown:Je=>{(Je.key==="Enter"||Je.key===" ")&&Je.stopPropagation()},"aria-label":`Remove ${Pe}`,"data-testid":T?`${T}-chip-remove-${se}`:void 0,children:f??ue.jsx(Xo,{size:"1rem","aria-hidden":!0})})]},Ye)}),me>0&&ue.jsx("span",{className:dt.chipOverflow,children:l.replace("{0}",String(C.length))})]})}):ue.jsx("span",{className:dt.value,children:P&&!t?P(O??null):(t?L:k)||ue.jsx("span",{className:dt.placeholder,children:u})}),ue.jsx(Yr,{className:dt.chevron,"aria-hidden":!0,onClick:I?Ce:void 0})]}),(M||q)&&ue.jsxs("div",{ref:K,id:Z,className:de,role:"presentation",onAnimationEnd:Q,"data-testid":T?`${T}-panel`:void 0,children:[i&&!I&&ue.jsxs("div",{className:dt.filterWrapper,children:[ue.jsx("input",{ref:H,type:"text",className:dt.filterInput,value:$,onChange:G=>{N(G.target.value)},onKeyDown:G=>{G.key==="Escape"&&B(!1),G.stopPropagation()},placeholder:"Search...","aria-label":"Filter options",title:"Filter options","data-testid":T?`${T}-filter`:void 0}),ue.jsx(Zo,{className:dt.filterIcon,"aria-hidden":!0})]}),ue.jsx("ul",{className:dt.list,role:"listbox","aria-label":"Options",children:z.length===0?ue.jsx("li",{className:dt.empty,children:"No results"}):z.map((G,se)=>{const Pe=fn(G,g),We=an(G,s),Ye=dn(G,d),Je=t?Qr(R,Pe):e===Pe,tt=Si(Pe,We,se);return ue.jsxs("li",{role:"option","aria-selected":Je,"aria-disabled":Ye,className:[dt.option,Je?dt.optionSelected:"",Ye?dt.optionDisabled:""].filter(Boolean).join(" "),onMouseDown:bt=>fe(G,bt),"data-testid":T?`${T}-option-${se}`:void 0,children:[t&&ue.jsx("span",{className:dt.checkboxContainer,"aria-hidden":!0,children:ue.jsx("input",{type:"checkbox",checked:Je,readOnly:!0,tabIndex:-1,className:dt.checkbox})}),ue.jsx("span",{className:dt.optionLabel,children:x?x(G):We})]},tt)})})]}),h==null?null:ue.jsx("div",{id:ke,className:dt.error,role:"alert",children:h})]})},Un={inputText:"_inputText_1wva8_1",input:"_input_1wva8_1",inputTextarea:"_inputTextarea_1wva8_44",error:"_error_1wva8_51",inputTextDisabled:"_inputTextDisabled_1wva8_60"},iu=({label:e,tooltip:r,required:t=!1,inputId:n,textarea:a=!1,rows:l,error:f,className:o="","data-testid":c,disabled:s=!1,...g})=>{const{type:d="text",...u}=g,i=Oe.useId(),p=n??`input-text-${i.replace(/[^a-zA-Z0-9_-]/g,"")}`,m=[Un.inputText,s?Un.inputTextDisabled:"",o].filter(Boolean).join(" "),b=u["aria-invalid"];let v;b===void 0?v=void 0:b===!0?v="true":b===!1?v="false":v=b;const h=t?{"aria-required":"true"}:{"aria-required":"false"},E=v===void 0&&f==null?{}:{"aria-invalid":v??"true"},y=f==null?void 0:`${p}-error`,S=[Un.input,a?Un.inputTextarea:""].filter(Boolean).join(" "),P={id:p,className:S,disabled:s,...h,...E,"aria-describedby":y,"data-testid":c?`${c}-input`:void 0};return ue.jsxs("div",{className:m,"data-testid":c,children:[e!=null?ue.jsx(Pn,{htmlFor:p,required:t,tooltip:r,children:e}):null,a?ue.jsx("textarea",{...u,...P,rows:l??3}):ue.jsx("input",{...u,...P,type:d}),f==null?null:ue.jsx("div",{id:y,className:Un.error,role:"alert",children:f})]})},Oi={dateValue:"_dateValue_1p8tp_1",time:"_time_1p8tp_9"},lu="--",ou=({date:e,locale:r,showTime:t,nullText:n,timeZone:a,hour12:l})=>{if(!e)return{dateText:n};const f=e instanceof Date?e:new Date(e);if(Number.isNaN(f.getTime()))return{dateText:n};const o=l??new Intl.DateTimeFormat(r).resolvedOptions().hour12,c={year:"numeric",month:"2-digit",day:"2-digit",...a?{timeZone:a}:{}};try{const s=new Intl.DateTimeFormat(r,c).format(f);if(!t)return{dateText:s};const g={hour:"2-digit",minute:"2-digit",hour12:o,...a?{timeZone:a}:{}},d=new Intl.DateTimeFormat(r,g).format(f);return{dateText:s,timeText:d}}catch(s){return console.error(s),{dateText:n}}},uu=({date:e,locale:r="en",showTime:t=!1,nullText:n=lu,timeZone:a,hour12:l,className:f="","data-testid":o})=>{const{dateText:c,timeText:s}=Oe.useMemo(()=>ou({date:e,locale:r,showTime:t,nullText:n,timeZone:a,hour12:l}),[e,l,r,n,t,a]);return ue.jsxs("div",{className:[Oi.dateValue,f].filter(Boolean).join(" "),"data-testid":o,children:[ue.jsx("span",{children:c}),t&&s?ue.jsx("span",{className:Oi.time,children:s}):null]})};function Ci(e){return Kt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"},child:[]}]})(e)}function cu(e){return Kt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8m7.5-6.923c-.67.204-1.335.82-1.887 1.855A8 8 0 0 0 5.145 4H7.5zM4.09 4a9.3 9.3 0 0 1 .64-1.539 7 7 0 0 1 .597-.933A7.03 7.03 0 0 0 2.255 4zm-.582 3.5c.03-.877.138-1.718.312-2.5H1.674a7 7 0 0 0-.656 2.5zM4.847 5a12.5 12.5 0 0 0-.338 2.5H7.5V5zM8.5 5v2.5h2.99a12.5 12.5 0 0 0-.337-2.5zM4.51 8.5a12.5 12.5 0 0 0 .337 2.5H7.5V8.5zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5zM5.145 12q.208.58.468 1.068c.552 1.035 1.218 1.65 1.887 1.855V12zm.182 2.472a7 7 0 0 1-.597-.933A9.3 9.3 0 0 1 4.09 12H2.255a7 7 0 0 0 3.072 2.472M3.82 11a13.7 13.7 0 0 1-.312-2.5h-2.49c.062.89.291 1.733.656 2.5zm6.853 3.472A7 7 0 0 0 13.745 12H11.91a9.3 9.3 0 0 1-.64 1.539 7 7 0 0 1-.597.933M8.5 12v2.923c.67-.204 1.335-.82 1.887-1.855q.26-.487.468-1.068zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.7 13.7 0 0 1-.312 2.5m2.802-3.5a7 7 0 0 0-.656-2.5H12.18c.174.782.282 1.623.312 2.5zM11.27 2.461c.247.464.462.98.64 1.539h1.835a7 7 0 0 0-3.072-2.472c.218.284.418.598.597.933M10.855 4a8 8 0 0 0-.468-1.068C9.835 1.897 9.17 1.282 8.5 1.077V4z"},child:[]}]})(e)}function ea(e){return Kt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2"},child:[]}]})(e)}function _i(e){return Kt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"},child:[]}]})(e)}function su(e){return Kt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8"},child:[]}]})(e)}const fu={backButton:"_backButton_1a9n2_1"},du=({onClick:e,className:r="",disabled:t=!1,ariaLabel:n="Back","data-testid":a="back-button"})=>ue.jsx("button",{type:"button",className:[fu.backButton,r].filter(Boolean).join(" "),onClick:e,disabled:t,"aria-label":n,"data-testid":a,children:ue.jsx(su,{size:16,"aria-hidden":!0})}),xi=e=>{if(e!=null)return Object.fromEntries(Object.entries(e).map(([r,t])=>[r.toLowerCase(),t]))},vu=(e,r)=>{if(e.length===0)return[];if(r==null||r==="")return[...e];const t=r.toLowerCase(),n=e.find(l=>l.id.toLowerCase()===t),a=e.filter(l=>l.id.toLowerCase()!==t);return n?[n,...a]:[...e]},hu=(e,r,t)=>{const n={...e??{},[r]:t};return t===""&&delete n[r],Object.keys(n).length===0?void 0:n},mu=(e,r)=>{if(e==null)return;const t=e[r];if(t!=null)return typeof t=="string"?t:t.message},Ht={localizedInput:"_localizedInput_b3s84_1",row:"_row_b3s84_7",inputGroup:"_inputGroup_b3s84_11",addon:"_addon_b3s84_17",addonInvalid:"_addonInvalid_b3s84_34",input:"_input_b3s84_11",inputInvalid:"_inputInvalid_b3s84_75",languageError:"_languageError_b3s84_82",error:"_error_b3s84_90",toggle:"_toggle_b3s84_98",toggleLabel:"_toggleLabel_b3s84_111",toggleIcon:"_toggleIcon_b3s84_119"},gu=({value:e,onChange:r,languages:t,selectedLanguage:n,label:a,tooltip:l,required:f=!1,inputId:o,showLanguagesLabel:c,hideLanguagesLabel:s,displayOnly:g=!1,disabled:d=!1,error:u,errors:i,showAllLanguages:p=!1,placeholder:m,className:b="","data-testid":v="localized-inputs"})=>{const h=Oe.useId(),E=o??`localized-input-${h.replace(/[^a-zA-Z0-9_-]/g,"")}`,[y,S]=Oe.useState(()=>xi(e)),[P,x]=Oe.useState(p);Oe.useEffect(()=>{S(xi(e))},[e]),Oe.useEffect(()=>{x(p)},[p]);const T=Oe.useMemo(()=>vu(t,n),[t,n]),I=Oe.useCallback((k,L)=>{const M=hu(y,k,L);S(M),r(M)},[y,r]),R=d||g,O=u!=null&&u!==!1&&u!=="",C=[Ht.localizedInput,b].filter(Boolean).join(" ");return ue.jsxs("div",{className:C,"data-testid":v,children:[a!=null?ue.jsx(Pn,{htmlFor:E,required:f,tooltip:l,children:a}):null,T.map((k,L)=>{const M=k.id.toLowerCase(),B=mu(i,k.id),q=!!B||O;return L===0||P?ue.jsxs("div",{className:Ht.row,children:[ue.jsxs("div",{className:Ht.inputGroup,children:[ue.jsx("span",{className:[Ht.addon,q?Ht.addonInvalid:""].filter(Boolean).join(" "),children:k.id.toUpperCase()}),ue.jsx("input",{id:L===0?E:void 0,type:"text",className:[Ht.input,q?Ht.inputInvalid:""].filter(Boolean).join(" "),disabled:R,value:(y==null?void 0:y[M])??"",placeholder:m,"aria-invalid":q||void 0,"aria-required":L===0?f:void 0,"data-testid":v?`${v}-${M}`:void 0,onChange:$=>I(M,$.target.value)})]}),B!=null&&B!==""?ue.jsx("small",{className:Ht.languageError,role:"alert",children:B}):null]},k.id):null}),O?ue.jsx("small",{className:Ht.error,role:"alert",children:u}):null,T.length>1?ue.jsxs("button",{type:"button",className:Ht.toggle,onClick:()=>x(k=>!k),"data-testid":v?`${v}-toggle`:void 0,children:[ue.jsx(cu,{className:Ht.toggleIcon,"aria-hidden":!0}),ue.jsx("span",{className:Ht.toggleLabel,children:P?s:c})]}):null]})},An={checkbox:"_checkbox_16tdt_1",input:"_input_16tdt_12",box:"_box_16tdt_26",checkboxDisabled:"_checkboxDisabled_16tdt_39",checkboxInvalid:"_checkboxInvalid_16tdt_63",checkboxReadOnly:"_checkboxReadOnly_16tdt_83"},yu=({checked:e,value:r,onChange:t,inputId:n,disabled:a=!1,invalid:l=!1,className:f="",name:o,readOnly:c,required:s,tabIndex:g,"aria-label":d,"aria-labelledby":u,"data-testid":i,...p})=>{const m=Oe.useId(),b=n??`checkbox-${m.replace(/[^a-zA-Z0-9_-]/g,"")}`,v=y=>{a||c||t==null||t({originalEvent:y,checked:y.currentTarget.checked,...r!=null?{value:r}:{},stopPropagation:()=>y.stopPropagation(),preventDefault:()=>y.preventDefault()})},h=[An.checkbox,l?An.checkboxInvalid:"",a?An.checkboxDisabled:"",c?An.checkboxReadOnly:"",f].filter(Boolean).join(" "),E=a;return ue.jsxs("div",{className:h,"data-testid":i,children:[ue.jsx("input",{...p,type:"checkbox",id:b,...e!==void 0?{checked:e}:{},...r!=null?{value:String(r)}:{},onChange:v,disabled:E,readOnly:c,onClick:y=>{c&&y.preventDefault()},onKeyDown:y=>{c&&y.key===" "&&y.preventDefault()},required:s,name:o,tabIndex:g,"aria-label":d,"aria-labelledby":u,"aria-invalid":l?!0:void 0,className:An.input,"data-testid":i?`${i}-input`:void 0}),ue.jsx("span",{className:An.box,"aria-hidden":"true"})]})},Jt={root:"_root_1hhdk_1",inputWrap:"_inputWrap_1hhdk_7",inputWrapDisabled:"_inputWrapDisabled_1hhdk_20",inputWrapInvalid:"_inputWrapInvalid_1hhdk_26",input:"_input_1hhdk_7",dropdownButton:"_dropdownButton_1hhdk_47",panel:"_panel_1hhdk_63",option:"_option_1hhdk_80",optionHighlighted:"_optionHighlighted_1hhdk_86",error:"_error_1hhdk_90"},bu=300,Ti=(e,r)=>{if(r){const n=e[r];return n!=null?String(n):""}const t=Object.values(e).find(n=>typeof n=="string");return t!=null?String(t):""},ki=({value:e,suggestions:r,completeMethod:t,field:n,onChange:a,onSelect:l,dropdown:f=!1,disabled:o=!1,placeholder:c,label:s,error:g,className:d="",inputId:u,"data-testid":i})=>{const[p,m]=Oe.useState(!1),[b,v]=Oe.useState(-1),h=Oe.useRef(null),E=Oe.useRef(null),y=Oe.useRef(),S=Oe.useId(),P=u??`autocomplete-${S.replace(/[^a-zA-Z0-9_-]/g,"")}`,x=`${P}-list`,T=g==null?void 0:`${P}-error`,I=p&&r.length>0;Oe.useEffect(()=>{v(q=>r.length===0?-1:q<0?q:q>=r.length?r.length-1:q)},[r]);const R=Oe.useMemo(()=>r.map(q=>Ti(q,n)),[r,n]),O=Oe.useCallback(q=>{y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{t({query:q})},bu)},[t]);Oe.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]),Oe.useEffect(()=>{if(!p)return;const q=J=>{h.current&&!h.current.contains(J.target)&&(m(!1),v(-1))};return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[p]);const C=q=>{const J=q.target.value;a({value:J,originalEvent:q}),O(J),m(!0),v(-1)},k=(q,J)=>{y.current&&(clearTimeout(y.current),y.current=void 0);const $=Ti(q,n);a({value:$,originalEvent:J}),l==null||l({value:q,originalEvent:J}),m(!1),v(-1)},L=q=>{if(q.key==="ArrowDown"){q.preventDefault(),m(!0),v(J=>J<r.length-1?J+1:J);return}if(q.key==="ArrowUp"){if(q.preventDefault(),!p)return;v(J=>J>0?J-1:0);return}if(q.key==="Enter"&&p&&b>=0&&r[b]){q.preventDefault(),k(r[b],q);return}q.key==="Escape"&&(m(!1),v(-1))},M=[Jt.root,d].filter(Boolean).join(" "),B=[Jt.inputWrap,o?Jt.inputWrapDisabled:"",g?Jt.inputWrapInvalid:""].filter(Boolean).join(" ");return ue.jsxs("div",{className:M,ref:h,"data-testid":i,children:[s!=null?ue.jsx(Pn,{htmlFor:P,children:s}):null,ue.jsxs("div",{className:B,children:[ue.jsx("input",{ref:E,id:P,type:"text",className:Jt.input,value:e,onChange:C,onKeyDown:L,onFocus:()=>{o||m(!0)},onBlur:q=>{var J;(J=h.current)!=null&&J.contains(q.relatedTarget)||(m(!1),v(-1))},disabled:o,placeholder:c,role:"combobox","aria-expanded":I,"aria-haspopup":"listbox","aria-controls":I?x:void 0,"aria-activedescendant":I&&b>=0?`${P}-option-${b}`:void 0,"aria-autocomplete":"list","aria-invalid":g?!0:void 0,"aria-describedby":T,"data-testid":i?`${i}-input`:void 0}),f&&ue.jsx("button",{type:"button",className:Jt.dropdownButton,disabled:o,onClick:()=>{var q;o||(m(J=>{const $=!J;return $&&O(e),$}),(q=E.current)==null||q.focus())},"aria-label":"Show suggestions","data-testid":i?`${i}-dropdown`:void 0,children:ue.jsx(Yr,{"aria-hidden":!0})})]}),I&&ue.jsx("ul",{id:x,className:Jt.panel,role:"listbox","data-testid":i?`${i}-panel`:void 0,children:r.map((q,J)=>{const $=R[J],N=`${P}-option-${J}`;return ue.jsx("li",{id:N,role:"option","aria-selected":J===b,className:[Jt.option,J===b?Jt.optionHighlighted:""].filter(Boolean).join(" "),onMouseDown:_=>{_.preventDefault(),k(q,_)},"data-testid":i?`${i}-option-${J}`:void 0,children:$},N)})}),g!=null&&ue.jsx("div",{id:T,className:Jt.error,role:"alert",children:g})]})};ki.displayName="AutoComplete";const Qt={accordion:"_accordion_l1hoq_1",tab:"_tab_l1hoq_6",headerButton:"_headerButton_l1hoq_11",headerContent:"_headerContent_l1hoq_39",icon:"_icon_l1hoq_45",panel:"_panel_l1hoq_53",panelCollapsed:"_panelCollapsed_l1hoq_58",panelOpen:"_panelOpen_l1hoq_64",panelContent:"_panelContent_l1hoq_70",noBorderLast:"_noBorderLast_l1hoq_74"},ta=e=>null;ta.displayName="AccordionTab";const pu=(e,r)=>e==null?[]:Array.isArray(e)?r?e:e.slice(0,1):[e],Eu=e=>e.replace(/[^a-zA-Z0-9_-]/g,""),Ni=({activeIndex:e,multiple:r=!1,expandIcon:t,collapseIcon:n,onTabChange:a,onTabOpen:l,onTabClose:f,className:o="",transitionOptions:c,pt:s,ptOptions:g,unstyled:d,children:u,...i})=>{const p=Oe.useId(),m=Eu(p),b=Oe.useMemo(()=>Oe.Children.toArray(u).filter(k=>Oe.isValidElement(k)&&k.type===ta),[u]),v=e!==void 0,h=Oe.useMemo(()=>pu(e,r),[e,r]),[E,y]=Oe.useState([]),S=v?h:E,P=typeof c=="object"&&c!=null&&typeof c.timeout=="number"?c.timeout:void 0,x=ue.jsx(Qo,{"aria-hidden":!0}),T=ue.jsx(Yr,{"aria-hidden":!0}),I=t??x,R=n??T,O=(C,k)=>{const L=S.includes(C);if(r){const q=L?S.filter(J=>J!==C):[...S,C];v||y(q),a==null||a({index:q,originalEvent:k}),L?f==null||f({index:C,originalEvent:k}):l==null||l({index:C,originalEvent:k});return}const M=S.length?S[0]:null,B=L?[]:[C];if(v||y(B),a==null||a({index:B,originalEvent:k}),L){f==null||f({index:C,originalEvent:k});return}M!=null&&(f==null||f({index:M,originalEvent:k})),l==null||l({index:C,originalEvent:k})};return ue.jsx("div",{className:[Qt.accordion,o].filter(Boolean).join(" "),...i,children:b.map((C,k)=>{var K;const L=C.props,M=S.includes(k),B=!!L.disabled,q=`${m}-header-${k}`,J=`${m}-content-${k}`,$=L.headerTemplate!=null?typeof L.headerTemplate=="function"?L.headerTemplate({index:k,selected:M,disabled:B,count:b.length,first:k===0,last:k===b.length-1}):L.headerTemplate:L.header,N=M?R:I,_=[Qt.headerButton,L.headerClassName??""].filter(Boolean).join(" "),D=[Qt.tab,L.className??"",k===b.length-1?Qt.noBorderLast:""].filter(Boolean).join(" "),j=typeof $=="string"?$:void 0;return ue.jsxs("div",{className:D,style:L.style,children:[ue.jsxs("button",{id:q,type:"button",disabled:B,className:_,style:L.headerStyle,"aria-controls":J,"aria-expanded":M,"aria-disabled":B,tabIndex:L.tabIndex,onClick:H=>O(k,H),...L.headerProps,"aria-label":((K=L.headerProps)==null?void 0:K["aria-label"])??j,children:[ue.jsx("span",{className:Qt.headerContent,children:$}),ue.jsx("span",{className:Qt.icon,"aria-hidden":!0,children:N})]}),ue.jsx("div",{id:J,role:"region","aria-labelledby":q,"aria-hidden":!M,className:[Qt.panel,M?Qt.panelOpen:Qt.panelCollapsed].join(" "),style:{transitionDuration:P?`${P}ms`:void 0},children:ue.jsx("div",{className:[Qt.panelContent,L.contentClassName??""].filter(Boolean).join(" "),style:L.contentStyle,children:L.children})})]},k)})})};Ni.displayName="Accordion";const Sn={selectButton:"_selectButton_1u3fo_1",selectButtonDisabled:"_selectButtonDisabled_1u3fo_9",selectButtonInvalid:"_selectButtonInvalid_1u3fo_14",button:"_button_1u3fo_14",buttonFirst:"_buttonFirst_1u3fo_47",buttonLast:"_buttonLast_1u3fo_51",buttonSelected:"_buttonSelected_1u3fo_59"},Ri=(e,r)=>{const n=e[r];return n!=null?String(n):""},na=(e,r)=>e[r],Pi=(e,r)=>r==null?!1:!!e[r],wu=({value:e,onChange:r,options:t,optionLabel:n="label",optionValue:a="value",optionDisabled:l,multiple:f=!1,itemTemplate:o,disabled:c=!1,invalid:s=!1,className:g="","data-testid":d})=>{const u=m=>{const b=na(m,a);return f&&Array.isArray(e)?e.includes(b):e===b},i=(m,b)=>{if(c||Pi(m,l))return;const v=na(m,a);if(v===void 0)return;let h;if(f){const E=Array.isArray(e)?e:[];h=E.includes(v)?E.filter(S=>S!==v):[...E,v]}else h=e===v?null:v;r==null||r({value:h,originalEvent:b})},p=[Sn.selectButton,c?Sn.selectButtonDisabled:"",s?Sn.selectButtonInvalid:"",g].filter(Boolean).join(" ");return ue.jsx("div",{className:p,role:"group","aria-disabled":c,"data-testid":d,children:t.map((m,b)=>{const v=na(m,a),h=v!=null?String(v):`option-${b}`,E=Pi(m,l),y=u(m);return ue.jsx("button",{type:"button","aria-pressed":y,"aria-disabled":E||c,"aria-label":Ri(m,n),disabled:c||E,className:[Sn.button,y?Sn.buttonSelected:"",b===0?Sn.buttonFirst:"",b===t.length-1?Sn.buttonLast:""].filter(Boolean).join(" "),onClick:S=>i(m,S),onKeyDown:S=>{(S.key===" "||S.key==="Enter")&&(S.preventDefault(),i(m,S))},"data-testid":d?`${d}-option-${b}`:void 0,children:o?o(m):Ri(m,n)},h)})})},br={radioButton:"_radioButton_1gxkv_1",radioButtonDisabled:"_radioButtonDisabled_1gxkv_10",label:"_label_1gxkv_14",input:"_input_1gxkv_18"},Su=({inputId:e,name:r,value:t,checked:n,onChange:a,disabled:l=!1,label:f,className:o="","data-testid":c,...s})=>{const g=Oe.useId(),d=e??`radiobutton-${g.replace(/[^a-zA-Z0-9_-]/g,"")}`,u=p=>{a==null||a({value:t,originalEvent:p})},i=[br.radioButton,l?br.radioButtonDisabled:"",o].filter(Boolean).join(" ");return ue.jsxs("div",{className:i,"data-testid":c,children:[ue.jsx("input",{...s,type:"radio",id:d,name:r,value:String(t),...n!==void 0?{checked:n}:{},disabled:l,onChange:u,className:br.input,"data-testid":c?`${c}-input`:void 0}),f!=null&&ue.jsx("label",{htmlFor:d,className:br.label,children:f})]})};function Ou(e){if(Array.isArray(e))return e}function Cu(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,a,l,f,o=[],c=!0,s=!1;try{if(l=(t=t.call(e)).next,r!==0)for(;!(c=(n=l.call(t)).done)&&(o.push(n.value),o.length!==r);c=!0);}catch(g){s=!0,a=g}finally{try{if(!c&&t.return!=null&&(f=t.return(),Object(f)!==f))return}finally{if(s)throw a}}return o}}function ra(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Ai(e,r){if(e){if(typeof e=="string")return ra(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ra(e,r)}}function _u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xu(e,r){return Ou(e)||Cu(e,r)||Ai(e,r)||_u()}function Ft(e){"@babel/helpers - typeof";return Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ft(e)}function Ue(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r){for(var n=[],a=0;a<r.length;a++){var l=r[a];if(l){var f=Ft(l);if(f==="string"||f==="number")n.push(l);else if(f==="object"){var o=Array.isArray(l)?l:Object.entries(l).map(function(c){var s=xu(c,2),g=s[0],d=s[1];return d?g:null});n=o.length?n.concat(o.filter(function(c){return!!c})):n}}}return n.join(" ")}}function aa(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Tu(e,r){if(Ft(e)!=="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r);if(Ft(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Li(e){var r=Tu(e,"string");return Ft(r)==="symbol"?r:String(r)}function ku(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Li(n.key),n)}}function ia(e,r,t){return t&&ku(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function la(e,r,t){return r=Li(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function oa(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Nu(e))||r){t&&(e=t);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(s){throw s},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l=!0,f=!1,o;return{s:function(){t=t.call(e)},n:function(){var s=t.next();return l=s.done,s},e:function(s){f=!0,o=s},f:function(){try{!l&&t.return!=null&&t.return()}finally{if(f)throw o}}}}function Nu(e,r){if(e){if(typeof e=="string")return Ii(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ii(e,r)}}function Ii(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var ne=(function(){function e(){aa(this,e)}return ia(e,null,[{key:"innerWidth",value:function(t){if(t){var n=t.offsetWidth,a=getComputedStyle(t);return n+=parseFloat(a.paddingLeft)+parseFloat(a.paddingRight),n}return 0}},{key:"width",value:function(t){if(t){var n=t.offsetWidth,a=getComputedStyle(t);return n-=parseFloat(a.paddingLeft)+parseFloat(a.paddingRight),n}return 0}},{key:"getBrowserLanguage",value:function(){return navigator.userLanguage||navigator.languages&&navigator.languages.length&&navigator.languages[0]||navigator.language||navigator.browserLanguage||navigator.systemLanguage||"en"}},{key:"getWindowScrollTop",value:function(){var t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}},{key:"getWindowScrollLeft",value:function(){var t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}},{key:"getOuterWidth",value:function(t,n){if(t){var a=t.offsetWidth||t.getBoundingClientRect().width;if(n){var l=getComputedStyle(t);a+=parseFloat(l.marginLeft)+parseFloat(l.marginRight)}return a}return 0}},{key:"getOuterHeight",value:function(t,n){if(t){var a=t.offsetHeight||t.getBoundingClientRect().height;if(n){var l=getComputedStyle(t);a+=parseFloat(l.marginTop)+parseFloat(l.marginBottom)}return a}return 0}},{key:"getClientHeight",value:function(t,n){if(t){var a=t.clientHeight;if(n){var l=getComputedStyle(t);a+=parseFloat(l.marginTop)+parseFloat(l.marginBottom)}return a}return 0}},{key:"getClientWidth",value:function(t,n){if(t){var a=t.clientWidth;if(n){var l=getComputedStyle(t);a+=parseFloat(l.marginLeft)+parseFloat(l.marginRight)}return a}return 0}},{key:"getViewport",value:function(){var t=window,n=document,a=n.documentElement,l=n.getElementsByTagName("body")[0],f=t.innerWidth||a.clientWidth||l.clientWidth,o=t.innerHeight||a.clientHeight||l.clientHeight;return{width:f,height:o}}},{key:"getOffset",value:function(t){if(t){var n=t.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}},{key:"index",value:function(t){if(t)for(var n=t.parentNode.childNodes,a=0,l=0;l<n.length;l++){if(n[l]===t)return a;n[l].nodeType===1&&a++}return-1}},{key:"addMultipleClasses",value:function(t,n){if(t&&n)if(t.classList)for(var a=n.split(" "),l=0;l<a.length;l++)t.classList.add(a[l]);else for(var f=n.split(" "),o=0;o<f.length;o++)t.className+=" "+f[o]}},{key:"removeMultipleClasses",value:function(t,n){if(t&&n)if(t.classList)for(var a=n.split(" "),l=0;l<a.length;l++)t.classList.remove(a[l]);else for(var f=n.split(" "),o=0;o<f.length;o++)t.className=t.className.replace(new RegExp("(^|\\b)"+f[o].split(" ").join("|")+"(\\b|$)","gi")," ")}},{key:"addClass",value:function(t,n){t&&n&&(t.classList?t.classList.add(n):t.className+=" "+n)}},{key:"removeClass",value:function(t,n){t&&n&&(t.classList?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," "))}},{key:"hasClass",value:function(t,n){return t?t.classList?t.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(t.className):!1}},{key:"find",value:function(t,n){return t?Array.from(t.querySelectorAll(n)):[]}},{key:"findSingle",value:function(t,n){return t?t.querySelector(n):null}},{key:"getHeight",value:function(t){if(t){var n=t.offsetHeight,a=getComputedStyle(t);return n-=parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)+parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),n}return 0}},{key:"getWidth",value:function(t){if(t){var n=t.offsetWidth,a=getComputedStyle(t);return n-=parseFloat(a.paddingLeft)+parseFloat(a.paddingRight)+parseFloat(a.borderLeftWidth)+parseFloat(a.borderRightWidth),n}return 0}},{key:"alignOverlay",value:function(t,n,a){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;t&&n&&(a==="self"?this.relativePosition(t,n):(l&&(t.style.minWidth=e.getOuterWidth(n)+"px"),this.absolutePosition(t,n)))}},{key:"absolutePosition",value:function(t,n){if(t){var a=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),l=a.height,f=a.width,o=n.offsetHeight,c=n.offsetWidth,s=n.getBoundingClientRect(),g=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),u=this.getViewport(),i,p;s.top+o+l>u.height?(i=s.top+g-l,i<0&&(i=g),t.style.transformOrigin="bottom"):(i=o+s.top+g,t.style.transformOrigin="top"),s.left+c+f>u.width?p=Math.max(0,s.left+d+c-f):p=s.left+d,t.style.top=i+"px",t.style.left=p+"px"}}},{key:"relativePosition",value:function(t,n){if(t){var a=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),l=n.offsetHeight,f=n.getBoundingClientRect(),o=this.getViewport(),c,s;f.top+l+a.height>o.height?(c=-1*a.height,f.top+c<0&&(c=-1*f.top),t.style.transformOrigin="bottom"):(c=l,t.style.transformOrigin="top"),a.width>o.width?s=f.left*-1:f.left+a.width>o.width?s=(f.left+a.width-o.width)*-1:s=0,t.style.top=c+"px",t.style.left=s+"px"}}},{key:"flipfitCollision",value:function(t,n){var a=this,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"left top",f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"left bottom",o=arguments.length>4?arguments[4]:void 0;if(t&&n){var c=n.getBoundingClientRect(),s=this.getViewport(),g=l.split(" "),d=f.split(" "),u=function(v,h){return h?+v.substring(v.search(/(\+|-)/g))||0:v.substring(0,v.search(/(\+|-)/g))||v},i={my:{x:u(g[0]),y:u(g[1]||g[0]),offsetX:u(g[0],!0),offsetY:u(g[1]||g[0],!0)},at:{x:u(d[0]),y:u(d[1]||d[0]),offsetX:u(d[0],!0),offsetY:u(d[1]||d[0],!0)}},p={left:function(){var v=i.my.offsetX+i.at.offsetX;return v+c.left+(i.my.x==="left"?0:-1*(i.my.x==="center"?a.getOuterWidth(t)/2:a.getOuterWidth(t)))},top:function(){var v=i.my.offsetY+i.at.offsetY;return v+c.top+(i.my.y==="top"?0:-1*(i.my.y==="center"?a.getOuterHeight(t)/2:a.getOuterHeight(t)))}},m={count:{x:0,y:0},left:function(){var v=p.left(),h=e.getWindowScrollLeft();t.style.left=v+h+"px",this.count.x===2?(t.style.left=h+"px",this.count.x=0):v<0&&(this.count.x++,i.my.x="left",i.at.x="right",i.my.offsetX*=-1,i.at.offsetX*=-1,this.right())},right:function(){var v=p.left()+e.getOuterWidth(n),h=e.getWindowScrollLeft();t.style.left=v+h+"px",this.count.x===2?(t.style.left=s.width-e.getOuterWidth(t)+h+"px",this.count.x=0):v+e.getOuterWidth(t)>s.width&&(this.count.x++,i.my.x="right",i.at.x="left",i.my.offsetX*=-1,i.at.offsetX*=-1,this.left())},top:function(){var v=p.top(),h=e.getWindowScrollTop();t.style.top=v+h+"px",this.count.y===2?(t.style.left=h+"px",this.count.y=0):v<0&&(this.count.y++,i.my.y="top",i.at.y="bottom",i.my.offsetY*=-1,i.at.offsetY*=-1,this.bottom())},bottom:function(){var v=p.top()+e.getOuterHeight(n),h=e.getWindowScrollTop();t.style.top=v+h+"px",this.count.y===2?(t.style.left=s.height-e.getOuterHeight(t)+h+"px",this.count.y=0):v+e.getOuterHeight(n)>s.height&&(this.count.y++,i.my.y="bottom",i.at.y="top",i.my.offsetY*=-1,i.at.offsetY*=-1,this.top())},center:function(v){if(v==="y"){var h=p.top()+e.getOuterHeight(n)/2;t.style.top=h+e.getWindowScrollTop()+"px",h<0?this.bottom():h+e.getOuterHeight(n)>s.height&&this.top()}else{var E=p.left()+e.getOuterWidth(n)/2;t.style.left=E+e.getWindowScrollLeft()+"px",E<0?this.left():E+e.getOuterWidth(t)>s.width&&this.right()}}};m[i.at.x]("x"),m[i.at.y]("y"),this.isFunction(o)&&o(i)}}},{key:"findCollisionPosition",value:function(t){if(t){var n=t==="top"||t==="bottom",a=t==="left"?"right":"left",l=t==="top"?"bottom":"top";return n?{axis:"y",my:"center ".concat(l),at:"center ".concat(t)}:{axis:"x",my:"".concat(a," center"),at:"".concat(t," center")}}}},{key:"getParents",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t.parentNode===null?n:this.getParents(t.parentNode,n.concat([t.parentNode]))}},{key:"getScrollableParents",value:function(t){var n=[];if(t){var a=this.getParents(t),l=/(auto|scroll)/,f=function(v){var h=v?getComputedStyle(v):null;return h&&(l.test(h.getPropertyValue("overflow"))||l.test(h.getPropertyValue("overflowX"))||l.test(h.getPropertyValue("overflowY")))},o=oa(a),c;try{for(o.s();!(c=o.n()).done;){var s=c.value,g=s.nodeType===1&&s.dataset.scrollselectors;if(g){var d=g.split(","),u=oa(d),i;try{for(u.s();!(i=u.n()).done;){var p=i.value,m=this.findSingle(s,p);m&&f(m)&&n.push(m)}}catch(b){u.e(b)}finally{u.f()}}s.nodeType!==9&&f(s)&&n.push(s)}}catch(b){o.e(b)}finally{o.f()}}return n}},{key:"getHiddenElementOuterHeight",value:function(t){if(t){t.style.visibility="hidden",t.style.display="block";var n=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",n}return 0}},{key:"getHiddenElementOuterWidth",value:function(t){if(t){t.style.visibility="hidden",t.style.display="block";var n=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",n}return 0}},{key:"getHiddenElementDimensions",value:function(t){var n={};return t&&(t.style.visibility="hidden",t.style.display="block",n.width=t.offsetWidth,n.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible"),n}},{key:"fadeIn",value:function(t,n){if(t){t.style.opacity=0;var a=+new Date,l=0,f=function o(){l=+t.style.opacity+(new Date().getTime()-a)/n,t.style.opacity=l,a=+new Date,+l<1&&(window.requestAnimationFrame&&requestAnimationFrame(o)||setTimeout(o,16))};f()}}},{key:"fadeOut",value:function(t,n){if(t)var a=1,l=50,f=l/n,o=setInterval(function(){a-=f,a<=0&&(a=0,clearInterval(o)),t.style.opacity=a},l)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(t){return!!(t&&t.constructor&&t.call&&t.apply)}},{key:"appendChild",value:function(t,n){if(this.isElement(n))n.appendChild(t);else if(n.el&&n.el.nativeElement)n.el.nativeElement.appendChild(t);else throw new Error("Cannot append "+n+" to "+t)}},{key:"removeChild",value:function(t,n){if(this.isElement(n))n.removeChild(t);else if(n.el&&n.el.nativeElement)n.el.nativeElement.removeChild(t);else throw new Error("Cannot remove "+t+" from "+n)}},{key:"isElement",value:function(t){return(typeof HTMLElement>"u"?"undefined":Ft(HTMLElement))==="object"?t instanceof HTMLElement:t&&Ft(t)==="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string"}},{key:"scrollInView",value:function(t,n){var a=getComputedStyle(t).getPropertyValue("borderTopWidth"),l=a?parseFloat(a):0,f=getComputedStyle(t).getPropertyValue("paddingTop"),o=f?parseFloat(f):0,c=t.getBoundingClientRect(),s=n.getBoundingClientRect(),g=s.top+document.body.scrollTop-(c.top+document.body.scrollTop)-l-o,d=t.scrollTop,u=t.clientHeight,i=this.getOuterHeight(n);g<0?t.scrollTop=d+g:g+i>u&&(t.scrollTop=d+g-u+i)}},{key:"clearSelection",value:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}},{key:"calculateScrollbarWidth",value:function(t){if(t){var n=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}else{if(this.calculatedScrollbarWidth!=null)return this.calculatedScrollbarWidth;var a=document.createElement("div");a.className="p-scrollbar-measure",document.body.appendChild(a);var l=a.offsetWidth-a.clientWidth;return document.body.removeChild(a),this.calculatedScrollbarWidth=l,l}}},{key:"getBrowser",value:function(){if(!this.browser){var t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var t=navigator.userAgent.toLowerCase(),n=/(chrome)[ ]([\w.]+)/.exec(t)||/(webkit)[ ]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:n[1]||"",version:n[2]||"0"}}},{key:"isVisible",value:function(t){return t&&(t.clientHeight!==0||t.getClientRects().length!==0||getComputedStyle(t).display!=="none")}},{key:"isExist",value:function(t){return t!==null&&typeof t<"u"&&t.nodeName&&t.parentNode}},{key:"hasDOM",value:function(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}},{key:"getFocusableElements",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=e.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(n,`,
4
4
  [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
@@ -1,4 +1,4 @@
1
- import { g as mt } from "./index-Cc9uulfe.js";
1
+ import { g as mt } from "./index-T-8W-v0x.js";
2
2
  function gt(ct, dt) {
3
3
  for (var B = 0; B < dt.length; B++) {
4
4
  const _ = dt[B];