cemtrik-dependencies 1.0.21 → 1.0.22

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -21
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(_,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],a):(_=typeof globalThis<"u"?globalThis:_||self,a(_.MyApp={},_.React,_.ReactDOM))})(this,function(_,a,dn){"use strict";function Sr(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const C=Sr(a),Ct=e=>{function n(r){if(typeof r!="object"||r===null)return r;const o=Array.isArray(r)?[]:{};for(const i in r)r.hasOwnProperty(i)&&(o[i]=n(r[i]));return o}return e.map(r=>n(r))},fn=e=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(e);function N(...e){return e.filter(Boolean).join(" ")}const Tr=e=>typeof e!="string"&&Promise.resolve(e)instanceof Promise,Cr="The user aborted a request.",Or="signal is aborted without reason",jr=({id:e,close:n,isPathsTest:t=!1})=>{const r=a.useCallback(o=>{o.some(l=>l.getAttribute===void 0?!1:l.getAttribute("id")===e)||n()},[n,e]);a.useEffect(()=>{const o=i=>{const l=i.composedPath();l===void 0||t||r(l)};return window.addEventListener("click",o),()=>{window.removeEventListener("click",o)}},[r,t])},Ir=()=>{const[e,n]=a.useState({}),[t,r]=a.useState({}),[o,i]=a.useState([]),l=h=>b=>{b.preventDefault(),b.stopPropagation(),h(e)},s=(h,b,p)=>{const{checked:g,value:v,name:x,type:S,id:w}=h.target,T={radio:w,checkbox:g};n({...e,[x]:T[S]??v}),b({...p,[x]:T[S]??v})},u=a.useCallback((h,b)=>{n(p=>({...p,[h]:b}))},[]),d=a.useCallback((h,b)=>{const p=b.filter(g=>h[g]===""||h[g]===void 0);return p.forEach(g=>r(v=>({...v,[g]:"Este campo es requerido"}))),i(p),p.length>0},[]);return{handleSubmit:l,handleChange:s,setValuesDefault:u,validateFields:d,errors:o,model:e,handleError:(h,b)=>{b.forEach(p=>r(g=>({...g,[p]:h}))),i(b)},messageError:t,setModel:n}},kr=e=>{const[n,t]=a.useState(!0),[r,o]=a.useState(!1),i=a.useCallback((l,s)=>{const u=e.match(/[0-9]+/g);if(u===null)return;const[d]=u;s=Math.min(window.innerWidth,window.outerWidth);const f=l?s>=Number(d):s<=Number(d);o(f)},[e]);return a.useEffect(()=>{const l=/\(min-width:\s?[0-9]+px\)/gi.test(e),s=/\(max-width:\s?[0-9]+px\)/gi.test(e);if(!l&&!s&&t(!1),!l&&!s)return;const u=Math.min(window.innerWidth,window.outerWidth);i(l,u)},[e,i]),a.useEffect(()=>{if(!n)return;const l=Math.min(window.innerWidth,window.outerWidth);function s(){const u=/min-width/gi.test(e);i(u,l)}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[n,e,i]),r},Ot=()=>{const[e,n]=a.useState({width:0,height:0});return a.useEffect(()=>{const t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight);n({width:t,height:r})},[]),a.useEffect(()=>{let t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight);const o=()=>{t=Math.min(window.innerWidth,window.outerWidth),r=Math.min(window.innerHeight,window.outerHeight),n({width:t,height:r})};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e};function Fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jt={exports:{}},Ye={};/**
1
+ (function(E,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("@headlessui/react")):typeof define=="function"&&define.amd?define(["exports","react","@headlessui/react"],m):(E=typeof globalThis<"u"?globalThis:E||self,m(E.MyApp={},E.React,E.react))})(this,function(E,m,L){"use strict";function it(r){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const i in r)if(i!=="default"){const a=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(n,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}return n.default=r,Object.freeze(n)}const u=it(m),Ce=r=>{function n(a){if(typeof a!="object"||a===null)return a;const c=Array.isArray(a)?[]:{};for(const s in a)a.hasOwnProperty(s)&&(c[s]=n(a[s]));return c}return r.map(a=>n(a))},Me=r=>/^(?:[^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*|"[^\n"]+")@(?:[^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,63}$/i.test(r);function v(...r){return r.filter(Boolean).join(" ")}const lt=r=>typeof r!="string"&&Promise.resolve(r)instanceof Promise,ot="The user aborted a request.",ct="signal is aborted without reason",ut=({id:r,close:n,isPathsTest:i=!1})=>{const a=m.useCallback(c=>{c.some(o=>o.getAttribute===void 0?!1:o.getAttribute("id")===r)||n()},[n,r]);m.useEffect(()=>{const c=s=>{const o=s.composedPath();o===void 0||i||a(o)};return window.addEventListener("click",c),()=>{window.removeEventListener("click",c)}},[a,i])},dt=()=>{const[r,n]=m.useState({}),[i,a]=m.useState({}),[c,s]=m.useState([]),o=y=>x=>{x.preventDefault(),x.stopPropagation(),y(r)},h=(y,x,C)=>{const{checked:F,value:b,name:_,type:$,id:k}=y.target,R={radio:k,checkbox:F};n({...r,[_]:R[$]??b}),x({...C,[_]:R[$]??b})},f=m.useCallback((y,x)=>{n(C=>({...C,[y]:x}))},[]),p=m.useCallback((y,x)=>{const C=x.filter(F=>y[F]===""||y[F]===void 0);return C.forEach(F=>a(b=>({...b,[F]:"Este campo es requerido"}))),s(C),C.length>0},[]);return{handleSubmit:o,handleChange:h,setValuesDefault:f,validateFields:p,errors:c,model:r,handleError:(y,x)=>{x.forEach(C=>a(F=>({...F,[C]:y}))),s(x)},messageError:i,setModel:n}},ft=r=>{const[n,i]=m.useState(!0),[a,c]=m.useState(!1),s=m.useCallback((o,h)=>{const f=r.match(/[0-9]+/g);if(f===null)return;const[p]=f;h=Math.min(window.innerWidth,window.outerWidth);const g=o?h>=Number(p):h<=Number(p);c(g)},[r]);return m.useEffect(()=>{const o=/\(min-width:\s?[0-9]+px\)/gi.test(r),h=/\(max-width:\s?[0-9]+px\)/gi.test(r);if(!o&&!h&&i(!1),!o&&!h)return;const f=Math.min(window.innerWidth,window.outerWidth);s(o,f)},[r,s]),m.useEffect(()=>{if(!n)return;const o=Math.min(window.innerWidth,window.outerWidth);function h(){const f=/min-width/gi.test(r);s(f,o)}return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[n,r,s]),a},Ne=()=>{const[r,n]=m.useState({width:0,height:0});return m.useEffect(()=>{const i=Math.min(window.innerWidth,window.outerWidth),a=Math.min(window.innerHeight,window.outerHeight);n({width:i,height:a})},[]),m.useEffect(()=>{let i=Math.min(window.innerWidth,window.outerWidth),a=Math.min(window.innerHeight,window.outerHeight);const c=()=>{i=Math.min(window.innerWidth,window.outerWidth),a=Math.min(window.innerHeight,window.outerHeight),n({width:i,height:a})};return window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),r};function mt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ke={exports:{}},de={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var mn;function Nr(){if(mn)return Ye;mn=1;var e=a,n=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(s,u,d){var f,h={},b=null,p=null;d!==void 0&&(b=""+d),u.key!==void 0&&(b=""+u.key),u.ref!==void 0&&(p=u.ref);for(f in u)r.call(u,f)&&!i.hasOwnProperty(f)&&(h[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:n,type:s,key:b,ref:p,props:h,_owner:o.current}}return Ye.Fragment=t,Ye.jsx=l,Ye.jsxs=l,Ye}var qe={};/**
9
+ */var Pe;function ht(){if(Pe)return de;Pe=1;var r=m,n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(h,f,p){var g,y={},x=null,C=null;p!==void 0&&(x=""+p),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(C=f.ref);for(g in f)a.call(f,g)&&!s.hasOwnProperty(g)&&(y[g]=f[g]);if(h&&h.defaultProps)for(g in f=h.defaultProps,f)y[g]===void 0&&(y[g]=f[g]);return{$$typeof:n,type:h,key:x,ref:C,props:y,_owner:c.current}}return de.Fragment=i,de.jsx=o,de.jsxs=o,de}var fe={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,36 +14,30 @@
14
14
  *
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
- */var pn;function $r(){return pn||(pn=1,process.env.NODE_ENV!=="production"&&function(){var e=a,n=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function x(c){if(c===null||typeof c!="object")return null;var y=g&&c[g]||c[v];return typeof y=="function"?y:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(c){{for(var y=arguments.length,j=new Array(y>1?y-1:0),M=1;M<y;M++)j[M-1]=arguments[M];T("error",c,j)}}function T(c,y,j){{var M=S.ReactDebugCurrentFrame,J=M.getStackAddendum();J!==""&&(y+="%s",j=j.concat([J]));var ne=j.map(function(V){return String(V)});ne.unshift("Warning: "+y),Function.prototype.apply.call(console[c],console,ne)}}var O=!1,k=!1,F=!1,z=!1,Y=!1,D;D=Symbol.for("react.module.reference");function A(c){return!!(typeof c=="string"||typeof c=="function"||c===r||c===i||Y||c===o||c===d||c===f||z||c===p||O||k||F||typeof c=="object"&&c!==null&&(c.$$typeof===b||c.$$typeof===h||c.$$typeof===l||c.$$typeof===s||c.$$typeof===u||c.$$typeof===D||c.getModuleId!==void 0))}function R(c,y,j){var M=c.displayName;if(M)return M;var J=y.displayName||y.name||"";return J!==""?j+"("+J+")":j}function Z(c){return c.displayName||"Context"}function re(c){if(c==null)return null;if(typeof c.tag=="number"&&w("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 r:return"Fragment";case t:return"Portal";case i:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case s:var y=c;return Z(y)+".Consumer";case l:var j=c;return Z(j._context)+".Provider";case u:return R(c,c.render,"ForwardRef");case h:var M=c.displayName||null;return M!==null?M:re(c.type)||"Memo";case b:{var J=c,ne=J._payload,V=J._init;try{return re(V(ne))}catch{return null}}}return null}var L=Object.assign,E=0,ae,H,se,G,ee,me,ge;function Ce(){}Ce.__reactDisabledLog=!0;function be(){{if(E===0){ae=console.log,H=console.info,se=console.warn,G=console.error,ee=console.group,me=console.groupCollapsed,ge=console.groupEnd;var c={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}E++}}function $(){{if(E--,E===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},c,{value:ae}),info:L({},c,{value:H}),warn:L({},c,{value:se}),error:L({},c,{value:G}),group:L({},c,{value:ee}),groupCollapsed:L({},c,{value:me}),groupEnd:L({},c,{value:ge})})}E<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=S.ReactCurrentDispatcher,te;function we(c,y,j){{if(te===void 0)try{throw Error()}catch(J){var M=J.stack.trim().match(/\n( *(at )?)/);te=M&&M[1]||""}return`
18
- `+te+c}}var P=!1,U;{var B=typeof WeakMap=="function"?WeakMap:Map;U=new B}function pe(c,y){if(!c||P)return"";{var j=U.get(c);if(j!==void 0)return j}var M;P=!0;var J=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ne;ne=K.current,K.current=null,be();try{if(y){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(ye){M=ye}Reflect.construct(c,[],V)}else{try{V.call()}catch(ye){M=ye}c.call(V.prototype)}}else{try{throw Error()}catch(ye){M=ye}c()}}catch(ye){if(ye&&M&&typeof ye.stack=="string"){for(var W=ye.stack.split(`
19
- `),xe=M.stack.split(`
20
- `),de=W.length-1,fe=xe.length-1;de>=1&&fe>=0&&W[de]!==xe[fe];)fe--;for(;de>=1&&fe>=0;de--,fe--)if(W[de]!==xe[fe]){if(de!==1||fe!==1)do if(de--,fe--,fe<0||W[de]!==xe[fe]){var Se=`
21
- `+W[de].replace(" at new "," at ");return c.displayName&&Se.includes("<anonymous>")&&(Se=Se.replace("<anonymous>",c.displayName)),typeof c=="function"&&U.set(c,Se),Se}while(de>=1&&fe>=0);break}}}finally{P=!1,K.current=ne,$(),Error.prepareStackTrace=J}var Ve=c?c.displayName||c.name:"",Be=Ve?we(Ve):"";return typeof c=="function"&&U.set(c,Be),Be}function he(c,y,j){return pe(c,!1)}function He(c){var y=c.prototype;return!!(y&&y.isReactComponent)}function St(c,y,j){if(c==null)return"";if(typeof c=="function")return pe(c,He(c));if(typeof c=="string")return we(c);switch(c){case d:return we("Suspense");case f:return we("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case u:return he(c.render);case h:return St(c.type,y,j);case b:{var M=c,J=M._payload,ne=M._init;try{return St(ne(J),y,j)}catch{}}}return""}var it=Object.prototype.hasOwnProperty,cr={},dr=S.ReactDebugCurrentFrame;function Tt(c){if(c){var y=c._owner,j=St(c.type,c._source,y?y.type:null);dr.setExtraStackFrame(j)}else dr.setExtraStackFrame(null)}function _s(c,y,j,M,J){{var ne=Function.call.bind(it);for(var V in c)if(ne(c,V)){var W=void 0;try{if(typeof c[V]!="function"){var xe=Error((M||"React class")+": "+j+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw xe.name="Invariant Violation",xe}W=c[V](y,V,M,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(de){W=de}W&&!(W instanceof Error)&&(Tt(J),w("%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).",M||"React class",j,V,typeof W),Tt(null)),W instanceof Error&&!(W.message in cr)&&(cr[W.message]=!0,Tt(J),w("Failed %s type: %s",j,W.message),Tt(null))}}}var Rs=Array.isArray;function on(c){return Rs(c)}function Bs(c){{var y=typeof Symbol=="function"&&Symbol.toStringTag,j=y&&c[Symbol.toStringTag]||c.constructor.name||"Object";return j}}function zs(c){try{return fr(c),!1}catch{return!0}}function fr(c){return""+c}function mr(c){if(zs(c))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Bs(c)),fr(c)}var lt=S.ReactCurrentOwner,Ws={key:!0,ref:!0,__self:!0,__source:!0},pr,hr,ln;ln={};function Hs(c){if(it.call(c,"ref")){var y=Object.getOwnPropertyDescriptor(c,"ref").get;if(y&&y.isReactWarning)return!1}return c.ref!==void 0}function Us(c){if(it.call(c,"key")){var y=Object.getOwnPropertyDescriptor(c,"key").get;if(y&&y.isReactWarning)return!1}return c.key!==void 0}function Vs(c,y){if(typeof c.ref=="string"&&lt.current&&y&&lt.current.stateNode!==y){var j=re(lt.current.type);ln[j]||(w('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',re(lt.current.type),c.ref),ln[j]=!0)}}function Ys(c,y){{var j=function(){pr||(pr=!0,w("%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)",y))};j.isReactWarning=!0,Object.defineProperty(c,"key",{get:j,configurable:!0})}}function qs(c,y){{var j=function(){hr||(hr=!0,w("%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)",y))};j.isReactWarning=!0,Object.defineProperty(c,"ref",{get:j,configurable:!0})}}var Ks=function(c,y,j,M,J,ne,V){var W={$$typeof:n,type:c,key:y,ref:j,props:V,_owner:ne};return W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(W,"_self",{configurable:!1,enumerable:!1,writable:!1,value:M}),Object.defineProperty(W,"_source",{configurable:!1,enumerable:!1,writable:!1,value:J}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W};function Gs(c,y,j,M,J){{var ne,V={},W=null,xe=null;j!==void 0&&(mr(j),W=""+j),Us(y)&&(mr(y.key),W=""+y.key),Hs(y)&&(xe=y.ref,Vs(y,J));for(ne in y)it.call(y,ne)&&!Ws.hasOwnProperty(ne)&&(V[ne]=y[ne]);if(c&&c.defaultProps){var de=c.defaultProps;for(ne in de)V[ne]===void 0&&(V[ne]=de[ne])}if(W||xe){var fe=typeof c=="function"?c.displayName||c.name||"Unknown":c;W&&Ys(V,fe),xe&&qs(V,fe)}return Ks(c,W,xe,J,M,lt.current,V)}}var sn=S.ReactCurrentOwner,vr=S.ReactDebugCurrentFrame;function Ue(c){if(c){var y=c._owner,j=St(c.type,c._source,y?y.type:null);vr.setExtraStackFrame(j)}else vr.setExtraStackFrame(null)}var an;an=!1;function un(c){return typeof c=="object"&&c!==null&&c.$$typeof===n}function gr(){{if(sn.current){var c=re(sn.current.type);if(c)return`
17
+ */var Le;function xt(){return Le||(Le=1,process.env.NODE_ENV!=="production"&&function(){var r=m,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),h=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),F=Symbol.iterator,b="@@iterator";function _(e){if(e===null||typeof e!="object")return null;var l=F&&e[F]||e[b];return typeof l=="function"?l:null}var $=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(e){{for(var l=arguments.length,d=new Array(l>1?l-1:0),w=1;w<l;w++)d[w-1]=arguments[w];R("error",e,d)}}function R(e,l,d){{var w=$.ReactDebugCurrentFrame,A=w.getStackAddendum();A!==""&&(l+="%s",d=d.concat([A]));var P=d.map(function(T){return String(T)});P.unshift("Warning: "+l),Function.prototype.apply.call(console[e],console,P)}}var N=!1,B=!1,I=!1,Z=!1,U=!1,G;G=Symbol.for("react.module.reference");function J(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===s||U||e===c||e===p||e===g||Z||e===C||N||B||I||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===y||e.$$typeof===o||e.$$typeof===h||e.$$typeof===f||e.$$typeof===G||e.getModuleId!==void 0))}function ee(e,l,d){var w=e.displayName;if(w)return w;var A=l.displayName||l.name||"";return A!==""?d+"("+A+")":d}function X(e){return e.displayName||"Context"}function Y(e){if(e==null)return null;if(typeof e.tag=="number"&&k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case i:return"Portal";case s:return"Profiler";case c:return"StrictMode";case p:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case h:var l=e;return X(l)+".Consumer";case o:var d=e;return X(d._context)+".Provider";case f:return ee(e,e.render,"ForwardRef");case y:var w=e.displayName||null;return w!==null?w:Y(e.type)||"Memo";case x:{var A=e,P=A._payload,T=A._init;try{return Y(T(P))}catch{return null}}}return null}var O=Object.assign,V=0,we,te,ne,ae,se,be,me;function ye(){}ye.__reactDisabledLog=!0;function Te(){{if(V===0){we=console.log,te=console.info,ne=console.warn,ae=console.error,se=console.group,be=console.groupCollapsed,me=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function j(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},e,{value:we}),info:O({},e,{value:te}),warn:O({},e,{value:ne}),error:O({},e,{value:ae}),group:O({},e,{value:se}),groupCollapsed:O({},e,{value:be}),groupEnd:O({},e,{value:me})})}V<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var M=$.ReactCurrentDispatcher,W;function Q(e,l,d){{if(W===void 0)try{throw Error()}catch(A){var w=A.stack.trim().match(/\n( *(at )?)/);W=w&&w[1]||""}return`
18
+ `+W+e}}var oe=!1,ie;{var mr=typeof WeakMap=="function"?WeakMap:Map;ie=new mr}function Ve(e,l){if(!e||oe)return"";{var d=ie.get(e);if(d!==void 0)return d}var w;oe=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var P;P=M.current,M.current=null,Te();try{if(l){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(q){w=q}Reflect.construct(e,[],T)}else{try{T.call()}catch(q){w=q}e.call(T.prototype)}}else{try{throw Error()}catch(q){w=q}e()}}catch(q){if(q&&w&&typeof q.stack=="string"){for(var S=q.stack.split(`
19
+ `),H=w.stack.split(`
20
+ `),D=S.length-1,z=H.length-1;D>=1&&z>=0&&S[D]!==H[z];)z--;for(;D>=1&&z>=0;D--,z--)if(S[D]!==H[z]){if(D!==1||z!==1)do if(D--,z--,z<0||S[D]!==H[z]){var K=`
21
+ `+S[D].replace(" at new "," at ");return e.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",e.displayName)),typeof e=="function"&&ie.set(e,K),K}while(D>=1&&z>=0);break}}}finally{oe=!1,M.current=P,j(),Error.prepareStackTrace=A}var ue=e?e.displayName||e.name:"",le=ue?Q(ue):"";return typeof e=="function"&&ie.set(e,le),le}function hr(e,l,d){return Ve(e,!1)}function xr(e){var l=e.prototype;return!!(l&&l.isReactComponent)}function je(e,l,d){if(e==null)return"";if(typeof e=="function")return Ve(e,xr(e));if(typeof e=="string")return Q(e);switch(e){case p:return Q("Suspense");case g:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return hr(e.render);case y:return je(e.type,l,d);case x:{var w=e,A=w._payload,P=w._init;try{return je(P(A),l,d)}catch{}}}return""}var he=Object.prototype.hasOwnProperty,He={},Ge=$.ReactDebugCurrentFrame;function Ee(e){if(e){var l=e._owner,d=je(e.type,e._source,l?l.type:null);Ge.setExtraStackFrame(d)}else Ge.setExtraStackFrame(null)}function pr(e,l,d,w,A){{var P=Function.call.bind(he);for(var T in e)if(P(e,T)){var S=void 0;try{if(typeof e[T]!="function"){var H=Error((w||"React class")+": "+d+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw H.name="Invariant Violation",H}S=e[T](l,T,w,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(D){S=D}S&&!(S instanceof Error)&&(Ee(A),k("%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).",w||"React class",d,T,typeof S),Ee(null)),S instanceof Error&&!(S.message in He)&&(He[S.message]=!0,Ee(A),k("Failed %s type: %s",d,S.message),Ee(null))}}}var gr=Array.isArray;function _e(e){return gr(e)}function vr(e){{var l=typeof Symbol=="function"&&Symbol.toStringTag,d=l&&e[Symbol.toStringTag]||e.constructor.name||"Object";return d}}function wr(e){try{return qe(e),!1}catch{return!0}}function qe(e){return""+e}function Je(e){if(wr(e))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",vr(e)),qe(e)}var xe=$.ReactCurrentOwner,br={key:!0,ref:!0,__self:!0,__source:!0},Ke,Xe,Re;Re={};function yr(e){if(he.call(e,"ref")){var l=Object.getOwnPropertyDescriptor(e,"ref").get;if(l&&l.isReactWarning)return!1}return e.ref!==void 0}function jr(e){if(he.call(e,"key")){var l=Object.getOwnPropertyDescriptor(e,"key").get;if(l&&l.isReactWarning)return!1}return e.key!==void 0}function Er(e,l){if(typeof e.ref=="string"&&xe.current&&l&&xe.current.stateNode!==l){var d=Y(xe.current.type);Re[d]||(k('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',Y(xe.current.type),e.ref),Re[d]=!0)}}function Cr(e,l){{var d=function(){Ke||(Ke=!0,k("%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)",l))};d.isReactWarning=!0,Object.defineProperty(e,"key",{get:d,configurable:!0})}}function Nr(e,l){{var d=function(){Xe||(Xe=!0,k("%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)",l))};d.isReactWarning=!0,Object.defineProperty(e,"ref",{get:d,configurable:!0})}}var kr=function(e,l,d,w,A,P,T){var S={$$typeof:n,type:e,key:l,ref:d,props:T,_owner:P};return S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(S,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(S,"_source",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S};function Sr(e,l,d,w,A){{var P,T={},S=null,H=null;d!==void 0&&(Je(d),S=""+d),jr(l)&&(Je(l.key),S=""+l.key),yr(l)&&(H=l.ref,Er(l,A));for(P in l)he.call(l,P)&&!br.hasOwnProperty(P)&&(T[P]=l[P]);if(e&&e.defaultProps){var D=e.defaultProps;for(P in D)T[P]===void 0&&(T[P]=D[P])}if(S||H){var z=typeof e=="function"?e.displayName||e.name||"Unknown":e;S&&Cr(T,z),H&&Nr(T,z)}return kr(e,S,H,A,w,xe.current,T)}}var Oe=$.ReactCurrentOwner,Qe=$.ReactDebugCurrentFrame;function ce(e){if(e){var l=e._owner,d=je(e.type,e._source,l?l.type:null);Qe.setExtraStackFrame(d)}else Qe.setExtraStackFrame(null)}var Fe;Fe=!1;function Ae(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function et(){{if(Oe.current){var e=Y(Oe.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+c+"`."}return""}}function Zs(c){return""}var br={};function Js(c){{var y=gr();if(!y){var j=typeof c=="string"?c:c.displayName||c.name;j&&(y=`
23
+ Check the render method of \``+e+"`."}return""}}function Tr(e){return""}var tt={};function _r(e){{var l=et();if(!l){var d=typeof e=="string"?e:e.displayName||e.name;d&&(l=`
24
24
 
25
- Check the top-level render call using <`+j+">.")}return y}}function xr(c,y){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var j=Js(y);if(br[j])return;br[j]=!0;var M="";c&&c._owner&&c._owner!==sn.current&&(M=" It was passed a child from "+re(c._owner.type)+"."),Ue(c),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',j,M),Ue(null)}}function wr(c,y){{if(typeof c!="object")return;if(on(c))for(var j=0;j<c.length;j++){var M=c[j];un(M)&&xr(M,y)}else if(un(c))c._store&&(c._store.validated=!0);else if(c){var J=x(c);if(typeof J=="function"&&J!==c.entries)for(var ne=J.call(c),V;!(V=ne.next()).done;)un(V.value)&&xr(V.value,y)}}}function Qs(c){{var y=c.type;if(y==null||typeof y=="string")return;var j;if(typeof y=="function")j=y.propTypes;else if(typeof y=="object"&&(y.$$typeof===u||y.$$typeof===h))j=y.propTypes;else return;if(j){var M=re(y);_s(j,c.props,"prop",M,c)}else if(y.PropTypes!==void 0&&!an){an=!0;var J=re(y);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",J||"Unknown")}typeof y.getDefaultProps=="function"&&!y.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xs(c){{for(var y=Object.keys(c.props),j=0;j<y.length;j++){var M=y[j];if(M!=="children"&&M!=="key"){Ue(c),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M),Ue(null);break}}c.ref!==null&&(Ue(c),w("Invalid attribute `ref` supplied to `React.Fragment`."),Ue(null))}}var yr={};function Er(c,y,j,M,J,ne){{var V=A(c);if(!V){var W="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(W+=" 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 xe=Zs();xe?W+=xe:W+=gr();var de;c===null?de="null":on(c)?de="array":c!==void 0&&c.$$typeof===n?(de="<"+(re(c.type)||"Unknown")+" />",W=" Did you accidentally export a JSX literal instead of a component?"):de=typeof c,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",de,W)}var fe=Gs(c,y,j,J,ne);if(fe==null)return fe;if(V){var Se=y.children;if(Se!==void 0)if(M)if(on(Se)){for(var Ve=0;Ve<Se.length;Ve++)wr(Se[Ve],c);Object.freeze&&Object.freeze(Se)}else w("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 wr(Se,c)}if(it.call(y,"key")){var Be=re(c),ye=Object.keys(y).filter(function(ia){return ia!=="key"}),cn=ye.length>0?"{key: someKey, "+ye.join(": ..., ")+": ...}":"{key: someKey}";if(!yr[Be+cn]){var oa=ye.length>0?"{"+ye.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+d+">.")}return l}}function rt(e,l){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var d=_r(l);if(tt[d])return;tt[d]=!0;var w="";e&&e._owner&&e._owner!==Oe.current&&(w=" It was passed a child from "+Y(e._owner.type)+"."),ce(e),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,w),ce(null)}}function nt(e,l){{if(typeof e!="object")return;if(_e(e))for(var d=0;d<e.length;d++){var w=e[d];Ae(w)&&rt(w,l)}else if(Ae(e))e._store&&(e._store.validated=!0);else if(e){var A=_(e);if(typeof A=="function"&&A!==e.entries)for(var P=A.call(e),T;!(T=P.next()).done;)Ae(T.value)&&rt(T.value,l)}}}function Rr(e){{var l=e.type;if(l==null||typeof l=="string")return;var d;if(typeof l=="function")d=l.propTypes;else if(typeof l=="object"&&(l.$$typeof===f||l.$$typeof===y))d=l.propTypes;else return;if(d){var w=Y(l);pr(d,e.props,"prop",w,e)}else if(l.PropTypes!==void 0&&!Fe){Fe=!0;var A=Y(l);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A||"Unknown")}typeof l.getDefaultProps=="function"&&!l.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Or(e){{for(var l=Object.keys(e.props),d=0;d<l.length;d++){var w=l[d];if(w!=="children"&&w!=="key"){ce(e),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",w),ce(null);break}}e.ref!==null&&(ce(e),k("Invalid attribute `ref` supplied to `React.Fragment`."),ce(null))}}var at={};function st(e,l,d,w,A,P){{var T=J(e);if(!T){var S="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(S+=" 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 H=Tr();H?S+=H:S+=et();var D;e===null?D="null":_e(e)?D="array":e!==void 0&&e.$$typeof===n?(D="<"+(Y(e.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):D=typeof e,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",D,S)}var z=Sr(e,l,d,A,P);if(z==null)return z;if(T){var K=l.children;if(K!==void 0)if(w)if(_e(K)){for(var ue=0;ue<K.length;ue++)nt(K[ue],e);Object.freeze&&Object.freeze(K)}else k("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 nt(K,e)}if(he.call(l,"key")){var le=Y(e),q=Object.keys(l).filter(function(Lr){return Lr!=="key"}),$e=q.length>0?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}";if(!at[le+$e]){var Pr=q.length>0?"{"+q.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,cn,Be,oa,Be),yr[Be+cn]=!0}}return c===r?Xs(fe):Qs(fe),fe}}function ea(c,y,j){return Er(c,y,j,!0)}function ta(c,y,j){return Er(c,y,j,!1)}var na=ta,ra=ea;qe.Fragment=r,qe.jsx=na,qe.jsxs=ra}()),qe}process.env.NODE_ENV==="production"?jt.exports=Nr():jt.exports=$r();var m=jt.exports;function Ke(e,n,t){let r=t.initialDeps??[],o;return()=>{var i,l,s,u;let d;t.key&&((i=t.debug)!=null&&i.call(t))&&(d=Date.now());const f=e();if(!(f.length!==r.length||f.some((p,g)=>r[g]!==p)))return o;r=f;let b;if(t.key&&((l=t.debug)!=null&&l.call(t))&&(b=Date.now()),o=n(...f),t.key&&((s=t.debug)!=null&&s.call(t))){const p=Math.round((Date.now()-d)*100)/100,g=Math.round((Date.now()-b)*100)/100,v=g/16,x=(S,w)=>{for(S=String(S);S.length<w;)S=" "+S;return S};console.info(`%c⏱ ${x(g,5)} /${x(p,5)} ms`,`
31
- font-size: .6rem;
32
- font-weight: bold;
33
- color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(u=t==null?void 0:t.onChange)==null||u.call(t,o),o}}function It(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const Pr=(e,n)=>Math.abs(e-n)<1,Mr=(e,n,t)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,o),t)}},Ar=e=>e,Dr=e=>{const n=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=n;o<=t;o++)r.push(o);return r},Lr=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const o=l=>{const{width:s,height:u}=l;n({width:Math.round(s),height:Math.round(u)})};if(o(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(l=>{const s=l[0];if(s!=null&&s.borderBoxSize){const u=s.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(t.getBoundingClientRect())});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},hn={passive:!0},_r=typeof window>"u"?!0:"onscrollend"in window,Rr=(e,n)=>{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;let o=0;const i=_r?()=>{}:Mr(r,()=>{n(o,!1)},e.options.isScrollingResetDelay),l=d=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],i(),n(o,d)},s=l(!0),u=l(!1);return u(),t.addEventListener("scroll",s,hn),t.addEventListener("scrollend",u,hn),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",u)}},Br=(e,n,t)=>{if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},zr=(e,{adjustments:n=0,behavior:t},r)=>{var o,i;const l=e+n;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:l,behavior:t})};class Wr{constructor(n){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 t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,o])=>{typeof o>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ar,rangeExtractor:Dr,onChange:()=>{},measureElement:Br,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,r)=>{var o,i;const{startIndex:l,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},u=this.calculateRange();(t||l!==(u==null?void 0:u.startIndex)||s!==(u==null?void 0:u.endIndex))&&((i=(o=this.options).onChange)==null||i.call(o,this,r))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.notify(!1,!1);return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o;const l=this.isScrolling;this.isScrolling=i,this.notify(l!==i,i)}))}},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=(t,r)=>{const o=new Map,i=new Map;for(let l=r-1;l>=0;l--){const s=t[l];if(o.has(s.lane))continue;const u=i.get(s.lane);if(u==null||s.end>u.end?i.set(s.lane,s):s.end<u.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((l,s)=>l.end===s.end?l.index-s.index:l.end-s.end)[0]:void 0},this.getMeasurementOptions=Ke(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,o,i,l)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l}),{key:!1}),this.getMeasurements=Ke(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:o,getItemKey:i,enabled:l},s)=>{var u;if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const f=this.measurementsCache.slice(0,d);for(let h=d;h<t;h++){let b=(u=this.measurementsCache[h])==null?void 0:u.measureElement;b||(b=O=>{const k=i(h),F=this.elementsCache.get(k);if(!O){F&&(this.observer.unobserve(F),this.elementsCache.delete(k));return}F!==O&&(F&&this.observer.unobserve(F),this.observer.observe(O),this.elementsCache.set(k,O)),O.isConnected&&this.resizeItem(h,this.options.measureElement(O,void 0,this))});const p=i(h),g=this.options.lanes===1?f[h-1]:this.getFurthestMeasurement(f,h),v=g?g.end+this.options.gap:r+o,x=s.get(p),S=typeof x=="number"?x:this.options.estimateSize(h),w=v+S,T=g?g.lane:h%this.options.lanes;f[h]={index:h,start:v,size:S,end:w,key:p,lane:T,measureElement:b}}return this.measurementsCache=f,f},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ke(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,r,o)=>this.range=t.length>0&&r>0?Hr({measurements:t,outerSize:r,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Ke(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,r,o,i)=>r===null?[]:t({startIndex:r.startIndex,endIndex:r.endIndex,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,o=t.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const o=this.indexFromElement(t),i=this.getMeasurements()[o];if(!i||!t.isConnected){this.elementsCache.forEach((s,u)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(u))});return}const l=this.elementsCache.get(i.key);l!==t&&(l&&this.observer.unobserve(l),this.observer.observe(t),this.elementsCache.set(i.key,t)),this.resizeItem(o,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const o=this.getMeasurements()[t];if(!o)return;const i=this.itemSizeCache.get(o.key)??o.size,l=r-i;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,l,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",l),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=Ke(()=>[this.getIndexes(),this.getMeasurements()],(t,r)=>{const o=[];for(let i=0,l=t.length;i<l;i++){const s=t[i],u=r[s];o.push(u)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length!==0)return It(r[vn(0,r.length-1,o=>It(r[o]).start,t)])},this.getOffsetForAlignment=(t,r)=>{const o=this.getSize(),i=this.getScrollOffset();r==="auto"&&(t<=i?r="start":t>=i+o?r="end":r="start"),r==="start"?t=t:r==="end"?t=t-o:r==="center"&&(t=t-o/2);const l=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[l]:this.scrollElement[l]:0)-o;return Math.max(Math.min(u,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.getMeasurements()[t];if(!o)return;const i=this.getSize(),l=this.getScrollOffset();if(r==="auto")if(o.end>=l+i-this.options.scrollPaddingEnd)r="end";else if(o.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:r="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(t,r);if(!i)return;const[l,s]=i;this._scrollToOffset(l,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[d]=It(this.getOffsetForIndex(t,s));Pr(d,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=r[r.length-1])==null?void 0:t.end)??0:Math.max(...r.slice(-this.options.lanes).map(i=>i.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:r,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:r},this)},this.measure=()=>{var t,r;this.itemSizeCache=new Map,(r=(t=this.options).onChange)==null||r.call(t,this,!1)},this.setOptions(n)}}const vn=(e,n,t,r)=>{for(;e<=n;){const o=(e+n)/2|0,i=t(o);if(i<r)e=o+1;else if(i>r)n=o-1;else return o}return e>0?e-1:0};function Hr({measurements:e,outerSize:n,scrollOffset:t}){const r=e.length-1,i=vn(0,r,s=>e[s].start,t);let l=i;for(;l<r&&e[l].end<t+n;)l++;return{startIndex:i,endIndex:l}}const Ur=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Vr(e){const n=C.useReducer(()=>({}),{})[1],t={...e,onChange:(o,i)=>{var l;i?dn.flushSync(n):n(),(l=e.onChange)==null||l.call(e,o,i)}},[r]=C.useState(()=>new Wr(t));return r.setOptions(t),C.useEffect(()=>r._didMount(),[]),Ur(()=>r._willUpdate()),r}function Yr(e){return Vr({observeElementRect:Lr,observeElementOffset:Rr,scrollToFn:zr,...e})}var qr=Object.defineProperty,Kr=(e,n,t)=>n in e?qr(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,kt=(e,n,t)=>(Kr(e,typeof n!="symbol"?n+"":n,t),t);let Gr=class{constructor(){kt(this,"current",this.detect()),kt(this,"handoffState","pending"),kt(this,"currentId",0)}set(n){this.current!==n&&(this.handoffState="pending",this.currentId=0,this.current=n)}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"}},je=new Gr,Q=(e,n)=>{je.isServer?a.useEffect(e,n):a.useLayoutEffect(e,n)};function Te(e){let n=a.useRef(e);return Q(()=>{n.current=e},[e]),n}function Ft(e,n){let[t,r]=a.useState(e),o=Te(e);return Q(()=>r(o.current),[o,r,...n]),t}let I=function(e){let n=Te(e);return a.useCallback((...t)=>n.current(...t),[n])};function gn(e,n,t){let[r,o]=a.useState(t),i=e!==void 0,l=a.useRef(i),s=a.useRef(!1),u=a.useRef(!1);return i&&!l.current&&!s.current?(s.current=!0,l.current=i,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.")):!i&&l.current&&!u.current&&(u.current=!0,l.current=i,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.")),[i?e:r,I(d=>(i||o(d),n==null?void 0:n(d)))]}function st(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function Ee(){let e=[],n={addEventListener(t,r,o,i){return t.addEventListener(r,o,i),n.add(()=>t.removeEventListener(r,o,i))},requestAnimationFrame(...t){let r=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(r))},nextFrame(...t){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(...t){let r=setTimeout(...t);return n.add(()=>clearTimeout(r))},microTask(...t){let r={current:!0};return st(()=>{r.current&&t[0]()}),n.add(()=>{r.current=!1})},style(t,r,o){let i=t.style.getPropertyValue(r);return Object.assign(t.style,{[r]:o}),this.add(()=>{Object.assign(t.style,{[r]:i})})},group(t){let r=Ee();return t(r),this.add(()=>r.dispose())},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let t of e.splice(0))t()}};return n}function Ie(){let[e]=a.useState(Ee);return a.useEffect(()=>()=>e.dispose(),[e]),e}function Zr(){let e=typeof document>"u";return"useSyncExternalStore"in C?(n=>n.useSyncExternalStore)(C)(()=>()=>{},()=>!1,()=>!e):!1}function ze(){let e=Zr(),[n,t]=C.useState(je.isHandoffComplete);return n&&je.isHandoffComplete===!1&&t(!1),C.useEffect(()=>{n!==!0&&t(!0)},[n]),C.useEffect(()=>je.handoff(),[]),e?!1:n}var bn;let ve=(bn=a.useId)!=null?bn:function(){let e=ze(),[n,t]=a.useState(e?()=>je.nextId():null);return Q(()=>{n===null&&t(je.nextId())},[n]),n!=null?""+n:void 0};function le(e,n,...t){if(e in n){let o=n[e];return typeof o=="function"?o(...t):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,le),r}function at(e){return je.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Nt=["[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 ke=(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))(ke||{}),xn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(xn||{}),Jr=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Jr||{});function wn(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Nt)).sort((n,t)=>Math.sign((n.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var $t=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))($t||{});function Pt(e,n=0){var t;return e===((t=at(e))==null?void 0:t.body)?!1:le(n,{0(){return e.matches(Nt)},1(){let r=e;for(;r!==null;){if(r.matches(Nt))return!0;r=r.parentElement}return!1}})}function yn(e){let n=at(e);Ee().nextFrame(()=>{n&&!Pt(n.activeElement,0)&&Ne(e)})}var Qr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Qr||{});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 Ne(e){e==null||e.focus({preventScroll:!0})}let Xr=["textarea","input"].join(",");function eo(e){var n,t;return(t=(n=e==null?void 0:e.matches)==null?void 0:n.call(e,Xr))!=null?t:!1}function Mt(e,n=t=>t){return e.slice().sort((t,r)=>{let o=n(t),i=n(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function to(e,n){return Ge(wn(),n,{relativeTo:e})}function Ge(e,n,{sorted:t=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?t?Mt(e):e:wn(e);o.length>0&&l.length>1&&(l=l.filter(p=>!o.includes(p))),r=r??i.activeElement;let s=(()=>{if(n&5)return 1;if(n&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(n&1)return 0;if(n&2)return Math.max(0,l.indexOf(r))-1;if(n&4)return Math.max(0,l.indexOf(r))+1;if(n&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=n&32?{preventScroll:!0}:{},f=0,h=l.length,b;do{if(f>=h||f+h<=0)return 0;let p=u+f;if(n&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}b=l[p],b==null||b.focus(d),f+=s}while(b!==i.activeElement);return n&6&&eo(b)&&b.select(),2}function En(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function no(){return/Android/gi.test(window.navigator.userAgent)}function Sn(){return En()||no()}function ut(e,n,t){let r=Te(n);a.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,t),()=>document.removeEventListener(e,o,t)},[e,t])}function Tn(e,n,t){let r=Te(n);a.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,t),()=>window.removeEventListener(e,o,t)},[e,t])}function At(e,n,t=!0){let r=a.useRef(!1);a.useEffect(()=>{requestAnimationFrame(()=>{r.current=t})},[t]);function o(l,s){if(!r.current||l.defaultPrevented)return;let u=s(l);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let d=function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]}(e);for(let f of d){if(f===null)continue;let h=f instanceof HTMLElement?f:f.current;if(h!=null&&h.contains(u)||l.composed&&l.composedPath().includes(h))return}return!Pt(u,$t.Loose)&&u.tabIndex!==-1&&l.preventDefault(),n(l,u)}let i=a.useRef(null);ut("pointerdown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),ut("mousedown",l=>{var s,u;r.current&&(i.current=((u=(s=l.composedPath)==null?void 0:s.call(l))==null?void 0:u[0])||l.target)},!0),ut("click",l=>{Sn()||i.current&&(o(l,()=>i.current),i.current=null)},!0),ut("touchend",l=>o(l,()=>l.target instanceof HTMLElement?l.target:null),!0),Tn("blur",l=>o(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function De(...e){return a.useMemo(()=>at(...e),[...e])}function Cn(e){var n;if(e.type)return e.type;let t=(n=e.as)!=null?n:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function Dt(e,n){let[t,r]=a.useState(()=>Cn(e));return Q(()=>{r(Cn(e))},[e.type,e.as]),Q(()=>{t||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&r("button")},[t,n]),t}let On=Symbol();function ro(e,n=!0){return Object.assign(e,{[On]:n})}function ue(...e){let n=a.useRef(e);a.useEffect(()=>{n.current=e},[e]);let t=I(r=>{for(let o of n.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[On]))?void 0:t}function jn(e){return[e.screenX,e.screenY]}function In(){let e=a.useRef([-1,-1]);return{wasMoved(n){let t=jn(n);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(n){e.current=jn(n)}}}function kn({container:e,accept:n,walk:t,enabled:r=!0}){let o=a.useRef(n),i=a.useRef(t);a.useEffect(()=>{o.current=n,i.current=t},[n,t]),Q(()=>{if(!e||!r)return;let l=at(e);if(!l)return;let s=o.current,u=i.current,d=Object.assign(h=>s(h),{acceptNode:s}),f=l.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,d,!1);for(;f.nextNode();)u(f.currentNode)},[e,r,o,i])}function Ze(e,n){let t=a.useRef([]),r=I(e);a.useEffect(()=>{let o=[...t.current];for(let[i,l]of n.entries())if(t.current[i]!==l){let s=r(n,o);return t.current=n,s}},[r,...n])}function ct(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var $e=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($e||{}),Pe=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Pe||{});function oe({ourProps:e,theirProps:n,slot:t,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??oo;let u=Fn(n,e);if(i)return dt(u,t,r,l,s);let d=o??0;if(d&2){let{static:f=!1,...h}=u;if(f)return dt(h,t,r,l,s)}if(d&1){let{unmount:f=!0,...h}=u;return le(f?0:1,{0(){return null},1(){return dt({...h,hidden:!0,style:{display:"none"}},t,r,l,s)}})}return dt(u,t,r,l,s)}function dt(e,n={},t,r,o){let{as:i=t,children:l,refName:s="ref",...u}=Lt(e,["unmount","static"]),d=e.ref!==void 0?{[s]:e.ref}:{},f=typeof l=="function"?l(n):l;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(n));let h={};if(n){let b=!1,p=[];for(let[g,v]of Object.entries(n))typeof v=="boolean"&&(b=!0),v===!0&&p.push(g);b&&(h["data-headlessui-state"]=p.join(" "))}if(i===a.Fragment&&Object.keys(ft(u)).length>0){if(!a.isValidElement(f)||Array.isArray(f)&&f.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(u).map(v=>` - ${v}`).join(`
34
- `),"","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(v=>` - ${v}`).join(`
35
- `)].join(`
36
- `));let b=f.props,p=typeof(b==null?void 0:b.className)=="function"?(...v)=>ct(b==null?void 0:b.className(...v),u.className):ct(b==null?void 0:b.className,u.className),g=p?{className:p}:{};return a.cloneElement(f,Object.assign({},Fn(f.props,ft(Lt(u,["ref"]))),h,d,{ref:o(f.ref,d.ref)},g))}return a.createElement(i,Object.assign({},Lt(u,["ref"]),i!==a.Fragment&&d,i!==a.Fragment&&h),f)}function oo(...e){return e.every(n=>n==null)?void 0:n=>{for(let t of e)t!=null&&(typeof t=="function"?t(n):t.current=n)}}function Fn(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},t={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(r[o])):n[o]=r[o];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(t).map(r=>[r,void 0])));for(let r in t)Object.assign(n,{[r](o,...i){let l=t[r];for(let s of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return n}function ie(e){var n;return Object.assign(a.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function ft(e){let n=Object.assign({},e);for(let t in n)n[t]===void 0&&delete n[t];return n}function Lt(e,n=[]){let t=Object.assign({},e);for(let r of n)r in t&&delete t[r];return t}let io="div";var We=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(We||{});function lo(e,n){var t;let{features:r=1,...o}=e,i={ref:n,"aria-hidden":(r&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(r&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",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return oe({ourProps:i,theirProps:o,slot:{},defaultTag:io,name:"Hidden"})}let Je=ie(lo),_t=a.createContext(null);_t.displayName="OpenClosedContext";var ce=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ce||{});function Qe(){return a.useContext(_t)}function Rt({value:e,children:n}){return a.createElement(_t.Provider,{value:e},n)}function so(e){function n(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",n))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",n),n())}let Oe=[];so(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&Oe[0]!==n.target&&(Oe.unshift(n.target),Oe=Oe.filter(t=>t!=null&&t.isConnected),Oe.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 mt(e){let n=e.parentElement,t=null;for(;n&&!(n instanceof HTMLFieldSetElement);)n instanceof HTMLLegendElement&&(t=n),n=n.parentElement;let r=(n==null?void 0:n.getAttribute("disabled"))==="";return r&&ao(t)?!1:r}function ao(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function uo(e){throw new Error("Unexpected object: "+e)}var X=(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))(X||{});function Bt(e,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 1:{for(let i=o-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 2:{for(let i=o+1;i<t.length;++i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 3:{for(let i=t.length-1;i>=0;--i)if(!n.resolveDisabled(t[i],i,t))return i;return r}case 4:{for(let i=0;i<t.length;++i)if(n.resolveId(t[i],i,t)===e.id)return i;return r}case 5:return null;default:uo(e)}}function Nn(e={},n=null,t=[]){for(let[r,o]of Object.entries(e))Pn(t,$n(n,r),o);return t}function $n(e,n){return e?e+"["+n+"]":n}function Pn(e,n,t){if(Array.isArray(t))for(let[r,o]of t.entries())Pn(e,$n(n,r.toString()),o);else t instanceof Date?e.push([n,t.toISOString()]):typeof t=="boolean"?e.push([n,t?"1":"0"]):typeof t=="string"?e.push([n,t]):typeof t=="number"?e.push([n,`${t}`]):t==null?e.push([n,""]):Nn(t,n,e)}function co(e){var n,t;let r=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(t=r.requestSubmit)==null||t.call(r)}}var q=(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))(q||{}),fo=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(fo||{}),mo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(mo||{}),po=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(po||{}),ho=(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))(ho||{});function zt(e,n=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=n(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((l,s)=>l.dataRef.current.order-s.dataRef.current.order):Mt(r,l=>l.dataRef.current.domRef.current),i=t?o.indexOf(t):null;return i===-1&&(i=null),{options:o,activeOptionIndex:i}}let vo={1(e){var n;return(n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var n,t;if((n=e.dataRef.current)!=null&&n.disabled||e.comboboxState===0)return e;if((t=e.dataRef.current)!=null&&t.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,n){var t,r,o,i,l;if((t=e.dataRef.current)!=null&&t.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let f=n.focus===X.Specific?n.idx:Bt(n,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var b,p;return(p=(b=e.activeOptionIndex)!=null?b:e.virtual.options.findIndex(g=>!e.virtual.disabled(g)))!=null?p:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),h=(i=n.trigger)!=null?i:2;return e.activeOptionIndex===f&&e.activationTrigger===h?e:{...e,activeOptionIndex:f,activationTrigger:h}}let s=zt(e);if(s.activeOptionIndex===null){let f=s.options.findIndex(h=>!h.dataRef.current.disabled);f!==-1&&(s.activeOptionIndex=f)}let u=n.focus===X.Specific?n.idx:Bt(n,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled}),d=(l=n.trigger)!=null?l:2;return e.activeOptionIndex===u&&e.activationTrigger===d?e:{...e,...s,activeOptionIndex:u,activationTrigger:d}},3:(e,n)=>{var t,r,o;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:[...e.options,n.payload]};let i=n.payload,l=zt(e,u=>(u.push(i),u));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(n.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(i));let s={...e,...l,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},4:(e,n)=>{var t;if((t=e.dataRef.current)!=null&&t.virtual)return{...e,options:e.options.filter(o=>o.id!==n.id)};let r=zt(e,o=>{let i=o.findIndex(l=>l.id===n.id);return i!==-1&&o.splice(i,1),o});return{...e,...r,activationTrigger:2}},5:(e,n)=>e.labelId===n.id?e:{...e,labelId:n.id},6:(e,n)=>e.activationTrigger===n.trigger?e:{...e,activationTrigger:n.trigger},7:(e,n)=>{var t;if(((t=e.virtual)==null?void 0:t.options)===n.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=n.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:n.options})}}},Wt=a.createContext(null);Wt.displayName="ComboboxActionsContext";function Xe(e){let n=a.useContext(Wt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Xe),t}return n}let Mn=a.createContext(null);function go(e){var n;let t=Le("VirtualProvider"),[r,o]=a.useMemo(()=>{let u=t.optionsRef.current;if(!u)return[0,0];let d=window.getComputedStyle(u);return[parseFloat(d.paddingBlockStart||d.paddingTop),parseFloat(d.paddingBlockEnd||d.paddingBottom)]},[t.optionsRef.current]),i=Yr({scrollPaddingStart:r,scrollPaddingEnd:o,count:t.virtual.options.length,estimateSize(){return 40},getScrollElement(){var u;return(u=t.optionsRef.current)!=null?u:null},overscan:12}),[l,s]=a.useState(0);return Q(()=>{s(u=>u+1)},[(n=t.virtual)==null?void 0:n.options]),a.createElement(Mn.Provider,{value:i},a.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:u=>{if(u){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger===0)return;t.activeOptionIndex!==null&&t.virtual.options.length>t.activeOptionIndex&&i.scrollToIndex(t.activeOptionIndex)}}},i.getVirtualItems().map(u=>{var d;return a.createElement(a.Fragment,{key:u.key},a.cloneElement((d=e.children)==null?void 0:d.call(e,{option:t.virtual.options[u.index],open:t.comboboxState===0}),{key:`${l}-${u.key}`,"data-index":u.index,"aria-setsize":t.virtual.options.length,"aria-posinset":u.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${u.start}px)`,overflowAnchor:"none"}}))})))}let Ht=a.createContext(null);Ht.displayName="ComboboxDataContext";function Le(e){let n=a.useContext(Ht);if(n===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Le),t}return n}function bo(e,n){return le(n.type,vo,e,n)}let xo=a.Fragment;function wo(e,n){let{value:t,defaultValue:r,onChange:o,form:i,name:l,by:s=null,disabled:u=!1,__demoMode:d=!1,nullable:f=!1,multiple:h=!1,immediate:b=!1,virtual:p=null,...g}=e,v=!1,x=null,[S=h?[]:void 0,w]=gn(t,o,r),[T,O]=a.useReducer(bo,{dataRef:a.createRef(),comboboxState:d?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),k=a.useRef(!1),F=a.useRef({static:!1,hold:!1}),z=a.useRef(null),Y=a.useRef(null),D=a.useRef(null),A=a.useRef(null),R=I(typeof s=="string"?(P,U)=>{let B=s;return(P==null?void 0:P[B])===(U==null?void 0:U[B])}:s??((P,U)=>P===U)),Z=I(P=>T.options.findIndex(U=>R(U.dataRef.current.value,P))),re=a.useCallback(P=>le(E.mode,{1:()=>S.some(U=>R(U,P)),0:()=>R(S,P)}),[S]),L=I(P=>T.activeOptionIndex===Z(P)),E=a.useMemo(()=>({...T,immediate:v,optionsPropsRef:F,labelRef:z,inputRef:Y,buttonRef:D,optionsRef:A,value:S,defaultValue:r,disabled:u,mode:h?1:0,virtual:T.virtual,get activeOptionIndex(){if(k.current&&T.activeOptionIndex===null&&T.options.length>0){let P=T.options.findIndex(U=>!U.dataRef.current.disabled);if(P!==-1)return P}return T.activeOptionIndex},calculateIndex:Z,compare:R,isSelected:re,isActive:L,nullable:f,__demoMode:d}),[S,r,u,h,f,d,T,x]);Q(()=>{},[x,void 0]),Q(()=>{T.dataRef.current=E},[E]),At([E.buttonRef,E.inputRef,E.optionsRef],()=>$.closeCombobox(),E.comboboxState===0);let ae=a.useMemo(()=>{var P,U,B;return{open:E.comboboxState===0,disabled:u,activeIndex:E.activeOptionIndex,activeOption:E.activeOptionIndex===null?null:E.virtual?E.virtual.options[(P=E.activeOptionIndex)!=null?P:0]:(B=(U=E.options[E.activeOptionIndex])==null?void 0:U.dataRef.current.value)!=null?B:null,value:S}},[E,u,S]),H=I(()=>{if(E.activeOptionIndex!==null){if(E.virtual)Ce(E.virtual.options[E.activeOptionIndex]);else{let{dataRef:P}=E.options[E.activeOptionIndex];Ce(P.current.value)}$.goToOption(X.Specific,E.activeOptionIndex)}}),se=I(()=>{O({type:0}),k.current=!0}),G=I(()=>{O({type:1}),k.current=!1}),ee=I((P,U,B)=>(k.current=!1,P===X.Specific?O({type:2,focus:X.Specific,idx:U,trigger:B}):O({type:2,focus:P,trigger:B}))),me=I((P,U)=>(O({type:3,payload:{id:P,dataRef:U}}),()=>{E.isActive(U.current.value)&&(k.current=!0),O({type:4,id:P})})),ge=I(P=>(O({type:5,id:P}),()=>O({type:5,id:null}))),Ce=I(P=>le(E.mode,{0(){return w==null?void 0:w(P)},1(){let U=E.value.slice(),B=U.findIndex(pe=>R(pe,P));return B===-1?U.push(P):U.splice(B,1),w==null?void 0:w(U)}})),be=I(P=>{O({type:6,trigger:P})}),$=a.useMemo(()=>({onChange:Ce,registerOption:me,registerLabel:ge,goToOption:ee,closeCombobox:G,openCombobox:se,setActivationTrigger:be,selectActiveOption:H}),[]),K=n===null?{}:{ref:n},te=a.useRef(null),we=Ie();return a.useEffect(()=>{te.current&&r!==void 0&&we.addEventListener(te.current,"reset",()=>{w==null||w(r)})},[te,w]),a.createElement(Wt.Provider,{value:$},a.createElement(Ht.Provider,{value:E},a.createElement(Rt,{value:le(E.comboboxState,{0:ce.Open,1:ce.Closed})},l!=null&&S!=null&&Nn({[l]:S}).map(([P,U],B)=>a.createElement(Je,{features:We.Hidden,ref:B===0?pe=>{var he;te.current=(he=pe==null?void 0:pe.closest("form"))!=null?he:null}:void 0,...ft({key:P,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:u,name:P,value:U})})),oe({ourProps:K,theirProps:g,slot:ae,defaultTag:xo,name:"Combobox"}))))}let yo="input";function Eo(e,n){var t,r,o,i,l;let s=ve(),{id:u=`headlessui-combobox-input-${s}`,onChange:d,displayValue:f,type:h="text",...b}=e,p=Le("Combobox.Input"),g=Xe("Combobox.Input"),v=ue(p.inputRef,n),x=De(p.inputRef),S=a.useRef(!1),w=Ie(),T=I(()=>{g.onChange(null),p.optionsRef.current&&(p.optionsRef.current.scrollTop=0),g.goToOption(X.Nothing)}),O=function(){var E;return typeof f=="function"&&p.value!==void 0?(E=f(p.value))!=null?E:"":typeof p.value=="string"?p.value:""}();Ze(([E,ae],[H,se])=>{if(S.current)return;let G=p.inputRef.current;G&&((se===0&&ae===1||E!==H)&&(G.value=E),requestAnimationFrame(()=>{if(S.current||!G||(x==null?void 0:x.activeElement)!==G)return;let{selectionStart:ee,selectionEnd:me}=G;Math.abs((me??0)-(ee??0))===0&&ee===0&&G.setSelectionRange(G.value.length,G.value.length)}))},[O,p.comboboxState,x]),Ze(([E],[ae])=>{if(E===0&&ae===1){if(S.current)return;let H=p.inputRef.current;if(!H)return;let se=H.value,{selectionStart:G,selectionEnd:ee,selectionDirection:me}=H;H.value="",H.value=se,me!==null?H.setSelectionRange(G,ee,me):H.setSelectionRange(G,ee)}},[p.comboboxState]);let k=a.useRef(!1),F=I(()=>{k.current=!0}),z=I(()=>{w.nextFrame(()=>{k.current=!1})}),Y=I(E=>{switch(S.current=!0,E.key){case q.Enter:if(S.current=!1,p.comboboxState!==0||k.current)return;if(E.preventDefault(),E.stopPropagation(),p.activeOptionIndex===null){g.closeCombobox();return}g.selectActiveOption(),p.mode===0&&g.closeCombobox();break;case q.ArrowDown:return S.current=!1,E.preventDefault(),E.stopPropagation(),le(p.comboboxState,{0:()=>g.goToOption(X.Next),1:()=>g.openCombobox()});case q.ArrowUp:return S.current=!1,E.preventDefault(),E.stopPropagation(),le(p.comboboxState,{0:()=>g.goToOption(X.Previous),1:()=>{g.openCombobox(),w.nextFrame(()=>{p.value||g.goToOption(X.Last)})}});case q.Home:if(E.shiftKey)break;return S.current=!1,E.preventDefault(),E.stopPropagation(),g.goToOption(X.First);case q.PageUp:return S.current=!1,E.preventDefault(),E.stopPropagation(),g.goToOption(X.First);case q.End:if(E.shiftKey)break;return S.current=!1,E.preventDefault(),E.stopPropagation(),g.goToOption(X.Last);case q.PageDown:return S.current=!1,E.preventDefault(),E.stopPropagation(),g.goToOption(X.Last);case q.Escape:return S.current=!1,p.comboboxState!==0?void 0:(E.preventDefault(),p.optionsRef.current&&!p.optionsPropsRef.current.static&&E.stopPropagation(),p.nullable&&p.mode===0&&p.value===null&&T(),g.closeCombobox());case q.Tab:if(S.current=!1,p.comboboxState!==0)return;p.mode===0&&p.activationTrigger!==1&&g.selectActiveOption(),g.closeCombobox();break}}),D=I(E=>{d==null||d(E),p.nullable&&p.mode===0&&E.target.value===""&&T(),g.openCombobox()}),A=I(E=>{var ae,H,se;let G=(ae=E.relatedTarget)!=null?ae:Oe.find(ee=>ee!==E.currentTarget);if(S.current=!1,!((H=p.optionsRef.current)!=null&&H.contains(G))&&!((se=p.buttonRef.current)!=null&&se.contains(G))&&p.comboboxState===0)return E.preventDefault(),p.mode===0&&(p.nullable&&p.value===null?T():p.activationTrigger!==1&&g.selectActiveOption()),g.closeCombobox()}),R=I(E=>{var ae,H,se;let G=(ae=E.relatedTarget)!=null?ae:Oe.find(ee=>ee!==E.currentTarget);(H=p.buttonRef.current)!=null&&H.contains(G)||(se=p.optionsRef.current)!=null&&se.contains(G)||p.disabled||p.immediate&&p.comboboxState!==0&&(g.openCombobox(),w.nextFrame(()=>{g.setActivationTrigger(1)}))}),Z=Ft(()=>{if(p.labelId)return[p.labelId].join(" ")},[p.labelId]),re=a.useMemo(()=>({open:p.comboboxState===0,disabled:p.disabled}),[p]),L={ref:v,id:u,role:"combobox",type:h,"aria-controls":(t=p.optionsRef.current)==null?void 0:t.id,"aria-expanded":p.comboboxState===0,"aria-activedescendant":p.activeOptionIndex===null?void 0:p.virtual?(r=p.options.find(E=>{var ae;return!((ae=p.virtual)!=null&&ae.disabled(E.dataRef.current.value))&&p.compare(E.dataRef.current.value,p.virtual.options[p.activeOptionIndex])}))==null?void 0:r.id:(o=p.options[p.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":Z,"aria-autocomplete":"list",defaultValue:(l=(i=e.defaultValue)!=null?i:p.defaultValue!==void 0?f==null?void 0:f(p.defaultValue):null)!=null?l:p.defaultValue,disabled:p.disabled,onCompositionStart:F,onCompositionEnd:z,onKeyDown:Y,onChange:D,onFocus:R,onBlur:A};return oe({ourProps:L,theirProps:b,slot:re,defaultTag:yo,name:"Combobox.Input"})}let So="button";function To(e,n){var t;let r=Le("Combobox.Button"),o=Xe("Combobox.Button"),i=ue(r.buttonRef,n),l=ve(),{id:s=`headlessui-combobox-button-${l}`,...u}=e,d=Ie(),f=I(v=>{switch(v.key){case q.ArrowDown:return v.preventDefault(),v.stopPropagation(),r.comboboxState===1&&o.openCombobox(),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case q.ArrowUp:return v.preventDefault(),v.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),d.nextFrame(()=>{r.value||o.goToOption(X.Last)})),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})});case q.Escape:return r.comboboxState!==0?void 0:(v.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&v.stopPropagation(),o.closeCombobox(),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})}));default:return}}),h=I(v=>{if(mt(v.currentTarget))return v.preventDefault();r.comboboxState===0?o.closeCombobox():(v.preventDefault(),o.openCombobox()),d.nextFrame(()=>{var x;return(x=r.inputRef.current)==null?void 0:x.focus({preventScroll:!0})})}),b=Ft(()=>{if(r.labelId)return[r.labelId,s].join(" ")},[r.labelId,s]),p=a.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),g={ref:i,id:s,type:Dt(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=r.optionsRef.current)==null?void 0:t.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":b,disabled:r.disabled,onClick:h,onKeyDown:f};return oe({ourProps:g,theirProps:u,slot:p,defaultTag:So,name:"Combobox.Button"})}let Co="label";function Oo(e,n){let t=ve(),{id:r=`headlessui-combobox-label-${t}`,...o}=e,i=Le("Combobox.Label"),l=Xe("Combobox.Label"),s=ue(i.labelRef,n);Q(()=>l.registerLabel(r),[r]);let u=I(()=>{var f;return(f=i.inputRef.current)==null?void 0:f.focus({preventScroll:!0})}),d=a.useMemo(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return oe({ourProps:{ref:s,id:r,onClick:u},theirProps:o,slot:d,defaultTag:Co,name:"Combobox.Label"})}let jo="ul",Io=$e.RenderStrategy|$e.Static;function ko(e,n){let t=ve(),{id:r=`headlessui-combobox-options-${t}`,hold:o=!1,...i}=e,l=Le("Combobox.Options"),s=ue(l.optionsRef,n),u=Qe(),d=u!==null?(u&ce.Open)===ce.Open:l.comboboxState===0;Q(()=>{var p;l.optionsPropsRef.current.static=(p=e.static)!=null?p:!1},[l.optionsPropsRef,e.static]),Q(()=>{l.optionsPropsRef.current.hold=o},[l.optionsPropsRef,o]),kn({container:l.optionsRef.current,enabled:l.comboboxState===0,accept(p){return p.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});let f=Ft(()=>{var p,g;return(g=l.labelId)!=null?g:(p=l.buttonRef.current)==null?void 0:p.id},[l.labelId,l.buttonRef.current]),h=a.useMemo(()=>({open:l.comboboxState===0,option:void 0}),[l]),b={"aria-labelledby":f,role:"listbox","aria-multiselectable":l.mode===1?!0:void 0,id:r,ref:s};return l.virtual&&l.comboboxState===0&&Object.assign(i,{children:a.createElement(go,null,i.children)}),oe({ourProps:b,theirProps:i,slot:h,defaultTag:jo,features:Io,visible:d,name:"Combobox.Options"})}let Fo="li";function No(e,n){var t;let r=ve(),{id:o=`headlessui-combobox-option-${r}`,disabled:i=!1,value:l,order:s=null,...u}=e,d=Le("Combobox.Option"),f=Xe("Combobox.Option"),h=d.virtual?d.activeOptionIndex===d.calculateIndex(l):d.activeOptionIndex===null?!1:((t=d.options[d.activeOptionIndex])==null?void 0:t.id)===o,b=d.isSelected(l),p=a.useRef(null),g=Te({disabled:i,value:l,domRef:p,order:s}),v=a.useContext(Mn),x=ue(n,p,v?v.measureElement:null),S=I(()=>f.onChange(l));Q(()=>f.registerOption(o,g),[g,o]);let w=a.useRef(!(d.virtual||d.__demoMode));Q(()=>{if(!d.virtual||!d.__demoMode)return;let A=Ee();return A.requestAnimationFrame(()=>{w.current=!0}),A.dispose},[d.virtual,d.__demoMode]),Q(()=>{if(!w.current||d.comboboxState!==0||!h||d.activationTrigger===0)return;let A=Ee();return A.requestAnimationFrame(()=>{var R,Z;(Z=(R=p.current)==null?void 0:R.scrollIntoView)==null||Z.call(R,{block:"nearest"})}),A.dispose},[p,h,d.comboboxState,d.activationTrigger,d.activeOptionIndex]);let T=I(A=>{var R;if(i||(R=d.virtual)!=null&&R.disabled(l))return A.preventDefault();S(),Sn()||requestAnimationFrame(()=>{var Z;return(Z=d.inputRef.current)==null?void 0:Z.focus({preventScroll:!0})}),d.mode===0&&requestAnimationFrame(()=>f.closeCombobox())}),O=I(()=>{var A;if(i||(A=d.virtual)!=null&&A.disabled(l))return f.goToOption(X.Nothing);let R=d.calculateIndex(l);f.goToOption(X.Specific,R)}),k=In(),F=I(A=>k.update(A)),z=I(A=>{var R;if(!k.wasMoved(A)||i||(R=d.virtual)!=null&&R.disabled(l)||h)return;let Z=d.calculateIndex(l);f.goToOption(X.Specific,Z,0)}),Y=I(A=>{var R;k.wasMoved(A)&&(i||(R=d.virtual)!=null&&R.disabled(l)||h&&(d.optionsPropsRef.current.hold||f.goToOption(X.Nothing)))}),D=a.useMemo(()=>({active:h,selected:b,disabled:i}),[h,b,i]);return oe({ourProps:{id:o,ref:x,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":b,disabled:void 0,onClick:T,onFocus:O,onPointerEnter:F,onMouseEnter:F,onPointerMove:z,onMouseMove:z,onPointerLeave:Y,onMouseLeave:Y},theirProps:u,slot:D,defaultTag:Fo,name:"Combobox.Option"})}let $o=ie(wo),Po=ie(To),Mo=ie(Eo),Ao=ie(Oo),Do=ie(ko),Lo=ie(No),Fe=Object.assign($o,{Input:Mo,Button:Po,Label:Ao,Options:Do,Option:Lo});function An(e,n,t,r){let o=Te(t);a.useEffect(()=>{e=e??window;function i(l){o.current(l)}return e.addEventListener(n,i,r),()=>e.removeEventListener(n,i,r)},[e,n,r])}function et(){let e=a.useRef(!1);return Q(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Dn(e){let n=I(e),t=a.useRef(!1);a.useEffect(()=>(t.current=!1,()=>{t.current=!0,st(()=>{t.current&&n()})}),[n])}var tt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(tt||{});function _o(){let e=a.useRef(0);return Tn("keydown",n=>{n.key==="Tab"&&(e.current=n.shiftKey?1:0)},!0),e}function Ln(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let n=new Set;for(let t of e.current)t.current instanceof HTMLElement&&n.add(t.current);return n}let Ro="div";var _n=(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))(_n||{});function Bo(e,n){let t=a.useRef(null),r=ue(t,n),{initialFocus:o,containers:i,features:l=30,...s}=e;ze()||(l=1);let u=De(t);Ho({ownerDocument:u},!!(l&16));let d=Uo({ownerDocument:u,container:t,initialFocus:o},!!(l&2));Vo({ownerDocument:u,container:t,containers:i,previousActiveElement:d},!!(l&8));let f=_o(),h=I(v=>{let x=t.current;x&&(S=>S())(()=>{le(f.current,{[tt.Forwards]:()=>{Ge(x,ke.First,{skipElements:[v.relatedTarget]})},[tt.Backwards]:()=>{Ge(x,ke.Last,{skipElements:[v.relatedTarget]})}})})}),b=Ie(),p=a.useRef(!1),g={ref:r,onKeyDown(v){v.key=="Tab"&&(p.current=!0,b.requestAnimationFrame(()=>{p.current=!1}))},onBlur(v){let x=Ln(i);t.current instanceof HTMLElement&&x.add(t.current);let S=v.relatedTarget;S instanceof HTMLElement&&S.dataset.headlessuiFocusGuard!=="true"&&(Rn(x,S)||(p.current?Ge(t.current,le(f.current,{[tt.Forwards]:()=>ke.Next,[tt.Backwards]:()=>ke.Previous})|ke.WrapAround,{relativeTo:v.target}):v.target instanceof HTMLElement&&Ne(v.target)))}};return a.createElement(a.Fragment,null,!!(l&4)&&a.createElement(Je,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:We.Focusable}),oe({ourProps:g,theirProps:s,defaultTag:Ro,name:"FocusTrap"}),!!(l&4)&&a.createElement(Je,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:We.Focusable}))}let zo=ie(Bo),nt=Object.assign(zo,{features:_n});function Wo(e=!0){let n=a.useRef(Oe.slice());return Ze(([t],[r])=>{r===!0&&t===!1&&st(()=>{n.current.splice(0)}),r===!1&&t===!0&&(n.current=Oe.slice())},[e,Oe,n]),I(()=>{var t;return(t=n.current.find(r=>r!=null&&r.isConnected))!=null?t:null})}function Ho({ownerDocument:e},n){let t=Wo(n);Ze(()=>{n||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Ne(t())},[n]),Dn(()=>{n&&Ne(t())})}function Uo({ownerDocument:e,container:n,initialFocus:t},r){let o=a.useRef(null),i=et();return Ze(()=>{if(!r)return;let l=n.current;l&&st(()=>{if(!i.current)return;let s=e==null?void 0:e.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===s){o.current=s;return}}else if(l.contains(s)){o.current=s;return}t!=null&&t.current?Ne(t.current):Ge(l,ke.First)===xn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=e==null?void 0:e.activeElement})},[r]),o}function Vo({ownerDocument:e,container:n,containers:t,previousActiveElement:r},o){let i=et();An(e==null?void 0:e.defaultView,"focus",l=>{if(!o||!i.current)return;let s=Ln(t);n.current instanceof HTMLElement&&s.add(n.current);let u=r.current;if(!u)return;let d=l.target;d&&d instanceof HTMLElement?Rn(s,d)?(r.current=d,Ne(d)):(l.preventDefault(),l.stopPropagation(),Ne(u)):Ne(r.current)},!0)}function Rn(e,n){for(let t of e)if(t.contains(n))return!0;return!1}let Bn=a.createContext(!1);function Yo(){return a.useContext(Bn)}function Ut(e){return a.createElement(Bn.Provider,{value:e.force},e.children)}function qo(e){let n=Yo(),t=a.useContext(zn),r=De(e),[o,i]=a.useState(()=>{if(!n&&t!==null||je.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return a.useEffect(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),a.useEffect(()=>{n||t!==null&&i(t.current)},[t,i,n]),o}let Ko=a.Fragment;function Go(e,n){let t=e,r=a.useRef(null),o=ue(ro(f=>{r.current=f}),n),i=De(r),l=qo(r),[s]=a.useState(()=>{var f;return je.isServer?null:(f=i==null?void 0:i.createElement("div"))!=null?f:null}),u=a.useContext(Vt),d=ze();return Q(()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))},[l,s]),Q(()=>{if(s&&u)return u.register(s)},[u,s]),Dn(()=>{var f;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l)))}),d?!l||!s?null:dn.createPortal(oe({ourProps:{ref:o},theirProps:t,defaultTag:Ko,name:"Portal"}),s):null}let Zo=a.Fragment,zn=a.createContext(null);function Jo(e,n){let{target:t,...r}=e,o={ref:ue(n)};return a.createElement(zn.Provider,{value:t},oe({ourProps:o,theirProps:r,defaultTag:Zo,name:"Popover.Group"}))}let Vt=a.createContext(null);function Qo(){let e=a.useContext(Vt),n=a.useRef([]),t=I(i=>(n.current.push(i),e&&e.register(i),()=>r(i))),r=I(i=>{let l=n.current.indexOf(i);l!==-1&&n.current.splice(l,1),e&&e.unregister(i)}),o=a.useMemo(()=>({register:t,unregister:r,portals:n}),[t,r,n]);return[n,a.useMemo(()=>function({children:i}){return a.createElement(Vt.Provider,{value:o},i)},[o])]}let Xo=ie(Go),ei=ie(Jo),Yt=Object.assign(Xo,{Group:ei});function ti(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}const ni=typeof Object.is=="function"?Object.is:ti,{useState:ri,useEffect:oi,useLayoutEffect:ii,useDebugValue:li}=C;function si(e,n,t){const r=n(),[{inst:o},i]=ri({inst:{value:r,getSnapshot:n}});return ii(()=>{o.value=r,o.getSnapshot=n,qt(o)&&i({inst:o})},[e,r,n]),oi(()=>(qt(o)&&i({inst:o}),e(()=>{qt(o)&&i({inst:o})})),[e]),li(r),r}function qt(e){const n=e.getSnapshot,t=e.value;try{const r=n();return!ni(t,r)}catch{return!0}}function ai(e,n,t){return n()}const ui=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ci=!ui,di=ci?ai:si,fi="useSyncExternalStore"in C?(e=>e.useSyncExternalStore)(C):di;function mi(e){return fi(e.subscribe,e.getSnapshot,e.getSnapshot)}function pi(e,n){let t=e(),r=new Set;return{getSnapshot(){return t},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=n[o].call(t,...i);l&&(t=l,r.forEach(s=>s()))}}}function hi(){let e;return{before({doc:n}){var t;let r=n.documentElement;e=((t=n.defaultView)!=null?t:window).innerWidth-r.clientWidth},after({doc:n,d:t}){let r=n.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;t.style(r,"paddingRight",`${i}px`)}}}function vi(){return En()?{before({doc:e,d:n,meta:t}){function r(o){return t.containers.flatMap(i=>i()).some(i=>i.contains(o))}n.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=Ee();s.style(e.documentElement,"scrollBehavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;n.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let u=s.target.closest("a");if(!u)return;let{hash:d}=new URL(u.href),f=e.querySelector(d);f&&!r(f)&&(l=f)}catch{}},!0),n.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;n.style(u,"overscrollBehavior","contain")}else n.style(s.target,"touchAction","none")}),n.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(r(s.target)){let u=s.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),n.add(()=>{var s;let u=(s=window.scrollY)!=null?s:window.pageYOffset;i!==u&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function gi(){return{before({doc:e,d:n}){n.style(e.documentElement,"overflow","hidden")}}}function bi(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let _e=pi(()=>new Map,{PUSH(e,n){var t;let r=(t=this.get(e))!=null?t:{doc:e,count:0,d:Ee(),meta:new Set};return r.count++,r.meta.add(n),this.set(e,r),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let r={doc:e,d:n,meta:bi(t)},o=[vi(),hi(),gi()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});_e.subscribe(()=>{let e=_e.getSnapshot(),n=new Map;for(let[t]of e)n.set(t,t.documentElement.style.overflow);for(let t of e.values()){let r=n.get(t.doc)==="hidden",o=t.count!==0;(o&&!r||!o&&r)&&_e.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&_e.dispatch("TEARDOWN",t)}});function xi(e,n,t){let r=mi(_e),o=e?r.get(e):void 0,i=o?o.count>0:!1;return Q(()=>{if(!(!e||!n))return _e.dispatch("PUSH",e,t),()=>_e.dispatch("POP",e,t)},[n,e]),i}let Kt=new Map,rt=new Map;function Wn(e,n=!0){Q(()=>{var t;if(!n)return;let r=typeof e=="function"?e():e.current;if(!r)return;function o(){var l;if(!r)return;let s=(l=rt.get(r))!=null?l:1;if(s===1?rt.delete(r):rt.set(r,s-1),s!==1)return;let u=Kt.get(r);u&&(u["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",u["aria-hidden"]),r.inert=u.inert,Kt.delete(r))}let i=(t=rt.get(r))!=null?t:0;return rt.set(r,i+1),i!==0||(Kt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),o},[e,n])}function wi({defaultContainers:e=[],portals:n,mainTreeNodeRef:t}={}){var r;let o=a.useRef((r=t==null?void 0:t.current)!=null?r:null),i=De(o),l=I(()=>{var s,u,d;let f=[];for(let h of e)h!==null&&(h instanceof HTMLElement?f.push(h):"current"in h&&h.current instanceof HTMLElement&&f.push(h.current));if(n!=null&&n.current)for(let h of n.current)f.push(h);for(let h of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])h!==document.body&&h!==document.head&&h instanceof HTMLElement&&h.id!=="headlessui-portal-root"&&(h.contains(o.current)||h.contains((d=(u=o.current)==null?void 0:u.getRootNode())==null?void 0:d.host)||f.some(b=>h.contains(b))||f.push(h));return f});return{resolveContainers:l,contains:I(s=>l().some(u=>u.contains(s))),mainTreeNodeRef:o,MainTreeNode:a.useMemo(()=>function(){return t!=null?null:a.createElement(Je,{features:We.Hidden,ref:o})},[o,t])}}let Gt=a.createContext(()=>{});Gt.displayName="StackContext";var Zt=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Zt||{});function yi(){return a.useContext(Gt)}function Ei({children:e,onUpdate:n,type:t,element:r,enabled:o}){let i=yi(),l=I((...s)=>{n==null||n(...s),i(...s)});return Q(()=>{let s=o===void 0||o===!0;return s&&l(0,t,r),()=>{s&&l(1,t,r)}},[l,t,r,o]),a.createElement(Gt.Provider,{value:l},e)}let Hn=a.createContext(null);function Un(){let e=a.useContext(Hn);if(e===null){let n=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Un),n}return e}function Vn(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=I(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),u=s.indexOf(i);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(Hn.Provider,{value:o},t.children)},[n])]}let Si="p";function Ti(e,n){let t=ve(),{id:r=`headlessui-description-${t}`,...o}=e,i=Un(),l=ue(n);Q(()=>i.register(r),[r,i.register]);let s={ref:l,...i.props,id:r};return oe({ourProps:s,theirProps:o,slot:i.slot||{},defaultTag:Si,name:i.name||"Description"})}let Ci=ie(Ti),Yn=Object.assign(Ci,{});var Oi=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Oi||{}),ji=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(ji||{});let Ii={0(e,n){return e.titleId===n.id?e:{...e,titleId:n.id}}},pt=a.createContext(null);pt.displayName="DialogContext";function ot(e){let n=a.useContext(pt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ot),t}return n}function ki(e,n,t=()=>[document.body]){xi(e,n,r=>{var o;return{containers:[...(o=r.containers)!=null?o:[],t]}})}function Fi(e,n){return le(n.type,Ii,e,n)}let Ni="div",$i=$e.RenderStrategy|$e.Static;function Pi(e,n){let t=ve(),{id:r=`headlessui-dialog-${t}`,open:o,onClose:i,initialFocus:l,role:s="dialog",__demoMode:u=!1,...d}=e,[f,h]=a.useState(0),b=a.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(b.current||(b.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=Qe();o===void 0&&p!==null&&(o=(p&ce.Open)===ce.Open);let g=a.useRef(null),v=ue(g,n),x=De(g),S=e.hasOwnProperty("open")||p!==null,w=e.hasOwnProperty("onClose");if(!S&&!w)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!S)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!w)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof i!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let T=o?0:1,[O,k]=a.useReducer(Fi,{titleId:null,descriptionId:null,panelRef:a.createRef()}),F=I(()=>i(!1)),z=I(B=>k({type:0,id:B})),Y=ze()?u?!1:T===0:!1,D=f>1,A=a.useContext(pt)!==null,[R,Z]=Qo(),re={get current(){var B;return(B=O.panelRef.current)!=null?B:g.current}},{resolveContainers:L,mainTreeNodeRef:E,MainTreeNode:ae}=wi({portals:R,defaultContainers:[re]}),H=D?"parent":"leaf",se=p!==null?(p&ce.Closing)===ce.Closing:!1,G=A||se?!1:Y,ee=a.useCallback(()=>{var B,pe;return(pe=Array.from((B=x==null?void 0:x.querySelectorAll("body > *"))!=null?B:[]).find(he=>he.id==="headlessui-portal-root"?!1:he.contains(E.current)&&he instanceof HTMLElement))!=null?pe:null},[E]);Wn(ee,G);let me=D?!0:Y,ge=a.useCallback(()=>{var B,pe;return(pe=Array.from((B=x==null?void 0:x.querySelectorAll("[data-headlessui-portal]"))!=null?B:[]).find(he=>he.contains(E.current)&&he instanceof HTMLElement))!=null?pe:null},[E]);Wn(ge,me),At(L,B=>{B.preventDefault(),F()},!(!Y||D));let be=!(D||T!==0);An(x==null?void 0:x.defaultView,"keydown",B=>{be&&(B.defaultPrevented||B.key===q.Escape&&(B.preventDefault(),B.stopPropagation(),F()))}),ki(x,!(se||T!==0||A),L),a.useEffect(()=>{if(T!==0||!g.current)return;let B=new ResizeObserver(pe=>{for(let he of pe){let He=he.target.getBoundingClientRect();He.x===0&&He.y===0&&He.width===0&&He.height===0&&F()}});return B.observe(g.current),()=>B.disconnect()},[T,g,F]);let[K,te]=Vn(),we=a.useMemo(()=>[{dialogState:T,close:F,setTitleId:z},O],[T,O,F,z]),P=a.useMemo(()=>({open:T===0}),[T]),U={ref:v,id:r,role:s,"aria-modal":T===0?!0:void 0,"aria-labelledby":O.titleId,"aria-describedby":K};return a.createElement(Ei,{type:"Dialog",enabled:T===0,element:g,onUpdate:I((B,pe)=>{pe==="Dialog"&&le(B,{[Zt.Add]:()=>h(he=>he+1),[Zt.Remove]:()=>h(he=>he-1)})})},a.createElement(Ut,{force:!0},a.createElement(Yt,null,a.createElement(pt.Provider,{value:we},a.createElement(Yt.Group,{target:g},a.createElement(Ut,{force:!1},a.createElement(te,{slot:P,name:"Dialog.Description"},a.createElement(nt,{initialFocus:l,containers:L,features:Y?le(H,{parent:nt.features.RestoreFocus,leaf:nt.features.All&~nt.features.FocusLock}):nt.features.None},a.createElement(Z,null,oe({ourProps:U,theirProps:d,slot:P,defaultTag:Ni,features:$i,visible:T===0,name:"Dialog"}))))))))),a.createElement(ae,null))}let Mi="div";function Ai(e,n){let t=ve(),{id:r=`headlessui-dialog-overlay-${t}`,...o}=e,[{dialogState:i,close:l}]=ot("Dialog.Overlay"),s=ue(n),u=I(f=>{if(f.target===f.currentTarget){if(mt(f.currentTarget))return f.preventDefault();f.preventDefault(),f.stopPropagation(),l()}}),d=a.useMemo(()=>({open:i===0}),[i]);return oe({ourProps:{ref:s,id:r,"aria-hidden":!0,onClick:u},theirProps:o,slot:d,defaultTag:Mi,name:"Dialog.Overlay"})}let Di="div";function Li(e,n){let t=ve(),{id:r=`headlessui-dialog-backdrop-${t}`,...o}=e,[{dialogState:i},l]=ot("Dialog.Backdrop"),s=ue(n);a.useEffect(()=>{if(l.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[l.panelRef]);let u=a.useMemo(()=>({open:i===0}),[i]);return a.createElement(Ut,{force:!0},a.createElement(Yt,null,oe({ourProps:{ref:s,id:r,"aria-hidden":!0},theirProps:o,slot:u,defaultTag:Di,name:"Dialog.Backdrop"})))}let _i="div";function Ri(e,n){let t=ve(),{id:r=`headlessui-dialog-panel-${t}`,...o}=e,[{dialogState:i},l]=ot("Dialog.Panel"),s=ue(n,l.panelRef),u=a.useMemo(()=>({open:i===0}),[i]),d=I(f=>{f.stopPropagation()});return oe({ourProps:{ref:s,id:r,onClick:d},theirProps:o,slot:u,defaultTag:_i,name:"Dialog.Panel"})}let Bi="h2";function zi(e,n){let t=ve(),{id:r=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:i,setTitleId:l}]=ot("Dialog.Title"),s=ue(n);a.useEffect(()=>(l(r),()=>l(null)),[r,l]);let u=a.useMemo(()=>({open:i===0}),[i]);return oe({ourProps:{ref:s,id:r},theirProps:o,slot:u,defaultTag:Bi,name:"Dialog.Title"})}let Wi=ie(Pi),Hi=ie(Li),Ui=ie(Ri),Vi=ie(Ai),Yi=ie(zi),qn=Object.assign(Wi,{Backdrop:Hi,Panel:Ui,Overlay:Vi,Title:Yi,Description:Yn}),Kn=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Gn(e){var n,t;let r=(n=e.innerText)!=null?n:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),i=!0;let l=i?(t=o.innerText)!=null?t:"":r;return Kn.test(l)&&(l=l.replace(Kn,"")),l}function qi(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let r=t.split(" ").map(o=>{let i=document.getElementById(o);if(i){let l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():Gn(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Gn(e).trim()}function Ki(e){let n=a.useRef(""),t=a.useRef("");return I(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(n.current===o)return t.current;let i=qi(r).trim().toLowerCase();return n.current=o,t.current=i,i})}var Gi=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Gi||{}),Zi=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Zi||{}),Ji=(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))(Ji||{});function Jt(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Mt(n(e.items.slice()),i=>i.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let Qi={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,n)=>{var t;let r=Jt(e),o=Bt(n,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:o,activationTrigger:(t=n.trigger)!=null?t:1}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(l=>{var s;return((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(r))&&!l.dataRef.current.disabled}),i=o?e.items.indexOf(o):-1;return i===-1||i===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:i,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=Jt(e,r=>[...r,{id:n.id,dataRef:n.dataRef}]);return{...e,...t}},6:(e,n)=>{let t=Jt(e,r=>{let o=r.findIndex(i=>i.id===n.id);return o!==-1&&r.splice(o,1),r});return{...e,...t,activationTrigger:1}}},Qt=a.createContext(null);Qt.displayName="MenuContext";function ht(e){let n=a.useContext(Qt);if(n===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ht),t}return n}function Xi(e,n){return le(n.type,Qi,e,n)}let el=a.Fragment;function tl(e,n){let{__demoMode:t=!1,...r}=e,o=a.useReducer(Xi,{__demoMode:t,menuState:t?0:1,buttonRef:a.createRef(),itemsRef:a.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:l,buttonRef:s},u]=o,d=ue(n);At([s,l],(p,g)=>{var v;u({type:1}),Pt(g,$t.Loose)||(p.preventDefault(),(v=s.current)==null||v.focus())},i===0);let f=I(()=>{u({type:1})}),h=a.useMemo(()=>({open:i===0,close:f}),[i,f]),b={ref:d};return a.createElement(Qt.Provider,{value:o},a.createElement(Rt,{value:le(i,{0:ce.Open,1:ce.Closed})},oe({ourProps:b,theirProps:r,slot:h,defaultTag:el,name:"Menu"})))}let nl="button";function rl(e,n){var t;let r=ve(),{id:o=`headlessui-menu-button-${r}`,...i}=e,[l,s]=ht("Menu.Button"),u=ue(l.buttonRef,n),d=Ie(),f=I(v=>{switch(v.key){case q.Space:case q.Enter:case q.ArrowDown:v.preventDefault(),v.stopPropagation(),s({type:0}),d.nextFrame(()=>s({type:2,focus:X.First}));break;case q.ArrowUp:v.preventDefault(),v.stopPropagation(),s({type:0}),d.nextFrame(()=>s({type:2,focus:X.Last}));break}}),h=I(v=>{switch(v.key){case q.Space:v.preventDefault();break}}),b=I(v=>{if(mt(v.currentTarget))return v.preventDefault();e.disabled||(l.menuState===0?(s({type:1}),d.nextFrame(()=>{var x;return(x=l.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})})):(v.preventDefault(),s({type:0})))}),p=a.useMemo(()=>({open:l.menuState===0}),[l]),g={ref:u,id:o,type:Dt(e,l.buttonRef),"aria-haspopup":"menu","aria-controls":(t=l.itemsRef.current)==null?void 0:t.id,"aria-expanded":l.menuState===0,onKeyDown:f,onKeyUp:h,onClick:b};return oe({ourProps:g,theirProps:i,slot:p,defaultTag:nl,name:"Menu.Button"})}let ol="div",il=$e.RenderStrategy|$e.Static;function ll(e,n){var t,r;let o=ve(),{id:i=`headlessui-menu-items-${o}`,...l}=e,[s,u]=ht("Menu.Items"),d=ue(s.itemsRef,n),f=De(s.itemsRef),h=Ie(),b=Qe(),p=b!==null?(b&ce.Open)===ce.Open:s.menuState===0;a.useEffect(()=>{let w=s.itemsRef.current;w&&s.menuState===0&&w!==(f==null?void 0:f.activeElement)&&w.focus({preventScroll:!0})},[s.menuState,s.itemsRef,f]),kn({container:s.itemsRef.current,enabled:s.menuState===0,accept(w){return w.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:w.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(w){w.setAttribute("role","none")}});let g=I(w=>{var T,O;switch(h.dispose(),w.key){case q.Space:if(s.searchQuery!=="")return w.preventDefault(),w.stopPropagation(),u({type:3,value:w.key});case q.Enter:if(w.preventDefault(),w.stopPropagation(),u({type:1}),s.activeItemIndex!==null){let{dataRef:k}=s.items[s.activeItemIndex];(O=(T=k.current)==null?void 0:T.domRef.current)==null||O.click()}yn(s.buttonRef.current);break;case q.ArrowDown:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:X.Next});case q.ArrowUp:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:X.Previous});case q.Home:case q.PageUp:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:X.First});case q.End:case q.PageDown:return w.preventDefault(),w.stopPropagation(),u({type:2,focus:X.Last});case q.Escape:w.preventDefault(),w.stopPropagation(),u({type:1}),Ee().nextFrame(()=>{var k;return(k=s.buttonRef.current)==null?void 0:k.focus({preventScroll:!0})});break;case q.Tab:w.preventDefault(),w.stopPropagation(),u({type:1}),Ee().nextFrame(()=>{to(s.buttonRef.current,w.shiftKey?ke.Previous:ke.Next)});break;default:w.key.length===1&&(u({type:3,value:w.key}),h.setTimeout(()=>u({type:4}),350));break}}),v=I(w=>{switch(w.key){case q.Space:w.preventDefault();break}}),x=a.useMemo(()=>({open:s.menuState===0}),[s]),S={"aria-activedescendant":s.activeItemIndex===null||(t=s.items[s.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(r=s.buttonRef.current)==null?void 0:r.id,id:i,onKeyDown:g,onKeyUp:v,role:"menu",tabIndex:0,ref:d};return oe({ourProps:S,theirProps:l,slot:x,defaultTag:ol,features:il,visible:p,name:"Menu.Items"})}let sl=a.Fragment;function al(e,n){let t=ve(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...i}=e,[l,s]=ht("Menu.Item"),u=l.activeItemIndex!==null?l.items[l.activeItemIndex].id===r:!1,d=a.useRef(null),f=ue(n,d);Q(()=>{if(l.__demoMode||l.menuState!==0||!u||l.activationTrigger===0)return;let k=Ee();return k.requestAnimationFrame(()=>{var F,z;(z=(F=d.current)==null?void 0:F.scrollIntoView)==null||z.call(F,{block:"nearest"})}),k.dispose},[l.__demoMode,d,u,l.menuState,l.activationTrigger,l.activeItemIndex]);let h=Ki(d),b=a.useRef({disabled:o,domRef:d,get textValue(){return h()}});Q(()=>{b.current.disabled=o},[b,o]),Q(()=>(s({type:5,id:r,dataRef:b}),()=>s({type:6,id:r})),[b,r]);let p=I(()=>{s({type:1})}),g=I(k=>{if(o)return k.preventDefault();s({type:1}),yn(l.buttonRef.current)}),v=I(()=>{if(o)return s({type:2,focus:X.Nothing});s({type:2,focus:X.Specific,id:r})}),x=In(),S=I(k=>x.update(k)),w=I(k=>{x.wasMoved(k)&&(o||u||s({type:2,focus:X.Specific,id:r,trigger:0}))}),T=I(k=>{x.wasMoved(k)&&(o||u&&s({type:2,focus:X.Nothing}))}),O=a.useMemo(()=>({active:u,disabled:o,close:p}),[u,o,p]);return oe({ourProps:{id:r,ref:f,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,disabled:void 0,onClick:g,onFocus:v,onPointerEnter:S,onMouseEnter:S,onPointerMove:w,onMouseMove:w,onPointerLeave:T,onMouseLeave:T},theirProps:i,slot:O,defaultTag:sl,name:"Menu.Item"})}let ul=ie(tl),cl=ie(rl),dl=ie(ll),fl=ie(al),vt=Object.assign(ul,{Button:cl,Items:dl,Item:fl}),Zn=a.createContext(null);function Jn(){let e=a.useContext(Zn);if(e===null){let n=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Jn),n}return e}function ml(){let[e,n]=a.useState([]);return[e.length>0?e.join(" "):void 0,a.useMemo(()=>function(t){let r=I(i=>(n(l=>[...l,i]),()=>n(l=>{let s=l.slice(),u=s.indexOf(i);return u!==-1&&s.splice(u,1),s}))),o=a.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props}),[r,t.slot,t.name,t.props]);return a.createElement(Zn.Provider,{value:o},t.children)},[n])]}let pl="label";function hl(e,n){let t=ve(),{id:r=`headlessui-label-${t}`,passive:o=!1,...i}=e,l=Jn(),s=ue(n);Q(()=>l.register(r),[r,l.register]);let u={ref:s,...l.props,id:r};return o&&("onClick"in u&&(delete u.htmlFor,delete u.onClick),"onClick"in i&&delete i.onClick),oe({ourProps:u,theirProps:i,slot:l.slot||{},defaultTag:pl,name:l.name||"Label"})}let vl=ie(hl),gl=Object.assign(vl,{});function bl(e=0){let[n,t]=a.useState(e),r=et(),o=a.useCallback(u=>{r.current&&t(d=>d|u)},[n,r]),i=a.useCallback(u=>!!(n&u),[n]),l=a.useCallback(u=>{r.current&&t(d=>d&~u)},[t,r]),s=a.useCallback(u=>{r.current&&t(d=>d^u)},[t]);return{flags:n,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}let Xt=a.createContext(null);Xt.displayName="GroupContext";let xl=a.Fragment;function wl(e){var n;let[t,r]=a.useState(null),[o,i]=ml(),[l,s]=Vn(),u=a.useMemo(()=>({switch:t,setSwitch:r,labelledby:o,describedby:l}),[t,r,o,l]),d={},f=e;return a.createElement(s,{name:"Switch.Description"},a.createElement(i,{name:"Switch.Label",props:{htmlFor:(n=u.switch)==null?void 0:n.id,onClick(h){t&&(h.currentTarget.tagName==="LABEL"&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},a.createElement(Xt.Provider,{value:u},oe({ourProps:d,theirProps:f,defaultTag:xl,name:"Switch.Group"}))))}let yl="button";function El(e,n){var t;let r=ve(),{id:o=`headlessui-switch-${r}`,checked:i,defaultChecked:l=!1,onChange:s,disabled:u=!1,name:d,value:f,form:h,...b}=e,p=a.useContext(Xt),g=a.useRef(null),v=ue(g,n,p===null?null:p.setSwitch),[x,S]=gn(i,s,l),w=I(()=>S==null?void 0:S(!x)),T=I(D=>{if(mt(D.currentTarget))return D.preventDefault();D.preventDefault(),w()}),O=I(D=>{D.key===q.Space?(D.preventDefault(),w()):D.key===q.Enter&&co(D.currentTarget)}),k=I(D=>D.preventDefault()),F=a.useMemo(()=>({checked:x}),[x]),z={id:o,ref:v,role:"switch",type:Dt(e,g),tabIndex:e.tabIndex===-1?0:(t=e.tabIndex)!=null?t:0,"aria-checked":x,"aria-labelledby":p==null?void 0:p.labelledby,"aria-describedby":p==null?void 0:p.describedby,disabled:u,onClick:T,onKeyUp:O,onKeyPress:k},Y=Ie();return a.useEffect(()=>{var D;let A=(D=g.current)==null?void 0:D.closest("form");A&&l!==void 0&&Y.addEventListener(A,"reset",()=>{S(l)})},[g,S]),a.createElement(a.Fragment,null,d!=null&&x&&a.createElement(Je,{features:We.Hidden,...ft({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:u,form:h,checked:x,name:d,value:f})}),oe({ourProps:z,theirProps:b,slot:F,defaultTag:yl,name:"Switch"}))}let Sl=ie(El),Tl=wl,Cl=Object.assign(Sl,{Group:Tl,Label:gl,Description:Yn});function Ol(e){let n={called:!1};return(...t)=>{if(!n.called)return n.called=!0,e(...t)}}function en(e,...n){e&&n.length>0&&e.classList.add(...n)}function tn(e,...n){e&&n.length>0&&e.classList.remove(...n)}function jl(e,n){let t=Ee();if(!e)return t.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,l]=[r,o].map(u=>{let[d=0]=u.split(",").filter(Boolean).map(f=>f.includes("ms")?parseFloat(f):parseFloat(f)*1e3).sort((f,h)=>h-f);return d}),s=i+l;if(s!==0){t.group(d=>{d.setTimeout(()=>{n(),d.dispose()},s),d.addEventListener(e,"transitionrun",f=>{f.target===f.currentTarget&&d.dispose()})});let u=t.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(n(),u())})}else n();return t.add(()=>n()),t.dispose}function Il(e,n,t,r){let o=t?"enter":"leave",i=Ee(),l=r!==void 0?Ol(r):()=>{};o==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=le(o,{enter:()=>n.enter,leave:()=>n.leave}),u=le(o,{enter:()=>n.enterTo,leave:()=>n.leaveTo}),d=le(o,{enter:()=>n.enterFrom,leave:()=>n.leaveFrom});return tn(e,...n.base,...n.enter,...n.enterTo,...n.enterFrom,...n.leave,...n.leaveFrom,...n.leaveTo,...n.entered),en(e,...n.base,...s,...d),i.nextFrame(()=>{tn(e,...n.base,...s,...d),en(e,...n.base,...s,...u),jl(e,()=>(tn(e,...n.base,...s),en(e,...n.base,...n.entered),l()))}),i.dispose}function kl({immediate:e,container:n,direction:t,classes:r,onStart:o,onStop:i}){let l=et(),s=Ie(),u=Te(t);Q(()=>{e&&(u.current="enter")},[e]),Q(()=>{let d=Ee();s.add(d.dispose);let f=n.current;if(f&&u.current!=="idle"&&l.current)return d.dispose(),o.current(u.current),d.add(Il(f,r.current,u.current==="enter",()=>{d.dispose(),i.current(u.current)})),d.dispose},[t])}function Me(e=""){return e.split(/\s+/).filter(n=>n.length>1)}let gt=a.createContext(null);gt.displayName="TransitionContext";var Fl=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Fl||{});function Nl(){let e=a.useContext(gt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function $l(){let e=a.useContext(bt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let bt=a.createContext(null);bt.displayName="NestingContext";function xt(e){return"children"in e?xt(e.children):e.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n==="visible").length>0}function Qn(e,n){let t=Te(e),r=a.useRef([]),o=et(),i=Ie(),l=I((p,g=Pe.Hidden)=>{let v=r.current.findIndex(({el:x})=>x===p);v!==-1&&(le(g,{[Pe.Unmount](){r.current.splice(v,1)},[Pe.Hidden](){r.current[v].state="hidden"}}),i.microTask(()=>{var x;!xt(r)&&o.current&&((x=t.current)==null||x.call(t))}))}),s=I(p=>{let g=r.current.find(({el:v})=>v===p);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:p,state:"visible"}),()=>l(p,Pe.Unmount)}),u=a.useRef([]),d=a.useRef(Promise.resolve()),f=a.useRef({enter:[],leave:[],idle:[]}),h=I((p,g,v)=>{u.current.splice(0),n&&(n.chains.current[g]=n.chains.current[g].filter(([x])=>x!==p)),n==null||n.chains.current[g].push([p,new Promise(x=>{u.current.push(x)})]),n==null||n.chains.current[g].push([p,new Promise(x=>{Promise.all(f.current[g].map(([S,w])=>w)).then(()=>x())})]),g==="enter"?d.current=d.current.then(()=>n==null?void 0:n.wait.current).then(()=>v(g)):v(g)}),b=I((p,g,v)=>{Promise.all(f.current[g].splice(0).map(([x,S])=>S)).then(()=>{var x;(x=u.current.shift())==null||x()}).then(()=>v(g))});return a.useMemo(()=>({children:r,register:s,unregister:l,onStart:h,onStop:b,wait:d,chains:f}),[s,l,r,h,b,f,d])}function Pl(){}let Ml=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Xn(e){var n;let t={};for(let r of Ml)t[r]=(n=e[r])!=null?n:Pl;return t}function Al(e){let n=a.useRef(Xn(e));return a.useEffect(()=>{n.current=Xn(e)},[e]),n}let Dl="div",er=$e.RenderStrategy;function Ll(e,n){var t,r;let{beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s,enter:u,enterFrom:d,enterTo:f,entered:h,leave:b,leaveFrom:p,leaveTo:g,...v}=e,x=a.useRef(null),S=ue(x,n),w=(t=v.unmount)==null||t?Pe.Unmount:Pe.Hidden,{show:T,appear:O,initial:k}=Nl(),[F,z]=a.useState(T?"visible":"hidden"),Y=$l(),{register:D,unregister:A}=Y;a.useEffect(()=>D(x),[D,x]),a.useEffect(()=>{if(w===Pe.Hidden&&x.current){if(T&&F!=="visible"){z("visible");return}return le(F,{hidden:()=>A(x),visible:()=>D(x)})}},[F,x,D,A,T,w]);let R=Te({base:Me(v.className),enter:Me(u),enterFrom:Me(d),enterTo:Me(f),entered:Me(h),leave:Me(b),leaveFrom:Me(p),leaveTo:Me(g)}),Z=Al({beforeEnter:o,afterEnter:i,beforeLeave:l,afterLeave:s}),re=ze();a.useEffect(()=>{if(re&&F==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,F,re]);let L=k&&!O,E=O&&T&&k,ae=!re||L?"idle":T?"enter":"leave",H=bl(0),se=I(be=>le(be,{enter:()=>{H.addFlag(ce.Opening),Z.current.beforeEnter()},leave:()=>{H.addFlag(ce.Closing),Z.current.beforeLeave()},idle:()=>{}})),G=I(be=>le(be,{enter:()=>{H.removeFlag(ce.Opening),Z.current.afterEnter()},leave:()=>{H.removeFlag(ce.Closing),Z.current.afterLeave()},idle:()=>{}})),ee=Qn(()=>{z("hidden"),A(x)},Y),me=a.useRef(!1);kl({immediate:E,container:x,classes:R,direction:ae,onStart:Te(be=>{me.current=!0,ee.onStart(x,be,se)}),onStop:Te(be=>{me.current=!1,ee.onStop(x,be,G),be==="leave"&&!xt(ee)&&(z("hidden"),A(x))})});let ge=v,Ce={ref:S};return E?ge={...ge,className:ct(v.className,...R.current.enter,...R.current.enterFrom)}:me.current&&(ge.className=ct(v.className,(r=x.current)==null?void 0:r.className),ge.className===""&&delete ge.className),a.createElement(bt.Provider,{value:ee},a.createElement(Rt,{value:le(F,{visible:ce.Open,hidden:ce.Closed})|H.flags},oe({ourProps:Ce,theirProps:ge,defaultTag:Dl,features:er,visible:F==="visible",name:"Transition.Child"})))}function _l(e,n){let{show:t,appear:r=!1,unmount:o=!0,...i}=e,l=a.useRef(null),s=ue(l,n);ze();let u=Qe();if(t===void 0&&u!==null&&(t=(u&ce.Open)===ce.Open),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,f]=a.useState(t?"visible":"hidden"),h=Qn(()=>{f("hidden")}),[b,p]=a.useState(!0),g=a.useRef([t]);Q(()=>{b!==!1&&g.current[g.current.length-1]!==t&&(g.current.push(t),p(!1))},[g,t]);let v=a.useMemo(()=>({show:t,appear:r,initial:b}),[t,r,b]);a.useEffect(()=>{if(t)f("visible");else if(!xt(h))f("hidden");else{let T=l.current;if(!T)return;let O=T.getBoundingClientRect();O.x===0&&O.y===0&&O.width===0&&O.height===0&&f("hidden")}},[t,h]);let x={unmount:o},S=I(()=>{var T;b&&p(!1),(T=e.beforeEnter)==null||T.call(e)}),w=I(()=>{var T;b&&p(!1),(T=e.beforeLeave)==null||T.call(e)});return a.createElement(bt.Provider,{value:h},a.createElement(gt.Provider,{value:v},oe({ourProps:{...x,as:a.Fragment,children:a.createElement(tr,{ref:s,...x,...i,beforeEnter:S,beforeLeave:w})},theirProps:{},defaultTag:a.Fragment,features:er,visible:d==="visible",name:"Transition"})))}function Rl(e,n){let t=a.useContext(gt)!==null,r=Qe()!==null;return a.createElement(a.Fragment,null,!t&&r?a.createElement(nn,{ref:n,...e}):a.createElement(tr,{ref:n,...e}))}let nn=ie(_l),tr=ie(Ll),Bl=ie(Rl),Re=Object.assign(nn,{Child:Bl,Root:nn});function zl({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 Wl=C.forwardRef(zl);function Hl({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 Ul=C.forwardRef(Hl);function Vl({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 Yl=C.forwardRef(Vl);function ql({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 Kl=C.forwardRef(ql);function Gl({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 Zl=C.forwardRef(Gl);function Jl({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 nr=C.forwardRef(Jl);function Ql({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 Xl=C.forwardRef(Ql);function es({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 ts=C.forwardRef(es);function ns({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 rs=C.forwardRef(ns),wt={warning:{color:"bg-yellow-50",icon:m.jsx(Xl,{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:m.jsx(rs,{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:m.jsx(Yl,{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:m.jsx(ts,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}};let rr;const os=({type:e="info",title:n,message:t,active:r=!1,time:o=1e3,dispatch:i})=>{const{width:l}=Ot(),[s,u]=a.useState(!1);return a.useEffect(()=>r?(rr=window.setTimeout(()=>{i({type:"ALERT",payload:{title:"",message:"",typeAlert:"",active:!1}})},o),u(!0)):()=>window.clearTimeout(rr),[r,i,o]),m.jsx("div",{className:"fixed top-2.5 w-80 3xs:w-96 z-50",style:{left:`calc(50% - ${l<=470?"160px":"192px"})`},children:m.jsx(Re,{as:a.Fragment,show:s,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:m.jsxs("div",{className:N("rounded-md p-4 text-center",wt[e].color),children:[m.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[wt[e].icon,m.jsx("h3",{className:N("text-sm font-medium ml-3",wt[e].colorTitle),children:n})]}),m.jsx("div",{className:N("mt-2 text-sm",wt[e].colorText),children:m.jsx("p",{children:t})})]})})})};function is({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 ls=C.forwardRef(is);function ss({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 as=C.forwardRef(ss);function us({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 cs=C.forwardRef(us);function ds({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 fs=C.forwardRef(ds),ms=({src:e,alt:n,width:t,height:r,priority:o=!1,className:i="",classNameIcon:l="",isIcon:s=!0,acronym:u=""})=>{function d(){if(typeof u!="string")return u;const f=u.toLowerCase(),h=f.split(" "),b=h[h.length-1];return f.charAt(0)+b.charAt(0)}return m.jsx(m.Fragment,{children:e?m.jsx("img",{src:e,alt:n,width:t,height:r,className:N(i!==""&&i),priority:o,sizes:"100vw",style:{width:t,height:r}}):s?m.jsx(cs,{className:N("bg-white text-default-5",l!==""?l:"w-7 h-7")}):m.jsx("div",{className:N("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",l!==""?l:"w-7 h-7"),children:d()})})},ps=({steps:e,onClick:n})=>{const[t,r]=a.useState(0),o=i=>{r(i),n(i)};return m.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:m.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(e).fill(1).map((i,l)=>m.jsx("li",{children:t!==l?m.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>o(l),"data-testid":`step-${l}`,children:m.jsx("span",{className:"sr-only",children:"step"})}):m.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[m.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:m.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),m.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),m.jsx("span",{className:"sr-only",children:"step"})]})},l))})})};var or={exports:{}};/*!
30
+ <%s key={someKey} {...props} />`,$e,le,Pr,le),at[le+$e]=!0}}return e===a?Or(z):Rr(z),z}}function Fr(e,l,d){return st(e,l,d,!0)}function Ar(e,l,d){return st(e,l,d,!1)}var $r=Ar,Mr=Fr;fe.Fragment=a,fe.jsx=$r,fe.jsxs=Mr}()),fe}process.env.NODE_ENV==="production"?ke.exports=ht():ke.exports=xt();var t=ke.exports;function pt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 gt=u.forwardRef(pt);function vt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 wt=u.forwardRef(vt);function bt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 yt=u.forwardRef(bt);function jt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 Et=u.forwardRef(jt);function Ct({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 Nt=u.forwardRef(Ct);function kt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 Be=u.forwardRef(kt);function St({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 Tt=u.forwardRef(St);function _t({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 Rt=u.forwardRef(_t);function Ot({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 Ft=u.forwardRef(Ot),pe={warning:{color:"bg-yellow-50",icon:t.jsx(Tt,{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:t.jsx(Ft,{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:t.jsx(yt,{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:t.jsx(Rt,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"}),colorTitle:"text-blue-800",colorText:"text-blue-700"}};let De;const At=({type:r="info",title:n,message:i,active:a=!1,time:c=1e3,dispatch:s})=>{const{width:o}=Ne(),[h,f]=m.useState(!1);return m.useEffect(()=>a?(De=window.setTimeout(()=>{s({type:"ALERT",payload:{title:"",message:"",typeAlert:"",active:!1}})},c),f(!0)):()=>window.clearTimeout(De),[a,s,c]),t.jsx("div",{className:"fixed top-2.5 w-80 3xs:w-96 z-50",style:{left:`calc(50% - ${o<=470?"160px":"192px"})`},children:t.jsx(L.Transition,{as:m.Fragment,show:h,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:t.jsxs("div",{className:v("rounded-md p-4 text-center",pe[r].color),children:[t.jsxs("div",{className:"flex justify-center flex-shrink-0",children:[pe[r].icon,t.jsx("h3",{className:v("text-sm font-medium ml-3",pe[r].colorTitle),children:n})]}),t.jsx("div",{className:v("mt-2 text-sm",pe[r].colorText),children:t.jsx("p",{children:i})})]})})})};function $t({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 Mt=u.forwardRef($t);function Pt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 Lt=u.forwardRef(Pt);function Bt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 Dt=u.forwardRef(Bt);function Wt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 zt=u.forwardRef(Wt),It=({src:r,alt:n,width:i,height:a,priority:c=!1,className:s="",classNameIcon:o="",isIcon:h=!0,acronym:f=""})=>{function p(){if(typeof f!="string")return f;const g=f.toLowerCase(),y=g.split(" "),x=y[y.length-1];return g.charAt(0)+x.charAt(0)}return t.jsx(t.Fragment,{children:r?t.jsx("img",{src:r,alt:n,width:i,height:a,className:v(s!==""&&s),priority:c,sizes:"100vw",style:{width:i,height:a}}):h?t.jsx(Dt,{className:v("bg-white text-default-5",o!==""?o:"w-7 h-7")}):t.jsx("div",{className:v("bg-gray-200 text-default-5 rounded-full font-bold uppercase flex justify-center items-center",o!==""?o:"w-7 h-7"),children:p()})})},Zt=({steps:r,onClick:n})=>{const[i,a]=m.useState(0),c=s=>{a(s),n(s)};return t.jsx("nav",{className:"flex items-center justify-center w-full","aria-label":"Progress","data-testid":"bullets",children:t.jsx("ol",{role:"list",className:"flex items-center space-x-5",children:new Array(r).fill(1).map((s,o)=>t.jsx("li",{children:i!==o?t.jsx("div",{className:"cursor-pointer block h-2.5 w-2.5 rounded-full bg-gray-500 hover:bg-gray-600",onClick:()=>c(o),"data-testid":`step-${o}`,children:t.jsx("span",{className:"sr-only",children:"step"})}):t.jsxs("div",{className:"relative flex items-center justify-center cursor-pointer","aria-current":"step",children:[t.jsx("span",{className:"absolute flex h-5 w-5 p-px","aria-hidden":"true",children:t.jsx("span",{className:"h-full w-full rounded-full bg-gray-300"})}),t.jsx("span",{className:"relative block h-2.5 w-2.5 rounded-full bg-gray-500","aria-hidden":"true"}),t.jsx("span",{className:"sr-only",children:"step"})]})},o))})})};var We={exports:{}};/*!
37
31
  Copyright (c) 2018 Jed Watson.
38
32
  Licensed under the MIT License (MIT), see
39
33
  http://jedwatson.github.io/classnames
40
- */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var i="",l=0;l<arguments.length;l++){var s=arguments[l];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return t.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var l="";for(var s in i)n.call(i,s)&&i[s]&&(l=o(l,s));return l}function o(i,l){return l?i?i+" "+l:i+l:i}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(or);var hs=or.exports;const Ae=Fr(hs),ir=({className:e="text-sm w-full rounded-md",children:n,icon:t=null,edge:r=null,disabled:o=!1,type:i="button",onClick:l,id:s})=>{const u=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return m.jsxs("button",{className:N("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:i,onClick:l,disabled:o,"data-testid":`button-outline-${s}`,id:`button-outline-${s}`,children:[r==="start"&&t!==null&&m.jsx("span",{children:t}),m.jsx("span",{className:N("flex",u),id:s,children:n}),r==="end"&&t!==null&&m.jsx("span",{children:t})]})},lr=({children:e,className:n="",icon:t=null,edge:r=null,disabled:o=!1,type:i="button",onClick:l,id:s})=>{const u=Ae({"ml-2":r==="start"&&t!==null,"mr-2":r==="end"&&t!==null});return m.jsxs("button",{className:`${n} flex justify-center items-center`,edge:r,type:i,onClick:l,disabled:o,"data-testid":`button-${s}`,children:[r==="start"&&t!==null&&m.jsx("span",{children:t}),m.jsx("span",{className:u,children:e}),r==="end"&&t!==null&&m.jsx("span",{children:t})]})},yt=({children:e,classNameButton:n="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:t="",icon:r=null,edge:o=null,disabled:i=!1,type:l="button",onClick:s,id:u,outline:d="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:f=""})=>{const[h,b]=a.useState(!1),p=Ae({"ml-2":o==="start"&&r!==null,"mr-2":o==="end"&&r!==null}),g=()=>{s&&s()};return m.jsx("div",{className:N("rounded-md p-0.5",f!==""&&f),style:{boxShadow:h?d:"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:m.jsxs("button",{className:N("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",i&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",i?n.replace(/\bbg-\w+\b/g,""):n),type:l,onClick:g,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:i,"data-testid":`button-solid-${u}`,children:[o==="start"&&r!==null&&m.jsx("span",{className:"flex",children:r}),m.jsx("span",{className:N(t.length===0&&p,t.length!==0&&t),children:e}),o==="end"&&r!==null&&m.jsx("span",{children:r})]})})},vs=({label:e=null,checked:n=!1,onChange:t,id:r,className:o="",classNameCheckbox:i="h-4 w-4",style:l={},disabled:s=!1})=>{const[u,d]=a.useState(!1);return a.useEffect(()=>{d(n)},[n]),m.jsxs("div",{className:"flex items-center",style:l,"data-testid":`container-check-${r}`,children:[m.jsx("input",{checked:u,id:`${e}-${r}`,value:r,"aria-describedby":"comments-description",type:"checkbox",onChange:t,className:N("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",i!==""&&i),"data-testid":`checkbox-${r}`,disabled:s}),e!==null?m.jsx("label",{htmlFor:`${e}-${r}`,className:`ml-2.5 font-normal cursor-pointer ${o}`,id:`label-${r}`,"data-testid":"label",children:e}):null]})};function gs({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const bs=C.forwardRef(gs);function xs({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const ws=C.forwardRef(xs);function ys({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Es=C.forwardRef(ys);function Ss({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 Ts=C.forwardRef(Ss);function Cs({title:e,titleId:n,...t},r){return C.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:r,"aria-labelledby":n},t),e?C.createElement("title",{id:n},e):null,C.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 Os=C.forwardRef(Cs);function sr({children:e,className:n="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:t="",isOpen:r=!1,setIsOpen:o,showIconSuccess:i=!0,showButton:l=!0}){return m.jsxs(m.Fragment,{children:[m.jsx("style",{children:`
34
+ */(function(r){(function(){var n={}.hasOwnProperty;function i(){for(var s="",o=0;o<arguments.length;o++){var h=arguments[o];h&&(s=c(s,a(h)))}return s}function a(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return i.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var h in s)n.call(s,h)&&s[h]&&(o=c(o,h));return o}function c(s,o){return o?s?s+" "+o:s+o:s}r.exports?(i.default=i,r.exports=i):window.classNames=i})()})(We);var Ut=We.exports;const re=mt(Ut),ze=({className:r="text-sm w-full rounded-md",children:n,icon:i=null,edge:a=null,disabled:c=!1,type:s="button",onClick:o,id:h})=>{const f=re({"ml-2":a==="start"&&i!==null,"mr-2":a==="end"&&i!==null});return t.jsxs("button",{className:v("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",r),type:s,onClick:o,disabled:c,"data-testid":`button-outline-${h}`,id:`button-outline-${h}`,children:[a==="start"&&i!==null&&t.jsx("span",{children:i}),t.jsx("span",{className:v("flex",f),id:h,children:n}),a==="end"&&i!==null&&t.jsx("span",{children:i})]})},Ie=({children:r,className:n="",icon:i=null,edge:a=null,disabled:c=!1,type:s="button",onClick:o,id:h})=>{const f=re({"ml-2":a==="start"&&i!==null,"mr-2":a==="end"&&i!==null});return t.jsxs("button",{className:`${n} flex justify-center items-center`,edge:a,type:s,onClick:o,disabled:c,"data-testid":`button-${h}`,children:[a==="start"&&i!==null&&t.jsx("span",{children:i}),t.jsx("span",{className:f,children:r}),a==="end"&&i!==null&&t.jsx("span",{children:i})]})},ge=({children:r,classNameButton:n="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:i="",icon:a=null,edge:c=null,disabled:s=!1,type:o="button",onClick:h,id:f,outline:p="0px 0px 0px 2px #6366F1, 0px 0px 0px 2px #FFF, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameContainer:g=""})=>{const[y,x]=m.useState(!1),C=re({"ml-2":c==="start"&&a!==null,"mr-2":c==="end"&&a!==null}),F=()=>{h&&h()};return t.jsx("div",{className:v("rounded-md p-0.5",g!==""&&g),style:{boxShadow:y?p:"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:t.jsxs("button",{className:v("flex justify-center items-center text-sm leading-6 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",s&&"text-white bg-gray-300 rounded focus:outline-none cursor-default",s?n.replace(/\bbg-\w+\b/g,""):n),type:o,onClick:F,onFocus:()=>x(!0),onBlur:()=>x(!1),disabled:s,"data-testid":`button-solid-${f}`,children:[c==="start"&&a!==null&&t.jsx("span",{className:"flex",children:a}),t.jsx("span",{className:v(i.length===0&&C,i.length!==0&&i),children:r}),c==="end"&&a!==null&&t.jsx("span",{children:a})]})})},Yt=({label:r=null,checked:n=!1,onChange:i,id:a,className:c="",classNameCheckbox:s="h-4 w-4",style:o={},disabled:h=!1})=>{const[f,p]=m.useState(!1);return m.useEffect(()=>{p(n)},[n]),t.jsxs("div",{className:"flex items-center",style:o,"data-testid":`container-check-${a}`,children:[t.jsx("input",{checked:f,id:`${r}-${a}`,value:a,"aria-describedby":"comments-description",type:"checkbox",onChange:i,className:v("cursor-pointer rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",s!==""&&s),"data-testid":`checkbox-${a}`,disabled:h}),r!==null?t.jsx("label",{htmlFor:`${r}-${a}`,className:`ml-2.5 font-normal cursor-pointer ${c}`,id:`label-${a}`,"data-testid":"label",children:r}):null]})};function Vt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Ht=u.forwardRef(Vt);function Gt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const qt=u.forwardRef(Gt);function Jt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const Kt=u.forwardRef(Jt);function Xt({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 Qt=u.forwardRef(Xt);function er({title:r,titleId:n,...i},a){return u.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:a,"aria-labelledby":n},i),r?u.createElement("title",{id:n},r):null,u.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 tr=u.forwardRef(er);function Ze({children:r,className:n="sm:max-w-sm w-11/12 sm:my-8",classNameContainer:i="",isOpen:a=!1,setIsOpen:c,showIconSuccess:s=!0,showButton:o=!0}){return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:`
41
35
  .bg-opacity-35 {
42
36
  opacity: .35;
43
37
  }
44
- `}),m.jsx(Re.Root,{show:r,as:a.Fragment,children:m.jsxs(qn,{as:"div",className:"relative z-50 relative",onClose:o,"data-testid":"modal",children:[m.jsx(Re.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx("div",{className:"fixed inset-0 bg-opacity-35 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>o(!1)})}),m.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:m.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:m.jsx(Re.Child,{as:a.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:m.jsxs(qn.Panel,{className:N("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left shadow-xl transition-all sm:w-full sm:pt-3 sm:px-3",n!==""&&n),children:[i&&m.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:m.jsx(bs,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),m.jsx("div",{className:N(t!==""&&t),"data-testid":"content",children:e}),l&&m.jsx("div",{className:"mt-5 sm:mt-6",children:m.jsx(yt,{id:"close-modal",onClick:()=>o(!1),children:"Cerrar"})}),m.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})]})}const js=({isOpenModalConfirmation:e,setIsOpenModalConfirmation:n,close:t,title:r="¿Estás seguro de abandonar la creación de la acción?",description:o="La información se perderá si no creas la acción",classNameTitle:i="",classNameDescription:l=""})=>{const s=()=>{n(!1),t()};return m.jsxs(sr,{isOpen:e,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[m.jsx("p",{className:N("text-center text-sm",i!==""&&i),children:r}),m.jsx("p",{className:N("text-center text-sm",l!==""&&l),children:o}),m.jsxs("div",{className:"flex w-full justify-center mt-5",children:[m.jsx(ir,{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:()=>n(),id:"cancel",children:"Cancelar"}),m.jsx(yt,{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:s,id:"confirmation",children:"Aceptar"})]})]})},Is=({className:e="",style:n={}})=>m.jsx("div",{className:N("w-px",e!==""&&e),style:n}),ks=({onClick:e,id:n="",className:t=""})=>m.jsxs("div",{className:N("flex items-center text-default-5",t!==""&&t),"data-testid":n,children:[m.jsx(ls,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:e}),m.jsx("span",{onClick:e,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),rn=({placeholder:e="",label:n="",htmlFor:t,type:r="text",name:o,handleChange:i,onClick:l=()=>{},value:s,isReadOnly:u=!1,isError:d=!1,helperText:f="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainerInput:g="",classNameContainer:v="",className:x="",icon:S=null,onKeyDown:w,onFocus:T})=>{const[O,k]=a.useState(!1),F=Ae({"ring-red-300 focus:ring-red-300 text-red-900":d||O,"focus:ring-indigo-600 text-gray-500":!d&&!O}),z=Y=>{if(i&&i(Y),r!=="email")return;const{value:D}=Y.target,A=fn(D);k(!A)};return m.jsxs("div",{"data-testid":`container-input-${b}`,className:v,children:[n!==""&&m.jsx("label",{htmlFor:t,className:N("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:N("relative mt-1 rounded-md",g!==""&&g),children:[m.jsx("input",{id:b,name:o,type:r,autoComplete:h,placeholder:e,onChange:z,onClick:l,onKeyDown:w,onFocus:T,value:s,readOnly:u,"data-testid":`input-${b}`,className:N("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",F,x!==""&&x)}),S!==null&&m.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:S}),d&&S===null&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(nr,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),f.length===0||!d?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:f})]})};function Et({className:e="w-6 h-6",color:n="#3730a3"}){return m.jsxs("svg",{className:N("fill-current animate-spin",e),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),m.jsx("path",{fill:n,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 Fs(){return m.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:[m.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"}),m.jsx(Et,{className:"w-8 h-8 animate-spin"})]})}const ar=({height:e="36px",style:n={},label:t="",onChange:r,isReadOnly:o=!1,isError:i=!1,helperText:l="",name:s,id:u,className:d="",classNameLabel:f="",classNameInput:h="",options:b,value:p=-1,defaultValue:g={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:v="label",defaultId:x="value",bgOptionSelect:S="bg-indigo-600",isSearch:w=!1,loading:T=!1})=>{const[O,k]=a.useState(""),[F,z]=a.useState(g),[Y,D]=a.useState(!1);a.useEffect(()=>{if(p===-1||(b==null?void 0:b.length)===0)return;const L=b==null?void 0:b.find(E=>E[x]===p);L&&z(L)},[p,b,x]),a.useEffect(()=>{if(p==="clear")return z({value:-1,label:"",iconStart:null,iconEnd:null})},[p]);const A=O===""?b:b.filter(L=>L[v].toLowerCase().includes(O.toLowerCase())),R=Ae({"ring-red-300 focus:ring-red-300 text-red-900":i&&!o,"text-gray-500":!i,"focus:ring-indigo-600":!i&&!o}),Z=Ae({"text-red-400":i&&!o,"text-gray-400":!i}),re=L=>{z(L),r({target:{value:L,checked:!1,name:s,type:void 0,id:L[x]}})};return m.jsxs(Fe,{as:"div",value:F,onChange:re,children:[m.jsx(Fe.Label,{className:N("block text-sm font-medium leading-6 text-gray-500 mb-0.5",f!==""&&f),children:t}),m.jsxs("div",{className:N("relative",d!==""&&d),children:[m.jsxs(Fe.Button,{className:"w-full","data-testid":`listbox-button-${u}`,children:[F.iconStart&&m.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:F.iconStart}),m.jsx(Fe.Input,{className:N("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",!i&&!o&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",o&&"focus:ring-gray-300",R,h!==""&&h),onChange:L=>k(L.target.value),displayValue:L=>{var E;return(E=L[v])==null?void 0:E.trim()},autoComplete:"false",readOnly:!w||o,style:{height:e,...n},"data-testid":"input-search",onClick:()=>D(o?!1:!Y),onBlur:()=>D(!1)})]}),F.iconEnd&&m.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:F.iconEnd}),m.jsx(Fe.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>D(o?!1:!Y),"data-testid":"arrow-button",children:Y?m.jsx(Zl,{className:N("h-5 w-5",Z),"aria-hidden":"true"}):m.jsx(Kl,{className:N("h-5 w-5",Z),"aria-hidden":"true"})}),!o&&m.jsx(m.Fragment,{children:T?m.jsx(Fe.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:m.jsx(Et,{})}):(A??[]).length>0?m.jsx(Fe.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",children:A.map((L,E)=>m.jsx(Fe.Option,{value:L,className:N(L[x]===F[x]?`${S} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${S}`),"data-testid":`select-${u}-${L[x]}`,children:m.jsxs("div",{className:"flex justify-between items-center",children:[m.jsxs("div",{className:"flex items-center",children:[L.iconStart&&m.jsx("span",{className:"mr-2","aria-hidden":"true",children:L.iconStart}),m.jsx("span",{className:"block font-normal break-all",children:L[v]})]}),L.iconEnd&&m.jsx("span",{className:"ml-2","aria-hidden":"true",children:L.iconEnd})]})},E))}):m.jsx(Fe.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:m.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),l.length>0&&i&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${u}`,children:l})]})},Ns=({placeholder:e="",label:n="",htmlFor:t,name:r,handleChange:o,onClick:i=()=>{},value:l,valueSelect:s,isReadOnly:u=!1,isError:d=!1,helperText:f="",autocomplete:h="on",id:b,classNameLabel:p="",classNameContainer:g="",className:v="",onKeyDown:x,options:S,idSelect:w})=>{const{width:T}=Ot(),O=Ae({"ring-red-300 focus:ring-red-300 text-red-900":d,"focus:ring-indigo-600 text-gray-500":!d});return m.jsxs("div",{"data-testid":`container-input-${b}`,className:g,children:[n!==""&&m.jsx("label",{htmlFor:t,className:N("block text-sm font-medium leading-6",p!==""?p:"text-gray-700"),"data-testid":`label-${b}`,children:n}),m.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[m.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:m.jsx(ar,{name:w,onChange:k=>o(k),id:w,options:S,value:s,isReadOnly:u,className:"w-20",height:T<=640?"28px":"32px",classNameInput:"ml-3.5",style:{paddingRight:0,width:"45px",boxShadow:"none"},isDisabledFocus:!0})}),m.jsx("input",{id:b,name:r,type:"text",autoComplete:h,placeholder:e,readOnly:u,"data-testid":`input-${b}`,onClick:i,onKeyDown:x,onChange:k=>o(k),value:l,className:N("block w-full rounded-md border-0 py-1.5 pl-20 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",O,v!==""&&v)}),d&&m.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:m.jsx(nr,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),f.length===0||!d?null:m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${b}`,children:f})]})},$s=({setValuesDefault:e})=>{const[n,t]=a.useState(!1),r=()=>{t(!n),e("status",!n)};return m.jsxs("div",{className:"flex",children:[m.jsxs(Cl,{checked:n,onChange:r,className:N("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",n?"bg-success-1":"bg-gray-200"),"data-testid":"switch",children:[m.jsx("span",{className:"sr-only",children:"Use setting"}),m.jsx("span",{"aria-hidden":"true",className:N("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",n?"translate-x-full":"translate-x-0")})]}),m.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end","data-testid":"text-switch",children:n?"Activo":"Inactivo"})]})};function Ps({label:e="",id:n,htmlFor:t="",classNameLabel:r="",className:o="",rows:i=4,name:l,placeholder:s="",helperText:u="",isReadOnly:d=!1,isError:f=!1,onChange:h,value:b,idInput:p,nameInput:g,placeholderInput:v="",isReadOnlyInput:x=!1,valueInput:S,infoTop:w=null,infoBottom:T=null,classNameInfoTop:O="h-4",classNameInfoBottom:k="h-2",isInputTitle:F=!1,scrollHeightTest:z=!1}){const Y=a.useRef(null),[D,A]=a.useState(0);a.useEffect(()=>{const{current:Z}=Y;Z===null||z||A(Z.scrollHeight)},[Y,b,z]),a.useEffect(()=>{z&&A(800)},[z]);const R=Ae({"ring-red-300 focus:ring-red-300 text-red-900":f,"focus:ring-indigo-600 text-gray-700":!f});return m.jsxs(m.Fragment,{children:[e!==""&&m.jsx("label",{htmlFor:t,className:N("leading-6 block text-sm",r!==""&&r),children:e}),m.jsxs("div",{className:"relative overflow-x-hidden",children:[w!==null&&m.jsx("div",{className:"absolute top-2 left-3 w-full",children:w}),m.jsxs("div",{className:N("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",R),children:[w!==null&&m.jsx("div",{className:"py-2","aria-hidden":"true",children:m.jsx("div",{className:"py-px",children:m.jsx("div",{className:O})})}),F&&m.jsx("textarea",{name:g,id:p,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:v,value:S,onChange:h,rows:2,readOnly:x}),m.jsx("textarea",{style:{height:D>0?D:"auto"},placeholder:s,rows:i,name:l,id:n,className:N(F?"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",R,o!==""&&o),readOnly:d,onChange:h,value:b,"data-testid":`textarea-${n}`,ref:Y}),T!==null&&m.jsx("div",{className:"py-2","aria-hidden":"true",children:m.jsx("div",{className:"py-px",children:m.jsx("div",{className:k})})})]}),T!==null&&m.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:T})]}),u.length>0&&f&&m.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:u})]})}const Ms=({className:e="",children:n,message:t=""})=>{const[r,o]=a.useState(!1),i=()=>{t!==""&&o(!0)},l=()=>{o(!1)};return m.jsx("div",{className:"relative",children:m.jsxs("div",{onMouseLeave:l.bind(null,r),"data-testid":"container-tooltip",children:[m.jsx("div",{className:`
45
- ${r?"":"text-opacity-90"}
46
- text-white group bg-orange-700 rounded-md inline-flex items-center text-base font-medium hover:text-opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,onMouseEnter:i.bind(null,r),onMouseLeave:l.bind(null,r),"data-testid":"open-tooltip",children:n}),m.jsx(Re,{as:a.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:r,children:m.jsx("div",{className:N("absolute z-20 px-4 mt-0 sm:px-0",e!==""&&e),children:m.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:i.bind(null,r),onMouseLeave:l.bind(null,r),"data-testid":"message",children:t})})})]})})},As=({children:e,data:n,className:t="",classNameTooltip:r="w-full",classNameMenu:o="",classNameMenuItems:i="",classNameContainerSearch:l="px-5",isSelectMultiple:s=!1,optionsSelect:u,propObject:d="name",propId:f="id",textNewItem:h="",defaultId:b=null,loading:p=!1,search:g=null,searchPlaceHolder:v="Buscar...",valueSearch:x=void 0,idsOptionSelect:S=null,isComponent:w,hiddenMenu:T=!1,id:O,onClick:k=()=>{},isRelative:F=!0,isMaxWidth:z=!1,isTag:Y=!1,isClear:D=!1,clear:A=null,applyButton:R=null,applyButtonText:Z="Aplicar",tagsParent:re=[],isReadOnly:L,isDisabledApplyButton:E=!0,isOpenMenu:ae=void 0})=>{const[H,se]=a.useState(new Set),[G,ee]=a.useState(new Map);a.useEffect(()=>{S!==null&&se(new Set(new Set(S)))},[S]),a.useEffect(()=>{if(re.length===0)return;const $=new Map;re.forEach(K=>$.set(K.id,K)),ee($)},[re]),a.useEffect(()=>{D&&(se(new Set),ee(new Map),A&&A())},[A,D]);const me=$=>{let K=new Map(G),te=new Set(H),we=null;if(b!==null&&($[f]===b&&(we=crypto.randomUUID()),we!==null&&($[f]=we),we!==null&&($[d]=$[d].replace(h,"").trim())),te.has($[f])?te.delete($[f]):te.add($[f]),K.has($[f])?K.delete($[f]):K.set($[f],$),!s){const P=Array.from(te),U=Array.from(K);P.shift(),U.shift(),te=te.size===2?new Set(P):te,K=K.size===2?new Map(U):K}u($,Array.from(te),we!==null),se(te),ee(K)},ge=$=>{k($===!0?-1:O)},Ce=$=>{const K=new Set(H),te=new Map(G);K.delete($[f]),te.delete($[f]),u($,Array.from(K)),se(K),ee(te)};function be($){if(typeof $!="string")return $;const K=$.toLowerCase();return K.charAt(0).toUpperCase()+K.slice(1)}return m.jsxs(vt,{as:"div",className:N("inline-block text-left",F&&"relative",o!==""&&o),onClick:()=>ge(!0),"data-testid":`menu-${O}`,id:O,children:[m.jsx("style",{children:`
38
+ `}),t.jsx(L.Transition.Root,{show:a,as:m.Fragment,children:t.jsxs(L.Dialog,{as:"div",className:"relative z-50 relative",onClose:c,"data-testid":"modal",children:[t.jsx(L.Transition.Child,{as:m.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:t.jsx("div",{className:"fixed inset-0 bg-opacity-35 bg-gray-900 transition-opacity","data-testid":"window-close",onClick:()=>c(!1)})}),t.jsx("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:t.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:t.jsx(L.Transition.Child,{as:m.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:t.jsxs(L.Dialog.Panel,{className:v("relative transform rounded-lg bg-white px-4 pb-3 pt-5 text-left shadow-xl transition-all sm:w-full sm:pt-3 sm:px-3",n!==""&&n),children:[s&&t.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:t.jsx(Ht,{className:"h-6 w-6 text-green-600","aria-hidden":"true"})}),t.jsx("div",{className:v(i!==""&&i),"data-testid":"content",children:r}),o&&t.jsx("div",{className:"mt-5 sm:mt-6",children:t.jsx(ge,{id:"close-modal",onClick:()=>c(!1),children:"Cerrar"})}),t.jsx("button",{className:"opacity-0 absolute"})]})})})})]})})]})}const rr=({isOpenModalConfirmation:r,setIsOpenModalConfirmation:n,close:i,title:a="¿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:s="",classNameDescription:o=""})=>{const h=()=>{n(!1),i()};return t.jsxs(Ze,{isOpen:r,setIsOpen:()=>n(),showButton:!1,showIconSuccess:!1,children:[t.jsx("p",{className:v("text-center text-sm",s!==""&&s),children:a}),t.jsx("p",{className:v("text-center text-sm",o!==""&&o),children:c}),t.jsxs("div",{className:"flex w-full justify-center mt-5",children:[t.jsx(ze,{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:()=>n(),id:"cancel",children:"Cancelar"}),t.jsx(ge,{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"})]})]})},nr=({className:r="",style:n={}})=>t.jsx("div",{className:v("w-px",r!==""&&r),style:n}),ar=({onClick:r,id:n="",className:i=""})=>t.jsxs("div",{className:v("flex items-center text-default-5",i!==""&&i),"data-testid":n,children:[t.jsx(Mt,{className:"w-3 h-3 3xs:w-4 3xs:h-4 stroke-current cursor-pointer","data-testid":"chevron-left-icon",onClick:r}),t.jsx("span",{onClick:r,className:"text-sm cursor-pointer","data-testid":"go-back",children:"Volver"})]}),Se=({placeholder:r="",label:n="",htmlFor:i,type:a="text",name:c,handleChange:s,onClick:o=()=>{},value:h,isReadOnly:f=!1,isError:p=!1,helperText:g="",autocomplete:y="on",id:x,classNameLabel:C="",classNameContainerInput:F="",classNameContainer:b="",className:_="",icon:$=null,onKeyDown:k,onFocus:R})=>{const[N,B]=m.useState(!1),I=re({"ring-red-300 focus:ring-red-300 text-red-900":p||N,"focus:ring-indigo-600 text-gray-500":!p&&!N}),Z=U=>{if(s&&s(U),a!=="email")return;const{value:G}=U.target,J=Me(G);B(!J)};return t.jsxs("div",{"data-testid":`container-input-${x}`,className:b,children:[n!==""&&t.jsx("label",{htmlFor:i,className:v("block text-sm font-medium leading-6",C!==""?C:"text-gray-700"),"data-testid":`label-${x}`,children:n}),t.jsxs("div",{className:v("relative mt-1 rounded-md",F!==""&&F),children:[t.jsx("input",{id:x,name:c,type:a,autoComplete:y,placeholder:r,onChange:Z,onClick:o,onKeyDown:k,onFocus:R,value:h,readOnly:f,"data-testid":`input-${x}`,className:v("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",I,_!==""&&_)}),$!==null&&t.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:$}),p&&$===null&&t.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:t.jsx(Be,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),g.length===0||!p?null:t.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${x}`,children:g})]})};function ve({className:r="w-6 h-6",color:n="#3730a3"}){return t.jsxs("svg",{className:v("fill-current animate-spin",r),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:n,strokeWidth:"4",fill:"none"}),t.jsx("path",{fill:n,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 sr(){return t.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:[t.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"}),t.jsx(ve,{className:"w-8 h-8 animate-spin"})]})}const Ue=({height:r="36px",style:n={},label:i="",onChange:a,isReadOnly:c=!1,isError:s=!1,helperText:o="",name:h,id:f,className:p="",classNameLabel:g="",classNameInput:y="",options:x,value:C=-1,defaultValue:F={value:-1,label:"",iconStart:null,iconEnd:null},defaultLabel:b="label",defaultId:_="value",bgOptionSelect:$="bg-indigo-600",isSearch:k=!1,loading:R=!1})=>{const[N,B]=m.useState(""),[I,Z]=m.useState(F),[U,G]=m.useState(!1);m.useEffect(()=>{if(C===-1||(x==null?void 0:x.length)===0)return;const O=x==null?void 0:x.find(V=>V[_]===C);O&&Z(O)},[C,x,_]),m.useEffect(()=>{if(C==="clear")return Z({value:-1,label:"",iconStart:null,iconEnd:null})},[C]);const J=N===""?x:x.filter(O=>O[b].toLowerCase().includes(N.toLowerCase())),ee=re({"ring-red-300 focus:ring-red-300 text-red-900":s&&!c,"text-gray-500":!s,"focus:ring-indigo-600":!s&&!c}),X=re({"text-red-400":s&&!c,"text-gray-400":!s}),Y=O=>{Z(O),a({target:{value:O,checked:!1,name:h,type:void 0,id:O[_]}})};return t.jsxs(L.Combobox,{as:"div",value:I,onChange:Y,children:[t.jsx(L.Combobox.Label,{className:v("block text-sm font-medium leading-6 text-gray-500 mb-0.5",g!==""&&g),children:i}),t.jsxs("div",{className:v("relative",p!==""&&p),children:[t.jsxs(L.Combobox.Button,{className:"w-full","data-testid":`listbox-button-${f}`,children:[I.iconStart&&t.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-2",children:I.iconStart}),t.jsx(L.Combobox.Input,{className:v("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",!s&&!c&&"ring-inset focus:ring-inset focus:ring-2 focus:ring-indigo-600",c&&"focus:ring-gray-300",ee,y!==""&&y),onChange:O=>B(O.target.value),displayValue:O=>{var V;return(V=O[b])==null?void 0:V.trim()},autoComplete:"false",readOnly:!k||c,style:{height:r,...n},"data-testid":"input-search",onClick:()=>G(c?!1:!U),onBlur:()=>G(!1)})]}),I.iconEnd&&t.jsx("span",{className:"absolute inset-y-0 right-4 flex items-center pr-4",children:I.iconEnd}),t.jsx(L.Combobox.Button,{className:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",onClick:()=>G(c?!1:!U),"data-testid":"arrow-button",children:U?t.jsx(Nt,{className:v("h-5 w-5",X),"aria-hidden":"true"}):t.jsx(Et,{className:v("h-5 w-5",X),"aria-hidden":"true"})}),!c&&t.jsx(t.Fragment,{children:R?t.jsx(L.Combobox.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:t.jsx(ve,{})}):(J??[]).length>0?t.jsx(L.Combobox.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",children:J.map((O,V)=>t.jsx(L.Combobox.Option,{value:O,className:v(O[_]===I[_]?`${$} text-white`:"text-gray-900",`relative cursor-default select-none p-2 hover:text-white hover:${$}`),"data-testid":`select-${f}-${O[_]}`,children:t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center",children:[O.iconStart&&t.jsx("span",{className:"mr-2","aria-hidden":"true",children:O.iconStart}),t.jsx("span",{className:"block font-normal break-all",children:O[b]})]}),O.iconEnd&&t.jsx("span",{className:"ml-2","aria-hidden":"true",children:O.iconEnd})]})},V))}):t.jsx(L.Combobox.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:t.jsx("p",{"data-testid":"empty-options",children:"Sin opciones"})})})]}),o.length>0&&s&&t.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${f}`,children:o})]})},ir=({placeholder:r="",label:n="",htmlFor:i,name:a,handleChange:c,onClick:s=()=>{},value:o,valueSelect:h,isReadOnly:f=!1,isError:p=!1,helperText:g="",autocomplete:y="on",id:x,classNameLabel:C="",classNameContainer:F="",className:b="",onKeyDown:_,options:$,idSelect:k})=>{const{width:R}=Ne(),N=re({"ring-red-300 focus:ring-red-300 text-red-900":p,"focus:ring-indigo-600 text-gray-500":!p});return t.jsxs("div",{"data-testid":`container-input-${x}`,className:F,children:[n!==""&&t.jsx("label",{htmlFor:i,className:v("block text-sm font-medium leading-6",C!==""?C:"text-gray-700"),"data-testid":`label-${x}`,children:n}),t.jsxs("div",{className:"relative mt-1 rounded-md shadow-sm",children:[t.jsx("div",{className:"absolute inset-y-0 -top-0.5 flex items-center",style:{left:"2px"},children:t.jsx(Ue,{name:k,onChange:B=>c(B),id:k,options:$,value:h,isReadOnly:f,className:"w-20",height:R<=640?"28px":"32px",classNameInput:"ml-3.5",style:{paddingRight:0,width:"45px",boxShadow:"none"},isDisabledFocus:!0})}),t.jsx("input",{id:x,name:a,type:"text",autoComplete:y,placeholder:r,readOnly:f,"data-testid":`input-${x}`,onClick:s,onKeyDown:_,onChange:B=>c(B),value:o,className:v("block w-full rounded-md border-0 py-1.5 pl-20 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",N,b!==""&&b)}),p&&t.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:t.jsx(Be,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),g.length===0||!p?null:t.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${x}`,children:g})]})},lr=({setValuesDefault:r})=>{const[n,i]=m.useState(!1),a=()=>{i(!n),r("status",!n)};return t.jsxs("div",{className:"flex",children:[t.jsxs(L.Switch,{checked:n,onChange:a,className:v("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",n?"bg-success-1":"bg-gray-200"),"data-testid":"switch",children:[t.jsx("span",{className:"sr-only",children:"Use setting"}),t.jsx("span",{"aria-hidden":"true",className:v("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",n?"translate-x-full":"translate-x-0")})]}),t.jsx("p",{className:"text-sm font-medium text-gray-500 ml-2 self-end","data-testid":"text-switch",children:n?"Activo":"Inactivo"})]})};function or({label:r="",id:n,htmlFor:i="",classNameLabel:a="",className:c="",rows:s=4,name:o,placeholder:h="",helperText:f="",isReadOnly:p=!1,isError:g=!1,onChange:y,value:x,idInput:C,nameInput:F,placeholderInput:b="",isReadOnlyInput:_=!1,valueInput:$,infoTop:k=null,infoBottom:R=null,classNameInfoTop:N="h-4",classNameInfoBottom:B="h-2",isInputTitle:I=!1,scrollHeightTest:Z=!1}){const U=m.useRef(null),[G,J]=m.useState(0);m.useEffect(()=>{const{current:X}=U;X===null||Z||J(X.scrollHeight)},[U,x,Z]),m.useEffect(()=>{Z&&J(800)},[Z]);const ee=re({"ring-red-300 focus:ring-red-300 text-red-900":g,"focus:ring-indigo-600 text-gray-700":!g});return t.jsxs(t.Fragment,{children:[r!==""&&t.jsx("label",{htmlFor:i,className:v("leading-6 block text-sm",a!==""&&a),children:r}),t.jsxs("div",{className:"relative overflow-x-hidden",children:[k!==null&&t.jsx("div",{className:"absolute top-2 left-3 w-full",children:k}),t.jsxs("div",{className:v("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",ee),children:[k!==null&&t.jsx("div",{className:"py-2","aria-hidden":"true",children:t.jsx("div",{className:"py-px",children:t.jsx("div",{className:N})})}),I&&t.jsx("textarea",{name:F,id:C,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:b,value:$,onChange:y,rows:2,readOnly:_}),t.jsx("textarea",{style:{height:G>0?G:"auto"},placeholder:h,rows:s,name:o,id:n,className:v(I?"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",ee,c!==""&&c),readOnly:p,onChange:y,value:x,"data-testid":`textarea-${n}`,ref:U}),R!==null&&t.jsx("div",{className:"py-2","aria-hidden":"true",children:t.jsx("div",{className:"py-px",children:t.jsx("div",{className:B})})})]}),R!==null&&t.jsx("div",{className:"absolute bottom-2 left-3 w-full",children:R})]}),f.length>0&&g&&t.jsx("p",{className:"text-red-600 text-sm text-left mt-1","data-testid":`helperText-${n}`,children:f})]})}const cr=({className:r="",children:n,message:i=""})=>{const[a,c]=m.useState(!1),s=()=>{i!==""&&c(!0)},o=()=>{c(!1)};return t.jsx("div",{className:"relative",children:t.jsxs("div",{onMouseLeave:o.bind(null,a),"data-testid":"container-tooltip",children:[t.jsx("div",{className:`
39
+ ${a?"":"text-opacity-90"}
40
+ text-white group bg-orange-700 rounded-md inline-flex items-center text-base font-medium hover:text-opacity-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,onMouseEnter:s.bind(null,a),onMouseLeave:o.bind(null,a),"data-testid":"open-tooltip",children:n}),t.jsx(L.Transition,{as:m.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:a,children:t.jsx("div",{className:v("absolute z-20 px-4 mt-0 sm:px-0",r!==""&&r),children:t.jsx("div",{className:"bg-white p-2 text-center rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",onMouseEnter:s.bind(null,a),onMouseLeave:o.bind(null,a),"data-testid":"message",children:i})})})]})})},ur=({children:r,data:n,className:i="",classNameTooltip:a="w-full",classNameMenu:c="",classNameMenuItems:s="",classNameContainerSearch:o="px-5",isSelectMultiple:h=!1,optionsSelect:f,propObject:p="name",propId:g="id",textNewItem:y="",defaultId:x=null,loading:C=!1,search:F=null,searchPlaceHolder:b="Buscar...",valueSearch:_=void 0,idsOptionSelect:$=null,isComponent:k,hiddenMenu:R=!1,id:N,onClick:B=()=>{},isRelative:I=!0,isMaxWidth:Z=!1,isTag:U=!1,isClear:G=!1,clear:J=null,applyButton:ee=null,applyButtonText:X="Aplicar",tagsParent:Y=[],isReadOnly:O,isDisabledApplyButton:V=!0,isOpenMenu:we=void 0})=>{const[te,ne]=m.useState(new Set),[ae,se]=m.useState(new Map);m.useEffect(()=>{$!==null&&ne(new Set(new Set($)))},[$]),m.useEffect(()=>{if(Y.length===0)return;const j=new Map;Y.forEach(M=>j.set(M.id,M)),se(j)},[Y]),m.useEffect(()=>{G&&(ne(new Set),se(new Map),J&&J())},[J,G]);const be=j=>{let M=new Map(ae),W=new Set(te),Q=null;if(x!==null&&(j[g]===x&&(Q=crypto.randomUUID()),Q!==null&&(j[g]=Q),Q!==null&&(j[p]=j[p].replace(y,"").trim())),W.has(j[g])?W.delete(j[g]):W.add(j[g]),M.has(j[g])?M.delete(j[g]):M.set(j[g],j),!h){const oe=Array.from(W),ie=Array.from(M);oe.shift(),ie.shift(),W=W.size===2?new Set(oe):W,M=M.size===2?new Map(ie):M}f(j,Array.from(W),Q!==null),ne(W),se(M)},me=j=>{B(j===!0?-1:N)},ye=j=>{const M=new Set(te),W=new Map(ae);M.delete(j[g]),W.delete(j[g]),f(j,Array.from(M)),ne(M),se(W)};function Te(j){if(typeof j!="string")return j;const M=j.toLowerCase();return M.charAt(0).toUpperCase()+M.slice(1)}return t.jsxs(L.Menu,{as:"div",className:v("inline-block text-left",I&&"relative",c!==""&&c),onClick:()=>me(!0),"data-testid":`menu-${N}`,id:N,children:[t.jsx("style",{children:`
47
41
  .blue {
48
42
  background-color: #3758F9;
49
43
  }
@@ -60,4 +54,4 @@ React keys must be passed directly to JSX without using spread:
60
54
  width: 414px;
61
55
  }
62
56
  }
63
- `}),console.log(`menu-button-${O}`),m.jsx(vt.Button,{as:"div",onClick:()=>ge(T),"data-testid":`menu-button-${O}`,children:e}),m.jsx("div",{className:N("absolute right-0 z-10",r,T&&"hidden",p&&"w-full"),children:m.jsx(Re,{as:a.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:ae,children:m.jsx(vt.Items,{className:N("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",p?"w-full":i===""&&"w-max",i!==""&&i),children:p?m.jsx("div",{className:"flex justify-center py-4",children:m.jsx(Et,{})}):m.jsxs("div",{className:N(!w&&"pb-1","divide-y divide-gray-100",t!==""&&t,z&&"w-custom"),"data-testid":"dropdown-menu",children:[m.jsxs("div",{className:"flex justify-between items-center sticky top-0 bg-white w-full",children:[g!==null&&m.jsx("div",{className:N("py-2 w-full",l),children:m.jsx(rn,{htmlFor:"search",id:`dropdown-search-${O}`,name:"search",type:"text",placeholder:v,handleChange:$=>g($,O),icon:v!==""&&m.jsx(as,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:x,onKeyDown:$=>$.key===" "&&$.stopPropagation()})}),R!==null&&m.jsx("div",{className:"pl-1 pr-2 pt-1.5",children:m.jsx(yt,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-5 py-1.5 rounded-md",outline:H.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-sm text-white text-center",id:"apply",disabled:H.size===0&&E,onClick:()=>R({id:O,items:Array.from(G.values())}),children:Z})})]}),Y&&!L&&m.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(G).map(($,K)=>m.jsx("div",{className:N(K>0&&"ml-1"),children:m.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:[$[1][d],m.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>Ce($[1]),"data-testid":`tag-${$[0]}`,children:m.jsx(fs,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},$))}),(L?[]:n).map(($,K)=>m.jsx("div",{className:N(!w&&"py-1"),children:w?m.jsx("div",{onClick:te=>{te.preventDefault(),u()},"data-testid":`item-component-${K}`,children:$}):m.jsx(vt.Item,{children:m.jsx("span",{className:N(H.has($[f])&&"blue text-white",!H.has($[f])&&"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-${K}`,onClick:te=>{te.preventDefault(),me($)},children:be($[d])})})},K))]})})})})]})},ur=50,Ds=({total:e,handleNext:n,handlePrev:t,handleSelectPage:r,page:o=null})=>{const[i,l]=a.useState(1),[s,u]=a.useState([]),[d,f]=a.useState([]),h=Math.ceil(e/ur);a.useEffect(()=>{const v=[];for(let x=1;x<=h;x++)v.push(x);f(v)},[h]),a.useEffect(()=>{let v=[];const x="...",S="... ",w=" ...";if(d.length<6)v=d;else if(i>=1&&i<=3)v=[1,2,3,4,x,d.length];else if(i===4)v=[...d.slice(0,5),x,d.length];else if(i>4&&i<d.length-2){const T=d.slice(i-2,i),O=d.slice(i,i+1);v=[1,S,...T,...O,w,d.length]}else if(i>d.length-3){const T=d.slice(d.length-4);v=[1,S,...T]}u(v)},[i,d]),a.useEffect(()=>{o!==null&&o!==i&&l(o)},[o,i]);const b=v=>{l(v),r(v)},p=()=>{l(i===1?i:i-1),i>1&&t(i-1)},g=()=>{i===d.length?l(i):l(i+1),i<d.length&&n(i+1)};return m.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[m.jsx("div",{className:"-mt-px flex w-0 flex-1",children:m.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:p,"data-testid":"prev",children:[m.jsx(Wl,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),m.jsx("div",{className:"hidden md:-mt-px md:flex",children:s.map((v,x)=>m.jsx(lr,{className:N("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",i===v?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>v!=="..."&&v!==" ..."&&v!=="... "&&b(v),id:`page-${x+1}`,children:v},x))}),m.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:m.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:g,"data-testid":"next",children:["Siguiente",m.jsx(Ul,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},Ls=({openDefault:e=!1,setForm:n,setValuesDefault:t,title:r,type:o,data:i,setData:l,Component:s,id:u,defaultData:d,dispatch:f,isAdd:h=!0,search:b=null,isPadding:p=!0})=>{const[g,v]=a.useState(!1);a.useEffect(()=>{v(e)},[e]);const x=({e:T,index:O})=>{const k=Ct(i),{name:F,value:z}=T.target;k[O][F]=z,l(k),t(u,k),n(Y=>({...Y,[u]:k}))},S=()=>{if(i.some(O=>Object.values(O).some(z=>z.value===-1))||i.length===0)return f({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});n(O=>({...O,data:i})),t(u,i),l([...i,d])},w=T=>{if(T===i.length-1)return;const O=Ct(i);O.splice(T,1),n(k=>({...k,copyData:O})),t(u,O),l(O)};return m.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[m.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>v(!g),"data-testid":"open-accordion",children:[m.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:r}),m.jsxs("div",{className:"flex items-center",children:[b&&m.jsx(rn,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:b,icon:m.jsx(Ts,{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:"",onClick:T=>T.stopPropagation(),onFocus:()=>v(!0)}),g?m.jsx(Es,{className:"w-5 h-5 text-default-5"}):m.jsx(ws,{className:"w-5 h-5 text-default-5"})]})]}),m.jsx(Re,{as:a.Fragment,show:g,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsxs("div",{className:N("sm:mt-2.5 py-3.5",p&&"px-4 sm:p-6"),children:[i.map((T,O)=>m.jsxs("div",{className:N("flex flex-col 3xs:flex-row mb-4",p&&"ml-0 3xs:ml-3"),children:[m.jsx(s,{item:T,index:O,handleChange:x}),h&&m.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:N("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",O===i.length-1&&"3xs:opacity-0"),children:m.jsx(Os,{className:N("w-6 h-4",O!==i.length-1&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>w(O),"data-testid":`delete-data-${O}`})})]},O)),h&&m.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:S,"data-testid":"add",children:`+ Añadir ${o}`})]})})]})};_.Accordion=Ls,_.Alert=os,_.Avatar=ms,_.Bullets=ps,_.ButtonOutline=ir,_.ButtonPagination=lr,_.ButtonSolid=yt,_.Checkbox=vs,_.ConfirmationAbandoningCreation=js,_.Divider=Is,_.Dropdown=As,_.GoBack=ks,_.Input=rn,_.InputDropdown=Ns,_.MESSAGE_ABORT_CONTROLLER=Cr,_.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=Or,_.Modal=sr,_.Pagination=Ds,_.Select=ar,_.Spinner=Fs,_.SpinnerIcon=Et,_.Switch=$s,_.Textarea=Ps,_.Tooltip=Ms,_.classNames=N,_.copyOptions=Ct,_.isPromise=Tr,_.rowsPerPage=ur,_.useCloseModal=jr,_.useForm=Ir,_.useMediaQuery=kr,_.useWindowDimensions=Ot,_.validateEmail=fn,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
57
+ `}),t.jsx(L.Menu.Button,{as:"div",onClick:()=>me(R),"data-testid":`menu-button-${N}`,children:r}),t.jsx("div",{className:v("absolute right-0 z-10",a,R&&"hidden",C&&"w-full"),children:t.jsx(L.Transition,{as:m.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:we,children:t.jsx(L.Menu.Items,{className:v("mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",C?"w-full":s===""&&"w-max",s!==""&&s),children:C?t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(ve,{})}):t.jsxs("div",{className:v(!k&&"pb-1","divide-y divide-gray-100",i!==""&&i,Z&&"w-custom"),"data-testid":"dropdown-menu",children:[t.jsxs("div",{className:"flex justify-between items-center sticky top-0 bg-white w-full",children:[F!==null&&t.jsx("div",{className:v("py-2 w-full",o),children:t.jsx(Se,{htmlFor:"search",id:`dropdown-search-${N}`,name:"search",type:"text",placeholder:b,handleChange:j=>F(j,N),icon:b!==""&&t.jsx(Lt,{className:"w-4 h-4 text-indigo-300"}),className:"pl-5 pr-4 h-8",classNameContainerInput:"w-full",value:_,onKeyDown:j=>j.key===" "&&j.stopPropagation()})}),ee!==null&&t.jsx("div",{className:"pl-1 pr-2 pt-1.5",children:t.jsx(ge,{classNameButton:"bg-secondary-2 hover:bg-secondary-3 font-medium px-5 py-1.5 rounded-md",outline:te.size===0&&V?"":"0px 0px 0px 2px #3758F9, 0px 0px 0px 2px #243BBD, 0px 1px 2px 0px rgba(0, 0, 0, 0.05)",classNameText:"text-sm text-white text-center",id:"apply",disabled:te.size===0&&V,onClick:()=>ee({id:N,items:Array.from(ae.values())}),children:X})})]}),U&&!O&&t.jsx("div",{className:"flex flex-wrap ml-7 pt-1",children:Array.from(ae).map((j,M)=>t.jsx("div",{className:v(M>0&&"ml-1"),children:t.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:[j[1][p],t.jsx("button",{type:"button",className:"p-0.5 rounded-sm bg-gray-100 hover:bg-gray-300",onClick:()=>ye(j[1]),"data-testid":`tag-${j[0]}`,children:t.jsx(zt,{className:"h-2.5 w-2.5 stroke-gray-700/50 group-hover:stroke-gray-700/75"})})]})},j))}),(O?[]:n).map((j,M)=>t.jsx("div",{className:v(!k&&"py-1"),children:k?t.jsx("div",{onClick:W=>{W.preventDefault(),f()},"data-testid":`item-component-${M}`,children:j}):t.jsx(L.Menu.Item,{children:t.jsx("span",{className:v(te.has(j[g])&&"blue text-white",!te.has(j[g])&&"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-${M}`,onClick:W=>{W.preventDefault(),be(j)},children:Te(j[p])})})},M))]})})})})]})},Ye=50,dr=({total:r,handleNext:n,handlePrev:i,handleSelectPage:a,page:c=null})=>{const[s,o]=m.useState(1),[h,f]=m.useState([]),[p,g]=m.useState([]),y=Math.ceil(r/Ye);m.useEffect(()=>{const b=[];for(let _=1;_<=y;_++)b.push(_);g(b)},[y]),m.useEffect(()=>{let b=[];const _="...",$="... ",k=" ...";if(p.length<6)b=p;else if(s>=1&&s<=3)b=[1,2,3,4,_,p.length];else if(s===4)b=[...p.slice(0,5),_,p.length];else if(s>4&&s<p.length-2){const R=p.slice(s-2,s),N=p.slice(s,s+1);b=[1,$,...R,...N,k,p.length]}else if(s>p.length-3){const R=p.slice(p.length-4);b=[1,$,...R]}f(b)},[s,p]),m.useEffect(()=>{c!==null&&c!==s&&o(c)},[c,s]);const x=b=>{o(b),a(b)},C=()=>{o(s===1?s:s-1),s>1&&i(s-1)},F=()=>{s===p.length?o(s):o(s+1),s<p.length&&n(s+1)};return t.jsxs("nav",{className:"flex items-center justify-between border-t border-gray-200 px-4 sm:px-0",children:[t.jsx("div",{className:"-mt-px flex w-0 flex-1",children:t.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:C,"data-testid":"prev",children:[t.jsx(gt,{className:"mr-3 h-5 w-5 text-gray-400","aria-hidden":"true"}),"Anterior"]})}),t.jsx("div",{className:"hidden md:-mt-px md:flex",children:h.map((b,_)=>t.jsx(Ie,{className:v("inline-flex items-center border-t-2 px-4 pt-4 text-sm font-medium",s===b?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700"),"aria-current":"page",onClick:()=>b!=="..."&&b!==" ..."&&b!=="... "&&x(b),id:`page-${_+1}`,children:b},_))}),t.jsx("div",{className:"-mt-px flex w-0 flex-1 justify-end",children:t.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:F,"data-testid":"next",children:["Siguiente",t.jsx(wt,{className:"ml-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]})})]})},fr=({openDefault:r=!1,setForm:n,setValuesDefault:i,title:a,type:c,data:s,setData:o,Component:h,id:f,defaultData:p,dispatch:g,isAdd:y=!0,search:x=null,isPadding:C=!0})=>{const[F,b]=m.useState(!1);m.useEffect(()=>{b(r)},[r]);const _=({e:R,index:N})=>{const B=Ce(s),{name:I,value:Z}=R.target;B[N][I]=Z,o(B),i(f,B),n(U=>({...U,[f]:B}))},$=()=>{if(s.some(N=>Object.values(N).some(Z=>Z.value===-1))||s.length===0)return g({type:"ALERT",payload:{title:"",message:"Todos los campos son requeridos",typeAlert:"warning",active:!0}});n(N=>({...N,data:s})),i(f,s),o([...s,p])},k=R=>{if(R===s.length-1)return;const N=Ce(s);N.splice(R,1),n(B=>({...B,copyData:N})),i(f,N),o(N)};return t.jsxs("div",{className:"divide-y divide-gray-200 rounded-lg bg-white shadow mt-7",children:[t.jsxs("div",{className:"px-4 py-3.5 sm:px-6 flex justify-between items-center cursor-pointer",onClick:()=>b(!F),"data-testid":"open-accordion",children:[t.jsx("p",{className:"text-gray-500 uppercase text-xs font-bold",children:a}),t.jsxs("div",{className:"flex items-center",children:[x&&t.jsx(Se,{htmlFor:"search",id:"search",name:"search",type:"text",autoComplete:"search",placeholder:"Buscar...",handleChange:x,icon:t.jsx(Qt,{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:"",onClick:R=>R.stopPropagation(),onFocus:()=>b(!0)}),F?t.jsx(Kt,{className:"w-5 h-5 text-default-5"}):t.jsx(qt,{className:"w-5 h-5 text-default-5"})]})]}),t.jsx(L.Transition,{as:m.Fragment,show:F,enter:"transition duration-[400ms]",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-200 transition ease-in-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:t.jsxs("div",{className:v("sm:mt-2.5 py-3.5",C&&"px-4 sm:p-6"),children:[s.map((R,N)=>t.jsxs("div",{className:v("flex flex-col 3xs:flex-row mb-4",C&&"ml-0 3xs:ml-3"),children:[t.jsx(h,{item:R,index:N,handleChange:_}),y&&t.jsx("div",{style:{backgroundColor:"#B0B8BF",width:"25px",height:"25px"},className:v("rounded-full flex justify-center items-center mt-4 3xs:mt-7 ml-2 3xs:ml-5 self-start 3xs:self-center",N===s.length-1&&"3xs:opacity-0"),children:t.jsx(tr,{className:v("w-6 h-4",N!==s.length-1&&"cursor-pointer"),style:{color:"#637381"},strokeWidth:2.5,onClick:()=>k(N),"data-testid":`delete-data-${N}`})})]},N)),y&&t.jsx("p",{className:"text-secondary-2 text-sm font-medium ml-3 cursor-pointer",onClick:$,"data-testid":"add",children:`+ Añadir ${c}`})]})})]})};E.Accordion=fr,E.Alert=At,E.Avatar=It,E.Bullets=Zt,E.ButtonOutline=ze,E.ButtonPagination=Ie,E.ButtonSolid=ge,E.Checkbox=Yt,E.ConfirmationAbandoningCreation=rr,E.Divider=nr,E.Dropdown=ur,E.GoBack=ar,E.Input=Se,E.InputDropdown=ir,E.MESSAGE_ABORT_CONTROLLER=ot,E.MESSAGE_SIGNAL_ABORTED_WITHOUT_REASON=ct,E.Modal=Ze,E.Pagination=dr,E.Select=Ue,E.Spinner=sr,E.SpinnerIcon=ve,E.Switch=lr,E.Textarea=or,E.Tooltip=cr,E.classNames=v,E.copyOptions=Ce,E.isPromise=lt,E.rowsPerPage=Ye,E.useCloseModal=ut,E.useForm=dt,E.useMediaQuery=ft,E.useWindowDimensions=Ne,E.validateEmail=Me,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cemtrik-dependencies",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "dev": "vite",