cemtrik-dependencies 1.0.180 → 1.0.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(je,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],b):(je=typeof globalThis<"u"?globalThis:je||self,b(je.MyApp={},je.React,je.ReactDOM))})(this,function(je,b,wr){"use strict";function qi(t){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(l,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return l.default=t,Object.freeze(l)}const
|
|
1
|
+
(function(je,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],b):(je=typeof globalThis<"u"?globalThis:je||self,b(je.MyApp={},je.React,je.ReactDOM))})(this,function(je,b,wr){"use strict";function qi(t){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(l,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return l.default=t,Object.freeze(l)}const G=qi(b),Xr=(t,l=!1)=>{function r(u){if(typeof u!="object"||u===null)return u;const f=Array.isArray(u)?[]:{};for(const a in u)u.hasOwnProperty(a)&&!l&&(f[a]=r(u[a]));return f}return t.map(u=>r(u))},sl=t=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(t);function se(...t){return t.filter(Boolean).join(" ")}const Ki=t=>{const l=t.split(" ");let r=t.slice(0,2);return l.length>1&&(r=`${t.at(0)}${l[l.length-1].slice(0,1)}`),r},Xi=t=>typeof t!="string"&&Promise.resolve(t)instanceof Promise,Ji="The user aborted a request.",Qi="signal is aborted without reason",es=({id:t,close:l})=>{b.useEffect(()=>{const r=n=>{const u=document.getElementById(t);u&&(u.contains(n.target)||l())};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[t,l])},ts=()=>{const t=b.useRef({}),[l,r]=b.useState({}),[n,u]=b.useState({}),[f,a]=b.useState([]);b.useEffect(()=>{t.current={}},[]);const m=R=>T=>{T.preventDefault(),T.stopPropagation(),R(l)},v=(R,T,M)=>{const{checked:$,value:P,name:B,type:_,id:q}=R.target,te={radio:q,checkbox:$};t.current={...M,...t.current,[B]:te[_]??P},r({...t.current,[B]:te[_]??P}),T({...t.current,[B]:te[_]??P})},x=b.useCallback((R,T)=>{t.current={...t.current,[R]:T},r(M=>({...M,[R]:T}))},[]),E=b.useCallback((R,T)=>{const M=T.filter($=>R[$]===""||R[$]===void 0);return M.forEach($=>u(P=>({...P,[$]:"Este campo es requerido"}))),a(M),M.length>0},[]);return{handleSubmit:m,handleChange:v,setValuesDefault:x,validateFields:E,errors:f,model:l,handleError:(R,T)=>{T.forEach(M=>u($=>({...$,[M]:R}))),a(T)},messageError:n,setModel:r}},ns=t=>{const[l,r]=b.useState(!0),[n,u]=b.useState(!1),f=b.useCallback((a,m)=>{const v=t.match(/[0-9]+/g);if(v===null)return;const[x]=v;m=Math.min(window.innerWidth,window.outerWidth);const E=a?m>=Number(x):m<=Number(x);u(E)},[t]);return b.useEffect(()=>{const a=/\(min-width:\s?[0-9]+px\)/gi.test(t),m=/\(max-width:\s?[0-9]+px\)/gi.test(t);if(!a&&!m&&r(!1),!a&&!m)return;const v=Math.min(window.innerWidth,window.outerWidth);f(a,v)},[t,f]),b.useEffect(()=>{if(!l)return;const a=Math.min(window.innerWidth,window.outerWidth);function m(){const v=/min-width/gi.test(t);f(v,a)}return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[l,t,f]),n},al=()=>{const[t,l]=b.useState({width:0,height:0});return b.useEffect(()=>{const r=()=>{const n=Math.min(window.innerWidth,window.outerWidth),u=Math.min(window.innerHeight,window.outerHeight);l({width:n,height:u})};return requestAnimationFrame(()=>r()),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),t};var rs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function os(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jr={exports:{}},$n={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
17
|
*/var cl;function is(){return cl||(cl=1,process.env.NODE_ENV!=="production"&&function(){var t=b,l=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),m=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),M=Symbol.iterator,$="@@iterator";function P(S){if(S===null||typeof S!="object")return null;var W=M&&S[M]||S[$];return typeof W=="function"?W:null}var B=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(S){{for(var W=arguments.length,X=new Array(W>1?W-1:0),de=1;de<W;de++)X[de-1]=arguments[de];q("error",S,X)}}function q(S,W,X){{var de=B.ReactDebugCurrentFrame,Me=de.getStackAddendum();Me!==""&&(W+="%s",X=X.concat([Me]));var fe=X.map(function(Re){return String(Re)});fe.unshift("Warning: "+W),Function.prototype.apply.call(console[S],console,fe)}}var te=!1,re=!1,pe=!1,Pe=!1,ke=!1,Te;Te=Symbol.for("react.module.reference");function y(S){return!!(typeof S=="string"||typeof S=="function"||S===n||S===f||ke||S===u||S===x||S===E||Pe||S===T||te||re||pe||typeof S=="object"&&S!==null&&(S.$$typeof===R||S.$$typeof===k||S.$$typeof===a||S.$$typeof===m||S.$$typeof===v||S.$$typeof===Te||S.getModuleId!==void 0))}function me(S,W,X){var de=S.displayName;if(de)return de;var Me=W.displayName||W.name||"";return Me!==""?X+"("+Me+")":X}function Fe(S){return S.displayName||"Context"}function Be(S){if(S==null)return null;if(typeof S.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof S=="function")return S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case n:return"Fragment";case r:return"Portal";case f:return"Profiler";case u:return"StrictMode";case x:return"Suspense";case E:return"SuspenseList"}if(typeof S=="object")switch(S.$$typeof){case m:var W=S;return Fe(W)+".Consumer";case a:var X=S;return Fe(X._context)+".Provider";case v:return me(S,S.render,"ForwardRef");case k:var de=S.displayName||null;return de!==null?de:Be(S.type)||"Memo";case R:{var Me=S,fe=Me._payload,Re=Me._init;try{return Be(Re(fe))}catch{return null}}}return null}var it=Object.assign,U=0,Xe,$e,ue,Oe,Je,Et,ut;function kt(){}kt.__reactDisabledLog=!0;function ht(){{if(U===0){Xe=console.log,$e=console.info,ue=console.warn,Oe=console.error,Je=console.group,Et=console.groupCollapsed,ut=console.groupEnd;var S={configurable:!0,enumerable:!0,value:kt,writable:!0};Object.defineProperties(console,{info:S,log:S,warn:S,error:S,group:S,groupCollapsed:S,groupEnd:S})}U++}}function Lt(){{if(U--,U===0){var S={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:it({},S,{value:Xe}),info:it({},S,{value:$e}),warn:it({},S,{value:ue}),error:it({},S,{value:Oe}),group:it({},S,{value:Je}),groupCollapsed:it({},S,{value:Et}),groupEnd:it({},S,{value:ut})})}U<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ne=B.ReactCurrentDispatcher,Qe;function Ze(S,W,X){{if(Qe===void 0)try{throw Error()}catch(Me){var de=Me.stack.trim().match(/\n( *(at )?)/);Qe=de&&de[1]||""}return`
|
|
18
|
-
`+Qe+S}}var le=!1,Ee;{var
|
|
18
|
+
`+Qe+S}}var le=!1,Ee;{var Z=typeof WeakMap=="function"?WeakMap:Map;Ee=new Z}function ge(S,W){if(!S||le)return"";{var X=Ee.get(S);if(X!==void 0)return X}var de;le=!0;var Me=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var fe;fe=Ne.current,Ne.current=null,ht();try{if(W){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(Gt){de=Gt}Reflect.construct(S,[],Re)}else{try{Re.call()}catch(Gt){de=Gt}S.call(Re.prototype)}}else{try{throw Error()}catch(Gt){de=Gt}S()}}catch(Gt){if(Gt&&de&&typeof Gt.stack=="string"){for(var Ae=Gt.stack.split(`
|
|
19
19
|
`),Mt=de.stack.split(`
|
|
20
20
|
`),be=Ae.length-1,vt=Mt.length-1;be>=1&&vt>=0&&Ae[be]!==Mt[vt];)vt--;for(;be>=1&&vt>=0;be--,vt--)if(Ae[be]!==Mt[vt]){if(be!==1||vt!==1)do if(be--,vt--,vt<0||Ae[be]!==Mt[vt]){var $t=`
|
|
21
21
|
`+Ae[be].replace(" at new "," at ");return S.displayName&&$t.includes("<anonymous>")&&($t=$t.replace("<anonymous>",S.displayName)),typeof S=="function"&&Ee.set(S,$t),$t}while(be>=1&&vt>=0);break}}}finally{le=!1,Ne.current=fe,Lt(),Error.prepareStackTrace=Me}var gn=S?S.displayName||S.name:"",sn=gn?Ze(gn):"";return typeof S=="function"&&Ee.set(S,sn),sn}function Ce(S,W,X){return ge(S,!1)}function Ie(S){var W=S.prototype;return!!(W&&W.isReactComponent)}function Pt(S,W,X){if(S==null)return"";if(typeof S=="function")return ge(S,Ie(S));if(typeof S=="string")return Ze(S);switch(S){case x:return Ze("Suspense");case E:return Ze("SuspenseList")}if(typeof S=="object")switch(S.$$typeof){case v:return Ce(S.render);case k:return Pt(S.type,W,X);case R:{var de=S,Me=de._payload,fe=de._init;try{return Pt(fe(Me),W,X)}catch{}}}return""}var Zt=Object.prototype.hasOwnProperty,J={},Qn=B.ReactDebugCurrentFrame;function on(S){if(S){var W=S._owner,X=Pt(S.type,S._source,W?W.type:null);Qn.setExtraStackFrame(X)}else Qn.setExtraStackFrame(null)}function _t(S,W,X,de,Me){{var fe=Function.call.bind(Zt);for(var Re in S)if(fe(S,Re)){var Ae=void 0;try{if(typeof S[Re]!="function"){var Mt=Error((de||"React class")+": "+X+" type `"+Re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof S[Re]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Mt.name="Invariant Violation",Mt}Ae=S[Re](W,Re,de,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(be){Ae=be}Ae&&!(Ae instanceof Error)&&(on(Me),_("%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).",de||"React class",X,Re,typeof Ae),on(null)),Ae instanceof Error&&!(Ae.message in J)&&(J[Ae.message]=!0,on(Me),_("Failed %s type: %s",X,Ae.message),on(null))}}}var Yt=Array.isArray;function er(S){return Yt(S)}function hn(S){{var W=typeof Symbol=="function"&&Symbol.toStringTag,X=W&&S[Symbol.toStringTag]||S.constructor.name||"Object";return X}}function Lr(S){try{return Ft(S),!1}catch{return!0}}function Ft(S){return""+S}function ct(S){if(Lr(S))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",hn(S)),Ft(S)}var Kt=B.ReactCurrentOwner,tr={key:!0,ref:!0,__self:!0,__source:!0},Ht,nr,rr;rr={};function Ar(S){if(Zt.call(S,"ref")){var W=Object.getOwnPropertyDescriptor(S,"ref").get;if(W&&W.isReactWarning)return!1}return S.ref!==void 0}function or(S){if(Zt.call(S,"key")){var W=Object.getOwnPropertyDescriptor(S,"key").get;if(W&&W.isReactWarning)return!1}return S.key!==void 0}function lr(S,W){if(typeof S.ref=="string"&&Kt.current&&W&&Kt.current.stateNode!==W){var X=Be(Kt.current.type);rr[X]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Be(Kt.current.type),S.ref),rr[X]=!0)}}function Dr(S,W){{var X=function(){Ht||(Ht=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};X.isReactWarning=!0,Object.defineProperty(S,"key",{get:X,configurable:!0})}}function Fo(S,W){{var X=function(){nr||(nr=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};X.isReactWarning=!0,Object.defineProperty(S,"ref",{get:X,configurable:!0})}}var Xt=function(S,W,X,de,Me,fe,Re){var Ae={$$typeof:l,type:S,key:W,ref:X,props:Re,_owner:fe};return Ae._store={},Object.defineProperty(Ae._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ae,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(Ae,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.freeze&&(Object.freeze(Ae.props),Object.freeze(Ae)),Ae};function Mo(S,W,X,de,Me){{var fe,Re={},Ae=null,Mt=null;X!==void 0&&(ct(X),Ae=""+X),or(W)&&(ct(W.key),Ae=""+W.key),Ar(W)&&(Mt=W.ref,lr(W,Me));for(fe in W)Zt.call(W,fe)&&!tr.hasOwnProperty(fe)&&(Re[fe]=W[fe]);if(S&&S.defaultProps){var be=S.defaultProps;for(fe in be)Re[fe]===void 0&&(Re[fe]=be[fe])}if(Ae||Mt){var vt=typeof S=="function"?S.displayName||S.name||"Unknown":S;Ae&&Dr(Re,vt),Mt&&Fo(Re,vt)}return Xt(S,Ae,Mt,Me,de,Kt.current,Re)}}var ir=B.ReactCurrentOwner,Fn=B.ReactDebugCurrentFrame;function vn(S){if(S){var W=S._owner,X=Pt(S.type,S._source,W?W.type:null);Fn.setExtraStackFrame(X)}else Fn.setExtraStackFrame(null)}var ln;ln=!1;function Mn(S){return typeof S=="object"&&S!==null&&S.$$typeof===l}function $r(){{if(ir.current){var S=Be(ir.current.type);if(S)return`
|
|
@@ -25,14 +25,14 @@ Check the render method of \``+S+"`."}return""}}function _r(S){return""}var jn={
|
|
|
25
25
|
Check the top-level render call using <`+X+">.")}return W}}function Rn(S,W){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var X=Br(W);if(jn[X])return;jn[X]=!0;var de="";S&&S._owner&&S._owner!==ir.current&&(de=" It was passed a child from "+Be(S._owner.type)+"."),vn(S),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X,de),vn(null)}}function Jt(S,W){{if(typeof S!="object")return;if(er(S))for(var X=0;X<S.length;X++){var de=S[X];Mn(de)&&Rn(de,W)}else if(Mn(S))S._store&&(S._store.validated=!0);else if(S){var Me=P(S);if(typeof Me=="function"&&Me!==S.entries)for(var fe=Me.call(S),Re;!(Re=fe.next()).done;)Mn(Re.value)&&Rn(Re.value,W)}}}function zr(S){{var W=S.type;if(W==null||typeof W=="string")return;var X;if(typeof W=="function")X=W.propTypes;else if(typeof W=="object"&&(W.$$typeof===v||W.$$typeof===k))X=W.propTypes;else return;if(X){var de=Be(W);_t(X,S.props,"prop",de,S)}else if(W.PropTypes!==void 0&&!ln){ln=!0;var Me=Be(W);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Me||"Unknown")}typeof W.getDefaultProps=="function"&&!W.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(S){{for(var W=Object.keys(S.props),X=0;X<W.length;X++){var de=W[X];if(de!=="children"&&de!=="key"){vn(S),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),vn(null);break}}S.ref!==null&&(vn(S),_("Invalid attribute `ref` supplied to `React.Fragment`."),vn(null))}}function ar(S,W,X,de,Me,fe){{var Re=y(S);if(!Re){var Ae="";(S===void 0||typeof S=="object"&&S!==null&&Object.keys(S).length===0)&&(Ae+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Mt=_r();Mt?Ae+=Mt:Ae+=$r();var be;S===null?be="null":er(S)?be="array":S!==void 0&&S.$$typeof===l?(be="<"+(Be(S.type)||"Unknown")+" />",Ae=" Did you accidentally export a JSX literal instead of a component?"):be=typeof S,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",be,Ae)}var vt=Mo(S,W,X,Me,fe);if(vt==null)return vt;if(Re){var $t=W.children;if($t!==void 0)if(de)if(er($t)){for(var gn=0;gn<$t.length;gn++)Jt($t[gn],S);Object.freeze&&Object.freeze($t)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Jt($t,S)}return S===n?sr(vt):zr(vt),vt}}function Ro(S,W,X){return ar(S,W,X,!0)}function xt(S,W,X){return ar(S,W,X,!1)}var Wr=xt,Hr=Ro;_n.Fragment=n,_n.jsx=Wr,_n.jsxs=Hr}()),_n}process.env.NODE_ENV==="production"?Jr.exports=ls():Jr.exports=is();var j=Jr.exports;function Bn(t,l,r){let n=r.initialDeps??[],u;return()=>{var f,a,m,v;let x;r.key&&((f=r.debug)!=null&&f.call(r))&&(x=Date.now());const E=t();if(!(E.length!==n.length||E.some((T,M)=>n[M]!==T)))return u;n=E;let R;if(r.key&&((a=r.debug)!=null&&a.call(r))&&(R=Date.now()),u=l(...E),r.key&&((m=r.debug)!=null&&m.call(r))){const T=Math.round((Date.now()-x)*100)/100,M=Math.round((Date.now()-R)*100)/100,$=M/16,P=(B,_)=>{for(B=String(B);B.length<_;)B=" "+B;return B};console.info(`%c⏱ ${P(M,5)} /${P(T,5)} ms`,`
|
|
26
26
|
font-size: .6rem;
|
|
27
27
|
font-weight: bold;
|
|
28
|
-
color: hsl(${Math.max(0,Math.min(120-120*$,120))}deg 100% 31%);`,r==null?void 0:r.key)}return(v=r==null?void 0:r.onChange)==null||v.call(r,u),u}}function Qr(t,l){if(t===void 0)throw new Error("Unexpected undefined");return t}const ss=(t,l)=>Math.abs(t-l)<1,as=(t,l,r)=>{let n;return function(...u){t.clearTimeout(n),n=t.setTimeout(()=>l.apply(this,u),r)}},us=t=>t,cs=t=>{const l=Math.max(t.startIndex-t.overscan,0),r=Math.min(t.endIndex+t.overscan,t.count-1),n=[];for(let u=l;u<=r;u++)n.push(u);return n},ds=(t,l)=>{const r=t.scrollElement;if(!r)return;const n=t.targetWindow;if(!n)return;const u=a=>{const{width:m,height:v}=a;l({width:Math.round(m),height:Math.round(v)})};if(u(r.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const f=new n.ResizeObserver(a=>{const m=a[0];if(m!=null&&m.borderBoxSize){const v=m.borderBoxSize[0];if(v){u({width:v.inlineSize,height:v.blockSize});return}}u(r.getBoundingClientRect())});return f.observe(r,{box:"border-box"}),()=>{f.unobserve(r)}},dl={passive:!0},fs=typeof window>"u"?!0:"onscrollend"in window,ps=(t,l)=>{const r=t.scrollElement;if(!r)return;const n=t.targetWindow;if(!n)return;let u=0;const f=fs?()=>{}:as(n,()=>{l(u,!1)},t.options.isScrollingResetDelay),a=x=>()=>{u=r[t.options.horizontal?"scrollLeft":"scrollTop"],f(),l(u,x)},m=a(!0),v=a(!1);return v(),r.addEventListener("scroll",m,dl),r.addEventListener("scrollend",v,dl),()=>{r.removeEventListener("scroll",m),r.removeEventListener("scrollend",v)}},ms=(t,l,r)=>{if(l!=null&&l.borderBoxSize){const n=l.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[r.options.horizontal?"width":"height"])},hs=(t,{adjustments:l=0,behavior:r},n)=>{var u,f;const a=t+l;(f=(u=n.scrollElement)==null?void 0:u.scrollTo)==null||f.call(u,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class vs{constructor(l){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(u=>{u.forEach(f=>{this._measureElement(f.target,f)})}));return{disconnect:()=>{var u;return(u=n())==null?void 0:u.disconnect()},observe:u=>{var f;return(f=n())==null?void 0:f.observe(u,{box:"border-box"})},unobserve:u=>{var f;return(f=n())==null?void 0:f.unobserve(u)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,u])=>{typeof u>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:us,rangeExtractor:cs,onChange:()=>{},measureElement:ms,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...r}},this.notify=(r,n)=>{var u,f;const{startIndex:a,endIndex:m}=this.range??{startIndex:void 0,endIndex:void 0},v=this.calculateRange();(r||a!==(v==null?void 0:v.startIndex)||m!==(v==null?void 0:v.endIndex))&&((f=(u=this.options).onChange)==null||f.call(u,this,n))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.notify(!1,!1);return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,u=>{this.scrollRect=u,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(u,f)=>{this.scrollAdjustments=0,this.scrollDirection=f?this.getScrollOffset()<u?"forward":"backward":null,this.scrollOffset=u;const a=this.isScrolling;this.isScrolling=f,this.notify(a!==f,f)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const u=new Map,f=new Map;for(let a=n-1;a>=0;a--){const m=r[a];if(u.has(m.lane))continue;const v=f.get(m.lane);if(v==null||m.end>v.end?f.set(m.lane,m):m.end<v.end&&u.set(m.lane,!0),u.size===this.options.lanes)break}return f.size===this.options.lanes?Array.from(f.values()).sort((a,m)=>a.end===m.end?a.index-m.index:a.end-m.end)[0]:void 0},this.getMeasurementOptions=Bn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(r,n,u,f,a)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:u,getItemKey:f,enabled:a}),{key:!1}),this.getMeasurements=Bn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:u,getItemKey:f,enabled:a},m)=>{var v;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(k=>{this.itemSizeCache.set(k.key,k.size)}));const x=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const E=this.measurementsCache.slice(0,x);for(let k=x;k<r;k++){let R=(v=this.measurementsCache[k])==null?void 0:v.measureElement;R||(R=te=>{const re=f(k),pe=this.elementsCache.get(re);if(!te){pe&&(this.observer.unobserve(pe),this.elementsCache.delete(re));return}pe!==te&&(pe&&this.observer.unobserve(pe),this.observer.observe(te),this.elementsCache.set(re,te)),te.isConnected&&this.resizeItem(k,this.options.measureElement(te,void 0,this))});const T=f(k),M=this.options.lanes===1?E[k-1]:this.getFurthestMeasurement(E,k),$=M?M.end+this.options.gap:n+u,P=m.get(T),B=typeof P=="number"?P:this.options.estimateSize(k),_=$+B,q=M?M.lane:k%this.options.lanes;E[k]={index:k,start:$,size:B,end:_,key:T,lane:q,measureElement:R}}return this.measurementsCache=E,E},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Bn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(r,n,u)=>this.range=r.length>0&&n>0?gs({measurements:r,outerSize:n,scrollOffset:u}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Bn(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(r,n,u,f)=>n===null?[]:r({startIndex:n.startIndex,endIndex:n.endIndex,overscan:u,count:f}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,u=r.getAttribute(n);return u?parseInt(u,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(r,n)=>{const u=this.indexFromElement(r),f=this.getMeasurements()[u];if(!f||!r.isConnected){this.elementsCache.forEach((m,v)=>{m===r&&(this.observer.unobserve(r),this.elementsCache.delete(v))});return}const a=this.elementsCache.get(f.key);a!==r&&(a&&this.observer.unobserve(a),this.observer.observe(r),this.elementsCache.set(f.key,r)),this.resizeItem(u,this.options.measureElement(r,n,this))},this.resizeItem=(r,n)=>{const u=this.getMeasurements()[r];if(!u)return;const f=this.itemSizeCache.get(u.key)??u.size,a=n-f;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(u,a,this):u.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",a),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(u.index),this.itemSizeCache=new Map(this.itemSizeCache.set(u.key,n)),this.notify(!0,!1))},this.measureElement=r=>{r&&this._measureElement(r,void 0)},this.getVirtualItems=Bn(()=>[this.getIndexes(),this.getMeasurements()],(r,n)=>{const u=[];for(let f=0,a=r.length;f<a;f++){const m=r[f],v=n[m];u.push(v)}return u},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return Qr(n[fl(0,n.length-1,u=>Qr(n[u]).start,r)])},this.getOffsetForAlignment=(r,n)=>{const u=this.getSize(),f=this.getScrollOffset();n==="auto"&&(r<=f?n="start":r>=f+u?n="end":n="start"),n==="start"?r=r:n==="end"?r=r-u:n==="center"&&(r=r-u/2);const a=this.options.horizontal?"scrollWidth":"scrollHeight",v=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-u;return Math.max(Math.min(v,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const u=this.getMeasurements()[r];if(!u)return;const f=this.getSize(),a=this.getScrollOffset();if(n==="auto")if(u.end>=a+f-this.options.scrollPaddingEnd)n="end";else if(u.start<=a+this.options.scrollPaddingStart)n="start";else return[a,n];const m=n==="end"?u.end+this.options.scrollPaddingEnd:u.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,n),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(r,{align:n="start",behavior:u}={})=>{this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,n),{adjustments:void 0,behavior:u})},this.scrollToIndex=(r,{align:n="auto",behavior:u}={})=>{r=Math.max(0,Math.min(r,this.options.count-1)),this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const f=this.getOffsetForIndex(r,n);if(!f)return;const[a,m]=f;this._scrollToOffset(a,{adjustments:void 0,behavior:u}),u!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(r))){const[x]=Qr(this.getOffsetForIndex(r,m));ss(x,this.getScrollOffset())||this.scrollToIndex(r,{align:m,behavior:u})}else this.scrollToIndex(r,{align:m,behavior:u})}))},this.scrollBy=(r,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let u;return n.length===0?u=this.options.paddingStart:u=this.options.lanes===1?((r=n[n.length-1])==null?void 0:r.end)??0:Math.max(...n.slice(-this.options.lanes).map(f=>f.end)),u-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(r,{adjustments:n,behavior:u})=>{this.options.scrollToFn(r,{behavior:u,adjustments:n},this)},this.measure=()=>{var r,n;this.itemSizeCache=new Map,(n=(r=this.options).onChange)==null||n.call(r,this,!1)},this.setOptions(l)}}const fl=(t,l,r,n)=>{for(;t<=l;){const u=(t+l)/2|0,f=r(u);if(f<n)t=u+1;else if(f>n)l=u-1;else return u}return t>0?t-1:0};function gs({measurements:t,outerSize:l,scrollOffset:r}){const n=t.length-1,f=fl(0,n,m=>t[m].start,r);let a=f;for(;a<n&&t[a].end<r+l;)a++;return{startIndex:f,endIndex:a}}const bs=typeof document<"u"?Y.useLayoutEffect:Y.useEffect;function xs(t){const l=Y.useReducer(()=>({}),{})[1],r={...t,onChange:(u,f)=>{var a;f?wr.flushSync(l):l(),(a=t.onChange)==null||a.call(t,u,f)}},[n]=Y.useState(()=>new vs(r));return n.setOptions(r),Y.useEffect(()=>n._didMount(),[]),bs(()=>n._willUpdate()),n}function ys(t){return xs({observeElementRect:ds,observeElementOffset:ps,scrollToFn:hs,...t})}var ws=Object.defineProperty,Es=(t,l,r)=>l in t?ws(t,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[l]=r,eo=(t,l,r)=>(Es(t,typeof l!="symbol"?l+"":l,r),r);let Ss=class{constructor(){eo(this,"current",this.detect()),eo(this,"handoffState","pending"),eo(this,"currentId",0)}set(l){this.current!==l&&(this.handoffState="pending",this.currentId=0,this.current=l)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},en=new Ss,nt=(t,l)=>{en.isServer?b.useEffect(t,l):b.useLayoutEffect(t,l)};function Vt(t){let l=b.useRef(t);return nt(()=>{l.current=t},[t]),l}function to(t,l){let[r,n]=b.useState(t),u=Vt(t);return nt(()=>n(u.current),[u,n,...l]),r}let ee=function(t){let l=Vt(t);return b.useCallback((...r)=>l.current(...r),[l])};function pl(t,l,r){let[n,u]=b.useState(r),f=t!==void 0,a=b.useRef(f),m=b.useRef(!1),v=b.useRef(!1);return f&&!a.current&&!m.current?(m.current=!0,a.current=f,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!f&&a.current&&!v.current&&(v.current=!0,a.current=f,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[f?t:n,ee(x=>(f||u(x),l==null?void 0:l(x)))]}function Er(t){typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t).catch(l=>setTimeout(()=>{throw l}))}function Wt(){let t=[],l={addEventListener(r,n,u,f){return r.addEventListener(n,u,f),l.add(()=>r.removeEventListener(n,u,f))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return l.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return l.requestAnimationFrame(()=>l.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return l.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Er(()=>{n.current&&r[0]()}),l.add(()=>{n.current=!1})},style(r,n,u){let f=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:u}),this.add(()=>{Object.assign(r.style,{[n]:f})})},group(r){let n=Wt();return r(n),this.add(()=>n.dispose())},add(r){return t.push(r),()=>{let n=t.indexOf(r);if(n>=0)for(let u of t.splice(n,1))u()}},dispose(){for(let r of t.splice(0))r()}};return l}function tn(){let[t]=b.useState(Wt);return b.useEffect(()=>()=>t.dispose(),[t]),t}function Cs(){let t=typeof document>"u";return"useSyncExternalStore"in Y?(l=>l.useSyncExternalStore)(Y)(()=>()=>{},()=>!1,()=>!t):!1}function kn(){let t=Cs(),[l,r]=Y.useState(en.isHandoffComplete);return l&&en.isHandoffComplete===!1&&r(!1),Y.useEffect(()=>{l!==!0&&r(!0)},[l]),Y.useEffect(()=>en.handoff(),[]),t?!1:l}var ml;let Dt=(ml=b.useId)!=null?ml:function(){let t=kn(),[l,r]=b.useState(t?()=>en.nextId():null);return nt(()=>{l===null&&r(en.nextId())},[l]),l!=null?""+l:void 0};function bt(t,l,...r){if(t in l){let u=l[t];return typeof u=="function"?u(...r):u}let n=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(l).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,bt),n}function Sr(t){return en.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}let no=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var nn=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t))(nn||{}),hl=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(hl||{}),js=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(js||{});function vl(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(no)).sort((l,r)=>Math.sign((l.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var ro=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(ro||{});function oo(t,l=0){var r;return t===((r=Sr(t))==null?void 0:r.body)?!1:bt(l,{0(){return t.matches(no)},1(){let n=t;for(;n!==null;){if(n.matches(no))return!0;n=n.parentElement}return!1}})}function gl(t){let l=Sr(t);Wt().nextFrame(()=>{l&&!oo(l.activeElement,0)&&cn(t)})}var Ts=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(Ts||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:t.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function cn(t){t==null||t.focus({preventScroll:!0})}let Os=["textarea","input"].join(",");function Ns(t){var l,r;return(r=(l=t==null?void 0:t.matches)==null?void 0:l.call(t,Os))!=null?r:!1}function lo(t,l=r=>r){return t.slice().sort((r,n)=>{let u=l(r),f=l(n);if(u===null||f===null)return 0;let a=u.compareDocumentPosition(f);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Is(t,l){return zn(vl(),l,{relativeTo:t})}function zn(t,l,{sorted:r=!0,relativeTo:n=null,skipElements:u=[]}={}){let f=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,a=Array.isArray(t)?r?lo(t):t:vl(t);u.length>0&&a.length>1&&(a=a.filter(T=>!u.includes(T))),n=n??f.activeElement;let m=(()=>{if(l&5)return 1;if(l&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),v=(()=>{if(l&1)return 0;if(l&2)return Math.max(0,a.indexOf(n))-1;if(l&4)return Math.max(0,a.indexOf(n))+1;if(l&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),x=l&32?{preventScroll:!0}:{},E=0,k=a.length,R;do{if(E>=k||E+k<=0)return 0;let T=v+E;if(l&16)T=(T+k)%k;else{if(T<0)return 3;if(T>=k)return 1}R=a[T],R==null||R.focus(x),E+=m}while(R!==f.activeElement);return l&6&&Ns(R)&&R.select(),2}function bl(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ks(){return/Android/gi.test(window.navigator.userAgent)}function xl(){return bl()||ks()}function Cr(t,l,r){let n=Vt(l);b.useEffect(()=>{function u(f){n.current(f)}return document.addEventListener(t,u,r),()=>document.removeEventListener(t,u,r)},[t,r])}function yl(t,l,r){let n=Vt(l);b.useEffect(()=>{function u(f){n.current(f)}return window.addEventListener(t,u,r),()=>window.removeEventListener(t,u,r)},[t,r])}function io(t,l,r=!0){let n=b.useRef(!1);b.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function u(a,m){if(!n.current||a.defaultPrevented)return;let v=m(a);if(v===null||!v.getRootNode().contains(v)||!v.isConnected)return;let x=function E(k){return typeof k=="function"?E(k()):Array.isArray(k)||k instanceof Set?k:[k]}(t);for(let E of x){if(E===null)continue;let k=E instanceof HTMLElement?E:E.current;if(k!=null&&k.contains(v)||a.composed&&a.composedPath().includes(k))return}return!oo(v,ro.Loose)&&v.tabIndex!==-1&&a.preventDefault(),l(a,v)}let f=b.useRef(null);Cr("pointerdown",a=>{var m,v;n.current&&(f.current=((v=(m=a.composedPath)==null?void 0:m.call(a))==null?void 0:v[0])||a.target)},!0),Cr("mousedown",a=>{var m,v;n.current&&(f.current=((v=(m=a.composedPath)==null?void 0:m.call(a))==null?void 0:v[0])||a.target)},!0),Cr("click",a=>{xl()||f.current&&(u(a,()=>f.current),f.current=null)},!0),Cr("touchend",a=>u(a,()=>a.target instanceof HTMLElement?a.target:null),!0),yl("blur",a=>u(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function wn(...t){return b.useMemo(()=>Sr(...t),[...t])}function wl(t){var l;if(t.type)return t.type;let r=(l=t.as)!=null?l:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function so(t,l){let[r,n]=b.useState(()=>wl(t));return nt(()=>{n(wl(t))},[t.type,t.as]),nt(()=>{r||l.current&&l.current instanceof HTMLButtonElement&&!l.current.hasAttribute("type")&&n("button")},[r,l]),r}let El=Symbol();function Ps(t,l=!0){return Object.assign(t,{[El]:l})}function wt(...t){let l=b.useRef(t);b.useEffect(()=>{l.current=t},[t]);let r=ee(n=>{for(let u of l.current)u!=null&&(typeof u=="function"?u(n):u.current=n)});return t.every(n=>n==null||(n==null?void 0:n[El]))?void 0:r}function Sl(t){return[t.screenX,t.screenY]}function Cl(){let t=b.useRef([-1,-1]);return{wasMoved(l){let r=Sl(l);return t.current[0]===r[0]&&t.current[1]===r[1]?!1:(t.current=r,!0)},update(l){t.current=Sl(l)}}}function jl({container:t,accept:l,walk:r,enabled:n=!0}){let u=b.useRef(l),f=b.useRef(r);b.useEffect(()=>{u.current=l,f.current=r},[l,r]),nt(()=>{if(!t||!n)return;let a=Sr(t);if(!a)return;let m=u.current,v=f.current,x=Object.assign(k=>m(k),{acceptNode:m}),E=a.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,x,!1);for(;E.nextNode();)v(E.currentNode)},[t,n,u,f])}function Wn(t,l){let r=b.useRef([]),n=ee(t);b.useEffect(()=>{let u=[...r.current];for(let[f,a]of l.entries())if(r.current[f]!==a){let m=n(l,u);return r.current=l,m}},[n,...l])}function jr(...t){return Array.from(new Set(t.flatMap(l=>typeof l=="string"?l.split(" "):[]))).filter(Boolean).join(" ")}var dn=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(dn||{}),fn=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(fn||{});function pt({ourProps:t,theirProps:l,slot:r,defaultTag:n,features:u,visible:f=!0,name:a,mergeRefs:m}){m=m??Fs;let v=Tl(l,t);if(f)return Tr(v,r,n,a,m);let x=u??0;if(x&2){let{static:E=!1,...k}=v;if(E)return Tr(k,r,n,a,m)}if(x&1){let{unmount:E=!0,...k}=v;return bt(E?0:1,{0(){return null},1(){return Tr({...k,hidden:!0,style:{display:"none"}},r,n,a,m)}})}return Tr(v,r,n,a,m)}function Tr(t,l={},r,n,u){let{as:f=r,children:a,refName:m="ref",...v}=ao(t,["unmount","static"]),x=t.ref!==void 0?{[m]:t.ref}:{},E=typeof a=="function"?a(l):a;"className"in v&&v.className&&typeof v.className=="function"&&(v.className=v.className(l));let k={};if(l){let R=!1,T=[];for(let[M,$]of Object.entries(l))typeof $=="boolean"&&(R=!0),$===!0&&T.push(M);R&&(k["data-headlessui-state"]=T.join(" "))}if(f===b.Fragment&&Object.keys(Or(v)).length>0){if(!b.isValidElement(E)||Array.isArray(E)&&E.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(v).map($=>` - ${$}`).join(`
|
|
28
|
+
color: hsl(${Math.max(0,Math.min(120-120*$,120))}deg 100% 31%);`,r==null?void 0:r.key)}return(v=r==null?void 0:r.onChange)==null||v.call(r,u),u}}function Qr(t,l){if(t===void 0)throw new Error("Unexpected undefined");return t}const ss=(t,l)=>Math.abs(t-l)<1,as=(t,l,r)=>{let n;return function(...u){t.clearTimeout(n),n=t.setTimeout(()=>l.apply(this,u),r)}},us=t=>t,cs=t=>{const l=Math.max(t.startIndex-t.overscan,0),r=Math.min(t.endIndex+t.overscan,t.count-1),n=[];for(let u=l;u<=r;u++)n.push(u);return n},ds=(t,l)=>{const r=t.scrollElement;if(!r)return;const n=t.targetWindow;if(!n)return;const u=a=>{const{width:m,height:v}=a;l({width:Math.round(m),height:Math.round(v)})};if(u(r.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const f=new n.ResizeObserver(a=>{const m=a[0];if(m!=null&&m.borderBoxSize){const v=m.borderBoxSize[0];if(v){u({width:v.inlineSize,height:v.blockSize});return}}u(r.getBoundingClientRect())});return f.observe(r,{box:"border-box"}),()=>{f.unobserve(r)}},dl={passive:!0},fs=typeof window>"u"?!0:"onscrollend"in window,ps=(t,l)=>{const r=t.scrollElement;if(!r)return;const n=t.targetWindow;if(!n)return;let u=0;const f=fs?()=>{}:as(n,()=>{l(u,!1)},t.options.isScrollingResetDelay),a=x=>()=>{u=r[t.options.horizontal?"scrollLeft":"scrollTop"],f(),l(u,x)},m=a(!0),v=a(!1);return v(),r.addEventListener("scroll",m,dl),r.addEventListener("scrollend",v,dl),()=>{r.removeEventListener("scroll",m),r.removeEventListener("scrollend",v)}},ms=(t,l,r)=>{if(l!=null&&l.borderBoxSize){const n=l.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[r.options.horizontal?"width":"height"])},hs=(t,{adjustments:l=0,behavior:r},n)=>{var u,f;const a=t+l;(f=(u=n.scrollElement)==null?void 0:u.scrollTo)==null||f.call(u,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class vs{constructor(l){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(u=>{u.forEach(f=>{this._measureElement(f.target,f)})}));return{disconnect:()=>{var u;return(u=n())==null?void 0:u.disconnect()},observe:u=>{var f;return(f=n())==null?void 0:f.observe(u,{box:"border-box"})},unobserve:u=>{var f;return(f=n())==null?void 0:f.unobserve(u)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,u])=>{typeof u>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:us,rangeExtractor:cs,onChange:()=>{},measureElement:ms,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...r}},this.notify=(r,n)=>{var u,f;const{startIndex:a,endIndex:m}=this.range??{startIndex:void 0,endIndex:void 0},v=this.calculateRange();(r||a!==(v==null?void 0:v.startIndex)||m!==(v==null?void 0:v.endIndex))&&((f=(u=this.options).onChange)==null||f.call(u,this,n))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.notify(!1,!1);return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,u=>{this.scrollRect=u,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(u,f)=>{this.scrollAdjustments=0,this.scrollDirection=f?this.getScrollOffset()<u?"forward":"backward":null,this.scrollOffset=u;const a=this.isScrolling;this.isScrolling=f,this.notify(a!==f,f)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const u=new Map,f=new Map;for(let a=n-1;a>=0;a--){const m=r[a];if(u.has(m.lane))continue;const v=f.get(m.lane);if(v==null||m.end>v.end?f.set(m.lane,m):m.end<v.end&&u.set(m.lane,!0),u.size===this.options.lanes)break}return f.size===this.options.lanes?Array.from(f.values()).sort((a,m)=>a.end===m.end?a.index-m.index:a.end-m.end)[0]:void 0},this.getMeasurementOptions=Bn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(r,n,u,f,a)=>(this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:u,getItemKey:f,enabled:a}),{key:!1}),this.getMeasurements=Bn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:u,getItemKey:f,enabled:a},m)=>{var v;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(k=>{this.itemSizeCache.set(k.key,k.size)}));const x=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const E=this.measurementsCache.slice(0,x);for(let k=x;k<r;k++){let R=(v=this.measurementsCache[k])==null?void 0:v.measureElement;R||(R=te=>{const re=f(k),pe=this.elementsCache.get(re);if(!te){pe&&(this.observer.unobserve(pe),this.elementsCache.delete(re));return}pe!==te&&(pe&&this.observer.unobserve(pe),this.observer.observe(te),this.elementsCache.set(re,te)),te.isConnected&&this.resizeItem(k,this.options.measureElement(te,void 0,this))});const T=f(k),M=this.options.lanes===1?E[k-1]:this.getFurthestMeasurement(E,k),$=M?M.end+this.options.gap:n+u,P=m.get(T),B=typeof P=="number"?P:this.options.estimateSize(k),_=$+B,q=M?M.lane:k%this.options.lanes;E[k]={index:k,start:$,size:B,end:_,key:T,lane:q,measureElement:R}}return this.measurementsCache=E,E},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Bn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(r,n,u)=>this.range=r.length>0&&n>0?gs({measurements:r,outerSize:n,scrollOffset:u}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Bn(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(r,n,u,f)=>n===null?[]:r({startIndex:n.startIndex,endIndex:n.endIndex,overscan:u,count:f}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,u=r.getAttribute(n);return u?parseInt(u,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(r,n)=>{const u=this.indexFromElement(r),f=this.getMeasurements()[u];if(!f||!r.isConnected){this.elementsCache.forEach((m,v)=>{m===r&&(this.observer.unobserve(r),this.elementsCache.delete(v))});return}const a=this.elementsCache.get(f.key);a!==r&&(a&&this.observer.unobserve(a),this.observer.observe(r),this.elementsCache.set(f.key,r)),this.resizeItem(u,this.options.measureElement(r,n,this))},this.resizeItem=(r,n)=>{const u=this.getMeasurements()[r];if(!u)return;const f=this.itemSizeCache.get(u.key)??u.size,a=n-f;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(u,a,this):u.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",a),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(u.index),this.itemSizeCache=new Map(this.itemSizeCache.set(u.key,n)),this.notify(!0,!1))},this.measureElement=r=>{r&&this._measureElement(r,void 0)},this.getVirtualItems=Bn(()=>[this.getIndexes(),this.getMeasurements()],(r,n)=>{const u=[];for(let f=0,a=r.length;f<a;f++){const m=r[f],v=n[m];u.push(v)}return u},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return Qr(n[fl(0,n.length-1,u=>Qr(n[u]).start,r)])},this.getOffsetForAlignment=(r,n)=>{const u=this.getSize(),f=this.getScrollOffset();n==="auto"&&(r<=f?n="start":r>=f+u?n="end":n="start"),n==="start"?r=r:n==="end"?r=r-u:n==="center"&&(r=r-u/2);const a=this.options.horizontal?"scrollWidth":"scrollHeight",v=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0)-u;return Math.max(Math.min(v,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const u=this.getMeasurements()[r];if(!u)return;const f=this.getSize(),a=this.getScrollOffset();if(n==="auto")if(u.end>=a+f-this.options.scrollPaddingEnd)n="end";else if(u.start<=a+this.options.scrollPaddingStart)n="start";else return[a,n];const m=n==="end"?u.end+this.options.scrollPaddingEnd:u.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,n),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(r,{align:n="start",behavior:u}={})=>{this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,n),{adjustments:void 0,behavior:u})},this.scrollToIndex=(r,{align:n="auto",behavior:u}={})=>{r=Math.max(0,Math.min(r,this.options.count-1)),this.cancelScrollToIndex(),u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const f=this.getOffsetForIndex(r,n);if(!f)return;const[a,m]=f;this._scrollToOffset(a,{adjustments:void 0,behavior:u}),u!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(r))){const[x]=Qr(this.getOffsetForIndex(r,m));ss(x,this.getScrollOffset())||this.scrollToIndex(r,{align:m,behavior:u})}else this.scrollToIndex(r,{align:m,behavior:u})}))},this.scrollBy=(r,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let u;return n.length===0?u=this.options.paddingStart:u=this.options.lanes===1?((r=n[n.length-1])==null?void 0:r.end)??0:Math.max(...n.slice(-this.options.lanes).map(f=>f.end)),u-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(r,{adjustments:n,behavior:u})=>{this.options.scrollToFn(r,{behavior:u,adjustments:n},this)},this.measure=()=>{var r,n;this.itemSizeCache=new Map,(n=(r=this.options).onChange)==null||n.call(r,this,!1)},this.setOptions(l)}}const fl=(t,l,r,n)=>{for(;t<=l;){const u=(t+l)/2|0,f=r(u);if(f<n)t=u+1;else if(f>n)l=u-1;else return u}return t>0?t-1:0};function gs({measurements:t,outerSize:l,scrollOffset:r}){const n=t.length-1,f=fl(0,n,m=>t[m].start,r);let a=f;for(;a<n&&t[a].end<r+l;)a++;return{startIndex:f,endIndex:a}}const bs=typeof document<"u"?G.useLayoutEffect:G.useEffect;function xs(t){const l=G.useReducer(()=>({}),{})[1],r={...t,onChange:(u,f)=>{var a;f?wr.flushSync(l):l(),(a=t.onChange)==null||a.call(t,u,f)}},[n]=G.useState(()=>new vs(r));return n.setOptions(r),G.useEffect(()=>n._didMount(),[]),bs(()=>n._willUpdate()),n}function ys(t){return xs({observeElementRect:ds,observeElementOffset:ps,scrollToFn:hs,...t})}var ws=Object.defineProperty,Es=(t,l,r)=>l in t?ws(t,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[l]=r,eo=(t,l,r)=>(Es(t,typeof l!="symbol"?l+"":l,r),r);let Ss=class{constructor(){eo(this,"current",this.detect()),eo(this,"handoffState","pending"),eo(this,"currentId",0)}set(l){this.current!==l&&(this.handoffState="pending",this.currentId=0,this.current=l)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},en=new Ss,nt=(t,l)=>{en.isServer?b.useEffect(t,l):b.useLayoutEffect(t,l)};function Vt(t){let l=b.useRef(t);return nt(()=>{l.current=t},[t]),l}function to(t,l){let[r,n]=b.useState(t),u=Vt(t);return nt(()=>n(u.current),[u,n,...l]),r}let ee=function(t){let l=Vt(t);return b.useCallback((...r)=>l.current(...r),[l])};function pl(t,l,r){let[n,u]=b.useState(r),f=t!==void 0,a=b.useRef(f),m=b.useRef(!1),v=b.useRef(!1);return f&&!a.current&&!m.current?(m.current=!0,a.current=f,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!f&&a.current&&!v.current&&(v.current=!0,a.current=f,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[f?t:n,ee(x=>(f||u(x),l==null?void 0:l(x)))]}function Er(t){typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t).catch(l=>setTimeout(()=>{throw l}))}function Wt(){let t=[],l={addEventListener(r,n,u,f){return r.addEventListener(n,u,f),l.add(()=>r.removeEventListener(n,u,f))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return l.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return l.requestAnimationFrame(()=>l.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return l.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Er(()=>{n.current&&r[0]()}),l.add(()=>{n.current=!1})},style(r,n,u){let f=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:u}),this.add(()=>{Object.assign(r.style,{[n]:f})})},group(r){let n=Wt();return r(n),this.add(()=>n.dispose())},add(r){return t.push(r),()=>{let n=t.indexOf(r);if(n>=0)for(let u of t.splice(n,1))u()}},dispose(){for(let r of t.splice(0))r()}};return l}function tn(){let[t]=b.useState(Wt);return b.useEffect(()=>()=>t.dispose(),[t]),t}function Cs(){let t=typeof document>"u";return"useSyncExternalStore"in G?(l=>l.useSyncExternalStore)(G)(()=>()=>{},()=>!1,()=>!t):!1}function kn(){let t=Cs(),[l,r]=G.useState(en.isHandoffComplete);return l&&en.isHandoffComplete===!1&&r(!1),G.useEffect(()=>{l!==!0&&r(!0)},[l]),G.useEffect(()=>en.handoff(),[]),t?!1:l}var ml;let Dt=(ml=b.useId)!=null?ml:function(){let t=kn(),[l,r]=b.useState(t?()=>en.nextId():null);return nt(()=>{l===null&&r(en.nextId())},[l]),l!=null?""+l:void 0};function bt(t,l,...r){if(t in l){let u=l[t];return typeof u=="function"?u(...r):u}let n=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(l).map(u=>`"${u}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,bt),n}function Sr(t){return en.isServer?null:t instanceof Node?t.ownerDocument:t!=null&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}let no=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var nn=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t))(nn||{}),hl=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(hl||{}),js=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(js||{});function vl(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(no)).sort((l,r)=>Math.sign((l.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var ro=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(ro||{});function oo(t,l=0){var r;return t===((r=Sr(t))==null?void 0:r.body)?!1:bt(l,{0(){return t.matches(no)},1(){let n=t;for(;n!==null;){if(n.matches(no))return!0;n=n.parentElement}return!1}})}function gl(t){let l=Sr(t);Wt().nextFrame(()=>{l&&!oo(l.activeElement,0)&&cn(t)})}var Ts=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(Ts||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:t.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function cn(t){t==null||t.focus({preventScroll:!0})}let Os=["textarea","input"].join(",");function Ns(t){var l,r;return(r=(l=t==null?void 0:t.matches)==null?void 0:l.call(t,Os))!=null?r:!1}function lo(t,l=r=>r){return t.slice().sort((r,n)=>{let u=l(r),f=l(n);if(u===null||f===null)return 0;let a=u.compareDocumentPosition(f);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Is(t,l){return zn(vl(),l,{relativeTo:t})}function zn(t,l,{sorted:r=!0,relativeTo:n=null,skipElements:u=[]}={}){let f=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,a=Array.isArray(t)?r?lo(t):t:vl(t);u.length>0&&a.length>1&&(a=a.filter(T=>!u.includes(T))),n=n??f.activeElement;let m=(()=>{if(l&5)return 1;if(l&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),v=(()=>{if(l&1)return 0;if(l&2)return Math.max(0,a.indexOf(n))-1;if(l&4)return Math.max(0,a.indexOf(n))+1;if(l&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),x=l&32?{preventScroll:!0}:{},E=0,k=a.length,R;do{if(E>=k||E+k<=0)return 0;let T=v+E;if(l&16)T=(T+k)%k;else{if(T<0)return 3;if(T>=k)return 1}R=a[T],R==null||R.focus(x),E+=m}while(R!==f.activeElement);return l&6&&Ns(R)&&R.select(),2}function bl(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ks(){return/Android/gi.test(window.navigator.userAgent)}function xl(){return bl()||ks()}function Cr(t,l,r){let n=Vt(l);b.useEffect(()=>{function u(f){n.current(f)}return document.addEventListener(t,u,r),()=>document.removeEventListener(t,u,r)},[t,r])}function yl(t,l,r){let n=Vt(l);b.useEffect(()=>{function u(f){n.current(f)}return window.addEventListener(t,u,r),()=>window.removeEventListener(t,u,r)},[t,r])}function io(t,l,r=!0){let n=b.useRef(!1);b.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function u(a,m){if(!n.current||a.defaultPrevented)return;let v=m(a);if(v===null||!v.getRootNode().contains(v)||!v.isConnected)return;let x=function E(k){return typeof k=="function"?E(k()):Array.isArray(k)||k instanceof Set?k:[k]}(t);for(let E of x){if(E===null)continue;let k=E instanceof HTMLElement?E:E.current;if(k!=null&&k.contains(v)||a.composed&&a.composedPath().includes(k))return}return!oo(v,ro.Loose)&&v.tabIndex!==-1&&a.preventDefault(),l(a,v)}let f=b.useRef(null);Cr("pointerdown",a=>{var m,v;n.current&&(f.current=((v=(m=a.composedPath)==null?void 0:m.call(a))==null?void 0:v[0])||a.target)},!0),Cr("mousedown",a=>{var m,v;n.current&&(f.current=((v=(m=a.composedPath)==null?void 0:m.call(a))==null?void 0:v[0])||a.target)},!0),Cr("click",a=>{xl()||f.current&&(u(a,()=>f.current),f.current=null)},!0),Cr("touchend",a=>u(a,()=>a.target instanceof HTMLElement?a.target:null),!0),yl("blur",a=>u(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function wn(...t){return b.useMemo(()=>Sr(...t),[...t])}function wl(t){var l;if(t.type)return t.type;let r=(l=t.as)!=null?l:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function so(t,l){let[r,n]=b.useState(()=>wl(t));return nt(()=>{n(wl(t))},[t.type,t.as]),nt(()=>{r||l.current&&l.current instanceof HTMLButtonElement&&!l.current.hasAttribute("type")&&n("button")},[r,l]),r}let El=Symbol();function Ps(t,l=!0){return Object.assign(t,{[El]:l})}function wt(...t){let l=b.useRef(t);b.useEffect(()=>{l.current=t},[t]);let r=ee(n=>{for(let u of l.current)u!=null&&(typeof u=="function"?u(n):u.current=n)});return t.every(n=>n==null||(n==null?void 0:n[El]))?void 0:r}function Sl(t){return[t.screenX,t.screenY]}function Cl(){let t=b.useRef([-1,-1]);return{wasMoved(l){let r=Sl(l);return t.current[0]===r[0]&&t.current[1]===r[1]?!1:(t.current=r,!0)},update(l){t.current=Sl(l)}}}function jl({container:t,accept:l,walk:r,enabled:n=!0}){let u=b.useRef(l),f=b.useRef(r);b.useEffect(()=>{u.current=l,f.current=r},[l,r]),nt(()=>{if(!t||!n)return;let a=Sr(t);if(!a)return;let m=u.current,v=f.current,x=Object.assign(k=>m(k),{acceptNode:m}),E=a.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,x,!1);for(;E.nextNode();)v(E.currentNode)},[t,n,u,f])}function Wn(t,l){let r=b.useRef([]),n=ee(t);b.useEffect(()=>{let u=[...r.current];for(let[f,a]of l.entries())if(r.current[f]!==a){let m=n(l,u);return r.current=l,m}},[n,...l])}function jr(...t){return Array.from(new Set(t.flatMap(l=>typeof l=="string"?l.split(" "):[]))).filter(Boolean).join(" ")}var dn=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(dn||{}),fn=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(fn||{});function pt({ourProps:t,theirProps:l,slot:r,defaultTag:n,features:u,visible:f=!0,name:a,mergeRefs:m}){m=m??Fs;let v=Tl(l,t);if(f)return Tr(v,r,n,a,m);let x=u??0;if(x&2){let{static:E=!1,...k}=v;if(E)return Tr(k,r,n,a,m)}if(x&1){let{unmount:E=!0,...k}=v;return bt(E?0:1,{0(){return null},1(){return Tr({...k,hidden:!0,style:{display:"none"}},r,n,a,m)}})}return Tr(v,r,n,a,m)}function Tr(t,l={},r,n,u){let{as:f=r,children:a,refName:m="ref",...v}=ao(t,["unmount","static"]),x=t.ref!==void 0?{[m]:t.ref}:{},E=typeof a=="function"?a(l):a;"className"in v&&v.className&&typeof v.className=="function"&&(v.className=v.className(l));let k={};if(l){let R=!1,T=[];for(let[M,$]of Object.entries(l))typeof $=="boolean"&&(R=!0),$===!0&&T.push(M);R&&(k["data-headlessui-state"]=T.join(" "))}if(f===b.Fragment&&Object.keys(Or(v)).length>0){if(!b.isValidElement(E)||Array.isArray(E)&&E.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(v).map($=>` - ${$}`).join(`
|
|
29
29
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map($=>` - ${$}`).join(`
|
|
30
30
|
`)].join(`
|
|
31
|
-
`));let R=E.props,T=typeof(R==null?void 0:R.className)=="function"?(...$)=>jr(R==null?void 0:R.className(...$),v.className):jr(R==null?void 0:R.className,v.className),M=T?{className:T}:{};return b.cloneElement(E,Object.assign({},Tl(E.props,Or(ao(v,["ref"]))),k,x,{ref:u(E.ref,x.ref)},M))}return b.createElement(f,Object.assign({},ao(v,["ref"]),f!==b.Fragment&&x,f!==b.Fragment&&k),E)}function Fs(...t){return t.every(l=>l==null)?void 0:l=>{for(let r of t)r!=null&&(typeof r=="function"?r(l):r.current=l)}}function Tl(...t){if(t.length===0)return{};if(t.length===1)return t[0];let l={},r={};for(let n of t)for(let u in n)u.startsWith("on")&&typeof n[u]=="function"?(r[u]!=null||(r[u]=[]),r[u].push(n[u])):l[u]=n[u];if(l.disabled||l["aria-disabled"])return Object.assign(l,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(l,{[n](u,...f){let a=r[n];for(let m of a){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;m(u,...f)}}});return l}function mt(t){var l;return Object.assign(b.forwardRef(t),{displayName:(l=t.displayName)!=null?l:t.name})}function Or(t){let l=Object.assign({},t);for(let r in l)l[r]===void 0&&delete l[r];return l}function ao(t,l=[]){let r=Object.assign({},t);for(let n of l)n in r&&delete r[n];return r}let Ms="div";var Pn=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(Pn||{});function Rs(t,l){var r;let{features:n=1,...u}=t,f={ref:l,"aria-hidden":(n&2)===2?!0:(r=u["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return pt({ourProps:f,theirProps:u,slot:{},defaultTag:Ms,name:"Hidden"})}let Hn=mt(Rs),uo=b.createContext(null);uo.displayName="OpenClosedContext";var Ct=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(Ct||{});function Un(){return b.useContext(uo)}function co({value:t,children:l}){return b.createElement(uo.Provider,{value:t},l)}function Ls(t){function l(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let qt=[];Ls(()=>{function t(l){l.target instanceof HTMLElement&&l.target!==document.body&&qt[0]!==l.target&&(qt.unshift(l.target),qt=qt.filter(r=>r!=null&&r.isConnected),qt.splice(10))}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function Nr(t){let l=t.parentElement,r=null;for(;l&&!(l instanceof HTMLFieldSetElement);)l instanceof HTMLLegendElement&&(r=l),l=l.parentElement;let n=(l==null?void 0:l.getAttribute("disabled"))==="";return n&&As(r)?!1:n}function As(t){if(!t)return!1;let l=t.previousElementSibling;for(;l!==null;){if(l instanceof HTMLLegendElement)return!1;l=l.previousElementSibling}return!0}function Ds(t){throw new Error("Unexpected object: "+t)}var rt=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(rt||{});function fo(t,l){let r=l.resolveItems();if(r.length<=0)return null;let n=l.resolveActiveIndex(),u=n??-1;switch(t.focus){case 0:{for(let f=0;f<r.length;++f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 1:{for(let f=u-1;f>=0;--f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 2:{for(let f=u+1;f<r.length;++f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 3:{for(let f=r.length-1;f>=0;--f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 4:{for(let f=0;f<r.length;++f)if(l.resolveId(r[f],f,r)===t.id)return f;return n}case 5:return null;default:Ds(t)}}function Ol(t={},l=null,r=[]){for(let[n,u]of Object.entries(t))Il(r,Nl(l,n),u);return r}function Nl(t,l){return t?t+"["+l+"]":l}function Il(t,l,r){if(Array.isArray(r))for(let[n,u]of r.entries())Il(t,Nl(l,n.toString()),u);else r instanceof Date?t.push([l,r.toISOString()]):typeof r=="boolean"?t.push([l,r?"1":"0"]):typeof r=="string"?t.push([l,r]):typeof r=="number"?t.push([l,`${r}`]):r==null?t.push([l,""]):Ol(r,l,t)}function $s(t){var l,r;let n=(l=t==null?void 0:t.form)!=null?l:t.closest("form");if(n){for(let u of n.elements)if(u!==t&&(u.tagName==="INPUT"&&u.type==="submit"||u.tagName==="BUTTON"&&u.type==="submit"||u.nodeName==="INPUT"&&u.type==="image")){u.click();return}(r=n.requestSubmit)==null||r.call(n)}}var Ge=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(Ge||{}),_s=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(_s||{}),Bs=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(Bs||{}),zs=(t=>(t[t.Pointer=0]="Pointer",t[t.Focus=1]="Focus",t[t.Other=2]="Other",t))(zs||{}),Ws=(t=>(t[t.OpenCombobox=0]="OpenCombobox",t[t.CloseCombobox=1]="CloseCombobox",t[t.GoToOption=2]="GoToOption",t[t.RegisterOption=3]="RegisterOption",t[t.UnregisterOption=4]="UnregisterOption",t[t.RegisterLabel=5]="RegisterLabel",t[t.SetActivationTrigger=6]="SetActivationTrigger",t[t.UpdateVirtualOptions=7]="UpdateVirtualOptions",t))(Ws||{});function po(t,l=r=>r){let r=t.activeOptionIndex!==null?t.options[t.activeOptionIndex]:null,n=l(t.options.slice()),u=n.length>0&&n[0].dataRef.current.order!==null?n.sort((a,m)=>a.dataRef.current.order-m.dataRef.current.order):lo(n,a=>a.dataRef.current.domRef.current),f=r?u.indexOf(r):null;return f===-1&&(f=null),{options:u,activeOptionIndex:f}}let Hs={1(t){var l;return(l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===1?t:{...t,activeOptionIndex:null,comboboxState:1}},0(t){var l,r;if((l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===0)return t;if((r=t.dataRef.current)!=null&&r.value){let n=t.dataRef.current.calculateIndex(t.dataRef.current.value);if(n!==-1)return{...t,activeOptionIndex:n,comboboxState:0}}return{...t,comboboxState:0}},2(t,l){var r,n,u,f,a;if((r=t.dataRef.current)!=null&&r.disabled||(n=t.dataRef.current)!=null&&n.optionsRef.current&&!((u=t.dataRef.current)!=null&&u.optionsPropsRef.current.static)&&t.comboboxState===1)return t;if(t.virtual){let E=l.focus===rt.Specific?l.idx:fo(l,{resolveItems:()=>t.virtual.options,resolveActiveIndex:()=>{var R,T;return(T=(R=t.activeOptionIndex)!=null?R:t.virtual.options.findIndex(M=>!t.virtual.disabled(M)))!=null?T:null},resolveDisabled:t.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),k=(f=l.trigger)!=null?f:2;return t.activeOptionIndex===E&&t.activationTrigger===k?t:{...t,activeOptionIndex:E,activationTrigger:k}}let m=po(t);if(m.activeOptionIndex===null){let E=m.options.findIndex(k=>!k.dataRef.current.disabled);E!==-1&&(m.activeOptionIndex=E)}let v=l.focus===rt.Specific?l.idx:fo(l,{resolveItems:()=>m.options,resolveActiveIndex:()=>m.activeOptionIndex,resolveId:E=>E.id,resolveDisabled:E=>E.dataRef.current.disabled}),x=(a=l.trigger)!=null?a:2;return t.activeOptionIndex===v&&t.activationTrigger===x?t:{...t,...m,activeOptionIndex:v,activationTrigger:x}},3:(t,l)=>{var r,n,u;if((r=t.dataRef.current)!=null&&r.virtual)return{...t,options:[...t.options,l.payload]};let f=l.payload,a=po(t,v=>(v.push(f),v));t.activeOptionIndex===null&&(n=t.dataRef.current)!=null&&n.isSelected(l.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(f));let m={...t,...a,activationTrigger:2};return(u=t.dataRef.current)!=null&&u.__demoMode&&t.dataRef.current.value===void 0&&(m.activeOptionIndex=0),m},4:(t,l)=>{var r;if((r=t.dataRef.current)!=null&&r.virtual)return{...t,options:t.options.filter(u=>u.id!==l.id)};let n=po(t,u=>{let f=u.findIndex(a=>a.id===l.id);return f!==-1&&u.splice(f,1),u});return{...t,...n,activationTrigger:2}},5:(t,l)=>t.labelId===l.id?t:{...t,labelId:l.id},6:(t,l)=>t.activationTrigger===l.trigger?t:{...t,activationTrigger:l.trigger},7:(t,l)=>{var r;if(((r=t.virtual)==null?void 0:r.options)===l.options)return t;let n=t.activeOptionIndex;if(t.activeOptionIndex!==null){let u=l.options.indexOf(t.virtual.options[t.activeOptionIndex]);u!==-1?n=u:n=null}return{...t,activeOptionIndex:n,virtual:Object.assign({},t.virtual,{options:l.options})}}},mo=b.createContext(null);mo.displayName="ComboboxActionsContext";function Vn(t){let l=b.useContext(mo);if(l===null){let r=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Vn),r}return l}let kl=b.createContext(null);function Us(t){var l;let r=En("VirtualProvider"),[n,u]=b.useMemo(()=>{let v=r.optionsRef.current;if(!v)return[0,0];let x=window.getComputedStyle(v);return[parseFloat(x.paddingBlockStart||x.paddingTop),parseFloat(x.paddingBlockEnd||x.paddingBottom)]},[r.optionsRef.current]),f=ys({scrollPaddingStart:n,scrollPaddingEnd:u,count:r.virtual.options.length,estimateSize(){return 40},getScrollElement(){var v;return(v=r.optionsRef.current)!=null?v:null},overscan:12}),[a,m]=b.useState(0);return nt(()=>{m(v=>v+1)},[(l=r.virtual)==null?void 0:l.options]),b.createElement(kl.Provider,{value:f},b.createElement("div",{style:{position:"relative",width:"100%",height:`${f.getTotalSize()}px`},ref:v=>{if(v){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||r.activationTrigger===0)return;r.activeOptionIndex!==null&&r.virtual.options.length>r.activeOptionIndex&&f.scrollToIndex(r.activeOptionIndex)}}},f.getVirtualItems().map(v=>{var x;return b.createElement(b.Fragment,{key:v.key},b.cloneElement((x=t.children)==null?void 0:x.call(t,{option:r.virtual.options[v.index],open:r.comboboxState===0}),{key:`${a}-${v.key}`,"data-index":v.index,"aria-setsize":r.virtual.options.length,"aria-posinset":v.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${v.start}px)`,overflowAnchor:"none"}}))})))}let ho=b.createContext(null);ho.displayName="ComboboxDataContext";function En(t){let l=b.useContext(ho);if(l===null){let r=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,En),r}return l}function Vs(t,l){return bt(l.type,Hs,t,l)}let Zs=b.Fragment;function Ys(t,l){let{value:r,defaultValue:n,onChange:u,form:f,name:a,by:m=null,disabled:v=!1,__demoMode:x=!1,nullable:E=!1,multiple:k=!1,immediate:R=!1,virtual:T=null,...M}=t,$=!1,P=null,[B=k?[]:void 0,_]=pl(r,u,n),[q,te]=b.useReducer(Vs,{dataRef:b.createRef(),comboboxState:x?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),re=b.useRef(!1),pe=b.useRef({static:!1,hold:!1}),Pe=b.useRef(null),ke=b.useRef(null),Te=b.useRef(null),y=b.useRef(null),me=ee(typeof m=="string"?(le,Ee)=>{let G=m;return(le==null?void 0:le[G])===(Ee==null?void 0:Ee[G])}:m??((le,Ee)=>le===Ee)),Fe=ee(le=>q.options.findIndex(Ee=>me(Ee.dataRef.current.value,le))),Be=b.useCallback(le=>bt(U.mode,{1:()=>B.some(Ee=>me(Ee,le)),0:()=>me(B,le)}),[B]),it=ee(le=>q.activeOptionIndex===Fe(le)),U=b.useMemo(()=>({...q,immediate:$,optionsPropsRef:pe,labelRef:Pe,inputRef:ke,buttonRef:Te,optionsRef:y,value:B,defaultValue:n,disabled:v,mode:k?1:0,virtual:q.virtual,get activeOptionIndex(){if(re.current&&q.activeOptionIndex===null&&q.options.length>0){let le=q.options.findIndex(Ee=>!Ee.dataRef.current.disabled);if(le!==-1)return le}return q.activeOptionIndex},calculateIndex:Fe,compare:me,isSelected:Be,isActive:it,nullable:E,__demoMode:x}),[B,n,v,k,E,x,q,P]);nt(()=>{},[P,void 0]),nt(()=>{q.dataRef.current=U},[U]),io([U.buttonRef,U.inputRef,U.optionsRef],()=>Lt.closeCombobox(),U.comboboxState===0);let Xe=b.useMemo(()=>{var le,Ee,G;return{open:U.comboboxState===0,disabled:v,activeIndex:U.activeOptionIndex,activeOption:U.activeOptionIndex===null?null:U.virtual?U.virtual.options[(le=U.activeOptionIndex)!=null?le:0]:(G=(Ee=U.options[U.activeOptionIndex])==null?void 0:Ee.dataRef.current.value)!=null?G:null,value:B}},[U,v,B]),$e=ee(()=>{if(U.activeOptionIndex!==null){if(U.virtual)kt(U.virtual.options[U.activeOptionIndex]);else{let{dataRef:le}=U.options[U.activeOptionIndex];kt(le.current.value)}Lt.goToOption(rt.Specific,U.activeOptionIndex)}}),ue=ee(()=>{te({type:0}),re.current=!0}),Oe=ee(()=>{te({type:1}),re.current=!1}),Je=ee((le,Ee,G)=>(re.current=!1,le===rt.Specific?te({type:2,focus:rt.Specific,idx:Ee,trigger:G}):te({type:2,focus:le,trigger:G}))),Et=ee((le,Ee)=>(te({type:3,payload:{id:le,dataRef:Ee}}),()=>{U.isActive(Ee.current.value)&&(re.current=!0),te({type:4,id:le})})),ut=ee(le=>(te({type:5,id:le}),()=>te({type:5,id:null}))),kt=ee(le=>bt(U.mode,{0(){return _==null?void 0:_(le)},1(){let Ee=U.value.slice(),G=Ee.findIndex(ge=>me(ge,le));return G===-1?Ee.push(le):Ee.splice(G,1),_==null?void 0:_(Ee)}})),ht=ee(le=>{te({type:6,trigger:le})}),Lt=b.useMemo(()=>({onChange:kt,registerOption:Et,registerLabel:ut,goToOption:Je,closeCombobox:Oe,openCombobox:ue,setActivationTrigger:ht,selectActiveOption:$e}),[]),Ne=l===null?{}:{ref:l},Qe=b.useRef(null),Ze=tn();return b.useEffect(()=>{Qe.current&&n!==void 0&&Ze.addEventListener(Qe.current,"reset",()=>{_==null||_(n)})},[Qe,_]),b.createElement(mo.Provider,{value:Lt},b.createElement(ho.Provider,{value:U},b.createElement(co,{value:bt(U.comboboxState,{0:Ct.Open,1:Ct.Closed})},a!=null&&B!=null&&Ol({[a]:B}).map(([le,Ee],G)=>b.createElement(Hn,{features:Pn.Hidden,ref:G===0?ge=>{var Ce;Qe.current=(Ce=ge==null?void 0:ge.closest("form"))!=null?Ce:null}:void 0,...Or({key:le,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:f,disabled:v,name:le,value:Ee})})),pt({ourProps:Ne,theirProps:M,slot:Xe,defaultTag:Zs,name:"Combobox"}))))}let Gs="input";function qs(t,l){var r,n,u,f,a;let m=Dt(),{id:v=`headlessui-combobox-input-${m}`,onChange:x,displayValue:E,type:k="text",...R}=t,T=En("Combobox.Input"),M=Vn("Combobox.Input"),$=wt(T.inputRef,l),P=wn(T.inputRef),B=b.useRef(!1),_=tn(),q=ee(()=>{M.onChange(null),T.optionsRef.current&&(T.optionsRef.current.scrollTop=0),M.goToOption(rt.Nothing)}),te=function(){var U;return typeof E=="function"&&T.value!==void 0?(U=E(T.value))!=null?U:"":typeof T.value=="string"?T.value:""}();Wn(([U,Xe],[$e,ue])=>{if(B.current)return;let Oe=T.inputRef.current;Oe&&((ue===0&&Xe===1||U!==$e)&&(Oe.value=U),requestAnimationFrame(()=>{if(B.current||!Oe||(P==null?void 0:P.activeElement)!==Oe)return;let{selectionStart:Je,selectionEnd:Et}=Oe;Math.abs((Et??0)-(Je??0))===0&&Je===0&&Oe.setSelectionRange(Oe.value.length,Oe.value.length)}))},[te,T.comboboxState,P]),Wn(([U],[Xe])=>{if(U===0&&Xe===1){if(B.current)return;let $e=T.inputRef.current;if(!$e)return;let ue=$e.value,{selectionStart:Oe,selectionEnd:Je,selectionDirection:Et}=$e;$e.value="",$e.value=ue,Et!==null?$e.setSelectionRange(Oe,Je,Et):$e.setSelectionRange(Oe,Je)}},[T.comboboxState]);let re=b.useRef(!1),pe=ee(()=>{re.current=!0}),Pe=ee(()=>{_.nextFrame(()=>{re.current=!1})}),ke=ee(U=>{switch(B.current=!0,U.key){case Ge.Enter:if(B.current=!1,T.comboboxState!==0||re.current)return;if(U.preventDefault(),U.stopPropagation(),T.activeOptionIndex===null){M.closeCombobox();return}M.selectActiveOption(),T.mode===0&&M.closeCombobox();break;case Ge.ArrowDown:return B.current=!1,U.preventDefault(),U.stopPropagation(),bt(T.comboboxState,{0:()=>M.goToOption(rt.Next),1:()=>M.openCombobox()});case Ge.ArrowUp:return B.current=!1,U.preventDefault(),U.stopPropagation(),bt(T.comboboxState,{0:()=>M.goToOption(rt.Previous),1:()=>{M.openCombobox(),_.nextFrame(()=>{T.value||M.goToOption(rt.Last)})}});case Ge.Home:if(U.shiftKey)break;return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.First);case Ge.PageUp:return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.First);case Ge.End:if(U.shiftKey)break;return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.Last);case Ge.PageDown:return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.Last);case Ge.Escape:return B.current=!1,T.comboboxState!==0?void 0:(U.preventDefault(),T.optionsRef.current&&!T.optionsPropsRef.current.static&&U.stopPropagation(),T.nullable&&T.mode===0&&T.value===null&&q(),M.closeCombobox());case Ge.Tab:if(B.current=!1,T.comboboxState!==0)return;T.mode===0&&T.activationTrigger!==1&&M.selectActiveOption(),M.closeCombobox();break}}),Te=ee(U=>{x==null||x(U),T.nullable&&T.mode===0&&U.target.value===""&&q(),M.openCombobox()}),y=ee(U=>{var Xe,$e,ue;let Oe=(Xe=U.relatedTarget)!=null?Xe:qt.find(Je=>Je!==U.currentTarget);if(B.current=!1,!(($e=T.optionsRef.current)!=null&&$e.contains(Oe))&&!((ue=T.buttonRef.current)!=null&&ue.contains(Oe))&&T.comboboxState===0)return U.preventDefault(),T.mode===0&&(T.nullable&&T.value===null?q():T.activationTrigger!==1&&M.selectActiveOption()),M.closeCombobox()}),me=ee(U=>{var Xe,$e,ue;let Oe=(Xe=U.relatedTarget)!=null?Xe:qt.find(Je=>Je!==U.currentTarget);($e=T.buttonRef.current)!=null&&$e.contains(Oe)||(ue=T.optionsRef.current)!=null&&ue.contains(Oe)||T.disabled||T.immediate&&T.comboboxState!==0&&(M.openCombobox(),_.nextFrame(()=>{M.setActivationTrigger(1)}))}),Fe=to(()=>{if(T.labelId)return[T.labelId].join(" ")},[T.labelId]),Be=b.useMemo(()=>({open:T.comboboxState===0,disabled:T.disabled}),[T]),it={ref:$,id:v,role:"combobox",type:k,"aria-controls":(r=T.optionsRef.current)==null?void 0:r.id,"aria-expanded":T.comboboxState===0,"aria-activedescendant":T.activeOptionIndex===null?void 0:T.virtual?(n=T.options.find(U=>{var Xe;return!((Xe=T.virtual)!=null&&Xe.disabled(U.dataRef.current.value))&&T.compare(U.dataRef.current.value,T.virtual.options[T.activeOptionIndex])}))==null?void 0:n.id:(u=T.options[T.activeOptionIndex])==null?void 0:u.id,"aria-labelledby":Fe,"aria-autocomplete":"list",defaultValue:(a=(f=t.defaultValue)!=null?f:T.defaultValue!==void 0?E==null?void 0:E(T.defaultValue):null)!=null?a:T.defaultValue,disabled:T.disabled,onCompositionStart:pe,onCompositionEnd:Pe,onKeyDown:ke,onChange:Te,onFocus:me,onBlur:y};return pt({ourProps:it,theirProps:R,slot:Be,defaultTag:Gs,name:"Combobox.Input"})}let Ks="button";function Xs(t,l){var r;let n=En("Combobox.Button"),u=Vn("Combobox.Button"),f=wt(n.buttonRef,l),a=Dt(),{id:m=`headlessui-combobox-button-${a}`,...v}=t,x=tn(),E=ee($=>{switch($.key){case Ge.ArrowDown:return $.preventDefault(),$.stopPropagation(),n.comboboxState===1&&u.openCombobox(),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})});case Ge.ArrowUp:return $.preventDefault(),$.stopPropagation(),n.comboboxState===1&&(u.openCombobox(),x.nextFrame(()=>{n.value||u.goToOption(rt.Last)})),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})});case Ge.Escape:return n.comboboxState!==0?void 0:($.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&$.stopPropagation(),u.closeCombobox(),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})}));default:return}}),k=ee($=>{if(Nr($.currentTarget))return $.preventDefault();n.comboboxState===0?u.closeCombobox():($.preventDefault(),u.openCombobox()),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})})}),R=to(()=>{if(n.labelId)return[n.labelId,m].join(" ")},[n.labelId,m]),T=b.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),M={ref:f,id:m,type:so(t,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(r=n.optionsRef.current)==null?void 0:r.id,"aria-expanded":n.comboboxState===0,"aria-labelledby":R,disabled:n.disabled,onClick:k,onKeyDown:E};return pt({ourProps:M,theirProps:v,slot:T,defaultTag:Ks,name:"Combobox.Button"})}let Js="label";function Qs(t,l){let r=Dt(),{id:n=`headlessui-combobox-label-${r}`,...u}=t,f=En("Combobox.Label"),a=Vn("Combobox.Label"),m=wt(f.labelRef,l);nt(()=>a.registerLabel(n),[n]);let v=ee(()=>{var E;return(E=f.inputRef.current)==null?void 0:E.focus({preventScroll:!0})}),x=b.useMemo(()=>({open:f.comboboxState===0,disabled:f.disabled}),[f]);return pt({ourProps:{ref:m,id:n,onClick:v},theirProps:u,slot:x,defaultTag:Js,name:"Combobox.Label"})}let ea="ul",ta=dn.RenderStrategy|dn.Static;function na(t,l){let r=Dt(),{id:n=`headlessui-combobox-options-${r}`,hold:u=!1,...f}=t,a=En("Combobox.Options"),m=wt(a.optionsRef,l),v=Un(),x=v!==null?(v&Ct.Open)===Ct.Open:a.comboboxState===0;nt(()=>{var T;a.optionsPropsRef.current.static=(T=t.static)!=null?T:!1},[a.optionsPropsRef,t.static]),nt(()=>{a.optionsPropsRef.current.hold=u},[a.optionsPropsRef,u]),jl({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(T){return T.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:T.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(T){T.setAttribute("role","none")}});let E=to(()=>{var T,M;return(M=a.labelId)!=null?M:(T=a.buttonRef.current)==null?void 0:T.id},[a.labelId,a.buttonRef.current]),k=b.useMemo(()=>({open:a.comboboxState===0,option:void 0}),[a]),R={"aria-labelledby":E,role:"listbox","aria-multiselectable":a.mode===1?!0:void 0,id:n,ref:m};return a.virtual&&a.comboboxState===0&&Object.assign(f,{children:b.createElement(Us,null,f.children)}),pt({ourProps:R,theirProps:f,slot:k,defaultTag:ea,features:ta,visible:x,name:"Combobox.Options"})}let ra="li";function oa(t,l){var r;let n=Dt(),{id:u=`headlessui-combobox-option-${n}`,disabled:f=!1,value:a,order:m=null,...v}=t,x=En("Combobox.Option"),E=Vn("Combobox.Option"),k=x.virtual?x.activeOptionIndex===x.calculateIndex(a):x.activeOptionIndex===null?!1:((r=x.options[x.activeOptionIndex])==null?void 0:r.id)===u,R=x.isSelected(a),T=b.useRef(null),M=Vt({disabled:f,value:a,domRef:T,order:m}),$=b.useContext(kl),P=wt(l,T,$?$.measureElement:null),B=ee(()=>E.onChange(a));nt(()=>E.registerOption(u,M),[M,u]);let _=b.useRef(!(x.virtual||x.__demoMode));nt(()=>{if(!x.virtual||!x.__demoMode)return;let y=Wt();return y.requestAnimationFrame(()=>{_.current=!0}),y.dispose},[x.virtual,x.__demoMode]),nt(()=>{if(!_.current||x.comboboxState!==0||!k||x.activationTrigger===0)return;let y=Wt();return y.requestAnimationFrame(()=>{var me,Fe;(Fe=(me=T.current)==null?void 0:me.scrollIntoView)==null||Fe.call(me,{block:"nearest"})}),y.dispose},[T,k,x.comboboxState,x.activationTrigger,x.activeOptionIndex]);let q=ee(y=>{var me;if(f||(me=x.virtual)!=null&&me.disabled(a))return y.preventDefault();B(),xl()||requestAnimationFrame(()=>{var Fe;return(Fe=x.inputRef.current)==null?void 0:Fe.focus({preventScroll:!0})}),x.mode===0&&requestAnimationFrame(()=>E.closeCombobox())}),te=ee(()=>{var y;if(f||(y=x.virtual)!=null&&y.disabled(a))return E.goToOption(rt.Nothing);let me=x.calculateIndex(a);E.goToOption(rt.Specific,me)}),re=Cl(),pe=ee(y=>re.update(y)),Pe=ee(y=>{var me;if(!re.wasMoved(y)||f||(me=x.virtual)!=null&&me.disabled(a)||k)return;let Fe=x.calculateIndex(a);E.goToOption(rt.Specific,Fe,0)}),ke=ee(y=>{var me;re.wasMoved(y)&&(f||(me=x.virtual)!=null&&me.disabled(a)||k&&(x.optionsPropsRef.current.hold||E.goToOption(rt.Nothing)))}),Te=b.useMemo(()=>({active:k,selected:R,disabled:f}),[k,R,f]);return pt({ourProps:{id:u,ref:P,role:"option",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,"aria-selected":R,disabled:void 0,onClick:q,onFocus:te,onPointerEnter:pe,onMouseEnter:pe,onPointerMove:Pe,onMouseMove:Pe,onPointerLeave:ke,onMouseLeave:ke},theirProps:v,slot:Te,defaultTag:ra,name:"Combobox.Option"})}let la=mt(Ys),ia=mt(Xs),sa=mt(qs),aa=mt(Qs),ua=mt(na),ca=mt(oa),rn=Object.assign(la,{Input:sa,Button:ia,Label:aa,Options:ua,Option:ca});function Pl(t,l,r,n){let u=Vt(r);b.useEffect(()=>{t=t??window;function f(a){u.current(a)}return t.addEventListener(l,f,n),()=>t.removeEventListener(l,f,n)},[t,l,n])}function Zn(){let t=b.useRef(!1);return nt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Fl(t){let l=ee(t),r=b.useRef(!1);b.useEffect(()=>(r.current=!1,()=>{r.current=!0,Er(()=>{r.current&&l()})}),[l])}var Yn=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(Yn||{});function da(){let t=b.useRef(0);return yl("keydown",l=>{l.key==="Tab"&&(t.current=l.shiftKey?1:0)},!0),t}function Ml(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let l=new Set;for(let r of t.current)r.current instanceof HTMLElement&&l.add(r.current);return l}let fa="div";var Rl=(t=>(t[t.None=1]="None",t[t.InitialFocus=2]="InitialFocus",t[t.TabLock=4]="TabLock",t[t.FocusLock=8]="FocusLock",t[t.RestoreFocus=16]="RestoreFocus",t[t.All=30]="All",t))(Rl||{});function pa(t,l){let r=b.useRef(null),n=wt(r,l),{initialFocus:u,containers:f,features:a=30,...m}=t;kn()||(a=1);let v=wn(r);va({ownerDocument:v},!!(a&16));let x=ga({ownerDocument:v,container:r,initialFocus:u},!!(a&2));ba({ownerDocument:v,container:r,containers:f,previousActiveElement:x},!!(a&8));let E=da(),k=ee($=>{let P=r.current;P&&(B=>B())(()=>{bt(E.current,{[Yn.Forwards]:()=>{zn(P,nn.First,{skipElements:[$.relatedTarget]})},[Yn.Backwards]:()=>{zn(P,nn.Last,{skipElements:[$.relatedTarget]})}})})}),R=tn(),T=b.useRef(!1),M={ref:n,onKeyDown($){$.key=="Tab"&&(T.current=!0,R.requestAnimationFrame(()=>{T.current=!1}))},onBlur($){let P=Ml(f);r.current instanceof HTMLElement&&P.add(r.current);let B=$.relatedTarget;B instanceof HTMLElement&&B.dataset.headlessuiFocusGuard!=="true"&&(Ll(P,B)||(T.current?zn(r.current,bt(E.current,{[Yn.Forwards]:()=>nn.Next,[Yn.Backwards]:()=>nn.Previous})|nn.WrapAround,{relativeTo:$.target}):$.target instanceof HTMLElement&&cn($.target)))}};return b.createElement(b.Fragment,null,!!(a&4)&&b.createElement(Hn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:Pn.Focusable}),pt({ourProps:M,theirProps:m,defaultTag:fa,name:"FocusTrap"}),!!(a&4)&&b.createElement(Hn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:Pn.Focusable}))}let ma=mt(pa),Gn=Object.assign(ma,{features:Rl});function ha(t=!0){let l=b.useRef(qt.slice());return Wn(([r],[n])=>{n===!0&&r===!1&&Er(()=>{l.current.splice(0)}),n===!1&&r===!0&&(l.current=qt.slice())},[t,qt,l]),ee(()=>{var r;return(r=l.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function va({ownerDocument:t},l){let r=ha(l);Wn(()=>{l||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&cn(r())},[l]),Fl(()=>{l&&cn(r())})}function ga({ownerDocument:t,container:l,initialFocus:r},n){let u=b.useRef(null),f=Zn();return Wn(()=>{if(!n)return;let a=l.current;a&&Er(()=>{if(!f.current)return;let m=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===m){u.current=m;return}}else if(a.contains(m)){u.current=m;return}r!=null&&r.current?cn(r.current):zn(a,nn.First)===hl.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),u.current=t==null?void 0:t.activeElement})},[n]),u}function ba({ownerDocument:t,container:l,containers:r,previousActiveElement:n},u){let f=Zn();Pl(t==null?void 0:t.defaultView,"focus",a=>{if(!u||!f.current)return;let m=Ml(r);l.current instanceof HTMLElement&&m.add(l.current);let v=n.current;if(!v)return;let x=a.target;x&&x instanceof HTMLElement?Ll(m,x)?(n.current=x,cn(x)):(a.preventDefault(),a.stopPropagation(),cn(v)):cn(n.current)},!0)}function Ll(t,l){for(let r of t)if(r.contains(l))return!0;return!1}let Al=b.createContext(!1);function xa(){return b.useContext(Al)}function vo(t){return b.createElement(Al.Provider,{value:t.force},t.children)}function ya(t){let l=xa(),r=b.useContext(Dl),n=wn(t),[u,f]=b.useState(()=>{if(!l&&r!==null||en.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let m=n.createElement("div");return m.setAttribute("id","headlessui-portal-root"),n.body.appendChild(m)});return b.useEffect(()=>{u!==null&&(n!=null&&n.body.contains(u)||n==null||n.body.appendChild(u))},[u,n]),b.useEffect(()=>{l||r!==null&&f(r.current)},[r,f,l]),u}let wa=b.Fragment;function Ea(t,l){let r=t,n=b.useRef(null),u=wt(Ps(E=>{n.current=E}),l),f=wn(n),a=ya(n),[m]=b.useState(()=>{var E;return en.isServer?null:(E=f==null?void 0:f.createElement("div"))!=null?E:null}),v=b.useContext(go),x=kn();return nt(()=>{!a||!m||a.contains(m)||(m.setAttribute("data-headlessui-portal",""),a.appendChild(m))},[a,m]),nt(()=>{if(m&&v)return v.register(m)},[v,m]),Fl(()=>{var E;!a||!m||(m instanceof Node&&a.contains(m)&&a.removeChild(m),a.childNodes.length<=0&&((E=a.parentElement)==null||E.removeChild(a)))}),x?!a||!m?null:wr.createPortal(pt({ourProps:{ref:u},theirProps:r,defaultTag:wa,name:"Portal"}),m):null}let Sa=b.Fragment,Dl=b.createContext(null);function Ca(t,l){let{target:r,...n}=t,u={ref:wt(l)};return b.createElement(Dl.Provider,{value:r},pt({ourProps:u,theirProps:n,defaultTag:Sa,name:"Popover.Group"}))}let go=b.createContext(null);function ja(){let t=b.useContext(go),l=b.useRef([]),r=ee(f=>(l.current.push(f),t&&t.register(f),()=>n(f))),n=ee(f=>{let a=l.current.indexOf(f);a!==-1&&l.current.splice(a,1),t&&t.unregister(f)}),u=b.useMemo(()=>({register:r,unregister:n,portals:l}),[r,n,l]);return[l,b.useMemo(()=>function({children:f}){return b.createElement(go.Provider,{value:u},f)},[u])]}let Ta=mt(Ea),Oa=mt(Ca),bo=Object.assign(Ta,{Group:Oa});function Na(t,l){return t===l&&(t!==0||1/t===1/l)||t!==t&&l!==l}const Ia=typeof Object.is=="function"?Object.is:Na,{useState:ka,useEffect:Pa,useLayoutEffect:Fa,useDebugValue:Ma}=Y;function Ra(t,l,r){const n=l(),[{inst:u},f]=ka({inst:{value:n,getSnapshot:l}});return Fa(()=>{u.value=n,u.getSnapshot=l,xo(u)&&f({inst:u})},[t,n,l]),Pa(()=>(xo(u)&&f({inst:u}),t(()=>{xo(u)&&f({inst:u})})),[t]),Ma(n),n}function xo(t){const l=t.getSnapshot,r=t.value;try{const n=l();return!Ia(r,n)}catch{return!0}}function La(t,l,r){return l()}const Aa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Da=!Aa,$a=Da?La:Ra,_a="useSyncExternalStore"in Y?(t=>t.useSyncExternalStore)(Y):$a;function Ba(t){return _a(t.subscribe,t.getSnapshot,t.getSnapshot)}function za(t,l){let r=t(),n=new Set;return{getSnapshot(){return r},subscribe(u){return n.add(u),()=>n.delete(u)},dispatch(u,...f){let a=l[u].call(r,...f);a&&(r=a,n.forEach(m=>m()))}}}function Wa(){let t;return{before({doc:l}){var r;let n=l.documentElement;t=((r=l.defaultView)!=null?r:window).innerWidth-n.clientWidth},after({doc:l,d:r}){let n=l.documentElement,u=n.clientWidth-n.offsetWidth,f=t-u;r.style(n,"paddingRight",`${f}px`)}}}function Ha(){return bl()?{before({doc:t,d:l,meta:r}){function n(u){return r.containers.flatMap(f=>f()).some(f=>f.contains(u))}l.microTask(()=>{var u;if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let m=Wt();m.style(t.documentElement,"scrollBehavior","auto"),l.add(()=>l.microTask(()=>m.dispose()))}let f=(u=window.scrollY)!=null?u:window.pageYOffset,a=null;l.addEventListener(t,"click",m=>{if(m.target instanceof HTMLElement)try{let v=m.target.closest("a");if(!v)return;let{hash:x}=new URL(v.href),E=t.querySelector(x);E&&!n(E)&&(a=E)}catch{}},!0),l.addEventListener(t,"touchstart",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&n(v.parentElement);)v=v.parentElement;l.style(v,"overscrollBehavior","contain")}else l.style(m.target,"touchAction","none")}),l.addEventListener(t,"touchmove",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&v.dataset.headlessuiPortal!==""&&!(v.scrollHeight>v.clientHeight||v.scrollWidth>v.clientWidth);)v=v.parentElement;v.dataset.headlessuiPortal===""&&m.preventDefault()}else m.preventDefault()},{passive:!1}),l.add(()=>{var m;let v=(m=window.scrollY)!=null?m:window.pageYOffset;f!==v&&window.scrollTo(0,f),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function Ua(){return{before({doc:t,d:l}){l.style(t.documentElement,"overflow","hidden")}}}function Va(t){let l={};for(let r of t)Object.assign(l,r(l));return l}let Sn=za(()=>new Map,{PUSH(t,l){var r;let n=(r=this.get(t))!=null?r:{doc:t,count:0,d:Wt(),meta:new Set};return n.count++,n.meta.add(l),this.set(t,n),this},POP(t,l){let r=this.get(t);return r&&(r.count--,r.meta.delete(l)),this},SCROLL_PREVENT({doc:t,d:l,meta:r}){let n={doc:t,d:l,meta:Va(r)},u=[Ha(),Wa(),Ua()];u.forEach(({before:f})=>f==null?void 0:f(n)),u.forEach(({after:f})=>f==null?void 0:f(n))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});Sn.subscribe(()=>{let t=Sn.getSnapshot(),l=new Map;for(let[r]of t)l.set(r,r.documentElement.style.overflow);for(let r of t.values()){let n=l.get(r.doc)==="hidden",u=r.count!==0;(u&&!n||!u&&n)&&Sn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Sn.dispatch("TEARDOWN",r)}});function Za(t,l,r){let n=Ba(Sn),u=t?n.get(t):void 0,f=u?u.count>0:!1;return nt(()=>{if(!(!t||!l))return Sn.dispatch("PUSH",t,r),()=>Sn.dispatch("POP",t,r)},[l,t]),f}let yo=new Map,qn=new Map;function $l(t,l=!0){nt(()=>{var r;if(!l)return;let n=typeof t=="function"?t():t.current;if(!n)return;function u(){var a;if(!n)return;let m=(a=qn.get(n))!=null?a:1;if(m===1?qn.delete(n):qn.set(n,m-1),m!==1)return;let v=yo.get(n);v&&(v["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",v["aria-hidden"]),n.inert=v.inert,yo.delete(n))}let f=(r=qn.get(n))!=null?r:0;return qn.set(n,f+1),f!==0||(yo.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),u},[t,l])}function Ya({defaultContainers:t=[],portals:l,mainTreeNodeRef:r}={}){var n;let u=b.useRef((n=r==null?void 0:r.current)!=null?n:null),f=wn(u),a=ee(()=>{var m,v,x;let E=[];for(let k of t)k!==null&&(k instanceof HTMLElement?E.push(k):"current"in k&&k.current instanceof HTMLElement&&E.push(k.current));if(l!=null&&l.current)for(let k of l.current)E.push(k);for(let k of(m=f==null?void 0:f.querySelectorAll("html > *, body > *"))!=null?m:[])k!==document.body&&k!==document.head&&k instanceof HTMLElement&&k.id!=="headlessui-portal-root"&&(k.contains(u.current)||k.contains((x=(v=u.current)==null?void 0:v.getRootNode())==null?void 0:x.host)||E.some(R=>k.contains(R))||E.push(k));return E});return{resolveContainers:a,contains:ee(m=>a().some(v=>v.contains(m))),mainTreeNodeRef:u,MainTreeNode:b.useMemo(()=>function(){return r!=null?null:b.createElement(Hn,{features:Pn.Hidden,ref:u})},[u,r])}}let wo=b.createContext(()=>{});wo.displayName="StackContext";var Eo=(t=>(t[t.Add=0]="Add",t[t.Remove=1]="Remove",t))(Eo||{});function Ga(){return b.useContext(wo)}function qa({children:t,onUpdate:l,type:r,element:n,enabled:u}){let f=Ga(),a=ee((...m)=>{l==null||l(...m),f(...m)});return nt(()=>{let m=u===void 0||u===!0;return m&&a(0,r,n),()=>{m&&a(1,r,n)}},[a,r,n,u]),b.createElement(wo.Provider,{value:a},t)}let _l=b.createContext(null);function Bl(){let t=b.useContext(_l);if(t===null){let l=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,Bl),l}return t}function zl(){let[t,l]=b.useState([]);return[t.length>0?t.join(" "):void 0,b.useMemo(()=>function(r){let n=ee(f=>(l(a=>[...a,f]),()=>l(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=b.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return b.createElement(_l.Provider,{value:u},r.children)},[l])]}let Ka="p";function Xa(t,l){let r=Dt(),{id:n=`headlessui-description-${r}`,...u}=t,f=Bl(),a=wt(l);nt(()=>f.register(n),[n,f.register]);let m={ref:a,...f.props,id:n};return pt({ourProps:m,theirProps:u,slot:f.slot||{},defaultTag:Ka,name:f.name||"Description"})}let Ja=mt(Xa),Wl=Object.assign(Ja,{});var Qa=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Qa||{}),eu=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(eu||{});let tu={0(t,l){return t.titleId===l.id?t:{...t,titleId:l.id}}},Ir=b.createContext(null);Ir.displayName="DialogContext";function Kn(t){let l=b.useContext(Ir);if(l===null){let r=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Kn),r}return l}function nu(t,l,r=()=>[document.body]){Za(t,l,n=>{var u;return{containers:[...(u=n.containers)!=null?u:[],r]}})}function ru(t,l){return bt(l.type,tu,t,l)}let ou="div",lu=dn.RenderStrategy|dn.Static;function iu(t,l){let r=Dt(),{id:n=`headlessui-dialog-${r}`,open:u,onClose:f,initialFocus:a,role:m="dialog",__demoMode:v=!1,...x}=t,[E,k]=b.useState(0),R=b.useRef(!1);m=function(){return m==="dialog"||m==="alertdialog"?m:(R.current||(R.current=!0,console.warn(`Invalid role [${m}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let T=Un();u===void 0&&T!==null&&(u=(T&Ct.Open)===Ct.Open);let M=b.useRef(null),$=wt(M,l),P=wn(M),B=t.hasOwnProperty("open")||T!==null,_=t.hasOwnProperty("onClose");if(!B&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!B)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof u!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u}`);if(typeof f!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${f}`);let q=u?0:1,[te,re]=b.useReducer(ru,{titleId:null,descriptionId:null,panelRef:b.createRef()}),pe=ee(()=>f(!1)),Pe=ee(G=>re({type:0,id:G})),ke=kn()?v?!1:q===0:!1,Te=E>1,y=b.useContext(Ir)!==null,[me,Fe]=ja(),Be={get current(){var G;return(G=te.panelRef.current)!=null?G:M.current}},{resolveContainers:it,mainTreeNodeRef:U,MainTreeNode:Xe}=Ya({portals:me,defaultContainers:[Be]}),$e=Te?"parent":"leaf",ue=T!==null?(T&Ct.Closing)===Ct.Closing:!1,Oe=y||ue?!1:ke,Je=b.useCallback(()=>{var G,ge;return(ge=Array.from((G=P==null?void 0:P.querySelectorAll("body > *"))!=null?G:[]).find(Ce=>Ce.id==="headlessui-portal-root"?!1:Ce.contains(U.current)&&Ce instanceof HTMLElement))!=null?ge:null},[U]);$l(Je,Oe);let Et=Te?!0:ke,ut=b.useCallback(()=>{var G,ge;return(ge=Array.from((G=P==null?void 0:P.querySelectorAll("[data-headlessui-portal]"))!=null?G:[]).find(Ce=>Ce.contains(U.current)&&Ce instanceof HTMLElement))!=null?ge:null},[U]);$l(ut,Et),io(it,G=>{G.preventDefault(),pe()},!(!ke||Te));let ht=!(Te||q!==0);Pl(P==null?void 0:P.defaultView,"keydown",G=>{ht&&(G.defaultPrevented||G.key===Ge.Escape&&(G.preventDefault(),G.stopPropagation(),pe()))}),nu(P,!(ue||q!==0||y),it),b.useEffect(()=>{if(q!==0||!M.current)return;let G=new ResizeObserver(ge=>{for(let Ce of ge){let Ie=Ce.target.getBoundingClientRect();Ie.x===0&&Ie.y===0&&Ie.width===0&&Ie.height===0&&pe()}});return G.observe(M.current),()=>G.disconnect()},[q,M,pe]);let[Ne,Qe]=zl(),Ze=b.useMemo(()=>[{dialogState:q,close:pe,setTitleId:Pe},te],[q,te,pe,Pe]),le=b.useMemo(()=>({open:q===0}),[q]),Ee={ref:$,id:n,role:m,"aria-modal":q===0?!0:void 0,"aria-labelledby":te.titleId,"aria-describedby":Ne};return b.createElement(qa,{type:"Dialog",enabled:q===0,element:M,onUpdate:ee((G,ge)=>{ge==="Dialog"&&bt(G,{[Eo.Add]:()=>k(Ce=>Ce+1),[Eo.Remove]:()=>k(Ce=>Ce-1)})})},b.createElement(vo,{force:!0},b.createElement(bo,null,b.createElement(Ir.Provider,{value:Ze},b.createElement(bo.Group,{target:M},b.createElement(vo,{force:!1},b.createElement(Qe,{slot:le,name:"Dialog.Description"},b.createElement(Gn,{initialFocus:a,containers:it,features:ke?bt($e,{parent:Gn.features.RestoreFocus,leaf:Gn.features.All&~Gn.features.FocusLock}):Gn.features.None},b.createElement(Fe,null,pt({ourProps:Ee,theirProps:x,slot:le,defaultTag:ou,features:lu,visible:q===0,name:"Dialog"}))))))))),b.createElement(Xe,null))}let su="div";function au(t,l){let r=Dt(),{id:n=`headlessui-dialog-overlay-${r}`,...u}=t,[{dialogState:f,close:a}]=Kn("Dialog.Overlay"),m=wt(l),v=ee(E=>{if(E.target===E.currentTarget){if(Nr(E.currentTarget))return E.preventDefault();E.preventDefault(),E.stopPropagation(),a()}}),x=b.useMemo(()=>({open:f===0}),[f]);return pt({ourProps:{ref:m,id:n,"aria-hidden":!0,onClick:v},theirProps:u,slot:x,defaultTag:su,name:"Dialog.Overlay"})}let uu="div";function cu(t,l){let r=Dt(),{id:n=`headlessui-dialog-backdrop-${r}`,...u}=t,[{dialogState:f},a]=Kn("Dialog.Backdrop"),m=wt(l);b.useEffect(()=>{if(a.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let v=b.useMemo(()=>({open:f===0}),[f]);return b.createElement(vo,{force:!0},b.createElement(bo,null,pt({ourProps:{ref:m,id:n,"aria-hidden":!0},theirProps:u,slot:v,defaultTag:uu,name:"Dialog.Backdrop"})))}let du="div";function fu(t,l){let r=Dt(),{id:n=`headlessui-dialog-panel-${r}`,...u}=t,[{dialogState:f},a]=Kn("Dialog.Panel"),m=wt(l,a.panelRef),v=b.useMemo(()=>({open:f===0}),[f]),x=ee(E=>{E.stopPropagation()});return pt({ourProps:{ref:m,id:n,onClick:x},theirProps:u,slot:v,defaultTag:du,name:"Dialog.Panel"})}let pu="h2";function mu(t,l){let r=Dt(),{id:n=`headlessui-dialog-title-${r}`,...u}=t,[{dialogState:f,setTitleId:a}]=Kn("Dialog.Title"),m=wt(l);b.useEffect(()=>(a(n),()=>a(null)),[n,a]);let v=b.useMemo(()=>({open:f===0}),[f]);return pt({ourProps:{ref:m,id:n},theirProps:u,slot:v,defaultTag:pu,name:"Dialog.Title"})}let hu=mt(iu),vu=mt(cu),gu=mt(fu),bu=mt(au),xu=mt(mu),Hl=Object.assign(hu,{Backdrop:vu,Panel:gu,Overlay:bu,Title:xu,Description:Wl}),Ul=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Vl(t){var l,r;let n=(l=t.innerText)!=null?l:"",u=t.cloneNode(!0);if(!(u instanceof HTMLElement))return n;let f=!1;for(let m of u.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))m.remove(),f=!0;let a=f?(r=u.innerText)!=null?r:"":n;return Ul.test(a)&&(a=a.replace(Ul,"")),a}function yu(t){let l=t.getAttribute("aria-label");if(typeof l=="string")return l.trim();let r=t.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(u=>{let f=document.getElementById(u);if(f){let a=f.getAttribute("aria-label");return typeof a=="string"?a.trim():Vl(f).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return Vl(t).trim()}function wu(t){let l=b.useRef(""),r=b.useRef("");return ee(()=>{let n=t.current;if(!n)return"";let u=n.innerText;if(l.current===u)return r.current;let f=yu(n).trim().toLowerCase();return l.current=u,r.current=f,f})}var Eu=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Eu||{}),Su=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(Su||{}),Cu=(t=>(t[t.OpenMenu=0]="OpenMenu",t[t.CloseMenu=1]="CloseMenu",t[t.GoToItem=2]="GoToItem",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterItem=5]="RegisterItem",t[t.UnregisterItem=6]="UnregisterItem",t))(Cu||{});function So(t,l=r=>r){let r=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,n=lo(l(t.items.slice()),f=>f.dataRef.current.domRef.current),u=r?n.indexOf(r):null;return u===-1&&(u=null),{items:n,activeItemIndex:u}}let ju={1(t){return t.menuState===1?t:{...t,activeItemIndex:null,menuState:1}},0(t){return t.menuState===0?t:{...t,__demoMode:!1,menuState:0}},2:(t,l)=>{var r;let n=So(t),u=fo(l,{resolveItems:()=>n.items,resolveActiveIndex:()=>n.activeItemIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});return{...t,...n,searchQuery:"",activeItemIndex:u,activationTrigger:(r=l.trigger)!=null?r:1}},3:(t,l)=>{let r=t.searchQuery!==""?0:1,n=t.searchQuery+l.value.toLowerCase(),u=(t.activeItemIndex!==null?t.items.slice(t.activeItemIndex+r).concat(t.items.slice(0,t.activeItemIndex+r)):t.items).find(a=>{var m;return((m=a.dataRef.current.textValue)==null?void 0:m.startsWith(n))&&!a.dataRef.current.disabled}),f=u?t.items.indexOf(u):-1;return f===-1||f===t.activeItemIndex?{...t,searchQuery:n}:{...t,searchQuery:n,activeItemIndex:f,activationTrigger:1}},4(t){return t.searchQuery===""?t:{...t,searchQuery:"",searchActiveItemIndex:null}},5:(t,l)=>{let r=So(t,n=>[...n,{id:l.id,dataRef:l.dataRef}]);return{...t,...r}},6:(t,l)=>{let r=So(t,n=>{let u=n.findIndex(f=>f.id===l.id);return u!==-1&&n.splice(u,1),n});return{...t,...r,activationTrigger:1}}},Co=b.createContext(null);Co.displayName="MenuContext";function kr(t){let l=b.useContext(Co);if(l===null){let r=new Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,kr),r}return l}function Tu(t,l){return bt(l.type,ju,t,l)}let Ou=b.Fragment;function Nu(t,l){let{__demoMode:r=!1,...n}=t,u=b.useReducer(Tu,{__demoMode:r,menuState:r?0:1,buttonRef:b.createRef(),itemsRef:b.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:f,itemsRef:a,buttonRef:m},v]=u,x=wt(l);io([m,a],(T,M)=>{var $;v({type:1}),oo(M,ro.Loose)||(T.preventDefault(),($=m.current)==null||$.focus())},f===0);let E=ee(()=>{v({type:1})}),k=b.useMemo(()=>({open:f===0,close:E}),[f,E]),R={ref:x};return b.createElement(Co.Provider,{value:u},b.createElement(co,{value:bt(f,{0:Ct.Open,1:Ct.Closed})},pt({ourProps:R,theirProps:n,slot:k,defaultTag:Ou,name:"Menu"})))}let Iu="button";function ku(t,l){var r;let n=Dt(),{id:u=`headlessui-menu-button-${n}`,...f}=t,[a,m]=kr("Menu.Button"),v=wt(a.buttonRef,l),x=tn(),E=ee($=>{switch($.key){case Ge.Space:case Ge.Enter:case Ge.ArrowDown:$.preventDefault(),$.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:rt.First}));break;case Ge.ArrowUp:$.preventDefault(),$.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:rt.Last}));break}}),k=ee($=>{switch($.key){case Ge.Space:$.preventDefault();break}}),R=ee($=>{if(Nr($.currentTarget))return $.preventDefault();t.disabled||(a.menuState===0?(m({type:1}),x.nextFrame(()=>{var P;return(P=a.buttonRef.current)==null?void 0:P.focus({preventScroll:!0})})):($.preventDefault(),m({type:0})))}),T=b.useMemo(()=>({open:a.menuState===0}),[a]),M={ref:v,id:u,type:so(t,a.buttonRef),"aria-haspopup":"menu","aria-controls":(r=a.itemsRef.current)==null?void 0:r.id,"aria-expanded":a.menuState===0,onKeyDown:E,onKeyUp:k,onClick:R};return pt({ourProps:M,theirProps:f,slot:T,defaultTag:Iu,name:"Menu.Button"})}let Pu="div",Fu=dn.RenderStrategy|dn.Static;function Mu(t,l){var r,n;let u=Dt(),{id:f=`headlessui-menu-items-${u}`,...a}=t,[m,v]=kr("Menu.Items"),x=wt(m.itemsRef,l),E=wn(m.itemsRef),k=tn(),R=Un(),T=R!==null?(R&Ct.Open)===Ct.Open:m.menuState===0;b.useEffect(()=>{let _=m.itemsRef.current;_&&m.menuState===0&&_!==(E==null?void 0:E.activeElement)&&_.focus({preventScroll:!0})},[m.menuState,m.itemsRef,E]),jl({container:m.itemsRef.current,enabled:m.menuState===0,accept(_){return _.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:_.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(_){_.setAttribute("role","none")}});let M=ee(_=>{var q,te;switch(k.dispose(),_.key){case Ge.Space:if(m.searchQuery!=="")return _.preventDefault(),_.stopPropagation(),v({type:3,value:_.key});case Ge.Enter:if(_.preventDefault(),_.stopPropagation(),v({type:1}),m.activeItemIndex!==null){let{dataRef:re}=m.items[m.activeItemIndex];(te=(q=re.current)==null?void 0:q.domRef.current)==null||te.click()}gl(m.buttonRef.current);break;case Ge.ArrowDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.Next});case Ge.ArrowUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.Previous});case Ge.Home:case Ge.PageUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.First});case Ge.End:case Ge.PageDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.Last});case Ge.Escape:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{var re;return(re=m.buttonRef.current)==null?void 0:re.focus({preventScroll:!0})});break;case Ge.Tab:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{Is(m.buttonRef.current,_.shiftKey?nn.Previous:nn.Next)});break;default:_.key.length===1&&(v({type:3,value:_.key}),k.setTimeout(()=>v({type:4}),350));break}}),$=ee(_=>{switch(_.key){case Ge.Space:_.preventDefault();break}}),P=b.useMemo(()=>({open:m.menuState===0}),[m]),B={"aria-activedescendant":m.activeItemIndex===null||(r=m.items[m.activeItemIndex])==null?void 0:r.id,"aria-labelledby":(n=m.buttonRef.current)==null?void 0:n.id,id:f,onKeyDown:M,onKeyUp:$,role:"menu",tabIndex:0,ref:x};return pt({ourProps:B,theirProps:a,slot:P,defaultTag:Pu,features:Fu,visible:T,name:"Menu.Items"})}let Ru=b.Fragment;function Lu(t,l){let r=Dt(),{id:n=`headlessui-menu-item-${r}`,disabled:u=!1,...f}=t,[a,m]=kr("Menu.Item"),v=a.activeItemIndex!==null?a.items[a.activeItemIndex].id===n:!1,x=b.useRef(null),E=wt(l,x);nt(()=>{if(a.__demoMode||a.menuState!==0||!v||a.activationTrigger===0)return;let re=Wt();return re.requestAnimationFrame(()=>{var pe,Pe;(Pe=(pe=x.current)==null?void 0:pe.scrollIntoView)==null||Pe.call(pe,{block:"nearest"})}),re.dispose},[a.__demoMode,x,v,a.menuState,a.activationTrigger,a.activeItemIndex]);let k=wu(x),R=b.useRef({disabled:u,domRef:x,get textValue(){return k()}});nt(()=>{R.current.disabled=u},[R,u]),nt(()=>(m({type:5,id:n,dataRef:R}),()=>m({type:6,id:n})),[R,n]);let T=ee(()=>{m({type:1})}),M=ee(re=>{if(u)return re.preventDefault();m({type:1}),gl(a.buttonRef.current)}),$=ee(()=>{if(u)return m({type:2,focus:rt.Nothing});m({type:2,focus:rt.Specific,id:n})}),P=Cl(),B=ee(re=>P.update(re)),_=ee(re=>{P.wasMoved(re)&&(u||v||m({type:2,focus:rt.Specific,id:n,trigger:0}))}),q=ee(re=>{P.wasMoved(re)&&(u||v&&m({type:2,focus:rt.Nothing}))}),te=b.useMemo(()=>({active:v,disabled:u,close:T}),[v,u,T]);return pt({ourProps:{id:n,ref:E,role:"menuitem",tabIndex:u===!0?void 0:-1,"aria-disabled":u===!0?!0:void 0,disabled:void 0,onClick:M,onFocus:$,onPointerEnter:B,onMouseEnter:B,onPointerMove:_,onMouseMove:_,onPointerLeave:q,onMouseLeave:q},theirProps:f,slot:te,defaultTag:Ru,name:"Menu.Item"})}let Au=mt(Nu),Du=mt(ku),$u=mt(Mu),_u=mt(Lu),Pr=Object.assign(Au,{Button:Du,Items:$u,Item:_u}),Zl=b.createContext(null);function Yl(){let t=b.useContext(Zl);if(t===null){let l=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,Yl),l}return t}function Bu(){let[t,l]=b.useState([]);return[t.length>0?t.join(" "):void 0,b.useMemo(()=>function(r){let n=ee(f=>(l(a=>[...a,f]),()=>l(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=b.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return b.createElement(Zl.Provider,{value:u},r.children)},[l])]}let zu="label";function Wu(t,l){let r=Dt(),{id:n=`headlessui-label-${r}`,passive:u=!1,...f}=t,a=Yl(),m=wt(l);nt(()=>a.register(n),[n,a.register]);let v={ref:m,...a.props,id:n};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in f&&delete f.onClick),pt({ourProps:v,theirProps:f,slot:a.slot||{},defaultTag:zu,name:a.name||"Label"})}let Hu=mt(Wu),Uu=Object.assign(Hu,{});function Vu(t=0){let[l,r]=b.useState(t),n=Zn(),u=b.useCallback(v=>{n.current&&r(x=>x|v)},[l,n]),f=b.useCallback(v=>!!(l&v),[l]),a=b.useCallback(v=>{n.current&&r(x=>x&~v)},[r,n]),m=b.useCallback(v=>{n.current&&r(x=>x^v)},[r]);return{flags:l,addFlag:u,hasFlag:f,removeFlag:a,toggleFlag:m}}let jo=b.createContext(null);jo.displayName="GroupContext";let Zu=b.Fragment;function Yu(t){var l;let[r,n]=b.useState(null),[u,f]=Bu(),[a,m]=zl(),v=b.useMemo(()=>({switch:r,setSwitch:n,labelledby:u,describedby:a}),[r,n,u,a]),x={},E=t;return b.createElement(m,{name:"Switch.Description"},b.createElement(f,{name:"Switch.Label",props:{htmlFor:(l=v.switch)==null?void 0:l.id,onClick(k){r&&(k.currentTarget.tagName==="LABEL"&&k.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},b.createElement(jo.Provider,{value:v},pt({ourProps:x,theirProps:E,defaultTag:Zu,name:"Switch.Group"}))))}let Gu="button";function qu(t,l){var r;let n=Dt(),{id:u=`headlessui-switch-${n}`,checked:f,defaultChecked:a=!1,onChange:m,disabled:v=!1,name:x,value:E,form:k,...R}=t,T=b.useContext(jo),M=b.useRef(null),$=wt(M,l,T===null?null:T.setSwitch),[P,B]=pl(f,m,a),_=ee(()=>B==null?void 0:B(!P)),q=ee(Te=>{if(Nr(Te.currentTarget))return Te.preventDefault();Te.preventDefault(),_()}),te=ee(Te=>{Te.key===Ge.Space?(Te.preventDefault(),_()):Te.key===Ge.Enter&&$s(Te.currentTarget)}),re=ee(Te=>Te.preventDefault()),pe=b.useMemo(()=>({checked:P}),[P]),Pe={id:u,ref:$,role:"switch",type:so(t,M),tabIndex:t.tabIndex===-1?0:(r=t.tabIndex)!=null?r:0,"aria-checked":P,"aria-labelledby":T==null?void 0:T.labelledby,"aria-describedby":T==null?void 0:T.describedby,disabled:v,onClick:q,onKeyUp:te,onKeyPress:re},ke=tn();return b.useEffect(()=>{var Te;let y=(Te=M.current)==null?void 0:Te.closest("form");y&&a!==void 0&&ke.addEventListener(y,"reset",()=>{B(a)})},[M,B]),b.createElement(b.Fragment,null,x!=null&&P&&b.createElement(Hn,{features:Pn.Hidden,...Or({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:v,form:k,checked:P,name:x,value:E})}),pt({ourProps:Pe,theirProps:R,slot:pe,defaultTag:Gu,name:"Switch"}))}let Ku=mt(qu),Xu=Yu,Ju=Object.assign(Ku,{Group:Xu,Label:Uu,Description:Wl});function Qu(t){let l={called:!1};return(...r)=>{if(!l.called)return l.called=!0,t(...r)}}function To(t,...l){t&&l.length>0&&t.classList.add(...l)}function Oo(t,...l){t&&l.length>0&&t.classList.remove(...l)}function ec(t,l){let r=Wt();if(!t)return r.dispose;let{transitionDuration:n,transitionDelay:u}=getComputedStyle(t),[f,a]=[n,u].map(v=>{let[x=0]=v.split(",").filter(Boolean).map(E=>E.includes("ms")?parseFloat(E):parseFloat(E)*1e3).sort((E,k)=>k-E);return x}),m=f+a;if(m!==0){r.group(x=>{x.setTimeout(()=>{l(),x.dispose()},m),x.addEventListener(t,"transitionrun",E=>{E.target===E.currentTarget&&x.dispose()})});let v=r.addEventListener(t,"transitionend",x=>{x.target===x.currentTarget&&(l(),v())})}else l();return r.add(()=>l()),r.dispose}function tc(t,l,r,n){let u=r?"enter":"leave",f=Wt(),a=n!==void 0?Qu(n):()=>{};u==="enter"&&(t.removeAttribute("hidden"),t.style.display="");let m=bt(u,{enter:()=>l.enter,leave:()=>l.leave}),v=bt(u,{enter:()=>l.enterTo,leave:()=>l.leaveTo}),x=bt(u,{enter:()=>l.enterFrom,leave:()=>l.leaveFrom});return Oo(t,...l.base,...l.enter,...l.enterTo,...l.enterFrom,...l.leave,...l.leaveFrom,...l.leaveTo,...l.entered),To(t,...l.base,...m,...x),f.nextFrame(()=>{Oo(t,...l.base,...m,...x),To(t,...l.base,...m,...v),ec(t,()=>(Oo(t,...l.base,...m),To(t,...l.base,...l.entered),a()))}),f.dispose}function nc({immediate:t,container:l,direction:r,classes:n,onStart:u,onStop:f}){let a=Zn(),m=tn(),v=Vt(r);nt(()=>{t&&(v.current="enter")},[t]),nt(()=>{let x=Wt();m.add(x.dispose);let E=l.current;if(E&&v.current!=="idle"&&a.current)return x.dispose(),u.current(v.current),x.add(tc(E,n.current,v.current==="enter",()=>{x.dispose(),f.current(v.current)})),x.dispose},[r])}function pn(t=""){return t.split(/\s+/).filter(l=>l.length>1)}let Fr=b.createContext(null);Fr.displayName="TransitionContext";var rc=(t=>(t.Visible="visible",t.Hidden="hidden",t))(rc||{});function oc(){let t=b.useContext(Fr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function lc(){let t=b.useContext(Mr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let Mr=b.createContext(null);Mr.displayName="NestingContext";function Rr(t){return"children"in t?Rr(t.children):t.current.filter(({el:l})=>l.current!==null).filter(({state:l})=>l==="visible").length>0}function Gl(t,l){let r=Vt(t),n=b.useRef([]),u=Zn(),f=tn(),a=ee((T,M=fn.Hidden)=>{let $=n.current.findIndex(({el:P})=>P===T);$!==-1&&(bt(M,{[fn.Unmount](){n.current.splice($,1)},[fn.Hidden](){n.current[$].state="hidden"}}),f.microTask(()=>{var P;!Rr(n)&&u.current&&((P=r.current)==null||P.call(r))}))}),m=ee(T=>{let M=n.current.find(({el:$})=>$===T);return M?M.state!=="visible"&&(M.state="visible"):n.current.push({el:T,state:"visible"}),()=>a(T,fn.Unmount)}),v=b.useRef([]),x=b.useRef(Promise.resolve()),E=b.useRef({enter:[],leave:[],idle:[]}),k=ee((T,M,$)=>{v.current.splice(0),l&&(l.chains.current[M]=l.chains.current[M].filter(([P])=>P!==T)),l==null||l.chains.current[M].push([T,new Promise(P=>{v.current.push(P)})]),l==null||l.chains.current[M].push([T,new Promise(P=>{Promise.all(E.current[M].map(([B,_])=>_)).then(()=>P())})]),M==="enter"?x.current=x.current.then(()=>l==null?void 0:l.wait.current).then(()=>$(M)):$(M)}),R=ee((T,M,$)=>{Promise.all(E.current[M].splice(0).map(([P,B])=>B)).then(()=>{var P;(P=v.current.shift())==null||P()}).then(()=>$(M))});return b.useMemo(()=>({children:n,register:m,unregister:a,onStart:k,onStop:R,wait:x,chains:E}),[m,a,n,k,R,E,x])}function ic(){}let sc=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ql(t){var l;let r={};for(let n of sc)r[n]=(l=t[n])!=null?l:ic;return r}function ac(t){let l=b.useRef(ql(t));return b.useEffect(()=>{l.current=ql(t)},[t]),l}let uc="div",Kl=dn.RenderStrategy;function cc(t,l){var r,n;let{beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m,enter:v,enterFrom:x,enterTo:E,entered:k,leave:R,leaveFrom:T,leaveTo:M,...$}=t,P=b.useRef(null),B=wt(P,l),_=(r=$.unmount)==null||r?fn.Unmount:fn.Hidden,{show:q,appear:te,initial:re}=oc(),[pe,Pe]=b.useState(q?"visible":"hidden"),ke=lc(),{register:Te,unregister:y}=ke;b.useEffect(()=>Te(P),[Te,P]),b.useEffect(()=>{if(_===fn.Hidden&&P.current){if(q&&pe!=="visible"){Pe("visible");return}return bt(pe,{hidden:()=>y(P),visible:()=>Te(P)})}},[pe,P,Te,y,q,_]);let me=Vt({base:pn($.className),enter:pn(v),enterFrom:pn(x),enterTo:pn(E),entered:pn(k),leave:pn(R),leaveFrom:pn(T),leaveTo:pn(M)}),Fe=ac({beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m}),Be=kn();b.useEffect(()=>{if(Be&&pe==="visible"&&P.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[P,pe,Be]);let it=re&&!te,U=te&&q&&re,Xe=!Be||it?"idle":q?"enter":"leave",$e=Vu(0),ue=ee(ht=>bt(ht,{enter:()=>{$e.addFlag(Ct.Opening),Fe.current.beforeEnter()},leave:()=>{$e.addFlag(Ct.Closing),Fe.current.beforeLeave()},idle:()=>{}})),Oe=ee(ht=>bt(ht,{enter:()=>{$e.removeFlag(Ct.Opening),Fe.current.afterEnter()},leave:()=>{$e.removeFlag(Ct.Closing),Fe.current.afterLeave()},idle:()=>{}})),Je=Gl(()=>{Pe("hidden"),y(P)},ke),Et=b.useRef(!1);nc({immediate:U,container:P,classes:me,direction:Xe,onStart:Vt(ht=>{Et.current=!0,Je.onStart(P,ht,ue)}),onStop:Vt(ht=>{Et.current=!1,Je.onStop(P,ht,Oe),ht==="leave"&&!Rr(Je)&&(Pe("hidden"),y(P))})});let ut=$,kt={ref:B};return U?ut={...ut,className:jr($.className,...me.current.enter,...me.current.enterFrom)}:Et.current&&(ut.className=jr($.className,(n=P.current)==null?void 0:n.className),ut.className===""&&delete ut.className),b.createElement(Mr.Provider,{value:Je},b.createElement(co,{value:bt(pe,{visible:Ct.Open,hidden:Ct.Closed})|$e.flags},pt({ourProps:kt,theirProps:ut,defaultTag:uc,features:Kl,visible:pe==="visible",name:"Transition.Child"})))}function dc(t,l){let{show:r,appear:n=!1,unmount:u=!0,...f}=t,a=b.useRef(null),m=wt(a,l);kn();let v=Un();if(r===void 0&&v!==null&&(r=(v&Ct.Open)===Ct.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[x,E]=b.useState(r?"visible":"hidden"),k=Gl(()=>{E("hidden")}),[R,T]=b.useState(!0),M=b.useRef([r]);nt(()=>{R!==!1&&M.current[M.current.length-1]!==r&&(M.current.push(r),T(!1))},[M,r]);let $=b.useMemo(()=>({show:r,appear:n,initial:R}),[r,n,R]);b.useEffect(()=>{if(r)E("visible");else if(!Rr(k))E("hidden");else{let q=a.current;if(!q)return;let te=q.getBoundingClientRect();te.x===0&&te.y===0&&te.width===0&&te.height===0&&E("hidden")}},[r,k]);let P={unmount:u},B=ee(()=>{var q;R&&T(!1),(q=t.beforeEnter)==null||q.call(t)}),_=ee(()=>{var q;R&&T(!1),(q=t.beforeLeave)==null||q.call(t)});return b.createElement(Mr.Provider,{value:k},b.createElement(Fr.Provider,{value:$},pt({ourProps:{...P,as:b.Fragment,children:b.createElement(Xl,{ref:m,...P,...f,beforeEnter:B,beforeLeave:_})},theirProps:{},defaultTag:b.Fragment,features:Kl,visible:x==="visible",name:"Transition"})))}function fc(t,l){let r=b.useContext(Fr)!==null,n=Un()!==null;return b.createElement(b.Fragment,null,!r&&n?b.createElement(No,{ref:l,...t}):b.createElement(Xl,{ref:l,...t}))}let No=mt(dc),Xl=mt(cc),pc=mt(fc),Cn=Object.assign(No,{Child:pc,Root:No});function mc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const hc=Y.forwardRef(mc);function vc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const gc=Y.forwardRef(vc);function bc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const xc=Y.forwardRef(bc);function yc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const wc=Y.forwardRef(yc);function Ec({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Jl=Y.forwardRef(Ec);function Sc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Cc=Y.forwardRef(Sc);function jc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const Tc=Y.forwardRef(jc);function Oc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const Nc=Y.forwardRef(Oc),Ic={warning:{color:"bg-yellow-50",icon:j.jsx(Cc,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:j.jsx(Nc,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:j.jsx(xc,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:j.jsx(Tc,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},kc=({type:t="info",title:l,message:r,active:n=!1,time:u=1e3,onClose:f})=>{const[a,m]=b.useState(!1),v=b.useRef(null);b.useEffect(()=>(n&&(m(!0),v.current=setTimeout(()=>{m(!1),f&&f()},u)),()=>clearTimeout(v.current)),[n,u,f]);const x=Ic[t];return a?j.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:j.jsx(Cn,{as:b.Fragment,show:a,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:j.jsxs("div",{className:se("rounded-md p-4 text-center",x.color),children:[j.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[x.icon,j.jsx("h3",{className:se("text-sm font-medium ml-3",x.colorTitle),children:l})]}),j.jsx("div",{className:se("mt-2 text-sm",x.colorText),children:j.jsx("p",{children:r})})]})})}):null};function Pc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const Fc=Y.forwardRef(Pc);function Mc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const Rc=Y.forwardRef(Mc);function Lc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),Y.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const Ac=Y.forwardRef(Lc);function Dc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const $c=Y.forwardRef(Dc);function _c({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const Bc=Y.forwardRef(_c);function zc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Wc=Y.forwardRef(zc),Hc=({src:t,alt:l,width:r,height:n,className:u="",classNameIcon:f="",isIcon:a=!0,acronym:m=""})=>{function v(){if(typeof m!="string")return m;const x=m.toLowerCase(),E=x.split(" "),k=E[E.length-1];return x.charAt(0)+k.charAt(0)}return j.jsx(j.Fragment,{children:t?j.jsx("img",{src:t,alt:l,width:r,height:n,className:se(u!==""&&u),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:x=>x.currentTarget.style.filter="none","data-testid":"img"}):a?j.jsx(Bc,{className:se("bg-white text-default-5",f!==""?f:"w-7 h-7")}):j.jsx("div",{className:se("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",f!==""?f:"w-7 h-7"),children:v()})})},Uc=({steps:t,onClick:l})=>{const[r,n]=b.useState(0),u=f=>{n(f),l(f)};return j.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:j.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(t).fill(1).map((f,a)=>j.jsx("li",{children:r!==a?j.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>u(a),"data-testid":`step-${a}`,children:j.jsx("span",{className:"sr-only",children:"step"})}):j.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[j.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:j.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),j.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),j.jsx("span",{className:"sr-only",children:"step"})]})},a))})})};var Ql={exports:{}};/*!
|
|
31
|
+
`));let R=E.props,T=typeof(R==null?void 0:R.className)=="function"?(...$)=>jr(R==null?void 0:R.className(...$),v.className):jr(R==null?void 0:R.className,v.className),M=T?{className:T}:{};return b.cloneElement(E,Object.assign({},Tl(E.props,Or(ao(v,["ref"]))),k,x,{ref:u(E.ref,x.ref)},M))}return b.createElement(f,Object.assign({},ao(v,["ref"]),f!==b.Fragment&&x,f!==b.Fragment&&k),E)}function Fs(...t){return t.every(l=>l==null)?void 0:l=>{for(let r of t)r!=null&&(typeof r=="function"?r(l):r.current=l)}}function Tl(...t){if(t.length===0)return{};if(t.length===1)return t[0];let l={},r={};for(let n of t)for(let u in n)u.startsWith("on")&&typeof n[u]=="function"?(r[u]!=null||(r[u]=[]),r[u].push(n[u])):l[u]=n[u];if(l.disabled||l["aria-disabled"])return Object.assign(l,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(l,{[n](u,...f){let a=r[n];for(let m of a){if((u instanceof Event||(u==null?void 0:u.nativeEvent)instanceof Event)&&u.defaultPrevented)return;m(u,...f)}}});return l}function mt(t){var l;return Object.assign(b.forwardRef(t),{displayName:(l=t.displayName)!=null?l:t.name})}function Or(t){let l=Object.assign({},t);for(let r in l)l[r]===void 0&&delete l[r];return l}function ao(t,l=[]){let r=Object.assign({},t);for(let n of l)n in r&&delete r[n];return r}let Ms="div";var Pn=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(Pn||{});function Rs(t,l){var r;let{features:n=1,...u}=t,f={ref:l,"aria-hidden":(n&2)===2?!0:(r=u["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return pt({ourProps:f,theirProps:u,slot:{},defaultTag:Ms,name:"Hidden"})}let Hn=mt(Rs),uo=b.createContext(null);uo.displayName="OpenClosedContext";var Ct=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(Ct||{});function Un(){return b.useContext(uo)}function co({value:t,children:l}){return b.createElement(uo.Provider,{value:t},l)}function Ls(t){function l(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let qt=[];Ls(()=>{function t(l){l.target instanceof HTMLElement&&l.target!==document.body&&qt[0]!==l.target&&(qt.unshift(l.target),qt=qt.filter(r=>r!=null&&r.isConnected),qt.splice(10))}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function Nr(t){let l=t.parentElement,r=null;for(;l&&!(l instanceof HTMLFieldSetElement);)l instanceof HTMLLegendElement&&(r=l),l=l.parentElement;let n=(l==null?void 0:l.getAttribute("disabled"))==="";return n&&As(r)?!1:n}function As(t){if(!t)return!1;let l=t.previousElementSibling;for(;l!==null;){if(l instanceof HTMLLegendElement)return!1;l=l.previousElementSibling}return!0}function Ds(t){throw new Error("Unexpected object: "+t)}var rt=(t=>(t[t.First=0]="First",t[t.Previous=1]="Previous",t[t.Next=2]="Next",t[t.Last=3]="Last",t[t.Specific=4]="Specific",t[t.Nothing=5]="Nothing",t))(rt||{});function fo(t,l){let r=l.resolveItems();if(r.length<=0)return null;let n=l.resolveActiveIndex(),u=n??-1;switch(t.focus){case 0:{for(let f=0;f<r.length;++f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 1:{for(let f=u-1;f>=0;--f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 2:{for(let f=u+1;f<r.length;++f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 3:{for(let f=r.length-1;f>=0;--f)if(!l.resolveDisabled(r[f],f,r))return f;return n}case 4:{for(let f=0;f<r.length;++f)if(l.resolveId(r[f],f,r)===t.id)return f;return n}case 5:return null;default:Ds(t)}}function Ol(t={},l=null,r=[]){for(let[n,u]of Object.entries(t))Il(r,Nl(l,n),u);return r}function Nl(t,l){return t?t+"["+l+"]":l}function Il(t,l,r){if(Array.isArray(r))for(let[n,u]of r.entries())Il(t,Nl(l,n.toString()),u);else r instanceof Date?t.push([l,r.toISOString()]):typeof r=="boolean"?t.push([l,r?"1":"0"]):typeof r=="string"?t.push([l,r]):typeof r=="number"?t.push([l,`${r}`]):r==null?t.push([l,""]):Ol(r,l,t)}function $s(t){var l,r;let n=(l=t==null?void 0:t.form)!=null?l:t.closest("form");if(n){for(let u of n.elements)if(u!==t&&(u.tagName==="INPUT"&&u.type==="submit"||u.tagName==="BUTTON"&&u.type==="submit"||u.nodeName==="INPUT"&&u.type==="image")){u.click();return}(r=n.requestSubmit)==null||r.call(n)}}var Ge=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(Ge||{}),_s=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(_s||{}),Bs=(t=>(t[t.Single=0]="Single",t[t.Multi=1]="Multi",t))(Bs||{}),zs=(t=>(t[t.Pointer=0]="Pointer",t[t.Focus=1]="Focus",t[t.Other=2]="Other",t))(zs||{}),Ws=(t=>(t[t.OpenCombobox=0]="OpenCombobox",t[t.CloseCombobox=1]="CloseCombobox",t[t.GoToOption=2]="GoToOption",t[t.RegisterOption=3]="RegisterOption",t[t.UnregisterOption=4]="UnregisterOption",t[t.RegisterLabel=5]="RegisterLabel",t[t.SetActivationTrigger=6]="SetActivationTrigger",t[t.UpdateVirtualOptions=7]="UpdateVirtualOptions",t))(Ws||{});function po(t,l=r=>r){let r=t.activeOptionIndex!==null?t.options[t.activeOptionIndex]:null,n=l(t.options.slice()),u=n.length>0&&n[0].dataRef.current.order!==null?n.sort((a,m)=>a.dataRef.current.order-m.dataRef.current.order):lo(n,a=>a.dataRef.current.domRef.current),f=r?u.indexOf(r):null;return f===-1&&(f=null),{options:u,activeOptionIndex:f}}let Hs={1(t){var l;return(l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===1?t:{...t,activeOptionIndex:null,comboboxState:1}},0(t){var l,r;if((l=t.dataRef.current)!=null&&l.disabled||t.comboboxState===0)return t;if((r=t.dataRef.current)!=null&&r.value){let n=t.dataRef.current.calculateIndex(t.dataRef.current.value);if(n!==-1)return{...t,activeOptionIndex:n,comboboxState:0}}return{...t,comboboxState:0}},2(t,l){var r,n,u,f,a;if((r=t.dataRef.current)!=null&&r.disabled||(n=t.dataRef.current)!=null&&n.optionsRef.current&&!((u=t.dataRef.current)!=null&&u.optionsPropsRef.current.static)&&t.comboboxState===1)return t;if(t.virtual){let E=l.focus===rt.Specific?l.idx:fo(l,{resolveItems:()=>t.virtual.options,resolveActiveIndex:()=>{var R,T;return(T=(R=t.activeOptionIndex)!=null?R:t.virtual.options.findIndex(M=>!t.virtual.disabled(M)))!=null?T:null},resolveDisabled:t.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),k=(f=l.trigger)!=null?f:2;return t.activeOptionIndex===E&&t.activationTrigger===k?t:{...t,activeOptionIndex:E,activationTrigger:k}}let m=po(t);if(m.activeOptionIndex===null){let E=m.options.findIndex(k=>!k.dataRef.current.disabled);E!==-1&&(m.activeOptionIndex=E)}let v=l.focus===rt.Specific?l.idx:fo(l,{resolveItems:()=>m.options,resolveActiveIndex:()=>m.activeOptionIndex,resolveId:E=>E.id,resolveDisabled:E=>E.dataRef.current.disabled}),x=(a=l.trigger)!=null?a:2;return t.activeOptionIndex===v&&t.activationTrigger===x?t:{...t,...m,activeOptionIndex:v,activationTrigger:x}},3:(t,l)=>{var r,n,u;if((r=t.dataRef.current)!=null&&r.virtual)return{...t,options:[...t.options,l.payload]};let f=l.payload,a=po(t,v=>(v.push(f),v));t.activeOptionIndex===null&&(n=t.dataRef.current)!=null&&n.isSelected(l.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(f));let m={...t,...a,activationTrigger:2};return(u=t.dataRef.current)!=null&&u.__demoMode&&t.dataRef.current.value===void 0&&(m.activeOptionIndex=0),m},4:(t,l)=>{var r;if((r=t.dataRef.current)!=null&&r.virtual)return{...t,options:t.options.filter(u=>u.id!==l.id)};let n=po(t,u=>{let f=u.findIndex(a=>a.id===l.id);return f!==-1&&u.splice(f,1),u});return{...t,...n,activationTrigger:2}},5:(t,l)=>t.labelId===l.id?t:{...t,labelId:l.id},6:(t,l)=>t.activationTrigger===l.trigger?t:{...t,activationTrigger:l.trigger},7:(t,l)=>{var r;if(((r=t.virtual)==null?void 0:r.options)===l.options)return t;let n=t.activeOptionIndex;if(t.activeOptionIndex!==null){let u=l.options.indexOf(t.virtual.options[t.activeOptionIndex]);u!==-1?n=u:n=null}return{...t,activeOptionIndex:n,virtual:Object.assign({},t.virtual,{options:l.options})}}},mo=b.createContext(null);mo.displayName="ComboboxActionsContext";function Vn(t){let l=b.useContext(mo);if(l===null){let r=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Vn),r}return l}let kl=b.createContext(null);function Us(t){var l;let r=En("VirtualProvider"),[n,u]=b.useMemo(()=>{let v=r.optionsRef.current;if(!v)return[0,0];let x=window.getComputedStyle(v);return[parseFloat(x.paddingBlockStart||x.paddingTop),parseFloat(x.paddingBlockEnd||x.paddingBottom)]},[r.optionsRef.current]),f=ys({scrollPaddingStart:n,scrollPaddingEnd:u,count:r.virtual.options.length,estimateSize(){return 40},getScrollElement(){var v;return(v=r.optionsRef.current)!=null?v:null},overscan:12}),[a,m]=b.useState(0);return nt(()=>{m(v=>v+1)},[(l=r.virtual)==null?void 0:l.options]),b.createElement(kl.Provider,{value:f},b.createElement("div",{style:{position:"relative",width:"100%",height:`${f.getTotalSize()}px`},ref:v=>{if(v){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||r.activationTrigger===0)return;r.activeOptionIndex!==null&&r.virtual.options.length>r.activeOptionIndex&&f.scrollToIndex(r.activeOptionIndex)}}},f.getVirtualItems().map(v=>{var x;return b.createElement(b.Fragment,{key:v.key},b.cloneElement((x=t.children)==null?void 0:x.call(t,{option:r.virtual.options[v.index],open:r.comboboxState===0}),{key:`${a}-${v.key}`,"data-index":v.index,"aria-setsize":r.virtual.options.length,"aria-posinset":v.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${v.start}px)`,overflowAnchor:"none"}}))})))}let ho=b.createContext(null);ho.displayName="ComboboxDataContext";function En(t){let l=b.useContext(ho);if(l===null){let r=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,En),r}return l}function Vs(t,l){return bt(l.type,Hs,t,l)}let Zs=b.Fragment;function Ys(t,l){let{value:r,defaultValue:n,onChange:u,form:f,name:a,by:m=null,disabled:v=!1,__demoMode:x=!1,nullable:E=!1,multiple:k=!1,immediate:R=!1,virtual:T=null,...M}=t,$=!1,P=null,[B=k?[]:void 0,_]=pl(r,u,n),[q,te]=b.useReducer(Vs,{dataRef:b.createRef(),comboboxState:x?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),re=b.useRef(!1),pe=b.useRef({static:!1,hold:!1}),Pe=b.useRef(null),ke=b.useRef(null),Te=b.useRef(null),y=b.useRef(null),me=ee(typeof m=="string"?(le,Ee)=>{let Z=m;return(le==null?void 0:le[Z])===(Ee==null?void 0:Ee[Z])}:m??((le,Ee)=>le===Ee)),Fe=ee(le=>q.options.findIndex(Ee=>me(Ee.dataRef.current.value,le))),Be=b.useCallback(le=>bt(U.mode,{1:()=>B.some(Ee=>me(Ee,le)),0:()=>me(B,le)}),[B]),it=ee(le=>q.activeOptionIndex===Fe(le)),U=b.useMemo(()=>({...q,immediate:$,optionsPropsRef:pe,labelRef:Pe,inputRef:ke,buttonRef:Te,optionsRef:y,value:B,defaultValue:n,disabled:v,mode:k?1:0,virtual:q.virtual,get activeOptionIndex(){if(re.current&&q.activeOptionIndex===null&&q.options.length>0){let le=q.options.findIndex(Ee=>!Ee.dataRef.current.disabled);if(le!==-1)return le}return q.activeOptionIndex},calculateIndex:Fe,compare:me,isSelected:Be,isActive:it,nullable:E,__demoMode:x}),[B,n,v,k,E,x,q,P]);nt(()=>{},[P,void 0]),nt(()=>{q.dataRef.current=U},[U]),io([U.buttonRef,U.inputRef,U.optionsRef],()=>Lt.closeCombobox(),U.comboboxState===0);let Xe=b.useMemo(()=>{var le,Ee,Z;return{open:U.comboboxState===0,disabled:v,activeIndex:U.activeOptionIndex,activeOption:U.activeOptionIndex===null?null:U.virtual?U.virtual.options[(le=U.activeOptionIndex)!=null?le:0]:(Z=(Ee=U.options[U.activeOptionIndex])==null?void 0:Ee.dataRef.current.value)!=null?Z:null,value:B}},[U,v,B]),$e=ee(()=>{if(U.activeOptionIndex!==null){if(U.virtual)kt(U.virtual.options[U.activeOptionIndex]);else{let{dataRef:le}=U.options[U.activeOptionIndex];kt(le.current.value)}Lt.goToOption(rt.Specific,U.activeOptionIndex)}}),ue=ee(()=>{te({type:0}),re.current=!0}),Oe=ee(()=>{te({type:1}),re.current=!1}),Je=ee((le,Ee,Z)=>(re.current=!1,le===rt.Specific?te({type:2,focus:rt.Specific,idx:Ee,trigger:Z}):te({type:2,focus:le,trigger:Z}))),Et=ee((le,Ee)=>(te({type:3,payload:{id:le,dataRef:Ee}}),()=>{U.isActive(Ee.current.value)&&(re.current=!0),te({type:4,id:le})})),ut=ee(le=>(te({type:5,id:le}),()=>te({type:5,id:null}))),kt=ee(le=>bt(U.mode,{0(){return _==null?void 0:_(le)},1(){let Ee=U.value.slice(),Z=Ee.findIndex(ge=>me(ge,le));return Z===-1?Ee.push(le):Ee.splice(Z,1),_==null?void 0:_(Ee)}})),ht=ee(le=>{te({type:6,trigger:le})}),Lt=b.useMemo(()=>({onChange:kt,registerOption:Et,registerLabel:ut,goToOption:Je,closeCombobox:Oe,openCombobox:ue,setActivationTrigger:ht,selectActiveOption:$e}),[]),Ne=l===null?{}:{ref:l},Qe=b.useRef(null),Ze=tn();return b.useEffect(()=>{Qe.current&&n!==void 0&&Ze.addEventListener(Qe.current,"reset",()=>{_==null||_(n)})},[Qe,_]),b.createElement(mo.Provider,{value:Lt},b.createElement(ho.Provider,{value:U},b.createElement(co,{value:bt(U.comboboxState,{0:Ct.Open,1:Ct.Closed})},a!=null&&B!=null&&Ol({[a]:B}).map(([le,Ee],Z)=>b.createElement(Hn,{features:Pn.Hidden,ref:Z===0?ge=>{var Ce;Qe.current=(Ce=ge==null?void 0:ge.closest("form"))!=null?Ce:null}:void 0,...Or({key:le,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:f,disabled:v,name:le,value:Ee})})),pt({ourProps:Ne,theirProps:M,slot:Xe,defaultTag:Zs,name:"Combobox"}))))}let Gs="input";function qs(t,l){var r,n,u,f,a;let m=Dt(),{id:v=`headlessui-combobox-input-${m}`,onChange:x,displayValue:E,type:k="text",...R}=t,T=En("Combobox.Input"),M=Vn("Combobox.Input"),$=wt(T.inputRef,l),P=wn(T.inputRef),B=b.useRef(!1),_=tn(),q=ee(()=>{M.onChange(null),T.optionsRef.current&&(T.optionsRef.current.scrollTop=0),M.goToOption(rt.Nothing)}),te=function(){var U;return typeof E=="function"&&T.value!==void 0?(U=E(T.value))!=null?U:"":typeof T.value=="string"?T.value:""}();Wn(([U,Xe],[$e,ue])=>{if(B.current)return;let Oe=T.inputRef.current;Oe&&((ue===0&&Xe===1||U!==$e)&&(Oe.value=U),requestAnimationFrame(()=>{if(B.current||!Oe||(P==null?void 0:P.activeElement)!==Oe)return;let{selectionStart:Je,selectionEnd:Et}=Oe;Math.abs((Et??0)-(Je??0))===0&&Je===0&&Oe.setSelectionRange(Oe.value.length,Oe.value.length)}))},[te,T.comboboxState,P]),Wn(([U],[Xe])=>{if(U===0&&Xe===1){if(B.current)return;let $e=T.inputRef.current;if(!$e)return;let ue=$e.value,{selectionStart:Oe,selectionEnd:Je,selectionDirection:Et}=$e;$e.value="",$e.value=ue,Et!==null?$e.setSelectionRange(Oe,Je,Et):$e.setSelectionRange(Oe,Je)}},[T.comboboxState]);let re=b.useRef(!1),pe=ee(()=>{re.current=!0}),Pe=ee(()=>{_.nextFrame(()=>{re.current=!1})}),ke=ee(U=>{switch(B.current=!0,U.key){case Ge.Enter:if(B.current=!1,T.comboboxState!==0||re.current)return;if(U.preventDefault(),U.stopPropagation(),T.activeOptionIndex===null){M.closeCombobox();return}M.selectActiveOption(),T.mode===0&&M.closeCombobox();break;case Ge.ArrowDown:return B.current=!1,U.preventDefault(),U.stopPropagation(),bt(T.comboboxState,{0:()=>M.goToOption(rt.Next),1:()=>M.openCombobox()});case Ge.ArrowUp:return B.current=!1,U.preventDefault(),U.stopPropagation(),bt(T.comboboxState,{0:()=>M.goToOption(rt.Previous),1:()=>{M.openCombobox(),_.nextFrame(()=>{T.value||M.goToOption(rt.Last)})}});case Ge.Home:if(U.shiftKey)break;return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.First);case Ge.PageUp:return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.First);case Ge.End:if(U.shiftKey)break;return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.Last);case Ge.PageDown:return B.current=!1,U.preventDefault(),U.stopPropagation(),M.goToOption(rt.Last);case Ge.Escape:return B.current=!1,T.comboboxState!==0?void 0:(U.preventDefault(),T.optionsRef.current&&!T.optionsPropsRef.current.static&&U.stopPropagation(),T.nullable&&T.mode===0&&T.value===null&&q(),M.closeCombobox());case Ge.Tab:if(B.current=!1,T.comboboxState!==0)return;T.mode===0&&T.activationTrigger!==1&&M.selectActiveOption(),M.closeCombobox();break}}),Te=ee(U=>{x==null||x(U),T.nullable&&T.mode===0&&U.target.value===""&&q(),M.openCombobox()}),y=ee(U=>{var Xe,$e,ue;let Oe=(Xe=U.relatedTarget)!=null?Xe:qt.find(Je=>Je!==U.currentTarget);if(B.current=!1,!(($e=T.optionsRef.current)!=null&&$e.contains(Oe))&&!((ue=T.buttonRef.current)!=null&&ue.contains(Oe))&&T.comboboxState===0)return U.preventDefault(),T.mode===0&&(T.nullable&&T.value===null?q():T.activationTrigger!==1&&M.selectActiveOption()),M.closeCombobox()}),me=ee(U=>{var Xe,$e,ue;let Oe=(Xe=U.relatedTarget)!=null?Xe:qt.find(Je=>Je!==U.currentTarget);($e=T.buttonRef.current)!=null&&$e.contains(Oe)||(ue=T.optionsRef.current)!=null&&ue.contains(Oe)||T.disabled||T.immediate&&T.comboboxState!==0&&(M.openCombobox(),_.nextFrame(()=>{M.setActivationTrigger(1)}))}),Fe=to(()=>{if(T.labelId)return[T.labelId].join(" ")},[T.labelId]),Be=b.useMemo(()=>({open:T.comboboxState===0,disabled:T.disabled}),[T]),it={ref:$,id:v,role:"combobox",type:k,"aria-controls":(r=T.optionsRef.current)==null?void 0:r.id,"aria-expanded":T.comboboxState===0,"aria-activedescendant":T.activeOptionIndex===null?void 0:T.virtual?(n=T.options.find(U=>{var Xe;return!((Xe=T.virtual)!=null&&Xe.disabled(U.dataRef.current.value))&&T.compare(U.dataRef.current.value,T.virtual.options[T.activeOptionIndex])}))==null?void 0:n.id:(u=T.options[T.activeOptionIndex])==null?void 0:u.id,"aria-labelledby":Fe,"aria-autocomplete":"list",defaultValue:(a=(f=t.defaultValue)!=null?f:T.defaultValue!==void 0?E==null?void 0:E(T.defaultValue):null)!=null?a:T.defaultValue,disabled:T.disabled,onCompositionStart:pe,onCompositionEnd:Pe,onKeyDown:ke,onChange:Te,onFocus:me,onBlur:y};return pt({ourProps:it,theirProps:R,slot:Be,defaultTag:Gs,name:"Combobox.Input"})}let Ks="button";function Xs(t,l){var r;let n=En("Combobox.Button"),u=Vn("Combobox.Button"),f=wt(n.buttonRef,l),a=Dt(),{id:m=`headlessui-combobox-button-${a}`,...v}=t,x=tn(),E=ee($=>{switch($.key){case Ge.ArrowDown:return $.preventDefault(),$.stopPropagation(),n.comboboxState===1&&u.openCombobox(),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})});case Ge.ArrowUp:return $.preventDefault(),$.stopPropagation(),n.comboboxState===1&&(u.openCombobox(),x.nextFrame(()=>{n.value||u.goToOption(rt.Last)})),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})});case Ge.Escape:return n.comboboxState!==0?void 0:($.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&$.stopPropagation(),u.closeCombobox(),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})}));default:return}}),k=ee($=>{if(Nr($.currentTarget))return $.preventDefault();n.comboboxState===0?u.closeCombobox():($.preventDefault(),u.openCombobox()),x.nextFrame(()=>{var P;return(P=n.inputRef.current)==null?void 0:P.focus({preventScroll:!0})})}),R=to(()=>{if(n.labelId)return[n.labelId,m].join(" ")},[n.labelId,m]),T=b.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),M={ref:f,id:m,type:so(t,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(r=n.optionsRef.current)==null?void 0:r.id,"aria-expanded":n.comboboxState===0,"aria-labelledby":R,disabled:n.disabled,onClick:k,onKeyDown:E};return pt({ourProps:M,theirProps:v,slot:T,defaultTag:Ks,name:"Combobox.Button"})}let Js="label";function Qs(t,l){let r=Dt(),{id:n=`headlessui-combobox-label-${r}`,...u}=t,f=En("Combobox.Label"),a=Vn("Combobox.Label"),m=wt(f.labelRef,l);nt(()=>a.registerLabel(n),[n]);let v=ee(()=>{var E;return(E=f.inputRef.current)==null?void 0:E.focus({preventScroll:!0})}),x=b.useMemo(()=>({open:f.comboboxState===0,disabled:f.disabled}),[f]);return pt({ourProps:{ref:m,id:n,onClick:v},theirProps:u,slot:x,defaultTag:Js,name:"Combobox.Label"})}let ea="ul",ta=dn.RenderStrategy|dn.Static;function na(t,l){let r=Dt(),{id:n=`headlessui-combobox-options-${r}`,hold:u=!1,...f}=t,a=En("Combobox.Options"),m=wt(a.optionsRef,l),v=Un(),x=v!==null?(v&Ct.Open)===Ct.Open:a.comboboxState===0;nt(()=>{var T;a.optionsPropsRef.current.static=(T=t.static)!=null?T:!1},[a.optionsPropsRef,t.static]),nt(()=>{a.optionsPropsRef.current.hold=u},[a.optionsPropsRef,u]),jl({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(T){return T.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:T.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(T){T.setAttribute("role","none")}});let E=to(()=>{var T,M;return(M=a.labelId)!=null?M:(T=a.buttonRef.current)==null?void 0:T.id},[a.labelId,a.buttonRef.current]),k=b.useMemo(()=>({open:a.comboboxState===0,option:void 0}),[a]),R={"aria-labelledby":E,role:"listbox","aria-multiselectable":a.mode===1?!0:void 0,id:n,ref:m};return a.virtual&&a.comboboxState===0&&Object.assign(f,{children:b.createElement(Us,null,f.children)}),pt({ourProps:R,theirProps:f,slot:k,defaultTag:ea,features:ta,visible:x,name:"Combobox.Options"})}let ra="li";function oa(t,l){var r;let n=Dt(),{id:u=`headlessui-combobox-option-${n}`,disabled:f=!1,value:a,order:m=null,...v}=t,x=En("Combobox.Option"),E=Vn("Combobox.Option"),k=x.virtual?x.activeOptionIndex===x.calculateIndex(a):x.activeOptionIndex===null?!1:((r=x.options[x.activeOptionIndex])==null?void 0:r.id)===u,R=x.isSelected(a),T=b.useRef(null),M=Vt({disabled:f,value:a,domRef:T,order:m}),$=b.useContext(kl),P=wt(l,T,$?$.measureElement:null),B=ee(()=>E.onChange(a));nt(()=>E.registerOption(u,M),[M,u]);let _=b.useRef(!(x.virtual||x.__demoMode));nt(()=>{if(!x.virtual||!x.__demoMode)return;let y=Wt();return y.requestAnimationFrame(()=>{_.current=!0}),y.dispose},[x.virtual,x.__demoMode]),nt(()=>{if(!_.current||x.comboboxState!==0||!k||x.activationTrigger===0)return;let y=Wt();return y.requestAnimationFrame(()=>{var me,Fe;(Fe=(me=T.current)==null?void 0:me.scrollIntoView)==null||Fe.call(me,{block:"nearest"})}),y.dispose},[T,k,x.comboboxState,x.activationTrigger,x.activeOptionIndex]);let q=ee(y=>{var me;if(f||(me=x.virtual)!=null&&me.disabled(a))return y.preventDefault();B(),xl()||requestAnimationFrame(()=>{var Fe;return(Fe=x.inputRef.current)==null?void 0:Fe.focus({preventScroll:!0})}),x.mode===0&&requestAnimationFrame(()=>E.closeCombobox())}),te=ee(()=>{var y;if(f||(y=x.virtual)!=null&&y.disabled(a))return E.goToOption(rt.Nothing);let me=x.calculateIndex(a);E.goToOption(rt.Specific,me)}),re=Cl(),pe=ee(y=>re.update(y)),Pe=ee(y=>{var me;if(!re.wasMoved(y)||f||(me=x.virtual)!=null&&me.disabled(a)||k)return;let Fe=x.calculateIndex(a);E.goToOption(rt.Specific,Fe,0)}),ke=ee(y=>{var me;re.wasMoved(y)&&(f||(me=x.virtual)!=null&&me.disabled(a)||k&&(x.optionsPropsRef.current.hold||E.goToOption(rt.Nothing)))}),Te=b.useMemo(()=>({active:k,selected:R,disabled:f}),[k,R,f]);return pt({ourProps:{id:u,ref:P,role:"option",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,"aria-selected":R,disabled:void 0,onClick:q,onFocus:te,onPointerEnter:pe,onMouseEnter:pe,onPointerMove:Pe,onMouseMove:Pe,onPointerLeave:ke,onMouseLeave:ke},theirProps:v,slot:Te,defaultTag:ra,name:"Combobox.Option"})}let la=mt(Ys),ia=mt(Xs),sa=mt(qs),aa=mt(Qs),ua=mt(na),ca=mt(oa),rn=Object.assign(la,{Input:sa,Button:ia,Label:aa,Options:ua,Option:ca});function Pl(t,l,r,n){let u=Vt(r);b.useEffect(()=>{t=t??window;function f(a){u.current(a)}return t.addEventListener(l,f,n),()=>t.removeEventListener(l,f,n)},[t,l,n])}function Zn(){let t=b.useRef(!1);return nt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Fl(t){let l=ee(t),r=b.useRef(!1);b.useEffect(()=>(r.current=!1,()=>{r.current=!0,Er(()=>{r.current&&l()})}),[l])}var Yn=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(Yn||{});function da(){let t=b.useRef(0);return yl("keydown",l=>{l.key==="Tab"&&(t.current=l.shiftKey?1:0)},!0),t}function Ml(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());let l=new Set;for(let r of t.current)r.current instanceof HTMLElement&&l.add(r.current);return l}let fa="div";var Rl=(t=>(t[t.None=1]="None",t[t.InitialFocus=2]="InitialFocus",t[t.TabLock=4]="TabLock",t[t.FocusLock=8]="FocusLock",t[t.RestoreFocus=16]="RestoreFocus",t[t.All=30]="All",t))(Rl||{});function pa(t,l){let r=b.useRef(null),n=wt(r,l),{initialFocus:u,containers:f,features:a=30,...m}=t;kn()||(a=1);let v=wn(r);va({ownerDocument:v},!!(a&16));let x=ga({ownerDocument:v,container:r,initialFocus:u},!!(a&2));ba({ownerDocument:v,container:r,containers:f,previousActiveElement:x},!!(a&8));let E=da(),k=ee($=>{let P=r.current;P&&(B=>B())(()=>{bt(E.current,{[Yn.Forwards]:()=>{zn(P,nn.First,{skipElements:[$.relatedTarget]})},[Yn.Backwards]:()=>{zn(P,nn.Last,{skipElements:[$.relatedTarget]})}})})}),R=tn(),T=b.useRef(!1),M={ref:n,onKeyDown($){$.key=="Tab"&&(T.current=!0,R.requestAnimationFrame(()=>{T.current=!1}))},onBlur($){let P=Ml(f);r.current instanceof HTMLElement&&P.add(r.current);let B=$.relatedTarget;B instanceof HTMLElement&&B.dataset.headlessuiFocusGuard!=="true"&&(Ll(P,B)||(T.current?zn(r.current,bt(E.current,{[Yn.Forwards]:()=>nn.Next,[Yn.Backwards]:()=>nn.Previous})|nn.WrapAround,{relativeTo:$.target}):$.target instanceof HTMLElement&&cn($.target)))}};return b.createElement(b.Fragment,null,!!(a&4)&&b.createElement(Hn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:Pn.Focusable}),pt({ourProps:M,theirProps:m,defaultTag:fa,name:"FocusTrap"}),!!(a&4)&&b.createElement(Hn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:k,features:Pn.Focusable}))}let ma=mt(pa),Gn=Object.assign(ma,{features:Rl});function ha(t=!0){let l=b.useRef(qt.slice());return Wn(([r],[n])=>{n===!0&&r===!1&&Er(()=>{l.current.splice(0)}),n===!1&&r===!0&&(l.current=qt.slice())},[t,qt,l]),ee(()=>{var r;return(r=l.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function va({ownerDocument:t},l){let r=ha(l);Wn(()=>{l||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&cn(r())},[l]),Fl(()=>{l&&cn(r())})}function ga({ownerDocument:t,container:l,initialFocus:r},n){let u=b.useRef(null),f=Zn();return Wn(()=>{if(!n)return;let a=l.current;a&&Er(()=>{if(!f.current)return;let m=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===m){u.current=m;return}}else if(a.contains(m)){u.current=m;return}r!=null&&r.current?cn(r.current):zn(a,nn.First)===hl.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),u.current=t==null?void 0:t.activeElement})},[n]),u}function ba({ownerDocument:t,container:l,containers:r,previousActiveElement:n},u){let f=Zn();Pl(t==null?void 0:t.defaultView,"focus",a=>{if(!u||!f.current)return;let m=Ml(r);l.current instanceof HTMLElement&&m.add(l.current);let v=n.current;if(!v)return;let x=a.target;x&&x instanceof HTMLElement?Ll(m,x)?(n.current=x,cn(x)):(a.preventDefault(),a.stopPropagation(),cn(v)):cn(n.current)},!0)}function Ll(t,l){for(let r of t)if(r.contains(l))return!0;return!1}let Al=b.createContext(!1);function xa(){return b.useContext(Al)}function vo(t){return b.createElement(Al.Provider,{value:t.force},t.children)}function ya(t){let l=xa(),r=b.useContext(Dl),n=wn(t),[u,f]=b.useState(()=>{if(!l&&r!==null||en.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let m=n.createElement("div");return m.setAttribute("id","headlessui-portal-root"),n.body.appendChild(m)});return b.useEffect(()=>{u!==null&&(n!=null&&n.body.contains(u)||n==null||n.body.appendChild(u))},[u,n]),b.useEffect(()=>{l||r!==null&&f(r.current)},[r,f,l]),u}let wa=b.Fragment;function Ea(t,l){let r=t,n=b.useRef(null),u=wt(Ps(E=>{n.current=E}),l),f=wn(n),a=ya(n),[m]=b.useState(()=>{var E;return en.isServer?null:(E=f==null?void 0:f.createElement("div"))!=null?E:null}),v=b.useContext(go),x=kn();return nt(()=>{!a||!m||a.contains(m)||(m.setAttribute("data-headlessui-portal",""),a.appendChild(m))},[a,m]),nt(()=>{if(m&&v)return v.register(m)},[v,m]),Fl(()=>{var E;!a||!m||(m instanceof Node&&a.contains(m)&&a.removeChild(m),a.childNodes.length<=0&&((E=a.parentElement)==null||E.removeChild(a)))}),x?!a||!m?null:wr.createPortal(pt({ourProps:{ref:u},theirProps:r,defaultTag:wa,name:"Portal"}),m):null}let Sa=b.Fragment,Dl=b.createContext(null);function Ca(t,l){let{target:r,...n}=t,u={ref:wt(l)};return b.createElement(Dl.Provider,{value:r},pt({ourProps:u,theirProps:n,defaultTag:Sa,name:"Popover.Group"}))}let go=b.createContext(null);function ja(){let t=b.useContext(go),l=b.useRef([]),r=ee(f=>(l.current.push(f),t&&t.register(f),()=>n(f))),n=ee(f=>{let a=l.current.indexOf(f);a!==-1&&l.current.splice(a,1),t&&t.unregister(f)}),u=b.useMemo(()=>({register:r,unregister:n,portals:l}),[r,n,l]);return[l,b.useMemo(()=>function({children:f}){return b.createElement(go.Provider,{value:u},f)},[u])]}let Ta=mt(Ea),Oa=mt(Ca),bo=Object.assign(Ta,{Group:Oa});function Na(t,l){return t===l&&(t!==0||1/t===1/l)||t!==t&&l!==l}const Ia=typeof Object.is=="function"?Object.is:Na,{useState:ka,useEffect:Pa,useLayoutEffect:Fa,useDebugValue:Ma}=G;function Ra(t,l,r){const n=l(),[{inst:u},f]=ka({inst:{value:n,getSnapshot:l}});return Fa(()=>{u.value=n,u.getSnapshot=l,xo(u)&&f({inst:u})},[t,n,l]),Pa(()=>(xo(u)&&f({inst:u}),t(()=>{xo(u)&&f({inst:u})})),[t]),Ma(n),n}function xo(t){const l=t.getSnapshot,r=t.value;try{const n=l();return!Ia(r,n)}catch{return!0}}function La(t,l,r){return l()}const Aa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Da=!Aa,$a=Da?La:Ra,_a="useSyncExternalStore"in G?(t=>t.useSyncExternalStore)(G):$a;function Ba(t){return _a(t.subscribe,t.getSnapshot,t.getSnapshot)}function za(t,l){let r=t(),n=new Set;return{getSnapshot(){return r},subscribe(u){return n.add(u),()=>n.delete(u)},dispatch(u,...f){let a=l[u].call(r,...f);a&&(r=a,n.forEach(m=>m()))}}}function Wa(){let t;return{before({doc:l}){var r;let n=l.documentElement;t=((r=l.defaultView)!=null?r:window).innerWidth-n.clientWidth},after({doc:l,d:r}){let n=l.documentElement,u=n.clientWidth-n.offsetWidth,f=t-u;r.style(n,"paddingRight",`${f}px`)}}}function Ha(){return bl()?{before({doc:t,d:l,meta:r}){function n(u){return r.containers.flatMap(f=>f()).some(f=>f.contains(u))}l.microTask(()=>{var u;if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let m=Wt();m.style(t.documentElement,"scrollBehavior","auto"),l.add(()=>l.microTask(()=>m.dispose()))}let f=(u=window.scrollY)!=null?u:window.pageYOffset,a=null;l.addEventListener(t,"click",m=>{if(m.target instanceof HTMLElement)try{let v=m.target.closest("a");if(!v)return;let{hash:x}=new URL(v.href),E=t.querySelector(x);E&&!n(E)&&(a=E)}catch{}},!0),l.addEventListener(t,"touchstart",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&n(v.parentElement);)v=v.parentElement;l.style(v,"overscrollBehavior","contain")}else l.style(m.target,"touchAction","none")}),l.addEventListener(t,"touchmove",m=>{if(m.target instanceof HTMLElement)if(n(m.target)){let v=m.target;for(;v.parentElement&&v.dataset.headlessuiPortal!==""&&!(v.scrollHeight>v.clientHeight||v.scrollWidth>v.clientWidth);)v=v.parentElement;v.dataset.headlessuiPortal===""&&m.preventDefault()}else m.preventDefault()},{passive:!1}),l.add(()=>{var m;let v=(m=window.scrollY)!=null?m:window.pageYOffset;f!==v&&window.scrollTo(0,f),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function Ua(){return{before({doc:t,d:l}){l.style(t.documentElement,"overflow","hidden")}}}function Va(t){let l={};for(let r of t)Object.assign(l,r(l));return l}let Sn=za(()=>new Map,{PUSH(t,l){var r;let n=(r=this.get(t))!=null?r:{doc:t,count:0,d:Wt(),meta:new Set};return n.count++,n.meta.add(l),this.set(t,n),this},POP(t,l){let r=this.get(t);return r&&(r.count--,r.meta.delete(l)),this},SCROLL_PREVENT({doc:t,d:l,meta:r}){let n={doc:t,d:l,meta:Va(r)},u=[Ha(),Wa(),Ua()];u.forEach(({before:f})=>f==null?void 0:f(n)),u.forEach(({after:f})=>f==null?void 0:f(n))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});Sn.subscribe(()=>{let t=Sn.getSnapshot(),l=new Map;for(let[r]of t)l.set(r,r.documentElement.style.overflow);for(let r of t.values()){let n=l.get(r.doc)==="hidden",u=r.count!==0;(u&&!n||!u&&n)&&Sn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Sn.dispatch("TEARDOWN",r)}});function Za(t,l,r){let n=Ba(Sn),u=t?n.get(t):void 0,f=u?u.count>0:!1;return nt(()=>{if(!(!t||!l))return Sn.dispatch("PUSH",t,r),()=>Sn.dispatch("POP",t,r)},[l,t]),f}let yo=new Map,qn=new Map;function $l(t,l=!0){nt(()=>{var r;if(!l)return;let n=typeof t=="function"?t():t.current;if(!n)return;function u(){var a;if(!n)return;let m=(a=qn.get(n))!=null?a:1;if(m===1?qn.delete(n):qn.set(n,m-1),m!==1)return;let v=yo.get(n);v&&(v["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",v["aria-hidden"]),n.inert=v.inert,yo.delete(n))}let f=(r=qn.get(n))!=null?r:0;return qn.set(n,f+1),f!==0||(yo.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),u},[t,l])}function Ya({defaultContainers:t=[],portals:l,mainTreeNodeRef:r}={}){var n;let u=b.useRef((n=r==null?void 0:r.current)!=null?n:null),f=wn(u),a=ee(()=>{var m,v,x;let E=[];for(let k of t)k!==null&&(k instanceof HTMLElement?E.push(k):"current"in k&&k.current instanceof HTMLElement&&E.push(k.current));if(l!=null&&l.current)for(let k of l.current)E.push(k);for(let k of(m=f==null?void 0:f.querySelectorAll("html > *, body > *"))!=null?m:[])k!==document.body&&k!==document.head&&k instanceof HTMLElement&&k.id!=="headlessui-portal-root"&&(k.contains(u.current)||k.contains((x=(v=u.current)==null?void 0:v.getRootNode())==null?void 0:x.host)||E.some(R=>k.contains(R))||E.push(k));return E});return{resolveContainers:a,contains:ee(m=>a().some(v=>v.contains(m))),mainTreeNodeRef:u,MainTreeNode:b.useMemo(()=>function(){return r!=null?null:b.createElement(Hn,{features:Pn.Hidden,ref:u})},[u,r])}}let wo=b.createContext(()=>{});wo.displayName="StackContext";var Eo=(t=>(t[t.Add=0]="Add",t[t.Remove=1]="Remove",t))(Eo||{});function Ga(){return b.useContext(wo)}function qa({children:t,onUpdate:l,type:r,element:n,enabled:u}){let f=Ga(),a=ee((...m)=>{l==null||l(...m),f(...m)});return nt(()=>{let m=u===void 0||u===!0;return m&&a(0,r,n),()=>{m&&a(1,r,n)}},[a,r,n,u]),b.createElement(wo.Provider,{value:a},t)}let _l=b.createContext(null);function Bl(){let t=b.useContext(_l);if(t===null){let l=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,Bl),l}return t}function zl(){let[t,l]=b.useState([]);return[t.length>0?t.join(" "):void 0,b.useMemo(()=>function(r){let n=ee(f=>(l(a=>[...a,f]),()=>l(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=b.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return b.createElement(_l.Provider,{value:u},r.children)},[l])]}let Ka="p";function Xa(t,l){let r=Dt(),{id:n=`headlessui-description-${r}`,...u}=t,f=Bl(),a=wt(l);nt(()=>f.register(n),[n,f.register]);let m={ref:a,...f.props,id:n};return pt({ourProps:m,theirProps:u,slot:f.slot||{},defaultTag:Ka,name:f.name||"Description"})}let Ja=mt(Xa),Wl=Object.assign(Ja,{});var Qa=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Qa||{}),eu=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(eu||{});let tu={0(t,l){return t.titleId===l.id?t:{...t,titleId:l.id}}},Ir=b.createContext(null);Ir.displayName="DialogContext";function Kn(t){let l=b.useContext(Ir);if(l===null){let r=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Kn),r}return l}function nu(t,l,r=()=>[document.body]){Za(t,l,n=>{var u;return{containers:[...(u=n.containers)!=null?u:[],r]}})}function ru(t,l){return bt(l.type,tu,t,l)}let ou="div",lu=dn.RenderStrategy|dn.Static;function iu(t,l){let r=Dt(),{id:n=`headlessui-dialog-${r}`,open:u,onClose:f,initialFocus:a,role:m="dialog",__demoMode:v=!1,...x}=t,[E,k]=b.useState(0),R=b.useRef(!1);m=function(){return m==="dialog"||m==="alertdialog"?m:(R.current||(R.current=!0,console.warn(`Invalid role [${m}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let T=Un();u===void 0&&T!==null&&(u=(T&Ct.Open)===Ct.Open);let M=b.useRef(null),$=wt(M,l),P=wn(M),B=t.hasOwnProperty("open")||T!==null,_=t.hasOwnProperty("onClose");if(!B&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!B)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof u!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u}`);if(typeof f!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${f}`);let q=u?0:1,[te,re]=b.useReducer(ru,{titleId:null,descriptionId:null,panelRef:b.createRef()}),pe=ee(()=>f(!1)),Pe=ee(Z=>re({type:0,id:Z})),ke=kn()?v?!1:q===0:!1,Te=E>1,y=b.useContext(Ir)!==null,[me,Fe]=ja(),Be={get current(){var Z;return(Z=te.panelRef.current)!=null?Z:M.current}},{resolveContainers:it,mainTreeNodeRef:U,MainTreeNode:Xe}=Ya({portals:me,defaultContainers:[Be]}),$e=Te?"parent":"leaf",ue=T!==null?(T&Ct.Closing)===Ct.Closing:!1,Oe=y||ue?!1:ke,Je=b.useCallback(()=>{var Z,ge;return(ge=Array.from((Z=P==null?void 0:P.querySelectorAll("body > *"))!=null?Z:[]).find(Ce=>Ce.id==="headlessui-portal-root"?!1:Ce.contains(U.current)&&Ce instanceof HTMLElement))!=null?ge:null},[U]);$l(Je,Oe);let Et=Te?!0:ke,ut=b.useCallback(()=>{var Z,ge;return(ge=Array.from((Z=P==null?void 0:P.querySelectorAll("[data-headlessui-portal]"))!=null?Z:[]).find(Ce=>Ce.contains(U.current)&&Ce instanceof HTMLElement))!=null?ge:null},[U]);$l(ut,Et),io(it,Z=>{Z.preventDefault(),pe()},!(!ke||Te));let ht=!(Te||q!==0);Pl(P==null?void 0:P.defaultView,"keydown",Z=>{ht&&(Z.defaultPrevented||Z.key===Ge.Escape&&(Z.preventDefault(),Z.stopPropagation(),pe()))}),nu(P,!(ue||q!==0||y),it),b.useEffect(()=>{if(q!==0||!M.current)return;let Z=new ResizeObserver(ge=>{for(let Ce of ge){let Ie=Ce.target.getBoundingClientRect();Ie.x===0&&Ie.y===0&&Ie.width===0&&Ie.height===0&&pe()}});return Z.observe(M.current),()=>Z.disconnect()},[q,M,pe]);let[Ne,Qe]=zl(),Ze=b.useMemo(()=>[{dialogState:q,close:pe,setTitleId:Pe},te],[q,te,pe,Pe]),le=b.useMemo(()=>({open:q===0}),[q]),Ee={ref:$,id:n,role:m,"aria-modal":q===0?!0:void 0,"aria-labelledby":te.titleId,"aria-describedby":Ne};return b.createElement(qa,{type:"Dialog",enabled:q===0,element:M,onUpdate:ee((Z,ge)=>{ge==="Dialog"&&bt(Z,{[Eo.Add]:()=>k(Ce=>Ce+1),[Eo.Remove]:()=>k(Ce=>Ce-1)})})},b.createElement(vo,{force:!0},b.createElement(bo,null,b.createElement(Ir.Provider,{value:Ze},b.createElement(bo.Group,{target:M},b.createElement(vo,{force:!1},b.createElement(Qe,{slot:le,name:"Dialog.Description"},b.createElement(Gn,{initialFocus:a,containers:it,features:ke?bt($e,{parent:Gn.features.RestoreFocus,leaf:Gn.features.All&~Gn.features.FocusLock}):Gn.features.None},b.createElement(Fe,null,pt({ourProps:Ee,theirProps:x,slot:le,defaultTag:ou,features:lu,visible:q===0,name:"Dialog"}))))))))),b.createElement(Xe,null))}let su="div";function au(t,l){let r=Dt(),{id:n=`headlessui-dialog-overlay-${r}`,...u}=t,[{dialogState:f,close:a}]=Kn("Dialog.Overlay"),m=wt(l),v=ee(E=>{if(E.target===E.currentTarget){if(Nr(E.currentTarget))return E.preventDefault();E.preventDefault(),E.stopPropagation(),a()}}),x=b.useMemo(()=>({open:f===0}),[f]);return pt({ourProps:{ref:m,id:n,"aria-hidden":!0,onClick:v},theirProps:u,slot:x,defaultTag:su,name:"Dialog.Overlay"})}let uu="div";function cu(t,l){let r=Dt(),{id:n=`headlessui-dialog-backdrop-${r}`,...u}=t,[{dialogState:f},a]=Kn("Dialog.Backdrop"),m=wt(l);b.useEffect(()=>{if(a.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let v=b.useMemo(()=>({open:f===0}),[f]);return b.createElement(vo,{force:!0},b.createElement(bo,null,pt({ourProps:{ref:m,id:n,"aria-hidden":!0},theirProps:u,slot:v,defaultTag:uu,name:"Dialog.Backdrop"})))}let du="div";function fu(t,l){let r=Dt(),{id:n=`headlessui-dialog-panel-${r}`,...u}=t,[{dialogState:f},a]=Kn("Dialog.Panel"),m=wt(l,a.panelRef),v=b.useMemo(()=>({open:f===0}),[f]),x=ee(E=>{E.stopPropagation()});return pt({ourProps:{ref:m,id:n,onClick:x},theirProps:u,slot:v,defaultTag:du,name:"Dialog.Panel"})}let pu="h2";function mu(t,l){let r=Dt(),{id:n=`headlessui-dialog-title-${r}`,...u}=t,[{dialogState:f,setTitleId:a}]=Kn("Dialog.Title"),m=wt(l);b.useEffect(()=>(a(n),()=>a(null)),[n,a]);let v=b.useMemo(()=>({open:f===0}),[f]);return pt({ourProps:{ref:m,id:n},theirProps:u,slot:v,defaultTag:pu,name:"Dialog.Title"})}let hu=mt(iu),vu=mt(cu),gu=mt(fu),bu=mt(au),xu=mt(mu),Hl=Object.assign(hu,{Backdrop:vu,Panel:gu,Overlay:bu,Title:xu,Description:Wl}),Ul=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Vl(t){var l,r;let n=(l=t.innerText)!=null?l:"",u=t.cloneNode(!0);if(!(u instanceof HTMLElement))return n;let f=!1;for(let m of u.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))m.remove(),f=!0;let a=f?(r=u.innerText)!=null?r:"":n;return Ul.test(a)&&(a=a.replace(Ul,"")),a}function yu(t){let l=t.getAttribute("aria-label");if(typeof l=="string")return l.trim();let r=t.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(u=>{let f=document.getElementById(u);if(f){let a=f.getAttribute("aria-label");return typeof a=="string"?a.trim():Vl(f).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return Vl(t).trim()}function wu(t){let l=b.useRef(""),r=b.useRef("");return ee(()=>{let n=t.current;if(!n)return"";let u=n.innerText;if(l.current===u)return r.current;let f=yu(n).trim().toLowerCase();return l.current=u,r.current=f,f})}var Eu=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Eu||{}),Su=(t=>(t[t.Pointer=0]="Pointer",t[t.Other=1]="Other",t))(Su||{}),Cu=(t=>(t[t.OpenMenu=0]="OpenMenu",t[t.CloseMenu=1]="CloseMenu",t[t.GoToItem=2]="GoToItem",t[t.Search=3]="Search",t[t.ClearSearch=4]="ClearSearch",t[t.RegisterItem=5]="RegisterItem",t[t.UnregisterItem=6]="UnregisterItem",t))(Cu||{});function So(t,l=r=>r){let r=t.activeItemIndex!==null?t.items[t.activeItemIndex]:null,n=lo(l(t.items.slice()),f=>f.dataRef.current.domRef.current),u=r?n.indexOf(r):null;return u===-1&&(u=null),{items:n,activeItemIndex:u}}let ju={1(t){return t.menuState===1?t:{...t,activeItemIndex:null,menuState:1}},0(t){return t.menuState===0?t:{...t,__demoMode:!1,menuState:0}},2:(t,l)=>{var r;let n=So(t),u=fo(l,{resolveItems:()=>n.items,resolveActiveIndex:()=>n.activeItemIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});return{...t,...n,searchQuery:"",activeItemIndex:u,activationTrigger:(r=l.trigger)!=null?r:1}},3:(t,l)=>{let r=t.searchQuery!==""?0:1,n=t.searchQuery+l.value.toLowerCase(),u=(t.activeItemIndex!==null?t.items.slice(t.activeItemIndex+r).concat(t.items.slice(0,t.activeItemIndex+r)):t.items).find(a=>{var m;return((m=a.dataRef.current.textValue)==null?void 0:m.startsWith(n))&&!a.dataRef.current.disabled}),f=u?t.items.indexOf(u):-1;return f===-1||f===t.activeItemIndex?{...t,searchQuery:n}:{...t,searchQuery:n,activeItemIndex:f,activationTrigger:1}},4(t){return t.searchQuery===""?t:{...t,searchQuery:"",searchActiveItemIndex:null}},5:(t,l)=>{let r=So(t,n=>[...n,{id:l.id,dataRef:l.dataRef}]);return{...t,...r}},6:(t,l)=>{let r=So(t,n=>{let u=n.findIndex(f=>f.id===l.id);return u!==-1&&n.splice(u,1),n});return{...t,...r,activationTrigger:1}}},Co=b.createContext(null);Co.displayName="MenuContext";function kr(t){let l=b.useContext(Co);if(l===null){let r=new Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,kr),r}return l}function Tu(t,l){return bt(l.type,ju,t,l)}let Ou=b.Fragment;function Nu(t,l){let{__demoMode:r=!1,...n}=t,u=b.useReducer(Tu,{__demoMode:r,menuState:r?0:1,buttonRef:b.createRef(),itemsRef:b.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:f,itemsRef:a,buttonRef:m},v]=u,x=wt(l);io([m,a],(T,M)=>{var $;v({type:1}),oo(M,ro.Loose)||(T.preventDefault(),($=m.current)==null||$.focus())},f===0);let E=ee(()=>{v({type:1})}),k=b.useMemo(()=>({open:f===0,close:E}),[f,E]),R={ref:x};return b.createElement(Co.Provider,{value:u},b.createElement(co,{value:bt(f,{0:Ct.Open,1:Ct.Closed})},pt({ourProps:R,theirProps:n,slot:k,defaultTag:Ou,name:"Menu"})))}let Iu="button";function ku(t,l){var r;let n=Dt(),{id:u=`headlessui-menu-button-${n}`,...f}=t,[a,m]=kr("Menu.Button"),v=wt(a.buttonRef,l),x=tn(),E=ee($=>{switch($.key){case Ge.Space:case Ge.Enter:case Ge.ArrowDown:$.preventDefault(),$.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:rt.First}));break;case Ge.ArrowUp:$.preventDefault(),$.stopPropagation(),m({type:0}),x.nextFrame(()=>m({type:2,focus:rt.Last}));break}}),k=ee($=>{switch($.key){case Ge.Space:$.preventDefault();break}}),R=ee($=>{if(Nr($.currentTarget))return $.preventDefault();t.disabled||(a.menuState===0?(m({type:1}),x.nextFrame(()=>{var P;return(P=a.buttonRef.current)==null?void 0:P.focus({preventScroll:!0})})):($.preventDefault(),m({type:0})))}),T=b.useMemo(()=>({open:a.menuState===0}),[a]),M={ref:v,id:u,type:so(t,a.buttonRef),"aria-haspopup":"menu","aria-controls":(r=a.itemsRef.current)==null?void 0:r.id,"aria-expanded":a.menuState===0,onKeyDown:E,onKeyUp:k,onClick:R};return pt({ourProps:M,theirProps:f,slot:T,defaultTag:Iu,name:"Menu.Button"})}let Pu="div",Fu=dn.RenderStrategy|dn.Static;function Mu(t,l){var r,n;let u=Dt(),{id:f=`headlessui-menu-items-${u}`,...a}=t,[m,v]=kr("Menu.Items"),x=wt(m.itemsRef,l),E=wn(m.itemsRef),k=tn(),R=Un(),T=R!==null?(R&Ct.Open)===Ct.Open:m.menuState===0;b.useEffect(()=>{let _=m.itemsRef.current;_&&m.menuState===0&&_!==(E==null?void 0:E.activeElement)&&_.focus({preventScroll:!0})},[m.menuState,m.itemsRef,E]),jl({container:m.itemsRef.current,enabled:m.menuState===0,accept(_){return _.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:_.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(_){_.setAttribute("role","none")}});let M=ee(_=>{var q,te;switch(k.dispose(),_.key){case Ge.Space:if(m.searchQuery!=="")return _.preventDefault(),_.stopPropagation(),v({type:3,value:_.key});case Ge.Enter:if(_.preventDefault(),_.stopPropagation(),v({type:1}),m.activeItemIndex!==null){let{dataRef:re}=m.items[m.activeItemIndex];(te=(q=re.current)==null?void 0:q.domRef.current)==null||te.click()}gl(m.buttonRef.current);break;case Ge.ArrowDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.Next});case Ge.ArrowUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.Previous});case Ge.Home:case Ge.PageUp:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.First});case Ge.End:case Ge.PageDown:return _.preventDefault(),_.stopPropagation(),v({type:2,focus:rt.Last});case Ge.Escape:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{var re;return(re=m.buttonRef.current)==null?void 0:re.focus({preventScroll:!0})});break;case Ge.Tab:_.preventDefault(),_.stopPropagation(),v({type:1}),Wt().nextFrame(()=>{Is(m.buttonRef.current,_.shiftKey?nn.Previous:nn.Next)});break;default:_.key.length===1&&(v({type:3,value:_.key}),k.setTimeout(()=>v({type:4}),350));break}}),$=ee(_=>{switch(_.key){case Ge.Space:_.preventDefault();break}}),P=b.useMemo(()=>({open:m.menuState===0}),[m]),B={"aria-activedescendant":m.activeItemIndex===null||(r=m.items[m.activeItemIndex])==null?void 0:r.id,"aria-labelledby":(n=m.buttonRef.current)==null?void 0:n.id,id:f,onKeyDown:M,onKeyUp:$,role:"menu",tabIndex:0,ref:x};return pt({ourProps:B,theirProps:a,slot:P,defaultTag:Pu,features:Fu,visible:T,name:"Menu.Items"})}let Ru=b.Fragment;function Lu(t,l){let r=Dt(),{id:n=`headlessui-menu-item-${r}`,disabled:u=!1,...f}=t,[a,m]=kr("Menu.Item"),v=a.activeItemIndex!==null?a.items[a.activeItemIndex].id===n:!1,x=b.useRef(null),E=wt(l,x);nt(()=>{if(a.__demoMode||a.menuState!==0||!v||a.activationTrigger===0)return;let re=Wt();return re.requestAnimationFrame(()=>{var pe,Pe;(Pe=(pe=x.current)==null?void 0:pe.scrollIntoView)==null||Pe.call(pe,{block:"nearest"})}),re.dispose},[a.__demoMode,x,v,a.menuState,a.activationTrigger,a.activeItemIndex]);let k=wu(x),R=b.useRef({disabled:u,domRef:x,get textValue(){return k()}});nt(()=>{R.current.disabled=u},[R,u]),nt(()=>(m({type:5,id:n,dataRef:R}),()=>m({type:6,id:n})),[R,n]);let T=ee(()=>{m({type:1})}),M=ee(re=>{if(u)return re.preventDefault();m({type:1}),gl(a.buttonRef.current)}),$=ee(()=>{if(u)return m({type:2,focus:rt.Nothing});m({type:2,focus:rt.Specific,id:n})}),P=Cl(),B=ee(re=>P.update(re)),_=ee(re=>{P.wasMoved(re)&&(u||v||m({type:2,focus:rt.Specific,id:n,trigger:0}))}),q=ee(re=>{P.wasMoved(re)&&(u||v&&m({type:2,focus:rt.Nothing}))}),te=b.useMemo(()=>({active:v,disabled:u,close:T}),[v,u,T]);return pt({ourProps:{id:n,ref:E,role:"menuitem",tabIndex:u===!0?void 0:-1,"aria-disabled":u===!0?!0:void 0,disabled:void 0,onClick:M,onFocus:$,onPointerEnter:B,onMouseEnter:B,onPointerMove:_,onMouseMove:_,onPointerLeave:q,onMouseLeave:q},theirProps:f,slot:te,defaultTag:Ru,name:"Menu.Item"})}let Au=mt(Nu),Du=mt(ku),$u=mt(Mu),_u=mt(Lu),Pr=Object.assign(Au,{Button:Du,Items:$u,Item:_u}),Zl=b.createContext(null);function Yl(){let t=b.useContext(Zl);if(t===null){let l=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(l,Yl),l}return t}function Bu(){let[t,l]=b.useState([]);return[t.length>0?t.join(" "):void 0,b.useMemo(()=>function(r){let n=ee(f=>(l(a=>[...a,f]),()=>l(a=>{let m=a.slice(),v=m.indexOf(f);return v!==-1&&m.splice(v,1),m}))),u=b.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return b.createElement(Zl.Provider,{value:u},r.children)},[l])]}let zu="label";function Wu(t,l){let r=Dt(),{id:n=`headlessui-label-${r}`,passive:u=!1,...f}=t,a=Yl(),m=wt(l);nt(()=>a.register(n),[n,a.register]);let v={ref:m,...a.props,id:n};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in f&&delete f.onClick),pt({ourProps:v,theirProps:f,slot:a.slot||{},defaultTag:zu,name:a.name||"Label"})}let Hu=mt(Wu),Uu=Object.assign(Hu,{});function Vu(t=0){let[l,r]=b.useState(t),n=Zn(),u=b.useCallback(v=>{n.current&&r(x=>x|v)},[l,n]),f=b.useCallback(v=>!!(l&v),[l]),a=b.useCallback(v=>{n.current&&r(x=>x&~v)},[r,n]),m=b.useCallback(v=>{n.current&&r(x=>x^v)},[r]);return{flags:l,addFlag:u,hasFlag:f,removeFlag:a,toggleFlag:m}}let jo=b.createContext(null);jo.displayName="GroupContext";let Zu=b.Fragment;function Yu(t){var l;let[r,n]=b.useState(null),[u,f]=Bu(),[a,m]=zl(),v=b.useMemo(()=>({switch:r,setSwitch:n,labelledby:u,describedby:a}),[r,n,u,a]),x={},E=t;return b.createElement(m,{name:"Switch.Description"},b.createElement(f,{name:"Switch.Label",props:{htmlFor:(l=v.switch)==null?void 0:l.id,onClick(k){r&&(k.currentTarget.tagName==="LABEL"&&k.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},b.createElement(jo.Provider,{value:v},pt({ourProps:x,theirProps:E,defaultTag:Zu,name:"Switch.Group"}))))}let Gu="button";function qu(t,l){var r;let n=Dt(),{id:u=`headlessui-switch-${n}`,checked:f,defaultChecked:a=!1,onChange:m,disabled:v=!1,name:x,value:E,form:k,...R}=t,T=b.useContext(jo),M=b.useRef(null),$=wt(M,l,T===null?null:T.setSwitch),[P,B]=pl(f,m,a),_=ee(()=>B==null?void 0:B(!P)),q=ee(Te=>{if(Nr(Te.currentTarget))return Te.preventDefault();Te.preventDefault(),_()}),te=ee(Te=>{Te.key===Ge.Space?(Te.preventDefault(),_()):Te.key===Ge.Enter&&$s(Te.currentTarget)}),re=ee(Te=>Te.preventDefault()),pe=b.useMemo(()=>({checked:P}),[P]),Pe={id:u,ref:$,role:"switch",type:so(t,M),tabIndex:t.tabIndex===-1?0:(r=t.tabIndex)!=null?r:0,"aria-checked":P,"aria-labelledby":T==null?void 0:T.labelledby,"aria-describedby":T==null?void 0:T.describedby,disabled:v,onClick:q,onKeyUp:te,onKeyPress:re},ke=tn();return b.useEffect(()=>{var Te;let y=(Te=M.current)==null?void 0:Te.closest("form");y&&a!==void 0&&ke.addEventListener(y,"reset",()=>{B(a)})},[M,B]),b.createElement(b.Fragment,null,x!=null&&P&&b.createElement(Hn,{features:Pn.Hidden,...Or({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:v,form:k,checked:P,name:x,value:E})}),pt({ourProps:Pe,theirProps:R,slot:pe,defaultTag:Gu,name:"Switch"}))}let Ku=mt(qu),Xu=Yu,Ju=Object.assign(Ku,{Group:Xu,Label:Uu,Description:Wl});function Qu(t){let l={called:!1};return(...r)=>{if(!l.called)return l.called=!0,t(...r)}}function To(t,...l){t&&l.length>0&&t.classList.add(...l)}function Oo(t,...l){t&&l.length>0&&t.classList.remove(...l)}function ec(t,l){let r=Wt();if(!t)return r.dispose;let{transitionDuration:n,transitionDelay:u}=getComputedStyle(t),[f,a]=[n,u].map(v=>{let[x=0]=v.split(",").filter(Boolean).map(E=>E.includes("ms")?parseFloat(E):parseFloat(E)*1e3).sort((E,k)=>k-E);return x}),m=f+a;if(m!==0){r.group(x=>{x.setTimeout(()=>{l(),x.dispose()},m),x.addEventListener(t,"transitionrun",E=>{E.target===E.currentTarget&&x.dispose()})});let v=r.addEventListener(t,"transitionend",x=>{x.target===x.currentTarget&&(l(),v())})}else l();return r.add(()=>l()),r.dispose}function tc(t,l,r,n){let u=r?"enter":"leave",f=Wt(),a=n!==void 0?Qu(n):()=>{};u==="enter"&&(t.removeAttribute("hidden"),t.style.display="");let m=bt(u,{enter:()=>l.enter,leave:()=>l.leave}),v=bt(u,{enter:()=>l.enterTo,leave:()=>l.leaveTo}),x=bt(u,{enter:()=>l.enterFrom,leave:()=>l.leaveFrom});return Oo(t,...l.base,...l.enter,...l.enterTo,...l.enterFrom,...l.leave,...l.leaveFrom,...l.leaveTo,...l.entered),To(t,...l.base,...m,...x),f.nextFrame(()=>{Oo(t,...l.base,...m,...x),To(t,...l.base,...m,...v),ec(t,()=>(Oo(t,...l.base,...m),To(t,...l.base,...l.entered),a()))}),f.dispose}function nc({immediate:t,container:l,direction:r,classes:n,onStart:u,onStop:f}){let a=Zn(),m=tn(),v=Vt(r);nt(()=>{t&&(v.current="enter")},[t]),nt(()=>{let x=Wt();m.add(x.dispose);let E=l.current;if(E&&v.current!=="idle"&&a.current)return x.dispose(),u.current(v.current),x.add(tc(E,n.current,v.current==="enter",()=>{x.dispose(),f.current(v.current)})),x.dispose},[r])}function pn(t=""){return t.split(/\s+/).filter(l=>l.length>1)}let Fr=b.createContext(null);Fr.displayName="TransitionContext";var rc=(t=>(t.Visible="visible",t.Hidden="hidden",t))(rc||{});function oc(){let t=b.useContext(Fr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}function lc(){let t=b.useContext(Mr);if(t===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}let Mr=b.createContext(null);Mr.displayName="NestingContext";function Rr(t){return"children"in t?Rr(t.children):t.current.filter(({el:l})=>l.current!==null).filter(({state:l})=>l==="visible").length>0}function Gl(t,l){let r=Vt(t),n=b.useRef([]),u=Zn(),f=tn(),a=ee((T,M=fn.Hidden)=>{let $=n.current.findIndex(({el:P})=>P===T);$!==-1&&(bt(M,{[fn.Unmount](){n.current.splice($,1)},[fn.Hidden](){n.current[$].state="hidden"}}),f.microTask(()=>{var P;!Rr(n)&&u.current&&((P=r.current)==null||P.call(r))}))}),m=ee(T=>{let M=n.current.find(({el:$})=>$===T);return M?M.state!=="visible"&&(M.state="visible"):n.current.push({el:T,state:"visible"}),()=>a(T,fn.Unmount)}),v=b.useRef([]),x=b.useRef(Promise.resolve()),E=b.useRef({enter:[],leave:[],idle:[]}),k=ee((T,M,$)=>{v.current.splice(0),l&&(l.chains.current[M]=l.chains.current[M].filter(([P])=>P!==T)),l==null||l.chains.current[M].push([T,new Promise(P=>{v.current.push(P)})]),l==null||l.chains.current[M].push([T,new Promise(P=>{Promise.all(E.current[M].map(([B,_])=>_)).then(()=>P())})]),M==="enter"?x.current=x.current.then(()=>l==null?void 0:l.wait.current).then(()=>$(M)):$(M)}),R=ee((T,M,$)=>{Promise.all(E.current[M].splice(0).map(([P,B])=>B)).then(()=>{var P;(P=v.current.shift())==null||P()}).then(()=>$(M))});return b.useMemo(()=>({children:n,register:m,unregister:a,onStart:k,onStop:R,wait:x,chains:E}),[m,a,n,k,R,E,x])}function ic(){}let sc=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ql(t){var l;let r={};for(let n of sc)r[n]=(l=t[n])!=null?l:ic;return r}function ac(t){let l=b.useRef(ql(t));return b.useEffect(()=>{l.current=ql(t)},[t]),l}let uc="div",Kl=dn.RenderStrategy;function cc(t,l){var r,n;let{beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m,enter:v,enterFrom:x,enterTo:E,entered:k,leave:R,leaveFrom:T,leaveTo:M,...$}=t,P=b.useRef(null),B=wt(P,l),_=(r=$.unmount)==null||r?fn.Unmount:fn.Hidden,{show:q,appear:te,initial:re}=oc(),[pe,Pe]=b.useState(q?"visible":"hidden"),ke=lc(),{register:Te,unregister:y}=ke;b.useEffect(()=>Te(P),[Te,P]),b.useEffect(()=>{if(_===fn.Hidden&&P.current){if(q&&pe!=="visible"){Pe("visible");return}return bt(pe,{hidden:()=>y(P),visible:()=>Te(P)})}},[pe,P,Te,y,q,_]);let me=Vt({base:pn($.className),enter:pn(v),enterFrom:pn(x),enterTo:pn(E),entered:pn(k),leave:pn(R),leaveFrom:pn(T),leaveTo:pn(M)}),Fe=ac({beforeEnter:u,afterEnter:f,beforeLeave:a,afterLeave:m}),Be=kn();b.useEffect(()=>{if(Be&&pe==="visible"&&P.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[P,pe,Be]);let it=re&&!te,U=te&&q&&re,Xe=!Be||it?"idle":q?"enter":"leave",$e=Vu(0),ue=ee(ht=>bt(ht,{enter:()=>{$e.addFlag(Ct.Opening),Fe.current.beforeEnter()},leave:()=>{$e.addFlag(Ct.Closing),Fe.current.beforeLeave()},idle:()=>{}})),Oe=ee(ht=>bt(ht,{enter:()=>{$e.removeFlag(Ct.Opening),Fe.current.afterEnter()},leave:()=>{$e.removeFlag(Ct.Closing),Fe.current.afterLeave()},idle:()=>{}})),Je=Gl(()=>{Pe("hidden"),y(P)},ke),Et=b.useRef(!1);nc({immediate:U,container:P,classes:me,direction:Xe,onStart:Vt(ht=>{Et.current=!0,Je.onStart(P,ht,ue)}),onStop:Vt(ht=>{Et.current=!1,Je.onStop(P,ht,Oe),ht==="leave"&&!Rr(Je)&&(Pe("hidden"),y(P))})});let ut=$,kt={ref:B};return U?ut={...ut,className:jr($.className,...me.current.enter,...me.current.enterFrom)}:Et.current&&(ut.className=jr($.className,(n=P.current)==null?void 0:n.className),ut.className===""&&delete ut.className),b.createElement(Mr.Provider,{value:Je},b.createElement(co,{value:bt(pe,{visible:Ct.Open,hidden:Ct.Closed})|$e.flags},pt({ourProps:kt,theirProps:ut,defaultTag:uc,features:Kl,visible:pe==="visible",name:"Transition.Child"})))}function dc(t,l){let{show:r,appear:n=!1,unmount:u=!0,...f}=t,a=b.useRef(null),m=wt(a,l);kn();let v=Un();if(r===void 0&&v!==null&&(r=(v&Ct.Open)===Ct.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[x,E]=b.useState(r?"visible":"hidden"),k=Gl(()=>{E("hidden")}),[R,T]=b.useState(!0),M=b.useRef([r]);nt(()=>{R!==!1&&M.current[M.current.length-1]!==r&&(M.current.push(r),T(!1))},[M,r]);let $=b.useMemo(()=>({show:r,appear:n,initial:R}),[r,n,R]);b.useEffect(()=>{if(r)E("visible");else if(!Rr(k))E("hidden");else{let q=a.current;if(!q)return;let te=q.getBoundingClientRect();te.x===0&&te.y===0&&te.width===0&&te.height===0&&E("hidden")}},[r,k]);let P={unmount:u},B=ee(()=>{var q;R&&T(!1),(q=t.beforeEnter)==null||q.call(t)}),_=ee(()=>{var q;R&&T(!1),(q=t.beforeLeave)==null||q.call(t)});return b.createElement(Mr.Provider,{value:k},b.createElement(Fr.Provider,{value:$},pt({ourProps:{...P,as:b.Fragment,children:b.createElement(Xl,{ref:m,...P,...f,beforeEnter:B,beforeLeave:_})},theirProps:{},defaultTag:b.Fragment,features:Kl,visible:x==="visible",name:"Transition"})))}function fc(t,l){let r=b.useContext(Fr)!==null,n=Un()!==null;return b.createElement(b.Fragment,null,!r&&n?b.createElement(No,{ref:l,...t}):b.createElement(Xl,{ref:l,...t}))}let No=mt(dc),Xl=mt(cc),pc=mt(fc),Cn=Object.assign(No,{Child:pc,Root:No});function mc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const hc=G.forwardRef(mc);function vc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const gc=G.forwardRef(vc);function bc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const xc=G.forwardRef(bc);function yc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const wc=G.forwardRef(yc);function Ec({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Jl=G.forwardRef(Ec);function Sc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Cc=G.forwardRef(Sc);function jc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const Tc=G.forwardRef(jc);function Oc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const Nc=G.forwardRef(Oc),Ic={warning:{color:"bg-yellow-50",icon:j.jsx(Cc,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:j.jsx(Nc,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:j.jsx(xc,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:j.jsx(Tc,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},kc=({type:t="info",title:l,message:r,active:n=!1,time:u=1e3,onClose:f})=>{const[a,m]=b.useState(!1),v=b.useRef(null);b.useEffect(()=>(n&&(m(!0),v.current=setTimeout(()=>{m(!1),f&&f()},u)),()=>clearTimeout(v.current)),[n,u,f]);const x=Ic[t];return a?j.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:j.jsx(Cn,{as:b.Fragment,show:a,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:j.jsxs("div",{className:se("rounded-md p-4 text-center",x.color),children:[j.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[x.icon,j.jsx("h3",{className:se("text-sm font-medium ml-3",x.colorTitle),children:l})]}),j.jsx("div",{className:se("mt-2 text-sm",x.colorText),children:j.jsx("p",{children:r})})]})})}):null};function Pc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const Fc=G.forwardRef(Pc);function Mc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const Rc=G.forwardRef(Mc);function Lc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),G.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const Ac=G.forwardRef(Lc);function Dc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const $c=G.forwardRef(Dc);function _c({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const Bc=G.forwardRef(_c);function zc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Wc=G.forwardRef(zc),Hc=({src:t,alt:l,width:r,height:n,className:u="",classNameIcon:f="",isIcon:a=!0,acronym:m=""})=>{function v(){if(typeof m!="string")return m;const x=m.toLowerCase(),E=x.split(" "),k=E[E.length-1];return x.charAt(0)+k.charAt(0)}return j.jsx(j.Fragment,{children:t?j.jsx("img",{src:t,alt:l,width:r,height:n,className:se(u!==""&&u),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:x=>x.currentTarget.style.filter="none","data-testid":"img"}):a?j.jsx(Bc,{className:se("bg-white text-default-5",f!==""?f:"w-7 h-7")}):j.jsx("div",{className:se("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",f!==""?f:"w-7 h-7"),children:v()})})},Uc=({steps:t,onClick:l})=>{const[r,n]=b.useState(0),u=f=>{n(f),l(f)};return j.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:j.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(t).fill(1).map((f,a)=>j.jsx("li",{children:r!==a?j.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>u(a),"data-testid":`step-${a}`,children:j.jsx("span",{className:"sr-only",children:"step"})}):j.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[j.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:j.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),j.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),j.jsx("span",{className:"sr-only",children:"step"})]})},a))})})};var Ql={exports:{}};/*!
|
|
32
32
|
Copyright (c) 2018 Jed Watson.
|
|
33
33
|
Licensed under the MIT License (MIT), see
|
|
34
34
|
http://jedwatson.github.io/classnames
|
|
35
|
-
*/(function(t){(function(){var l={}.hasOwnProperty;function r(){for(var f="",a=0;a<arguments.length;a++){var m=arguments[a];m&&(f=u(f,n(m)))}return f}function n(f){if(typeof f=="string"||typeof f=="number")return f;if(typeof f!="object")return"";if(Array.isArray(f))return r.apply(null,f);if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]"))return f.toString();var a="";for(var m in f)l.call(f,m)&&f[m]&&(a=u(a,m));return a}function u(f,a){return a?f?f+" "+a:f+a:f}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(Ql);var Vc=Ql.exports;const mn=os(Vc),ei=({className:t="text-sm w-full rounded-md",children:l,icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=mn({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return j.jsxs("button",{className:se("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",t),type:f,onClick:a,disabled:u,"data-testid":`button-outline-${m}`,id:`button-outline-${m}`,children:[n==="start"&&r!==null&&j.jsx("span",{children:r}),j.jsx("span",{className:se("flex",v),id:m,children:l}),n==="end"&&r!==null&&j.jsx("span",{children:r})]})},ti=({children:t,className:l="",icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=mn({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return j.jsxs("button",{className:`${l} flex justify-center items-center`,edge:n,type:f,onClick:a,disabled:u,"data-testid":`button-${m}`,children:[n==="start"&&r!==null&&j.jsx("span",{children:r}),j.jsx("span",{className:v,children:t}),n==="end"&&r!==null&&j.jsx("span",{children:r})]})},Xn=({children:t,classNameButton:l="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:r="",icon:n=null,edge:u=null,disabled:f=!1,type:a="button",onClick:m,id:v,outline:x="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:E=""})=>{const[k,R]=b.useState(!1),T=mn({"ml-2":u==="start"&&n!==null,"mr-2":u==="end"&&n!==null}),M=()=>{m&&m()};return j.jsx("div",{className:se("rounded-md p-0.5",E!==""&&E),style:{boxShadow:k?x:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:j.jsxs("button",{className:se("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",f&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",f?l.replace(/\bbg-\w+\b/g,""):l),type:a,onClick:M,onFocus:()=>R(!0),onBlur:()=>R(!1),disabled:f,"data-testid":`button-solid-${v}`,children:[u==="start"&&n!==null&&j.jsx("span",{className:"flex",children:n}),j.jsx("span",{className:se(r.length===0&&T,r.length!==0&&r),children:t}),u==="end"&&n!==null&&j.jsx("span",{children:n})]})})},Zc=({label:t=null,checked:l=!1,onChange:r,id:n,className:u="",classNameCheckbox:f="h-4 w-4",style:a={},disabled:m=!1})=>{const[v,x]=b.useState(!1);return b.useEffect(()=>{x(l)},[l]),j.jsxs("div",{className:"flex items-center",style:a,"data-testid":`container-check-${n}`,children:[j.jsx("input",{checked:v,id:`${t}-${n}`,value:n,"aria-describedby":"comments-description",type:"checkbox",onChange:r,className:se("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",f!==""&&f),"data-testid":`checkbox-${n}`,disabled:m}),t!==null?j.jsx("label",{htmlFor:`${t}-${n}`,className:`ml-2.5 font-normal cursor-pointer ${u}`,id:`label-${n}`,"data-testid":"label",children:t}):null]})};function Yc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Gc=Y.forwardRef(Yc);function qc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Kc=Y.forwardRef(qc);function Xc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Jc=Y.forwardRef(Xc);function Qc({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const ed=Y.forwardRef(Qc);function td({title:t,titleId:l,...r},n){return Y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?Y.createElement("title",{id:l},t):null,Y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const nd=Y.forwardRef(td);function ni({children:t,className:l="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:r="",isOpen:n=!1,setIsOpen:u,showIconSuccess:f=!0,showButton:a=!0,style:m={}}){return j.jsx(Cn,{show:n,as:b.Fragment,children:j.jsxs(Hl,{as:"div",className:"z-50 relative",onClose:u,"data-testid":"modal",children:[j.jsx(Cn.Child,{as:b.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:j.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>u(!1)})}),j.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:j.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:j.jsx(Cn.Child,{as:b.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:j.jsxs(Hl.Panel,{className:se("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",l!==""&&l),style:m,children:[f&&j.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:j.jsx(Gc,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),j.jsx("div",{className:se(r!==""&&r),"data-testid":"content",children:t}),a&&j.jsx("div",{className:"mt-5 sm:mt-6",children:j.jsx(Xn,{id:"close-modal",onClick:()=>u(!1),children:"Cerrar"})}),j.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const rd=({isOpenModalConfirmation:t,setIsOpenModalConfirmation:l,close:r,title:n="¿Estás seguro de abandonar la creación de la acción?",description:u="La información se perderá si no creas la acción",classNameTitle:f="",classNameDescription:a=""})=>{const m=()=>{l(!1),r()};return j.jsxs(ni,{isOpen:t,setIsOpen:()=>l(),showButton:!1,showIconSuccess:!1,children:[j.jsx("p",{className:se("text-center text-sm",f!==""&&f),children:n}),j.jsx("p",{className:se("text-center text-sm",a!==""&&a),children:u}),j.jsxs("div",{className:"flex w-full justify-center mt-5",children:[j.jsx(ei,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>l(),id:"cancel",children:"Cancelar"}),j.jsx(Xn,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 focus-visible:outline-secondary-2 shadow-secondary-2 rounded py-1.5 text-white w-full px-5",outline:"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",onClick:m,id:"confirmation",children:"Aceptar"})]})]})},od=({className:t="",style:l={}})=>j.jsx("div",{className:se("w-px",t!==""&&t),style:l}),ld=({onClick:t,id:l="",className:r=""})=>j.jsxs("div",{className:se("flex items-center text-default-5",r!==""&&r),"data-testid":l,children:[j.jsx(Fc,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:t}),j.jsx("span",{onClick:t,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]});var Io={exports:{}};(function(t,l){(function(r,n){n(l,b,wr)})(rs,function(r,n,u){function f(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(i,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return i.default=e,Object.freeze(i)}const a=f(n),m=(e,i=!1)=>{function o(s){if(typeof s!="object"||s===null)return s;const c=Array.isArray(s)?[]:{};for(const d in s)s.hasOwnProperty(d)&&!i&&(c[d]=o(s[d]));return c}return e.map(s=>o(s))},v=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function x(...e){return e.filter(Boolean).join(" ")}const E=e=>{const i=e.split(" ");let o=e.slice(0,2);return i.length>1&&(o=`${e.at(0)}${i[i.length-1].slice(0,1)}`),o},k=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,R="The user aborted a request.",T="signal is aborted without reason",M=({id:e,close:i,isPathsTest:o=!1,isTest:s=!1})=>{const c=n.useCallback(d=>{d.some(p=>p.getAttribute===void 0?!1:p.getAttribute("id")===e)||i()},[i,e]);n.useEffect(()=>{const d=p=>{const h=p.composedPath();h===void 0||o||(s&&(h[0].getAttribute=()=>e),c(h))};return window.addEventListener("click",d),()=>{window.removeEventListener("click",d)}},[c,o,s,e])},$=()=>{const e=n.useRef({}),[i,o]=n.useState({}),[s,c]=n.useState({}),[d,p]=n.useState([]);n.useEffect(()=>{e.current={}},[]);const h=I=>L=>{L.preventDefault(),L.stopPropagation(),I(i)},g=(I,L,N)=>{const{checked:A,value:F,name:D,type:H,id:z}=I.target,K={radio:z,checkbox:A};e.current={...N,...e.current,[D]:K[H]??F},o({...e.current,[D]:K[H]??F}),L({...e.current,[D]:K[H]??F})},w=n.useCallback((I,L)=>{e.current={...e.current,[I]:L},o(N=>({...N,[I]:L}))},[]),O=n.useCallback((I,L)=>{const N=L.filter(A=>I[A]===""||I[A]===void 0);return N.forEach(A=>c(F=>({...F,[A]:"Este campo es requerido"}))),p(N),N.length>0},[]);return{handleSubmit:h,handleChange:g,setValuesDefault:w,validateFields:O,errors:d,model:i,handleError:(I,L)=>{L.forEach(N=>c(A=>({...A,[N]:I}))),p(L)},messageError:s,setModel:o}},P=e=>{const[i,o]=n.useState(!0),[s,c]=n.useState(!1),d=n.useCallback((p,h)=>{const g=e.match(/[0-9]+/g);if(g===null)return;const[w]=g;h=Math.min(window.innerWidth,window.outerWidth);const O=p?h>=Number(w):h<=Number(w);c(O)},[e]);return n.useEffect(()=>{const p=/\(min-width:\s?[0-9]+px\)/gi.test(e),h=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!p&&!h&&o(!1),!p&&!h)return;const g=Math.min(window.innerWidth,window.outerWidth);d(p,g)},[e,d]),n.useEffect(()=>{if(!i)return;const p=Math.min(window.innerWidth,window.outerWidth);function h(){const g=/min-width/gi.test(e);d(g,p)}return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[i,e,d]),s},B=()=>{const[e,i]=n.useState({width:0,height:0});return n.useEffect(()=>{const o=()=>{const s=Math.min(window.innerWidth,window.outerWidth),c=Math.min(window.innerHeight,window.outerHeight);i({width:s,height:c})};return requestAnimationFrame(()=>o()),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function _(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q={exports:{}},te={};/**
|
|
35
|
+
*/(function(t){(function(){var l={}.hasOwnProperty;function r(){for(var f="",a=0;a<arguments.length;a++){var m=arguments[a];m&&(f=u(f,n(m)))}return f}function n(f){if(typeof f=="string"||typeof f=="number")return f;if(typeof f!="object")return"";if(Array.isArray(f))return r.apply(null,f);if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]"))return f.toString();var a="";for(var m in f)l.call(f,m)&&f[m]&&(a=u(a,m));return a}function u(f,a){return a?f?f+" "+a:f+a:f}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(Ql);var Vc=Ql.exports;const mn=os(Vc),ei=({className:t="text-sm w-full rounded-md",children:l,icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=mn({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return j.jsxs("button",{className:se("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",t),type:f,onClick:a,disabled:u,"data-testid":`button-outline-${m}`,id:`button-outline-${m}`,children:[n==="start"&&r!==null&&j.jsx("span",{children:r}),j.jsx("span",{className:se("flex",v),id:m,children:l}),n==="end"&&r!==null&&j.jsx("span",{children:r})]})},ti=({children:t,className:l="",icon:r=null,edge:n=null,disabled:u=!1,type:f="button",onClick:a,id:m})=>{const v=mn({"ml-2":n==="start"&&r!==null,"mr-2":n==="end"&&r!==null});return j.jsxs("button",{className:`${l} flex justify-center items-center`,edge:n,type:f,onClick:a,disabled:u,"data-testid":`button-${m}`,children:[n==="start"&&r!==null&&j.jsx("span",{children:r}),j.jsx("span",{className:v,children:t}),n==="end"&&r!==null&&j.jsx("span",{children:r})]})},Xn=({children:t,classNameButton:l="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:r="",icon:n=null,edge:u=null,disabled:f=!1,type:a="button",onClick:m,id:v,outline:x="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:E=""})=>{const[k,R]=b.useState(!1),T=mn({"ml-2":u==="start"&&n!==null,"mr-2":u==="end"&&n!==null}),M=()=>{m&&m()};return j.jsx("div",{className:se("rounded-md p-0.5",E!==""&&E),style:{boxShadow:k?x:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:j.jsxs("button",{className:se("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",f&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",f?l.replace(/\bbg-\w+\b/g,""):l),type:a,onClick:M,onFocus:()=>R(!0),onBlur:()=>R(!1),disabled:f,"data-testid":`button-solid-${v}`,children:[u==="start"&&n!==null&&j.jsx("span",{className:"flex",children:n}),j.jsx("span",{className:se(r.length===0&&T,r.length!==0&&r),children:t}),u==="end"&&n!==null&&j.jsx("span",{children:n})]})})},Zc=({label:t=null,checked:l=!1,onChange:r,id:n,className:u="",classNameCheckbox:f="h-4 w-4",style:a={},disabled:m=!1})=>{const[v,x]=b.useState(!1);return b.useEffect(()=>{x(l)},[l]),j.jsxs("div",{className:"flex items-center",style:a,"data-testid":`container-check-${n}`,children:[j.jsx("input",{checked:v,id:`${t}-${n}`,value:n,"aria-describedby":"comments-description",type:"checkbox",onChange:r,className:se("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",f!==""&&f),"data-testid":`checkbox-${n}`,disabled:m}),t!==null?j.jsx("label",{htmlFor:`${t}-${n}`,className:`ml-2.5 font-normal cursor-pointer ${u}`,id:`label-${n}`,"data-testid":"label",children:t}):null]})};function Yc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Gc=G.forwardRef(Yc);function qc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Kc=G.forwardRef(qc);function Xc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Jc=G.forwardRef(Xc);function Qc({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const ed=G.forwardRef(Qc);function td({title:t,titleId:l,...r},n){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":l},r),t?G.createElement("title",{id:l},t):null,G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const nd=G.forwardRef(td);function ni({children:t,className:l="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:r="",isOpen:n=!1,setIsOpen:u,showIconSuccess:f=!0,showButton:a=!0,style:m={}}){return j.jsx(Cn,{show:n,as:b.Fragment,children:j.jsxs(Hl,{as:"div",className:"z-50 relative",onClose:u,"data-testid":"modal",children:[j.jsx(Cn.Child,{as:b.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:j.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>u(!1)})}),j.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:j.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:j.jsx(Cn.Child,{as:b.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:j.jsxs(Hl.Panel,{className:se("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",l!==""&&l),style:m,children:[f&&j.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:j.jsx(Gc,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),j.jsx("div",{className:se(r!==""&&r),"data-testid":"content",children:t}),a&&j.jsx("div",{className:"mt-5 sm:mt-6",children:j.jsx(Xn,{id:"close-modal",onClick:()=>u(!1),children:"Cerrar"})}),j.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const rd=({isOpenModalConfirmation:t,setIsOpenModalConfirmation:l,close:r,title:n="¿Estás seguro de abandonar la creación de la acción?",description:u="La información se perderá si no creas la acción",classNameTitle:f="",classNameDescription:a=""})=>{const m=()=>{l(!1),r()};return j.jsxs(ni,{isOpen:t,setIsOpen:()=>l(),showButton:!1,showIconSuccess:!1,children:[j.jsx("p",{className:se("text-center text-sm",f!==""&&f),children:n}),j.jsx("p",{className:se("text-center text-sm",a!==""&&a),children:u}),j.jsxs("div",{className:"flex w-full justify-center mt-5",children:[j.jsx(ei,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>l(),id:"cancel",children:"Cancelar"}),j.jsx(Xn,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 focus-visible:outline-secondary-2 shadow-secondary-2 rounded py-1.5 text-white w-full px-5",outline:"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",onClick:m,id:"confirmation",children:"Aceptar"})]})]})},od=({className:t="",style:l={}})=>j.jsx("div",{className:se("w-px",t!==""&&t),style:l}),ld=({onClick:t,id:l="",className:r=""})=>j.jsxs("div",{className:se("flex items-center text-default-5",r!==""&&r),"data-testid":l,children:[j.jsx(Fc,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:t}),j.jsx("span",{onClick:t,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]});var Io={exports:{}};(function(t,l){(function(r,n){n(l,b,wr)})(rs,function(r,n,u){function f(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(i,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return i.default=e,Object.freeze(i)}const a=f(n),m=(e,i=!1)=>{function o(s){if(typeof s!="object"||s===null)return s;const c=Array.isArray(s)?[]:{};for(const d in s)s.hasOwnProperty(d)&&!i&&(c[d]=o(s[d]));return c}return e.map(s=>o(s))},v=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function x(...e){return e.filter(Boolean).join(" ")}const E=e=>{const i=e.split(" ");let o=e.slice(0,2);return i.length>1&&(o=`${e.at(0)}${i[i.length-1].slice(0,1)}`),o},k=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,R="The user aborted a request.",T="signal is aborted without reason",M=({id:e,close:i,isPathsTest:o=!1,isTest:s=!1})=>{const c=n.useCallback(d=>{d.some(p=>p.getAttribute===void 0?!1:p.getAttribute("id")===e)||i()},[i,e]);n.useEffect(()=>{const d=p=>{const h=p.composedPath();h===void 0||o||(s&&(h[0].getAttribute=()=>e),c(h))};return window.addEventListener("click",d),()=>{window.removeEventListener("click",d)}},[c,o,s,e])},$=()=>{const e=n.useRef({}),[i,o]=n.useState({}),[s,c]=n.useState({}),[d,p]=n.useState([]);n.useEffect(()=>{e.current={}},[]);const h=I=>L=>{L.preventDefault(),L.stopPropagation(),I(i)},g=(I,L,N)=>{const{checked:A,value:F,name:D,type:H,id:z}=I.target,K={radio:z,checkbox:A};e.current={...N,...e.current,[D]:K[H]??F},o({...e.current,[D]:K[H]??F}),L({...e.current,[D]:K[H]??F})},w=n.useCallback((I,L)=>{e.current={...e.current,[I]:L},o(N=>({...N,[I]:L}))},[]),O=n.useCallback((I,L)=>{const N=L.filter(A=>I[A]===""||I[A]===void 0);return N.forEach(A=>c(F=>({...F,[A]:"Este campo es requerido"}))),p(N),N.length>0},[]);return{handleSubmit:h,handleChange:g,setValuesDefault:w,validateFields:O,errors:d,model:i,handleError:(I,L)=>{L.forEach(N=>c(A=>({...A,[N]:I}))),p(L)},messageError:s,setModel:o}},P=e=>{const[i,o]=n.useState(!0),[s,c]=n.useState(!1),d=n.useCallback((p,h)=>{const g=e.match(/[0-9]+/g);if(g===null)return;const[w]=g;h=Math.min(window.innerWidth,window.outerWidth);const O=p?h>=Number(w):h<=Number(w);c(O)},[e]);return n.useEffect(()=>{const p=/\(min-width:\s?[0-9]+px\)/gi.test(e),h=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!p&&!h&&o(!1),!p&&!h)return;const g=Math.min(window.innerWidth,window.outerWidth);d(p,g)},[e,d]),n.useEffect(()=>{if(!i)return;const p=Math.min(window.innerWidth,window.outerWidth);function h(){const g=/min-width/gi.test(e);d(g,p)}return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[i,e,d]),s},B=()=>{const[e,i]=n.useState({width:0,height:0});return n.useEffect(()=>{const o=()=>{const s=Math.min(window.innerWidth,window.outerWidth),c=Math.min(window.innerHeight,window.outerHeight);i({width:s,height:c})};return requestAnimationFrame(()=>o()),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function _(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q={exports:{}},te={};/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-jsx-runtime.production.min.js
|
|
38
38
|
*
|
|
@@ -48,7 +48,7 @@ Check the top-level render call using <`+X+">.")}return W}}function Rn(S,W){{if(
|
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the MIT license found in the
|
|
50
50
|
* LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var ke;function Te(){return ke||(ke=1,process.env.NODE_ENV!=="production"&&function(){var e=n,i=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),A=Symbol.iterator,F="@@iterator";function D(C){if(C===null||typeof C!="object")return null;var V=A&&C[A]||C[F];return typeof V=="function"?V:null}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function z(C){{for(var V=arguments.length,Q=new Array(V>1?V-1:0),we=1;we<V;we++)Q[we-1]=arguments[we];K("error",C,Q)}}function K(C,V,Q){{var we=H.ReactDebugCurrentFrame,tt=we.getStackAddendum();tt!==""&&(V+="%s",Q=Q.concat([tt]));var dt=Q.map(function(Ye){return String(Ye)});dt.unshift("Warning: "+V),Function.prototype.apply.call(console[C],console,dt)}}var ae=!1,oe=!1,he=!1,Ve=!1,ze=!1,ve;ve=Symbol.for("react.module.reference");function xe(C){return!!(typeof C=="string"||typeof C=="function"||C===s||C===d||ze||C===c||C===w||C===O||Ve||C===N||ae||oe||he||typeof C=="object"&&C!==null&&(C.$$typeof===L||C.$$typeof===I||C.$$typeof===p||C.$$typeof===h||C.$$typeof===g||C.$$typeof===ve||C.getModuleId!==void 0))}function Se(C,V,Q){var we=C.displayName;if(we)return we;var tt=V.displayName||V.name||"";return tt!==""?Q+"("+tt+")":Q}function De(C){return C.displayName||"Context"}function st(C){if(C==null)return null;if(typeof C.tag=="number"&&z("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case s:return"Fragment";case o:return"Portal";case d:return"Profiler";case c:return"StrictMode";case w:return"Suspense";case O:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case h:var V=C;return De(V)+".Consumer";case p:var Q=C;return De(Q._context)+".Provider";case g:return Se(C,C.render,"ForwardRef");case I:var we=C.displayName||null;return we!==null?we:st(C.type)||"Memo";case L:{var tt=C,dt=tt._payload,Ye=tt._init;try{return st(Ye(dt))}catch{return null}}}return null}var ft=Object.assign,
|
|
51
|
+
*/var ke;function Te(){return ke||(ke=1,process.env.NODE_ENV!=="production"&&function(){var e=n,i=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),A=Symbol.iterator,F="@@iterator";function D(C){if(C===null||typeof C!="object")return null;var V=A&&C[A]||C[F];return typeof V=="function"?V:null}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function z(C){{for(var V=arguments.length,Q=new Array(V>1?V-1:0),we=1;we<V;we++)Q[we-1]=arguments[we];K("error",C,Q)}}function K(C,V,Q){{var we=H.ReactDebugCurrentFrame,tt=we.getStackAddendum();tt!==""&&(V+="%s",Q=Q.concat([tt]));var dt=Q.map(function(Ye){return String(Ye)});dt.unshift("Warning: "+V),Function.prototype.apply.call(console[C],console,dt)}}var ae=!1,oe=!1,he=!1,Ve=!1,ze=!1,ve;ve=Symbol.for("react.module.reference");function xe(C){return!!(typeof C=="string"||typeof C=="function"||C===s||C===d||ze||C===c||C===w||C===O||Ve||C===N||ae||oe||he||typeof C=="object"&&C!==null&&(C.$$typeof===L||C.$$typeof===I||C.$$typeof===p||C.$$typeof===h||C.$$typeof===g||C.$$typeof===ve||C.getModuleId!==void 0))}function Se(C,V,Q){var we=C.displayName;if(we)return we;var tt=V.displayName||V.name||"";return tt!==""?Q+"("+tt+")":Q}function De(C){return C.displayName||"Context"}function st(C){if(C==null)return null;if(typeof C.tag=="number"&&z("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case s:return"Fragment";case o:return"Portal";case d:return"Profiler";case c:return"StrictMode";case w:return"Suspense";case O:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case h:var V=C;return De(V)+".Consumer";case p:var Q=C;return De(Q._context)+".Provider";case g:return Se(C,C.render,"ForwardRef");case I:var we=C.displayName||null;return we!==null?we:st(C.type)||"Memo";case L:{var tt=C,dt=tt._payload,Ye=tt._init;try{return st(Ye(dt))}catch{return null}}}return null}var ft=Object.assign,Y=0,at,_e,gt,ie,We,lt,Tt;function Rt(){}Rt.__reactDisabledLog=!0;function yt(){{if(Y===0){at=console.log,_e=console.info,gt=console.warn,ie=console.error,We=console.group,lt=console.groupCollapsed,Tt=console.groupEnd;var C={configurable:!0,enumerable:!0,value:Rt,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}Y++}}function Le(){{if(Y--,Y===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ft({},C,{value:at}),info:ft({},C,{value:_e}),warn:ft({},C,{value:gt}),error:ft({},C,{value:ie}),group:ft({},C,{value:We}),groupCollapsed:ft({},C,{value:lt}),groupEnd:ft({},C,{value:Tt})})}Y<0&&z("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var St=H.ReactCurrentDispatcher,Ke;function At(C,V,Q){{if(Ke===void 0)try{throw Error()}catch(tt){var we=tt.stack.trim().match(/\n( *(at )?)/);Ke=we&&we[1]||""}return`
|
|
52
52
|
`+Ke+C}}var ne=!1,ye;{var et=typeof WeakMap=="function"?WeakMap:Map;ye=new et}function zt(C,V){if(!C||ne)return"";{var Q=ye.get(C);if(Q!==void 0)return Q}var we;ne=!0;var tt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var dt;dt=St.current,St.current=null,yt();try{if(V){var Ye=function(){throw Error()};if(Object.defineProperty(Ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ye,[])}catch(un){we=un}Reflect.construct(C,[],Ye)}else{try{Ye.call()}catch(un){we=un}C.call(Ye.prototype)}}else{try{throw Error()}catch(un){we=un}C()}}catch(un){if(un&&we&&typeof un.stack=="string"){for(var Ue=un.stack.split(`
|
|
53
53
|
`),Bt=we.stack.split(`
|
|
54
54
|
`),Nt=Ue.length-1,It=Bt.length-1;Nt>=1&&It>=0&&Ue[Nt]!==Bt[It];)It--;for(;Nt>=1&&It>=0;Nt--,It--)if(Ue[Nt]!==Bt[It]){if(Nt!==1||It!==1)do if(Nt--,It--,It<0||Ue[Nt]!==Bt[It]){var Ut=`
|
|
@@ -59,14 +59,14 @@ Check the render method of \``+C+"`."}return""}}function c0(C){return""}var Ui={
|
|
|
59
59
|
Check the top-level render call using <`+Q+">.")}return V}}function Vi(C,V){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var Q=d0(V);if(Ui[Q])return;Ui[Q]=!0;var we="";C&&C._owner&&C._owner!==ol.current&&(we=" It was passed a child from "+st(C._owner.type)+"."),An(C),z('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,we),An(null)}}function Zi(C,V){{if(typeof C!="object")return;if(nl(C))for(var Q=0;Q<C.length;Q++){var we=C[Q];il(we)&&Vi(we,V)}else if(il(C))C._store&&(C._store.validated=!0);else if(C){var tt=D(C);if(typeof tt=="function"&&tt!==C.entries)for(var dt=tt.call(C),Ye;!(Ye=dt.next()).done;)il(Ye.value)&&Vi(Ye.value,V)}}}function f0(C){{var V=C.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===g||V.$$typeof===I))Q=V.propTypes;else return;if(Q){var we=st(V);Jm(Q,C.props,"prop",we,C)}else if(V.PropTypes!==void 0&&!ll){ll=!0;var tt=st(V);z("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",tt||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&z("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function p0(C){{for(var V=Object.keys(C.props),Q=0;Q<V.length;Q++){var we=V[Q];if(we!=="children"&&we!=="key"){An(C),z("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",we),An(null);break}}C.ref!==null&&(An(C),z("Invalid attribute `ref` supplied to `React.Fragment`."),An(null))}}function Yi(C,V,Q,we,tt,dt){{var Ye=xe(C);if(!Ye){var Ue="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(Ue+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Bt=c0();Bt?Ue+=Bt:Ue+=Hi();var Nt;C===null?Nt="null":nl(C)?Nt="array":C!==void 0&&C.$$typeof===i?(Nt="<"+(st(C.type)||"Unknown")+" />",Ue=" Did you accidentally export a JSX literal instead of a component?"):Nt=typeof C,z("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Nt,Ue)}var It=u0(C,V,Q,tt,dt);if(It==null)return It;if(Ye){var Ut=V.children;if(Ut!==void 0)if(we)if(nl(Ut)){for(var Dn=0;Dn<Ut.length;Dn++)Zi(Ut[Dn],C);Object.freeze&&Object.freeze(Ut)}else z("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Zi(Ut,C)}return C===s?p0(It):f0(It),It}}function m0(C,V,Q){return Yi(C,V,Q,!0)}function h0(C,V,Q){return Yi(C,V,Q,!1)}var v0=h0,g0=m0;Pe.Fragment=s,Pe.jsx=v0,Pe.jsxs=g0}()),Pe}process.env.NODE_ENV==="production"?q.exports=pe():q.exports=Te();var y=q.exports;function me(e,i,o){let s=o.initialDeps??[],c;return()=>{var d,p,h,g;let w;o.key&&(d=o.debug)!=null&&d.call(o)&&(w=Date.now());const O=e();if(!(O.length!==s.length||O.some((L,N)=>s[N]!==L)))return c;s=O;let I;if(o.key&&(p=o.debug)!=null&&p.call(o)&&(I=Date.now()),c=i(...O),o.key&&(h=o.debug)!=null&&h.call(o)){const L=Math.round((Date.now()-w)*100)/100,N=Math.round((Date.now()-I)*100)/100,A=N/16,F=(D,H)=>{for(D=String(D);D.length<H;)D=" "+D;return D};console.info(`%c⏱ ${F(N,5)} /${F(L,5)} ms`,`
|
|
60
60
|
font-size: .6rem;
|
|
61
61
|
font-weight: bold;
|
|
62
|
-
color: hsl(${Math.max(0,Math.min(120-120*A,120))}deg 100% 31%);`,o==null?void 0:o.key)}return(g=o==null?void 0:o.onChange)==null||g.call(o,c),c}}function Fe(e,i){if(e===void 0)throw new Error("Unexpected undefined");return e}const Be=(e,i)=>Math.abs(e-i)<1,it=(e,i,o)=>{let s;return function(...c){e.clearTimeout(s),s=e.setTimeout(()=>i.apply(this,c),o)}},U=e=>e,Xe=e=>{const i=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),s=[];for(let c=i;c<=o;c++)s.push(c);return s},$e=(e,i)=>{const o=e.scrollElement;if(!o)return;const s=e.targetWindow;if(!s)return;const c=p=>{const{width:h,height:g}=p;i({width:Math.round(h),height:Math.round(g)})};if(c(o.getBoundingClientRect()),!s.ResizeObserver)return()=>{};const d=new s.ResizeObserver(p=>{const h=p[0];if(h!=null&&h.borderBoxSize){const g=h.borderBoxSize[0];if(g){c({width:g.inlineSize,height:g.blockSize});return}}c(o.getBoundingClientRect())});return d.observe(o,{box:"border-box"}),()=>{d.unobserve(o)}},ue={passive:!0},Oe=typeof window>"u"?!0:"onscrollend"in window,Je=(e,i)=>{const o=e.scrollElement;if(!o)return;const s=e.targetWindow;if(!s)return;let c=0;const d=Oe?()=>{}:it(s,()=>{i(c,!1)},e.options.isScrollingResetDelay),p=w=>()=>{c=o[e.options.horizontal?"scrollLeft":"scrollTop"],d(),i(c,w)},h=p(!0),g=p(!1);return g(),o.addEventListener("scroll",h,ue),o.addEventListener("scrollend",g,ue),()=>{o.removeEventListener("scroll",h),o.removeEventListener("scrollend",g)}},Et=(e,i,o)=>{if(i!=null&&i.borderBoxSize){const s=i.borderBoxSize[0];if(s)return Math.round(s[o.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[o.options.horizontal?"width":"height"])},ut=(e,{adjustments:i=0,behavior:o},s)=>{var c,d;const p=e+i;(d=(c=s.scrollElement)==null?void 0:c.scrollTo)==null||d.call(c,{[s.options.horizontal?"left":"top"]:p,behavior:o})};class kt{constructor(i){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let o=null;const s=()=>o||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:o=new this.targetWindow.ResizeObserver(c=>{c.forEach(d=>{this._measureElement(d.target,d)})}));return{disconnect:()=>{var c;return(c=s())==null?void 0:c.disconnect()},observe:c=>{var d;return(d=s())==null?void 0:d.observe(c,{box:"border-box"})},unobserve:c=>{var d;return(d=s())==null?void 0:d.unobserve(c)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([s,c])=>{typeof c>"u"&&delete o[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:U,rangeExtractor:Xe,onChange:()=>{},measureElement:Et,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...o}},this.notify=(o,s)=>{var c,d;const{startIndex:p,endIndex:h}=this.range??{startIndex:void 0,endIndex:void 0},g=this.calculateRange();(o||p!==(g==null?void 0:g.startIndex)||h!==(g==null?void 0:g.endIndex))&&((d=(c=this.options).onChange)==null||d.call(c,this,s))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.notify(!1,!1);return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((o=this.scrollElement)==null?void 0:o.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,c=>{this.scrollRect=c,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(c,d)=>{this.scrollAdjustments=0,this.scrollDirection=d?this.getScrollOffset()<c?"forward":"backward":null,this.scrollOffset=c;const p=this.isScrolling;this.isScrolling=d,this.notify(p!==d,d)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(o,s)=>{const c=new Map,d=new Map;for(let p=s-1;p>=0;p--){const h=o[p];if(c.has(h.lane))continue;const g=d.get(h.lane);if(g==null||h.end>g.end?d.set(h.lane,h):h.end<g.end&&c.set(h.lane,!0),c.size===this.options.lanes)break}return d.size===this.options.lanes?Array.from(d.values()).sort((p,h)=>p.end===h.end?p.index-h.index:p.end-h.end)[0]:void 0},this.getMeasurementOptions=me(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(o,s,c,d,p)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p}),{key:!1}),this.getMeasurements=me(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:o,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p},h)=>{var g;if(!p)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(I=>{this.itemSizeCache.set(I.key,I.size)}));const w=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const O=this.measurementsCache.slice(0,w);for(let I=w;I<o;I++){let L=(g=this.measurementsCache[I])==null?void 0:g.measureElement;L||(L=ae=>{const oe=d(I),he=this.elementsCache.get(oe);if(!ae){he&&(this.observer.unobserve(he),this.elementsCache.delete(oe));return}he!==ae&&(he&&this.observer.unobserve(he),this.observer.observe(ae),this.elementsCache.set(oe,ae)),ae.isConnected&&this.resizeItem(I,this.options.measureElement(ae,void 0,this))});const N=d(I),A=this.options.lanes===1?O[I-1]:this.getFurthestMeasurement(O,I),F=A?A.end+this.options.gap:s+c,D=h.get(N),H=typeof D=="number"?D:this.options.estimateSize(I),z=F+H,K=A?A.lane:I%this.options.lanes;O[I]={index:I,start:F,size:H,end:z,key:N,lane:K,measureElement:L}}return this.measurementsCache=O,O},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=me(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(o,s,c)=>this.range=o.length>0&&s>0?Lt({measurements:o,outerSize:s,scrollOffset:c}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=me(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(o,s,c,d)=>s===null?[]:o({startIndex:s.startIndex,endIndex:s.endIndex,overscan:c,count:d}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=o=>{const s=this.options.indexAttribute,c=o.getAttribute(s);return c?parseInt(c,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(o,s)=>{const c=this.indexFromElement(o),d=this.getMeasurements()[c];if(!d||!o.isConnected){this.elementsCache.forEach((h,g)=>{h===o&&(this.observer.unobserve(o),this.elementsCache.delete(g))});return}const p=this.elementsCache.get(d.key);p!==o&&(p&&this.observer.unobserve(p),this.observer.observe(o),this.elementsCache.set(d.key,o)),this.resizeItem(c,this.options.measureElement(o,s,this))},this.resizeItem=(o,s)=>{const c=this.getMeasurements()[o];if(!c)return;const d=this.itemSizeCache.get(c.key)??c.size,p=s-d;p!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(c,p,this):c.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",p),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=p,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(c.index),this.itemSizeCache=new Map(this.itemSizeCache.set(c.key,s)),this.notify(!0,!1))},this.measureElement=o=>{o&&this._measureElement(o,void 0)},this.getVirtualItems=me(()=>[this.getIndexes(),this.getMeasurements()],(o,s)=>{const c=[];for(let d=0,p=o.length;d<p;d++){const h=o[d],g=s[h];c.push(g)}return c},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=o=>{const s=this.getMeasurements();if(s.length!==0)return Fe(s[ht(0,s.length-1,c=>Fe(s[c]).start,o)])},this.getOffsetForAlignment=(o,s)=>{const c=this.getSize(),d=this.getScrollOffset();s==="auto"&&(o<=d?s="start":o>=d+c?s="end":s="start"),s==="start"?o=o:s==="end"?o=o-c:s==="center"&&(o=o-c/2);const p=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[p]:this.scrollElement[p]:0)-c;return Math.max(Math.min(h,o),0)},this.getOffsetForIndex=(o,s="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const c=this.getMeasurements()[o];if(!c)return;const d=this.getSize(),p=this.getScrollOffset();if(s==="auto")if(c.end>=p+d-this.options.scrollPaddingEnd)s="end";else if(c.start<=p+this.options.scrollPaddingStart)s="start";else return[p,s];const h=s==="end"?c.end+this.options.scrollPaddingEnd:c.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(h,s),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(o,{align:s="start",behavior:c}={})=>{this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,s),{adjustments:void 0,behavior:c})},this.scrollToIndex=(o,{align:s="auto",behavior:c}={})=>{o=Math.max(0,Math.min(o,this.options.count-1)),this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const d=this.getOffsetForIndex(o,s);if(!d)return;const[p,h]=d;this._scrollToOffset(p,{adjustments:void 0,behavior:c}),c!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(o))){const[g]=Fe(this.getOffsetForIndex(o,h));Be(g,this.getScrollOffset())||this.scrollToIndex(o,{align:h,behavior:c})}else this.scrollToIndex(o,{align:h,behavior:c})}))},this.scrollBy=(o,{behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+o,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var o;const s=this.getMeasurements();let c;return s.length===0?c=this.options.paddingStart:c=this.options.lanes===1?((o=s[s.length-1])==null?void 0:o.end)??0:Math.max(...s.slice(-this.options.lanes).map(d=>d.end)),c-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(o,{adjustments:s,behavior:c})=>{this.options.scrollToFn(o,{behavior:c,adjustments:s},this)},this.measure=()=>{var o,s;this.itemSizeCache=new Map,(s=(o=this.options).onChange)==null||s.call(o,this,!1)},this.setOptions(i)}}const ht=(e,i,o,s)=>{for(;e<=i;){const c=(e+i)/2|0,d=o(c);if(d<s)e=c+1;else if(d>s)i=c-1;else return c}return e>0?e-1:0};function Lt({measurements:e,outerSize:i,scrollOffset:o}){const s=e.length-1,c=ht(0,s,p=>e[p].start,o);let d=c;for(;d<s&&e[d].end<o+i;)d++;return{startIndex:c,endIndex:d}}const Ne=typeof document<"u"?a.useLayoutEffect:a.useEffect;function Qe(e){const i=a.useReducer(()=>({}),{})[1],o={...e,onChange:(c,d)=>{var p;d?u.flushSync(i):i(),(p=e.onChange)==null||p.call(e,c,d)}},[s]=a.useState(()=>new kt(o));return s.setOptions(o),a.useEffect(()=>s._didMount(),[]),Ne(()=>s._willUpdate()),s}function Ze(e){return Qe({observeElementRect:$e,observeElementOffset:Je,scrollToFn:ut,...e})}var le=Object.defineProperty,Ee=(e,i,o)=>i in e?le(e,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[i]=o,G=(e,i,o)=>(Ee(e,typeof i!="symbol"?i+"":i,o),o);let ge=class{constructor(){G(this,"current",this.detect()),G(this,"handoffState","pending"),G(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ce=new ge,Ie=(e,i)=>{Ce.isServer?n.useEffect(e,i):n.useLayoutEffect(e,i)};function Pt(e){let i=n.useRef(e);return Ie(()=>{i.current=e},[e]),i}function Zt(e,i){let[o,s]=n.useState(e),c=Pt(e);return Ie(()=>s(c.current),[c,s,...i]),o}let J=function(e){let i=Pt(e);return n.useCallback((...o)=>i.current(...o),[i])};function Qn(e,i,o){let[s,c]=n.useState(o),d=e!==void 0,p=n.useRef(d),h=n.useRef(!1),g=n.useRef(!1);return d&&!p.current&&!h.current?(h.current=!0,p.current=d,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!d&&p.current&&!g.current&&(g.current=!0,p.current=d,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[d?e:s,J(w=>(d||c(w),i==null?void 0:i(w)))]}function on(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(i=>setTimeout(()=>{throw i}))}function _t(){let e=[],i={addEventListener(o,s,c,d){return o.addEventListener(s,c,d),i.add(()=>o.removeEventListener(s,c,d))},requestAnimationFrame(...o){let s=requestAnimationFrame(...o);return i.add(()=>cancelAnimationFrame(s))},nextFrame(...o){return i.requestAnimationFrame(()=>i.requestAnimationFrame(...o))},setTimeout(...o){let s=setTimeout(...o);return i.add(()=>clearTimeout(s))},microTask(...o){let s={current:!0};return on(()=>{s.current&&o[0]()}),i.add(()=>{s.current=!1})},style(o,s,c){let d=o.style.getPropertyValue(s);return Object.assign(o.style,{[s]:c}),this.add(()=>{Object.assign(o.style,{[s]:d})})},group(o){let s=_t();return o(s),this.add(()=>s.dispose())},add(o){return e.push(o),()=>{let s=e.indexOf(o);if(s>=0)for(let c of e.splice(s,1))c()}},dispose(){for(let o of e.splice(0))o()}};return i}function Yt(){let[e]=n.useState(_t);return n.useEffect(()=>()=>e.dispose(),[e]),e}function er(){let e=typeof document>"u";return"useSyncExternalStore"in a?(i=>i.useSyncExternalStore)(a)(()=>()=>{},()=>!1,()=>!e):!1}function hn(){let e=er(),[i,o]=a.useState(Ce.isHandoffComplete);return i&&Ce.isHandoffComplete===!1&&o(!1),a.useEffect(()=>{i!==!0&&o(!0)},[i]),a.useEffect(()=>Ce.handoff(),[]),e?!1:i}var Lr;let Ft=(Lr=n.useId)!=null?Lr:function(){let e=hn(),[i,o]=n.useState(e?()=>Ce.nextId():null);return Ie(()=>{i===null&&o(Ce.nextId())},[i]),i!=null?""+i:void 0};function ct(e,i,...o){if(e in i){let c=i[e];return typeof c=="function"?c(...o):c}let s=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(i).map(c=>`"${c}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,ct),s}function Kt(e){return Ce.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let tr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ht=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ht||{}),nr=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(nr||{}),rr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(rr||{});function Ar(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(tr)).sort((i,o)=>Math.sign((i.tabIndex||Number.MAX_SAFE_INTEGER)-(o.tabIndex||Number.MAX_SAFE_INTEGER)))}var or=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(or||{});function lr(e,i=0){var o;return e===((o=Kt(e))==null?void 0:o.body)?!1:ct(i,{0(){return e.matches(tr)},1(){let s=e;for(;s!==null;){if(s.matches(tr))return!0;s=s.parentElement}return!1}})}function Dr(e){let i=Kt(e);_t().nextFrame(()=>{i&&!lr(i.activeElement,0)&&Xt(e)})}var Fo=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Fo||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Xt(e){e==null||e.focus({preventScroll:!0})}let Mo=["textarea","input"].join(",");function ir(e){var i,o;return(o=(i=e==null?void 0:e.matches)==null?void 0:i.call(e,Mo))!=null?o:!1}function Fn(e,i=o=>o){return e.slice().sort((o,s)=>{let c=i(o),d=i(s);if(c===null||d===null)return 0;let p=c.compareDocumentPosition(d);return p&Node.DOCUMENT_POSITION_FOLLOWING?-1:p&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function vn(e,i){return ln(Ar(),i,{relativeTo:e})}function ln(e,i,{sorted:o=!0,relativeTo:s=null,skipElements:c=[]}={}){let d=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,p=Array.isArray(e)?o?Fn(e):e:Ar(e);c.length>0&&p.length>1&&(p=p.filter(N=>!c.includes(N))),s=s??d.activeElement;let h=(()=>{if(i&5)return 1;if(i&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),g=(()=>{if(i&1)return 0;if(i&2)return Math.max(0,p.indexOf(s))-1;if(i&4)return Math.max(0,p.indexOf(s))+1;if(i&8)return p.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),w=i&32?{preventScroll:!0}:{},O=0,I=p.length,L;do{if(O>=I||O+I<=0)return 0;let N=g+O;if(i&16)N=(N+I)%I;else{if(N<0)return 3;if(N>=I)return 1}L=p[N],L==null||L.focus(w),O+=h}while(L!==d.activeElement);return i&6&&ir(L)&&L.select(),2}function Mn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function $r(){return/Android/gi.test(window.navigator.userAgent)}function _r(){return Mn()||$r()}function jn(e,i,o){let s=Pt(i);n.useEffect(()=>{function c(d){s.current(d)}return document.addEventListener(e,c,o),()=>document.removeEventListener(e,c,o)},[e,o])}function Br(e,i,o){let s=Pt(i);n.useEffect(()=>{function c(d){s.current(d)}return window.addEventListener(e,c,o),()=>window.removeEventListener(e,c,o)},[e,o])}function Rn(e,i,o=!0){let s=n.useRef(!1);n.useEffect(()=>{requestAnimationFrame(()=>{s.current=o})},[o]);function c(p,h){if(!s.current||p.defaultPrevented)return;let g=h(p);if(g===null||!g.getRootNode().contains(g)||!g.isConnected)return;let w=function O(I){return typeof I=="function"?O(I()):Array.isArray(I)||I instanceof Set?I:[I]}(e);for(let O of w){if(O===null)continue;let I=O instanceof HTMLElement?O:O.current;if(I!=null&&I.contains(g)||p.composed&&p.composedPath().includes(I))return}return!lr(g,or.Loose)&&g.tabIndex!==-1&&p.preventDefault(),i(p,g)}let d=n.useRef(null);jn("pointerdown",p=>{var h,g;s.current&&(d.current=((g=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:g[0])||p.target)},!0),jn("mousedown",p=>{var h,g;s.current&&(d.current=((g=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:g[0])||p.target)},!0),jn("click",p=>{_r()||d.current&&(c(p,()=>d.current),d.current=null)},!0),jn("touchend",p=>c(p,()=>p.target instanceof HTMLElement?p.target:null),!0),Br("blur",p=>c(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Jt(...e){return n.useMemo(()=>Kt(...e),[...e])}function zr(e){var i;if(e.type)return e.type;let o=(i=e.as)!=null?i:"button";if(typeof o=="string"&&o.toLowerCase()==="button")return"button"}function sr(e,i){let[o,s]=n.useState(()=>zr(e));return Ie(()=>{s(zr(e))},[e.type,e.as]),Ie(()=>{o||i.current&&i.current instanceof HTMLButtonElement&&!i.current.hasAttribute("type")&&s("button")},[o,i]),o}let ar=Symbol();function Ro(e,i=!0){return Object.assign(e,{[ar]:i})}function xt(...e){let i=n.useRef(e);n.useEffect(()=>{i.current=e},[e]);let o=J(s=>{for(let c of i.current)c!=null&&(typeof c=="function"?c(s):c.current=s)});return e.every(s=>s==null||(s==null?void 0:s[ar]))?void 0:o}function Wr(e){return[e.screenX,e.screenY]}function Hr(){let e=n.useRef([-1,-1]);return{wasMoved(i){let o=Wr(i);return e.current[0]===o[0]&&e.current[1]===o[1]?!1:(e.current=o,!0)},update(i){e.current=Wr(i)}}}function S({container:e,accept:i,walk:o,enabled:s=!0}){let c=n.useRef(i),d=n.useRef(o);n.useEffect(()=>{c.current=i,d.current=o},[i,o]),Ie(()=>{if(!e||!s)return;let p=Kt(e);if(!p)return;let h=c.current,g=d.current,w=Object.assign(I=>h(I),{acceptNode:h}),O=p.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,w,!1);for(;O.nextNode();)g(O.currentNode)},[e,s,c,d])}function W(e,i){let o=n.useRef([]),s=J(e);n.useEffect(()=>{let c=[...o.current];for(let[d,p]of i.entries())if(o.current[d]!==p){let h=s(i,c);return o.current=i,h}},[s,...i])}function X(...e){return Array.from(new Set(e.flatMap(i=>typeof i=="string"?i.split(" "):[]))).filter(Boolean).join(" ")}var de=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(de||{}),Me=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Me||{});function fe({ourProps:e,theirProps:i,slot:o,defaultTag:s,features:c,visible:d=!0,name:p,mergeRefs:h}){h=h??Ae;let g=Mt(i,e);if(d)return Re(g,o,s,p,h);let w=c??0;if(w&2){let{static:O=!1,...I}=g;if(O)return Re(I,o,s,p,h)}if(w&1){let{unmount:O=!0,...I}=g;return ct(O?0:1,{0(){return null},1(){return Re({...I,hidden:!0,style:{display:"none"}},o,s,p,h)}})}return Re(g,o,s,p,h)}function Re(e,i={},o,s,c){let{as:d=o,children:p,refName:h="ref",...g}=$t(e,["unmount","static"]),w=e.ref!==void 0?{[h]:e.ref}:{},O=typeof p=="function"?p(i):p;"className"in g&&g.className&&typeof g.className=="function"&&(g.className=g.className(i));let I={};if(i){let L=!1,N=[];for(let[A,F]of Object.entries(i))typeof F=="boolean"&&(L=!0),F===!0&&N.push(A);L&&(I["data-headlessui-state"]=N.join(" "))}if(d===n.Fragment&&Object.keys(vt(g)).length>0){if(!n.isValidElement(O)||Array.isArray(O)&&O.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${s} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(g).map(F=>` - ${F}`).join(`
|
|
62
|
+
color: hsl(${Math.max(0,Math.min(120-120*A,120))}deg 100% 31%);`,o==null?void 0:o.key)}return(g=o==null?void 0:o.onChange)==null||g.call(o,c),c}}function Fe(e,i){if(e===void 0)throw new Error("Unexpected undefined");return e}const Be=(e,i)=>Math.abs(e-i)<1,it=(e,i,o)=>{let s;return function(...c){e.clearTimeout(s),s=e.setTimeout(()=>i.apply(this,c),o)}},U=e=>e,Xe=e=>{const i=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),s=[];for(let c=i;c<=o;c++)s.push(c);return s},$e=(e,i)=>{const o=e.scrollElement;if(!o)return;const s=e.targetWindow;if(!s)return;const c=p=>{const{width:h,height:g}=p;i({width:Math.round(h),height:Math.round(g)})};if(c(o.getBoundingClientRect()),!s.ResizeObserver)return()=>{};const d=new s.ResizeObserver(p=>{const h=p[0];if(h!=null&&h.borderBoxSize){const g=h.borderBoxSize[0];if(g){c({width:g.inlineSize,height:g.blockSize});return}}c(o.getBoundingClientRect())});return d.observe(o,{box:"border-box"}),()=>{d.unobserve(o)}},ue={passive:!0},Oe=typeof window>"u"?!0:"onscrollend"in window,Je=(e,i)=>{const o=e.scrollElement;if(!o)return;const s=e.targetWindow;if(!s)return;let c=0;const d=Oe?()=>{}:it(s,()=>{i(c,!1)},e.options.isScrollingResetDelay),p=w=>()=>{c=o[e.options.horizontal?"scrollLeft":"scrollTop"],d(),i(c,w)},h=p(!0),g=p(!1);return g(),o.addEventListener("scroll",h,ue),o.addEventListener("scrollend",g,ue),()=>{o.removeEventListener("scroll",h),o.removeEventListener("scrollend",g)}},Et=(e,i,o)=>{if(i!=null&&i.borderBoxSize){const s=i.borderBoxSize[0];if(s)return Math.round(s[o.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[o.options.horizontal?"width":"height"])},ut=(e,{adjustments:i=0,behavior:o},s)=>{var c,d;const p=e+i;(d=(c=s.scrollElement)==null?void 0:c.scrollTo)==null||d.call(c,{[s.options.horizontal?"left":"top"]:p,behavior:o})};class kt{constructor(i){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let o=null;const s=()=>o||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:o=new this.targetWindow.ResizeObserver(c=>{c.forEach(d=>{this._measureElement(d.target,d)})}));return{disconnect:()=>{var c;return(c=s())==null?void 0:c.disconnect()},observe:c=>{var d;return(d=s())==null?void 0:d.observe(c,{box:"border-box"})},unobserve:c=>{var d;return(d=s())==null?void 0:d.unobserve(c)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([s,c])=>{typeof c>"u"&&delete o[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:U,rangeExtractor:Xe,onChange:()=>{},measureElement:Et,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...o}},this.notify=(o,s)=>{var c,d;const{startIndex:p,endIndex:h}=this.range??{startIndex:void 0,endIndex:void 0},g=this.calculateRange();(o||p!==(g==null?void 0:g.startIndex)||h!==(g==null?void 0:g.endIndex))&&((d=(c=this.options).onChange)==null||d.call(c,this,s))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.notify(!1,!1);return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((o=this.scrollElement)==null?void 0:o.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,c=>{this.scrollRect=c,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(c,d)=>{this.scrollAdjustments=0,this.scrollDirection=d?this.getScrollOffset()<c?"forward":"backward":null,this.scrollOffset=c;const p=this.isScrolling;this.isScrolling=d,this.notify(p!==d,d)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(o,s)=>{const c=new Map,d=new Map;for(let p=s-1;p>=0;p--){const h=o[p];if(c.has(h.lane))continue;const g=d.get(h.lane);if(g==null||h.end>g.end?d.set(h.lane,h):h.end<g.end&&c.set(h.lane,!0),c.size===this.options.lanes)break}return d.size===this.options.lanes?Array.from(d.values()).sort((p,h)=>p.end===h.end?p.index-h.index:p.end-h.end)[0]:void 0},this.getMeasurementOptions=me(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(o,s,c,d,p)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p}),{key:!1}),this.getMeasurements=me(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:o,paddingStart:s,scrollMargin:c,getItemKey:d,enabled:p},h)=>{var g;if(!p)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(I=>{this.itemSizeCache.set(I.key,I.size)}));const w=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const O=this.measurementsCache.slice(0,w);for(let I=w;I<o;I++){let L=(g=this.measurementsCache[I])==null?void 0:g.measureElement;L||(L=ae=>{const oe=d(I),he=this.elementsCache.get(oe);if(!ae){he&&(this.observer.unobserve(he),this.elementsCache.delete(oe));return}he!==ae&&(he&&this.observer.unobserve(he),this.observer.observe(ae),this.elementsCache.set(oe,ae)),ae.isConnected&&this.resizeItem(I,this.options.measureElement(ae,void 0,this))});const N=d(I),A=this.options.lanes===1?O[I-1]:this.getFurthestMeasurement(O,I),F=A?A.end+this.options.gap:s+c,D=h.get(N),H=typeof D=="number"?D:this.options.estimateSize(I),z=F+H,K=A?A.lane:I%this.options.lanes;O[I]={index:I,start:F,size:H,end:z,key:N,lane:K,measureElement:L}}return this.measurementsCache=O,O},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=me(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(o,s,c)=>this.range=o.length>0&&s>0?Lt({measurements:o,outerSize:s,scrollOffset:c}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=me(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(o,s,c,d)=>s===null?[]:o({startIndex:s.startIndex,endIndex:s.endIndex,overscan:c,count:d}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=o=>{const s=this.options.indexAttribute,c=o.getAttribute(s);return c?parseInt(c,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(o,s)=>{const c=this.indexFromElement(o),d=this.getMeasurements()[c];if(!d||!o.isConnected){this.elementsCache.forEach((h,g)=>{h===o&&(this.observer.unobserve(o),this.elementsCache.delete(g))});return}const p=this.elementsCache.get(d.key);p!==o&&(p&&this.observer.unobserve(p),this.observer.observe(o),this.elementsCache.set(d.key,o)),this.resizeItem(c,this.options.measureElement(o,s,this))},this.resizeItem=(o,s)=>{const c=this.getMeasurements()[o];if(!c)return;const d=this.itemSizeCache.get(c.key)??c.size,p=s-d;p!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(c,p,this):c.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",p),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=p,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(c.index),this.itemSizeCache=new Map(this.itemSizeCache.set(c.key,s)),this.notify(!0,!1))},this.measureElement=o=>{o&&this._measureElement(o,void 0)},this.getVirtualItems=me(()=>[this.getIndexes(),this.getMeasurements()],(o,s)=>{const c=[];for(let d=0,p=o.length;d<p;d++){const h=o[d],g=s[h];c.push(g)}return c},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=o=>{const s=this.getMeasurements();if(s.length!==0)return Fe(s[ht(0,s.length-1,c=>Fe(s[c]).start,o)])},this.getOffsetForAlignment=(o,s)=>{const c=this.getSize(),d=this.getScrollOffset();s==="auto"&&(o<=d?s="start":o>=d+c?s="end":s="start"),s==="start"?o=o:s==="end"?o=o-c:s==="center"&&(o=o-c/2);const p=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[p]:this.scrollElement[p]:0)-c;return Math.max(Math.min(h,o),0)},this.getOffsetForIndex=(o,s="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const c=this.getMeasurements()[o];if(!c)return;const d=this.getSize(),p=this.getScrollOffset();if(s==="auto")if(c.end>=p+d-this.options.scrollPaddingEnd)s="end";else if(c.start<=p+this.options.scrollPaddingStart)s="start";else return[p,s];const h=s==="end"?c.end+this.options.scrollPaddingEnd:c.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(h,s),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(o,{align:s="start",behavior:c}={})=>{this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,s),{adjustments:void 0,behavior:c})},this.scrollToIndex=(o,{align:s="auto",behavior:c}={})=>{o=Math.max(0,Math.min(o,this.options.count-1)),this.cancelScrollToIndex(),c==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const d=this.getOffsetForIndex(o,s);if(!d)return;const[p,h]=d;this._scrollToOffset(p,{adjustments:void 0,behavior:c}),c!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(o))){const[g]=Fe(this.getOffsetForIndex(o,h));Be(g,this.getScrollOffset())||this.scrollToIndex(o,{align:h,behavior:c})}else this.scrollToIndex(o,{align:h,behavior:c})}))},this.scrollBy=(o,{behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+o,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var o;const s=this.getMeasurements();let c;return s.length===0?c=this.options.paddingStart:c=this.options.lanes===1?((o=s[s.length-1])==null?void 0:o.end)??0:Math.max(...s.slice(-this.options.lanes).map(d=>d.end)),c-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(o,{adjustments:s,behavior:c})=>{this.options.scrollToFn(o,{behavior:c,adjustments:s},this)},this.measure=()=>{var o,s;this.itemSizeCache=new Map,(s=(o=this.options).onChange)==null||s.call(o,this,!1)},this.setOptions(i)}}const ht=(e,i,o,s)=>{for(;e<=i;){const c=(e+i)/2|0,d=o(c);if(d<s)e=c+1;else if(d>s)i=c-1;else return c}return e>0?e-1:0};function Lt({measurements:e,outerSize:i,scrollOffset:o}){const s=e.length-1,c=ht(0,s,p=>e[p].start,o);let d=c;for(;d<s&&e[d].end<o+i;)d++;return{startIndex:c,endIndex:d}}const Ne=typeof document<"u"?a.useLayoutEffect:a.useEffect;function Qe(e){const i=a.useReducer(()=>({}),{})[1],o={...e,onChange:(c,d)=>{var p;d?u.flushSync(i):i(),(p=e.onChange)==null||p.call(e,c,d)}},[s]=a.useState(()=>new kt(o));return s.setOptions(o),a.useEffect(()=>s._didMount(),[]),Ne(()=>s._willUpdate()),s}function Ze(e){return Qe({observeElementRect:$e,observeElementOffset:Je,scrollToFn:ut,...e})}var le=Object.defineProperty,Ee=(e,i,o)=>i in e?le(e,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[i]=o,Z=(e,i,o)=>(Ee(e,typeof i!="symbol"?i+"":i,o),o);let ge=class{constructor(){Z(this,"current",this.detect()),Z(this,"handoffState","pending"),Z(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ce=new ge,Ie=(e,i)=>{Ce.isServer?n.useEffect(e,i):n.useLayoutEffect(e,i)};function Pt(e){let i=n.useRef(e);return Ie(()=>{i.current=e},[e]),i}function Zt(e,i){let[o,s]=n.useState(e),c=Pt(e);return Ie(()=>s(c.current),[c,s,...i]),o}let J=function(e){let i=Pt(e);return n.useCallback((...o)=>i.current(...o),[i])};function Qn(e,i,o){let[s,c]=n.useState(o),d=e!==void 0,p=n.useRef(d),h=n.useRef(!1),g=n.useRef(!1);return d&&!p.current&&!h.current?(h.current=!0,p.current=d,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!d&&p.current&&!g.current&&(g.current=!0,p.current=d,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[d?e:s,J(w=>(d||c(w),i==null?void 0:i(w)))]}function on(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(i=>setTimeout(()=>{throw i}))}function _t(){let e=[],i={addEventListener(o,s,c,d){return o.addEventListener(s,c,d),i.add(()=>o.removeEventListener(s,c,d))},requestAnimationFrame(...o){let s=requestAnimationFrame(...o);return i.add(()=>cancelAnimationFrame(s))},nextFrame(...o){return i.requestAnimationFrame(()=>i.requestAnimationFrame(...o))},setTimeout(...o){let s=setTimeout(...o);return i.add(()=>clearTimeout(s))},microTask(...o){let s={current:!0};return on(()=>{s.current&&o[0]()}),i.add(()=>{s.current=!1})},style(o,s,c){let d=o.style.getPropertyValue(s);return Object.assign(o.style,{[s]:c}),this.add(()=>{Object.assign(o.style,{[s]:d})})},group(o){let s=_t();return o(s),this.add(()=>s.dispose())},add(o){return e.push(o),()=>{let s=e.indexOf(o);if(s>=0)for(let c of e.splice(s,1))c()}},dispose(){for(let o of e.splice(0))o()}};return i}function Yt(){let[e]=n.useState(_t);return n.useEffect(()=>()=>e.dispose(),[e]),e}function er(){let e=typeof document>"u";return"useSyncExternalStore"in a?(i=>i.useSyncExternalStore)(a)(()=>()=>{},()=>!1,()=>!e):!1}function hn(){let e=er(),[i,o]=a.useState(Ce.isHandoffComplete);return i&&Ce.isHandoffComplete===!1&&o(!1),a.useEffect(()=>{i!==!0&&o(!0)},[i]),a.useEffect(()=>Ce.handoff(),[]),e?!1:i}var Lr;let Ft=(Lr=n.useId)!=null?Lr:function(){let e=hn(),[i,o]=n.useState(e?()=>Ce.nextId():null);return Ie(()=>{i===null&&o(Ce.nextId())},[i]),i!=null?""+i:void 0};function ct(e,i,...o){if(e in i){let c=i[e];return typeof c=="function"?c(...o):c}let s=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(i).map(c=>`"${c}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,ct),s}function Kt(e){return Ce.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let tr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ht=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ht||{}),nr=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(nr||{}),rr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(rr||{});function Ar(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(tr)).sort((i,o)=>Math.sign((i.tabIndex||Number.MAX_SAFE_INTEGER)-(o.tabIndex||Number.MAX_SAFE_INTEGER)))}var or=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(or||{});function lr(e,i=0){var o;return e===((o=Kt(e))==null?void 0:o.body)?!1:ct(i,{0(){return e.matches(tr)},1(){let s=e;for(;s!==null;){if(s.matches(tr))return!0;s=s.parentElement}return!1}})}function Dr(e){let i=Kt(e);_t().nextFrame(()=>{i&&!lr(i.activeElement,0)&&Xt(e)})}var Fo=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Fo||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Xt(e){e==null||e.focus({preventScroll:!0})}let Mo=["textarea","input"].join(",");function ir(e){var i,o;return(o=(i=e==null?void 0:e.matches)==null?void 0:i.call(e,Mo))!=null?o:!1}function Fn(e,i=o=>o){return e.slice().sort((o,s)=>{let c=i(o),d=i(s);if(c===null||d===null)return 0;let p=c.compareDocumentPosition(d);return p&Node.DOCUMENT_POSITION_FOLLOWING?-1:p&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function vn(e,i){return ln(Ar(),i,{relativeTo:e})}function ln(e,i,{sorted:o=!0,relativeTo:s=null,skipElements:c=[]}={}){let d=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,p=Array.isArray(e)?o?Fn(e):e:Ar(e);c.length>0&&p.length>1&&(p=p.filter(N=>!c.includes(N))),s=s??d.activeElement;let h=(()=>{if(i&5)return 1;if(i&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),g=(()=>{if(i&1)return 0;if(i&2)return Math.max(0,p.indexOf(s))-1;if(i&4)return Math.max(0,p.indexOf(s))+1;if(i&8)return p.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),w=i&32?{preventScroll:!0}:{},O=0,I=p.length,L;do{if(O>=I||O+I<=0)return 0;let N=g+O;if(i&16)N=(N+I)%I;else{if(N<0)return 3;if(N>=I)return 1}L=p[N],L==null||L.focus(w),O+=h}while(L!==d.activeElement);return i&6&&ir(L)&&L.select(),2}function Mn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function $r(){return/Android/gi.test(window.navigator.userAgent)}function _r(){return Mn()||$r()}function jn(e,i,o){let s=Pt(i);n.useEffect(()=>{function c(d){s.current(d)}return document.addEventListener(e,c,o),()=>document.removeEventListener(e,c,o)},[e,o])}function Br(e,i,o){let s=Pt(i);n.useEffect(()=>{function c(d){s.current(d)}return window.addEventListener(e,c,o),()=>window.removeEventListener(e,c,o)},[e,o])}function Rn(e,i,o=!0){let s=n.useRef(!1);n.useEffect(()=>{requestAnimationFrame(()=>{s.current=o})},[o]);function c(p,h){if(!s.current||p.defaultPrevented)return;let g=h(p);if(g===null||!g.getRootNode().contains(g)||!g.isConnected)return;let w=function O(I){return typeof I=="function"?O(I()):Array.isArray(I)||I instanceof Set?I:[I]}(e);for(let O of w){if(O===null)continue;let I=O instanceof HTMLElement?O:O.current;if(I!=null&&I.contains(g)||p.composed&&p.composedPath().includes(I))return}return!lr(g,or.Loose)&&g.tabIndex!==-1&&p.preventDefault(),i(p,g)}let d=n.useRef(null);jn("pointerdown",p=>{var h,g;s.current&&(d.current=((g=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:g[0])||p.target)},!0),jn("mousedown",p=>{var h,g;s.current&&(d.current=((g=(h=p.composedPath)==null?void 0:h.call(p))==null?void 0:g[0])||p.target)},!0),jn("click",p=>{_r()||d.current&&(c(p,()=>d.current),d.current=null)},!0),jn("touchend",p=>c(p,()=>p.target instanceof HTMLElement?p.target:null),!0),Br("blur",p=>c(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Jt(...e){return n.useMemo(()=>Kt(...e),[...e])}function zr(e){var i;if(e.type)return e.type;let o=(i=e.as)!=null?i:"button";if(typeof o=="string"&&o.toLowerCase()==="button")return"button"}function sr(e,i){let[o,s]=n.useState(()=>zr(e));return Ie(()=>{s(zr(e))},[e.type,e.as]),Ie(()=>{o||i.current&&i.current instanceof HTMLButtonElement&&!i.current.hasAttribute("type")&&s("button")},[o,i]),o}let ar=Symbol();function Ro(e,i=!0){return Object.assign(e,{[ar]:i})}function xt(...e){let i=n.useRef(e);n.useEffect(()=>{i.current=e},[e]);let o=J(s=>{for(let c of i.current)c!=null&&(typeof c=="function"?c(s):c.current=s)});return e.every(s=>s==null||(s==null?void 0:s[ar]))?void 0:o}function Wr(e){return[e.screenX,e.screenY]}function Hr(){let e=n.useRef([-1,-1]);return{wasMoved(i){let o=Wr(i);return e.current[0]===o[0]&&e.current[1]===o[1]?!1:(e.current=o,!0)},update(i){e.current=Wr(i)}}}function S({container:e,accept:i,walk:o,enabled:s=!0}){let c=n.useRef(i),d=n.useRef(o);n.useEffect(()=>{c.current=i,d.current=o},[i,o]),Ie(()=>{if(!e||!s)return;let p=Kt(e);if(!p)return;let h=c.current,g=d.current,w=Object.assign(I=>h(I),{acceptNode:h}),O=p.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,w,!1);for(;O.nextNode();)g(O.currentNode)},[e,s,c,d])}function W(e,i){let o=n.useRef([]),s=J(e);n.useEffect(()=>{let c=[...o.current];for(let[d,p]of i.entries())if(o.current[d]!==p){let h=s(i,c);return o.current=i,h}},[s,...i])}function X(...e){return Array.from(new Set(e.flatMap(i=>typeof i=="string"?i.split(" "):[]))).filter(Boolean).join(" ")}var de=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(de||{}),Me=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Me||{});function fe({ourProps:e,theirProps:i,slot:o,defaultTag:s,features:c,visible:d=!0,name:p,mergeRefs:h}){h=h??Ae;let g=Mt(i,e);if(d)return Re(g,o,s,p,h);let w=c??0;if(w&2){let{static:O=!1,...I}=g;if(O)return Re(I,o,s,p,h)}if(w&1){let{unmount:O=!0,...I}=g;return ct(O?0:1,{0(){return null},1(){return Re({...I,hidden:!0,style:{display:"none"}},o,s,p,h)}})}return Re(g,o,s,p,h)}function Re(e,i={},o,s,c){let{as:d=o,children:p,refName:h="ref",...g}=$t(e,["unmount","static"]),w=e.ref!==void 0?{[h]:e.ref}:{},O=typeof p=="function"?p(i):p;"className"in g&&g.className&&typeof g.className=="function"&&(g.className=g.className(i));let I={};if(i){let L=!1,N=[];for(let[A,F]of Object.entries(i))typeof F=="boolean"&&(L=!0),F===!0&&N.push(A);L&&(I["data-headlessui-state"]=N.join(" "))}if(d===n.Fragment&&Object.keys(vt(g)).length>0){if(!n.isValidElement(O)||Array.isArray(O)&&O.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${s} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(g).map(F=>` - ${F}`).join(`
|
|
63
63
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(F=>` - ${F}`).join(`
|
|
64
64
|
`)].join(`
|
|
65
|
-
`));let L=O.props,N=typeof(L==null?void 0:L.className)=="function"?(...F)=>X(L==null?void 0:L.className(...F),g.className):X(L==null?void 0:L.className,g.className),A=N?{className:N}:{};return n.cloneElement(O,Object.assign({},Mt(O.props,vt($t(g,["ref"]))),I,w,{ref:c(O.ref,w.ref)},A))}return n.createElement(d,Object.assign({},$t(g,["ref"]),d!==n.Fragment&&w,d!==n.Fragment&&I),O)}function Ae(...e){return e.every(i=>i==null)?void 0:i=>{for(let o of e)o!=null&&(typeof o=="function"?o(i):o.current=i)}}function Mt(...e){if(e.length===0)return{};if(e.length===1)return e[0];let i={},o={};for(let s of e)for(let c in s)c.startsWith("on")&&typeof s[c]=="function"?(o[c]!=null||(o[c]=[]),o[c].push(s[c])):i[c]=s[c];if(i.disabled||i["aria-disabled"])return Object.assign(i,Object.fromEntries(Object.keys(o).map(s=>[s,void 0])));for(let s in o)Object.assign(i,{[s](c,...d){let p=o[s];for(let h of p){if((c instanceof Event||(c==null?void 0:c.nativeEvent)instanceof Event)&&c.defaultPrevented)return;h(c,...d)}}});return i}function be(e){var i;return Object.assign(n.forwardRef(e),{displayName:(i=e.displayName)!=null?i:e.name})}function vt(e){let i=Object.assign({},e);for(let o in i)i[o]===void 0&&delete i[o];return i}function $t(e,i=[]){let o=Object.assign({},e);for(let s of i)s in o&&delete o[s];return o}let gn="div";var sn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(sn||{});function Gt(e,i){var o;let{features:s=1,...c}=e,d={ref:i,"aria-hidden":(s&2)===2?!0:(o=c["aria-hidden"])!=null?o:void 0,hidden:(s&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return fe({ourProps:d,theirProps:c,slot:{},defaultTag:gn,name:"Hidden"})}let ur=be(Gt),Lo=n.createContext(null);Lo.displayName="OpenClosedContext";var jt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(jt||{});function cr(){return n.useContext(Lo)}function Ao({value:e,children:i}){return n.createElement(Lo.Provider,{value:e},i)}function hd(e){function i(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",i))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",i),i())}let Qt=[];hd(()=>{function e(i){i.target instanceof HTMLElement&&i.target!==document.body&&Qt[0]!==i.target&&(Qt.unshift(i.target),Qt=Qt.filter(o=>o!=null&&o.isConnected),Qt.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Ur(e){let i=e.parentElement,o=null;for(;i&&!(i instanceof HTMLFieldSetElement);)i instanceof HTMLLegendElement&&(o=i),i=i.parentElement;let s=(i==null?void 0:i.getAttribute("disabled"))==="";return s&&vd(o)?!1:s}function vd(e){if(!e)return!1;let i=e.previousElementSibling;for(;i!==null;){if(i instanceof HTMLLegendElement)return!1;i=i.previousElementSibling}return!0}function gd(e){throw new Error("Unexpected object: "+e)}var ot=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ot||{});function Do(e,i){let o=i.resolveItems();if(o.length<=0)return null;let s=i.resolveActiveIndex(),c=s??-1;switch(e.focus){case 0:{for(let d=0;d<o.length;++d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 1:{for(let d=c-1;d>=0;--d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 2:{for(let d=c+1;d<o.length;++d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 3:{for(let d=o.length-1;d>=0;--d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 4:{for(let d=0;d<o.length;++d)if(i.resolveId(o[d],d,o)===e.id)return d;return s}case 5:return null;default:gd(e)}}function ii(e={},i=null,o=[]){for(let[s,c]of Object.entries(e))ai(o,si(i,s),c);return o}function si(e,i){return e?e+"["+i+"]":i}function ai(e,i,o){if(Array.isArray(o))for(let[s,c]of o.entries())ai(e,si(i,s.toString()),c);else o instanceof Date?e.push([i,o.toISOString()]):typeof o=="boolean"?e.push([i,o?"1":"0"]):typeof o=="string"?e.push([i,o]):typeof o=="number"?e.push([i,`${o}`]):o==null?e.push([i,""]):ii(o,i,e)}function bd(e){var i,o;let s=(i=e==null?void 0:e.form)!=null?i:e.closest("form");if(s){for(let c of s.elements)if(c!==e&&(c.tagName==="INPUT"&&c.type==="submit"||c.tagName==="BUTTON"&&c.type==="submit"||c.nodeName==="INPUT"&&c.type==="image")){c.click();return}(o=s.requestSubmit)==null||o.call(s)}}var qe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(qe||{}),xd=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xd||{}),yd=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(yd||{}),wd=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(wd||{}),Ed=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(Ed||{});function $o(e,i=o=>o){let o=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,s=i(e.options.slice()),c=s.length>0&&s[0].dataRef.current.order!==null?s.sort((p,h)=>p.dataRef.current.order-h.dataRef.current.order):Fn(s,p=>p.dataRef.current.domRef.current),d=o?c.indexOf(o):null;return d===-1&&(d=null),{options:c,activeOptionIndex:d}}let Sd={1(e){var i;return(i=e.dataRef.current)!=null&&i.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var i,o;if((i=e.dataRef.current)!=null&&i.disabled||e.comboboxState===0)return e;if((o=e.dataRef.current)!=null&&o.value){let s=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(s!==-1)return{...e,activeOptionIndex:s,comboboxState:0}}return{...e,comboboxState:0}},2(e,i){var o,s,c,d,p;if((o=e.dataRef.current)!=null&&o.disabled||(s=e.dataRef.current)!=null&&s.optionsRef.current&&!((c=e.dataRef.current)!=null&&c.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let O=i.focus===ot.Specific?i.idx:Do(i,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var L,N;return(N=(L=e.activeOptionIndex)!=null?L:e.virtual.options.findIndex(A=>!e.virtual.disabled(A)))!=null?N:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),I=(d=i.trigger)!=null?d:2;return e.activeOptionIndex===O&&e.activationTrigger===I?e:{...e,activeOptionIndex:O,activationTrigger:I}}let h=$o(e);if(h.activeOptionIndex===null){let O=h.options.findIndex(I=>!I.dataRef.current.disabled);O!==-1&&(h.activeOptionIndex=O)}let g=i.focus===ot.Specific?i.idx:Do(i,{resolveItems:()=>h.options,resolveActiveIndex:()=>h.activeOptionIndex,resolveId:O=>O.id,resolveDisabled:O=>O.dataRef.current.disabled}),w=(p=i.trigger)!=null?p:2;return e.activeOptionIndex===g&&e.activationTrigger===w?e:{...e,...h,activeOptionIndex:g,activationTrigger:w}},3:(e,i)=>{var o,s,c;if((o=e.dataRef.current)!=null&&o.virtual)return{...e,options:[...e.options,i.payload]};let d=i.payload,p=$o(e,g=>(g.push(d),g));e.activeOptionIndex===null&&(s=e.dataRef.current)!=null&&s.isSelected(i.payload.dataRef.current.value)&&(p.activeOptionIndex=p.options.indexOf(d));let h={...e,...p,activationTrigger:2};return(c=e.dataRef.current)!=null&&c.__demoMode&&e.dataRef.current.value===void 0&&(h.activeOptionIndex=0),h},4:(e,i)=>{var o;if((o=e.dataRef.current)!=null&&o.virtual)return{...e,options:e.options.filter(c=>c.id!==i.id)};let s=$o(e,c=>{let d=c.findIndex(p=>p.id===i.id);return d!==-1&&c.splice(d,1),c});return{...e,...s,activationTrigger:2}},5:(e,i)=>e.labelId===i.id?e:{...e,labelId:i.id},6:(e,i)=>e.activationTrigger===i.trigger?e:{...e,activationTrigger:i.trigger},7:(e,i)=>{var o;if(((o=e.virtual)==null?void 0:o.options)===i.options)return e;let s=e.activeOptionIndex;if(e.activeOptionIndex!==null){let c=i.options.indexOf(e.virtual.options[e.activeOptionIndex]);c!==-1?s=c:s=null}return{...e,activeOptionIndex:s,virtual:Object.assign({},e.virtual,{options:i.options})}}},_o=n.createContext(null);_o.displayName="ComboboxActionsContext";function dr(e){let i=n.useContext(_o);if(i===null){let o=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,dr),o}return i}let ui=n.createContext(null);function Cd(e){var i;let o=Tn("VirtualProvider"),[s,c]=n.useMemo(()=>{let g=o.optionsRef.current;if(!g)return[0,0];let w=window.getComputedStyle(g);return[parseFloat(w.paddingBlockStart||w.paddingTop),parseFloat(w.paddingBlockEnd||w.paddingBottom)]},[o.optionsRef.current]),d=Ze({scrollPaddingStart:s,scrollPaddingEnd:c,count:o.virtual.options.length,estimateSize(){return 40},getScrollElement(){var g;return(g=o.optionsRef.current)!=null?g:null},overscan:12}),[p,h]=n.useState(0);return Ie(()=>{h(g=>g+1)},[(i=o.virtual)==null?void 0:i.options]),n.createElement(ui.Provider,{value:d},n.createElement("div",{style:{position:"relative",width:"100%",height:`${d.getTotalSize()}px`},ref:g=>{if(g){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||o.activationTrigger===0)return;o.activeOptionIndex!==null&&o.virtual.options.length>o.activeOptionIndex&&d.scrollToIndex(o.activeOptionIndex)}}},d.getVirtualItems().map(g=>{var w;return n.createElement(n.Fragment,{key:g.key},n.cloneElement((w=e.children)==null?void 0:w.call(e,{option:o.virtual.options[g.index],open:o.comboboxState===0}),{key:`${p}-${g.key}`,"data-index":g.index,"aria-setsize":o.virtual.options.length,"aria-posinset":g.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${g.start}px)`,overflowAnchor:"none"}}))})))}let Bo=n.createContext(null);Bo.displayName="ComboboxDataContext";function Tn(e){let i=n.useContext(Bo);if(i===null){let o=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Tn),o}return i}function jd(e,i){return ct(i.type,Sd,e,i)}let Td=n.Fragment;function Od(e,i){let{value:o,defaultValue:s,onChange:c,form:d,name:p,by:h=null,disabled:g=!1,__demoMode:w=!1,nullable:O=!1,multiple:I=!1,immediate:L=!1,virtual:N=null,...A}=e,F=!1,D=null,[H=I?[]:void 0,z]=Qn(o,c,s),[K,ae]=n.useReducer(jd,{dataRef:n.createRef(),comboboxState:w?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),oe=n.useRef(!1),he=n.useRef({static:!1,hold:!1}),Ve=n.useRef(null),ze=n.useRef(null),ve=n.useRef(null),xe=n.useRef(null),Se=J(typeof h=="string"?(ne,ye)=>{let et=h;return(ne==null?void 0:ne[et])===(ye==null?void 0:ye[et])}:h??((ne,ye)=>ne===ye)),De=J(ne=>K.options.findIndex(ye=>Se(ye.dataRef.current.value,ne))),st=n.useCallback(ne=>ct(Z.mode,{1:()=>H.some(ye=>Se(ye,ne)),0:()=>Se(H,ne)}),[H]),ft=J(ne=>K.activeOptionIndex===De(ne)),Z=n.useMemo(()=>({...K,immediate:F,optionsPropsRef:he,labelRef:Ve,inputRef:ze,buttonRef:ve,optionsRef:xe,value:H,defaultValue:s,disabled:g,mode:I?1:0,virtual:K.virtual,get activeOptionIndex(){if(oe.current&&K.activeOptionIndex===null&&K.options.length>0){let ne=K.options.findIndex(ye=>!ye.dataRef.current.disabled);if(ne!==-1)return ne}return K.activeOptionIndex},calculateIndex:De,compare:Se,isSelected:st,isActive:ft,nullable:O,__demoMode:w}),[H,s,g,I,O,w,K,D]);Ie(()=>{},[D,void 0]),Ie(()=>{K.dataRef.current=Z},[Z]),Rn([Z.buttonRef,Z.inputRef,Z.optionsRef],()=>Le.closeCombobox(),Z.comboboxState===0);let at=n.useMemo(()=>{var ne,ye,et;return{open:Z.comboboxState===0,disabled:g,activeIndex:Z.activeOptionIndex,activeOption:Z.activeOptionIndex===null?null:Z.virtual?Z.virtual.options[(ne=Z.activeOptionIndex)!=null?ne:0]:(et=(ye=Z.options[Z.activeOptionIndex])==null?void 0:ye.dataRef.current.value)!=null?et:null,value:H}},[Z,g,H]),_e=J(()=>{if(Z.activeOptionIndex!==null){if(Z.virtual)Rt(Z.virtual.options[Z.activeOptionIndex]);else{let{dataRef:ne}=Z.options[Z.activeOptionIndex];Rt(ne.current.value)}Le.goToOption(ot.Specific,Z.activeOptionIndex)}}),gt=J(()=>{ae({type:0}),oe.current=!0}),ie=J(()=>{ae({type:1}),oe.current=!1}),We=J((ne,ye,et)=>(oe.current=!1,ne===ot.Specific?ae({type:2,focus:ot.Specific,idx:ye,trigger:et}):ae({type:2,focus:ne,trigger:et}))),lt=J((ne,ye)=>(ae({type:3,payload:{id:ne,dataRef:ye}}),()=>{Z.isActive(ye.current.value)&&(oe.current=!0),ae({type:4,id:ne})})),Tt=J(ne=>(ae({type:5,id:ne}),()=>ae({type:5,id:null}))),Rt=J(ne=>ct(Z.mode,{0(){return z==null?void 0:z(ne)},1(){let ye=Z.value.slice(),et=ye.findIndex(zt=>Se(zt,ne));return et===-1?ye.push(ne):ye.splice(et,1),z==null?void 0:z(ye)}})),yt=J(ne=>{ae({type:6,trigger:ne})}),Le=n.useMemo(()=>({onChange:Rt,registerOption:lt,registerLabel:Tt,goToOption:We,closeCombobox:ie,openCombobox:gt,setActivationTrigger:yt,selectActiveOption:_e}),[]),St=i===null?{}:{ref:i},Ke=n.useRef(null),At=Yt();return n.useEffect(()=>{Ke.current&&s!==void 0&&At.addEventListener(Ke.current,"reset",()=>{z==null||z(s)})},[Ke,z]),n.createElement(_o.Provider,{value:Le},n.createElement(Bo.Provider,{value:Z},n.createElement(Ao,{value:ct(Z.comboboxState,{0:jt.Open,1:jt.Closed})},p!=null&&H!=null&&ii({[p]:H}).map(([ne,ye],et)=>n.createElement(ur,{features:sn.Hidden,ref:et===0?zt=>{var Ln;Ke.current=(Ln=zt==null?void 0:zt.closest("form"))!=null?Ln:null}:void 0,...vt({key:ne,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:d,disabled:g,name:ne,value:ye})})),fe({ourProps:St,theirProps:A,slot:at,defaultTag:Td,name:"Combobox"}))))}let Nd="input";function Id(e,i){var o,s,c,d,p;let h=Ft(),{id:g=`headlessui-combobox-input-${h}`,onChange:w,displayValue:O,type:I="text",...L}=e,N=Tn("Combobox.Input"),A=dr("Combobox.Input"),F=xt(N.inputRef,i),D=Jt(N.inputRef),H=n.useRef(!1),z=Yt(),K=J(()=>{A.onChange(null),N.optionsRef.current&&(N.optionsRef.current.scrollTop=0),A.goToOption(ot.Nothing)}),ae=function(){var Z;return typeof O=="function"&&N.value!==void 0?(Z=O(N.value))!=null?Z:"":typeof N.value=="string"?N.value:""}();W(([Z,at],[_e,gt])=>{if(H.current)return;let ie=N.inputRef.current;ie&&((gt===0&&at===1||Z!==_e)&&(ie.value=Z),requestAnimationFrame(()=>{if(H.current||!ie||(D==null?void 0:D.activeElement)!==ie)return;let{selectionStart:We,selectionEnd:lt}=ie;Math.abs((lt??0)-(We??0))===0&&We===0&&ie.setSelectionRange(ie.value.length,ie.value.length)}))},[ae,N.comboboxState,D]),W(([Z],[at])=>{if(Z===0&&at===1){if(H.current)return;let _e=N.inputRef.current;if(!_e)return;let gt=_e.value,{selectionStart:ie,selectionEnd:We,selectionDirection:lt}=_e;_e.value="",_e.value=gt,lt!==null?_e.setSelectionRange(ie,We,lt):_e.setSelectionRange(ie,We)}},[N.comboboxState]);let oe=n.useRef(!1),he=J(()=>{oe.current=!0}),Ve=J(()=>{z.nextFrame(()=>{oe.current=!1})}),ze=J(Z=>{switch(H.current=!0,Z.key){case qe.Enter:if(H.current=!1,N.comboboxState!==0||oe.current)return;if(Z.preventDefault(),Z.stopPropagation(),N.activeOptionIndex===null){A.closeCombobox();return}A.selectActiveOption(),N.mode===0&&A.closeCombobox();break;case qe.ArrowDown:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),ct(N.comboboxState,{0:()=>A.goToOption(ot.Next),1:()=>A.openCombobox()});case qe.ArrowUp:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),ct(N.comboboxState,{0:()=>A.goToOption(ot.Previous),1:()=>{A.openCombobox(),z.nextFrame(()=>{N.value||A.goToOption(ot.Last)})}});case qe.Home:if(Z.shiftKey)break;return H.current=!1,Z.preventDefault(),Z.stopPropagation(),A.goToOption(ot.First);case qe.PageUp:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),A.goToOption(ot.First);case qe.End:if(Z.shiftKey)break;return H.current=!1,Z.preventDefault(),Z.stopPropagation(),A.goToOption(ot.Last);case qe.PageDown:return H.current=!1,Z.preventDefault(),Z.stopPropagation(),A.goToOption(ot.Last);case qe.Escape:return H.current=!1,N.comboboxState!==0?void 0:(Z.preventDefault(),N.optionsRef.current&&!N.optionsPropsRef.current.static&&Z.stopPropagation(),N.nullable&&N.mode===0&&N.value===null&&K(),A.closeCombobox());case qe.Tab:if(H.current=!1,N.comboboxState!==0)return;N.mode===0&&N.activationTrigger!==1&&A.selectActiveOption(),A.closeCombobox();break}}),ve=J(Z=>{w==null||w(Z),N.nullable&&N.mode===0&&Z.target.value===""&&K(),A.openCombobox()}),xe=J(Z=>{var at,_e,gt;let ie=(at=Z.relatedTarget)!=null?at:Qt.find(We=>We!==Z.currentTarget);if(H.current=!1,!((_e=N.optionsRef.current)!=null&&_e.contains(ie))&&!((gt=N.buttonRef.current)!=null&>.contains(ie))&&N.comboboxState===0)return Z.preventDefault(),N.mode===0&&(N.nullable&&N.value===null?K():N.activationTrigger!==1&&A.selectActiveOption()),A.closeCombobox()}),Se=J(Z=>{var at,_e,gt;let ie=(at=Z.relatedTarget)!=null?at:Qt.find(We=>We!==Z.currentTarget);(_e=N.buttonRef.current)!=null&&_e.contains(ie)||(gt=N.optionsRef.current)!=null&>.contains(ie)||N.disabled||N.immediate&&N.comboboxState!==0&&(A.openCombobox(),z.nextFrame(()=>{A.setActivationTrigger(1)}))}),De=Zt(()=>{if(N.labelId)return[N.labelId].join(" ")},[N.labelId]),st=n.useMemo(()=>({open:N.comboboxState===0,disabled:N.disabled}),[N]),ft={ref:F,id:g,role:"combobox",type:I,"aria-controls":(o=N.optionsRef.current)==null?void 0:o.id,"aria-expanded":N.comboboxState===0,"aria-activedescendant":N.activeOptionIndex===null?void 0:N.virtual?(s=N.options.find(Z=>{var at;return!((at=N.virtual)!=null&&at.disabled(Z.dataRef.current.value))&&N.compare(Z.dataRef.current.value,N.virtual.options[N.activeOptionIndex])}))==null?void 0:s.id:(c=N.options[N.activeOptionIndex])==null?void 0:c.id,"aria-labelledby":De,"aria-autocomplete":"list",defaultValue:(p=(d=e.defaultValue)!=null?d:N.defaultValue!==void 0?O==null?void 0:O(N.defaultValue):null)!=null?p:N.defaultValue,disabled:N.disabled,onCompositionStart:he,onCompositionEnd:Ve,onKeyDown:ze,onChange:ve,onFocus:Se,onBlur:xe};return fe({ourProps:ft,theirProps:L,slot:st,defaultTag:Nd,name:"Combobox.Input"})}let kd="button";function Pd(e,i){var o;let s=Tn("Combobox.Button"),c=dr("Combobox.Button"),d=xt(s.buttonRef,i),p=Ft(),{id:h=`headlessui-combobox-button-${p}`,...g}=e,w=Yt(),O=J(F=>{switch(F.key){case qe.ArrowDown:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&c.openCombobox(),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})});case qe.ArrowUp:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&(c.openCombobox(),w.nextFrame(()=>{s.value||c.goToOption(ot.Last)})),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})});case qe.Escape:return s.comboboxState!==0?void 0:(F.preventDefault(),s.optionsRef.current&&!s.optionsPropsRef.current.static&&F.stopPropagation(),c.closeCombobox(),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})}));default:return}}),I=J(F=>{if(Ur(F.currentTarget))return F.preventDefault();s.comboboxState===0?c.closeCombobox():(F.preventDefault(),c.openCombobox()),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})})}),L=Zt(()=>{if(s.labelId)return[s.labelId,h].join(" ")},[s.labelId,h]),N=n.useMemo(()=>({open:s.comboboxState===0,disabled:s.disabled,value:s.value}),[s]),A={ref:d,id:h,type:sr(e,s.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(o=s.optionsRef.current)==null?void 0:o.id,"aria-expanded":s.comboboxState===0,"aria-labelledby":L,disabled:s.disabled,onClick:I,onKeyDown:O};return fe({ourProps:A,theirProps:g,slot:N,defaultTag:kd,name:"Combobox.Button"})}let Fd="label";function Md(e,i){let o=Ft(),{id:s=`headlessui-combobox-label-${o}`,...c}=e,d=Tn("Combobox.Label"),p=dr("Combobox.Label"),h=xt(d.labelRef,i);Ie(()=>p.registerLabel(s),[s]);let g=J(()=>{var O;return(O=d.inputRef.current)==null?void 0:O.focus({preventScroll:!0})}),w=n.useMemo(()=>({open:d.comboboxState===0,disabled:d.disabled}),[d]);return fe({ourProps:{ref:h,id:s,onClick:g},theirProps:c,slot:w,defaultTag:Fd,name:"Combobox.Label"})}let Rd="ul",Ld=de.RenderStrategy|de.Static;function Ad(e,i){let o=Ft(),{id:s=`headlessui-combobox-options-${o}`,hold:c=!1,...d}=e,p=Tn("Combobox.Options"),h=xt(p.optionsRef,i),g=cr(),w=g!==null?(g&jt.Open)===jt.Open:p.comboboxState===0;Ie(()=>{var N;p.optionsPropsRef.current.static=(N=e.static)!=null?N:!1},[p.optionsPropsRef,e.static]),Ie(()=>{p.optionsPropsRef.current.hold=c},[p.optionsPropsRef,c]),S({container:p.optionsRef.current,enabled:p.comboboxState===0,accept(N){return N.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:N.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(N){N.setAttribute("role","none")}});let O=Zt(()=>{var N,A;return(A=p.labelId)!=null?A:(N=p.buttonRef.current)==null?void 0:N.id},[p.labelId,p.buttonRef.current]),I=n.useMemo(()=>({open:p.comboboxState===0,option:void 0}),[p]),L={"aria-labelledby":O,role:"listbox","aria-multiselectable":p.mode===1?!0:void 0,id:s,ref:h};return p.virtual&&p.comboboxState===0&&Object.assign(d,{children:n.createElement(Cd,null,d.children)}),fe({ourProps:L,theirProps:d,slot:I,defaultTag:Rd,features:Ld,visible:w,name:"Combobox.Options"})}let Dd="li";function $d(e,i){var o;let s=Ft(),{id:c=`headlessui-combobox-option-${s}`,disabled:d=!1,value:p,order:h=null,...g}=e,w=Tn("Combobox.Option"),O=dr("Combobox.Option"),I=w.virtual?w.activeOptionIndex===w.calculateIndex(p):w.activeOptionIndex===null?!1:((o=w.options[w.activeOptionIndex])==null?void 0:o.id)===c,L=w.isSelected(p),N=n.useRef(null),A=Pt({disabled:d,value:p,domRef:N,order:h}),F=n.useContext(ui),D=xt(i,N,F?F.measureElement:null),H=J(()=>O.onChange(p));Ie(()=>O.registerOption(c,A),[A,c]);let z=n.useRef(!(w.virtual||w.__demoMode));Ie(()=>{if(!w.virtual||!w.__demoMode)return;let xe=_t();return xe.requestAnimationFrame(()=>{z.current=!0}),xe.dispose},[w.virtual,w.__demoMode]),Ie(()=>{if(!z.current||w.comboboxState!==0||!I||w.activationTrigger===0)return;let xe=_t();return xe.requestAnimationFrame(()=>{var Se,De;(De=(Se=N.current)==null?void 0:Se.scrollIntoView)==null||De.call(Se,{block:"nearest"})}),xe.dispose},[N,I,w.comboboxState,w.activationTrigger,w.activeOptionIndex]);let K=J(xe=>{var Se;if(d||(Se=w.virtual)!=null&&Se.disabled(p))return xe.preventDefault();H(),_r()||requestAnimationFrame(()=>{var De;return(De=w.inputRef.current)==null?void 0:De.focus({preventScroll:!0})}),w.mode===0&&requestAnimationFrame(()=>O.closeCombobox())}),ae=J(()=>{var xe;if(d||(xe=w.virtual)!=null&&xe.disabled(p))return O.goToOption(ot.Nothing);let Se=w.calculateIndex(p);O.goToOption(ot.Specific,Se)}),oe=Hr(),he=J(xe=>oe.update(xe)),Ve=J(xe=>{var Se;if(!oe.wasMoved(xe)||d||(Se=w.virtual)!=null&&Se.disabled(p)||I)return;let De=w.calculateIndex(p);O.goToOption(ot.Specific,De,0)}),ze=J(xe=>{var Se;oe.wasMoved(xe)&&(d||(Se=w.virtual)!=null&&Se.disabled(p)||I&&(w.optionsPropsRef.current.hold||O.goToOption(ot.Nothing)))}),ve=n.useMemo(()=>({active:I,selected:L,disabled:d}),[I,L,d]);return fe({ourProps:{id:c,ref:D,role:"option",tabIndex:d===!0?void 0:-1,"aria-disabled":d===!0?!0:void 0,"aria-selected":L,disabled:void 0,onClick:K,onFocus:ae,onPointerEnter:he,onMouseEnter:he,onPointerMove:Ve,onMouseMove:Ve,onPointerLeave:ze,onMouseLeave:ze},theirProps:g,slot:ve,defaultTag:Dd,name:"Combobox.Option"})}let _d=be(Od),Bd=be(Pd),zd=be(Id),Wd=be(Md),Hd=be(Ad),Ud=be($d),an=Object.assign(_d,{Input:zd,Button:Bd,Label:Wd,Options:Hd,Option:Ud});function ci(e,i,o,s){let c=Pt(o);n.useEffect(()=>{e=e??window;function d(p){c.current(p)}return e.addEventListener(i,d,s),()=>e.removeEventListener(i,d,s)},[e,i,s])}function fr(){let e=n.useRef(!1);return Ie(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function di(e){let i=J(e),o=n.useRef(!1);n.useEffect(()=>(o.current=!1,()=>{o.current=!0,on(()=>{o.current&&i()})}),[i])}var pr=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(pr||{});function Vd(){let e=n.useRef(0);return Br("keydown",i=>{i.key==="Tab"&&(e.current=i.shiftKey?1:0)},!0),e}function fi(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let i=new Set;for(let o of e.current)o.current instanceof HTMLElement&&i.add(o.current);return i}let Zd="div";var pi=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(pi||{});function Yd(e,i){let o=n.useRef(null),s=xt(o,i),{initialFocus:c,containers:d,features:p=30,...h}=e;hn()||(p=1);let g=Jt(o);Kd({ownerDocument:g},!!(p&16));let w=Xd({ownerDocument:g,container:o,initialFocus:c},!!(p&2));Jd({ownerDocument:g,container:o,containers:d,previousActiveElement:w},!!(p&8));let O=Vd(),I=J(F=>{let D=o.current;D&&(H=>H())(()=>{ct(O.current,{[pr.Forwards]:()=>{ln(D,Ht.First,{skipElements:[F.relatedTarget]})},[pr.Backwards]:()=>{ln(D,Ht.Last,{skipElements:[F.relatedTarget]})}})})}),L=Yt(),N=n.useRef(!1),A={ref:s,onKeyDown(F){F.key=="Tab"&&(N.current=!0,L.requestAnimationFrame(()=>{N.current=!1}))},onBlur(F){let D=fi(d);o.current instanceof HTMLElement&&D.add(o.current);let H=F.relatedTarget;H instanceof HTMLElement&&H.dataset.headlessuiFocusGuard!=="true"&&(mi(D,H)||(N.current?ln(o.current,ct(O.current,{[pr.Forwards]:()=>Ht.Next,[pr.Backwards]:()=>Ht.Previous})|Ht.WrapAround,{relativeTo:F.target}):F.target instanceof HTMLElement&&Xt(F.target)))}};return n.createElement(n.Fragment,null,!!(p&4)&&n.createElement(ur,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:sn.Focusable}),fe({ourProps:A,theirProps:h,defaultTag:Zd,name:"FocusTrap"}),!!(p&4)&&n.createElement(ur,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:sn.Focusable}))}let Gd=be(Yd),mr=Object.assign(Gd,{features:pi});function qd(e=!0){let i=n.useRef(Qt.slice());return W(([o],[s])=>{s===!0&&o===!1&&on(()=>{i.current.splice(0)}),s===!1&&o===!0&&(i.current=Qt.slice())},[e,Qt,i]),J(()=>{var o;return(o=i.current.find(s=>s!=null&&s.isConnected))!=null?o:null})}function Kd({ownerDocument:e},i){let o=qd(i);W(()=>{i||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Xt(o())},[i]),di(()=>{i&&Xt(o())})}function Xd({ownerDocument:e,container:i,initialFocus:o},s){let c=n.useRef(null),d=fr();return W(()=>{if(!s)return;let p=i.current;p&&on(()=>{if(!d.current)return;let h=e==null?void 0:e.activeElement;if(o!=null&&o.current){if((o==null?void 0:o.current)===h){c.current=h;return}}else if(p.contains(h)){c.current=h;return}o!=null&&o.current?Xt(o.current):ln(p,Ht.First)===nr.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),c.current=e==null?void 0:e.activeElement})},[s]),c}function Jd({ownerDocument:e,container:i,containers:o,previousActiveElement:s},c){let d=fr();ci(e==null?void 0:e.defaultView,"focus",p=>{if(!c||!d.current)return;let h=fi(o);i.current instanceof HTMLElement&&h.add(i.current);let g=s.current;if(!g)return;let w=p.target;w&&w instanceof HTMLElement?mi(h,w)?(s.current=w,Xt(w)):(p.preventDefault(),p.stopPropagation(),Xt(g)):Xt(s.current)},!0)}function mi(e,i){for(let o of e)if(o.contains(i))return!0;return!1}let hi=n.createContext(!1);function Qd(){return n.useContext(hi)}function zo(e){return n.createElement(hi.Provider,{value:e.force},e.children)}function ef(e){let i=Qd(),o=n.useContext(vi),s=Jt(e),[c,d]=n.useState(()=>{if(!i&&o!==null||Ce.isServer)return null;let p=s==null?void 0:s.getElementById("headlessui-portal-root");if(p)return p;if(s===null)return null;let h=s.createElement("div");return h.setAttribute("id","headlessui-portal-root"),s.body.appendChild(h)});return n.useEffect(()=>{c!==null&&(s!=null&&s.body.contains(c)||s==null||s.body.appendChild(c))},[c,s]),n.useEffect(()=>{i||o!==null&&d(o.current)},[o,d,i]),c}let tf=n.Fragment;function nf(e,i){let o=e,s=n.useRef(null),c=xt(Ro(O=>{s.current=O}),i),d=Jt(s),p=ef(s),[h]=n.useState(()=>{var O;return Ce.isServer?null:(O=d==null?void 0:d.createElement("div"))!=null?O:null}),g=n.useContext(Wo),w=hn();return Ie(()=>{!p||!h||p.contains(h)||(h.setAttribute("data-headlessui-portal",""),p.appendChild(h))},[p,h]),Ie(()=>{if(h&&g)return g.register(h)},[g,h]),di(()=>{var O;!p||!h||(h instanceof Node&&p.contains(h)&&p.removeChild(h),p.childNodes.length<=0&&((O=p.parentElement)==null||O.removeChild(p)))}),w?!p||!h?null:u.createPortal(fe({ourProps:{ref:c},theirProps:o,defaultTag:tf,name:"Portal"}),h):null}let rf=n.Fragment,vi=n.createContext(null);function of(e,i){let{target:o,...s}=e,c={ref:xt(i)};return n.createElement(vi.Provider,{value:o},fe({ourProps:c,theirProps:s,defaultTag:rf,name:"Popover.Group"}))}let Wo=n.createContext(null);function lf(){let e=n.useContext(Wo),i=n.useRef([]),o=J(d=>(i.current.push(d),e&&e.register(d),()=>s(d))),s=J(d=>{let p=i.current.indexOf(d);p!==-1&&i.current.splice(p,1),e&&e.unregister(d)}),c=n.useMemo(()=>({register:o,unregister:s,portals:i}),[o,s,i]);return[i,n.useMemo(()=>function({children:d}){return n.createElement(Wo.Provider,{value:c},d)},[c])]}let sf=be(nf),af=be(of),Ho=Object.assign(sf,{Group:af});function uf(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}const cf=typeof Object.is=="function"?Object.is:uf,{useState:df,useEffect:ff,useLayoutEffect:pf,useDebugValue:mf}=a;function hf(e,i,o){const s=i(),[{inst:c},d]=df({inst:{value:s,getSnapshot:i}});return pf(()=>{c.value=s,c.getSnapshot=i,Uo(c)&&d({inst:c})},[e,s,i]),ff(()=>(Uo(c)&&d({inst:c}),e(()=>{Uo(c)&&d({inst:c})})),[e]),mf(s),s}function Uo(e){const i=e.getSnapshot,o=e.value;try{const s=i();return!cf(o,s)}catch{return!0}}function vf(e,i,o){return i()}const gf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bf=!gf,xf=bf?vf:hf,yf="useSyncExternalStore"in a?(e=>e.useSyncExternalStore)(a):xf;function wf(e){return yf(e.subscribe,e.getSnapshot,e.getSnapshot)}function Ef(e,i){let o=e(),s=new Set;return{getSnapshot(){return o},subscribe(c){return s.add(c),()=>s.delete(c)},dispatch(c,...d){let p=i[c].call(o,...d);p&&(o=p,s.forEach(h=>h()))}}}function Sf(){let e;return{before({doc:i}){var o;let s=i.documentElement;e=((o=i.defaultView)!=null?o:window).innerWidth-s.clientWidth},after({doc:i,d:o}){let s=i.documentElement,c=s.clientWidth-s.offsetWidth,d=e-c;o.style(s,"paddingRight",`${d}px`)}}}function Cf(){return Mn()?{before({doc:e,d:i,meta:o}){function s(c){return o.containers.flatMap(d=>d()).some(d=>d.contains(c))}i.microTask(()=>{var c;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let h=_t();h.style(e.documentElement,"scrollBehavior","auto"),i.add(()=>i.microTask(()=>h.dispose()))}let d=(c=window.scrollY)!=null?c:window.pageYOffset,p=null;i.addEventListener(e,"click",h=>{if(h.target instanceof HTMLElement)try{let g=h.target.closest("a");if(!g)return;let{hash:w}=new URL(g.href),O=e.querySelector(w);O&&!s(O)&&(p=O)}catch{}},!0),i.addEventListener(e,"touchstart",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let g=h.target;for(;g.parentElement&&s(g.parentElement);)g=g.parentElement;i.style(g,"overscrollBehavior","contain")}else i.style(h.target,"touchAction","none")}),i.addEventListener(e,"touchmove",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let g=h.target;for(;g.parentElement&&g.dataset.headlessuiPortal!==""&&!(g.scrollHeight>g.clientHeight||g.scrollWidth>g.clientWidth);)g=g.parentElement;g.dataset.headlessuiPortal===""&&h.preventDefault()}else h.preventDefault()},{passive:!1}),i.add(()=>{var h;let g=(h=window.scrollY)!=null?h:window.pageYOffset;d!==g&&window.scrollTo(0,d),p&&p.isConnected&&(p.scrollIntoView({block:"nearest"}),p=null)})})}}:{}}function jf(){return{before({doc:e,d:i}){i.style(e.documentElement,"overflow","hidden")}}}function Tf(e){let i={};for(let o of e)Object.assign(i,o(i));return i}let On=Ef(()=>new Map,{PUSH(e,i){var o;let s=(o=this.get(e))!=null?o:{doc:e,count:0,d:_t(),meta:new Set};return s.count++,s.meta.add(i),this.set(e,s),this},POP(e,i){let o=this.get(e);return o&&(o.count--,o.meta.delete(i)),this},SCROLL_PREVENT({doc:e,d:i,meta:o}){let s={doc:e,d:i,meta:Tf(o)},c=[Cf(),Sf(),jf()];c.forEach(({before:d})=>d==null?void 0:d(s)),c.forEach(({after:d})=>d==null?void 0:d(s))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});On.subscribe(()=>{let e=On.getSnapshot(),i=new Map;for(let[o]of e)i.set(o,o.documentElement.style.overflow);for(let o of e.values()){let s=i.get(o.doc)==="hidden",c=o.count!==0;(c&&!s||!c&&s)&&On.dispatch(o.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",o),o.count===0&&On.dispatch("TEARDOWN",o)}});function Of(e,i,o){let s=wf(On),c=e?s.get(e):void 0,d=c?c.count>0:!1;return Ie(()=>{if(!(!e||!i))return On.dispatch("PUSH",e,o),()=>On.dispatch("POP",e,o)},[i,e]),d}let Vo=new Map,hr=new Map;function gi(e,i=!0){Ie(()=>{var o;if(!i)return;let s=typeof e=="function"?e():e.current;if(!s)return;function c(){var p;if(!s)return;let h=(p=hr.get(s))!=null?p:1;if(h===1?hr.delete(s):hr.set(s,h-1),h!==1)return;let g=Vo.get(s);g&&(g["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",g["aria-hidden"]),s.inert=g.inert,Vo.delete(s))}let d=(o=hr.get(s))!=null?o:0;return hr.set(s,d+1),d!==0||(Vo.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),c},[e,i])}function Nf({defaultContainers:e=[],portals:i,mainTreeNodeRef:o}={}){var s;let c=n.useRef((s=o==null?void 0:o.current)!=null?s:null),d=Jt(c),p=J(()=>{var h,g,w;let O=[];for(let I of e)I!==null&&(I instanceof HTMLElement?O.push(I):"current"in I&&I.current instanceof HTMLElement&&O.push(I.current));if(i!=null&&i.current)for(let I of i.current)O.push(I);for(let I of(h=d==null?void 0:d.querySelectorAll("html > *, body > *"))!=null?h:[])I!==document.body&&I!==document.head&&I instanceof HTMLElement&&I.id!=="headlessui-portal-root"&&(I.contains(c.current)||I.contains((w=(g=c.current)==null?void 0:g.getRootNode())==null?void 0:w.host)||O.some(L=>I.contains(L))||O.push(I));return O});return{resolveContainers:p,contains:J(h=>p().some(g=>g.contains(h))),mainTreeNodeRef:c,MainTreeNode:n.useMemo(()=>function(){return o!=null?null:n.createElement(ur,{features:sn.Hidden,ref:c})},[c,o])}}let Zo=n.createContext(()=>{});Zo.displayName="StackContext";var Yo=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Yo||{});function If(){return n.useContext(Zo)}function kf({children:e,onUpdate:i,type:o,element:s,enabled:c}){let d=If(),p=J((...h)=>{i==null||i(...h),d(...h)});return Ie(()=>{let h=c===void 0||c===!0;return h&&p(0,o,s),()=>{h&&p(1,o,s)}},[p,o,s,c]),n.createElement(Zo.Provider,{value:p},e)}let bi=n.createContext(null);function xi(){let e=n.useContext(bi);if(e===null){let i=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(i,xi),i}return e}function yi(){let[e,i]=n.useState([]);return[e.length>0?e.join(" "):void 0,n.useMemo(()=>function(o){let s=J(d=>(i(p=>[...p,d]),()=>i(p=>{let h=p.slice(),g=h.indexOf(d);return g!==-1&&h.splice(g,1),h}))),c=n.useMemo(()=>({register:s,slot:o.slot,name:o.name,props:o.props}),[s,o.slot,o.name,o.props]);return n.createElement(bi.Provider,{value:c},o.children)},[i])]}let Pf="p";function Ff(e,i){let o=Ft(),{id:s=`headlessui-description-${o}`,...c}=e,d=xi(),p=xt(i);Ie(()=>d.register(s),[s,d.register]);let h={ref:p,...d.props,id:s};return fe({ourProps:h,theirProps:c,slot:d.slot||{},defaultTag:Pf,name:d.name||"Description"})}let Mf=be(Ff),wi=Object.assign(Mf,{});var Rf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Rf||{}),Lf=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Lf||{});let Af={0(e,i){return e.titleId===i.id?e:{...e,titleId:i.id}}},Vr=n.createContext(null);Vr.displayName="DialogContext";function vr(e){let i=n.useContext(Vr);if(i===null){let o=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,vr),o}return i}function Df(e,i,o=()=>[document.body]){Of(e,i,s=>{var c;return{containers:[...(c=s.containers)!=null?c:[],o]}})}function $f(e,i){return ct(i.type,Af,e,i)}let _f="div",Bf=de.RenderStrategy|de.Static;function zf(e,i){let o=Ft(),{id:s=`headlessui-dialog-${o}`,open:c,onClose:d,initialFocus:p,role:h="dialog",__demoMode:g=!1,...w}=e,[O,I]=n.useState(0),L=n.useRef(!1);h=function(){return h==="dialog"||h==="alertdialog"?h:(L.current||(L.current=!0,console.warn(`Invalid role [${h}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let N=cr();c===void 0&&N!==null&&(c=(N&jt.Open)===jt.Open);let A=n.useRef(null),F=xt(A,i),D=Jt(A),H=e.hasOwnProperty("open")||N!==null,z=e.hasOwnProperty("onClose");if(!H&&!z)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!H)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!z)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof c!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c}`);if(typeof d!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${d}`);let K=c?0:1,[ae,oe]=n.useReducer($f,{titleId:null,descriptionId:null,panelRef:n.createRef()}),he=J(()=>d(!1)),Ve=J(ne=>oe({type:0,id:ne})),ze=hn()?g?!1:K===0:!1,ve=O>1,xe=n.useContext(Vr)!==null,[Se,De]=lf(),st={get current(){var ne;return(ne=ae.panelRef.current)!=null?ne:A.current}},{resolveContainers:ft,mainTreeNodeRef:Z,MainTreeNode:at}=Nf({portals:Se,defaultContainers:[st]}),_e=ve?"parent":"leaf",gt=N!==null?(N&jt.Closing)===jt.Closing:!1,ie=xe||gt?!1:ze,We=n.useCallback(()=>{var ne,ye;return(ye=Array.from((ne=D==null?void 0:D.querySelectorAll("body > *"))!=null?ne:[]).find(et=>et.id==="headlessui-portal-root"?!1:et.contains(Z.current)&&et instanceof HTMLElement))!=null?ye:null},[Z]);gi(We,ie);let lt=ve?!0:ze,Tt=n.useCallback(()=>{var ne,ye;return(ye=Array.from((ne=D==null?void 0:D.querySelectorAll("[data-headlessui-portal]"))!=null?ne:[]).find(et=>et.contains(Z.current)&&et instanceof HTMLElement))!=null?ye:null},[Z]);gi(Tt,lt),Rn(ft,ne=>{ne.preventDefault(),he()},!(!ze||ve));let Rt=!(ve||K!==0);ci(D==null?void 0:D.defaultView,"keydown",ne=>{Rt&&(ne.defaultPrevented||ne.key===qe.Escape&&(ne.preventDefault(),ne.stopPropagation(),he()))}),Df(D,!(gt||K!==0||xe),ft),n.useEffect(()=>{if(K!==0||!A.current)return;let ne=new ResizeObserver(ye=>{for(let et of ye){let zt=et.target.getBoundingClientRect();zt.x===0&&zt.y===0&&zt.width===0&&zt.height===0&&he()}});return ne.observe(A.current),()=>ne.disconnect()},[K,A,he]);let[yt,Le]=yi(),St=n.useMemo(()=>[{dialogState:K,close:he,setTitleId:Ve},ae],[K,ae,he,Ve]),Ke=n.useMemo(()=>({open:K===0}),[K]),At={ref:F,id:s,role:h,"aria-modal":K===0?!0:void 0,"aria-labelledby":ae.titleId,"aria-describedby":yt};return n.createElement(kf,{type:"Dialog",enabled:K===0,element:A,onUpdate:J((ne,ye)=>{ye==="Dialog"&&ct(ne,{[Yo.Add]:()=>I(et=>et+1),[Yo.Remove]:()=>I(et=>et-1)})})},n.createElement(zo,{force:!0},n.createElement(Ho,null,n.createElement(Vr.Provider,{value:St},n.createElement(Ho.Group,{target:A},n.createElement(zo,{force:!1},n.createElement(Le,{slot:Ke,name:"Dialog.Description"},n.createElement(mr,{initialFocus:p,containers:ft,features:ze?ct(_e,{parent:mr.features.RestoreFocus,leaf:mr.features.All&~mr.features.FocusLock}):mr.features.None},n.createElement(De,null,fe({ourProps:At,theirProps:w,slot:Ke,defaultTag:_f,features:Bf,visible:K===0,name:"Dialog"}))))))))),n.createElement(at,null))}let Wf="div";function Hf(e,i){let o=Ft(),{id:s=`headlessui-dialog-overlay-${o}`,...c}=e,[{dialogState:d,close:p}]=vr("Dialog.Overlay"),h=xt(i),g=J(O=>{if(O.target===O.currentTarget){if(Ur(O.currentTarget))return O.preventDefault();O.preventDefault(),O.stopPropagation(),p()}}),w=n.useMemo(()=>({open:d===0}),[d]);return fe({ourProps:{ref:h,id:s,"aria-hidden":!0,onClick:g},theirProps:c,slot:w,defaultTag:Wf,name:"Dialog.Overlay"})}let Uf="div";function Vf(e,i){let o=Ft(),{id:s=`headlessui-dialog-backdrop-${o}`,...c}=e,[{dialogState:d},p]=vr("Dialog.Backdrop"),h=xt(i);n.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[p.panelRef]);let g=n.useMemo(()=>({open:d===0}),[d]);return n.createElement(zo,{force:!0},n.createElement(Ho,null,fe({ourProps:{ref:h,id:s,"aria-hidden":!0},theirProps:c,slot:g,defaultTag:Uf,name:"Dialog.Backdrop"})))}let Zf="div";function Yf(e,i){let o=Ft(),{id:s=`headlessui-dialog-panel-${o}`,...c}=e,[{dialogState:d},p]=vr("Dialog.Panel"),h=xt(i,p.panelRef),g=n.useMemo(()=>({open:d===0}),[d]),w=J(O=>{O.stopPropagation()});return fe({ourProps:{ref:h,id:s,onClick:w},theirProps:c,slot:g,defaultTag:Zf,name:"Dialog.Panel"})}let Gf="h2";function qf(e,i){let o=Ft(),{id:s=`headlessui-dialog-title-${o}`,...c}=e,[{dialogState:d,setTitleId:p}]=vr("Dialog.Title"),h=xt(i);n.useEffect(()=>(p(s),()=>p(null)),[s,p]);let g=n.useMemo(()=>({open:d===0}),[d]);return fe({ourProps:{ref:h,id:s},theirProps:c,slot:g,defaultTag:Gf,name:"Dialog.Title"})}let Kf=be(zf),Xf=be(Vf),Jf=be(Yf),Qf=be(Hf),ep=be(qf),Ei=Object.assign(Kf,{Backdrop:Xf,Panel:Jf,Overlay:Qf,Title:ep,Description:wi}),Si=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ci(e){var i,o;let s=(i=e.innerText)!=null?i:"",c=e.cloneNode(!0);if(!(c instanceof HTMLElement))return s;let d=!1;for(let h of c.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))h.remove(),d=!0;let p=d?(o=c.innerText)!=null?o:"":s;return Si.test(p)&&(p=p.replace(Si,"")),p}function tp(e){let i=e.getAttribute("aria-label");if(typeof i=="string")return i.trim();let o=e.getAttribute("aria-labelledby");if(o){let s=o.split(" ").map(c=>{let d=document.getElementById(c);if(d){let p=d.getAttribute("aria-label");return typeof p=="string"?p.trim():Ci(d).trim()}return null}).filter(Boolean);if(s.length>0)return s.join(", ")}return Ci(e).trim()}function np(e){let i=n.useRef(""),o=n.useRef("");return J(()=>{let s=e.current;if(!s)return"";let c=s.innerText;if(i.current===c)return o.current;let d=tp(s).trim().toLowerCase();return i.current=c,o.current=d,d})}var rp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(rp||{}),op=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(op||{}),lp=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(lp||{});function Go(e,i=o=>o){let o=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,s=Fn(i(e.items.slice()),d=>d.dataRef.current.domRef.current),c=o?s.indexOf(o):null;return c===-1&&(c=null),{items:s,activeItemIndex:c}}let ip={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,i)=>{var o;let s=Go(e),c=Do(i,{resolveItems:()=>s.items,resolveActiveIndex:()=>s.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...e,...s,searchQuery:"",activeItemIndex:c,activationTrigger:(o=i.trigger)!=null?o:1}},3:(e,i)=>{let o=e.searchQuery!==""?0:1,s=e.searchQuery+i.value.toLowerCase(),c=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+o).concat(e.items.slice(0,e.activeItemIndex+o)):e.items).find(p=>{var h;return((h=p.dataRef.current.textValue)==null?void 0:h.startsWith(s))&&!p.dataRef.current.disabled}),d=c?e.items.indexOf(c):-1;return d===-1||d===e.activeItemIndex?{...e,searchQuery:s}:{...e,searchQuery:s,activeItemIndex:d,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,i)=>{let o=Go(e,s=>[...s,{id:i.id,dataRef:i.dataRef}]);return{...e,...o}},6:(e,i)=>{let o=Go(e,s=>{let c=s.findIndex(d=>d.id===i.id);return c!==-1&&s.splice(c,1),s});return{...e,...o,activationTrigger:1}}},qo=n.createContext(null);qo.displayName="MenuContext";function Zr(e){let i=n.useContext(qo);if(i===null){let o=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Zr),o}return i}function sp(e,i){return ct(i.type,ip,e,i)}let ap=n.Fragment;function up(e,i){let{__demoMode:o=!1,...s}=e,c=n.useReducer(sp,{__demoMode:o,menuState:o?0:1,buttonRef:n.createRef(),itemsRef:n.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:d,itemsRef:p,buttonRef:h},g]=c,w=xt(i);Rn([h,p],(N,A)=>{var F;g({type:1}),lr(A,or.Loose)||(N.preventDefault(),(F=h.current)==null||F.focus())},d===0);let O=J(()=>{g({type:1})}),I=n.useMemo(()=>({open:d===0,close:O}),[d,O]),L={ref:w};return n.createElement(qo.Provider,{value:c},n.createElement(Ao,{value:ct(d,{0:jt.Open,1:jt.Closed})},fe({ourProps:L,theirProps:s,slot:I,defaultTag:ap,name:"Menu"})))}let cp="button";function dp(e,i){var o;let s=Ft(),{id:c=`headlessui-menu-button-${s}`,...d}=e,[p,h]=Zr("Menu.Button"),g=xt(p.buttonRef,i),w=Yt(),O=J(F=>{switch(F.key){case qe.Space:case qe.Enter:case qe.ArrowDown:F.preventDefault(),F.stopPropagation(),h({type:0}),w.nextFrame(()=>h({type:2,focus:ot.First}));break;case qe.ArrowUp:F.preventDefault(),F.stopPropagation(),h({type:0}),w.nextFrame(()=>h({type:2,focus:ot.Last}));break}}),I=J(F=>{switch(F.key){case qe.Space:F.preventDefault();break}}),L=J(F=>{if(Ur(F.currentTarget))return F.preventDefault();e.disabled||(p.menuState===0?(h({type:1}),w.nextFrame(()=>{var D;return(D=p.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})})):(F.preventDefault(),h({type:0})))}),N=n.useMemo(()=>({open:p.menuState===0}),[p]),A={ref:g,id:c,type:sr(e,p.buttonRef),"aria-haspopup":"menu","aria-controls":(o=p.itemsRef.current)==null?void 0:o.id,"aria-expanded":p.menuState===0,onKeyDown:O,onKeyUp:I,onClick:L};return fe({ourProps:A,theirProps:d,slot:N,defaultTag:cp,name:"Menu.Button"})}let fp="div",pp=de.RenderStrategy|de.Static;function mp(e,i){var o,s;let c=Ft(),{id:d=`headlessui-menu-items-${c}`,...p}=e,[h,g]=Zr("Menu.Items"),w=xt(h.itemsRef,i),O=Jt(h.itemsRef),I=Yt(),L=cr(),N=L!==null?(L&jt.Open)===jt.Open:h.menuState===0;n.useEffect(()=>{let z=h.itemsRef.current;z&&h.menuState===0&&z!==(O==null?void 0:O.activeElement)&&z.focus({preventScroll:!0})},[h.menuState,h.itemsRef,O]),S({container:h.itemsRef.current,enabled:h.menuState===0,accept(z){return z.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:z.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(z){z.setAttribute("role","none")}});let A=J(z=>{var K,ae;switch(I.dispose(),z.key){case qe.Space:if(h.searchQuery!=="")return z.preventDefault(),z.stopPropagation(),g({type:3,value:z.key});case qe.Enter:if(z.preventDefault(),z.stopPropagation(),g({type:1}),h.activeItemIndex!==null){let{dataRef:oe}=h.items[h.activeItemIndex];(ae=(K=oe.current)==null?void 0:K.domRef.current)==null||ae.click()}Dr(h.buttonRef.current);break;case qe.ArrowDown:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.Next});case qe.ArrowUp:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.Previous});case qe.Home:case qe.PageUp:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.First});case qe.End:case qe.PageDown:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.Last});case qe.Escape:z.preventDefault(),z.stopPropagation(),g({type:1}),_t().nextFrame(()=>{var oe;return(oe=h.buttonRef.current)==null?void 0:oe.focus({preventScroll:!0})});break;case qe.Tab:z.preventDefault(),z.stopPropagation(),g({type:1}),_t().nextFrame(()=>{vn(h.buttonRef.current,z.shiftKey?Ht.Previous:Ht.Next)});break;default:z.key.length===1&&(g({type:3,value:z.key}),I.setTimeout(()=>g({type:4}),350));break}}),F=J(z=>{switch(z.key){case qe.Space:z.preventDefault();break}}),D=n.useMemo(()=>({open:h.menuState===0}),[h]),H={"aria-activedescendant":h.activeItemIndex===null||(o=h.items[h.activeItemIndex])==null?void 0:o.id,"aria-labelledby":(s=h.buttonRef.current)==null?void 0:s.id,id:d,onKeyDown:A,onKeyUp:F,role:"menu",tabIndex:0,ref:w};return fe({ourProps:H,theirProps:p,slot:D,defaultTag:fp,features:pp,visible:N,name:"Menu.Items"})}let hp=n.Fragment;function vp(e,i){let o=Ft(),{id:s=`headlessui-menu-item-${o}`,disabled:c=!1,...d}=e,[p,h]=Zr("Menu.Item"),g=p.activeItemIndex!==null?p.items[p.activeItemIndex].id===s:!1,w=n.useRef(null),O=xt(i,w);Ie(()=>{if(p.__demoMode||p.menuState!==0||!g||p.activationTrigger===0)return;let oe=_t();return oe.requestAnimationFrame(()=>{var he,Ve;(Ve=(he=w.current)==null?void 0:he.scrollIntoView)==null||Ve.call(he,{block:"nearest"})}),oe.dispose},[p.__demoMode,w,g,p.menuState,p.activationTrigger,p.activeItemIndex]);let I=np(w),L=n.useRef({disabled:c,domRef:w,get textValue(){return I()}});Ie(()=>{L.current.disabled=c},[L,c]),Ie(()=>(h({type:5,id:s,dataRef:L}),()=>h({type:6,id:s})),[L,s]);let N=J(()=>{h({type:1})}),A=J(oe=>{if(c)return oe.preventDefault();h({type:1}),Dr(p.buttonRef.current)}),F=J(()=>{if(c)return h({type:2,focus:ot.Nothing});h({type:2,focus:ot.Specific,id:s})}),D=Hr(),H=J(oe=>D.update(oe)),z=J(oe=>{D.wasMoved(oe)&&(c||g||h({type:2,focus:ot.Specific,id:s,trigger:0}))}),K=J(oe=>{D.wasMoved(oe)&&(c||g&&h({type:2,focus:ot.Nothing}))}),ae=n.useMemo(()=>({active:g,disabled:c,close:N}),[g,c,N]);return fe({ourProps:{id:s,ref:O,role:"menuitem",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,disabled:void 0,onClick:A,onFocus:F,onPointerEnter:H,onMouseEnter:H,onPointerMove:z,onMouseMove:z,onPointerLeave:K,onMouseLeave:K},theirProps:d,slot:ae,defaultTag:hp,name:"Menu.Item"})}let gp=be(up),bp=be(dp),xp=be(mp),yp=be(vp),Yr=Object.assign(gp,{Button:bp,Items:xp,Item:yp}),ji=n.createContext(null);function Ti(){let e=n.useContext(ji);if(e===null){let i=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(i,Ti),i}return e}function wp(){let[e,i]=n.useState([]);return[e.length>0?e.join(" "):void 0,n.useMemo(()=>function(o){let s=J(d=>(i(p=>[...p,d]),()=>i(p=>{let h=p.slice(),g=h.indexOf(d);return g!==-1&&h.splice(g,1),h}))),c=n.useMemo(()=>({register:s,slot:o.slot,name:o.name,props:o.props}),[s,o.slot,o.name,o.props]);return n.createElement(ji.Provider,{value:c},o.children)},[i])]}let Ep="label";function Sp(e,i){let o=Ft(),{id:s=`headlessui-label-${o}`,passive:c=!1,...d}=e,p=Ti(),h=xt(i);Ie(()=>p.register(s),[s,p.register]);let g={ref:h,...p.props,id:s};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in d&&delete d.onClick),fe({ourProps:g,theirProps:d,slot:p.slot||{},defaultTag:Ep,name:p.name||"Label"})}let Cp=be(Sp),jp=Object.assign(Cp,{});function Tp(e=0){let[i,o]=n.useState(e),s=fr(),c=n.useCallback(g=>{s.current&&o(w=>w|g)},[i,s]),d=n.useCallback(g=>!!(i&g),[i]),p=n.useCallback(g=>{s.current&&o(w=>w&~g)},[o,s]),h=n.useCallback(g=>{s.current&&o(w=>w^g)},[o]);return{flags:i,addFlag:c,hasFlag:d,removeFlag:p,toggleFlag:h}}let Ko=n.createContext(null);Ko.displayName="GroupContext";let Op=n.Fragment;function Np(e){var i;let[o,s]=n.useState(null),[c,d]=wp(),[p,h]=yi(),g=n.useMemo(()=>({switch:o,setSwitch:s,labelledby:c,describedby:p}),[o,s,c,p]),w={},O=e;return n.createElement(h,{name:"Switch.Description"},n.createElement(d,{name:"Switch.Label",props:{htmlFor:(i=g.switch)==null?void 0:i.id,onClick(I){o&&(I.currentTarget.tagName==="LABEL"&&I.preventDefault(),o.click(),o.focus({preventScroll:!0}))}}},n.createElement(Ko.Provider,{value:g},fe({ourProps:w,theirProps:O,defaultTag:Op,name:"Switch.Group"}))))}let Ip="button";function kp(e,i){var o;let s=Ft(),{id:c=`headlessui-switch-${s}`,checked:d,defaultChecked:p=!1,onChange:h,disabled:g=!1,name:w,value:O,form:I,...L}=e,N=n.useContext(Ko),A=n.useRef(null),F=xt(A,i,N===null?null:N.setSwitch),[D,H]=Qn(d,h,p),z=J(()=>H==null?void 0:H(!D)),K=J(ve=>{if(Ur(ve.currentTarget))return ve.preventDefault();ve.preventDefault(),z()}),ae=J(ve=>{ve.key===qe.Space?(ve.preventDefault(),z()):ve.key===qe.Enter&&bd(ve.currentTarget)}),oe=J(ve=>ve.preventDefault()),he=n.useMemo(()=>({checked:D}),[D]),Ve={id:c,ref:F,role:"switch",type:sr(e,A),tabIndex:e.tabIndex===-1?0:(o=e.tabIndex)!=null?o:0,"aria-checked":D,"aria-labelledby":N==null?void 0:N.labelledby,"aria-describedby":N==null?void 0:N.describedby,disabled:g,onClick:K,onKeyUp:ae,onKeyPress:oe},ze=Yt();return n.useEffect(()=>{var ve;let xe=(ve=A.current)==null?void 0:ve.closest("form");xe&&p!==void 0&&ze.addEventListener(xe,"reset",()=>{H(p)})},[A,H]),n.createElement(n.Fragment,null,w!=null&&D&&n.createElement(ur,{features:sn.Hidden,...vt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:g,form:I,checked:D,name:w,value:O})}),fe({ourProps:Ve,theirProps:L,slot:he,defaultTag:Ip,name:"Switch"}))}let Pp=be(kp),Fp=Np,Mp=Object.assign(Pp,{Group:Fp,Label:jp,Description:wi});function Rp(e){let i={called:!1};return(...o)=>{if(!i.called)return i.called=!0,e(...o)}}function Xo(e,...i){e&&i.length>0&&e.classList.add(...i)}function Jo(e,...i){e&&i.length>0&&e.classList.remove(...i)}function Lp(e,i){let o=_t();if(!e)return o.dispose;let{transitionDuration:s,transitionDelay:c}=getComputedStyle(e),[d,p]=[s,c].map(g=>{let[w=0]=g.split(",").filter(Boolean).map(O=>O.includes("ms")?parseFloat(O):parseFloat(O)*1e3).sort((O,I)=>I-O);return w}),h=d+p;if(h!==0){o.group(w=>{w.setTimeout(()=>{i(),w.dispose()},h),w.addEventListener(e,"transitionrun",O=>{O.target===O.currentTarget&&w.dispose()})});let g=o.addEventListener(e,"transitionend",w=>{w.target===w.currentTarget&&(i(),g())})}else i();return o.add(()=>i()),o.dispose}function Ap(e,i,o,s){let c=o?"enter":"leave",d=_t(),p=s!==void 0?Rp(s):()=>{};c==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let h=ct(c,{enter:()=>i.enter,leave:()=>i.leave}),g=ct(c,{enter:()=>i.enterTo,leave:()=>i.leaveTo}),w=ct(c,{enter:()=>i.enterFrom,leave:()=>i.leaveFrom});return Jo(e,...i.base,...i.enter,...i.enterTo,...i.enterFrom,...i.leave,...i.leaveFrom,...i.leaveTo,...i.entered),Xo(e,...i.base,...h,...w),d.nextFrame(()=>{Jo(e,...i.base,...h,...w),Xo(e,...i.base,...h,...g),Lp(e,()=>(Jo(e,...i.base,...h),Xo(e,...i.base,...i.entered),p()))}),d.dispose}function Dp({immediate:e,container:i,direction:o,classes:s,onStart:c,onStop:d}){let p=fr(),h=Yt(),g=Pt(o);Ie(()=>{e&&(g.current="enter")},[e]),Ie(()=>{let w=_t();h.add(w.dispose);let O=i.current;if(O&&g.current!=="idle"&&p.current)return w.dispose(),c.current(g.current),w.add(Ap(O,s.current,g.current==="enter",()=>{w.dispose(),d.current(g.current)})),w.dispose},[o])}function bn(e=""){return e.split(/\s+/).filter(i=>i.length>1)}let Gr=n.createContext(null);Gr.displayName="TransitionContext";var $p=(e=>(e.Visible="visible",e.Hidden="hidden",e))($p||{});function _p(){let e=n.useContext(Gr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Bp(){let e=n.useContext(qr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let qr=n.createContext(null);qr.displayName="NestingContext";function Kr(e){return"children"in e?Kr(e.children):e.current.filter(({el:i})=>i.current!==null).filter(({state:i})=>i==="visible").length>0}function Oi(e,i){let o=Pt(e),s=n.useRef([]),c=fr(),d=Yt(),p=J((N,A=Me.Hidden)=>{let F=s.current.findIndex(({el:D})=>D===N);F!==-1&&(ct(A,{[Me.Unmount](){s.current.splice(F,1)},[Me.Hidden](){s.current[F].state="hidden"}}),d.microTask(()=>{var D;!Kr(s)&&c.current&&((D=o.current)==null||D.call(o))}))}),h=J(N=>{let A=s.current.find(({el:F})=>F===N);return A?A.state!=="visible"&&(A.state="visible"):s.current.push({el:N,state:"visible"}),()=>p(N,Me.Unmount)}),g=n.useRef([]),w=n.useRef(Promise.resolve()),O=n.useRef({enter:[],leave:[],idle:[]}),I=J((N,A,F)=>{g.current.splice(0),i&&(i.chains.current[A]=i.chains.current[A].filter(([D])=>D!==N)),i==null||i.chains.current[A].push([N,new Promise(D=>{g.current.push(D)})]),i==null||i.chains.current[A].push([N,new Promise(D=>{Promise.all(O.current[A].map(([H,z])=>z)).then(()=>D())})]),A==="enter"?w.current=w.current.then(()=>i==null?void 0:i.wait.current).then(()=>F(A)):F(A)}),L=J((N,A,F)=>{Promise.all(O.current[A].splice(0).map(([D,H])=>H)).then(()=>{var D;(D=g.current.shift())==null||D()}).then(()=>F(A))});return n.useMemo(()=>({children:s,register:h,unregister:p,onStart:I,onStop:L,wait:w,chains:O}),[h,p,s,I,L,O,w])}function zp(){}let Wp=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ni(e){var i;let o={};for(let s of Wp)o[s]=(i=e[s])!=null?i:zp;return o}function Hp(e){let i=n.useRef(Ni(e));return n.useEffect(()=>{i.current=Ni(e)},[e]),i}let Up="div",Ii=de.RenderStrategy;function Vp(e,i){var o,s;let{beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h,enter:g,enterFrom:w,enterTo:O,entered:I,leave:L,leaveFrom:N,leaveTo:A,...F}=e,D=n.useRef(null),H=xt(D,i),z=(o=F.unmount)==null||o?Me.Unmount:Me.Hidden,{show:K,appear:ae,initial:oe}=_p(),[he,Ve]=n.useState(K?"visible":"hidden"),ze=Bp(),{register:ve,unregister:xe}=ze;n.useEffect(()=>ve(D),[ve,D]),n.useEffect(()=>{if(z===Me.Hidden&&D.current){if(K&&he!=="visible"){Ve("visible");return}return ct(he,{hidden:()=>xe(D),visible:()=>ve(D)})}},[he,D,ve,xe,K,z]);let Se=Pt({base:bn(F.className),enter:bn(g),enterFrom:bn(w),enterTo:bn(O),entered:bn(I),leave:bn(L),leaveFrom:bn(N),leaveTo:bn(A)}),De=Hp({beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h}),st=hn();n.useEffect(()=>{if(st&&he==="visible"&&D.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,he,st]);let ft=oe&&!ae,Z=ae&&K&&oe,at=!st||ft?"idle":K?"enter":"leave",_e=Tp(0),gt=J(yt=>ct(yt,{enter:()=>{_e.addFlag(jt.Opening),De.current.beforeEnter()},leave:()=>{_e.addFlag(jt.Closing),De.current.beforeLeave()},idle:()=>{}})),ie=J(yt=>ct(yt,{enter:()=>{_e.removeFlag(jt.Opening),De.current.afterEnter()},leave:()=>{_e.removeFlag(jt.Closing),De.current.afterLeave()},idle:()=>{}})),We=Oi(()=>{Ve("hidden"),xe(D)},ze),lt=n.useRef(!1);Dp({immediate:Z,container:D,classes:Se,direction:at,onStart:Pt(yt=>{lt.current=!0,We.onStart(D,yt,gt)}),onStop:Pt(yt=>{lt.current=!1,We.onStop(D,yt,ie),yt==="leave"&&!Kr(We)&&(Ve("hidden"),xe(D))})});let Tt=F,Rt={ref:H};return Z?Tt={...Tt,className:X(F.className,...Se.current.enter,...Se.current.enterFrom)}:lt.current&&(Tt.className=X(F.className,(s=D.current)==null?void 0:s.className),Tt.className===""&&delete Tt.className),n.createElement(qr.Provider,{value:We},n.createElement(Ao,{value:ct(he,{visible:jt.Open,hidden:jt.Closed})|_e.flags},fe({ourProps:Rt,theirProps:Tt,defaultTag:Up,features:Ii,visible:he==="visible",name:"Transition.Child"})))}function Zp(e,i){let{show:o,appear:s=!1,unmount:c=!0,...d}=e,p=n.useRef(null),h=xt(p,i);hn();let g=cr();if(o===void 0&&g!==null&&(o=(g&jt.Open)===jt.Open),![!0,!1].includes(o))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[w,O]=n.useState(o?"visible":"hidden"),I=Oi(()=>{O("hidden")}),[L,N]=n.useState(!0),A=n.useRef([o]);Ie(()=>{L!==!1&&A.current[A.current.length-1]!==o&&(A.current.push(o),N(!1))},[A,o]);let F=n.useMemo(()=>({show:o,appear:s,initial:L}),[o,s,L]);n.useEffect(()=>{if(o)O("visible");else if(!Kr(I))O("hidden");else{let K=p.current;if(!K)return;let ae=K.getBoundingClientRect();ae.x===0&&ae.y===0&&ae.width===0&&ae.height===0&&O("hidden")}},[o,I]);let D={unmount:c},H=J(()=>{var K;L&&N(!1),(K=e.beforeEnter)==null||K.call(e)}),z=J(()=>{var K;L&&N(!1),(K=e.beforeLeave)==null||K.call(e)});return n.createElement(qr.Provider,{value:I},n.createElement(Gr.Provider,{value:F},fe({ourProps:{...D,as:n.Fragment,children:n.createElement(ki,{ref:h,...D,...d,beforeEnter:H,beforeLeave:z})},theirProps:{},defaultTag:n.Fragment,features:Ii,visible:w==="visible",name:"Transition"})))}function Yp(e,i){let o=n.useContext(Gr)!==null,s=cr()!==null;return n.createElement(n.Fragment,null,!o&&s?n.createElement(Qo,{ref:i,...e}):n.createElement(ki,{ref:i,...e}))}let Qo=be(Zp),ki=be(Vp),Gp=be(Yp),Nn=Object.assign(Qo,{Child:Gp,Root:Qo});function qp({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const Kp=a.forwardRef(qp);function Xp({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const Jp=a.forwardRef(Xp);function Qp({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const em=a.forwardRef(Qp);function tm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const nm=a.forwardRef(tm);function rm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))}const om=a.forwardRef(rm);function lm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Pi=a.forwardRef(lm);function im({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const sm=a.forwardRef(im);function am({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const um=a.forwardRef(am);function cm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const dm=a.forwardRef(cm),fm={warning:{color:"bg-yellow-50",icon:y.jsx(sm,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:y.jsx(dm,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:y.jsx(em,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:y.jsx(um,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},pm=({type:e="info",title:i,message:o,active:s=!1,time:c=1e3,onClose:d})=>{const[p,h]=n.useState(!1),g=n.useRef(null);n.useEffect(()=>(s&&(h(!0),g.current=setTimeout(()=>{h(!1),d&&d()},c)),()=>clearTimeout(g.current)),[s,c,d]);const w=fm[e];return p?y.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:y.jsx(Nn,{as:n.Fragment,show:p,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:y.jsxs("div",{className:x("rounded-md p-4 text-center",w.color),children:[y.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[w.icon,y.jsx("h3",{className:x("text-sm font-medium ml-3",w.colorTitle),children:i})]}),y.jsx("div",{className:x("mt-2 text-sm",w.colorText),children:y.jsx("p",{children:o})})]})})}):null};function mm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const hm=a.forwardRef(mm);function vm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const gm=a.forwardRef(vm);function bm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),a.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const xm=a.forwardRef(bm);function ym({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const wm=a.forwardRef(ym);function Em({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const Sm=a.forwardRef(Em);function Cm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const jm=a.forwardRef(Cm),Tm=({src:e,alt:i,width:o,height:s,className:c="",classNameIcon:d="",isIcon:p=!0,acronym:h=""})=>{function g(){if(typeof h!="string")return h;const w=h.toLowerCase(),O=w.split(" "),I=O[O.length-1];return w.charAt(0)+I.charAt(0)}return y.jsx(y.Fragment,{children:e?y.jsx("img",{src:e,alt:i,width:o,height:s,className:x(c!==""&&c),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:w=>w.currentTarget.style.filter="none","data-testid":"img"}):p?y.jsx(Sm,{className:x("bg-white text-default-5",d!==""?d:"w-7 h-7")}):y.jsx("div",{className:x("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",d!==""?d:"w-7 h-7"),children:g()})})},Om=({steps:e,onClick:i})=>{const[o,s]=n.useState(0),c=d=>{s(d),i(d)};return y.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:y.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((d,p)=>y.jsx("li",{children:o!==p?y.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>c(p),"data-testid":`step-${p}`,children:y.jsx("span",{className:"sr-only",children:"step"})}):y.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[y.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:y.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),y.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),y.jsx("span",{className:"sr-only",children:"step"})]})},p))})})};var Fi={exports:{}};/*!
|
|
65
|
+
`));let L=O.props,N=typeof(L==null?void 0:L.className)=="function"?(...F)=>X(L==null?void 0:L.className(...F),g.className):X(L==null?void 0:L.className,g.className),A=N?{className:N}:{};return n.cloneElement(O,Object.assign({},Mt(O.props,vt($t(g,["ref"]))),I,w,{ref:c(O.ref,w.ref)},A))}return n.createElement(d,Object.assign({},$t(g,["ref"]),d!==n.Fragment&&w,d!==n.Fragment&&I),O)}function Ae(...e){return e.every(i=>i==null)?void 0:i=>{for(let o of e)o!=null&&(typeof o=="function"?o(i):o.current=i)}}function Mt(...e){if(e.length===0)return{};if(e.length===1)return e[0];let i={},o={};for(let s of e)for(let c in s)c.startsWith("on")&&typeof s[c]=="function"?(o[c]!=null||(o[c]=[]),o[c].push(s[c])):i[c]=s[c];if(i.disabled||i["aria-disabled"])return Object.assign(i,Object.fromEntries(Object.keys(o).map(s=>[s,void 0])));for(let s in o)Object.assign(i,{[s](c,...d){let p=o[s];for(let h of p){if((c instanceof Event||(c==null?void 0:c.nativeEvent)instanceof Event)&&c.defaultPrevented)return;h(c,...d)}}});return i}function be(e){var i;return Object.assign(n.forwardRef(e),{displayName:(i=e.displayName)!=null?i:e.name})}function vt(e){let i=Object.assign({},e);for(let o in i)i[o]===void 0&&delete i[o];return i}function $t(e,i=[]){let o=Object.assign({},e);for(let s of i)s in o&&delete o[s];return o}let gn="div";var sn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(sn||{});function Gt(e,i){var o;let{features:s=1,...c}=e,d={ref:i,"aria-hidden":(s&2)===2?!0:(o=c["aria-hidden"])!=null?o:void 0,hidden:(s&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return fe({ourProps:d,theirProps:c,slot:{},defaultTag:gn,name:"Hidden"})}let ur=be(Gt),Lo=n.createContext(null);Lo.displayName="OpenClosedContext";var jt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(jt||{});function cr(){return n.useContext(Lo)}function Ao({value:e,children:i}){return n.createElement(Lo.Provider,{value:e},i)}function hd(e){function i(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",i))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",i),i())}let Qt=[];hd(()=>{function e(i){i.target instanceof HTMLElement&&i.target!==document.body&&Qt[0]!==i.target&&(Qt.unshift(i.target),Qt=Qt.filter(o=>o!=null&&o.isConnected),Qt.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Ur(e){let i=e.parentElement,o=null;for(;i&&!(i instanceof HTMLFieldSetElement);)i instanceof HTMLLegendElement&&(o=i),i=i.parentElement;let s=(i==null?void 0:i.getAttribute("disabled"))==="";return s&&vd(o)?!1:s}function vd(e){if(!e)return!1;let i=e.previousElementSibling;for(;i!==null;){if(i instanceof HTMLLegendElement)return!1;i=i.previousElementSibling}return!0}function gd(e){throw new Error("Unexpected object: "+e)}var ot=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(ot||{});function Do(e,i){let o=i.resolveItems();if(o.length<=0)return null;let s=i.resolveActiveIndex(),c=s??-1;switch(e.focus){case 0:{for(let d=0;d<o.length;++d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 1:{for(let d=c-1;d>=0;--d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 2:{for(let d=c+1;d<o.length;++d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 3:{for(let d=o.length-1;d>=0;--d)if(!i.resolveDisabled(o[d],d,o))return d;return s}case 4:{for(let d=0;d<o.length;++d)if(i.resolveId(o[d],d,o)===e.id)return d;return s}case 5:return null;default:gd(e)}}function ii(e={},i=null,o=[]){for(let[s,c]of Object.entries(e))ai(o,si(i,s),c);return o}function si(e,i){return e?e+"["+i+"]":i}function ai(e,i,o){if(Array.isArray(o))for(let[s,c]of o.entries())ai(e,si(i,s.toString()),c);else o instanceof Date?e.push([i,o.toISOString()]):typeof o=="boolean"?e.push([i,o?"1":"0"]):typeof o=="string"?e.push([i,o]):typeof o=="number"?e.push([i,`${o}`]):o==null?e.push([i,""]):ii(o,i,e)}function bd(e){var i,o;let s=(i=e==null?void 0:e.form)!=null?i:e.closest("form");if(s){for(let c of s.elements)if(c!==e&&(c.tagName==="INPUT"&&c.type==="submit"||c.tagName==="BUTTON"&&c.type==="submit"||c.nodeName==="INPUT"&&c.type==="image")){c.click();return}(o=s.requestSubmit)==null||o.call(s)}}var qe=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(qe||{}),xd=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(xd||{}),yd=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(yd||{}),wd=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(wd||{}),Ed=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(Ed||{});function $o(e,i=o=>o){let o=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,s=i(e.options.slice()),c=s.length>0&&s[0].dataRef.current.order!==null?s.sort((p,h)=>p.dataRef.current.order-h.dataRef.current.order):Fn(s,p=>p.dataRef.current.domRef.current),d=o?c.indexOf(o):null;return d===-1&&(d=null),{options:c,activeOptionIndex:d}}let Sd={1(e){var i;return(i=e.dataRef.current)!=null&&i.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var i,o;if((i=e.dataRef.current)!=null&&i.disabled||e.comboboxState===0)return e;if((o=e.dataRef.current)!=null&&o.value){let s=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(s!==-1)return{...e,activeOptionIndex:s,comboboxState:0}}return{...e,comboboxState:0}},2(e,i){var o,s,c,d,p;if((o=e.dataRef.current)!=null&&o.disabled||(s=e.dataRef.current)!=null&&s.optionsRef.current&&!((c=e.dataRef.current)!=null&&c.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let O=i.focus===ot.Specific?i.idx:Do(i,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var L,N;return(N=(L=e.activeOptionIndex)!=null?L:e.virtual.options.findIndex(A=>!e.virtual.disabled(A)))!=null?N:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),I=(d=i.trigger)!=null?d:2;return e.activeOptionIndex===O&&e.activationTrigger===I?e:{...e,activeOptionIndex:O,activationTrigger:I}}let h=$o(e);if(h.activeOptionIndex===null){let O=h.options.findIndex(I=>!I.dataRef.current.disabled);O!==-1&&(h.activeOptionIndex=O)}let g=i.focus===ot.Specific?i.idx:Do(i,{resolveItems:()=>h.options,resolveActiveIndex:()=>h.activeOptionIndex,resolveId:O=>O.id,resolveDisabled:O=>O.dataRef.current.disabled}),w=(p=i.trigger)!=null?p:2;return e.activeOptionIndex===g&&e.activationTrigger===w?e:{...e,...h,activeOptionIndex:g,activationTrigger:w}},3:(e,i)=>{var o,s,c;if((o=e.dataRef.current)!=null&&o.virtual)return{...e,options:[...e.options,i.payload]};let d=i.payload,p=$o(e,g=>(g.push(d),g));e.activeOptionIndex===null&&(s=e.dataRef.current)!=null&&s.isSelected(i.payload.dataRef.current.value)&&(p.activeOptionIndex=p.options.indexOf(d));let h={...e,...p,activationTrigger:2};return(c=e.dataRef.current)!=null&&c.__demoMode&&e.dataRef.current.value===void 0&&(h.activeOptionIndex=0),h},4:(e,i)=>{var o;if((o=e.dataRef.current)!=null&&o.virtual)return{...e,options:e.options.filter(c=>c.id!==i.id)};let s=$o(e,c=>{let d=c.findIndex(p=>p.id===i.id);return d!==-1&&c.splice(d,1),c});return{...e,...s,activationTrigger:2}},5:(e,i)=>e.labelId===i.id?e:{...e,labelId:i.id},6:(e,i)=>e.activationTrigger===i.trigger?e:{...e,activationTrigger:i.trigger},7:(e,i)=>{var o;if(((o=e.virtual)==null?void 0:o.options)===i.options)return e;let s=e.activeOptionIndex;if(e.activeOptionIndex!==null){let c=i.options.indexOf(e.virtual.options[e.activeOptionIndex]);c!==-1?s=c:s=null}return{...e,activeOptionIndex:s,virtual:Object.assign({},e.virtual,{options:i.options})}}},_o=n.createContext(null);_o.displayName="ComboboxActionsContext";function dr(e){let i=n.useContext(_o);if(i===null){let o=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,dr),o}return i}let ui=n.createContext(null);function Cd(e){var i;let o=Tn("VirtualProvider"),[s,c]=n.useMemo(()=>{let g=o.optionsRef.current;if(!g)return[0,0];let w=window.getComputedStyle(g);return[parseFloat(w.paddingBlockStart||w.paddingTop),parseFloat(w.paddingBlockEnd||w.paddingBottom)]},[o.optionsRef.current]),d=Ze({scrollPaddingStart:s,scrollPaddingEnd:c,count:o.virtual.options.length,estimateSize(){return 40},getScrollElement(){var g;return(g=o.optionsRef.current)!=null?g:null},overscan:12}),[p,h]=n.useState(0);return Ie(()=>{h(g=>g+1)},[(i=o.virtual)==null?void 0:i.options]),n.createElement(ui.Provider,{value:d},n.createElement("div",{style:{position:"relative",width:"100%",height:`${d.getTotalSize()}px`},ref:g=>{if(g){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||o.activationTrigger===0)return;o.activeOptionIndex!==null&&o.virtual.options.length>o.activeOptionIndex&&d.scrollToIndex(o.activeOptionIndex)}}},d.getVirtualItems().map(g=>{var w;return n.createElement(n.Fragment,{key:g.key},n.cloneElement((w=e.children)==null?void 0:w.call(e,{option:o.virtual.options[g.index],open:o.comboboxState===0}),{key:`${p}-${g.key}`,"data-index":g.index,"aria-setsize":o.virtual.options.length,"aria-posinset":g.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${g.start}px)`,overflowAnchor:"none"}}))})))}let Bo=n.createContext(null);Bo.displayName="ComboboxDataContext";function Tn(e){let i=n.useContext(Bo);if(i===null){let o=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Tn),o}return i}function jd(e,i){return ct(i.type,Sd,e,i)}let Td=n.Fragment;function Od(e,i){let{value:o,defaultValue:s,onChange:c,form:d,name:p,by:h=null,disabled:g=!1,__demoMode:w=!1,nullable:O=!1,multiple:I=!1,immediate:L=!1,virtual:N=null,...A}=e,F=!1,D=null,[H=I?[]:void 0,z]=Qn(o,c,s),[K,ae]=n.useReducer(jd,{dataRef:n.createRef(),comboboxState:w?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),oe=n.useRef(!1),he=n.useRef({static:!1,hold:!1}),Ve=n.useRef(null),ze=n.useRef(null),ve=n.useRef(null),xe=n.useRef(null),Se=J(typeof h=="string"?(ne,ye)=>{let et=h;return(ne==null?void 0:ne[et])===(ye==null?void 0:ye[et])}:h??((ne,ye)=>ne===ye)),De=J(ne=>K.options.findIndex(ye=>Se(ye.dataRef.current.value,ne))),st=n.useCallback(ne=>ct(Y.mode,{1:()=>H.some(ye=>Se(ye,ne)),0:()=>Se(H,ne)}),[H]),ft=J(ne=>K.activeOptionIndex===De(ne)),Y=n.useMemo(()=>({...K,immediate:F,optionsPropsRef:he,labelRef:Ve,inputRef:ze,buttonRef:ve,optionsRef:xe,value:H,defaultValue:s,disabled:g,mode:I?1:0,virtual:K.virtual,get activeOptionIndex(){if(oe.current&&K.activeOptionIndex===null&&K.options.length>0){let ne=K.options.findIndex(ye=>!ye.dataRef.current.disabled);if(ne!==-1)return ne}return K.activeOptionIndex},calculateIndex:De,compare:Se,isSelected:st,isActive:ft,nullable:O,__demoMode:w}),[H,s,g,I,O,w,K,D]);Ie(()=>{},[D,void 0]),Ie(()=>{K.dataRef.current=Y},[Y]),Rn([Y.buttonRef,Y.inputRef,Y.optionsRef],()=>Le.closeCombobox(),Y.comboboxState===0);let at=n.useMemo(()=>{var ne,ye,et;return{open:Y.comboboxState===0,disabled:g,activeIndex:Y.activeOptionIndex,activeOption:Y.activeOptionIndex===null?null:Y.virtual?Y.virtual.options[(ne=Y.activeOptionIndex)!=null?ne:0]:(et=(ye=Y.options[Y.activeOptionIndex])==null?void 0:ye.dataRef.current.value)!=null?et:null,value:H}},[Y,g,H]),_e=J(()=>{if(Y.activeOptionIndex!==null){if(Y.virtual)Rt(Y.virtual.options[Y.activeOptionIndex]);else{let{dataRef:ne}=Y.options[Y.activeOptionIndex];Rt(ne.current.value)}Le.goToOption(ot.Specific,Y.activeOptionIndex)}}),gt=J(()=>{ae({type:0}),oe.current=!0}),ie=J(()=>{ae({type:1}),oe.current=!1}),We=J((ne,ye,et)=>(oe.current=!1,ne===ot.Specific?ae({type:2,focus:ot.Specific,idx:ye,trigger:et}):ae({type:2,focus:ne,trigger:et}))),lt=J((ne,ye)=>(ae({type:3,payload:{id:ne,dataRef:ye}}),()=>{Y.isActive(ye.current.value)&&(oe.current=!0),ae({type:4,id:ne})})),Tt=J(ne=>(ae({type:5,id:ne}),()=>ae({type:5,id:null}))),Rt=J(ne=>ct(Y.mode,{0(){return z==null?void 0:z(ne)},1(){let ye=Y.value.slice(),et=ye.findIndex(zt=>Se(zt,ne));return et===-1?ye.push(ne):ye.splice(et,1),z==null?void 0:z(ye)}})),yt=J(ne=>{ae({type:6,trigger:ne})}),Le=n.useMemo(()=>({onChange:Rt,registerOption:lt,registerLabel:Tt,goToOption:We,closeCombobox:ie,openCombobox:gt,setActivationTrigger:yt,selectActiveOption:_e}),[]),St=i===null?{}:{ref:i},Ke=n.useRef(null),At=Yt();return n.useEffect(()=>{Ke.current&&s!==void 0&&At.addEventListener(Ke.current,"reset",()=>{z==null||z(s)})},[Ke,z]),n.createElement(_o.Provider,{value:Le},n.createElement(Bo.Provider,{value:Y},n.createElement(Ao,{value:ct(Y.comboboxState,{0:jt.Open,1:jt.Closed})},p!=null&&H!=null&&ii({[p]:H}).map(([ne,ye],et)=>n.createElement(ur,{features:sn.Hidden,ref:et===0?zt=>{var Ln;Ke.current=(Ln=zt==null?void 0:zt.closest("form"))!=null?Ln:null}:void 0,...vt({key:ne,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:d,disabled:g,name:ne,value:ye})})),fe({ourProps:St,theirProps:A,slot:at,defaultTag:Td,name:"Combobox"}))))}let Nd="input";function Id(e,i){var o,s,c,d,p;let h=Ft(),{id:g=`headlessui-combobox-input-${h}`,onChange:w,displayValue:O,type:I="text",...L}=e,N=Tn("Combobox.Input"),A=dr("Combobox.Input"),F=xt(N.inputRef,i),D=Jt(N.inputRef),H=n.useRef(!1),z=Yt(),K=J(()=>{A.onChange(null),N.optionsRef.current&&(N.optionsRef.current.scrollTop=0),A.goToOption(ot.Nothing)}),ae=function(){var Y;return typeof O=="function"&&N.value!==void 0?(Y=O(N.value))!=null?Y:"":typeof N.value=="string"?N.value:""}();W(([Y,at],[_e,gt])=>{if(H.current)return;let ie=N.inputRef.current;ie&&((gt===0&&at===1||Y!==_e)&&(ie.value=Y),requestAnimationFrame(()=>{if(H.current||!ie||(D==null?void 0:D.activeElement)!==ie)return;let{selectionStart:We,selectionEnd:lt}=ie;Math.abs((lt??0)-(We??0))===0&&We===0&&ie.setSelectionRange(ie.value.length,ie.value.length)}))},[ae,N.comboboxState,D]),W(([Y],[at])=>{if(Y===0&&at===1){if(H.current)return;let _e=N.inputRef.current;if(!_e)return;let gt=_e.value,{selectionStart:ie,selectionEnd:We,selectionDirection:lt}=_e;_e.value="",_e.value=gt,lt!==null?_e.setSelectionRange(ie,We,lt):_e.setSelectionRange(ie,We)}},[N.comboboxState]);let oe=n.useRef(!1),he=J(()=>{oe.current=!0}),Ve=J(()=>{z.nextFrame(()=>{oe.current=!1})}),ze=J(Y=>{switch(H.current=!0,Y.key){case qe.Enter:if(H.current=!1,N.comboboxState!==0||oe.current)return;if(Y.preventDefault(),Y.stopPropagation(),N.activeOptionIndex===null){A.closeCombobox();return}A.selectActiveOption(),N.mode===0&&A.closeCombobox();break;case qe.ArrowDown:return H.current=!1,Y.preventDefault(),Y.stopPropagation(),ct(N.comboboxState,{0:()=>A.goToOption(ot.Next),1:()=>A.openCombobox()});case qe.ArrowUp:return H.current=!1,Y.preventDefault(),Y.stopPropagation(),ct(N.comboboxState,{0:()=>A.goToOption(ot.Previous),1:()=>{A.openCombobox(),z.nextFrame(()=>{N.value||A.goToOption(ot.Last)})}});case qe.Home:if(Y.shiftKey)break;return H.current=!1,Y.preventDefault(),Y.stopPropagation(),A.goToOption(ot.First);case qe.PageUp:return H.current=!1,Y.preventDefault(),Y.stopPropagation(),A.goToOption(ot.First);case qe.End:if(Y.shiftKey)break;return H.current=!1,Y.preventDefault(),Y.stopPropagation(),A.goToOption(ot.Last);case qe.PageDown:return H.current=!1,Y.preventDefault(),Y.stopPropagation(),A.goToOption(ot.Last);case qe.Escape:return H.current=!1,N.comboboxState!==0?void 0:(Y.preventDefault(),N.optionsRef.current&&!N.optionsPropsRef.current.static&&Y.stopPropagation(),N.nullable&&N.mode===0&&N.value===null&&K(),A.closeCombobox());case qe.Tab:if(H.current=!1,N.comboboxState!==0)return;N.mode===0&&N.activationTrigger!==1&&A.selectActiveOption(),A.closeCombobox();break}}),ve=J(Y=>{w==null||w(Y),N.nullable&&N.mode===0&&Y.target.value===""&&K(),A.openCombobox()}),xe=J(Y=>{var at,_e,gt;let ie=(at=Y.relatedTarget)!=null?at:Qt.find(We=>We!==Y.currentTarget);if(H.current=!1,!((_e=N.optionsRef.current)!=null&&_e.contains(ie))&&!((gt=N.buttonRef.current)!=null&>.contains(ie))&&N.comboboxState===0)return Y.preventDefault(),N.mode===0&&(N.nullable&&N.value===null?K():N.activationTrigger!==1&&A.selectActiveOption()),A.closeCombobox()}),Se=J(Y=>{var at,_e,gt;let ie=(at=Y.relatedTarget)!=null?at:Qt.find(We=>We!==Y.currentTarget);(_e=N.buttonRef.current)!=null&&_e.contains(ie)||(gt=N.optionsRef.current)!=null&>.contains(ie)||N.disabled||N.immediate&&N.comboboxState!==0&&(A.openCombobox(),z.nextFrame(()=>{A.setActivationTrigger(1)}))}),De=Zt(()=>{if(N.labelId)return[N.labelId].join(" ")},[N.labelId]),st=n.useMemo(()=>({open:N.comboboxState===0,disabled:N.disabled}),[N]),ft={ref:F,id:g,role:"combobox",type:I,"aria-controls":(o=N.optionsRef.current)==null?void 0:o.id,"aria-expanded":N.comboboxState===0,"aria-activedescendant":N.activeOptionIndex===null?void 0:N.virtual?(s=N.options.find(Y=>{var at;return!((at=N.virtual)!=null&&at.disabled(Y.dataRef.current.value))&&N.compare(Y.dataRef.current.value,N.virtual.options[N.activeOptionIndex])}))==null?void 0:s.id:(c=N.options[N.activeOptionIndex])==null?void 0:c.id,"aria-labelledby":De,"aria-autocomplete":"list",defaultValue:(p=(d=e.defaultValue)!=null?d:N.defaultValue!==void 0?O==null?void 0:O(N.defaultValue):null)!=null?p:N.defaultValue,disabled:N.disabled,onCompositionStart:he,onCompositionEnd:Ve,onKeyDown:ze,onChange:ve,onFocus:Se,onBlur:xe};return fe({ourProps:ft,theirProps:L,slot:st,defaultTag:Nd,name:"Combobox.Input"})}let kd="button";function Pd(e,i){var o;let s=Tn("Combobox.Button"),c=dr("Combobox.Button"),d=xt(s.buttonRef,i),p=Ft(),{id:h=`headlessui-combobox-button-${p}`,...g}=e,w=Yt(),O=J(F=>{switch(F.key){case qe.ArrowDown:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&c.openCombobox(),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})});case qe.ArrowUp:return F.preventDefault(),F.stopPropagation(),s.comboboxState===1&&(c.openCombobox(),w.nextFrame(()=>{s.value||c.goToOption(ot.Last)})),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})});case qe.Escape:return s.comboboxState!==0?void 0:(F.preventDefault(),s.optionsRef.current&&!s.optionsPropsRef.current.static&&F.stopPropagation(),c.closeCombobox(),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})}));default:return}}),I=J(F=>{if(Ur(F.currentTarget))return F.preventDefault();s.comboboxState===0?c.closeCombobox():(F.preventDefault(),c.openCombobox()),w.nextFrame(()=>{var D;return(D=s.inputRef.current)==null?void 0:D.focus({preventScroll:!0})})}),L=Zt(()=>{if(s.labelId)return[s.labelId,h].join(" ")},[s.labelId,h]),N=n.useMemo(()=>({open:s.comboboxState===0,disabled:s.disabled,value:s.value}),[s]),A={ref:d,id:h,type:sr(e,s.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(o=s.optionsRef.current)==null?void 0:o.id,"aria-expanded":s.comboboxState===0,"aria-labelledby":L,disabled:s.disabled,onClick:I,onKeyDown:O};return fe({ourProps:A,theirProps:g,slot:N,defaultTag:kd,name:"Combobox.Button"})}let Fd="label";function Md(e,i){let o=Ft(),{id:s=`headlessui-combobox-label-${o}`,...c}=e,d=Tn("Combobox.Label"),p=dr("Combobox.Label"),h=xt(d.labelRef,i);Ie(()=>p.registerLabel(s),[s]);let g=J(()=>{var O;return(O=d.inputRef.current)==null?void 0:O.focus({preventScroll:!0})}),w=n.useMemo(()=>({open:d.comboboxState===0,disabled:d.disabled}),[d]);return fe({ourProps:{ref:h,id:s,onClick:g},theirProps:c,slot:w,defaultTag:Fd,name:"Combobox.Label"})}let Rd="ul",Ld=de.RenderStrategy|de.Static;function Ad(e,i){let o=Ft(),{id:s=`headlessui-combobox-options-${o}`,hold:c=!1,...d}=e,p=Tn("Combobox.Options"),h=xt(p.optionsRef,i),g=cr(),w=g!==null?(g&jt.Open)===jt.Open:p.comboboxState===0;Ie(()=>{var N;p.optionsPropsRef.current.static=(N=e.static)!=null?N:!1},[p.optionsPropsRef,e.static]),Ie(()=>{p.optionsPropsRef.current.hold=c},[p.optionsPropsRef,c]),S({container:p.optionsRef.current,enabled:p.comboboxState===0,accept(N){return N.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:N.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(N){N.setAttribute("role","none")}});let O=Zt(()=>{var N,A;return(A=p.labelId)!=null?A:(N=p.buttonRef.current)==null?void 0:N.id},[p.labelId,p.buttonRef.current]),I=n.useMemo(()=>({open:p.comboboxState===0,option:void 0}),[p]),L={"aria-labelledby":O,role:"listbox","aria-multiselectable":p.mode===1?!0:void 0,id:s,ref:h};return p.virtual&&p.comboboxState===0&&Object.assign(d,{children:n.createElement(Cd,null,d.children)}),fe({ourProps:L,theirProps:d,slot:I,defaultTag:Rd,features:Ld,visible:w,name:"Combobox.Options"})}let Dd="li";function $d(e,i){var o;let s=Ft(),{id:c=`headlessui-combobox-option-${s}`,disabled:d=!1,value:p,order:h=null,...g}=e,w=Tn("Combobox.Option"),O=dr("Combobox.Option"),I=w.virtual?w.activeOptionIndex===w.calculateIndex(p):w.activeOptionIndex===null?!1:((o=w.options[w.activeOptionIndex])==null?void 0:o.id)===c,L=w.isSelected(p),N=n.useRef(null),A=Pt({disabled:d,value:p,domRef:N,order:h}),F=n.useContext(ui),D=xt(i,N,F?F.measureElement:null),H=J(()=>O.onChange(p));Ie(()=>O.registerOption(c,A),[A,c]);let z=n.useRef(!(w.virtual||w.__demoMode));Ie(()=>{if(!w.virtual||!w.__demoMode)return;let xe=_t();return xe.requestAnimationFrame(()=>{z.current=!0}),xe.dispose},[w.virtual,w.__demoMode]),Ie(()=>{if(!z.current||w.comboboxState!==0||!I||w.activationTrigger===0)return;let xe=_t();return xe.requestAnimationFrame(()=>{var Se,De;(De=(Se=N.current)==null?void 0:Se.scrollIntoView)==null||De.call(Se,{block:"nearest"})}),xe.dispose},[N,I,w.comboboxState,w.activationTrigger,w.activeOptionIndex]);let K=J(xe=>{var Se;if(d||(Se=w.virtual)!=null&&Se.disabled(p))return xe.preventDefault();H(),_r()||requestAnimationFrame(()=>{var De;return(De=w.inputRef.current)==null?void 0:De.focus({preventScroll:!0})}),w.mode===0&&requestAnimationFrame(()=>O.closeCombobox())}),ae=J(()=>{var xe;if(d||(xe=w.virtual)!=null&&xe.disabled(p))return O.goToOption(ot.Nothing);let Se=w.calculateIndex(p);O.goToOption(ot.Specific,Se)}),oe=Hr(),he=J(xe=>oe.update(xe)),Ve=J(xe=>{var Se;if(!oe.wasMoved(xe)||d||(Se=w.virtual)!=null&&Se.disabled(p)||I)return;let De=w.calculateIndex(p);O.goToOption(ot.Specific,De,0)}),ze=J(xe=>{var Se;oe.wasMoved(xe)&&(d||(Se=w.virtual)!=null&&Se.disabled(p)||I&&(w.optionsPropsRef.current.hold||O.goToOption(ot.Nothing)))}),ve=n.useMemo(()=>({active:I,selected:L,disabled:d}),[I,L,d]);return fe({ourProps:{id:c,ref:D,role:"option",tabIndex:d===!0?void 0:-1,"aria-disabled":d===!0?!0:void 0,"aria-selected":L,disabled:void 0,onClick:K,onFocus:ae,onPointerEnter:he,onMouseEnter:he,onPointerMove:Ve,onMouseMove:Ve,onPointerLeave:ze,onMouseLeave:ze},theirProps:g,slot:ve,defaultTag:Dd,name:"Combobox.Option"})}let _d=be(Od),Bd=be(Pd),zd=be(Id),Wd=be(Md),Hd=be(Ad),Ud=be($d),an=Object.assign(_d,{Input:zd,Button:Bd,Label:Wd,Options:Hd,Option:Ud});function ci(e,i,o,s){let c=Pt(o);n.useEffect(()=>{e=e??window;function d(p){c.current(p)}return e.addEventListener(i,d,s),()=>e.removeEventListener(i,d,s)},[e,i,s])}function fr(){let e=n.useRef(!1);return Ie(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function di(e){let i=J(e),o=n.useRef(!1);n.useEffect(()=>(o.current=!1,()=>{o.current=!0,on(()=>{o.current&&i()})}),[i])}var pr=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(pr||{});function Vd(){let e=n.useRef(0);return Br("keydown",i=>{i.key==="Tab"&&(e.current=i.shiftKey?1:0)},!0),e}function fi(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let i=new Set;for(let o of e.current)o.current instanceof HTMLElement&&i.add(o.current);return i}let Zd="div";var pi=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(pi||{});function Yd(e,i){let o=n.useRef(null),s=xt(o,i),{initialFocus:c,containers:d,features:p=30,...h}=e;hn()||(p=1);let g=Jt(o);Kd({ownerDocument:g},!!(p&16));let w=Xd({ownerDocument:g,container:o,initialFocus:c},!!(p&2));Jd({ownerDocument:g,container:o,containers:d,previousActiveElement:w},!!(p&8));let O=Vd(),I=J(F=>{let D=o.current;D&&(H=>H())(()=>{ct(O.current,{[pr.Forwards]:()=>{ln(D,Ht.First,{skipElements:[F.relatedTarget]})},[pr.Backwards]:()=>{ln(D,Ht.Last,{skipElements:[F.relatedTarget]})}})})}),L=Yt(),N=n.useRef(!1),A={ref:s,onKeyDown(F){F.key=="Tab"&&(N.current=!0,L.requestAnimationFrame(()=>{N.current=!1}))},onBlur(F){let D=fi(d);o.current instanceof HTMLElement&&D.add(o.current);let H=F.relatedTarget;H instanceof HTMLElement&&H.dataset.headlessuiFocusGuard!=="true"&&(mi(D,H)||(N.current?ln(o.current,ct(O.current,{[pr.Forwards]:()=>Ht.Next,[pr.Backwards]:()=>Ht.Previous})|Ht.WrapAround,{relativeTo:F.target}):F.target instanceof HTMLElement&&Xt(F.target)))}};return n.createElement(n.Fragment,null,!!(p&4)&&n.createElement(ur,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:sn.Focusable}),fe({ourProps:A,theirProps:h,defaultTag:Zd,name:"FocusTrap"}),!!(p&4)&&n.createElement(ur,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:I,features:sn.Focusable}))}let Gd=be(Yd),mr=Object.assign(Gd,{features:pi});function qd(e=!0){let i=n.useRef(Qt.slice());return W(([o],[s])=>{s===!0&&o===!1&&on(()=>{i.current.splice(0)}),s===!1&&o===!0&&(i.current=Qt.slice())},[e,Qt,i]),J(()=>{var o;return(o=i.current.find(s=>s!=null&&s.isConnected))!=null?o:null})}function Kd({ownerDocument:e},i){let o=qd(i);W(()=>{i||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Xt(o())},[i]),di(()=>{i&&Xt(o())})}function Xd({ownerDocument:e,container:i,initialFocus:o},s){let c=n.useRef(null),d=fr();return W(()=>{if(!s)return;let p=i.current;p&&on(()=>{if(!d.current)return;let h=e==null?void 0:e.activeElement;if(o!=null&&o.current){if((o==null?void 0:o.current)===h){c.current=h;return}}else if(p.contains(h)){c.current=h;return}o!=null&&o.current?Xt(o.current):ln(p,Ht.First)===nr.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),c.current=e==null?void 0:e.activeElement})},[s]),c}function Jd({ownerDocument:e,container:i,containers:o,previousActiveElement:s},c){let d=fr();ci(e==null?void 0:e.defaultView,"focus",p=>{if(!c||!d.current)return;let h=fi(o);i.current instanceof HTMLElement&&h.add(i.current);let g=s.current;if(!g)return;let w=p.target;w&&w instanceof HTMLElement?mi(h,w)?(s.current=w,Xt(w)):(p.preventDefault(),p.stopPropagation(),Xt(g)):Xt(s.current)},!0)}function mi(e,i){for(let o of e)if(o.contains(i))return!0;return!1}let hi=n.createContext(!1);function Qd(){return n.useContext(hi)}function zo(e){return n.createElement(hi.Provider,{value:e.force},e.children)}function ef(e){let i=Qd(),o=n.useContext(vi),s=Jt(e),[c,d]=n.useState(()=>{if(!i&&o!==null||Ce.isServer)return null;let p=s==null?void 0:s.getElementById("headlessui-portal-root");if(p)return p;if(s===null)return null;let h=s.createElement("div");return h.setAttribute("id","headlessui-portal-root"),s.body.appendChild(h)});return n.useEffect(()=>{c!==null&&(s!=null&&s.body.contains(c)||s==null||s.body.appendChild(c))},[c,s]),n.useEffect(()=>{i||o!==null&&d(o.current)},[o,d,i]),c}let tf=n.Fragment;function nf(e,i){let o=e,s=n.useRef(null),c=xt(Ro(O=>{s.current=O}),i),d=Jt(s),p=ef(s),[h]=n.useState(()=>{var O;return Ce.isServer?null:(O=d==null?void 0:d.createElement("div"))!=null?O:null}),g=n.useContext(Wo),w=hn();return Ie(()=>{!p||!h||p.contains(h)||(h.setAttribute("data-headlessui-portal",""),p.appendChild(h))},[p,h]),Ie(()=>{if(h&&g)return g.register(h)},[g,h]),di(()=>{var O;!p||!h||(h instanceof Node&&p.contains(h)&&p.removeChild(h),p.childNodes.length<=0&&((O=p.parentElement)==null||O.removeChild(p)))}),w?!p||!h?null:u.createPortal(fe({ourProps:{ref:c},theirProps:o,defaultTag:tf,name:"Portal"}),h):null}let rf=n.Fragment,vi=n.createContext(null);function of(e,i){let{target:o,...s}=e,c={ref:xt(i)};return n.createElement(vi.Provider,{value:o},fe({ourProps:c,theirProps:s,defaultTag:rf,name:"Popover.Group"}))}let Wo=n.createContext(null);function lf(){let e=n.useContext(Wo),i=n.useRef([]),o=J(d=>(i.current.push(d),e&&e.register(d),()=>s(d))),s=J(d=>{let p=i.current.indexOf(d);p!==-1&&i.current.splice(p,1),e&&e.unregister(d)}),c=n.useMemo(()=>({register:o,unregister:s,portals:i}),[o,s,i]);return[i,n.useMemo(()=>function({children:d}){return n.createElement(Wo.Provider,{value:c},d)},[c])]}let sf=be(nf),af=be(of),Ho=Object.assign(sf,{Group:af});function uf(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}const cf=typeof Object.is=="function"?Object.is:uf,{useState:df,useEffect:ff,useLayoutEffect:pf,useDebugValue:mf}=a;function hf(e,i,o){const s=i(),[{inst:c},d]=df({inst:{value:s,getSnapshot:i}});return pf(()=>{c.value=s,c.getSnapshot=i,Uo(c)&&d({inst:c})},[e,s,i]),ff(()=>(Uo(c)&&d({inst:c}),e(()=>{Uo(c)&&d({inst:c})})),[e]),mf(s),s}function Uo(e){const i=e.getSnapshot,o=e.value;try{const s=i();return!cf(o,s)}catch{return!0}}function vf(e,i,o){return i()}const gf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bf=!gf,xf=bf?vf:hf,yf="useSyncExternalStore"in a?(e=>e.useSyncExternalStore)(a):xf;function wf(e){return yf(e.subscribe,e.getSnapshot,e.getSnapshot)}function Ef(e,i){let o=e(),s=new Set;return{getSnapshot(){return o},subscribe(c){return s.add(c),()=>s.delete(c)},dispatch(c,...d){let p=i[c].call(o,...d);p&&(o=p,s.forEach(h=>h()))}}}function Sf(){let e;return{before({doc:i}){var o;let s=i.documentElement;e=((o=i.defaultView)!=null?o:window).innerWidth-s.clientWidth},after({doc:i,d:o}){let s=i.documentElement,c=s.clientWidth-s.offsetWidth,d=e-c;o.style(s,"paddingRight",`${d}px`)}}}function Cf(){return Mn()?{before({doc:e,d:i,meta:o}){function s(c){return o.containers.flatMap(d=>d()).some(d=>d.contains(c))}i.microTask(()=>{var c;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let h=_t();h.style(e.documentElement,"scrollBehavior","auto"),i.add(()=>i.microTask(()=>h.dispose()))}let d=(c=window.scrollY)!=null?c:window.pageYOffset,p=null;i.addEventListener(e,"click",h=>{if(h.target instanceof HTMLElement)try{let g=h.target.closest("a");if(!g)return;let{hash:w}=new URL(g.href),O=e.querySelector(w);O&&!s(O)&&(p=O)}catch{}},!0),i.addEventListener(e,"touchstart",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let g=h.target;for(;g.parentElement&&s(g.parentElement);)g=g.parentElement;i.style(g,"overscrollBehavior","contain")}else i.style(h.target,"touchAction","none")}),i.addEventListener(e,"touchmove",h=>{if(h.target instanceof HTMLElement)if(s(h.target)){let g=h.target;for(;g.parentElement&&g.dataset.headlessuiPortal!==""&&!(g.scrollHeight>g.clientHeight||g.scrollWidth>g.clientWidth);)g=g.parentElement;g.dataset.headlessuiPortal===""&&h.preventDefault()}else h.preventDefault()},{passive:!1}),i.add(()=>{var h;let g=(h=window.scrollY)!=null?h:window.pageYOffset;d!==g&&window.scrollTo(0,d),p&&p.isConnected&&(p.scrollIntoView({block:"nearest"}),p=null)})})}}:{}}function jf(){return{before({doc:e,d:i}){i.style(e.documentElement,"overflow","hidden")}}}function Tf(e){let i={};for(let o of e)Object.assign(i,o(i));return i}let On=Ef(()=>new Map,{PUSH(e,i){var o;let s=(o=this.get(e))!=null?o:{doc:e,count:0,d:_t(),meta:new Set};return s.count++,s.meta.add(i),this.set(e,s),this},POP(e,i){let o=this.get(e);return o&&(o.count--,o.meta.delete(i)),this},SCROLL_PREVENT({doc:e,d:i,meta:o}){let s={doc:e,d:i,meta:Tf(o)},c=[Cf(),Sf(),jf()];c.forEach(({before:d})=>d==null?void 0:d(s)),c.forEach(({after:d})=>d==null?void 0:d(s))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});On.subscribe(()=>{let e=On.getSnapshot(),i=new Map;for(let[o]of e)i.set(o,o.documentElement.style.overflow);for(let o of e.values()){let s=i.get(o.doc)==="hidden",c=o.count!==0;(c&&!s||!c&&s)&&On.dispatch(o.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",o),o.count===0&&On.dispatch("TEARDOWN",o)}});function Of(e,i,o){let s=wf(On),c=e?s.get(e):void 0,d=c?c.count>0:!1;return Ie(()=>{if(!(!e||!i))return On.dispatch("PUSH",e,o),()=>On.dispatch("POP",e,o)},[i,e]),d}let Vo=new Map,hr=new Map;function gi(e,i=!0){Ie(()=>{var o;if(!i)return;let s=typeof e=="function"?e():e.current;if(!s)return;function c(){var p;if(!s)return;let h=(p=hr.get(s))!=null?p:1;if(h===1?hr.delete(s):hr.set(s,h-1),h!==1)return;let g=Vo.get(s);g&&(g["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",g["aria-hidden"]),s.inert=g.inert,Vo.delete(s))}let d=(o=hr.get(s))!=null?o:0;return hr.set(s,d+1),d!==0||(Vo.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),c},[e,i])}function Nf({defaultContainers:e=[],portals:i,mainTreeNodeRef:o}={}){var s;let c=n.useRef((s=o==null?void 0:o.current)!=null?s:null),d=Jt(c),p=J(()=>{var h,g,w;let O=[];for(let I of e)I!==null&&(I instanceof HTMLElement?O.push(I):"current"in I&&I.current instanceof HTMLElement&&O.push(I.current));if(i!=null&&i.current)for(let I of i.current)O.push(I);for(let I of(h=d==null?void 0:d.querySelectorAll("html > *, body > *"))!=null?h:[])I!==document.body&&I!==document.head&&I instanceof HTMLElement&&I.id!=="headlessui-portal-root"&&(I.contains(c.current)||I.contains((w=(g=c.current)==null?void 0:g.getRootNode())==null?void 0:w.host)||O.some(L=>I.contains(L))||O.push(I));return O});return{resolveContainers:p,contains:J(h=>p().some(g=>g.contains(h))),mainTreeNodeRef:c,MainTreeNode:n.useMemo(()=>function(){return o!=null?null:n.createElement(ur,{features:sn.Hidden,ref:c})},[c,o])}}let Zo=n.createContext(()=>{});Zo.displayName="StackContext";var Yo=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Yo||{});function If(){return n.useContext(Zo)}function kf({children:e,onUpdate:i,type:o,element:s,enabled:c}){let d=If(),p=J((...h)=>{i==null||i(...h),d(...h)});return Ie(()=>{let h=c===void 0||c===!0;return h&&p(0,o,s),()=>{h&&p(1,o,s)}},[p,o,s,c]),n.createElement(Zo.Provider,{value:p},e)}let bi=n.createContext(null);function xi(){let e=n.useContext(bi);if(e===null){let i=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(i,xi),i}return e}function yi(){let[e,i]=n.useState([]);return[e.length>0?e.join(" "):void 0,n.useMemo(()=>function(o){let s=J(d=>(i(p=>[...p,d]),()=>i(p=>{let h=p.slice(),g=h.indexOf(d);return g!==-1&&h.splice(g,1),h}))),c=n.useMemo(()=>({register:s,slot:o.slot,name:o.name,props:o.props}),[s,o.slot,o.name,o.props]);return n.createElement(bi.Provider,{value:c},o.children)},[i])]}let Pf="p";function Ff(e,i){let o=Ft(),{id:s=`headlessui-description-${o}`,...c}=e,d=xi(),p=xt(i);Ie(()=>d.register(s),[s,d.register]);let h={ref:p,...d.props,id:s};return fe({ourProps:h,theirProps:c,slot:d.slot||{},defaultTag:Pf,name:d.name||"Description"})}let Mf=be(Ff),wi=Object.assign(Mf,{});var Rf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Rf||{}),Lf=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Lf||{});let Af={0(e,i){return e.titleId===i.id?e:{...e,titleId:i.id}}},Vr=n.createContext(null);Vr.displayName="DialogContext";function vr(e){let i=n.useContext(Vr);if(i===null){let o=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,vr),o}return i}function Df(e,i,o=()=>[document.body]){Of(e,i,s=>{var c;return{containers:[...(c=s.containers)!=null?c:[],o]}})}function $f(e,i){return ct(i.type,Af,e,i)}let _f="div",Bf=de.RenderStrategy|de.Static;function zf(e,i){let o=Ft(),{id:s=`headlessui-dialog-${o}`,open:c,onClose:d,initialFocus:p,role:h="dialog",__demoMode:g=!1,...w}=e,[O,I]=n.useState(0),L=n.useRef(!1);h=function(){return h==="dialog"||h==="alertdialog"?h:(L.current||(L.current=!0,console.warn(`Invalid role [${h}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let N=cr();c===void 0&&N!==null&&(c=(N&jt.Open)===jt.Open);let A=n.useRef(null),F=xt(A,i),D=Jt(A),H=e.hasOwnProperty("open")||N!==null,z=e.hasOwnProperty("onClose");if(!H&&!z)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!H)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!z)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof c!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c}`);if(typeof d!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${d}`);let K=c?0:1,[ae,oe]=n.useReducer($f,{titleId:null,descriptionId:null,panelRef:n.createRef()}),he=J(()=>d(!1)),Ve=J(ne=>oe({type:0,id:ne})),ze=hn()?g?!1:K===0:!1,ve=O>1,xe=n.useContext(Vr)!==null,[Se,De]=lf(),st={get current(){var ne;return(ne=ae.panelRef.current)!=null?ne:A.current}},{resolveContainers:ft,mainTreeNodeRef:Y,MainTreeNode:at}=Nf({portals:Se,defaultContainers:[st]}),_e=ve?"parent":"leaf",gt=N!==null?(N&jt.Closing)===jt.Closing:!1,ie=xe||gt?!1:ze,We=n.useCallback(()=>{var ne,ye;return(ye=Array.from((ne=D==null?void 0:D.querySelectorAll("body > *"))!=null?ne:[]).find(et=>et.id==="headlessui-portal-root"?!1:et.contains(Y.current)&&et instanceof HTMLElement))!=null?ye:null},[Y]);gi(We,ie);let lt=ve?!0:ze,Tt=n.useCallback(()=>{var ne,ye;return(ye=Array.from((ne=D==null?void 0:D.querySelectorAll("[data-headlessui-portal]"))!=null?ne:[]).find(et=>et.contains(Y.current)&&et instanceof HTMLElement))!=null?ye:null},[Y]);gi(Tt,lt),Rn(ft,ne=>{ne.preventDefault(),he()},!(!ze||ve));let Rt=!(ve||K!==0);ci(D==null?void 0:D.defaultView,"keydown",ne=>{Rt&&(ne.defaultPrevented||ne.key===qe.Escape&&(ne.preventDefault(),ne.stopPropagation(),he()))}),Df(D,!(gt||K!==0||xe),ft),n.useEffect(()=>{if(K!==0||!A.current)return;let ne=new ResizeObserver(ye=>{for(let et of ye){let zt=et.target.getBoundingClientRect();zt.x===0&&zt.y===0&&zt.width===0&&zt.height===0&&he()}});return ne.observe(A.current),()=>ne.disconnect()},[K,A,he]);let[yt,Le]=yi(),St=n.useMemo(()=>[{dialogState:K,close:he,setTitleId:Ve},ae],[K,ae,he,Ve]),Ke=n.useMemo(()=>({open:K===0}),[K]),At={ref:F,id:s,role:h,"aria-modal":K===0?!0:void 0,"aria-labelledby":ae.titleId,"aria-describedby":yt};return n.createElement(kf,{type:"Dialog",enabled:K===0,element:A,onUpdate:J((ne,ye)=>{ye==="Dialog"&&ct(ne,{[Yo.Add]:()=>I(et=>et+1),[Yo.Remove]:()=>I(et=>et-1)})})},n.createElement(zo,{force:!0},n.createElement(Ho,null,n.createElement(Vr.Provider,{value:St},n.createElement(Ho.Group,{target:A},n.createElement(zo,{force:!1},n.createElement(Le,{slot:Ke,name:"Dialog.Description"},n.createElement(mr,{initialFocus:p,containers:ft,features:ze?ct(_e,{parent:mr.features.RestoreFocus,leaf:mr.features.All&~mr.features.FocusLock}):mr.features.None},n.createElement(De,null,fe({ourProps:At,theirProps:w,slot:Ke,defaultTag:_f,features:Bf,visible:K===0,name:"Dialog"}))))))))),n.createElement(at,null))}let Wf="div";function Hf(e,i){let o=Ft(),{id:s=`headlessui-dialog-overlay-${o}`,...c}=e,[{dialogState:d,close:p}]=vr("Dialog.Overlay"),h=xt(i),g=J(O=>{if(O.target===O.currentTarget){if(Ur(O.currentTarget))return O.preventDefault();O.preventDefault(),O.stopPropagation(),p()}}),w=n.useMemo(()=>({open:d===0}),[d]);return fe({ourProps:{ref:h,id:s,"aria-hidden":!0,onClick:g},theirProps:c,slot:w,defaultTag:Wf,name:"Dialog.Overlay"})}let Uf="div";function Vf(e,i){let o=Ft(),{id:s=`headlessui-dialog-backdrop-${o}`,...c}=e,[{dialogState:d},p]=vr("Dialog.Backdrop"),h=xt(i);n.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[p.panelRef]);let g=n.useMemo(()=>({open:d===0}),[d]);return n.createElement(zo,{force:!0},n.createElement(Ho,null,fe({ourProps:{ref:h,id:s,"aria-hidden":!0},theirProps:c,slot:g,defaultTag:Uf,name:"Dialog.Backdrop"})))}let Zf="div";function Yf(e,i){let o=Ft(),{id:s=`headlessui-dialog-panel-${o}`,...c}=e,[{dialogState:d},p]=vr("Dialog.Panel"),h=xt(i,p.panelRef),g=n.useMemo(()=>({open:d===0}),[d]),w=J(O=>{O.stopPropagation()});return fe({ourProps:{ref:h,id:s,onClick:w},theirProps:c,slot:g,defaultTag:Zf,name:"Dialog.Panel"})}let Gf="h2";function qf(e,i){let o=Ft(),{id:s=`headlessui-dialog-title-${o}`,...c}=e,[{dialogState:d,setTitleId:p}]=vr("Dialog.Title"),h=xt(i);n.useEffect(()=>(p(s),()=>p(null)),[s,p]);let g=n.useMemo(()=>({open:d===0}),[d]);return fe({ourProps:{ref:h,id:s},theirProps:c,slot:g,defaultTag:Gf,name:"Dialog.Title"})}let Kf=be(zf),Xf=be(Vf),Jf=be(Yf),Qf=be(Hf),ep=be(qf),Ei=Object.assign(Kf,{Backdrop:Xf,Panel:Jf,Overlay:Qf,Title:ep,Description:wi}),Si=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ci(e){var i,o;let s=(i=e.innerText)!=null?i:"",c=e.cloneNode(!0);if(!(c instanceof HTMLElement))return s;let d=!1;for(let h of c.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))h.remove(),d=!0;let p=d?(o=c.innerText)!=null?o:"":s;return Si.test(p)&&(p=p.replace(Si,"")),p}function tp(e){let i=e.getAttribute("aria-label");if(typeof i=="string")return i.trim();let o=e.getAttribute("aria-labelledby");if(o){let s=o.split(" ").map(c=>{let d=document.getElementById(c);if(d){let p=d.getAttribute("aria-label");return typeof p=="string"?p.trim():Ci(d).trim()}return null}).filter(Boolean);if(s.length>0)return s.join(", ")}return Ci(e).trim()}function np(e){let i=n.useRef(""),o=n.useRef("");return J(()=>{let s=e.current;if(!s)return"";let c=s.innerText;if(i.current===c)return o.current;let d=tp(s).trim().toLowerCase();return i.current=c,o.current=d,d})}var rp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(rp||{}),op=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(op||{}),lp=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(lp||{});function Go(e,i=o=>o){let o=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,s=Fn(i(e.items.slice()),d=>d.dataRef.current.domRef.current),c=o?s.indexOf(o):null;return c===-1&&(c=null),{items:s,activeItemIndex:c}}let ip={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,i)=>{var o;let s=Go(e),c=Do(i,{resolveItems:()=>s.items,resolveActiveIndex:()=>s.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...e,...s,searchQuery:"",activeItemIndex:c,activationTrigger:(o=i.trigger)!=null?o:1}},3:(e,i)=>{let o=e.searchQuery!==""?0:1,s=e.searchQuery+i.value.toLowerCase(),c=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+o).concat(e.items.slice(0,e.activeItemIndex+o)):e.items).find(p=>{var h;return((h=p.dataRef.current.textValue)==null?void 0:h.startsWith(s))&&!p.dataRef.current.disabled}),d=c?e.items.indexOf(c):-1;return d===-1||d===e.activeItemIndex?{...e,searchQuery:s}:{...e,searchQuery:s,activeItemIndex:d,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,i)=>{let o=Go(e,s=>[...s,{id:i.id,dataRef:i.dataRef}]);return{...e,...o}},6:(e,i)=>{let o=Go(e,s=>{let c=s.findIndex(d=>d.id===i.id);return c!==-1&&s.splice(c,1),s});return{...e,...o,activationTrigger:1}}},qo=n.createContext(null);qo.displayName="MenuContext";function Zr(e){let i=n.useContext(qo);if(i===null){let o=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,Zr),o}return i}function sp(e,i){return ct(i.type,ip,e,i)}let ap=n.Fragment;function up(e,i){let{__demoMode:o=!1,...s}=e,c=n.useReducer(sp,{__demoMode:o,menuState:o?0:1,buttonRef:n.createRef(),itemsRef:n.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:d,itemsRef:p,buttonRef:h},g]=c,w=xt(i);Rn([h,p],(N,A)=>{var F;g({type:1}),lr(A,or.Loose)||(N.preventDefault(),(F=h.current)==null||F.focus())},d===0);let O=J(()=>{g({type:1})}),I=n.useMemo(()=>({open:d===0,close:O}),[d,O]),L={ref:w};return n.createElement(qo.Provider,{value:c},n.createElement(Ao,{value:ct(d,{0:jt.Open,1:jt.Closed})},fe({ourProps:L,theirProps:s,slot:I,defaultTag:ap,name:"Menu"})))}let cp="button";function dp(e,i){var o;let s=Ft(),{id:c=`headlessui-menu-button-${s}`,...d}=e,[p,h]=Zr("Menu.Button"),g=xt(p.buttonRef,i),w=Yt(),O=J(F=>{switch(F.key){case qe.Space:case qe.Enter:case qe.ArrowDown:F.preventDefault(),F.stopPropagation(),h({type:0}),w.nextFrame(()=>h({type:2,focus:ot.First}));break;case qe.ArrowUp:F.preventDefault(),F.stopPropagation(),h({type:0}),w.nextFrame(()=>h({type:2,focus:ot.Last}));break}}),I=J(F=>{switch(F.key){case qe.Space:F.preventDefault();break}}),L=J(F=>{if(Ur(F.currentTarget))return F.preventDefault();e.disabled||(p.menuState===0?(h({type:1}),w.nextFrame(()=>{var D;return(D=p.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})})):(F.preventDefault(),h({type:0})))}),N=n.useMemo(()=>({open:p.menuState===0}),[p]),A={ref:g,id:c,type:sr(e,p.buttonRef),"aria-haspopup":"menu","aria-controls":(o=p.itemsRef.current)==null?void 0:o.id,"aria-expanded":p.menuState===0,onKeyDown:O,onKeyUp:I,onClick:L};return fe({ourProps:A,theirProps:d,slot:N,defaultTag:cp,name:"Menu.Button"})}let fp="div",pp=de.RenderStrategy|de.Static;function mp(e,i){var o,s;let c=Ft(),{id:d=`headlessui-menu-items-${c}`,...p}=e,[h,g]=Zr("Menu.Items"),w=xt(h.itemsRef,i),O=Jt(h.itemsRef),I=Yt(),L=cr(),N=L!==null?(L&jt.Open)===jt.Open:h.menuState===0;n.useEffect(()=>{let z=h.itemsRef.current;z&&h.menuState===0&&z!==(O==null?void 0:O.activeElement)&&z.focus({preventScroll:!0})},[h.menuState,h.itemsRef,O]),S({container:h.itemsRef.current,enabled:h.menuState===0,accept(z){return z.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:z.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(z){z.setAttribute("role","none")}});let A=J(z=>{var K,ae;switch(I.dispose(),z.key){case qe.Space:if(h.searchQuery!=="")return z.preventDefault(),z.stopPropagation(),g({type:3,value:z.key});case qe.Enter:if(z.preventDefault(),z.stopPropagation(),g({type:1}),h.activeItemIndex!==null){let{dataRef:oe}=h.items[h.activeItemIndex];(ae=(K=oe.current)==null?void 0:K.domRef.current)==null||ae.click()}Dr(h.buttonRef.current);break;case qe.ArrowDown:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.Next});case qe.ArrowUp:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.Previous});case qe.Home:case qe.PageUp:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.First});case qe.End:case qe.PageDown:return z.preventDefault(),z.stopPropagation(),g({type:2,focus:ot.Last});case qe.Escape:z.preventDefault(),z.stopPropagation(),g({type:1}),_t().nextFrame(()=>{var oe;return(oe=h.buttonRef.current)==null?void 0:oe.focus({preventScroll:!0})});break;case qe.Tab:z.preventDefault(),z.stopPropagation(),g({type:1}),_t().nextFrame(()=>{vn(h.buttonRef.current,z.shiftKey?Ht.Previous:Ht.Next)});break;default:z.key.length===1&&(g({type:3,value:z.key}),I.setTimeout(()=>g({type:4}),350));break}}),F=J(z=>{switch(z.key){case qe.Space:z.preventDefault();break}}),D=n.useMemo(()=>({open:h.menuState===0}),[h]),H={"aria-activedescendant":h.activeItemIndex===null||(o=h.items[h.activeItemIndex])==null?void 0:o.id,"aria-labelledby":(s=h.buttonRef.current)==null?void 0:s.id,id:d,onKeyDown:A,onKeyUp:F,role:"menu",tabIndex:0,ref:w};return fe({ourProps:H,theirProps:p,slot:D,defaultTag:fp,features:pp,visible:N,name:"Menu.Items"})}let hp=n.Fragment;function vp(e,i){let o=Ft(),{id:s=`headlessui-menu-item-${o}`,disabled:c=!1,...d}=e,[p,h]=Zr("Menu.Item"),g=p.activeItemIndex!==null?p.items[p.activeItemIndex].id===s:!1,w=n.useRef(null),O=xt(i,w);Ie(()=>{if(p.__demoMode||p.menuState!==0||!g||p.activationTrigger===0)return;let oe=_t();return oe.requestAnimationFrame(()=>{var he,Ve;(Ve=(he=w.current)==null?void 0:he.scrollIntoView)==null||Ve.call(he,{block:"nearest"})}),oe.dispose},[p.__demoMode,w,g,p.menuState,p.activationTrigger,p.activeItemIndex]);let I=np(w),L=n.useRef({disabled:c,domRef:w,get textValue(){return I()}});Ie(()=>{L.current.disabled=c},[L,c]),Ie(()=>(h({type:5,id:s,dataRef:L}),()=>h({type:6,id:s})),[L,s]);let N=J(()=>{h({type:1})}),A=J(oe=>{if(c)return oe.preventDefault();h({type:1}),Dr(p.buttonRef.current)}),F=J(()=>{if(c)return h({type:2,focus:ot.Nothing});h({type:2,focus:ot.Specific,id:s})}),D=Hr(),H=J(oe=>D.update(oe)),z=J(oe=>{D.wasMoved(oe)&&(c||g||h({type:2,focus:ot.Specific,id:s,trigger:0}))}),K=J(oe=>{D.wasMoved(oe)&&(c||g&&h({type:2,focus:ot.Nothing}))}),ae=n.useMemo(()=>({active:g,disabled:c,close:N}),[g,c,N]);return fe({ourProps:{id:s,ref:O,role:"menuitem",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,disabled:void 0,onClick:A,onFocus:F,onPointerEnter:H,onMouseEnter:H,onPointerMove:z,onMouseMove:z,onPointerLeave:K,onMouseLeave:K},theirProps:d,slot:ae,defaultTag:hp,name:"Menu.Item"})}let gp=be(up),bp=be(dp),xp=be(mp),yp=be(vp),Yr=Object.assign(gp,{Button:bp,Items:xp,Item:yp}),ji=n.createContext(null);function Ti(){let e=n.useContext(ji);if(e===null){let i=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(i,Ti),i}return e}function wp(){let[e,i]=n.useState([]);return[e.length>0?e.join(" "):void 0,n.useMemo(()=>function(o){let s=J(d=>(i(p=>[...p,d]),()=>i(p=>{let h=p.slice(),g=h.indexOf(d);return g!==-1&&h.splice(g,1),h}))),c=n.useMemo(()=>({register:s,slot:o.slot,name:o.name,props:o.props}),[s,o.slot,o.name,o.props]);return n.createElement(ji.Provider,{value:c},o.children)},[i])]}let Ep="label";function Sp(e,i){let o=Ft(),{id:s=`headlessui-label-${o}`,passive:c=!1,...d}=e,p=Ti(),h=xt(i);Ie(()=>p.register(s),[s,p.register]);let g={ref:h,...p.props,id:s};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in d&&delete d.onClick),fe({ourProps:g,theirProps:d,slot:p.slot||{},defaultTag:Ep,name:p.name||"Label"})}let Cp=be(Sp),jp=Object.assign(Cp,{});function Tp(e=0){let[i,o]=n.useState(e),s=fr(),c=n.useCallback(g=>{s.current&&o(w=>w|g)},[i,s]),d=n.useCallback(g=>!!(i&g),[i]),p=n.useCallback(g=>{s.current&&o(w=>w&~g)},[o,s]),h=n.useCallback(g=>{s.current&&o(w=>w^g)},[o]);return{flags:i,addFlag:c,hasFlag:d,removeFlag:p,toggleFlag:h}}let Ko=n.createContext(null);Ko.displayName="GroupContext";let Op=n.Fragment;function Np(e){var i;let[o,s]=n.useState(null),[c,d]=wp(),[p,h]=yi(),g=n.useMemo(()=>({switch:o,setSwitch:s,labelledby:c,describedby:p}),[o,s,c,p]),w={},O=e;return n.createElement(h,{name:"Switch.Description"},n.createElement(d,{name:"Switch.Label",props:{htmlFor:(i=g.switch)==null?void 0:i.id,onClick(I){o&&(I.currentTarget.tagName==="LABEL"&&I.preventDefault(),o.click(),o.focus({preventScroll:!0}))}}},n.createElement(Ko.Provider,{value:g},fe({ourProps:w,theirProps:O,defaultTag:Op,name:"Switch.Group"}))))}let Ip="button";function kp(e,i){var o;let s=Ft(),{id:c=`headlessui-switch-${s}`,checked:d,defaultChecked:p=!1,onChange:h,disabled:g=!1,name:w,value:O,form:I,...L}=e,N=n.useContext(Ko),A=n.useRef(null),F=xt(A,i,N===null?null:N.setSwitch),[D,H]=Qn(d,h,p),z=J(()=>H==null?void 0:H(!D)),K=J(ve=>{if(Ur(ve.currentTarget))return ve.preventDefault();ve.preventDefault(),z()}),ae=J(ve=>{ve.key===qe.Space?(ve.preventDefault(),z()):ve.key===qe.Enter&&bd(ve.currentTarget)}),oe=J(ve=>ve.preventDefault()),he=n.useMemo(()=>({checked:D}),[D]),Ve={id:c,ref:F,role:"switch",type:sr(e,A),tabIndex:e.tabIndex===-1?0:(o=e.tabIndex)!=null?o:0,"aria-checked":D,"aria-labelledby":N==null?void 0:N.labelledby,"aria-describedby":N==null?void 0:N.describedby,disabled:g,onClick:K,onKeyUp:ae,onKeyPress:oe},ze=Yt();return n.useEffect(()=>{var ve;let xe=(ve=A.current)==null?void 0:ve.closest("form");xe&&p!==void 0&&ze.addEventListener(xe,"reset",()=>{H(p)})},[A,H]),n.createElement(n.Fragment,null,w!=null&&D&&n.createElement(ur,{features:sn.Hidden,...vt({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:g,form:I,checked:D,name:w,value:O})}),fe({ourProps:Ve,theirProps:L,slot:he,defaultTag:Ip,name:"Switch"}))}let Pp=be(kp),Fp=Np,Mp=Object.assign(Pp,{Group:Fp,Label:jp,Description:wi});function Rp(e){let i={called:!1};return(...o)=>{if(!i.called)return i.called=!0,e(...o)}}function Xo(e,...i){e&&i.length>0&&e.classList.add(...i)}function Jo(e,...i){e&&i.length>0&&e.classList.remove(...i)}function Lp(e,i){let o=_t();if(!e)return o.dispose;let{transitionDuration:s,transitionDelay:c}=getComputedStyle(e),[d,p]=[s,c].map(g=>{let[w=0]=g.split(",").filter(Boolean).map(O=>O.includes("ms")?parseFloat(O):parseFloat(O)*1e3).sort((O,I)=>I-O);return w}),h=d+p;if(h!==0){o.group(w=>{w.setTimeout(()=>{i(),w.dispose()},h),w.addEventListener(e,"transitionrun",O=>{O.target===O.currentTarget&&w.dispose()})});let g=o.addEventListener(e,"transitionend",w=>{w.target===w.currentTarget&&(i(),g())})}else i();return o.add(()=>i()),o.dispose}function Ap(e,i,o,s){let c=o?"enter":"leave",d=_t(),p=s!==void 0?Rp(s):()=>{};c==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let h=ct(c,{enter:()=>i.enter,leave:()=>i.leave}),g=ct(c,{enter:()=>i.enterTo,leave:()=>i.leaveTo}),w=ct(c,{enter:()=>i.enterFrom,leave:()=>i.leaveFrom});return Jo(e,...i.base,...i.enter,...i.enterTo,...i.enterFrom,...i.leave,...i.leaveFrom,...i.leaveTo,...i.entered),Xo(e,...i.base,...h,...w),d.nextFrame(()=>{Jo(e,...i.base,...h,...w),Xo(e,...i.base,...h,...g),Lp(e,()=>(Jo(e,...i.base,...h),Xo(e,...i.base,...i.entered),p()))}),d.dispose}function Dp({immediate:e,container:i,direction:o,classes:s,onStart:c,onStop:d}){let p=fr(),h=Yt(),g=Pt(o);Ie(()=>{e&&(g.current="enter")},[e]),Ie(()=>{let w=_t();h.add(w.dispose);let O=i.current;if(O&&g.current!=="idle"&&p.current)return w.dispose(),c.current(g.current),w.add(Ap(O,s.current,g.current==="enter",()=>{w.dispose(),d.current(g.current)})),w.dispose},[o])}function bn(e=""){return e.split(/\s+/).filter(i=>i.length>1)}let Gr=n.createContext(null);Gr.displayName="TransitionContext";var $p=(e=>(e.Visible="visible",e.Hidden="hidden",e))($p||{});function _p(){let e=n.useContext(Gr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Bp(){let e=n.useContext(qr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let qr=n.createContext(null);qr.displayName="NestingContext";function Kr(e){return"children"in e?Kr(e.children):e.current.filter(({el:i})=>i.current!==null).filter(({state:i})=>i==="visible").length>0}function Oi(e,i){let o=Pt(e),s=n.useRef([]),c=fr(),d=Yt(),p=J((N,A=Me.Hidden)=>{let F=s.current.findIndex(({el:D})=>D===N);F!==-1&&(ct(A,{[Me.Unmount](){s.current.splice(F,1)},[Me.Hidden](){s.current[F].state="hidden"}}),d.microTask(()=>{var D;!Kr(s)&&c.current&&((D=o.current)==null||D.call(o))}))}),h=J(N=>{let A=s.current.find(({el:F})=>F===N);return A?A.state!=="visible"&&(A.state="visible"):s.current.push({el:N,state:"visible"}),()=>p(N,Me.Unmount)}),g=n.useRef([]),w=n.useRef(Promise.resolve()),O=n.useRef({enter:[],leave:[],idle:[]}),I=J((N,A,F)=>{g.current.splice(0),i&&(i.chains.current[A]=i.chains.current[A].filter(([D])=>D!==N)),i==null||i.chains.current[A].push([N,new Promise(D=>{g.current.push(D)})]),i==null||i.chains.current[A].push([N,new Promise(D=>{Promise.all(O.current[A].map(([H,z])=>z)).then(()=>D())})]),A==="enter"?w.current=w.current.then(()=>i==null?void 0:i.wait.current).then(()=>F(A)):F(A)}),L=J((N,A,F)=>{Promise.all(O.current[A].splice(0).map(([D,H])=>H)).then(()=>{var D;(D=g.current.shift())==null||D()}).then(()=>F(A))});return n.useMemo(()=>({children:s,register:h,unregister:p,onStart:I,onStop:L,wait:w,chains:O}),[h,p,s,I,L,O,w])}function zp(){}let Wp=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ni(e){var i;let o={};for(let s of Wp)o[s]=(i=e[s])!=null?i:zp;return o}function Hp(e){let i=n.useRef(Ni(e));return n.useEffect(()=>{i.current=Ni(e)},[e]),i}let Up="div",Ii=de.RenderStrategy;function Vp(e,i){var o,s;let{beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h,enter:g,enterFrom:w,enterTo:O,entered:I,leave:L,leaveFrom:N,leaveTo:A,...F}=e,D=n.useRef(null),H=xt(D,i),z=(o=F.unmount)==null||o?Me.Unmount:Me.Hidden,{show:K,appear:ae,initial:oe}=_p(),[he,Ve]=n.useState(K?"visible":"hidden"),ze=Bp(),{register:ve,unregister:xe}=ze;n.useEffect(()=>ve(D),[ve,D]),n.useEffect(()=>{if(z===Me.Hidden&&D.current){if(K&&he!=="visible"){Ve("visible");return}return ct(he,{hidden:()=>xe(D),visible:()=>ve(D)})}},[he,D,ve,xe,K,z]);let Se=Pt({base:bn(F.className),enter:bn(g),enterFrom:bn(w),enterTo:bn(O),entered:bn(I),leave:bn(L),leaveFrom:bn(N),leaveTo:bn(A)}),De=Hp({beforeEnter:c,afterEnter:d,beforeLeave:p,afterLeave:h}),st=hn();n.useEffect(()=>{if(st&&he==="visible"&&D.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[D,he,st]);let ft=oe&&!ae,Y=ae&&K&&oe,at=!st||ft?"idle":K?"enter":"leave",_e=Tp(0),gt=J(yt=>ct(yt,{enter:()=>{_e.addFlag(jt.Opening),De.current.beforeEnter()},leave:()=>{_e.addFlag(jt.Closing),De.current.beforeLeave()},idle:()=>{}})),ie=J(yt=>ct(yt,{enter:()=>{_e.removeFlag(jt.Opening),De.current.afterEnter()},leave:()=>{_e.removeFlag(jt.Closing),De.current.afterLeave()},idle:()=>{}})),We=Oi(()=>{Ve("hidden"),xe(D)},ze),lt=n.useRef(!1);Dp({immediate:Y,container:D,classes:Se,direction:at,onStart:Pt(yt=>{lt.current=!0,We.onStart(D,yt,gt)}),onStop:Pt(yt=>{lt.current=!1,We.onStop(D,yt,ie),yt==="leave"&&!Kr(We)&&(Ve("hidden"),xe(D))})});let Tt=F,Rt={ref:H};return Y?Tt={...Tt,className:X(F.className,...Se.current.enter,...Se.current.enterFrom)}:lt.current&&(Tt.className=X(F.className,(s=D.current)==null?void 0:s.className),Tt.className===""&&delete Tt.className),n.createElement(qr.Provider,{value:We},n.createElement(Ao,{value:ct(he,{visible:jt.Open,hidden:jt.Closed})|_e.flags},fe({ourProps:Rt,theirProps:Tt,defaultTag:Up,features:Ii,visible:he==="visible",name:"Transition.Child"})))}function Zp(e,i){let{show:o,appear:s=!1,unmount:c=!0,...d}=e,p=n.useRef(null),h=xt(p,i);hn();let g=cr();if(o===void 0&&g!==null&&(o=(g&jt.Open)===jt.Open),![!0,!1].includes(o))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[w,O]=n.useState(o?"visible":"hidden"),I=Oi(()=>{O("hidden")}),[L,N]=n.useState(!0),A=n.useRef([o]);Ie(()=>{L!==!1&&A.current[A.current.length-1]!==o&&(A.current.push(o),N(!1))},[A,o]);let F=n.useMemo(()=>({show:o,appear:s,initial:L}),[o,s,L]);n.useEffect(()=>{if(o)O("visible");else if(!Kr(I))O("hidden");else{let K=p.current;if(!K)return;let ae=K.getBoundingClientRect();ae.x===0&&ae.y===0&&ae.width===0&&ae.height===0&&O("hidden")}},[o,I]);let D={unmount:c},H=J(()=>{var K;L&&N(!1),(K=e.beforeEnter)==null||K.call(e)}),z=J(()=>{var K;L&&N(!1),(K=e.beforeLeave)==null||K.call(e)});return n.createElement(qr.Provider,{value:I},n.createElement(Gr.Provider,{value:F},fe({ourProps:{...D,as:n.Fragment,children:n.createElement(ki,{ref:h,...D,...d,beforeEnter:H,beforeLeave:z})},theirProps:{},defaultTag:n.Fragment,features:Ii,visible:w==="visible",name:"Transition"})))}function Yp(e,i){let o=n.useContext(Gr)!==null,s=cr()!==null;return n.createElement(n.Fragment,null,!o&&s?n.createElement(Qo,{ref:i,...e}):n.createElement(ki,{ref:i,...e}))}let Qo=be(Zp),ki=be(Vp),Gp=be(Yp),Nn=Object.assign(Qo,{Child:Gp,Root:Qo});function qp({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M18 10a.75.75 0 0 1-.75.75H4.66l2.1 1.95a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 1 1 1.02 1.1l-2.1 1.95h12.59A.75.75 0 0 1 18 10Z",clipRule:"evenodd"}))}const Kp=a.forwardRef(qp);function Xp({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M2 10a.75.75 0 0 1 .75-.75h12.59l-2.1-1.95a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.1-1.95H2.75A.75.75 0 0 1 2 10Z",clipRule:"evenodd"}))}const Jp=a.forwardRef(Xp);function Qp({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const em=a.forwardRef(Qp);function tm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const nm=a.forwardRef(tm);function rm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))}const om=a.forwardRef(rm);function lm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Pi=a.forwardRef(lm);function im({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const sm=a.forwardRef(im);function am({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const um=a.forwardRef(am);function cm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const dm=a.forwardRef(cm),fm={warning:{color:"bg-yellow-50",icon:y.jsx(sm,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"}),colorTitle:"text-yellow-800",colorText:"text-yellow-700"},error:{color:"bg-red-50",icon:y.jsx(dm,{className:"h-5 w-5 text-red-400","aria-hidden":"true"}),colorTitle:"text-red-800",colorText:"text-red-700"},success:{color:"bg-green-50",icon:y.jsx(em,{className:"h-5 w-5 text-green-400","aria-hidden":"true"}),colorTitle:"text-green-800",colorText:"text-green-700"},info:{color:"bg-blue-50",icon:y.jsx(um,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}},pm=({type:e="info",title:i,message:o,active:s=!1,time:c=1e3,onClose:d})=>{const[p,h]=n.useState(!1),g=n.useRef(null);n.useEffect(()=>(s&&(h(!0),g.current=setTimeout(()=>{h(!1),d&&d()},c)),()=>clearTimeout(g.current)),[s,c,d]);const w=fm[e];return p?y.jsx("div",{className:"fixed top-2.5 left-1/2 transform -translate-x-1/2 w-80 3xs:w-96 z-50",children:y.jsx(Nn,{as:n.Fragment,show:p,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:y.jsxs("div",{className:x("rounded-md p-4 text-center",w.color),children:[y.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[w.icon,y.jsx("h3",{className:x("text-sm font-medium ml-3",w.colorTitle),children:i})]}),y.jsx("div",{className:x("mt-2 text-sm",w.colorText),children:y.jsx("p",{children:o})})]})})}):null};function mm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const hm=a.forwardRef(mm);function vm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const gm=a.forwardRef(vm);function bm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"}),a.createElement("path",{d:"M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"}))}const xm=a.forwardRef(bm);function ym({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0 0 21 18v-1.94l-2.69-2.689a1.5 1.5 0 0 0-2.12 0l-.88.879.97.97a.75.75 0 1 1-1.06 1.06l-5.16-5.159a1.5 1.5 0 0 0-2.12 0L3 16.061Zm10.125-7.81a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Z",clipRule:"evenodd"}))}const wm=a.forwardRef(ym);function Em({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",clipRule:"evenodd"}))}const Sm=a.forwardRef(Em);function Cm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const jm=a.forwardRef(Cm),Tm=({src:e,alt:i,width:o,height:s,className:c="",classNameIcon:d="",isIcon:p=!0,acronym:h=""})=>{function g(){if(typeof h!="string")return h;const w=h.toLowerCase(),O=w.split(" "),I=O[O.length-1];return w.charAt(0)+I.charAt(0)}return y.jsx(y.Fragment,{children:e?y.jsx("img",{src:e,alt:i,width:o,height:s,className:x(c!==""&&c),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s"},onLoad:w=>w.currentTarget.style.filter="none","data-testid":"img"}):p?y.jsx(Sm,{className:x("bg-white text-default-5",d!==""?d:"w-7 h-7")}):y.jsx("div",{className:x("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",d!==""?d:"w-7 h-7"),children:g()})})},Om=({steps:e,onClick:i})=>{const[o,s]=n.useState(0),c=d=>{s(d),i(d)};return y.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:y.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((d,p)=>y.jsx("li",{children:o!==p?y.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>c(p),"data-testid":`step-${p}`,children:y.jsx("span",{className:"sr-only",children:"step"})}):y.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[y.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:y.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),y.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),y.jsx("span",{className:"sr-only",children:"step"})]})},p))})})};var Fi={exports:{}};/*!
|
|
66
66
|
Copyright (c) 2018 Jed Watson.
|
|
67
67
|
Licensed under the MIT License (MIT), see
|
|
68
68
|
http://jedwatson.github.io/classnames
|
|
69
|
-
*/(function(e){(function(){var i={}.hasOwnProperty;function o(){for(var d="",p=0;p<arguments.length;p++){var h=arguments[p];h&&(d=c(d,s(h)))}return d}function s(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return o.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var p="";for(var h in d)i.call(d,h)&&d[h]&&(p=c(p,h));return p}function c(d,p){return p?d?d+" "+p:d+p:d}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(Fi);var Nm=Fi.exports;const xn=_(Nm),Mi=({className:e="text-sm w-full rounded-md",children:i,icon:o=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const g=xn({"ml-2":s==="start"&&o!==null,"mr-2":s==="end"&&o!==null});return y.jsxs("button",{className:x("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",e),type:d,onClick:p,disabled:c,"data-testid":`button-outline-${h}`,id:`button-outline-${h}`,children:[s==="start"&&o!==null&&y.jsx("span",{children:o}),y.jsx("span",{className:x("flex",g),id:h,children:i}),s==="end"&&o!==null&&y.jsx("span",{children:o})]})},Ri=({children:e,className:i="",icon:o=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const g=xn({"ml-2":s==="start"&&o!==null,"mr-2":s==="end"&&o!==null});return y.jsxs("button",{className:`${i} flex justify-center items-center`,edge:s,type:d,onClick:p,disabled:c,"data-testid":`button-${h}`,children:[s==="start"&&o!==null&&y.jsx("span",{children:o}),y.jsx("span",{className:g,children:e}),s==="end"&&o!==null&&y.jsx("span",{children:o})]})},gr=({children:e,classNameButton:i="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:o="",icon:s=null,edge:c=null,disabled:d=!1,type:p="button",onClick:h,id:g,outline:w="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:O=""})=>{const[I,L]=n.useState(!1),N=xn({"ml-2":c==="start"&&s!==null,"mr-2":c==="end"&&s!==null}),A=()=>{h&&h()};return y.jsx("div",{className:x("rounded-md p-0.5",O!==""&&O),style:{boxShadow:I?w:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:y.jsxs("button",{className:x("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",d&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",d?i.replace(/\bbg-\w+\b/g,""):i),type:p,onClick:A,onFocus:()=>L(!0),onBlur:()=>L(!1),disabled:d,"data-testid":`button-solid-${g}`,children:[c==="start"&&s!==null&&y.jsx("span",{className:"flex",children:s}),y.jsx("span",{className:x(o.length===0&&N,o.length!==0&&o),children:e}),c==="end"&&s!==null&&y.jsx("span",{children:s})]})})},Im=({label:e=null,checked:i=!1,onChange:o,id:s,className:c="",classNameCheckbox:d="h-4 w-4",style:p={},disabled:h=!1})=>{const[g,w]=n.useState(!1);return n.useEffect(()=>{w(i)},[i]),y.jsxs("div",{className:"flex items-center",style:p,"data-testid":`container-check-${s}`,children:[y.jsx("input",{checked:g,id:`${e}-${s}`,value:s,"aria-describedby":"comments-description",type:"checkbox",onChange:o,className:x("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",d!==""&&d),"data-testid":`checkbox-${s}`,disabled:h}),e!==null?y.jsx("label",{htmlFor:`${e}-${s}`,className:`ml-2.5 font-normal cursor-pointer ${c}`,id:`label-${s}`,"data-testid":"label",children:e}):null]})};function km({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Pm=a.forwardRef(km);function Fm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Mm=a.forwardRef(Fm);function Rm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Lm=a.forwardRef(Rm);function Am({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Dm=a.forwardRef(Am);function $m({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const _m=a.forwardRef($m);function Li({children:e,className:i="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:o="",isOpen:s=!1,setIsOpen:c,showIconSuccess:d=!0,showButton:p=!0,style:h={}}){return y.jsx(Nn,{show:s,as:n.Fragment,children:y.jsxs(Ei,{as:"div",className:"relative z-50 relative",onClose:c,"data-testid":"modal",children:[y.jsx(Nn.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:y.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>c(!1)})}),y.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:y.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:y.jsx(Nn.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:y.jsxs(Ei.Panel,{className:x("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",i!==""&&i),style:h,children:[d&&y.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:y.jsx(Pm,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),y.jsx("div",{className:x(o!==""&&o),"data-testid":"content",children:e}),p&&y.jsx("div",{className:"mt-5 sm:mt-6",children:y.jsx(gr,{id:"close-modal",onClick:()=>c(!1),children:"Cerrar"})}),y.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const Bm=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:i,close:o,title:s="¿Estás seguro de abandonar la creación de la acción?",description:c="La información se perderá si no creas la acción",classNameTitle:d="",classNameDescription:p=""})=>{const h=()=>{i(!1),o()};return y.jsxs(Li,{isOpen:e,setIsOpen:()=>i(),showButton:!1,showIconSuccess:!1,children:[y.jsx("p",{className:x("text-center text-sm",d!==""&&d),children:s}),y.jsx("p",{className:x("text-center text-sm",p!==""&&p),children:c}),y.jsxs("div",{className:"flex w-full justify-center mt-5",children:[y.jsx(Mi,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>i(),id:"cancel",children:"Cancelar"}),y.jsx(gr,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 focus-visible:outline-secondary-2 shadow-secondary-2 rounded py-1.5 text-white w-full px-5",outline:"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",onClick:h,id:"confirmation",children:"Aceptar"})]})]})},zm=({className:e="",style:i={}})=>y.jsx("div",{className:x("w-px",e!==""&&e),style:i}),Wm=({onClick:e,id:i="",className:o=""})=>y.jsxs("div",{className:x("flex items-center text-default-5",o!==""&&o),"data-testid":i,children:[y.jsx(hm,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),y.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),el=({className:e="",classNameContainer:i="",children:o,message:s="",style:c={}})=>{const[d,p]=n.useState(!1),[h,g]=n.useState({top:0,left:0}),w=n.useRef(null),O=()=>{if(s==="")return;const N=w.current.getBoundingClientRect();g({top:N.bottom+window.scrollY,left:N.left+window.scrollX}),p(!0)},I=()=>{p(!1)},L=y.jsx(Nn,{as:n.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",show:d,children:y.jsx("div",{className:x("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:h.top,left:h.left,position:"absolute"},children:y.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:O,onMouseLeave:I,"data-testid":"message",children:s})})});return y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:w,className:x("inline-block",i!==""&&i),onMouseEnter:O,onMouseLeave:I,"data-testid":"container-tooltip",style:c,children:o}),typeof window<"u"&&u.createPortal(L,document.body)]})},tl=({placeholder:e="",label:i="",htmlFor:o,type:s="text",name:c,handleChange:d,onClick:p=()=>{},value:h,isReadOnly:g=!1,isError:w=!1,helperText:O="",autocomplete:I="off",id:L,classNameLabel:N="",classNameContainerInput:A="",classNameContainer:F="",className:D="",icon:H=null,onKeyDown:z,onFocus:K,min:ae,max:oe,maxWidth:he=5e3})=>{const[Ve,ze]=n.useState(!1),ve=xn({"ring-red-300 focus:ring-red-300 text-red-900":w||Ve,"focus:ring-indigo-600 text-gray-500":!w&&!Ve}),xe=Se=>{if(d&&d(Se),s!=="email")return;const{value:De}=Se.target,st=v(De);ze(!st)};return y.jsxs("div",{"data-testid":`container-input-${L}`,className:F,children:[i!==""&&y.jsx("label",{htmlFor:o,className:x("block text-sm font-medium leading-6",N!==""?N:"text-gray-700"),"data-testid":`label-${L}`,children:i}),y.jsxs("div",{className:x("relative mt-1 rounded-md",A!==""&&A),children:[y.jsx(el,{className:"text-sm",classNameContainer:"w-full",message:h,children:y.jsx("input",{id:L,name:c,type:s,autoComplete:I,placeholder:e,onChange:xe,onClick:p,onKeyDown:z,onFocus:K,value:h,readOnly:g,"data-testid":`input-${L}`,min:ae,className:x("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",ve,D!==""&&D),style:{maxWidth:`${he}px`}})}),H!==null&&y.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:H}),w&&H===null&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Pi,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),O.length===0||!w?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${L}`,children:O})]})};function br({className:e="w-6 h-6",color:i="#3730a3"}){return y.jsxs("svg",{className:x("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:i,strokeWidth:"4",fill:"none"}),y.jsx("path",{fill:i,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function Hm(){return y.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[y.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),y.jsx(br,{className:"w-8 h-8 animate-spin"})]})}const Ai=({height:e="36px",style:i={},styleMenu:o={},label:s="",onChange:c,isReadOnly:d=!1,isError:p=!1,helperText:h="",name:g,id:w,className:O="",classNameLabel:I="",classNameInput:L="",options:N,value:A=-1,defaultValue:F={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:D="label",defaultId:H="value",bgOptionSelect:z="bg-indigo-600",isSearch:K=!1,loading:ae=!1,isSingleOptionAndFirstLoad:oe=!0,isTest:he=!1})=>{const[Ve,ze]=n.useState(""),[ve,xe]=n.useState(F),[Se,De]=n.useState(!1),[st,ft]=n.useState(!0);n.useEffect(()=>{if((N==null?void 0:N.length)!==1||!st)return;ft(!1);const[ie]=N,We=ie[H],lt=ie[D];xe({value:We,label:lt}),oe&&c({target:{value:ie,checked:!1,name:g,type:void 0,id:ie[H]}})},[N,H,D,c,g,st,oe]),n.useEffect(()=>{if(A===-1||(N==null?void 0:N.length)===0)return;const ie=N==null?void 0:N.find(We=>We[H]===A);ie&&xe(ie)},[A,N,H]),n.useEffect(()=>{A==="clear"&&(ve[H]!==F[H]||ve[D]!==F[D]||he)&&xe(F)},[F,he,ve,A,H,D]);const Z=Ve===""?N:N.filter(ie=>ie[D].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Ve.toLowerCase())),at=xn({"ring-red-300 focus:ring-red-300 text-red-900":p&&!d,"text-gray-500":!p,"focus:ring-indigo-600":!p&&!d}),_e=xn({"text-red-400":p&&!d,"text-gray-400":!p}),gt=ie=>{xe(ie),c({target:{value:ie,checked:!1,name:g,type:void 0,id:ie[H]}})};return y.jsxs(an,{as:"div",value:ve,children:[y.jsx(an.Label,{className:x("block text-sm font-medium leading-6 text-gray-500 mb-0.5",I!==""&&I),children:s}),y.jsxs("div",{className:x("relative",O!==""&&O),children:[y.jsx(el,{className:"text-sm",classNameContainer:"w-full",message:ve[D],children:y.jsxs(an.Button,{className:"w-full","data-testid":`listbox-button-${w}`,children:[ve.iconStart&&y.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:ve.iconStart}),y.jsx(an.Input,{className:x("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!p&&!d&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",d&&"focus:ring-gray-300",at,L!==""&&L),onChange:ie=>ze(ie.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ie=>{var We;return(We=ie[D])==null?void 0:We.trim()},autoComplete:"off",readOnly:!K||d,style:{height:e,...i},"data-testid":"input-search",onClick:()=>De(d?!1:!Se),onBlur:()=>De(!1)})]})}),ve.iconEnd&&y.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:ve.iconEnd}),!d&&y.jsx(an.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>De(d?!1:!Se),"data-testid":"arrow-button",children:Se?y.jsx(om,{className:x("h-5 w-5",_e),"aria-hidden":"true"}):y.jsx(nm,{className:x("h-5 w-5",_e),"aria-hidden":"true"})}),!d&&y.jsx(y.Fragment,{children:ae?y.jsx(an.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:y.jsx(br,{})}):(Z??[]).length>0?y.jsx(an.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:o,children:Z.map((ie,We)=>y.jsx(an.Option,{value:ie,className:x(ie[H]===ve[H]?`${z} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${z}`),"data-testid":`select-${w}-${ie[H]}`,onClick:()=>gt(ie),children:y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("div",{className:"flex items-center",children:[ie.iconStart&&y.jsx("span",{className:"mr-2","aria-hidden":"true",children:ie.iconStart}),y.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ie[D]})]}),ie.iconEnd&&y.jsx("span",{className:"ml-2","aria-hidden":"true",children:ie.iconEnd})]})},We))}):y.jsx(an.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:y.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),h.length>0&&p&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${w}`,children:h})]})},Um=({placeholder:e="",label:i="",htmlFor:o,name:s,handleChange:c,onClick:d=()=>{},value:p,valueSelect:h,isReadOnly:g=!1,isError:w=!1,helperText:O="",autocomplete:I="on",id:L,classNameLabel:N="",classNameContainer:A="",className:F="",onKeyDown:D,options:H,idSelect:z,isMarginLeft:K=!0,classNameSelect:ae="w-20",type:oe="text"})=>{const{width:he}=B(),Ve=xn({"ring-red-300 focus:ring-red-300 text-red-900":w,"focus:ring-indigo-600 text-gray-500":!w});return y.jsxs(y.Fragment,{children:[y.jsx("style",{children:`
|
|
69
|
+
*/(function(e){(function(){var i={}.hasOwnProperty;function o(){for(var d="",p=0;p<arguments.length;p++){var h=arguments[p];h&&(d=c(d,s(h)))}return d}function s(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return o.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var p="";for(var h in d)i.call(d,h)&&d[h]&&(p=c(p,h));return p}function c(d,p){return p?d?d+" "+p:d+p:d}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(Fi);var Nm=Fi.exports;const xn=_(Nm),Mi=({className:e="text-sm w-full rounded-md",children:i,icon:o=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const g=xn({"ml-2":s==="start"&&o!==null,"mr-2":s==="end"&&o!==null});return y.jsxs("button",{className:x("flex justify-center items-center bg-white px-3 py-7px font-medium leading-6 text-white shadow-sm ring-1 ring-inset ring-gray-300 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-gray-50",e),type:d,onClick:p,disabled:c,"data-testid":`button-outline-${h}`,id:`button-outline-${h}`,children:[s==="start"&&o!==null&&y.jsx("span",{children:o}),y.jsx("span",{className:x("flex",g),id:h,children:i}),s==="end"&&o!==null&&y.jsx("span",{children:o})]})},Ri=({children:e,className:i="",icon:o=null,edge:s=null,disabled:c=!1,type:d="button",onClick:p,id:h})=>{const g=xn({"ml-2":s==="start"&&o!==null,"mr-2":s==="end"&&o!==null});return y.jsxs("button",{className:`${i} flex justify-center items-center`,edge:s,type:d,onClick:p,disabled:c,"data-testid":`button-${h}`,children:[s==="start"&&o!==null&&y.jsx("span",{children:o}),y.jsx("span",{className:g,children:e}),s==="end"&&o!==null&&y.jsx("span",{children:o})]})},gr=({children:e,classNameButton:i="bg-indigo-600 hover:bg-indigo-700 focus-visible:outline-indigo-600 shadow-indigo-500 rounded font-semibold px-3 py-1.5 text-white w-full",classNameText:o="",icon:s=null,edge:c=null,disabled:d=!1,type:p="button",onClick:h,id:g,outline:w="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:O=""})=>{const[I,L]=n.useState(!1),N=xn({"ml-2":c==="start"&&s!==null,"mr-2":c==="end"&&s!==null}),A=()=>{h&&h()};return y.jsx("div",{className:x("rounded-md p-0.5",O!==""&&O),style:{boxShadow:I?w:"0px 0px 0px 0px #6366F1, 0px 0px 0px 0px #FFF, 0px 0px 0px 0px rgba(0, 0, 0, 0.05)",transition:"box-shadow .1s ease-in-out"},"data-testid":"container-button",children:y.jsxs("button",{className:x("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",d&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",d?i.replace(/\bbg-\w+\b/g,""):i),type:p,onClick:A,onFocus:()=>L(!0),onBlur:()=>L(!1),disabled:d,"data-testid":`button-solid-${g}`,children:[c==="start"&&s!==null&&y.jsx("span",{className:"flex",children:s}),y.jsx("span",{className:x(o.length===0&&N,o.length!==0&&o),children:e}),c==="end"&&s!==null&&y.jsx("span",{children:s})]})})},Im=({label:e=null,checked:i=!1,onChange:o,id:s,className:c="",classNameCheckbox:d="h-4 w-4",style:p={},disabled:h=!1})=>{const[g,w]=n.useState(!1);return n.useEffect(()=>{w(i)},[i]),y.jsxs("div",{className:"flex items-center",style:p,"data-testid":`container-check-${s}`,children:[y.jsx("input",{checked:g,id:`${e}-${s}`,value:s,"aria-describedby":"comments-description",type:"checkbox",onChange:o,className:x("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",d!==""&&d),"data-testid":`checkbox-${s}`,disabled:h}),e!==null?y.jsx("label",{htmlFor:`${e}-${s}`,className:`ml-2.5 font-normal cursor-pointer ${c}`,id:`label-${s}`,"data-testid":"label",children:e}):null]})};function km({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Pm=a.forwardRef(km);function Fm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Mm=a.forwardRef(Fm);function Rm({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Lm=a.forwardRef(Rm);function Am({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Dm=a.forwardRef(Am);function $m({title:e,titleId:i,...o},s){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":i},o),e?a.createElement("title",{id:i},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const _m=a.forwardRef($m);function Li({children:e,className:i="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:o="",isOpen:s=!1,setIsOpen:c,showIconSuccess:d=!0,showButton:p=!0,style:h={}}){return y.jsx(Nn,{show:s,as:n.Fragment,children:y.jsxs(Ei,{as:"div",className:"relative z-50 relative",onClose:c,"data-testid":"modal",children:[y.jsx(Nn.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-5",leave:"ease-in duration-200",leaveFrom:"opacity-5",leaveTo:"opacity-0",children:y.jsx("div",{className:"fixed inset-0 bg-opacity-40 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>c(!1)})}),y.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:y.jsx("div",{className:"flex min-h-full items-center justify-center xs:p-2 p-4 text-center sm:items-center sm:p-0",children:y.jsx(Nn.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:y.jsxs(Ei.Panel,{className:x("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left transition-all sm:w-full sm:pt-3 sm:px-3",i!==""&&i),style:h,children:[d&&y.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:y.jsx(Pm,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),y.jsx("div",{className:x(o!==""&&o),"data-testid":"content",children:e}),p&&y.jsx("div",{className:"mt-5 sm:mt-6",children:y.jsx(gr,{id:"close-modal",onClick:()=>c(!1),children:"Cerrar"})}),y.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})}const Bm=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:i,close:o,title:s="¿Estás seguro de abandonar la creación de la acción?",description:c="La información se perderá si no creas la acción",classNameTitle:d="",classNameDescription:p=""})=>{const h=()=>{i(!1),o()};return y.jsxs(Li,{isOpen:e,setIsOpen:()=>i(),showButton:!1,showIconSuccess:!1,children:[y.jsx("p",{className:x("text-center text-sm",d!==""&&d),children:s}),y.jsx("p",{className:x("text-center text-sm",p!==""&&p),children:c}),y.jsxs("div",{className:"flex w-full justify-center mt-5",children:[y.jsx(Mi,{className:"rounded-md bg-white text-gray-500 text-sm shadow-sm ring-1 ring-inset ring-gray-300 bg-gray-50 w-24 h-9 mr-6",onClick:()=>i(),id:"cancel",children:"Cancelar"}),y.jsx(gr,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 focus-visible:outline-secondary-2 shadow-secondary-2 rounded py-1.5 text-white w-full px-5",outline:"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",onClick:h,id:"confirmation",children:"Aceptar"})]})]})},zm=({className:e="",style:i={}})=>y.jsx("div",{className:x("w-px",e!==""&&e),style:i}),Wm=({onClick:e,id:i="",className:o=""})=>y.jsxs("div",{className:x("flex items-center text-default-5",o!==""&&o),"data-testid":i,children:[y.jsx(hm,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),y.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),el=({className:e="",classNameContainer:i="",children:o,message:s="",style:c={}})=>{const[d,p]=n.useState(!1),[h,g]=n.useState({top:0,left:0}),w=n.useRef(null),O=()=>{if(s==="")return;const N=w.current.getBoundingClientRect();g({top:N.bottom+window.scrollY,left:N.left+window.scrollX}),p(!0)},I=()=>{p(!1)},L=y.jsx(Nn,{as:n.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",show:d,children:y.jsx("div",{className:x("absolute z-40 px-4 mt-0 sm:px-0",e!==""&&e),style:{top:h.top,left:h.left,position:"absolute"},children:y.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:O,onMouseLeave:I,"data-testid":"message",children:s})})});return y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:w,className:x("inline-block",i!==""&&i),onMouseEnter:O,onMouseLeave:I,"data-testid":"container-tooltip",style:c,children:o}),typeof window<"u"&&u.createPortal(L,document.body)]})},tl=({placeholder:e="",label:i="",htmlFor:o,type:s="text",name:c,handleChange:d,onClick:p=()=>{},value:h,isReadOnly:g=!1,isError:w=!1,helperText:O="",autocomplete:I="off",id:L,classNameLabel:N="",classNameContainerInput:A="",classNameContainer:F="",className:D="",icon:H=null,onKeyDown:z,onFocus:K,min:ae,max:oe,maxWidth:he=5e3})=>{const[Ve,ze]=n.useState(!1),ve=xn({"ring-red-300 focus:ring-red-300 text-red-900":w||Ve,"focus:ring-indigo-600 text-gray-500":!w&&!Ve}),xe=Se=>{if(d&&d(Se),s!=="email")return;const{value:De}=Se.target,st=v(De);ze(!st)};return y.jsxs("div",{"data-testid":`container-input-${L}`,className:F,children:[i!==""&&y.jsx("label",{htmlFor:o,className:x("block text-sm font-medium leading-6",N!==""?N:"text-gray-700"),"data-testid":`label-${L}`,children:i}),y.jsxs("div",{className:x("relative mt-1 rounded-md",A!==""&&A),children:[y.jsx(el,{className:"text-sm",classNameContainer:"w-full",message:h,children:y.jsx("input",{id:L,name:c,type:s,autoComplete:I,placeholder:e,onChange:xe,onClick:p,onKeyDown:z,onFocus:K,value:h,readOnly:g,"data-testid":`input-${L}`,min:ae,className:x("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",ve,D!==""&&D),style:{maxWidth:`${he}px`}})}),H!==null&&y.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:H}),w&&H===null&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Pi,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),O.length===0||!w?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${L}`,children:O})]})};function br({className:e="w-6 h-6",color:i="#3730a3"}){return y.jsxs("svg",{className:x("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:i,strokeWidth:"4",fill:"none"}),y.jsx("path",{fill:i,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function Hm(){return y.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[y.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),y.jsx(br,{className:"w-8 h-8 animate-spin"})]})}const Ai=({height:e="36px",style:i={},styleMenu:o={},label:s="",onChange:c,isReadOnly:d=!1,isError:p=!1,helperText:h="",name:g,id:w,className:O="",classNameLabel:I="",classNameInput:L="",options:N,value:A=-1,defaultValue:F={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:D="label",defaultId:H="value",bgOptionSelect:z="bg-indigo-600",isSearch:K=!1,loading:ae=!1,isSingleOptionAndFirstLoad:oe=!0,isTest:he=!1})=>{const[Ve,ze]=n.useState(""),[ve,xe]=n.useState(F),[Se,De]=n.useState(!1),[st,ft]=n.useState(!0);n.useEffect(()=>{if((N==null?void 0:N.length)!==1||!st)return;ft(!1);const[ie]=N,We=ie[H],lt=ie[D];xe({value:We,label:lt}),oe&&c({target:{value:ie,checked:!1,name:g,type:void 0,id:ie[H]}})},[N,H,D,c,g,st,oe]),n.useEffect(()=>{if(A===-1||(N==null?void 0:N.length)===0)return;const ie=N==null?void 0:N.find(We=>We[H]===A);ie&&xe(ie)},[A,N,H]),n.useEffect(()=>{A==="clear"&&(ve[H]!==F[H]||ve[D]!==F[D]||he)&&xe(F)},[F,he,ve,A,H,D]);const Y=Ve===""?N:N.filter(ie=>ie[D].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(Ve.toLowerCase())),at=xn({"ring-red-300 focus:ring-red-300 text-red-900":p&&!d,"text-gray-500":!p,"focus:ring-indigo-600":!p&&!d}),_e=xn({"text-red-400":p&&!d,"text-gray-400":!p}),gt=ie=>{xe(ie),c({target:{value:ie,checked:!1,name:g,type:void 0,id:ie[H]}})};return y.jsxs(an,{as:"div",value:ve,children:[y.jsx(an.Label,{className:x("block text-sm font-medium leading-6 text-gray-500 mb-0.5",I!==""&&I),children:s}),y.jsxs("div",{className:x("relative",O!==""&&O),children:[y.jsx(el,{className:"text-sm",classNameContainer:"w-full",message:ve[D],children:y.jsxs(an.Button,{className:"w-full","data-testid":`listbox-button-${w}`,children:[ve.iconStart&&y.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:ve.iconStart}),y.jsx(an.Input,{className:x("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!p&&!d&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",d&&"focus:ring-gray-300",at,L!==""&&L),onChange:ie=>ze(ie.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ie=>{var We;return(We=ie[D])==null?void 0:We.trim()},autoComplete:"off",readOnly:!K||d,style:{height:e,...i},"data-testid":"input-search",onClick:()=>De(d?!1:!Se),onBlur:()=>De(!1)})]})}),ve.iconEnd&&y.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:ve.iconEnd}),!d&&y.jsx(an.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>De(d?!1:!Se),"data-testid":"arrow-button",children:Se?y.jsx(om,{className:x("h-5 w-5",_e),"aria-hidden":"true"}):y.jsx(nm,{className:x("h-5 w-5",_e),"aria-hidden":"true"})}),!d&&y.jsx(y.Fragment,{children:ae?y.jsx(an.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:y.jsx(br,{})}):(Y??[]).length>0?y.jsx(an.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:o,children:Y.map((ie,We)=>y.jsx(an.Option,{value:ie,className:x(ie[H]===ve[H]?`${z} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${z}`),"data-testid":`select-${w}-${ie[H]}`,onClick:()=>gt(ie),children:y.jsxs("div",{className:"flex justify-between items-center",children:[y.jsxs("div",{className:"flex items-center",children:[ie.iconStart&&y.jsx("span",{className:"mr-2","aria-hidden":"true",children:ie.iconStart}),y.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ie[D]})]}),ie.iconEnd&&y.jsx("span",{className:"ml-2","aria-hidden":"true",children:ie.iconEnd})]})},We))}):y.jsx(an.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:y.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),h.length>0&&p&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${w}`,children:h})]})},Um=({placeholder:e="",label:i="",htmlFor:o,name:s,handleChange:c,onClick:d=()=>{},value:p,valueSelect:h,isReadOnly:g=!1,isError:w=!1,helperText:O="",autocomplete:I="on",id:L,classNameLabel:N="",classNameContainer:A="",className:F="",onKeyDown:D,options:H,idSelect:z,isMarginLeft:K=!0,classNameSelect:ae="w-20",type:oe="text"})=>{const{width:he}=B(),Ve=xn({"ring-red-300 focus:ring-red-300 text-red-900":w,"focus:ring-indigo-600 text-gray-500":!w});return y.jsxs(y.Fragment,{children:[y.jsx("style",{children:`
|
|
70
70
|
input[type="number"]::-webkit-inner-spin-button,
|
|
71
71
|
input[type="number"]::-webkit-outer-spin-button {
|
|
72
72
|
-webkit-appearance: none;
|
|
@@ -75,7 +75,7 @@ Check the top-level render call using <`+Q+">.")}return V}}function Vi(C,V){{if(
|
|
|
75
75
|
input[type="number"] {
|
|
76
76
|
-moz-appearance: textfield;
|
|
77
77
|
}
|
|
78
|
-
`}),y.jsxs("div",{"data-testid":`container-input-${L}`,className:A,children:[i!==""&&y.jsx("label",{htmlFor:o,className:x("block text-sm font-medium leading-6",N!==""?N:"text-gray-700"),"data-testid":`label-${L}`,children:i}),y.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[y.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:y.jsx(Ai,{name:z,onChange:ze=>c(ze),id:z,options:H,value:h,isReadOnly:g,className:ae,height:he<=640?"28px":"32px",classNameInput:x(K&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),y.jsx("input",{id:L,name:s,type:oe,autoComplete:I,placeholder:e,readOnly:g,"data-testid":`input-${L}`,onClick:d,onKeyDown:D,onChange:ze=>c(ze),value:p,className:x("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",Ve,F!==""&&F)}),w&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Pi,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),O.length===0||!w?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${L}`,children:O})]})]})},Vm=({setValuesDefault:e,status:i=!1,isReadOnly:o=!1,handleClick:s,text:c="",updateStatus:d=!1,id:p="",isHiddenText:h=!1,setForm:g,handleChange:w,textActive:O="Activo",textInactive:I="Inactivo"})=>{const[L,N]=n.useState(!1);n.useEffect(()=>{N(i),e("status",i),g(F=>({...F,status:i}))},[i,e,d,g]);const A=()=>{N(!L),e("status",!L),g(F=>({...F,status:!L})),w({target:{checked:!L,value:!L,name:"status",type:"",id:""}}),s&&s()};return y.jsxs("div",{className:"flex",children:[y.jsxs(Mp,{checked:L,onChange:A,className:x("group relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-success-1 focus:ring-offset-2 mt-1",L?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${p}`,disabled:o,children:[y.jsx("span",{className:"sr-only",children:"Use setting"}),y.jsx("span",{"aria-hidden":"true",className:x("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",L?"translate-x-full":"translate-x-0")})]}),c!==""?y.jsx("p",{className:x("text-sm font-medium text-gray-500 ml-2 self-end",h&&"hidden"),children:c}):y.jsx("p",{className:x("text-sm font-medium text-gray-500 ml-2 self-end",h&&"hidden"),"data-testid":"text-switch",children:L?O:I})]})};function Zm({label:e="",id:i,htmlFor:o="",classNameLabel:s="",className:c="",rows:d=4,name:p,placeholder:h="",helperText:g="",isReadOnly:w=!1,isError:O=!1,onChange:I,value:L,idInput:N,nameInput:A,placeholderInput:F="",isReadOnlyInput:D=!1,valueInput:H,infoTop:z=null,infoBottom:K=null,classNameInfoTop:ae="h-4",classNameInfoBottom:oe="h-2",isInputTitle:he=!1,hiddenBorder:Ve=!1}){const ze=xn({"ring-red-300 focus:ring-red-300 text-red-900":O,"focus:ring-indigo-600 text-gray-700":!O});return y.jsxs(y.Fragment,{children:[e!==""&&y.jsx("label",{htmlFor:o,className:x("leading-6 block text-sm",s!==""&&s),children:e}),y.jsxs("div",{className:"relative overflow-x-hidden",children:[z!==null&&y.jsx("div",{className:"absolute top-2 left-3 w-full",children:z}),y.jsxs("div",{className:x("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-indigo-600 placeholder:text-gray-400 bg-white",ze),children:[z!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:ae})})}),he&&y.jsx("textarea",{name:A,id:N,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:F,value:H,onChange:I,rows:2,readOnly:D}),y.jsx("textarea",{placeholder:h,rows:d,name:p,id:i,className:x(he||Ve?"block w-full resize-none border-0 bg-transparent py-1.5 placeholder:text-gray-400 focus:ring-0":"block w-full rounded-md border-0 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset sm:leading-6",ze,c!==""&&c),readOnly:w,onChange:I,value:L,"data-testid":`textarea-${i}`}),K!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:oe})})})]}),K!==null&&y.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:K})]}),g.length>0&&O&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${i}`,children:g})]})}const Ym=({children:e,data:i,className:o="",classNameTooltip:s="w-full",classNameMenu:c="",classNameMenuItems:d="",classNameContainerSearch:p="px-5",isSelectMultiple:h=!1,optionsSelect:g,propObject:w="name",propId:O="id",textNewItem:I="",defaultId:L=null,loading:N=!1,search:A=null,searchPlaceHolder:F="Buscar...",valueSearch:D=void 0,idsOptionSelect:H=null,isComponent:z,isSticky:K=!1,hiddenMenu:ae=!1,id:oe,onClick:he=()=>{},isRelative:Ve=!0,isMaxWidth:ze=!1,isTag:ve=!1,isClear:xe=!1,clear:Se=null,applyButton:De=null,applyButtonText:st="Aplicar",tagsParent:ft=[],isClearTagsParent:
|
|
78
|
+
`}),y.jsxs("div",{"data-testid":`container-input-${L}`,className:A,children:[i!==""&&y.jsx("label",{htmlFor:o,className:x("block text-sm font-medium leading-6",N!==""?N:"text-gray-700"),"data-testid":`label-${L}`,children:i}),y.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[y.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:y.jsx(Ai,{name:z,onChange:ze=>c(ze),id:z,options:H,value:h,isReadOnly:g,className:ae,height:he<=640?"28px":"32px",classNameInput:x(K&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),y.jsx("input",{id:L,name:s,type:oe,autoComplete:I,placeholder:e,readOnly:g,"data-testid":`input-${L}`,onClick:d,onKeyDown:D,onChange:ze=>c(ze),value:p,className:x("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",Ve,F!==""&&F)}),w&&y.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:y.jsx(Pi,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),O.length===0||!w?null:y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${L}`,children:O})]})]})},Vm=({setValuesDefault:e,status:i=!1,isReadOnly:o=!1,handleClick:s,text:c="",updateStatus:d=!1,id:p="",isHiddenText:h=!1,setForm:g,handleChange:w,textActive:O="Activo",textInactive:I="Inactivo"})=>{const[L,N]=n.useState(!1);n.useEffect(()=>{N(i),e("status",i),g(F=>({...F,status:i}))},[i,e,d,g]);const A=()=>{N(!L),e("status",!L),g(F=>({...F,status:!L})),w({target:{checked:!L,value:!L,name:"status",type:"",id:""}}),s&&s()};return y.jsxs("div",{className:"flex",children:[y.jsxs(Mp,{checked:L,onChange:A,className:x("group relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-success-1 focus:ring-offset-2 mt-1",L?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${p}`,disabled:o,children:[y.jsx("span",{className:"sr-only",children:"Use setting"}),y.jsx("span",{"aria-hidden":"true",className:x("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",L?"translate-x-full":"translate-x-0")})]}),c!==""?y.jsx("p",{className:x("text-sm font-medium text-gray-500 ml-2 self-end",h&&"hidden"),children:c}):y.jsx("p",{className:x("text-sm font-medium text-gray-500 ml-2 self-end",h&&"hidden"),"data-testid":"text-switch",children:L?O:I})]})};function Zm({label:e="",id:i,htmlFor:o="",classNameLabel:s="",className:c="",rows:d=4,name:p,placeholder:h="",helperText:g="",isReadOnly:w=!1,isError:O=!1,onChange:I,value:L,idInput:N,nameInput:A,placeholderInput:F="",isReadOnlyInput:D=!1,valueInput:H,infoTop:z=null,infoBottom:K=null,classNameInfoTop:ae="h-4",classNameInfoBottom:oe="h-2",isInputTitle:he=!1,hiddenBorder:Ve=!1}){const ze=xn({"ring-red-300 focus:ring-red-300 text-red-900":O,"focus:ring-indigo-600 text-gray-700":!O});return y.jsxs(y.Fragment,{children:[e!==""&&y.jsx("label",{htmlFor:o,className:x("leading-6 block text-sm",s!==""&&s),children:e}),y.jsxs("div",{className:"relative overflow-x-hidden",children:[z!==null&&y.jsx("div",{className:"absolute top-2 left-3 w-full",children:z}),y.jsxs("div",{className:x("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-indigo-600 placeholder:text-gray-400 bg-white",ze),children:[z!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:ae})})}),he&&y.jsx("textarea",{name:A,id:N,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:F,value:H,onChange:I,rows:2,readOnly:D}),y.jsx("textarea",{placeholder:h,rows:d,name:p,id:i,className:x(he||Ve?"block w-full resize-none border-0 bg-transparent py-1.5 placeholder:text-gray-400 focus:ring-0":"block w-full rounded-md border-0 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset sm:leading-6",ze,c!==""&&c),readOnly:w,onChange:I,value:L,"data-testid":`textarea-${i}`}),K!==null&&y.jsx("div",{className:"py-2","aria-hidden":"true",children:y.jsx("div",{className:"py-px",children:y.jsx("div",{className:oe})})})]}),K!==null&&y.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:K})]}),g.length>0&&O&&y.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${i}`,children:g})]})}const Ym=({children:e,data:i,className:o="",classNameTooltip:s="w-full",classNameMenu:c="",classNameMenuItems:d="",classNameContainerSearch:p="px-5",isSelectMultiple:h=!1,optionsSelect:g,propObject:w="name",propId:O="id",textNewItem:I="",defaultId:L=null,loading:N=!1,search:A=null,searchPlaceHolder:F="Buscar...",valueSearch:D=void 0,idsOptionSelect:H=null,isComponent:z,isSticky:K=!1,hiddenMenu:ae=!1,id:oe,onClick:he=()=>{},isRelative:Ve=!0,isMaxWidth:ze=!1,isTag:ve=!1,isClear:xe=!1,clear:Se=null,applyButton:De=null,applyButtonText:st="Aplicar",tagsParent:ft=[],isClearTagsParent:Y=!1,isReadOnly:at,isDisabledApplyButton:_e=!0,isOpenMenu:gt=void 0})=>{const ie=n.useRef(null),We=n.useRef(null),[lt,Tt]=n.useState(new Set),[Rt,yt]=n.useState(new Map),[Le,St]=n.useState({}),[Ke,At]=n.useState(!1);n.useEffect(()=>{H!==null&&Tt(new Set(new Set(H)))},[H]),n.useEffect(()=>{Y&&yt(new Map)},[Y]),n.useEffect(()=>{if(ft.length===0)return;const ce=new Map;ft.forEach(He=>ce.set(He.id,He)),yt(ce)},[ft]),n.useEffect(()=>{xe&&(Tt(new Set),yt(new Map),Se&&Se())},[Se,xe]),n.useEffect(()=>{const ce=()=>{if(!We.current)return;const He=We.current.getBoundingClientRect();St({position:"absolute",top:He.bottom+window.scrollY,left:He.left+window.scrollX,zIndex:10,width:He.width})};return ce(),window.addEventListener("scroll",ce,!0),window.addEventListener("resize",ce),()=>{window.removeEventListener("scroll",ce,!0),window.removeEventListener("resize",ce)}},[Ke]),n.useEffect(()=>{const ce=()=>{document.body.dispatchEvent(new MouseEvent("click",{bubbles:!0}))};return window.addEventListener("scroll",ce,!0),()=>window.removeEventListener("scroll",ce,!0)},[]);const ne=ce=>{let He=new Map(Rt),Ot=new Set(lt),yn=null;if(L!==null&&(ce[O]===L&&(yn=crypto.randomUUID()),yn!==null&&(ce[O]=yn),yn!==null&&(ce[w]=ce[w].replace(I,"").trim())),Ot.has(ce[O])?Ot.delete(ce[O]):Ot.add(ce[O]),He.has(ce[O])?He.delete(ce[O]):He.set(ce[O],ce),!h){const xr=Array.from(Ot),In=Array.from(He);xr.shift(),In.shift(),Ot=Ot.size===2?new Set(xr):Ot,He=He.size===2?new Map(In):He}g(ce,Array.from(Ot),yn!==null),Tt(Ot),yt(He)},ye=ce=>{he(ce===!0?-1:oe),At(!Ke)},et=ce=>{const He=new Set(lt),Ot=new Map(Rt);He.delete(ce[O]),Ot.delete(ce[O]),g(ce,Array.from(He)),Tt(He),yt(Ot)},zt=()=>{if(lt.size===0)return;const ce=new Set(lt),He=new Map(Rt);ce.clear(),He.clear(),g(null,Array.from(ce)),Tt(ce),yt(He)};function Ln(ce){if(typeof ce!="string")return ce;const He=ce.toLowerCase();return He.charAt(0).toUpperCase()+He.slice(1)}return y.jsxs(Yr,{as:"div",className:x("inline-block text-left",Ve&&"relative",c!==""&&c),onClick:()=>ye(!0),"data-testid":`menu-${oe}`,id:oe,ref:ie,children:[y.jsx("style",{children:`
|
|
79
79
|
.blue {
|
|
80
80
|
background-color: #3758F9;
|
|
81
81
|
}
|
|
@@ -92,7 +92,7 @@ Check the top-level render call using <`+Q+">.")}return V}}function Vi(C,V){{if(
|
|
|
92
92
|
width: 414px;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
`}),y.jsx(Yr.Button,{as:"div",onClick:()=>ye(ae),"data-testid":`menu-button-${oe}`,ref:We,children:e}),u.createPortal(y.jsx("div",{style:Le,className:x(s,ae&&"hidden",N&&"w-full"),children:y.jsx(Nn,{as:n.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",show:gt,children:y.jsx(Yr.Items,{className:x("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",N?"w-full":d===""&&"w-max",d!==""&&d),children:N?y.jsx("div",{className:"flex justify-center py-4",children:y.jsx(br,{})}):y.jsxs("div",{className:x(!z&&"pb-1",o!==""&&o,ze&&"w-custom"),"data-testid":"dropdown-menu",children:[y.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[A!==null&&y.jsx("div",{className:x("py-2 w-full",p),children:y.jsx(tl,{htmlFor:"search",id:`dropdown-search-${oe}`,name:"search",type:"text",placeholder:F,handleChange:ce=>A(ce,oe),icon:F!==""&&y.jsx(gm,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:D,onKeyDown:ce=>ce.key===" "&&ce.stopPropagation(),autocomplete:"off"})}),De!==null&&y.jsxs("div",{className:x("pt-1.5 justify-end flex items-center",p),children:[y.jsx(gr,{classNameButton:x("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",lt.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:zt,children:"Descartar"}),y.jsx(gr,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:lt.size===0&&_e?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:lt.size===0&&_e,onClick:()=>De({id:oe,items:Array.from(Rt.values())}),children:st})]})]}),ve&&!at&&y.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(Rt).map((ce,He)=>y.jsx("div",{className:"mr-1",children:y.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[ce[1][w],y.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>et(ce[1]),"data-testid":`tag-${ce[0]}`,children:y.jsx(jm,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},ce))}),y.jsx("div",{className:"divide-y divide-gray-100",children:(at?[]:i).map((ce,He)=>y.jsx("div",{className:x(!z&&"py-1",K&&He===0&&"sticky top-0"),children:z?y.jsx("div",{onClick:Ot=>{Ot.preventDefault(),g()},"data-testid":`item-component-${He}`,children:ce}):y.jsx(Yr.Item,{children:y.jsx("span",{className:x(lt.has(ce[O])&&"blue text-white",!lt.has(ce[O])&&"text-gray-700 hover:bg-gray-100 hover:text-gray-900","block px-4 py-2 text-13 lg:text-sm cursor-pointer font-normal"),"data-testid":`item-${He}`,onClick:Ot=>{Ot.preventDefault(),ne(ce)},children:Ln(ce[w])})})},He))})]})})})}),document.body)]})},Di=50,Gm=({total:e,handleNext:i,handlePrev:o,handleSelectPage:s,page:c=null})=>{const[d,p]=n.useState(1),[h,g]=n.useState([]),[w,O]=n.useState([]),I=Math.ceil(e/Di);n.useEffect(()=>{const F=[];for(let D=1;D<=I;D++)F.push(D);O(F)},[I]),n.useEffect(()=>{let F=[];const D="...",H="... ",z=" ...";if(w.length<6)F=w;else if(d>=1&&d<=3)F=[1,2,3,4,D,w.length];else if(d===4)F=[...w.slice(0,5),D,w.length];else if(d>4&&d<w.length-2){const K=w.slice(d-2,d),ae=w.slice(d,d+1);F=[1,H,...K,...ae,z,w.length]}else if(d>w.length-3){const K=w.slice(w.length-4);F=[1,H,...K]}g(F)},[d,w]),n.useEffect(()=>{c!==null&&c!==d&&p(c)},[c,d]);const L=F=>{p(F),s(F)},N=()=>{p(d===1?d:d-1),d>1&&o(d-1)},A=()=>{d===w.length?p(d):p(d+1),d<w.length&&i(d+1)};return y.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[y.jsx("div",{className:"-mt-px flex w-0 flex-1",children:y.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:N,"data-testid":"prev",children:[y.jsx(Kp,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),y.jsx("div",{className:"hidden md:-mt-px md:flex",children:h.map((F,D)=>y.jsx(Ri,{className:x("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",d===F?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>F!=="..."&&F!==" ..."&&F!=="... "&&L(F),id:`page-${D+1}`,children:F},D))}),y.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:y.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:A,"data-testid":"next",children:["Siguiente",y.jsx(Jp,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},qm=({setForm:e,setValuesDefault:i,className:o="",classNameContainer:s="",classNameContainerImg:c="",src:d=null,alt:p=null,width:h,height:g})=>{const w=O=>{const{files:I}=O.target,[L]=I,N=new FileReader;N.readAsDataURL(L),N.onload=function(){e(A=>({...A,photo:N.result})),i("photo",N.result)}};return y.jsxs("div",{className:x("col-span-full",s!==""&&s),children:[y.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),y.jsxs("div",{className:x("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",d===null&&"px-9 pt-6 pb-2.5",c!==""&&c),children:[d?y.jsx("img",{src:d,alt:p,width:h,height:g,className:x(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:g},onLoad:O=>O.currentTarget.style.filter="none","data-testid":"img"}):y.jsxs("div",{className:"text-center",children:[y.jsx(wm,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),y.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[y.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:y.jsx("span",{children:"Upload a file"})}),y.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),y.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),y.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:w})]})]})},Km=({children:e,openDefault:i=!1,setForm:o,setValuesDefault:s,title:c,type:d,data:p,setData:h,id:g,defaultData:w,dispatch:O,isAdd:I=!0,search:L=null,isPadding:N=!0,isReadOnly:A=!1,isEdit:F=!1,deleteItem:D=null,validateAdd:H=null,loading:z=!1,internalEdit:K=!0,isDataEmpty:ae=!0,typeProp:oe="value",setAdd:he=null,hasNoRecords:Ve=!0,tabs:ze=null,selectTab:ve=null})=>{const[xe,Se]=n.useState(!1),[De,st]=n.useState(!1),[,ft]=n.useState(!1),[Z,at]=n.useState(""),[_e,gt]=n.useState(1);n.useEffect(()=>{Se(i),ft(A)},[i,A]);const ie=({e:Le,index:St})=>{const Ke=m(p),{name:At,value:ne}=Le.target;!(H!==null&&H({value:ne,copyData:Ke,index:St}))&&(Ke[St][At]=ne),h(Ke),s(g,Ke),o(ye=>({...ye,[g]:Ke}))},We=()=>{if(p.some(Le=>Object.values(Le).some(St=>St[oe]===-1))||p.length===0)return O({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});o(Le=>({...Le,data:p})),s(g,p),h([...p,w]),he&&he([...p,w])},lt=({index:Le,item:St})=>{if(p.length===1&&!F)return;const Ke=m(p);Ke.splice(Le,1),o(At=>({...At,data:Ke})),s(g,Ke),h(Ke),D&&D({index:Le,item:St,data:Ke}),Le===p.length-1&&F&&Ke.length===0&&(o(At=>({...At,data:Ke})),s(g,Ke),h([...Ke,w]))},Tt=()=>{st(!De),ft(!1)},Rt=()=>{if(p.length>1)return;if(p.length===0)return!0;const[Le]=p,{rol:St,privileges:Ke,limitedPrivileges:At,...ne}=Le;return Object.values(ne).every(ye=>Object.values(ye)[0]===-1)},yt=({tab:Le})=>{gt(Le.id),ve&&ve({tab:Le})};return y.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[y.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Se(!xe),"data-testid":`open-accordion-${g}`,children:[y.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:c}),y.jsxs("div",{className:"flex items-center",children:[L&&y.jsx(tl,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:Le=>{L(Le),at(Le.target.value)},icon:y.jsx(Dm,{className:"w-6 h-6 text-indigo-300"}),className:"h-9",classNameContainerInput:"w-52 2xs:w-64 max-w-64 mr-8 hidden sm:block",value:Z,onClick:Le=>Le.stopPropagation(),onFocus:()=>Se(!0)}),xe?y.jsx(Lm,{className:"w-5 h-5 text-default-5"}):y.jsx(Mm,{className:"w-5 h-5 text-default-5"})]})]}),y.jsx(Nn,{as:n.Fragment,show:xe,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsxs("div",{children:[ze&&y.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:ze.map(Le=>y.jsx("span",{className:x(_e===Le.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":_e===Le.id?"page":void 0,onClick:()=>yt({tab:Le}),"data-testid":`tab-${Le.id}`,children:Le.name},Le.name))}),y.jsxs("div",{className:x("sm:mt-2.5 py-3.5 relative",N&&ze===null&&"px-4 sm:p-6",N&&ze!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[K&&!De&&y.jsx(xm,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:Tt,"data-testid":`edit-role-${g}`}),z&&y.jsx("div",{className:"flex justify-center mt-5",children:y.jsx(br,{})}),ae&&Rt()&&Ve&&!z&&(K?!De:!F)&&y.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!z&&p.map((Le,St)=>y.jsxs("div",{className:x("flex flex-col 3xs:flex-row mb-4",N&&"ml-0 3xs:ml-3"),children:[typeof e=="function"?e({item:Le,index:St,handleChange:ie,isEdit:K?De:F}):e,I&&(K?De:F)&&y.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:x("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",p.length===1&&!F&&"opacity-0"),children:y.jsx(_m,{className:x("w-6 h-4",(p.length>1||F)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>lt({index:St,item:Le}),"data-testid":`delete-item-${St}-${g}`})})]},St)),I&&(K?De:F)&&!z&&y.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:We,"data-testid":`add-item-${g}`,style:{width:"fit-content"},children:`+ Añadir ${d}`})]})]})})]})},Xm=({src:e,alt:i,width:o,height:s,className:c="",priority:d=!1,style:p={},id:h=""})=>{const[g,w]=n.useState(!1),O={filter:g?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...o?{width:o}:{},...s?{height:s}:{},...p};return y.jsx("img",{src:e,alt:i,...o?{width:o}:{},...s?{height:s}:{},className:x(c!==""&&c),loading:d?"eager":"lazy",decoding:"async",style:O,onLoad:()=>w(!0),"data-testid":`image-${h}`})};r.Accordion=Km,r.Alert=pm,r.Avatar=Tm,r.Bullets=Om,r.ButtonOutline=Mi,r.ButtonPagination=Ri,r.ButtonSolid=gr,r.Checkbox=Im,r.ConfirmationAbandoningCreation=Bm,r.CoverPhoto=qm,r.Divider=zm,r.Dropdown=Ym,r.GoBack=Wm,r.Image=Xm,r.Input=tl,r.InputDropdown=Um,r.MESSAGE_ABORT_CONTROLLER=R,r.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=T,r.Modal=Li,r.Pagination=Gm,r.Select=Ai,r.Spinner=Hm,r.SpinnerIcon=br,r.Switch=Vm,r.Textarea=Zm,r.Tooltip=el,r.classNames=x,r.copyOptions=m,r.generateAvatarInitials=E,r.isPromise=k,r.rowsPerPage=Di,r.useCloseModal=M,r.useForm=$,r.useMediaQuery=P,r.useWindowDimensions=B,r.validateEmail=v,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})})(Io,Io.exports);var ri=Io.exports;const ko=({className:t="",classNameContainer:l="",children:r,message:n="",style:u={}})=>{const[f,a]=b.useState(!1),[m,v]=b.useState({top:0,left:0}),x=b.useRef(null),E=()=>{if(n==="")return;const T=x.current.getBoundingClientRect();v({top:T.bottom+window.scrollY,left:T.left+window.scrollX}),a(!0)},k=()=>{a(!1)},R=j.jsx(Cn,{as:b.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",show:f,children:j.jsx("div",{className:ri.classNames("absolute z-40 px-4 mt-0 sm:px-0",t!==""&&t),style:{top:m.top,left:m.left,position:"absolute"},children:j.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:E,onMouseLeave:k,"data-testid":"message",children:typeof n=="object"?"":n})})});return j.jsxs(j.Fragment,{children:[j.jsx("div",{ref:x,className:ri.classNames("inline-block",l!==""&&l),onMouseEnter:E,onMouseLeave:k,"data-testid":"container-tooltip",style:u,children:r}),typeof window<"u"&&wr.createPortal(R,document.body)]})},Po=({placeholder:t="",label:l="",htmlFor:r,type:n="text",name:u,handleChange:f,onClick:a=()=>{},value:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:k="off",id:R,classNameLabel:T="",classNameContainerInput:M="",classNameContainer:$="",className:P="",icon:B=null,onKeyDown:_,onFocus:q,min:te,max:re,maxWidth:pe=5e3})=>{const[Pe,ke]=b.useState(!1),Te=mn({"ring-red-300 focus:ring-red-300 text-red-900":x||Pe,"focus:ring-indigo-600 text-gray-500":!x&&!Pe}),y=me=>{if(f&&f(me),n!=="email")return;const{value:Fe}=me.target,Be=sl(Fe);ke(!Be)};return j.jsxs("div",{"data-testid":`container-input-${R}`,className:$,children:[l!==""&&j.jsx("label",{htmlFor:r,className:se("block text-sm font-medium leading-6",!T.includes("mb-")&&"mb-0.5",T!==""?T:"text-gray-700"),"data-testid":`label-${R}`,children:l}),j.jsxs("div",{className:se("relative rounded-md",M!==""&&M),children:[j.jsx(ko,{className:"text-sm",classNameContainer:"w-full",message:n==="password"?"":m,children:j.jsx("input",{id:R,name:u,type:n,autoComplete:k,placeholder:t,onChange:y,onClick:a,onKeyDown:_,onFocus:q,value:m,readOnly:v,"data-testid":`input-${R}`,min:te,className:se("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",Te,P!==""&&P),style:{maxWidth:`${pe}px`}})}),B!==null&&j.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:B}),x&&B===null&&j.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:j.jsx(Jl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${R}`,children:E})]})};function Jn({className:t="w-6 h-6",color:l="#3730a3"}){return j.jsxs("svg",{className:se("fill-current animate-spin",t),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:l,strokeWidth:"4",fill:"none"}),j.jsx("path",{fill:l,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function id(){return j.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[j.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),j.jsx(Jn,{className:"w-8 h-8 animate-spin"})]})}const oi=({height:t="36px",style:l={},styleMenu:r={},label:n="",onChange:u,isReadOnly:f=!1,isError:a=!1,helperText:m="",name:v,id:x,className:E="",classNameLabel:k="",classNameInput:R="",options:T,value:M=-1,defaultValue:$={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:P="label",defaultId:B="value",bgOptionSelect:_="bg-indigo-600",isSearch:q=!1,loading:te=!1,isSingleOptionAndFirstLoad:re=!0,isTest:pe=!1})=>{const Pe=b.useRef(!0),[ke,Te]=b.useState(""),[y,me]=b.useState($),[Fe,Be]=b.useState(!1);b.useEffect(()=>{if((T==null?void 0:T.length)!==1||!Pe.current)return;Pe.current=!1;const[ue]=T,Oe=ue[B],Je=ue[P];me({value:Oe,label:Je}),re&&u({target:{value:ue,checked:!1,name:v,type:void 0,id:ue[B]}})},[T,B,P,u,v,re]),b.useEffect(()=>{if(M===-1||(T==null?void 0:T.length)===0)return;const ue=T==null?void 0:T.find(Oe=>Oe[B]===M);ue&&me(ue)},[M,T,B]),b.useEffect(()=>{M==="clear"&&(y[B]!==$[B]||y[P]!==$[P]||pe)&&me($)},[$,pe,y,M,B,P]);const it=ke===""?T:T.filter(ue=>ue[P].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(ke.toLowerCase())),U=mn({"ring-red-300 focus:ring-red-300 text-red-900":a&&!f,"text-gray-500":!a,"focus:ring-indigo-600":!a&&!f}),Xe=mn({"text-red-400":a&&!f,"text-gray-400":!a}),$e=ue=>{me(ue),u({target:{value:ue,checked:!1,name:v,type:void 0,id:ue[B]}})};return j.jsxs(rn,{as:"div",value:y,children:[j.jsx(rn.Label,{className:se("block text-sm font-medium leading-6 text-gray-500 mb-0.5",k!==""&&k),children:n}),j.jsxs("div",{className:se("relative",E!==""&&E),children:[j.jsx(ko,{className:"text-sm",classNameContainer:"w-full",message:y[P],children:j.jsxs(rn.Button,{className:"w-full","data-testid":`listbox-button-${x}`,children:[y.iconStart&&j.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:y.iconStart}),j.jsx(rn.Input,{className:se("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!a&&!f&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",f&&"focus:ring-gray-300",U,R!==""&&R),onChange:ue=>Te(ue.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ue=>{var Oe;return(Oe=ue[P])==null?void 0:Oe.trim()},autoComplete:"off",readOnly:!q||f,style:{height:t,...l},"data-testid":"input-search",onClick:()=>Be(f?!1:!Fe),onBlur:()=>Be(!1)})]})}),y.iconEnd&&j.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:y.iconEnd}),!f&&j.jsx(rn.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Be(f?!1:!Fe),"data-testid":"arrow-button",children:j.jsx(wc,{className:se("h-5 w-5 ml-auto transition-transform","transform",Fe&&"rotate-180",Xe)})}),!f&&j.jsx(j.Fragment,{children:te?j.jsx(rn.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:j.jsx(Jn,{})}):(it??[]).length>0?j.jsx(rn.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:r,children:it.map((ue,Oe)=>j.jsx(rn.Option,{value:ue,className:se(ue[B]===y[B]?`${_} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${_}`),"data-testid":`select-${x}-${ue[B]}`,onClick:()=>$e(ue),children:j.jsxs("div",{className:"flex justify-between items-center",children:[j.jsxs("div",{className:"flex items-center",children:[ue.iconStart&&j.jsx("span",{className:"mr-2","aria-hidden":"true",children:ue.iconStart}),j.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ue[P]})]}),ue.iconEnd&&j.jsx("span",{className:"ml-2","aria-hidden":"true",children:ue.iconEnd})]})},Oe))}):j.jsx(rn.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:j.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),m.length>0&&a&&j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${x}`,children:m})]})},sd=({placeholder:t="",label:l="",htmlFor:r,name:n,handleChange:u,onClick:f=()=>{},value:a,valueSelect:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:k="on",id:R,classNameLabel:T="",classNameContainer:M="",className:$="",onKeyDown:P,options:B,idSelect:_,isMarginLeft:q=!0,classNameSelect:te="w-20",type:re="text"})=>{const{width:pe}=al(),Pe=mn({"ring-red-300 focus:ring-red-300 text-red-900":x,"focus:ring-indigo-600 text-gray-500":!x});return j.jsxs(j.Fragment,{children:[j.jsx("style",{children:`
|
|
95
|
+
`}),y.jsx(Yr.Button,{as:"div",onClick:()=>ye(ae),"data-testid":`menu-button-${oe}`,ref:We,children:e}),u.createPortal(y.jsx("div",{style:Le,className:x(s,ae&&"hidden",N&&"w-full"),children:y.jsx(Nn,{as:n.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",show:gt,children:y.jsx(Yr.Items,{className:x("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",N?"w-full":d===""&&"w-max",d!==""&&d),children:N?y.jsx("div",{className:"flex justify-center py-4",children:y.jsx(br,{})}):y.jsxs("div",{className:x(!z&&"pb-1",o!==""&&o,ze&&"w-custom"),"data-testid":"dropdown-menu",children:[y.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[A!==null&&y.jsx("div",{className:x("py-2 w-full",p),children:y.jsx(tl,{htmlFor:"search",id:`dropdown-search-${oe}`,name:"search",type:"text",placeholder:F,handleChange:ce=>A(ce,oe),icon:F!==""&&y.jsx(gm,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:D,onKeyDown:ce=>ce.key===" "&&ce.stopPropagation(),autocomplete:"off"})}),De!==null&&y.jsxs("div",{className:x("pt-1.5 justify-end flex items-center",p),children:[y.jsx(gr,{classNameButton:x("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",lt.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:zt,children:"Descartar"}),y.jsx(gr,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:lt.size===0&&_e?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:lt.size===0&&_e,onClick:()=>De({id:oe,items:Array.from(Rt.values())}),children:st})]})]}),ve&&!at&&y.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(Rt).map((ce,He)=>y.jsx("div",{className:"mr-1",children:y.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[ce[1][w],y.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>et(ce[1]),"data-testid":`tag-${ce[0]}`,children:y.jsx(jm,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},ce))}),y.jsx("div",{className:"divide-y divide-gray-100",children:(at?[]:i).map((ce,He)=>y.jsx("div",{className:x(!z&&"py-1",K&&He===0&&"sticky top-0"),children:z?y.jsx("div",{onClick:Ot=>{Ot.preventDefault(),g()},"data-testid":`item-component-${He}`,children:ce}):y.jsx(Yr.Item,{children:y.jsx("span",{className:x(lt.has(ce[O])&&"blue text-white",!lt.has(ce[O])&&"text-gray-700 hover:bg-gray-100 hover:text-gray-900","block px-4 py-2 text-13 lg:text-sm cursor-pointer font-normal"),"data-testid":`item-${He}`,onClick:Ot=>{Ot.preventDefault(),ne(ce)},children:Ln(ce[w])})})},He))})]})})})}),document.body)]})},Di=50,Gm=({total:e,handleNext:i,handlePrev:o,handleSelectPage:s,page:c=null})=>{const[d,p]=n.useState(1),[h,g]=n.useState([]),[w,O]=n.useState([]),I=Math.ceil(e/Di);n.useEffect(()=>{const F=[];for(let D=1;D<=I;D++)F.push(D);O(F)},[I]),n.useEffect(()=>{let F=[];const D="...",H="... ",z=" ...";if(w.length<6)F=w;else if(d>=1&&d<=3)F=[1,2,3,4,D,w.length];else if(d===4)F=[...w.slice(0,5),D,w.length];else if(d>4&&d<w.length-2){const K=w.slice(d-2,d),ae=w.slice(d,d+1);F=[1,H,...K,...ae,z,w.length]}else if(d>w.length-3){const K=w.slice(w.length-4);F=[1,H,...K]}g(F)},[d,w]),n.useEffect(()=>{c!==null&&c!==d&&p(c)},[c,d]);const L=F=>{p(F),s(F)},N=()=>{p(d===1?d:d-1),d>1&&o(d-1)},A=()=>{d===w.length?p(d):p(d+1),d<w.length&&i(d+1)};return y.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[y.jsx("div",{className:"-mt-px flex w-0 flex-1",children:y.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:N,"data-testid":"prev",children:[y.jsx(Kp,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),y.jsx("div",{className:"hidden md:-mt-px md:flex",children:h.map((F,D)=>y.jsx(Ri,{className:x("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",d===F?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>F!=="..."&&F!==" ..."&&F!=="... "&&L(F),id:`page-${D+1}`,children:F},D))}),y.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:y.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:A,"data-testid":"next",children:["Siguiente",y.jsx(Jp,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},qm=({setForm:e,setValuesDefault:i,className:o="",classNameContainer:s="",classNameContainerImg:c="",src:d=null,alt:p=null,width:h,height:g})=>{const w=O=>{const{files:I}=O.target,[L]=I,N=new FileReader;N.readAsDataURL(L),N.onload=function(){e(A=>({...A,photo:N.result})),i("photo",N.result)}};return y.jsxs("div",{className:x("col-span-full",s!==""&&s),children:[y.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:"Logo (Opcional)"}),y.jsxs("div",{className:x("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",d===null&&"px-9 pt-6 pb-2.5",c!==""&&c),children:[d?y.jsx("img",{src:d,alt:p,width:h,height:g,className:x(o!==""&&o),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:g},onLoad:O=>O.currentTarget.style.filter="none","data-testid":"img"}):y.jsxs("div",{className:"text-center",children:[y.jsx(wm,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),y.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[y.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:y.jsx("span",{children:"Upload a file"})}),y.jsx("p",{className:"pl-1",children:"or drag and drop"})]}),y.jsx("p",{className:"text-xs leading-5 text-gray-600",children:"PNG, JPG, GIF up to 10MB"})]}),y.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:w})]})]})},Km=({children:e,openDefault:i=!1,setForm:o,setValuesDefault:s,title:c,type:d,data:p,setData:h,id:g,defaultData:w,dispatch:O,isAdd:I=!0,search:L=null,isPadding:N=!0,isReadOnly:A=!1,isEdit:F=!1,deleteItem:D=null,validateAdd:H=null,loading:z=!1,internalEdit:K=!0,isDataEmpty:ae=!0,typeProp:oe="value",setAdd:he=null,hasNoRecords:Ve=!0,tabs:ze=null,selectTab:ve=null})=>{const[xe,Se]=n.useState(!1),[De,st]=n.useState(!1),[,ft]=n.useState(!1),[Y,at]=n.useState(""),[_e,gt]=n.useState(1);n.useEffect(()=>{Se(i),ft(A)},[i,A]);const ie=({e:Le,index:St})=>{const Ke=m(p),{name:At,value:ne}=Le.target;!(H!==null&&H({value:ne,copyData:Ke,index:St}))&&(Ke[St][At]=ne),h(Ke),s(g,Ke),o(ye=>({...ye,[g]:Ke}))},We=()=>{if(p.some(Le=>Object.values(Le).some(St=>St[oe]===-1))||p.length===0)return O({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});o(Le=>({...Le,data:p})),s(g,p),h([...p,w]),he&&he([...p,w])},lt=({index:Le,item:St})=>{if(p.length===1&&!F)return;const Ke=m(p);Ke.splice(Le,1),o(At=>({...At,data:Ke})),s(g,Ke),h(Ke),D&&D({index:Le,item:St,data:Ke}),Le===p.length-1&&F&&Ke.length===0&&(o(At=>({...At,data:Ke})),s(g,Ke),h([...Ke,w]))},Tt=()=>{st(!De),ft(!1)},Rt=()=>{if(p.length>1)return;if(p.length===0)return!0;const[Le]=p,{rol:St,privileges:Ke,limitedPrivileges:At,...ne}=Le;return Object.values(ne).every(ye=>Object.values(ye)[0]===-1)},yt=({tab:Le})=>{gt(Le.id),ve&&ve({tab:Le})};return y.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[y.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Se(!xe),"data-testid":`open-accordion-${g}`,children:[y.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:c}),y.jsxs("div",{className:"flex items-center",children:[L&&y.jsx(tl,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:Le=>{L(Le),at(Le.target.value)},icon:y.jsx(Dm,{className:"w-6 h-6 text-indigo-300"}),className:"h-9",classNameContainerInput:"w-52 2xs:w-64 max-w-64 mr-8 hidden sm:block",value:Y,onClick:Le=>Le.stopPropagation(),onFocus:()=>Se(!0)}),xe?y.jsx(Lm,{className:"w-5 h-5 text-default-5"}):y.jsx(Mm,{className:"w-5 h-5 text-default-5"})]})]}),y.jsx(Nn,{as:n.Fragment,show:xe,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y.jsxs("div",{children:[ze&&y.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:ze.map(Le=>y.jsx("span",{className:x(_e===Le.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":_e===Le.id?"page":void 0,onClick:()=>yt({tab:Le}),"data-testid":`tab-${Le.id}`,children:Le.name},Le.name))}),y.jsxs("div",{className:x("sm:mt-2.5 py-3.5 relative",N&&ze===null&&"px-4 sm:p-6",N&&ze!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[K&&!De&&y.jsx(xm,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:Tt,"data-testid":`edit-role-${g}`}),z&&y.jsx("div",{className:"flex justify-center mt-5",children:y.jsx(br,{})}),ae&&Rt()&&Ve&&!z&&(K?!De:!F)&&y.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!z&&p.map((Le,St)=>y.jsxs("div",{className:x("flex flex-col 3xs:flex-row mb-4",N&&"ml-0 3xs:ml-3"),children:[typeof e=="function"?e({item:Le,index:St,handleChange:ie,isEdit:K?De:F}):e,I&&(K?De:F)&&y.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:x("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",p.length===1&&!F&&"opacity-0"),children:y.jsx(_m,{className:x("w-6 h-4",(p.length>1||F)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>lt({index:St,item:Le}),"data-testid":`delete-item-${St}-${g}`})})]},St)),I&&(K?De:F)&&!z&&y.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:We,"data-testid":`add-item-${g}`,style:{width:"fit-content"},children:`+ Añadir ${d}`})]})]})})]})},Xm=({src:e,alt:i,width:o,height:s,className:c="",priority:d=!1,style:p={},id:h=""})=>{const[g,w]=n.useState(!1),O={filter:g?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...o?{width:o}:{},...s?{height:s}:{},...p};return y.jsx("img",{src:e,alt:i,...o?{width:o}:{},...s?{height:s}:{},className:x(c!==""&&c),loading:d?"eager":"lazy",decoding:"async",style:O,onLoad:()=>w(!0),"data-testid":`image-${h}`})};r.Accordion=Km,r.Alert=pm,r.Avatar=Tm,r.Bullets=Om,r.ButtonOutline=Mi,r.ButtonPagination=Ri,r.ButtonSolid=gr,r.Checkbox=Im,r.ConfirmationAbandoningCreation=Bm,r.CoverPhoto=qm,r.Divider=zm,r.Dropdown=Ym,r.GoBack=Wm,r.Image=Xm,r.Input=tl,r.InputDropdown=Um,r.MESSAGE_ABORT_CONTROLLER=R,r.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=T,r.Modal=Li,r.Pagination=Gm,r.Select=Ai,r.Spinner=Hm,r.SpinnerIcon=br,r.Switch=Vm,r.Textarea=Zm,r.Tooltip=el,r.classNames=x,r.copyOptions=m,r.generateAvatarInitials=E,r.isPromise=k,r.rowsPerPage=Di,r.useCloseModal=M,r.useForm=$,r.useMediaQuery=P,r.useWindowDimensions=B,r.validateEmail=v,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})})(Io,Io.exports);var ri=Io.exports;const ko=({className:t="",classNameContainer:l="",children:r,message:n="",style:u={}})=>{const[f,a]=b.useState(!1),[m,v]=b.useState({top:0,left:0}),x=b.useRef(null),E=()=>{if(n==="")return;const T=x.current.getBoundingClientRect();v({top:T.bottom+window.scrollY,left:T.left+window.scrollX}),a(!0)},k=()=>{a(!1)},R=j.jsx(Cn,{as:b.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",show:f,children:j.jsx("div",{className:ri.classNames("absolute z-40 px-4 mt-0 sm:px-0",t!==""&&t),style:{top:m.top,left:m.left,position:"absolute"},children:j.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:E,onMouseLeave:k,"data-testid":"message",children:typeof n=="object"?"":n})})});return j.jsxs(j.Fragment,{children:[j.jsx("div",{ref:x,className:ri.classNames("inline-block",l!==""&&l),onMouseEnter:E,onMouseLeave:k,"data-testid":"container-tooltip",style:u,children:r}),typeof window<"u"&&wr.createPortal(R,document.body)]})},Po=({placeholder:t="",label:l="",htmlFor:r,type:n="text",name:u,handleChange:f,onClick:a=()=>{},value:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:k="off",id:R,classNameLabel:T="",classNameContainerInput:M="",classNameContainer:$="",className:P="",icon:B=null,onKeyDown:_,onFocus:q,min:te,max:re,maxWidth:pe=5e3})=>{const[Pe,ke]=b.useState(!1),Te=mn({"ring-red-300 focus:ring-red-300 text-red-900":x||Pe,"focus:ring-indigo-600 text-gray-500":!x&&!Pe}),y=me=>{if(f&&f(me),n!=="email")return;const{value:Fe}=me.target,Be=sl(Fe);ke(!Be)};return j.jsxs("div",{"data-testid":`container-input-${R}`,className:$,children:[l!==""&&j.jsx("label",{htmlFor:r,className:se("block text-sm font-medium leading-6",!T.includes("mb-")&&"mb-0.5",T!==""?T:"text-gray-700"),"data-testid":`label-${R}`,children:l}),j.jsxs("div",{className:se("relative rounded-md",M!==""&&M),children:[j.jsx(ko,{className:"text-sm",classNameContainer:"w-full",message:n==="password"?"":m,children:j.jsx("input",{id:R,name:u,type:n,autoComplete:k,placeholder:t,onChange:y,onClick:a,onKeyDown:_,onFocus:q,value:m,readOnly:v,"data-testid":`input-${R}`,min:te,className:se("block w-full rounded-md border-0 py-1.5 shadow-sm placeholder-gray-300 ring-1 ring-gray-300 ring-inset focus:ring-1 focus:ring-inset text-sm sm:leading-6 truncate",Te,P!==""&&P),style:{maxWidth:`${pe}px`}})}),B!==null&&j.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:B}),x&&B===null&&j.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:j.jsx(Jl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${R}`,children:E})]})};function Jn({className:t="w-6 h-6",color:l="#3730a3"}){return j.jsxs("svg",{className:se("fill-current animate-spin",t),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:l,strokeWidth:"4",fill:"none"}),j.jsx("path",{fill:l,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}function id(){return j.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-0 w-full h-screen overflow-hidden bg-stone-600 opacity-75 flex flex-col items-center justify-center","data-testid":"spinner",style:{zIndex:60},children:[j.jsx("div",{className:"inline-block h-12 w-12 animate-[spinner-grow_0.75s_linear_infinite] rounded-full bg-current align-[-0.125em] opacity-0 motion-reduce:animate-[spinner-grow_1.5s_linear_infinite]",role:"status"}),j.jsx(Jn,{className:"w-8 h-8 animate-spin"})]})}const oi=({height:t="36px",style:l={},styleMenu:r={},label:n="",onChange:u,isReadOnly:f=!1,isError:a=!1,helperText:m="",name:v,id:x,className:E="",classNameLabel:k="",classNameInput:R="",options:T,value:M=-1,defaultValue:$={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:P="label",defaultId:B="value",bgOptionSelect:_="bg-indigo-600",isSearch:q=!1,loading:te=!1,isSingleOptionAndFirstLoad:re=!0,isTest:pe=!1})=>{const Pe=b.useRef(!0),[ke,Te]=b.useState(""),[y,me]=b.useState($),[Fe,Be]=b.useState(!1);b.useEffect(()=>{if((T==null?void 0:T.length)!==1||!Pe.current)return;Pe.current=!1;const[ue]=T,Oe=ue[B],Je=ue[P];me({value:Oe,label:Je}),re&&u({target:{value:ue,checked:!1,name:v,type:void 0,id:ue[B]}})},[T,B,P,u,v,re]),b.useEffect(()=>{if(M===-1||(T==null?void 0:T.length)===0)return;const ue=T==null?void 0:T.find(Oe=>Oe[B]===M);ue&&me(ue)},[M,T,B]),b.useEffect(()=>{M==="clear"&&(y[B]!==$[B]||y[P]!==$[P]||pe)&&me($)},[$,pe,y,M,B,P]);const it=ke===""?T:T.filter(ue=>ue[P].normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().includes(ke.toLowerCase())),U=mn({"ring-red-300 focus:ring-red-300 text-red-900":a&&!f,"text-gray-500":!a,"focus:ring-indigo-600":!a&&!f}),Xe=mn({"text-red-400":a&&!f,"text-gray-400":!a}),$e=ue=>{me(ue),u({target:{value:ue,checked:!1,name:v,type:void 0,id:ue[B]}})};return j.jsxs(rn,{as:"div",value:y,children:[j.jsx(rn.Label,{className:se("block text-sm font-medium leading-6 text-gray-500 mb-0.5",k!==""&&k),children:n}),j.jsxs("div",{className:se("relative",E!==""&&E),children:[j.jsx(ko,{className:"text-sm",classNameContainer:"w-full",message:y[P],children:j.jsxs(rn.Button,{className:"w-full","data-testid":`listbox-button-${x}`,children:[y.iconStart&&j.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:y.iconStart}),j.jsx(rn.Input,{className:se("w-full rounded-md border-0 bg-white py-1.5 pr-10 text-gray-900 shadow-sm ring-1 ring-gray-300 sm:text-sm sm:leading-6 truncate block",!a&&!f&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",f&&"focus:ring-gray-300",U,R!==""&&R),onChange:ue=>Te(ue.target.value.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),displayValue:ue=>{var Oe;return(Oe=ue[P])==null?void 0:Oe.trim()},autoComplete:"off",readOnly:!q||f,style:{height:t,...l},"data-testid":"input-search",onClick:()=>Be(f?!1:!Fe),onBlur:()=>Be(!1)})]})}),y.iconEnd&&j.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:y.iconEnd}),!f&&j.jsx(rn.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>Be(f?!1:!Fe),"data-testid":"arrow-button",children:j.jsx(wc,{className:se("h-5 w-5 ml-auto transition-transform","transform",Fe&&"rotate-180",Xe)})}),!f&&j.jsx(j.Fragment,{children:te?j.jsx(rn.Options,{className:"absolute z-10 mt-1 max-h-60 w-full rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex justify-center items-center py-2",children:j.jsx(Jn,{})}):(it??[]).length>0?j.jsx(rn.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden",style:r,children:it.map((ue,Oe)=>j.jsx(rn.Option,{value:ue,className:se(ue[B]===y[B]?`${_} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${_}`),"data-testid":`select-${x}-${ue[B]}`,onClick:()=>$e(ue),children:j.jsxs("div",{className:"flex justify-between items-center",children:[j.jsxs("div",{className:"flex items-center",children:[ue.iconStart&&j.jsx("span",{className:"mr-2","aria-hidden":"true",children:ue.iconStart}),j.jsx("span",{className:"font-normal hyphens-auto break-words overflow-hidden",children:ue[P]})]}),ue.iconEnd&&j.jsx("span",{className:"ml-2","aria-hidden":"true",children:ue.iconEnd})]})},Oe))}):j.jsx(rn.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm py-0.5 overflow-x-hidden flex justify-center items-center py-2",children:j.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),m.length>0&&a&&j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${x}`,children:m})]})},sd=({placeholder:t="",label:l="",htmlFor:r,name:n,handleChange:u,onClick:f=()=>{},value:a,valueSelect:m,isReadOnly:v=!1,isError:x=!1,helperText:E="",autocomplete:k="on",id:R,classNameLabel:T="",classNameContainer:M="",className:$="",onKeyDown:P,options:B,idSelect:_,isMarginLeft:q=!0,classNameSelect:te="w-20",type:re="text"})=>{const{width:pe}=al(),Pe=mn({"ring-red-300 focus:ring-red-300 text-red-900":x,"focus:ring-indigo-600 text-gray-500":!x});return j.jsxs(j.Fragment,{children:[j.jsx("style",{children:`
|
|
96
96
|
input[type="number"]::-webkit-inner-spin-button,
|
|
97
97
|
input[type="number"]::-webkit-outer-spin-button {
|
|
98
98
|
-webkit-appearance: none;
|
|
@@ -101,7 +101,7 @@ Check the top-level render call using <`+Q+">.")}return V}}function Vi(C,V){{if(
|
|
|
101
101
|
input[type="number"] {
|
|
102
102
|
-moz-appearance: textfield;
|
|
103
103
|
}
|
|
104
|
-
`}),j.jsxs("div",{"data-testid":`container-input-${R}`,className:M,children:[l!==""&&j.jsx("label",{htmlFor:r,className:se("block text-sm font-medium leading-6",T!==""?T:"text-gray-700"),"data-testid":`label-${R}`,children:l}),j.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[j.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:j.jsx(oi,{name:_,onChange:ke=>u(ke),id:_,options:B,value:m,isReadOnly:v,className:te,height:pe<=640?"28px":"32px",classNameInput:se(q&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),j.jsx("input",{id:R,name:n,type:re,autoComplete:k,placeholder:t,readOnly:v,"data-testid":`input-${R}`,onClick:f,onKeyDown:P,onChange:ke=>u(ke),value:a,className:se("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",Pe,$!==""&&$)}),x&&j.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:j.jsx(Jl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${R}`,children:E})]})]})},ad=({setValuesDefault:t,status:l=!1,isReadOnly:r=!1,handleClick:n,text:u="",updateStatus:f=!1,id:a="",isHiddenText:m=!1,setForm:v,handleChange:x,textActive:E="Activo",textInactive:k="Inactivo"})=>{const[R,T]=b.useState(!1);b.useEffect(()=>{T(l),t("status",l),v($=>({...$,status:l}))},[l,t,f,v]);const M=()=>{T(!R),t("status",!R),v($=>({...$,status:!R})),x({target:{checked:!R,value:!R,name:"status",type:"",id:""}}),n&&n()};return j.jsxs("div",{className:"flex",children:[j.jsxs(Ju,{checked:R,onChange:M,className:se("group relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-success-1 focus:ring-offset-2 mt-1",R?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${a}`,disabled:r,children:[j.jsx("span",{className:"sr-only",children:"Use setting"}),j.jsx("span",{"aria-hidden":"true",className:se("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",R?"translate-x-full":"translate-x-0")})]}),u!==""?j.jsx("p",{className:se("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),children:u}):j.jsx("p",{className:se("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),"data-testid":"text-switch",children:R?E:k})]})};function ud({label:t="",id:l,htmlFor:r="",classNameLabel:n="",className:u="",rows:f=4,name:a,placeholder:m="",helperText:v="",isReadOnly:x=!1,isError:E=!1,onChange:k,value:R,idInput:T,nameInput:M,placeholderInput:$="",isReadOnlyInput:P=!1,valueInput:B,infoTop:_=null,infoBottom:q=null,classNameInfoTop:te="h-4",classNameInfoBottom:re="h-2",isInputTitle:pe=!1,hiddenBorder:Pe=!1}){const ke=mn({"ring-red-300 focus:ring-red-300 text-red-900":E,"focus:ring-indigo-600 text-gray-700":!E});return j.jsxs(j.Fragment,{children:[t!==""&&j.jsx("label",{htmlFor:r,className:se("leading-6 block text-sm",n!==""&&n),children:t}),j.jsxs("div",{className:"relative overflow-x-hidden",children:[_!==null&&j.jsx("div",{className:"absolute top-2 left-3 w-full",children:_}),j.jsxs("div",{className:se("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-indigo-600 placeholder:text-gray-400 bg-white",ke),children:[_!==null&&j.jsx("div",{className:"py-2","aria-hidden":"true",children:j.jsx("div",{className:"py-px",children:j.jsx("div",{className:te})})}),pe&&j.jsx("textarea",{name:M,id:T,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:$,value:B,onChange:k,rows:2,readOnly:P}),j.jsx("textarea",{placeholder:m,rows:f,name:a,id:l,className:se(pe||Pe?"block w-full resize-none border-0 bg-transparent py-1.5 placeholder:text-gray-400 focus:ring-0":"block w-full rounded-md border-0 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset sm:leading-6",ke,u!==""&&u),readOnly:x,onChange:k,value:R,"data-testid":`textarea-${l}`}),q!==null&&j.jsx("div",{className:"py-2","aria-hidden":"true",children:j.jsx("div",{className:"py-px",children:j.jsx("div",{className:re})})})]}),q!==null&&j.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:q})]}),v.length>0&&E&&j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${l}`,children:v})]})}const cd=({children:t,data:l,className:r="",classNameTooltip:n="w-full",classNameMenu:u="",classNameMenuItems:f="",classNameContainerSearch:a="px-5",isSelectMultiple:m=!1,optionsSelect:v,propObject:x="name",propId:E="id",textNewItem:k="",defaultId:R=null,loading:T=!1,search:M=null,searchPlaceHolder:$="Buscar...",valueSearch:P=void 0,idsOptionSelect:B=null,isComponent:_,isSticky:q=!1,hiddenMenu:te=!1,id:re,onClick:pe=()=>{},isRelative:Pe=!0,isMaxWidth:ke=!1,isTag:Te=!1,isClear:y=!1,clear:me=null,applyButton:Fe=null,applyButtonText:Be="Aplicar",tagsParent:it=[],isClearTagsParent:U=!1,isReadOnly:Xe,isDisabledApplyButton:$e=!0,isOpenMenu:ue=void 0,onScroll:Oe=null})=>{const Je=b.useRef(null),Et=b.useRef(null),[ut,kt]=b.useState(new Set),[ht,Lt]=b.useState(new Map);b.useEffect(()=>{B!==null&&kt(new Set(new Set(B)))},[B]),b.useEffect(()=>{U&&Lt(new Map)},[U]),b.useEffect(()=>{if(it.length===0)return;const
|
|
104
|
+
`}),j.jsxs("div",{"data-testid":`container-input-${R}`,className:M,children:[l!==""&&j.jsx("label",{htmlFor:r,className:se("block text-sm font-medium leading-6",T!==""?T:"text-gray-700"),"data-testid":`label-${R}`,children:l}),j.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[j.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:j.jsx(oi,{name:_,onChange:ke=>u(ke),id:_,options:B,value:m,isReadOnly:v,className:te,height:pe<=640?"28px":"32px",classNameInput:se(q&&"ml-3.5"),style:{paddingRight:0,boxShadow:"none"},isDisabledFocus:!0})}),j.jsx("input",{id:R,name:n,type:re,autoComplete:k,placeholder:t,readOnly:v,"data-testid":`input-${R}`,onClick:f,onKeyDown:P,onChange:ke=>u(ke),value:a,className:se("block w-full rounded-md border-0 py-1.5 pl-24 shadow-sm placeholder-gray-300 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-1 focus:ring-inset text-sm sm:leading-6",Pe,$!==""&&$)}),x&&j.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:j.jsx(Jl,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),E.length===0||!x?null:j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${R}`,children:E})]})]})},ad=({setValuesDefault:t,status:l=!1,isReadOnly:r=!1,handleClick:n,text:u="",updateStatus:f=!1,id:a="",isHiddenText:m=!1,setForm:v,handleChange:x,textActive:E="Activo",textInactive:k="Inactivo"})=>{const[R,T]=b.useState(!1);b.useEffect(()=>{T(l),t("status",l),v($=>({...$,status:l}))},[l,t,f,v]);const M=()=>{T(!R),t("status",!R),v($=>({...$,status:!R})),x({target:{checked:!R,value:!R,name:"status",type:"",id:""}}),n&&n()};return j.jsxs("div",{className:"flex",children:[j.jsxs(Ju,{checked:R,onChange:M,className:se("group relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-success-1 focus:ring-offset-2 mt-1",R?"bg-success-1":"bg-gray-200"),"data-testid":`switch-${a}`,disabled:r,children:[j.jsx("span",{className:"sr-only",children:"Use setting"}),j.jsx("span",{"aria-hidden":"true",className:se("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",R?"translate-x-full":"translate-x-0")})]}),u!==""?j.jsx("p",{className:se("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),children:u}):j.jsx("p",{className:se("text-sm font-medium text-gray-500 ml-2 self-end",m&&"hidden"),"data-testid":"text-switch",children:R?E:k})]})};function ud({label:t="",id:l,htmlFor:r="",classNameLabel:n="",className:u="",rows:f=4,name:a,placeholder:m="",helperText:v="",isReadOnly:x=!1,isError:E=!1,onChange:k,value:R,idInput:T,nameInput:M,placeholderInput:$="",isReadOnlyInput:P=!1,valueInput:B,infoTop:_=null,infoBottom:q=null,classNameInfoTop:te="h-4",classNameInfoBottom:re="h-2",isInputTitle:pe=!1,hiddenBorder:Pe=!1}){const ke=mn({"ring-red-300 focus:ring-red-300 text-red-900":E,"focus:ring-indigo-600 text-gray-700":!E});return j.jsxs(j.Fragment,{children:[t!==""&&j.jsx("label",{htmlFor:r,className:se("leading-6 block text-sm",n!==""&&n),children:t}),j.jsxs("div",{className:"relative overflow-x-hidden",children:[_!==null&&j.jsx("div",{className:"absolute top-2 left-3 w-full",children:_}),j.jsxs("div",{className:se("overflow-hidden rounded-md shadow-sm ring-1 ring-inset ring-gray-300 focus-within:ring-2 focus-within:ring-indigo-600 placeholder:text-gray-400 bg-white",ke),children:[_!==null&&j.jsx("div",{className:"py-2","aria-hidden":"true",children:j.jsx("div",{className:"py-px",children:j.jsx("div",{className:te})})}),pe&&j.jsx("textarea",{name:M,id:T,className:"block w-full resize-none border-0 bg-transparent py-1.5 text-gray-400 placeholder:text-gray-400 focus:ring-0 text-sm",placeholder:$,value:B,onChange:k,rows:2,readOnly:P}),j.jsx("textarea",{placeholder:m,rows:f,name:a,id:l,className:se(pe||Pe?"block w-full resize-none border-0 bg-transparent py-1.5 placeholder:text-gray-400 focus:ring-0":"block w-full rounded-md border-0 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset sm:leading-6",ke,u!==""&&u),readOnly:x,onChange:k,value:R,"data-testid":`textarea-${l}`}),q!==null&&j.jsx("div",{className:"py-2","aria-hidden":"true",children:j.jsx("div",{className:"py-px",children:j.jsx("div",{className:re})})})]}),q!==null&&j.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:q})]}),v.length>0&&E&&j.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${l}`,children:v})]})}const cd=({children:t,data:l,className:r="",classNameTooltip:n="w-full",classNameMenu:u="",classNameMenuItems:f="",classNameContainerSearch:a="px-5",isSelectMultiple:m=!1,optionsSelect:v,propObject:x="name",propId:E="id",textNewItem:k="",defaultId:R=null,loading:T=!1,search:M=null,searchPlaceHolder:$="Buscar...",valueSearch:P=void 0,idsOptionSelect:B=null,isComponent:_,isSticky:q=!1,hiddenMenu:te=!1,id:re,onClick:pe=()=>{},isRelative:Pe=!0,isMaxWidth:ke=!1,isTag:Te=!1,isClear:y=!1,clear:me=null,applyButton:Fe=null,applyButtonText:Be="Aplicar",tagsParent:it=[],isClearTagsParent:U=!1,isReadOnly:Xe,isDisabledApplyButton:$e=!0,isOpenMenu:ue=void 0,onScroll:Oe=null})=>{const Je=b.useRef(null),Et=b.useRef(null),[ut,kt]=b.useState(new Set),[ht,Lt]=b.useState(new Map);b.useEffect(()=>{B!==null&&kt(new Set(new Set(B)))},[B]),b.useEffect(()=>{U&&Lt(new Map)},[U]),b.useEffect(()=>{if(it.length===0)return;const Z=new Map;it.forEach(ge=>Z.set(ge.id,ge)),Lt(Z)},[it]),b.useEffect(()=>{y&&(kt(new Set),Lt(new Map),me&&me())},[me,y]);const Ne=Z=>{let ge=new Map(ht),Ce=new Set(ut),Ie=null;if(R!==null&&(Z[E]===R&&(Ie=crypto.randomUUID()),Ie!==null&&(Z[E]=Ie),Ie!==null&&(Z[x]=Z[x].replace(k,"").trim())),Ce.has(Z[E])?Ce.delete(Z[E]):Ce.add(Z[E]),ge.has(Z[E])?ge.delete(Z[E]):ge.set(Z[E],Z),!m){const Pt=Array.from(Ce),Zt=Array.from(ge);Pt.shift(),Zt.shift(),Ce=Ce.size===2?new Set(Pt):Ce,ge=ge.size===2?new Map(Zt):ge}v(Z,Array.from(Ce),Ie!==null),kt(Ce),Lt(ge)},Qe=Z=>{pe(Z===!0?-1:re)},Ze=Z=>{const ge=new Set(ut),Ce=new Map(ht);ge.delete(Z[E]),Ce.delete(Z[E]),v(Z,Array.from(ge)),kt(ge),Lt(Ce)},le=()=>{if(ut.size===0)return;const Z=new Set(ut),ge=new Map(ht);Z.clear(),ge.clear(),v(null,Array.from(Z)),kt(Z),Lt(ge)};function Ee(Z){if(typeof Z!="string")return Z;const ge=Z.toLowerCase();return ge.charAt(0).toUpperCase()+ge.slice(1)}return j.jsxs(Pr,{as:"div",className:se("inline-block text-left",Pe&&"relative",u!==""&&u),onClick:()=>Qe(!0),"data-testid":`menu-${re}`,id:re,ref:Je,children:[j.jsx("style",{children:`
|
|
105
105
|
.blue {
|
|
106
106
|
background-color: #3758F9;
|
|
107
107
|
}
|
|
@@ -118,4 +118,4 @@ Check the top-level render call using <`+Q+">.")}return V}}function Vi(C,V){{if(
|
|
|
118
118
|
width: 414px;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
`}),j.jsx(Pr.Button,{as:"div",onClick:()=>Qe(te),"data-testid":`menu-button-${re}`,ref:Et,children:t}),j.jsx("div",{className:se("absolute right-0 z-20",n,te&&"hidden",T&&"w-full"),children:j.jsx(Cn,{as:b.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",show:ue,children:j.jsx(Pr.Items,{className:se("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",T?"w-full":f===""&&"w-max",f!==""&&f),children:T?j.jsx("div",{className:"flex justify-center py-4",children:j.jsx(Jn,{})}):j.jsxs("div",{className:se(!_&&"pb-1",r!==""&&r,ke&&"w-custom"),"data-testid":"dropdown-menu",onScroll:Oe,children:[j.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[M!==null&&j.jsx("div",{className:se("py-2 w-full",a),children:j.jsx(Po,{htmlFor:"search",id:`dropdown-search-${re}`,name:"search",type:"text",placeholder:$,handleChange:G=>M(G,re),icon:$!==""&&j.jsx(Rc,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:P,onKeyDown:G=>G.key===" "&&G.stopPropagation(),autocomplete:"off"})}),Fe!==null&&j.jsxs("div",{className:se("pt-1.5 justify-end flex items-center",a),children:[j.jsx(Xn,{classNameButton:se("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",ut.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:le,children:"Descartar"}),j.jsx(Xn,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:ut.size===0&&$e?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:ut.size===0&&$e,onClick:()=>Fe({id:re,items:Array.from(ht.values())}),children:Be})]})]}),Te&&!Xe&&j.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(ht).map((G,ge)=>j.jsx("div",{className:"mr-1",children:j.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[G[1][x],j.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Ze(G[1]),"data-testid":`tag-${G[0]}`,children:j.jsx(Wc,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},G))}),j.jsx("div",{className:"divide-y divide-gray-100",children:(Xe?[]:l).map((G,ge)=>j.jsx("div",{className:se(!_&&"py-1",q&&ge===0&&"sticky top-0"),children:_?j.jsx("div",{onClick:Ce=>{Ce.preventDefault(),v()},"data-testid":`item-component-${ge}`,children:G}):j.jsx(Pr.Item,{children:j.jsx("span",{className:se(ut.has(G[E])&&"blue text-white",!ut.has(G[E])&&"text-gray-700 hover:bg-gray-100 hover:text-gray-900","block px-4 py-2 text-13 lg:text-sm cursor-pointer font-normal"),"data-testid":`item-${ge}`,onClick:Ce=>{Ce.preventDefault(),Ne(G)},children:Ee(G[x])})})},ge))})]})})})})]})},li=50,dd=({total:t,handleNext:l,handlePrev:r,handleSelectPage:n,page:u=null,pageSize:f=li})=>{const[a,m]=b.useState(1),[v,x]=b.useState([]),[E,k]=b.useState([]),R=Math.ceil(t/f);b.useEffect(()=>{const P=[];for(let B=1;B<=R;B++)P.push(B);k(P)},[R]),b.useEffect(()=>{let P=[];const B="...",_="... ",q=" ...";if(E.length<6)P=E;else if(a>=1&&a<=3)P=[1,2,3,4,B,E.length];else if(a===4)P=[...E.slice(0,5),B,E.length];else if(a>4&&a<E.length-2){const te=E.slice(a-2,a),re=E.slice(a,a+1);P=[1,_,...te,...re,q,E.length]}else if(a>E.length-3){const te=E.slice(E.length-4);P=[1,_,...te]}x(P)},[a,E]),b.useEffect(()=>{u!==null&&u!==a&&m(u)},[u,a]);const T=P=>{m(P),n(P)},M=()=>{m(a===1?a:a-1),a>1&&r(a-1)},$=()=>{a===E.length?m(a):m(a+1),a<E.length&&l(a+1)};return j.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[j.jsx("div",{className:"-mt-px flex w-0 flex-1",children:j.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:M,"data-testid":"prev",children:[j.jsx(hc,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),j.jsx("div",{className:"hidden md:-mt-px md:flex",children:v.map((P,B)=>j.jsx(ti,{className:se("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",a===P?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>P!=="..."&&P!==" ..."&&P!=="... "&&T(P),id:`page-${B+1}`,children:P},B))}),j.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:j.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:$,"data-testid":"next",children:["Siguiente",j.jsx(gc,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},fd=({setForm:t,setValuesDefault:l,className:r="",classNameContainer:n="",classNameContainerImg:u="",src:f=null,alt:a=null,width:m,height:v,title:x="Logo (Opcional)",fileFormatsDescription:E="PNG, JPG, GIF up to 10MB"})=>{const k=f===null?"":f.split("."),R=T=>{const{files:M}=T.target,[$]=M,P=new FileReader;P.readAsDataURL($),P.onload=function(){$.type.startsWith("image/")?(t(_=>({..._,photo:P.result})),l("photo",P.result)):(t(_=>({..._,photo:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png"})),l("photo",P.result))}};return j.jsxs("div",{className:se("col-span-full",n!==""&&n),children:[j.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:x}),j.jsxs("div",{className:se("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",u!==""&&u),children:[f?j.jsx("img",{src:/(jpg|png|jpe?g|gif|webp|svg)$/i.test(k[k.length-1])||f.startsWith("data:image/")?f:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png",alt:a,width:m,height:v,className:se(r!==""&&r),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:v},onLoad:T=>T.currentTarget.style.filter="none","data-testid":"img"}):j.jsxs("div",{className:"text-center",children:[j.jsx($c,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),j.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[j.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:j.jsx("span",{children:"Subir un archivo"})}),j.jsx("p",{className:"pl-1",children:"o arrástralo y suéltalo aquí"})]}),j.jsx("p",{className:"text-xs leading-5 text-gray-600",children:E})]}),j.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:R})]})]})},pd=({children:t,openDefault:l=!1,setForm:r,setValuesDefault:n,title:u,type:f,data:a,setData:m,id:v,defaultData:x,showAlert:E,isAdd:k=!0,search:R=null,isPadding:T=!0,isReadOnly:M=!1,isEdit:$=!1,deleteItem:P=null,validateAdd:B=null,loading:_=!1,internalEdit:q=!0,isDataEmpty:te=!0,typeProp:re="value",setAdd:pe=null,hasNoRecords:Pe=!0,tabs:ke=null,selectTab:Te=null})=>{const[me,Fe]=b.useState(!1),[Be,it]=b.useState(!1),[,U]=b.useState(!1),[Xe,$e]=b.useState(""),[ue,Oe]=b.useState(1);b.useEffect(()=>{Fe(l),U(M)},[l,M]);const Je=({e:Ne,index:Qe})=>{const Ze=Xr(a),{name:le,value:Ee}=Ne.target;!(B===null?!1:B({value:Ee,copyData:Ze,index:Qe}))&&(Ze[Qe][le]=Ee),m(Ze),n(v,Ze),r(ge=>({...ge,[v]:Ze}))},Et=()=>{if(a.some(Qe=>Object.values(Qe).some(Ee=>Ee[re]===-1))||a.length===0)return E({title:"",message:"Todos los campos son requeridos",type:"warning"});r(Qe=>({...Qe,data:a})),n(v,a),m([...a,x]),pe&&pe([...a,x])},ut=({index:Ne,item:Qe})=>{if(a.length===1&&!$)return;let Ze=Xr(a);Ze.length===1&&(Ze=[x]),Ze.length>1&&Ze.splice(Ne,1),r(le=>({...le,data:Ze})),n(v,Ze),m(Ze),P&&P({index:Ne,item:Qe,data:Ze}),Ne===a.length-1&&$&&Ze.length===0&&(r(le=>({...le,data:Ze})),n(v,Ze),m([...Ze,x]))},kt=()=>{it(!Be),U(!1)},ht=()=>{if(a.length>1)return;if(a.length===0)return!0;const[Ne]=a;return!Ne||typeof Ne!="object"?!0:Object.keys(Ne).filter(le=>{const Ee=Ne[le];return Ee&&typeof Ee=="object"&&"value"in Ee}).every(le=>Ne[le].value===-1)},Lt=({tab:Ne})=>{Oe(Ne.id),Te&&Te({tab:Ne})};return j.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[j.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Fe(!me),"data-testid":`open-accordion-${v}`,children:[j.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:u}),j.jsxs("div",{className:"flex items-center",children:[R&&j.jsx(Po,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:Ne=>{R(Ne),$e(Ne.target.value)},icon:j.jsx(ed,{className:"w-6 h-6 text-indigo-300"}),className:"h-9",classNameContainerInput:"w-52 2xs:w-64 max-w-64 mr-8 hidden sm:block",value:Xe,onClick:Ne=>Ne.stopPropagation(),onFocus:()=>Fe(!0)}),me?j.jsx(Jc,{className:"w-5 h-5 text-default-5"}):j.jsx(Kc,{className:"w-5 h-5 text-default-5"})]})]}),j.jsx(Cn,{as:b.Fragment,show:me,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:j.jsxs("div",{children:[ke&&j.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:ke.map(Ne=>j.jsx("span",{className:se(ue===Ne.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":ue===Ne.id?"page":void 0,onClick:()=>Lt({tab:Ne}),"data-testid":`tab-${Ne.id}`,children:Ne.name},Ne.name))}),j.jsxs("div",{className:se("sm:mt-2.5 py-3.5 relative",T&&ke===null&&"px-4 sm:p-6",T&&ke!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[q&&!Be&&j.jsx(Ac,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:kt,"data-testid":`edit-role-${v}`}),_&&j.jsx("div",{className:"flex justify-center mt-5",children:j.jsx(Jn,{})}),te&&ht()&&Pe&&!_&&(q?!Be:!$)&&j.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!_&&a.map((Ne,Qe)=>j.jsxs("div",{className:se("flex flex-col 3xs:flex-row mb-4",T&&"ml-0 3xs:ml-3"),children:[typeof t=="function"?t({item:Ne,index:Qe,handleChange:Je,isEdit:q?Be:$}):t,k&&(q?Be:$)&&j.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:se("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",a.length===1&&!$&&"opacity-0"),children:j.jsx(nd,{className:se("w-6 h-4",(a.length>1||$)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>ut({index:Qe,item:Ne}),"data-testid":`delete-item-${Qe}-${v}`})})]},Qe)),k&&(q?Be:$)&&!_&&j.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:Et,"data-testid":`add-item-${v}`,style:{width:"fit-content"},children:`+ Añadir ${f}`})]})]})})]})},md=({src:t,alt:l,width:r,height:n,className:u="",priority:f=!1,style:a={},id:m=""})=>{const[v,x]=b.useState(!1),E={filter:v?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...r?{width:r}:{},...n?{height:n}:{},...a};return j.jsx("img",{src:t,alt:l,...r?{width:r}:{},...n?{height:n}:{},className:se(u!==""&&u),loading:f?"eager":"lazy",decoding:"async",style:E,onLoad:()=>x(!0),"data-testid":`image-${m}`})};je.Accordion=pd,je.Alert=kc,je.Avatar=Hc,je.Bullets=Uc,je.ButtonOutline=ei,je.ButtonPagination=ti,je.ButtonSolid=Xn,je.Checkbox=Zc,je.ConfirmationAbandoningCreation=rd,je.CoverPhoto=fd,je.Divider=od,je.Dropdown=cd,je.GoBack=ld,je.Image=md,je.Input=Po,je.InputDropdown=sd,je.MESSAGE_ABORT_CONTROLLER=Ji,je.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Qi,je.Modal=ni,je.Pagination=dd,je.Select=oi,je.Spinner=id,je.SpinnerIcon=Jn,je.Switch=ad,je.Textarea=ud,je.Tooltip=ko,je.classNames=se,je.copyOptions=Xr,je.generateAvatarInitials=Ki,je.isPromise=Xi,je.rowsPerPage=li,je.useCloseModal=es,je.useForm=ts,je.useMediaQuery=ns,je.useWindowDimensions=al,je.validateEmail=sl,Object.defineProperty(je,Symbol.toStringTag,{value:"Module"})});
|
|
121
|
+
`}),j.jsx(Pr.Button,{as:"div",onClick:()=>Qe(te),"data-testid":`menu-button-${re}`,ref:Et,children:t}),j.jsx("div",{className:se("absolute right-0 z-20",n,te&&"hidden",T&&"w-full"),children:j.jsx(Cn,{as:b.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",show:ue,children:j.jsxs(Pr.Items,{className:se("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",T?"w-full":f===""&&"w-max",f!==""&&f),children:[console.log("onScroll:",Oe),T?j.jsx("div",{className:"flex justify-center py-4",children:j.jsx(Jn,{})}):j.jsxs("div",{className:se(!_&&"pb-1",r!==""&&r,ke&&"w-custom"),"data-testid":"dropdown-menu",onScroll:Z=>{Oe(Z),console.log("!!!!!!!")},children:[j.jsxs("div",{className:"sticky top-0 bg-white w-full",children:[M!==null&&j.jsx("div",{className:se("py-2 w-full",a),children:j.jsx(Po,{htmlFor:"search",id:`dropdown-search-${re}`,name:"search",type:"text",placeholder:$,handleChange:Z=>M(Z,re),icon:$!==""&&j.jsx(Rc,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:P,onKeyDown:Z=>Z.key===" "&&Z.stopPropagation(),autocomplete:"off"})}),Fe!==null&&j.jsxs("div",{className:se("pt-1.5 justify-end flex items-center",a),children:[j.jsx(Xn,{classNameButton:se("bg-gray-400 hover:bg-gray-400 font-medium px-2 py-1.5 rounded-md",ut.size>0?"opacity-1 cursor-pointer":"opacity-0 cursor-default"),outline:"",classNameText:"text-xs text-white text-center",id:"delete",onClick:le,children:"Descartar"}),j.jsx(Xn,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-2 py-1.5 rounded-md",outline:ut.size===0&&$e?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-xs text-white text-center",id:"apply",disabled:ut.size===0&&$e,onClick:()=>Fe({id:re,items:Array.from(ht.values())}),children:Be})]})]}),Te&&!Xe&&j.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(ht).map((Z,ge)=>j.jsx("div",{className:"mr-1",children:j.jsxs("span",{className:"inline-flex items-center gap-x-0.5 rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-600 mb-1",children:[Z[1][x],j.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Ze(Z[1]),"data-testid":`tag-${Z[0]}`,children:j.jsx(Wc,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},Z))}),j.jsx("div",{className:"divide-y divide-gray-100",children:(Xe?[]:l).map((Z,ge)=>j.jsx("div",{className:se(!_&&"py-1",q&&ge===0&&"sticky top-0"),children:_?j.jsx("div",{onClick:Ce=>{Ce.preventDefault(),v()},"data-testid":`item-component-${ge}`,children:Z}):j.jsx(Pr.Item,{children:j.jsx("span",{className:se(ut.has(Z[E])&&"blue text-white",!ut.has(Z[E])&&"text-gray-700 hover:bg-gray-100 hover:text-gray-900","block px-4 py-2 text-13 lg:text-sm cursor-pointer font-normal"),"data-testid":`item-${ge}`,onClick:Ce=>{Ce.preventDefault(),Ne(Z)},children:Ee(Z[x])})})},ge))})]})]})})})]})},li=50,dd=({total:t,handleNext:l,handlePrev:r,handleSelectPage:n,page:u=null,pageSize:f=li})=>{const[a,m]=b.useState(1),[v,x]=b.useState([]),[E,k]=b.useState([]),R=Math.ceil(t/f);b.useEffect(()=>{const P=[];for(let B=1;B<=R;B++)P.push(B);k(P)},[R]),b.useEffect(()=>{let P=[];const B="...",_="... ",q=" ...";if(E.length<6)P=E;else if(a>=1&&a<=3)P=[1,2,3,4,B,E.length];else if(a===4)P=[...E.slice(0,5),B,E.length];else if(a>4&&a<E.length-2){const te=E.slice(a-2,a),re=E.slice(a,a+1);P=[1,_,...te,...re,q,E.length]}else if(a>E.length-3){const te=E.slice(E.length-4);P=[1,_,...te]}x(P)},[a,E]),b.useEffect(()=>{u!==null&&u!==a&&m(u)},[u,a]);const T=P=>{m(P),n(P)},M=()=>{m(a===1?a:a-1),a>1&&r(a-1)},$=()=>{a===E.length?m(a):m(a+1),a<E.length&&l(a+1)};return j.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[j.jsx("div",{className:"-mt-px flex w-0 flex-1",children:j.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pr-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:M,"data-testid":"prev",children:[j.jsx(hc,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),j.jsx("div",{className:"hidden md:-mt-px md:flex",children:v.map((P,B)=>j.jsx(ti,{className:se("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",a===P?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>P!=="..."&&P!==" ..."&&P!=="... "&&T(P),id:`page-${B+1}`,children:P},B))}),j.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:j.jsxs("span",{className:"inline-flex items-center border-t-2 border-transparent pl-1 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 cursor-pointer",onClick:$,"data-testid":"next",children:["Siguiente",j.jsx(gc,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},fd=({setForm:t,setValuesDefault:l,className:r="",classNameContainer:n="",classNameContainerImg:u="",src:f=null,alt:a=null,width:m,height:v,title:x="Logo (Opcional)",fileFormatsDescription:E="PNG, JPG, GIF up to 10MB"})=>{const k=f===null?"":f.split("."),R=T=>{const{files:M}=T.target,[$]=M,P=new FileReader;P.readAsDataURL($),P.onload=function(){$.type.startsWith("image/")?(t(_=>({..._,photo:P.result})),l("photo",P.result)):(t(_=>({..._,photo:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png"})),l("photo",P.result))}};return j.jsxs("div",{className:se("col-span-full",n!==""&&n),children:[j.jsx("label",{htmlFor:"cover-photo",className:"block text-sm font-medium leading-6 text-gray-500",children:x}),j.jsxs("div",{className:se("mt-2 flex justify-center rounded-lg border-2 border-dotted border-gray-300 cursor-pointer relative",u!==""&&u),children:[f?j.jsx("img",{src:/(jpg|png|jpe?g|gif|webp|svg)$/i.test(k[k.length-1])||f.startsWith("data:image/")?f:"https://cdn.pixabay.com/photo/2017/03/08/21/21/file-2127833_1280.png",alt:a,width:m,height:v,className:se(r!==""&&r),loading:"lazy",decoding:"async",style:{filter:"blur(5px)",transition:"filter 0.3s",objectFit:"contain",height:v},onLoad:T=>T.currentTarget.style.filter="none","data-testid":"img"}):j.jsxs("div",{className:"text-center",children:[j.jsx($c,{"aria-hidden":"true",className:"mx-auto h-12 w-12 text-gray-300"}),j.jsxs("div",{className:"mt-4 flex text-sm leading-6 text-gray-600",children:[j.jsx("label",{htmlFor:"file-upload",className:"relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500",children:j.jsx("span",{children:"Subir un archivo"})}),j.jsx("p",{className:"pl-1",children:"o arrástralo y suéltalo aquí"})]}),j.jsx("p",{className:"text-xs leading-5 text-gray-600",children:E})]}),j.jsx("input",{id:"file-upload",name:"file-upload",type:"file",className:"absolute w-full h-full opacity-0 cursor-pointer",onChange:R})]})]})},pd=({children:t,openDefault:l=!1,setForm:r,setValuesDefault:n,title:u,type:f,data:a,setData:m,id:v,defaultData:x,showAlert:E,isAdd:k=!0,search:R=null,isPadding:T=!0,isReadOnly:M=!1,isEdit:$=!1,deleteItem:P=null,validateAdd:B=null,loading:_=!1,internalEdit:q=!0,isDataEmpty:te=!0,typeProp:re="value",setAdd:pe=null,hasNoRecords:Pe=!0,tabs:ke=null,selectTab:Te=null})=>{const[me,Fe]=b.useState(!1),[Be,it]=b.useState(!1),[,U]=b.useState(!1),[Xe,$e]=b.useState(""),[ue,Oe]=b.useState(1);b.useEffect(()=>{Fe(l),U(M)},[l,M]);const Je=({e:Ne,index:Qe})=>{const Ze=Xr(a),{name:le,value:Ee}=Ne.target;!(B===null?!1:B({value:Ee,copyData:Ze,index:Qe}))&&(Ze[Qe][le]=Ee),m(Ze),n(v,Ze),r(ge=>({...ge,[v]:Ze}))},Et=()=>{if(a.some(Qe=>Object.values(Qe).some(Ee=>Ee[re]===-1))||a.length===0)return E({title:"",message:"Todos los campos son requeridos",type:"warning"});r(Qe=>({...Qe,data:a})),n(v,a),m([...a,x]),pe&&pe([...a,x])},ut=({index:Ne,item:Qe})=>{if(a.length===1&&!$)return;let Ze=Xr(a);Ze.length===1&&(Ze=[x]),Ze.length>1&&Ze.splice(Ne,1),r(le=>({...le,data:Ze})),n(v,Ze),m(Ze),P&&P({index:Ne,item:Qe,data:Ze}),Ne===a.length-1&&$&&Ze.length===0&&(r(le=>({...le,data:Ze})),n(v,Ze),m([...Ze,x]))},kt=()=>{it(!Be),U(!1)},ht=()=>{if(a.length>1)return;if(a.length===0)return!0;const[Ne]=a;return!Ne||typeof Ne!="object"?!0:Object.keys(Ne).filter(le=>{const Ee=Ne[le];return Ee&&typeof Ee=="object"&&"value"in Ee}).every(le=>Ne[le].value===-1)},Lt=({tab:Ne})=>{Oe(Ne.id),Te&&Te({tab:Ne})};return j.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[j.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>Fe(!me),"data-testid":`open-accordion-${v}`,children:[j.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:u}),j.jsxs("div",{className:"flex items-center",children:[R&&j.jsx(Po,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:Ne=>{R(Ne),$e(Ne.target.value)},icon:j.jsx(ed,{className:"w-6 h-6 text-indigo-300"}),className:"h-9",classNameContainerInput:"w-52 2xs:w-64 max-w-64 mr-8 hidden sm:block",value:Xe,onClick:Ne=>Ne.stopPropagation(),onFocus:()=>Fe(!0)}),me?j.jsx(Jc,{className:"w-5 h-5 text-default-5"}):j.jsx(Kc,{className:"w-5 h-5 text-default-5"})]})]}),j.jsx(Cn,{as:b.Fragment,show:me,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:j.jsxs("div",{children:[ke&&j.jsx("nav",{className:"flex justify-center border-b border-gray-200","aria-label":"Tabs",children:ke.map(Ne=>j.jsx("span",{className:se(ue===Ne.id?"border-indigo-500 text-gray-900":"border-gray-300 text-gray-500 hover:border-indigo-500","whitespace-nowrap border-b-2 py-2.5 px-2 text-sm font-medium cursor-pointer"),"aria-current":ue===Ne.id?"page":void 0,onClick:()=>Lt({tab:Ne}),"data-testid":`tab-${Ne.id}`,children:Ne.name},Ne.name))}),j.jsxs("div",{className:se("sm:mt-2.5 py-3.5 relative",T&&ke===null&&"px-4 sm:p-6",T&&ke!==null&&"px-4 sm:px-6 sm:pb-6 sm:pt-2.5"),children:[q&&!Be&&j.jsx(Ac,{className:"w-5 h-5 text-gray-400 cursor-pointer absolute right-4",onClick:kt,"data-testid":`edit-role-${v}`}),_&&j.jsx("div",{className:"flex justify-center mt-5",children:j.jsx(Jn,{})}),te&&ht()&&Pe&&!_&&(q?!Be:!$)&&j.jsx("p",{className:"text-gray-800 text-center","data-testid":"records-empty",children:"No hay registros para mostrar"}),!_&&a.map((Ne,Qe)=>j.jsxs("div",{className:se("flex flex-col 3xs:flex-row mb-4",T&&"ml-0 3xs:ml-3"),children:[typeof t=="function"?t({item:Ne,index:Qe,handleChange:Je,isEdit:q?Be:$}):t,k&&(q?Be:$)&&j.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:se("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",a.length===1&&!$&&"opacity-0"),children:j.jsx(nd,{className:se("w-6 h-4",(a.length>1||$)&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>ut({index:Qe,item:Ne}),"data-testid":`delete-item-${Qe}-${v}`})})]},Qe)),k&&(q?Be:$)&&!_&&j.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:Et,"data-testid":`add-item-${v}`,style:{width:"fit-content"},children:`+ Añadir ${f}`})]})]})})]})},md=({src:t,alt:l,width:r,height:n,className:u="",priority:f=!1,style:a={},id:m=""})=>{const[v,x]=b.useState(!1),E={filter:v?"none":"blur(10px)",transition:"filter 0.3s ease-out",objectFit:"cover",...r?{width:r}:{},...n?{height:n}:{},...a};return j.jsx("img",{src:t,alt:l,...r?{width:r}:{},...n?{height:n}:{},className:se(u!==""&&u),loading:f?"eager":"lazy",decoding:"async",style:E,onLoad:()=>x(!0),"data-testid":`image-${m}`})};je.Accordion=pd,je.Alert=kc,je.Avatar=Hc,je.Bullets=Uc,je.ButtonOutline=ei,je.ButtonPagination=ti,je.ButtonSolid=Xn,je.Checkbox=Zc,je.ConfirmationAbandoningCreation=rd,je.CoverPhoto=fd,je.Divider=od,je.Dropdown=cd,je.GoBack=ld,je.Image=md,je.Input=Po,je.InputDropdown=sd,je.MESSAGE_ABORT_CONTROLLER=Ji,je.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Qi,je.Modal=ni,je.Pagination=dd,je.Select=oi,je.Spinner=id,je.SpinnerIcon=Jn,je.Switch=ad,je.Textarea=ud,je.Tooltip=ko,je.classNames=se,je.copyOptions=Xr,je.generateAvatarInitials=Ki,je.isPromise=Xi,je.rowsPerPage=li,je.useCloseModal=es,je.useForm=ts,je.useMediaQuery=ns,je.useWindowDimensions=al,je.validateEmail=sl,Object.defineProperty(je,Symbol.toStringTag,{value:"Module"})});
|