@wavv/ui 2.0.0-alpha.47 → 2.0.0-alpha.48
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/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/components/Inputs/NumberInput.d.ts +7 -2
- package/build/cjs/types/components/Inputs/SearchInput.d.ts +3 -3
- package/build/cjs/types/components/Inputs/TextInput.d.ts +3 -3
- package/build/cjs/types/components/Inputs/helpers/isAcceptable.d.ts +2 -0
- package/build/cjs/types/components/typeDefs/inputTypes.d.ts +4 -0
- package/build/esm/index.js +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/components/Inputs/NumberInput.d.ts +7 -2
- package/build/esm/types/components/Inputs/SearchInput.d.ts +3 -3
- package/build/esm/types/components/Inputs/TextInput.d.ts +3 -3
- package/build/esm/types/components/Inputs/helpers/isAcceptable.d.ts +2 -0
- package/build/esm/types/components/typeDefs/inputTypes.d.ts +4 -0
- package/build/index.d.ts +15 -6
- package/build/types/components/Inputs/NumberInput.d.ts +7 -2
- package/build/types/components/Inputs/SearchInput.d.ts +3 -3
- package/build/types/components/Inputs/TextInput.d.ts +3 -3
- package/build/types/components/Inputs/helpers/isAcceptable.d.ts +2 -0
- package/build/types/components/typeDefs/inputTypes.d.ts +4 -0
- package/package.json +1 -1
package/build/cjs/index.js
CHANGED
|
@@ -42,5 +42,5 @@ prismjs/prism.js:
|
|
|
42
42
|
(c) Sindre Sorhus
|
|
43
43
|
@license MIT
|
|
44
44
|
*/
|
|
45
|
-
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))o.call(n,c)&&(l[c]=n[c]);if(r){a=r(n);for(var u=0;u<a.length;u++)i.call(n,a[u])&&(l[a[u]]=n[a[u]])}}return l}},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV)var r=n(2),o=n(4),i=n(3),a={};e.exports=function(e,n,l,s,c){if("production"!==t.env.NODE_ENV)for(var u in e)if(e.hasOwnProperty(u)){var d;try{r("function"==typeof e[u],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",s||"React class",l,u,typeof e[u]),d=e[u](n,u,s,l,null,i)}catch(e){d=e}if(o(!d||d instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",l,u,typeof d),d instanceof Error&&!(d.message in a)){a[d.message]=!0;var f=c?c():"";o(!1,"Failed %s type: %s%s",l,d.message,null!=f?f:"")}}}}).call(t,n(0))},function(e,t,n){var r=n(1),o=n(2),i=n(3);e.exports=function(){function e(e,t,n,r,a,l){l!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="insert",o="backspace",i=t.isInvalidKey=function(e){return"Backspace"!==e&&!/[0-9]/.test(e)},a=function(e){return e.start!==e.end};t.update=function(e,t,n){var r=a(t);return"Backspace"===n?l(e,t):function(e,t,n){return!(10===c(e).length&&!n||i(t))}(e,n,r)?s(e,t,n):{phoneNumber:e,cursorPosition:t.start}};var l=t.backspace=function(e,t){var n=t.start,r=t.end,i=e;if(!a(t)&&n>0&&e[n-1].match(/[0-9]/)&&(i=e.substring(0,n-1)+i.substring(n)),a(t)){var l=e.substring(n,r).replace(/\d/g,"");i=e.substring(0,n)+l+i.substring(r)}var s=f(e,i,t,o);return{phoneNumber:d(i),cursorPosition:s}},s=t.insert=function(e,t,n){t.start,t.end;var o=e;a(t)&&(o=u(e,n,t)),a(t)||(o=u(e,n,t));var i=f(e,o,t,r);return{phoneNumber:d(o),cursorPosition:i}},c=t.normalize=function(e){return e.replace(/\D/g,"")},u=t.insertChars=function(e,t,n){return e.substring(0,n.start)+t+e.substring(n.end)},d=t.format=function(e){var t=c(e),n=t.substring(0,3),r=t.substring(3,6),o=t.substring(6,11);return o?"("+n+") "+r+"-"+o:r?n+"-"+r:t},f=t.getCursorPosition=function(e,t,n,i){if(n.start===e.length)return d(t).length;if(0===n.start){if(i===o)return 0;if(i===r)return 1}if(i===o){var l=/[^0-9]/g;if(a(n)&&l.test(e.substring(n.start,n.end)))return n.start;if(!a(n)&&l.test(e[n.start-1]))return n.start-1}var s=e.substring(n.end).match(/[0-9]/g),c=s?s.length:0,u=d(t),f=p(u,c);return u.length-f},p=t.getCharCountFromEndWithNumbers=function(e,t){var n=e.split("");n.reverse();var r=0,o=n.reduce((function(e,n){return r===t?e:(/[0-9]/.test(n)&&r++,e+1)}),0);return r<t?0:o}}]);var Tde=Pde.exports;const Mde=t.forwardRef(((r,o)=>{var{id:i,label:a,placeholder:l,placeholderColor:c,description:u,isLoading:d,search:f,phone:p,textOnly:h,iconLeft:g,iconRight:m,invalid:v,borderRadius:y,borderColor:b,backgroundColor:w,fontSize:x,width:C,height:S,margin:k,marginLeft:E,marginRight:O,marginTop:D,marginBottom:j,padding:P,paddingLeft:T,paddingRight:M,paddingTop:A,paddingBottom:_,containerRef:R,value:L,disabled:I,readOnly:N,preventFocus:$,pointer:z,hideControls:F,onChange:B,onClick:K,onClear:V,onFocus:H,onBlur:U}=r,W=s(r,["id","label","placeholder","placeholderColor","description","isLoading","search","phone","textOnly","iconLeft","iconRight","invalid","borderRadius","borderColor","backgroundColor","fontSize","width","height","margin","marginLeft","marginRight","marginTop","marginBottom","padding","paddingLeft","paddingRight","paddingTop","paddingBottom","containerRef","value","disabled","readOnly","preventFocus","pointer","hideControls","onChange","onClick","onClear","onFocus","onBlur"]);const{focused:Z,handleFocus:q,handleBlur:G}=Fue(H,U,!$&&!N),Y=t.useRef(null),{color:X}=n.useTheme(),[J,Q]=t.useState(h?50:void 0),ee=t.useRef(null),te={margin:k,marginTop:D,marginBottom:j,marginRight:O,marginLeft:E},ne={padding:P,paddingTop:A,paddingBottom:_,paddingRight:M,paddingLeft:T};t.useLayoutEffect((()=>{if(h&&(null==ee?void 0:ee.current)){const{current:e}=ee;L&&(e.innerHTML=L.toString().replace(/ /g," "));const t=e.offsetWidth;"number"==typeof t&&Q(t+3)}}),[h,L,l,ee]);const re=h?L||l:L,oe=(!!L||"number"==typeof L)&&V&&!d;t.useEffect((()=>{var e,t;if(p&&"string"==typeof L&&10===L.length&&L===Tde.normalize(L)){const{current:n}=Y;if(n){const r=Tde.format(L),o=new Event("change",{bubbles:!0}),{prototype:i}=window.HTMLInputElement;null===(t=null===(e=Object.getOwnPropertyDescriptor(i,"value"))||void 0===e?void 0:e.set)||void 0===t||t.call(n,r),n.dispatchEvent(o)}}}),[L]);const ie=()=>{Z||q()},ae=()=>{Z&&G()},le=()=>{ie(),(null==Y?void 0:Y.current)&&Y.current.select()};t.useImperativeHandle(o,(()=>({focus:ie,blur:ae,hasFocus:Z,select:le}))),t.useEffect((()=>{var e;Z&&(null===(e=Y.current)||void 0===e||e.focus())}),[Z]);return e.jsxs(Kue,Object.assign({ref:R,invalid:v,textOnly:h,borderRadius:y,borderColor:b,backgroundColor:w,width:C,height:S,focused:Z,disabled:I,hasLabel:!!a,onClick:e=>{$||N||ie(),K&&K(e)},pointer:z,readOnly:N},te,ne,{children:[f&&e.jsx(Ut,{name:"search",marginRight:8,inheritColor:!0}),g&&A0(g,{marginRight:8}),e.jsxs(Vue,{readOnly:N||$,children:[h&&e.jsx(Rde,{ref:ee,fontSize:x,children:re}),a&&!h&&e.jsx(Hue,{htmlFor:i||a,filled:Bue(L),focused:Z,disabled:I,children:a}),e.jsx(Ade,Object.assign({id:i||a,ref:Y,value:L,placeholder:l,placeholderColor:c,onChange:e=>{if(p){const{value:t}=e.target,n=Tde.normalize(t);if(n.length>10)return;const r=Tde.format(n);B&&B(e,r,n)}else B&&B(e)},onFocus:q,onBlur:G,disabled:I,hide:!(Bue(L)||!a||Z||h),width:J,fontSize:x,hideControls:F},W))]}),m&&A0(m),d&&e.jsx(Xx,{}),oe&&e.jsx(_de,{onClick:V,children:e.jsx(Ut,{name:"close-circle-outline",color:X.brand})}),u&&e.jsx(Uue,{invalid:v,children:u})]}))})),Ade=N.input((({theme:{font:e,input:t,size:n,accent:r},fontSize:o,hide:i,disabled:a,width:l,placeholderColor:s})=>({outline:"none",border:"none",color:a?t.color.disabled:t.color.default,caretColor:r,backgroundColor:"transparent",paddingLeft:0,fontSize:o||e.size.lg,fontFamily:e.family.default,width:l||"100%",height:"100%",marginRight:n.sm,boxSizing:"border-box",opacity:i?0:1,position:i?"absolute":void 0,"&:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus, &:-webkit-autofill:active":{transition:"background-color 0s 50000s",WebkitTextFillColor:t.color.default},"&::placeholder":{color:s||t.color.placeholder,opacity:1}})),(({hideControls:e})=>e&&{"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}})),_de=N.div({height:"100%",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:4}),Rde=N.div((({theme:{font:e},fontSize:t})=>({position:"absolute",width:"max-content",opacity:0,fontSize:t||e.size.lg,zIndex:-1}))),Lde=N("div",{shouldForwardProp:e=>Sx(e,["maxHeight","zIndex","offsetY","offsetX","centerY","centerX","optionsPosition"])})((({theme:e,width:t,maxHeight:n,zIndex:r})=>({backgroundColor:e.options.background,borderRadius:4,boxShadow:e.elevation3,boxSizing:"border-box",fontFamily:e.font.family.default,fontSize:e.font.size.md,maxHeight:n,overflowY:"auto",width:t||"max-content",zIndex:r,"& > span > .menu-arrow":{fill:e.options.background,filter:"drop-shadow(0px 4px 2px rgba(0, 0, 0, 0.1))"},'&[data-side="bottom"] > span > .menu-arrow':{filter:"drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"}}))),Ide=N("div",{shouldForwardProp:e=>Sx(e,["selected","noSelect","contentPosition","color","accented","section"])})({border:"none",padding:"4px 16px",display:"flex",alignItems:"center",userSelect:"none",position:"relative"},(({theme:{optionItem:e,scale4:t},color:n,accented:r,selected:o,disabled:i,noSelect:a=!1})=>{const l=r?e.color.accent:e.color.inactive;return{color:i?t:n||l,cursor:i||a?"inherit":"pointer",pointerEvents:i||a?"none":"auto",backgroundColor:!a&&o?e.background.active:e.background.inactive,"&:hover":{backgroundColor:i||a?e.background.inactive:e.background.active},"&:focus":{outline:"none",backgroundColor:e.background.active},"&[data-highlighted]":{backgroundColor:e.background.active},"&[data-disabled], &[data-disabled]:hover":{color:t,backgroundColor:e.background.inactive,cursor:"inherit"}}}),(({contentPosition:e})=>({justifyContent:"start"===e||"end"===e?`flex-${e}`:e})),(({theme:e,section:t})=>t&&{backgroundColor:e.scale0,padding:"0 16px",color:e.scale6,fontWeight:e.font.weight.medium,pointerEvents:"none","&:hover":{backgroundColor:e.scale0}})),Nde=({id:n,children:o,containerRef:i,parentSelector:a,width:l,maxHeight:s=200,offsetY:c,offsetX:u,centerY:d,centerX:f,direction:p})=>{const[h,g]=t.useState(),m=t.useRef(null);t.useLayoutEffect((()=>{const{current:e}=i||m;if(e&&p){const{scrollWidth:t,scrollHeight:n}=e,r="left"===p||"right"===p;g((r?t:n<s?n:s)+((r?u:c)||4))}}),[i,p]);const v=e.jsx($de,{id:n,ref:i||m,offsetX:u,offsetY:c,width:l,maxHeight:s,centerY:d,centerX:f,optionsPosition:{direction:p,amount:h},children:o});if(a){const e=document.querySelector(a);return e?r.createPortal(v,e):v}return v};Nde.Item=t=>{var{children:n,id:r,onClick:o,selected:i,noSelect:a,contentPosition:l,color:c,accented:u,section:d}=t,f=s(t,["children","id","onClick","selected","noSelect","contentPosition","color","accented","section"]);return e.jsx(Ide,Object.assign({id:null==r?void 0:r.toString(),onClick:o,selected:i,section:d,noSelect:d||a,contentPosition:l,color:c,accented:u,tabIndex:a?-1:0},f,{children:n}))};const $de=N(Lde)((({offsetY:e,offsetX:t})=>({zIndex:2,top:e?-e:"100%",position:"absolute",left:t||void 0})),(({centerY:e,centerX:t})=>({top:e?"50%":void 0,left:t?"50%":void 0,transform:`translate(${t?"-50%":0}, ${e?"-50%":0})`})),(({optionsPosition:e})=>{const{direction:t,amount:n}=e;return t&&n?{left:"left"===t?-n:void 0,right:"right"===t?-n:void 0,top:"top"===t?-n:void 0}:{}})),zde=(e,t)=>{if(!e)return[];const{search:n,filter:r,inputText:o}=t;return n&&r&&o?e.filter((e=>{const t=e=>{if(!e)return!1;const t=o.toLowerCase();return e.toString().toLowerCase().includes(t)};let n=t(e.label);return!n&&"id"in e&&(n=t(e.id)),n||!("value"in e)||"string"!=typeof e.value&&"number"!=typeof e.value||(n=t(e.value)),!n&&"body"in e&&(n=t(e.body)),!n&&"header"in e&&(n=t(e.header)),n})):e},Fde=t=>e.jsxs(e.Fragment,{children:[t.leftElement||null,t.header&&t.body?e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx(Kde,{children:t.header}),e.jsx(Vde,{children:t.body})]}):t.label,t.rightElement&&e.jsx("div",{style:{marginLeft:"auto"},children:t.rightElement})]}),Bde=(n,r,o,i,a)=>{const{selected:l}=a,c=((t,n,r,o)=>{if(t&&t.length>0)return zde(t,o).map((t=>{var o;const i=t.onClick?e=>{t.onClick&&t.onClick(e),r()}:e=>n(t,e);return e.jsx(Nde.Item,{id:null===(o=t.id)||void 0===o?void 0:o.toString(),onClick:i,section:"section"===t.type,children:Fde(t)},t.id)}));return[]})(n,o,i,s(a,["selected"])),u=((e,n,r)=>e?xde(e).map((e=>e?t.cloneElement(e,{setValue:n,close:r}):null)):[])(r,o,i);return xde([...c,...u]).map(((e,n)=>e?t.cloneElement(e,{selected:l===n}):null))},Kde=N.div((({theme:e})=>({fontSize:e.font.size.md,color:e.scale10}))),Vde=N.div((({theme:e})=>({fontSize:e.font.size.sm,color:e.scale6}))),Hde=e=>t.Children.toArray(e).filter((e=>"string"==typeof e)).join("").trim(),Ude=r=>{var{onChange:o,onTextChange:i,afterShow:a,afterHide:l,onFocus:c,onBlur:u,onError:d,placeholder:f,placeholderColor:p,value:h,options:g,children:m,borderColor:v,backgroundColor:y,hideIcon:b,clearOnSelect:w,textOnly:x,width:C,height:S,isLoading:k,margin:E,marginTop:O,marginBottom:D,marginRight:j,marginLeft:P,label:T,id:M,name:A,trigger:_,centerY:R,centerX:L,offsetY:I,offsetX:N,direction:$,fontSize:z,description:F,disabled:B,invalid:K,search:V,filter:H,restrictInput:U,inputRef:W,optionsParent:Z}=r,q=s(r,["onChange","onTextChange","afterShow","afterHide","onFocus","onBlur","onError","placeholder","placeholderColor","value","options","children","borderColor","backgroundColor","hideIcon","clearOnSelect","textOnly","width","height","isLoading","margin","marginTop","marginBottom","marginRight","marginLeft","label","id","name","trigger","centerY","centerX","offsetY","offsetX","direction","fontSize","description","disabled","invalid","search","filter","restrictInput","inputRef","optionsParent"]);const[G,Y]=t.useState(""),[X,J]=t.useState(""),[Q,ee]=t.useState(!1),[te,ne]=t.useState(!1),[re,oe]=t.useState(!1),ie=t.useRef(null),{input:ae}=n.useTheme(),le={margin:E,marginTop:O,marginBottom:D,marginRight:j,marginLeft:P},se=e=>{e&&e.stopPropagation(),!Q&&a&&a(),Q&&l&&l(),ee((e=>!e))};t.useEffect((()=>{var e;if(Q&&V){null===(e=(W||ie).current)||void 0===e||e.focus()}}),[Q,V]),t.useEffect((()=>{d&&d(re)}),[re]),t.useEffect((()=>{i&&i(X)}),[X]);const ce=et(se,Q,Z?[Z,`${Z} *`]:void 0),ue=(e,t)=>{if(void 0===e)return!1;return e.toString().toLowerCase()===t.toLowerCase()},de=e=>{const t=ge().find((t=>{let n=ue(t.label,e);return!n&&"id"in t&&(n=ue(t.id,e)),n||!("value"in t)||"string"!=typeof t.value&&"number"!=typeof t.value||(n=ue(t.value,e)),n}));return t},fe=e=>"function"==typeof U?!U(e):U,pe=e=>he(null,e),he=(e,t)=>{let n,r=!1;if("string"==typeof e){n=(e=>{if(fe(e))return de(e)||null;return{id:jde(),label:e,value:e}})(e);const t=fe(e);null===n&&t&&(r=!0)}else{if("section"===(null==e?void 0:e.type))return;n=e}Q&&se(t),Y((null==n?void 0:n.label)||""),o&&void 0!==n&&o(n),r?oe(!0):(re&&oe(!1),w&&Y(""),J(""))};t.useEffect((()=>{""!==h&&null!=h||pe()}),[h]);const ge=()=>{const e=xde(m).map((e=>{const t=e;let n=t.props.displayText||"";return!T&&t.props.children&&(n=Hde(t.props.children)),{id:t.props.id,label:n,onClick:t.props.onClick}}));return[...zde(g||[],{search:V,filter:H,inputText:X}),...e]},me={options:ge(),select:he,open:se,close:se,searchText:V?X:void 0,isOpen:Q,isFocused:te},[ve,ye]=_t(me),be=Bde(g||[],m,he,se,{selected:ve,search:V,filter:H,inputText:X}),we=Q?"caret-up":"caret-down",xe=x&&!B?p||ae.color.default:void 0,Ce=s(q,["onClear","phone"]);return e.jsx(Wde,Object.assign({textOnly:x,altTrigger:!!_,width:C,height:S,focused:te,search:V},le,{children:e.jsxs(Zde,{ref:ce,children:[_?e.jsx(qde,{id:M,onClick:se,tabIndex:0,onFocus:()=>ne(!0),onBlur:()=>ne(!1),children:_}):e.jsx(Yde,{shake:re,children:e.jsx(Mde,Object.assign({},Ce,{ref:W||ie,id:M,name:A,label:T,fontSize:z,pointer:!0,preventFocus:!V,value:X||h||G,placeholder:f||"Select",placeholderColor:xe,iconRight:b||k?void 0:we,borderColor:v,backgroundColor:y,isLoading:k,textOnly:x,description:F,disabled:B,invalid:re||K,onClick:se,onChange:e=>{var t;const{value:n}=e.target,r=null===(t=(W||ie).current)||void 0===t?void 0:t.hasFocus;V?(J(n),!Q&&r&&ee(!0),re&&oe(!1)):n||pe(e);const o=de(n),i=fe(n),a=""===n||i&&!r;o&&!(V&&(!i||r))?he(o,e):V&&!a||pe(e)},onFocus:e=>{ne(!0),c&&c(e)},onBlur:e=>{var t;if(ne(!1),u&&u(e),V&&X&&e){const{relatedTarget:n}=e;(null===(t=null==ye?void 0:ye.current)||void 0===t?void 0:t.contains(n))||he(X,e)}}}))}),Q&&be.length>0&&e.jsx(Nde,{containerRef:ye,parentSelector:Z,width:!_&&!x||Z?"100%":void 0,centerY:R,centerX:L,offsetY:I,offsetX:N,direction:$,children:be})]})}))};Ude.Item=({value:t,displayText:n,setValue:r,close:o,children:i,contentPosition:a,color:l,accented:s,onClick:c,id:u,section:d})=>{const f=c?e=>{c&&c(e),o&&o()}:e=>{const o={id:u,label:n||Hde(i)||"",value:t};r&&r(o,e)};return e.jsx(Nde.Item,{id:u,contentPosition:a,color:l,onClick:f,accented:s,section:d,children:i})};const Wde=N.div({display:"flex",boxSizing:"border-box"},(({theme:{accent:e},focused:t,search:n,altTrigger:r,textOnly:o})=>({width:r||o?"max-content":"100%",flexDirection:"column",outline:!t||n||r?void 0:`${e} solid 1px`})),Ft,Kt),Zde=N.div({position:"relative",width:"100%",height:"inherit"}),qde=N.div((({theme:{accent:e}})=>({display:"flex",height:"inherit","&:focus-visible":{outline:`${e} solid 1px`,outlineOffset:-1}}))),Gde=n.keyframes({"10%":{transform:"translate3d(-1px, 0, 0)"},"30%":{transform:"translate3d(2px, 0, 0)"},"50%":{transform:"translate3d(-2px, 0, 0)"},"70%":{transform:"translate3d(2px, 0, 0)"},"90%":{transform:"translate3d(-1px, 0, 0)"}}),Yde=N.div((({shake:e})=>({"& input":{animation:e?`${Gde} .5s linear`:void 0}}))),Xde=r=>{var{value:o,label:i,placeholder:a,inputRef:l,iconLeft:c,iconRight:u,loading:d,fontSize:f,placeholderColor:p,disabled:h,readOnly:g,invalid:m,required:v,description:y,errorMessage:b,onChange:w}=r,x=s(r,["value","label","placeholder","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","readOnly","invalid","required","description","errorMessage","onChange"]);const{color:C}=n.useTheme(),[S,k]=t.useState("");t.useEffect((()=>{null!=o&&S!==o&&k(o)}),[o]);return e.jsxs(Jde,Object.assign({value:S,hasLabel:!!i,isDisabled:h,isReadOnly:g||d,isInvalid:m,isRequired:v,onChange:e=>{k(e),w&&w(e)}},x,{children:[c&&A0(c,{marginRight:8}),e.jsx(Ut,{name:"search",inheritColor:!0,marginRight:8}),e.jsxs(o1,{filled:!!S,disabled:h,children:[i,e.jsx(M0,{ref:l,placeholder:a,hide:!(S||!i),fontSize:f,placeholderColor:p,isDisabled:h})]}),u&&A0(u),d&&e.jsx(Xx,{}),!!S&&!d&&e.jsx(Vx,{children:e.jsx(Ut,{name:"close-circle-outline",color:C.brand})}),e.jsx(e1,{description:y,errorMessage:b})]}))},Jde=N(zw)(QQ),Qde=(e,t)=>{const n=e=>{if(!e)return!1;const n=t.toLowerCase();return e.toString().toLowerCase().includes(n)};return e.reduce(((e,r)=>{if("options"in r){const n=Qde(r.options,t);n.length>0&&e.push(Object.assign(Object.assign({},r),{options:n}))}else{let t=n(r.value);!t&&"id"in r&&(t=n(r.id)),!t&&"body"in r&&(t=n(r.body)),!t&&"header"in r&&(t=n(r.header)),t&&e.push(r)}return e}),[])},efe=N.div(QQ),tfe=N.div(Ex),nfe=N.span((({theme:{font:e,scale10:t}})=>({fontSize:e.size.md,color:t}))),rfe=N.div((({gap:e})=>({display:"flex",alignItems:"center",gap:e||4}))),ofe=N.div((({theme:e})=>({color:e.scale10}))),ife=N.div((({theme:e})=>({textAlign:"center",color:e.scale8,paddingTop:4,paddingBottom:8}))),afe=N.div((({clampLines:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:e?void 0:"nowrap",WebkitLineClamp:e,display:e?"-webkit-box":void 0,WebkitBoxOrient:e?"vertical":void 0,wordBreak:e?"break-word":void 0})),(({width:e})=>({width:e||"auto"})),Bt,Kt),lfe=N.div({display:"grid"},(({rows:e,rowGap:t,columns:n,columnGap:r,gap:o,template:i,alignContent:a,alignItems:l,justifyContent:s,justifyItems:c,width:u,height:d})=>({gridTemplateColumns:"number"==typeof n?`repeat(${n}, 1fr)`:n,gridTemplateRows:"number"==typeof e?`repeat(${e}, 1fr)`:e,gridColumnGap:r,gridRowGap:t,gridGap:o,gridTemplate:i,alignItems:l,justifyItems:c,alignContent:a,justifyContent:s,width:u,height:d})),(({columns:e})=>"equal"===e&&{gridTemplateColumns:"unset",gridAutoColumns:"1fr",gridAutoFlow:"column"}),Bt,Kt);lfe.Item=N.div((({row:e,rowStart:t,rowEnd:n,column:r,columnStart:o,columnEnd:i,area:a,alignSelf:l,justifySelf:s,placeSelf:c,border:u})=>({gridRow:e,gridRowStart:t,gridRowEnd:n,gridColumn:r,gridColumnStart:o,gridColumnEnd:i,gridArea:a,alignSelf:l,justifySelf:s,placeSelf:c,border:u})),Bt,Kt);const sfe=t=>{var{id:n,label:r,labelPosition:o,checked:i,disabled:a,margin:l,marginTop:c,marginBottom:u,marginRight:d,marginLeft:f}=t,p=s(t,["id","label","labelPosition","checked","disabled","margin","marginTop","marginBottom","marginRight","marginLeft"]);const h="right"===o,g={margin:l,marginTop:c,marginBottom:u,marginRight:d,marginLeft:f};return e.jsxs(Dx,Object.assign({htmlFor:n,labelRight:h,disabled:a},g,{children:[r&&e.jsx(Px,{children:r}),e.jsx(jx,Object.assign({id:n,type:"radio",checked:i,disabled:a},p)),e.jsx(Ut,{name:"radio-button",marginLeft:r&&!h?8:0,marginRight:r&&h?8:0,pointer:!a})]}))},cfe=n=>{var{id:r,label:o,labelPosition:i,checked:a,disabled:l,onChange:c,margin:u,marginTop:d,marginBottom:f,marginRight:p,marginLeft:h}=n,g=s(n,["id","label","labelPosition","checked","disabled","onChange","margin","marginTop","marginBottom","marginRight","marginLeft"]);const[m,v]=t.useState("toggle-off"),[y,b]=t.useState(a||!1),w="right"===i,x={margin:u,marginTop:d,marginBottom:f,marginRight:p,marginLeft:h};return t.useEffect((()=>{v(y?"toggle-on":"toggle-off")}),[y]),t.useEffect((()=>{b("boolean"==typeof a?a:y)}),[a,y]),e.jsxs(Dx,Object.assign({htmlFor:r,labelRight:w,disabled:l},x,{children:[o&&e.jsx(Px,{children:o}),e.jsx(jx,Object.assign({id:r,type:"checkbox",checked:y,disabled:l,onChange:()=>{const e=!y;b(e),c(e)}},g)),e.jsx(Ut,{name:m,marginLeft:o&&!w?8:0,marginRight:o&&w?8:0,pointer:!l,size:40})]}))},ufe=t=>{var{children:n,iconLeft:r,iconRight:o,disabled:i,pill:a}=t,l=s(t,["children","iconLeft","iconRight","disabled","pill"]);return e.jsxs(dfe,Object.assign({as:a?void 0:"label",disabled:i,rightIcon:!!o,pill:a},l,{children:[r&&A0(r,{marginRight:4,size:"small"}),n,o&&A0(o,{marginLeft:4,size:"small"})]}))},dfe=N.div((({theme:e,disabled:t,pill:n})=>({display:"flex",alignItems:"center",width:"max-content",color:t?e.scale4:e.scale10,cursor:"default",fontSize:n?e.font.size.sm:e.font.size.md,fontWeight:n?e.font.weight.medium:e.font.weight.default,fontFamily:e.font.family.default})),(({theme:e,disabled:t,pill:n,rightIcon:r})=>n&&{borderRadius:40,padding:`2px ${e.size.sm}px`,paddingRight:r?e.size.xs:void 0,backgroundColor:t?e.scale0:e.scale1,"&:hover":{backgroundColor:t||!n?void 0:e.scale2}}),Kt),ffe=t=>{var{children:n,rows:r,columns:o,rowGap:i,columnGap:a,onSubmit:l}=t,c=s(t,["children","rows","columns","rowGap","columnGap","onSubmit"]);return e.jsx(pfe,Object.assign({as:"form",rows:r,columns:o,rowGap:i,columnGap:a,onSubmit:e=>{l?l(e):e.preventDefault()}},c,{children:n}))};ffe.Group=t=>{var{children:n,rows:r,columns:o,rowGap:i,columnGap:a,disabled:l}=t,c=s(t,["children","rows","columns","rowGap","columnGap","disabled"]);return e.jsx(hfe,Object.assign({rows:r,columns:o,rowGap:i,columnGap:a,disabled:l},c,{children:n}))},ffe.Field=t=>{var{children:n,inline:r,align:o,disabled:i}=t,a=s(t,["children","inline","align","disabled"]);return e.jsx(gfe,Object.assign({},a,{inline:r,align:o,disabled:i,children:n}))},ffe.Input=Mde,ffe.Dropdown=Ude,ffe.Radio=sfe,ffe.Toggle=cfe,ffe.Checkbox=Tx,ffe.Label=ufe;const pfe=N(lfe)({boxSizing:"border-box"}),hfe=N(lfe)((({disabled:e})=>e&&{opacity:.3,pointerEvents:"none"})),gfe=N.div((({inline:e,align:t})=>({display:"flex",flexDirection:e?"row":"column",alignItems:t?{top:"flex-start",bottom:"flex-end",center:"center"}[t]:void 0})),(({disabled:e})=>e&&{opacity:.3,pointerEvents:"none"}),Kt),mfe=N.div((({prevNext:e,opacity:t})=>({width:"100%",height:"100%",backgroundColor:`rgba(0, 0, 0, ${null!=t?t:.3})`,position:"fixed",top:0,left:0,display:"grid",gridTemplateColumns:e?"auto 1fr auto":"1fr",justifyContent:"space-between",alignItems:"center",zIndex:1e4,userSelect:"none",borderRadius:5}))),vfe=N.div({position:"absolute",top:0,right:0,display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",width:50,height:50,zIndex:1}),yfe=N.div((({next:e})=>({display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",width:50,height:"100%",backgroundColor:"transparent",left:e?void 0:0,right:e?0:void 0,zIndex:0,"&:hover":{background:`linear-gradient(90deg, rgba(0,0,0,${e?0:.4}) 0%, rgba(0,0,0,${e?.4:0}) 100%)`}}))),bfe=N.img((({maxWidth:e,maxHeight:t})=>({display:"block",justifySelf:"center",maxWidth:e||"100%",maxHeight:t||"100%"}))),wfe=N.code((({theme:e})=>({fontFamily:"source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace",color:e.scale10,backgroundColor:e.scale1,borderRadius:e.size.xs,padding:"2px 4px"}))),xfe=N(rw)((({theme:e,placeholderColor:t})=>({outline:"none",borderRadius:4,padding:"0 2px","&[data-focused]":{backgroundColor:e.calendar.background.activeRange},"&[data-placeholder]":{color:t||e.input.color.placeholder},'&[data-type="literal"]':{padding:0,color:t||e.input.color.placeholder},'&[data-type="dayPeriod"]':{textTransform:"lowercase"}}))),Cfe=N(Vx)((({theme:{input:e},isDisabled:t})=>({color:t?e.labelColor.disabled:e.labelColor.default}))),Sfe=b1(),kfe=N(cw)(QQ),Efe=N(tw,P0)({display:"flex"},T0),Ofe=b1(),Dfe=n=>{var{startDate:r,endDate:o,onChange:i,preventPast:a,preventFuture:l,noShadow:c}=n,u=s(n,["startDate","endDate","onChange","preventPast","preventFuture","noShadow"]);const{current:d}=t.useRef(r?x1(r):Ofe),{current:f}=t.useRef(o?x1(o):d),[p,h]=t.useState(d),[g,m]=t.useState(f),[v,y]=t.useState(d),{min:b,max:w}=C1({past:a,future:l,rel:d});return e.jsxs(jfe,Object.assign({value:{start:p,end:g},onChange:e=>{const{start:t,end:n}=e,{year:r,month:o,day:a}=t,{year:l,month:s,day:c}=n,u=new Ds(r,o,a);h(u);const d=new Ds(l,s,c);m(d);const f=w1(t),p=w1(n);i&&i(f,p)},minValue:b,maxValue:w,noShadow:c,focusedValue:v,onFocusChange:y},u,{children:[e.jsx(g1,{date:v,setDate:y}),e.jsx(qQ,{range:!0})]}))},jfe=N(Ry)(ZQ),Pfe=b1(),Tfe=N(dw)(QQ),Mfe=N(tw,P0)(T0,{display:"flex","&:first-of-type":{marginRight:0}}),Afe=N(Mb,P0)((({theme:{input:e,font:t},hide:n,fontSize:r,isDisabled:o})=>({display:"flex",alignItems:"center",gap:4,"& > span":{color:o?e.color.disabled:e.color.default,fontSize:r||t.size.lg},"&:not(:focus):not(:focus-within)":{opacity:n?0:1,position:n?"absolute":void 0}}))),_fe=N(Iw)(QQ),Rfe=N.div((({theme:e})=>({display:"flex",flexDirection:"column",justifyContent:"space-between",borderLeft:e.defaultBorder,overflow:"hidden",borderTopRightRadius:4,borderBottomRightRadius:4}))),Lfe=N(Vx)((({theme:e,isDisabled:t})=>({height:"100%",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:0,color:t?e.scale4:void 0,pointerEvents:t?"none":void 0,"&:hover":{backgroundColor:t?void 0:e.scale1},"&:active":{backgroundColor:e.scale0}}))),Ife=N.div((({theme:e})=>({height:1,width:"100%",backgroundColor:e.scale1}))),Nfe=N(Cx)(QQ),$fe=N(Cx)(QQ),zfe=N(Xb)(QQ),Ffe=N(tw,P0)({display:"flex"},T0),Bfe=({vertical:n,width:r,height:o,padding:i,paddingTop:a,paddingBottom:l,paddingLeft:s,paddingRight:c,border:u,borderTop:d,borderBottom:f,borderLeft:p,borderRight:h,borderTopLeftRadius:g,borderTopRightRadius:m,borderBottomLeftRadius:v,borderBottomRightRadius:y,backgroundColor:b,children:w})=>e.jsx(Kfe,{vertical:n,width:r,height:o,padding:i,paddingTop:a,paddingBottom:l,paddingLeft:s,paddingRight:c,border:u,borderTop:d,borderBottom:f,borderLeft:p,borderRight:h,borderTopLeftRadius:g,borderTopRightRadius:m,borderBottomLeftRadius:v,borderBottomRightRadius:y,backgroundColor:b,role:"menu",children:w?xde(w).map((e=>e?t.cloneElement(e,{vertical:n,backgroundColor:b}):null)):null}),Kfe=N.div((({theme:{menu:e},vertical:t,backgroundColor:n,width:r,height:o})=>({display:"flex",flexFlow:t?"column":"row",overflowY:t?"auto":void 0,backgroundColor:n||e.background,padding:t?"16px 0":"0 16px",width:r,height:o})),(({theme:{defaultBorder:e},border:t,borderTop:n,borderBottom:r,borderLeft:o,borderRight:i,borderTopLeftRadius:a,borderTopRightRadius:l,borderBottomLeftRadius:s,borderBottomRightRadius:c})=>({border:t?e:void 0,borderTop:n?e:void 0,borderBottom:r?e:void 0,borderLeft:o?e:void 0,borderRight:i?e:void 0,borderTopLeftRadius:a,borderTopRightRadius:l,borderBottomLeftRadius:s,borderBottomRightRadius:c})),Bt),Vfe=N.button({userSelect:"none",border:"none",display:"flex",alignItems:"center"},(({theme:{accent:e,font:t,menuItem:n},selected:r,vertical:o,disabled:i,indent:a=1})=>({color:r?n.color.active:n.color.inactive,backgroundColor:r?n.background.active:n.background.inactive,borderLeft:o?"4px solid transparent":void 0,borderLeftColor:o&&r?n.borderColor:void 0,borderBottom:o?void 0:"4px solid transparent",borderBottomColor:!o&&r?n.borderColor:void 0,cursor:i?"not-allowed":"pointer",fontSize:t.size.lg,padding:o?`0 0 0 ${32*a}px`:"0 16px",minHeight:40,"&:hover":{backgroundColor:n.background.hover,color:n.color.hover},"&:focus-visible":{outline:`${e} solid 1px`,outlineOffset:-1}})),(({contentPosition:e})=>({justifyContent:"start"===e||"end"===e?`flex-${e}`:e}))),Hfe=N.div((({theme:e,backgroundColor:t})=>({display:"flex",flexDirection:"column",backgroundColor:t||e.menu.background}))),Ufe=N.div({marginLeft:"auto",marginRight:8});Bfe.Item=({vertical:t,selected:n,disabled:r,contentPosition:o,onClick:i,id:a,children:l,indent:s=1})=>e.jsx(Vfe,{vertical:t,selected:n,disabled:r,contentPosition:o,onClick:i,id:a,role:"menuitem",indent:s,children:l}),Bfe.Group=({label:n,defaultOpen:r,vertical:o,selected:i,disabled:a,contentPosition:l,onClick:s,id:c,children:u,indent:d=1,backgroundColor:f})=>{const[p,h]=t.useState(r||i),g=e=>xde(e).map((e=>{if(t.isValidElement(e)){const n=e;return n.props.selected&&!p&&h(!0),Array.isArray(n.props.children)&&g(n.props.children),t.cloneElement(e,{vertical:o,indent:d+1,backgroundColor:f})}return null})),m=g(u),v=()=>h((e=>!e));return e.jsxs(Hfe,{backgroundColor:f,children:[e.jsxs(Vfe,{vertical:o,selected:i||!1,disabled:a,contentPosition:l,onClick:e=>{s?(s(e),p||v()):v()},id:c,role:"menuitem",indent:d,children:[n,e.jsx(Ufe,{onClick:e=>{e.stopPropagation(),v()},children:e.jsx(Ut,{name:p?"chevron-up":"chevron-down",pointer:!0})})]}),p&&m]})};const Wfe=({type:t,content:r,closeIcon:o,onClose:i,width:a,margin:l,marginTop:s,marginBottom:c,marginRight:u,marginLeft:d,children:f})=>{const p=n.useTheme(),{iconName:h,borderColor:g,backgroundColor:m}=((e,t)=>{const{color:n}=t;switch(e){case"info":return{iconName:"info",borderColor:n.brand,backgroundColor:n.brandTint2};case"error":return{iconName:"warning",borderColor:n.error,backgroundColor:n.errorTint2};case"success":return{iconName:"check-circle",borderColor:n.success,backgroundColor:n.successTint2};case"warning":return{iconName:"warning",borderColor:n.warning,backgroundColor:n.warningTint2};default:return{iconName:"info",borderColor:t.scale8,backgroundColor:t.scale0}}})(t||"",p),v={margin:l,marginTop:s,marginBottom:c,marginRight:u,marginLeft:d};return e.jsxs(Gfe,Object.assign({borderColor:g,backgroundColor:m,width:a,showingClose:o},v,{children:[e.jsx(Ut,{name:h,style:{marginRight:10},color:g}),e.jsx(Yfe,{children:r||f}),o&&e.jsx(Ut,{name:"close",onClick:i,pointer:!0,color:p.scale8,hoverColor:p.scale10,marginLeft:"auto"})]}))},Zfe=N.div((({theme:e})=>({fontWeight:e.font.weight.medium}))),qfe=N.div((({theme:e})=>({fontWeight:e.font.weight.default})));Wfe.Header=Zfe,Wfe.Body=qfe;const Gfe=N.div((({theme:e,borderColor:t,backgroundColor:n,width:r})=>({width:r,display:"flex",alignItems:"center",margin:"10px 0",position:"relative",padding:`${e.size.sm}px ${e.size.md}px`,border:"1px solid",borderColor:t,borderRadius:e.size.xs,backgroundColor:n,color:e.scale10,fontSize:e.font.size.sm,"& a":{textDecoration:"none",color:e.accent,"&:hover":{textDecoration:"underline"}}})),(({theme:e,showingClose:t})=>({paddingRight:t?e.size.sm:void 0})),Kt),Yfe=N.div({width:"100%"}),Xfe=N.div((({color:e})=>({fontSize:12,padding:"0 5px",color:e}))),Jfe=N.div((({theme:e})=>({height:1,backgroundColor:e.scale4,width:"100%"}))),Qfe=N.div({display:"grid",gridTemplateColumns:"1fr auto 1fr",alignItems:"center",padding:"10px 0"}),epe=({children:n,rootSelector:o,visible:i,width:a,height:l,onClose:s,closeIcon:c,preventOverlayClose:u,overlayBlur:d,overlayColor:f,backgroundColor:p,small:h,noOverlay:g,centerX:m,centerY:v,position:y,top:b,bottom:w,right:x,left:C,padding:S,paddingTop:k,paddingBottom:E,paddingRight:O,paddingLeft:D,zIndex:j})=>{const P=et(u?()=>null:s,i),T={padding:S,paddingTop:k,paddingBottom:E,paddingRight:O,paddingLeft:D},M=xde(n).map((e=>e?t.cloneElement(e,{inline:h}):null)),A=e.jsx(rpe,{color:f,noOverlay:g,centerX:m,centerY:v,position:y,top:b,bottom:w,right:x,left:C,zIndex:j,blur:d,children:e.jsxs(tpe,Object.assign({ref:P,width:a,height:l,backgroundColor:p,small:h,noOverlay:g,centerX:m,centerY:v},T,{children:[M,c&&e.jsx(npe,{inline:h,children:e.jsx(Ut,{name:"close",onClick:s,pointer:!0})})]}))}),_=document.querySelector(o||"#root");return i&&_?r.createPortal(A,_):null};epe.Header=N.div((({theme:e})=>({color:e.modal.color.header,fontSize:e.font.size.xl,marginBottom:8}))),epe.Text=N.div((({theme:e,primary:t,fontSize:n})=>({color:t?e.modal.color.header:e.modal.color.body,fontSize:n||e.font.size.lg}))),epe.Body=N.div((({height:e})=>({height:e,overflow:e?"auto":void 0})),Kt),epe.Footer=N.div((({justify:e="end",inline:t})=>({display:"flex",alignItems:"center",justifyContent:e?{start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between"}[e]:void 0,marginTop:t?void 0:8})),Kt);const tpe=N.div((({theme:e,width:t,height:n,backgroundColor:r,small:o})=>({display:"flex",flexDirection:o?"row":"column",alignItems:o?"center":void 0,backgroundColor:r||e.modal.background,boxShadow:e.elevation3,width:t||"max-content",height:n||"max-content",borderRadius:e.size.xs,padding:o?e.size.md:e.size.lg})),(({noOverlay:e})=>!e&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)"}),(({centerX:e,centerY:t})=>(e||t)&&{position:"absolute",top:t?"50%":void 0,left:e?"50%":void 0,transform:`translate(${e?"-50%":"0"}, ${t?"-50%":"0"})`}),Bt),npe=N.div({display:"flex",justifyContent:"center",alignItems:"center"},(({inline:e})=>e?{marginLeft:16}:{position:"absolute",top:8,right:8})),rpe=N.div((({color:e,blur:t,noOverlay:n,centerX:r,centerY:o,position:i,top:a,bottom:l,right:s,left:c,zIndex:u})=>({position:i||"absolute",top:a||(c||l||s?void 0:0),left:c||(a||l||s?void 0:0),bottom:l,right:s,width:n&&!r?void 0:"100%",height:n&&!o?void 0:"100%",zIndex:u||100,backgroundColor:n?void 0:e||"rgba(0, 0, 0, 0.2)",backdropFilter:"number"==typeof t&&`blur(${t}px)`||!0===t&&"blur(5px)"||"none"}))),ope=t.forwardRef(((o,i)=>{var{children:a,options:l,items:c,listLabel:u,listText:d,itemsTitle:f,maxItems:p,placeholder:h,width:g,filter:m,restrictInput:v,disabled:y,hideItemsInfo:b,optionsParent:w,compact:x,backgroundColor:C,borderless:S,addItem:k,removeItem:E,onTextChange:O,autoFocus:D}=o,j=s(o,["children","options","items","listLabel","listText","itemsTitle","maxItems","placeholder","width","filter","restrictInput","disabled","hideItemsInfo","optionsParent","compact","backgroundColor","borderless","addItem","removeItem","onTextChange","autoFocus"]);const[P,T]=t.useState(D||!1),[M,A]=t.useState(!1),[_,R]=t.useState(""),{color:L,font:I,input:N}=n.useTheme(),$=et((()=>T(!1)),P,w?[w,`${w} *`]:void 0),z=t.useRef(null),F=x&&!!u,B=e=>{e&&k(e)},K=()=>{const{current:e}=z;P||u||T(!0),null==e||e.focus()},V=()=>{const{current:e}=z;e&&e.blur()};t.useImperativeHandle(i,(()=>({focus:K,blur:V})));const H=e=>{R(e),O&&O(e)};t.useEffect((()=>{P||V()}),[P]);Qe(document,"keydown",(e=>{const{key:t,altKey:n,ctrlKey:r,metaKey:o}=e;if(!(n||r||o)&&t&&"Backspace"===t)if(c.length>0){e.preventDefault();const t=c[c.length-1];E(t)}}),P&&!_,[c]);const U=l.filter((e=>!c.find((t=>t.id===e.id)))),W=t.useMemo((()=>`multi-select-${jde()}`),[]),Z=t.useMemo((()=>`multi-select-list-${jde()}`),[]),q=p?c.length>=p:void 0,G=y||!P||q,Y=()=>{const t=e.jsxs(spe,{id:Z,expanded:P,padTop:P&&c.length>0,labeled:!!u,children:[d&&e.jsx(cpe,{expanded:P,labeled:!!u,children:d}),a?a(P,!!y):c.map((t=>e.jsx(ufe,{pill:!0,iconRight:P&&!y?e.jsx(Ut,{name:"close-circle",onClick:()=>E(t),pointer:!0}):void 0,disabled:y,children:t.label},t.id))),e.jsx(Ude,Object.assign({},j,{textOnly:!0,hideIcon:!0,clearOnSelect:!0,search:!0,filter:m,backgroundColor:"transparent",restrictInput:v,options:U,fontSize:I.size.md,placeholder:y||c.length>0?" ":h||"Search...",placeholderColor:N.color.placeholder,inputRef:z,onChange:B,onTextChange:H,onError:e=>A(e),disabled:G,optionsParent:w?`#${Z}`:`#${W}`,autoFocus:D}))]});if(w){const e=document.querySelector(w);return e?r.createPortal(t,e):t}return t};return e.jsxs(ipe,{width:g,ref:$,labeled:!!u,disabled:y,collapse:F,onClick:e=>{e.stopPropagation(),K()},children:[e.jsxs(ape,{collapse:F,id:W,expanded:P&&c.length>0,error:M,labeled:!!u,backgroundColor:C,borderless:S,children:[u?e.jsx(lpe,{collapse:F,children:u}):Y(),e.jsxs(upe,{children:[p&&!b&&e.jsx(fpe,{children:y&&f?e.jsxs(e.Fragment,{children:[c.length," ",f]}):e.jsxs(e.Fragment,{children:[e.jsx(dpe,{error:c.length>=p,children:c.length}),"/",p," ",f]})}),c.length>0&&e.jsx(Ut,{name:P?"chevron-up":"chevron-down",color:L.brand,pointer:!0,onClick:e=>{e.stopPropagation(),T(!P)}})]})]}),u&&P&&Y()]})})),ipe=N.div((({width:e,disabled:t,labeled:n,collapse:r})=>({width:e,minWidth:200,height:r?62:41,position:"relative",cursor:n||t?"default":"text"}))),ape=N.div((({theme:e,expanded:t,error:n,labeled:r,collapse:o,backgroundColor:i,borderless:a})=>({display:"grid",gridTemplateColumns:o?void 0:"1fr auto",alignItems:t&&!r?"flex-start":"center",columnGap:24,width:"100%",minHeight:41,position:"absolute",top:0,left:0,backgroundColor:i||e.background0,zIndex:t?1:void 0,borderBottom:n?`1px solid ${e.color.error}`:e.defaultBorder,border:a?"none":void 0,padding:"8px 16px"}))),lpe=N.div((({theme:e,collapse:t})=>({textAlign:t?void 0:"center",fontSize:e.font.size.md,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}))),spe=N.div((({theme:e,expanded:t,padTop:n})=>({display:"flex",alignItems:"center",width:"100%",overflow:t?void 0:"hidden",pointerEvents:t?void 0:"none",flexWrap:t?"wrap":void 0,paddingTop:n?1:void 0,columnGap:e.size.sm,rowGap:e.size.sm,"& > *":{flexShrink:0}})),(({theme:e,labeled:t,expanded:n})=>t&&n?{backgroundColor:e.background0,position:"absolute",top:"100%",zIndex:1,padding:"8px 0px",borderBottom:e.defaultBorder}:{})),cpe=N.div((({theme:e,expanded:t,labeled:n})=>({fontSize:e.font.size.sm,fontWeight:e.font.weight.medium,color:e.scale8,paddingLeft:t&&n?16:void 0}))),upe=N.div((({theme:{size:e}})=>({display:"flex",alignItems:"center",columnGap:e.sm,whiteSpace:"nowrap"}))),dpe=N.div((({theme:e,error:t})=>({color:t?e.color.error:e.scale8}))),fpe=N.div((({theme:e})=>({display:"flex",color:e.scale4,fontSize:e.font.size.sm}))),ppe=e=>e?+e:0,hpe=N.nav({display:"flex",justifyContent:"space-between",alignItems:"center",columnGap:4},(({width:e})=>({width:e||"max-content"})),Kt),gpe=N.button((({theme:e,disabled:t})=>({border:"none",borderRadius:e.size.xs,backgroundColor:"transparent","&:hover":{backgroundColor:t?void 0:e.scale1,color:t?void 0:e.scale10},"&:focus-visible":{outline:`${e.accent} solid 1px`,outlineOffset:-1}}))),mpe=N(gpe)((({theme:e,disabled:t})=>({color:t?e.scale4:e.scale8,cursor:t?"default":"pointer"}))),vpe=N(gpe)((({theme:e,selected:t})=>({color:t?e.scale10:e.scale6,backgroundColor:t?e.scale0:void 0,fontSize:e.font.size.sm,cursor:"pointer",width:"max-content",minWidth:e.size.lg,height:e.size.lg,padding:0}))),ype=N.span((({theme:e})=>({color:e.scale6}))),bpe=({percent:t,size:n=24,thickness:r=2,color:o,margin:i,marginTop:a,marginBottom:l,marginRight:s,marginLeft:c})=>{const u={margin:i,marginTop:a,marginBottom:l,marginRight:s,marginLeft:c},d=(n-r)/2,f=d*Math.PI*2,p=f-f*t/100,h=n/2;return e.jsxs(wpe,Object.assign({size:n},u,{children:[e.jsx(xpe,{cx:h,cy:h,r:d,thickness:r}),e.jsx(Cpe,{color:o,cx:h,cy:h,r:d,thickness:r,transform:`rotate(-90 ${h} ${h})`,circ:f,complete:p})]}))},wpe=N.svg((({size:e})=>({display:"block",width:e,height:e})),Kt),xpe=N.circle((({theme:e,thickness:t})=>({fill:"none",stroke:e.scale1,strokeWidth:t}))),Cpe=N(xpe)((({theme:e,color:t,circ:n,complete:r})=>({stroke:t||e.color.brand,strokeDasharray:n,strokeDashoffset:r,transition:"stroke-dashoffset 0.5s"}))),Spe=N.div((({theme:e,width:t,height:n})=>({backgroundColor:e.scale1,borderRadius:24,width:t||"100%",height:n,overflow:"hidden"})),Kt),kpe=N.div((({theme:e,color:t,width:n})=>({backgroundColor:t||e.color.brand,width:`${n}%`,height:"100%",transition:"width 0.5s"}))),Epe=N.div(Ft),Ope=e=>"number"==typeof e?e:"string"==typeof e?parseInt(e.replace("px",""),10):0,Dpe=e=>{const t={top:0,right:0,bottom:0,left:0},{padding:n,paddingTop:r,paddingRight:o,paddingBottom:i,paddingLeft:a}=e;if(n){const e=("string"==typeof n?n:n.toString()).split(" ").map(Ope);switch(e.length){case 1:t.top=t.right=t.bottom=t.left=e[0];break;case 2:t.top=t.bottom=e[0],t.right=t.left=e[1];break;case 3:t.top=e[0],t.right=t.left=e[1],t.bottom=e[2];break;case 4:t.top=e[0],t.right=e[1],t.bottom=e[2],t.left=e[3]}}return void 0!==r&&(t.top=Ope(r)),void 0!==o&&(t.right=Ope(o)),void 0!==i&&(t.bottom=Ope(i)),void 0!==a&&(t.left=Ope(a)),t},jpe=t.createContext({}),Ppe=n=>{var{children:r,onClick:o,disabled:i,padding:a,paddingTop:l,paddingRight:c,paddingBottom:u,paddingLeft:d}=n,f=s(n,["children","onClick","disabled","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);const{setRowPadding:p}=t.useContext(jpe);return t.useEffect((()=>{if((a||l||c||u||d)&&p){const e=Dpe({padding:a,paddingTop:l,paddingRight:c,paddingBottom:u,paddingLeft:d});p(e)}}),[a,l,c,u,d,p]),e.jsx(Tpe,Object.assign({isDisabled:i,onAction:o&&!i?o:void 0,hoverEffect:!!o&&!i},f,{children:r}))},Tpe=N(px)((({theme:e,backgroundColor:t,isDisabled:n})=>({color:e.table.color.body,fontSize:e.font.size.sm,wordBreak:"break-word",opacity:n?.3:void 0,backgroundColor:t,outline:"none",transition:"background-color 0.2s",position:"relative"})),(({theme:e,hoverEffect:t})=>t&&{"&:hover":{backgroundColor:e.scale1,cursor:"pointer"},"&:focus-visible":{backgroundColor:e.scale1}}),(({theme:e,emphasis:t})=>{let n;return!0===t?n=e.color.brand:"string"==typeof t&&(n=t),{height:"100%","& > td:first-of-type > div":{borderLeft:"2px solid transparent",borderLeftColor:n},"&:not(:first-of-type) > td > div":{borderTop:`1px solid ${e.table.borderColor}`},"&.fetching-row":{borderTop:`1px solid ${e.table.borderColor}`,"& > td > div":{borderTop:"none"}}}}),(({height:e})=>({height:e}))),Mpe=({spinnerSize:t})=>{const n="small"===t;return e.jsx(Ppe,{height:n?49:57,className:n?"fetching-row":void 0,children:e.jsx(Ape,{children:e.jsx(Xx,{size:t,center:!0})})})},Ape=N(hx)((({theme:e})=>({color:e.scale6}))),_pe=N(fx)((({theme:e})=>({"&[data-empty]":{textAlign:"center",color:e.table.color.body,fontSize:e.font.size.sm,"& > tr:first-of-type > td:first-of-type":{paddingTop:16}}}))),Rpe=e=>{if(e)return"start"===e||"end"===e?`flex-${e}`:e},Lpe=[({direction:e,justify:t,align:n="center",gap:r=8})=>({display:"flex",justifyContent:Rpe(t),alignItems:Rpe(n),flexDirection:e,width:"100%",height:"100%",gap:r}),Bt],Ipe=N(hx)((({theme:e})=>({padding:0,outline:"none",outlineOffset:-1,"&:focus-visible":{outline:`${e.accent} solid 1px`}})),(({padding:e,paddingTop:t,paddingBottom:n,paddingRight:r,paddingLeft:o,parentPadding:i})=>{var a,l,s,c;const{top:u,right:d,bottom:f,left:p}=i||{};return{"& > div":{paddingTop:null!==(a=null!=t?t:u)&&void 0!==a?a:16,paddingBottom:null!==(l=null!=n?n:f)&&void 0!==l?l:16,paddingLeft:o,paddingRight:r,padding:e},"&:first-of-type > div":{paddingLeft:null!==(s=null!=o?o:void 0!==p?p-2:void 0)&&void 0!==s?s:24},"&:last-of-type > div":{paddingRight:null!==(c=null!=r?r:d)&&void 0!==c?c:24}}})),Npe=N.div(Lpe,(({showDefault:e})=>e&&{"& > *":{opacity:.3}})),$pe=N(dx)((({theme:e})=>({width:9,height:18,backgroundColor:e.scale4,marginLeft:"auto",backgroundClip:"content-box",border:"4px transparent",borderStyle:"none solid","&[data-resizable-direction=both]":{cursor:"col-resize"},"&[data-resizable-direction=left]":{cursor:"e-resize"},"&[data-resizable-direction=right]":{cursor:"w-resize"},"&[data-focus-visible]":{backgroundColor:e.accent}}))),zpe=({sortDirection:t})=>{const{color:r,scale4:o}=n.useTheme(),i="asc"===t?r.brand:o,a="desc"===t?r.brand:o;return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M8.71005 14.71L11.3001 17.3C11.6901 17.69 12.3201 17.69 12.7101 17.3L15.3001 14.71C15.9301 14.08 15.4801 13 14.5901 13H9.41005C8.52005 13 8.08005 14.08 8.71005 14.71Z",fill:a}),e.jsx("path",{d:"M8.71005 8.88253L11.3001 6.29253C11.6901 5.90253 12.3201 5.90253 12.7101 6.29253L15.3001 8.88253C15.9301 9.51253 15.4801 10.5925 14.5901 10.5925H9.41005C8.52005 10.5925 8.08005 9.51253 8.71005 8.88253Z",fill:i})]})},Fpe=N(sx)((({theme:e,maxWidth:t})=>{const n=t?`${"number"==typeof t?`${t}px`:t} !important`:void 0;return{textAlign:"left",verticalAlign:"middle",color:e.table.color.header,fontSize:e.font.size.sm,fontWeight:e.font.weight.medium,padding:0,outline:"none",outlineOffset:-1,maxWidth:t?n:void 0,"&:focus-visible":{outline:`${e.accent} solid 1px`}}}),(({theme:e,padding:t,paddingTop:n,paddingBottom:r,paddingRight:o,paddingLeft:i,parentPadding:a})=>{var l,s,c,u;return{"& > div":{paddingTop:null!==(l=null!=n?n:null==a?void 0:a.top)&&void 0!==l?l:8,paddingBottom:null!==(s=null!=r?r:null==a?void 0:a.bottom)&&void 0!==s?s:8,paddingLeft:i,paddingRight:o,padding:t,borderBottom:`1px solid ${e.table.borderColor}`},"&:first-of-type > div":{paddingLeft:null!==(c=null!=i?i:null==a?void 0:a.left)&&void 0!==c?c:24},"&:last-of-type > div":{paddingRight:null!==(u=null!=o?o:null==a?void 0:a.right)&&void 0!==u?u:24}}})),Bpe=N.div(Lpe,(({theme:e,sorting:t,active:n})=>({"& > div:first-of-type, & > span":{cursor:t?"pointer":void 0,color:n?e.scale10:e.table.color.header,"&:hover":{color:t?e.scale8:void 0}}}))),Kpe=N(ax)((({theme:e,backgroundColor:t})=>({position:"sticky",top:0,zIndex:1,"& > tr > th":{backgroundColor:t||e.background0}}))),Vpe=n=>{var{children:r,data:o,onScrollEnd:i,backgroundColor:a,maxHeight:l}=n,c=s(n,["children","data","onScrollEnd","backgroundColor","maxHeight"]);const[u,d]=t.useState(o),[f,p]=t.useState(),[h,g]=t.useState(),[m,v]=t.useState(),y=o&&"function"==typeof r?r(u):r;t.useEffect((()=>{if(o){let e=o;if(f){const{key:t,dir:n}=f;e=tde(o,[t],[n])}Mt(e,u)||d(e)}}),[o,f]);const b=t.useMemo((()=>({activeColumn:f,setActiveColumn:p,backgroundColor:a,headerPadding:h,rowPadding:m,setHeaderPadding:g,setRowPadding:v})),[f,p,a,h,m,g,v]);return e.jsx(jpe.Provider,{value:b,children:e.jsx(Hpe,{onScroll:i?e=>{const t=e.target,{scrollHeight:n,scrollTop:r,clientHeight:o}=t;n-r===o&&i&&i()}:void 0,backgroundColor:a,maxHeight:l,children:e.jsx(Upe,Object.assign({},c,{children:y}))})})};Vpe.Header=({children:n,backgroundColor:r,padding:o,paddingTop:i,paddingRight:a,paddingBottom:l,paddingLeft:s})=>{const{backgroundColor:c,setHeaderPadding:u}=t.useContext(jpe);return t.useEffect((()=>{if((o||i||a||l||s)&&u){const e=Dpe({padding:o,paddingTop:i,paddingRight:a,paddingBottom:l,paddingLeft:s});u(e)}}),[o,i,a,l,s,u]),e.jsx(Kpe,{backgroundColor:r||c,children:n})},Vpe.Column=n=>{var{children:r,sortKey:o,sorted:i,onClick:a,resize:l,direction:c,justify:u,align:d,gap:f}=n,p=s(n,["children","sortKey","sorted","onClick","resize","direction","justify","align","gap"]);const[h,g]=t.useState(i||"inactive"),{activeColumn:m,setActiveColumn:v,headerPadding:y}=t.useContext(jpe),b=o||i,w="asc"===h||"desc"===h,x={direction:c,justify:u,align:d,gap:f},C=e=>{if(g(e),v&&o){v("inactive"===e?void 0:{key:o,dir:e})}};t.useEffect((()=>{!o||"asc"!==i&&"desc"!==i||C(i)}),[]),t.useEffect((()=>{i&&g(i)}),[i]),t.useEffect((()=>{const e=!m&&i;o&&m&&m.key!==o&&"inactive"!==h&&!e&&g("inactive")}),[m,h]);const S=b||a?e=>{o?C("inactive"===h?"asc":"asc"===h?"desc":"inactive"):a&&a(e)}:void 0;return e.jsx(Fpe,Object.assign({parentPadding:y},p,{children:e.jsxs(Bpe,Object.assign({sorting:!!b,active:w},x,{children:["string"==typeof r?e.jsx(afe,{onClick:S,children:r}):r,b&&e.jsx("span",{"aria-hidden":"true",onClick:S,children:e.jsx(Ut,{svg:e.jsx(zpe,{sortDirection:h}),marginLeft:-8})}),l&&e.jsx($pe,{})]}))}))},Vpe.Body=({children:t,emptyFallback:n,fetching:r,loading:o})=>e.jsxs(_pe,{renderEmptyState:({isEmpty:e})=>e&&n?n:null,children:[o&&e.jsx(Mpe,{}),!o&&t,r&&e.jsx(Mpe,{spinnerSize:"small"})]}),Vpe.Row=Ppe,Vpe.Cell=n=>{var{children:r,defaultValue:o,direction:i,justify:a,align:l,gap:c,clampLines:u}=n,d=s(n,["children","defaultValue","direction","justify","align","gap","clampLines"]);const{rowPadding:f}=t.useContext(jpe),p={direction:i,justify:a,align:l,gap:c},h=r||o;return e.jsx(Ipe,Object.assign({parentPadding:f},d,{children:e.jsx(Npe,Object.assign({showDefault:!!o&&!r},p,{children:"string"==typeof h?e.jsx(afe,{paddingRight:2,clampLines:u,children:h}):h}))}))};const Hpe=N(Xw)((({theme:e,backgroundColor:t,maxHeight:n})=>({overflow:"auto",position:"relative",width:"100%",maxHeight:n||"100%",borderRadius:4,backgroundColor:t||e.background0}))),Upe=N(rx)({height:"fit-content"},Kt,Bt),Wpe=N.div((({gap:e=8})=>({display:"flex",gap:e})),Kt),Zpe=N.div((({theme:e,active:t,itemWidth:n="fill",reverse:r,gap:o})=>({display:"flex",flexDirection:r?"row-reverse":"row",justifyContent:"center",alignItems:"center",gap:o,padding:"8px 16px",width:"fit"===n?"max-content":"100%",borderRadius:8,background:t?e.scale1:"transparent",border:"1px solid",borderColor:t?"transparent":e.scale0,color:t?e.scale10:e.scale6,fontSize:e.font.size.md,fontWeight:e.font.weight.medium,cursor:"pointer"})));var qpe,Gpe="dismissableLayer.update",Ype="dismissableLayer.pointerDownOutside",Xpe="dismissableLayer.focusOutside",Jpe=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qpe=i.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:s,onDismiss:c,...u}=t,d=i.useContext(Jpe),[f,p]=i.useState(null),h=f?.ownerDocument??globalThis?.document,[,g]=i.useState({}),m=B(n,(e=>p(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),w=f?v.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,C=w>=b,S=function(e,t=globalThis?.document){const n=q(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){the(Ype,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));C&&!n&&(a?.(e),s?.(e),e.defaultPrevented||c?.())}),h),k=function(e,t=globalThis?.document){const n=q(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){the(Xpe,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(l?.(e),s?.(e),e.defaultPrevented||c?.())}),h);return function(e,t=globalThis?.document){const n=q(e);i.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{w===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),i.useEffect((()=>{if(f)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(qpe=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),ehe(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=qpe)}}),[f,h,r,d]),i.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),ehe())}),[f,d]),i.useEffect((()=>{const e=()=>g({});return document.addEventListener(Gpe,e),()=>document.removeEventListener(Gpe,e)}),[]),e.jsx(Y.div,{...u,ref:m,style:{pointerEvents:x?C?"auto":"none":void 0,...t.style},onFocusCapture:Z(t.onFocusCapture,k.onFocusCapture),onBlurCapture:Z(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Z(t.onPointerDownCapture,S.onPointerDownCapture)})}));Qpe.displayName="DismissableLayer";function ehe(){const e=new CustomEvent(Gpe);document.dispatchEvent(e)}function the(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&a.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}i.forwardRef(((t,n)=>{const r=i.useContext(Jpe),o=i.useRef(null),a=B(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),e.jsx(Y.div,{...t,ref:a})})).displayName="DismissableLayerBranch";const nhe=["top","right","bottom","left"],rhe=Math.min,ohe=Math.max,ihe=Math.round,ahe=Math.floor,lhe=e=>({x:e,y:e}),she={left:"right",right:"left",bottom:"top",top:"bottom"},che={start:"end",end:"start"};function uhe(e,t,n){return ohe(e,rhe(t,n))}function dhe(e,t){return"function"==typeof e?e(t):e}function fhe(e){return e.split("-")[0]}function phe(e){return e.split("-")[1]}function hhe(e){return"x"===e?"y":"x"}function ghe(e){return"y"===e?"height":"width"}function mhe(e){return["top","bottom"].includes(fhe(e))?"y":"x"}function vhe(e){return hhe(mhe(e))}function yhe(e){return e.replace(/start|end/g,(e=>che[e]))}function bhe(e){return e.replace(/left|right|bottom|top/g,(e=>she[e]))}function whe(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function xhe(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Che(e,t,n){let{reference:r,floating:o}=e;const i=mhe(t),a=vhe(t),l=ghe(a),s=fhe(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(phe(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function She(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=dhe(t,e),h=whe(p),g=l[f?"floating"===d?"reference":"floating":d],m=xhe(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=xhe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:y,strategy:s}):v);return{top:(m.top-w.top+h.top)/b.y,bottom:(w.bottom-m.bottom+h.bottom)/b.y,left:(m.left-w.left+h.left)/b.x,right:(w.right-m.right+h.right)/b.x}}function khe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ehe(e){return nhe.some((t=>e[t]>=0))}function Ohe(e){return Phe(e)?(e.nodeName||"").toLowerCase():"#document"}function Dhe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function jhe(e){var t;return null==(t=(Phe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Phe(e){return e instanceof Node||e instanceof Dhe(e).Node}function The(e){return e instanceof Element||e instanceof Dhe(e).Element}function Mhe(e){return e instanceof HTMLElement||e instanceof Dhe(e).HTMLElement}function Ahe(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Dhe(e).ShadowRoot)}function _he(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=zhe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Rhe(e){return["table","td","th"].includes(Ohe(e))}function Lhe(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ihe(e){const t=Nhe(),n=The(e)?zhe(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Nhe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $he(e){return["html","body","#document"].includes(Ohe(e))}function zhe(e){return Dhe(e).getComputedStyle(e)}function Fhe(e){return The(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bhe(e){if("html"===Ohe(e))return e;const t=e.assignedSlot||e.parentNode||Ahe(e)&&e.host||jhe(e);return Ahe(t)?t.host:t}function Khe(e){const t=Bhe(e);return $he(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mhe(t)&&_he(t)?t:Khe(t)}function Vhe(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Khe(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Dhe(o);return i?t.concat(a,a.visualViewport||[],_he(o)?o:[],a.frameElement&&n?Vhe(a.frameElement):[]):t.concat(o,Vhe(o,[],n))}function Hhe(e){const t=zhe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Mhe(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=ihe(n)!==i||ihe(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Uhe(e){return The(e)?e:e.contextElement}function Whe(e){const t=Uhe(e);if(!Mhe(t))return lhe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Hhe(t);let a=(i?ihe(n.width):n.width)/r,l=(i?ihe(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Zhe=lhe(0);function qhe(e){const t=Dhe(e);return Nhe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Zhe}function Ghe(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Uhe(e);let a=lhe(1);t&&(r?The(r)&&(a=Whe(r)):a=Whe(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Dhe(e))&&t}(i,n,r)?qhe(i):lhe(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Dhe(i),t=r&&The(r)?Dhe(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=Whe(o),t=o.getBoundingClientRect(),r=zhe(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=a,n=Dhe(o),o=n.frameElement}}return xhe({width:u,height:d,x:s,y:c})}function Yhe(e){return Ghe(jhe(e)).left+Fhe(e).scrollLeft}function Xhe(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Dhe(e),r=jhe(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=Nhe();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=jhe(e),n=Fhe(e),r=e.ownerDocument.body,o=ohe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ohe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Yhe(e);const l=-n.scrollTop;return"rtl"===zhe(r).direction&&(a+=ohe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(jhe(e));else if(The(t))r=function(e,t){const n=Ghe(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Mhe(e)?Whe(e):lhe(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=qhe(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return xhe(r)}function Jhe(e,t){const n=Bhe(e);return!(n===t||!The(n)||$he(n))&&("fixed"===zhe(n).position||Jhe(n,t))}function Qhe(e,t,n){const r=Mhe(t),o=jhe(t),i="fixed"===n,a=Ghe(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=lhe(0);if(r||!r&&!i)if(("body"!==Ohe(t)||_he(o))&&(l=Fhe(t)),r){const e=Ghe(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=Yhe(o));return{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function ege(e){return"static"===zhe(e).position}function tge(e,t){return Mhe(e)&&"fixed"!==zhe(e).position?t?t(e):e.offsetParent:null}function nge(e,t){const n=Dhe(e);if(Lhe(e))return n;if(!Mhe(e)){let t=Bhe(e);for(;t&&!$he(t);){if(The(t)&&!ege(t))return t;t=Bhe(t)}return n}let r=tge(e,t);for(;r&&Rhe(r)&&ege(r);)r=tge(r,t);return r&&$he(r)&&ege(r)&&!Ihe(r)?n:r||function(e){let t=Bhe(e);for(;Mhe(t)&&!$he(t);){if(Ihe(t))return t;if(Lhe(t))return null;t=Bhe(t)}return null}(e)||n}const rge={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=jhe(r),l=!!t&&Lhe(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=lhe(1);const u=lhe(0),d=Mhe(r);if((d||!d&&!i)&&(("body"!==Ohe(r)||_he(a))&&(s=Fhe(r)),Mhe(r))){const e=Ghe(r);c=Whe(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x,y:n.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:jhe,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Lhe(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Vhe(e,[],!1).filter((e=>The(e)&&"body"!==Ohe(e))),o=null;const i="fixed"===zhe(e).position;let a=i?Bhe(e):e;for(;The(a)&&!$he(a);){const t=zhe(a),n=Ihe(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||_he(a)&&!n&&Jhe(e,a))?r=r.filter((e=>e!==a)):o=t,a=Bhe(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],l=i.reduce(((e,n)=>{const r=Xhe(t,n,o);return e.top=ohe(r.top,e.top),e.right=rhe(r.right,e.right),e.bottom=rhe(r.bottom,e.bottom),e.left=ohe(r.left,e.left),e}),Xhe(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:nge,getElementRects:async function(e){const t=this.getOffsetParent||nge,n=this.getDimensions,r=await n(e.floating);return{reference:Qhe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Hhe(e);return{width:t,height:n}},getScale:Whe,isElement:The,isRTL:function(e){return"rtl"===zhe(e).direction}};function oge(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=Uhe(e),u=o||i?[...c?Vhe(c):[],...Vhe(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&l?function(e,t){let n,r=null;const o=jhe(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-ahe(u)+"px "+-ahe(o.clientWidth-(c+d))+"px "+-ahe(o.clientHeight-(u+f))+"px "+-ahe(c)+"px",threshold:ohe(0,rhe(1,s))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!s&&h.observe(c),h.observe(t));let g=s?Ghe(e):null;return s&&function t(){const r=Ghe(e);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n();g=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(f)}}const ige=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=fhe(n),l=phe(n),s="y"===mhe(n),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,d=dhe(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},age=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=dhe(e,t),c={x:n,y:r},u=await She(t,s),d=mhe(fhe(o)),f=hhe(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=uhe(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=uhe(h+u["y"===d?"top":"left"],h,h-u[e])}const g=l.fn({...t,[f]:p,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r}}}}},lge=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=dhe(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=fhe(o),y=mhe(l),b=fhe(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=f||(b||!g?[bhe(l)]:function(e){const t=bhe(e);return[yhe(e),t,yhe(t)]}(l)),C="none"!==h;!f&&C&&x.push(...function(e,t,n,r){const o=phe(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(fhe(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(yhe)))),i}(l,g,h,w));const S=[l,...x],k=await She(t,m),E=[];let O=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&E.push(k[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=phe(e),o=vhe(e),i=ghe(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=bhe(a)),[a,bhe(a)]}(o,a,w);E.push(k[e[0]],k[e[1]])}if(O=[...O,{placement:o,overflows:E}],!E.every((e=>e<=0))){var D,j;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n=null==(j=O.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:j.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=O.filter((e=>{if(C){const t=mhe(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},sge=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=(()=>{}),...l}=dhe(e,t),s=await She(t,l),c=fhe(n),u=phe(n),d="y"===mhe(n),{width:f,height:p}=r.floating;let h,g;"top"===c||"bottom"===c?(h=c,g=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,h="end"===u?"top":"bottom");const m=p-s.top-s.bottom,v=f-s.left-s.right,y=rhe(p-s[h],m),b=rhe(f-s[g],v),w=!t.middlewareData.shift;let x=y,C=b;if(d?C=u||w?rhe(b,v):v:x=u||w?rhe(y,m):m,w&&!u){const e=ohe(s.left,0),t=ohe(s.right,0),n=ohe(s.top,0),r=ohe(s.bottom,0);d?C=f-2*(0!==e||0!==t?e+t:ohe(s.left,s.right)):x=p-2*(0!==n||0!==r?n+r:ohe(s.top,s.bottom))}await a({...t,availableWidth:C,availableHeight:x});const S=await o.getDimensions(i.floating);return f!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}},cge=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=dhe(e,t);switch(r){case"referenceHidden":{const e=khe(await She(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ehe(e)}}}case"escaped":{const e=khe(await She(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ehe(e)}}}default:return{}}}}},uge=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=dhe(e,t)||{};if(null==c)return{};const d=whe(u),f={x:n,y:r},p=vhe(o),h=ghe(p),g=await a.getDimensions(c),m="y"===p,v=m?"top":"left",y=m?"bottom":"right",b=m?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-f[p]-i.floating[h],x=f[p]-i.reference[p],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=C?C[b]:0;S&&await(null==a.isElement?void 0:a.isElement(C))||(S=l.floating[b]||i.floating[h]);const k=w/2-x/2,E=S/2-g[h]/2-1,O=rhe(d[v],E),D=rhe(d[y],E),j=O,P=S-g[h]-D,T=S/2-g[h]/2+k,M=uhe(j,T,P),A=!s.arrow&&null!=phe(o)&&T!==M&&i.reference[h]/2-(T<j?O:D)-g[h]/2<0,_=A?T<j?T-j:T-P:0;return{[p]:f[p]+_,data:{[p]:M,centerOffset:T-M-_,...A&&{alignmentOffset:_}},reset:A}}}),dge=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=dhe(e,t),u={x:n,y:r},d=mhe(o),f=hhe(d);let p=u[f],h=u[d];const g=dhe(l,t),m="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+m.mainAxis,n=i.reference[f]+i.reference[e]-m.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,y;const e="y"===f?"width":"height",t=["top","left"].includes(fhe(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:m.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?m.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},fge=(e,t,n)=>{const r=new Map,o={platform:rge,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Che(c,r,s),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:i,fn:g}=l[n],{x:m,y:v,data:y,reset:b}=await g({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=m?m:u,d=null!=v?v:d,p={...p,[i]:{...p[i],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Che(c,f,s))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var pge="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function hge(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!hge(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!hge(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function gge(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mge(e,t){const n=gge(e);return Math.round(t*n)/n}function vge(e){const t=i.useRef(e);return pge((()=>{t.current=e})),t}const yge=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?uge({element:n.current,padding:r}).fn(t):{}:n?uge({element:n,padding:r}).fn(t):{};var o}}),bge=(e,t)=>({...ige(e),options:[e,t]}),wge=(e,t)=>({...age(e),options:[e,t]}),xge=(e,t)=>({...dge(e),options:[e,t]}),Cge=(e,t)=>({...lge(e),options:[e,t]}),Sge=(e,t)=>({...sge(e),options:[e,t]}),kge=(e,t)=>({...cge(e),options:[e,t]}),Ege=(e,t)=>({...yge(e),options:[e,t]});var Oge=i.forwardRef(((t,n)=>{const{children:r,width:o=10,height:i=5,...a}=t;return e.jsx(Y.svg,{...a,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Oge.displayName="Arrow";var Dge=Oge;var jge="Popper",[Pge,Tge]=$(jge),[Mge,Age]=Pge(jge),_ge=t=>{const{__scopePopper:n,children:r}=t,[o,a]=i.useState(null);return e.jsx(Mge,{scope:n,anchor:o,onAnchorChange:a,children:r})};_ge.displayName=jge;var Rge="PopperAnchor",Lge=i.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...a}=t,l=Age(Rge,r),s=i.useRef(null),c=B(n,s);return i.useEffect((()=>{l.onAnchorChange(o?.current||s.current)})),o?null:e.jsx(Y.div,{...a,ref:c})}));Lge.displayName=Rge;var Ige="PopperContent",[Nge,$ge]=Pge(Ige),zge=i.forwardRef(((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:l=0,align:s="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:v,...y}=t,b=Age(Ige,r),[w,x]=i.useState(null),C=B(n,(e=>x(e))),[S,k]=i.useState(null),E=function(e){const[t,n]=i.useState(void 0);return X((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(S),O=E?.width??0,D=E?.height??0,j=o+("center"!==s?"-"+s:""),P="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},T=Array.isArray(f)?f:[f],M=T.length>0,A={padding:P,boundary:T.filter(Vge),altBoundary:M},{refs:_,floatingStyles:R,placement:L,isPositioned:I,middlewareData:N}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:s}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=i.useState(r);hge(h,r)||g(r);const[m,v]=i.useState(null),[y,b]=i.useState(null),w=i.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),x=i.useCallback((e=>{e!==E.current&&(E.current=e,b(e))}),[]),C=l||m,S=s||y,k=i.useRef(null),E=i.useRef(null),O=i.useRef(f),D=null!=u,j=vge(u),P=vge(o),T=i.useCallback((()=>{if(!k.current||!E.current)return;const e={placement:t,strategy:n,middleware:h};P.current&&(e.platform=P.current),fge(k.current,E.current,e).then((e=>{const t={...e,isPositioned:!0};M.current&&!hge(O.current,t)&&(O.current=t,a.flushSync((()=>{p(t)})))}))}),[h,t,n,P]);pge((()=>{!1===d&&O.current.isPositioned&&(O.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const M=i.useRef(!1);pge((()=>(M.current=!0,()=>{M.current=!1})),[]),pge((()=>{if(C&&(k.current=C),S&&(E.current=S),C&&S){if(j.current)return j.current(C,S,T);T()}}),[C,S,T,j,D]);const A=i.useMemo((()=>({reference:k,floating:E,setReference:w,setFloating:x})),[w,x]),_=i.useMemo((()=>({reference:C,floating:S})),[C,S]),R=i.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=mge(_.floating,f.x),r=mge(_.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...gge(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,_.floating,f.x,f.y]);return i.useMemo((()=>({...f,update:T,refs:A,elements:_,floatingStyles:R})),[f,T,A,_,R])}({strategy:"fixed",placement:j,whileElementsMounted:(...e)=>oge(...e,{animationFrame:"always"===m}),elements:{reference:b.anchor},middleware:[bge({mainAxis:l+D,alignmentAxis:c}),d&&wge({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?xge():void 0,...A}),d&&Cge({...A}),Sge({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),S&&Ege({element:S,padding:u}),Hge({arrowWidth:O,arrowHeight:D}),g&&kge({strategy:"referenceHidden",...A})]}),[$,z]=Uge(L),F=q(v);X((()=>{I&&F?.()}),[I,F]);const K=N.arrow?.x,V=N.arrow?.y,H=0!==N.arrow?.centerOffset,[U,W]=i.useState();return X((()=>{w&&W(window.getComputedStyle(w).zIndex)}),[w]),e.jsx("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:I?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx(Nge,{scope:r,placedSide:$,onArrowChange:k,arrowX:K,arrowY:V,shouldHideArrow:H,children:e.jsx(Y.div,{"data-side":$,"data-align":z,...y,ref:C,style:{...y.style,animation:I?void 0:"none"}})})})}));zge.displayName=Ige;var Fge="PopperArrow",Bge={top:"bottom",right:"left",bottom:"top",left:"right"},Kge=i.forwardRef((function(t,n){const{__scopePopper:r,...o}=t,i=$ge(Fge,r),a=Bge[i.placedSide];return e.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:e.jsx(Dge,{...o,ref:n,style:{...o.style,display:"block"}})})}));function Vge(e){return null!==e}Kge.displayName=Fge;var Hge=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[s,c]=Uge(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let p="",h="";return"bottom"===s?(p=i?u:`${d}px`,h=-l+"px"):"top"===s?(p=i?u:`${d}px`,h=`${r.floating.height+l}px`):"right"===s?(p=-l+"px",h=i?u:`${f}px`):"left"===s&&(p=`${r.floating.width+l}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}});function Uge(e){const[t,n="center"]=e.split("-");return[t,n]}var Wge=_ge,Zge=Lge,qge=zge,Gge=Kge,Yge=i.forwardRef(((t,n)=>{const{container:o,...a}=t,[l,s]=i.useState(!1);X((()=>s(!0)),[]);const c=o||l&&globalThis?.document?.body;return c?r.createPortal(e.jsx(Y.div,{...a,ref:n}),c):null}));Yge.displayName="Portal";var Xge=i.forwardRef(((t,n)=>e.jsx(Y.span,{...t,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}})));Xge.displayName="VisuallyHidden";var Jge=Xge,[Qge,eme]=$("Tooltip",[Tge]),tme=Tge(),nme="TooltipProvider",rme=700,ome="tooltip.open",[ime,ame]=Qge(nme),lme=t=>{const{__scopeTooltip:n,delayDuration:r=rme,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:l}=t,[s,c]=i.useState(!0),u=i.useRef(!1),d=i.useRef(0);return i.useEffect((()=>{const e=d.current;return()=>window.clearTimeout(e)}),[]),e.jsx(ime,{scope:n,isOpenDelayed:s,delayDuration:r,onOpen:i.useCallback((()=>{window.clearTimeout(d.current),c(!1)}),[]),onClose:i.useCallback((()=>{window.clearTimeout(d.current),d.current=window.setTimeout((()=>c(!0)),o)}),[o]),isPointerInTransitRef:u,onPointerInTransitChange:i.useCallback((e=>{u.current=e}),[]),disableHoverableContent:a,children:l})};lme.displayName=nme;var sme="Tooltip",[cme,ume]=Qge(sme),dme=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:a=!1,onOpenChange:l,disableHoverableContent:s,delayDuration:c}=t,u=ame(sme,t.__scopeTooltip),d=tme(n),[f,p]=i.useState(null),h=ne(),g=i.useRef(0),m=s??u.disableHoverableContent,v=c??u.delayDuration,y=i.useRef(!1),[b=!1,w]=G({prop:o,defaultProp:a,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(ome))):u.onClose(),l?.(e)}}),x=i.useMemo((()=>b?y.current?"delayed-open":"instant-open":"closed"),[b]),C=i.useCallback((()=>{window.clearTimeout(g.current),y.current=!1,w(!0)}),[w]),S=i.useCallback((()=>{window.clearTimeout(g.current),w(!1)}),[w]),k=i.useCallback((()=>{window.clearTimeout(g.current),g.current=window.setTimeout((()=>{y.current=!0,w(!0)}),v)}),[v,w]);return i.useEffect((()=>()=>window.clearTimeout(g.current)),[]),e.jsx(Wge,{...d,children:e.jsx(cme,{scope:n,contentId:h,open:b,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:i.useCallback((()=>{u.isOpenDelayed?k():C()}),[u.isOpenDelayed,k,C]),onTriggerLeave:i.useCallback((()=>{m?S():window.clearTimeout(g.current)}),[S,m]),onOpen:C,onClose:S,disableHoverableContent:m,children:r})})};dme.displayName=sme;var fme="TooltipTrigger",pme=i.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,a=ume(fme,r),l=ame(fme,r),s=tme(r),c=B(n,i.useRef(null),a.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback((()=>u.current=!1),[]);return i.useEffect((()=>()=>document.removeEventListener("pointerup",f)),[f]),e.jsx(Zge,{asChild:!0,...s,children:e.jsx(Y.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:c,onPointerMove:Z(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(d.current||l.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))})),onPointerLeave:Z(t.onPointerLeave,(()=>{a.onTriggerLeave(),d.current=!1})),onPointerDown:Z(t.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})})),onFocus:Z(t.onFocus,(()=>{u.current||a.onOpen()})),onBlur:Z(t.onBlur,a.onClose),onClick:Z(t.onClick,a.onClose)})})}));pme.displayName=fme;var hme="TooltipPortal",[gme,mme]=Qge(hme,{forceMount:void 0}),vme=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=t,a=ume(hme,n);return e.jsx(gme,{scope:n,forceMount:r,children:e.jsx(J,{present:r||a.open,children:e.jsx(Yge,{asChild:!0,container:i,children:o})})})};vme.displayName=hme;var yme="TooltipContent",bme=i.forwardRef(((t,n)=>{const r=mme(yme,t.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...a}=t,l=ume(yme,t.__scopeTooltip);return e.jsx(J,{present:o||l.open,children:l.disableHoverableContent?e.jsx(Sme,{side:i,...a,ref:n}):e.jsx(wme,{side:i,...a,ref:n})})})),wme=i.forwardRef(((t,n)=>{const r=ume(yme,t.__scopeTooltip),o=ame(yme,t.__scopeTooltip),a=i.useRef(null),l=B(n,a),[s,c]=i.useState(null),{trigger:u,onClose:d}=r,f=a.current,{onPointerInTransitChange:p}=o,h=i.useCallback((()=>{c(null),p(!1)}),[p]),g=i.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect()),i=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),a=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...i,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);c(a),p(!0)}),[p]);return i.useEffect((()=>()=>h()),[h]),i.useEffect((()=>{if(u&&f){const e=e=>g(e,f),t=e=>g(e,u);return u.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}}),[u,f,g,h]),i.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||f?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,l=t[e].y,s=t[i].x,c=t[i].y;l>r!=c>r&&n<(s-a)*(r-l)/(c-l)+a&&(o=!o)}return o}(n,s);r?h():o&&(h(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,f,s,d,h]),e.jsx(Sme,{...t,ref:l})})),[xme,Cme]=Qge(sme,{isInside:!1}),Sme=i.forwardRef(((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":a,onEscapeKeyDown:l,onPointerDownOutside:s,...c}=t,u=ume(yme,r),d=tme(r),{onClose:f}=u;return i.useEffect((()=>(document.addEventListener(ome,f),()=>document.removeEventListener(ome,f))),[f]),i.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,f]),e.jsx(Qpe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:e.jsxs(qge,{"data-state":u.stateAttribute,...d,...c,ref:n,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e.jsx(H,{children:o}),e.jsx(xme,{scope:r,isInside:!0,children:e.jsx(Jge,{id:u.contentId,role:"tooltip",children:a||o})})]})})}));bme.displayName=yme;var kme="TooltipArrow",Eme=i.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,i=tme(r);return Cme(kme,r).isInside?null:e.jsx(Gge,{...i,...o,ref:n})}));Eme.displayName=kme;var Ome=lme,Dme=dme,jme=pme,Pme=vme,Tme=bme,Mme=Eme;const Ame=e=>{let t="top",n="center";if(!e)return{side:t,align:n};const[r,o]=e.split(" ");return"left"===r&&(t="left"),"right"===r&&(t="right"),"bottom"===r&&(t="bottom"),"left"!==o&&"top"!==o||(n="start"),"right"!==o&&"bottom"!==o||(n="end"),{side:t,align:n}},_me=t=>{var{trigger:n,children:r,content:o,position:i="top",offset:a=4,zIndex:l,width:c,maxWidth:u,textAlign:d,open:f,disabled:p,id:h,bgColor:g,color:m,container:v,afterShow:y,afterHide:b}=t,w=s(t,["trigger","children","content","position","offset","zIndex","width","maxWidth","textAlign","open","disabled","id","bgColor","color","container","afterShow","afterHide"]);return e.jsx(Ome,{children:e.jsxs(Dme,{delayDuration:0,onOpenChange:e=>{p||(y&&e&&y(),b&&!e&&b())},open:f,children:[e.jsx(jme,{asChild:!0,children:e.jsx(Ime,Object.assign({},w,{children:n}))}),e.jsx(Pme,{container:v,children:!p&&e.jsxs(Lme,{side:Ame(i).side,align:Ame(i).align,sideOffset:a,zIndex:l,width:c,maxWidth:u,textAlign:d,id:h,bgColor:g,textColor:m,children:[o||r,e.jsx(Mme,{className:"tooltip-arrow",width:8,height:4})]})})]})})},Rme=n.keyframes({from:{transform:"var(--origin)",opacity:0},to:{transform:"translateY(0)",opacity:1}}),Lme=N(Tme,{shouldForwardProp:e=>Sx(e,["maxWidth","textAlign","bgColor","textColor","zIndex"])})((({theme:e,width:t,maxWidth:n,textAlign:r="center",bgColor:o,textColor:i,zIndex:a})=>{const{tooltip:l,font:s}=e,c=l.background,u=o||c;return{backgroundColor:u,boxShadow:e.elevation1,color:i||l.color.default,fontSize:s.size.sm,fontFamily:s.family.default,borderRadius:4,width:t,maxWidth:n,padding:16,textAlign:r,zIndex:a,animation:`${Rme} 300ms cubic-bezier(0.860, 0.000, 0.070, 1.000)`,"& > span > .tooltip-arrow":{fill:u,filter:"drop-shadow(0px 4px 2px rgba(0, 0, 0, 0.1))"},"&[data-side=top]":{"--origin":"translateY(4px)"},"&[data-side=bottom]":{"--origin":"translateY(-4px)",boxShadow:"0px -1px 4px 2px rgba(0, 0, 0, 0.1)"},"&[data-side=right]":{"--origin":"translateX(-4px)",boxShadow:"2px 0px 4px 2px rgba(0, 0, 0, 0.1)","& > span > .tooltip-arrow":{filter:"drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"}},"&[data-side=left]":{"--origin":"translateX(4px)",boxShadow:"-2px 0px 4px 2px rgba(0, 0, 0, 0.1)","& > span > .tooltip-arrow":{filter:"drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"}}}})),Ime=N.div({display:"inline-flex"}),Nme=N.div((({theme:e})=>({color:e.tooltip.color.default}))),$me=N.div((({theme:e})=>({color:e.tooltip.color.subtext})));_me.Header=Nme,_me.Body=$me;const zme=N.div((({width:e,readOnly:t})=>({display:"flex",flexDirection:"column",rowGap:16,width:e,pointerEvents:t?"none":void 0})),Kt),Fme=N.div((({theme:e})=>({fontSize:e.font.size.lg,fontWeight:e.font.weight.medium}))),Bme=N.div({display:"grid",columnGap:16,gridTemplateColumns:"1fr 1fr"}),Kme=N.div({display:"flex",flexDirection:"column"}),Vme=N.div({display:"flex",alignItems:"center",marginBottom:8,minHeight:35}),Hme=N.div((({theme:e})=>({display:"flex",flexDirection:"column",padding:16,border:e.defaultBorder,borderRadius:4,height:"100%",backgroundColor:e.background1,rowGap:4}))),Ume=N.div((({theme:e,color:t})=>{let n=e.scale1;return t&&(n=((e,t)=>{const n=Object.keys(e);return"string"==typeof t&&n.includes(t)})(e.color,t)?e.color[t]:t),{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"4px 8px",cursor:"pointer",background:e.scale0,borderLeft:"4px solid",borderColor:n,"&:hover":{background:e.scale1},"& > :last-child":{visibility:"hidden"},"&:hover > :last-child":{visibility:"visible"}}})),Wme=N.div((({theme:e})=>({fontSize:e.font.size.lg,color:e.scale10}))),Zme=N.div((({theme:e})=>({fontSize:e.font.size.sm,color:e.scale6})));!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('/* Document\n * ========================================================================== */\n\n/**\n * 1. Add border box sizing in all browsers (opinionated).\n * 2. Backgrounds do not repeat by default (opinionated).\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n background-repeat: no-repeat; /* 2 */\n}\n\n/**\n * 1. Add text decoration inheritance in all browsers (opinionated).\n * 2. Add vertical alignment inheritance in all browsers (opinionated).\n */\n\n::before,\n::after {\n text-decoration: inherit; /* 1 */\n vertical-align: inherit; /* 2 */\n}\n\n/**\n * 1. Use the default cursor in all browsers (opinionated).\n * 2. Change the line height in all browsers (opinionated).\n * 3. Breaks words to prevent overflow in all browsers (opinionated).\n * 4. Use a 4-space tab width in all browsers (opinionated).\n * 5. Remove the grey highlight on links in iOS (opinionated).\n * 6. Prevent adjustments of font size after orientation changes in iOS.\n */\n\n:where(:root) {\n cursor: default; /* 1 */\n line-height: 1.5; /* 2 */\n overflow-wrap: break-word; /* 3 */\n -moz-tab-size: 4; /* 4 */\n tab-size: 4; /* 4 */\n -webkit-tap-highlight-color: transparent; /* 5 */\n -webkit-text-size-adjust: 100%; /* 6 */\n}\n\n/* Sections\n * ========================================================================== */\n\n/**\n * Remove the margin in all browsers (opinionated).\n */\n\n:where(body) {\n margin: 0;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Edge, Firefox, and Safari.\n */\n\n:where(h1) {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n * ========================================================================== */\n\n/**\n * Remove the margin on nested lists in Chrome, Edge, and Safari.\n */\n\n:where(dl, ol, ul) :where(dl, ol, ul) {\n margin: 0;\n}\n\n/**\n * 1. Correct the inheritance of border color in Firefox.\n * 2. Add the correct box sizing in Firefox.\n */\n\n:where(hr) {\n color: inherit; /* 1 */\n height: 0; /* 2 */\n}\n\n/**\n * Remove the list style on navigation lists in all browsers (opinionated).\n */\n\n:where(nav) :where(ol, ul) {\n list-style-type: none;\n padding: 0;\n}\n\n/**\n * Prevent VoiceOver from ignoring list semantics in Safari (opinionated).\n */\n\n:where(nav li)::before {\n content: "\\200B";\n float: left;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n * 3. Prevent overflow of the container in all browsers (opinionated).\n */\n\n:where(pre) {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n overflow: auto; /* 3 */\n}\n\n/* Text-level semantics\n * ========================================================================== */\n\n/**\n * Add the correct text decoration in Safari.\n */\n\n:where(abbr[title]) {\n text-decoration: underline;\n text-decoration: underline dotted;\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\n:where(b, strong) {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\n:where(code, kbd, samp) {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\n:where(small) {\n font-size: 80%;\n}\n\n/* Embedded content\n * ========================================================================== */\n\n/*\n * Change the alignment on media elements in all browsers (opinionated).\n */\n\n:where(audio, canvas, iframe, img, svg, video) {\n vertical-align: middle;\n}\n\n/**\n * Remove the border on iframes in all browsers (opinionated).\n */\n\n:where(iframe) {\n border-style: none;\n}\n\n/**\n * Change the fill color to match the text color in all browsers (opinionated).\n */\n\n:where(svg:not([fill])) {\n fill: currentColor;\n}\n\n/* Tabular data\n * ========================================================================== */\n\n/**\n * 1. Collapse border spacing in all browsers (opinionated).\n * 2. Correct table border color inheritance in all Chrome, Edge, and Safari.\n * 3. Remove text indentation from table contents in Chrome, Edge, and Safari.\n */\n\n:where(table) {\n border-collapse: collapse; /* 1 */\n border-color: inherit; /* 2 */\n text-indent: 0; /* 3 */\n}\n\n/* Forms\n * ========================================================================== */\n\n/**\n * Remove the margin on controls in Safari.\n */\n\n:where(button, input, select) {\n margin: 0;\n}\n\n/**\n * Correct the inability to style buttons in iOS and Safari.\n */\n\n:where(button, [type="button" i], [type="reset" i], [type="submit" i]) {\n -webkit-appearance: button;\n}\n\n/**\n * Change the inconsistent appearance in all browsers (opinionated).\n */\n\n:where(fieldset) {\n border: 1px solid #a0a0a0;\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Edge, and Firefox.\n */\n\n:where(progress) {\n vertical-align: baseline;\n}\n\n/**\n * 1. Remove the margin in Firefox and Safari.\n * 3. Change the resize direction in all browsers (opinionated).\n */\n\n:where(textarea) {\n margin: 0; /* 1 */\n resize: vertical; /* 3 */\n}\n\n/**\n * 1. Correct the odd appearance in Chrome, Edge, and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n:where([type="search" i]) {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Safari.\n */\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * Correct the text style of placeholders in Chrome, Edge, and Safari.\n */\n\n::-webkit-input-placeholder {\n color: inherit;\n opacity: 0.54;\n}\n\n/**\n * Remove the inner padding in Chrome, Edge, and Safari on macOS.\n */\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style upload buttons in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n * ========================================================================== */\n\n/*\n * Add the correct styles in Safari.\n */\n\n:where(dialog) {\n background-color: white;\n border: solid;\n color: black;\n height: -moz-fit-content;\n height: fit-content;\n left: 0;\n margin: auto;\n padding: 1em;\n position: absolute;\n right: 0;\n width: -moz-fit-content;\n width: fit-content;\n}\n\n:where(dialog:not([open])) {\n display: none;\n}\n\n/*\n * Add the correct display in Safari.\n */\n\n:where(details > summary:first-of-type) {\n display: list-item;\n}\n\n/* Accessibility\n * ========================================================================== */\n\n/**\n * Change the cursor on busy elements in all browsers (opinionated).\n */\n\n:where([aria-busy="true" i]) {\n cursor: progress;\n}\n\n/*\n * Change the cursor on control elements in all browsers (opinionated).\n */\n\n:where([aria-controls]) {\n cursor: pointer;\n}\n\n/*\n * Change the cursor on disabled, not-editable, or otherwise\n * inoperable elements in all browsers (opinionated).\n */\n\n:where([aria-disabled="true" i], [disabled]) {\n cursor: not-allowed;\n}\n\n/*\n * Change the display on visually hidden accessible elements\n * in all browsers (opinionated).\n */\n\n:where([aria-hidden="false" i][hidden]) {\n display: initial;\n}\n\n:where([aria-hidden="false" i][hidden]:not(:focus)) {\n clip: rect(0, 0, 0, 0);\n position: absolute;\n}\n');var qme,Gme={exports:{}};qme=Gme,function(){function e(e,t,n){return e.call.apply(e.bind,arguments)}function t(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function n(r,o,i){return(n=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?e:t).apply(null,arguments)}var r=Date.now||function(){return+new Date};function o(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var i=!!window.FontFace;function a(e,t,n,r){if(t=e.c.createElement(t),n)for(var o in n)n.hasOwnProperty(o)&&("style"==o?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return r&&t.appendChild(e.c.createTextNode(r)),t}function l(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function s(e){e.parentNode&&e.parentNode.removeChild(e)}function c(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),o=0;o<t.length;o+=1){for(var i=!1,a=0;a<r.length;a+=1)if(t[o]===r[a]){i=!0;break}i||r.push(t[o])}for(t=[],o=0;o<r.length;o+=1){for(i=!1,a=0;a<n.length;a+=1)if(r[o]===n[a]){i=!0;break}i||t.push(r[o])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function u(e,t){for(var n=e.className.split(/\s+/),r=0,o=n.length;r<o;r++)if(n[r]==t)return!0;return!1}function d(e,t,n){function r(){u&&o&&s&&(u(c),u=null)}t=a(e,"link",{rel:"stylesheet",href:t,media:"all"});var o=!1,s=!0,c=null,u=n||null;i?(t.onload=function(){o=!0,r()},t.onerror=function(){o=!0,c=Error("Stylesheet failed to load"),r()}):setTimeout((function(){o=!0,r()}),0),l(e,"head",t)}function f(e,t,n,r){var o=e.c.getElementsByTagName("head")[0];if(o){var i=a(e,"script",{src:t}),l=!1;return i.onload=i.onreadystatechange=function(){l||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(l=!0,n&&n(null),i.onload=i.onreadystatechange=null,"HEAD"==i.parentNode.tagName&&o.removeChild(i))},o.appendChild(i),setTimeout((function(){l||(l=!0,n&&n(Error("Script load timeout")))}),r||5e3),i}return null}function p(){this.a=0,this.c=null}function h(e){return e.a++,function(){e.a--,m(e)}}function g(e,t){e.c=t,m(e)}function m(e){0==e.a&&e.c&&(e.c(),e.c=null)}function v(e){this.a=e||"-"}function y(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function b(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function w(e){return e.a+e.f}function x(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function C(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function S(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new v("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function k(e){if(e.g){var t=u(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),c(e.f,n,r)}E(e,"inactive")}function E(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,w(n)):e.h[t]())}function O(){this.c={}}function D(e,t){this.c=e,this.f=t,this.a=a(this.c,"span",{"aria-hidden":"true"},this.f)}function j(e){l(e.c,"body",e.a)}function P(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+b(e.c)+";font-style:"+x(e)+";font-weight:"+e.f+"00;"}function T(e,t,n,r,o,i){this.g=e,this.j=t,this.a=r,this.c=n,this.f=o||3e3,this.h=i||void 0}function M(e,t,n,r,o,i,a){this.v=e,this.B=t,this.c=n,this.a=r,this.s=a||"BESbswy",this.f={},this.w=o||3e3,this.u=i||null,this.m=this.j=this.h=this.g=null,this.g=new D(this.c,this.s),this.h=new D(this.c,this.s),this.j=new D(this.c,this.s),this.m=new D(this.c,this.s),e=P(e=new y(this.a.c+",serif",w(this.a))),this.g.a.style.cssText=e,e=P(e=new y(this.a.c+",sans-serif",w(this.a))),this.h.a.style.cssText=e,e=P(e=new y("serif",w(this.a))),this.j.a.style.cssText=e,e=P(e=new y("sans-serif",w(this.a))),this.m.a.style.cssText=e,j(this.g),j(this.h),j(this.j),j(this.m)}v.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},T.prototype.start=function(){var e=this.c.o.document,t=this,n=r(),o=new Promise((function(o,i){!function a(){r()-n>=t.f?i():e.fonts.load(function(e){return x(e)+" "+e.f+"00 300px "+b(e.c)}(t.a),t.h).then((function(e){1<=e.length?o():setTimeout(a,25)}),(function(){i()}))}()})),i=null,a=new Promise((function(e,n){i=setTimeout(n,t.f)}));Promise.race([a,o]).then((function(){i&&(clearTimeout(i),i=null),t.g(t.a)}),(function(){t.j(t.a)}))};var A={D:"serif",C:"sans-serif"},_=null;function R(){if(null===_){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);_=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return _}function L(e,t,n){for(var r in A)if(A.hasOwnProperty(r)&&t===e.f[A[r]]&&n===e.f[A[r]])return!0;return!1}function I(e){var t,o=e.g.a.offsetWidth,i=e.h.a.offsetWidth;(t=o===e.f.serif&&i===e.f["sans-serif"])||(t=R()&&L(e,o,i)),t?r()-e.A>=e.w?R()&&L(e,o,i)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?N(e,e.v):N(e,e.B):function(e){setTimeout(n((function(){I(this)}),e),50)}(e):N(e,e.v)}function N(e,t){setTimeout(n((function(){s(this.g.a),s(this.h.a),s(this.j.a),s(this.m.a),t(this.a)}),e),0)}function $(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}M.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=r(),I(this)};var z=null;function F(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&c(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),E(e,"active")):k(e.a))}function B(e){this.j=e,this.a=new O,this.h=0,this.f=this.g=!0}function K(e,t,r,o,i){var a=0==--e.h;(e.f||e.g)&&setTimeout((function(){var e=i||null,l=o||{};if(0===r.length&&a)k(t.a);else{t.f+=r.length,a&&(t.j=a);var s,u=[];for(s=0;s<r.length;s++){var d=r[s],f=l[d.c],p=t.a,h=d;if(p.g&&c(p.f,[p.a.c("wf",h.c,w(h).toString(),"loading")]),E(p,"fontloading",h),p=null,null===z)if(window.FontFace){h=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var g=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);z=h?42<parseInt(h[1],10):!g}else z=!1;p=z?new T(n(t.g,t),n(t.h,t),t.c,d,t.s,f):new M(n(t.g,t),n(t.h,t),t.c,d,t.s,e,f),u.push(p)}for(s=0;s<u.length;s++)u[s].start()}}),0)}function V(e,t){this.c=e,this.a=t}function H(e,t){this.c=e,this.a=t}function U(e,t){this.c=e||W,this.a=[],this.f=[],this.g=t||""}$.prototype.g=function(e){var t=this.a;t.g&&c(t.f,[t.a.c("wf",e.c,w(e).toString(),"active")],[t.a.c("wf",e.c,w(e).toString(),"loading"),t.a.c("wf",e.c,w(e).toString(),"inactive")]),E(t,"fontactive",e),this.m=!0,F(this)},$.prototype.h=function(e){var t=this.a;if(t.g){var n=u(t.f,t.a.c("wf",e.c,w(e).toString(),"active")),r=[],o=[t.a.c("wf",e.c,w(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,w(e).toString(),"inactive")),c(t.f,r,o)}E(t,"fontinactive",e),F(this)},B.prototype.load=function(e){this.c=new o(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],o=n.timeout;!function(e){e.g&&c(e.f,[e.a.c("wf","loading")]),E(e,"loading")}(t),r=function(e,t,n){var r,o=[];for(r in t)if(t.hasOwnProperty(r)){var i=e.c[r];i&&o.push(i(t[r],n))}return o}(e.a,n,e.c);var i=new $(e.c,t,o);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load((function(t,n,r){K(e,i,t,n,r)}))}(this,new S(this.c,e),e)},V.prototype.load=function(e){function t(){if(i["__mti_fntLst"+r]){var n,o=i["__mti_fntLst"+r](),a=[];if(o)for(var l=0;l<o.length;l++){var s=o[l].fontfamily;null!=o[l].fontStyle&&null!=o[l].fontWeight?(n=o[l].fontStyle+o[l].fontWeight,a.push(new y(s,n))):a.push(new y(s))}e(a)}else setTimeout((function(){t()}),50)}var n=this,r=n.a.projectId,o=n.a.version;if(r){var i=n.c.o;f(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+r+".js"+(o?"?v="+o:""),(function(o){o?e([]):(i["__MonotypeConfiguration__"+r]=function(){return n.a},t())})).id="__MonotypeAPIScript__"+r}else e([])},H.prototype.load=function(e){var t,n,r=this.a.urls||[],o=this.a.families||[],i=this.a.testStrings||{},a=new p;for(t=0,n=r.length;t<n;t++)d(this.c,r[t],h(a));var l=[];for(t=0,n=o.length;t<n;t++)if((r=o[t].split(":"))[1])for(var s=r[1].split(","),c=0;c<s.length;c+=1)l.push(new y(r[0],s[c]));else l.push(new y(r[0]));g(a,(function(){e(l,i)}))};var W="https://fonts.googleapis.com/css";function Z(e){this.f=e,this.a=[],this.c={}}var q={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},G={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Y={i:"i",italic:"i",n:"n",normal:"n"},X=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function J(e,t){this.c=e,this.a=t}var Q={Arimo:!0,Cousine:!0,Tinos:!0};function ee(e,t){this.c=e,this.a=t}function te(e,t){this.c=e,this.f=t,this.a=[]}J.prototype.load=function(e){var t=new p,n=this.c,r=new U(this.a.api,this.a.text),o=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var o=t[r].split(":");3==o.length&&e.f.push(o.pop());var i="";2==o.length&&""!=o[1]&&(i=":"),e.a.push(o.join(i))}}(r,o);var i=new Z(o);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),o=r[0].replace(/\+/g," "),i=["n4"];if(2<=r.length){var a;if(a=[],l=r[1])for(var l,s=(l=l.split(",")).length,c=0;c<s;c++){var u;if((u=l[c]).match(/^[\w-]+$/))if(null==(d=X.exec(u.toLowerCase())))u="";else{if(u=null==(u=d[2])||""==u?"n":Y[u],null==(d=d[1])||""==d)d="4";else var d=G[d]||(isNaN(d)?"4":d.substr(0,1));u=[u,d].join("")}else u="";u&&a.push(u)}0<a.length&&(i=a),3==r.length&&(a=[],0<(r=(r=r[2])?r.split(","):a).length&&(r=q[r[0]])&&(e.c[o]=r))}for(e.c[o]||(r=q[o])&&(e.c[o]=r),r=0;r<i.length;r+=1)e.a.push(new y(o,i[r]))}}(i),d(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),h(t)),g(t,(function(){e(i.a,i.c,Q)}))},ee.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?f(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",(function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],o=0;o<t.length;o+=2)for(var i=t[o],a=t[o+1],l=0;l<a.length;l++)r.push(new y(i,a[l]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}e(r)}}),2e3):e([])},te.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var o=0,i=n.fonts.length;o<i;++o){var a=n.fonts[o];r.a.push(new y(a.name,C("font-weight:"+a.weight+";font-style:"+a.style)))}e(r.a)},f(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",(function(t){t&&e([])}))):e([])};var ne=new B(window);ne.a.c.custom=function(e,t){return new H(t,e)},ne.a.c.fontdeck=function(e,t){return new te(t,e)},ne.a.c.monotype=function(e,t){return new V(t,e)},ne.a.c.typekit=function(e,t){return new ee(t,e)},ne.a.c.google=function(e,t){return new J(t,e)};var re={load:n(ne.load,ne)};qme.exports?qme.exports=re:(window.WebFont=re,window.WebFontConfig&&ne.load(window.WebFontConfig))}();var Yme=Po(Gme.exports);const Xme="#0074F4",Jme="#FF6068",Qme="#FF9900",eve="#F0BB00",tve="#00C242",nve="#001D32",rve="#FFFFFF",ove={logo1:"#0074F4",logo2:"#00A9E2",logo3:"#67C728",brand:Xme,brandShade1:"#0068DC",brandShade2:"#005DC3",brandDark:"#4C9EF7",brandDarkShade1:"#5EA8F8",brandTint0:Zn(.95,Xme),brandTint1:Zn(.9,Xme),brandTint2:Zn(.8,Xme),brandTint3:Zn(.7,Xme),brandTint4:Zn(.6,Xme),brandBackground0:"#001828",brandBackground1:"#0D2433",brandBackground2:"#192F3D",brandBackground3:"#334653",brandBackground4:"#475964",brandBackground5:"#596A74",error:Jme,errorShade1:"#E6565E",errorShade2:"#CC4D53",errorTint0:Zn(.95,Jme),errorTint1:Zn(.9,Jme),errorTint2:Zn(.8,Jme),warning:Qme,warningShade1:"#E68A00",warningShade2:"#CC7A00",warningTint0:Zn(.95,Qme),warningTint1:Zn(.9,Qme),warningTint2:Zn(.8,Qme),alert:eve,alertShade1:"#E4B200",alertShade2:"#C09600",alertTint0:Zn(.95,eve),alertTint1:Zn(.9,eve),alertTint2:Zn(.8,eve),success:tve,successShade1:"#00AF3B",successShade2:"#009B35",successTint0:Zn(.95,tve),successTint1:Zn(.9,tve),successTint2:Zn(.8,tve),grayscale0:Zn(.95,nve),grayscale1:Zn(.9,nve),grayscale2:Zn(.8,nve),grayscale3:Zn(.7,nve),grayscale4:Zn(.6,nve),grayscale5:Zn(.5,nve),grayscale6:Zn(.4,nve),grayscale7:Zn(.3,nve),grayscale8:Zn(.2,nve),grayscale9:Zn(.1,nve),grayscale10:nve,contrast0:Zn(.95,rve),contrast1:Zn(.9,rve),contrast2:Zn(.8,rve),contrast3:Zn(.7,rve),contrast4:Zn(.6,rve),contrast5:Zn(.5,rve),contrast6:Zn(.4,rve),contrast7:Zn(.3,rve),contrast8:Zn(.2,rve),contrast9:Zn(.1,rve),contrast10:rve};var ive={color:ove,elevation0:"0px 2px 4px 2px rgba(0, 0, 0, 0.05)",elevation1:"0px 2px 4px 2px rgba(0, 0, 0, 0.1)",elevation2:"0px 2px 4px 2px rgba(0, 0, 0, 0.15)",elevation3:"0px 4px 8px 2px rgba(0, 0, 0, 0.2)",elevation4:"0px 4px 8px 2px rgba(0, 0, 0, 0.25)",font:{weight:{thin:100,light:300,default:400,medium:500,semiBold:600,bold:700},size:{xs:10,sm:12,md:14,lg:16,xl:18},family:{default:"'Roboto', sans-serif",medium:"'Roboto', sans-serif",light:"'Roboto', sans-serif"}},size:{xs:4,sm:8,md:16,lg:24}};const{font:ave}=ive;var lve={small:{height:28,iconSize:18,font:ave.size.sm,padding:10,iconOnlyPadding:4},medium:{height:32,iconSize:22,font:ave.size.md,padding:12,iconOnlyPadding:5},large:{height:36,iconSize:24,font:ave.size.lg,padding:14,iconOnlyPadding:6}};const sve="#FFFFFF",cve={scale0:ove.grayscale0,scale1:ove.grayscale1,scale2:ove.grayscale2,scale3:ove.grayscale3,scale4:ove.grayscale4,scale5:ove.grayscale5,scale6:ove.grayscale6,scale7:ove.grayscale7,scale8:ove.grayscale8,scale9:ove.grayscale9,scale10:ove.grayscale10,accent:ove.brand,accentShade:ove.brandShade1,background0:sve,background1:sve,background2:sve,background3:sve,background4:sve,background5:sve},uve="#FFFFFF",dve=ove.grayscale0,fve=ove.grayscale1,pve=ove.grayscale2,hve=ove.grayscale3,gve=ove.grayscale4,mve=ove.grayscale6,vve=ove.grayscale8,yve=ove.grayscale9,bve=ove.grayscale10,wve=Object.assign(Object.assign(Object.assign({},ive),cve),{name:"light",button:Object.assign(Object.assign({},lve),{primary:{color:{default:uve,hover:uve,active:uve},outlineColor:{default:bve,hover:bve,active:bve},background:{default:ove.brand,hover:ove.brandShade1,active:ove.brandShade2},outlineBackground:{default:ove.brandTint0,hover:ove.brandTint1,active:ove.brandTint2},border:{default:ove.brand,hover:ove.brandShade1,active:ove.brandShade2},divider:pve},secondary:{color:{default:bve,hover:bve,active:bve},outlineColor:{default:bve,hover:bve,active:bve},background:{default:fve,hover:pve,active:hve},outlineBackground:{default:fve,hover:pve,active:hve},border:{default:pve,hover:pve,active:pve},divider:pve},positive:{color:{default:uve,hover:uve,active:uve},outlineColor:{default:bve,hover:bve,active:bve},background:{default:ove.success,hover:ove.successShade1,active:ove.successShade2},outlineBackground:{default:ove.successTint0,hover:ove.successTint1,active:ove.successTint2},border:{default:ove.success,hover:ove.successShade1,active:ove.successShade2},divider:pve},negative:{color:{default:uve,hover:uve,active:uve},outlineColor:{default:bve,hover:bve,active:bve},background:{default:ove.error,hover:ove.errorShade1,active:ove.errorShade2},outlineBackground:{default:ove.errorTint0,hover:ove.errorTint1,active:ove.errorTint2},border:{default:ove.error,hover:ove.errorShade1,active:ove.errorShade2},divider:pve},caution:{color:{default:uve,hover:uve,active:uve},outlineColor:{default:bve,hover:bve,active:bve},background:{default:ove.warning,hover:ove.warningShade1,active:ove.warningShade2},outlineBackground:{default:ove.warningTint0,hover:ove.warningTint1,active:ove.warningTint2},border:{default:ove.warning,hover:ove.warningShade1,active:ove.warningShade2},divider:pve},subtle:{color:{default:ove.brand,hover:ove.brand,active:ove.brand},outlineColor:{default:ove.brand,hover:ove.brand,active:ove.brand},secondaryColor:{default:bve,hover:bve,active:bve},positiveColor:{default:ove.success,hover:ove.success,active:ove.success},negativeColor:{default:ove.error,hover:ove.error,active:ove.error},cautionColor:{default:ove.warning,hover:ove.warning,active:ove.warning},background:{default:"transparent",hover:fve,active:pve},outlineBackground:{default:"transparent",hover:fve,active:pve},border:{default:"transparent",hover:pve,active:pve},divider:pve},link:{color:{default:ove.brand,hover:ove.brandShade1,active:ove.brandShade2},outlineColor:{default:ove.brand,hover:ove.brandShade1,active:ove.brandShade2},secondaryColor:{default:vve,hover:yve,active:bve},positiveColor:{default:ove.success,hover:ove.successShade1,active:ove.successShade2},negativeColor:{default:ove.error,hover:ove.errorShade1,active:ove.errorShade2},cautionColor:{default:ove.warning,hover:ove.warningShade1,active:ove.warningShade2},background:{default:"transparent",hover:"transparent",active:"transparent"},outlineBackground:{default:"transparent",hover:"transparent",active:"transparent"},border:{default:"transparent",hover:"transparent",active:"transparent"},divider:"transparent"},disabled:{color:{default:gve,hover:gve,active:gve},outlineColor:{default:gve,hover:gve,active:gve},background:{default:fve,hover:fve,active:fve},outlineBackground:{default:dve,hover:dve,active:dve},border:{default:fve,hover:fve,active:fve},divider:fve},color:{default:uve}}),calendar:{background:{container:ove.contrast10,hover:fve,active:ove.brand,activeHover:ove.brandShade1,activeRange:ove.brandTint4},color:{disabled:gve,default:bve,active:ove.contrast10,current:ove.brand,outside:mve,weekday:vve,monthYear:vve,iconDefault:mve,iconDisabled:pve,iconHover:bve}},defaultBorder:`1px solid ${fve}`,formControl:{color:{default:vve,hover:bve,active:ove.brand,activeHover:ove.brandShade1,disabled:gve}},input:{borderRadius:4,background:{default:dve,hover:fve,focused:fve,disabled:dve},color:{default:bve,disabled:gve,placeholder:mve,description:mve,descriptionError:ove.error},borderColor:{default:mve,hover:vve,focused:ove.brand,disabled:gve,error:ove.error},labelColor:{default:vve,hover:vve,filled:mve,focused:ove.brand,disabled:gve}},menu:{background:uve},menuItem:{borderColor:ove.brand,background:{active:dve,hover:fve,inactive:"transparent"},color:{active:bve,hover:bve,inactive:mve}},modal:{background:ove.contrast10,color:{header:bve,body:mve}},options:{background:ove.contrast10},optionItem:{background:{active:fve,inactive:"transparent"},color:{active:bve,inactive:bve,accent:ove.brand}},table:{color:{header:mve,body:bve},borderColor:fve},toast:{color:bve,background:{deafult:"#F2F3F4",info:"#CCE3FD",success:"#CCF3D9",warning:"#FFEBCC",error:"#FFDFE1"},border:{deafult:vve,info:ove.brand,success:ove.success,warning:ove.warning,error:ove.error}},toggle:{slider:ove.contrast10},tooltip:{background:"#FFF",color:{default:bve,subtext:mve}}}),xve={scale0:ove.contrast0,scale1:ove.contrast1,scale2:ove.contrast2,scale3:ove.contrast3,scale4:ove.contrast4,scale5:ove.contrast5,scale6:ove.contrast6,scale7:ove.contrast7,scale8:ove.contrast8,scale9:ove.contrast9,scale10:ove.contrast10,accent:ove.brandDark,accentShade:ove.brandDarkShade1,background0:ove.brandBackground0,background1:ove.brandBackground1,background2:ove.brandBackground2,background3:ove.brandBackground3,background4:ove.brandBackground4,background5:ove.brandBackground5},Cve=ove.contrast0,Sve=ove.contrast1,kve=ove.contrast2,Eve=ove.contrast3,Ove=ove.contrast4,Dve=ove.contrast6,jve=ove.contrast8,Pve=ove.contrast9,Tve=ove.contrast10,Mve=ove.brandDark,Ave={light:wve,dark:Object.assign(Object.assign(Object.assign({},ive),xve),{name:"dark",button:Object.assign(Object.assign({},lve),{primary:{color:{default:Tve,hover:Tve,active:Tve},outlineColor:{default:Tve,hover:Tve,active:Tve},background:{default:ove.brand,hover:ove.brandShade1,active:ove.brandShade2},outlineBackground:{default:ove.brandTint0,hover:ove.brandTint1,active:ove.brandTint2},border:{default:ove.brand,hover:ove.brandShade1,active:ove.brandShade2},divider:kve},secondary:{color:{default:Tve,hover:Tve,active:Tve},outlineColor:{default:Tve,hover:Tve,active:Tve},background:{default:Sve,hover:kve,active:Eve},outlineBackground:{default:Sve,hover:kve,active:Eve},border:{default:kve,hover:kve,active:kve},divider:kve},positive:{color:{default:Tve,hover:Tve,active:Tve},outlineColor:{default:Tve,hover:Tve,active:Tve},background:{default:ove.success,hover:ove.successShade1,active:ove.successShade2},outlineBackground:{default:ove.successTint0,hover:ove.successTint1,active:ove.successTint2},border:{default:ove.success,hover:ove.successShade1,active:ove.successShade2},divider:kve},negative:{color:{default:Tve,hover:Tve,active:Tve},outlineColor:{default:Tve,hover:Tve,active:Tve},background:{default:ove.error,hover:ove.errorShade1,active:ove.errorShade2},outlineBackground:{default:ove.errorTint0,hover:ove.errorTint1,active:ove.errorTint2},border:{default:ove.error,hover:ove.errorShade1,active:ove.errorShade2},divider:kve},caution:{color:{default:Tve,hover:Tve,active:Tve},outlineColor:{default:Tve,hover:Tve,active:Tve},background:{default:ove.warning,hover:ove.warningShade1,active:ove.warningShade2},outlineBackground:{default:ove.warningTint0,hover:ove.warningTint1,active:ove.warningTint2},border:{default:ove.warning,hover:ove.warningShade1,active:ove.warningShade2},divider:kve},subtle:{color:{default:ove.brand,hover:ove.brand,active:ove.brand},outlineColor:{default:ove.brand,hover:ove.brand,active:ove.brand},secondaryColor:{default:Tve,hover:Tve,active:Tve},positiveColor:{default:ove.success,hover:ove.success,active:ove.success},negativeColor:{default:ove.error,hover:ove.error,active:ove.error},cautionColor:{default:ove.warning,hover:ove.warning,active:ove.warning},background:{default:"transparent",hover:Sve,active:kve},outlineBackground:{default:"transparent",hover:Sve,active:kve},border:{default:"transparent",hover:kve,active:kve},divider:kve},link:{color:{default:ove.brandShade2,hover:ove.brandShade1,active:ove.brand},outlineColor:{default:ove.brandShade2,hover:ove.brandShade1,active:ove.brand},secondaryColor:{default:jve,hover:Pve,active:Tve},positiveColor:{default:ove.successShade2,hover:ove.successShade1,active:ove.success},negativeColor:{default:ove.errorShade2,hover:ove.errorShade1,active:ove.error},cautionColor:{default:ove.warningShade2,hover:ove.warningShade1,active:ove.warning},background:{default:"transparent",hover:"transparent",active:"transparent"},outlineBackground:{default:"transparent",hover:"transparent",active:"transparent"},border:{default:"transparent",hover:"transparent",active:"transparent"},divider:"transparent"},disabled:{color:{default:Ove,hover:Ove,active:Ove},outlineColor:{default:Ove,hover:Ove,active:Ove},background:{default:Sve,hover:Sve,active:Sve},outlineBackground:{default:Cve,hover:Cve,active:Cve},border:{default:Sve,hover:Sve,active:Sve},divider:Sve},color:{default:"#FFFFFF"}}),calendar:{background:{container:ove.brandBackground3,hover:Sve,active:ove.brand,activeHover:ove.brandShade1,activeRange:ove.brandTint4},color:{disabled:Ove,default:Tve,active:Tve,current:Mve,outside:Dve,weekday:jve,monthYear:jve,iconDefault:Dve,iconDisabled:kve,iconHover:Tve}},defaultBorder:`1px solid ${Sve}`,formControl:{color:{default:jve,hover:Tve,active:ove.brand,activeHover:ove.brandShade1,disabled:Ove}},input:{borderRadius:4,background:{default:Cve,hover:Sve,focused:Sve,disabled:Cve},color:{default:Tve,disabled:Ove,placeholder:Dve,description:Dve,descriptionError:ove.error},borderColor:{default:Dve,hover:jve,focused:Mve,disabled:Ove,error:ove.error},labelColor:{default:jve,hover:jve,filled:Dve,focused:Mve,disabled:Ove}},menu:{background:ove.brandBackground2},menuItem:{borderColor:ove.brand,background:{active:Cve,hover:Sve,inactive:"transparent"},color:{active:Tve,hover:Tve,inactive:Dve}},modal:{background:ove.brandBackground3,color:{header:Tve,body:Dve}},options:{background:ove.brandBackground2},optionItem:{background:{active:Sve,inactive:"transparent"},color:{active:Tve,inactive:Tve,accent:Mve}},table:{color:{header:Dve,body:Tve},borderColor:Sve},toast:{color:Tve,background:{deafult:"#0D2433",info:"#002A51",success:"#003A2D",warning:"#333220",error:"#332635"},border:{deafult:jve,info:ove.brand,success:ove.success,warning:ove.warning,error:ove.error}},toggle:{slider:ove.brandBackground0},tooltip:{background:ove.brandBackground4,color:{default:Tve,subtext:Dve}}})};exports.Accordion=qt,exports.Audio=gC,exports.BarChart=t=>{var{data:r,legend:o,keys:i,stacked:a,barGap:l,barCategoryGap:c,barSize:u=16,maxBarSize:d,vertical:f=!1,hideYLabels:p,hideXLabels:h,xAxisHeight:g=22,yAxisWidth:m=45}=t,v=s(t,["data","legend","keys","stacked","barGap","barCategoryGap","barSize","maxBarSize","vertical","hideYLabels","hideXLabels","xAxisHeight","yAxisWidth"]);const{scale2:y}=n.useTheme();return e.jsxs(zQ,Object.assign({},v,{children:[e.jsx($Q,{}),e.jsx($R,{width:"100%",height:"100%",children:e.jsxs(OJ,{margin:{top:0,left:0,right:0,bottom:0},data:r,layout:f?"vertical":"horizontal",barSize:u,maxBarSize:d,barGap:l,barCategoryGap:c,children:[e.jsx(iX,{stroke:y,strokeDasharray:"3 5",vertical:f,horizontal:!f}),e.jsx(kX,{stroke:y,tickMargin:4,tickFormatter:e=>f?jC(e):e,tick:!h&&{},height:h?12:g,dataKey:f?void 0:"name",type:f?"number":"category"}),e.jsx(OX,{stroke:y,tickMargin:4,tickFormatter:e=>f?e:jC(e),tick:!p&&{},width:p?5:m,dataKey:f?"name":void 0,type:f?"category":"number"}),BQ(),o&&e.jsx(bA,{content:e.jsx(KQ,{})}),i.map((({key:t,color:n},r)=>{let o=f?[0,2,2,0]:[2,2,0,0];return a&&r!==i.length-1&&(o=[0,0,0,0]),e.jsx(gG,{dataKey:t,fill:n,stackId:a?"stack":void 0,radius:o},`bar-${r+1}`)}))]})})]}))},exports.Button=dC,exports.Calendar=k1,exports.Checkbox=Tx,exports.Code=({children:r,code:o,className:i,lang:a,lineHighlights:l,noNumbers:s,margin:c,marginTop:u,marginBottom:d,marginRight:f,marginLeft:p})=>{const{name:h}=n.useTheme(),g={margin:c,marginTop:u,marginBottom:d,marginRight:f,marginLeft:p},m=(null==i?void 0:i.replace(/}/g,"").split("{"))||[];let[v,y,b]=m;v=v||a||"",y=y||l||"",b=b||s?"nonumbers":"";let w=v?v.replace(/language-/,""):"text",x="";if(w.includes("rest")){const[e,t]=w.split("-");w=e,x=(null==t?void 0:t.toUpperCase())||""}const C="nonumbers"===b.toLowerCase().trim(),S=e=>{if(y){const t=(e=>{const t=e.split(",").map((e=>{if(e.match(/^\d+$/))return parseInt(e);if(e.includes("-")){const[t,n]=e.split("-"),r=parseInt(t),o=parseInt(n);return r<o?tt(r,o+1):tt(o,r+1)}return null}));return function(e){const t=[];for(const n of e)n&&t.push(n);return t}(t.flat())})(y);return t.some((t=>e===t))}return!1},k=(null==o?void 0:o.trim())||(null==r?void 0:r.trim())||"";return"rest"===w?e.jsx(C0,{method:x,url:k}):e.jsx(b0,{code:k,language:w,theme:"dark"===h?W1.oceanicNext:W1.github,children:({className:n,style:r,tokens:o,getLineProps:i,getTokenProps:a})=>e.jsxs(O0,Object.assign({className:n,style:Object.assign({},r)},g,{"data-testid":"code",children:[o.map(((n,r,o)=>t.createElement(D0,Object.assign({},i({line:n,key:r}),{key:`line-${r+1}`,highlight:S(r+1)}),o.length>1&&!C&&e.jsx(j0,{children:r+1}),n.map(((e,n)=>t.createElement("span",Object.assign({},a({token:e,key:n}),{key:`token-${n+1}`}))))))),e.jsx(w0,{content:k})]}))})},exports.ComboBox=_0,exports.CommandMenu=n=>{var{options:r,inputProps:o,modalProps:i,triggerRef:a,position:l,offset:c,open:u,onChange:d,setOpen:f}=n,p=s(n,["options","inputProps","modalProps","triggerRef","position","offset","open","onChange","setOpen"]);const h=t.useRef(null),g=t.useRef(),{"aria-label":m}=p,v=s(p,["aria-label"]),y=e.jsx(Fb,{"aria-label":m,children:e.jsxs(R9,Object.assign({},v,{children:[e.jsxs(L9,{margin:8,width:"auto",children:[e.jsx(Ut,{name:"search",inheritColor:!0,marginRight:8}),e.jsx(I9,Object.assign({placeholder:"Search",autoFocus:!0,onValueChange:()=>{clearTimeout(null==g?void 0:g.current),g.current=setTimeout((()=>{h.current&&(null==h||h.current.scrollTo({top:0}))}),0)}},o))]}),e.jsxs(N9,{ref:h,children:[e.jsx($9,{children:"No results found."}),r&&e.jsx(_9,{options:r,onItemSelect:e=>{d(e),f(!1)}})]})]}))});return a?e.jsx(Lb,{triggerRef:a,isOpen:u,onOpenChange:f,placement:l,offset:c,children:y}):e.jsx(z9,Object.assign({isDismissable:!0,isOpen:u,onOpenChange:f},i,{children:e.jsx(jw,{children:y})}))},exports.DatePicker=n=>{var{value:r,label:o,inputRef:i,iconLeft:a,iconRight:l,loading:c,fontSize:u,placeholderColor:d,disabled:f,description:p,errorMessage:h,preventPast:g,preventFuture:m,onChange:v,afterShow:y,afterHide:b}=n,w=s(n,["value","label","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","description","errorMessage","preventPast","preventFuture","onChange","afterShow","afterHide"]);const{current:x}=t.useRef(r?x1(r):void 0),[C,S]=t.useState(x),k=t.useRef(null),{min:E,max:O}=C1({past:g,future:m,rel:x||Sfe}),D=e=>{const{year:t,month:n,day:r}=e,o=new Ds(t,n,r);S(o);const i=w1(e);v&&v(i)},j=!(C||!o);return e.jsxs(kfe,Object.assign({value:C,hasLabel:!!o,isDisabled:f,minValue:E,maxValue:O,onChange:D,onOpenChange:e=>{y&&e&&y(),b&&!e&&b()},ref:k},w,{children:[a&&A0(a,{marginRight:8}),e.jsxs(o1,{filled:!!C,disabled:f,children:[o,e.jsx(Efe,{ref:i,hide:j,fontSize:u,placeholderColor:d,isDisabled:f,children:t=>e.jsx(xfe,{placeholderColor:d,segment:t})})]}),e.jsx(Cfe,{isDisabled:f,children:e.jsx(Ut,{size:18,name:"calendar",inheritColor:!0})}),l&&A0(l),c&&e.jsx(Xx,{}),e.jsx(e1,{description:p,errorMessage:h}),e.jsx(Lb,{triggerRef:k,children:e.jsx(Fb,{children:e.jsx(k1,{date:C?w1(C):void 0,onChange:e=>{D(x1(e))},preventPast:g,preventFuture:m})})})]}))},exports.DateRangePicker=n=>{var{startValue:r,endValue:o,label:i,inputRef:a,iconLeft:l,iconRight:c,loading:u,fontSize:d,placeholderColor:f,disabled:p,description:h,errorMessage:g,preventPast:m,preventFuture:v,onChange:y,afterShow:b,afterHide:w}=n,x=s(n,["startValue","endValue","label","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","description","errorMessage","preventPast","preventFuture","onChange","afterShow","afterHide"]);const{current:C}=t.useRef(r?x1(r):void 0),{current:S}=t.useRef(o?x1(o):void 0),[k,E]=t.useState(C),[O,D]=t.useState(S),j=t.useRef(null),{min:P,max:T}=C1({past:m,future:v,rel:C||Pfe}),M=e=>{const{start:t,end:n}=e,{year:r,month:o,day:i}=t,{year:a,month:l,day:s}=n,c=new Ds(r,o,i);E(c);const u=new Ds(a,l,s);D(u);const d=w1(t),f=w1(n);y&&y(d,f)},A=!(!k&&!O),_=!(A||!i);return e.jsxs(Tfe,Object.assign({value:k&&O?{start:k,end:O}:void 0,hasLabel:!!i,isDisabled:p,minValue:P,maxValue:T,onChange:M,onOpenChange:e=>{b&&e&&b(),w&&!e&&w()},ref:j},x,{children:[l&&A0(l,{marginRight:8}),e.jsxs(o1,{filled:A,disabled:p,children:[i,e.jsxs(Afe,{fontSize:d,hide:_,isDisabled:p,children:[e.jsx(Mfe,{slot:"start",ref:a,fontSize:d,placeholderColor:f,isDisabled:p,children:t=>e.jsx(xfe,{placeholderColor:f,segment:t})}),e.jsx("span",{"aria-hidden":"true",children:"–"}),e.jsx(Mfe,{slot:"end",fontSize:d,placeholderColor:f,isDisabled:p,children:t=>e.jsx(xfe,{placeholderColor:f,segment:t})})]})]}),e.jsx(Cfe,{isDisabled:p,children:e.jsx(Ut,{size:18,name:"calendar",inheritColor:!0})}),c&&A0(c),u&&e.jsx(Xx,{}),e.jsx(e1,{description:h,errorMessage:g}),e.jsx(Lb,{triggerRef:j,children:e.jsx(Fb,{children:e.jsx(Dfe,{startDate:k?w1(k):void 0,endDate:O?w1(O):void 0,onChange:(e,t)=>{const n=x1(e),r=x1(t);M({start:n,end:r})},preventPast:m,preventFuture:v})})})]}))},exports.DocTable=F9,exports.DraftEditor=pde,exports.Dropdown=Ude,exports.DropdownMenu=Zx,exports.DropdownSelect=n=>{var{label:r,options:o,width:i,search:a,onChange:l}=n,c=s(n,["label","options","width","search","onChange"]);const[u,d]=t.useState(new Set),[f,p]=t.useState(!1),[h,g]=t.useState(""),[m,v]=t.useState(!1),[y,b]=t.useState(!1),[w,x]=t.useState(0),[C,S]=t.useState("menu"),k=t.useRef(null),E=t.useRef(null),O=(e=>e.map((e=>"options"in e?e.options:e)).flat())(o),D=Qde(o,h),j=e=>{d(e);const t=O.length,n="all"===e||e.size===t,r=!n&&e.size>0;v(n),b(r),x(n?t:e.size);const o=n?O:O.filter((t=>e.has(t.id)));l&&l(o)};return e.jsxs(efe,Object.assign({width:i,ref:k,tabIndex:-1},c,{children:[e.jsxs(rfe,{children:[e.jsx(Tx,{partial:y,checked:m,onChange:()=>j(m?new Set:"all")}),e.jsx(nfe,{children:r})]}),e.jsxs(rfe,{gap:8,children:[(y||m)&&e.jsx(ofe,{children:y?w:"All"}),e.jsxs(mw,{onOpenChange:e=>{p(e),e||(g(""),S("menu"))},children:[e.jsx(Vx,{children:e.jsx(Ut,{name:f?"caret-up":"caret-down",inheritColor:!0})}),e.jsx(Wx,{triggerRef:k,offset:2,children:({isEntering:t,isExiting:n})=>{var r;return e.jsxs(tfe,{width:i||(null===(r=null==k?void 0:k.current)||void 0===r?void 0:r.offsetWidth),readOnly:t||n,children:[a&&e.jsx(Xde,{value:h,onChange:g,placeholder:"Search",padding:"2px 4px",margin:8,minHeight:"unset",height:"auto",width:"auto",onFocus:()=>S("input"),onKeyDown:e=>{var t;"ArrowDown"!==e.key&&"ArrowUp"!==e.key||null===(t=E.current)||void 0===t||t.focus()}}),h&&0===D.length&&e.jsx(ife,{children:"No results found"}),e.jsx(Kx,{options:D,selectionMode:"multiple",width:"100%",selectedKeys:u,onSelectionChange:j,autoFocus:"menu"===C,menuRef:E,itemProps:{checkbox:!0},readOnly:t||n})]})}})]})]})]}))},exports.Ellipsis=afe,exports.Form=ffe,exports.Grid=lfe,exports.Icon=Ut,exports.ImageViewer=({visible:n,close:r,images:o,startIndex:i,alt:a,maxWidth:l,maxHeight:s,opacity:c})=>{const[u,d]=t.useState(i),f=et(r,n,["#prev","#next","#prev *","#next *"]);t.useEffect((()=>{d(i)}),[i]);const p=()=>d(u>0?u-1:o.length-1),h=()=>u<o.length-1?d(u+1):d(0),g=e=>{const{key:t}=e;switch(t){case"ArrowLeft":case"ArrowDown":e.preventDefault(),p();break;case"ArrowRight":case"ArrowUp":e.preventDefault(),h();break;case"Escape":e.preventDefault(),r()}};return t.useEffect((()=>{const e="undefined"==typeof window,t=e?()=>null:()=>window.removeEventListener("keydown",g);return n&&!e&&window.addEventListener("keydown",g),t}),[n,u]),n?e.jsxs(mfe,{opacity:c,prevNext:o.length>1,children:[e.jsx(vfe,{onClick:r,children:e.jsx(Ut,{name:"close",size:25,color:"white"})}),o.length>1&&e.jsx(yfe,{id:"prev",onClick:p,children:e.jsx(Ut,{name:"chevron-left",size:35,color:"white"})}),e.jsx(bfe,{ref:f,src:o[u],alt:a,maxWidth:l,maxHeight:s}),o.length>1&&e.jsx(yfe,{next:!0,id:"next",onClick:h,children:e.jsx(Ut,{name:"chevron-right",size:35,color:"white"})})]}):null},exports.InlineCode=wfe,exports.Input=Mde,exports.InputUtils=Wue,exports.Label=ufe,exports.LineChart=r=>{var{data:o,legend:i,keys:a}=r,l=s(r,["data","legend","keys"]);const[c,u]=t.useState(a),{scale2:d}=n.useTheme();return e.jsxs(zQ,Object.assign({},l,{children:[e.jsx($Q,{}),e.jsx($R,{width:"100%",height:"100%",children:e.jsxs(EJ,{margin:{top:8,left:-14,right:5,bottom:-8},data:o,children:[e.jsx(iX,{stroke:d,strokeDasharray:"3 5",vertical:!1}),e.jsx(kX,{stroke:d,dataKey:"name",tickMargin:4}),e.jsx(OX,{stroke:d,tickMargin:4,tickFormatter:e=>jC(e)}),BQ(),i&&e.jsx(bA,{content:e.jsx(KQ,{toggleData:a.length>1?e=>{u((t=>(t=>t.map((t=>t.key===e.value?Object.assign(Object.assign({},t),{hidden:!t.hidden}):t)))(t)))}:void 0})}),c.map((({key:t,color:n,hidden:r},o)=>e.jsx(CX,{dataKey:t,stroke:n,dot:!1,hide:r,activeDot:{stroke:n,strokeWidth:1,r:3},type:"monotone"},`line-${o+1}`)))]})})]}))},exports.Menu=Bfe,exports.Message=Wfe,exports.MessageHr=({text:t,color:n,style:r})=>e.jsxs(Qfe,{children:[e.jsx(Jfe,{}),e.jsx(Xfe,{color:n,style:r,children:t}),e.jsx(Jfe,{})]}),exports.Modal=epe,exports.MultiSelect=ope,exports.Notification=jJ,exports.NumberInput=n=>{var{value:r,label:o,placeholder:i,inputRef:a,iconLeft:l,iconRight:c,loading:u,fontSize:d,placeholderColor:f,disabled:p,readOnly:h,invalid:g,required:m,description:v,errorMessage:y,onChange:b}=n,w=s(n,["value","label","placeholder","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","readOnly","invalid","required","description","errorMessage","onChange"]);const[x,C]=t.useState(NaN);t.useEffect((()=>{null!=r&&x!==r&&C(r)}),[r]);const S=!Number.isNaN(x)&&null!=x;return e.jsxs(_fe,Object.assign({value:x,onChange:e=>{C(e),b&&b(e)},hasLabel:!!o,paddingRight:0,isDisabled:p,isReadOnly:h||u,isInvalid:g,isRequired:m},w,{children:[l&&A0(l,{marginRight:8}),e.jsxs(o1,{filled:S,disabled:p,children:[o,e.jsx(M0,{ref:a,placeholder:i,hide:!(S||!o),fontSize:d,placeholderColor:f,isDisabled:p})]}),c&&A0(c),u&&e.jsx(Xx,{}),e.jsxs(Rfe,{children:[e.jsx(Lfe,{slot:"increment",isDisabled:p||h,children:e.jsx(Ut,{size:o?23.5:19.5,name:"caret-up",inheritColor:!0})}),e.jsx(Ife,{}),e.jsx(Lfe,{slot:"decrement",isDisabled:p||h,children:e.jsx(Ut,{size:o?23.5:19.5,name:"caret-down",inheritColor:!0})})]}),e.jsx(e1,{description:v,errorMessage:y})]}))},exports.Options=Nde,exports.Pagination=n=>{var{onPageNav:r,page:o,totalPages:i,maxVisibleNumbers:a,width:l}=n,c=s(n,["onPageNav","page","totalPages","maxVisibleNumbers","width"]);const[u,d]=t.useState(ppe(o)||1),[f,p]=t.useState(0),h=function(e,t,n=1){let r=t?e:0;const o=t||e,i=[];for(;r<=o;)i.push(r),r+=n;return i}(1,i),g=((e,t)=>{const n=[...e],r=[];for(;n.length>0;){const e=n.splice(0,t);r.push(e)}return r})(h,ppe(a)||h.length),m=e=>{if(e>=1&&e<=i){const t=(e=>{for(let t=0;t<g.length;t++)if(g[t].includes(e))return t;return-1})(e);p(t),d(e),r(e)}},v=0!==f,y=f!==g.length-1;return e.jsxs(hpe,Object.assign({width:l},c,{children:[e.jsx(mpe,{disabled:1===u,onClick:()=>m(1),children:e.jsx(Ut,{name:"double-arrow-left",title:"first",inheritColor:!0})}),e.jsx(mpe,{disabled:1===u,onClick:()=>m(u-1),children:e.jsx(Ut,{name:"chevron-left",title:"prev",inheritColor:!0})}),g[f].map(((n,r,o)=>e.jsxs(t.Fragment,{children:[0===r&&v?e.jsx(ype,{children:"... "}):"",e.jsx(vpe,{selected:n===u,onClick:()=>m(n),children:n}),r===o.length-1&&y?e.jsx(ype,{children:" ..."}):""]},`pageIndex-${n}`))),e.jsx(mpe,{disabled:u===i,onClick:()=>m(u+1),children:e.jsx(Ut,{name:"chevron-right",title:"next",inheritColor:!0})}),e.jsx(mpe,{disabled:u===i,onClick:()=>m(i),children:e.jsx(Ut,{name:"double-arrow-right",title:"last",inheritColor:!0})})]}))},exports.PhoneInput=n=>{var{value:r,label:o,placeholder:i,inputRef:a,iconLeft:l,iconRight:c,loading:u,fontSize:d,placeholderColor:f,disabled:p,readOnly:h,invalid:g,required:m,description:v,errorMessage:y,onChange:b}=n,w=s(n,["value","label","placeholder","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","readOnly","invalid","required","description","errorMessage","onChange"]);const[x,C]=t.useState(""),S=t.useRef(null);t.useEffect((()=>{var e,t;if(null!=r&&x!==r){const n=Tde.normalize(r),o=Tde.format(n);C(o);const{current:i}=a||S;if(i&&r===Tde.normalize(r)){const n=new Event("change",{bubbles:!0}),{prototype:r}=window.HTMLInputElement;null===(t=null===(e=Object.getOwnPropertyDescriptor(r,"value"))||void 0===e?void 0:e.set)||void 0===t||t.call(i,o),i.dispatchEvent(n)}}}),[r]);return e.jsxs(Nfe,Object.assign({value:x,hasLabel:!!o,isDisabled:p,isReadOnly:h||u,isInvalid:g,isRequired:m,onChange:e=>{const t=Tde.normalize(e);if(t.length>10||e&&!t)return;const n=Tde.format(t);x!==n&&(C(n),b&&b(n,t))},type:"tel"},w,{children:[l&&A0(l,{marginRight:8}),e.jsxs(o1,{filled:!!x,disabled:p,children:[o,e.jsx(M0,{ref:a||S,placeholder:i,hide:!(x||!o),fontSize:d,placeholderColor:f,isDisabled:p})]}),c&&A0(c),u&&e.jsx(Xx,{}),e.jsx(e1,{description:v,errorMessage:y})]}))},exports.PieChart=t=>{var{size:n=200,data:r,innerRadius:o,showWhenEmpty:i}=t,a=s(t,["size","data","innerRadius","showWhenEmpty"]);const l=(null==r?void 0:r.length)>0,c=l?r:i?[{name:"1",value:1,color:"#999"}]:void 0,u=n/2-1;return e.jsx(zQ,Object.assign({width:n,height:n},a,{children:e.jsxs(DJ,{width:n,height:n,children:[e.jsx(KZ,{dataKey:"value",data:c,innerRadius:o,outerRadius:u,children:null==c?void 0:c.map((t=>e.jsx(zR,{fill:t.color||"#999"},t.name)))}),l&&BQ()]})}))},exports.Progress=({percent:t,color:n,circle:r,width:o,height:i,size:a,thickness:l=8,margin:s,marginTop:c,marginBottom:u,marginRight:d,marginLeft:f})=>{const p={margin:s,marginTop:c,marginBottom:u,marginRight:d,marginLeft:f};let h=t;return t>100?h=100:t<0&&(h=0),r?e.jsx(bpe,Object.assign({percent:h,size:a,thickness:l,color:n},p)):e.jsx(Spe,Object.assign({width:o,height:i||l},p,{children:e.jsx(kpe,{color:n,width:h})}))},exports.Radio=sfe,exports.RangeCalendar=Dfe,exports.ResetStyles=({families:r,fontFamily:o})=>(t.useEffect((()=>{var e;e=r,Yme.load({google:{families:e||["Roboto:100,300,400,500,700"]}})}),[r]),e.jsx(n.Global,{styles:{"html,body":{margin:0,fontFamily:o||"'Roboto', sans-serif",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}}})),exports.ScrollbarStyles=()=>{const{scale1:t}=n.useTheme();return e.jsx(n.Global,{styles:{"::-webkit-scrollbar":{width:8,height:8},"::-webkit-scrollbar-track":{backgroundColor:"transparent",border:"none"},"::-webkit-scrollbar-thumb:horizontal, ::-webkit-scrollbar-thumb:vertical":{backgroundColor:t,WebkitBorderRadius:6},"*":{scrollbarColor:`${t} transparent`}}})},exports.SearchInput=Xde,exports.Select=d1,exports.Slider=fC,exports.Spacer=Epe,exports.Spinner=Xx,exports.Table=Vpe,exports.Tabs=t=>{var{items:n,activeItem:r,itemWidth:o,itemGap:i,onChange:a}=t,l=s(t,["items","activeItem","itemWidth","itemGap","onChange"]);const c=n.filter((e=>!1!==e.visible));return e.jsx(Wpe,Object.assign({gap:i},l,{children:c.map((t=>{const{id:n,label:i,icon:l,iconColor:c,iconPosition:u}=t,d=s(t,["id","label","icon","iconColor","iconPosition"]);return e.jsxs(Zpe,Object.assign({active:n===r,itemWidth:o,reverse:"right"===u,onClick:()=>(e=>{a(e)})(t),gap:l?4:void 0},d,{children:[l&&e.jsx(Ut,{name:l,size:"small",color:c,inheritColor:!c}),i]}),n)}))}))},exports.TextInput=n=>{var{value:r,label:o,placeholder:i,inputRef:a,iconLeft:l,iconRight:c,loading:u,fontSize:d,placeholderColor:f,disabled:p,readOnly:h,invalid:g,required:m,description:v,errorMessage:y,onChange:b}=n,w=s(n,["value","label","placeholder","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","readOnly","invalid","required","description","errorMessage","onChange"]);const[x,C]=t.useState("");t.useEffect((()=>{null!=r&&x!==r&&C(r)}),[r]);return e.jsxs($fe,Object.assign({value:x,hasLabel:!!o,isDisabled:p,isReadOnly:h||u,isInvalid:g,isRequired:m,onChange:e=>{C(e),b&&b(e)}},w,{children:[l&&A0(l,{marginRight:8}),e.jsxs(o1,{filled:!!x,disabled:p,children:[o,e.jsx(M0,{ref:a,placeholder:i,hide:!(x||!o),fontSize:d,placeholderColor:f,isDisabled:p})]}),c&&A0(c),u&&e.jsx(Xx,{}),e.jsx(e1,{description:v,errorMessage:y})]}))},exports.TimeInput=n=>{var{value:r,label:o,inputRef:i,iconLeft:a,iconRight:l,loading:c,fontSize:u,placeholderColor:d,disabled:f,readOnly:p,invalid:h,required:g,description:m,errorMessage:v,onChange:y}=n,b=s(n,["value","label","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","readOnly","invalid","required","description","errorMessage","onChange"]);const[w,x]=t.useState(r?bs(r):null);t.useEffect((()=>{if(r){`${null==w?void 0:w.hour}:${null==w?void 0:w.minute}`!==r&&x(bs(r))}}),[r]);const C=!(w||!o);return e.jsxs(zfe,Object.assign({value:w,hasLabel:!!o,isDisabled:f,isReadOnly:p||c,isInvalid:h,isRequired:g,onChange:e=>{const{hour:t,minute:n,second:r}=e,o=new Ps(t,n,r);x(o),y&&y(e.toString())}},b,{children:[a&&A0(a,{marginRight:8}),e.jsxs(o1,{filled:!!w,disabled:f,children:[o,e.jsx(Ffe,{ref:i,hide:C,fontSize:u,placeholderColor:d,isDisabled:f,children:t=>e.jsx(xfe,{placeholderColor:d,segment:t})})]}),l&&A0(l),c&&e.jsx(Xx,{}),e.jsx(e1,{description:m,errorMessage:v})]}))},exports.ToastStyles=()=>{const{font:t,toast:r}=n.useTheme();return e.jsx(n.Global,{styles:{".Toastify__toast":{color:r.color,borderRadius:4,fontFamily:t.family.default},".Toastify__close-button":{color:r.color},".Toastify__toast--default":{background:r.background.deafult,border:`1px solid ${r.border.deafult}`},".Toastify__toast--info":{background:r.background.info,border:`1px solid ${r.border.info}`,"& .Toastify__toast-icon > svg":{fill:r.border.info}},".Toastify__toast--success":{background:r.background.success,border:`1px solid ${r.border.success}`,"& .Toastify__toast-icon > svg":{fill:r.border.success}},".Toastify__toast--warning":{background:r.background.warning,border:`1px solid ${r.border.warning}`,"& .Toastify__toast-icon > svg":{fill:r.border.warning}},".Toastify__toast--error":{background:r.background.error,border:`1px solid ${r.border.error}`,"& .Toastify__toast-icon > svg":{fill:r.border.error}},".Toastify__progress-bar--default":{background:r.border.deafult},".Toastify__progress-bar--info":{background:r.border.info},".Toastify__progress-bar--success":{background:r.border.success},".Toastify__progress-bar--warning":{background:r.border.warning},".Toastify__progress-bar--error":{background:r.border.error}}})},exports.Toggle=cfe,exports.Tooltip=_me,exports.TransferList=({items:n,onChange:r,beforeItemChange:o,listTitle:i,noItemsMessage:a="No items",hideSelectAll:l,hideRemoveAll:s,readOnly:c,width:u,margin:d,marginTop:f,marginBottom:p,marginRight:h,marginLeft:g})=>{const m=t.useRef(),[v,y]=t.useState([]),[b,w]=t.useState([]),x={margin:d,marginTop:f,marginBottom:p,marginRight:h,marginLeft:g},C=e=>{const t=Object.assign({},e);return delete t.selected,t};t.useEffect((()=>{if(!Mt(n,m.current)){m.current=n;const e=n.filter((e=>e.selected)).map(C),t=n.filter((e=>!e.selected)).map(C);w(e),y(t)}}),[n,m]),t.useEffect((()=>{r(b)}),[b]);const S=(e,t)=>{const n=n=>((e,t)=>{const n="select"===t,r=n?w:y;(n?y:w)((t=>((e,t)=>e.filter((e=>e.id!==t.id)))(t,e))),r((t=>[...t,e]))})(n||e,t);o?o(e,t,n):n()},k=e=>{const t="select"===e?y:w,n="select"===e?v:b;("select"===e?w:y)((e=>[...e,...n])),t([])},E=t=>e.jsxs("div",{style:{display:"flex",alignItems:"center",columnGap:8},children:[t.leftElement||null,t.header&&t.body?e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx(Wme,{children:t.header}),e.jsx(Zme,{children:t.body})]}):t.label,t.rightElement&&e.jsx("div",{style:{marginLeft:"auto"},children:t.rightElement})]}),O=!(l&&s);return e.jsxs(zme,Object.assign({width:u,readOnly:c},x,{children:[i&&e.jsx(Fme,{children:i}),e.jsxs(Bme,{children:[!c&&e.jsxs(Kme,{children:[O&&e.jsx(Vme,{children:v.length>0&&!l&&e.jsx(dC,{small:!0,outline:!0,onClick:()=>k("select"),icon:"arrow-right",iconPosition:"right",children:"All"})}),e.jsx(Hme,{children:v.map((t=>e.jsxs(Ume,{onClick:()=>S(t,"select"),color:t.color,children:[E(t),e.jsx(Ut,{name:"chevron-right"})]},t.id)))})]}),e.jsxs(Kme,{children:[O&&!c&&e.jsx(Vme,{children:b.length>0&&!s&&!c&&e.jsx(dC,{small:!0,outline:!0,secondary:!0,onClick:()=>k("remove"),icon:"arrow-left",children:"All"})}),c&&0===b.length?e.jsx("div",{children:a}):e.jsx(Hme,{children:b.map((t=>e.jsxs(Ume,{onClick:()=>S(t,"remove"),color:t.color,children:[E(t),e.jsx(Ut,{name:"chevron-left"})]},t.id)))})]})]})]}))},exports.colors=ove,exports.copyToClipboard=IQ,exports.darkScale=xve,exports.formatDate=(e,t)=>{if(!e)return"";const n=new Date(e);let r=t,o=!1;"object"==typeof t&&(r=t.time,o=!!t.lowercase);const i="onlyTime"===r||!1,a="withTime"===r||!1,l="relative"===r||!1,s=new Date,c=AQ(n,"EEEE"),u=AQ(n,"MMM d"),d=AQ(n,"MMM d, y"),f=AQ(n,"h:mm aaa"),p=RQ(n),h=function(e){return+PJ(e)>Date.now()}(n),g=function(e){return VJ(e,KJ(e))}(n),m=LQ(n),v=function(e){return VJ(e,MJ(KJ(e),1))}(n),y=ZJ(s,n),b=qJ(s,n),w=y>=-10&&y<=10,x=a||l?`, ${f}`:"",C=e=>{if(o){return["Just","Yesterday","Today","Tomorrow"].some((t=>e.includes(t)))?e.toLowerCase():e}return e};if(i)return C(f);if(l){if(0===y)return C("Just now");if(w)return C(h?`Today, in ${-1*y} min.`:`${y} min. ago`);if(g)return C(h?`Today${x}`:f)}return C(g?`Today${x}`:m?`Yesterday${x}`:v?`Tomorrow${x}`:0!==b||h?p?`${u}${x}`:`${d}${x}`:`${c}${x}`)},exports.lightScale=cve,exports.marginProps=Kt,exports.numberWithCommas=NQ,exports.paddingProps=Bt,exports.positionProps=Vt,exports.theme=Ave,exports.useConfirm=({header:n="Do you want to proceed?",text:r,cancelText:o="Cancel",confirmText:i="Okay",negative:a,input:l,inputLabel:s,inputPlaceholder:c,inputValue:u}={})=>{const[d,f]=t.useState(u||""),[p,h]=t.useState(null),g=()=>h(null);t.useEffect((()=>{l&&"string"==typeof u&&d!==u&&f(u)}),[p]);const m=()=>{null==p||p.resolve(!l||d),g()},v=()=>{null==p||p.resolve(!1),g()};Qe(document,"keydown",(e=>{const{key:t}=e;switch(t){case"Enter":m();break;case"Escape":v()}}),!!p,[d]);return[()=>new Promise((e=>{h({resolve:e})})),()=>e.jsxs(epe,{visible:!!p,onClose:g,width:400,children:[n&&e.jsx(epe.Header,{children:n}),r&&e.jsx(epe.Text,{children:r}),l&&e.jsx(epe.Body,{marginTop:4,marginBottom:8,children:e.jsx(Mde,{autoFocus:!0,label:s,placeholder:c,value:d,onChange:({target:e})=>f(e.value)})}),e.jsxs(epe.Footer,{children:[e.jsx(dC,{secondary:!0,marginRight:8,onClick:v,children:o}),e.jsx(dC,{negative:a,onClick:m,children:i})]})]})]},exports.useElementObserver=zt,exports.useEventListener=Qe,exports.useOnClickOutside=et,exports.usePrevious=e=>{const n=t.useRef(e);return t.useEffect((()=>{n.current=e}),[e]),n.current},exports.useSelect=_t,exports.useSelectAll=(e,n)=>{const[r,o]=t.useState([]),[i,a]=t.useState(n||!1),[l,s]=t.useState(!1),[c,u]=t.useState(0);t.useEffect((()=>{if(null==e?void 0:e.length){const t=e.map((e=>Object.assign(Object.assign({},e),{selected:n||!1})));o(t)}}),[]);return t.useEffect((()=>{const e=r.every((e=>e.selected)),t=r.some((e=>e.selected));e?(s(!1),a(!0),u(r.length)):t?(s(!0),a(!1),u(r.filter((e=>e.selected)).length)):(s(!1),a(!1),u(0))}),[r]),{list:r,partial:l,allSelected:i,count:c,onSelectAll:e=>{o((t=>t.map((t=>Object.assign(Object.assign({},t),{selected:e})))))},onChildChange:(e,t)=>{o((n=>n.map((n=>n.id===t?Object.assign(Object.assign({},n),{selected:e}):n))))}}},exports.useWindowSize=()=>{const[e,n]=t.useState({width:null,height:null});return t.useEffect((()=>{const e="undefined"==typeof window,t=()=>{e||n({width:window.innerWidth,height:window.innerHeight})};e||window.addEventListener("resize",t);const r=e?()=>null:()=>window.removeEventListener("resize",t);return t(),r}),[]),e},exports.widthHeightProps=Ft;
|
|
45
|
+
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))o.call(n,c)&&(l[c]=n[c]);if(r){a=r(n);for(var u=0;u<a.length;u++)i.call(n,a[u])&&(l[a[u]]=n[a[u]])}}return l}},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV)var r=n(2),o=n(4),i=n(3),a={};e.exports=function(e,n,l,s,c){if("production"!==t.env.NODE_ENV)for(var u in e)if(e.hasOwnProperty(u)){var d;try{r("function"==typeof e[u],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",s||"React class",l,u,typeof e[u]),d=e[u](n,u,s,l,null,i)}catch(e){d=e}if(o(!d||d instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",l,u,typeof d),d instanceof Error&&!(d.message in a)){a[d.message]=!0;var f=c?c():"";o(!1,"Failed %s type: %s%s",l,d.message,null!=f?f:"")}}}}).call(t,n(0))},function(e,t,n){var r=n(1),o=n(2),i=n(3);e.exports=function(){function e(e,t,n,r,a,l){l!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="insert",o="backspace",i=t.isInvalidKey=function(e){return"Backspace"!==e&&!/[0-9]/.test(e)},a=function(e){return e.start!==e.end};t.update=function(e,t,n){var r=a(t);return"Backspace"===n?l(e,t):function(e,t,n){return!(10===c(e).length&&!n||i(t))}(e,n,r)?s(e,t,n):{phoneNumber:e,cursorPosition:t.start}};var l=t.backspace=function(e,t){var n=t.start,r=t.end,i=e;if(!a(t)&&n>0&&e[n-1].match(/[0-9]/)&&(i=e.substring(0,n-1)+i.substring(n)),a(t)){var l=e.substring(n,r).replace(/\d/g,"");i=e.substring(0,n)+l+i.substring(r)}var s=f(e,i,t,o);return{phoneNumber:d(i),cursorPosition:s}},s=t.insert=function(e,t,n){t.start,t.end;var o=e;a(t)&&(o=u(e,n,t)),a(t)||(o=u(e,n,t));var i=f(e,o,t,r);return{phoneNumber:d(o),cursorPosition:i}},c=t.normalize=function(e){return e.replace(/\D/g,"")},u=t.insertChars=function(e,t,n){return e.substring(0,n.start)+t+e.substring(n.end)},d=t.format=function(e){var t=c(e),n=t.substring(0,3),r=t.substring(3,6),o=t.substring(6,11);return o?"("+n+") "+r+"-"+o:r?n+"-"+r:t},f=t.getCursorPosition=function(e,t,n,i){if(n.start===e.length)return d(t).length;if(0===n.start){if(i===o)return 0;if(i===r)return 1}if(i===o){var l=/[^0-9]/g;if(a(n)&&l.test(e.substring(n.start,n.end)))return n.start;if(!a(n)&&l.test(e[n.start-1]))return n.start-1}var s=e.substring(n.end).match(/[0-9]/g),c=s?s.length:0,u=d(t),f=p(u,c);return u.length-f},p=t.getCharCountFromEndWithNumbers=function(e,t){var n=e.split("");n.reverse();var r=0,o=n.reduce((function(e,n){return r===t?e:(/[0-9]/.test(n)&&r++,e+1)}),0);return r<t?0:o}}]);var Tde=Pde.exports;const Mde=t.forwardRef(((r,o)=>{var{id:i,label:a,placeholder:l,placeholderColor:c,description:u,isLoading:d,search:f,phone:p,textOnly:h,iconLeft:g,iconRight:m,invalid:v,borderRadius:y,borderColor:b,backgroundColor:w,fontSize:x,width:C,height:S,margin:k,marginLeft:E,marginRight:O,marginTop:D,marginBottom:j,padding:P,paddingLeft:T,paddingRight:M,paddingTop:A,paddingBottom:_,containerRef:R,value:L,disabled:I,readOnly:N,preventFocus:$,pointer:z,hideControls:F,onChange:B,onClick:K,onClear:V,onFocus:H,onBlur:U}=r,W=s(r,["id","label","placeholder","placeholderColor","description","isLoading","search","phone","textOnly","iconLeft","iconRight","invalid","borderRadius","borderColor","backgroundColor","fontSize","width","height","margin","marginLeft","marginRight","marginTop","marginBottom","padding","paddingLeft","paddingRight","paddingTop","paddingBottom","containerRef","value","disabled","readOnly","preventFocus","pointer","hideControls","onChange","onClick","onClear","onFocus","onBlur"]);const{focused:Z,handleFocus:q,handleBlur:G}=Fue(H,U,!$&&!N),Y=t.useRef(null),{color:X}=n.useTheme(),[J,Q]=t.useState(h?50:void 0),ee=t.useRef(null),te={margin:k,marginTop:D,marginBottom:j,marginRight:O,marginLeft:E},ne={padding:P,paddingTop:A,paddingBottom:_,paddingRight:M,paddingLeft:T};t.useLayoutEffect((()=>{if(h&&(null==ee?void 0:ee.current)){const{current:e}=ee;L&&(e.innerHTML=L.toString().replace(/ /g," "));const t=e.offsetWidth;"number"==typeof t&&Q(t+3)}}),[h,L,l,ee]);const re=h?L||l:L,oe=(!!L||"number"==typeof L)&&V&&!d;t.useEffect((()=>{var e,t;if(p&&"string"==typeof L&&10===L.length&&L===Tde.normalize(L)){const{current:n}=Y;if(n){const r=Tde.format(L),o=new Event("change",{bubbles:!0}),{prototype:i}=window.HTMLInputElement;null===(t=null===(e=Object.getOwnPropertyDescriptor(i,"value"))||void 0===e?void 0:e.set)||void 0===t||t.call(n,r),n.dispatchEvent(o)}}}),[L]);const ie=()=>{Z||q()},ae=()=>{Z&&G()},le=()=>{ie(),(null==Y?void 0:Y.current)&&Y.current.select()};t.useImperativeHandle(o,(()=>({focus:ie,blur:ae,hasFocus:Z,select:le}))),t.useEffect((()=>{var e;Z&&(null===(e=Y.current)||void 0===e||e.focus())}),[Z]);return e.jsxs(Kue,Object.assign({ref:R,invalid:v,textOnly:h,borderRadius:y,borderColor:b,backgroundColor:w,width:C,height:S,focused:Z,disabled:I,hasLabel:!!a,onClick:e=>{$||N||ie(),K&&K(e)},pointer:z,readOnly:N},te,ne,{children:[f&&e.jsx(Ut,{name:"search",marginRight:8,inheritColor:!0}),g&&A0(g,{marginRight:8}),e.jsxs(Vue,{readOnly:N||$,children:[h&&e.jsx(Rde,{ref:ee,fontSize:x,children:re}),a&&!h&&e.jsx(Hue,{htmlFor:i||a,filled:Bue(L),focused:Z,disabled:I,children:a}),e.jsx(Ade,Object.assign({id:i||a,ref:Y,value:L,placeholder:l,placeholderColor:c,onChange:e=>{if(p){const{value:t}=e.target,n=Tde.normalize(t);if(n.length>10)return;const r=Tde.format(n);B&&B(e,r,n)}else B&&B(e)},onFocus:q,onBlur:G,disabled:I,hide:!(Bue(L)||!a||Z||h),width:J,fontSize:x,hideControls:F},W))]}),m&&A0(m),d&&e.jsx(Xx,{}),oe&&e.jsx(_de,{onClick:V,children:e.jsx(Ut,{name:"close-circle-outline",color:X.brand})}),u&&e.jsx(Uue,{invalid:v,children:u})]}))})),Ade=N.input((({theme:{font:e,input:t,size:n,accent:r},fontSize:o,hide:i,disabled:a,width:l,placeholderColor:s})=>({outline:"none",border:"none",color:a?t.color.disabled:t.color.default,caretColor:r,backgroundColor:"transparent",paddingLeft:0,fontSize:o||e.size.lg,fontFamily:e.family.default,width:l||"100%",height:"100%",marginRight:n.sm,boxSizing:"border-box",opacity:i?0:1,position:i?"absolute":void 0,"&:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus, &:-webkit-autofill:active":{transition:"background-color 0s 50000s",WebkitTextFillColor:t.color.default},"&::placeholder":{color:s||t.color.placeholder,opacity:1}})),(({hideControls:e})=>e&&{"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}})),_de=N.div({height:"100%",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",marginLeft:4}),Rde=N.div((({theme:{font:e},fontSize:t})=>({position:"absolute",width:"max-content",opacity:0,fontSize:t||e.size.lg,zIndex:-1}))),Lde=N("div",{shouldForwardProp:e=>Sx(e,["maxHeight","zIndex","offsetY","offsetX","centerY","centerX","optionsPosition"])})((({theme:e,width:t,maxHeight:n,zIndex:r})=>({backgroundColor:e.options.background,borderRadius:4,boxShadow:e.elevation3,boxSizing:"border-box",fontFamily:e.font.family.default,fontSize:e.font.size.md,maxHeight:n,overflowY:"auto",width:t||"max-content",zIndex:r,"& > span > .menu-arrow":{fill:e.options.background,filter:"drop-shadow(0px 4px 2px rgba(0, 0, 0, 0.1))"},'&[data-side="bottom"] > span > .menu-arrow':{filter:"drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"}}))),Ide=N("div",{shouldForwardProp:e=>Sx(e,["selected","noSelect","contentPosition","color","accented","section"])})({border:"none",padding:"4px 16px",display:"flex",alignItems:"center",userSelect:"none",position:"relative"},(({theme:{optionItem:e,scale4:t},color:n,accented:r,selected:o,disabled:i,noSelect:a=!1})=>{const l=r?e.color.accent:e.color.inactive;return{color:i?t:n||l,cursor:i||a?"inherit":"pointer",pointerEvents:i||a?"none":"auto",backgroundColor:!a&&o?e.background.active:e.background.inactive,"&:hover":{backgroundColor:i||a?e.background.inactive:e.background.active},"&:focus":{outline:"none",backgroundColor:e.background.active},"&[data-highlighted]":{backgroundColor:e.background.active},"&[data-disabled], &[data-disabled]:hover":{color:t,backgroundColor:e.background.inactive,cursor:"inherit"}}}),(({contentPosition:e})=>({justifyContent:"start"===e||"end"===e?`flex-${e}`:e})),(({theme:e,section:t})=>t&&{backgroundColor:e.scale0,padding:"0 16px",color:e.scale6,fontWeight:e.font.weight.medium,pointerEvents:"none","&:hover":{backgroundColor:e.scale0}})),Nde=({id:n,children:o,containerRef:i,parentSelector:a,width:l,maxHeight:s=200,offsetY:c,offsetX:u,centerY:d,centerX:f,direction:p})=>{const[h,g]=t.useState(),m=t.useRef(null);t.useLayoutEffect((()=>{const{current:e}=i||m;if(e&&p){const{scrollWidth:t,scrollHeight:n}=e,r="left"===p||"right"===p;g((r?t:n<s?n:s)+((r?u:c)||4))}}),[i,p]);const v=e.jsx($de,{id:n,ref:i||m,offsetX:u,offsetY:c,width:l,maxHeight:s,centerY:d,centerX:f,optionsPosition:{direction:p,amount:h},children:o});if(a){const e=document.querySelector(a);return e?r.createPortal(v,e):v}return v};Nde.Item=t=>{var{children:n,id:r,onClick:o,selected:i,noSelect:a,contentPosition:l,color:c,accented:u,section:d}=t,f=s(t,["children","id","onClick","selected","noSelect","contentPosition","color","accented","section"]);return e.jsx(Ide,Object.assign({id:null==r?void 0:r.toString(),onClick:o,selected:i,section:d,noSelect:d||a,contentPosition:l,color:c,accented:u,tabIndex:a?-1:0},f,{children:n}))};const $de=N(Lde)((({offsetY:e,offsetX:t})=>({zIndex:2,top:e?-e:"100%",position:"absolute",left:t||void 0})),(({centerY:e,centerX:t})=>({top:e?"50%":void 0,left:t?"50%":void 0,transform:`translate(${t?"-50%":0}, ${e?"-50%":0})`})),(({optionsPosition:e})=>{const{direction:t,amount:n}=e;return t&&n?{left:"left"===t?-n:void 0,right:"right"===t?-n:void 0,top:"top"===t?-n:void 0}:{}})),zde=(e,t)=>{if(!e)return[];const{search:n,filter:r,inputText:o}=t;return n&&r&&o?e.filter((e=>{const t=e=>{if(!e)return!1;const t=o.toLowerCase();return e.toString().toLowerCase().includes(t)};let n=t(e.label);return!n&&"id"in e&&(n=t(e.id)),n||!("value"in e)||"string"!=typeof e.value&&"number"!=typeof e.value||(n=t(e.value)),!n&&"body"in e&&(n=t(e.body)),!n&&"header"in e&&(n=t(e.header)),n})):e},Fde=t=>e.jsxs(e.Fragment,{children:[t.leftElement||null,t.header&&t.body?e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx(Kde,{children:t.header}),e.jsx(Vde,{children:t.body})]}):t.label,t.rightElement&&e.jsx("div",{style:{marginLeft:"auto"},children:t.rightElement})]}),Bde=(n,r,o,i,a)=>{const{selected:l}=a,c=((t,n,r,o)=>{if(t&&t.length>0)return zde(t,o).map((t=>{var o;const i=t.onClick?e=>{t.onClick&&t.onClick(e),r()}:e=>n(t,e);return e.jsx(Nde.Item,{id:null===(o=t.id)||void 0===o?void 0:o.toString(),onClick:i,section:"section"===t.type,children:Fde(t)},t.id)}));return[]})(n,o,i,s(a,["selected"])),u=((e,n,r)=>e?xde(e).map((e=>e?t.cloneElement(e,{setValue:n,close:r}):null)):[])(r,o,i);return xde([...c,...u]).map(((e,n)=>e?t.cloneElement(e,{selected:l===n}):null))},Kde=N.div((({theme:e})=>({fontSize:e.font.size.md,color:e.scale10}))),Vde=N.div((({theme:e})=>({fontSize:e.font.size.sm,color:e.scale6}))),Hde=e=>t.Children.toArray(e).filter((e=>"string"==typeof e)).join("").trim(),Ude=r=>{var{onChange:o,onTextChange:i,afterShow:a,afterHide:l,onFocus:c,onBlur:u,onError:d,placeholder:f,placeholderColor:p,value:h,options:g,children:m,borderColor:v,backgroundColor:y,hideIcon:b,clearOnSelect:w,textOnly:x,width:C,height:S,isLoading:k,margin:E,marginTop:O,marginBottom:D,marginRight:j,marginLeft:P,label:T,id:M,name:A,trigger:_,centerY:R,centerX:L,offsetY:I,offsetX:N,direction:$,fontSize:z,description:F,disabled:B,invalid:K,search:V,filter:H,restrictInput:U,inputRef:W,optionsParent:Z}=r,q=s(r,["onChange","onTextChange","afterShow","afterHide","onFocus","onBlur","onError","placeholder","placeholderColor","value","options","children","borderColor","backgroundColor","hideIcon","clearOnSelect","textOnly","width","height","isLoading","margin","marginTop","marginBottom","marginRight","marginLeft","label","id","name","trigger","centerY","centerX","offsetY","offsetX","direction","fontSize","description","disabled","invalid","search","filter","restrictInput","inputRef","optionsParent"]);const[G,Y]=t.useState(""),[X,J]=t.useState(""),[Q,ee]=t.useState(!1),[te,ne]=t.useState(!1),[re,oe]=t.useState(!1),ie=t.useRef(null),{input:ae}=n.useTheme(),le={margin:E,marginTop:O,marginBottom:D,marginRight:j,marginLeft:P},se=e=>{e&&e.stopPropagation(),!Q&&a&&a(),Q&&l&&l(),ee((e=>!e))};t.useEffect((()=>{var e;if(Q&&V){null===(e=(W||ie).current)||void 0===e||e.focus()}}),[Q,V]),t.useEffect((()=>{d&&d(re)}),[re]),t.useEffect((()=>{i&&i(X)}),[X]);const ce=et(se,Q,Z?[Z,`${Z} *`]:void 0),ue=(e,t)=>{if(void 0===e)return!1;return e.toString().toLowerCase()===t.toLowerCase()},de=e=>{const t=ge().find((t=>{let n=ue(t.label,e);return!n&&"id"in t&&(n=ue(t.id,e)),n||!("value"in t)||"string"!=typeof t.value&&"number"!=typeof t.value||(n=ue(t.value,e)),n}));return t},fe=e=>"function"==typeof U?!U(e):U,pe=e=>he(null,e),he=(e,t)=>{let n,r=!1;if("string"==typeof e){n=(e=>{if(fe(e))return de(e)||null;return{id:jde(),label:e,value:e}})(e);const t=fe(e);null===n&&t&&(r=!0)}else{if("section"===(null==e?void 0:e.type))return;n=e}Q&&se(t),Y((null==n?void 0:n.label)||""),o&&void 0!==n&&o(n),r?oe(!0):(re&&oe(!1),w&&Y(""),J(""))};t.useEffect((()=>{""!==h&&null!=h||pe()}),[h]);const ge=()=>{const e=xde(m).map((e=>{const t=e;let n=t.props.displayText||"";return!T&&t.props.children&&(n=Hde(t.props.children)),{id:t.props.id,label:n,onClick:t.props.onClick}}));return[...zde(g||[],{search:V,filter:H,inputText:X}),...e]},me={options:ge(),select:he,open:se,close:se,searchText:V?X:void 0,isOpen:Q,isFocused:te},[ve,ye]=_t(me),be=Bde(g||[],m,he,se,{selected:ve,search:V,filter:H,inputText:X}),we=Q?"caret-up":"caret-down",xe=x&&!B?p||ae.color.default:void 0,Ce=s(q,["onClear","phone"]);return e.jsx(Wde,Object.assign({textOnly:x,altTrigger:!!_,width:C,height:S,focused:te,search:V},le,{children:e.jsxs(Zde,{ref:ce,children:[_?e.jsx(qde,{id:M,onClick:se,tabIndex:0,onFocus:()=>ne(!0),onBlur:()=>ne(!1),children:_}):e.jsx(Yde,{shake:re,children:e.jsx(Mde,Object.assign({},Ce,{ref:W||ie,id:M,name:A,label:T,fontSize:z,pointer:!0,preventFocus:!V,value:X||h||G,placeholder:f||"Select",placeholderColor:xe,iconRight:b||k?void 0:we,borderColor:v,backgroundColor:y,isLoading:k,textOnly:x,description:F,disabled:B,invalid:re||K,onClick:se,onChange:e=>{var t;const{value:n}=e.target,r=null===(t=(W||ie).current)||void 0===t?void 0:t.hasFocus;V?(J(n),!Q&&r&&ee(!0),re&&oe(!1)):n||pe(e);const o=de(n),i=fe(n),a=""===n||i&&!r;o&&!(V&&(!i||r))?he(o,e):V&&!a||pe(e)},onFocus:e=>{ne(!0),c&&c(e)},onBlur:e=>{var t;if(ne(!1),u&&u(e),V&&X&&e){const{relatedTarget:n}=e;(null===(t=null==ye?void 0:ye.current)||void 0===t?void 0:t.contains(n))||he(X,e)}}}))}),Q&&be.length>0&&e.jsx(Nde,{containerRef:ye,parentSelector:Z,width:!_&&!x||Z?"100%":void 0,centerY:R,centerX:L,offsetY:I,offsetX:N,direction:$,children:be})]})}))};Ude.Item=({value:t,displayText:n,setValue:r,close:o,children:i,contentPosition:a,color:l,accented:s,onClick:c,id:u,section:d})=>{const f=c?e=>{c&&c(e),o&&o()}:e=>{const o={id:u,label:n||Hde(i)||"",value:t};r&&r(o,e)};return e.jsx(Nde.Item,{id:u,contentPosition:a,color:l,onClick:f,accented:s,section:d,children:i})};const Wde=N.div({display:"flex",boxSizing:"border-box"},(({theme:{accent:e},focused:t,search:n,altTrigger:r,textOnly:o})=>({width:r||o?"max-content":"100%",flexDirection:"column",outline:!t||n||r?void 0:`${e} solid 1px`})),Ft,Kt),Zde=N.div({position:"relative",width:"100%",height:"inherit"}),qde=N.div((({theme:{accent:e}})=>({display:"flex",height:"inherit","&:focus-visible":{outline:`${e} solid 1px`,outlineOffset:-1}}))),Gde=n.keyframes({"10%":{transform:"translate3d(-1px, 0, 0)"},"30%":{transform:"translate3d(2px, 0, 0)"},"50%":{transform:"translate3d(-2px, 0, 0)"},"70%":{transform:"translate3d(2px, 0, 0)"},"90%":{transform:"translate3d(-1px, 0, 0)"}}),Yde=N.div((({shake:e})=>({"& input":{animation:e?`${Gde} .5s linear`:void 0}}))),Xde=(e,t)=>{if(!t||!e)return!0;return new RegExp(t).test(e)},Jde=r=>{var{value:o,label:i,placeholder:a,inputRef:l,iconLeft:c,iconRight:u,loading:d,fontSize:f,placeholderColor:p,disabled:h,readOnly:g,invalid:m,required:v,description:y,errorMessage:b,accepts:w,onChange:x}=r,C=s(r,["value","label","placeholder","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","readOnly","invalid","required","description","errorMessage","accepts","onChange"]);const{color:S}=n.useTheme(),[k,E]=t.useState("");t.useEffect((()=>{null!=o&&k!==o&&E(o)}),[o]);return e.jsxs(Qde,Object.assign({value:k,hasLabel:!!i,isDisabled:h,isReadOnly:g||d,isInvalid:m,isRequired:v,onChange:e=>{Xde(e,w)&&(E(e),x&&x(e))}},C,{children:[c&&A0(c,{marginRight:8}),e.jsx(Ut,{name:"search",inheritColor:!0,marginRight:8}),e.jsxs(o1,{filled:!!k,disabled:h,children:[i,e.jsx(M0,{ref:l,placeholder:a,hide:!(k||!i),fontSize:f,placeholderColor:p,isDisabled:h})]}),u&&A0(u),d&&e.jsx(Xx,{}),!!k&&!d&&e.jsx(Vx,{children:e.jsx(Ut,{name:"close-circle-outline",color:S.brand})}),e.jsx(e1,{description:y,errorMessage:b})]}))},Qde=N(zw)(QQ),efe=(e,t)=>{const n=e=>{if(!e)return!1;const n=t.toLowerCase();return e.toString().toLowerCase().includes(n)};return e.reduce(((e,r)=>{if("options"in r){const n=efe(r.options,t);n.length>0&&e.push(Object.assign(Object.assign({},r),{options:n}))}else{let t=n(r.value);!t&&"id"in r&&(t=n(r.id)),!t&&"body"in r&&(t=n(r.body)),!t&&"header"in r&&(t=n(r.header)),t&&e.push(r)}return e}),[])},tfe=N.div(QQ),nfe=N.div(Ex),rfe=N.span((({theme:{font:e,scale10:t}})=>({fontSize:e.size.md,color:t}))),ofe=N.div((({gap:e})=>({display:"flex",alignItems:"center",gap:e||4}))),ife=N.div((({theme:e})=>({color:e.scale10}))),afe=N.div((({theme:e})=>({textAlign:"center",color:e.scale8,paddingTop:4,paddingBottom:8}))),lfe=N.div((({clampLines:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:e?void 0:"nowrap",WebkitLineClamp:e,display:e?"-webkit-box":void 0,WebkitBoxOrient:e?"vertical":void 0,wordBreak:e?"break-word":void 0})),(({width:e})=>({width:e||"auto"})),Bt,Kt),sfe=N.div({display:"grid"},(({rows:e,rowGap:t,columns:n,columnGap:r,gap:o,template:i,alignContent:a,alignItems:l,justifyContent:s,justifyItems:c,width:u,height:d})=>({gridTemplateColumns:"number"==typeof n?`repeat(${n}, 1fr)`:n,gridTemplateRows:"number"==typeof e?`repeat(${e}, 1fr)`:e,gridColumnGap:r,gridRowGap:t,gridGap:o,gridTemplate:i,alignItems:l,justifyItems:c,alignContent:a,justifyContent:s,width:u,height:d})),(({columns:e})=>"equal"===e&&{gridTemplateColumns:"unset",gridAutoColumns:"1fr",gridAutoFlow:"column"}),Bt,Kt);sfe.Item=N.div((({row:e,rowStart:t,rowEnd:n,column:r,columnStart:o,columnEnd:i,area:a,alignSelf:l,justifySelf:s,placeSelf:c,border:u})=>({gridRow:e,gridRowStart:t,gridRowEnd:n,gridColumn:r,gridColumnStart:o,gridColumnEnd:i,gridArea:a,alignSelf:l,justifySelf:s,placeSelf:c,border:u})),Bt,Kt);const cfe=t=>{var{id:n,label:r,labelPosition:o,checked:i,disabled:a,margin:l,marginTop:c,marginBottom:u,marginRight:d,marginLeft:f}=t,p=s(t,["id","label","labelPosition","checked","disabled","margin","marginTop","marginBottom","marginRight","marginLeft"]);const h="right"===o,g={margin:l,marginTop:c,marginBottom:u,marginRight:d,marginLeft:f};return e.jsxs(Dx,Object.assign({htmlFor:n,labelRight:h,disabled:a},g,{children:[r&&e.jsx(Px,{children:r}),e.jsx(jx,Object.assign({id:n,type:"radio",checked:i,disabled:a},p)),e.jsx(Ut,{name:"radio-button",marginLeft:r&&!h?8:0,marginRight:r&&h?8:0,pointer:!a})]}))},ufe=n=>{var{id:r,label:o,labelPosition:i,checked:a,disabled:l,onChange:c,margin:u,marginTop:d,marginBottom:f,marginRight:p,marginLeft:h}=n,g=s(n,["id","label","labelPosition","checked","disabled","onChange","margin","marginTop","marginBottom","marginRight","marginLeft"]);const[m,v]=t.useState("toggle-off"),[y,b]=t.useState(a||!1),w="right"===i,x={margin:u,marginTop:d,marginBottom:f,marginRight:p,marginLeft:h};return t.useEffect((()=>{v(y?"toggle-on":"toggle-off")}),[y]),t.useEffect((()=>{b("boolean"==typeof a?a:y)}),[a,y]),e.jsxs(Dx,Object.assign({htmlFor:r,labelRight:w,disabled:l},x,{children:[o&&e.jsx(Px,{children:o}),e.jsx(jx,Object.assign({id:r,type:"checkbox",checked:y,disabled:l,onChange:()=>{const e=!y;b(e),c(e)}},g)),e.jsx(Ut,{name:m,marginLeft:o&&!w?8:0,marginRight:o&&w?8:0,pointer:!l,size:40})]}))},dfe=t=>{var{children:n,iconLeft:r,iconRight:o,disabled:i,pill:a}=t,l=s(t,["children","iconLeft","iconRight","disabled","pill"]);return e.jsxs(ffe,Object.assign({as:a?void 0:"label",disabled:i,rightIcon:!!o,pill:a},l,{children:[r&&A0(r,{marginRight:4,size:"small"}),n,o&&A0(o,{marginLeft:4,size:"small"})]}))},ffe=N.div((({theme:e,disabled:t,pill:n})=>({display:"flex",alignItems:"center",width:"max-content",color:t?e.scale4:e.scale10,cursor:"default",fontSize:n?e.font.size.sm:e.font.size.md,fontWeight:n?e.font.weight.medium:e.font.weight.default,fontFamily:e.font.family.default})),(({theme:e,disabled:t,pill:n,rightIcon:r})=>n&&{borderRadius:40,padding:`2px ${e.size.sm}px`,paddingRight:r?e.size.xs:void 0,backgroundColor:t?e.scale0:e.scale1,"&:hover":{backgroundColor:t||!n?void 0:e.scale2}}),Kt),pfe=t=>{var{children:n,rows:r,columns:o,rowGap:i,columnGap:a,onSubmit:l}=t,c=s(t,["children","rows","columns","rowGap","columnGap","onSubmit"]);return e.jsx(hfe,Object.assign({as:"form",rows:r,columns:o,rowGap:i,columnGap:a,onSubmit:e=>{l?l(e):e.preventDefault()}},c,{children:n}))};pfe.Group=t=>{var{children:n,rows:r,columns:o,rowGap:i,columnGap:a,disabled:l}=t,c=s(t,["children","rows","columns","rowGap","columnGap","disabled"]);return e.jsx(gfe,Object.assign({rows:r,columns:o,rowGap:i,columnGap:a,disabled:l},c,{children:n}))},pfe.Field=t=>{var{children:n,inline:r,align:o,disabled:i}=t,a=s(t,["children","inline","align","disabled"]);return e.jsx(mfe,Object.assign({},a,{inline:r,align:o,disabled:i,children:n}))},pfe.Input=Mde,pfe.Dropdown=Ude,pfe.Radio=cfe,pfe.Toggle=ufe,pfe.Checkbox=Tx,pfe.Label=dfe;const hfe=N(sfe)({boxSizing:"border-box"}),gfe=N(sfe)((({disabled:e})=>e&&{opacity:.3,pointerEvents:"none"})),mfe=N.div((({inline:e,align:t})=>({display:"flex",flexDirection:e?"row":"column",alignItems:t?{top:"flex-start",bottom:"flex-end",center:"center"}[t]:void 0})),(({disabled:e})=>e&&{opacity:.3,pointerEvents:"none"}),Kt),vfe=N.div((({prevNext:e,opacity:t})=>({width:"100%",height:"100%",backgroundColor:`rgba(0, 0, 0, ${null!=t?t:.3})`,position:"fixed",top:0,left:0,display:"grid",gridTemplateColumns:e?"auto 1fr auto":"1fr",justifyContent:"space-between",alignItems:"center",zIndex:1e4,userSelect:"none",borderRadius:5}))),yfe=N.div({position:"absolute",top:0,right:0,display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",width:50,height:50,zIndex:1}),bfe=N.div((({next:e})=>({display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",width:50,height:"100%",backgroundColor:"transparent",left:e?void 0:0,right:e?0:void 0,zIndex:0,"&:hover":{background:`linear-gradient(90deg, rgba(0,0,0,${e?0:.4}) 0%, rgba(0,0,0,${e?.4:0}) 100%)`}}))),wfe=N.img((({maxWidth:e,maxHeight:t})=>({display:"block",justifySelf:"center",maxWidth:e||"100%",maxHeight:t||"100%"}))),xfe=N.code((({theme:e})=>({fontFamily:"source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace",color:e.scale10,backgroundColor:e.scale1,borderRadius:e.size.xs,padding:"2px 4px"}))),Cfe=N(rw)((({theme:e,placeholderColor:t})=>({outline:"none",borderRadius:4,padding:"0 2px","&[data-focused]":{backgroundColor:e.calendar.background.activeRange},"&[data-placeholder]":{color:t||e.input.color.placeholder},'&[data-type="literal"]':{padding:0,color:t||e.input.color.placeholder},'&[data-type="dayPeriod"]':{textTransform:"lowercase"}}))),Sfe=N(Vx)((({theme:{input:e},isDisabled:t})=>({color:t?e.labelColor.disabled:e.labelColor.default}))),kfe=b1(),Efe=N(cw)(QQ),Ofe=N(tw,P0)({display:"flex"},T0),Dfe=b1(),jfe=n=>{var{startDate:r,endDate:o,onChange:i,preventPast:a,preventFuture:l,noShadow:c}=n,u=s(n,["startDate","endDate","onChange","preventPast","preventFuture","noShadow"]);const{current:d}=t.useRef(r?x1(r):Dfe),{current:f}=t.useRef(o?x1(o):d),[p,h]=t.useState(d),[g,m]=t.useState(f),[v,y]=t.useState(d),{min:b,max:w}=C1({past:a,future:l,rel:d});return e.jsxs(Pfe,Object.assign({value:{start:p,end:g},onChange:e=>{const{start:t,end:n}=e,{year:r,month:o,day:a}=t,{year:l,month:s,day:c}=n,u=new Ds(r,o,a);h(u);const d=new Ds(l,s,c);m(d);const f=w1(t),p=w1(n);i&&i(f,p)},minValue:b,maxValue:w,noShadow:c,focusedValue:v,onFocusChange:y},u,{children:[e.jsx(g1,{date:v,setDate:y}),e.jsx(qQ,{range:!0})]}))},Pfe=N(Ry)(ZQ),Tfe=b1(),Mfe=N(dw)(QQ),Afe=N(tw,P0)(T0,{display:"flex","&:first-of-type":{marginRight:0}}),_fe=N(Mb,P0)((({theme:{input:e,font:t},hide:n,fontSize:r,isDisabled:o})=>({display:"flex",alignItems:"center",gap:4,"& > span":{color:o?e.color.disabled:e.color.default,fontSize:r||t.size.lg},"&:not(:focus):not(:focus-within)":{opacity:n?0:1,position:n?"absolute":void 0}}))),Rfe=N(Iw)(QQ),Lfe=N.div((({theme:e})=>({display:"flex",flexDirection:"column",justifyContent:"space-between",borderLeft:e.defaultBorder,overflow:"hidden",borderTopRightRadius:4,borderBottomRightRadius:4}))),Ife=N(Vx)((({theme:e,isDisabled:t})=>({height:"100%",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:0,color:t?e.scale4:void 0,pointerEvents:t?"none":void 0,"&:hover":{backgroundColor:t?void 0:e.scale1},"&:active":{backgroundColor:e.scale0}}))),Nfe=N.div((({theme:e})=>({height:1,width:"100%",backgroundColor:e.scale1}))),$fe=N(Cx)(QQ),zfe=N(Cx)(QQ),Ffe=N(Xb)(QQ),Bfe=N(tw,P0)({display:"flex"},T0),Kfe=({vertical:n,width:r,height:o,padding:i,paddingTop:a,paddingBottom:l,paddingLeft:s,paddingRight:c,border:u,borderTop:d,borderBottom:f,borderLeft:p,borderRight:h,borderTopLeftRadius:g,borderTopRightRadius:m,borderBottomLeftRadius:v,borderBottomRightRadius:y,backgroundColor:b,children:w})=>e.jsx(Vfe,{vertical:n,width:r,height:o,padding:i,paddingTop:a,paddingBottom:l,paddingLeft:s,paddingRight:c,border:u,borderTop:d,borderBottom:f,borderLeft:p,borderRight:h,borderTopLeftRadius:g,borderTopRightRadius:m,borderBottomLeftRadius:v,borderBottomRightRadius:y,backgroundColor:b,role:"menu",children:w?xde(w).map((e=>e?t.cloneElement(e,{vertical:n,backgroundColor:b}):null)):null}),Vfe=N.div((({theme:{menu:e},vertical:t,backgroundColor:n,width:r,height:o})=>({display:"flex",flexFlow:t?"column":"row",overflowY:t?"auto":void 0,backgroundColor:n||e.background,padding:t?"16px 0":"0 16px",width:r,height:o})),(({theme:{defaultBorder:e},border:t,borderTop:n,borderBottom:r,borderLeft:o,borderRight:i,borderTopLeftRadius:a,borderTopRightRadius:l,borderBottomLeftRadius:s,borderBottomRightRadius:c})=>({border:t?e:void 0,borderTop:n?e:void 0,borderBottom:r?e:void 0,borderLeft:o?e:void 0,borderRight:i?e:void 0,borderTopLeftRadius:a,borderTopRightRadius:l,borderBottomLeftRadius:s,borderBottomRightRadius:c})),Bt),Hfe=N.button({userSelect:"none",border:"none",display:"flex",alignItems:"center"},(({theme:{accent:e,font:t,menuItem:n},selected:r,vertical:o,disabled:i,indent:a=1})=>({color:r?n.color.active:n.color.inactive,backgroundColor:r?n.background.active:n.background.inactive,borderLeft:o?"4px solid transparent":void 0,borderLeftColor:o&&r?n.borderColor:void 0,borderBottom:o?void 0:"4px solid transparent",borderBottomColor:!o&&r?n.borderColor:void 0,cursor:i?"not-allowed":"pointer",fontSize:t.size.lg,padding:o?`0 0 0 ${32*a}px`:"0 16px",minHeight:40,"&:hover":{backgroundColor:n.background.hover,color:n.color.hover},"&:focus-visible":{outline:`${e} solid 1px`,outlineOffset:-1}})),(({contentPosition:e})=>({justifyContent:"start"===e||"end"===e?`flex-${e}`:e}))),Ufe=N.div((({theme:e,backgroundColor:t})=>({display:"flex",flexDirection:"column",backgroundColor:t||e.menu.background}))),Wfe=N.div({marginLeft:"auto",marginRight:8});Kfe.Item=({vertical:t,selected:n,disabled:r,contentPosition:o,onClick:i,id:a,children:l,indent:s=1})=>e.jsx(Hfe,{vertical:t,selected:n,disabled:r,contentPosition:o,onClick:i,id:a,role:"menuitem",indent:s,children:l}),Kfe.Group=({label:n,defaultOpen:r,vertical:o,selected:i,disabled:a,contentPosition:l,onClick:s,id:c,children:u,indent:d=1,backgroundColor:f})=>{const[p,h]=t.useState(r||i),g=e=>xde(e).map((e=>{if(t.isValidElement(e)){const n=e;return n.props.selected&&!p&&h(!0),Array.isArray(n.props.children)&&g(n.props.children),t.cloneElement(e,{vertical:o,indent:d+1,backgroundColor:f})}return null})),m=g(u),v=()=>h((e=>!e));return e.jsxs(Ufe,{backgroundColor:f,children:[e.jsxs(Hfe,{vertical:o,selected:i||!1,disabled:a,contentPosition:l,onClick:e=>{s?(s(e),p||v()):v()},id:c,role:"menuitem",indent:d,children:[n,e.jsx(Wfe,{onClick:e=>{e.stopPropagation(),v()},children:e.jsx(Ut,{name:p?"chevron-up":"chevron-down",pointer:!0})})]}),p&&m]})};const Zfe=({type:t,content:r,closeIcon:o,onClose:i,width:a,margin:l,marginTop:s,marginBottom:c,marginRight:u,marginLeft:d,children:f})=>{const p=n.useTheme(),{iconName:h,borderColor:g,backgroundColor:m}=((e,t)=>{const{color:n}=t;switch(e){case"info":return{iconName:"info",borderColor:n.brand,backgroundColor:n.brandTint2};case"error":return{iconName:"warning",borderColor:n.error,backgroundColor:n.errorTint2};case"success":return{iconName:"check-circle",borderColor:n.success,backgroundColor:n.successTint2};case"warning":return{iconName:"warning",borderColor:n.warning,backgroundColor:n.warningTint2};default:return{iconName:"info",borderColor:t.scale8,backgroundColor:t.scale0}}})(t||"",p),v={margin:l,marginTop:s,marginBottom:c,marginRight:u,marginLeft:d};return e.jsxs(Yfe,Object.assign({borderColor:g,backgroundColor:m,width:a,showingClose:o},v,{children:[e.jsx(Ut,{name:h,style:{marginRight:10},color:g}),e.jsx(Xfe,{children:r||f}),o&&e.jsx(Ut,{name:"close",onClick:i,pointer:!0,color:p.scale8,hoverColor:p.scale10,marginLeft:"auto"})]}))},qfe=N.div((({theme:e})=>({fontWeight:e.font.weight.medium}))),Gfe=N.div((({theme:e})=>({fontWeight:e.font.weight.default})));Zfe.Header=qfe,Zfe.Body=Gfe;const Yfe=N.div((({theme:e,borderColor:t,backgroundColor:n,width:r})=>({width:r,display:"flex",alignItems:"center",margin:"10px 0",position:"relative",padding:`${e.size.sm}px ${e.size.md}px`,border:"1px solid",borderColor:t,borderRadius:e.size.xs,backgroundColor:n,color:e.scale10,fontSize:e.font.size.sm,"& a":{textDecoration:"none",color:e.accent,"&:hover":{textDecoration:"underline"}}})),(({theme:e,showingClose:t})=>({paddingRight:t?e.size.sm:void 0})),Kt),Xfe=N.div({width:"100%"}),Jfe=N.div((({color:e})=>({fontSize:12,padding:"0 5px",color:e}))),Qfe=N.div((({theme:e})=>({height:1,backgroundColor:e.scale4,width:"100%"}))),epe=N.div({display:"grid",gridTemplateColumns:"1fr auto 1fr",alignItems:"center",padding:"10px 0"}),tpe=({children:n,rootSelector:o,visible:i,width:a,height:l,onClose:s,closeIcon:c,preventOverlayClose:u,overlayBlur:d,overlayColor:f,backgroundColor:p,small:h,noOverlay:g,centerX:m,centerY:v,position:y,top:b,bottom:w,right:x,left:C,padding:S,paddingTop:k,paddingBottom:E,paddingRight:O,paddingLeft:D,zIndex:j})=>{const P=et(u?()=>null:s,i),T={padding:S,paddingTop:k,paddingBottom:E,paddingRight:O,paddingLeft:D},M=xde(n).map((e=>e?t.cloneElement(e,{inline:h}):null)),A=e.jsx(ope,{color:f,noOverlay:g,centerX:m,centerY:v,position:y,top:b,bottom:w,right:x,left:C,zIndex:j,blur:d,children:e.jsxs(npe,Object.assign({ref:P,width:a,height:l,backgroundColor:p,small:h,noOverlay:g,centerX:m,centerY:v},T,{children:[M,c&&e.jsx(rpe,{inline:h,children:e.jsx(Ut,{name:"close",onClick:s,pointer:!0})})]}))}),_=document.querySelector(o||"#root");return i&&_?r.createPortal(A,_):null};tpe.Header=N.div((({theme:e})=>({color:e.modal.color.header,fontSize:e.font.size.xl,marginBottom:8}))),tpe.Text=N.div((({theme:e,primary:t,fontSize:n})=>({color:t?e.modal.color.header:e.modal.color.body,fontSize:n||e.font.size.lg}))),tpe.Body=N.div((({height:e})=>({height:e,overflow:e?"auto":void 0})),Kt),tpe.Footer=N.div((({justify:e="end",inline:t})=>({display:"flex",alignItems:"center",justifyContent:e?{start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between"}[e]:void 0,marginTop:t?void 0:8})),Kt);const npe=N.div((({theme:e,width:t,height:n,backgroundColor:r,small:o})=>({display:"flex",flexDirection:o?"row":"column",alignItems:o?"center":void 0,backgroundColor:r||e.modal.background,boxShadow:e.elevation3,width:t||"max-content",height:n||"max-content",borderRadius:e.size.xs,padding:o?e.size.md:e.size.lg})),(({noOverlay:e})=>!e&&{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)"}),(({centerX:e,centerY:t})=>(e||t)&&{position:"absolute",top:t?"50%":void 0,left:e?"50%":void 0,transform:`translate(${e?"-50%":"0"}, ${t?"-50%":"0"})`}),Bt),rpe=N.div({display:"flex",justifyContent:"center",alignItems:"center"},(({inline:e})=>e?{marginLeft:16}:{position:"absolute",top:8,right:8})),ope=N.div((({color:e,blur:t,noOverlay:n,centerX:r,centerY:o,position:i,top:a,bottom:l,right:s,left:c,zIndex:u})=>({position:i||"absolute",top:a||(c||l||s?void 0:0),left:c||(a||l||s?void 0:0),bottom:l,right:s,width:n&&!r?void 0:"100%",height:n&&!o?void 0:"100%",zIndex:u||100,backgroundColor:n?void 0:e||"rgba(0, 0, 0, 0.2)",backdropFilter:"number"==typeof t&&`blur(${t}px)`||!0===t&&"blur(5px)"||"none"}))),ipe=t.forwardRef(((o,i)=>{var{children:a,options:l,items:c,listLabel:u,listText:d,itemsTitle:f,maxItems:p,placeholder:h,width:g,filter:m,restrictInput:v,disabled:y,hideItemsInfo:b,optionsParent:w,compact:x,backgroundColor:C,borderless:S,addItem:k,removeItem:E,onTextChange:O,autoFocus:D}=o,j=s(o,["children","options","items","listLabel","listText","itemsTitle","maxItems","placeholder","width","filter","restrictInput","disabled","hideItemsInfo","optionsParent","compact","backgroundColor","borderless","addItem","removeItem","onTextChange","autoFocus"]);const[P,T]=t.useState(D||!1),[M,A]=t.useState(!1),[_,R]=t.useState(""),{color:L,font:I,input:N}=n.useTheme(),$=et((()=>T(!1)),P,w?[w,`${w} *`]:void 0),z=t.useRef(null),F=x&&!!u,B=e=>{e&&k(e)},K=()=>{const{current:e}=z;P||u||T(!0),null==e||e.focus()},V=()=>{const{current:e}=z;e&&e.blur()};t.useImperativeHandle(i,(()=>({focus:K,blur:V})));const H=e=>{R(e),O&&O(e)};t.useEffect((()=>{P||V()}),[P]);Qe(document,"keydown",(e=>{const{key:t,altKey:n,ctrlKey:r,metaKey:o}=e;if(!(n||r||o)&&t&&"Backspace"===t)if(c.length>0){e.preventDefault();const t=c[c.length-1];E(t)}}),P&&!_,[c]);const U=l.filter((e=>!c.find((t=>t.id===e.id)))),W=t.useMemo((()=>`multi-select-${jde()}`),[]),Z=t.useMemo((()=>`multi-select-list-${jde()}`),[]),q=p?c.length>=p:void 0,G=y||!P||q,Y=()=>{const t=e.jsxs(cpe,{id:Z,expanded:P,padTop:P&&c.length>0,labeled:!!u,children:[d&&e.jsx(upe,{expanded:P,labeled:!!u,children:d}),a?a(P,!!y):c.map((t=>e.jsx(dfe,{pill:!0,iconRight:P&&!y?e.jsx(Ut,{name:"close-circle",onClick:()=>E(t),pointer:!0}):void 0,disabled:y,children:t.label},t.id))),e.jsx(Ude,Object.assign({},j,{textOnly:!0,hideIcon:!0,clearOnSelect:!0,search:!0,filter:m,backgroundColor:"transparent",restrictInput:v,options:U,fontSize:I.size.md,placeholder:y||c.length>0?" ":h||"Search...",placeholderColor:N.color.placeholder,inputRef:z,onChange:B,onTextChange:H,onError:e=>A(e),disabled:G,optionsParent:w?`#${Z}`:`#${W}`,autoFocus:D}))]});if(w){const e=document.querySelector(w);return e?r.createPortal(t,e):t}return t};return e.jsxs(ape,{width:g,ref:$,labeled:!!u,disabled:y,collapse:F,onClick:e=>{e.stopPropagation(),K()},children:[e.jsxs(lpe,{collapse:F,id:W,expanded:P&&c.length>0,error:M,labeled:!!u,backgroundColor:C,borderless:S,children:[u?e.jsx(spe,{collapse:F,children:u}):Y(),e.jsxs(dpe,{children:[p&&!b&&e.jsx(ppe,{children:y&&f?e.jsxs(e.Fragment,{children:[c.length," ",f]}):e.jsxs(e.Fragment,{children:[e.jsx(fpe,{error:c.length>=p,children:c.length}),"/",p," ",f]})}),c.length>0&&e.jsx(Ut,{name:P?"chevron-up":"chevron-down",color:L.brand,pointer:!0,onClick:e=>{e.stopPropagation(),T(!P)}})]})]}),u&&P&&Y()]})})),ape=N.div((({width:e,disabled:t,labeled:n,collapse:r})=>({width:e,minWidth:200,height:r?62:41,position:"relative",cursor:n||t?"default":"text"}))),lpe=N.div((({theme:e,expanded:t,error:n,labeled:r,collapse:o,backgroundColor:i,borderless:a})=>({display:"grid",gridTemplateColumns:o?void 0:"1fr auto",alignItems:t&&!r?"flex-start":"center",columnGap:24,width:"100%",minHeight:41,position:"absolute",top:0,left:0,backgroundColor:i||e.background0,zIndex:t?1:void 0,borderBottom:n?`1px solid ${e.color.error}`:e.defaultBorder,border:a?"none":void 0,padding:"8px 16px"}))),spe=N.div((({theme:e,collapse:t})=>({textAlign:t?void 0:"center",fontSize:e.font.size.md,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}))),cpe=N.div((({theme:e,expanded:t,padTop:n})=>({display:"flex",alignItems:"center",width:"100%",overflow:t?void 0:"hidden",pointerEvents:t?void 0:"none",flexWrap:t?"wrap":void 0,paddingTop:n?1:void 0,columnGap:e.size.sm,rowGap:e.size.sm,"& > *":{flexShrink:0}})),(({theme:e,labeled:t,expanded:n})=>t&&n?{backgroundColor:e.background0,position:"absolute",top:"100%",zIndex:1,padding:"8px 0px",borderBottom:e.defaultBorder}:{})),upe=N.div((({theme:e,expanded:t,labeled:n})=>({fontSize:e.font.size.sm,fontWeight:e.font.weight.medium,color:e.scale8,paddingLeft:t&&n?16:void 0}))),dpe=N.div((({theme:{size:e}})=>({display:"flex",alignItems:"center",columnGap:e.sm,whiteSpace:"nowrap"}))),fpe=N.div((({theme:e,error:t})=>({color:t?e.color.error:e.scale8}))),ppe=N.div((({theme:e})=>({display:"flex",color:e.scale4,fontSize:e.font.size.sm}))),hpe=e=>e?+e:0,gpe=N.nav({display:"flex",justifyContent:"space-between",alignItems:"center",columnGap:4},(({width:e})=>({width:e||"max-content"})),Kt),mpe=N.button((({theme:e,disabled:t})=>({border:"none",borderRadius:e.size.xs,backgroundColor:"transparent","&:hover":{backgroundColor:t?void 0:e.scale1,color:t?void 0:e.scale10},"&:focus-visible":{outline:`${e.accent} solid 1px`,outlineOffset:-1}}))),vpe=N(mpe)((({theme:e,disabled:t})=>({color:t?e.scale4:e.scale8,cursor:t?"default":"pointer"}))),ype=N(mpe)((({theme:e,selected:t})=>({color:t?e.scale10:e.scale6,backgroundColor:t?e.scale0:void 0,fontSize:e.font.size.sm,cursor:"pointer",width:"max-content",minWidth:e.size.lg,height:e.size.lg,padding:0}))),bpe=N.span((({theme:e})=>({color:e.scale6}))),wpe=({percent:t,size:n=24,thickness:r=2,color:o,margin:i,marginTop:a,marginBottom:l,marginRight:s,marginLeft:c})=>{const u={margin:i,marginTop:a,marginBottom:l,marginRight:s,marginLeft:c},d=(n-r)/2,f=d*Math.PI*2,p=f-f*t/100,h=n/2;return e.jsxs(xpe,Object.assign({size:n},u,{children:[e.jsx(Cpe,{cx:h,cy:h,r:d,thickness:r}),e.jsx(Spe,{color:o,cx:h,cy:h,r:d,thickness:r,transform:`rotate(-90 ${h} ${h})`,circ:f,complete:p})]}))},xpe=N.svg((({size:e})=>({display:"block",width:e,height:e})),Kt),Cpe=N.circle((({theme:e,thickness:t})=>({fill:"none",stroke:e.scale1,strokeWidth:t}))),Spe=N(Cpe)((({theme:e,color:t,circ:n,complete:r})=>({stroke:t||e.color.brand,strokeDasharray:n,strokeDashoffset:r,transition:"stroke-dashoffset 0.5s"}))),kpe=N.div((({theme:e,width:t,height:n})=>({backgroundColor:e.scale1,borderRadius:24,width:t||"100%",height:n,overflow:"hidden"})),Kt),Epe=N.div((({theme:e,color:t,width:n})=>({backgroundColor:t||e.color.brand,width:`${n}%`,height:"100%",transition:"width 0.5s"}))),Ope=N.div(Ft),Dpe=e=>"number"==typeof e?e:"string"==typeof e?parseInt(e.replace("px",""),10):0,jpe=e=>{const t={top:0,right:0,bottom:0,left:0},{padding:n,paddingTop:r,paddingRight:o,paddingBottom:i,paddingLeft:a}=e;if(n){const e=("string"==typeof n?n:n.toString()).split(" ").map(Dpe);switch(e.length){case 1:t.top=t.right=t.bottom=t.left=e[0];break;case 2:t.top=t.bottom=e[0],t.right=t.left=e[1];break;case 3:t.top=e[0],t.right=t.left=e[1],t.bottom=e[2];break;case 4:t.top=e[0],t.right=e[1],t.bottom=e[2],t.left=e[3]}}return void 0!==r&&(t.top=Dpe(r)),void 0!==o&&(t.right=Dpe(o)),void 0!==i&&(t.bottom=Dpe(i)),void 0!==a&&(t.left=Dpe(a)),t},Ppe=t.createContext({}),Tpe=n=>{var{children:r,onClick:o,disabled:i,padding:a,paddingTop:l,paddingRight:c,paddingBottom:u,paddingLeft:d}=n,f=s(n,["children","onClick","disabled","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);const{setRowPadding:p}=t.useContext(Ppe);return t.useEffect((()=>{if((a||l||c||u||d)&&p){const e=jpe({padding:a,paddingTop:l,paddingRight:c,paddingBottom:u,paddingLeft:d});p(e)}}),[a,l,c,u,d,p]),e.jsx(Mpe,Object.assign({isDisabled:i,onAction:o&&!i?o:void 0,hoverEffect:!!o&&!i},f,{children:r}))},Mpe=N(px)((({theme:e,backgroundColor:t,isDisabled:n})=>({color:e.table.color.body,fontSize:e.font.size.sm,wordBreak:"break-word",opacity:n?.3:void 0,backgroundColor:t,outline:"none",transition:"background-color 0.2s",position:"relative"})),(({theme:e,hoverEffect:t})=>t&&{"&:hover":{backgroundColor:e.scale1,cursor:"pointer"},"&:focus-visible":{backgroundColor:e.scale1}}),(({theme:e,emphasis:t})=>{let n;return!0===t?n=e.color.brand:"string"==typeof t&&(n=t),{height:"100%","& > td:first-of-type > div":{borderLeft:"2px solid transparent",borderLeftColor:n},"&:not(:first-of-type) > td > div":{borderTop:`1px solid ${e.table.borderColor}`},"&.fetching-row":{borderTop:`1px solid ${e.table.borderColor}`,"& > td > div":{borderTop:"none"}}}}),(({height:e})=>({height:e}))),Ape=({spinnerSize:t})=>{const n="small"===t;return e.jsx(Tpe,{height:n?49:57,className:n?"fetching-row":void 0,children:e.jsx(_pe,{children:e.jsx(Xx,{size:t,center:!0})})})},_pe=N(hx)((({theme:e})=>({color:e.scale6}))),Rpe=N(fx)((({theme:e})=>({"&[data-empty]":{textAlign:"center",color:e.table.color.body,fontSize:e.font.size.sm,"& > tr:first-of-type > td:first-of-type":{paddingTop:16}}}))),Lpe=e=>{if(e)return"start"===e||"end"===e?`flex-${e}`:e},Ipe=[({direction:e,justify:t,align:n="center",gap:r=8})=>({display:"flex",justifyContent:Lpe(t),alignItems:Lpe(n),flexDirection:e,width:"100%",height:"100%",gap:r}),Bt],Npe=N(hx)((({theme:e})=>({padding:0,outline:"none",outlineOffset:-1,"&:focus-visible":{outline:`${e.accent} solid 1px`}})),(({padding:e,paddingTop:t,paddingBottom:n,paddingRight:r,paddingLeft:o,parentPadding:i})=>{var a,l,s,c;const{top:u,right:d,bottom:f,left:p}=i||{};return{"& > div":{paddingTop:null!==(a=null!=t?t:u)&&void 0!==a?a:16,paddingBottom:null!==(l=null!=n?n:f)&&void 0!==l?l:16,paddingLeft:o,paddingRight:r,padding:e},"&:first-of-type > div":{paddingLeft:null!==(s=null!=o?o:void 0!==p?p-2:void 0)&&void 0!==s?s:24},"&:last-of-type > div":{paddingRight:null!==(c=null!=r?r:d)&&void 0!==c?c:24}}})),$pe=N.div(Ipe,(({showDefault:e})=>e&&{"& > *":{opacity:.3}})),zpe=N(dx)((({theme:e})=>({width:9,height:18,backgroundColor:e.scale4,marginLeft:"auto",backgroundClip:"content-box",border:"4px transparent",borderStyle:"none solid","&[data-resizable-direction=both]":{cursor:"col-resize"},"&[data-resizable-direction=left]":{cursor:"e-resize"},"&[data-resizable-direction=right]":{cursor:"w-resize"},"&[data-focus-visible]":{backgroundColor:e.accent}}))),Fpe=({sortDirection:t})=>{const{color:r,scale4:o}=n.useTheme(),i="asc"===t?r.brand:o,a="desc"===t?r.brand:o;return e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M8.71005 14.71L11.3001 17.3C11.6901 17.69 12.3201 17.69 12.7101 17.3L15.3001 14.71C15.9301 14.08 15.4801 13 14.5901 13H9.41005C8.52005 13 8.08005 14.08 8.71005 14.71Z",fill:a}),e.jsx("path",{d:"M8.71005 8.88253L11.3001 6.29253C11.6901 5.90253 12.3201 5.90253 12.7101 6.29253L15.3001 8.88253C15.9301 9.51253 15.4801 10.5925 14.5901 10.5925H9.41005C8.52005 10.5925 8.08005 9.51253 8.71005 8.88253Z",fill:i})]})},Bpe=N(sx)((({theme:e,maxWidth:t})=>{const n=t?`${"number"==typeof t?`${t}px`:t} !important`:void 0;return{textAlign:"left",verticalAlign:"middle",color:e.table.color.header,fontSize:e.font.size.sm,fontWeight:e.font.weight.medium,padding:0,outline:"none",outlineOffset:-1,maxWidth:t?n:void 0,"&:focus-visible":{outline:`${e.accent} solid 1px`}}}),(({theme:e,padding:t,paddingTop:n,paddingBottom:r,paddingRight:o,paddingLeft:i,parentPadding:a})=>{var l,s,c,u;return{"& > div":{paddingTop:null!==(l=null!=n?n:null==a?void 0:a.top)&&void 0!==l?l:8,paddingBottom:null!==(s=null!=r?r:null==a?void 0:a.bottom)&&void 0!==s?s:8,paddingLeft:i,paddingRight:o,padding:t,borderBottom:`1px solid ${e.table.borderColor}`},"&:first-of-type > div":{paddingLeft:null!==(c=null!=i?i:null==a?void 0:a.left)&&void 0!==c?c:24},"&:last-of-type > div":{paddingRight:null!==(u=null!=o?o:null==a?void 0:a.right)&&void 0!==u?u:24}}})),Kpe=N.div(Ipe,(({theme:e,sorting:t,active:n})=>({"& > div:first-of-type, & > span":{cursor:t?"pointer":void 0,color:n?e.scale10:e.table.color.header,"&:hover":{color:t?e.scale8:void 0}}}))),Vpe=N(ax)((({theme:e,backgroundColor:t})=>({position:"sticky",top:0,zIndex:1,"& > tr > th":{backgroundColor:t||e.background0}}))),Hpe=n=>{var{children:r,data:o,onScrollEnd:i,backgroundColor:a,maxHeight:l}=n,c=s(n,["children","data","onScrollEnd","backgroundColor","maxHeight"]);const[u,d]=t.useState(o),[f,p]=t.useState(),[h,g]=t.useState(),[m,v]=t.useState(),y=o&&"function"==typeof r?r(u):r;t.useEffect((()=>{if(o){let e=o;if(f){const{key:t,dir:n}=f;e=tde(o,[t],[n])}Mt(e,u)||d(e)}}),[o,f]);const b=t.useMemo((()=>({activeColumn:f,setActiveColumn:p,backgroundColor:a,headerPadding:h,rowPadding:m,setHeaderPadding:g,setRowPadding:v})),[f,p,a,h,m,g,v]);return e.jsx(Ppe.Provider,{value:b,children:e.jsx(Upe,{onScroll:i?e=>{const t=e.target,{scrollHeight:n,scrollTop:r,clientHeight:o}=t;n-r===o&&i&&i()}:void 0,backgroundColor:a,maxHeight:l,children:e.jsx(Wpe,Object.assign({},c,{children:y}))})})};Hpe.Header=({children:n,backgroundColor:r,padding:o,paddingTop:i,paddingRight:a,paddingBottom:l,paddingLeft:s})=>{const{backgroundColor:c,setHeaderPadding:u}=t.useContext(Ppe);return t.useEffect((()=>{if((o||i||a||l||s)&&u){const e=jpe({padding:o,paddingTop:i,paddingRight:a,paddingBottom:l,paddingLeft:s});u(e)}}),[o,i,a,l,s,u]),e.jsx(Vpe,{backgroundColor:r||c,children:n})},Hpe.Column=n=>{var{children:r,sortKey:o,sorted:i,onClick:a,resize:l,direction:c,justify:u,align:d,gap:f}=n,p=s(n,["children","sortKey","sorted","onClick","resize","direction","justify","align","gap"]);const[h,g]=t.useState(i||"inactive"),{activeColumn:m,setActiveColumn:v,headerPadding:y}=t.useContext(Ppe),b=o||i,w="asc"===h||"desc"===h,x={direction:c,justify:u,align:d,gap:f},C=e=>{if(g(e),v&&o){v("inactive"===e?void 0:{key:o,dir:e})}};t.useEffect((()=>{!o||"asc"!==i&&"desc"!==i||C(i)}),[]),t.useEffect((()=>{i&&g(i)}),[i]),t.useEffect((()=>{const e=!m&&i;o&&m&&m.key!==o&&"inactive"!==h&&!e&&g("inactive")}),[m,h]);const S=b||a?e=>{o?C("inactive"===h?"asc":"asc"===h?"desc":"inactive"):a&&a(e)}:void 0;return e.jsx(Bpe,Object.assign({parentPadding:y},p,{children:e.jsxs(Kpe,Object.assign({sorting:!!b,active:w},x,{children:["string"==typeof r?e.jsx(lfe,{onClick:S,children:r}):r,b&&e.jsx("span",{"aria-hidden":"true",onClick:S,children:e.jsx(Ut,{svg:e.jsx(Fpe,{sortDirection:h}),marginLeft:-8})}),l&&e.jsx(zpe,{})]}))}))},Hpe.Body=({children:t,emptyFallback:n,fetching:r,loading:o})=>e.jsxs(Rpe,{renderEmptyState:({isEmpty:e})=>e&&n?n:null,children:[o&&e.jsx(Ape,{}),!o&&t,r&&e.jsx(Ape,{spinnerSize:"small"})]}),Hpe.Row=Tpe,Hpe.Cell=n=>{var{children:r,defaultValue:o,direction:i,justify:a,align:l,gap:c,clampLines:u}=n,d=s(n,["children","defaultValue","direction","justify","align","gap","clampLines"]);const{rowPadding:f}=t.useContext(Ppe),p={direction:i,justify:a,align:l,gap:c},h=r||o;return e.jsx(Npe,Object.assign({parentPadding:f},d,{children:e.jsx($pe,Object.assign({showDefault:!!o&&!r},p,{children:"string"==typeof h?e.jsx(lfe,{paddingRight:2,clampLines:u,children:h}):h}))}))};const Upe=N(Xw)((({theme:e,backgroundColor:t,maxHeight:n})=>({overflow:"auto",position:"relative",width:"100%",maxHeight:n||"100%",borderRadius:4,backgroundColor:t||e.background0}))),Wpe=N(rx)({height:"fit-content"},Kt,Bt),Zpe=N.div((({gap:e=8})=>({display:"flex",gap:e})),Kt),qpe=N.div((({theme:e,active:t,itemWidth:n="fill",reverse:r,gap:o})=>({display:"flex",flexDirection:r?"row-reverse":"row",justifyContent:"center",alignItems:"center",gap:o,padding:"8px 16px",width:"fit"===n?"max-content":"100%",borderRadius:8,background:t?e.scale1:"transparent",border:"1px solid",borderColor:t?"transparent":e.scale0,color:t?e.scale10:e.scale6,fontSize:e.font.size.md,fontWeight:e.font.weight.medium,cursor:"pointer"})));var Gpe,Ype="dismissableLayer.update",Xpe="dismissableLayer.pointerDownOutside",Jpe="dismissableLayer.focusOutside",Qpe=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ehe=i.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:s,onDismiss:c,...u}=t,d=i.useContext(Qpe),[f,p]=i.useState(null),h=f?.ownerDocument??globalThis?.document,[,g]=i.useState({}),m=B(n,(e=>p(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),w=f?v.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,C=w>=b,S=function(e,t=globalThis?.document){const n=q(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){nhe(Xpe,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));C&&!n&&(a?.(e),s?.(e),e.defaultPrevented||c?.())}),h),k=function(e,t=globalThis?.document){const n=q(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){nhe(Jpe,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(l?.(e),s?.(e),e.defaultPrevented||c?.())}),h);return function(e,t=globalThis?.document){const n=q(e);i.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{w===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),i.useEffect((()=>{if(f)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(Gpe=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),the(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Gpe)}}),[f,h,r,d]),i.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),the())}),[f,d]),i.useEffect((()=>{const e=()=>g({});return document.addEventListener(Ype,e),()=>document.removeEventListener(Ype,e)}),[]),e.jsx(Y.div,{...u,ref:m,style:{pointerEvents:x?C?"auto":"none":void 0,...t.style},onFocusCapture:Z(t.onFocusCapture,k.onFocusCapture),onBlurCapture:Z(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Z(t.onPointerDownCapture,S.onPointerDownCapture)})}));ehe.displayName="DismissableLayer";function the(){const e=new CustomEvent(Ype);document.dispatchEvent(e)}function nhe(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&a.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}i.forwardRef(((t,n)=>{const r=i.useContext(Qpe),o=i.useRef(null),a=B(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),e.jsx(Y.div,{...t,ref:a})})).displayName="DismissableLayerBranch";const rhe=["top","right","bottom","left"],ohe=Math.min,ihe=Math.max,ahe=Math.round,lhe=Math.floor,she=e=>({x:e,y:e}),che={left:"right",right:"left",bottom:"top",top:"bottom"},uhe={start:"end",end:"start"};function dhe(e,t,n){return ihe(e,ohe(t,n))}function fhe(e,t){return"function"==typeof e?e(t):e}function phe(e){return e.split("-")[0]}function hhe(e){return e.split("-")[1]}function ghe(e){return"x"===e?"y":"x"}function mhe(e){return"y"===e?"height":"width"}function vhe(e){return["top","bottom"].includes(phe(e))?"y":"x"}function yhe(e){return ghe(vhe(e))}function bhe(e){return e.replace(/start|end/g,(e=>uhe[e]))}function whe(e){return e.replace(/left|right|bottom|top/g,(e=>che[e]))}function xhe(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Che(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function She(e,t,n){let{reference:r,floating:o}=e;const i=vhe(t),a=yhe(t),l=mhe(a),s=phe(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(hhe(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function khe(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=fhe(t,e),h=xhe(p),g=l[f?"floating"===d?"reference":"floating":d],m=Che(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=Che(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:y,strategy:s}):v);return{top:(m.top-w.top+h.top)/b.y,bottom:(w.bottom-m.bottom+h.bottom)/b.y,left:(m.left-w.left+h.left)/b.x,right:(w.right-m.right+h.right)/b.x}}function Ehe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ohe(e){return rhe.some((t=>e[t]>=0))}function Dhe(e){return The(e)?(e.nodeName||"").toLowerCase():"#document"}function jhe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Phe(e){var t;return null==(t=(The(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function The(e){return e instanceof Node||e instanceof jhe(e).Node}function Mhe(e){return e instanceof Element||e instanceof jhe(e).Element}function Ahe(e){return e instanceof HTMLElement||e instanceof jhe(e).HTMLElement}function _he(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof jhe(e).ShadowRoot)}function Rhe(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Fhe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Lhe(e){return["table","td","th"].includes(Dhe(e))}function Ihe(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Nhe(e){const t=$he(),n=Mhe(e)?Fhe(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function $he(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function zhe(e){return["html","body","#document"].includes(Dhe(e))}function Fhe(e){return jhe(e).getComputedStyle(e)}function Bhe(e){return Mhe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Khe(e){if("html"===Dhe(e))return e;const t=e.assignedSlot||e.parentNode||_he(e)&&e.host||Phe(e);return _he(t)?t.host:t}function Vhe(e){const t=Khe(e);return zhe(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ahe(t)&&Rhe(t)?t:Vhe(t)}function Hhe(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Vhe(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=jhe(o);return i?t.concat(a,a.visualViewport||[],Rhe(o)?o:[],a.frameElement&&n?Hhe(a.frameElement):[]):t.concat(o,Hhe(o,[],n))}function Uhe(e){const t=Fhe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ahe(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=ahe(n)!==i||ahe(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Whe(e){return Mhe(e)?e:e.contextElement}function Zhe(e){const t=Whe(e);if(!Ahe(t))return she(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Uhe(t);let a=(i?ahe(n.width):n.width)/r,l=(i?ahe(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const qhe=she(0);function Ghe(e){const t=jhe(e);return $he()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:qhe}function Yhe(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Whe(e);let a=she(1);t&&(r?Mhe(r)&&(a=Zhe(r)):a=Zhe(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==jhe(e))&&t}(i,n,r)?Ghe(i):she(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=jhe(i),t=r&&Mhe(r)?jhe(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=Zhe(o),t=o.getBoundingClientRect(),r=Fhe(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=a,n=jhe(o),o=n.frameElement}}return Che({width:u,height:d,x:s,y:c})}function Xhe(e){return Yhe(Phe(e)).left+Bhe(e).scrollLeft}function Jhe(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=jhe(e),r=Phe(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=$he();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=Phe(e),n=Bhe(e),r=e.ownerDocument.body,o=ihe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ihe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Xhe(e);const l=-n.scrollTop;return"rtl"===Fhe(r).direction&&(a+=ihe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(Phe(e));else if(Mhe(t))r=function(e,t){const n=Yhe(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ahe(e)?Zhe(e):she(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ghe(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Che(r)}function Qhe(e,t){const n=Khe(e);return!(n===t||!Mhe(n)||zhe(n))&&("fixed"===Fhe(n).position||Qhe(n,t))}function ege(e,t,n){const r=Ahe(t),o=Phe(t),i="fixed"===n,a=Yhe(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=she(0);if(r||!r&&!i)if(("body"!==Dhe(t)||Rhe(o))&&(l=Bhe(t)),r){const e=Yhe(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=Xhe(o));return{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function tge(e){return"static"===Fhe(e).position}function nge(e,t){return Ahe(e)&&"fixed"!==Fhe(e).position?t?t(e):e.offsetParent:null}function rge(e,t){const n=jhe(e);if(Ihe(e))return n;if(!Ahe(e)){let t=Khe(e);for(;t&&!zhe(t);){if(Mhe(t)&&!tge(t))return t;t=Khe(t)}return n}let r=nge(e,t);for(;r&&Lhe(r)&&tge(r);)r=nge(r,t);return r&&zhe(r)&&tge(r)&&!Nhe(r)?n:r||function(e){let t=Khe(e);for(;Ahe(t)&&!zhe(t);){if(Nhe(t))return t;if(Ihe(t))return null;t=Khe(t)}return null}(e)||n}const oge={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Phe(r),l=!!t&&Ihe(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=she(1);const u=she(0),d=Ahe(r);if((d||!d&&!i)&&(("body"!==Dhe(r)||Rhe(a))&&(s=Bhe(r)),Ahe(r))){const e=Yhe(r);c=Zhe(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x,y:n.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:Phe,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Ihe(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Hhe(e,[],!1).filter((e=>Mhe(e)&&"body"!==Dhe(e))),o=null;const i="fixed"===Fhe(e).position;let a=i?Khe(e):e;for(;Mhe(a)&&!zhe(a);){const t=Fhe(a),n=Nhe(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Rhe(a)&&!n&&Qhe(e,a))?r=r.filter((e=>e!==a)):o=t,a=Khe(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],l=i.reduce(((e,n)=>{const r=Jhe(t,n,o);return e.top=ihe(r.top,e.top),e.right=ohe(r.right,e.right),e.bottom=ohe(r.bottom,e.bottom),e.left=ihe(r.left,e.left),e}),Jhe(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:rge,getElementRects:async function(e){const t=this.getOffsetParent||rge,n=this.getDimensions,r=await n(e.floating);return{reference:ege(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Uhe(e);return{width:t,height:n}},getScale:Zhe,isElement:Mhe,isRTL:function(e){return"rtl"===Fhe(e).direction}};function ige(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=Whe(e),u=o||i?[...c?Hhe(c):[],...Hhe(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&l?function(e,t){let n,r=null;const o=Phe(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-lhe(u)+"px "+-lhe(o.clientWidth-(c+d))+"px "+-lhe(o.clientHeight-(u+f))+"px "+-lhe(c)+"px",threshold:ihe(0,ohe(1,s))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==s){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!s&&h.observe(c),h.observe(t));let g=s?Yhe(e):null;return s&&function t(){const r=Yhe(e);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n();g=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(f)}}const age=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=phe(n),l=hhe(n),s="y"===vhe(n),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,d=fhe(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},lge=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=fhe(e,t),c={x:n,y:r},u=await khe(t,s),d=vhe(phe(o)),f=ghe(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=dhe(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=dhe(h+u["y"===d?"top":"left"],h,h-u[e])}const g=l.fn({...t,[f]:p,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r}}}}},sge=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=fhe(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=phe(o),y=vhe(l),b=phe(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=f||(b||!g?[whe(l)]:function(e){const t=whe(e);return[bhe(e),t,bhe(t)]}(l)),C="none"!==h;!f&&C&&x.push(...function(e,t,n,r){const o=hhe(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(phe(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(bhe)))),i}(l,g,h,w));const S=[l,...x],k=await khe(t,m),E=[];let O=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&E.push(k[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=hhe(e),o=yhe(e),i=mhe(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=whe(a)),[a,whe(a)]}(o,a,w);E.push(k[e[0]],k[e[1]])}if(O=[...O,{placement:o,overflows:E}],!E.every((e=>e<=0))){var D,j;const e=((null==(D=i.flip)?void 0:D.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n=null==(j=O.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:j.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=O.filter((e=>{if(C){const t=vhe(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},cge=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=(()=>{}),...l}=fhe(e,t),s=await khe(t,l),c=phe(n),u=hhe(n),d="y"===vhe(n),{width:f,height:p}=r.floating;let h,g;"top"===c||"bottom"===c?(h=c,g=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,h="end"===u?"top":"bottom");const m=p-s.top-s.bottom,v=f-s.left-s.right,y=ohe(p-s[h],m),b=ohe(f-s[g],v),w=!t.middlewareData.shift;let x=y,C=b;if(d?C=u||w?ohe(b,v):v:x=u||w?ohe(y,m):m,w&&!u){const e=ihe(s.left,0),t=ihe(s.right,0),n=ihe(s.top,0),r=ihe(s.bottom,0);d?C=f-2*(0!==e||0!==t?e+t:ihe(s.left,s.right)):x=p-2*(0!==n||0!==r?n+r:ihe(s.top,s.bottom))}await a({...t,availableWidth:C,availableHeight:x});const S=await o.getDimensions(i.floating);return f!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}},uge=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=fhe(e,t);switch(r){case"referenceHidden":{const e=Ehe(await khe(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ohe(e)}}}case"escaped":{const e=Ehe(await khe(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ohe(e)}}}default:return{}}}}},dge=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=fhe(e,t)||{};if(null==c)return{};const d=xhe(u),f={x:n,y:r},p=yhe(o),h=mhe(p),g=await a.getDimensions(c),m="y"===p,v=m?"top":"left",y=m?"bottom":"right",b=m?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-f[p]-i.floating[h],x=f[p]-i.reference[p],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=C?C[b]:0;S&&await(null==a.isElement?void 0:a.isElement(C))||(S=l.floating[b]||i.floating[h]);const k=w/2-x/2,E=S/2-g[h]/2-1,O=ohe(d[v],E),D=ohe(d[y],E),j=O,P=S-g[h]-D,T=S/2-g[h]/2+k,M=dhe(j,T,P),A=!s.arrow&&null!=hhe(o)&&T!==M&&i.reference[h]/2-(T<j?O:D)-g[h]/2<0,_=A?T<j?T-j:T-P:0;return{[p]:f[p]+_,data:{[p]:M,centerOffset:T-M-_,...A&&{alignmentOffset:_}},reset:A}}}),fge=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=fhe(e,t),u={x:n,y:r},d=vhe(o),f=ghe(d);let p=u[f],h=u[d];const g=fhe(l,t),m="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+m.mainAxis,n=i.reference[f]+i.reference[e]-m.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,y;const e="y"===f?"width":"height",t=["top","left"].includes(phe(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:m.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?m.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},pge=(e,t,n)=>{const r=new Map,o={platform:oge,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=She(c,r,s),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:i,fn:g}=l[n],{x:m,y:v,data:y,reset:b}=await g({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=m?m:u,d=null!=v?v:d,p={...p,[i]:{...p[i],...y}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=She(c,f,s))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var hge="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function gge(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!gge(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!gge(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function mge(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vge(e,t){const n=mge(e);return Math.round(t*n)/n}function yge(e){const t=i.useRef(e);return hge((()=>{t.current=e})),t}const bge=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?dge({element:n.current,padding:r}).fn(t):{}:n?dge({element:n,padding:r}).fn(t):{};var o}}),wge=(e,t)=>({...age(e),options:[e,t]}),xge=(e,t)=>({...lge(e),options:[e,t]}),Cge=(e,t)=>({...fge(e),options:[e,t]}),Sge=(e,t)=>({...sge(e),options:[e,t]}),kge=(e,t)=>({...cge(e),options:[e,t]}),Ege=(e,t)=>({...uge(e),options:[e,t]}),Oge=(e,t)=>({...bge(e),options:[e,t]});var Dge=i.forwardRef(((t,n)=>{const{children:r,width:o=10,height:i=5,...a}=t;return e.jsx(Y.svg,{...a,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Dge.displayName="Arrow";var jge=Dge;var Pge="Popper",[Tge,Mge]=$(Pge),[Age,_ge]=Tge(Pge),Rge=t=>{const{__scopePopper:n,children:r}=t,[o,a]=i.useState(null);return e.jsx(Age,{scope:n,anchor:o,onAnchorChange:a,children:r})};Rge.displayName=Pge;var Lge="PopperAnchor",Ige=i.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...a}=t,l=_ge(Lge,r),s=i.useRef(null),c=B(n,s);return i.useEffect((()=>{l.onAnchorChange(o?.current||s.current)})),o?null:e.jsx(Y.div,{...a,ref:c})}));Ige.displayName=Lge;var Nge="PopperContent",[$ge,zge]=Tge(Nge),Fge=i.forwardRef(((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:l=0,align:s="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:v,...y}=t,b=_ge(Nge,r),[w,x]=i.useState(null),C=B(n,(e=>x(e))),[S,k]=i.useState(null),E=function(e){const[t,n]=i.useState(void 0);return X((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(S),O=E?.width??0,D=E?.height??0,j=o+("center"!==s?"-"+s:""),P="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},T=Array.isArray(f)?f:[f],M=T.length>0,A={padding:P,boundary:T.filter(Hge),altBoundary:M},{refs:_,floatingStyles:R,placement:L,isPositioned:I,middlewareData:N}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:s}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=i.useState(r);gge(h,r)||g(r);const[m,v]=i.useState(null),[y,b]=i.useState(null),w=i.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),x=i.useCallback((e=>{e!==E.current&&(E.current=e,b(e))}),[]),C=l||m,S=s||y,k=i.useRef(null),E=i.useRef(null),O=i.useRef(f),D=null!=u,j=yge(u),P=yge(o),T=i.useCallback((()=>{if(!k.current||!E.current)return;const e={placement:t,strategy:n,middleware:h};P.current&&(e.platform=P.current),pge(k.current,E.current,e).then((e=>{const t={...e,isPositioned:!0};M.current&&!gge(O.current,t)&&(O.current=t,a.flushSync((()=>{p(t)})))}))}),[h,t,n,P]);hge((()=>{!1===d&&O.current.isPositioned&&(O.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const M=i.useRef(!1);hge((()=>(M.current=!0,()=>{M.current=!1})),[]),hge((()=>{if(C&&(k.current=C),S&&(E.current=S),C&&S){if(j.current)return j.current(C,S,T);T()}}),[C,S,T,j,D]);const A=i.useMemo((()=>({reference:k,floating:E,setReference:w,setFloating:x})),[w,x]),_=i.useMemo((()=>({reference:C,floating:S})),[C,S]),R=i.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=vge(_.floating,f.x),r=vge(_.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...mge(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,_.floating,f.x,f.y]);return i.useMemo((()=>({...f,update:T,refs:A,elements:_,floatingStyles:R})),[f,T,A,_,R])}({strategy:"fixed",placement:j,whileElementsMounted:(...e)=>ige(...e,{animationFrame:"always"===m}),elements:{reference:b.anchor},middleware:[wge({mainAxis:l+D,alignmentAxis:c}),d&&xge({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?Cge():void 0,...A}),d&&Sge({...A}),kge({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),S&&Oge({element:S,padding:u}),Uge({arrowWidth:O,arrowHeight:D}),g&&Ege({strategy:"referenceHidden",...A})]}),[$,z]=Wge(L),F=q(v);X((()=>{I&&F?.()}),[I,F]);const K=N.arrow?.x,V=N.arrow?.y,H=0!==N.arrow?.centerOffset,[U,W]=i.useState();return X((()=>{w&&W(window.getComputedStyle(w).zIndex)}),[w]),e.jsx("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...R,transform:I?R.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx($ge,{scope:r,placedSide:$,onArrowChange:k,arrowX:K,arrowY:V,shouldHideArrow:H,children:e.jsx(Y.div,{"data-side":$,"data-align":z,...y,ref:C,style:{...y.style,animation:I?void 0:"none"}})})})}));Fge.displayName=Nge;var Bge="PopperArrow",Kge={top:"bottom",right:"left",bottom:"top",left:"right"},Vge=i.forwardRef((function(t,n){const{__scopePopper:r,...o}=t,i=zge(Bge,r),a=Kge[i.placedSide];return e.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:e.jsx(jge,{...o,ref:n,style:{...o.style,display:"block"}})})}));function Hge(e){return null!==e}Vge.displayName=Bge;var Uge=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[s,c]=Wge(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+l/2;let p="",h="";return"bottom"===s?(p=i?u:`${d}px`,h=-l+"px"):"top"===s?(p=i?u:`${d}px`,h=`${r.floating.height+l}px`):"right"===s?(p=-l+"px",h=i?u:`${f}px`):"left"===s&&(p=`${r.floating.width+l}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}});function Wge(e){const[t,n="center"]=e.split("-");return[t,n]}var Zge=Rge,qge=Ige,Gge=Fge,Yge=Vge,Xge=i.forwardRef(((t,n)=>{const{container:o,...a}=t,[l,s]=i.useState(!1);X((()=>s(!0)),[]);const c=o||l&&globalThis?.document?.body;return c?r.createPortal(e.jsx(Y.div,{...a,ref:n}),c):null}));Xge.displayName="Portal";var Jge=i.forwardRef(((t,n)=>e.jsx(Y.span,{...t,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}})));Jge.displayName="VisuallyHidden";var Qge=Jge,[eme,tme]=$("Tooltip",[Mge]),nme=Mge(),rme="TooltipProvider",ome=700,ime="tooltip.open",[ame,lme]=eme(rme),sme=t=>{const{__scopeTooltip:n,delayDuration:r=ome,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:l}=t,[s,c]=i.useState(!0),u=i.useRef(!1),d=i.useRef(0);return i.useEffect((()=>{const e=d.current;return()=>window.clearTimeout(e)}),[]),e.jsx(ame,{scope:n,isOpenDelayed:s,delayDuration:r,onOpen:i.useCallback((()=>{window.clearTimeout(d.current),c(!1)}),[]),onClose:i.useCallback((()=>{window.clearTimeout(d.current),d.current=window.setTimeout((()=>c(!0)),o)}),[o]),isPointerInTransitRef:u,onPointerInTransitChange:i.useCallback((e=>{u.current=e}),[]),disableHoverableContent:a,children:l})};sme.displayName=rme;var cme="Tooltip",[ume,dme]=eme(cme),fme=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:a=!1,onOpenChange:l,disableHoverableContent:s,delayDuration:c}=t,u=lme(cme,t.__scopeTooltip),d=nme(n),[f,p]=i.useState(null),h=ne(),g=i.useRef(0),m=s??u.disableHoverableContent,v=c??u.delayDuration,y=i.useRef(!1),[b=!1,w]=G({prop:o,defaultProp:a,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(ime))):u.onClose(),l?.(e)}}),x=i.useMemo((()=>b?y.current?"delayed-open":"instant-open":"closed"),[b]),C=i.useCallback((()=>{window.clearTimeout(g.current),y.current=!1,w(!0)}),[w]),S=i.useCallback((()=>{window.clearTimeout(g.current),w(!1)}),[w]),k=i.useCallback((()=>{window.clearTimeout(g.current),g.current=window.setTimeout((()=>{y.current=!0,w(!0)}),v)}),[v,w]);return i.useEffect((()=>()=>window.clearTimeout(g.current)),[]),e.jsx(Zge,{...d,children:e.jsx(ume,{scope:n,contentId:h,open:b,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:i.useCallback((()=>{u.isOpenDelayed?k():C()}),[u.isOpenDelayed,k,C]),onTriggerLeave:i.useCallback((()=>{m?S():window.clearTimeout(g.current)}),[S,m]),onOpen:C,onClose:S,disableHoverableContent:m,children:r})})};fme.displayName=cme;var pme="TooltipTrigger",hme=i.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,a=dme(pme,r),l=lme(pme,r),s=nme(r),c=B(n,i.useRef(null),a.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback((()=>u.current=!1),[]);return i.useEffect((()=>()=>document.removeEventListener("pointerup",f)),[f]),e.jsx(qge,{asChild:!0,...s,children:e.jsx(Y.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:c,onPointerMove:Z(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(d.current||l.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))})),onPointerLeave:Z(t.onPointerLeave,(()=>{a.onTriggerLeave(),d.current=!1})),onPointerDown:Z(t.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})})),onFocus:Z(t.onFocus,(()=>{u.current||a.onOpen()})),onBlur:Z(t.onBlur,a.onClose),onClick:Z(t.onClick,a.onClose)})})}));hme.displayName=pme;var gme="TooltipPortal",[mme,vme]=eme(gme,{forceMount:void 0}),yme=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=t,a=dme(gme,n);return e.jsx(mme,{scope:n,forceMount:r,children:e.jsx(J,{present:r||a.open,children:e.jsx(Xge,{asChild:!0,container:i,children:o})})})};yme.displayName=gme;var bme="TooltipContent",wme=i.forwardRef(((t,n)=>{const r=vme(bme,t.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...a}=t,l=dme(bme,t.__scopeTooltip);return e.jsx(J,{present:o||l.open,children:l.disableHoverableContent?e.jsx(kme,{side:i,...a,ref:n}):e.jsx(xme,{side:i,...a,ref:n})})})),xme=i.forwardRef(((t,n)=>{const r=dme(bme,t.__scopeTooltip),o=lme(bme,t.__scopeTooltip),a=i.useRef(null),l=B(n,a),[s,c]=i.useState(null),{trigger:u,onClose:d}=r,f=a.current,{onPointerInTransitChange:p}=o,h=i.useCallback((()=>{c(null),p(!1)}),[p]),g=i.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect()),i=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),a=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...i,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);c(a),p(!0)}),[p]);return i.useEffect((()=>()=>h()),[h]),i.useEffect((()=>{if(u&&f){const e=e=>g(e,f),t=e=>g(e,u);return u.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}}),[u,f,g,h]),i.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||f?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,l=t[e].y,s=t[i].x,c=t[i].y;l>r!=c>r&&n<(s-a)*(r-l)/(c-l)+a&&(o=!o)}return o}(n,s);r?h():o&&(h(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,f,s,d,h]),e.jsx(kme,{...t,ref:l})})),[Cme,Sme]=eme(cme,{isInside:!1}),kme=i.forwardRef(((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":a,onEscapeKeyDown:l,onPointerDownOutside:s,...c}=t,u=dme(bme,r),d=nme(r),{onClose:f}=u;return i.useEffect((()=>(document.addEventListener(ime,f),()=>document.removeEventListener(ime,f))),[f]),i.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,f]),e.jsx(ehe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:e.jsxs(Gge,{"data-state":u.stateAttribute,...d,...c,ref:n,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e.jsx(H,{children:o}),e.jsx(Cme,{scope:r,isInside:!0,children:e.jsx(Qge,{id:u.contentId,role:"tooltip",children:a||o})})]})})}));wme.displayName=bme;var Eme="TooltipArrow",Ome=i.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,i=nme(r);return Sme(Eme,r).isInside?null:e.jsx(Yge,{...i,...o,ref:n})}));Ome.displayName=Eme;var Dme=sme,jme=fme,Pme=hme,Tme=yme,Mme=wme,Ame=Ome;const _me=e=>{let t="top",n="center";if(!e)return{side:t,align:n};const[r,o]=e.split(" ");return"left"===r&&(t="left"),"right"===r&&(t="right"),"bottom"===r&&(t="bottom"),"left"!==o&&"top"!==o||(n="start"),"right"!==o&&"bottom"!==o||(n="end"),{side:t,align:n}},Rme=t=>{var{trigger:n,children:r,content:o,position:i="top",offset:a=4,zIndex:l,width:c,maxWidth:u,textAlign:d,open:f,disabled:p,id:h,bgColor:g,color:m,container:v,afterShow:y,afterHide:b}=t,w=s(t,["trigger","children","content","position","offset","zIndex","width","maxWidth","textAlign","open","disabled","id","bgColor","color","container","afterShow","afterHide"]);return e.jsx(Dme,{children:e.jsxs(jme,{delayDuration:0,onOpenChange:e=>{p||(y&&e&&y(),b&&!e&&b())},open:f,children:[e.jsx(Pme,{asChild:!0,children:e.jsx(Nme,Object.assign({},w,{children:n}))}),e.jsx(Tme,{container:v,children:!p&&e.jsxs(Ime,{side:_me(i).side,align:_me(i).align,sideOffset:a,zIndex:l,width:c,maxWidth:u,textAlign:d,id:h,bgColor:g,textColor:m,children:[o||r,e.jsx(Ame,{className:"tooltip-arrow",width:8,height:4})]})})]})})},Lme=n.keyframes({from:{transform:"var(--origin)",opacity:0},to:{transform:"translateY(0)",opacity:1}}),Ime=N(Mme,{shouldForwardProp:e=>Sx(e,["maxWidth","textAlign","bgColor","textColor","zIndex"])})((({theme:e,width:t,maxWidth:n,textAlign:r="center",bgColor:o,textColor:i,zIndex:a})=>{const{tooltip:l,font:s}=e,c=l.background,u=o||c;return{backgroundColor:u,boxShadow:e.elevation1,color:i||l.color.default,fontSize:s.size.sm,fontFamily:s.family.default,borderRadius:4,width:t,maxWidth:n,padding:16,textAlign:r,zIndex:a,animation:`${Lme} 300ms cubic-bezier(0.860, 0.000, 0.070, 1.000)`,"& > span > .tooltip-arrow":{fill:u,filter:"drop-shadow(0px 4px 2px rgba(0, 0, 0, 0.1))"},"&[data-side=top]":{"--origin":"translateY(4px)"},"&[data-side=bottom]":{"--origin":"translateY(-4px)",boxShadow:"0px -1px 4px 2px rgba(0, 0, 0, 0.1)"},"&[data-side=right]":{"--origin":"translateX(-4px)",boxShadow:"2px 0px 4px 2px rgba(0, 0, 0, 0.1)","& > span > .tooltip-arrow":{filter:"drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"}},"&[data-side=left]":{"--origin":"translateX(4px)",boxShadow:"-2px 0px 4px 2px rgba(0, 0, 0, 0.1)","& > span > .tooltip-arrow":{filter:"drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"}}}})),Nme=N.div({display:"inline-flex"}),$me=N.div((({theme:e})=>({color:e.tooltip.color.default}))),zme=N.div((({theme:e})=>({color:e.tooltip.color.subtext})));Rme.Header=$me,Rme.Body=zme;const Fme=N.div((({width:e,readOnly:t})=>({display:"flex",flexDirection:"column",rowGap:16,width:e,pointerEvents:t?"none":void 0})),Kt),Bme=N.div((({theme:e})=>({fontSize:e.font.size.lg,fontWeight:e.font.weight.medium}))),Kme=N.div({display:"grid",columnGap:16,gridTemplateColumns:"1fr 1fr"}),Vme=N.div({display:"flex",flexDirection:"column"}),Hme=N.div({display:"flex",alignItems:"center",marginBottom:8,minHeight:35}),Ume=N.div((({theme:e})=>({display:"flex",flexDirection:"column",padding:16,border:e.defaultBorder,borderRadius:4,height:"100%",backgroundColor:e.background1,rowGap:4}))),Wme=N.div((({theme:e,color:t})=>{let n=e.scale1;return t&&(n=((e,t)=>{const n=Object.keys(e);return"string"==typeof t&&n.includes(t)})(e.color,t)?e.color[t]:t),{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"4px 8px",cursor:"pointer",background:e.scale0,borderLeft:"4px solid",borderColor:n,"&:hover":{background:e.scale1},"& > :last-child":{visibility:"hidden"},"&:hover > :last-child":{visibility:"visible"}}})),Zme=N.div((({theme:e})=>({fontSize:e.font.size.lg,color:e.scale10}))),qme=N.div((({theme:e})=>({fontSize:e.font.size.sm,color:e.scale6})));!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('/* Document\n * ========================================================================== */\n\n/**\n * 1. Add border box sizing in all browsers (opinionated).\n * 2. Backgrounds do not repeat by default (opinionated).\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n background-repeat: no-repeat; /* 2 */\n}\n\n/**\n * 1. Add text decoration inheritance in all browsers (opinionated).\n * 2. Add vertical alignment inheritance in all browsers (opinionated).\n */\n\n::before,\n::after {\n text-decoration: inherit; /* 1 */\n vertical-align: inherit; /* 2 */\n}\n\n/**\n * 1. Use the default cursor in all browsers (opinionated).\n * 2. Change the line height in all browsers (opinionated).\n * 3. Breaks words to prevent overflow in all browsers (opinionated).\n * 4. Use a 4-space tab width in all browsers (opinionated).\n * 5. Remove the grey highlight on links in iOS (opinionated).\n * 6. Prevent adjustments of font size after orientation changes in iOS.\n */\n\n:where(:root) {\n cursor: default; /* 1 */\n line-height: 1.5; /* 2 */\n overflow-wrap: break-word; /* 3 */\n -moz-tab-size: 4; /* 4 */\n tab-size: 4; /* 4 */\n -webkit-tap-highlight-color: transparent; /* 5 */\n -webkit-text-size-adjust: 100%; /* 6 */\n}\n\n/* Sections\n * ========================================================================== */\n\n/**\n * Remove the margin in all browsers (opinionated).\n */\n\n:where(body) {\n margin: 0;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Edge, Firefox, and Safari.\n */\n\n:where(h1) {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n * ========================================================================== */\n\n/**\n * Remove the margin on nested lists in Chrome, Edge, and Safari.\n */\n\n:where(dl, ol, ul) :where(dl, ol, ul) {\n margin: 0;\n}\n\n/**\n * 1. Correct the inheritance of border color in Firefox.\n * 2. Add the correct box sizing in Firefox.\n */\n\n:where(hr) {\n color: inherit; /* 1 */\n height: 0; /* 2 */\n}\n\n/**\n * Remove the list style on navigation lists in all browsers (opinionated).\n */\n\n:where(nav) :where(ol, ul) {\n list-style-type: none;\n padding: 0;\n}\n\n/**\n * Prevent VoiceOver from ignoring list semantics in Safari (opinionated).\n */\n\n:where(nav li)::before {\n content: "\\200B";\n float: left;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n * 3. Prevent overflow of the container in all browsers (opinionated).\n */\n\n:where(pre) {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n overflow: auto; /* 3 */\n}\n\n/* Text-level semantics\n * ========================================================================== */\n\n/**\n * Add the correct text decoration in Safari.\n */\n\n:where(abbr[title]) {\n text-decoration: underline;\n text-decoration: underline dotted;\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\n:where(b, strong) {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\n:where(code, kbd, samp) {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\n:where(small) {\n font-size: 80%;\n}\n\n/* Embedded content\n * ========================================================================== */\n\n/*\n * Change the alignment on media elements in all browsers (opinionated).\n */\n\n:where(audio, canvas, iframe, img, svg, video) {\n vertical-align: middle;\n}\n\n/**\n * Remove the border on iframes in all browsers (opinionated).\n */\n\n:where(iframe) {\n border-style: none;\n}\n\n/**\n * Change the fill color to match the text color in all browsers (opinionated).\n */\n\n:where(svg:not([fill])) {\n fill: currentColor;\n}\n\n/* Tabular data\n * ========================================================================== */\n\n/**\n * 1. Collapse border spacing in all browsers (opinionated).\n * 2. Correct table border color inheritance in all Chrome, Edge, and Safari.\n * 3. Remove text indentation from table contents in Chrome, Edge, and Safari.\n */\n\n:where(table) {\n border-collapse: collapse; /* 1 */\n border-color: inherit; /* 2 */\n text-indent: 0; /* 3 */\n}\n\n/* Forms\n * ========================================================================== */\n\n/**\n * Remove the margin on controls in Safari.\n */\n\n:where(button, input, select) {\n margin: 0;\n}\n\n/**\n * Correct the inability to style buttons in iOS and Safari.\n */\n\n:where(button, [type="button" i], [type="reset" i], [type="submit" i]) {\n -webkit-appearance: button;\n}\n\n/**\n * Change the inconsistent appearance in all browsers (opinionated).\n */\n\n:where(fieldset) {\n border: 1px solid #a0a0a0;\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Edge, and Firefox.\n */\n\n:where(progress) {\n vertical-align: baseline;\n}\n\n/**\n * 1. Remove the margin in Firefox and Safari.\n * 3. Change the resize direction in all browsers (opinionated).\n */\n\n:where(textarea) {\n margin: 0; /* 1 */\n resize: vertical; /* 3 */\n}\n\n/**\n * 1. Correct the odd appearance in Chrome, Edge, and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n:where([type="search" i]) {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Safari.\n */\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * Correct the text style of placeholders in Chrome, Edge, and Safari.\n */\n\n::-webkit-input-placeholder {\n color: inherit;\n opacity: 0.54;\n}\n\n/**\n * Remove the inner padding in Chrome, Edge, and Safari on macOS.\n */\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style upload buttons in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n * ========================================================================== */\n\n/*\n * Add the correct styles in Safari.\n */\n\n:where(dialog) {\n background-color: white;\n border: solid;\n color: black;\n height: -moz-fit-content;\n height: fit-content;\n left: 0;\n margin: auto;\n padding: 1em;\n position: absolute;\n right: 0;\n width: -moz-fit-content;\n width: fit-content;\n}\n\n:where(dialog:not([open])) {\n display: none;\n}\n\n/*\n * Add the correct display in Safari.\n */\n\n:where(details > summary:first-of-type) {\n display: list-item;\n}\n\n/* Accessibility\n * ========================================================================== */\n\n/**\n * Change the cursor on busy elements in all browsers (opinionated).\n */\n\n:where([aria-busy="true" i]) {\n cursor: progress;\n}\n\n/*\n * Change the cursor on control elements in all browsers (opinionated).\n */\n\n:where([aria-controls]) {\n cursor: pointer;\n}\n\n/*\n * Change the cursor on disabled, not-editable, or otherwise\n * inoperable elements in all browsers (opinionated).\n */\n\n:where([aria-disabled="true" i], [disabled]) {\n cursor: not-allowed;\n}\n\n/*\n * Change the display on visually hidden accessible elements\n * in all browsers (opinionated).\n */\n\n:where([aria-hidden="false" i][hidden]) {\n display: initial;\n}\n\n:where([aria-hidden="false" i][hidden]:not(:focus)) {\n clip: rect(0, 0, 0, 0);\n position: absolute;\n}\n');var Gme,Yme={exports:{}};Gme=Yme,function(){function e(e,t,n){return e.call.apply(e.bind,arguments)}function t(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function n(r,o,i){return(n=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?e:t).apply(null,arguments)}var r=Date.now||function(){return+new Date};function o(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var i=!!window.FontFace;function a(e,t,n,r){if(t=e.c.createElement(t),n)for(var o in n)n.hasOwnProperty(o)&&("style"==o?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return r&&t.appendChild(e.c.createTextNode(r)),t}function l(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function s(e){e.parentNode&&e.parentNode.removeChild(e)}function c(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),o=0;o<t.length;o+=1){for(var i=!1,a=0;a<r.length;a+=1)if(t[o]===r[a]){i=!0;break}i||r.push(t[o])}for(t=[],o=0;o<r.length;o+=1){for(i=!1,a=0;a<n.length;a+=1)if(r[o]===n[a]){i=!0;break}i||t.push(r[o])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function u(e,t){for(var n=e.className.split(/\s+/),r=0,o=n.length;r<o;r++)if(n[r]==t)return!0;return!1}function d(e,t,n){function r(){u&&o&&s&&(u(c),u=null)}t=a(e,"link",{rel:"stylesheet",href:t,media:"all"});var o=!1,s=!0,c=null,u=n||null;i?(t.onload=function(){o=!0,r()},t.onerror=function(){o=!0,c=Error("Stylesheet failed to load"),r()}):setTimeout((function(){o=!0,r()}),0),l(e,"head",t)}function f(e,t,n,r){var o=e.c.getElementsByTagName("head")[0];if(o){var i=a(e,"script",{src:t}),l=!1;return i.onload=i.onreadystatechange=function(){l||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(l=!0,n&&n(null),i.onload=i.onreadystatechange=null,"HEAD"==i.parentNode.tagName&&o.removeChild(i))},o.appendChild(i),setTimeout((function(){l||(l=!0,n&&n(Error("Script load timeout")))}),r||5e3),i}return null}function p(){this.a=0,this.c=null}function h(e){return e.a++,function(){e.a--,m(e)}}function g(e,t){e.c=t,m(e)}function m(e){0==e.a&&e.c&&(e.c(),e.c=null)}function v(e){this.a=e||"-"}function y(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function b(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function w(e){return e.a+e.f}function x(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function C(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function S(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new v("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function k(e){if(e.g){var t=u(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),c(e.f,n,r)}E(e,"inactive")}function E(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,w(n)):e.h[t]())}function O(){this.c={}}function D(e,t){this.c=e,this.f=t,this.a=a(this.c,"span",{"aria-hidden":"true"},this.f)}function j(e){l(e.c,"body",e.a)}function P(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+b(e.c)+";font-style:"+x(e)+";font-weight:"+e.f+"00;"}function T(e,t,n,r,o,i){this.g=e,this.j=t,this.a=r,this.c=n,this.f=o||3e3,this.h=i||void 0}function M(e,t,n,r,o,i,a){this.v=e,this.B=t,this.c=n,this.a=r,this.s=a||"BESbswy",this.f={},this.w=o||3e3,this.u=i||null,this.m=this.j=this.h=this.g=null,this.g=new D(this.c,this.s),this.h=new D(this.c,this.s),this.j=new D(this.c,this.s),this.m=new D(this.c,this.s),e=P(e=new y(this.a.c+",serif",w(this.a))),this.g.a.style.cssText=e,e=P(e=new y(this.a.c+",sans-serif",w(this.a))),this.h.a.style.cssText=e,e=P(e=new y("serif",w(this.a))),this.j.a.style.cssText=e,e=P(e=new y("sans-serif",w(this.a))),this.m.a.style.cssText=e,j(this.g),j(this.h),j(this.j),j(this.m)}v.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},T.prototype.start=function(){var e=this.c.o.document,t=this,n=r(),o=new Promise((function(o,i){!function a(){r()-n>=t.f?i():e.fonts.load(function(e){return x(e)+" "+e.f+"00 300px "+b(e.c)}(t.a),t.h).then((function(e){1<=e.length?o():setTimeout(a,25)}),(function(){i()}))}()})),i=null,a=new Promise((function(e,n){i=setTimeout(n,t.f)}));Promise.race([a,o]).then((function(){i&&(clearTimeout(i),i=null),t.g(t.a)}),(function(){t.j(t.a)}))};var A={D:"serif",C:"sans-serif"},_=null;function R(){if(null===_){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);_=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return _}function L(e,t,n){for(var r in A)if(A.hasOwnProperty(r)&&t===e.f[A[r]]&&n===e.f[A[r]])return!0;return!1}function I(e){var t,o=e.g.a.offsetWidth,i=e.h.a.offsetWidth;(t=o===e.f.serif&&i===e.f["sans-serif"])||(t=R()&&L(e,o,i)),t?r()-e.A>=e.w?R()&&L(e,o,i)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?N(e,e.v):N(e,e.B):function(e){setTimeout(n((function(){I(this)}),e),50)}(e):N(e,e.v)}function N(e,t){setTimeout(n((function(){s(this.g.a),s(this.h.a),s(this.j.a),s(this.m.a),t(this.a)}),e),0)}function $(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}M.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=r(),I(this)};var z=null;function F(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&c(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),E(e,"active")):k(e.a))}function B(e){this.j=e,this.a=new O,this.h=0,this.f=this.g=!0}function K(e,t,r,o,i){var a=0==--e.h;(e.f||e.g)&&setTimeout((function(){var e=i||null,l=o||{};if(0===r.length&&a)k(t.a);else{t.f+=r.length,a&&(t.j=a);var s,u=[];for(s=0;s<r.length;s++){var d=r[s],f=l[d.c],p=t.a,h=d;if(p.g&&c(p.f,[p.a.c("wf",h.c,w(h).toString(),"loading")]),E(p,"fontloading",h),p=null,null===z)if(window.FontFace){h=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var g=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);z=h?42<parseInt(h[1],10):!g}else z=!1;p=z?new T(n(t.g,t),n(t.h,t),t.c,d,t.s,f):new M(n(t.g,t),n(t.h,t),t.c,d,t.s,e,f),u.push(p)}for(s=0;s<u.length;s++)u[s].start()}}),0)}function V(e,t){this.c=e,this.a=t}function H(e,t){this.c=e,this.a=t}function U(e,t){this.c=e||W,this.a=[],this.f=[],this.g=t||""}$.prototype.g=function(e){var t=this.a;t.g&&c(t.f,[t.a.c("wf",e.c,w(e).toString(),"active")],[t.a.c("wf",e.c,w(e).toString(),"loading"),t.a.c("wf",e.c,w(e).toString(),"inactive")]),E(t,"fontactive",e),this.m=!0,F(this)},$.prototype.h=function(e){var t=this.a;if(t.g){var n=u(t.f,t.a.c("wf",e.c,w(e).toString(),"active")),r=[],o=[t.a.c("wf",e.c,w(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,w(e).toString(),"inactive")),c(t.f,r,o)}E(t,"fontinactive",e),F(this)},B.prototype.load=function(e){this.c=new o(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],o=n.timeout;!function(e){e.g&&c(e.f,[e.a.c("wf","loading")]),E(e,"loading")}(t),r=function(e,t,n){var r,o=[];for(r in t)if(t.hasOwnProperty(r)){var i=e.c[r];i&&o.push(i(t[r],n))}return o}(e.a,n,e.c);var i=new $(e.c,t,o);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load((function(t,n,r){K(e,i,t,n,r)}))}(this,new S(this.c,e),e)},V.prototype.load=function(e){function t(){if(i["__mti_fntLst"+r]){var n,o=i["__mti_fntLst"+r](),a=[];if(o)for(var l=0;l<o.length;l++){var s=o[l].fontfamily;null!=o[l].fontStyle&&null!=o[l].fontWeight?(n=o[l].fontStyle+o[l].fontWeight,a.push(new y(s,n))):a.push(new y(s))}e(a)}else setTimeout((function(){t()}),50)}var n=this,r=n.a.projectId,o=n.a.version;if(r){var i=n.c.o;f(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+r+".js"+(o?"?v="+o:""),(function(o){o?e([]):(i["__MonotypeConfiguration__"+r]=function(){return n.a},t())})).id="__MonotypeAPIScript__"+r}else e([])},H.prototype.load=function(e){var t,n,r=this.a.urls||[],o=this.a.families||[],i=this.a.testStrings||{},a=new p;for(t=0,n=r.length;t<n;t++)d(this.c,r[t],h(a));var l=[];for(t=0,n=o.length;t<n;t++)if((r=o[t].split(":"))[1])for(var s=r[1].split(","),c=0;c<s.length;c+=1)l.push(new y(r[0],s[c]));else l.push(new y(r[0]));g(a,(function(){e(l,i)}))};var W="https://fonts.googleapis.com/css";function Z(e){this.f=e,this.a=[],this.c={}}var q={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},G={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Y={i:"i",italic:"i",n:"n",normal:"n"},X=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function J(e,t){this.c=e,this.a=t}var Q={Arimo:!0,Cousine:!0,Tinos:!0};function ee(e,t){this.c=e,this.a=t}function te(e,t){this.c=e,this.f=t,this.a=[]}J.prototype.load=function(e){var t=new p,n=this.c,r=new U(this.a.api,this.a.text),o=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var o=t[r].split(":");3==o.length&&e.f.push(o.pop());var i="";2==o.length&&""!=o[1]&&(i=":"),e.a.push(o.join(i))}}(r,o);var i=new Z(o);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),o=r[0].replace(/\+/g," "),i=["n4"];if(2<=r.length){var a;if(a=[],l=r[1])for(var l,s=(l=l.split(",")).length,c=0;c<s;c++){var u;if((u=l[c]).match(/^[\w-]+$/))if(null==(d=X.exec(u.toLowerCase())))u="";else{if(u=null==(u=d[2])||""==u?"n":Y[u],null==(d=d[1])||""==d)d="4";else var d=G[d]||(isNaN(d)?"4":d.substr(0,1));u=[u,d].join("")}else u="";u&&a.push(u)}0<a.length&&(i=a),3==r.length&&(a=[],0<(r=(r=r[2])?r.split(","):a).length&&(r=q[r[0]])&&(e.c[o]=r))}for(e.c[o]||(r=q[o])&&(e.c[o]=r),r=0;r<i.length;r+=1)e.a.push(new y(o,i[r]))}}(i),d(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),h(t)),g(t,(function(){e(i.a,i.c,Q)}))},ee.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?f(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",(function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],o=0;o<t.length;o+=2)for(var i=t[o],a=t[o+1],l=0;l<a.length;l++)r.push(new y(i,a[l]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}e(r)}}),2e3):e([])},te.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var o=0,i=n.fonts.length;o<i;++o){var a=n.fonts[o];r.a.push(new y(a.name,C("font-weight:"+a.weight+";font-style:"+a.style)))}e(r.a)},f(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",(function(t){t&&e([])}))):e([])};var ne=new B(window);ne.a.c.custom=function(e,t){return new H(t,e)},ne.a.c.fontdeck=function(e,t){return new te(t,e)},ne.a.c.monotype=function(e,t){return new V(t,e)},ne.a.c.typekit=function(e,t){return new ee(t,e)},ne.a.c.google=function(e,t){return new J(t,e)};var re={load:n(ne.load,ne)};Gme.exports?Gme.exports=re:(window.WebFont=re,window.WebFontConfig&&ne.load(window.WebFontConfig))}();var Xme=Po(Yme.exports);const Jme="#0074F4",Qme="#FF6068",eve="#FF9900",tve="#F0BB00",nve="#00C242",rve="#001D32",ove="#FFFFFF",ive={logo1:"#0074F4",logo2:"#00A9E2",logo3:"#67C728",brand:Jme,brandShade1:"#0068DC",brandShade2:"#005DC3",brandDark:"#4C9EF7",brandDarkShade1:"#5EA8F8",brandTint0:Zn(.95,Jme),brandTint1:Zn(.9,Jme),brandTint2:Zn(.8,Jme),brandTint3:Zn(.7,Jme),brandTint4:Zn(.6,Jme),brandBackground0:"#001828",brandBackground1:"#0D2433",brandBackground2:"#192F3D",brandBackground3:"#334653",brandBackground4:"#475964",brandBackground5:"#596A74",error:Qme,errorShade1:"#E6565E",errorShade2:"#CC4D53",errorTint0:Zn(.95,Qme),errorTint1:Zn(.9,Qme),errorTint2:Zn(.8,Qme),warning:eve,warningShade1:"#E68A00",warningShade2:"#CC7A00",warningTint0:Zn(.95,eve),warningTint1:Zn(.9,eve),warningTint2:Zn(.8,eve),alert:tve,alertShade1:"#E4B200",alertShade2:"#C09600",alertTint0:Zn(.95,tve),alertTint1:Zn(.9,tve),alertTint2:Zn(.8,tve),success:nve,successShade1:"#00AF3B",successShade2:"#009B35",successTint0:Zn(.95,nve),successTint1:Zn(.9,nve),successTint2:Zn(.8,nve),grayscale0:Zn(.95,rve),grayscale1:Zn(.9,rve),grayscale2:Zn(.8,rve),grayscale3:Zn(.7,rve),grayscale4:Zn(.6,rve),grayscale5:Zn(.5,rve),grayscale6:Zn(.4,rve),grayscale7:Zn(.3,rve),grayscale8:Zn(.2,rve),grayscale9:Zn(.1,rve),grayscale10:rve,contrast0:Zn(.95,ove),contrast1:Zn(.9,ove),contrast2:Zn(.8,ove),contrast3:Zn(.7,ove),contrast4:Zn(.6,ove),contrast5:Zn(.5,ove),contrast6:Zn(.4,ove),contrast7:Zn(.3,ove),contrast8:Zn(.2,ove),contrast9:Zn(.1,ove),contrast10:ove};var ave={color:ive,elevation0:"0px 2px 4px 2px rgba(0, 0, 0, 0.05)",elevation1:"0px 2px 4px 2px rgba(0, 0, 0, 0.1)",elevation2:"0px 2px 4px 2px rgba(0, 0, 0, 0.15)",elevation3:"0px 4px 8px 2px rgba(0, 0, 0, 0.2)",elevation4:"0px 4px 8px 2px rgba(0, 0, 0, 0.25)",font:{weight:{thin:100,light:300,default:400,medium:500,semiBold:600,bold:700},size:{xs:10,sm:12,md:14,lg:16,xl:18},family:{default:"'Roboto', sans-serif",medium:"'Roboto', sans-serif",light:"'Roboto', sans-serif"}},size:{xs:4,sm:8,md:16,lg:24}};const{font:lve}=ave;var sve={small:{height:28,iconSize:18,font:lve.size.sm,padding:10,iconOnlyPadding:4},medium:{height:32,iconSize:22,font:lve.size.md,padding:12,iconOnlyPadding:5},large:{height:36,iconSize:24,font:lve.size.lg,padding:14,iconOnlyPadding:6}};const cve="#FFFFFF",uve={scale0:ive.grayscale0,scale1:ive.grayscale1,scale2:ive.grayscale2,scale3:ive.grayscale3,scale4:ive.grayscale4,scale5:ive.grayscale5,scale6:ive.grayscale6,scale7:ive.grayscale7,scale8:ive.grayscale8,scale9:ive.grayscale9,scale10:ive.grayscale10,accent:ive.brand,accentShade:ive.brandShade1,background0:cve,background1:cve,background2:cve,background3:cve,background4:cve,background5:cve},dve="#FFFFFF",fve=ive.grayscale0,pve=ive.grayscale1,hve=ive.grayscale2,gve=ive.grayscale3,mve=ive.grayscale4,vve=ive.grayscale6,yve=ive.grayscale8,bve=ive.grayscale9,wve=ive.grayscale10,xve=Object.assign(Object.assign(Object.assign({},ave),uve),{name:"light",button:Object.assign(Object.assign({},sve),{primary:{color:{default:dve,hover:dve,active:dve},outlineColor:{default:wve,hover:wve,active:wve},background:{default:ive.brand,hover:ive.brandShade1,active:ive.brandShade2},outlineBackground:{default:ive.brandTint0,hover:ive.brandTint1,active:ive.brandTint2},border:{default:ive.brand,hover:ive.brandShade1,active:ive.brandShade2},divider:hve},secondary:{color:{default:wve,hover:wve,active:wve},outlineColor:{default:wve,hover:wve,active:wve},background:{default:pve,hover:hve,active:gve},outlineBackground:{default:pve,hover:hve,active:gve},border:{default:hve,hover:hve,active:hve},divider:hve},positive:{color:{default:dve,hover:dve,active:dve},outlineColor:{default:wve,hover:wve,active:wve},background:{default:ive.success,hover:ive.successShade1,active:ive.successShade2},outlineBackground:{default:ive.successTint0,hover:ive.successTint1,active:ive.successTint2},border:{default:ive.success,hover:ive.successShade1,active:ive.successShade2},divider:hve},negative:{color:{default:dve,hover:dve,active:dve},outlineColor:{default:wve,hover:wve,active:wve},background:{default:ive.error,hover:ive.errorShade1,active:ive.errorShade2},outlineBackground:{default:ive.errorTint0,hover:ive.errorTint1,active:ive.errorTint2},border:{default:ive.error,hover:ive.errorShade1,active:ive.errorShade2},divider:hve},caution:{color:{default:dve,hover:dve,active:dve},outlineColor:{default:wve,hover:wve,active:wve},background:{default:ive.warning,hover:ive.warningShade1,active:ive.warningShade2},outlineBackground:{default:ive.warningTint0,hover:ive.warningTint1,active:ive.warningTint2},border:{default:ive.warning,hover:ive.warningShade1,active:ive.warningShade2},divider:hve},subtle:{color:{default:ive.brand,hover:ive.brand,active:ive.brand},outlineColor:{default:ive.brand,hover:ive.brand,active:ive.brand},secondaryColor:{default:wve,hover:wve,active:wve},positiveColor:{default:ive.success,hover:ive.success,active:ive.success},negativeColor:{default:ive.error,hover:ive.error,active:ive.error},cautionColor:{default:ive.warning,hover:ive.warning,active:ive.warning},background:{default:"transparent",hover:pve,active:hve},outlineBackground:{default:"transparent",hover:pve,active:hve},border:{default:"transparent",hover:hve,active:hve},divider:hve},link:{color:{default:ive.brand,hover:ive.brandShade1,active:ive.brandShade2},outlineColor:{default:ive.brand,hover:ive.brandShade1,active:ive.brandShade2},secondaryColor:{default:yve,hover:bve,active:wve},positiveColor:{default:ive.success,hover:ive.successShade1,active:ive.successShade2},negativeColor:{default:ive.error,hover:ive.errorShade1,active:ive.errorShade2},cautionColor:{default:ive.warning,hover:ive.warningShade1,active:ive.warningShade2},background:{default:"transparent",hover:"transparent",active:"transparent"},outlineBackground:{default:"transparent",hover:"transparent",active:"transparent"},border:{default:"transparent",hover:"transparent",active:"transparent"},divider:"transparent"},disabled:{color:{default:mve,hover:mve,active:mve},outlineColor:{default:mve,hover:mve,active:mve},background:{default:pve,hover:pve,active:pve},outlineBackground:{default:fve,hover:fve,active:fve},border:{default:pve,hover:pve,active:pve},divider:pve},color:{default:dve}}),calendar:{background:{container:ive.contrast10,hover:pve,active:ive.brand,activeHover:ive.brandShade1,activeRange:ive.brandTint4},color:{disabled:mve,default:wve,active:ive.contrast10,current:ive.brand,outside:vve,weekday:yve,monthYear:yve,iconDefault:vve,iconDisabled:hve,iconHover:wve}},defaultBorder:`1px solid ${pve}`,formControl:{color:{default:yve,hover:wve,active:ive.brand,activeHover:ive.brandShade1,disabled:mve}},input:{borderRadius:4,background:{default:fve,hover:pve,focused:pve,disabled:fve},color:{default:wve,disabled:mve,placeholder:vve,description:vve,descriptionError:ive.error},borderColor:{default:vve,hover:yve,focused:ive.brand,disabled:mve,error:ive.error},labelColor:{default:yve,hover:yve,filled:vve,focused:ive.brand,disabled:mve}},menu:{background:dve},menuItem:{borderColor:ive.brand,background:{active:fve,hover:pve,inactive:"transparent"},color:{active:wve,hover:wve,inactive:vve}},modal:{background:ive.contrast10,color:{header:wve,body:vve}},options:{background:ive.contrast10},optionItem:{background:{active:pve,inactive:"transparent"},color:{active:wve,inactive:wve,accent:ive.brand}},table:{color:{header:vve,body:wve},borderColor:pve},toast:{color:wve,background:{deafult:"#F2F3F4",info:"#CCE3FD",success:"#CCF3D9",warning:"#FFEBCC",error:"#FFDFE1"},border:{deafult:yve,info:ive.brand,success:ive.success,warning:ive.warning,error:ive.error}},toggle:{slider:ive.contrast10},tooltip:{background:"#FFF",color:{default:wve,subtext:vve}}}),Cve={scale0:ive.contrast0,scale1:ive.contrast1,scale2:ive.contrast2,scale3:ive.contrast3,scale4:ive.contrast4,scale5:ive.contrast5,scale6:ive.contrast6,scale7:ive.contrast7,scale8:ive.contrast8,scale9:ive.contrast9,scale10:ive.contrast10,accent:ive.brandDark,accentShade:ive.brandDarkShade1,background0:ive.brandBackground0,background1:ive.brandBackground1,background2:ive.brandBackground2,background3:ive.brandBackground3,background4:ive.brandBackground4,background5:ive.brandBackground5},Sve=ive.contrast0,kve=ive.contrast1,Eve=ive.contrast2,Ove=ive.contrast3,Dve=ive.contrast4,jve=ive.contrast6,Pve=ive.contrast8,Tve=ive.contrast9,Mve=ive.contrast10,Ave=ive.brandDark,_ve={light:xve,dark:Object.assign(Object.assign(Object.assign({},ave),Cve),{name:"dark",button:Object.assign(Object.assign({},sve),{primary:{color:{default:Mve,hover:Mve,active:Mve},outlineColor:{default:Mve,hover:Mve,active:Mve},background:{default:ive.brand,hover:ive.brandShade1,active:ive.brandShade2},outlineBackground:{default:ive.brandTint0,hover:ive.brandTint1,active:ive.brandTint2},border:{default:ive.brand,hover:ive.brandShade1,active:ive.brandShade2},divider:Eve},secondary:{color:{default:Mve,hover:Mve,active:Mve},outlineColor:{default:Mve,hover:Mve,active:Mve},background:{default:kve,hover:Eve,active:Ove},outlineBackground:{default:kve,hover:Eve,active:Ove},border:{default:Eve,hover:Eve,active:Eve},divider:Eve},positive:{color:{default:Mve,hover:Mve,active:Mve},outlineColor:{default:Mve,hover:Mve,active:Mve},background:{default:ive.success,hover:ive.successShade1,active:ive.successShade2},outlineBackground:{default:ive.successTint0,hover:ive.successTint1,active:ive.successTint2},border:{default:ive.success,hover:ive.successShade1,active:ive.successShade2},divider:Eve},negative:{color:{default:Mve,hover:Mve,active:Mve},outlineColor:{default:Mve,hover:Mve,active:Mve},background:{default:ive.error,hover:ive.errorShade1,active:ive.errorShade2},outlineBackground:{default:ive.errorTint0,hover:ive.errorTint1,active:ive.errorTint2},border:{default:ive.error,hover:ive.errorShade1,active:ive.errorShade2},divider:Eve},caution:{color:{default:Mve,hover:Mve,active:Mve},outlineColor:{default:Mve,hover:Mve,active:Mve},background:{default:ive.warning,hover:ive.warningShade1,active:ive.warningShade2},outlineBackground:{default:ive.warningTint0,hover:ive.warningTint1,active:ive.warningTint2},border:{default:ive.warning,hover:ive.warningShade1,active:ive.warningShade2},divider:Eve},subtle:{color:{default:ive.brand,hover:ive.brand,active:ive.brand},outlineColor:{default:ive.brand,hover:ive.brand,active:ive.brand},secondaryColor:{default:Mve,hover:Mve,active:Mve},positiveColor:{default:ive.success,hover:ive.success,active:ive.success},negativeColor:{default:ive.error,hover:ive.error,active:ive.error},cautionColor:{default:ive.warning,hover:ive.warning,active:ive.warning},background:{default:"transparent",hover:kve,active:Eve},outlineBackground:{default:"transparent",hover:kve,active:Eve},border:{default:"transparent",hover:Eve,active:Eve},divider:Eve},link:{color:{default:ive.brandShade2,hover:ive.brandShade1,active:ive.brand},outlineColor:{default:ive.brandShade2,hover:ive.brandShade1,active:ive.brand},secondaryColor:{default:Pve,hover:Tve,active:Mve},positiveColor:{default:ive.successShade2,hover:ive.successShade1,active:ive.success},negativeColor:{default:ive.errorShade2,hover:ive.errorShade1,active:ive.error},cautionColor:{default:ive.warningShade2,hover:ive.warningShade1,active:ive.warning},background:{default:"transparent",hover:"transparent",active:"transparent"},outlineBackground:{default:"transparent",hover:"transparent",active:"transparent"},border:{default:"transparent",hover:"transparent",active:"transparent"},divider:"transparent"},disabled:{color:{default:Dve,hover:Dve,active:Dve},outlineColor:{default:Dve,hover:Dve,active:Dve},background:{default:kve,hover:kve,active:kve},outlineBackground:{default:Sve,hover:Sve,active:Sve},border:{default:kve,hover:kve,active:kve},divider:kve},color:{default:"#FFFFFF"}}),calendar:{background:{container:ive.brandBackground3,hover:kve,active:ive.brand,activeHover:ive.brandShade1,activeRange:ive.brandTint4},color:{disabled:Dve,default:Mve,active:Mve,current:Ave,outside:jve,weekday:Pve,monthYear:Pve,iconDefault:jve,iconDisabled:Eve,iconHover:Mve}},defaultBorder:`1px solid ${kve}`,formControl:{color:{default:Pve,hover:Mve,active:ive.brand,activeHover:ive.brandShade1,disabled:Dve}},input:{borderRadius:4,background:{default:Sve,hover:kve,focused:kve,disabled:Sve},color:{default:Mve,disabled:Dve,placeholder:jve,description:jve,descriptionError:ive.error},borderColor:{default:jve,hover:Pve,focused:Ave,disabled:Dve,error:ive.error},labelColor:{default:Pve,hover:Pve,filled:jve,focused:Ave,disabled:Dve}},menu:{background:ive.brandBackground2},menuItem:{borderColor:ive.brand,background:{active:Sve,hover:kve,inactive:"transparent"},color:{active:Mve,hover:Mve,inactive:jve}},modal:{background:ive.brandBackground3,color:{header:Mve,body:jve}},options:{background:ive.brandBackground2},optionItem:{background:{active:kve,inactive:"transparent"},color:{active:Mve,inactive:Mve,accent:Ave}},table:{color:{header:jve,body:Mve},borderColor:kve},toast:{color:Mve,background:{deafult:"#0D2433",info:"#002A51",success:"#003A2D",warning:"#333220",error:"#332635"},border:{deafult:Pve,info:ive.brand,success:ive.success,warning:ive.warning,error:ive.error}},toggle:{slider:ive.brandBackground0},tooltip:{background:ive.brandBackground4,color:{default:Mve,subtext:jve}}})};exports.Accordion=qt,exports.Audio=gC,exports.BarChart=t=>{var{data:r,legend:o,keys:i,stacked:a,barGap:l,barCategoryGap:c,barSize:u=16,maxBarSize:d,vertical:f=!1,hideYLabels:p,hideXLabels:h,xAxisHeight:g=22,yAxisWidth:m=45}=t,v=s(t,["data","legend","keys","stacked","barGap","barCategoryGap","barSize","maxBarSize","vertical","hideYLabels","hideXLabels","xAxisHeight","yAxisWidth"]);const{scale2:y}=n.useTheme();return e.jsxs(zQ,Object.assign({},v,{children:[e.jsx($Q,{}),e.jsx($R,{width:"100%",height:"100%",children:e.jsxs(OJ,{margin:{top:0,left:0,right:0,bottom:0},data:r,layout:f?"vertical":"horizontal",barSize:u,maxBarSize:d,barGap:l,barCategoryGap:c,children:[e.jsx(iX,{stroke:y,strokeDasharray:"3 5",vertical:f,horizontal:!f}),e.jsx(kX,{stroke:y,tickMargin:4,tickFormatter:e=>f?jC(e):e,tick:!h&&{},height:h?12:g,dataKey:f?void 0:"name",type:f?"number":"category"}),e.jsx(OX,{stroke:y,tickMargin:4,tickFormatter:e=>f?e:jC(e),tick:!p&&{},width:p?5:m,dataKey:f?"name":void 0,type:f?"category":"number"}),BQ(),o&&e.jsx(bA,{content:e.jsx(KQ,{})}),i.map((({key:t,color:n},r)=>{let o=f?[0,2,2,0]:[2,2,0,0];return a&&r!==i.length-1&&(o=[0,0,0,0]),e.jsx(gG,{dataKey:t,fill:n,stackId:a?"stack":void 0,radius:o},`bar-${r+1}`)}))]})})]}))},exports.Button=dC,exports.Calendar=k1,exports.Checkbox=Tx,exports.Code=({children:r,code:o,className:i,lang:a,lineHighlights:l,noNumbers:s,margin:c,marginTop:u,marginBottom:d,marginRight:f,marginLeft:p})=>{const{name:h}=n.useTheme(),g={margin:c,marginTop:u,marginBottom:d,marginRight:f,marginLeft:p},m=(null==i?void 0:i.replace(/}/g,"").split("{"))||[];let[v,y,b]=m;v=v||a||"",y=y||l||"",b=b||s?"nonumbers":"";let w=v?v.replace(/language-/,""):"text",x="";if(w.includes("rest")){const[e,t]=w.split("-");w=e,x=(null==t?void 0:t.toUpperCase())||""}const C="nonumbers"===b.toLowerCase().trim(),S=e=>{if(y){const t=(e=>{const t=e.split(",").map((e=>{if(e.match(/^\d+$/))return parseInt(e);if(e.includes("-")){const[t,n]=e.split("-"),r=parseInt(t),o=parseInt(n);return r<o?tt(r,o+1):tt(o,r+1)}return null}));return function(e){const t=[];for(const n of e)n&&t.push(n);return t}(t.flat())})(y);return t.some((t=>e===t))}return!1},k=(null==o?void 0:o.trim())||(null==r?void 0:r.trim())||"";return"rest"===w?e.jsx(C0,{method:x,url:k}):e.jsx(b0,{code:k,language:w,theme:"dark"===h?W1.oceanicNext:W1.github,children:({className:n,style:r,tokens:o,getLineProps:i,getTokenProps:a})=>e.jsxs(O0,Object.assign({className:n,style:Object.assign({},r)},g,{"data-testid":"code",children:[o.map(((n,r,o)=>t.createElement(D0,Object.assign({},i({line:n,key:r}),{key:`line-${r+1}`,highlight:S(r+1)}),o.length>1&&!C&&e.jsx(j0,{children:r+1}),n.map(((e,n)=>t.createElement("span",Object.assign({},a({token:e,key:n}),{key:`token-${n+1}`}))))))),e.jsx(w0,{content:k})]}))})},exports.ComboBox=_0,exports.CommandMenu=n=>{var{options:r,inputProps:o,modalProps:i,triggerRef:a,position:l,offset:c,open:u,onChange:d,setOpen:f}=n,p=s(n,["options","inputProps","modalProps","triggerRef","position","offset","open","onChange","setOpen"]);const h=t.useRef(null),g=t.useRef(),{"aria-label":m}=p,v=s(p,["aria-label"]),y=e.jsx(Fb,{"aria-label":m,children:e.jsxs(R9,Object.assign({},v,{children:[e.jsxs(L9,{margin:8,width:"auto",children:[e.jsx(Ut,{name:"search",inheritColor:!0,marginRight:8}),e.jsx(I9,Object.assign({placeholder:"Search",autoFocus:!0,onValueChange:()=>{clearTimeout(null==g?void 0:g.current),g.current=setTimeout((()=>{h.current&&(null==h||h.current.scrollTo({top:0}))}),0)}},o))]}),e.jsxs(N9,{ref:h,children:[e.jsx($9,{children:"No results found."}),r&&e.jsx(_9,{options:r,onItemSelect:e=>{d(e),f(!1)}})]})]}))});return a?e.jsx(Lb,{triggerRef:a,isOpen:u,onOpenChange:f,placement:l,offset:c,children:y}):e.jsx(z9,Object.assign({isDismissable:!0,isOpen:u,onOpenChange:f},i,{children:e.jsx(jw,{children:y})}))},exports.DatePicker=n=>{var{value:r,label:o,inputRef:i,iconLeft:a,iconRight:l,loading:c,fontSize:u,placeholderColor:d,disabled:f,description:p,errorMessage:h,preventPast:g,preventFuture:m,onChange:v,afterShow:y,afterHide:b}=n,w=s(n,["value","label","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","description","errorMessage","preventPast","preventFuture","onChange","afterShow","afterHide"]);const{current:x}=t.useRef(r?x1(r):void 0),[C,S]=t.useState(x),k=t.useRef(null),{min:E,max:O}=C1({past:g,future:m,rel:x||kfe}),D=e=>{const{year:t,month:n,day:r}=e,o=new Ds(t,n,r);S(o);const i=w1(e);v&&v(i)},j=!(C||!o);return e.jsxs(Efe,Object.assign({value:C,hasLabel:!!o,isDisabled:f,minValue:E,maxValue:O,onChange:D,onOpenChange:e=>{y&&e&&y(),b&&!e&&b()},ref:k},w,{children:[a&&A0(a,{marginRight:8}),e.jsxs(o1,{filled:!!C,disabled:f,children:[o,e.jsx(Ofe,{ref:i,hide:j,fontSize:u,placeholderColor:d,isDisabled:f,children:t=>e.jsx(Cfe,{placeholderColor:d,segment:t})})]}),e.jsx(Sfe,{isDisabled:f,children:e.jsx(Ut,{size:18,name:"calendar",inheritColor:!0})}),l&&A0(l),c&&e.jsx(Xx,{}),e.jsx(e1,{description:p,errorMessage:h}),e.jsx(Lb,{triggerRef:k,children:e.jsx(Fb,{children:e.jsx(k1,{date:C?w1(C):void 0,onChange:e=>{D(x1(e))},preventPast:g,preventFuture:m})})})]}))},exports.DateRangePicker=n=>{var{startValue:r,endValue:o,label:i,inputRef:a,iconLeft:l,iconRight:c,loading:u,fontSize:d,placeholderColor:f,disabled:p,description:h,errorMessage:g,preventPast:m,preventFuture:v,onChange:y,afterShow:b,afterHide:w}=n,x=s(n,["startValue","endValue","label","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","description","errorMessage","preventPast","preventFuture","onChange","afterShow","afterHide"]);const{current:C}=t.useRef(r?x1(r):void 0),{current:S}=t.useRef(o?x1(o):void 0),[k,E]=t.useState(C),[O,D]=t.useState(S),j=t.useRef(null),{min:P,max:T}=C1({past:m,future:v,rel:C||Tfe}),M=e=>{const{start:t,end:n}=e,{year:r,month:o,day:i}=t,{year:a,month:l,day:s}=n,c=new Ds(r,o,i);E(c);const u=new Ds(a,l,s);D(u);const d=w1(t),f=w1(n);y&&y(d,f)},A=!(!k&&!O),_=!(A||!i);return e.jsxs(Mfe,Object.assign({value:k&&O?{start:k,end:O}:void 0,hasLabel:!!i,isDisabled:p,minValue:P,maxValue:T,onChange:M,onOpenChange:e=>{b&&e&&b(),w&&!e&&w()},ref:j},x,{children:[l&&A0(l,{marginRight:8}),e.jsxs(o1,{filled:A,disabled:p,children:[i,e.jsxs(_fe,{fontSize:d,hide:_,isDisabled:p,children:[e.jsx(Afe,{slot:"start",ref:a,fontSize:d,placeholderColor:f,isDisabled:p,children:t=>e.jsx(Cfe,{placeholderColor:f,segment:t})}),e.jsx("span",{"aria-hidden":"true",children:"–"}),e.jsx(Afe,{slot:"end",fontSize:d,placeholderColor:f,isDisabled:p,children:t=>e.jsx(Cfe,{placeholderColor:f,segment:t})})]})]}),e.jsx(Sfe,{isDisabled:p,children:e.jsx(Ut,{size:18,name:"calendar",inheritColor:!0})}),c&&A0(c),u&&e.jsx(Xx,{}),e.jsx(e1,{description:h,errorMessage:g}),e.jsx(Lb,{triggerRef:j,children:e.jsx(Fb,{children:e.jsx(jfe,{startDate:k?w1(k):void 0,endDate:O?w1(O):void 0,onChange:(e,t)=>{const n=x1(e),r=x1(t);M({start:n,end:r})},preventPast:m,preventFuture:v})})})]}))},exports.DocTable=F9,exports.DraftEditor=pde,exports.Dropdown=Ude,exports.DropdownMenu=Zx,exports.DropdownSelect=n=>{var{label:r,options:o,width:i,search:a,onChange:l}=n,c=s(n,["label","options","width","search","onChange"]);const[u,d]=t.useState(new Set),[f,p]=t.useState(!1),[h,g]=t.useState(""),[m,v]=t.useState(!1),[y,b]=t.useState(!1),[w,x]=t.useState(0),[C,S]=t.useState("menu"),k=t.useRef(null),E=t.useRef(null),O=(e=>e.map((e=>"options"in e?e.options:e)).flat())(o),D=efe(o,h),j=e=>{d(e);const t=O.length,n="all"===e||e.size===t,r=!n&&e.size>0;v(n),b(r),x(n?t:e.size);const o=n?O:O.filter((t=>e.has(t.id)));l&&l(o)};return e.jsxs(tfe,Object.assign({width:i,ref:k,tabIndex:-1},c,{children:[e.jsxs(ofe,{children:[e.jsx(Tx,{partial:y,checked:m,onChange:()=>j(m?new Set:"all")}),e.jsx(rfe,{children:r})]}),e.jsxs(ofe,{gap:8,children:[(y||m)&&e.jsx(ife,{children:y?w:"All"}),e.jsxs(mw,{onOpenChange:e=>{p(e),e||(g(""),S("menu"))},children:[e.jsx(Vx,{children:e.jsx(Ut,{name:f?"caret-up":"caret-down",inheritColor:!0})}),e.jsx(Wx,{triggerRef:k,offset:2,children:({isEntering:t,isExiting:n})=>{var r;return e.jsxs(nfe,{width:i||(null===(r=null==k?void 0:k.current)||void 0===r?void 0:r.offsetWidth),readOnly:t||n,children:[a&&e.jsx(Jde,{value:h,onChange:g,placeholder:"Search",padding:"2px 4px",margin:8,minHeight:"unset",height:"auto",width:"auto",onFocus:()=>S("input"),onKeyDown:e=>{var t;"ArrowDown"!==e.key&&"ArrowUp"!==e.key||null===(t=E.current)||void 0===t||t.focus()}}),h&&0===D.length&&e.jsx(afe,{children:"No results found"}),e.jsx(Kx,{options:D,selectionMode:"multiple",width:"100%",selectedKeys:u,onSelectionChange:j,autoFocus:"menu"===C,menuRef:E,itemProps:{checkbox:!0},readOnly:t||n})]})}})]})]})]}))},exports.Ellipsis=lfe,exports.Form=pfe,exports.Grid=sfe,exports.Icon=Ut,exports.ImageViewer=({visible:n,close:r,images:o,startIndex:i,alt:a,maxWidth:l,maxHeight:s,opacity:c})=>{const[u,d]=t.useState(i),f=et(r,n,["#prev","#next","#prev *","#next *"]);t.useEffect((()=>{d(i)}),[i]);const p=()=>d(u>0?u-1:o.length-1),h=()=>u<o.length-1?d(u+1):d(0),g=e=>{const{key:t}=e;switch(t){case"ArrowLeft":case"ArrowDown":e.preventDefault(),p();break;case"ArrowRight":case"ArrowUp":e.preventDefault(),h();break;case"Escape":e.preventDefault(),r()}};return t.useEffect((()=>{const e="undefined"==typeof window,t=e?()=>null:()=>window.removeEventListener("keydown",g);return n&&!e&&window.addEventListener("keydown",g),t}),[n,u]),n?e.jsxs(vfe,{opacity:c,prevNext:o.length>1,children:[e.jsx(yfe,{onClick:r,children:e.jsx(Ut,{name:"close",size:25,color:"white"})}),o.length>1&&e.jsx(bfe,{id:"prev",onClick:p,children:e.jsx(Ut,{name:"chevron-left",size:35,color:"white"})}),e.jsx(wfe,{ref:f,src:o[u],alt:a,maxWidth:l,maxHeight:s}),o.length>1&&e.jsx(bfe,{next:!0,id:"next",onClick:h,children:e.jsx(Ut,{name:"chevron-right",size:35,color:"white"})})]}):null},exports.InlineCode=xfe,exports.Input=Mde,exports.InputUtils=Wue,exports.Label=dfe,exports.LineChart=r=>{var{data:o,legend:i,keys:a}=r,l=s(r,["data","legend","keys"]);const[c,u]=t.useState(a),{scale2:d}=n.useTheme();return e.jsxs(zQ,Object.assign({},l,{children:[e.jsx($Q,{}),e.jsx($R,{width:"100%",height:"100%",children:e.jsxs(EJ,{margin:{top:8,left:-14,right:5,bottom:-8},data:o,children:[e.jsx(iX,{stroke:d,strokeDasharray:"3 5",vertical:!1}),e.jsx(kX,{stroke:d,dataKey:"name",tickMargin:4}),e.jsx(OX,{stroke:d,tickMargin:4,tickFormatter:e=>jC(e)}),BQ(),i&&e.jsx(bA,{content:e.jsx(KQ,{toggleData:a.length>1?e=>{u((t=>(t=>t.map((t=>t.key===e.value?Object.assign(Object.assign({},t),{hidden:!t.hidden}):t)))(t)))}:void 0})}),c.map((({key:t,color:n,hidden:r},o)=>e.jsx(CX,{dataKey:t,stroke:n,dot:!1,hide:r,activeDot:{stroke:n,strokeWidth:1,r:3},type:"monotone"},`line-${o+1}`)))]})})]}))},exports.Menu=Kfe,exports.Message=Zfe,exports.MessageHr=({text:t,color:n,style:r})=>e.jsxs(epe,{children:[e.jsx(Qfe,{}),e.jsx(Jfe,{color:n,style:r,children:t}),e.jsx(Qfe,{})]}),exports.Modal=tpe,exports.MultiSelect=ipe,exports.Notification=jJ,exports.NumberInput=n=>{var{value:r,label:o,placeholder:i,inputRef:a,iconLeft:l,iconRight:c,loading:u,fontSize:d,placeholderColor:f,disabled:p,readOnly:h,invalid:g,required:m,description:v,errorMessage:y,hideControls:b,separator:w=!0,onChange:x}=n,C=s(n,["value","label","placeholder","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","readOnly","invalid","required","description","errorMessage","hideControls","separator","onChange"]);const[S,k]=t.useState(NaN);t.useEffect((()=>{null!=r&&S!==r&&k(r)}),[r]);const E=!Number.isNaN(S)&&null!=S;return e.jsxs(Rfe,Object.assign({value:S,onChange:e=>{k(e),x&&x(e)},hasLabel:!!o,paddingRight:0,isDisabled:p,isReadOnly:h||u,isInvalid:g,isRequired:m,formatOptions:{useGrouping:w}},C,{children:[l&&A0(l,{marginRight:8}),e.jsxs(o1,{filled:E,disabled:p,children:[o,e.jsx(M0,{ref:a,placeholder:i,hide:!(E||!o),fontSize:d,placeholderColor:f,isDisabled:p})]}),c&&A0(c),u&&e.jsx(Xx,{}),!b&&e.jsxs(Lfe,{children:[e.jsx(Ife,{slot:"increment",isDisabled:p||h,children:e.jsx(Ut,{size:o?23.5:19.5,name:"caret-up",inheritColor:!0})}),e.jsx(Nfe,{}),e.jsx(Ife,{slot:"decrement",isDisabled:p||h,children:e.jsx(Ut,{size:o?23.5:19.5,name:"caret-down",inheritColor:!0})})]}),e.jsx(e1,{description:v,errorMessage:y})]}))},exports.Options=Nde,exports.Pagination=n=>{var{onPageNav:r,page:o,totalPages:i,maxVisibleNumbers:a,width:l}=n,c=s(n,["onPageNav","page","totalPages","maxVisibleNumbers","width"]);const[u,d]=t.useState(hpe(o)||1),[f,p]=t.useState(0),h=function(e,t,n=1){let r=t?e:0;const o=t||e,i=[];for(;r<=o;)i.push(r),r+=n;return i}(1,i),g=((e,t)=>{const n=[...e],r=[];for(;n.length>0;){const e=n.splice(0,t);r.push(e)}return r})(h,hpe(a)||h.length),m=e=>{if(e>=1&&e<=i){const t=(e=>{for(let t=0;t<g.length;t++)if(g[t].includes(e))return t;return-1})(e);p(t),d(e),r(e)}},v=0!==f,y=f!==g.length-1;return e.jsxs(gpe,Object.assign({width:l},c,{children:[e.jsx(vpe,{disabled:1===u,onClick:()=>m(1),children:e.jsx(Ut,{name:"double-arrow-left",title:"first",inheritColor:!0})}),e.jsx(vpe,{disabled:1===u,onClick:()=>m(u-1),children:e.jsx(Ut,{name:"chevron-left",title:"prev",inheritColor:!0})}),g[f].map(((n,r,o)=>e.jsxs(t.Fragment,{children:[0===r&&v?e.jsx(bpe,{children:"... "}):"",e.jsx(ype,{selected:n===u,onClick:()=>m(n),children:n}),r===o.length-1&&y?e.jsx(bpe,{children:" ..."}):""]},`pageIndex-${n}`))),e.jsx(vpe,{disabled:u===i,onClick:()=>m(u+1),children:e.jsx(Ut,{name:"chevron-right",title:"next",inheritColor:!0})}),e.jsx(vpe,{disabled:u===i,onClick:()=>m(i),children:e.jsx(Ut,{name:"double-arrow-right",title:"last",inheritColor:!0})})]}))},exports.PhoneInput=n=>{var{value:r,label:o,placeholder:i,inputRef:a,iconLeft:l,iconRight:c,loading:u,fontSize:d,placeholderColor:f,disabled:p,readOnly:h,invalid:g,required:m,description:v,errorMessage:y,onChange:b}=n,w=s(n,["value","label","placeholder","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","readOnly","invalid","required","description","errorMessage","onChange"]);const[x,C]=t.useState(""),S=t.useRef(null);t.useEffect((()=>{var e,t;if(null!=r&&x!==r){const n=Tde.normalize(r),o=Tde.format(n);C(o);const{current:i}=a||S;if(i&&r===Tde.normalize(r)){const n=new Event("change",{bubbles:!0}),{prototype:r}=window.HTMLInputElement;null===(t=null===(e=Object.getOwnPropertyDescriptor(r,"value"))||void 0===e?void 0:e.set)||void 0===t||t.call(i,o),i.dispatchEvent(n)}}}),[r]);return e.jsxs($fe,Object.assign({value:x,hasLabel:!!o,isDisabled:p,isReadOnly:h||u,isInvalid:g,isRequired:m,onChange:e=>{const t=Tde.normalize(e);if(t.length>10||e&&!t)return;const n=Tde.format(t);x!==n&&(C(n),b&&b(n,t))},type:"tel"},w,{children:[l&&A0(l,{marginRight:8}),e.jsxs(o1,{filled:!!x,disabled:p,children:[o,e.jsx(M0,{ref:a||S,placeholder:i,hide:!(x||!o),fontSize:d,placeholderColor:f,isDisabled:p})]}),c&&A0(c),u&&e.jsx(Xx,{}),e.jsx(e1,{description:v,errorMessage:y})]}))},exports.PieChart=t=>{var{size:n=200,data:r,innerRadius:o,showWhenEmpty:i}=t,a=s(t,["size","data","innerRadius","showWhenEmpty"]);const l=(null==r?void 0:r.length)>0,c=l?r:i?[{name:"1",value:1,color:"#999"}]:void 0,u=n/2-1;return e.jsx(zQ,Object.assign({width:n,height:n},a,{children:e.jsxs(DJ,{width:n,height:n,children:[e.jsx(KZ,{dataKey:"value",data:c,innerRadius:o,outerRadius:u,children:null==c?void 0:c.map((t=>e.jsx(zR,{fill:t.color||"#999"},t.name)))}),l&&BQ()]})}))},exports.Progress=({percent:t,color:n,circle:r,width:o,height:i,size:a,thickness:l=8,margin:s,marginTop:c,marginBottom:u,marginRight:d,marginLeft:f})=>{const p={margin:s,marginTop:c,marginBottom:u,marginRight:d,marginLeft:f};let h=t;return t>100?h=100:t<0&&(h=0),r?e.jsx(wpe,Object.assign({percent:h,size:a,thickness:l,color:n},p)):e.jsx(kpe,Object.assign({width:o,height:i||l},p,{children:e.jsx(Epe,{color:n,width:h})}))},exports.Radio=cfe,exports.RangeCalendar=jfe,exports.ResetStyles=({families:r,fontFamily:o})=>(t.useEffect((()=>{var e;e=r,Xme.load({google:{families:e||["Roboto:100,300,400,500,700"]}})}),[r]),e.jsx(n.Global,{styles:{"html,body":{margin:0,fontFamily:o||"'Roboto', sans-serif",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}}})),exports.ScrollbarStyles=()=>{const{scale1:t}=n.useTheme();return e.jsx(n.Global,{styles:{"::-webkit-scrollbar":{width:8,height:8},"::-webkit-scrollbar-track":{backgroundColor:"transparent",border:"none"},"::-webkit-scrollbar-thumb:horizontal, ::-webkit-scrollbar-thumb:vertical":{backgroundColor:t,WebkitBorderRadius:6},"*":{scrollbarColor:`${t} transparent`}}})},exports.SearchInput=Jde,exports.Select=d1,exports.Slider=fC,exports.Spacer=Ope,exports.Spinner=Xx,exports.Table=Hpe,exports.Tabs=t=>{var{items:n,activeItem:r,itemWidth:o,itemGap:i,onChange:a}=t,l=s(t,["items","activeItem","itemWidth","itemGap","onChange"]);const c=n.filter((e=>!1!==e.visible));return e.jsx(Zpe,Object.assign({gap:i},l,{children:c.map((t=>{const{id:n,label:i,icon:l,iconColor:c,iconPosition:u}=t,d=s(t,["id","label","icon","iconColor","iconPosition"]);return e.jsxs(qpe,Object.assign({active:n===r,itemWidth:o,reverse:"right"===u,onClick:()=>(e=>{a(e)})(t),gap:l?4:void 0},d,{children:[l&&e.jsx(Ut,{name:l,size:"small",color:c,inheritColor:!c}),i]}),n)}))}))},exports.TextInput=n=>{var{value:r,label:o,placeholder:i,inputRef:a,iconLeft:l,iconRight:c,loading:u,fontSize:d,placeholderColor:f,disabled:p,readOnly:h,invalid:g,required:m,description:v,errorMessage:y,accepts:b,onChange:w}=n,x=s(n,["value","label","placeholder","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","readOnly","invalid","required","description","errorMessage","accepts","onChange"]);const[C,S]=t.useState("");t.useEffect((()=>{null!=r&&C!==r&&S(r)}),[r]);return e.jsxs(zfe,Object.assign({value:C,hasLabel:!!o,isDisabled:p,isReadOnly:h||u,isInvalid:g,isRequired:m,onChange:e=>{Xde(e,b)&&(S(e),w&&w(e))}},x,{children:[l&&A0(l,{marginRight:8}),e.jsxs(o1,{filled:!!C,disabled:p,children:[o,e.jsx(M0,{ref:a,placeholder:i,hide:!(C||!o),fontSize:d,placeholderColor:f,isDisabled:p})]}),c&&A0(c),u&&e.jsx(Xx,{}),e.jsx(e1,{description:v,errorMessage:y})]}))},exports.TimeInput=n=>{var{value:r,label:o,inputRef:i,iconLeft:a,iconRight:l,loading:c,fontSize:u,placeholderColor:d,disabled:f,readOnly:p,invalid:h,required:g,description:m,errorMessage:v,onChange:y}=n,b=s(n,["value","label","inputRef","iconLeft","iconRight","loading","fontSize","placeholderColor","disabled","readOnly","invalid","required","description","errorMessage","onChange"]);const[w,x]=t.useState(r?bs(r):null);t.useEffect((()=>{if(r){`${null==w?void 0:w.hour}:${null==w?void 0:w.minute}`!==r&&x(bs(r))}}),[r]);const C=!(w||!o);return e.jsxs(Ffe,Object.assign({value:w,hasLabel:!!o,isDisabled:f,isReadOnly:p||c,isInvalid:h,isRequired:g,onChange:e=>{const{hour:t,minute:n,second:r}=e,o=new Ps(t,n,r);x(o),y&&y(e.toString())}},b,{children:[a&&A0(a,{marginRight:8}),e.jsxs(o1,{filled:!!w,disabled:f,children:[o,e.jsx(Bfe,{ref:i,hide:C,fontSize:u,placeholderColor:d,isDisabled:f,children:t=>e.jsx(Cfe,{placeholderColor:d,segment:t})})]}),l&&A0(l),c&&e.jsx(Xx,{}),e.jsx(e1,{description:m,errorMessage:v})]}))},exports.ToastStyles=()=>{const{font:t,toast:r}=n.useTheme();return e.jsx(n.Global,{styles:{".Toastify__toast":{color:r.color,borderRadius:4,fontFamily:t.family.default},".Toastify__close-button":{color:r.color},".Toastify__toast--default":{background:r.background.deafult,border:`1px solid ${r.border.deafult}`},".Toastify__toast--info":{background:r.background.info,border:`1px solid ${r.border.info}`,"& .Toastify__toast-icon > svg":{fill:r.border.info}},".Toastify__toast--success":{background:r.background.success,border:`1px solid ${r.border.success}`,"& .Toastify__toast-icon > svg":{fill:r.border.success}},".Toastify__toast--warning":{background:r.background.warning,border:`1px solid ${r.border.warning}`,"& .Toastify__toast-icon > svg":{fill:r.border.warning}},".Toastify__toast--error":{background:r.background.error,border:`1px solid ${r.border.error}`,"& .Toastify__toast-icon > svg":{fill:r.border.error}},".Toastify__progress-bar--default":{background:r.border.deafult},".Toastify__progress-bar--info":{background:r.border.info},".Toastify__progress-bar--success":{background:r.border.success},".Toastify__progress-bar--warning":{background:r.border.warning},".Toastify__progress-bar--error":{background:r.border.error}}})},exports.Toggle=ufe,exports.Tooltip=Rme,exports.TransferList=({items:n,onChange:r,beforeItemChange:o,listTitle:i,noItemsMessage:a="No items",hideSelectAll:l,hideRemoveAll:s,readOnly:c,width:u,margin:d,marginTop:f,marginBottom:p,marginRight:h,marginLeft:g})=>{const m=t.useRef(),[v,y]=t.useState([]),[b,w]=t.useState([]),x={margin:d,marginTop:f,marginBottom:p,marginRight:h,marginLeft:g},C=e=>{const t=Object.assign({},e);return delete t.selected,t};t.useEffect((()=>{if(!Mt(n,m.current)){m.current=n;const e=n.filter((e=>e.selected)).map(C),t=n.filter((e=>!e.selected)).map(C);w(e),y(t)}}),[n,m]),t.useEffect((()=>{r(b)}),[b]);const S=(e,t)=>{const n=n=>((e,t)=>{const n="select"===t,r=n?w:y;(n?y:w)((t=>((e,t)=>e.filter((e=>e.id!==t.id)))(t,e))),r((t=>[...t,e]))})(n||e,t);o?o(e,t,n):n()},k=e=>{const t="select"===e?y:w,n="select"===e?v:b;("select"===e?w:y)((e=>[...e,...n])),t([])},E=t=>e.jsxs("div",{style:{display:"flex",alignItems:"center",columnGap:8},children:[t.leftElement||null,t.header&&t.body?e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx(Zme,{children:t.header}),e.jsx(qme,{children:t.body})]}):t.label,t.rightElement&&e.jsx("div",{style:{marginLeft:"auto"},children:t.rightElement})]}),O=!(l&&s);return e.jsxs(Fme,Object.assign({width:u,readOnly:c},x,{children:[i&&e.jsx(Bme,{children:i}),e.jsxs(Kme,{children:[!c&&e.jsxs(Vme,{children:[O&&e.jsx(Hme,{children:v.length>0&&!l&&e.jsx(dC,{small:!0,outline:!0,onClick:()=>k("select"),icon:"arrow-right",iconPosition:"right",children:"All"})}),e.jsx(Ume,{children:v.map((t=>e.jsxs(Wme,{onClick:()=>S(t,"select"),color:t.color,children:[E(t),e.jsx(Ut,{name:"chevron-right"})]},t.id)))})]}),e.jsxs(Vme,{children:[O&&!c&&e.jsx(Hme,{children:b.length>0&&!s&&!c&&e.jsx(dC,{small:!0,outline:!0,secondary:!0,onClick:()=>k("remove"),icon:"arrow-left",children:"All"})}),c&&0===b.length?e.jsx("div",{children:a}):e.jsx(Ume,{children:b.map((t=>e.jsxs(Wme,{onClick:()=>S(t,"remove"),color:t.color,children:[E(t),e.jsx(Ut,{name:"chevron-left"})]},t.id)))})]})]})]}))},exports.colors=ive,exports.copyToClipboard=IQ,exports.darkScale=Cve,exports.formatDate=(e,t)=>{if(!e)return"";const n=new Date(e);let r=t,o=!1;"object"==typeof t&&(r=t.time,o=!!t.lowercase);const i="onlyTime"===r||!1,a="withTime"===r||!1,l="relative"===r||!1,s=new Date,c=AQ(n,"EEEE"),u=AQ(n,"MMM d"),d=AQ(n,"MMM d, y"),f=AQ(n,"h:mm aaa"),p=RQ(n),h=function(e){return+PJ(e)>Date.now()}(n),g=function(e){return VJ(e,KJ(e))}(n),m=LQ(n),v=function(e){return VJ(e,MJ(KJ(e),1))}(n),y=ZJ(s,n),b=qJ(s,n),w=y>=-10&&y<=10,x=a||l?`, ${f}`:"",C=e=>{if(o){return["Just","Yesterday","Today","Tomorrow"].some((t=>e.includes(t)))?e.toLowerCase():e}return e};if(i)return C(f);if(l){if(0===y)return C("Just now");if(w)return C(h?`Today, in ${-1*y} min.`:`${y} min. ago`);if(g)return C(h?`Today${x}`:f)}return C(g?`Today${x}`:m?`Yesterday${x}`:v?`Tomorrow${x}`:0!==b||h?p?`${u}${x}`:`${d}${x}`:`${c}${x}`)},exports.lightScale=uve,exports.marginProps=Kt,exports.numberWithCommas=NQ,exports.paddingProps=Bt,exports.positionProps=Vt,exports.theme=_ve,exports.useConfirm=({header:n="Do you want to proceed?",text:r,cancelText:o="Cancel",confirmText:i="Okay",negative:a,input:l,inputLabel:s,inputPlaceholder:c,inputValue:u}={})=>{const[d,f]=t.useState(u||""),[p,h]=t.useState(null),g=()=>h(null);t.useEffect((()=>{l&&"string"==typeof u&&d!==u&&f(u)}),[p]);const m=()=>{null==p||p.resolve(!l||d),g()},v=()=>{null==p||p.resolve(!1),g()};Qe(document,"keydown",(e=>{const{key:t}=e;switch(t){case"Enter":m();break;case"Escape":v()}}),!!p,[d]);return[()=>new Promise((e=>{h({resolve:e})})),()=>e.jsxs(tpe,{visible:!!p,onClose:g,width:400,children:[n&&e.jsx(tpe.Header,{children:n}),r&&e.jsx(tpe.Text,{children:r}),l&&e.jsx(tpe.Body,{marginTop:4,marginBottom:8,children:e.jsx(Mde,{autoFocus:!0,label:s,placeholder:c,value:d,onChange:({target:e})=>f(e.value)})}),e.jsxs(tpe.Footer,{children:[e.jsx(dC,{secondary:!0,marginRight:8,onClick:v,children:o}),e.jsx(dC,{negative:a,onClick:m,children:i})]})]})]},exports.useElementObserver=zt,exports.useEventListener=Qe,exports.useOnClickOutside=et,exports.usePrevious=e=>{const n=t.useRef(e);return t.useEffect((()=>{n.current=e}),[e]),n.current},exports.useSelect=_t,exports.useSelectAll=(e,n)=>{const[r,o]=t.useState([]),[i,a]=t.useState(n||!1),[l,s]=t.useState(!1),[c,u]=t.useState(0);t.useEffect((()=>{if(null==e?void 0:e.length){const t=e.map((e=>Object.assign(Object.assign({},e),{selected:n||!1})));o(t)}}),[]);return t.useEffect((()=>{const e=r.every((e=>e.selected)),t=r.some((e=>e.selected));e?(s(!1),a(!0),u(r.length)):t?(s(!0),a(!1),u(r.filter((e=>e.selected)).length)):(s(!1),a(!1),u(0))}),[r]),{list:r,partial:l,allSelected:i,count:c,onSelectAll:e=>{o((t=>t.map((t=>Object.assign(Object.assign({},t),{selected:e})))))},onChildChange:(e,t)=>{o((n=>n.map((n=>n.id===t?Object.assign(Object.assign({},n),{selected:e}):n))))}}},exports.useWindowSize=()=>{const[e,n]=t.useState({width:null,height:null});return t.useEffect((()=>{const e="undefined"==typeof window,t=()=>{e||n({width:window.innerWidth,height:window.innerHeight})};e||window.addEventListener("resize",t);const r=e?()=>null:()=>window.removeEventListener("resize",t);return t(),r}),[]),e},exports.widthHeightProps=Ft;
|
|
46
46
|
//# sourceMappingURL=index.js.map
|