@dipusevilla/componentes-iu 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -15,19 +15,19 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var Xt;function Ps(){return Xt||(Xt=1,process.env.NODE_ENV!=="production"&&function(){function r(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===Z?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case j:return"Fragment";case v:return"Profiler";case F:return"StrictMode";case O:return"Suspense";case B:return"SuspenseList";case q:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case E:return"Portal";case S:return(k.displayName||"Context")+".Provider";case g:return(k._context.displayName||"Context")+".Consumer";case D:var R=k.render;return k=k.displayName,k||(k=R.displayName||R.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case X:return R=k.displayName||null,R!==null?R:r(k.type)||"Memo";case U:R=k._payload,k=k._init;try{return r(k(R))}catch{}}return null}function e(k){return""+k}function t(k){try{e(k);var R=!1}catch{R=!0}if(R){R=console;var J=R.error,ee=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return J.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ee),e(k)}}function s(k){if(k===j)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===U)return"<...>";try{var R=r(k);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function a(){var k=I.A;return k===null?null:k.getOwner()}function n(){return Error("react-stack-top-frame")}function o(k){if(z.call(k,"key")){var R=Object.getOwnPropertyDescriptor(k,"key").get;if(R&&R.isReactWarning)return!1}return k.key!==void 0}function l(k,R){function J(){M||(M=!0,console.error("%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://react.dev/link/special-props)",R))}J.isReactWarning=!0,Object.defineProperty(k,"key",{get:J,configurable:!0})}function c(){var k=r(this.type);return w[k]||(w[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function f(k,R,J,ee,ne,H,le,ce){return J=H.ref,k={$$typeof:x,type:k,key:R,props:H,_owner:ne},(J!==void 0?J:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:c}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ce}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function u(k,R,J,ee,ne,H,le,ce){var Y=R.children;if(Y!==void 0)if(ee)if(N(Y)){for(ee=0;ee<Y.length;ee++)m(Y[ee]);Object.freeze&&Object.freeze(Y)}else console.error("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 m(Y);if(z.call(R,"key")){Y=r(k);var fe=Object.keys(R).filter(function(Be){return Be!=="key"});ee=0<fe.length?"{key: someKey, "+fe.join(": ..., ")+": ...}":"{key: someKey}",ie[Y+ee]||(fe=0<fe.length?"{"+fe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
+ */var Xt;function Ps(){return Xt||(Xt=1,process.env.NODE_ENV!=="production"&&function(){function r(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===Z?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case j:return"Fragment";case v:return"Profiler";case F:return"StrictMode";case O:return"Suspense";case B:return"SuspenseList";case q:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case E:return"Portal";case S:return(k.displayName||"Context")+".Provider";case g:return(k._context.displayName||"Context")+".Consumer";case M:var R=k.render;return k=k.displayName,k||(k=R.displayName||R.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case X:return R=k.displayName||null,R!==null?R:r(k.type)||"Memo";case U:R=k._payload,k=k._init;try{return r(k(R))}catch{}}return null}function e(k){return""+k}function t(k){try{e(k);var R=!1}catch{R=!0}if(R){R=console;var J=R.error,ee=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return J.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ee),e(k)}}function s(k){if(k===j)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===U)return"<...>";try{var R=r(k);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function a(){var k=I.A;return k===null?null:k.getOwner()}function n(){return Error("react-stack-top-frame")}function o(k){if(z.call(k,"key")){var R=Object.getOwnPropertyDescriptor(k,"key").get;if(R&&R.isReactWarning)return!1}return k.key!==void 0}function l(k,R){function J(){D||(D=!0,console.error("%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://react.dev/link/special-props)",R))}J.isReactWarning=!0,Object.defineProperty(k,"key",{get:J,configurable:!0})}function c(){var k=r(this.type);return w[k]||(w[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function f(k,R,J,ee,ne,H,le,ce){return J=H.ref,k={$$typeof:x,type:k,key:R,props:H,_owner:ne},(J!==void 0?J:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:c}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ce}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function u(k,R,J,ee,ne,H,le,ce){var Y=R.children;if(Y!==void 0)if(ee)if(N(Y)){for(ee=0;ee<Y.length;ee++)m(Y[ee]);Object.freeze&&Object.freeze(Y)}else console.error("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 m(Y);if(z.call(R,"key")){Y=r(k);var fe=Object.keys(R).filter(function(Be){return Be!=="key"});ee=0<fe.length?"{key: someKey, "+fe.join(": ..., ")+": ...}":"{key: someKey}",ie[Y+ee]||(fe=0<fe.length?"{"+fe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
19
19
  let props = %s;
20
20
  <%s {...props} />
21
21
  React keys must be passed directly to JSX without using spread:
22
22
  let props = %s;
23
- <%s key={someKey} {...props} />`,ee,Y,fe,Y),ie[Y+ee]=!0)}if(Y=null,J!==void 0&&(t(J),Y=""+J),o(R)&&(t(R.key),Y=""+R.key),"key"in R){J={};for(var Ce in R)Ce!=="key"&&(J[Ce]=R[Ce])}else J=R;return Y&&l(J,typeof k=="function"?k.displayName||k.name||"Unknown":k),f(k,Y,H,ne,a(),J,le,ce)}function m(k){typeof k=="object"&&k!==null&&k.$$typeof===x&&k._store&&(k._store.validated=1)}var h=b,x=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),S=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),I=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,N=Array.isArray,L=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(k){return k()}};var M,w={},W=h["react-stack-bottom-frame"].bind(h,n)(),re=L(s(n)),ie={};We.Fragment=j,We.jsx=function(k,R,J,ee,ne){var H=1e4>I.recentlyCreatedOwnerStacks++;return u(k,R,J,!1,ee,ne,H?Error("react-stack-top-frame"):W,H?L(s(k)):re)},We.jsxs=function(k,R,J,ee,ne){var H=1e4>I.recentlyCreatedOwnerStacks++;return u(k,R,J,!0,ee,ne,H?Error("react-stack-top-frame"):W,H?L(s(k)):re)}}()),We}var Jt;function Us(){return Jt||(Jt=1,process.env.NODE_ENV==="production"?Qe.exports=zs():Qe.exports=Ps()),Qe.exports}var i=Us();function Kt(r){var e,t,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(t=Kt(r[e]))&&(s&&(s+=" "),s+=t)}else for(t in r)r[t]&&(s&&(s+=" "),s+=t);return s}function $(){for(var r,e,t=0,s="",a=arguments.length;t<a;t++)(r=arguments[t])&&(e=Kt(r))&&(s&&(s+=" "),s+=e);return s}const Rs={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-10 h-10",full:"w-full h-full"};function je({component:r,size:e="sm",className:t,...s}){return i.jsx(r,{className:$(Rs[e],t),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const Bs="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Zs={primary:"bg-[var(--color-ds-button-primary-bg)] text-[var(--color-ds-button-primary-text)] hover:animate-pulse",outline:"bg-transparent text-[var(--color-ds-text-primary)] ring-1 ring-inset ring-[var(--color-ds-border-default)] hover:bg-[var(--color-ds-background-accent)] hover:text-[var(--color-ds-text-on-accent)]",ghost:"bg-transparent text-[var(--color-ds-text-primary)] hover:animate-pulse"},Ws={sm:"text-ds-sm h-6 px-2",md:"text-ds-md h-10 px-2.5",lg:"text-ds-lg h-12 px-3"},qs={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},Hs="disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-[var(--color-ds-background-disabled)] disabled:text-[var(--color-ds-text-on-accent)] disabled:ring-1 disabled:ring-inset disabled:ring-[var(--color-ds-border-muted)]";function _e({type:r="button",variant:e="primary",size:t="sm",width:s,disabled:a=!1,icon:n,iconPosition:o="left",ariaLabel:l,children:c,onClick:f,className:u}){const m=!!n,h=m&&!c,x=h?qs[t]:Ws[t];return i.jsxs("button",{type:r,onClick:f,disabled:a,"aria-label":h?l:void 0,style:s?{width:s}:void 0,className:$(Bs,Zs[e],x,Hs,u,m&&c&&"gap-2"),children:[n&&o==="left"&&i.jsx(je,{component:n,size:t}),c,n&&o==="right"&&i.jsx(je,{component:n,size:t})]})}function Ys({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Gs=V.forwardRef(Ys);function Xs({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Qt=V.forwardRef(Xs);function Js({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const Ks=V.forwardRef(Js);function Qs({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const ea=V.forwardRef(Qs);function ta({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"}))}const ra=V.forwardRef(ta);function sa({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const er=V.forwardRef(sa);function aa({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const na=V.forwardRef(aa);function oa({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const tr=V.forwardRef(oa);function ia({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"}))}const la=V.forwardRef(ia);function ca({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const da=V.forwardRef(ca);function ua({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))}const fa=V.forwardRef(ua);function ha({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const ma=V.forwardRef(ha);function pa({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}const ga=V.forwardRef(pa);function xa({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.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 ba=V.forwardRef(xa);function va({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const vt=V.forwardRef(va);function yt({title:r,children:e,defaultOpen:t=!0,className:s}){const[a,n]=b.useState(t),o=b.useRef(null),l=b.useRef(null),[c,f]=b.useState(0),u=()=>{if(l.current){const m=l.current.scrollHeight;f(m)}};return b.useLayoutEffect(()=>{u()},[a]),b.useEffect(()=>{const m=l.current;if(!m)return;const h=new ResizeObserver(()=>{u()});return h.observe(m),()=>{h.disconnect()}},[]),i.jsxs("div",{className:$("flex flex-col w-full gap-3",s),children:[i.jsxs("button",{type:"button",onClick:()=>n(m=>!m),className:"flex items-center justify-between w-full hover:bg-[var(--color-ds-surface-hover)] transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"block w-1 h-5 bg-[var(--color-ds-background-accent)] rounded-sm"}),i.jsx("span",{className:"font-semibold text-[var(--color-ds-text-primary)]",children:r})]}),a?i.jsx(ea,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):i.jsx(Qt,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),i.jsx("div",{className:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",children:i.jsx("div",{className:"px-6",children:i.jsx("div",{ref:o,className:$("overflow-hidden transition-all duration-300 ease-in-out",a?"opacity-100":"opacity-0"),style:{maxHeight:a?`${c}px`:"0px"},children:i.jsx("div",{ref:l,className:"py-4",children:e})})})})]})}var qe=r=>r.type==="checkbox",Me=r=>r instanceof Date,he=r=>r==null;const rr=r=>typeof r=="object";var se=r=>!he(r)&&!Array.isArray(r)&&rr(r)&&!Me(r),sr=r=>se(r)&&r.target?qe(r.target)?r.target.checked:r.target.value:r,ya=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,ar=(r,e)=>r.has(ya(e)),wa=r=>{const e=r.constructor&&r.constructor.prototype;return se(e)&&e.hasOwnProperty("isPrototypeOf")},wt=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function de(r){let e;const t=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)e=new Date(r);else if(r instanceof Set)e=new Set(r);else if(!(wt&&(r instanceof Blob||s))&&(t||se(r)))if(e=t?[]:{},!t&&!wa(r))e=r;else for(const a in r)r.hasOwnProperty(a)&&(e[a]=de(r[a]));else return r;return e}var et=r=>Array.isArray(r)?r.filter(Boolean):[],ae=r=>r===void 0,T=(r,e,t)=>{if(!e||!se(r))return t;const s=et(e.split(/[,[\].]+?/)).reduce((a,n)=>he(a)?a:a[n],r);return ae(s)||s===r?ae(r[e])?t:r[e]:s},xe=r=>typeof r=="boolean",kt=r=>/^\w*$/.test(r),nr=r=>et(r.replace(/["|']|\]/g,"").split(/\.|\[/)),K=(r,e,t)=>{let s=-1;const a=kt(e)?[e]:nr(e),n=a.length,o=n-1;for(;++s<n;){const l=a[s];let c=t;if(s!==o){const f=r[l];c=se(f)||Array.isArray(f)?f:isNaN(+a[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const tt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ye={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Fe={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},or=b.createContext(null),rt=()=>b.useContext(or),ka=r=>{const{children:e,...t}=r;return b.createElement(or.Provider,{value:t},e)};var ir=(r,e,t,s=!0)=>{const a={defaultValues:e._defaultValues};for(const n in r)Object.defineProperty(a,n,{get:()=>{const o=n;return e._proxyFormState[o]!==ye.all&&(e._proxyFormState[o]=!s||ye.all),t&&(t[o]=!0),r[o]}});return a};const jt=typeof window<"u"?V.useLayoutEffect:V.useEffect;function ja(r){const e=rt(),{control:t=e.control,disabled:s,name:a,exact:n}=r||{},[o,l]=b.useState(t._formState),c=b.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return jt(()=>t._subscribe({name:a,formState:c.current,exact:n,callback:f=>{!s&&l({...t._formState,...f})}}),[a,s,n]),b.useEffect(()=>{c.current.isValid&&t._setValid(!0)},[t]),b.useMemo(()=>ir(o,t,c.current,!1),[o,t])}var Ee=r=>typeof r=="string",lr=(r,e,t,s,a)=>Ee(r)?(s&&e.watch.add(r),T(t,r,a)):Array.isArray(r)?r.map(n=>(s&&e.watch.add(n),T(t,n))):(s&&(e.watchAll=!0),t);function cr(r){const e=rt(),{control:t=e.control,name:s,defaultValue:a,disabled:n,exact:o}=r||{},l=b.useRef(a),[c,f]=b.useState(t._getWatch(s,l.current));return jt(()=>t._subscribe({name:s,formState:{values:!0},exact:o,callback:u=>!n&&f(lr(s,t._names,u.values||t._formValues,!1,l.current))}),[s,t,n,o]),b.useEffect(()=>t._removeUnmounted()),c}function dr(r){const e=rt(),{name:t,disabled:s,control:a=e.control,shouldUnregister:n}=r,o=ar(a._names.array,t),l=cr({control:a,name:t,defaultValue:T(a._formValues,t,T(a._defaultValues,t,r.defaultValue)),exact:!0}),c=ja({control:a,name:t,exact:!0}),f=b.useRef(r),u=b.useRef(a.register(t,{...r.rules,value:l,...xe(r.disabled)?{disabled:r.disabled}:{}})),m=b.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!T(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!T(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!T(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!T(c.validatingFields,t)},error:{enumerable:!0,get:()=>T(c.errors,t)}}),[c,t]),h=b.useCallback(F=>u.current.onChange({target:{value:sr(F),name:t},type:tt.CHANGE}),[t]),x=b.useCallback(()=>u.current.onBlur({target:{value:T(a._formValues,t),name:t},type:tt.BLUR}),[t,a._formValues]),E=b.useCallback(F=>{const v=T(a._fields,t);v&&F&&(v._f.ref={focus:()=>F.focus(),select:()=>F.select(),setCustomValidity:g=>F.setCustomValidity(g),reportValidity:()=>F.reportValidity()})},[a._fields,t]),j=b.useMemo(()=>({name:t,value:l,...xe(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:h,onBlur:x,ref:E}),[t,s,c.disabled,h,x,E,l]);return b.useEffect(()=>{const F=a._options.shouldUnregister||n;a.register(t,{...f.current.rules,...xe(f.current.disabled)?{disabled:f.current.disabled}:{}});const v=(g,S)=>{const D=T(a._fields,g);D&&D._f&&(D._f.mount=S)};if(v(t,!0),F){const g=de(T(a._options.defaultValues,t));K(a._defaultValues,t,g),ae(T(a._formValues,t))&&K(a._formValues,t,g)}return!o&&a.register(t),()=>{(o?F&&!a._state.action:F)?a.unregister(t):v(t,!1)}},[t,a,o,n]),b.useEffect(()=>{a._setDisabledField({disabled:s,name:t})},[s,t,a]),b.useMemo(()=>({field:j,formState:c,fieldState:m}),[j,c,m])}const we=r=>r.render(dr(r));var ur=(r,e,t,s,a)=>e?{...t[r],types:{...t[r]&&t[r].types?t[r].types:{},[s]:a||!0}}:{},He=r=>Array.isArray(r)?r:[r],fr=()=>{let r=[];return{get observers(){return r},next:a=>{for(const n of r)n.next&&n.next(a)},subscribe:a=>(r.push(a),{unsubscribe:()=>{r=r.filter(n=>n!==a)}}),unsubscribe:()=>{r=[]}}},Et=r=>he(r)||!rr(r);function Oe(r,e){if(Et(r)||Et(e))return r===e;if(Me(r)&&Me(e))return r.getTime()===e.getTime();const t=Object.keys(r),s=Object.keys(e);if(t.length!==s.length)return!1;for(const a of t){const n=r[a];if(!s.includes(a))return!1;if(a!=="ref"){const o=e[a];if(Me(n)&&Me(o)||se(n)&&se(o)||Array.isArray(n)&&Array.isArray(o)?!Oe(n,o):n!==o)return!1}}return!0}var me=r=>se(r)&&!Object.keys(r).length,Nt=r=>r.type==="file",ke=r=>typeof r=="function",st=r=>{if(!wt)return!1;const e=r?r.ownerDocument:0;return r instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},hr=r=>r.type==="select-multiple",_t=r=>r.type==="radio",Ea=r=>_t(r)||qe(r),Ft=r=>st(r)&&r.isConnected;function Na(r,e){const t=e.slice(0,-1).length;let s=0;for(;s<t;)r=ae(r)?s++:r[e[s++]];return r}function _a(r){for(const e in r)if(r.hasOwnProperty(e)&&!ae(r[e]))return!1;return!0}function oe(r,e){const t=Array.isArray(e)?e:kt(e)?[e]:nr(e),s=t.length===1?r:Na(r,t),a=t.length-1,n=t[a];return s&&delete s[n],a!==0&&(se(s)&&me(s)||Array.isArray(s)&&_a(s))&&oe(r,t.slice(0,-1)),r}var mr=r=>{for(const e in r)if(ke(r[e]))return!0;return!1};function at(r,e={}){const t=Array.isArray(r);if(se(r)||t)for(const s in r)Array.isArray(r[s])||se(r[s])&&!mr(r[s])?(e[s]=Array.isArray(r[s])?[]:{},at(r[s],e[s])):he(r[s])||(e[s]=!0);return e}function pr(r,e,t){const s=Array.isArray(r);if(se(r)||s)for(const a in r)Array.isArray(r[a])||se(r[a])&&!mr(r[a])?ae(e)||Et(t[a])?t[a]=Array.isArray(r[a])?at(r[a],[]):{...at(r[a])}:pr(r[a],he(e)?{}:e[a],t[a]):t[a]=!Oe(r[a],e[a]);return t}var Ye=(r,e)=>pr(r,e,at(e));const gr={value:!1,isValid:!1},xr={value:!0,isValid:!0};var br=r=>{if(Array.isArray(r)){if(r.length>1){const e=r.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:e,isValid:!!e.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!ae(r[0].attributes.value)?ae(r[0].value)||r[0].value===""?xr:{value:r[0].value,isValid:!0}:xr:gr}return gr},vr=(r,{valueAsNumber:e,valueAsDate:t,setValueAs:s})=>ae(r)?r:e?r===""?NaN:r&&+r:t&&Ee(r)?new Date(r):s?s(r):r;const yr={isValid:!1,value:null};var wr=r=>Array.isArray(r)?r.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,yr):yr;function kr(r){const e=r.ref;return Nt(e)?e.files:_t(e)?wr(r.refs).value:hr(e)?[...e.selectedOptions].map(({value:t})=>t):qe(e)?br(r.refs).value:vr(ae(e.value)?r.ref.value:e.value,r)}var Fa=(r,e,t,s)=>{const a={};for(const n of r){const o=T(e,n);o&&K(a,n,o._f)}return{criteriaMode:t,names:[...r],fields:a,shouldUseNativeValidation:s}},nt=r=>r instanceof RegExp,Ge=r=>ae(r)?r:nt(r)?r.source:se(r)?nt(r.value)?r.value.source:r.value:r,jr=r=>({isOnSubmit:!r||r===ye.onSubmit,isOnBlur:r===ye.onBlur,isOnChange:r===ye.onChange,isOnAll:r===ye.all,isOnTouch:r===ye.onTouched});const Er="AsyncFunction";var Sa=r=>!!r&&!!r.validate&&!!(ke(r.validate)&&r.validate.constructor.name===Er||se(r.validate)&&Object.values(r.validate).find(e=>e.constructor.name===Er)),Ta=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),Nr=(r,e,t)=>!t&&(e.watchAll||e.watch.has(r)||[...e.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const Xe=(r,e,t,s)=>{for(const a of t||Object.keys(r)){const n=T(r,a);if(n){const{_f:o,...l}=n;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],a)&&!s)return!0;if(o.ref&&e(o.ref,o.name)&&!s)return!0;if(Xe(l,e))break}else if(se(l)&&Xe(l,e))break}}};function _r(r,e,t){const s=T(r,t);if(s||kt(t))return{error:s,name:t};const a=t.split(".");for(;a.length;){const n=a.join("."),o=T(e,n),l=T(r,n);if(o&&!Array.isArray(o)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};a.pop()}return{name:t}}var Ca=(r,e,t,s)=>{t(r);const{name:a,...n}=r;return me(n)||Object.keys(n).length>=Object.keys(e).length||Object.keys(n).find(o=>e[o]===(!s||ye.all))},Oa=(r,e,t)=>!r||!e||r===e||He(r).some(s=>s&&(t?s===e:s.startsWith(e)||e.startsWith(s))),Aa=(r,e,t,s,a)=>a.isOnAll?!1:!t&&a.isOnTouch?!(e||r):(t?s.isOnBlur:a.isOnBlur)?!r:(t?s.isOnChange:a.isOnChange)?r:!0,$a=(r,e)=>!et(T(r,e)).length&&oe(r,e),Da=(r,e,t)=>{const s=He(T(r,t));return K(s,"root",e[t]),K(r,t,s),r},ot=r=>Ee(r);function Fr(r,e,t="validate"){if(ot(r)||Array.isArray(r)&&r.every(ot)||xe(r)&&!r)return{type:t,message:ot(r)?r:"",ref:e}}var Pe=r=>se(r)&&!nt(r)?r:{value:r,message:""},Sr=async(r,e,t,s,a,n)=>{const{ref:o,refs:l,required:c,maxLength:f,minLength:u,min:m,max:h,pattern:x,validate:E,name:j,valueAsNumber:F,mount:v}=r._f,g=T(t,j);if(!v||e.has(j))return{};const S=l?l[0]:o,D=z=>{a&&S.reportValidity&&(S.setCustomValidity(xe(z)?"":z||""),S.reportValidity())},O={},B=_t(o),X=qe(o),U=B||X,q=(F||Nt(o))&&ae(o.value)&&ae(g)||st(o)&&o.value===""||g===""||Array.isArray(g)&&!g.length,Z=ur.bind(null,j,s,O),I=(z,N,L,M=Fe.maxLength,w=Fe.minLength)=>{const W=z?N:L;O[j]={type:z?M:w,message:W,ref:o,...Z(z?M:w,W)}};if(n?!Array.isArray(g)||!g.length:c&&(!U&&(q||he(g))||xe(g)&&!g||X&&!br(l).isValid||B&&!wr(l).isValid)){const{value:z,message:N}=ot(c)?{value:!!c,message:c}:Pe(c);if(z&&(O[j]={type:Fe.required,message:N,ref:S,...Z(Fe.required,N)},!s))return D(N),O}if(!q&&(!he(m)||!he(h))){let z,N;const L=Pe(h),M=Pe(m);if(!he(g)&&!isNaN(g)){const w=o.valueAsNumber||g&&+g;he(L.value)||(z=w>L.value),he(M.value)||(N=w<M.value)}else{const w=o.valueAsDate||new Date(g),W=k=>new Date(new Date().toDateString()+" "+k),re=o.type=="time",ie=o.type=="week";Ee(L.value)&&g&&(z=re?W(g)>W(L.value):ie?g>L.value:w>new Date(L.value)),Ee(M.value)&&g&&(N=re?W(g)<W(M.value):ie?g<M.value:w<new Date(M.value))}if((z||N)&&(I(!!z,L.message,M.message,Fe.max,Fe.min),!s))return D(O[j].message),O}if((f||u)&&!q&&(Ee(g)||n&&Array.isArray(g))){const z=Pe(f),N=Pe(u),L=!he(z.value)&&g.length>+z.value,M=!he(N.value)&&g.length<+N.value;if((L||M)&&(I(L,z.message,N.message),!s))return D(O[j].message),O}if(x&&!q&&Ee(g)){const{value:z,message:N}=Pe(x);if(nt(z)&&!g.match(z)&&(O[j]={type:Fe.pattern,message:N,ref:o,...Z(Fe.pattern,N)},!s))return D(N),O}if(E){if(ke(E)){const z=await E(g,t),N=Fr(z,S);if(N&&(O[j]={...N,...Z(Fe.validate,N.message)},!s))return D(N.message),O}else if(se(E)){let z={};for(const N in E){if(!me(z)&&!s)break;const L=Fr(await E[N](g,t),S,N);L&&(z={...L,...Z(N,L.message)},D(L.message),s&&(O[j]=z))}if(!me(z)&&(O[j]={ref:S,...z},!s))return O}}return D(!0),O};const Ma={mode:ye.onSubmit,reValidateMode:ye.onChange,shouldFocusError:!0};function Va(r={}){let e={...Ma,...r},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:ke(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1};const s={};let a=se(e.defaultValues)||se(e.values)?de(e.defaultValues||e.values)||{}:{},n=e.shouldUnregister?{}:de(a),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,f=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...u};const h={array:fr(),state:fr()},x=e.criteriaMode===ye.all,E=d=>p=>{clearTimeout(f),f=setTimeout(d,p)},j=async d=>{if(!e.disabled&&(u.isValid||m.isValid||d)){const p=e.resolver?me((await X()).errors):await q(s,!0);p!==t.isValid&&h.state.next({isValid:p})}},F=(d,p)=>{!e.disabled&&(u.isValidating||u.validatingFields||m.isValidating||m.validatingFields)&&((d||Array.from(l.mount)).forEach(y=>{y&&(p?K(t.validatingFields,y,p):oe(t.validatingFields,y))}),h.state.next({validatingFields:t.validatingFields,isValidating:!me(t.validatingFields)}))},v=(d,p=[],y,A,C=!0,_=!0)=>{if(A&&y&&!e.disabled){if(o.action=!0,_&&Array.isArray(T(s,d))){const P=y(T(s,d),A.argA,A.argB);C&&K(s,d,P)}if(_&&Array.isArray(T(t.errors,d))){const P=y(T(t.errors,d),A.argA,A.argB);C&&K(t.errors,d,P),$a(t.errors,d)}if((u.touchedFields||m.touchedFields)&&_&&Array.isArray(T(t.touchedFields,d))){const P=y(T(t.touchedFields,d),A.argA,A.argB);C&&K(t.touchedFields,d,P)}(u.dirtyFields||m.dirtyFields)&&(t.dirtyFields=Ye(a,n)),h.state.next({name:d,isDirty:I(d,p),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else K(n,d,p)},g=(d,p)=>{K(t.errors,d,p),h.state.next({errors:t.errors})},S=d=>{t.errors=d,h.state.next({errors:t.errors,isValid:!1})},D=(d,p,y,A)=>{const C=T(s,d);if(C){const _=T(n,d,ae(y)?T(a,d):y);ae(_)||A&&A.defaultChecked||p?K(n,d,p?_:kr(C._f)):L(d,_),o.mount&&j()}},O=(d,p,y,A,C)=>{let _=!1,P=!1;const Q={name:d};if(!e.disabled){if(!y||A){(u.isDirty||m.isDirty)&&(P=t.isDirty,t.isDirty=Q.isDirty=I(),_=P!==Q.isDirty);const te=Oe(T(a,d),p);P=!!T(t.dirtyFields,d),te?oe(t.dirtyFields,d):K(t.dirtyFields,d,!0),Q.dirtyFields=t.dirtyFields,_=_||(u.dirtyFields||m.dirtyFields)&&P!==!te}if(y){const te=T(t.touchedFields,d);te||(K(t.touchedFields,d,y),Q.touchedFields=t.touchedFields,_=_||(u.touchedFields||m.touchedFields)&&te!==y)}_&&C&&h.state.next(Q)}return _?Q:{}},B=(d,p,y,A)=>{const C=T(t.errors,d),_=(u.isValid||m.isValid)&&xe(p)&&t.isValid!==p;if(e.delayError&&y?(c=E(()=>g(d,y)),c(e.delayError)):(clearTimeout(f),c=null,y?K(t.errors,d,y):oe(t.errors,d)),(y?!Oe(C,y):C)||!me(A)||_){const P={...A,..._&&xe(p)?{isValid:p}:{},errors:t.errors,name:d};t={...t,...P},h.state.next(P)}},X=async d=>{F(d,!0);const p=await e.resolver(n,e.context,Fa(d||l.mount,s,e.criteriaMode,e.shouldUseNativeValidation));return F(d),p},U=async d=>{const{errors:p}=await X(d);if(d)for(const y of d){const A=T(p,y);A?K(t.errors,y,A):oe(t.errors,y)}else t.errors=p;return p},q=async(d,p,y={valid:!0})=>{for(const A in d){const C=d[A];if(C){const{_f:_,...P}=C;if(_){const Q=l.array.has(_.name),te=C._f&&Sa(C._f);te&&u.validatingFields&&F([A],!0);const ve=await Sr(C,l.disabled,n,x,e.shouldUseNativeValidation&&!p,Q);if(te&&u.validatingFields&&F([A]),ve[_.name]&&(y.valid=!1,p))break;!p&&(T(ve,_.name)?Q?Da(t.errors,ve,_.name):K(t.errors,_.name,ve[_.name]):oe(t.errors,_.name))}!me(P)&&await q(P,p,y)}}return y.valid},Z=()=>{for(const d of l.unMount){const p=T(s,d);p&&(p._f.refs?p._f.refs.every(y=>!Ft(y)):!Ft(p._f.ref))&&ce(d)}l.unMount=new Set},I=(d,p)=>!e.disabled&&(d&&p&&K(n,d,p),!Oe(k(),a)),z=(d,p,y)=>lr(d,l,{...o.mount?n:ae(p)?a:Ee(d)?{[d]:p}:p},y,p),N=d=>et(T(o.mount?n:a,d,e.shouldUnregister?T(a,d,[]):[])),L=(d,p,y={})=>{const A=T(s,d);let C=p;if(A){const _=A._f;_&&(!_.disabled&&K(n,d,vr(p,_)),C=st(_.ref)&&he(p)?"":p,hr(_.ref)?[..._.ref.options].forEach(P=>P.selected=C.includes(P.value)):_.refs?qe(_.ref)?_.refs.forEach(P=>{(!P.defaultChecked||!P.disabled)&&(Array.isArray(C)?P.checked=!!C.find(Q=>Q===P.value):P.checked=C===P.value||!!C)}):_.refs.forEach(P=>P.checked=P.value===C):Nt(_.ref)?_.ref.value="":(_.ref.value=C,_.ref.type||h.state.next({name:d,values:de(n)})))}(y.shouldDirty||y.shouldTouch)&&O(d,C,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&ie(d)},M=(d,p,y)=>{for(const A in p){if(!p.hasOwnProperty(A))return;const C=p[A],_=`${d}.${A}`,P=T(s,_);(l.array.has(d)||se(C)||P&&!P._f)&&!Me(C)?M(_,C,y):L(_,C,y)}},w=(d,p,y={})=>{const A=T(s,d),C=l.array.has(d),_=de(p);K(n,d,_),C?(h.array.next({name:d,values:de(n)}),(u.isDirty||u.dirtyFields||m.isDirty||m.dirtyFields)&&y.shouldDirty&&h.state.next({name:d,dirtyFields:Ye(a,n),isDirty:I(d,_)})):A&&!A._f&&!he(_)?M(d,_,y):L(d,_,y),Nr(d,l)&&h.state.next({...t}),h.state.next({name:o.mount?d:void 0,values:de(n)})},W=async d=>{o.mount=!0;const p=d.target;let y=p.name,A=!0;const C=T(s,y),_=te=>{A=Number.isNaN(te)||Me(te)&&isNaN(te.getTime())||Oe(te,T(n,y,te))},P=jr(e.mode),Q=jr(e.reValidateMode);if(C){let te,ve;const bt=p.type?kr(C._f):sr(d),De=d.type===tt.BLUR||d.type===tt.FOCUS_OUT,xo=!Ta(C._f)&&!e.resolver&&!T(t.errors,y)&&!C._f.deps||Aa(De,T(t.touchedFields,y),t.isSubmitted,Q,P),Wt=Nr(y,l,De);K(n,y,bt),De?(C._f.onBlur&&C._f.onBlur(d),c&&c(0)):C._f.onChange&&C._f.onChange(d);const qt=O(y,bt,De),bo=!me(qt)||Wt;if(!De&&h.state.next({name:y,type:d.type,values:de(n)}),xo)return(u.isValid||m.isValid)&&(e.mode==="onBlur"?De&&j():De||j()),bo&&h.state.next({name:y,...Wt?{}:qt});if(!De&&Wt&&h.state.next({...t}),e.resolver){const{errors:Ms}=await X([y]);if(_(bt),A){const vo=_r(t.errors,s,y),Vs=_r(Ms,s,vo.name||y);te=Vs.error,y=Vs.name,ve=me(Ms)}}else F([y],!0),te=(await Sr(C,l.disabled,n,x,e.shouldUseNativeValidation))[y],F([y]),_(bt),A&&(te?ve=!1:(u.isValid||m.isValid)&&(ve=await q(s,!0)));A&&(C._f.deps&&ie(C._f.deps),B(y,ve,te,qt))}},re=(d,p)=>{if(T(t.errors,p)&&d.focus)return d.focus(),1},ie=async(d,p={})=>{let y,A;const C=He(d);if(e.resolver){const _=await U(ae(d)?d:C);y=me(_),A=d?!C.some(P=>T(_,P)):y}else d?(A=(await Promise.all(C.map(async _=>{const P=T(s,_);return await q(P&&P._f?{[_]:P}:P)}))).every(Boolean),!(!A&&!t.isValid)&&j()):A=y=await q(s);return h.state.next({...!Ee(d)||(u.isValid||m.isValid)&&y!==t.isValid?{}:{name:d},...e.resolver||!d?{isValid:y}:{},errors:t.errors}),p.shouldFocus&&!A&&Xe(s,re,d?C:l.mount),A},k=d=>{const p={...o.mount?n:a};return ae(d)?p:Ee(d)?T(p,d):d.map(y=>T(p,y))},R=(d,p)=>({invalid:!!T((p||t).errors,d),isDirty:!!T((p||t).dirtyFields,d),error:T((p||t).errors,d),isValidating:!!T(t.validatingFields,d),isTouched:!!T((p||t).touchedFields,d)}),J=d=>{d&&He(d).forEach(p=>oe(t.errors,p)),h.state.next({errors:d?t.errors:{}})},ee=(d,p,y)=>{const A=(T(s,d,{_f:{}})._f||{}).ref,C=T(t.errors,d)||{},{ref:_,message:P,type:Q,...te}=C;K(t.errors,d,{...te,...p,ref:A}),h.state.next({name:d,errors:t.errors,isValid:!1}),y&&y.shouldFocus&&A&&A.focus&&A.focus()},ne=(d,p)=>ke(d)?h.state.subscribe({next:y=>d(z(void 0,p),y)}):z(d,p,!0),H=d=>h.state.subscribe({next:p=>{Oa(d.name,p.name,d.exact)&&Ca(p,d.formState||u,go,d.reRenderRoot)&&d.callback({values:{...n},...t,...p})}}).unsubscribe,le=d=>(o.mount=!0,m={...m,...d.formState},H({...d,formState:m})),ce=(d,p={})=>{for(const y of d?He(d):l.mount)l.mount.delete(y),l.array.delete(y),p.keepValue||(oe(s,y),oe(n,y)),!p.keepError&&oe(t.errors,y),!p.keepDirty&&oe(t.dirtyFields,y),!p.keepTouched&&oe(t.touchedFields,y),!p.keepIsValidating&&oe(t.validatingFields,y),!e.shouldUnregister&&!p.keepDefaultValue&&oe(a,y);h.state.next({values:de(n)}),h.state.next({...t,...p.keepDirty?{isDirty:I()}:{}}),!p.keepIsValid&&j()},Y=({disabled:d,name:p})=>{(xe(d)&&o.mount||d||l.disabled.has(p))&&(d?l.disabled.add(p):l.disabled.delete(p))},fe=(d,p={})=>{let y=T(s,d);const A=xe(p.disabled)||xe(e.disabled);return K(s,d,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:d}},name:d,mount:!0,...p}}),l.mount.add(d),y?Y({disabled:xe(p.disabled)?p.disabled:e.disabled,name:d}):D(d,!0,p.value),{...A?{disabled:p.disabled||e.disabled}:{},...e.progressive?{required:!!p.required,min:Ge(p.min),max:Ge(p.max),minLength:Ge(p.minLength),maxLength:Ge(p.maxLength),pattern:Ge(p.pattern)}:{},name:d,onChange:W,onBlur:W,ref:C=>{if(C){fe(d,p),y=T(s,d);const _=ae(C.value)&&C.querySelectorAll&&C.querySelectorAll("input,select,textarea")[0]||C,P=Ea(_),Q=y._f.refs||[];if(P?Q.find(te=>te===_):_===y._f.ref)return;K(s,d,{_f:{...y._f,...P?{refs:[...Q.filter(Ft),_,...Array.isArray(T(a,d))?[{}]:[]],ref:{type:_.type,name:d}}:{ref:_}}}),D(d,!1,void 0,_)}else y=T(s,d,{}),y._f&&(y._f.mount=!1),(e.shouldUnregister||p.shouldUnregister)&&!(ar(l.array,d)&&o.action)&&l.unMount.add(d)}}},Ce=()=>e.shouldFocusError&&Xe(s,re,l.mount),Be=d=>{xe(d)&&(h.state.next({disabled:d}),Xe(s,(p,y)=>{const A=T(s,y);A&&(p.disabled=A._f.disabled||d,Array.isArray(A._f.refs)&&A._f.refs.forEach(C=>{C.disabled=A._f.disabled||d}))},0,!1))},Os=(d,p)=>async y=>{let A;y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let C=de(n);if(h.state.next({isSubmitting:!0}),e.resolver){const{errors:_,values:P}=await X();t.errors=_,C=P}else await q(s);if(l.disabled.size)for(const _ of l.disabled)K(C,_,void 0);if(oe(t.errors,"root"),me(t.errors)){h.state.next({errors:{}});try{await d(C,y)}catch(_){A=_}}else p&&await p({...t.errors},y),Ce(),setTimeout(Ce);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:me(t.errors)&&!A,submitCount:t.submitCount+1,errors:t.errors}),A)throw A},mo=(d,p={})=>{T(s,d)&&(ae(p.defaultValue)?w(d,de(T(a,d))):(w(d,p.defaultValue),K(a,d,de(p.defaultValue))),p.keepTouched||oe(t.touchedFields,d),p.keepDirty||(oe(t.dirtyFields,d),t.isDirty=p.defaultValue?I(d,de(T(a,d))):I()),p.keepError||(oe(t.errors,d),u.isValid&&j()),h.state.next({...t}))},As=(d,p={})=>{const y=d?de(d):a,A=de(y),C=me(d),_=C?a:A;if(p.keepDefaultValues||(a=y),!p.keepValues){if(p.keepDirtyValues){const P=new Set([...l.mount,...Object.keys(Ye(a,n))]);for(const Q of Array.from(P))T(t.dirtyFields,Q)?K(_,Q,T(n,Q)):w(Q,T(_,Q))}else{if(wt&&ae(d))for(const P of l.mount){const Q=T(s,P);if(Q&&Q._f){const te=Array.isArray(Q._f.refs)?Q._f.refs[0]:Q._f.ref;if(st(te)){const ve=te.closest("form");if(ve){ve.reset();break}}}}for(const P of l.mount)w(P,T(_,P))}n=de(_),h.array.next({values:{..._}}),h.state.next({values:{..._}})}l={mount:p.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!p.keepIsValid||!!p.keepDirtyValues,o.watch=!!e.shouldUnregister,h.state.next({submitCount:p.keepSubmitCount?t.submitCount:0,isDirty:C?!1:p.keepDirty?t.isDirty:!!(p.keepDefaultValues&&!Oe(d,a)),isSubmitted:p.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:C?{}:p.keepDirtyValues?p.keepDefaultValues&&n?Ye(a,n):t.dirtyFields:p.keepDefaultValues&&d?Ye(a,d):p.keepDirty?t.dirtyFields:{},touchedFields:p.keepTouched?t.touchedFields:{},errors:p.keepErrors?t.errors:{},isSubmitSuccessful:p.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},$s=(d,p)=>As(ke(d)?d(n):d,p),po=(d,p={})=>{const y=T(s,d),A=y&&y._f;if(A){const C=A.refs?A.refs[0]:A.ref;C.focus&&(C.focus(),p.shouldSelect&&ke(C.select)&&C.select())}},go=d=>{t={...t,...d}},Ds={control:{register:fe,unregister:ce,getFieldState:R,handleSubmit:Os,setError:ee,_subscribe:H,_runSchema:X,_getWatch:z,_getDirty:I,_setValid:j,_setFieldArray:v,_setDisabledField:Y,_setErrors:S,_getFieldArray:N,_reset:As,_resetDefaultValues:()=>ke(e.defaultValues)&&e.defaultValues().then(d=>{$s(d,e.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:Z,_disableForm:Be,_subjects:h,_proxyFormState:u,get _fields(){return s},get _formValues(){return n},get _state(){return o},set _state(d){o=d},get _defaultValues(){return a},get _names(){return l},set _names(d){l=d},get _formState(){return t},get _options(){return e},set _options(d){e={...e,...d}}},subscribe:le,trigger:ie,register:fe,handleSubmit:Os,watch:ne,setValue:w,getValues:k,reset:$s,resetField:mo,clearErrors:J,unregister:ce,setError:ee,setFocus:po,getFieldState:R};return{...Ds,formControl:Ds}}function La(r={}){const e=b.useRef(void 0),t=b.useRef(void 0),[s,a]=b.useState({isDirty:!1,isValidating:!1,isLoading:ke(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,isReady:!1,defaultValues:ke(r.defaultValues)?void 0:r.defaultValues});e.current||(e.current={...r.formControl?r.formControl:Va(r),formState:s},r.formControl&&r.defaultValues&&!ke(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const n=e.current.control;return n._options=r,jt(()=>{const o=n._subscribe({formState:n._proxyFormState,callback:()=>a({...n._formState}),reRenderRoot:!0});return a(l=>({...l,isReady:!0})),n._formState.isReady=!0,o},[n]),b.useEffect(()=>n._disableForm(r.disabled),[n,r.disabled]),b.useEffect(()=>{r.mode&&(n._options.mode=r.mode),r.reValidateMode&&(n._options.reValidateMode=r.reValidateMode),r.errors&&!me(r.errors)&&n._setErrors(r.errors)},[n,r.errors,r.mode,r.reValidateMode]),b.useEffect(()=>{r.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,r.shouldUnregister]),b.useEffect(()=>{if(n._proxyFormState.isDirty){const o=n._getDirty();o!==s.isDirty&&n._subjects.state.next({isDirty:o})}},[n,s.isDirty]),b.useEffect(()=>{r.values&&!Oe(r.values,t.current)?(n._reset(r.values,n._options.resetOptions),t.current=r.values,a(o=>({...o}))):n._resetDefaultValues()},[n,r.values]),b.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),e.current.formState=ir(s,n),e.current}const Tr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Ia={sm:"h-6",md:"h-10",lg:"h-12"},za={sm:"px-2",md:"px-2.5",lg:"px-3"};function Cr(r,e,t,s,a,n,o){const l=e?"datetime-local":"date";return i.jsxs(i.Fragment,{children:[i.jsx("input",{id:r,type:l,disabled:a,...s,className:$("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition text-[var(--color-ds-text-primary)] font-[var(--font-primary)]",Tr[t],Ia[t],za[t],n?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",a?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-secondary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]",o)}),i.jsx("div",{children:n!=null&&n.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:n.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Or(r){const{control:e,name:t,rules:s,defaultValue:a,showTime:n=!1,size:o="sm",width:l="100%",label:c,labelHidden:f=!1,hasError:u=!1,errorMessage:m="",disabled:h=!1,className:x,onChange:E}=r,j=b.useId(),F=t||j;return i.jsxs("div",{className:$("flex flex-col",x),style:{width:l,maxWidth:"100%"},children:[c&&i.jsx("label",{htmlFor:F,className:$("pb-2 text-[var(--color-ds-text-primary)]",Tr[o],f&&"sr-only"),children:c}),e&&t?i.jsx(we,{name:t,control:e,rules:s,defaultValue:a,render:({field:v,fieldState:g})=>Cr(F,n,o,{value:v.value,onChange:v.onChange,onBlur:v.onBlur},h,g.error,x)}):Cr(F,n,o,{defaultValue:a,onChange:E},h,u?{message:m}:void 0,x)]})}const Pa=({trigger:r,items:e,align:t="left",className:s})=>{const[a,n]=b.useState(!1),o=b.useRef(null),l=b.useRef([]);b.useEffect(()=>{const f=u=>{o.current&&!o.current.contains(u.target)&&n(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[]);const c=f=>{var m,h;const u=l.current.findIndex(x=>x===document.activeElement);if(f.key==="Escape")n(!1);else if(f.key==="ArrowDown"){f.preventDefault();const x=(u+1)%e.length;(m=l.current[x])==null||m.focus()}else if(f.key==="ArrowUp"){f.preventDefault();const x=(u-1+e.length)%e.length;(h=l.current[x])==null||h.focus()}};return i.jsxs("div",{className:$("relative inline-block",s),ref:o,children:[i.jsx("button",{type:"button",onClick:()=>n(f=>!f),className:"inline-flex items-center focus:outline-none","aria-haspopup":"menu","aria-expanded":a,children:r}),a&&i.jsx("div",{role:"menu","aria-orientation":"vertical",className:$("absolute mt-2 min-w-[160px] bg-[var(--color-ds-background-page)]","border border-[var(--color-ds-border-muted)] rounded shadow-lg z-10",t==="right"?"right-0":"left-0"),onKeyDown:c,children:e.map((f,u)=>{const{label:m,onSelect:h,disabled:x,icon:E}=f;return i.jsxs("button",{role:"menuitem",type:"button",disabled:x,ref:j=>{l.current[u]=j},className:$("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",x?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{x||(h(),n(!1))},children:[E&&i.jsx(E,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),m]},u)})})]})},Ua=(r,e,t,s)=>{var n,o,l,c;const a=[t,{code:e,...s||{}}];if((o=(n=r==null?void 0:r.services)==null?void 0:n.logger)!=null&&o.forward)return r.services.logger.forward(a,"warn","react-i18next::",!0);Ve(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(c=(l=r==null?void 0:r.services)==null?void 0:l.logger)!=null&&c.warn?r.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},Ar={},St=(r,e,t,s)=>{Ve(t)&&Ar[t]||(Ve(t)&&(Ar[t]=new Date),Ua(r,e,t,s))},$r=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},Tt=(r,e,t)=>{r.loadNamespaces(e,$r(r,t))},Dr=(r,e,t,s)=>{if(Ve(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return Tt(r,t,s);t.forEach(a=>{r.options.ns.indexOf(a)<0&&r.options.ns.push(a)}),r.loadLanguages(e,$r(r,s))},Ra=(r,e,t={})=>!e.languages||!e.languages.length?(St(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(s,a)=>{var n;if(((n=t.bindI18n)==null?void 0:n.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!a(s.isLanguageChangingTo,r))return!1}}),Ve=r=>typeof r=="string",Ba=r=>typeof r=="object"&&r!==null,Za=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Wa={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},qa=r=>Wa[r];let Ha={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:r=>r.replace(Za,qa)};const Ya=()=>Ha;let Ga;const Xa=()=>Ga,Ja=b.createContext();class Ka{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Qa=(r,e)=>{const t=b.useRef();return b.useEffect(()=>{t.current=r},[r,e]),t.current},Mr=(r,e,t,s)=>r.getFixedT(e,t,s),en=(r,e,t,s)=>b.useCallback(Mr(r,e,t,s),[r,e,t,s]),Ct=(r,e={})=>{var D,O,B,X;const{i18n:t}=e,{i18n:s,defaultNS:a}=b.useContext(Ja)||{},n=t||s||Xa();if(n&&!n.reportNamespaces&&(n.reportNamespaces=new Ka),!n){St(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const U=(Z,I)=>Ve(I)?I:Ba(I)&&Ve(I.defaultValue)?I.defaultValue:Array.isArray(Z)?Z[Z.length-1]:Z,q=[U,{},!1];return q.t=U,q.i18n={},q.ready=!1,q}(D=n.options.react)!=null&&D.wait&&St(n,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...Ya(),...n.options.react,...e},{useSuspense:l,keyPrefix:c}=o;let f=a||((O=n.options)==null?void 0:O.defaultNS);f=Ve(f)?[f]:f||["translation"],(X=(B=n.reportNamespaces).addUsedNamespaces)==null||X.call(B,f);const u=(n.isInitialized||n.initializedStoreOnce)&&f.every(U=>Ra(U,n,o)),m=en(n,e.lng||null,o.nsMode==="fallback"?f:f[0],c),h=()=>m,x=()=>Mr(n,e.lng||null,o.nsMode==="fallback"?f:f[0],c),[E,j]=b.useState(h);let F=f.join();e.lng&&(F=`${e.lng}${F}`);const v=Qa(F),g=b.useRef(!0);b.useEffect(()=>{const{bindI18n:U,bindI18nStore:q}=o;g.current=!0,!u&&!l&&(e.lng?Dr(n,e.lng,f,()=>{g.current&&j(x)}):Tt(n,f,()=>{g.current&&j(x)})),u&&v&&v!==F&&g.current&&j(x);const Z=()=>{g.current&&j(x)};return U&&(n==null||n.on(U,Z)),q&&(n==null||n.store.on(q,Z)),()=>{g.current=!1,n&&(U==null||U.split(" ").forEach(I=>n.off(I,Z))),q&&n&&q.split(" ").forEach(I=>n.store.off(I,Z))}},[n,F]),b.useEffect(()=>{g.current&&u&&j(h)},[n,c,u]);const S=[E,n,u];if(S.t=E,S.i18n=n,S.ready=u,u||!u&&!l)return S;throw new Promise(U=>{e.lng?Dr(n,e.lng,f,()=>U()):Tt(n,f,()=>U())})},Ot={sm:"text-sm",md:"text-base",lg:"text-lg"};function Vr(r,e,t,s,a,n,o,l,c){const{t:f}=Ct(),u=b.useRef(null),m=typeof s=="number"&&e.length>=s,h=()=>{var g;!o&&!m&&((g=u.current)==null||g.click())},x=g=>{const S=g.target.files;if(!S)return;const D=Array.from(S);let O=e.concat(D);s&&(O=O.slice(0,s)),t(O),g.target.value=""},E=g=>{if(g.preventDefault(),o||m)return;const S=Array.from(g.dataTransfer.files);let D=e.concat(S);s&&(D=D.slice(0,s)),t(D)},j=g=>{g.preventDefault()},F=g=>{const S=URL.createObjectURL(g);window.open(S)},v=g=>{const S=e.filter((D,O)=>O!==g);t(S)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"self-start mb-4 w-auto",children:i.jsx(_e,{type:"button",variant:"outline",size:n,icon:er,onClick:h,disabled:o||m,children:f("ds.fileUploader.browse","Browse files")})}),!m&&i.jsxs("div",{className:$("relative flex bg-[var(--color-ds-background-page)] flex-col items-center justify-center border-2 border-dashed border-[var(--color-ds-border-muted)] rounded-lg p-4",o?"opacity-50 cursor-not-allowed":"hover:border-[var(--color-ds-border-default)]",Ot[n],c),onDrop:E,onDragOver:j,children:[i.jsx("input",{id:r,type:"file",ref:u,className:"hidden",multiple:s!==1,accept:a,onChange:x,disabled:o}),i.jsx(je,{component:ra,size:"md",className:"w-8 h-8 text-[var(--color-ds-text-secondary)]"}),i.jsx("p",{className:"mt-3 text-[var(--color-ds-text-secondary)] text-center",children:f("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),e.length>0&&i.jsx("ul",{className:"mt-4 space-y-1",children:e.map((g,S)=>i.jsxs("li",{className:"flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(er,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),i.jsx("span",{className:"truncate pr-2",children:g.name})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(_e,{variant:"ghost",size:"sm",icon:tr,ariaLabel:f("ds.fileUploader.view","View"),onClick:()=>F(g)}),i.jsx(_e,{variant:"ghost",size:"sm",icon:vt,ariaLabel:f("ds.fileUploader.remove","Remove"),onClick:()=>v(S)})]})]},S))}),i.jsx("div",{className:"pt-[5px] min-h-[18px] w-full",children:l!=null&&l.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Lr(r){const{control:e,name:t,rules:s,defaultValue:a,maxFiles:n,accept:o,size:l="sm",width:c="100%",label:f,labelHidden:u=!1,disabled:m=!1,hasError:h=!1,errorMessage:x="",className:E}=r,j=b.useId(),F=t||j;if(e&&t)return i.jsxs("div",{className:$("flex flex-col",E),style:{width:c},children:[f&&i.jsx("label",{htmlFor:F,className:$("pb-[10px] text-[var(--color-ds-text-primary)]",Ot[l],u&&"sr-only"),children:f}),i.jsx(we,{name:t,control:e,rules:s,defaultValue:a instanceof FileList?Array.from(a):a||[],render:({field:S,fieldState:D})=>Vr(F,S.value,O=>S.onChange(O),n,o,l,m,D.error,E)})]});const[v,g]=b.useState(a instanceof FileList?Array.from(a):a||[]);return i.jsxs("div",{className:$("flex flex-col",E),style:{width:c},children:[f&&i.jsx("label",{htmlFor:F,className:$("pb-[10px] text-[var(--color-ds-text-primary)]",Ot[l],u&&"sr-only"),children:f}),Vr(F,v,g,n,o,l,m,h?{message:x}:void 0,E)]})}const Le=({count:r=1,width:e,height:t="1em",variant:s="rect",className:a})=>{const n=Array.from({length:r});return i.jsx(i.Fragment,{children:n.map((o,l)=>i.jsx("span",{role:"status","aria-label":"Cargando...",className:$("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",a),style:{width:e??"auto",height:t}},l))})},it={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},tn={sm:"h-6",md:"h-10",lg:"h-12"},rn={sm:"px-2",md:"px-2.5",lg:"px-3"},Ir={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},sn={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function lt({id:r,type:e="text",size:t="sm",width:s="100%",label:a,labelHidden:n=!1,hasError:o=!1,errorMessage:l="",prefixIcon:c,suffixIcon:f,separator:u,suffixButton:m,disabled:h=!1,control:x,name:E,rules:j,defaultValue:F,loading:v=!1,className:g,...S}){const D=b.useId(),[O,B]=b.useState(!1),X=r||D,U=e==="password",Z=c??(e==="number"?la:void 0),I=U?O?na:tr:f,z=$("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",it[t],tn[t],rn[t],o?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]","bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]","disabled:bg-[var(--color-ds-background-disabled)]","disabled:border-[var(--color-ds-border-muted)]","disabled:text-[var(--color-ds-text-disabled)]","disabled:cursor-not-allowed");return v?i.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!n&&a&&i.jsx("label",{htmlFor:X,className:$("pb-2",it[t]),children:a}),i.jsx(Le,{width:"100%",height:sn[t],variant:"rect",className:"rounded-lg"}),i.jsx("div",{className:"min-h-[18px] w-full",children:i.jsx("span",{"aria-hidden":"true",children:" "})})]}):x&&E?i.jsx(we,{name:E,control:x,rules:j,defaultValue:F,render:({field:N,fieldState:L})=>i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:X,className:$("pb-2 text-[var(--color-ds-text-primary)]",it[t]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[Z&&i.jsx("div",{className:$("absolute left-0 flex items-center h-full",Ir[t]),children:i.jsx(je,{component:Z,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...N,id:X,type:U?O?"text":"password":e,disabled:h,"aria-invalid":!!L.error,className:$(z,Z&&"pl-9",I&&"pr-9",g),onInvalid:M=>M.preventDefault(),style:U&&!O?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),u&&i.jsx("div",{className:"flex items-center h-full",children:u}),m&&i.jsx("div",{className:"flex items-center h-full pr-2",children:m}),I&&i.jsx("button",{type:"button",onClick:()=>B(M=>!M),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(je,{component:I,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:L.error?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:L.error.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}):i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:X,className:$("pb-2 text-[var(--color-ds-text-primary)]",it[t]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[Z&&i.jsx("div",{className:$("absolute left-0 flex items-center h-full",Ir[t]),children:i.jsx(je,{component:Z,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...S,id:X,type:U?O?"text":"password":e,disabled:h,"aria-invalid":o,className:$(z,Z&&"pl-9",I&&"pr-9",g),onInvalid:N=>N.preventDefault(),style:U&&!O?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),u&&i.jsx("div",{className:"flex items-center h-full",children:u}),m&&i.jsx("div",{className:"flex items-center h-full",children:m}),I&&i.jsx("button",{type:"button",onClick:()=>B(N=>!N),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(je,{component:I,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:o&&l?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}const an={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},At=400,ct=8,zr=({children:r,size:e="sm",position:t="top",className:s})=>{const[a,n]=b.useState(!1),[o,l]=b.useState({x:0,y:0}),c=b.useRef(null),f=b.useId();b.useEffect(()=>{if(a&&c.current){const h=c.current.getBoundingClientRect();let x=0,E=0;switch(t){case"top":x=h.left+h.width/2-At/2,E=h.top-ct;break;case"bottom":x=h.left+h.width/2-At/2,E=h.bottom+ct;break;case"left":x=h.left-At-ct,E=h.top+h.height/2;break;case"right":x=h.right+ct,E=h.top+h.height/2;break}l({x,y:E})}},[a,t]);const u=()=>typeof r=="string"?i.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):i.jsx(i.Fragment,{children:r}),m=a?i.jsx("div",{id:f,role:"tooltip",className:$("fixed z-50 w-[250px] bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)] text-ds-sm rounded p-2 shadow-lg","pointer-events-none"),style:{top:`${o.y}px`,left:`${o.x}px`,transform:t==="left"||t==="right"?"translateY(-50%)":t==="top"?"translateY(-100%)":void 0},children:u()}):null;return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button","aria-describedby":f,ref:c,className:$("inline-flex items-center justify-center focus:outline-none",an[e],"text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]",s),onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onFocus:()=>n(!0),onBlur:()=>n(!1),children:i.jsx(da,{className:"w-full h-full"})}),Ht.createPortal(m,document.body)]})};function nn({name:r,label:e,type:t="text",size:s="sm",width:a,placeholder:n,validation:o,loadingDefaults:l,disabled:c,info:f}){var F;const{control:u,formState:{errors:m}}=rt(),h=!!m[r],x=((F=m[r])==null?void 0:F.message)||"",E="relative",j=a??"w-full";return i.jsxs("div",{className:E,children:[i.jsx(we,{name:r,control:u,rules:o,render:({field:v})=>i.jsx(lt,{label:e,size:s,width:j,placeholder:n,hasError:h,errorMessage:x,loading:l,type:t,...v,disabled:c})}),f&&i.jsx(zr,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:f})]})}const $t=b.memo(nn);$t.displayName="FormFieldInput";function on({title:r,headerButtons:e,children:t,className:s}){return i.jsxs("div",{className:$("flex flex-col h-full",s),children:[i.jsxs("div",{className:"flex items-center justify-between py-4",children:[i.jsx("div",{className:`bg-[var(--color-ds-background-accent)] \r
23
+ <%s key={someKey} {...props} />`,ee,Y,fe,Y),ie[Y+ee]=!0)}if(Y=null,J!==void 0&&(t(J),Y=""+J),o(R)&&(t(R.key),Y=""+R.key),"key"in R){J={};for(var Ce in R)Ce!=="key"&&(J[Ce]=R[Ce])}else J=R;return Y&&l(J,typeof k=="function"?k.displayName||k.name||"Unknown":k),f(k,Y,H,ne,a(),J,le,ce)}function m(k){typeof k=="object"&&k!==null&&k.$$typeof===x&&k._store&&(k._store.validated=1)}var h=b,x=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),S=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),I=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,N=Array.isArray,L=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(k){return k()}};var D,w={},W=h["react-stack-bottom-frame"].bind(h,n)(),re=L(s(n)),ie={};We.Fragment=j,We.jsx=function(k,R,J,ee,ne){var H=1e4>I.recentlyCreatedOwnerStacks++;return u(k,R,J,!1,ee,ne,H?Error("react-stack-top-frame"):W,H?L(s(k)):re)},We.jsxs=function(k,R,J,ee,ne){var H=1e4>I.recentlyCreatedOwnerStacks++;return u(k,R,J,!0,ee,ne,H?Error("react-stack-top-frame"):W,H?L(s(k)):re)}}()),We}var Jt;function Us(){return Jt||(Jt=1,process.env.NODE_ENV==="production"?Qe.exports=zs():Qe.exports=Ps()),Qe.exports}var i=Us();function Kt(r){var e,t,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(t=Kt(r[e]))&&(s&&(s+=" "),s+=t)}else for(t in r)r[t]&&(s&&(s+=" "),s+=t);return s}function $(){for(var r,e,t=0,s="",a=arguments.length;t<a;t++)(r=arguments[t])&&(e=Kt(r))&&(s&&(s+=" "),s+=e);return s}const Rs={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-10 h-10",full:"w-full h-full"};function je({component:r,size:e="sm",className:t,...s}){return i.jsx(r,{className:$(Rs[e],t),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const Bs="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Zs={primary:"bg-[var(--color-ds-button-primary-bg)] text-[var(--color-ds-button-primary-text)] hover:animate-pulse",outline:"bg-transparent text-[var(--color-ds-text-primary)] ring-1 ring-inset ring-[var(--color-ds-border-default)] hover:bg-[var(--color-ds-background-accent)] hover:text-[var(--color-ds-text-on-accent)]",ghost:"bg-transparent text-[var(--color-ds-text-primary)] hover:animate-pulse"},Ws={sm:"text-ds-sm h-6 px-2",md:"text-ds-md h-10 px-2.5",lg:"text-ds-lg h-12 px-3"},qs={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},Hs="disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-[var(--color-ds-background-disabled)] disabled:text-[var(--color-ds-text-on-accent)] disabled:ring-1 disabled:ring-inset disabled:ring-[var(--color-ds-border-muted)]";function _e({type:r="button",variant:e="primary",size:t="sm",width:s,disabled:a=!1,icon:n,iconPosition:o="left",ariaLabel:l,children:c,onClick:f,className:u}){const m=!!n,h=m&&!c,x=h?qs[t]:Ws[t];return i.jsxs("button",{type:r,onClick:f,disabled:a,"aria-label":h?l:void 0,style:s?{width:s}:void 0,className:$(Bs,Zs[e],x,Hs,u,m&&c&&"gap-2"),children:[n&&o==="left"&&i.jsx(je,{component:n,size:t}),c,n&&o==="right"&&i.jsx(je,{component:n,size:t})]})}function Ys({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Gs=V.forwardRef(Ys);function Xs({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Qt=V.forwardRef(Xs);function Js({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const Ks=V.forwardRef(Js);function Qs({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const ea=V.forwardRef(Qs);function ta({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"}))}const ra=V.forwardRef(ta);function sa({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const er=V.forwardRef(sa);function aa({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const na=V.forwardRef(aa);function oa({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const tr=V.forwardRef(oa);function ia({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"}))}const la=V.forwardRef(ia);function ca({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const da=V.forwardRef(ca);function ua({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))}const fa=V.forwardRef(ua);function ha({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const ma=V.forwardRef(ha);function pa({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}const ga=V.forwardRef(pa);function xa({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.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 ba=V.forwardRef(xa);function va({title:r,titleId:e,...t},s){return V.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":e},t),r?V.createElement("title",{id:e},r):null,V.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const vt=V.forwardRef(va);function yt({title:r,children:e,defaultOpen:t=!0,className:s}){const[a,n]=b.useState(t),o=b.useRef(null),l=b.useRef(null),[c,f]=b.useState(0),u=()=>{if(l.current){const m=l.current.scrollHeight;f(m)}};return b.useLayoutEffect(()=>{u()},[a]),b.useEffect(()=>{const m=l.current;if(!m)return;const h=new ResizeObserver(()=>{u()});return h.observe(m),()=>{h.disconnect()}},[]),i.jsxs("div",{className:$("flex flex-col w-full gap-3",s),children:[i.jsxs("button",{type:"button",onClick:()=>n(m=>!m),className:"flex items-center justify-between w-full hover:bg-[var(--color-ds-surface-hover)] transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"block w-1 h-5 bg-[var(--color-ds-background-accent)] rounded-sm"}),i.jsx("span",{className:"font-semibold text-[var(--color-ds-text-primary)]",children:r})]}),a?i.jsx(ea,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):i.jsx(Qt,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),i.jsx("div",{className:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",children:i.jsx("div",{className:"px-6",children:i.jsx("div",{ref:o,className:$("overflow-hidden transition-all duration-300 ease-in-out",a?"opacity-100":"opacity-0"),style:{maxHeight:a?`${c}px`:"0px"},children:i.jsx("div",{ref:l,className:"py-4",children:e})})})})]})}var qe=r=>r.type==="checkbox",Me=r=>r instanceof Date,he=r=>r==null;const rr=r=>typeof r=="object";var se=r=>!he(r)&&!Array.isArray(r)&&rr(r)&&!Me(r),sr=r=>se(r)&&r.target?qe(r.target)?r.target.checked:r.target.value:r,ya=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,ar=(r,e)=>r.has(ya(e)),wa=r=>{const e=r.constructor&&r.constructor.prototype;return se(e)&&e.hasOwnProperty("isPrototypeOf")},wt=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function de(r){let e;const t=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)e=new Date(r);else if(r instanceof Set)e=new Set(r);else if(!(wt&&(r instanceof Blob||s))&&(t||se(r)))if(e=t?[]:{},!t&&!wa(r))e=r;else for(const a in r)r.hasOwnProperty(a)&&(e[a]=de(r[a]));else return r;return e}var et=r=>Array.isArray(r)?r.filter(Boolean):[],ae=r=>r===void 0,T=(r,e,t)=>{if(!e||!se(r))return t;const s=et(e.split(/[,[\].]+?/)).reduce((a,n)=>he(a)?a:a[n],r);return ae(s)||s===r?ae(r[e])?t:r[e]:s},xe=r=>typeof r=="boolean",kt=r=>/^\w*$/.test(r),nr=r=>et(r.replace(/["|']|\]/g,"").split(/\.|\[/)),K=(r,e,t)=>{let s=-1;const a=kt(e)?[e]:nr(e),n=a.length,o=n-1;for(;++s<n;){const l=a[s];let c=t;if(s!==o){const f=r[l];c=se(f)||Array.isArray(f)?f:isNaN(+a[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const tt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ye={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Fe={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},or=b.createContext(null),rt=()=>b.useContext(or),ka=r=>{const{children:e,...t}=r;return b.createElement(or.Provider,{value:t},e)};var ir=(r,e,t,s=!0)=>{const a={defaultValues:e._defaultValues};for(const n in r)Object.defineProperty(a,n,{get:()=>{const o=n;return e._proxyFormState[o]!==ye.all&&(e._proxyFormState[o]=!s||ye.all),t&&(t[o]=!0),r[o]}});return a};const jt=typeof window<"u"?V.useLayoutEffect:V.useEffect;function ja(r){const e=rt(),{control:t=e.control,disabled:s,name:a,exact:n}=r||{},[o,l]=b.useState(t._formState),c=b.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return jt(()=>t._subscribe({name:a,formState:c.current,exact:n,callback:f=>{!s&&l({...t._formState,...f})}}),[a,s,n]),b.useEffect(()=>{c.current.isValid&&t._setValid(!0)},[t]),b.useMemo(()=>ir(o,t,c.current,!1),[o,t])}var Ee=r=>typeof r=="string",lr=(r,e,t,s,a)=>Ee(r)?(s&&e.watch.add(r),T(t,r,a)):Array.isArray(r)?r.map(n=>(s&&e.watch.add(n),T(t,n))):(s&&(e.watchAll=!0),t);function cr(r){const e=rt(),{control:t=e.control,name:s,defaultValue:a,disabled:n,exact:o}=r||{},l=b.useRef(a),[c,f]=b.useState(t._getWatch(s,l.current));return jt(()=>t._subscribe({name:s,formState:{values:!0},exact:o,callback:u=>!n&&f(lr(s,t._names,u.values||t._formValues,!1,l.current))}),[s,t,n,o]),b.useEffect(()=>t._removeUnmounted()),c}function dr(r){const e=rt(),{name:t,disabled:s,control:a=e.control,shouldUnregister:n}=r,o=ar(a._names.array,t),l=cr({control:a,name:t,defaultValue:T(a._formValues,t,T(a._defaultValues,t,r.defaultValue)),exact:!0}),c=ja({control:a,name:t,exact:!0}),f=b.useRef(r),u=b.useRef(a.register(t,{...r.rules,value:l,...xe(r.disabled)?{disabled:r.disabled}:{}})),m=b.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!T(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!T(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!T(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!T(c.validatingFields,t)},error:{enumerable:!0,get:()=>T(c.errors,t)}}),[c,t]),h=b.useCallback(F=>u.current.onChange({target:{value:sr(F),name:t},type:tt.CHANGE}),[t]),x=b.useCallback(()=>u.current.onBlur({target:{value:T(a._formValues,t),name:t},type:tt.BLUR}),[t,a._formValues]),E=b.useCallback(F=>{const v=T(a._fields,t);v&&F&&(v._f.ref={focus:()=>F.focus(),select:()=>F.select(),setCustomValidity:g=>F.setCustomValidity(g),reportValidity:()=>F.reportValidity()})},[a._fields,t]),j=b.useMemo(()=>({name:t,value:l,...xe(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:h,onBlur:x,ref:E}),[t,s,c.disabled,h,x,E,l]);return b.useEffect(()=>{const F=a._options.shouldUnregister||n;a.register(t,{...f.current.rules,...xe(f.current.disabled)?{disabled:f.current.disabled}:{}});const v=(g,S)=>{const M=T(a._fields,g);M&&M._f&&(M._f.mount=S)};if(v(t,!0),F){const g=de(T(a._options.defaultValues,t));K(a._defaultValues,t,g),ae(T(a._formValues,t))&&K(a._formValues,t,g)}return!o&&a.register(t),()=>{(o?F&&!a._state.action:F)?a.unregister(t):v(t,!1)}},[t,a,o,n]),b.useEffect(()=>{a._setDisabledField({disabled:s,name:t})},[s,t,a]),b.useMemo(()=>({field:j,formState:c,fieldState:m}),[j,c,m])}const we=r=>r.render(dr(r));var ur=(r,e,t,s,a)=>e?{...t[r],types:{...t[r]&&t[r].types?t[r].types:{},[s]:a||!0}}:{},He=r=>Array.isArray(r)?r:[r],fr=()=>{let r=[];return{get observers(){return r},next:a=>{for(const n of r)n.next&&n.next(a)},subscribe:a=>(r.push(a),{unsubscribe:()=>{r=r.filter(n=>n!==a)}}),unsubscribe:()=>{r=[]}}},Et=r=>he(r)||!rr(r);function Oe(r,e){if(Et(r)||Et(e))return r===e;if(Me(r)&&Me(e))return r.getTime()===e.getTime();const t=Object.keys(r),s=Object.keys(e);if(t.length!==s.length)return!1;for(const a of t){const n=r[a];if(!s.includes(a))return!1;if(a!=="ref"){const o=e[a];if(Me(n)&&Me(o)||se(n)&&se(o)||Array.isArray(n)&&Array.isArray(o)?!Oe(n,o):n!==o)return!1}}return!0}var me=r=>se(r)&&!Object.keys(r).length,Nt=r=>r.type==="file",ke=r=>typeof r=="function",st=r=>{if(!wt)return!1;const e=r?r.ownerDocument:0;return r instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},hr=r=>r.type==="select-multiple",_t=r=>r.type==="radio",Ea=r=>_t(r)||qe(r),Ft=r=>st(r)&&r.isConnected;function Na(r,e){const t=e.slice(0,-1).length;let s=0;for(;s<t;)r=ae(r)?s++:r[e[s++]];return r}function _a(r){for(const e in r)if(r.hasOwnProperty(e)&&!ae(r[e]))return!1;return!0}function oe(r,e){const t=Array.isArray(e)?e:kt(e)?[e]:nr(e),s=t.length===1?r:Na(r,t),a=t.length-1,n=t[a];return s&&delete s[n],a!==0&&(se(s)&&me(s)||Array.isArray(s)&&_a(s))&&oe(r,t.slice(0,-1)),r}var mr=r=>{for(const e in r)if(ke(r[e]))return!0;return!1};function at(r,e={}){const t=Array.isArray(r);if(se(r)||t)for(const s in r)Array.isArray(r[s])||se(r[s])&&!mr(r[s])?(e[s]=Array.isArray(r[s])?[]:{},at(r[s],e[s])):he(r[s])||(e[s]=!0);return e}function pr(r,e,t){const s=Array.isArray(r);if(se(r)||s)for(const a in r)Array.isArray(r[a])||se(r[a])&&!mr(r[a])?ae(e)||Et(t[a])?t[a]=Array.isArray(r[a])?at(r[a],[]):{...at(r[a])}:pr(r[a],he(e)?{}:e[a],t[a]):t[a]=!Oe(r[a],e[a]);return t}var Ye=(r,e)=>pr(r,e,at(e));const gr={value:!1,isValid:!1},xr={value:!0,isValid:!0};var br=r=>{if(Array.isArray(r)){if(r.length>1){const e=r.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:e,isValid:!!e.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!ae(r[0].attributes.value)?ae(r[0].value)||r[0].value===""?xr:{value:r[0].value,isValid:!0}:xr:gr}return gr},vr=(r,{valueAsNumber:e,valueAsDate:t,setValueAs:s})=>ae(r)?r:e?r===""?NaN:r&&+r:t&&Ee(r)?new Date(r):s?s(r):r;const yr={isValid:!1,value:null};var wr=r=>Array.isArray(r)?r.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,yr):yr;function kr(r){const e=r.ref;return Nt(e)?e.files:_t(e)?wr(r.refs).value:hr(e)?[...e.selectedOptions].map(({value:t})=>t):qe(e)?br(r.refs).value:vr(ae(e.value)?r.ref.value:e.value,r)}var Fa=(r,e,t,s)=>{const a={};for(const n of r){const o=T(e,n);o&&K(a,n,o._f)}return{criteriaMode:t,names:[...r],fields:a,shouldUseNativeValidation:s}},nt=r=>r instanceof RegExp,Ge=r=>ae(r)?r:nt(r)?r.source:se(r)?nt(r.value)?r.value.source:r.value:r,jr=r=>({isOnSubmit:!r||r===ye.onSubmit,isOnBlur:r===ye.onBlur,isOnChange:r===ye.onChange,isOnAll:r===ye.all,isOnTouch:r===ye.onTouched});const Er="AsyncFunction";var Sa=r=>!!r&&!!r.validate&&!!(ke(r.validate)&&r.validate.constructor.name===Er||se(r.validate)&&Object.values(r.validate).find(e=>e.constructor.name===Er)),Ta=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),Nr=(r,e,t)=>!t&&(e.watchAll||e.watch.has(r)||[...e.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const Xe=(r,e,t,s)=>{for(const a of t||Object.keys(r)){const n=T(r,a);if(n){const{_f:o,...l}=n;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],a)&&!s)return!0;if(o.ref&&e(o.ref,o.name)&&!s)return!0;if(Xe(l,e))break}else if(se(l)&&Xe(l,e))break}}};function _r(r,e,t){const s=T(r,t);if(s||kt(t))return{error:s,name:t};const a=t.split(".");for(;a.length;){const n=a.join("."),o=T(e,n),l=T(r,n);if(o&&!Array.isArray(o)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};a.pop()}return{name:t}}var Ca=(r,e,t,s)=>{t(r);const{name:a,...n}=r;return me(n)||Object.keys(n).length>=Object.keys(e).length||Object.keys(n).find(o=>e[o]===(!s||ye.all))},Oa=(r,e,t)=>!r||!e||r===e||He(r).some(s=>s&&(t?s===e:s.startsWith(e)||e.startsWith(s))),Aa=(r,e,t,s,a)=>a.isOnAll?!1:!t&&a.isOnTouch?!(e||r):(t?s.isOnBlur:a.isOnBlur)?!r:(t?s.isOnChange:a.isOnChange)?r:!0,$a=(r,e)=>!et(T(r,e)).length&&oe(r,e),Da=(r,e,t)=>{const s=He(T(r,t));return K(s,"root",e[t]),K(r,t,s),r},ot=r=>Ee(r);function Fr(r,e,t="validate"){if(ot(r)||Array.isArray(r)&&r.every(ot)||xe(r)&&!r)return{type:t,message:ot(r)?r:"",ref:e}}var Pe=r=>se(r)&&!nt(r)?r:{value:r,message:""},Sr=async(r,e,t,s,a,n)=>{const{ref:o,refs:l,required:c,maxLength:f,minLength:u,min:m,max:h,pattern:x,validate:E,name:j,valueAsNumber:F,mount:v}=r._f,g=T(t,j);if(!v||e.has(j))return{};const S=l?l[0]:o,M=z=>{a&&S.reportValidity&&(S.setCustomValidity(xe(z)?"":z||""),S.reportValidity())},O={},B=_t(o),X=qe(o),U=B||X,q=(F||Nt(o))&&ae(o.value)&&ae(g)||st(o)&&o.value===""||g===""||Array.isArray(g)&&!g.length,Z=ur.bind(null,j,s,O),I=(z,N,L,D=Fe.maxLength,w=Fe.minLength)=>{const W=z?N:L;O[j]={type:z?D:w,message:W,ref:o,...Z(z?D:w,W)}};if(n?!Array.isArray(g)||!g.length:c&&(!U&&(q||he(g))||xe(g)&&!g||X&&!br(l).isValid||B&&!wr(l).isValid)){const{value:z,message:N}=ot(c)?{value:!!c,message:c}:Pe(c);if(z&&(O[j]={type:Fe.required,message:N,ref:S,...Z(Fe.required,N)},!s))return M(N),O}if(!q&&(!he(m)||!he(h))){let z,N;const L=Pe(h),D=Pe(m);if(!he(g)&&!isNaN(g)){const w=o.valueAsNumber||g&&+g;he(L.value)||(z=w>L.value),he(D.value)||(N=w<D.value)}else{const w=o.valueAsDate||new Date(g),W=k=>new Date(new Date().toDateString()+" "+k),re=o.type=="time",ie=o.type=="week";Ee(L.value)&&g&&(z=re?W(g)>W(L.value):ie?g>L.value:w>new Date(L.value)),Ee(D.value)&&g&&(N=re?W(g)<W(D.value):ie?g<D.value:w<new Date(D.value))}if((z||N)&&(I(!!z,L.message,D.message,Fe.max,Fe.min),!s))return M(O[j].message),O}if((f||u)&&!q&&(Ee(g)||n&&Array.isArray(g))){const z=Pe(f),N=Pe(u),L=!he(z.value)&&g.length>+z.value,D=!he(N.value)&&g.length<+N.value;if((L||D)&&(I(L,z.message,N.message),!s))return M(O[j].message),O}if(x&&!q&&Ee(g)){const{value:z,message:N}=Pe(x);if(nt(z)&&!g.match(z)&&(O[j]={type:Fe.pattern,message:N,ref:o,...Z(Fe.pattern,N)},!s))return M(N),O}if(E){if(ke(E)){const z=await E(g,t),N=Fr(z,S);if(N&&(O[j]={...N,...Z(Fe.validate,N.message)},!s))return M(N.message),O}else if(se(E)){let z={};for(const N in E){if(!me(z)&&!s)break;const L=Fr(await E[N](g,t),S,N);L&&(z={...L,...Z(N,L.message)},M(L.message),s&&(O[j]=z))}if(!me(z)&&(O[j]={ref:S,...z},!s))return O}}return M(!0),O};const Ma={mode:ye.onSubmit,reValidateMode:ye.onChange,shouldFocusError:!0};function Va(r={}){let e={...Ma,...r},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:ke(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1};const s={};let a=se(e.defaultValues)||se(e.values)?de(e.defaultValues||e.values)||{}:{},n=e.shouldUnregister?{}:de(a),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,f=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...u};const h={array:fr(),state:fr()},x=e.criteriaMode===ye.all,E=d=>p=>{clearTimeout(f),f=setTimeout(d,p)},j=async d=>{if(!e.disabled&&(u.isValid||m.isValid||d)){const p=e.resolver?me((await X()).errors):await q(s,!0);p!==t.isValid&&h.state.next({isValid:p})}},F=(d,p)=>{!e.disabled&&(u.isValidating||u.validatingFields||m.isValidating||m.validatingFields)&&((d||Array.from(l.mount)).forEach(y=>{y&&(p?K(t.validatingFields,y,p):oe(t.validatingFields,y))}),h.state.next({validatingFields:t.validatingFields,isValidating:!me(t.validatingFields)}))},v=(d,p=[],y,A,C=!0,_=!0)=>{if(A&&y&&!e.disabled){if(o.action=!0,_&&Array.isArray(T(s,d))){const P=y(T(s,d),A.argA,A.argB);C&&K(s,d,P)}if(_&&Array.isArray(T(t.errors,d))){const P=y(T(t.errors,d),A.argA,A.argB);C&&K(t.errors,d,P),$a(t.errors,d)}if((u.touchedFields||m.touchedFields)&&_&&Array.isArray(T(t.touchedFields,d))){const P=y(T(t.touchedFields,d),A.argA,A.argB);C&&K(t.touchedFields,d,P)}(u.dirtyFields||m.dirtyFields)&&(t.dirtyFields=Ye(a,n)),h.state.next({name:d,isDirty:I(d,p),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else K(n,d,p)},g=(d,p)=>{K(t.errors,d,p),h.state.next({errors:t.errors})},S=d=>{t.errors=d,h.state.next({errors:t.errors,isValid:!1})},M=(d,p,y,A)=>{const C=T(s,d);if(C){const _=T(n,d,ae(y)?T(a,d):y);ae(_)||A&&A.defaultChecked||p?K(n,d,p?_:kr(C._f)):L(d,_),o.mount&&j()}},O=(d,p,y,A,C)=>{let _=!1,P=!1;const Q={name:d};if(!e.disabled){if(!y||A){(u.isDirty||m.isDirty)&&(P=t.isDirty,t.isDirty=Q.isDirty=I(),_=P!==Q.isDirty);const te=Oe(T(a,d),p);P=!!T(t.dirtyFields,d),te?oe(t.dirtyFields,d):K(t.dirtyFields,d,!0),Q.dirtyFields=t.dirtyFields,_=_||(u.dirtyFields||m.dirtyFields)&&P!==!te}if(y){const te=T(t.touchedFields,d);te||(K(t.touchedFields,d,y),Q.touchedFields=t.touchedFields,_=_||(u.touchedFields||m.touchedFields)&&te!==y)}_&&C&&h.state.next(Q)}return _?Q:{}},B=(d,p,y,A)=>{const C=T(t.errors,d),_=(u.isValid||m.isValid)&&xe(p)&&t.isValid!==p;if(e.delayError&&y?(c=E(()=>g(d,y)),c(e.delayError)):(clearTimeout(f),c=null,y?K(t.errors,d,y):oe(t.errors,d)),(y?!Oe(C,y):C)||!me(A)||_){const P={...A,..._&&xe(p)?{isValid:p}:{},errors:t.errors,name:d};t={...t,...P},h.state.next(P)}},X=async d=>{F(d,!0);const p=await e.resolver(n,e.context,Fa(d||l.mount,s,e.criteriaMode,e.shouldUseNativeValidation));return F(d),p},U=async d=>{const{errors:p}=await X(d);if(d)for(const y of d){const A=T(p,y);A?K(t.errors,y,A):oe(t.errors,y)}else t.errors=p;return p},q=async(d,p,y={valid:!0})=>{for(const A in d){const C=d[A];if(C){const{_f:_,...P}=C;if(_){const Q=l.array.has(_.name),te=C._f&&Sa(C._f);te&&u.validatingFields&&F([A],!0);const ve=await Sr(C,l.disabled,n,x,e.shouldUseNativeValidation&&!p,Q);if(te&&u.validatingFields&&F([A]),ve[_.name]&&(y.valid=!1,p))break;!p&&(T(ve,_.name)?Q?Da(t.errors,ve,_.name):K(t.errors,_.name,ve[_.name]):oe(t.errors,_.name))}!me(P)&&await q(P,p,y)}}return y.valid},Z=()=>{for(const d of l.unMount){const p=T(s,d);p&&(p._f.refs?p._f.refs.every(y=>!Ft(y)):!Ft(p._f.ref))&&ce(d)}l.unMount=new Set},I=(d,p)=>!e.disabled&&(d&&p&&K(n,d,p),!Oe(k(),a)),z=(d,p,y)=>lr(d,l,{...o.mount?n:ae(p)?a:Ee(d)?{[d]:p}:p},y,p),N=d=>et(T(o.mount?n:a,d,e.shouldUnregister?T(a,d,[]):[])),L=(d,p,y={})=>{const A=T(s,d);let C=p;if(A){const _=A._f;_&&(!_.disabled&&K(n,d,vr(p,_)),C=st(_.ref)&&he(p)?"":p,hr(_.ref)?[..._.ref.options].forEach(P=>P.selected=C.includes(P.value)):_.refs?qe(_.ref)?_.refs.forEach(P=>{(!P.defaultChecked||!P.disabled)&&(Array.isArray(C)?P.checked=!!C.find(Q=>Q===P.value):P.checked=C===P.value||!!C)}):_.refs.forEach(P=>P.checked=P.value===C):Nt(_.ref)?_.ref.value="":(_.ref.value=C,_.ref.type||h.state.next({name:d,values:de(n)})))}(y.shouldDirty||y.shouldTouch)&&O(d,C,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&ie(d)},D=(d,p,y)=>{for(const A in p){if(!p.hasOwnProperty(A))return;const C=p[A],_=`${d}.${A}`,P=T(s,_);(l.array.has(d)||se(C)||P&&!P._f)&&!Me(C)?D(_,C,y):L(_,C,y)}},w=(d,p,y={})=>{const A=T(s,d),C=l.array.has(d),_=de(p);K(n,d,_),C?(h.array.next({name:d,values:de(n)}),(u.isDirty||u.dirtyFields||m.isDirty||m.dirtyFields)&&y.shouldDirty&&h.state.next({name:d,dirtyFields:Ye(a,n),isDirty:I(d,_)})):A&&!A._f&&!he(_)?D(d,_,y):L(d,_,y),Nr(d,l)&&h.state.next({...t}),h.state.next({name:o.mount?d:void 0,values:de(n)})},W=async d=>{o.mount=!0;const p=d.target;let y=p.name,A=!0;const C=T(s,y),_=te=>{A=Number.isNaN(te)||Me(te)&&isNaN(te.getTime())||Oe(te,T(n,y,te))},P=jr(e.mode),Q=jr(e.reValidateMode);if(C){let te,ve;const bt=p.type?kr(C._f):sr(d),De=d.type===tt.BLUR||d.type===tt.FOCUS_OUT,xo=!Ta(C._f)&&!e.resolver&&!T(t.errors,y)&&!C._f.deps||Aa(De,T(t.touchedFields,y),t.isSubmitted,Q,P),Wt=Nr(y,l,De);K(n,y,bt),De?(C._f.onBlur&&C._f.onBlur(d),c&&c(0)):C._f.onChange&&C._f.onChange(d);const qt=O(y,bt,De),bo=!me(qt)||Wt;if(!De&&h.state.next({name:y,type:d.type,values:de(n)}),xo)return(u.isValid||m.isValid)&&(e.mode==="onBlur"?De&&j():De||j()),bo&&h.state.next({name:y,...Wt?{}:qt});if(!De&&Wt&&h.state.next({...t}),e.resolver){const{errors:Ms}=await X([y]);if(_(bt),A){const vo=_r(t.errors,s,y),Vs=_r(Ms,s,vo.name||y);te=Vs.error,y=Vs.name,ve=me(Ms)}}else F([y],!0),te=(await Sr(C,l.disabled,n,x,e.shouldUseNativeValidation))[y],F([y]),_(bt),A&&(te?ve=!1:(u.isValid||m.isValid)&&(ve=await q(s,!0)));A&&(C._f.deps&&ie(C._f.deps),B(y,ve,te,qt))}},re=(d,p)=>{if(T(t.errors,p)&&d.focus)return d.focus(),1},ie=async(d,p={})=>{let y,A;const C=He(d);if(e.resolver){const _=await U(ae(d)?d:C);y=me(_),A=d?!C.some(P=>T(_,P)):y}else d?(A=(await Promise.all(C.map(async _=>{const P=T(s,_);return await q(P&&P._f?{[_]:P}:P)}))).every(Boolean),!(!A&&!t.isValid)&&j()):A=y=await q(s);return h.state.next({...!Ee(d)||(u.isValid||m.isValid)&&y!==t.isValid?{}:{name:d},...e.resolver||!d?{isValid:y}:{},errors:t.errors}),p.shouldFocus&&!A&&Xe(s,re,d?C:l.mount),A},k=d=>{const p={...o.mount?n:a};return ae(d)?p:Ee(d)?T(p,d):d.map(y=>T(p,y))},R=(d,p)=>({invalid:!!T((p||t).errors,d),isDirty:!!T((p||t).dirtyFields,d),error:T((p||t).errors,d),isValidating:!!T(t.validatingFields,d),isTouched:!!T((p||t).touchedFields,d)}),J=d=>{d&&He(d).forEach(p=>oe(t.errors,p)),h.state.next({errors:d?t.errors:{}})},ee=(d,p,y)=>{const A=(T(s,d,{_f:{}})._f||{}).ref,C=T(t.errors,d)||{},{ref:_,message:P,type:Q,...te}=C;K(t.errors,d,{...te,...p,ref:A}),h.state.next({name:d,errors:t.errors,isValid:!1}),y&&y.shouldFocus&&A&&A.focus&&A.focus()},ne=(d,p)=>ke(d)?h.state.subscribe({next:y=>d(z(void 0,p),y)}):z(d,p,!0),H=d=>h.state.subscribe({next:p=>{Oa(d.name,p.name,d.exact)&&Ca(p,d.formState||u,go,d.reRenderRoot)&&d.callback({values:{...n},...t,...p})}}).unsubscribe,le=d=>(o.mount=!0,m={...m,...d.formState},H({...d,formState:m})),ce=(d,p={})=>{for(const y of d?He(d):l.mount)l.mount.delete(y),l.array.delete(y),p.keepValue||(oe(s,y),oe(n,y)),!p.keepError&&oe(t.errors,y),!p.keepDirty&&oe(t.dirtyFields,y),!p.keepTouched&&oe(t.touchedFields,y),!p.keepIsValidating&&oe(t.validatingFields,y),!e.shouldUnregister&&!p.keepDefaultValue&&oe(a,y);h.state.next({values:de(n)}),h.state.next({...t,...p.keepDirty?{isDirty:I()}:{}}),!p.keepIsValid&&j()},Y=({disabled:d,name:p})=>{(xe(d)&&o.mount||d||l.disabled.has(p))&&(d?l.disabled.add(p):l.disabled.delete(p))},fe=(d,p={})=>{let y=T(s,d);const A=xe(p.disabled)||xe(e.disabled);return K(s,d,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:d}},name:d,mount:!0,...p}}),l.mount.add(d),y?Y({disabled:xe(p.disabled)?p.disabled:e.disabled,name:d}):M(d,!0,p.value),{...A?{disabled:p.disabled||e.disabled}:{},...e.progressive?{required:!!p.required,min:Ge(p.min),max:Ge(p.max),minLength:Ge(p.minLength),maxLength:Ge(p.maxLength),pattern:Ge(p.pattern)}:{},name:d,onChange:W,onBlur:W,ref:C=>{if(C){fe(d,p),y=T(s,d);const _=ae(C.value)&&C.querySelectorAll&&C.querySelectorAll("input,select,textarea")[0]||C,P=Ea(_),Q=y._f.refs||[];if(P?Q.find(te=>te===_):_===y._f.ref)return;K(s,d,{_f:{...y._f,...P?{refs:[...Q.filter(Ft),_,...Array.isArray(T(a,d))?[{}]:[]],ref:{type:_.type,name:d}}:{ref:_}}}),M(d,!1,void 0,_)}else y=T(s,d,{}),y._f&&(y._f.mount=!1),(e.shouldUnregister||p.shouldUnregister)&&!(ar(l.array,d)&&o.action)&&l.unMount.add(d)}}},Ce=()=>e.shouldFocusError&&Xe(s,re,l.mount),Be=d=>{xe(d)&&(h.state.next({disabled:d}),Xe(s,(p,y)=>{const A=T(s,y);A&&(p.disabled=A._f.disabled||d,Array.isArray(A._f.refs)&&A._f.refs.forEach(C=>{C.disabled=A._f.disabled||d}))},0,!1))},Os=(d,p)=>async y=>{let A;y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let C=de(n);if(h.state.next({isSubmitting:!0}),e.resolver){const{errors:_,values:P}=await X();t.errors=_,C=P}else await q(s);if(l.disabled.size)for(const _ of l.disabled)K(C,_,void 0);if(oe(t.errors,"root"),me(t.errors)){h.state.next({errors:{}});try{await d(C,y)}catch(_){A=_}}else p&&await p({...t.errors},y),Ce(),setTimeout(Ce);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:me(t.errors)&&!A,submitCount:t.submitCount+1,errors:t.errors}),A)throw A},mo=(d,p={})=>{T(s,d)&&(ae(p.defaultValue)?w(d,de(T(a,d))):(w(d,p.defaultValue),K(a,d,de(p.defaultValue))),p.keepTouched||oe(t.touchedFields,d),p.keepDirty||(oe(t.dirtyFields,d),t.isDirty=p.defaultValue?I(d,de(T(a,d))):I()),p.keepError||(oe(t.errors,d),u.isValid&&j()),h.state.next({...t}))},As=(d,p={})=>{const y=d?de(d):a,A=de(y),C=me(d),_=C?a:A;if(p.keepDefaultValues||(a=y),!p.keepValues){if(p.keepDirtyValues){const P=new Set([...l.mount,...Object.keys(Ye(a,n))]);for(const Q of Array.from(P))T(t.dirtyFields,Q)?K(_,Q,T(n,Q)):w(Q,T(_,Q))}else{if(wt&&ae(d))for(const P of l.mount){const Q=T(s,P);if(Q&&Q._f){const te=Array.isArray(Q._f.refs)?Q._f.refs[0]:Q._f.ref;if(st(te)){const ve=te.closest("form");if(ve){ve.reset();break}}}}for(const P of l.mount)w(P,T(_,P))}n=de(_),h.array.next({values:{..._}}),h.state.next({values:{..._}})}l={mount:p.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!p.keepIsValid||!!p.keepDirtyValues,o.watch=!!e.shouldUnregister,h.state.next({submitCount:p.keepSubmitCount?t.submitCount:0,isDirty:C?!1:p.keepDirty?t.isDirty:!!(p.keepDefaultValues&&!Oe(d,a)),isSubmitted:p.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:C?{}:p.keepDirtyValues?p.keepDefaultValues&&n?Ye(a,n):t.dirtyFields:p.keepDefaultValues&&d?Ye(a,d):p.keepDirty?t.dirtyFields:{},touchedFields:p.keepTouched?t.touchedFields:{},errors:p.keepErrors?t.errors:{},isSubmitSuccessful:p.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},$s=(d,p)=>As(ke(d)?d(n):d,p),po=(d,p={})=>{const y=T(s,d),A=y&&y._f;if(A){const C=A.refs?A.refs[0]:A.ref;C.focus&&(C.focus(),p.shouldSelect&&ke(C.select)&&C.select())}},go=d=>{t={...t,...d}},Ds={control:{register:fe,unregister:ce,getFieldState:R,handleSubmit:Os,setError:ee,_subscribe:H,_runSchema:X,_getWatch:z,_getDirty:I,_setValid:j,_setFieldArray:v,_setDisabledField:Y,_setErrors:S,_getFieldArray:N,_reset:As,_resetDefaultValues:()=>ke(e.defaultValues)&&e.defaultValues().then(d=>{$s(d,e.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:Z,_disableForm:Be,_subjects:h,_proxyFormState:u,get _fields(){return s},get _formValues(){return n},get _state(){return o},set _state(d){o=d},get _defaultValues(){return a},get _names(){return l},set _names(d){l=d},get _formState(){return t},get _options(){return e},set _options(d){e={...e,...d}}},subscribe:le,trigger:ie,register:fe,handleSubmit:Os,watch:ne,setValue:w,getValues:k,reset:$s,resetField:mo,clearErrors:J,unregister:ce,setError:ee,setFocus:po,getFieldState:R};return{...Ds,formControl:Ds}}function La(r={}){const e=b.useRef(void 0),t=b.useRef(void 0),[s,a]=b.useState({isDirty:!1,isValidating:!1,isLoading:ke(r.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1,isReady:!1,defaultValues:ke(r.defaultValues)?void 0:r.defaultValues});e.current||(e.current={...r.formControl?r.formControl:Va(r),formState:s},r.formControl&&r.defaultValues&&!ke(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const n=e.current.control;return n._options=r,jt(()=>{const o=n._subscribe({formState:n._proxyFormState,callback:()=>a({...n._formState}),reRenderRoot:!0});return a(l=>({...l,isReady:!0})),n._formState.isReady=!0,o},[n]),b.useEffect(()=>n._disableForm(r.disabled),[n,r.disabled]),b.useEffect(()=>{r.mode&&(n._options.mode=r.mode),r.reValidateMode&&(n._options.reValidateMode=r.reValidateMode),r.errors&&!me(r.errors)&&n._setErrors(r.errors)},[n,r.errors,r.mode,r.reValidateMode]),b.useEffect(()=>{r.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,r.shouldUnregister]),b.useEffect(()=>{if(n._proxyFormState.isDirty){const o=n._getDirty();o!==s.isDirty&&n._subjects.state.next({isDirty:o})}},[n,s.isDirty]),b.useEffect(()=>{r.values&&!Oe(r.values,t.current)?(n._reset(r.values,n._options.resetOptions),t.current=r.values,a(o=>({...o}))):n._resetDefaultValues()},[n,r.values]),b.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),e.current.formState=ir(s,n),e.current}const Tr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Ia={sm:"h-6",md:"h-10",lg:"h-12"},za={sm:"px-2",md:"px-2.5",lg:"px-3"};function Cr(r,e,t,s,a,n,o){const l=e?"datetime-local":"date";return i.jsxs(i.Fragment,{children:[i.jsx("input",{id:r,type:l,disabled:a,...s,className:$("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition text-[var(--color-ds-text-primary)] font-[var(--font-primary)]",Tr[t],Ia[t],za[t],n?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",a?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-secondary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]",o)}),i.jsx("div",{children:n!=null&&n.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:n.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Or(r){const{control:e,name:t,rules:s,defaultValue:a,showTime:n=!1,size:o="sm",width:l="100%",label:c,labelHidden:f=!1,hasError:u=!1,errorMessage:m="",disabled:h=!1,className:x,onChange:E}=r,j=b.useId(),F=t||j;return i.jsxs("div",{className:$("flex flex-col",x),style:{width:l,maxWidth:"100%"},children:[c&&i.jsx("label",{htmlFor:F,className:$("pb-2 text-[var(--color-ds-text-primary)]",Tr[o],f&&"sr-only"),children:c}),e&&t?i.jsx(we,{name:t,control:e,rules:s,defaultValue:a,render:({field:v,fieldState:g})=>Cr(F,n,o,{value:v.value,onChange:v.onChange,onBlur:v.onBlur},h,g.error,x)}):Cr(F,n,o,{defaultValue:a,onChange:E},h,u?{message:m}:void 0,x)]})}const Pa=({trigger:r,items:e,align:t="left",className:s})=>{const[a,n]=b.useState(!1),o=b.useRef(null),l=b.useRef([]);b.useEffect(()=>{const f=u=>{o.current&&!o.current.contains(u.target)&&n(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[]);const c=f=>{var m,h;const u=l.current.findIndex(x=>x===document.activeElement);if(f.key==="Escape")n(!1);else if(f.key==="ArrowDown"){f.preventDefault();const x=(u+1)%e.length;(m=l.current[x])==null||m.focus()}else if(f.key==="ArrowUp"){f.preventDefault();const x=(u-1+e.length)%e.length;(h=l.current[x])==null||h.focus()}};return i.jsxs("div",{className:$("relative inline-block",s),ref:o,children:[i.jsx("button",{type:"button",onClick:()=>n(f=>!f),className:"inline-flex items-center focus:outline-none","aria-haspopup":"menu","aria-expanded":a,children:r}),a&&i.jsx("div",{role:"menu","aria-orientation":"vertical",className:$("absolute mt-2 min-w-[160px] bg-[var(--color-ds-background-page)]","border border-[var(--color-ds-border-muted)] rounded shadow-lg z-10",t==="right"?"right-0":"left-0"),onKeyDown:c,children:e.map((f,u)=>{const{label:m,onSelect:h,disabled:x,icon:E}=f;return i.jsxs("button",{role:"menuitem",type:"button",disabled:x,ref:j=>{l.current[u]=j},className:$("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",x?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{x||(h(),n(!1))},children:[E&&i.jsx(E,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),m]},u)})})]})},Ua=(r,e,t,s)=>{var n,o,l,c;const a=[t,{code:e,...s||{}}];if((o=(n=r==null?void 0:r.services)==null?void 0:n.logger)!=null&&o.forward)return r.services.logger.forward(a,"warn","react-i18next::",!0);Ve(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(c=(l=r==null?void 0:r.services)==null?void 0:l.logger)!=null&&c.warn?r.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},Ar={},St=(r,e,t,s)=>{Ve(t)&&Ar[t]||(Ve(t)&&(Ar[t]=new Date),Ua(r,e,t,s))},$r=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},Tt=(r,e,t)=>{r.loadNamespaces(e,$r(r,t))},Dr=(r,e,t,s)=>{if(Ve(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return Tt(r,t,s);t.forEach(a=>{r.options.ns.indexOf(a)<0&&r.options.ns.push(a)}),r.loadLanguages(e,$r(r,s))},Ra=(r,e,t={})=>!e.languages||!e.languages.length?(St(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(s,a)=>{var n;if(((n=t.bindI18n)==null?void 0:n.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!a(s.isLanguageChangingTo,r))return!1}}),Ve=r=>typeof r=="string",Ba=r=>typeof r=="object"&&r!==null,Za=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Wa={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},qa=r=>Wa[r];let Ha={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:r=>r.replace(Za,qa)};const Ya=()=>Ha;let Ga;const Xa=()=>Ga,Ja=b.createContext();class Ka{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Qa=(r,e)=>{const t=b.useRef();return b.useEffect(()=>{t.current=r},[r,e]),t.current},Mr=(r,e,t,s)=>r.getFixedT(e,t,s),en=(r,e,t,s)=>b.useCallback(Mr(r,e,t,s),[r,e,t,s]),Ct=(r,e={})=>{var M,O,B,X;const{i18n:t}=e,{i18n:s,defaultNS:a}=b.useContext(Ja)||{},n=t||s||Xa();if(n&&!n.reportNamespaces&&(n.reportNamespaces=new Ka),!n){St(n,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const U=(Z,I)=>Ve(I)?I:Ba(I)&&Ve(I.defaultValue)?I.defaultValue:Array.isArray(Z)?Z[Z.length-1]:Z,q=[U,{},!1];return q.t=U,q.i18n={},q.ready=!1,q}(M=n.options.react)!=null&&M.wait&&St(n,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...Ya(),...n.options.react,...e},{useSuspense:l,keyPrefix:c}=o;let f=a||((O=n.options)==null?void 0:O.defaultNS);f=Ve(f)?[f]:f||["translation"],(X=(B=n.reportNamespaces).addUsedNamespaces)==null||X.call(B,f);const u=(n.isInitialized||n.initializedStoreOnce)&&f.every(U=>Ra(U,n,o)),m=en(n,e.lng||null,o.nsMode==="fallback"?f:f[0],c),h=()=>m,x=()=>Mr(n,e.lng||null,o.nsMode==="fallback"?f:f[0],c),[E,j]=b.useState(h);let F=f.join();e.lng&&(F=`${e.lng}${F}`);const v=Qa(F),g=b.useRef(!0);b.useEffect(()=>{const{bindI18n:U,bindI18nStore:q}=o;g.current=!0,!u&&!l&&(e.lng?Dr(n,e.lng,f,()=>{g.current&&j(x)}):Tt(n,f,()=>{g.current&&j(x)})),u&&v&&v!==F&&g.current&&j(x);const Z=()=>{g.current&&j(x)};return U&&(n==null||n.on(U,Z)),q&&(n==null||n.store.on(q,Z)),()=>{g.current=!1,n&&(U==null||U.split(" ").forEach(I=>n.off(I,Z))),q&&n&&q.split(" ").forEach(I=>n.store.off(I,Z))}},[n,F]),b.useEffect(()=>{g.current&&u&&j(h)},[n,c,u]);const S=[E,n,u];if(S.t=E,S.i18n=n,S.ready=u,u||!u&&!l)return S;throw new Promise(U=>{e.lng?Dr(n,e.lng,f,()=>U()):Tt(n,f,()=>U())})},Ot={sm:"text-sm",md:"text-base",lg:"text-lg"};function Vr(r,e,t,s,a,n,o,l,c){const{t:f}=Ct(),u=b.useRef(null),m=typeof s=="number"&&e.length>=s,h=()=>{var g;!o&&!m&&((g=u.current)==null||g.click())},x=g=>{const S=g.target.files;if(!S)return;const M=Array.from(S);let O=e.concat(M);s&&(O=O.slice(0,s)),t(O),g.target.value=""},E=g=>{if(g.preventDefault(),o||m)return;const S=Array.from(g.dataTransfer.files);let M=e.concat(S);s&&(M=M.slice(0,s)),t(M)},j=g=>{g.preventDefault()},F=g=>{const S=URL.createObjectURL(g);window.open(S)},v=g=>{const S=e.filter((M,O)=>O!==g);t(S)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"self-start mb-4 w-auto",children:i.jsx(_e,{type:"button",variant:"outline",size:n,icon:er,onClick:h,disabled:o||m,children:f("ds.fileUploader.browse","Browse files")})}),!m&&i.jsxs("div",{className:$("relative flex bg-[var(--color-ds-background-page)] flex-col items-center justify-center border-2 border-dashed border-[var(--color-ds-border-muted)] rounded-lg p-4",o?"opacity-50 cursor-not-allowed":"hover:border-[var(--color-ds-border-default)]",Ot[n],c),onDrop:E,onDragOver:j,children:[i.jsx("input",{id:r,type:"file",ref:u,className:"hidden",multiple:s!==1,accept:a,onChange:x,disabled:o}),i.jsx(je,{component:ra,size:"md",className:"w-8 h-8 text-[var(--color-ds-text-secondary)]"}),i.jsx("p",{className:"mt-3 text-[var(--color-ds-text-secondary)] text-center",children:f("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),e.length>0&&i.jsx("ul",{className:"mt-4 space-y-1",children:e.map((g,S)=>i.jsxs("li",{className:"flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(er,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),i.jsx("span",{className:"truncate pr-2",children:g.name})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(_e,{variant:"ghost",size:"sm",icon:tr,ariaLabel:f("ds.fileUploader.view","View"),onClick:()=>F(g)}),i.jsx(_e,{variant:"ghost",size:"sm",icon:vt,ariaLabel:f("ds.fileUploader.remove","Remove"),onClick:()=>v(S)})]})]},S))}),i.jsx("div",{className:"pt-[5px] min-h-[18px] w-full",children:l!=null&&l.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Lr(r){const{control:e,name:t,rules:s,defaultValue:a,maxFiles:n,accept:o,size:l="sm",width:c="100%",label:f,labelHidden:u=!1,disabled:m=!1,hasError:h=!1,errorMessage:x="",className:E}=r,j=b.useId(),F=t||j;if(e&&t)return i.jsxs("div",{className:$("flex flex-col",E),style:{width:c},children:[f&&i.jsx("label",{htmlFor:F,className:$("pb-[10px] text-[var(--color-ds-text-primary)]",Ot[l],u&&"sr-only"),children:f}),i.jsx(we,{name:t,control:e,rules:s,defaultValue:a instanceof FileList?Array.from(a):a||[],render:({field:S,fieldState:M})=>Vr(F,S.value,O=>S.onChange(O),n,o,l,m,M.error,E)})]});const[v,g]=b.useState(a instanceof FileList?Array.from(a):a||[]);return i.jsxs("div",{className:$("flex flex-col",E),style:{width:c},children:[f&&i.jsx("label",{htmlFor:F,className:$("pb-[10px] text-[var(--color-ds-text-primary)]",Ot[l],u&&"sr-only"),children:f}),Vr(F,v,g,n,o,l,m,h?{message:x}:void 0,E)]})}const Le=({count:r=1,width:e,height:t="1em",variant:s="rect",className:a})=>{const n=Array.from({length:r});return i.jsx(i.Fragment,{children:n.map((o,l)=>i.jsx("span",{role:"status","aria-label":"Cargando...",className:$("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",a),style:{width:e??"auto",height:t}},l))})},it={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},tn={sm:"h-6",md:"h-10",lg:"h-12"},rn={sm:"px-2",md:"px-2.5",lg:"px-3"},Ir={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},sn={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function lt({id:r,type:e="text",size:t="sm",width:s="100%",label:a,labelHidden:n=!1,hasError:o=!1,errorMessage:l="",prefixIcon:c,suffixIcon:f,separator:u,suffixButton:m,disabled:h=!1,control:x,name:E,rules:j,defaultValue:F,loading:v=!1,className:g,...S}){const M=b.useId(),[O,B]=b.useState(!1),X=r||M,U=e==="password",Z=c??(e==="number"?la:void 0),I=U?O?na:tr:f,z=$("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",it[t],tn[t],rn[t],o?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]","bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]","disabled:bg-[var(--color-ds-background-disabled)]","disabled:border-[var(--color-ds-border-muted)]","disabled:text-[var(--color-ds-text-disabled)]","disabled:cursor-not-allowed");return v?i.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!n&&a&&i.jsx("label",{htmlFor:X,className:$("pb-2",it[t]),children:a}),i.jsx(Le,{width:"100%",height:sn[t],variant:"rect",className:"rounded-lg"}),i.jsx("div",{className:"min-h-[18px] w-full",children:i.jsx("span",{"aria-hidden":"true",children:" "})})]}):x&&E?i.jsx(we,{name:E,control:x,rules:j,defaultValue:F,render:({field:N,fieldState:L})=>i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:X,className:$("pb-2 text-[var(--color-ds-text-primary)]",it[t]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[Z&&i.jsx("div",{className:$("absolute left-0 flex items-center h-full",Ir[t]),children:i.jsx(je,{component:Z,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...N,id:X,type:U?O?"text":"password":e,disabled:h,"aria-invalid":!!L.error,className:$(z,Z&&"pl-9",I&&"pr-9",g),onInvalid:D=>D.preventDefault(),style:U&&!O?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),u&&i.jsx("div",{className:"flex items-center h-full",children:u}),m&&i.jsx("div",{className:"flex items-center h-full pr-2",children:m}),I&&i.jsx("button",{type:"button",onClick:()=>B(D=>!D),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(je,{component:I,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:L.error?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:L.error.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}):i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!n&&a&&i.jsx("label",{htmlFor:X,className:$("pb-2 text-[var(--color-ds-text-primary)]",it[t]),children:a}),i.jsxs("div",{className:"relative flex items-center w-full",children:[Z&&i.jsx("div",{className:$("absolute left-0 flex items-center h-full",Ir[t]),children:i.jsx(je,{component:Z,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...S,id:X,type:U?O?"text":"password":e,disabled:h,"aria-invalid":o,className:$(z,Z&&"pl-9",I&&"pr-9",g),onInvalid:N=>N.preventDefault(),style:U&&!O?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),u&&i.jsx("div",{className:"flex items-center h-full",children:u}),m&&i.jsx("div",{className:"flex items-center h-full",children:m}),I&&i.jsx("button",{type:"button",onClick:()=>B(N=>!N),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(je,{component:I,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:o&&l?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}const an={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},At=400,ct=8,zr=({children:r,size:e="sm",position:t="top",className:s})=>{const[a,n]=b.useState(!1),[o,l]=b.useState({x:0,y:0}),c=b.useRef(null),f=b.useId();b.useEffect(()=>{if(a&&c.current){const h=c.current.getBoundingClientRect();let x=0,E=0;switch(t){case"top":x=h.left+h.width/2-At/2,E=h.top-ct;break;case"bottom":x=h.left+h.width/2-At/2,E=h.bottom+ct;break;case"left":x=h.left-At-ct,E=h.top+h.height/2;break;case"right":x=h.right+ct,E=h.top+h.height/2;break}l({x,y:E})}},[a,t]);const u=()=>typeof r=="string"?i.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):i.jsx(i.Fragment,{children:r}),m=a?i.jsx("div",{id:f,role:"tooltip",className:$("fixed z-50 w-[250px] bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)] text-ds-sm rounded p-2 shadow-lg","pointer-events-none"),style:{top:`${o.y}px`,left:`${o.x}px`,transform:t==="left"||t==="right"?"translateY(-50%)":t==="top"?"translateY(-100%)":void 0},children:u()}):null;return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button","aria-describedby":f,ref:c,className:$("inline-flex items-center justify-center focus:outline-none",an[e],"text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]",s),onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onFocus:()=>n(!0),onBlur:()=>n(!1),children:i.jsx(da,{className:"w-full h-full"})}),Ht.createPortal(m,document.body)]})};function nn({name:r,label:e,type:t="text",size:s="sm",width:a,placeholder:n,validation:o,loadingDefaults:l,disabled:c,info:f}){var F;const{control:u,formState:{errors:m}}=rt(),h=!!m[r],x=((F=m[r])==null?void 0:F.message)||"",E="relative",j=a??"w-full";return i.jsxs("div",{className:E,children:[i.jsx(we,{name:r,control:u,rules:o,render:({field:v})=>i.jsx(lt,{label:e,size:s,width:j,placeholder:n,hasError:h,errorMessage:x,loading:l,type:t,...v,disabled:c})}),f&&i.jsx(zr,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:f})]})}const $t=b.memo(nn);$t.displayName="FormFieldInput";function on({title:r,headerButtons:e,children:t,className:s}){return i.jsxs("div",{className:$("flex flex-col h-full",s),children:[i.jsxs("div",{className:"flex items-center justify-between py-4",children:[i.jsx("div",{className:`bg-[var(--color-ds-background-accent)] \r
24
24
  text-[var(--color-ds-text-on-accent)] \r
25
25
  rounded-tr-[20px] \r
26
26
  pl-4 pr-10\r
27
- text-ds-lg`,children:r}),e&&i.jsx("div",{className:"flex items-center space-x-2",children:e})]}),i.jsx("main",{className:"flex-1 overflow-auto",children:t})]})}function Pr({options:r,value:e,onChange:t,children:s}){const a=b.useRef(null),[n,o]=b.useState({left:0,width:0});return b.useLayoutEffect(()=>{const l=a.current;if(!l)return;const c=()=>{const f=r.findIndex(F=>F.value===e);if(f<0)return;const u=l.children[f],m=u.querySelector("span"),h=(m==null?void 0:m.offsetWidth)??u.offsetWidth,x=u.offsetWidth,j=u.offsetLeft+(x-h)/2;o({left:j,width:h})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[e,r]),i.jsxs("div",{children:[i.jsxs("div",{className:"relative",children:[i.jsx("ul",{ref:a,role:"tablist",className:"flex justify-center overflow-x-auto border-b border-[var(--color-ds-border-default-50)]",children:r.map(l=>{const c=l.value===e;return i.jsx("li",{role:"tab","aria-selected":c,onClick:()=>t(l.value),className:$("cursor-pointer whitespace-nowrap px-4 py-2 transition-colors duration-150 ease-in-out",c?"text-[var(--color-ds-background-accent)]":"text-[var(--color-ds-text-primary)]"),children:i.jsx("span",{className:"inline-block",children:l.label})},l.value)})}),i.jsx("span",{className:"absolute bottom-0 h-1 bg-[var(--color-ds-background-accent)] transition-all duration-200 ease-in-out rounded-t-full",style:{left:n.left,width:n.width}})]}),i.jsx("div",{className:"mt-4 pb-4 border-b border-[var(--color-ds-border-default-50)]",children:s[e]})]})}const Dt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ln={sm:"h-6",md:"h-10",lg:"h-12"},cn={sm:"px-2",md:"px-2.5",lg:"px-3"},Ur={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Rr(r,e,t,s,a,n,o,l,c){return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative flex items-center w-full",children:[i.jsx("select",{id:r,...s,disabled:a,className:$("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Dt[t],ln[t],cn[t],n?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",a?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-primary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]",l),children:e.map(f=>i.jsx("option",{value:f.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:f.label},f.value))}),c&&i.jsx("div",{className:"flex items-center h-full pr-2",children:c})]}),!o&&i.jsx("div",{className:"min-h-[18px] w-full",children:n!=null&&n.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:n.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Je(r){const{control:e,name:t,rules:s,defaultValue:a,options:n=[],loadOptions:o,reloadDeps:l=[],value:c,onChange:f,size:u="sm",width:m="100%",label:h,labelHidden:x=!1,hasError:E=!1,errorMessage:j="",disableErrorPlaceholder:F=!1,disabled:v=!1,className:g,suffixButton:S}=r,D=b.useId(),O=t||D,[B,X]=b.useState(n),[U,q]=b.useState(!!o);if(b.useEffect(()=>{o&&(q(!0),o().then(Z=>X(Z)).finally(()=>q(!1)))},[o,...l]),b.useEffect(()=>{!e&&B.length>0&&(c===void 0||c===""||!B.some(Z=>Z.value===c))&&(f==null||f(B[0].value))},[B,c,f,e]),e&&t){const{field:Z,fieldState:I}=dr({name:t,control:e,rules:s,defaultValue:a});return b.useEffect(()=>{if(!U&&B.length>0){const z=Z.value;(z===void 0||!B.some(N=>N.value===z))&&Z.onChange(B[0].value)}},[B,U,Z]),i.jsxs("div",{className:$("flex flex-col",g),style:{width:m,maxWidth:"100%"},children:[h&&i.jsx("label",{htmlFor:O,className:$("pb-2 text-[var(--color-ds-text-primary)]",Dt[u],x&&"sr-only"),children:h}),U?i.jsx(Le,{width:"100%",height:Ur[u],variant:"rect",className:"rounded-lg"}):Rr(O,B,u,{value:Z.value,onChange:z=>Z.onChange(z.target.value)},v,I.error,F,g,S)]})}return i.jsxs("div",{className:$("flex flex-col",g),style:{width:m,maxWidth:"100%"},children:[h&&i.jsx("label",{htmlFor:O,className:$("pb-2 text-[var(--color-ds-text-primary)]",Dt[u],x&&"sr-only"),children:h}),U?i.jsx(Le,{width:"100%",height:Ur[u],variant:"rect",className:"rounded-lg"}):Rr(O,B,u,{value:c,onChange:Z=>f==null?void 0:f(Z.target.value)},v,E?{message:j}:void 0,F,g,S)]})}const Br={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function Zr({groupLabel:r,inputs:e=[],separator:t=i.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:a,showVisibleLabel:n=!1,size:o="sm",width:l}){const c=e.length;return i.jsxs("div",{className:$("flex flex-col",a),style:l?{width:l}:void 0,children:[i.jsx("label",{className:$("sr-only pb-2",Br[o]),children:r}),n&&i.jsx("label",{className:$("pb-2",Br[o]),children:r}),i.jsx("div",{className:"flex items-center flex-nowrap",children:e.map((f,u)=>{const{width:m,className:h,options:x,loadOptions:E,...j}=f,F=Array.isArray(x)||typeof E=="function";let v="rounded-lg";!s&&c>1&&(u===0?v="rounded-l-lg rounded-r-none":u===c-1?v="rounded-r-lg rounded-l-none":v="rounded-none");const g=$("inline-flex items-center flex-shrink-0 overflow-hidden",typeof m=="string"&&m.startsWith("w-")?m:void 0),S=typeof m=="string"&&!m.startsWith("w-")?{width:m}:void 0,D=$(h,v);return i.jsxs("div",{className:g,style:S,children:[F?i.jsx(Je,{...j,size:o,className:D,options:x,loadOptions:E}):i.jsx(lt,{...j,size:o,className:D}),s&&u<c-1&&t]},u)})})]})}const Wr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},dn={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function qr({groupLabel:r,options:e,control:t,name:s,rules:a,defaultValue:n,multiple:o=!0,size:l="sm",vertical:c=!0,className:f,showVisibleLabel:u=!0}){return i.jsx(we,{name:s,control:t,rules:a,defaultValue:n,render:({field:m,fieldState:h})=>{const{value:x,onChange:E}=m;h.error;const j=v=>o?Array.isArray(x)&&x.includes(v):x===v,F=v=>{if(o){const g=Array.isArray(x)?[...x]:[],S=g.indexOf(v);S>=0?g.splice(S,1):g.push(v),E(g)}else E(v)};return i.jsxs("div",{className:$("w-full",f),children:[i.jsx("label",{className:$("sr-only pb-2 text-[var(--color-ds-text-primary)]",Wr[l]),children:r}),u&&i.jsx("label",{className:$("block pb-2 text-[var(--color-ds-text-primary)]",Wr[l]),children:r}),i.jsx("div",{className:$(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:e.map(v=>i.jsxs("label",{className:"inline-flex items-center space-x-2 cursor-pointer select-none",children:[i.jsx("input",{type:o?"checkbox":"radio",name:s,value:v.value,checked:j(v.value),onChange:()=>F(v.value),className:$(dn[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]")}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-md",children:v.label})]},v.value))})]})}})}function un(r){function e(o){var l,c;for(const f of Object.keys(o)){if((l=o[f])!=null&&l.types||(c=o[f])!=null&&c.message)return f;if(typeof o[f]=="object"){const u=e(o[f]);if(u)return`${f}.${u}`}}return null}const t=e(r);if(!t)return;const s=`[name="${t}"]`,a=`[name^="${t}["], [name^="${t}."]`,n=document.querySelector(s)??document.querySelector(a);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus({preventScroll:!0}))}const fn={success:"bg-green-100 border-green-500 text-green-800",error:"bg-red-100 border-red-500 text-red-800",info:"bg-blue-100 border-blue-500 text-blue-800",warning:"bg-yellow-100 border-yellow-500 text-yellow-800"},Hr=({id:r,message:e,variant:t="info",duration:s=5e3,onClose:a})=>(b.useEffect(()=>{const n=setTimeout(()=>a(r),s);return()=>clearTimeout(n)},[r,s,a]),i.jsxs("div",{className:$("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",fn[t]),role:"alert","aria-live":"assertive",children:[i.jsx("span",{className:"flex-1",children:e}),i.jsx("button",{onClick:()=>a(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let dt;const hn=new Uint8Array(16);function mn(){if(!dt&&(dt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!dt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dt(hn)}const ue=[];for(let r=0;r<256;++r)ue.push((r+256).toString(16).slice(1));function pn(r,e=0){return ue[r[e+0]]+ue[r[e+1]]+ue[r[e+2]]+ue[r[e+3]]+"-"+ue[r[e+4]]+ue[r[e+5]]+"-"+ue[r[e+6]]+ue[r[e+7]]+"-"+ue[r[e+8]]+ue[r[e+9]]+"-"+ue[r[e+10]]+ue[r[e+11]]+ue[r[e+12]]+ue[r[e+13]]+ue[r[e+14]]+ue[r[e+15]]}const Yr={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function gn(r,e,t){if(Yr.randomUUID&&!r)return Yr.randomUUID();r=r||{};const s=r.random||(r.rng||mn)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,pn(s)}const Gr=b.createContext(null),Xr=()=>{const r=b.useContext(Gr);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},xn=({children:r})=>{const[e,t]=b.useState([]),s=(n,o="info",l=5e3)=>{const c=gn();t(f=>[...f,{id:c,message:n,variant:o,duration:l}])},a=n=>{t(o=>o.filter(l=>l.id!==n))};return i.jsxs(Gr.Provider,{value:{show:s},children:[r,i.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:e.map(n=>i.jsx(Hr,{id:n.id,message:n.message,variant:n.variant,duration:n.duration,onClose:a},n.id))})]})},Jr=(r,e,t)=>{if(r&&"reportValidity"in r){const s=T(t,e);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},Kr=(r,e)=>{for(const t in e.fields){const s=e.fields[t];s&&s.ref&&"reportValidity"in s.ref?Jr(s.ref,t,r):s&&s.refs&&s.refs.forEach(a=>Jr(a,t,r))}},bn=(r,e)=>{e.shouldUseNativeValidation&&Kr(r,e);const t={};for(const s in r){const a=T(e.fields,s),n=Object.assign(r[s]||{},{ref:a&&a.ref});if(vn(e.names||Object.keys(r),s)){const o=Object.assign({},T(t,s));K(o,"root",n),K(t,s,o)}else K(t,s,n)}return t},vn=(r,e)=>{const t=Qr(e);return r.some(s=>Qr(s).match(`^${t}\\.\\d+`))};function Qr(r){return r.replace(/\]|\[/g,"")}function es(r,e,t){return t===void 0&&(t={}),function(s,a,n){try{return Promise.resolve(function(o,l){try{var c=(e!=null&&e.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(r[t.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},e,{context:a}))).then(function(f){return n.shouldUseNativeValidation&&Kr({},n),{values:t.raw?Object.assign({},s):f,errors:{}}}))}catch(f){return l(f)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:bn((l=o,c=!n.shouldUseNativeValidation&&n.criteriaMode==="all",(l.inner||[]).reduce(function(f,u){if(f[u.path]||(f[u.path]={message:u.message,type:u.type}),c){var m=f[u.path].types,h=m&&m[u.type];f[u.path]=ur(u.path,c,f,u.type,h?[].concat(h,u.message):u.message)}return f},{})),n)};var l,c}))}catch(o){return Promise.reject(o)}}}var Mt,ts;function yn(){if(ts)return Mt;ts=1;function r(v){this._maxSize=v,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(v){return this._values[v]},r.prototype.set=function(v,g){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=g};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,t=/^\d+$/,s=/^\d/,a=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,n=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,l=new r(o),c=new r(o),f=new r(o);Mt={Cache:r,split:m,normalizePath:u,setter:function(v){var g=u(v);return c.get(v)||c.set(v,function(D,O){for(var B=0,X=g.length,U=D;B<X-1;){var q=g[B];if(q==="__proto__"||q==="constructor"||q==="prototype")return D;U=U[g[B++]]}U[g[B]]=O})},getter:function(v,g){var S=u(v);return f.get(v)||f.set(v,function(O){for(var B=0,X=S.length;B<X;)if(O!=null||!g)O=O[S[B++]];else return;return O})},join:function(v){return v.reduce(function(g,S){return g+(x(S)||t.test(S)?"["+S+"]":(g?".":"")+S)},"")},forEach:function(v,g,S){h(Array.isArray(v)?v:m(v),g,S)}};function u(v){return l.get(v)||l.set(v,m(v).map(function(g){return g.replace(n,"$2")}))}function m(v){return v.match(e)||[""]}function h(v,g,S){var D=v.length,O,B,X,U;for(B=0;B<D;B++)O=v[B],O&&(F(O)&&(O='"'+O+'"'),U=x(O),X=!U&&/^\d+$/.test(O),g.call(S,O,U,X,B,v))}function x(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function E(v){return v.match(s)&&!v.match(t)}function j(v){return a.test(v)}function F(v){return!x(v)&&(E(v)||j(v))}return Mt}var Ie=yn(),Vt,rs;function wn(){if(rs)return Vt;rs=1;const r=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,e=u=>u.match(r)||[],t=u=>u[0].toUpperCase()+u.slice(1),s=(u,m)=>e(u).join(m).toLowerCase(),a=u=>e(u).reduce((m,h)=>`${m}${m?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return Vt={words:e,upperFirst:t,camelCase:a,pascalCase:u=>t(a(u)),snakeCase:u=>s(u,"_"),kebabCase:u=>s(u,"-"),sentenceCase:u=>t(s(u," ")),titleCase:u=>e(u).map(t).join(" ")},Vt}var Lt=wn(),ut={exports:{}},ss;function kn(){if(ss)return ut.exports;ss=1,ut.exports=function(a){return r(e(a),a)},ut.exports.array=r;function r(a,n){var o=a.length,l=new Array(o),c={},f=o,u=t(n),m=s(a);for(n.forEach(function(x){if(!m.has(x[0])||!m.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});f--;)c[f]||h(a[f],f,new Set);return l;function h(x,E,j){if(j.has(x)){var F;try{F=", node was:"+JSON.stringify(x)}catch{F=""}throw new Error("Cyclic dependency"+F)}if(!m.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!c[E]){c[E]=!0;var v=u.get(x)||new Set;if(v=Array.from(v),E=v.length){j.add(x);do{var g=v[--E];h(g,m.get(g),j)}while(E);j.delete(x)}l[--o]=x}}}function e(a){for(var n=new Set,o=0,l=a.length;o<l;o++){var c=a[o];n.add(c[0]),n.add(c[1])}return Array.from(n)}function t(a){for(var n=new Map,o=0,l=a.length;o<l;o++){var c=a[o];n.has(c[0])||n.set(c[0],new Set),n.has(c[1])||n.set(c[1],new Set),n.get(c[0]).add(c[1])}return n}function s(a){for(var n=new Map,o=0,l=a.length;o<l;o++)n.set(a[o],o);return n}return ut.exports}var jn=kn();const En=Is(jn),Nn=Object.prototype.toString,_n=Error.prototype.toString,Fn=RegExp.prototype.toString,Sn=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Tn=/^Symbol\((.*)\)(.*)$/;function Cn(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function as(r,e=!1){if(r==null||r===!0||r===!1)return""+r;const t=typeof r;if(t==="number")return Cn(r);if(t==="string")return e?`"${r}"`:r;if(t==="function")return"[Function "+(r.name||"anonymous")+"]";if(t==="symbol")return Sn.call(r).replace(Tn,"Symbol($1)");const s=Nn.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+_n.call(r)+"]":s==="RegExp"?Fn.call(r):null}function Ae(r,e){let t=as(r,e);return t!==null?t:JSON.stringify(r,function(s,a){let n=as(this[s],e);return n!==null?n:a},2)}function ns(r){return r==null?[]:[].concat(r)}let os,is,ls,On=/\$\{\s*(\w+)\s*\}/g;os=Symbol.toStringTag;class cs{constructor(e,t,s,a){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[os]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=a,this.errors=[],this.inner=[],ns(e).forEach(n=>{if(pe.isError(n)){this.errors.push(...n.errors);const o=n.inner.length?n.inner:[n];this.inner.push(...o)}else this.errors.push(n)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}is=Symbol.hasInstance,ls=Symbol.toStringTag;class pe extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),typeof e=="string"?e.replace(On,(a,n)=>Ae(t[n])):typeof e=="function"?e(t):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,t,s,a,n){const o=new cs(e,t,s,a);if(n)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[ls]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,pe)}static[is](e){return cs[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Ne={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:r,type:e,value:t,originalValue:s})=>{const a=s!=null&&s!==t?` (cast from the value \`${Ae(s,!0)}\`).`:".";return e!=="mixed"?`${r} must be a \`${e}\` type, but the final value was: \`${Ae(t,!0)}\``+a:`${r} must match the configured type. The validated value was: \`${Ae(t,!0)}\``+a}},ge={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},$e={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},It={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},An={isValue:"${path} field must be ${value}"},ft={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Ne,string:ge,number:$e,date:It,object:ft,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:An,tuple:{notType:r=>{const{path:e,value:t,spec:s}=r,a=s.types.length;if(Array.isArray(t)){if(t.length<a)return`${e} tuple value has too few items, expected a length of ${a} but got ${t.length} for value: \`${Ae(t,!0)}\``;if(t.length>a)return`${e} tuple value has too many items, expected a length of ${a} but got ${t.length} for value: \`${Ae(t,!0)}\``}return pe.formatError(Ne.notType,r)}}});const zt=r=>r&&r.__isYupSchema__;class ht{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:a,otherwise:n}=t,o=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new ht(e,(l,c)=>{var f;let u=o(...l)?a:n;return(f=u==null?void 0:u(c))!=null?f:c})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map(n=>n.getValue(t==null?void 0:t.value,t==null?void 0:t.parent,t==null?void 0:t.context)),a=this.fn(s,e,t);if(a===void 0||a===e)return e;if(!zt(a))throw new TypeError("conditions must return a schema object");return a.resolve(t)}}const mt={context:"$",value:"."};class ze{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===mt.context,this.isValue=this.key[0]===mt.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?mt.context:this.isValue?mt.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ie.getter(this.path,!0),this.map=t.map}getValue(e,t,s){let a=this.isContext?s:this.isValue?e:t;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(e,t){return this.getValue(e,t==null?void 0:t.parent,t==null?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}ze.prototype.__isYupRef=!0;const Se=r=>r==null;function Ue(r){function e({value:t,path:s="",options:a,originalValue:n,schema:o},l,c){const{name:f,test:u,params:m,message:h,skipAbsent:x}=r;let{parent:E,context:j,abortEarly:F=o.spec.abortEarly,disableStackTrace:v=o.spec.disableStackTrace}=a;function g(I){return ze.isRef(I)?I.getValue(t,E,j):I}function S(I={}){const z=Object.assign({value:t,originalValue:n,label:o.spec.label,path:I.path||s,spec:o.spec,disableStackTrace:I.disableStackTrace||v},m,I.params);for(const L of Object.keys(z))z[L]=g(z[L]);const N=new pe(pe.formatError(I.message||h,z),t,z.path,I.type||f,z.disableStackTrace);return N.params=z,N}const D=F?l:c;let O={path:s,parent:E,type:f,from:a.from,createError:S,resolve:g,options:a,originalValue:n,schema:o};const B=I=>{pe.isError(I)?D(I):I?c(null):D(S())},X=I=>{pe.isError(I)?D(I):l(I)};if(x&&Se(t))return B(!0);let q;try{var Z;if(q=u.call(O,t,O),typeof((Z=q)==null?void 0:Z.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${O.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(q).then(B,X)}}catch(I){X(I);return}B(q)}return e.OPTIONS=r,e}function $n(r,e,t,s=t){let a,n,o;return e?(Ie.forEach(e,(l,c,f)=>{let u=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:a,value:t});let m=r.type==="tuple",h=f?parseInt(u,10):0;if(r.innerType||m){if(m&&!f)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(t&&h>=t.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${e}. because there is no value at that index. `);a=t,t=t&&t[h],r=m?r.spec.types[h]:r.innerType}if(!f){if(!r.fields||!r.fields[u])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${o} which is a type: "${r.type}")`);a=t,t=t&&t[u],r=r.fields[u]}n=u,o=c?"["+l+"]":"."+l}),{schema:r,parent:a,parentPath:n}):{parent:a,parentPath:e,schema:r}}class pt extends Set{describe(){const e=[];for(const t of this.values())e.push(ze.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new pt(this.values())}merge(e,t){const s=this.clone();return e.forEach(a=>s.add(a)),t.forEach(a=>s.delete(a)),s}}function Re(r,e=new Map){if(zt(r)||!r||typeof r!="object")return r;if(e.has(r))return e.get(r);let t;if(r instanceof Date)t=new Date(r.getTime()),e.set(r,t);else if(r instanceof RegExp)t=new RegExp(r),e.set(r,t);else if(Array.isArray(r)){t=new Array(r.length),e.set(r,t);for(let s=0;s<r.length;s++)t[s]=Re(r[s],e)}else if(r instanceof Map){t=new Map,e.set(r,t);for(const[s,a]of r.entries())t.set(s,Re(a,e))}else if(r instanceof Set){t=new Set,e.set(r,t);for(const s of r)t.add(Re(s,e))}else if(r instanceof Object){t={},e.set(r,t);for(const[s,a]of Object.entries(r))t[s]=Re(a,e)}else throw Error(`Unable to clone ${r}`);return t}class be{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new pt,this._blacklist=new pt,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ne.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(t=>{t.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=Re(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(e.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const a=Object.assign({},t.spec,s.spec);return s.spec=a,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation(n=>{e.tests.forEach(o=>{n.test(o.OPTIONS)})}),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce((a,n)=>n.resolve(a,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,a,n;return Object.assign({},e,{from:e.from||[],strict:(t=e.strict)!=null?t:this.spec.strict,abortEarly:(s=e.abortEarly)!=null?s:this.spec.abortEarly,recursive:(a=e.recursive)!=null?a:this.spec.recursive,disableStackTrace:(n=e.disableStackTrace)!=null?n:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),a=t.assert==="ignore-optionality",n=s._cast(e,t);if(t.assert!==!1&&!s.isType(n)){if(a&&Se(n))return n;let o=Ae(e),l=Ae(n);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
27
+ text-ds-lg`,children:r}),e&&i.jsx("div",{className:"flex items-center space-x-2",children:e})]}),i.jsx("main",{className:"flex-1 overflow-auto",children:t})]})}function Pr({options:r,value:e,onChange:t,children:s}){const a=b.useRef(null),[n,o]=b.useState({left:0,width:0});return b.useLayoutEffect(()=>{const l=a.current;if(!l)return;const c=()=>{const f=r.findIndex(F=>F.value===e);if(f<0)return;const u=l.children[f],m=u.querySelector("span"),h=(m==null?void 0:m.offsetWidth)??u.offsetWidth,x=u.offsetWidth,j=u.offsetLeft+(x-h)/2;o({left:j,width:h})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[e,r]),i.jsxs("div",{children:[i.jsxs("div",{className:"relative",children:[i.jsx("ul",{ref:a,role:"tablist",className:"flex justify-center overflow-x-auto border-b border-[var(--color-ds-border-default-50)]",children:r.map(l=>{const c=l.value===e;return i.jsx("li",{role:"tab","aria-selected":c,onClick:()=>t(l.value),className:$("cursor-pointer whitespace-nowrap px-4 py-2 transition-colors duration-150 ease-in-out",c?"text-[var(--color-ds-background-accent)]":"text-[var(--color-ds-text-primary)]"),children:i.jsx("span",{className:"inline-block",children:l.label})},l.value)})}),i.jsx("span",{className:"absolute bottom-0 h-1 bg-[var(--color-ds-background-accent)] transition-all duration-200 ease-in-out rounded-t-full",style:{left:n.left,width:n.width}})]}),i.jsx("div",{className:"mt-4 pb-4 border-b border-[var(--color-ds-border-default-50)]",children:s[e]})]})}const Dt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ln={sm:"h-6",md:"h-10",lg:"h-12"},cn={sm:"px-2",md:"px-2.5",lg:"px-3"},Ur={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Rr(r,e,t,s,a,n,o,l,c){return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative flex items-center w-full",children:[i.jsx("select",{id:r,...s,disabled:a,className:$("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Dt[t],ln[t],cn[t],n?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",a?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-primary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]",l),children:e.map(f=>i.jsx("option",{value:f.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:f.label},f.value))}),c&&i.jsx("div",{className:"flex items-center h-full pr-2",children:c})]}),!o&&i.jsx("div",{className:"min-h-[18px] w-full",children:n!=null&&n.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:n.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Je(r){const{control:e,name:t,rules:s,defaultValue:a,options:n=[],loadOptions:o,reloadDeps:l=[],value:c,onChange:f,size:u="sm",width:m="100%",label:h,labelHidden:x=!1,hasError:E=!1,errorMessage:j="",disableErrorPlaceholder:F=!1,disabled:v=!1,className:g,suffixButton:S}=r,M=b.useId(),O=t||M,[B,X]=b.useState(n),[U,q]=b.useState(!!o);if(b.useEffect(()=>{o&&(q(!0),o().then(Z=>X(Z)).finally(()=>q(!1)))},[o,...l]),b.useEffect(()=>{!e&&B.length>0&&(c===void 0||c===""||!B.some(Z=>Z.value===c))&&(f==null||f(B[0].value))},[B,c,f,e]),e&&t){const{field:Z,fieldState:I}=dr({name:t,control:e,rules:s,defaultValue:a});return b.useEffect(()=>{if(!U&&B.length>0){const z=Z.value;(z===void 0||!B.some(N=>N.value===z))&&Z.onChange(B[0].value)}},[B,U,Z]),i.jsxs("div",{className:$("flex flex-col",g),style:{width:m,maxWidth:"100%"},children:[h&&i.jsx("label",{htmlFor:O,className:$("pb-2 text-[var(--color-ds-text-primary)]",Dt[u],x&&"sr-only"),children:h}),U?i.jsx(Le,{width:"100%",height:Ur[u],variant:"rect",className:"rounded-lg"}):Rr(O,B,u,{value:Z.value,onChange:z=>Z.onChange(z.target.value)},v,I.error,F,g,S)]})}return i.jsxs("div",{className:$("flex flex-col",g),style:{width:m,maxWidth:"100%"},children:[h&&i.jsx("label",{htmlFor:O,className:$("pb-2 text-[var(--color-ds-text-primary)]",Dt[u],x&&"sr-only"),children:h}),U?i.jsx(Le,{width:"100%",height:Ur[u],variant:"rect",className:"rounded-lg"}):Rr(O,B,u,{value:c,onChange:Z=>f==null?void 0:f(Z.target.value)},v,E?{message:j}:void 0,F,g,S)]})}const Br={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function Zr({groupLabel:r,inputs:e=[],separator:t=i.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:a,showVisibleLabel:n=!1,size:o="sm",width:l}){const c=e.length;return i.jsxs("div",{className:$("flex flex-col",a),style:l?{width:l}:void 0,children:[i.jsx("label",{className:$("sr-only pb-2",Br[o]),children:r}),n&&i.jsx("label",{className:$("pb-2",Br[o]),children:r}),i.jsx("div",{className:"flex items-center flex-nowrap",children:e.map((f,u)=>{const{width:m,className:h,options:x,loadOptions:E,...j}=f,F=Array.isArray(x)||typeof E=="function";let v="rounded-lg";!s&&c>1&&(u===0?v="rounded-l-lg rounded-r-none":u===c-1?v="rounded-r-lg rounded-l-none":v="rounded-none");const g=$("inline-flex items-center flex-shrink-0 overflow-hidden",typeof m=="string"&&m.startsWith("w-")?m:void 0),S=typeof m=="string"&&!m.startsWith("w-")?{width:m}:void 0,M=$(h,v);return i.jsxs("div",{className:g,style:S,children:[F?i.jsx(Je,{...j,size:o,className:M,options:x,loadOptions:E}):i.jsx(lt,{...j,size:o,className:M}),s&&u<c-1&&t]},u)})})]})}const Wr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},dn={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function qr({groupLabel:r,options:e,control:t,name:s,rules:a,defaultValue:n,multiple:o=!0,size:l="sm",vertical:c=!0,className:f,showVisibleLabel:u=!0}){return i.jsx(we,{name:s,control:t,rules:a,defaultValue:n,render:({field:m,fieldState:h})=>{const{value:x,onChange:E}=m;h.error;const j=v=>o?Array.isArray(x)&&x.includes(v):x===v,F=v=>{if(o){const g=Array.isArray(x)?[...x]:[],S=g.indexOf(v);S>=0?g.splice(S,1):g.push(v),E(g)}else E(v)};return i.jsxs("div",{className:$("w-full",f),children:[i.jsx("label",{className:$("sr-only pb-2 text-[var(--color-ds-text-primary)]",Wr[l]),children:r}),u&&i.jsx("label",{className:$("block pb-2 text-[var(--color-ds-text-primary)]",Wr[l]),children:r}),i.jsx("div",{className:$(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:e.map(v=>i.jsxs("label",{className:"inline-flex items-center space-x-2 cursor-pointer select-none",children:[i.jsx("input",{type:o?"checkbox":"radio",name:s,value:v.value,checked:j(v.value),onChange:()=>F(v.value),className:$(dn[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]")}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-md",children:v.label})]},v.value))})]})}})}function un(r){function e(o){var l,c;for(const f of Object.keys(o)){if((l=o[f])!=null&&l.types||(c=o[f])!=null&&c.message)return f;if(typeof o[f]=="object"){const u=e(o[f]);if(u)return`${f}.${u}`}}return null}const t=e(r);if(!t)return;const s=`[name="${t}"]`,a=`[name^="${t}["], [name^="${t}."]`,n=document.querySelector(s)??document.querySelector(a);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus({preventScroll:!0}))}const fn={success:"bg-green-100 border-green-500 text-green-800",error:"bg-red-100 border-red-500 text-red-800",info:"bg-blue-100 border-blue-500 text-blue-800",warning:"bg-yellow-100 border-yellow-500 text-yellow-800"},Hr=({id:r,message:e,variant:t="info",duration:s=5e3,onClose:a})=>(b.useEffect(()=>{const n=setTimeout(()=>a(r),s);return()=>clearTimeout(n)},[r,s,a]),i.jsxs("div",{className:$("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",fn[t]),role:"alert","aria-live":"assertive",children:[i.jsx("span",{className:"flex-1",children:e}),i.jsx("button",{onClick:()=>a(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let dt;const hn=new Uint8Array(16);function mn(){if(!dt&&(dt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!dt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dt(hn)}const ue=[];for(let r=0;r<256;++r)ue.push((r+256).toString(16).slice(1));function pn(r,e=0){return ue[r[e+0]]+ue[r[e+1]]+ue[r[e+2]]+ue[r[e+3]]+"-"+ue[r[e+4]]+ue[r[e+5]]+"-"+ue[r[e+6]]+ue[r[e+7]]+"-"+ue[r[e+8]]+ue[r[e+9]]+"-"+ue[r[e+10]]+ue[r[e+11]]+ue[r[e+12]]+ue[r[e+13]]+ue[r[e+14]]+ue[r[e+15]]}const Yr={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function gn(r,e,t){if(Yr.randomUUID&&!r)return Yr.randomUUID();r=r||{};const s=r.random||(r.rng||mn)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,pn(s)}const Gr=b.createContext(null),Xr=()=>{const r=b.useContext(Gr);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},xn=({children:r})=>{const[e,t]=b.useState([]),s=(n,o="info",l=5e3)=>{const c=gn();t(f=>[...f,{id:c,message:n,variant:o,duration:l}])},a=n=>{t(o=>o.filter(l=>l.id!==n))};return i.jsxs(Gr.Provider,{value:{show:s},children:[r,i.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:e.map(n=>i.jsx(Hr,{id:n.id,message:n.message,variant:n.variant,duration:n.duration,onClose:a},n.id))})]})},Jr=(r,e,t)=>{if(r&&"reportValidity"in r){const s=T(t,e);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},Kr=(r,e)=>{for(const t in e.fields){const s=e.fields[t];s&&s.ref&&"reportValidity"in s.ref?Jr(s.ref,t,r):s&&s.refs&&s.refs.forEach(a=>Jr(a,t,r))}},bn=(r,e)=>{e.shouldUseNativeValidation&&Kr(r,e);const t={};for(const s in r){const a=T(e.fields,s),n=Object.assign(r[s]||{},{ref:a&&a.ref});if(vn(e.names||Object.keys(r),s)){const o=Object.assign({},T(t,s));K(o,"root",n),K(t,s,o)}else K(t,s,n)}return t},vn=(r,e)=>{const t=Qr(e);return r.some(s=>Qr(s).match(`^${t}\\.\\d+`))};function Qr(r){return r.replace(/\]|\[/g,"")}function es(r,e,t){return t===void 0&&(t={}),function(s,a,n){try{return Promise.resolve(function(o,l){try{var c=(e!=null&&e.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(r[t.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},e,{context:a}))).then(function(f){return n.shouldUseNativeValidation&&Kr({},n),{values:t.raw?Object.assign({},s):f,errors:{}}}))}catch(f){return l(f)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:bn((l=o,c=!n.shouldUseNativeValidation&&n.criteriaMode==="all",(l.inner||[]).reduce(function(f,u){if(f[u.path]||(f[u.path]={message:u.message,type:u.type}),c){var m=f[u.path].types,h=m&&m[u.type];f[u.path]=ur(u.path,c,f,u.type,h?[].concat(h,u.message):u.message)}return f},{})),n)};var l,c}))}catch(o){return Promise.reject(o)}}}var Mt,ts;function yn(){if(ts)return Mt;ts=1;function r(v){this._maxSize=v,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(v){return this._values[v]},r.prototype.set=function(v,g){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=g};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,t=/^\d+$/,s=/^\d/,a=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,n=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,l=new r(o),c=new r(o),f=new r(o);Mt={Cache:r,split:m,normalizePath:u,setter:function(v){var g=u(v);return c.get(v)||c.set(v,function(M,O){for(var B=0,X=g.length,U=M;B<X-1;){var q=g[B];if(q==="__proto__"||q==="constructor"||q==="prototype")return M;U=U[g[B++]]}U[g[B]]=O})},getter:function(v,g){var S=u(v);return f.get(v)||f.set(v,function(O){for(var B=0,X=S.length;B<X;)if(O!=null||!g)O=O[S[B++]];else return;return O})},join:function(v){return v.reduce(function(g,S){return g+(x(S)||t.test(S)?"["+S+"]":(g?".":"")+S)},"")},forEach:function(v,g,S){h(Array.isArray(v)?v:m(v),g,S)}};function u(v){return l.get(v)||l.set(v,m(v).map(function(g){return g.replace(n,"$2")}))}function m(v){return v.match(e)||[""]}function h(v,g,S){var M=v.length,O,B,X,U;for(B=0;B<M;B++)O=v[B],O&&(F(O)&&(O='"'+O+'"'),U=x(O),X=!U&&/^\d+$/.test(O),g.call(S,O,U,X,B,v))}function x(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function E(v){return v.match(s)&&!v.match(t)}function j(v){return a.test(v)}function F(v){return!x(v)&&(E(v)||j(v))}return Mt}var Ie=yn(),Vt,rs;function wn(){if(rs)return Vt;rs=1;const r=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,e=u=>u.match(r)||[],t=u=>u[0].toUpperCase()+u.slice(1),s=(u,m)=>e(u).join(m).toLowerCase(),a=u=>e(u).reduce((m,h)=>`${m}${m?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return Vt={words:e,upperFirst:t,camelCase:a,pascalCase:u=>t(a(u)),snakeCase:u=>s(u,"_"),kebabCase:u=>s(u,"-"),sentenceCase:u=>t(s(u," ")),titleCase:u=>e(u).map(t).join(" ")},Vt}var Lt=wn(),ut={exports:{}},ss;function kn(){if(ss)return ut.exports;ss=1,ut.exports=function(a){return r(e(a),a)},ut.exports.array=r;function r(a,n){var o=a.length,l=new Array(o),c={},f=o,u=t(n),m=s(a);for(n.forEach(function(x){if(!m.has(x[0])||!m.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});f--;)c[f]||h(a[f],f,new Set);return l;function h(x,E,j){if(j.has(x)){var F;try{F=", node was:"+JSON.stringify(x)}catch{F=""}throw new Error("Cyclic dependency"+F)}if(!m.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!c[E]){c[E]=!0;var v=u.get(x)||new Set;if(v=Array.from(v),E=v.length){j.add(x);do{var g=v[--E];h(g,m.get(g),j)}while(E);j.delete(x)}l[--o]=x}}}function e(a){for(var n=new Set,o=0,l=a.length;o<l;o++){var c=a[o];n.add(c[0]),n.add(c[1])}return Array.from(n)}function t(a){for(var n=new Map,o=0,l=a.length;o<l;o++){var c=a[o];n.has(c[0])||n.set(c[0],new Set),n.has(c[1])||n.set(c[1],new Set),n.get(c[0]).add(c[1])}return n}function s(a){for(var n=new Map,o=0,l=a.length;o<l;o++)n.set(a[o],o);return n}return ut.exports}var jn=kn();const En=Is(jn),Nn=Object.prototype.toString,_n=Error.prototype.toString,Fn=RegExp.prototype.toString,Sn=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Tn=/^Symbol\((.*)\)(.*)$/;function Cn(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function as(r,e=!1){if(r==null||r===!0||r===!1)return""+r;const t=typeof r;if(t==="number")return Cn(r);if(t==="string")return e?`"${r}"`:r;if(t==="function")return"[Function "+(r.name||"anonymous")+"]";if(t==="symbol")return Sn.call(r).replace(Tn,"Symbol($1)");const s=Nn.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+_n.call(r)+"]":s==="RegExp"?Fn.call(r):null}function Ae(r,e){let t=as(r,e);return t!==null?t:JSON.stringify(r,function(s,a){let n=as(this[s],e);return n!==null?n:a},2)}function ns(r){return r==null?[]:[].concat(r)}let os,is,ls,On=/\$\{\s*(\w+)\s*\}/g;os=Symbol.toStringTag;class cs{constructor(e,t,s,a){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[os]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=a,this.errors=[],this.inner=[],ns(e).forEach(n=>{if(pe.isError(n)){this.errors.push(...n.errors);const o=n.inner.length?n.inner:[n];this.inner.push(...o)}else this.errors.push(n)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}is=Symbol.hasInstance,ls=Symbol.toStringTag;class pe extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),typeof e=="string"?e.replace(On,(a,n)=>Ae(t[n])):typeof e=="function"?e(t):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,t,s,a,n){const o=new cs(e,t,s,a);if(n)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[ls]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,pe)}static[is](e){return cs[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Ne={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:r,type:e,value:t,originalValue:s})=>{const a=s!=null&&s!==t?` (cast from the value \`${Ae(s,!0)}\`).`:".";return e!=="mixed"?`${r} must be a \`${e}\` type, but the final value was: \`${Ae(t,!0)}\``+a:`${r} must match the configured type. The validated value was: \`${Ae(t,!0)}\``+a}},ge={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},$e={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},It={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},An={isValue:"${path} field must be ${value}"},ft={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Ne,string:ge,number:$e,date:It,object:ft,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:An,tuple:{notType:r=>{const{path:e,value:t,spec:s}=r,a=s.types.length;if(Array.isArray(t)){if(t.length<a)return`${e} tuple value has too few items, expected a length of ${a} but got ${t.length} for value: \`${Ae(t,!0)}\``;if(t.length>a)return`${e} tuple value has too many items, expected a length of ${a} but got ${t.length} for value: \`${Ae(t,!0)}\``}return pe.formatError(Ne.notType,r)}}});const zt=r=>r&&r.__isYupSchema__;class ht{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:a,otherwise:n}=t,o=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new ht(e,(l,c)=>{var f;let u=o(...l)?a:n;return(f=u==null?void 0:u(c))!=null?f:c})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map(n=>n.getValue(t==null?void 0:t.value,t==null?void 0:t.parent,t==null?void 0:t.context)),a=this.fn(s,e,t);if(a===void 0||a===e)return e;if(!zt(a))throw new TypeError("conditions must return a schema object");return a.resolve(t)}}const mt={context:"$",value:"."};class ze{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===mt.context,this.isValue=this.key[0]===mt.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?mt.context:this.isValue?mt.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ie.getter(this.path,!0),this.map=t.map}getValue(e,t,s){let a=this.isContext?s:this.isValue?e:t;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(e,t){return this.getValue(e,t==null?void 0:t.parent,t==null?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}ze.prototype.__isYupRef=!0;const Se=r=>r==null;function Ue(r){function e({value:t,path:s="",options:a,originalValue:n,schema:o},l,c){const{name:f,test:u,params:m,message:h,skipAbsent:x}=r;let{parent:E,context:j,abortEarly:F=o.spec.abortEarly,disableStackTrace:v=o.spec.disableStackTrace}=a;function g(I){return ze.isRef(I)?I.getValue(t,E,j):I}function S(I={}){const z=Object.assign({value:t,originalValue:n,label:o.spec.label,path:I.path||s,spec:o.spec,disableStackTrace:I.disableStackTrace||v},m,I.params);for(const L of Object.keys(z))z[L]=g(z[L]);const N=new pe(pe.formatError(I.message||h,z),t,z.path,I.type||f,z.disableStackTrace);return N.params=z,N}const M=F?l:c;let O={path:s,parent:E,type:f,from:a.from,createError:S,resolve:g,options:a,originalValue:n,schema:o};const B=I=>{pe.isError(I)?M(I):I?c(null):M(S())},X=I=>{pe.isError(I)?M(I):l(I)};if(x&&Se(t))return B(!0);let q;try{var Z;if(q=u.call(O,t,O),typeof((Z=q)==null?void 0:Z.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${O.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(q).then(B,X)}}catch(I){X(I);return}B(q)}return e.OPTIONS=r,e}function $n(r,e,t,s=t){let a,n,o;return e?(Ie.forEach(e,(l,c,f)=>{let u=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:a,value:t});let m=r.type==="tuple",h=f?parseInt(u,10):0;if(r.innerType||m){if(m&&!f)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(t&&h>=t.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${e}. because there is no value at that index. `);a=t,t=t&&t[h],r=m?r.spec.types[h]:r.innerType}if(!f){if(!r.fields||!r.fields[u])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${o} which is a type: "${r.type}")`);a=t,t=t&&t[u],r=r.fields[u]}n=u,o=c?"["+l+"]":"."+l}),{schema:r,parent:a,parentPath:n}):{parent:a,parentPath:e,schema:r}}class pt extends Set{describe(){const e=[];for(const t of this.values())e.push(ze.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new pt(this.values())}merge(e,t){const s=this.clone();return e.forEach(a=>s.add(a)),t.forEach(a=>s.delete(a)),s}}function Re(r,e=new Map){if(zt(r)||!r||typeof r!="object")return r;if(e.has(r))return e.get(r);let t;if(r instanceof Date)t=new Date(r.getTime()),e.set(r,t);else if(r instanceof RegExp)t=new RegExp(r),e.set(r,t);else if(Array.isArray(r)){t=new Array(r.length),e.set(r,t);for(let s=0;s<r.length;s++)t[s]=Re(r[s],e)}else if(r instanceof Map){t=new Map,e.set(r,t);for(const[s,a]of r.entries())t.set(s,Re(a,e))}else if(r instanceof Set){t=new Set,e.set(r,t);for(const s of r)t.add(Re(s,e))}else if(r instanceof Object){t={},e.set(r,t);for(const[s,a]of Object.entries(r))t[s]=Re(a,e)}else throw Error(`Unable to clone ${r}`);return t}class be{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new pt,this._blacklist=new pt,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ne.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(t=>{t.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=Re(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(e.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const a=Object.assign({},t.spec,s.spec);return s.spec=a,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation(n=>{e.tests.forEach(o=>{n.test(o.OPTIONS)})}),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce((a,n)=>n.resolve(a,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,a,n;return Object.assign({},e,{from:e.from||[],strict:(t=e.strict)!=null?t:this.spec.strict,abortEarly:(s=e.abortEarly)!=null?s:this.spec.abortEarly,recursive:(a=e.recursive)!=null?a:this.spec.recursive,disableStackTrace:(n=e.disableStackTrace)!=null?n:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),a=t.assert==="ignore-optionality",n=s._cast(e,t);if(t.assert!==!1&&!s.isType(n)){if(a&&Se(n))return n;let o=Ae(e),l=Ae(n);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
28
28
 
29
29
  attempted value: ${o}
30
- `+(l!==o?`result of cast: ${l}`:""))}return n}_cast(e,t){let s=e===void 0?e:this.transforms.reduce((a,n)=>n.call(this,a,e,this),e);return s===void 0&&(s=this.getDefault(t)),s}_validate(e,t={},s,a){let{path:n,originalValue:o=e,strict:l=this.spec.strict}=t,c=e;l||(c=this._cast(c,Object.assign({assert:!1},t)));let f=[];for(let u of Object.values(this.internalTests))u&&f.push(u);this.runTests({path:n,value:c,originalValue:o,options:t,tests:f},s,u=>{if(u.length)return a(u,c);this.runTests({path:n,value:c,originalValue:o,options:t,tests:this.tests},s,a)})}runTests(e,t,s){let a=!1,{tests:n,value:o,originalValue:l,path:c,options:f}=e,u=j=>{a||(a=!0,t(j,o))},m=j=>{a||(a=!0,s(j,o))},h=n.length,x=[];if(!h)return m([]);let E={value:o,originalValue:l,path:c,options:f,schema:this};for(let j=0;j<n.length;j++){const F=n[j];F(E,u,function(g){g&&(Array.isArray(g)?x.push(...g):x.push(g)),--h<=0&&m(x)})}}asNestedTest({key:e,index:t,parent:s,parentPath:a,originalParent:n,options:o}){const l=e??t;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let f=s[l];const u=Object.assign({},o,{strict:!0,parent:s,value:f,originalValue:n[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${a||""}[${c?l:`"${l}"`}]`:(a?`${a}.`:"")+e});return(m,h,x)=>this.resolve(u)._validate(f,u,h,x)}validate(e,t){var s;let a=this.resolve(Object.assign({},t,{value:e})),n=(s=t==null?void 0:t.disableStackTrace)!=null?s:a.spec.disableStackTrace;return new Promise((o,l)=>a._validate(e,t,(c,f)=>{pe.isError(c)&&(c.value=f),l(c)},(c,f)=>{c.length?l(new pe(c,f,void 0,void 0,n)):o(f)}))}validateSync(e,t){var s;let a=this.resolve(Object.assign({},t,{value:e})),n,o=(s=t==null?void 0:t.disableStackTrace)!=null?s:a.spec.disableStackTrace;return a._validate(e,Object.assign({},t,{sync:!0}),(l,c)=>{throw pe.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new pe(l,e,void 0,void 0,o);n=c}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,s=>{if(pe.isError(s))return!1;throw s})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(s){if(pe.isError(s))return!1;throw s}}_getDefault(e){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this,e):Re(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=Ue({message:t,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=Ue({message:t,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(e=Ne.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Ne.notNull){return this.nullability(!1,e)}required(e=Ne.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(e.length===1?typeof e[0]=="function"?t={test:e[0]}:t=e[0]:e.length===2?t={name:e[0],test:e[1]}:t={name:e[0],message:e[1],test:e[2]},t.message===void 0&&(t.message=Ne.default),typeof t.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),a=Ue(t),n=t.exclusive||t.name&&s.exclusiveTests[t.name]===!0;if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter(o=>!(o.OPTIONS.name===t.name&&(n||o.OPTIONS.test===a.OPTIONS.test))),s.tests.push(a),s}when(e,t){!Array.isArray(e)&&typeof e!="string"&&(t=e,e=".");let s=this.clone(),a=ns(e).map(n=>new ze(n));return a.forEach(n=>{n.isSibling&&s.deps.push(n.key)}),s.conditions.push(typeof t=="function"?new ht(a,t):ht.fromOptions(a,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=Ue({message:e,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Ne.oneOf){let s=this.clone();return e.forEach(a=>{s._whitelist.add(a),s._blacklist.delete(a)}),s.internalTests.whiteList=Ue({message:t,name:"oneOf",skipAbsent:!0,test(a){let n=this.schema._whitelist,o=n.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(n).join(", "),resolved:o}})}}),s}notOneOf(e,t=Ne.notOneOf){let s=this.clone();return e.forEach(a=>{s._blacklist.add(a),s._whitelist.delete(a)}),s.internalTests.blacklist=Ue({message:t,name:"notOneOf",test(a){let n=this.schema._blacklist,o=n.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(n).join(", "),resolved:o}}):!0}}),s}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:a,optional:n,nullable:o}=t.spec;return{meta:a,label:s,optional:n,nullable:o,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,f,u)=>u.findIndex(m=>m.name===c.name)===f)}}}be.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])be.prototype[`${r}At`]=function(e,t,s={}){const{parent:a,parentPath:n,schema:o}=$n(this,e,t,s.context);return o[r](a&&a[n],Object.assign({},s,{parent:a,path:e}))};for(const r of["equals","is"])be.prototype[r]=be.prototype.oneOf;for(const r of["not","nope"])be.prototype[r]=be.prototype.notOneOf;const Dn=()=>!0;function Pt(r){return new ds(r)}class ds extends be{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Dn},e))}}Pt.prototype=ds.prototype;const Mn=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Vn(r){const e=Ut(r);if(!e)return Date.parse?Date.parse(r):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let t=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(t=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(t=0-t)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+t,e.second,e.millisecond)}function Ut(r){var e,t;const s=Mn.exec(r);return s?{year:Te(s[1]),month:Te(s[2],1)-1,day:Te(s[3],1),hour:Te(s[4]),minute:Te(s[5]),second:Te(s[6]),millisecond:s[7]?Te(s[7].substring(0,3)):0,precision:(e=(t=s[7])==null?void 0:t.length)!=null?e:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:Te(s[10]),minuteOffset:Te(s[11])}:null}function Te(r,e=0){return Number(r)||e}let Ln=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,In=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,zn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Pn="^\\d{4}-\\d{2}-\\d{2}",Un="\\d{2}:\\d{2}:\\d{2}",Rn="(([+-]\\d{2}(:?\\d{2})?)|Z)",Bn=new RegExp(`${Pn}T${Un}(\\.\\d+)?${Rn}$`),Zn=r=>Se(r)||r===r.trim(),Wn={}.toString();function us(){return new fs}class fs extends be{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce||s.isType(e)||Array.isArray(e))return e;const a=e!=null&&e.toString?e.toString():e;return a===Wn?e:a})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Ne.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(t=>t.OPTIONS.name!=="required"),e))}length(e,t=ge.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(s){return s.length===this.resolve(e)}})}min(e,t=ge.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s.length>=this.resolve(e)}})}max(e,t=ge.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(s){return s.length<=this.resolve(e)}})}matches(e,t){let s=!1,a,n;return t&&(typeof t=="object"?{excludeEmptyString:s=!1,message:a,name:n}=t:a=t),this.test({name:n||"matches",message:a||ge.matches,params:{regex:e},skipAbsent:!0,test:o=>o===""&&s||o.search(e)!==-1})}email(e=ge.email){return this.matches(Ln,{name:"email",message:e,excludeEmptyString:!0})}url(e=ge.url){return this.matches(In,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ge.uuid){return this.matches(zn,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t="",s,a;return e&&(typeof e=="object"?{message:t="",allowOffset:s=!1,precision:a=void 0}=e:t=e),this.matches(Bn,{name:"datetime",message:t||ge.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:t||ge.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:n=>{if(!n||s)return!0;const o=Ut(n);return o?!!o.z:!1}}).test({name:"datetime_precision",message:t||ge.datetime_precision,params:{precision:a},skipAbsent:!0,test:n=>{if(!n||a==null)return!0;const o=Ut(n);return o?o.precision===a:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=ge.trim){return this.transform(t=>t!=null?t.trim():t).test({message:e,name:"trim",test:Zn})}lowercase(e=ge.lowercase){return this.transform(t=>Se(t)?t:t.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Se(t)||t===t.toLowerCase()})}uppercase(e=ge.uppercase){return this.transform(t=>Se(t)?t:t.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Se(t)||t===t.toUpperCase()})}}us.prototype=fs.prototype;let qn=r=>r!=+r;function hs(){return new ms}class ms extends be{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!qn(e)}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce)return e;let a=e;if(typeof a=="string"){if(a=a.replace(/\s/g,""),a==="")return NaN;a=+a}return s.isType(a)||a===null?a:parseFloat(a)})})}min(e,t=$e.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s>=this.resolve(e)}})}max(e,t=$e.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s<=this.resolve(e)}})}lessThan(e,t=$e.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(s){return s<this.resolve(e)}})}moreThan(e,t=$e.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(s){return s>this.resolve(e)}})}positive(e=$e.positive){return this.moreThan(0,e)}negative(e=$e.negative){return this.lessThan(0,e)}integer(e=$e.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:t=>Number.isInteger(t)})}truncate(){return this.transform(e=>Se(e)?e:e|0)}round(e){var t;let s=["ceil","floor","round","trunc"];if(e=((t=e)==null?void 0:t.toLowerCase())||"round",e==="trunc")return this.truncate();if(s.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+s.join(", "));return this.transform(a=>Se(a)?a:Math[e](a))}}hs.prototype=ms.prototype;let ps=new Date(""),Hn=r=>Object.prototype.toString.call(r)==="[object Date]";function Rt(){return new Ke}class Ke extends be{constructor(){super({type:"date",check(e){return Hn(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,t,s)=>!s.spec.coerce||s.isType(e)||e===null?e:(e=Vn(e),isNaN(e)?Ke.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let s;if(ze.isRef(e))s=e;else{let a=this.cast(e);if(!this._typeCheck(a))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=a}return s}min(e,t=It.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(a){return a>=this.resolve(s)}})}max(e,t=It.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(a){return a<=this.resolve(s)}})}}Ke.INVALID_DATE=ps,Rt.prototype=Ke.prototype,Rt.INVALID_DATE=ps;function Yn(r,e=[]){let t=[],s=new Set,a=new Set(e.map(([o,l])=>`${o}-${l}`));function n(o,l){let c=Ie.split(o)[0];s.add(c),a.has(`${l}-${c}`)||t.push([l,c])}for(const o of Object.keys(r)){let l=r[o];s.add(o),ze.isRef(l)&&l.isSibling?n(l.path,o):zt(l)&&"deps"in l&&l.deps.forEach(c=>n(c,o))}return En.array(Array.from(s),t).reverse()}function gs(r,e){let t=1/0;return r.some((s,a)=>{var n;if((n=e.path)!=null&&n.includes(s))return t=a,!0}),t}function xs(r){return(e,t)=>gs(r,e)-gs(r,t)}const Gn=(r,e,t)=>{if(typeof r!="string")return r;let s=r;try{s=JSON.parse(r)}catch{}return t.isType(s)?s:r};function gt(r){if("fields"in r){const e={};for(const[t,s]of Object.entries(r.fields))e[t]=gt(s);return r.setFields(e)}if(r.type==="array"){const e=r.optional();return e.innerType&&(e.innerType=gt(e.innerType)),e}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(gt)}):"optional"in r?r.optional():r}const Xn=(r,e)=>{const t=[...Ie.normalizePath(e)];if(t.length===1)return t[0]in r;let s=t.pop(),a=Ie.getter(Ie.join(t),!0)(r);return!!(a&&s in a)};let bs=r=>Object.prototype.toString.call(r)==="[object Object]";function vs(r,e){let t=Object.keys(r.fields);return Object.keys(e).filter(s=>t.indexOf(s)===-1)}const Jn=xs([]);function ys(r){return new ws(r)}class ws extends be{constructor(e){super({type:"object",check(t){return bs(t)||typeof t=="function"}}),this.fields=Object.create(null),this._sortErrors=Jn,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var s;let a=super._cast(e,t);if(a===void 0)return this.getDefault(t);if(!this._typeCheck(a))return a;let n=this.fields,o=(s=t.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter(m=>!this._nodes.includes(m))),c={},f=Object.assign({},t,{parent:c,__validating:t.__validating||!1}),u=!1;for(const m of l){let h=n[m],x=m in a;if(h){let E,j=a[m];f.path=(t.path?`${t.path}.`:"")+m,h=h.resolve({value:j,context:t.context,parent:c});let F=h instanceof be?h.spec:void 0,v=F==null?void 0:F.strict;if(F!=null&&F.strip){u=u||m in a;continue}E=!t.__validating||!v?h.cast(a[m],f):a[m],E!==void 0&&(c[m]=E)}else x&&!o&&(c[m]=a[m]);(x!==m in c||c[m]!==a[m])&&(u=!0)}return u?c:a}_validate(e,t={},s,a){let{from:n=[],originalValue:o=e,recursive:l=this.spec.recursive}=t;t.from=[{schema:this,value:o},...n],t.__validating=!0,t.originalValue=o,super._validate(e,t,s,(c,f)=>{if(!l||!bs(f)){a(c,f);return}o=o||f;let u=[];for(let m of this._nodes){let h=this.fields[m];!h||ze.isRef(h)||u.push(h.asNestedTest({options:t,key:m,parent:f,parentPath:t.path,originalParent:o}))}this.runTests({tests:u,value:f,originalValue:o,options:t},s,m=>{a(m.sort(this._sortErrors).concat(c),f)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[a,n]of Object.entries(this.fields)){const o=s[a];s[a]=o===void 0?n:o}return t.withMutation(a=>a.setFields(s,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(s=>{var a;const n=this.fields[s];let o=e;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[s]})),t[s]=n&&"getDefault"in n?n.getDefault(o):void 0}),t}setFields(e,t){let s=this.clone();return s.fields=e,s._nodes=Yn(e,t),s._sortErrors=xs(Object.keys(e)),t&&(s._excludedEdges=t),s}shape(e,t=[]){return this.clone().withMutation(s=>{let a=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),a=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),a)})}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return gt(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter(([s,a])=>e.includes(s)&&e.includes(a)))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(e,t,s){let a=Ie.getter(e,!0);return this.transform(n=>{if(!n)return n;let o=n;return Xn(n,e)&&(o=Object.assign({},n),s||delete o[e],o[t]=a(n)),o})}json(){return this.transform(Gn)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||ft.exact,test(t){if(t==null)return!0;const s=vs(this.schema,t);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=ft.noUnknown){typeof e!="boolean"&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(a){if(a==null)return!0;const n=vs(this.schema,a);return!e||n.length===0||this.createError({params:{unknown:n.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=ft.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const s={};for(const a of Object.keys(t))s[e(a)]=t[a];return s})}camelCase(){return this.transformKeys(Lt.camelCase)}snakeCase(){return this.transformKeys(Lt.snakeCase)}constantCase(){return this.transformKeys(e=>Lt.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[n,o]of Object.entries(t.fields)){var a;let l=e;(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[n]})),s.fields[n]=o.describe(l)}return s}}ys.prototype=ws.prototype;function Kn({fields:r,explicitSchema:e}){return b.useMemo(()=>{if(e)return es(e);const t={};r.forEach(a=>{var o,l,c,f,u,m,h;let n;switch(a.type){case"text":case"password":case"email":if(n=us(),(o=a.validation)!=null&&o.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}(l=a.validation)!=null&&l.minLength&&(n=n.min(a.validation.minLength.value,a.validation.minLength.message)),(c=a.validation)!=null&&c.maxLength&&(n=n.max(a.validation.maxLength.value,a.validation.maxLength.message)),(f=a.validation)!=null&&f.pattern&&(n=n.matches(a.validation.pattern.value,a.validation.pattern.message)),a.type==="email"&&(n=n.email("Email inválido"));break;case"number":if(n=hs(),(u=a.validation)!=null&&u.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;case"select":case"optionGroup":if(n=Pt(),(m=a.validation)!=null&&m.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;case"date":if(n=Rt(),(h=a.validation)!=null&&h.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;default:n=Pt()}t[a.name]=n});const s=ys().shape(t);return es(s)},[r,e])}function Qn(r){return b.useMemo(()=>{const e={};return r.forEach(t=>{e[t.name]=t}),e},[r])}function eo(r){const e=b.useMemo(()=>r.filter(o=>o.type==="select"&&o.loadOptions),[r]),[t,s]=b.useState(e.length),[a,n]=b.useState({});return b.useEffect(()=>{e.length!==0&&e.forEach(o=>{o.loadOptions().then(l=>n(c=>({...c,[o.name]:l}))).finally(()=>s(l=>Math.max(0,l-1)))})},[e]),{loadingCount:t,optionsMap:a}}function to(r,e){const t=b.useMemo(()=>r.filter(o=>o.disabledWhen),[r]),s=b.useMemo(()=>t.map(o=>o.disabledWhen.watchField),[t]),a=cr({control:e,name:s}),n={};return t.forEach(o=>{const l=s.indexOf(o.disabledWhen.watchField),c=a[l];n[o.name]=c===o.disabledWhen.watchValue}),n}const ks={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ro={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function Bt({control:r,name:e,rules:t,defaultValue:s,size:a="sm",width:n="100%",label:o,labelHidden:l=!1,hasError:c=!1,errorMessage:f="",maxLength:u,showCounter:m=!1,className:h,...x}){const E=b.useId(),j=e||E,[F,v]=b.useState(s||"");if(r&&e)return i.jsx(we,{name:e,control:r,rules:t,defaultValue:s||"",render:({field:S,fieldState:D})=>{var O;return i.jsx(Bt,{...x,size:a,width:n,label:o,labelHidden:l,hasError:!!D.error,errorMessage:((O=D.error)==null?void 0:O.message)||"",maxLength:u,showCounter:m,className:h,value:S.value,onChange:S.onChange})}});b.useEffect(()=>{v(s||"")},[s]);const g=S=>{var D;u!==void 0&&S.target.value.length>u||(v(S.target.value),(D=x.onChange)==null||D.call(x,S))};return i.jsxs("div",{className:$("flex flex-col",h),style:{width:n},children:[o&&i.jsx("label",{htmlFor:j,className:$("pb-2 text-[var(--color-ds-text-primary)]",ks[a],l&&"sr-only"),children:o}),i.jsx("textarea",{id:j,className:$("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",ks[a],ro[a],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",x.disabled?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-secondary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]"),value:F,onChange:g,maxLength:u,...x}),i.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&f?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:f}):i.jsx("span",{"aria-hidden":"true",children:" "}),m&&u!==void 0&&i.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[F.length,"/",u]})]})]})}const so={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function js({control:r,name:e,rules:t,defaultValue:s=!1,label:a,labelHidden:n=!1,disabled:o=!1,size:l="sm",className:c,hasError:f=!1,errorMessage:u=""}){return i.jsx("div",{className:$("flex flex-col",c),children:i.jsx(we,{name:e,control:r,rules:t,defaultValue:s,render:({field:m,fieldState:h})=>{const x=h.error;return i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:e,type:"checkbox",className:$(so[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",o&&"opacity-50 cursor-not-allowed"),checked:m.value,onChange:E=>m.onChange(E.target.checked),disabled:o}),i.jsx("span",{className:$("text-[var(--color-ds-text-primary)] text-ds-md",o&&"text-[var(--color-ds-text-secondary)]"),children:a}),f&&(x==null?void 0:x.message)&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:x.message})]})}})})}function Es({name:r,control:e,searchFn:t,label:s,size:a="sm",width:n="100%",disabled:o=!1}){const[l,c]=b.useState([]),[f,u]=b.useState(!1),[m,h]=b.useState(!1),x=b.useRef(null),E=async v=>{if(v){u(!0);try{const g=await t(v);c(g),h(!0)}finally{u(!1)}}};b.useEffect(()=>{function v(g){x.current&&!x.current.contains(g.target)&&h(!1)}if(m)return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[m]);const j=a==="sm"?"text-ds-sm":a==="md"?"text-ds-md":"text-ds-lg",F=a==="sm"?"h-6":a==="md"?"h-10":"h-12";return i.jsx(we,{name:r,control:e,render:({field:v,fieldState:g})=>{var S;return i.jsxs("div",{ref:x,className:"relative flex flex-col",style:{width:n},children:[s&&i.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${j}`,children:s}),i.jsx(lt,{className:"rounded-r-none",type:"text",size:a,width:"100%",value:v.value,onChange:D=>v.onChange(D.target.value),disabled:o,hasError:g.invalid,errorMessage:(S=g.error)==null?void 0:S.message,suffixButton:i.jsx(_e,{type:"button",className:"!rounded-l-none",size:a,variant:"primary",onClick:()=>E(v.value),disabled:o,children:"Buscar"})}),f&&i.jsx("div",{className:`
30
+ `+(l!==o?`result of cast: ${l}`:""))}return n}_cast(e,t){let s=e===void 0?e:this.transforms.reduce((a,n)=>n.call(this,a,e,this),e);return s===void 0&&(s=this.getDefault(t)),s}_validate(e,t={},s,a){let{path:n,originalValue:o=e,strict:l=this.spec.strict}=t,c=e;l||(c=this._cast(c,Object.assign({assert:!1},t)));let f=[];for(let u of Object.values(this.internalTests))u&&f.push(u);this.runTests({path:n,value:c,originalValue:o,options:t,tests:f},s,u=>{if(u.length)return a(u,c);this.runTests({path:n,value:c,originalValue:o,options:t,tests:this.tests},s,a)})}runTests(e,t,s){let a=!1,{tests:n,value:o,originalValue:l,path:c,options:f}=e,u=j=>{a||(a=!0,t(j,o))},m=j=>{a||(a=!0,s(j,o))},h=n.length,x=[];if(!h)return m([]);let E={value:o,originalValue:l,path:c,options:f,schema:this};for(let j=0;j<n.length;j++){const F=n[j];F(E,u,function(g){g&&(Array.isArray(g)?x.push(...g):x.push(g)),--h<=0&&m(x)})}}asNestedTest({key:e,index:t,parent:s,parentPath:a,originalParent:n,options:o}){const l=e??t;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let f=s[l];const u=Object.assign({},o,{strict:!0,parent:s,value:f,originalValue:n[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${a||""}[${c?l:`"${l}"`}]`:(a?`${a}.`:"")+e});return(m,h,x)=>this.resolve(u)._validate(f,u,h,x)}validate(e,t){var s;let a=this.resolve(Object.assign({},t,{value:e})),n=(s=t==null?void 0:t.disableStackTrace)!=null?s:a.spec.disableStackTrace;return new Promise((o,l)=>a._validate(e,t,(c,f)=>{pe.isError(c)&&(c.value=f),l(c)},(c,f)=>{c.length?l(new pe(c,f,void 0,void 0,n)):o(f)}))}validateSync(e,t){var s;let a=this.resolve(Object.assign({},t,{value:e})),n,o=(s=t==null?void 0:t.disableStackTrace)!=null?s:a.spec.disableStackTrace;return a._validate(e,Object.assign({},t,{sync:!0}),(l,c)=>{throw pe.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new pe(l,e,void 0,void 0,o);n=c}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,s=>{if(pe.isError(s))return!1;throw s})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(s){if(pe.isError(s))return!1;throw s}}_getDefault(e){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this,e):Re(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=Ue({message:t,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=Ue({message:t,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(e=Ne.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Ne.notNull){return this.nullability(!1,e)}required(e=Ne.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(e.length===1?typeof e[0]=="function"?t={test:e[0]}:t=e[0]:e.length===2?t={name:e[0],test:e[1]}:t={name:e[0],message:e[1],test:e[2]},t.message===void 0&&(t.message=Ne.default),typeof t.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),a=Ue(t),n=t.exclusive||t.name&&s.exclusiveTests[t.name]===!0;if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter(o=>!(o.OPTIONS.name===t.name&&(n||o.OPTIONS.test===a.OPTIONS.test))),s.tests.push(a),s}when(e,t){!Array.isArray(e)&&typeof e!="string"&&(t=e,e=".");let s=this.clone(),a=ns(e).map(n=>new ze(n));return a.forEach(n=>{n.isSibling&&s.deps.push(n.key)}),s.conditions.push(typeof t=="function"?new ht(a,t):ht.fromOptions(a,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=Ue({message:e,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=Ne.oneOf){let s=this.clone();return e.forEach(a=>{s._whitelist.add(a),s._blacklist.delete(a)}),s.internalTests.whiteList=Ue({message:t,name:"oneOf",skipAbsent:!0,test(a){let n=this.schema._whitelist,o=n.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(n).join(", "),resolved:o}})}}),s}notOneOf(e,t=Ne.notOneOf){let s=this.clone();return e.forEach(a=>{s._blacklist.add(a),s._whitelist.delete(a)}),s.internalTests.blacklist=Ue({message:t,name:"notOneOf",test(a){let n=this.schema._blacklist,o=n.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(n).join(", "),resolved:o}}):!0}}),s}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:a,optional:n,nullable:o}=t.spec;return{meta:a,label:s,optional:n,nullable:o,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,f,u)=>u.findIndex(m=>m.name===c.name)===f)}}}be.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])be.prototype[`${r}At`]=function(e,t,s={}){const{parent:a,parentPath:n,schema:o}=$n(this,e,t,s.context);return o[r](a&&a[n],Object.assign({},s,{parent:a,path:e}))};for(const r of["equals","is"])be.prototype[r]=be.prototype.oneOf;for(const r of["not","nope"])be.prototype[r]=be.prototype.notOneOf;const Dn=()=>!0;function Pt(r){return new ds(r)}class ds extends be{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Dn},e))}}Pt.prototype=ds.prototype;const Mn=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Vn(r){const e=Ut(r);if(!e)return Date.parse?Date.parse(r):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let t=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(t=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(t=0-t)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+t,e.second,e.millisecond)}function Ut(r){var e,t;const s=Mn.exec(r);return s?{year:Te(s[1]),month:Te(s[2],1)-1,day:Te(s[3],1),hour:Te(s[4]),minute:Te(s[5]),second:Te(s[6]),millisecond:s[7]?Te(s[7].substring(0,3)):0,precision:(e=(t=s[7])==null?void 0:t.length)!=null?e:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:Te(s[10]),minuteOffset:Te(s[11])}:null}function Te(r,e=0){return Number(r)||e}let Ln=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,In=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,zn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Pn="^\\d{4}-\\d{2}-\\d{2}",Un="\\d{2}:\\d{2}:\\d{2}",Rn="(([+-]\\d{2}(:?\\d{2})?)|Z)",Bn=new RegExp(`${Pn}T${Un}(\\.\\d+)?${Rn}$`),Zn=r=>Se(r)||r===r.trim(),Wn={}.toString();function us(){return new fs}class fs extends be{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce||s.isType(e)||Array.isArray(e))return e;const a=e!=null&&e.toString?e.toString():e;return a===Wn?e:a})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||Ne.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(t=>t.OPTIONS.name!=="required"),e))}length(e,t=ge.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(s){return s.length===this.resolve(e)}})}min(e,t=ge.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s.length>=this.resolve(e)}})}max(e,t=ge.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(s){return s.length<=this.resolve(e)}})}matches(e,t){let s=!1,a,n;return t&&(typeof t=="object"?{excludeEmptyString:s=!1,message:a,name:n}=t:a=t),this.test({name:n||"matches",message:a||ge.matches,params:{regex:e},skipAbsent:!0,test:o=>o===""&&s||o.search(e)!==-1})}email(e=ge.email){return this.matches(Ln,{name:"email",message:e,excludeEmptyString:!0})}url(e=ge.url){return this.matches(In,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ge.uuid){return this.matches(zn,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t="",s,a;return e&&(typeof e=="object"?{message:t="",allowOffset:s=!1,precision:a=void 0}=e:t=e),this.matches(Bn,{name:"datetime",message:t||ge.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:t||ge.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:n=>{if(!n||s)return!0;const o=Ut(n);return o?!!o.z:!1}}).test({name:"datetime_precision",message:t||ge.datetime_precision,params:{precision:a},skipAbsent:!0,test:n=>{if(!n||a==null)return!0;const o=Ut(n);return o?o.precision===a:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=ge.trim){return this.transform(t=>t!=null?t.trim():t).test({message:e,name:"trim",test:Zn})}lowercase(e=ge.lowercase){return this.transform(t=>Se(t)?t:t.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Se(t)||t===t.toLowerCase()})}uppercase(e=ge.uppercase){return this.transform(t=>Se(t)?t:t.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Se(t)||t===t.toUpperCase()})}}us.prototype=fs.prototype;let qn=r=>r!=+r;function hs(){return new ms}class ms extends be{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!qn(e)}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce)return e;let a=e;if(typeof a=="string"){if(a=a.replace(/\s/g,""),a==="")return NaN;a=+a}return s.isType(a)||a===null?a:parseFloat(a)})})}min(e,t=$e.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s>=this.resolve(e)}})}max(e,t=$e.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s<=this.resolve(e)}})}lessThan(e,t=$e.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(s){return s<this.resolve(e)}})}moreThan(e,t=$e.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(s){return s>this.resolve(e)}})}positive(e=$e.positive){return this.moreThan(0,e)}negative(e=$e.negative){return this.lessThan(0,e)}integer(e=$e.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:t=>Number.isInteger(t)})}truncate(){return this.transform(e=>Se(e)?e:e|0)}round(e){var t;let s=["ceil","floor","round","trunc"];if(e=((t=e)==null?void 0:t.toLowerCase())||"round",e==="trunc")return this.truncate();if(s.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+s.join(", "));return this.transform(a=>Se(a)?a:Math[e](a))}}hs.prototype=ms.prototype;let ps=new Date(""),Hn=r=>Object.prototype.toString.call(r)==="[object Date]";function Rt(){return new Ke}class Ke extends be{constructor(){super({type:"date",check(e){return Hn(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,t,s)=>!s.spec.coerce||s.isType(e)||e===null?e:(e=Vn(e),isNaN(e)?Ke.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let s;if(ze.isRef(e))s=e;else{let a=this.cast(e);if(!this._typeCheck(a))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=a}return s}min(e,t=It.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(a){return a>=this.resolve(s)}})}max(e,t=It.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(a){return a<=this.resolve(s)}})}}Ke.INVALID_DATE=ps,Rt.prototype=Ke.prototype,Rt.INVALID_DATE=ps;function Yn(r,e=[]){let t=[],s=new Set,a=new Set(e.map(([o,l])=>`${o}-${l}`));function n(o,l){let c=Ie.split(o)[0];s.add(c),a.has(`${l}-${c}`)||t.push([l,c])}for(const o of Object.keys(r)){let l=r[o];s.add(o),ze.isRef(l)&&l.isSibling?n(l.path,o):zt(l)&&"deps"in l&&l.deps.forEach(c=>n(c,o))}return En.array(Array.from(s),t).reverse()}function gs(r,e){let t=1/0;return r.some((s,a)=>{var n;if((n=e.path)!=null&&n.includes(s))return t=a,!0}),t}function xs(r){return(e,t)=>gs(r,e)-gs(r,t)}const Gn=(r,e,t)=>{if(typeof r!="string")return r;let s=r;try{s=JSON.parse(r)}catch{}return t.isType(s)?s:r};function gt(r){if("fields"in r){const e={};for(const[t,s]of Object.entries(r.fields))e[t]=gt(s);return r.setFields(e)}if(r.type==="array"){const e=r.optional();return e.innerType&&(e.innerType=gt(e.innerType)),e}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(gt)}):"optional"in r?r.optional():r}const Xn=(r,e)=>{const t=[...Ie.normalizePath(e)];if(t.length===1)return t[0]in r;let s=t.pop(),a=Ie.getter(Ie.join(t),!0)(r);return!!(a&&s in a)};let bs=r=>Object.prototype.toString.call(r)==="[object Object]";function vs(r,e){let t=Object.keys(r.fields);return Object.keys(e).filter(s=>t.indexOf(s)===-1)}const Jn=xs([]);function ys(r){return new ws(r)}class ws extends be{constructor(e){super({type:"object",check(t){return bs(t)||typeof t=="function"}}),this.fields=Object.create(null),this._sortErrors=Jn,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var s;let a=super._cast(e,t);if(a===void 0)return this.getDefault(t);if(!this._typeCheck(a))return a;let n=this.fields,o=(s=t.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(a).filter(m=>!this._nodes.includes(m))),c={},f=Object.assign({},t,{parent:c,__validating:t.__validating||!1}),u=!1;for(const m of l){let h=n[m],x=m in a;if(h){let E,j=a[m];f.path=(t.path?`${t.path}.`:"")+m,h=h.resolve({value:j,context:t.context,parent:c});let F=h instanceof be?h.spec:void 0,v=F==null?void 0:F.strict;if(F!=null&&F.strip){u=u||m in a;continue}E=!t.__validating||!v?h.cast(a[m],f):a[m],E!==void 0&&(c[m]=E)}else x&&!o&&(c[m]=a[m]);(x!==m in c||c[m]!==a[m])&&(u=!0)}return u?c:a}_validate(e,t={},s,a){let{from:n=[],originalValue:o=e,recursive:l=this.spec.recursive}=t;t.from=[{schema:this,value:o},...n],t.__validating=!0,t.originalValue=o,super._validate(e,t,s,(c,f)=>{if(!l||!bs(f)){a(c,f);return}o=o||f;let u=[];for(let m of this._nodes){let h=this.fields[m];!h||ze.isRef(h)||u.push(h.asNestedTest({options:t,key:m,parent:f,parentPath:t.path,originalParent:o}))}this.runTests({tests:u,value:f,originalValue:o,options:t},s,m=>{a(m.sort(this._sortErrors).concat(c),f)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[a,n]of Object.entries(this.fields)){const o=s[a];s[a]=o===void 0?n:o}return t.withMutation(a=>a.setFields(s,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(s=>{var a;const n=this.fields[s];let o=e;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[s]})),t[s]=n&&"getDefault"in n?n.getDefault(o):void 0}),t}setFields(e,t){let s=this.clone();return s.fields=e,s._nodes=Yn(e,t),s._sortErrors=xs(Object.keys(e)),t&&(s._excludedEdges=t),s}shape(e,t=[]){return this.clone().withMutation(s=>{let a=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),a=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),a)})}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return gt(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter(([s,a])=>e.includes(s)&&e.includes(a)))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(e,t,s){let a=Ie.getter(e,!0);return this.transform(n=>{if(!n)return n;let o=n;return Xn(n,e)&&(o=Object.assign({},n),s||delete o[e],o[t]=a(n)),o})}json(){return this.transform(Gn)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||ft.exact,test(t){if(t==null)return!0;const s=vs(this.schema,t);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=ft.noUnknown){typeof e!="boolean"&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(a){if(a==null)return!0;const n=vs(this.schema,a);return!e||n.length===0||this.createError({params:{unknown:n.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=ft.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const s={};for(const a of Object.keys(t))s[e(a)]=t[a];return s})}camelCase(){return this.transformKeys(Lt.camelCase)}snakeCase(){return this.transformKeys(Lt.snakeCase)}constantCase(){return this.transformKeys(e=>Lt.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[n,o]of Object.entries(t.fields)){var a;let l=e;(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[n]})),s.fields[n]=o.describe(l)}return s}}ys.prototype=ws.prototype;function Kn({fields:r,explicitSchema:e}){return b.useMemo(()=>{if(e)return es(e);const t={};r.forEach(a=>{var o,l,c,f,u,m,h;let n;switch(a.type){case"text":case"password":case"email":if(n=us(),(o=a.validation)!=null&&o.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}(l=a.validation)!=null&&l.minLength&&(n=n.min(a.validation.minLength.value,a.validation.minLength.message)),(c=a.validation)!=null&&c.maxLength&&(n=n.max(a.validation.maxLength.value,a.validation.maxLength.message)),(f=a.validation)!=null&&f.pattern&&(n=n.matches(a.validation.pattern.value,a.validation.pattern.message)),a.type==="email"&&(n=n.email("Email inválido"));break;case"number":if(n=hs(),(u=a.validation)!=null&&u.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;case"select":case"optionGroup":if(n=Pt(),(m=a.validation)!=null&&m.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;case"date":if(n=Rt(),(h=a.validation)!=null&&h.required){const x=typeof a.validation.required=="string"?a.validation.required:"Campo obligatorio";n=n.required(x)}break;default:n=Pt()}t[a.name]=n});const s=ys().shape(t);return es(s)},[r,e])}function Qn(r){return b.useMemo(()=>{const e={};return r.forEach(t=>{e[t.name]=t}),e},[r])}function eo(r){const e=b.useMemo(()=>r.filter(o=>o.type==="select"&&o.loadOptions),[r]),[t,s]=b.useState(e.length),[a,n]=b.useState({});return b.useEffect(()=>{e.length!==0&&e.forEach(o=>{o.loadOptions().then(l=>n(c=>({...c,[o.name]:l}))).finally(()=>s(l=>Math.max(0,l-1)))})},[e]),{loadingCount:t,optionsMap:a}}function to(r,e){const t=b.useMemo(()=>r.filter(o=>o.disabledWhen),[r]),s=b.useMemo(()=>t.map(o=>o.disabledWhen.watchField),[t]),a=cr({control:e,name:s}),n={};return t.forEach(o=>{const l=s.indexOf(o.disabledWhen.watchField),c=a[l];n[o.name]=c===o.disabledWhen.watchValue}),n}const ks={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ro={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function Bt({control:r,name:e,rules:t,defaultValue:s,size:a="sm",width:n="100%",label:o,labelHidden:l=!1,hasError:c=!1,errorMessage:f="",maxLength:u,showCounter:m=!1,className:h,...x}){const E=b.useId(),j=e||E,[F,v]=b.useState(s||"");if(r&&e)return i.jsx(we,{name:e,control:r,rules:t,defaultValue:s||"",render:({field:S,fieldState:M})=>{var O;return i.jsx(Bt,{...x,size:a,width:n,label:o,labelHidden:l,hasError:!!M.error,errorMessage:((O=M.error)==null?void 0:O.message)||"",maxLength:u,showCounter:m,className:h,value:S.value,onChange:S.onChange})}});b.useEffect(()=>{v(s||"")},[s]);const g=S=>{var M;u!==void 0&&S.target.value.length>u||(v(S.target.value),(M=x.onChange)==null||M.call(x,S))};return i.jsxs("div",{className:$("flex flex-col",h),style:{width:n},children:[o&&i.jsx("label",{htmlFor:j,className:$("pb-2 text-[var(--color-ds-text-primary)]",ks[a],l&&"sr-only"),children:o}),i.jsx("textarea",{id:j,className:$("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",ks[a],ro[a],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",x.disabled?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-secondary)] cursor-not-allowed":"text-[var(--color-ds-text-primary)]"),value:F,onChange:g,maxLength:u,...x}),i.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&f?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:f}):i.jsx("span",{"aria-hidden":"true",children:" "}),m&&u!==void 0&&i.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[F.length,"/",u]})]})]})}const so={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function js({control:r,name:e,rules:t,defaultValue:s=!1,label:a,labelHidden:n=!1,disabled:o=!1,size:l="sm",className:c,hasError:f=!1,errorMessage:u=""}){return i.jsx("div",{className:$("flex flex-col",c),children:i.jsx(we,{name:e,control:r,rules:t,defaultValue:s,render:({field:m,fieldState:h})=>{const x=h.error;return i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:e,type:"checkbox",className:$(so[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",o&&"opacity-50 cursor-not-allowed"),checked:m.value,onChange:E=>m.onChange(E.target.checked),disabled:o}),i.jsx("span",{className:$("text-[var(--color-ds-text-primary)] text-ds-md",o&&"text-[var(--color-ds-text-secondary)]"),children:a}),f&&(x==null?void 0:x.message)&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:x.message})]})}})})}function Es({name:r,control:e,searchFn:t,label:s,size:a="sm",width:n="100%",disabled:o=!1}){const[l,c]=b.useState([]),[f,u]=b.useState(!1),[m,h]=b.useState(!1),x=b.useRef(null),E=async v=>{if(v){u(!0);try{const g=await t(v);c(g),h(!0)}finally{u(!1)}}};b.useEffect(()=>{function v(g){x.current&&!x.current.contains(g.target)&&h(!1)}if(m)return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[m]);const j=a==="sm"?"text-ds-sm":a==="md"?"text-ds-md":"text-ds-lg",F=a==="sm"?"h-6":a==="md"?"h-10":"h-12";return i.jsx(we,{name:r,control:e,render:({field:v,fieldState:g})=>{var S;return i.jsxs("div",{ref:x,className:"relative flex flex-col",style:{width:n},children:[s&&i.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${j}`,children:s}),i.jsx(lt,{className:"rounded-r-none",type:"text",size:a,width:"100%",value:v.value,onChange:M=>v.onChange(M.target.value),disabled:o,hasError:g.invalid,errorMessage:(S=g.error)==null?void 0:S.message,suffixButton:i.jsx(_e,{type:"button",className:"!rounded-l-none",size:a,variant:"primary",onClick:()=>E(v.value),disabled:o,children:"Buscar"})}),f&&i.jsx("div",{className:`
31
31
  absolute
32
32
  top-14
33
33
  left-0
@@ -47,7 +47,7 @@ attempted value: ${o}
47
47
  max-h-48
48
48
  overflow-auto
49
49
  z-10
50
- `,children:l.map(D=>i.jsx("li",{className:`
50
+ `,children:l.map(M=>i.jsx("li",{className:`
51
51
  px-2
52
52
  ${F}
53
53
  flex items-center
@@ -55,7 +55,7 @@ attempted value: ${o}
55
55
  text-[var(--color-ds-text-primary)]
56
56
  hover:bg-[var(--color-ds-background-surface)]
57
57
 
58
- `,onClick:()=>{v.onChange(D.value),h(!1)},children:D.label},D.value))})]})}})}function ao({schema:r}){const{layout:e,fields:t,onSubmit:s,successMessage:a,errorMessage:n,footerButtons:o,defaultValues:l,loadDefaultValues:c,validationSchema:f}=r,{show:u}=Xr(),{t:m}=Ct(),h=Kn({fields:t,explicitSchema:f}),x=La({resolver:h,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),{control:E,reset:j,watch:F,handleSubmit:v,formState:{errors:g,isSubmitting:S}}=x,[D,O]=b.useState(!1);b.useEffect(()=>{c&&(O(!0),c().then(M=>j(M)).finally(()=>O(!1)))},[c,j]);const{loadingCount:B,optionsMap:X}=eo(t),U=Qn(t),q=to(t,E),Z=b.useMemo(()=>{const M={};return e.forEach((w,W)=>{w.type==="tabs"&&(M[W]=w.tabs[0].key)}),M},[e]),[I,z]=b.useState(Z),N=b.useCallback(M=>{const w=F(),{watchField:W,watchValue:re}=M;return typeof re=="function"?re(w):w[W]===re},[F]),L=b.useCallback(M=>{var R,J,ee,ne;let w;if(typeof M=="string"){if(w=U[M],!w)return null}else w=M;if("visibleWhen"in w&&w.visibleWhen&&!N(w.visibleWhen))return null;let W=!!w.disabled;if("disabledWhen"in w&&w.disabledWhen&&N(w.disabledWhen)&&(W=!0),!W&&"name"in w&&w.name&&q[w.name]&&(W=!0),w.type==="search")return i.jsx(Es,{name:w.name,control:E,searchFn:w.searchFn,label:w.label,size:w.size,width:w.width,disabled:W||S},w.name);if(w.type==="inputGroup"){const H=w,le=H.inputs.map(ce=>{var Be;const Y=typeof ce=="string"?U[ce]:ce;if(!Y)return null;let fe=!!Y.disabled;Y.disabledWhen&&N(Y.disabledWhen)&&(fe=!0),!fe&&q[Y.name]&&(fe=!0);const Ce={name:Y.name,control:E,rules:Y.validation,defaultValue:void 0,label:Y.label,size:Y.size,width:Y.width,placeholder:Y.placeholder,hasError:!!g[Y.name],errorMessage:((Be=g[Y.name])==null?void 0:Be.message)||"",loading:D,disabled:fe,suffixButton:Y.suffixButton};return Y.type==="select"?{...Ce,options:Y.options??X[Y.name]??[],loadOptions:Y.options?void 0:Y.loadOptions}:Ce}).filter(ce=>ce!==null);return i.jsx(Zr,{groupLabel:H.groupLabel,inputs:le,separator:H.separator,useSeparator:H.useSeparator,className:H.className,showVisibleLabel:H.showVisibleLabel,size:H.size},`inputGroup_${H.groupLabel}`)}if(w.type==="button"){const H=w;return i.jsx("div",{className:"self-center",children:i.jsx(_e,{type:"button",variant:H.variant,size:H.size,width:H.width,icon:H.icon,iconPosition:H.iconPosition,ariaLabel:H.ariaLabel,onClick:H.onClick,disabled:W||S,children:H.label})},H.name)}const re=w.suffixButton,ie=typeof re=="string"?L(re):re,k={name:w.name,control:E,disabled:W||S,label:w.label,size:w.size,width:w.width,placeholder:w.placeholder,info:w.info,suffixButton:ie};switch(w.type){case"select":return i.jsx(we,{name:w.name,control:E,render:({field:H})=>{var le;return i.jsx(Je,{...k,value:H.value,onChange:H.onChange,options:w.options??X[w.name]??[],loadOptions:w.options?void 0:w.loadOptions,hasError:!!g[w.name],errorMessage:(le=g[w.name])==null?void 0:le.message,suffixButton:ie})}},w.name);case"textarea":return i.jsx(we,{name:w.name,control:E,render:({field:H,fieldState:le})=>{var ce;return i.jsx(Bt,{...k,value:H.value,onChange:H.onChange,maxLength:w.maxLength,showCounter:!!w.showCounter,hasError:!!le.error,errorMessage:((ce=le.error)==null?void 0:ce.message)||""})}},w.name);case"file":return i.jsx(Lr,{...k,defaultValue:[],maxFiles:w.maxFiles,accept:w.accept,hasError:!!g[w.name],errorMessage:(R=g[w.name])==null?void 0:R.message},w.name);case"checkbox":return i.jsx(js,{...k,defaultValue:!1,hasError:!!g[w.name],errorMessage:(J=g[w.name])==null?void 0:J.message,name:w.name},w.name);case"date":return i.jsx(Or,{...k,defaultValue:"",showTime:!!w.showTime,hasError:!!g[w.name],errorMessage:(ee=g[w.name])==null?void 0:ee.message},w.name);case"optionGroup":return i.jsx(qr,{...k,options:w.options||[],multiple:w.multiple,vertical:w.vertical,groupLabel:w.groupLabel,defaultValue:w.defaultValue,className:w.width?void 0:"w-full",name:w.name},w.name);default:return i.jsx($t,{...k,type:w.type,loadingDefaults:D,hasError:!!g[w.name],errorMessage:(ne=g[w.name])==null?void 0:ne.message,suffixButton:ie,name:w.name},w.name)}},[U,E,g,S,D,X,N,q]);return i.jsx(ka,{...x,children:i.jsxs("form",{noValidate:!0,onSubmit:v(async M=>{await s(M),u(a??m("ds.form.saveSuccess"),"success")},M=>{un(M),u(n??m("ds.form.saveError"),"error")}),className:"space-y-6",children:[e.map((M,w)=>M.type==="rows"?i.jsx(b.Fragment,{children:M.sections.map((W,re)=>i.jsx("div",{className:"mb-6",children:i.jsx(yt,{title:W.sectionTitle,defaultOpen:W.defaultOpen,children:W.rows.map((ie,k)=>i.jsxs("div",{children:[ie.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:ie.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:ie.columns.map((R,J)=>{var ee;return i.jsx("div",{className:`${R.width} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:R.fields?R.fields.map(ne=>L(ne)):(ee=R.rows)==null?void 0:ee.map((ne,H)=>i.jsx("div",{className:"mb-1",children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:ne.columns.map((le,ce)=>{var Y;return i.jsx("div",{className:`${le.width} px-2`,children:(Y=le.fields)==null?void 0:Y.map(fe=>L(fe))},ce)})})},H))})},J)})})]},k))})},re))},w):i.jsx(Pr,{options:M.tabs.map(W=>({label:W.label,value:W.key})),value:I[w],onChange:W=>z(re=>({...re,[w]:W})),children:Object.fromEntries(M.tabs.map(W=>[W.key,i.jsx("div",{className:"space-y-6",children:W.sections.map((re,ie)=>i.jsx("div",{className:"mb-6",children:i.jsx(yt,{title:re.sectionTitle,defaultOpen:re.defaultOpen,children:re.rows.map((k,R)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:k.columns.map((J,ee)=>{var ne;return i.jsx("div",{className:`${J.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(ne=J.fields)==null?void 0:ne.map((H,le)=>i.jsx(b.Fragment,{children:L(H)},le))})},ee)})})},R))})},ie))},W.key)]))},w)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:o??i.jsx(_e,{type:"submit",variant:"primary",icon:Gs,size:"sm",disabled:S||D||B>0,children:m(S?"ds.form.sending":"ds.form.submit")})})]})})}const no={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function xt({icon:r,size:e="md",ariaLabel:t,disabled:s=!1,onClick:a,...n}){return i.jsx("button",{type:"button","aria-label":t,disabled:s,onClick:a,className:$("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",no[e],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...n,children:i.jsx(r,{className:$(e==="sm"?"h-4 w-4":e==="md"?"h-5 w-5":"h-6 w-6")})})}function Ns({dark:r,onToggle:e}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:e,className:$("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:i.jsxs("div",{className:$("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[i.jsx(je,{component:ga,size:"sm",className:$("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(je,{component:fa,size:"sm",className:$("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const _s=b.createContext({theme:"light",toggle:()=>{}});function oo({children:r}){const[e,t]=b.useState(!1),[s,a]=b.useState("light");b.useEffect(()=>{if(typeof window>"u")return;const o=localStorage.getItem("ds-theme");o==="light"||o==="dark"?a(o):window.matchMedia("(prefers-color-scheme: dark)").matches&&a("dark"),t(!0)},[]),b.useEffect(()=>{e&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,e]);const n=()=>a(o=>o==="light"?"dark":"light");return e?i.jsx(_s.Provider,{value:{theme:s,toggle:n},children:r}):null}const Fs=()=>b.useContext(_s),Ss=({pinnedPages:r,onRemovePinned:e,onBack:t,dark:s,locale:a,languageOptions:n,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:f})=>{const u=r.slice(0,3),{toggle:m}=Fs(),{t:h,i18n:x}=Ct(),E=j=>{x.changeLanguage(j),o(j)};return i.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(xt,{icon:ma,size:"sm",ariaLabel:h("back"),onClick:t}),i.jsx(xt,{icon:ba,size:"sm",ariaLabel:h("clearPins"),onClick:()=>r.forEach(j=>e(j.id))}),u.map(j=>i.jsxs("div",{className:"flex items-center",children:[i.jsx("a",{href:j.href,className:$("inline-flex items-center rounded-lg","py-1 px-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:j.label}),i.jsx(xt,{icon:vt,size:"sm",ariaLabel:`${h("remove")} ${j.label}`,onClick:()=>e(j.id)})]},j.id))]}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Je,{size:"sm",width:"auto",options:n,value:a,onChange:E,disableErrorPlaceholder:!0}),i.jsx(Je,{size:"sm",width:"auto",options:c,value:l,onChange:f,disableErrorPlaceholder:!0}),i.jsx(Ns,{dark:s,onToggle:m})]})]})},io=({loading:r=!1,ariaLabel:e="Cargando..."})=>r?i.jsxs("div",{className:`\r
58
+ `,onClick:()=>{v.onChange(M.value),h(!1)},children:M.label},M.value))})]})}})}function ao({schema:r}){const{layout:e,fields:t,onSubmit:s,successMessage:a,errorMessage:n,footerButtons:o,defaultValues:l,loadDefaultValues:c,validationSchema:f}=r,{show:u}=Xr(),{t:m}=Ct(),h=Kn({fields:t,explicitSchema:f}),x=La({resolver:h,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),{control:E,reset:j,watch:F,handleSubmit:v,formState:{errors:g,isSubmitting:S}}=x,[M,O]=b.useState(!1);b.useEffect(()=>{c&&(O(!0),c().then(D=>j(D)).finally(()=>O(!1)))},[c,j]);const{loadingCount:B,optionsMap:X}=eo(t),U=Qn(t),q=to(t,E),Z=b.useMemo(()=>{const D={};return e.forEach((w,W)=>{w.type==="tabs"&&(D[W]=w.tabs[0].key)}),D},[e]),[I,z]=b.useState(Z),N=b.useCallback(D=>{const w=F(),{watchField:W,watchValue:re}=D;return typeof re=="function"?re(w):w[W]===re},[F]),L=b.useCallback(D=>{var R,J,ee,ne;let w;if(typeof D=="string"){if(w=U[D],!w)return null}else w=D;if("visibleWhen"in w&&w.visibleWhen&&!N(w.visibleWhen))return null;let W=!!w.disabled;if("disabledWhen"in w&&w.disabledWhen&&N(w.disabledWhen)&&(W=!0),!W&&"name"in w&&w.name&&q[w.name]&&(W=!0),w.type==="search")return i.jsx(Es,{name:w.name,control:E,searchFn:w.searchFn,label:w.label,size:w.size,width:w.width,disabled:W||S},w.name);if(w.type==="inputGroup"){const H=w,le=H.inputs.map(ce=>{var Be;const Y=typeof ce=="string"?U[ce]:ce;if(!Y)return null;let fe=!!Y.disabled;Y.disabledWhen&&N(Y.disabledWhen)&&(fe=!0),!fe&&q[Y.name]&&(fe=!0);const Ce={name:Y.name,control:E,rules:Y.validation,defaultValue:void 0,label:Y.label,size:Y.size,width:Y.width,placeholder:Y.placeholder,hasError:!!g[Y.name],errorMessage:((Be=g[Y.name])==null?void 0:Be.message)||"",loading:M,disabled:fe,suffixButton:Y.suffixButton};return Y.type==="select"?{...Ce,options:Y.options??X[Y.name]??[],loadOptions:Y.options?void 0:Y.loadOptions}:Ce}).filter(ce=>ce!==null);return i.jsx(Zr,{groupLabel:H.groupLabel,inputs:le,separator:H.separator,useSeparator:H.useSeparator,className:H.className,showVisibleLabel:H.showVisibleLabel,size:H.size},`inputGroup_${H.groupLabel}`)}if(w.type==="button"){const H=w;return i.jsx("div",{className:"self-center",children:i.jsx(_e,{type:"button",variant:H.variant,size:H.size,width:H.width,icon:H.icon,iconPosition:H.iconPosition,ariaLabel:H.ariaLabel,onClick:H.onClick,disabled:W||S,children:H.label})},H.name)}const re=w.suffixButton,ie=typeof re=="string"?L(re):re,k={name:w.name,control:E,disabled:W||S,label:w.label,size:w.size,width:w.width,placeholder:w.placeholder,info:w.info,suffixButton:ie};switch(w.type){case"select":return i.jsx(we,{name:w.name,control:E,render:({field:H})=>{var le;return i.jsx(Je,{...k,value:H.value,onChange:H.onChange,options:w.options??X[w.name]??[],loadOptions:w.options?void 0:w.loadOptions,hasError:!!g[w.name],errorMessage:(le=g[w.name])==null?void 0:le.message,suffixButton:ie})}},w.name);case"textarea":return i.jsx(we,{name:w.name,control:E,render:({field:H,fieldState:le})=>{var ce;return i.jsx(Bt,{...k,value:H.value,onChange:H.onChange,maxLength:w.maxLength,showCounter:!!w.showCounter,hasError:!!le.error,errorMessage:((ce=le.error)==null?void 0:ce.message)||""})}},w.name);case"file":return i.jsx(Lr,{...k,defaultValue:[],maxFiles:w.maxFiles,accept:w.accept,hasError:!!g[w.name],errorMessage:(R=g[w.name])==null?void 0:R.message},w.name);case"checkbox":return i.jsx(js,{...k,defaultValue:!1,hasError:!!g[w.name],errorMessage:(J=g[w.name])==null?void 0:J.message,name:w.name},w.name);case"date":return i.jsx(Or,{...k,defaultValue:"",showTime:!!w.showTime,hasError:!!g[w.name],errorMessage:(ee=g[w.name])==null?void 0:ee.message},w.name);case"optionGroup":return i.jsx(qr,{...k,options:w.options||[],multiple:w.multiple,vertical:w.vertical,groupLabel:w.groupLabel,defaultValue:w.defaultValue,className:w.width?void 0:"w-full",name:w.name},w.name);default:return i.jsx($t,{...k,type:w.type,loadingDefaults:M,hasError:!!g[w.name],errorMessage:(ne=g[w.name])==null?void 0:ne.message,suffixButton:ie,name:w.name},w.name)}},[U,E,g,S,M,X,N,q]);return i.jsx(ka,{...x,children:i.jsxs("form",{noValidate:!0,onSubmit:v(async D=>{await s(D),u(a??m("ds.form.saveSuccess"),"success")},D=>{console.log("❌ errores de validación:",D),un(D),u(n??m("ds.form.saveError"),"error")}),className:"space-y-6",children:[e.map((D,w)=>D.type==="rows"?i.jsx(b.Fragment,{children:D.sections.map((W,re)=>i.jsx("div",{className:"mb-6",children:i.jsx(yt,{title:W.sectionTitle,defaultOpen:W.defaultOpen,children:W.rows.map((ie,k)=>i.jsxs("div",{children:[ie.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:ie.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:ie.columns.map((R,J)=>{var ee;return i.jsx("div",{className:`${R.width} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:R.fields?R.fields.map(ne=>L(ne)):(ee=R.rows)==null?void 0:ee.map((ne,H)=>i.jsx("div",{className:"mb-1",children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:ne.columns.map((le,ce)=>{var Y;return i.jsx("div",{className:`${le.width} px-2`,children:(Y=le.fields)==null?void 0:Y.map(fe=>L(fe))},ce)})})},H))})},J)})})]},k))})},re))},w):i.jsx(Pr,{options:D.tabs.map(W=>({label:W.label,value:W.key})),value:I[w],onChange:W=>z(re=>({...re,[w]:W})),children:Object.fromEntries(D.tabs.map(W=>[W.key,i.jsx("div",{className:"space-y-6",children:W.sections.map((re,ie)=>i.jsx("div",{className:"mb-6",children:i.jsx(yt,{title:re.sectionTitle,defaultOpen:re.defaultOpen,children:re.rows.map((k,R)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:k.columns.map((J,ee)=>{var ne;return i.jsx("div",{className:`${J.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(ne=J.fields)==null?void 0:ne.map((H,le)=>i.jsx(b.Fragment,{children:L(H)},le))})},ee)})})},R))})},ie))},W.key)]))},w)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:o??i.jsx(_e,{type:"submit",variant:"primary",icon:Gs,size:"sm",disabled:S||M||B>0,children:m(S?"ds.form.sending":"ds.form.submit")})})]})})}const no={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function xt({icon:r,size:e="md",ariaLabel:t,disabled:s=!1,onClick:a,...n}){return i.jsx("button",{type:"button","aria-label":t,disabled:s,onClick:a,className:$("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",no[e],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...n,children:i.jsx(r,{className:$(e==="sm"?"h-4 w-4":e==="md"?"h-5 w-5":"h-6 w-6")})})}function Ns({dark:r,onToggle:e}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:e,className:$("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:i.jsxs("div",{className:$("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[i.jsx(je,{component:ga,size:"sm",className:$("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(je,{component:fa,size:"sm",className:$("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const _s=b.createContext({theme:"light",toggle:()=>{}});function oo({children:r}){const[e,t]=b.useState(!1),[s,a]=b.useState("light");b.useEffect(()=>{if(typeof window>"u")return;const o=localStorage.getItem("ds-theme");o==="light"||o==="dark"?a(o):window.matchMedia("(prefers-color-scheme: dark)").matches&&a("dark"),t(!0)},[]),b.useEffect(()=>{e&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,e]);const n=()=>a(o=>o==="light"?"dark":"light");return e?i.jsx(_s.Provider,{value:{theme:s,toggle:n},children:r}):null}const Fs=()=>b.useContext(_s),Ss=({pinnedPages:r,onRemovePinned:e,onBack:t,dark:s,locale:a,languageOptions:n,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:f})=>{const u=r.slice(0,3),{toggle:m}=Fs(),{t:h,i18n:x}=Ct(),E=j=>{x.changeLanguage(j),o(j)};return i.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(xt,{icon:ma,size:"sm",ariaLabel:h("back"),onClick:t}),i.jsx(xt,{icon:ba,size:"sm",ariaLabel:h("clearPins"),onClick:()=>r.forEach(j=>e(j.id))}),u.map(j=>i.jsxs("div",{className:"flex items-center",children:[i.jsx("a",{href:j.href,className:$("inline-flex items-center rounded-lg","py-1 px-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:j.label}),i.jsx(xt,{icon:vt,size:"sm",ariaLabel:`${h("remove")} ${j.label}`,onClick:()=>e(j.id)})]},j.id))]}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Je,{size:"sm",width:"auto",options:n,value:a,onChange:E,disableErrorPlaceholder:!0}),i.jsx(Je,{size:"sm",width:"auto",options:c,value:l,onChange:f,disableErrorPlaceholder:!0}),i.jsx(Ns,{dark:s,onToggle:m})]})]})},io=({loading:r=!1,ariaLabel:e="Cargando..."})=>r?i.jsxs("div",{className:`\r
59
59
  fixed inset-0\r
60
60
  flex items-center justify-center\r
61
61
  bg-[var(--color-ds-background-surface)]/90\r
@@ -80,4 +80,4 @@ attempted value: ${o}
80
80
  dark:bg-[var(--color-ds-background-surface)]\r
81
81
  hover:bg-[var(--color-ds-background-accent)]/10\r
82
82
  focus:outline-none\r
83
- `,children:[i.jsx(vt,{className:"w-5 h-5 text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]"}),i.jsx("span",{className:"sr-only",children:"Cerrar modal"})]})]}),i.jsx("div",{className:"px-6 py-6 text-[var(--color-ds-text-primary)]",children:s}),a&&i.jsx("div",{className:"px-6 py-4 border-t border-[var(--color-ds-border-muted)] bg-[var(--color-ds-background-surface)]",children:a})]})})]}),document.body):null),Zt=({items:r,selected:e,onSelect:t,level:s=0})=>{const[a,n]=b.useState(new Set),o=l=>{const c=new Set(a);s===0?(c.clear(),a.has(l)||c.add(l)):c.has(l)?c.delete(l):c.add(l),n(c),t(l)};return i.jsx("ul",{className:$(s>0?"mt-1":"mt-0"),children:r.map(l=>{const c=l.value===e,f=a.has(l.value),u=["pl-2","pl-2","pl-2"][s]||"pl-4",m=s===0?f||c?"bg-[var(--color-ds-background-accent)] text-[var(--color-ds-text-on-accent)] rounded-r-lg":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]":c?"bg-[var(--color-ds-background-surface)] text-[var(--color-ds-text-primary)]":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]",h=s===0&&(f||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]";return i.jsxs("li",{children:[i.jsxs("button",{onClick:()=>l.children?o(l.value):t(l.value),className:$("w-full flex items-center justify-between h-8 transition-colors",u,m),children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[s===0&&l.icon&&i.jsx(l.icon,{className:"w-5 h-5 ml-2"}),i.jsx("span",{className:"text-ds-sm",children:l.label})]}),l.children&&(f?i.jsx(Qt,{className:$("w-4 h-4 ",h)}):i.jsx(Ks,{className:$("w-4 h-4",h)}))]}),l.children&&i.jsx("div",{className:$("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",f?"max-h-screen":"max-h-0"),children:i.jsx(Zt,{items:l.children,selected:e,onSelect:t,level:s+1})})]},l.value)})})},co="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23FFFFFF;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",uo="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23005751;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",Ts=({appName:r,orgName:e,username:t,footerText:s,navItems:a,selectedNav:n,onSelectNav:o,width:l="200px"})=>{const{theme:c}=Fs(),f=c==="dark"?co:uo;return i.jsxs("aside",{className:"flex flex-col h-screen bg-[var(--color-ds-background-page)]",style:{width:l},children:[i.jsxs("div",{className:"flex gap-1 flex-col items-center py-4 space-y-1",children:[i.jsx("img",{src:f,alt:"Logo Diputación",className:"w-20 h-20"}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-lg ",children:r}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:e}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),i.jsx("div",{className:"w-1/5 h-0.5 rounded-full bg-[var(--color-ds-background-accent)] mt-2"})]}),i.jsx("nav",{className:"flex-1 overflow-auto pt-6",children:i.jsx(Zt,{items:a,selected:n,onSelect:o})}),i.jsx("div",{className:"px-4 w-full py-3",children:i.jsx("span",{className:"text-ds-sm w-full text-center text-[var(--color-ds-text-secondary)]",children:s})})]})};function fo({sidebar:r,header:e,children:t}){return i.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[i.jsx(Ts,{...r}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-auto px-10 [scrollbar-gutter:stable_both-edges]",children:[i.jsx(Ss,{...e}),i.jsx("main",{className:"flex-1 ",children:t})]})]})}function ho({columns:r,data:e=[],loadData:t,idAccessor:s,multiSelect:a=!1,onSelectionChange:n,pageSize:o=10,initialSort:l,onSort:c,className:f}){const[u,m]=b.useState(e),[h,x]=b.useState(!!t);b.useEffect(()=>{t&&(x(!0),t().then(N=>m(N)).finally(()=>x(!1)))},[t]);const[E,j]=b.useState(new Set),[F,v]=b.useState(1),[g,S]=b.useState(l==null?void 0:l.sortBy),[D,O]=b.useState((l==null?void 0:l.sortDir)??"asc"),B=b.useMemo(()=>{if(!g)return[...u];const N=D==="asc"?1:-1;return[...u].sort((L,M)=>{const w=L[g],W=M[g];return w==null?-N:W==null||w>W?N:w<W?-N:0})},[u,g,D]),X=Math.max(1,Math.ceil(B.length/o)),U=b.useMemo(()=>{const N=(F-1)*o;return B.slice(N,N+o)},[B,F,o]),q=N=>{const L=new Set(E);L.has(N)?L.delete(N):L.add(N),j(L),n==null||n(u.filter(M=>L.has(M[s])))},Z=()=>{const N=U.every(M=>E.has(M[s])),L=new Set(E);N?U.forEach(M=>L.delete(M[s])):U.forEach(M=>L.add(M[s])),j(L),n==null||n(u.filter(M=>L.has(M[s])))},I=N=>{const L=typeof N.accessor=="string"?N.accessor:N.sortKey;if(g===L){const M=D==="asc"?"desc":"asc";O(M),c==null||c(L,M)}else S(L),O("asc"),c==null||c(L,"asc");v(1)},z=()=>h?i.jsx("tbody",{children:Array.from({length:o}).map((N,L)=>i.jsxs("tr",{children:[a&&i.jsx("td",{className:"px-4 py-2",children:i.jsx(Le,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((M,w)=>i.jsx("td",{className:"px-4 py-2",children:i.jsx(Le,{width:"100%",height:"1em",variant:"rect"})},w))]},L))}):U.length===0?i.jsx("tbody",{children:i.jsx("tr",{children:i.jsx("td",{colSpan:a?r.length+1:r.length,className:"px-4 py-8 text-center text-gray-500",children:"No hay datos"})})}):i.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:U.map(N=>{const L=N[s];return i.jsxs("tr",{className:"hover:bg-gray-50",children:[a&&i.jsx("td",{className:"px-4 py-2",children:i.jsx("input",{type:"checkbox",checked:E.has(L),onChange:()=>q(L)})}),r.map((M,w)=>{const W=M.render?M.render(N):typeof M.accessor=="function"?M.accessor(N):N[M.accessor];return i.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-800",children:W},w)})]},L)})});return i.jsxs("div",{className:$("w-full overflow-auto",f),children:[i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsxs("tr",{children:[a&&i.jsx("th",{className:"px-4 py-2 text-left",children:i.jsx("input",{type:"checkbox",checked:U.length>0&&U.every(N=>E.has(N[s])),onChange:Z})}),r.map(N=>{const L=typeof N.accessor=="string"?N.accessor:N.header,M=N.sortable&&!!N.accessor,w=g===N.accessor;return i.jsx("th",{className:$("px-4 py-2 text-left text-sm font-medium text-gray-700",N.width),onClick:()=>M&&I(N),children:i.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer select-none",children:[i.jsx("span",{children:N.header}),M&&i.jsx("span",{className:"text-xs",children:w?D==="asc"?"▲":"▼":"⇵"})]})},L)})]})}),z()]}),i.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[i.jsx("div",{className:"text-sm text-gray-700",children:h?"Cargando datos...":`Página ${F} de ${X}`}),i.jsxs("div",{className:"space-x-2",children:[i.jsx(_e,{size:"sm",variant:"outline",disabled:h||F<=1,onClick:()=>v(N=>Math.max(1,N-1)),children:"Prev"}),i.jsx(_e,{size:"sm",variant:"outline",disabled:h||F>=X,onClick:()=>v(N=>Math.min(X,N+1)),children:"Next"})]})]})]})}function Cs({control:r,name:e,rules:t,defaultValue:s=!1,checked:a,onChange:n,disabled:o=!1,label:l,labelPosition:c="right",errorMessage:f="",className:u}){const m=b.useId();if(r&&e)return i.jsx(we,{name:e,control:r,rules:t,defaultValue:s,render:({field:x,fieldState:E})=>{var j;return i.jsx(Cs,{checked:x.value,onChange:x.onChange,disabled:o,label:l,labelPosition:c,errorMessage:((j=E.error)==null?void 0:j.message)||"",className:u})}});const h=!!a;return i.jsxs("div",{className:$("flex flex-col",u),children:[i.jsxs("label",{className:$("inline-flex items-center space-x-3 select-none",o&&"opacity-50 cursor-not-allowed"),htmlFor:m,children:[l&&c==="left"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l}),i.jsx("button",{id:m,type:"button",role:"switch","aria-checked":h,disabled:o,onClick:()=>!o&&(n==null?void 0:n(!h)),className:$("relative inline-flex items-center h-8 w-16","bg-[var(--color-ds-background-accent)] rounded-full transition-colors duration-200","focus:outline-none "),children:i.jsx("div",{className:$("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",h?"translate-x-9":"translate-x-1")})}),l&&c==="right"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l})]}),i.jsx("div",{className:"pt-1 min-h-[18px] w-full",children:f?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:f}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}G.Button=_e,G.Checkbox=js,G.CollapsibleSection=yt,G.DateInput=Or,G.DropdownMenu=Pa,G.FileUploader=Lr,G.FormFieldInput=$t,G.FormPageLayout=on,G.FormRenderer=ao,G.Header=Ss,G.Icon=je,G.IconButton=xt,G.InfoButton=zr,G.Input=lt,G.InputGroup=Zr,G.LoadingScreen=io,G.Modal=lo,G.OptionGroup=qr,G.PageLayout=fo,G.SearchField=Es,G.Select=Je,G.Sidebar=Ts,G.SidebarNav=Zt,G.SkeletonLoader=Le,G.Table=ho,G.Tabs=Pr,G.TextArea=Bt,G.ThemeProvider=oo,G.ThemeToggle=Ns,G.Toast=Hr,G.ToastProvider=xn,G.ToggleSwitch=Cs,G.useToast=Xr,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})});
83
+ `,children:[i.jsx(vt,{className:"w-5 h-5 text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]"}),i.jsx("span",{className:"sr-only",children:"Cerrar modal"})]})]}),i.jsx("div",{className:"px-6 py-6 text-[var(--color-ds-text-primary)]",children:s}),a&&i.jsx("div",{className:"px-6 py-4 border-t border-[var(--color-ds-border-muted)] bg-[var(--color-ds-background-surface)]",children:a})]})})]}),document.body):null),Zt=({items:r,selected:e,onSelect:t,level:s=0})=>{const[a,n]=b.useState(new Set),o=l=>{const c=new Set(a);s===0?(c.clear(),a.has(l)||c.add(l)):c.has(l)?c.delete(l):c.add(l),n(c),t(l)};return i.jsx("ul",{className:$(s>0?"mt-1":"mt-0"),children:r.map(l=>{const c=l.value===e,f=a.has(l.value),u=["pl-2","pl-2","pl-2"][s]||"pl-4",m=s===0?f||c?"bg-[var(--color-ds-background-accent)] text-[var(--color-ds-text-on-accent)] rounded-r-lg":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]":c?"bg-[var(--color-ds-background-surface)] text-[var(--color-ds-text-primary)]":"text-[var(--color-ds-text-primary)] hover:bg-[var(--color-ds-background-surface)]",h=s===0&&(f||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]";return i.jsxs("li",{children:[i.jsxs("button",{onClick:()=>l.children?o(l.value):t(l.value),className:$("w-full flex items-center justify-between h-8 transition-colors",u,m),children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[s===0&&l.icon&&i.jsx(l.icon,{className:"w-5 h-5 ml-2"}),i.jsx("span",{className:"text-ds-sm",children:l.label})]}),l.children&&(f?i.jsx(Qt,{className:$("w-4 h-4 ",h)}):i.jsx(Ks,{className:$("w-4 h-4",h)}))]}),l.children&&i.jsx("div",{className:$("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",f?"max-h-screen":"max-h-0"),children:i.jsx(Zt,{items:l.children,selected:e,onSelect:t,level:s+1})})]},l.value)})})},co="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23FFFFFF;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",uo="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20250%20250'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.0%20Build%20186)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23005751;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M101.7,82.72c1.6.57,3.25,1.09,4.98,1.53,11.93,3.07,17.85,7.44,17.85,13.01,0,2.72-1.14,5-3.43,6.86-2.29,1.86-5.14,2.79-8.57,2.79s-6.49-1.13-8.9-3.36c-2.62,6.82-6.19,13.16-10.51,18.91,5.53,3.09,11.9,4.68,19.13,4.68,10.14,0,18.64-3,25.43-9.01,3.7-3.24,6.35-6.96,8.02-11.11,1.77,3.2,4.03,6.17,6.81,8.9,7.64,7.51,17.28,11.22,28.78,11.22,9.14,0,17.21-2.43,24.21-7.22,2.24-1.55,4.24-3.27,6.05-5.14l-14.05-13.73h-.14c-2.57,4.29-8.57,7.44-15.64,7.44-8.78,0-15.5-5.22-17.85-13.58h57.06c.36-1.57.57-3.79.57-6.58,0-11.37-3.86-20.73-11.5-28.24-7.71-7.44-17.28-11.15-28.71-11.15s-21.14,3.72-28.78,11.15c-5.19,5.09-8.59,11.03-10.26,17.78-1.11-1.42-2.37-2.71-3.78-3.83-6.07-4.79-12.07-7.36-20.64-9.73-11-2.93-16.5-7.08-16.5-12.58,0-2.51,1-4.65,3.07-6.37,2.07-1.71,4.57-2.57,7.57-2.57,3.21,0,5.93,1,8,3,2.07,2,3.14,4.5,3.14,7.5h23.21c0-8.79-3.29-16.08-9.78-21.95-6.5-5.86-14.71-8.79-24.57-8.79s-17.44,2.77-23.89,8.31C74.82,12.54,53.44.47,29.27,0v24.08c27.07.77,48.86,23.04,48.86,50.32s-21.79,49.55-48.86,50.32v24.08c37.54-.72,68.34-29.42,72.44-66.08ZM181.29,67.38c8.21,0,15,5.08,17.21,13.3h-34.5c2.57-8.22,8.93-13.3,17.28-13.3Z'/%3e%3cpath%20class='st0'%20d='M29.35,160.65v29.07h10.94c4.12,0,7.57-1.38,10.31-4.16,2.74-2.76,4.12-6.21,4.12-10.39s-1.38-7.61-4.12-10.39c-2.74-2.76-6.19-4.14-10.31-4.14h-10.94ZM52.1,175.17c0,3.46-1.14,6.34-3.39,8.64-2.25,2.3-5.07,3.46-8.46,3.46h-8.36v-24.17h8.36c3.39,0,6.21,1.15,8.46,3.46,2.25,2.3,3.39,5.18,3.39,8.62Z'/%3e%3cpath%20class='st0'%20d='M60.61,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3crect%20class='st0'%20x='57.63'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M64.15,168.24v29.48h2.41v-13.19c.85,1.77,2.09,3.17,3.69,4.18,1.6,1.01,3.41,1.52,5.44,1.52,3.11,0,5.7-1.07,7.75-3.23,2.05-2.16,3.07-4.83,3.07-8.04s-1.04-5.86-3.09-8.02c-2.05-2.14-4.63-3.21-7.73-3.21-2.03,0-3.84.49-5.44,1.5-1.6,1.01-2.84,2.41-3.69,4.18v-5.16h-2.41ZM69.06,172.62c1.64-1.69,3.73-2.53,6.23-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36c-1.66,1.71-3.73,2.55-6.23,2.55s-4.59-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33Z'/%3e%3cpath%20class='st0'%20d='M107.73,189.71v-21.48h-2.42v12.59c0,2.1-.65,3.79-1.97,5.08-1.32,1.3-3.05,1.95-5.18,1.95s-3.69-.64-4.93-1.91c-1.26-1.28-1.89-2.96-1.89-5.04v-12.67h-2.4v13.35c0,2.61.79,4.69,2.35,6.27,1.56,1.58,3.61,2.37,6.15,2.37,3.65-.02,6.27-1.52,7.85-4.53v4.01h2.42Z'/%3e%3cpolygon%20class='st0'%20points='117.35%20189.71%20117.35%20170.46%20122.55%20170.46%20122.55%20168.24%20117.35%20168.24%20117.35%20161.9%20114.94%20162.38%20114.94%20168.24%20110.01%20168.24%20110.01%20170.46%20114.94%20170.46%20114.94%20189.71%20117.35%20189.71'/%3e%3cpath%20class='st0'%20d='M144.27,189.71v-21.48h-2.42v5.12c-.87-1.75-2.13-3.13-3.73-4.14-1.6-1.01-3.41-1.5-5.4-1.5-3.08,0-5.64,1.07-7.69,3.21-2.05,2.16-3.09,4.83-3.09,8.02s1.04,5.88,3.09,8.04c2.05,2.16,4.63,3.23,7.69,3.23,1.99,0,3.79-.51,5.4-1.52,1.6-1.01,2.84-2.39,3.73-4.13v5.14h2.42ZM139.36,185.31c-1.66,1.71-3.73,2.55-6.23,2.55s-4.53-.84-6.19-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.19-2.53s4.57.84,6.23,2.53c1.66,1.71,2.5,3.8,2.5,6.33s-.83,4.65-2.5,6.36Z'/%3e%3cpath%20class='st0'%20d='M158.18,170.09c2.09,0,3.9.62,5.46,1.85,1.54,1.23,2.56,2.84,3.02,4.83h2.5c-.47-2.63-1.73-4.79-3.73-6.5-2.03-1.71-4.44-2.55-7.25-2.55-3.19,0-5.84,1.07-8,3.21-2.15,2.16-3.23,4.83-3.23,8.02s1.08,5.88,3.23,8.04c2.13,2.16,4.81,3.23,8,3.23,2.8,0,5.22-.84,7.25-2.55,2.01-1.71,3.27-3.87,3.73-6.52h-2.5c-.47,2-1.48,3.62-3.02,4.85-1.56,1.23-3.37,1.85-5.46,1.85-2.5,0-4.57-.84-6.23-2.55-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3crect%20class='st0'%20x='171.72'%20y='168.24'%20width='2.42'%20height='21.48'/%3e%3cpath%20class='st0'%20d='M174.71,161.41c0-.97-.79-1.73-1.79-1.73s-1.75.76-1.75,1.73.79,1.77,1.75,1.77,1.79-.76,1.79-1.77Z'/%3e%3cpath%20class='st0'%20d='M176.86,178.95c0,3.21,1.08,5.88,3.23,8.04,2.15,2.16,4.83,3.23,8.02,3.23s5.85-1.07,7.98-3.23c2.13-2.16,3.19-4.83,3.19-8.04s-1.06-5.86-3.19-8.02c-2.13-2.14-4.79-3.21-7.98-3.21s-5.86,1.07-8.02,3.21c-2.15,2.16-3.23,4.83-3.23,8.02ZM188.09,170.09c2.5,0,4.57.84,6.21,2.53,1.64,1.71,2.48,3.8,2.48,6.33s-.83,4.65-2.48,6.36c-1.64,1.71-3.71,2.55-6.21,2.55s-4.57-.84-6.23-2.55c-1.66-1.71-2.5-3.83-2.5-6.36s.83-4.63,2.5-6.33c1.66-1.69,3.73-2.53,6.23-2.53Z'/%3e%3cpolygon%20class='st0'%20points='194.03%20160.01%20190.83%20160.01%20186.46%20165.15%20189.08%20165.15%20194.03%20160.01'/%3e%3cpath%20class='st0'%20d='M221.5,189.71v-13.02c0-2.69-.81-4.86-2.44-6.5-1.64-1.65-3.79-2.47-6.45-2.47-3.75,0-6.68,1.67-8.22,4.71v-4.2h-2.42v21.48h2.42v-12.22c0-2.22.69-4.01,2.07-5.37,1.38-1.36,3.19-2.04,5.44-2.04s3.92.66,5.24,2c1.32,1.34,1.97,3.11,1.97,5.33v12.3h2.4Z'/%3e%3cpath%20class='st0'%20d='M57.27,225.24c-2.82-2.23-5.61-3.43-9.59-4.53-5.11-1.37-7.66-3.3-7.66-5.87,0-1.17.46-2.17,1.43-2.97.96-.8,2.12-1.2,3.52-1.2,1.49,0,2.75.47,3.72,1.4.96.93,1.46,2.1,1.46,3.5h10.78c0-4.1-1.53-7.5-4.55-10.23-3.02-2.73-6.83-4.1-11.42-4.1s-8.23,1.33-11.25,4c-3.02,2.67-4.51,6-4.51,10s1.26,7.4,3.75,9.73c2.49,2.37,5.68,4.03,9.56,5.03,5.54,1.43,8.29,3.47,8.29,6.06,0,1.27-.53,2.33-1.59,3.2-1.06.87-2.39,1.3-3.98,1.3s-3.05-.53-4.18-1.6c-1.16-1.07-1.73-2.37-1.73-3.93h-10.82c0,4.3,1.59,7.86,4.78,10.7,3.15,2.83,7.1,4.26,11.81,4.26s8.66-1.4,11.81-4.2c3.15-2.77,4.71-6.26,4.71-10.43,0-4.43-1.56-7.9-4.35-10.13Z'/%3e%3cpolygon%20class='st0'%20points='118.26%20236.54%20110.23%20214.38%2098.88%20214.38%20113.02%20249.17%20123.21%20249.17%20137.28%20214.38%20126.19%20214.38%20118.26%20236.54'/%3e%3crect%20class='st0'%20x='139.25'%20y='214.38'%20width='9.92'%20height='34.79'/%3e%3cpath%20class='st0'%20d='M144.2,199.53c-1.72,0-3.18.57-4.35,1.73-1.16,1.17-1.76,2.6-1.76,4.33s.6,3.23,1.76,4.4c1.16,1.17,2.62,1.73,4.35,1.73s3.25-.57,4.45-1.73c1.16-1.17,1.76-2.63,1.76-4.4s-.6-3.17-1.76-4.33c-1.19-1.17-2.69-1.73-4.45-1.73Z'/%3e%3crect%20class='st0'%20x='154.93'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3crect%20class='st0'%20x='170.61'%20y='200.02'%20width='9.92'%20height='49.15'/%3e%3cpath%20class='st0'%20d='M211.58,214.38v3.8c-2.82-3.1-6.34-4.63-10.49-4.63-4.75,0-8.73,1.73-11.91,5.2-3.22,3.5-4.81,7.83-4.81,13s1.59,9.53,4.81,13.03c3.19,3.5,7.17,5.23,11.91,5.23,4.18-.03,7.67-1.57,10.49-4.67v3.83h9.92v-34.79h-9.92ZM209.19,237.9c-1.63,1.63-3.65,2.47-6.11,2.47s-4.41-.83-6.01-2.47c-1.63-1.63-2.42-3.7-2.42-6.17s.8-4.5,2.42-6.13c1.59-1.63,3.58-2.43,6.01-2.43s4.45.8,6.07,2.43c1.63,1.63,2.42,3.7,2.42,6.13s-.8,4.53-2.39,6.17Z'/%3e%3cpath%20class='st0'%20d='M82.34,213.54c-5.34,0-9.82,1.73-13.37,5.2-3.55,3.5-5.34,7.83-5.34,13s1.79,9.53,5.34,13.03c3.55,3.5,8.03,5.23,13.37,5.23,4.25,0,8-1.13,11.25-3.37,1.05-.73,1.99-1.55,2.84-2.43l-6.5-6.37h-.13c-1.19,2-3.98,3.47-7.27,3.47-4.08,0-7.2-2.43-8.29-6.33h26.51c.17-.73.27-1.77.27-3.07,0-5.3-1.79-9.66-5.34-13.16-3.58-3.47-8.03-5.2-13.34-5.2ZM74.31,228.34c1.19-3.83,4.15-6.2,8.03-6.2s6.97,2.37,8,6.2h-16.03Z'/%3e%3c/svg%3e",Ts=({appName:r,orgName:e,username:t,footerText:s,navItems:a,selectedNav:n,onSelectNav:o,width:l="200px"})=>{const{theme:c}=Fs(),f=c==="dark"?co:uo;return i.jsxs("aside",{className:"flex flex-col h-screen bg-[var(--color-ds-background-page)]",style:{width:l},children:[i.jsxs("div",{className:"flex gap-1 flex-col items-center py-4 space-y-1",children:[i.jsx("img",{src:f,alt:"Logo Diputación",className:"w-20 h-20"}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-lg ",children:r}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:e}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),i.jsx("div",{className:"w-1/5 h-0.5 rounded-full bg-[var(--color-ds-background-accent)] mt-2"})]}),i.jsx("nav",{className:"flex-1 overflow-auto pt-6",children:i.jsx(Zt,{items:a,selected:n,onSelect:o})}),i.jsx("div",{className:"px-4 w-full py-3",children:i.jsx("span",{className:"text-ds-sm w-full text-center text-[var(--color-ds-text-secondary)]",children:s})})]})};function fo({sidebar:r,header:e,children:t}){return i.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[i.jsx(Ts,{...r}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-auto px-10 [scrollbar-gutter:stable_both-edges]",children:[i.jsx(Ss,{...e}),i.jsx("main",{className:"flex-1 ",children:t})]})]})}function ho({columns:r,data:e=[],loadData:t,idAccessor:s,multiSelect:a=!1,onSelectionChange:n,pageSize:o=10,initialSort:l,onSort:c,className:f}){const[u,m]=b.useState(e),[h,x]=b.useState(!!t);b.useEffect(()=>{t&&(x(!0),t().then(N=>m(N)).finally(()=>x(!1)))},[t]);const[E,j]=b.useState(new Set),[F,v]=b.useState(1),[g,S]=b.useState(l==null?void 0:l.sortBy),[M,O]=b.useState((l==null?void 0:l.sortDir)??"asc"),B=b.useMemo(()=>{if(!g)return[...u];const N=M==="asc"?1:-1;return[...u].sort((L,D)=>{const w=L[g],W=D[g];return w==null?-N:W==null||w>W?N:w<W?-N:0})},[u,g,M]),X=Math.max(1,Math.ceil(B.length/o)),U=b.useMemo(()=>{const N=(F-1)*o;return B.slice(N,N+o)},[B,F,o]),q=N=>{const L=new Set(E);L.has(N)?L.delete(N):L.add(N),j(L),n==null||n(u.filter(D=>L.has(D[s])))},Z=()=>{const N=U.every(D=>E.has(D[s])),L=new Set(E);N?U.forEach(D=>L.delete(D[s])):U.forEach(D=>L.add(D[s])),j(L),n==null||n(u.filter(D=>L.has(D[s])))},I=N=>{const L=typeof N.accessor=="string"?N.accessor:N.sortKey;if(g===L){const D=M==="asc"?"desc":"asc";O(D),c==null||c(L,D)}else S(L),O("asc"),c==null||c(L,"asc");v(1)},z=()=>h?i.jsx("tbody",{children:Array.from({length:o}).map((N,L)=>i.jsxs("tr",{children:[a&&i.jsx("td",{className:"px-4 py-2",children:i.jsx(Le,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((D,w)=>i.jsx("td",{className:"px-4 py-2",children:i.jsx(Le,{width:"100%",height:"1em",variant:"rect"})},w))]},L))}):U.length===0?i.jsx("tbody",{children:i.jsx("tr",{children:i.jsx("td",{colSpan:a?r.length+1:r.length,className:"px-4 py-8 text-center text-gray-500",children:"No hay datos"})})}):i.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:U.map(N=>{const L=N[s];return i.jsxs("tr",{className:"hover:bg-gray-50",children:[a&&i.jsx("td",{className:"px-4 py-2",children:i.jsx("input",{type:"checkbox",checked:E.has(L),onChange:()=>q(L)})}),r.map((D,w)=>{const W=D.render?D.render(N):typeof D.accessor=="function"?D.accessor(N):N[D.accessor];return i.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-800",children:W},w)})]},L)})});return i.jsxs("div",{className:$("w-full overflow-auto",f),children:[i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsxs("tr",{children:[a&&i.jsx("th",{className:"px-4 py-2 text-left",children:i.jsx("input",{type:"checkbox",checked:U.length>0&&U.every(N=>E.has(N[s])),onChange:Z})}),r.map(N=>{const L=typeof N.accessor=="string"?N.accessor:N.header,D=N.sortable&&!!N.accessor,w=g===N.accessor;return i.jsx("th",{className:$("px-4 py-2 text-left text-sm font-medium text-gray-700",N.width),onClick:()=>D&&I(N),children:i.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer select-none",children:[i.jsx("span",{children:N.header}),D&&i.jsx("span",{className:"text-xs",children:w?M==="asc"?"▲":"▼":"⇵"})]})},L)})]})}),z()]}),i.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[i.jsx("div",{className:"text-sm text-gray-700",children:h?"Cargando datos...":`Página ${F} de ${X}`}),i.jsxs("div",{className:"space-x-2",children:[i.jsx(_e,{size:"sm",variant:"outline",disabled:h||F<=1,onClick:()=>v(N=>Math.max(1,N-1)),children:"Prev"}),i.jsx(_e,{size:"sm",variant:"outline",disabled:h||F>=X,onClick:()=>v(N=>Math.min(X,N+1)),children:"Next"})]})]})]})}function Cs({control:r,name:e,rules:t,defaultValue:s=!1,checked:a,onChange:n,disabled:o=!1,label:l,labelPosition:c="right",errorMessage:f="",className:u}){const m=b.useId();if(r&&e)return i.jsx(we,{name:e,control:r,rules:t,defaultValue:s,render:({field:x,fieldState:E})=>{var j;return i.jsx(Cs,{checked:x.value,onChange:x.onChange,disabled:o,label:l,labelPosition:c,errorMessage:((j=E.error)==null?void 0:j.message)||"",className:u})}});const h=!!a;return i.jsxs("div",{className:$("flex flex-col",u),children:[i.jsxs("label",{className:$("inline-flex items-center space-x-3 select-none",o&&"opacity-50 cursor-not-allowed"),htmlFor:m,children:[l&&c==="left"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l}),i.jsx("button",{id:m,type:"button",role:"switch","aria-checked":h,disabled:o,onClick:()=>!o&&(n==null?void 0:n(!h)),className:$("relative inline-flex items-center h-8 w-16","bg-[var(--color-ds-background-accent)] rounded-full transition-colors duration-200","focus:outline-none "),children:i.jsx("div",{className:$("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",h?"translate-x-9":"translate-x-1")})}),l&&c==="right"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l})]}),i.jsx("div",{className:"pt-1 min-h-[18px] w-full",children:f?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:f}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}G.Button=_e,G.Checkbox=js,G.CollapsibleSection=yt,G.DateInput=Or,G.DropdownMenu=Pa,G.FileUploader=Lr,G.FormFieldInput=$t,G.FormPageLayout=on,G.FormRenderer=ao,G.Header=Ss,G.Icon=je,G.IconButton=xt,G.InfoButton=zr,G.Input=lt,G.InputGroup=Zr,G.LoadingScreen=io,G.Modal=lo,G.OptionGroup=qr,G.PageLayout=fo,G.SearchField=Es,G.Select=Je,G.Sidebar=Ts,G.SidebarNav=Zt,G.SkeletonLoader=Le,G.Table=ho,G.Tabs=Pr,G.TextArea=Bt,G.ThemeProvider=oo,G.ThemeToggle=Ns,G.Toast=Hr,G.ToastProvider=xn,G.ToggleSwitch=Cs,G.useToast=Xr,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})});