@emporix/component-library 2.12.1 → 2.12.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 +12 -12
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1412,18 +1412,18 @@ var ye = ({ children: e, className: t, eventMode: n, onAnchorMouseEnter: i, onAn
|
|
|
1412
1412
|
let n = e[t];
|
|
1413
1413
|
if (n != null) return typeof n == "string" ? n : n.message;
|
|
1414
1414
|
}, Ge = {
|
|
1415
|
-
localizedInput: "
|
|
1416
|
-
row: "
|
|
1417
|
-
inputGroup: "
|
|
1418
|
-
addon: "
|
|
1419
|
-
addonInvalid: "
|
|
1420
|
-
input: "
|
|
1421
|
-
inputInvalid: "
|
|
1422
|
-
languageError: "
|
|
1423
|
-
error: "
|
|
1424
|
-
toggle: "
|
|
1425
|
-
toggleLabel: "
|
|
1426
|
-
toggleIcon: "
|
|
1415
|
+
localizedInput: "_localizedInput_lyu5h_1",
|
|
1416
|
+
row: "_row_lyu5h_7",
|
|
1417
|
+
inputGroup: "_inputGroup_lyu5h_11",
|
|
1418
|
+
addon: "_addon_lyu5h_17",
|
|
1419
|
+
addonInvalid: "_addonInvalid_lyu5h_34",
|
|
1420
|
+
input: "_input_lyu5h_11",
|
|
1421
|
+
inputInvalid: "_inputInvalid_lyu5h_75",
|
|
1422
|
+
languageError: "_languageError_lyu5h_82",
|
|
1423
|
+
error: "_error_lyu5h_90",
|
|
1424
|
+
toggle: "_toggle_lyu5h_98",
|
|
1425
|
+
toggleLabel: "_toggleLabel_lyu5h_111",
|
|
1426
|
+
toggleIcon: "_toggleIcon_lyu5h_119"
|
|
1427
1427
|
}, Ke = ({ value: e, onChange: t, languages: n, selectedLanguage: r, label: i, tooltip: a, required: o = !1, inputId: s, showLanguagesLabel: c, hideLanguagesLabel: u, displayOnly: p = !1, disabled: m = !1, error: g, errors: v, showAllLanguages: x = !1, placeholder: S, className: C = "", "data-testid": w = "localized-inputs" }) => {
|
|
1428
1428
|
let T = f(), E = s ?? `localized-input-${T.replace(/[^a-zA-Z0-9_-]/g, "")}`, [D, O] = _(() => Be(e)), [k, A] = _(x);
|
|
1429
1429
|
d(() => {
|
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.EmporixComponentLibrary={},e.React,e.React,e.ReactDOM))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule||!l.call(e,`default`)?a(n,`default`,{value:e,enumerable:!0}):n,e));let p=f(t,1);t=f(t),r=f(r);var m={primaryButton:`_primaryButton_gvcke_1`,primaryButtonDisabled:`_primaryButtonDisabled_gvcke_33`,spinner:`_spinner_gvcke_41`,spin:`_spin_gvcke_41`},h={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g=p.default.createContext&&p.default.createContext(h),_=[`attr`,`size`,`title`];function v(e,t){if(e==null)return{};var n,r,i=y(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function y(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(null,arguments)}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?x(Object(n),!0).forEach(function(t){C(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){var t=T(e,`string`);return typeof t==`symbol`?t:t+``}function T(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function E(e){return e&&e.map((e,t)=>p.default.createElement(e.tag,S({key:t},e.attr),E(e.child)))}function D(e){return t=>p.default.createElement(O,b({attr:S({},e.attr)},t),E(e.child))}function O(e){var t=t=>{var{attr:n,size:r,title:i}=e,a=v(e,_),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),p.default.createElement(`svg`,b({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:S(S({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&p.default.createElement(`title`,null,i),e.children)};return g===void 0?t(h):p.default.createElement(g.Consumer,null,e=>t(e))}function k(e){return D({tag:`svg`,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)}var A=({children:e,disabled:t=!1,loading:r=!1,onClick:i,className:a=``,"data-testid":o,...s})=>{let c=[m.primaryButton,t?m.primaryButtonDisabled:``,a].filter(Boolean).join(` `);return(0,n.jsxs)(`button`,{type:`button`,className:c,disabled:t||r,onClick:i,"data-testid":o,...s,children:[r&&(0,n.jsx)(k,{className:m.spinner,size:12}),e]})},j={secondaryButton:`_secondaryButton_1t120_1`,secondaryButtonSmall:`_secondaryButtonSmall_1t120_34`,secondaryButtonIconOnly:`_secondaryButtonIconOnly_1t120_53`,secondaryButtonDisabled:`_secondaryButtonDisabled_1t120_68`},M=({children:e,disabled:t=!1,onClick:r,className:i=``,"data-testid":a,size:o=`default`,iconOnly:s=!1,"aria-label":c,...l})=>{let u=[j.secondaryButton,o===`small`?j.secondaryButtonSmall:``,s?j.secondaryButtonIconOnly:``,t?j.secondaryButtonDisabled:``,i].filter(Boolean).join(` `);return(0,n.jsx)(`button`,{type:`button`,className:u,disabled:t,onClick:r,"data-testid":a,"aria-label":c,...l,children:e})};function N(e){return D({tag:`svg`,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 P(e){return D({tag:`svg`,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 F(e){return D({tag:`svg`,attr:{fill:`currentColor`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{d:`M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5`},child:[]}]})(e)}function I(e){return D({tag:`svg`,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 L(e){return D({tag:`svg`,attr:{fill:`currentColor`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{fillRule:`evenodd`,d:`M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708`},child:[]}]})(e)}function R(e){return D({tag:`svg`,attr:{fill:`currentColor`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{fillRule:`evenodd`,d:`M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0`},child:[]}]})(e)}function z(e){return D({tag:`svg`,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 ee(e){return D({tag:`svg`,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)}var B={tabsContainer:`_tabsContainer_m0gt9_1`,fullWidth:`_fullWidth_m0gt9_7`,tabsHeader:`_tabsHeader_m0gt9_7`,tabItem:`_tabItem_m0gt9_10`,headerFill:`_headerFill_m0gt9_13`,scrollable:`_scrollable_m0gt9_17`,navContainer:`_navContainer_m0gt9_17`,navViewport:`_navViewport_m0gt9_20`,inactive:`_inactive_m0gt9_30`,tabLine:`_tabLine_m0gt9_30`,navButton:`_navButton_m0gt9_33`,navStatic:`_navStatic_m0gt9_55`,disabled:`_disabled_m0gt9_120`,active:`_active_m0gt9_120`,tabContent:`_tabContent_m0gt9_131`,tabLabel:`_tabLabel_m0gt9_143`,tabPanels:`_tabPanels_m0gt9_191`,panel:`_panel_m0gt9_196`,panelHidden:`_panelHidden_m0gt9_200`},V=.75,H=120,te=({tabs:e,activeTabId:t,onTabChange:r,keepMounted:i=!1,className:a=``,fullWidth:o=!1,scrollable:s=!0,"data-testid":c,...l})=>{let u=(0,p.useRef)(null),[d,f]=(0,p.useState)(!1),[m,h]=(0,p.useState)(!1),g=s&&!o,_=(0,p.useCallback)(()=>{let e=u.current;if(!e||!g){f(!1),h(!1);return}let{scrollLeft:t,scrollWidth:n,clientWidth:r}=e,i=n-r>1;f(i&&t>0),h(i&&t+r<n-1)},[g]);(0,p.useEffect)(()=>{_()},[e,g,_]),(0,p.useEffect)(()=>{let e=u.current;if(!e||!g)return;_();let t;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(_),t.observe(e)),e.addEventListener(`scroll`,_,{passive:!0}),window.addEventListener(`resize`,_),()=>{t?.disconnect(),e.removeEventListener(`scroll`,_),window.removeEventListener(`resize`,_)}},[g,_]),(0,p.useEffect)(()=>{if(!g||!c)return;let e=u.current?.querySelector(`[data-testid="${c}-tab-${t}"]`);typeof e?.scrollIntoView==`function`&&e.scrollIntoView({block:`nearest`,inline:`nearest`}),_()},[t,g,c,_,e]);let v=e=>{let t=u.current;if(!t)return;let n=Math.max(t.clientWidth*V,H);t.scrollBy({left:e===`prev`?-n:n,behavior:`smooth`})},y=[B.tabsContainer,o?B.fullWidth:``,g?B.scrollable:``,a].filter(Boolean).join(` `),b=e.map(e=>{let i=e.id===t,a=e.disabled===!0,o=[B.tabItem,i?B.active:B.inactive,a?B.disabled:``].filter(Boolean).join(` `);return(0,n.jsxs)(`button`,{type:`button`,className:o,disabled:a,"aria-disabled":a?!0:void 0,onClick:()=>{a||r(e.id)},"data-testid":c?`${c}-tab-${e.id}`:void 0,children:[(0,n.jsx)(`div`,{className:B.tabContent,children:(0,n.jsx)(`span`,{className:B.tabLabel,children:e.label})}),(0,n.jsx)(`div`,{className:B.tabLine})]},e.id)});return(0,n.jsxs)(`div`,{className:y,"data-testid":c,...l,children:[(0,n.jsxs)(`div`,{className:B.navContainer,children:[g&&d?(0,n.jsx)(`button`,{type:`button`,className:B.navButton,"aria-label":`Previous tabs`,onClick:()=>v(`prev`),"data-testid":c?`${c}-scroll-prev`:void 0,children:(0,n.jsx)(R,{"aria-hidden":!0})}):null,(0,n.jsx)(`div`,{ref:u,className:g?B.navViewport:B.navStatic,children:(0,n.jsxs)(`div`,{className:B.tabsHeader,children:[b,g?null:(0,n.jsx)(`div`,{className:B.headerFill,"aria-hidden":`true`})]})}),g&&m?(0,n.jsx)(`button`,{type:`button`,className:B.navButton,"aria-label":`Next tabs`,onClick:()=>v(`next`),"data-testid":c?`${c}-scroll-next`:void 0,children:(0,n.jsx)(L,{"aria-hidden":!0})}):null]}),(0,n.jsx)(`div`,{className:B.tabPanels,children:i?e.map(e=>(0,n.jsx)(`div`,{className:e.id===t?B.panel:B.panelHidden,hidden:e.id!==t,"data-testid":c?`${c}-panel-${e.id}`:void 0,children:e.content},e.id)):e.find(e=>e.id===t)?.content})]})};function U(e){return D({tag:`svg`,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 ne(e){return D({tag:`svg`,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 re(e){return D({tag:`svg`,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 ie(e){return D({tag:`svg`,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 ae(e){return D({tag:`svg`,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)}var oe={anchorWrap:`_anchorWrap_1768z_1`,panel:`_panel_1768z_7`,panelInteractive:`_panelInteractive_1768z_24`,panelPassThrough:`_panelPassThrough_1768z_28`},se=8,W=8;function ce(...e){return t=>{e.forEach(e=>e?.(t))}}function le(e){if(e===`top`||e===`bottom`||e===`left`||e===`right`||e===`mouse`)return e}function ue(e){let{anchorRect:t,tooltipRect:n,placement:r,pointer:i,mouseTrack:a,mouseTrackTop:o,mouseTrackLeft:s}=e;if(r===`mouse`||a)return{top:i.y+o,left:i.x+s};let c=0,l=0;switch(r){case`top`:c=t.top-n.height-se,l=t.left+t.width/2-n.width/2;break;case`bottom`:c=t.bottom+se,l=t.left+t.width/2-n.width/2;break;case`left`:c=t.top+t.height/2-n.height/2,l=t.left-n.width-se;break;case`right`:c=t.top+t.height/2-n.height/2,l=t.right+se;break;default:c=t.top-n.height-se,l=t.left+t.width/2-n.width/2}let u=window.innerWidth,d=window.innerHeight;return l=Math.min(Math.max(l,W),u-n.width-W),c=Math.min(Math.max(c,W),d-n.height-W),{top:c,left:l}}function de(e,t){let n=e.getAttribute(`data-pr-tooltip`);return n!=null&&n!==``?n:t??``}function fe(e){return e==null?!0:typeof e==`string`||typeof e==`number`?String(e)===``:!1}var pe=({children:e,className:t,eventMode:r,onAnchorMouseEnter:i,onAnchorMouseMove:a,onAnchorMouseLeave:o,onAnchorFocusIn:s,onAnchorFocusOut:c})=>{let l=p.default.Children.toArray(e);if(l.length!==1||!(0,p.isValidElement)(l[0])){let l=[oe.anchorWrap,t].filter(Boolean).join(` `),u=r===`hover`||r===`both`?{onMouseEnter:i,onMouseMove:a,onMouseLeave:o}:{},d=r===`focus`||r===`both`?{onFocusCapture:s,onBlurCapture:c}:{};return(0,n.jsx)(`span`,{className:l,...u,...d,children:e})}let u=l[0],d=r===`hover`||r===`both`?{onMouseEnter:ce(i,u.props.onMouseEnter),onMouseMove:ce(a,u.props.onMouseMove),onMouseLeave:ce(o,u.props.onMouseLeave)}:{},f=r===`focus`||r===`both`?{onFocusCapture:ce(s,u.props.onFocusCapture),onBlurCapture:ce(c,u.props.onBlurCapture)}:{},m=[t,u.props.className].filter(Boolean).join(` `);return(0,p.cloneElement)(u,{...d,...f,...m?{className:m}:{},ref:u.props.ref})},me=({target:e,content:t,position:i=`top`,event:a=`hover`,showDelay:o=0,hideDelay:s=0,autoHide:c=!0,mouseTrack:l=!1,mouseTrackTop:u=0,mouseTrackLeft:d=0,disabled:f=!1,className:m=``,panelClassName:h=``,id:g,children:_,"data-testid":v})=>{let y=(0,p.useId)().replace(/:/g,``),b=g??`emporix-tooltip-${y}`,[x,S]=(0,p.useState)(!1),[C,w]=(0,p.useState)({top:0,left:0}),[T,E]=(0,p.useState)(null),D=(0,p.useRef)(null),O=(0,p.useRef)(null),k=(0,p.useRef)({x:0,y:0}),A=(0,p.useRef)(),j=(0,p.useRef)(),M=(0,p.useCallback)(()=>{A.current!=null&&(clearTimeout(A.current),A.current=void 0)},[]),N=(0,p.useCallback)(()=>{j.current!=null&&(clearTimeout(j.current),j.current=void 0)},[]),P=(0,p.useCallback)(()=>{let e=D.current;if(e){let t=le(e.getAttribute(`data-pr-position`));if(t)return t}return i},[i]),F=(0,p.useCallback)(()=>{let e=D.current,t=O.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=P();w(ue({anchorRect:n,tooltipRect:r,placement:i,pointer:k.current,mouseTrack:l,mouseTrackTop:u,mouseTrackLeft:d}))},[P,l,u,d]),I=(0,p.useCallback)(()=>{M(),N();let e=D.current;e instanceof HTMLElement&&e.removeAttribute(`aria-describedby`),S(!1),D.current=null},[N,M]),L=(0,p.useCallback)((e,t)=>{f||fe(t)||(N(),M(),D.current=e,E(t),A.current=setTimeout(()=>{S(!0),e instanceof HTMLElement&&e.setAttribute(`aria-describedby`,b)},o))},[N,M,f,o,b]),R=(0,p.useCallback)(()=>{M(),N(),j.current=setTimeout(()=>{I()},s)},[N,M,I,s]),z=(0,p.useCallback)(e=>{!c&&O.current&&e instanceof Node&&O.current.contains(e)||R()},[c,R]);(0,p.useLayoutEffect)(()=>{x&&F()},[x,T,F]),(0,p.useEffect)(()=>{if(!x)return;let e=()=>F();window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e);let t=e=>{k.current={x:e.clientX,y:e.clientY},(l||P()===`mouse`)&&F()};return(l||P()===`mouse`)&&window.addEventListener(`mousemove`,t),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e),window.removeEventListener(`mousemove`,t)}},[x,l,P,F]),(0,p.useEffect)(()=>{if(!x)return;let e=e=>{e.key===`Escape`&&I()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[x,I]),(0,p.useEffect)(()=>{if(x){if(e){let e=D.current;e&&E(de(e,t))}else E(t??null)}},[t,x,e]),(0,p.useEffect)(()=>{if(!e)return;let n=[];try{n=Array.from(document.querySelectorAll(e))}catch{return}let r=e=>{let n=e.currentTarget;k.current={x:e.clientX,y:e.clientY},L(n,de(n,t))},i=e=>{k.current={x:e.clientX,y:e.clientY}},o=e=>{z(e.relatedTarget)},s=e=>{let n=e.currentTarget;L(n,de(n,t))},c=e=>{z(e.relatedTarget)};return n.forEach(e=>{(a===`hover`||a===`both`)&&(e.addEventListener(`mouseenter`,r),e.addEventListener(`mousemove`,i),e.addEventListener(`mouseleave`,o)),(a===`focus`||a===`both`)&&(e.addEventListener(`focusin`,s),e.addEventListener(`focusout`,c))}),()=>{n.forEach(e=>{(a===`hover`||a===`both`)&&(e.removeEventListener(`mouseenter`,r),e.removeEventListener(`mousemove`,i),e.removeEventListener(`mouseleave`,o)),(a===`focus`||a===`both`)&&(e.removeEventListener(`focusin`,s),e.removeEventListener(`focusout`,c))})}},[e,t,a,L,z]);let ee=(0,p.useCallback)(e=>{let n=e.currentTarget;k.current={x:e.clientX,y:e.clientY},D.current=n,L(n,t)},[t,L]),B=(0,p.useCallback)(e=>{k.current={x:e.clientX,y:e.clientY}},[]),V=(0,p.useCallback)(e=>{z(e.relatedTarget)},[z]),H=(0,p.useCallback)(e=>{let n=e.currentTarget;D.current=n,L(n,t)},[t,L]),te=(0,p.useCallback)(e=>{z(e.relatedTarget)},[z]),U=[oe.panel,c?oe.panelPassThrough:oe.panelInteractive,h].filter(Boolean).join(` `),ne=typeof document<`u`&&x&&T!=null?(0,r.createPortal)((0,n.jsx)(`div`,{ref:O,id:b,role:`tooltip`,className:U,style:{top:C.top,left:C.left},onMouseEnter:c?void 0:()=>{N()},onMouseLeave:c?void 0:()=>{R()},"data-testid":v?`${v}-panel`:void 0,children:T}),document.body):null;return e?(0,n.jsx)(n.Fragment,{children:ne}):(0,n.jsxs)(n.Fragment,{children:[_==null?null:(0,n.jsx)(pe,{className:m,eventMode:a,onAnchorMouseEnter:ee,onAnchorMouseMove:B,onAnchorMouseLeave:V,onAnchorFocusIn:H,onAnchorFocusOut:te,children:_}),ne]})},he={fieldLabel:`_fieldLabel_1993i_1`,required:`_required_1993i_12`,tooltipIcon:`_tooltipIcon_1993i_17`},ge=({children:e,htmlFor:t,required:r=!1,tooltip:i,className:a=``,"data-testid":o})=>{let s=[he.fieldLabel,a].filter(Boolean).join(` `);return(0,n.jsxs)(`label`,{htmlFor:t,className:s,"data-testid":o,children:[e,r?(0,n.jsx)(`span`,{className:he.required,children:`*`}):null,i!=null&&i!==``?(0,n.jsx)(me,{content:i,position:`top`,showDelay:200,children:(0,n.jsx)(`span`,{className:he.tooltipIcon,"aria-label":i,children:(0,n.jsx)(re,{"aria-hidden":!0})})}):null]})},G={dropdown:`_dropdown_p094v_1`,control:`_control_p094v_8`,controlDisabled:`_controlDisabled_p094v_33`,controlInput:`_controlInput_p094v_42`,value:`_value_p094v_60`,placeholder:`_placeholder_p094v_69`,chipDisplay:`_chipDisplay_p094v_75`,chipEmpty:`_chipEmpty_p094v_83`,chipValue:`_chipValue_p094v_88`,chipItem:`_chipItem_p094v_97`,chipLabel:`_chipLabel_p094v_111`,chipRemove:`_chipRemove_p094v_117`,chipOverflow:`_chipOverflow_p094v_136`,chevron:`_chevron_p094v_141`,open:`_open_p094v_148`,panel:`_panel_p094v_172`,menuIn:`_menuIn_p094v_1`,panelClosing:`_panelClosing_p094v_184`,menuOut:`_menuOut_p094v_1`,filterWrapper:`_filterWrapper_p094v_188`,filterInput:`_filterInput_p094v_195`,filterIcon:`_filterIcon_p094v_214`,list:`_list_p094v_225`,option:`_option_p094v_234`,checkboxContainer:`_checkboxContainer_p094v_249`,checkbox:`_checkbox_p094v_249`,optionLabel:`_optionLabel_p094v_266`,optionSelected:`_optionSelected_p094v_271`,optionDisabled:`_optionDisabled_p094v_275`,empty:`_empty_p094v_284`,disabled:`_disabled_p094v_291`,error:`_error_p094v_295`},_e=4,ve=(e,t)=>{let n=e.getBoundingClientRect(),r=window.innerHeight-n.bottom-_e,i=t?.offsetHeight??0,a=i>0&&r<i;return{left:n.left,width:n.width>0?n.width:void 0,...a?{top:`auto`,bottom:window.innerHeight-n.top+_e}:{top:n.bottom+_e,bottom:`auto`}}},ye=(e,t)=>{let n=e[t];return n==null?``:String(n)},be=(e,t)=>e[t],xe=(e,t)=>t!=null&&!!e[t],Se=(e,t)=>{if(e===t)return!0;if(e==null||t==null||typeof e!=`object`||typeof t!=`object`)return!1;let n=e.id,r=t.id;return n!=null&&r!=null&&(typeof n==`string`||typeof n==`number`)&&(typeof r==`string`||typeof r==`number`)&&n===r},Ce=(e,t)=>e.some(e=>Se(e,t)),we=(e,t,n)=>{if(e==null)return`option-${n}`;let r=typeof e;if(r===`string`||r===`number`||r===`boolean`)return`option-${String(e)}`;if(r===`object`){let r=e,i=r.id??r.value??r.code??r.key;return i!=null&&(typeof i==`string`||typeof i==`number`)?`option-${i}`:`option-${n}-${t}`}return`option-${n}`},K=({value:e,onChange:t,multiple:i=!1,display:a=`comma`,maxSelectedLabels:o,selectedItemsLabel:s=`{0} items selected`,removeIcon:c,onEditEnd:l,options:u,optionLabel:d=`label`,optionValue:f=`value`,optionDisabled:m,placeholder:h=`Select`,filter:g=!1,editable:_=!1,disabled:v=!1,required:y=!1,label:b,error:x,inputId:S,className:C=``,panelClassName:w=``,valueTemplate:T,itemTemplate:E,"data-testid":D})=>{let O=_&&!i,k=(0,p.useMemo)(()=>i&&Array.isArray(e)?e:[],[i,e]),A=u.find(t=>!i&&be(t,f)===e),j=(0,p.useMemo)(()=>i?u.filter(e=>Ce(k,be(e,f))):[],[i,u,f,k]),M=A?ye(A,d):``,N=j.map(e=>ye(e,d)).filter(Boolean).join(`, `),[P,F]=(0,p.useState)(!1),[I,L]=(0,p.useState)(!1),[R,z]=(0,p.useState)(``),[ee,B]=(0,p.useState)(M),[V,H]=(0,p.useState)({}),te=(0,p.useRef)(null),re=(0,p.useRef)(null),ie=(0,p.useRef)(null),oe=(0,p.useRef)(null),se=(0,p.useRef)(null),W=(0,p.useRef)(!1),ce=(0,p.useMemo)(()=>g&&!O?u.filter(e=>ye(e,d).toLowerCase().includes(R.toLowerCase())):u,[g,O,u,d,R]);(0,p.useEffect)(()=>{O&&B(M)},[O,e,M]),(0,p.useEffect)(()=>{P&&g&&!O&&(z(``),setTimeout(()=>oe.current?.focus(),0))},[P,g,O]);let le=()=>{W.current=!0,L(!0)},ue=e=>{(W.current||e.animationName?.includes(`menuOut`))&&(W.current=!1,F(!1),L(!1),O&&B(M))};(0,p.useLayoutEffect)(()=>{if(!P&&!I)return;let e=()=>{let e=re.current;e&&H(ve(e,ie.current))},t=t=>{let n=ie.current,r=t.target;n!=null&&r instanceof Node&&n.contains(r)||e()};e();let n=ie.current,r=n!=null&&typeof ResizeObserver<`u`?new ResizeObserver(e):null;return n!=null&&r?.observe(n),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,t,!0),()=>{r?.disconnect(),window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,t,!0)}},[P,I]),(0,p.useEffect)(()=>{if(!P&&!I)return;let e=e=>{let t=e.target,n=te.current?.contains(t),r=ie.current?.contains(t);!n&&!r&&(O&&B(M),le())};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[P,I,O,M]);let de=()=>{v||F(e=>!e)},fe=(e,t)=>{t.preventDefault(),t.stopPropagation(),pe(e,t)},pe=(e,n)=>{if(xe(e,m))return;let r=be(e,f);if(O&&B(ye(e,d)),i){let e=r??null;if(e==null)return;let i=Ce(k,e)?k.filter(t=>!Se(t,e)):[...k,e];t?.({value:i,originalEvent:n});return}t?.({value:r??null,originalEvent:n}),le()},me=e=>{if(!P){if(e.key===`Enter`&&O&&ee.trim()){e.preventDefault();let n=ee.trim(),r=n.toLowerCase(),i=u.find(e=>{let t=ye(e,d).toLowerCase();return t===r||t.startsWith(r)}),a=i&&!xe(i,m)?be(i,f):null;i&&!xe(i,m)&&(B(ye(i,d)),t?.({value:a,originalEvent:e})),l?.({value:n,selectedValue:a,originalEvent:e});return}(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`)&&(e.preventDefault(),F(!0));return}if(e.key===`Escape`){e.preventDefault(),le();return}if(e.key===`Enter`){if(e.preventDefault(),O){let t=ee.trim();if(t){let n=t.toLowerCase(),r=u.find(e=>{let t=ye(e,d).toLowerCase();return t===n||t.startsWith(n)}),i=r&&!xe(r,m)?be(r,f):null;r&&!xe(r,m)&&pe(r,e),l?.({value:t,selectedValue:i,originalEvent:e})}else l?.({value:``,selectedValue:null,originalEvent:e})}else if(ce.length>0){let t=ce.find(e=>!xe(e,m));t&&!xe(t,m)&&pe(t,e)}}},he=i&&a===`chip`,_e=(e,n)=>{if(n.stopPropagation(),v)return;let r=be(e,f);if(r==null)return;let i=k.filter(e=>!Se(e,r));t?.({value:i,originalEvent:n})},K=(0,p.useMemo)(()=>o==null?null:Math.max(0,o),[o]),Te=(0,p.useMemo)(()=>!he||K==null?j:j.slice(0,K),[he,K,j]),Ee=he&&K!=null?Math.max(0,j.length-K):0,De=[G.dropdown,v?G.disabled:``,P?G.open:``,C].filter(Boolean).join(` `),Oe=[G.control,v?G.controlDisabled:``,he?G.chipDisplay:``,he&&j.length===0?G.chipEmpty:``].filter(Boolean).join(` `),ke=[G.panel,I?G.panelClosing:``,w].filter(Boolean).join(` `),Ae=(0,p.useId)(),je=S??`dropdown-${Ae.replace(/[^a-zA-Z0-9_-]/g,``)}`,Me=`${je}-panel`,Ne=x==null?void 0:`${je}-error`,Pe=x==null?{}:{"aria-invalid":`true`},Fe=Ne==null?{}:{"aria-describedby":Ne};return(0,n.jsxs)(`div`,{className:De,ref:te,"data-testid":D,children:[b==null?null:(0,n.jsx)(ge,{htmlFor:je,required:y,children:b}),(0,n.jsxs)(`div`,{id:O?void 0:je,role:`combobox`,"aria-expanded":P||I,"aria-haspopup":`listbox`,"aria-controls":P||I?Me:void 0,"aria-disabled":v,"aria-label":typeof b==`string`?b:void 0,...O?{}:Pe,...O?{}:Fe,tabIndex:O||v?-1:0,ref:re,className:Oe,onClick:O?void 0:de,onKeyDown:O?void 0:me,"data-testid":D&&!O?`${D}-control`:void 0,children:[O?(0,n.jsx)(`input`,{ref:se,id:je,type:`text`,className:G.controlInput,value:ee,onChange:e=>{B(e.target.value),!P&&!I&&F(!0)},onFocus:()=>{!v&&!P&&!I&&F(!0)},onKeyDown:me,placeholder:h,disabled:v,"aria-autocomplete":`list`,"aria-controls":P||I?Me:void 0,"aria-expanded":P||I,...Pe,...Fe,"data-testid":D?`${D}-control`:void 0}):he?(0,n.jsx)(`span`,{className:G.chipValue,children:j.length===0?(0,n.jsx)(`span`,{className:G.placeholder,children:h}):(0,n.jsxs)(n.Fragment,{children:[Te.map((e,t)=>{let r=ye(e,d),i=we(be(e,f),r,t);return(0,n.jsxs)(`span`,{className:G.chipItem,children:[(0,n.jsx)(`span`,{className:G.chipLabel,children:E?E(e):r}),!v&&(0,n.jsx)(`button`,{type:`button`,className:G.chipRemove,onClick:t=>_e(e,t),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.stopPropagation()},"aria-label":`Remove ${r}`,"data-testid":D?`${D}-chip-remove-${t}`:void 0,children:c??(0,n.jsx)(U,{size:`1rem`,"aria-hidden":!0})})]},i)}),Ee>0&&(0,n.jsx)(`span`,{className:G.chipOverflow,children:s.replace(`{0}`,String(j.length))})]})}):(0,n.jsx)(`span`,{className:G.value,children:T&&!i?T(A??null):(i?N:M)||(0,n.jsx)(`span`,{className:G.placeholder,children:h})}),(0,n.jsx)(ae,{className:G.chevron,"aria-hidden":!0,onClick:O?de:void 0})]}),(P||I)&&typeof document<`u`&&(0,r.createPortal)((0,n.jsxs)(`div`,{ref:ie,id:Me,className:ke,role:`presentation`,style:V,onAnimationEnd:ue,"data-testid":D?`${D}-panel`:void 0,children:[g&&!O&&(0,n.jsxs)(`div`,{className:G.filterWrapper,children:[(0,n.jsx)(`input`,{ref:oe,type:`text`,className:G.filterInput,value:R,onChange:e=>{z(e.target.value)},onKeyDown:e=>{e.key===`Escape`&&F(!1),e.stopPropagation()},placeholder:`Search...`,"aria-label":`Filter options`,title:`Filter options`,"data-testid":D?`${D}-filter`:void 0}),(0,n.jsx)(ne,{className:G.filterIcon,"aria-hidden":!0})]}),(0,n.jsx)(`ul`,{className:G.list,role:`listbox`,"aria-label":`Options`,children:ce.length===0?(0,n.jsx)(`li`,{className:G.empty,children:`No results`}):ce.map((t,r)=>{let a=be(t,f),o=ye(t,d),s=xe(t,m),c=i?Ce(k,a):e===a,l=we(a,o,r);return(0,n.jsxs)(`li`,{role:`option`,"aria-selected":c,"aria-disabled":s,className:[G.option,c?G.optionSelected:``,s?G.optionDisabled:``].filter(Boolean).join(` `),onMouseDown:e=>fe(t,e),"data-testid":D?`${D}-option-${r}`:void 0,children:[i&&(0,n.jsx)(`span`,{className:G.checkboxContainer,"aria-hidden":!0,children:(0,n.jsx)(`input`,{type:`checkbox`,checked:c,readOnly:!0,tabIndex:-1,className:G.checkbox})}),(0,n.jsx)(`span`,{className:G.optionLabel,children:E?E(t):o})]},l)})})]}),document.body),x==null?null:(0,n.jsx)(`div`,{id:Ne,className:G.error,role:`alert`,children:x})]})},Te={inputText:`_inputText_1wva8_1`,input:`_input_1wva8_1`,inputTextarea:`_inputTextarea_1wva8_44`,error:`_error_1wva8_51`,inputTextDisabled:`_inputTextDisabled_1wva8_60`},Ee=({label:e,tooltip:t,required:r=!1,inputId:i,textarea:a=!1,rows:o,error:s,className:c=``,"data-testid":l,disabled:u=!1,...d})=>{let{type:f=`text`,...m}=d,h=(0,p.useId)(),g=i??`input-text-${h.replace(/[^a-zA-Z0-9_-]/g,``)}`,_=[Te.inputText,u?Te.inputTextDisabled:``,c].filter(Boolean).join(` `),v=m[`aria-invalid`],y;y=v===void 0?void 0:v===!0?`true`:v===!1?`false`:v;let b=r?{"aria-required":`true`}:{"aria-required":`false`},x=y===void 0&&s==null?{}:{"aria-invalid":y??`true`},S=s==null?void 0:`${g}-error`,C={id:g,className:[Te.input,a?Te.inputTextarea:``].filter(Boolean).join(` `),disabled:u,...b,...x,"aria-describedby":S,"data-testid":l?`${l}-input`:void 0};return(0,n.jsxs)(`div`,{className:_,"data-testid":l,children:[e==null?null:(0,n.jsx)(ge,{htmlFor:g,required:r,tooltip:t,children:e}),a?(0,n.jsx)(`textarea`,{...m,...C,rows:o??3}):(0,n.jsx)(`input`,{...m,...C,type:f}),s==null?null:(0,n.jsx)(`div`,{id:S,className:Te.error,role:`alert`,children:s})]})},De={dateValue:`_dateValue_1p8tp_1`,time:`_time_1p8tp_9`},Oe=`--`,ke=({date:e,locale:t,showTime:n,nullText:r,timeZone:i,hour12:a})=>{if(!e)return{dateText:r};let o=e instanceof Date?e:new Date(e);if(Number.isNaN(o.getTime()))return{dateText:r};let s=a??new Intl.DateTimeFormat(t).resolvedOptions().hour12,c={year:`numeric`,month:`2-digit`,day:`2-digit`,...i?{timeZone:i}:{}};try{let e=new Intl.DateTimeFormat(t,c).format(o);if(!n)return{dateText:e};let r={hour:`2-digit`,minute:`2-digit`,hour12:s,...i?{timeZone:i}:{}};return{dateText:e,timeText:new Intl.DateTimeFormat(t,r).format(o)}}catch(e){return console.error(e),{dateText:r}}},Ae=({date:e,locale:t=`en`,showTime:r=!1,nullText:i=Oe,timeZone:a,hour12:o,className:s=``,"data-testid":c})=>{let{dateText:l,timeText:u}=(0,p.useMemo)(()=>ke({date:e,locale:t,showTime:r,nullText:i,timeZone:a,hour12:o}),[e,o,t,i,r,a]);return(0,n.jsxs)(`div`,{className:[De.dateValue,s].filter(Boolean).join(` `),"data-testid":c,children:[(0,n.jsx)(`span`,{children:l}),r&&u?(0,n.jsx)(`span`,{className:De.time,children:u}):null]})},je={backButton:`_backButton_1a9n2_1`},Me=({onClick:e,className:t=``,disabled:r=!1,ariaLabel:i=`Back`,"data-testid":a=`back-button`})=>(0,n.jsx)(`button`,{type:`button`,className:[je.backButton,t].filter(Boolean).join(` `),onClick:e,disabled:r,"aria-label":i,"data-testid":a,children:(0,n.jsx)(ee,{size:16,"aria-hidden":!0})}),Ne=e=>{if(e!=null)return{...e}},Pe=(e,t)=>{if(e==null)return;let n=t.toLowerCase();return Object.entries(e).find(([e])=>e.toLowerCase()===n)},Fe=(e,t)=>{if(e.length===0)return[];if(t==null||t===``)return[...e];let n=t.toLowerCase(),r=e.find(e=>e.id.toLowerCase()===n),i=e.filter(e=>e.id.toLowerCase()!==n);return r?[r,...i]:[...e]},Ie=(e,t,n)=>{let r=Pe(e,t),i=r?r[0]:t,a=t.toLowerCase(),o=Object.fromEntries(Object.entries(e??{}).filter(([e])=>e.toLowerCase()!==a));return n!==``&&(o[i]=n),Object.keys(o).length===0?void 0:o},Le=(e,t)=>{if(e==null)return;let n=e[t];if(n!=null)return typeof n==`string`?n:n.message},q={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`},Re=({value:e,onChange:t,languages:r,selectedLanguage:i,label:a,tooltip:o,required:s=!1,inputId:c,showLanguagesLabel:l,hideLanguagesLabel:u,displayOnly:d=!1,disabled:f=!1,error:m,errors:h,showAllLanguages:g=!1,placeholder:_,className:v=``,"data-testid":y=`localized-inputs`})=>{let b=(0,p.useId)(),x=c??`localized-input-${b.replace(/[^a-zA-Z0-9_-]/g,``)}`,[S,C]=(0,p.useState)(()=>Ne(e)),[w,T]=(0,p.useState)(g);(0,p.useEffect)(()=>{C(Ne(e))},[e]),(0,p.useEffect)(()=>{T(g)},[g]);let E=(0,p.useMemo)(()=>Fe(r,i),[r,i]),D=(0,p.useCallback)((e,n)=>{let r=Ie(S,e,n);C(r),t(r)},[S,t]),O=f||d,k=m!=null&&m!==!1&&m!==``,A=[q.localizedInput,v].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:A,"data-testid":y,children:[a==null?null:(0,n.jsx)(ge,{htmlFor:x,required:s,tooltip:o,children:a}),E.map((e,t)=>{let r=e.id,i=Le(h,e.id),a=!!i||k;return t===0||w?(0,n.jsxs)(`div`,{className:q.row,children:[(0,n.jsxs)(`div`,{className:q.inputGroup,children:[(0,n.jsx)(`span`,{className:[q.addon,a?q.addonInvalid:``].filter(Boolean).join(` `),children:e.id.toUpperCase()}),(0,n.jsx)(`input`,{id:t===0?x:void 0,type:`text`,className:[q.input,a?q.inputInvalid:``].filter(Boolean).join(` `),disabled:O,value:Pe(S,r)?.[1]??``,placeholder:_,"aria-invalid":a||void 0,"aria-required":t===0?s:void 0,"data-testid":y?`${y}-${r}`:void 0,onChange:e=>D(r,e.target.value)})]}),i!=null&&i!==``?(0,n.jsx)(`small`,{className:q.languageError,role:`alert`,children:i}):null]},e.id):null}),k?(0,n.jsx)(`small`,{className:q.error,role:`alert`,children:m}):null,E.length>1?(0,n.jsxs)(`button`,{type:`button`,className:q.toggle,onClick:()=>T(e=>!e),"data-testid":y?`${y}-toggle`:void 0,children:[(0,n.jsx)(P,{className:q.toggleIcon,"aria-hidden":!0}),(0,n.jsx)(`span`,{className:q.toggleLabel,children:w?u:l})]}):null]})},ze={checkbox:`_checkbox_16tdt_1`,input:`_input_16tdt_12`,box:`_box_16tdt_26`,checkboxDisabled:`_checkboxDisabled_16tdt_39`,checkboxInvalid:`_checkboxInvalid_16tdt_63`,checkboxReadOnly:`_checkboxReadOnly_16tdt_83`},Be=({checked:e,value:t,onChange:r,inputId:i,disabled:a=!1,invalid:o=!1,className:s=``,name:c,readOnly:l,required:u,tabIndex:d,"aria-label":f,"aria-labelledby":m,"data-testid":h,...g})=>{let _=(0,p.useId)(),v=i??`checkbox-${_.replace(/[^a-zA-Z0-9_-]/g,``)}`,y=e=>{a||l||r?.({originalEvent:e,checked:e.currentTarget.checked,...t==null?{}:{value:t},stopPropagation:()=>e.stopPropagation(),preventDefault:()=>e.preventDefault()})},b=[ze.checkbox,o?ze.checkboxInvalid:``,a?ze.checkboxDisabled:``,l?ze.checkboxReadOnly:``,s].filter(Boolean).join(` `),x=a;return(0,n.jsxs)(`div`,{className:b,"data-testid":h,children:[(0,n.jsx)(`input`,{...g,type:`checkbox`,id:v,...e===void 0?{}:{checked:e},...t==null?{}:{value:String(t)},onChange:y,disabled:x,readOnly:l,onClick:e=>{l&&e.preventDefault()},onKeyDown:e=>{l&&e.key===` `&&e.preventDefault()},required:u,name:c,tabIndex:d,"aria-label":f,"aria-labelledby":m,"aria-invalid":o?!0:void 0,className:ze.input,"data-testid":h?`${h}-input`:void 0}),(0,n.jsx)(`span`,{className:ze.box,"aria-hidden":`true`})]})},Ve={inputSwitch:`_inputSwitch_1x5m0_1`,input:`_input_1x5m0_1`,track:`_track_1x5m0_25`,thumb:`_thumb_1x5m0_35`,inputSwitchDisabled:`_inputSwitchDisabled_1x5m0_46`,inputSwitchReadOnly:`_inputSwitchReadOnly_1x5m0_46`,inputSwitchChecked:`_inputSwitchChecked_1x5m0_54`,inputSwitchInvalid:`_inputSwitchInvalid_1x5m0_64`},He=({checked:e=!1,onChange:t,inputId:r,disabled:i=!1,invalid:a=!1,className:o=``,name:s,readOnly:c,required:l,tabIndex:u,"aria-label":d,"aria-labelledby":f,"data-testid":m,...h})=>{let g=(0,p.useId)(),_=r??`inputswitch-${g.replace(/[^a-zA-Z0-9_-]/g,``)}`,v=e=>{if(i||c)return;let n=e.currentTarget.checked;t?.({originalEvent:e,value:n,target:{name:s,id:_,value:n}})},y=[Ve.inputSwitch,e?Ve.inputSwitchChecked:``,a?Ve.inputSwitchInvalid:``,i?Ve.inputSwitchDisabled:``,c?Ve.inputSwitchReadOnly:``,o].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:y,"data-testid":m,children:[(0,n.jsx)(`input`,{...h,type:`checkbox`,role:`switch`,id:_,checked:e,onChange:v,disabled:i,readOnly:c,onClick:e=>{c&&e.preventDefault()},onKeyDown:e=>{c&&e.key===` `&&e.preventDefault()},required:l,name:s,tabIndex:u,"aria-label":d,"aria-labelledby":f,"aria-invalid":a?!0:void 0,className:Ve.input,"data-testid":m?`${m}-input`:void 0}),(0,n.jsx)(`span`,{className:Ve.track,"aria-hidden":`true`,children:(0,n.jsx)(`span`,{className:Ve.thumb})})]})};function Ue(e){if(Array.isArray(e))return e}function We(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Ge(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ke(e,t){if(e){if(typeof e==`string`)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ge(e,t)}}function qe(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.EmporixComponentLibrary={},e.React,e.React,e.ReactDOM))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule||!l.call(e,`default`)?a(n,`default`,{value:e,enumerable:!0}):n,e));let p=f(t,1);t=f(t),r=f(r);var m={primaryButton:`_primaryButton_gvcke_1`,primaryButtonDisabled:`_primaryButtonDisabled_gvcke_33`,spinner:`_spinner_gvcke_41`,spin:`_spin_gvcke_41`},h={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g=p.default.createContext&&p.default.createContext(h),_=[`attr`,`size`,`title`];function v(e,t){if(e==null)return{};var n,r,i=y(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function y(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(null,arguments)}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?x(Object(n),!0).forEach(function(t){C(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){var t=T(e,`string`);return typeof t==`symbol`?t:t+``}function T(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function E(e){return e&&e.map((e,t)=>p.default.createElement(e.tag,S({key:t},e.attr),E(e.child)))}function D(e){return t=>p.default.createElement(O,b({attr:S({},e.attr)},t),E(e.child))}function O(e){var t=t=>{var{attr:n,size:r,title:i}=e,a=v(e,_),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),p.default.createElement(`svg`,b({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:S(S({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&p.default.createElement(`title`,null,i),e.children)};return g===void 0?t(h):p.default.createElement(g.Consumer,null,e=>t(e))}function k(e){return D({tag:`svg`,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)}var A=({children:e,disabled:t=!1,loading:r=!1,onClick:i,className:a=``,"data-testid":o,...s})=>{let c=[m.primaryButton,t?m.primaryButtonDisabled:``,a].filter(Boolean).join(` `);return(0,n.jsxs)(`button`,{type:`button`,className:c,disabled:t||r,onClick:i,"data-testid":o,...s,children:[r&&(0,n.jsx)(k,{className:m.spinner,size:12}),e]})},j={secondaryButton:`_secondaryButton_1t120_1`,secondaryButtonSmall:`_secondaryButtonSmall_1t120_34`,secondaryButtonIconOnly:`_secondaryButtonIconOnly_1t120_53`,secondaryButtonDisabled:`_secondaryButtonDisabled_1t120_68`},M=({children:e,disabled:t=!1,onClick:r,className:i=``,"data-testid":a,size:o=`default`,iconOnly:s=!1,"aria-label":c,...l})=>{let u=[j.secondaryButton,o===`small`?j.secondaryButtonSmall:``,s?j.secondaryButtonIconOnly:``,t?j.secondaryButtonDisabled:``,i].filter(Boolean).join(` `);return(0,n.jsx)(`button`,{type:`button`,className:u,disabled:t,onClick:r,"data-testid":a,"aria-label":c,...l,children:e})};function N(e){return D({tag:`svg`,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 P(e){return D({tag:`svg`,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 F(e){return D({tag:`svg`,attr:{fill:`currentColor`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{d:`M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5`},child:[]}]})(e)}function I(e){return D({tag:`svg`,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 L(e){return D({tag:`svg`,attr:{fill:`currentColor`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{fillRule:`evenodd`,d:`M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708`},child:[]}]})(e)}function R(e){return D({tag:`svg`,attr:{fill:`currentColor`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{fillRule:`evenodd`,d:`M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0`},child:[]}]})(e)}function z(e){return D({tag:`svg`,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 ee(e){return D({tag:`svg`,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)}var B={tabsContainer:`_tabsContainer_m0gt9_1`,fullWidth:`_fullWidth_m0gt9_7`,tabsHeader:`_tabsHeader_m0gt9_7`,tabItem:`_tabItem_m0gt9_10`,headerFill:`_headerFill_m0gt9_13`,scrollable:`_scrollable_m0gt9_17`,navContainer:`_navContainer_m0gt9_17`,navViewport:`_navViewport_m0gt9_20`,inactive:`_inactive_m0gt9_30`,tabLine:`_tabLine_m0gt9_30`,navButton:`_navButton_m0gt9_33`,navStatic:`_navStatic_m0gt9_55`,disabled:`_disabled_m0gt9_120`,active:`_active_m0gt9_120`,tabContent:`_tabContent_m0gt9_131`,tabLabel:`_tabLabel_m0gt9_143`,tabPanels:`_tabPanels_m0gt9_191`,panel:`_panel_m0gt9_196`,panelHidden:`_panelHidden_m0gt9_200`},V=.75,H=120,te=({tabs:e,activeTabId:t,onTabChange:r,keepMounted:i=!1,className:a=``,fullWidth:o=!1,scrollable:s=!0,"data-testid":c,...l})=>{let u=(0,p.useRef)(null),[d,f]=(0,p.useState)(!1),[m,h]=(0,p.useState)(!1),g=s&&!o,_=(0,p.useCallback)(()=>{let e=u.current;if(!e||!g){f(!1),h(!1);return}let{scrollLeft:t,scrollWidth:n,clientWidth:r}=e,i=n-r>1;f(i&&t>0),h(i&&t+r<n-1)},[g]);(0,p.useEffect)(()=>{_()},[e,g,_]),(0,p.useEffect)(()=>{let e=u.current;if(!e||!g)return;_();let t;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(_),t.observe(e)),e.addEventListener(`scroll`,_,{passive:!0}),window.addEventListener(`resize`,_),()=>{t?.disconnect(),e.removeEventListener(`scroll`,_),window.removeEventListener(`resize`,_)}},[g,_]),(0,p.useEffect)(()=>{if(!g||!c)return;let e=u.current?.querySelector(`[data-testid="${c}-tab-${t}"]`);typeof e?.scrollIntoView==`function`&&e.scrollIntoView({block:`nearest`,inline:`nearest`}),_()},[t,g,c,_,e]);let v=e=>{let t=u.current;if(!t)return;let n=Math.max(t.clientWidth*V,H);t.scrollBy({left:e===`prev`?-n:n,behavior:`smooth`})},y=[B.tabsContainer,o?B.fullWidth:``,g?B.scrollable:``,a].filter(Boolean).join(` `),b=e.map(e=>{let i=e.id===t,a=e.disabled===!0,o=[B.tabItem,i?B.active:B.inactive,a?B.disabled:``].filter(Boolean).join(` `);return(0,n.jsxs)(`button`,{type:`button`,className:o,disabled:a,"aria-disabled":a?!0:void 0,onClick:()=>{a||r(e.id)},"data-testid":c?`${c}-tab-${e.id}`:void 0,children:[(0,n.jsx)(`div`,{className:B.tabContent,children:(0,n.jsx)(`span`,{className:B.tabLabel,children:e.label})}),(0,n.jsx)(`div`,{className:B.tabLine})]},e.id)});return(0,n.jsxs)(`div`,{className:y,"data-testid":c,...l,children:[(0,n.jsxs)(`div`,{className:B.navContainer,children:[g&&d?(0,n.jsx)(`button`,{type:`button`,className:B.navButton,"aria-label":`Previous tabs`,onClick:()=>v(`prev`),"data-testid":c?`${c}-scroll-prev`:void 0,children:(0,n.jsx)(R,{"aria-hidden":!0})}):null,(0,n.jsx)(`div`,{ref:u,className:g?B.navViewport:B.navStatic,children:(0,n.jsxs)(`div`,{className:B.tabsHeader,children:[b,g?null:(0,n.jsx)(`div`,{className:B.headerFill,"aria-hidden":`true`})]})}),g&&m?(0,n.jsx)(`button`,{type:`button`,className:B.navButton,"aria-label":`Next tabs`,onClick:()=>v(`next`),"data-testid":c?`${c}-scroll-next`:void 0,children:(0,n.jsx)(L,{"aria-hidden":!0})}):null]}),(0,n.jsx)(`div`,{className:B.tabPanels,children:i?e.map(e=>(0,n.jsx)(`div`,{className:e.id===t?B.panel:B.panelHidden,hidden:e.id!==t,"data-testid":c?`${c}-panel-${e.id}`:void 0,children:e.content},e.id)):e.find(e=>e.id===t)?.content})]})};function U(e){return D({tag:`svg`,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 ne(e){return D({tag:`svg`,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 re(e){return D({tag:`svg`,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 ie(e){return D({tag:`svg`,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 ae(e){return D({tag:`svg`,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)}var oe={anchorWrap:`_anchorWrap_1768z_1`,panel:`_panel_1768z_7`,panelInteractive:`_panelInteractive_1768z_24`,panelPassThrough:`_panelPassThrough_1768z_28`},se=8,W=8;function ce(...e){return t=>{e.forEach(e=>e?.(t))}}function le(e){if(e===`top`||e===`bottom`||e===`left`||e===`right`||e===`mouse`)return e}function ue(e){let{anchorRect:t,tooltipRect:n,placement:r,pointer:i,mouseTrack:a,mouseTrackTop:o,mouseTrackLeft:s}=e;if(r===`mouse`||a)return{top:i.y+o,left:i.x+s};let c=0,l=0;switch(r){case`top`:c=t.top-n.height-se,l=t.left+t.width/2-n.width/2;break;case`bottom`:c=t.bottom+se,l=t.left+t.width/2-n.width/2;break;case`left`:c=t.top+t.height/2-n.height/2,l=t.left-n.width-se;break;case`right`:c=t.top+t.height/2-n.height/2,l=t.right+se;break;default:c=t.top-n.height-se,l=t.left+t.width/2-n.width/2}let u=window.innerWidth,d=window.innerHeight;return l=Math.min(Math.max(l,W),u-n.width-W),c=Math.min(Math.max(c,W),d-n.height-W),{top:c,left:l}}function de(e,t){let n=e.getAttribute(`data-pr-tooltip`);return n!=null&&n!==``?n:t??``}function fe(e){return e==null?!0:typeof e==`string`||typeof e==`number`?String(e)===``:!1}var pe=({children:e,className:t,eventMode:r,onAnchorMouseEnter:i,onAnchorMouseMove:a,onAnchorMouseLeave:o,onAnchorFocusIn:s,onAnchorFocusOut:c})=>{let l=p.default.Children.toArray(e);if(l.length!==1||!(0,p.isValidElement)(l[0])){let l=[oe.anchorWrap,t].filter(Boolean).join(` `),u=r===`hover`||r===`both`?{onMouseEnter:i,onMouseMove:a,onMouseLeave:o}:{},d=r===`focus`||r===`both`?{onFocusCapture:s,onBlurCapture:c}:{};return(0,n.jsx)(`span`,{className:l,...u,...d,children:e})}let u=l[0],d=r===`hover`||r===`both`?{onMouseEnter:ce(i,u.props.onMouseEnter),onMouseMove:ce(a,u.props.onMouseMove),onMouseLeave:ce(o,u.props.onMouseLeave)}:{},f=r===`focus`||r===`both`?{onFocusCapture:ce(s,u.props.onFocusCapture),onBlurCapture:ce(c,u.props.onBlurCapture)}:{},m=[t,u.props.className].filter(Boolean).join(` `);return(0,p.cloneElement)(u,{...d,...f,...m?{className:m}:{},ref:u.props.ref})},me=({target:e,content:t,position:i=`top`,event:a=`hover`,showDelay:o=0,hideDelay:s=0,autoHide:c=!0,mouseTrack:l=!1,mouseTrackTop:u=0,mouseTrackLeft:d=0,disabled:f=!1,className:m=``,panelClassName:h=``,id:g,children:_,"data-testid":v})=>{let y=(0,p.useId)().replace(/:/g,``),b=g??`emporix-tooltip-${y}`,[x,S]=(0,p.useState)(!1),[C,w]=(0,p.useState)({top:0,left:0}),[T,E]=(0,p.useState)(null),D=(0,p.useRef)(null),O=(0,p.useRef)(null),k=(0,p.useRef)({x:0,y:0}),A=(0,p.useRef)(),j=(0,p.useRef)(),M=(0,p.useCallback)(()=>{A.current!=null&&(clearTimeout(A.current),A.current=void 0)},[]),N=(0,p.useCallback)(()=>{j.current!=null&&(clearTimeout(j.current),j.current=void 0)},[]),P=(0,p.useCallback)(()=>{let e=D.current;if(e){let t=le(e.getAttribute(`data-pr-position`));if(t)return t}return i},[i]),F=(0,p.useCallback)(()=>{let e=D.current,t=O.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=P();w(ue({anchorRect:n,tooltipRect:r,placement:i,pointer:k.current,mouseTrack:l,mouseTrackTop:u,mouseTrackLeft:d}))},[P,l,u,d]),I=(0,p.useCallback)(()=>{M(),N();let e=D.current;e instanceof HTMLElement&&e.removeAttribute(`aria-describedby`),S(!1),D.current=null},[N,M]),L=(0,p.useCallback)((e,t)=>{f||fe(t)||(N(),M(),D.current=e,E(t),A.current=setTimeout(()=>{S(!0),e instanceof HTMLElement&&e.setAttribute(`aria-describedby`,b)},o))},[N,M,f,o,b]),R=(0,p.useCallback)(()=>{M(),N(),j.current=setTimeout(()=>{I()},s)},[N,M,I,s]),z=(0,p.useCallback)(e=>{!c&&O.current&&e instanceof Node&&O.current.contains(e)||R()},[c,R]);(0,p.useLayoutEffect)(()=>{x&&F()},[x,T,F]),(0,p.useEffect)(()=>{if(!x)return;let e=()=>F();window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e);let t=e=>{k.current={x:e.clientX,y:e.clientY},(l||P()===`mouse`)&&F()};return(l||P()===`mouse`)&&window.addEventListener(`mousemove`,t),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e),window.removeEventListener(`mousemove`,t)}},[x,l,P,F]),(0,p.useEffect)(()=>{if(!x)return;let e=e=>{e.key===`Escape`&&I()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[x,I]),(0,p.useEffect)(()=>{if(x){if(e){let e=D.current;e&&E(de(e,t))}else E(t??null)}},[t,x,e]),(0,p.useEffect)(()=>{if(!e)return;let n=[];try{n=Array.from(document.querySelectorAll(e))}catch{return}let r=e=>{let n=e.currentTarget;k.current={x:e.clientX,y:e.clientY},L(n,de(n,t))},i=e=>{k.current={x:e.clientX,y:e.clientY}},o=e=>{z(e.relatedTarget)},s=e=>{let n=e.currentTarget;L(n,de(n,t))},c=e=>{z(e.relatedTarget)};return n.forEach(e=>{(a===`hover`||a===`both`)&&(e.addEventListener(`mouseenter`,r),e.addEventListener(`mousemove`,i),e.addEventListener(`mouseleave`,o)),(a===`focus`||a===`both`)&&(e.addEventListener(`focusin`,s),e.addEventListener(`focusout`,c))}),()=>{n.forEach(e=>{(a===`hover`||a===`both`)&&(e.removeEventListener(`mouseenter`,r),e.removeEventListener(`mousemove`,i),e.removeEventListener(`mouseleave`,o)),(a===`focus`||a===`both`)&&(e.removeEventListener(`focusin`,s),e.removeEventListener(`focusout`,c))})}},[e,t,a,L,z]);let ee=(0,p.useCallback)(e=>{let n=e.currentTarget;k.current={x:e.clientX,y:e.clientY},D.current=n,L(n,t)},[t,L]),B=(0,p.useCallback)(e=>{k.current={x:e.clientX,y:e.clientY}},[]),V=(0,p.useCallback)(e=>{z(e.relatedTarget)},[z]),H=(0,p.useCallback)(e=>{let n=e.currentTarget;D.current=n,L(n,t)},[t,L]),te=(0,p.useCallback)(e=>{z(e.relatedTarget)},[z]),U=[oe.panel,c?oe.panelPassThrough:oe.panelInteractive,h].filter(Boolean).join(` `),ne=typeof document<`u`&&x&&T!=null?(0,r.createPortal)((0,n.jsx)(`div`,{ref:O,id:b,role:`tooltip`,className:U,style:{top:C.top,left:C.left},onMouseEnter:c?void 0:()=>{N()},onMouseLeave:c?void 0:()=>{R()},"data-testid":v?`${v}-panel`:void 0,children:T}),document.body):null;return e?(0,n.jsx)(n.Fragment,{children:ne}):(0,n.jsxs)(n.Fragment,{children:[_==null?null:(0,n.jsx)(pe,{className:m,eventMode:a,onAnchorMouseEnter:ee,onAnchorMouseMove:B,onAnchorMouseLeave:V,onAnchorFocusIn:H,onAnchorFocusOut:te,children:_}),ne]})},he={fieldLabel:`_fieldLabel_1993i_1`,required:`_required_1993i_12`,tooltipIcon:`_tooltipIcon_1993i_17`},ge=({children:e,htmlFor:t,required:r=!1,tooltip:i,className:a=``,"data-testid":o})=>{let s=[he.fieldLabel,a].filter(Boolean).join(` `);return(0,n.jsxs)(`label`,{htmlFor:t,className:s,"data-testid":o,children:[e,r?(0,n.jsx)(`span`,{className:he.required,children:`*`}):null,i!=null&&i!==``?(0,n.jsx)(me,{content:i,position:`top`,showDelay:200,children:(0,n.jsx)(`span`,{className:he.tooltipIcon,"aria-label":i,children:(0,n.jsx)(re,{"aria-hidden":!0})})}):null]})},G={dropdown:`_dropdown_p094v_1`,control:`_control_p094v_8`,controlDisabled:`_controlDisabled_p094v_33`,controlInput:`_controlInput_p094v_42`,value:`_value_p094v_60`,placeholder:`_placeholder_p094v_69`,chipDisplay:`_chipDisplay_p094v_75`,chipEmpty:`_chipEmpty_p094v_83`,chipValue:`_chipValue_p094v_88`,chipItem:`_chipItem_p094v_97`,chipLabel:`_chipLabel_p094v_111`,chipRemove:`_chipRemove_p094v_117`,chipOverflow:`_chipOverflow_p094v_136`,chevron:`_chevron_p094v_141`,open:`_open_p094v_148`,panel:`_panel_p094v_172`,menuIn:`_menuIn_p094v_1`,panelClosing:`_panelClosing_p094v_184`,menuOut:`_menuOut_p094v_1`,filterWrapper:`_filterWrapper_p094v_188`,filterInput:`_filterInput_p094v_195`,filterIcon:`_filterIcon_p094v_214`,list:`_list_p094v_225`,option:`_option_p094v_234`,checkboxContainer:`_checkboxContainer_p094v_249`,checkbox:`_checkbox_p094v_249`,optionLabel:`_optionLabel_p094v_266`,optionSelected:`_optionSelected_p094v_271`,optionDisabled:`_optionDisabled_p094v_275`,empty:`_empty_p094v_284`,disabled:`_disabled_p094v_291`,error:`_error_p094v_295`},_e=4,ve=(e,t)=>{let n=e.getBoundingClientRect(),r=window.innerHeight-n.bottom-_e,i=t?.offsetHeight??0,a=i>0&&r<i;return{left:n.left,width:n.width>0?n.width:void 0,...a?{top:`auto`,bottom:window.innerHeight-n.top+_e}:{top:n.bottom+_e,bottom:`auto`}}},ye=(e,t)=>{let n=e[t];return n==null?``:String(n)},be=(e,t)=>e[t],xe=(e,t)=>t!=null&&!!e[t],Se=(e,t)=>{if(e===t)return!0;if(e==null||t==null||typeof e!=`object`||typeof t!=`object`)return!1;let n=e.id,r=t.id;return n!=null&&r!=null&&(typeof n==`string`||typeof n==`number`)&&(typeof r==`string`||typeof r==`number`)&&n===r},Ce=(e,t)=>e.some(e=>Se(e,t)),we=(e,t,n)=>{if(e==null)return`option-${n}`;let r=typeof e;if(r===`string`||r===`number`||r===`boolean`)return`option-${String(e)}`;if(r===`object`){let r=e,i=r.id??r.value??r.code??r.key;return i!=null&&(typeof i==`string`||typeof i==`number`)?`option-${i}`:`option-${n}-${t}`}return`option-${n}`},K=({value:e,onChange:t,multiple:i=!1,display:a=`comma`,maxSelectedLabels:o,selectedItemsLabel:s=`{0} items selected`,removeIcon:c,onEditEnd:l,options:u,optionLabel:d=`label`,optionValue:f=`value`,optionDisabled:m,placeholder:h=`Select`,filter:g=!1,editable:_=!1,disabled:v=!1,required:y=!1,label:b,error:x,inputId:S,className:C=``,panelClassName:w=``,valueTemplate:T,itemTemplate:E,"data-testid":D})=>{let O=_&&!i,k=(0,p.useMemo)(()=>i&&Array.isArray(e)?e:[],[i,e]),A=u.find(t=>!i&&be(t,f)===e),j=(0,p.useMemo)(()=>i?u.filter(e=>Ce(k,be(e,f))):[],[i,u,f,k]),M=A?ye(A,d):``,N=j.map(e=>ye(e,d)).filter(Boolean).join(`, `),[P,F]=(0,p.useState)(!1),[I,L]=(0,p.useState)(!1),[R,z]=(0,p.useState)(``),[ee,B]=(0,p.useState)(M),[V,H]=(0,p.useState)({}),te=(0,p.useRef)(null),re=(0,p.useRef)(null),ie=(0,p.useRef)(null),oe=(0,p.useRef)(null),se=(0,p.useRef)(null),W=(0,p.useRef)(!1),ce=(0,p.useMemo)(()=>g&&!O?u.filter(e=>ye(e,d).toLowerCase().includes(R.toLowerCase())):u,[g,O,u,d,R]);(0,p.useEffect)(()=>{O&&B(M)},[O,e,M]),(0,p.useEffect)(()=>{P&&g&&!O&&(z(``),setTimeout(()=>oe.current?.focus(),0))},[P,g,O]);let le=()=>{W.current=!0,L(!0)},ue=e=>{(W.current||e.animationName?.includes(`menuOut`))&&(W.current=!1,F(!1),L(!1),O&&B(M))};(0,p.useLayoutEffect)(()=>{if(!P&&!I)return;let e=()=>{let e=re.current;e&&H(ve(e,ie.current))},t=t=>{let n=ie.current,r=t.target;n!=null&&r instanceof Node&&n.contains(r)||e()};e();let n=ie.current,r=n!=null&&typeof ResizeObserver<`u`?new ResizeObserver(e):null;return n!=null&&r?.observe(n),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,t,!0),()=>{r?.disconnect(),window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,t,!0)}},[P,I]),(0,p.useEffect)(()=>{if(!P&&!I)return;let e=e=>{let t=e.target,n=te.current?.contains(t),r=ie.current?.contains(t);!n&&!r&&(O&&B(M),le())};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[P,I,O,M]);let de=()=>{v||F(e=>!e)},fe=(e,t)=>{t.preventDefault(),t.stopPropagation(),pe(e,t)},pe=(e,n)=>{if(xe(e,m))return;let r=be(e,f);if(O&&B(ye(e,d)),i){let e=r??null;if(e==null)return;let i=Ce(k,e)?k.filter(t=>!Se(t,e)):[...k,e];t?.({value:i,originalEvent:n});return}t?.({value:r??null,originalEvent:n}),le()},me=e=>{if(!P){if(e.key===`Enter`&&O&&ee.trim()){e.preventDefault();let n=ee.trim(),r=n.toLowerCase(),i=u.find(e=>{let t=ye(e,d).toLowerCase();return t===r||t.startsWith(r)}),a=i&&!xe(i,m)?be(i,f):null;i&&!xe(i,m)&&(B(ye(i,d)),t?.({value:a,originalEvent:e})),l?.({value:n,selectedValue:a,originalEvent:e});return}(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`)&&(e.preventDefault(),F(!0));return}if(e.key===`Escape`){e.preventDefault(),le();return}if(e.key===`Enter`){if(e.preventDefault(),O){let t=ee.trim();if(t){let n=t.toLowerCase(),r=u.find(e=>{let t=ye(e,d).toLowerCase();return t===n||t.startsWith(n)}),i=r&&!xe(r,m)?be(r,f):null;r&&!xe(r,m)&&pe(r,e),l?.({value:t,selectedValue:i,originalEvent:e})}else l?.({value:``,selectedValue:null,originalEvent:e})}else if(ce.length>0){let t=ce.find(e=>!xe(e,m));t&&!xe(t,m)&&pe(t,e)}}},he=i&&a===`chip`,_e=(e,n)=>{if(n.stopPropagation(),v)return;let r=be(e,f);if(r==null)return;let i=k.filter(e=>!Se(e,r));t?.({value:i,originalEvent:n})},K=(0,p.useMemo)(()=>o==null?null:Math.max(0,o),[o]),Te=(0,p.useMemo)(()=>!he||K==null?j:j.slice(0,K),[he,K,j]),Ee=he&&K!=null?Math.max(0,j.length-K):0,De=[G.dropdown,v?G.disabled:``,P?G.open:``,C].filter(Boolean).join(` `),Oe=[G.control,v?G.controlDisabled:``,he?G.chipDisplay:``,he&&j.length===0?G.chipEmpty:``].filter(Boolean).join(` `),ke=[G.panel,I?G.panelClosing:``,w].filter(Boolean).join(` `),Ae=(0,p.useId)(),je=S??`dropdown-${Ae.replace(/[^a-zA-Z0-9_-]/g,``)}`,Me=`${je}-panel`,Ne=x==null?void 0:`${je}-error`,Pe=x==null?{}:{"aria-invalid":`true`},Fe=Ne==null?{}:{"aria-describedby":Ne};return(0,n.jsxs)(`div`,{className:De,ref:te,"data-testid":D,children:[b==null?null:(0,n.jsx)(ge,{htmlFor:je,required:y,children:b}),(0,n.jsxs)(`div`,{id:O?void 0:je,role:`combobox`,"aria-expanded":P||I,"aria-haspopup":`listbox`,"aria-controls":P||I?Me:void 0,"aria-disabled":v,"aria-label":typeof b==`string`?b:void 0,...O?{}:Pe,...O?{}:Fe,tabIndex:O||v?-1:0,ref:re,className:Oe,onClick:O?void 0:de,onKeyDown:O?void 0:me,"data-testid":D&&!O?`${D}-control`:void 0,children:[O?(0,n.jsx)(`input`,{ref:se,id:je,type:`text`,className:G.controlInput,value:ee,onChange:e=>{B(e.target.value),!P&&!I&&F(!0)},onFocus:()=>{!v&&!P&&!I&&F(!0)},onKeyDown:me,placeholder:h,disabled:v,"aria-autocomplete":`list`,"aria-controls":P||I?Me:void 0,"aria-expanded":P||I,...Pe,...Fe,"data-testid":D?`${D}-control`:void 0}):he?(0,n.jsx)(`span`,{className:G.chipValue,children:j.length===0?(0,n.jsx)(`span`,{className:G.placeholder,children:h}):(0,n.jsxs)(n.Fragment,{children:[Te.map((e,t)=>{let r=ye(e,d),i=we(be(e,f),r,t);return(0,n.jsxs)(`span`,{className:G.chipItem,children:[(0,n.jsx)(`span`,{className:G.chipLabel,children:E?E(e):r}),!v&&(0,n.jsx)(`button`,{type:`button`,className:G.chipRemove,onClick:t=>_e(e,t),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.stopPropagation()},"aria-label":`Remove ${r}`,"data-testid":D?`${D}-chip-remove-${t}`:void 0,children:c??(0,n.jsx)(U,{size:`1rem`,"aria-hidden":!0})})]},i)}),Ee>0&&(0,n.jsx)(`span`,{className:G.chipOverflow,children:s.replace(`{0}`,String(j.length))})]})}):(0,n.jsx)(`span`,{className:G.value,children:T&&!i?T(A??null):(i?N:M)||(0,n.jsx)(`span`,{className:G.placeholder,children:h})}),(0,n.jsx)(ae,{className:G.chevron,"aria-hidden":!0,onClick:O?de:void 0})]}),(P||I)&&typeof document<`u`&&(0,r.createPortal)((0,n.jsxs)(`div`,{ref:ie,id:Me,className:ke,role:`presentation`,style:V,onAnimationEnd:ue,"data-testid":D?`${D}-panel`:void 0,children:[g&&!O&&(0,n.jsxs)(`div`,{className:G.filterWrapper,children:[(0,n.jsx)(`input`,{ref:oe,type:`text`,className:G.filterInput,value:R,onChange:e=>{z(e.target.value)},onKeyDown:e=>{e.key===`Escape`&&F(!1),e.stopPropagation()},placeholder:`Search...`,"aria-label":`Filter options`,title:`Filter options`,"data-testid":D?`${D}-filter`:void 0}),(0,n.jsx)(ne,{className:G.filterIcon,"aria-hidden":!0})]}),(0,n.jsx)(`ul`,{className:G.list,role:`listbox`,"aria-label":`Options`,children:ce.length===0?(0,n.jsx)(`li`,{className:G.empty,children:`No results`}):ce.map((t,r)=>{let a=be(t,f),o=ye(t,d),s=xe(t,m),c=i?Ce(k,a):e===a,l=we(a,o,r);return(0,n.jsxs)(`li`,{role:`option`,"aria-selected":c,"aria-disabled":s,className:[G.option,c?G.optionSelected:``,s?G.optionDisabled:``].filter(Boolean).join(` `),onMouseDown:e=>fe(t,e),"data-testid":D?`${D}-option-${r}`:void 0,children:[i&&(0,n.jsx)(`span`,{className:G.checkboxContainer,"aria-hidden":!0,children:(0,n.jsx)(`input`,{type:`checkbox`,checked:c,readOnly:!0,tabIndex:-1,className:G.checkbox})}),(0,n.jsx)(`span`,{className:G.optionLabel,children:E?E(t):o})]},l)})})]}),document.body),x==null?null:(0,n.jsx)(`div`,{id:Ne,className:G.error,role:`alert`,children:x})]})},Te={inputText:`_inputText_1wva8_1`,input:`_input_1wva8_1`,inputTextarea:`_inputTextarea_1wva8_44`,error:`_error_1wva8_51`,inputTextDisabled:`_inputTextDisabled_1wva8_60`},Ee=({label:e,tooltip:t,required:r=!1,inputId:i,textarea:a=!1,rows:o,error:s,className:c=``,"data-testid":l,disabled:u=!1,...d})=>{let{type:f=`text`,...m}=d,h=(0,p.useId)(),g=i??`input-text-${h.replace(/[^a-zA-Z0-9_-]/g,``)}`,_=[Te.inputText,u?Te.inputTextDisabled:``,c].filter(Boolean).join(` `),v=m[`aria-invalid`],y;y=v===void 0?void 0:v===!0?`true`:v===!1?`false`:v;let b=r?{"aria-required":`true`}:{"aria-required":`false`},x=y===void 0&&s==null?{}:{"aria-invalid":y??`true`},S=s==null?void 0:`${g}-error`,C={id:g,className:[Te.input,a?Te.inputTextarea:``].filter(Boolean).join(` `),disabled:u,...b,...x,"aria-describedby":S,"data-testid":l?`${l}-input`:void 0};return(0,n.jsxs)(`div`,{className:_,"data-testid":l,children:[e==null?null:(0,n.jsx)(ge,{htmlFor:g,required:r,tooltip:t,children:e}),a?(0,n.jsx)(`textarea`,{...m,...C,rows:o??3}):(0,n.jsx)(`input`,{...m,...C,type:f}),s==null?null:(0,n.jsx)(`div`,{id:S,className:Te.error,role:`alert`,children:s})]})},De={dateValue:`_dateValue_1p8tp_1`,time:`_time_1p8tp_9`},Oe=`--`,ke=({date:e,locale:t,showTime:n,nullText:r,timeZone:i,hour12:a})=>{if(!e)return{dateText:r};let o=e instanceof Date?e:new Date(e);if(Number.isNaN(o.getTime()))return{dateText:r};let s=a??new Intl.DateTimeFormat(t).resolvedOptions().hour12,c={year:`numeric`,month:`2-digit`,day:`2-digit`,...i?{timeZone:i}:{}};try{let e=new Intl.DateTimeFormat(t,c).format(o);if(!n)return{dateText:e};let r={hour:`2-digit`,minute:`2-digit`,hour12:s,...i?{timeZone:i}:{}};return{dateText:e,timeText:new Intl.DateTimeFormat(t,r).format(o)}}catch(e){return console.error(e),{dateText:r}}},Ae=({date:e,locale:t=`en`,showTime:r=!1,nullText:i=Oe,timeZone:a,hour12:o,className:s=``,"data-testid":c})=>{let{dateText:l,timeText:u}=(0,p.useMemo)(()=>ke({date:e,locale:t,showTime:r,nullText:i,timeZone:a,hour12:o}),[e,o,t,i,r,a]);return(0,n.jsxs)(`div`,{className:[De.dateValue,s].filter(Boolean).join(` `),"data-testid":c,children:[(0,n.jsx)(`span`,{children:l}),r&&u?(0,n.jsx)(`span`,{className:De.time,children:u}):null]})},je={backButton:`_backButton_1a9n2_1`},Me=({onClick:e,className:t=``,disabled:r=!1,ariaLabel:i=`Back`,"data-testid":a=`back-button`})=>(0,n.jsx)(`button`,{type:`button`,className:[je.backButton,t].filter(Boolean).join(` `),onClick:e,disabled:r,"aria-label":i,"data-testid":a,children:(0,n.jsx)(ee,{size:16,"aria-hidden":!0})}),Ne=e=>{if(e!=null)return{...e}},Pe=(e,t)=>{if(e==null)return;let n=t.toLowerCase();return Object.entries(e).find(([e])=>e.toLowerCase()===n)},Fe=(e,t)=>{if(e.length===0)return[];if(t==null||t===``)return[...e];let n=t.toLowerCase(),r=e.find(e=>e.id.toLowerCase()===n),i=e.filter(e=>e.id.toLowerCase()!==n);return r?[r,...i]:[...e]},Ie=(e,t,n)=>{let r=Pe(e,t),i=r?r[0]:t,a=t.toLowerCase(),o=Object.fromEntries(Object.entries(e??{}).filter(([e])=>e.toLowerCase()!==a));return n!==``&&(o[i]=n),Object.keys(o).length===0?void 0:o},Le=(e,t)=>{if(e==null)return;let n=e[t];if(n!=null)return typeof n==`string`?n:n.message},q={localizedInput:`_localizedInput_lyu5h_1`,row:`_row_lyu5h_7`,inputGroup:`_inputGroup_lyu5h_11`,addon:`_addon_lyu5h_17`,addonInvalid:`_addonInvalid_lyu5h_34`,input:`_input_lyu5h_11`,inputInvalid:`_inputInvalid_lyu5h_75`,languageError:`_languageError_lyu5h_82`,error:`_error_lyu5h_90`,toggle:`_toggle_lyu5h_98`,toggleLabel:`_toggleLabel_lyu5h_111`,toggleIcon:`_toggleIcon_lyu5h_119`},Re=({value:e,onChange:t,languages:r,selectedLanguage:i,label:a,tooltip:o,required:s=!1,inputId:c,showLanguagesLabel:l,hideLanguagesLabel:u,displayOnly:d=!1,disabled:f=!1,error:m,errors:h,showAllLanguages:g=!1,placeholder:_,className:v=``,"data-testid":y=`localized-inputs`})=>{let b=(0,p.useId)(),x=c??`localized-input-${b.replace(/[^a-zA-Z0-9_-]/g,``)}`,[S,C]=(0,p.useState)(()=>Ne(e)),[w,T]=(0,p.useState)(g);(0,p.useEffect)(()=>{C(Ne(e))},[e]),(0,p.useEffect)(()=>{T(g)},[g]);let E=(0,p.useMemo)(()=>Fe(r,i),[r,i]),D=(0,p.useCallback)((e,n)=>{let r=Ie(S,e,n);C(r),t(r)},[S,t]),O=f||d,k=m!=null&&m!==!1&&m!==``,A=[q.localizedInput,v].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:A,"data-testid":y,children:[a==null?null:(0,n.jsx)(ge,{htmlFor:x,required:s,tooltip:o,children:a}),E.map((e,t)=>{let r=e.id,i=Le(h,e.id),a=!!i||k;return t===0||w?(0,n.jsxs)(`div`,{className:q.row,children:[(0,n.jsxs)(`div`,{className:q.inputGroup,children:[(0,n.jsx)(`span`,{className:[q.addon,a?q.addonInvalid:``].filter(Boolean).join(` `),children:e.id.toUpperCase()}),(0,n.jsx)(`input`,{id:t===0?x:void 0,type:`text`,className:[q.input,a?q.inputInvalid:``].filter(Boolean).join(` `),disabled:O,value:Pe(S,r)?.[1]??``,placeholder:_,"aria-invalid":a||void 0,"aria-required":t===0?s:void 0,"data-testid":y?`${y}-${r}`:void 0,onChange:e=>D(r,e.target.value)})]}),i!=null&&i!==``?(0,n.jsx)(`small`,{className:q.languageError,role:`alert`,children:i}):null]},e.id):null}),k?(0,n.jsx)(`small`,{className:q.error,role:`alert`,children:m}):null,E.length>1?(0,n.jsxs)(`button`,{type:`button`,className:q.toggle,onClick:()=>T(e=>!e),"data-testid":y?`${y}-toggle`:void 0,children:[(0,n.jsx)(P,{className:q.toggleIcon,"aria-hidden":!0}),(0,n.jsx)(`span`,{className:q.toggleLabel,children:w?u:l})]}):null]})},ze={checkbox:`_checkbox_16tdt_1`,input:`_input_16tdt_12`,box:`_box_16tdt_26`,checkboxDisabled:`_checkboxDisabled_16tdt_39`,checkboxInvalid:`_checkboxInvalid_16tdt_63`,checkboxReadOnly:`_checkboxReadOnly_16tdt_83`},Be=({checked:e,value:t,onChange:r,inputId:i,disabled:a=!1,invalid:o=!1,className:s=``,name:c,readOnly:l,required:u,tabIndex:d,"aria-label":f,"aria-labelledby":m,"data-testid":h,...g})=>{let _=(0,p.useId)(),v=i??`checkbox-${_.replace(/[^a-zA-Z0-9_-]/g,``)}`,y=e=>{a||l||r?.({originalEvent:e,checked:e.currentTarget.checked,...t==null?{}:{value:t},stopPropagation:()=>e.stopPropagation(),preventDefault:()=>e.preventDefault()})},b=[ze.checkbox,o?ze.checkboxInvalid:``,a?ze.checkboxDisabled:``,l?ze.checkboxReadOnly:``,s].filter(Boolean).join(` `),x=a;return(0,n.jsxs)(`div`,{className:b,"data-testid":h,children:[(0,n.jsx)(`input`,{...g,type:`checkbox`,id:v,...e===void 0?{}:{checked:e},...t==null?{}:{value:String(t)},onChange:y,disabled:x,readOnly:l,onClick:e=>{l&&e.preventDefault()},onKeyDown:e=>{l&&e.key===` `&&e.preventDefault()},required:u,name:c,tabIndex:d,"aria-label":f,"aria-labelledby":m,"aria-invalid":o?!0:void 0,className:ze.input,"data-testid":h?`${h}-input`:void 0}),(0,n.jsx)(`span`,{className:ze.box,"aria-hidden":`true`})]})},Ve={inputSwitch:`_inputSwitch_1x5m0_1`,input:`_input_1x5m0_1`,track:`_track_1x5m0_25`,thumb:`_thumb_1x5m0_35`,inputSwitchDisabled:`_inputSwitchDisabled_1x5m0_46`,inputSwitchReadOnly:`_inputSwitchReadOnly_1x5m0_46`,inputSwitchChecked:`_inputSwitchChecked_1x5m0_54`,inputSwitchInvalid:`_inputSwitchInvalid_1x5m0_64`},He=({checked:e=!1,onChange:t,inputId:r,disabled:i=!1,invalid:a=!1,className:o=``,name:s,readOnly:c,required:l,tabIndex:u,"aria-label":d,"aria-labelledby":f,"data-testid":m,...h})=>{let g=(0,p.useId)(),_=r??`inputswitch-${g.replace(/[^a-zA-Z0-9_-]/g,``)}`,v=e=>{if(i||c)return;let n=e.currentTarget.checked;t?.({originalEvent:e,value:n,target:{name:s,id:_,value:n}})},y=[Ve.inputSwitch,e?Ve.inputSwitchChecked:``,a?Ve.inputSwitchInvalid:``,i?Ve.inputSwitchDisabled:``,c?Ve.inputSwitchReadOnly:``,o].filter(Boolean).join(` `);return(0,n.jsxs)(`div`,{className:y,"data-testid":m,children:[(0,n.jsx)(`input`,{...h,type:`checkbox`,role:`switch`,id:_,checked:e,onChange:v,disabled:i,readOnly:c,onClick:e=>{c&&e.preventDefault()},onKeyDown:e=>{c&&e.key===` `&&e.preventDefault()},required:l,name:s,tabIndex:u,"aria-label":d,"aria-labelledby":f,"aria-invalid":a?!0:void 0,className:Ve.input,"data-testid":m?`${m}-input`:void 0}),(0,n.jsx)(`span`,{className:Ve.track,"aria-hidden":`true`,children:(0,n.jsx)(`span`,{className:Ve.thumb})})]})};function Ue(e){if(Array.isArray(e))return e}function We(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Ge(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ke(e,t){if(e){if(typeof e==`string`)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ge(e,t)}}function qe(){throw 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 Je(e,t){return Ue(e)||We(e,t)||Ke(e,t)||qe()}function Ye(e){"@babel/helpers - typeof";return Ye=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ye(e)}function J(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t){for(var r=[],i=0;i<t.length;i++){var a=t[i];if(a){var o=Ye(a);if(o===`string`||o===`number`)r.push(a);else if(o===`object`){var s=Array.isArray(a)?a:Object.entries(a).map(function(e){var t=Je(e,2),n=t[0];return t[1]?n:null});r=s.length?r.concat(s.filter(function(e){return!!e})):r}}}return r.join(` `)}}function Xe(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Ze(e,t){if(Ye(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ye(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Qe(e){var t=Ze(e,`string`);return Ye(t)===`symbol`?t:String(t)}function $e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Qe(r.key),r)}}function et(e,t,n){return t&&$e(e.prototype,t),n&&$e(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tt(e,t,n){return t=Qe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=rt(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw 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 a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function rt(e,t){if(e){if(typeof e==`string`)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,t)}}function it(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Y=function(){function e(){Xe(this,e)}return et(e,null,[{key:`innerWidth`,value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}return 0}},{key:`width`,value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t}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 e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:`getWindowScrollLeft`,value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:`getOuterWidth`,value:function(e,t){if(e){var n=e.offsetWidth||e.getBoundingClientRect().width;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:`getOuterHeight`,value:function(e,t){if(e){var n=e.offsetHeight||e.getBoundingClientRect().height;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:`getClientHeight`,value:function(e,t){if(e){var n=e.clientHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:`getClientWidth`,value:function(e,t){if(e){var n=e.clientWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:`getViewport`,value:function(){var e=window,t=document,n=t.documentElement,r=t.getElementsByTagName(`body`)[0];return{width:e.innerWidth||n.clientWidth||r.clientWidth,height:e.innerHeight||n.clientHeight||r.clientHeight}}},{key:`getOffset`,value:function(e){if(e){var t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:`auto`,left:`auto`}}},{key:`index`,value:function(e){if(e)for(var t=e.parentNode.childNodes,n=0,r=0;r<t.length;r++){if(t[r]===e)return n;t[r].nodeType===1&&n++}return-1}},{key:`addMultipleClasses`,value:function(e,t){if(e&&t){if(e.classList)for(var n=t.split(` `),r=0;r<n.length;r++)e.classList.add(n[r]);else for(var i=t.split(` `),a=0;a<i.length;a++)e.className+=` `+i[a]}}},{key:`removeMultipleClasses`,value:function(e,t){if(e&&t){if(e.classList)for(var n=t.split(` `),r=0;r<n.length;r++)e.classList.remove(n[r]);else for(var i=t.split(` `),a=0;a<i.length;a++)e.className=e.className.replace(RegExp(`(^|\\b)`+i[a].split(` `).join(`|`)+`(\\b|$)`,`gi`),` `)}}},{key:`addClass`,value:function(e,t){e&&t&&(e.classList?e.classList.add(t):e.className+=` `+t)}},{key:`removeClass`,value:function(e,t){e&&t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(^|\\b)`+t.split(` `).join(`|`)+`(\\b|$)`,`gi`),` `))}},{key:`hasClass`,value:function(e,t){return e?e.classList?e.classList.contains(t):RegExp(`(^| )`+t+`( |$)`,`gi`).test(e.className):!1}},{key:`find`,value:function(e,t){return e?Array.from(e.querySelectorAll(t)):[]}},{key:`findSingle`,value:function(e,t){return e?e.querySelector(t):null}},{key:`getHeight`,value:function(e){if(e){var t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),t}return 0}},{key:`getWidth`,value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),t}return 0}},{key:`alignOverlay`,value:function(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;t&&n&&(r===`self`?this.relativePosition(t,n):(i&&(t.style.minWidth=e.getOuterWidth(n)+`px`),this.absolutePosition(t,n)))}},{key:`absolutePosition`,value:function(e,t){if(e){var n=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),r=n.height,i=n.width,a=t.offsetHeight,o=t.offsetWidth,s=t.getBoundingClientRect(),c=this.getWindowScrollTop(),l=this.getWindowScrollLeft(),u=this.getViewport(),d,f;s.top+a+r>u.height?(d=s.top+c-r,d<0&&(d=c),e.style.transformOrigin=`bottom`):(d=a+s.top+c,e.style.transformOrigin=`top`),f=s.left+o+i>u.width?Math.max(0,s.left+l+o-i):s.left+l,e.style.top=d+`px`,e.style.left=f+`px`}}},{key:`relativePosition`,value:function(e,t){if(e){var n=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),r=t.offsetHeight,i=t.getBoundingClientRect(),a=this.getViewport(),o,s;i.top+r+n.height>a.height?(o=-1*n.height,i.top+o<0&&(o=-1*i.top),e.style.transformOrigin=`bottom`):(o=r,e.style.transformOrigin=`top`),s=n.width>a.width?i.left*-1:i.left+n.width>a.width?(i.left+n.width-a.width)*-1:0,e.style.top=o+`px`,e.style.left=s+`px`}}},{key:`flipfitCollision`,value:function(t,n){var r=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`left top`,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`left bottom`,o=arguments.length>4?arguments[4]:void 0;if(t&&n){var s=n.getBoundingClientRect(),c=this.getViewport(),l=i.split(` `),u=a.split(` `),d=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},f={my:{x:d(l[0]),y:d(l[1]||l[0]),offsetX:d(l[0],!0),offsetY:d(l[1]||l[0],!0)},at:{x:d(u[0]),y:d(u[1]||u[0]),offsetX:d(u[0],!0),offsetY:d(u[1]||u[0],!0)}},p={left:function(){return f.my.offsetX+f.at.offsetX+s.left+(f.my.x===`left`?0:-1*(f.my.x===`center`?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return f.my.offsetY+f.at.offsetY+s.top+(f.my.y===`top`?0:-1*(f.my.y===`center`?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},m={count:{x:0,y:0},left:function(){var n=p.left(),r=e.getWindowScrollLeft();t.style.left=n+r+`px`,this.count.x===2?(t.style.left=r+`px`,this.count.x=0):n<0&&(this.count.x++,f.my.x=`left`,f.at.x=`right`,f.my.offsetX*=-1,f.at.offsetX*=-1,this.right())},right:function(){var r=p.left()+e.getOuterWidth(n),i=e.getWindowScrollLeft();t.style.left=r+i+`px`,this.count.x===2?(t.style.left=c.width-e.getOuterWidth(t)+i+`px`,this.count.x=0):r+e.getOuterWidth(t)>c.width&&(this.count.x++,f.my.x=`right`,f.at.x=`left`,f.my.offsetX*=-1,f.at.offsetX*=-1,this.left())},top:function(){var n=p.top(),r=e.getWindowScrollTop();t.style.top=n+r+`px`,this.count.y===2?(t.style.left=r+`px`,this.count.y=0):n<0&&(this.count.y++,f.my.y=`top`,f.at.y=`bottom`,f.my.offsetY*=-1,f.at.offsetY*=-1,this.bottom())},bottom:function(){var r=p.top()+e.getOuterHeight(n),i=e.getWindowScrollTop();t.style.top=r+i+`px`,this.count.y===2?(t.style.left=c.height-e.getOuterHeight(t)+i+`px`,this.count.y=0):r+e.getOuterHeight(n)>c.height&&(this.count.y++,f.my.y=`bottom`,f.at.y=`top`,f.my.offsetY*=-1,f.at.offsetY*=-1,this.top())},center:function(r){if(r===`y`){var i=p.top()+e.getOuterHeight(n)/2;t.style.top=i+e.getWindowScrollTop()+`px`,i<0?this.bottom():i+e.getOuterHeight(n)>c.height&&this.top()}else{var a=p.left()+e.getOuterWidth(n)/2;t.style.left=a+e.getWindowScrollLeft()+`px`,a<0?this.left():a+e.getOuterWidth(t)>c.width&&this.right()}}};m[f.at.x](`x`),m[f.at.y](`y`),this.isFunction(o)&&o(f)}}},{key:`findCollisionPosition`,value:function(e){if(e)return e===`top`||e===`bottom`?{axis:`y`,my:`center ${e===`top`?`bottom`:`top`}`,at:`center ${e}`}:{axis:`x`,my:`${e===`left`?`right`:`left`} center`,at:`${e} center`}}},{key:`getParents`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.parentNode===null?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:`getScrollableParents`,value:function(e){var t=[];if(e){var n=this.getParents(e),r=/(auto|scroll)/,i=function(e){var t=e?getComputedStyle(e):null;return t&&(r.test(t.getPropertyValue(`overflow`))||r.test(t.getPropertyValue(`overflowX`))||r.test(t.getPropertyValue(`overflowY`)))},a=nt(n),o;try{for(a.s();!(o=a.n()).done;){var s=o.value,c=s.nodeType===1&&s.dataset.scrollselectors;if(c){var l=nt(c.split(`,`)),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=this.findSingle(s,d);f&&i(f)&&t.push(f)}}catch(e){l.e(e)}finally{l.f()}}s.nodeType!==9&&i(s)&&t.push(s)}}catch(e){a.e(e)}finally{a.f()}}return t}},{key:`getHiddenElementOuterHeight`,value:function(e){if(e){e.style.visibility=`hidden`,e.style.display=`block`;var t=e.offsetHeight;return e.style.display=`none`,e.style.visibility=`visible`,t}return 0}},{key:`getHiddenElementOuterWidth`,value:function(e){if(e){e.style.visibility=`hidden`,e.style.display=`block`;var t=e.offsetWidth;return e.style.display=`none`,e.style.visibility=`visible`,t}return 0}},{key:`getHiddenElementDimensions`,value:function(e){var t={};return e&&(e.style.visibility=`hidden`,e.style.display=`block`,t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display=`none`,e.style.visibility=`visible`),t}},{key:`fadeIn`,value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0;(function i(){r=+e.style.opacity+(new Date().getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(i)||setTimeout(i,16))})()}}},{key:`fadeOut`,value:function(e,t){if(e)var n=1,r=50,i=r/t,a=setInterval(function(){n-=i,n<=0&&(n=0,clearInterval(a)),e.style.opacity=n},r)}},{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(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:`appendChild`,value:function(e,t){if(this.isElement(t))t.appendChild(e);else if(t.el&&t.el.nativeElement)t.el.nativeElement.appendChild(e);else throw Error(`Cannot append `+t+` to `+e)}},{key:`removeChild`,value:function(e,t){if(this.isElement(t))t.removeChild(e);else if(t.el&&t.el.nativeElement)t.el.nativeElement.removeChild(e);else throw Error(`Cannot remove `+e+` from `+t)}},{key:`isElement`,value:function(e){return(typeof HTMLElement>`u`?`undefined`:Ye(HTMLElement))===`object`?e instanceof HTMLElement:e&&Ye(e)===`object`&&e!==null&&e.nodeType===1&&typeof e.nodeName==`string`}},{key:`scrollInView`,value:function(e,t){var n=getComputedStyle(e).getPropertyValue(`borderTopWidth`),r=n?parseFloat(n):0,i=getComputedStyle(e).getPropertyValue(`paddingTop`),a=i?parseFloat(i):0,o=e.getBoundingClientRect(),s=t.getBoundingClientRect().top+document.body.scrollTop-(o.top+document.body.scrollTop)-r-a,c=e.scrollTop,l=e.clientHeight,u=this.getOuterHeight(t);s<0?e.scrollTop=c+s:s+u>l&&(e.scrollTop=c+s-l+u)}},{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(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(this.calculatedScrollbarWidth!=null)return this.calculatedScrollbarWidth;var n=document.createElement(`div`);n.className=`p-scrollbar-measure`,document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:`getBrowser`,value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:`resolveUserAgent`,value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf(`compatible`)<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||``,version:t[2]||`0`}}},{key:`isVisible`,value:function(e){return e&&(e.clientHeight!==0||e.getClientRects().length!==0||getComputedStyle(e).display!==`none`)}},{key:`isExist`,value:function(e){return e!=null&&e.nodeName&&e.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]:``,r=e.find(t,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
|
|
4
4
|
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${n},
|