@dipusevilla/componentes-iu 1.0.16 → 1.0.18
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.cjs.js +13 -13
- package/dist/index.css +1 -1
- package/dist/index.es.js +1859 -1887
- package/dist/index.umd.js +14 -14
- package/dist/types/components/SearchField.d.ts +7 -2
- package/dist/types/components/Table.d.ts +3 -6
- package/dist/types/types/FormTypes.d.ts +7 -1
- package/package.json +95 -95
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),Rr=require("react-dom");function Us(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const V=Us(b);function Bs(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var tt={exports:{}},ze={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Kt;function Zs(){if(Kt)return
|
|
9
|
+
*/var Kt;function Zs(){if(Kt)return ze;Kt=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(s,n,a){var i=null;if(a!==void 0&&(i=""+a),n.key!==void 0&&(i=""+n.key),"key"in n){a={};for(var l in n)l!=="key"&&(a[l]=n[l])}else a=n;return n=a.ref,{$$typeof:r,type:s,key:i,ref:n!==void 0?n:null,props:a}}return ze.Fragment=e,ze.jsx=t,ze.jsxs=t,ze}var We={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,25 +14,25 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Qt;function zs(){return Qt||(Qt=1,process.env.NODE_ENV!=="production"&&function(){function r(
|
|
17
|
+
*/var Qt;function zs(){return Qt||(Qt=1,process.env.NODE_ENV!=="production"&&function(){function r(x){if(x==null)return null;if(typeof x=="function")return x.$$typeof===U?null:x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case j:return"Fragment";case y:return"Profiler";case T:return"StrictMode";case S:return"Suspense";case I:return"SuspenseList";case z:return"Activity"}if(typeof x=="object")switch(typeof x.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),x.$$typeof){case F:return"Portal";case k:return(x.displayName||"Context")+".Provider";case v:return(x._context.displayName||"Context")+".Consumer";case A:var N=x.render;return x=x.displayName,x||(x=N.displayName||N.name||"",x=x!==""?"ForwardRef("+x+")":"ForwardRef"),x;case q:return N=x.displayName||null,N!==null?N:r(x.type)||"Memo";case Z:N=x._payload,x=x._init;try{return r(x(N))}catch{}}return null}function e(x){return""+x}function t(x){try{e(x);var N=!1}catch{N=!0}if(N){N=console;var M=N.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&x[Symbol.toStringTag]||x.constructor.name||"Object";return M.call(N,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),e(x)}}function s(x){if(x===j)return"<>";if(typeof x=="object"&&x!==null&&x.$$typeof===Z)return"<...>";try{var N=r(x);return N?"<"+N+">":"<...>"}catch{return"<...>"}}function n(){var x=R.A;return x===null?null:x.getOwner()}function a(){return Error("react-stack-top-frame")}function i(x){if(L.call(x,"key")){var N=Object.getOwnPropertyDescriptor(x,"key").get;if(N&&N.isReactWarning)return!1}return x.key!==void 0}function l(x,N){function M(){X||(X=!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)",N))}M.isReactWarning=!0,Object.defineProperty(x,"key",{get:M,configurable:!0})}function c(){var x=r(this.type);return H[x]||(H[x]=!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.")),x=this.props.ref,x!==void 0?x:null}function d(x,N,M,G,ne,ae,Y,ie){return M=ae.ref,x={$$typeof:g,type:x,key:N,props:ae,_owner:ne},(M!==void 0?M:null)!==null?Object.defineProperty(x,"ref",{enumerable:!1,get:c}):Object.defineProperty(x,"ref",{enumerable:!1,value:null}),x._store={},Object.defineProperty(x._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(x,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(x,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(x,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ie}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x}function f(x,N,M,G,ne,ae,Y,ie){var Q=N.children;if(Q!==void 0)if(G)if(B(Q)){for(G=0;G<Q.length;G++)h(Q[G]);Object.freeze&&Object.freeze(Q)}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 h(Q);if(L.call(N,"key")){Q=r(x);var K=Object.keys(N).filter(function(Ie){return Ie!=="key"});G=0<K.length?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}",re[Q+G]||(K=0<K.length?"{"+K.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,ee,Y,ce,Y),ae[Y+ee]=!0)}if(Y=null,X!==void 0&&(t(X),Y=""+X),i(U)&&(t(U.key),Y=""+U.key),"key"in U){X={};for(var Ne in U)Ne!=="key"&&(X[Ne]=U[Ne])}else X=U;return Y&&l(X,typeof j=="function"?j.displayName||j.name||"Unknown":j),f(j,Y,H,ne,n(),X,oe,le)}function m(j){typeof j=="object"&&j!==null&&j.$$typeof===v&&j._store&&(j._store.validated=1)}var h=w,v=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),S=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),M=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,z=Array.isArray,N=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(j){return j()}};var A,g={},q=h["react-stack-bottom-frame"].bind(h,a)(),J=N(s(a)),ae={};ze.Fragment=k,ze.jsx=function(j,U,X,ee,ne){var H=1e4>M.recentlyCreatedOwnerStacks++;return d(j,U,X,!1,ee,ne,H?Error("react-stack-top-frame"):q,H?N(s(j)):J)},ze.jsxs=function(j,U,X,ee,ne){var H=1e4>M.recentlyCreatedOwnerStacks++;return d(j,U,X,!0,ee,ne,H?Error("react-stack-top-frame"):q,H?N(s(j)):J)}}()),ze}var er;function Ws(){return er||(er=1,process.env.NODE_ENV==="production"?Qe.exports=Zs():Qe.exports=zs()),Qe.exports}var o=Ws();function Vr(r){var e,t,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=Vr(r[e]))&&(s&&(s+=" "),s+=t)}else for(t in r)r[t]&&(s&&(s+=" "),s+=t);return s}function D(){for(var r,e,t=0,s="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=Vr(r))&&(s&&(s+=" "),s+=e);return s}const qs={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 ke({component:r,size:e="sm",className:t,...s}){return o.jsx(r,{className:D(qs[e],t),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const Hs="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Ys={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"},Gs={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"},Xs={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},Js="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 Te({type:r="button",variant:e="primary",size:t="sm",width:s,disabled:n=!1,icon:a,iconPosition:i="left",ariaLabel:l,children:c,onClick:f,className:d}){const m=!!a,h=m&&!c,v=h?Xs[t]:Gs[t];return o.jsxs("button",{type:r,onClick:f,disabled:n,"aria-label":h?l:void 0,style:s?{width:s}:void 0,className:D(Hs,Ys[e],v,Js,d,m&&c&&"gap-2"),children:[a&&i==="left"&&o.jsx(ke,{component:a,size:t}),c,a&&i==="right"&&o.jsx(ke,{component:a,size:t})]})}function Ks({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 Qs=V.forwardRef(Ks);function en({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 Mr=V.forwardRef(en);function tn({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 rn=V.forwardRef(tn);function sn({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 nn=V.forwardRef(sn);function an({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 on=V.forwardRef(an);function ln({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 tr=V.forwardRef(ln);function cn({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 un=V.forwardRef(cn);function dn({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 Lr=V.forwardRef(dn);function fn({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 hn=V.forwardRef(fn);function mn({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 xn=V.forwardRef(mn);function pn({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 gn=V.forwardRef(pn);function vn({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 yn=V.forwardRef(vn);function bn({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 wn=V.forwardRef(bn);function jn({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 kn=V.forwardRef(jn);function En({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 Dt=V.forwardRef(En);function Nt({title:r,children:e,defaultOpen:t=!0,className:s}){const[n,a]=w.useState(t),i=w.useRef(null),l=w.useRef(null),[c,f]=w.useState(0),d=()=>{if(l.current){const m=l.current.scrollHeight;f(m)}};return w.useLayoutEffect(()=>{d()},[n]),w.useEffect(()=>{const m=l.current;if(!m)return;const h=new ResizeObserver(()=>{d()});return h.observe(m),()=>{h.disconnect()}},[]),o.jsxs("div",{className:D("flex flex-col w-full gap-3",s),children:[o.jsxs("button",{type:"button",onClick:()=>a(m=>!m),className:"flex items-center justify-between w-full hover:bg-[var(--color-ds-surface-hover)] transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"block w-1 h-5 bg-[var(--color-ds-background-accent)] rounded-sm"}),o.jsx("span",{className:"font-semibold text-[var(--color-ds-text-primary)]",children:r})]}),n?o.jsx(nn,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):o.jsx(Mr,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),o.jsx("div",{className:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",children:o.jsx("div",{className:"px-6",children:o.jsx("div",{ref:i,className:D("overflow-hidden transition-all duration-300 ease-in-out",n?"opacity-100":"opacity-0"),style:{maxHeight:n?`${c}px`:"0px"},children:o.jsx("div",{ref:l,className:"py-4",children:e})})})})]})}var Xe=r=>r.type==="checkbox",De=r=>r instanceof Date,he=r=>r==null;const Ir=r=>typeof r=="object";var se=r=>!he(r)&&!Array.isArray(r)&&Ir(r)&&!De(r),Pr=r=>se(r)&&r.target?Xe(r.target)?r.target.checked:r.target.value:r,Nn=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,Ur=(r,e)=>r.has(Nn(e)),_n=r=>{const e=r.constructor&&r.constructor.prototype;return se(e)&&e.hasOwnProperty("isPrototypeOf")},Rt=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(!(Rt&&(r instanceof Blob||s))&&(t||se(r)))if(e=t?[]:{},!t&&!_n(r))e=r;else for(const n in r)r.hasOwnProperty(n)&&(e[n]=de(r[n]));else return r;return e}var xt=r=>Array.isArray(r)?r.filter(Boolean):[],re=r=>r===void 0,O=(r,e,t)=>{if(!e||!se(r))return t;const s=xt(e.split(/[,[\].]+?/)).reduce((n,a)=>he(n)?n:n[a],r);return re(s)||s===r?re(r[e])?t:r[e]:s},pe=r=>typeof r=="boolean",Vt=r=>/^\w*$/.test(r),Br=r=>xt(r.replace(/["|']|\]/g,"").split(/\.|\[/)),K=(r,e,t)=>{let s=-1;const n=Vt(e)?[e]:Br(e),a=n.length,i=a-1;for(;++s<a;){const l=n[s];let c=t;if(s!==i){const f=r[l];c=se(f)||Array.isArray(f)?f:isNaN(+n[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const ct={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ye={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},_e={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Zr=w.createContext(null),pt=()=>w.useContext(Zr),Fn=r=>{const{children:e,...t}=r;return w.createElement(Zr.Provider,{value:t},e)};var zr=(r,e,t,s=!0)=>{const n={defaultValues:e._defaultValues};for(const a in r)Object.defineProperty(n,a,{get:()=>{const i=a;return e._proxyFormState[i]!==ye.all&&(e._proxyFormState[i]=!s||ye.all),t&&(t[i]=!0),r[i]}});return n};const Mt=typeof window<"u"?V.useLayoutEffect:V.useEffect;function Sn(r){const e=pt(),{control:t=e.control,disabled:s,name:n,exact:a}=r||{},[i,l]=w.useState(t._formState),c=w.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Mt(()=>t._subscribe({name:n,formState:c.current,exact:a,callback:f=>{!s&&l({...t._formState,...f})}}),[n,s,a]),w.useEffect(()=>{c.current.isValid&&t._setValid(!0)},[t]),w.useMemo(()=>zr(i,t,c.current,!1),[i,t])}var Ee=r=>typeof r=="string",Wr=(r,e,t,s,n)=>Ee(r)?(s&&e.watch.add(r),O(t,r,n)):Array.isArray(r)?r.map(a=>(s&&e.watch.add(a),O(t,a))):(s&&(e.watchAll=!0),t);function qr(r){const e=pt(),{control:t=e.control,name:s,defaultValue:n,disabled:a,exact:i}=r||{},l=w.useRef(n),[c,f]=w.useState(t._getWatch(s,l.current));return Mt(()=>t._subscribe({name:s,formState:{values:!0},exact:i,callback:d=>!a&&f(Wr(s,t._names,d.values||t._formValues,!1,l.current))}),[s,t,a,i]),w.useEffect(()=>t._removeUnmounted()),c}function Hr(r){const e=pt(),{name:t,disabled:s,control:n=e.control,shouldUnregister:a}=r,i=Ur(n._names.array,t),l=qr({control:n,name:t,defaultValue:O(n._formValues,t,O(n._defaultValues,t,r.defaultValue)),exact:!0}),c=Sn({control:n,name:t,exact:!0}),f=w.useRef(r),d=w.useRef(n.register(t,{...r.rules,value:l,...pe(r.disabled)?{disabled:r.disabled}:{}})),m=w.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!O(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!O(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!O(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!O(c.validatingFields,t)},error:{enumerable:!0,get:()=>O(c.errors,t)}}),[c,t]),h=w.useCallback(F=>d.current.onChange({target:{value:Pr(F),name:t},type:ct.CHANGE}),[t]),v=w.useCallback(()=>d.current.onBlur({target:{value:O(n._formValues,t),name:t},type:ct.BLUR}),[t,n._formValues]),E=w.useCallback(F=>{const y=O(n._fields,t);y&&F&&(y._f.ref={focus:()=>F.focus(),select:()=>F.select(),setCustomValidity:p=>F.setCustomValidity(p),reportValidity:()=>F.reportValidity()})},[n._fields,t]),k=w.useMemo(()=>({name:t,value:l,...pe(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:h,onBlur:v,ref:E}),[t,s,c.disabled,h,v,E,l]);return w.useEffect(()=>{const F=n._options.shouldUnregister||a;n.register(t,{...f.current.rules,...pe(f.current.disabled)?{disabled:f.current.disabled}:{}});const y=(p,S)=>{const R=O(n._fields,p);R&&R._f&&(R._f.mount=S)};if(y(t,!0),F){const p=de(O(n._options.defaultValues,t));K(n._defaultValues,t,p),re(O(n._formValues,t))&&K(n._formValues,t,p)}return!i&&n.register(t),()=>{(i?F&&!n._state.action:F)?n.unregister(t):y(t,!1)}},[t,n,i,a]),w.useEffect(()=>{n._setDisabledField({disabled:s,name:t})},[s,t,n]),w.useMemo(()=>({field:k,formState:c,fieldState:m}),[k,c,m])}const we=r=>r.render(Hr(r));var Yr=(r,e,t,s,n)=>e?{...t[r],types:{...t[r]&&t[r].types?t[r].types:{},[s]:n||!0}}:{},He=r=>Array.isArray(r)?r:[r],rr=()=>{let r=[];return{get observers(){return r},next:n=>{for(const a of r)a.next&&a.next(n)},subscribe:n=>(r.push(n),{unsubscribe:()=>{r=r.filter(a=>a!==n)}}),unsubscribe:()=>{r=[]}}},_t=r=>he(r)||!Ir(r);function Ae(r,e){if(_t(r)||_t(e))return r===e;if(De(r)&&De(e))return r.getTime()===e.getTime();const t=Object.keys(r),s=Object.keys(e);if(t.length!==s.length)return!1;for(const n of t){const a=r[n];if(!s.includes(n))return!1;if(n!=="ref"){const i=e[n];if(De(a)&&De(i)||se(a)&&se(i)||Array.isArray(a)&&Array.isArray(i)?!Ae(a,i):a!==i)return!1}}return!0}var fe=r=>se(r)&&!Object.keys(r).length,Lt=r=>r.type==="file",be=r=>typeof r=="function",ut=r=>{if(!Rt)return!1;const e=r?r.ownerDocument:0;return r instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Gr=r=>r.type==="select-multiple",It=r=>r.type==="radio",Tn=r=>It(r)||Xe(r),bt=r=>ut(r)&&r.isConnected;function On(r,e){const t=e.slice(0,-1).length;let s=0;for(;s<t;)r=re(r)?s++:r[e[s++]];return r}function Cn(r){for(const e in r)if(r.hasOwnProperty(e)&&!re(r[e]))return!1;return!0}function ie(r,e){const t=Array.isArray(e)?e:Vt(e)?[e]:Br(e),s=t.length===1?r:On(r,t),n=t.length-1,a=t[n];return s&&delete s[a],n!==0&&(se(s)&&fe(s)||Array.isArray(s)&&Cn(s))&&ie(r,t.slice(0,-1)),r}var Xr=r=>{for(const e in r)if(be(r[e]))return!0;return!1};function dt(r,e={}){const t=Array.isArray(r);if(se(r)||t)for(const s in r)Array.isArray(r[s])||se(r[s])&&!Xr(r[s])?(e[s]=Array.isArray(r[s])?[]:{},dt(r[s],e[s])):he(r[s])||(e[s]=!0);return e}function Jr(r,e,t){const s=Array.isArray(r);if(se(r)||s)for(const n in r)Array.isArray(r[n])||se(r[n])&&!Xr(r[n])?re(e)||_t(t[n])?t[n]=Array.isArray(r[n])?dt(r[n],[]):{...dt(r[n])}:Jr(r[n],he(e)?{}:e[n],t[n]):t[n]=!Ae(r[n],e[n]);return t}var We=(r,e)=>Jr(r,e,dt(e));const sr={value:!1,isValid:!1},nr={value:!0,isValid:!0};var Kr=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&&!re(r[0].attributes.value)?re(r[0].value)||r[0].value===""?nr:{value:r[0].value,isValid:!0}:nr:sr}return sr},Qr=(r,{valueAsNumber:e,valueAsDate:t,setValueAs:s})=>re(r)?r:e?r===""?NaN:r&&+r:t&&Ee(r)?new Date(r):s?s(r):r;const ar={isValid:!1,value:null};var es=r=>Array.isArray(r)?r.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,ar):ar;function ir(r){const e=r.ref;return Lt(e)?e.files:It(e)?es(r.refs).value:Gr(e)?[...e.selectedOptions].map(({value:t})=>t):Xe(e)?Kr(r.refs).value:Qr(re(e.value)?r.ref.value:e.value,r)}var An=(r,e,t,s)=>{const n={};for(const a of r){const i=O(e,a);i&&K(n,a,i._f)}return{criteriaMode:t,names:[...r],fields:n,shouldUseNativeValidation:s}},ft=r=>r instanceof RegExp,qe=r=>re(r)?r:ft(r)?r.source:se(r)?ft(r.value)?r.value.source:r.value:r,or=r=>({isOnSubmit:!r||r===ye.onSubmit,isOnBlur:r===ye.onBlur,isOnChange:r===ye.onChange,isOnAll:r===ye.all,isOnTouch:r===ye.onTouched});const lr="AsyncFunction";var $n=r=>!!r&&!!r.validate&&!!(be(r.validate)&&r.validate.constructor.name===lr||se(r.validate)&&Object.values(r.validate).find(e=>e.constructor.name===lr)),Dn=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),cr=(r,e,t)=>!t&&(e.watchAll||e.watch.has(r)||[...e.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const Ye=(r,e,t,s)=>{for(const n of t||Object.keys(r)){const a=O(r,n);if(a){const{_f:i,...l}=a;if(i){if(i.refs&&i.refs[0]&&e(i.refs[0],n)&&!s)return!0;if(i.ref&&e(i.ref,i.name)&&!s)return!0;if(Ye(l,e))break}else if(se(l)&&Ye(l,e))break}}};function ur(r,e,t){const s=O(r,t);if(s||Vt(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),i=O(e,a),l=O(r,a);if(i&&!Array.isArray(i)&&t!==a)return{name:t};if(l&&l.type)return{name:a,error:l};n.pop()}return{name:t}}var Rn=(r,e,t,s)=>{t(r);const{name:n,...a}=r;return fe(a)||Object.keys(a).length>=Object.keys(e).length||Object.keys(a).find(i=>e[i]===(!s||ye.all))},Vn=(r,e,t)=>!r||!e||r===e||He(r).some(s=>s&&(t?s===e:s.startsWith(e)||e.startsWith(s))),Mn=(r,e,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(e||r):(t?s.isOnBlur:n.isOnBlur)?!r:(t?s.isOnChange:n.isOnChange)?r:!0,Ln=(r,e)=>!xt(O(r,e)).length&&ie(r,e),In=(r,e,t)=>{const s=He(O(r,t));return K(s,"root",e[t]),K(r,t,s),r},at=r=>Ee(r);function dr(r,e,t="validate"){if(at(r)||Array.isArray(r)&&r.every(at)||pe(r)&&!r)return{type:t,message:at(r)?r:"",ref:e}}var Pe=r=>se(r)&&!ft(r)?r:{value:r,message:""},fr=async(r,e,t,s,n,a)=>{const{ref:i,refs:l,required:c,maxLength:f,minLength:d,min:m,max:h,pattern:v,validate:E,name:k,valueAsNumber:F,mount:y}=r._f,p=O(t,k);if(!y||e.has(k))return{};const S=l?l[0]:i,R=L=>{n&&S.reportValidity&&(S.setCustomValidity(pe(L)?"":L||""),S.reportValidity())},C={},P=It(i),G=Xe(i),B=P||G,Z=(F||Lt(i))&&re(i.value)&&re(p)||ut(i)&&i.value===""||p===""||Array.isArray(p)&&!p.length,W=Yr.bind(null,k,s,C),M=(L,z,N,A=_e.maxLength,g=_e.minLength)=>{const q=L?z:N;C[k]={type:L?A:g,message:q,ref:i,...W(L?A:g,q)}};if(a?!Array.isArray(p)||!p.length:c&&(!B&&(Z||he(p))||pe(p)&&!p||G&&!Kr(l).isValid||P&&!es(l).isValid)){const{value:L,message:z}=at(c)?{value:!!c,message:c}:Pe(c);if(L&&(C[k]={type:_e.required,message:z,ref:S,...W(_e.required,z)},!s))return R(z),C}if(!Z&&(!he(m)||!he(h))){let L,z;const N=Pe(h),A=Pe(m);if(!he(p)&&!isNaN(p)){const g=i.valueAsNumber||p&&+p;he(N.value)||(L=g>N.value),he(A.value)||(z=g<A.value)}else{const g=i.valueAsDate||new Date(p),q=j=>new Date(new Date().toDateString()+" "+j),J=i.type=="time",ae=i.type=="week";Ee(N.value)&&p&&(L=J?q(p)>q(N.value):ae?p>N.value:g>new Date(N.value)),Ee(A.value)&&p&&(z=J?q(p)<q(A.value):ae?p<A.value:g<new Date(A.value))}if((L||z)&&(M(!!L,N.message,A.message,_e.max,_e.min),!s))return R(C[k].message),C}if((f||d)&&!Z&&(Ee(p)||a&&Array.isArray(p))){const L=Pe(f),z=Pe(d),N=!he(L.value)&&p.length>+L.value,A=!he(z.value)&&p.length<+z.value;if((N||A)&&(M(N,L.message,z.message),!s))return R(C[k].message),C}if(v&&!Z&&Ee(p)){const{value:L,message:z}=Pe(v);if(ft(L)&&!p.match(L)&&(C[k]={type:_e.pattern,message:z,ref:i,...W(_e.pattern,z)},!s))return R(z),C}if(E){if(be(E)){const L=await E(p,t),z=dr(L,S);if(z&&(C[k]={...z,...W(_e.validate,z.message)},!s))return R(z.message),C}else if(se(E)){let L={};for(const z in E){if(!fe(L)&&!s)break;const N=dr(await E[z](p,t),S,z);N&&(L={...N,...W(z,N.message)},R(N.message),s&&(C[k]=L))}if(!fe(L)&&(C[k]={ref:S,...L},!s))return C}}return R(!0),C};const Pn={mode:ye.onSubmit,reValidateMode:ye.onChange,shouldFocusError:!0};function Un(r={}){let e={...Pn,...r},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:be(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 n=se(e.defaultValues)||se(e.values)?de(e.defaultValues||e.values)||{}:{},a=e.shouldUnregister?{}:de(n),i={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 d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...d};const h={array:rr(),state:rr()},v=e.criteriaMode===ye.all,E=u=>x=>{clearTimeout(f),f=setTimeout(u,x)},k=async u=>{if(!e.disabled&&(d.isValid||m.isValid||u)){const x=e.resolver?fe((await G()).errors):await Z(s,!0);x!==t.isValid&&h.state.next({isValid:x})}},F=(u,x)=>{!e.disabled&&(d.isValidating||d.validatingFields||m.isValidating||m.validatingFields)&&((u||Array.from(l.mount)).forEach(b=>{b&&(x?K(t.validatingFields,b,x):ie(t.validatingFields,b))}),h.state.next({validatingFields:t.validatingFields,isValidating:!fe(t.validatingFields)}))},y=(u,x=[],b,$,T=!0,_=!0)=>{if($&&b&&!e.disabled){if(i.action=!0,_&&Array.isArray(O(s,u))){const I=b(O(s,u),$.argA,$.argB);T&&K(s,u,I)}if(_&&Array.isArray(O(t.errors,u))){const I=b(O(t.errors,u),$.argA,$.argB);T&&K(t.errors,u,I),Ln(t.errors,u)}if((d.touchedFields||m.touchedFields)&&_&&Array.isArray(O(t.touchedFields,u))){const I=b(O(t.touchedFields,u),$.argA,$.argB);T&&K(t.touchedFields,u,I)}(d.dirtyFields||m.dirtyFields)&&(t.dirtyFields=We(n,a)),h.state.next({name:u,isDirty:M(u,x),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else K(a,u,x)},p=(u,x)=>{K(t.errors,u,x),h.state.next({errors:t.errors})},S=u=>{t.errors=u,h.state.next({errors:t.errors,isValid:!1})},R=(u,x,b,$)=>{const T=O(s,u);if(T){const _=O(a,u,re(b)?O(n,u):b);re(_)||$&&$.defaultChecked||x?K(a,u,x?_:ir(T._f)):N(u,_),i.mount&&k()}},C=(u,x,b,$,T)=>{let _=!1,I=!1;const Q={name:u};if(!e.disabled){if(!b||$){(d.isDirty||m.isDirty)&&(I=t.isDirty,t.isDirty=Q.isDirty=M(),_=I!==Q.isDirty);const te=Ae(O(n,u),x);I=!!O(t.dirtyFields,u),te?ie(t.dirtyFields,u):K(t.dirtyFields,u,!0),Q.dirtyFields=t.dirtyFields,_=_||(d.dirtyFields||m.dirtyFields)&&I!==!te}if(b){const te=O(t.touchedFields,u);te||(K(t.touchedFields,u,b),Q.touchedFields=t.touchedFields,_=_||(d.touchedFields||m.touchedFields)&&te!==b)}_&&T&&h.state.next(Q)}return _?Q:{}},P=(u,x,b,$)=>{const T=O(t.errors,u),_=(d.isValid||m.isValid)&&pe(x)&&t.isValid!==x;if(e.delayError&&b?(c=E(()=>p(u,b)),c(e.delayError)):(clearTimeout(f),c=null,b?K(t.errors,u,b):ie(t.errors,u)),(b?!Ae(T,b):T)||!fe($)||_){const I={...$,..._&&pe(x)?{isValid:x}:{},errors:t.errors,name:u};t={...t,...I},h.state.next(I)}},G=async u=>{F(u,!0);const x=await e.resolver(a,e.context,An(u||l.mount,s,e.criteriaMode,e.shouldUseNativeValidation));return F(u),x},B=async u=>{const{errors:x}=await G(u);if(u)for(const b of u){const $=O(x,b);$?K(t.errors,b,$):ie(t.errors,b)}else t.errors=x;return x},Z=async(u,x,b={valid:!0})=>{for(const $ in u){const T=u[$];if(T){const{_f:_,...I}=T;if(_){const Q=l.array.has(_.name),te=T._f&&$n(T._f);te&&d.validatingFields&&F([$],!0);const ge=await fr(T,l.disabled,a,v,e.shouldUseNativeValidation&&!x,Q);if(te&&d.validatingFields&&F([$]),ge[_.name]&&(b.valid=!1,x))break;!x&&(O(ge,_.name)?Q?In(t.errors,ge,_.name):K(t.errors,_.name,ge[_.name]):ie(t.errors,_.name))}!fe(I)&&await Z(I,x,b)}}return b.valid},W=()=>{for(const u of l.unMount){const x=O(s,u);x&&(x._f.refs?x._f.refs.every(b=>!bt(b)):!bt(x._f.ref))&&le(u)}l.unMount=new Set},M=(u,x)=>!e.disabled&&(u&&x&&K(a,u,x),!Ae(j(),n)),L=(u,x,b)=>Wr(u,l,{...i.mount?a:re(x)?n:Ee(u)?{[u]:x}:x},b,x),z=u=>xt(O(i.mount?a:n,u,e.shouldUnregister?O(n,u,[]):[])),N=(u,x,b={})=>{const $=O(s,u);let T=x;if($){const _=$._f;_&&(!_.disabled&&K(a,u,Qr(x,_)),T=ut(_.ref)&&he(x)?"":x,Gr(_.ref)?[..._.ref.options].forEach(I=>I.selected=T.includes(I.value)):_.refs?Xe(_.ref)?_.refs.forEach(I=>{(!I.defaultChecked||!I.disabled)&&(Array.isArray(T)?I.checked=!!T.find(Q=>Q===I.value):I.checked=T===I.value||!!T)}):_.refs.forEach(I=>I.checked=I.value===T):Lt(_.ref)?_.ref.value="":(_.ref.value=T,_.ref.type||h.state.next({name:u,values:de(a)})))}(b.shouldDirty||b.shouldTouch)&&C(u,T,b.shouldTouch,b.shouldDirty,!0),b.shouldValidate&&ae(u)},A=(u,x,b)=>{for(const $ in x){if(!x.hasOwnProperty($))return;const T=x[$],_=`${u}.${$}`,I=O(s,_);(l.array.has(u)||se(T)||I&&!I._f)&&!De(T)?A(_,T,b):N(_,T,b)}},g=(u,x,b={})=>{const $=O(s,u),T=l.array.has(u),_=de(x);K(a,u,_),T?(h.array.next({name:u,values:de(a)}),(d.isDirty||d.dirtyFields||m.isDirty||m.dirtyFields)&&b.shouldDirty&&h.state.next({name:u,dirtyFields:We(n,a),isDirty:M(u,_)})):$&&!$._f&&!he(_)?A(u,_,b):N(u,_,b),cr(u,l)&&h.state.next({...t}),h.state.next({name:i.mount?u:void 0,values:de(a)})},q=async u=>{i.mount=!0;const x=u.target;let b=x.name,$=!0;const T=O(s,b),_=te=>{$=Number.isNaN(te)||De(te)&&isNaN(te.getTime())||Ae(te,O(a,b,te))},I=or(e.mode),Q=or(e.reValidateMode);if(T){let te,ge;const Ke=x.type?ir(T._f):Pr(u),Oe=u.type===ct.BLUR||u.type===ct.FOCUS_OUT,Ls=!Dn(T._f)&&!e.resolver&&!O(t.errors,b)&&!T._f.deps||Mn(Oe,O(t.touchedFields,b),t.isSubmitted,Q,I),vt=cr(b,l,Oe);K(a,b,Ke),Oe?(T._f.onBlur&&T._f.onBlur(u),c&&c(0)):T._f.onChange&&T._f.onChange(u);const yt=C(b,Ke,Oe),Is=!fe(yt)||vt;if(!Oe&&h.state.next({name:b,type:u.type,values:de(a)}),Ls)return(d.isValid||m.isValid)&&(e.mode==="onBlur"?Oe&&k():Oe||k()),Is&&h.state.next({name:b,...vt?{}:yt});if(!Oe&&vt&&h.state.next({...t}),e.resolver){const{errors:Xt}=await G([b]);if(_(Ke),$){const Ps=ur(t.errors,s,b),Jt=ur(Xt,s,Ps.name||b);te=Jt.error,b=Jt.name,ge=fe(Xt)}}else F([b],!0),te=(await fr(T,l.disabled,a,v,e.shouldUseNativeValidation))[b],F([b]),_(Ke),$&&(te?ge=!1:(d.isValid||m.isValid)&&(ge=await Z(s,!0)));$&&(T._f.deps&&ae(T._f.deps),P(b,ge,te,yt))}},J=(u,x)=>{if(O(t.errors,x)&&u.focus)return u.focus(),1},ae=async(u,x={})=>{let b,$;const T=He(u);if(e.resolver){const _=await B(re(u)?u:T);b=fe(_),$=u?!T.some(I=>O(_,I)):b}else u?($=(await Promise.all(T.map(async _=>{const I=O(s,_);return await Z(I&&I._f?{[_]:I}:I)}))).every(Boolean),!(!$&&!t.isValid)&&k()):$=b=await Z(s);return h.state.next({...!Ee(u)||(d.isValid||m.isValid)&&b!==t.isValid?{}:{name:u},...e.resolver||!u?{isValid:b}:{},errors:t.errors}),x.shouldFocus&&!$&&Ye(s,J,u?T:l.mount),$},j=u=>{const x={...i.mount?a:n};return re(u)?x:Ee(u)?O(x,u):u.map(b=>O(x,b))},U=(u,x)=>({invalid:!!O((x||t).errors,u),isDirty:!!O((x||t).dirtyFields,u),error:O((x||t).errors,u),isValidating:!!O(t.validatingFields,u),isTouched:!!O((x||t).touchedFields,u)}),X=u=>{u&&He(u).forEach(x=>ie(t.errors,x)),h.state.next({errors:u?t.errors:{}})},ee=(u,x,b)=>{const $=(O(s,u,{_f:{}})._f||{}).ref,T=O(t.errors,u)||{},{ref:_,message:I,type:Q,...te}=T;K(t.errors,u,{...te,...x,ref:$}),h.state.next({name:u,errors:t.errors,isValid:!1}),b&&b.shouldFocus&&$&&$.focus&&$.focus()},ne=(u,x)=>be(u)?h.state.subscribe({next:b=>u(L(void 0,x),b)}):L(u,x,!0),H=u=>h.state.subscribe({next:x=>{Vn(u.name,x.name,u.exact)&&Rn(x,u.formState||d,Ms,u.reRenderRoot)&&u.callback({values:{...a},...t,...x})}}).unsubscribe,oe=u=>(i.mount=!0,m={...m,...u.formState},H({...u,formState:m})),le=(u,x={})=>{for(const b of u?He(u):l.mount)l.mount.delete(b),l.array.delete(b),x.keepValue||(ie(s,b),ie(a,b)),!x.keepError&&ie(t.errors,b),!x.keepDirty&&ie(t.dirtyFields,b),!x.keepTouched&&ie(t.touchedFields,b),!x.keepIsValidating&&ie(t.validatingFields,b),!e.shouldUnregister&&!x.keepDefaultValue&&ie(n,b);h.state.next({values:de(a)}),h.state.next({...t,...x.keepDirty?{isDirty:M()}:{}}),!x.keepIsValid&&k()},Y=({disabled:u,name:x})=>{(pe(u)&&i.mount||u||l.disabled.has(x))&&(u?l.disabled.add(x):l.disabled.delete(x))},ce=(u,x={})=>{let b=O(s,u);const $=pe(x.disabled)||pe(e.disabled);return K(s,u,{...b||{},_f:{...b&&b._f?b._f:{ref:{name:u}},name:u,mount:!0,...x}}),l.mount.add(u),b?Y({disabled:pe(x.disabled)?x.disabled:e.disabled,name:u}):R(u,!0,x.value),{...$?{disabled:x.disabled||e.disabled}:{},...e.progressive?{required:!!x.required,min:qe(x.min),max:qe(x.max),minLength:qe(x.minLength),maxLength:qe(x.maxLength),pattern:qe(x.pattern)}:{},name:u,onChange:q,onBlur:q,ref:T=>{if(T){ce(u,x),b=O(s,u);const _=re(T.value)&&T.querySelectorAll&&T.querySelectorAll("input,select,textarea")[0]||T,I=Tn(_),Q=b._f.refs||[];if(I?Q.find(te=>te===_):_===b._f.ref)return;K(s,u,{_f:{...b._f,...I?{refs:[...Q.filter(bt),_,...Array.isArray(O(n,u))?[{}]:[]],ref:{type:_.type,name:u}}:{ref:_}}}),R(u,!1,void 0,_)}else b=O(s,u,{}),b._f&&(b._f.mount=!1),(e.shouldUnregister||x.shouldUnregister)&&!(Ur(l.array,u)&&i.action)&&l.unMount.add(u)}}},Ne=()=>e.shouldFocusError&&Ye(s,J,l.mount),Ie=u=>{pe(u)&&(h.state.next({disabled:u}),Ye(s,(x,b)=>{const $=O(s,b);$&&(x.disabled=$._f.disabled||u,Array.isArray($._f.refs)&&$._f.refs.forEach(T=>{T.disabled=$._f.disabled||u}))},0,!1))},qt=(u,x)=>async b=>{let $;b&&(b.preventDefault&&b.preventDefault(),b.persist&&b.persist());let T=de(a);if(h.state.next({isSubmitting:!0}),e.resolver){const{errors:_,values:I}=await G();t.errors=_,T=I}else await Z(s);if(l.disabled.size)for(const _ of l.disabled)K(T,_,void 0);if(ie(t.errors,"root"),fe(t.errors)){h.state.next({errors:{}});try{await u(T,b)}catch(_){$=_}}else x&&await x({...t.errors},b),Ne(),setTimeout(Ne);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:fe(t.errors)&&!$,submitCount:t.submitCount+1,errors:t.errors}),$)throw $},Rs=(u,x={})=>{O(s,u)&&(re(x.defaultValue)?g(u,de(O(n,u))):(g(u,x.defaultValue),K(n,u,de(x.defaultValue))),x.keepTouched||ie(t.touchedFields,u),x.keepDirty||(ie(t.dirtyFields,u),t.isDirty=x.defaultValue?M(u,de(O(n,u))):M()),x.keepError||(ie(t.errors,u),d.isValid&&k()),h.state.next({...t}))},Ht=(u,x={})=>{const b=u?de(u):n,$=de(b),T=fe(u),_=T?n:$;if(x.keepDefaultValues||(n=b),!x.keepValues){if(x.keepDirtyValues){const I=new Set([...l.mount,...Object.keys(We(n,a))]);for(const Q of Array.from(I))O(t.dirtyFields,Q)?K(_,Q,O(a,Q)):g(Q,O(_,Q))}else{if(Rt&&re(u))for(const I of l.mount){const Q=O(s,I);if(Q&&Q._f){const te=Array.isArray(Q._f.refs)?Q._f.refs[0]:Q._f.ref;if(ut(te)){const ge=te.closest("form");if(ge){ge.reset();break}}}}for(const I of l.mount)g(I,O(_,I))}a=de(_),h.array.next({values:{..._}}),h.state.next({values:{..._}})}l={mount:x.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!d.isValid||!!x.keepIsValid||!!x.keepDirtyValues,i.watch=!!e.shouldUnregister,h.state.next({submitCount:x.keepSubmitCount?t.submitCount:0,isDirty:T?!1:x.keepDirty?t.isDirty:!!(x.keepDefaultValues&&!Ae(u,n)),isSubmitted:x.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:T?{}:x.keepDirtyValues?x.keepDefaultValues&&a?We(n,a):t.dirtyFields:x.keepDefaultValues&&u?We(n,u):x.keepDirty?t.dirtyFields:{},touchedFields:x.keepTouched?t.touchedFields:{},errors:x.keepErrors?t.errors:{},isSubmitSuccessful:x.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},Yt=(u,x)=>Ht(be(u)?u(a):u,x),Vs=(u,x={})=>{const b=O(s,u),$=b&&b._f;if($){const T=$.refs?$.refs[0]:$.ref;T.focus&&(T.focus(),x.shouldSelect&&be(T.select)&&T.select())}},Ms=u=>{t={...t,...u}},Gt={control:{register:ce,unregister:le,getFieldState:U,handleSubmit:qt,setError:ee,_subscribe:H,_runSchema:G,_getWatch:L,_getDirty:M,_setValid:k,_setFieldArray:y,_setDisabledField:Y,_setErrors:S,_getFieldArray:z,_reset:Ht,_resetDefaultValues:()=>be(e.defaultValues)&&e.defaultValues().then(u=>{Yt(u,e.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:W,_disableForm:Ie,_subjects:h,_proxyFormState:d,get _fields(){return s},get _formValues(){return a},get _state(){return i},set _state(u){i=u},get _defaultValues(){return n},get _names(){return l},set _names(u){l=u},get _formState(){return t},get _options(){return e},set _options(u){e={...e,...u}}},subscribe:oe,trigger:ae,register:ce,handleSubmit:qt,watch:ne,setValue:g,getValues:j,reset:Yt,resetField:Rs,clearErrors:X,unregister:le,setError:ee,setFocus:Vs,getFieldState:U};return{...Gt,formControl:Gt}}function Bn(r={}){const e=w.useRef(void 0),t=w.useRef(void 0),[s,n]=w.useState({isDirty:!1,isValidating:!1,isLoading:be(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:be(r.defaultValues)?void 0:r.defaultValues});e.current||(e.current={...r.formControl?r.formControl:Un(r),formState:s},r.formControl&&r.defaultValues&&!be(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const a=e.current.control;return a._options=r,Mt(()=>{const i=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(l=>({...l,isReady:!0})),a._formState.isReady=!0,i},[a]),w.useEffect(()=>a._disableForm(r.disabled),[a,r.disabled]),w.useEffect(()=>{r.mode&&(a._options.mode=r.mode),r.reValidateMode&&(a._options.reValidateMode=r.reValidateMode),r.errors&&!fe(r.errors)&&a._setErrors(r.errors)},[a,r.errors,r.mode,r.reValidateMode]),w.useEffect(()=>{r.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,r.shouldUnregister]),w.useEffect(()=>{if(a._proxyFormState.isDirty){const i=a._getDirty();i!==s.isDirty&&a._subjects.state.next({isDirty:i})}},[a,s.isDirty]),w.useEffect(()=>{r.values&&!Ae(r.values,t.current)?(a._reset(r.values,a._options.resetOptions),t.current=r.values,n(i=>({...i}))):a._resetDefaultValues()},[a,r.values]),w.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),e.current.formState=zr(s,a),e.current}const ts={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Zn={sm:"h-6",md:"h-10",lg:"h-12"},zn={sm:"px-2",md:"px-2.5",lg:"px-3"};function hr(r,e,t,s,n,a,i){const l=e?"datetime-local":"date";return o.jsxs(o.Fragment,{children:[o.jsx("input",{id:r,type:l,disabled:n,...s,className:D("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)]",ts[t],Zn[t],zn[t],a?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",n?"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)]",i)}),o.jsx("div",{children:a!=null&&a.message?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}function rs(r){const{control:e,name:t,rules:s,defaultValue:n,showTime:a=!1,size:i="sm",width:l="100%",label:c,labelHidden:f=!1,hasError:d=!1,errorMessage:m="",disabled:h=!1,className:v,onChange:E}=r,k=w.useId(),F=t||k;return o.jsxs("div",{className:D("flex flex-col",v),style:{width:l,maxWidth:"100%"},children:[c&&o.jsx("label",{htmlFor:F,className:D("pb-2 text-[var(--color-ds-text-primary)]",ts[i],f&&"sr-only"),children:c}),e&&t?o.jsx(we,{name:t,control:e,rules:s,defaultValue:n,render:({field:y,fieldState:p})=>hr(F,a,i,{value:y.value,onChange:y.onChange,onBlur:y.onBlur},h,p.error,v)}):hr(F,a,i,{defaultValue:n,onChange:E},h,d?{message:m}:void 0,v)]})}const Wn=({trigger:r,items:e,align:t="left",className:s})=>{const[n,a]=w.useState(!1),i=w.useRef(null),l=w.useRef([]);w.useEffect(()=>{const f=d=>{i.current&&!i.current.contains(d.target)&&a(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[]);const c=f=>{var m,h;const d=l.current.findIndex(v=>v===document.activeElement);if(f.key==="Escape")a(!1);else if(f.key==="ArrowDown"){f.preventDefault();const v=(d+1)%e.length;(m=l.current[v])==null||m.focus()}else if(f.key==="ArrowUp"){f.preventDefault();const v=(d-1+e.length)%e.length;(h=l.current[v])==null||h.focus()}};return o.jsxs("div",{className:D("relative inline-block",s),ref:i,children:[o.jsx("button",{type:"button",onClick:()=>a(f=>!f),className:"inline-flex items-center focus:outline-none","aria-haspopup":"menu","aria-expanded":n,children:r}),n&&o.jsx("div",{role:"menu","aria-orientation":"vertical",className:D("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,d)=>{const{label:m,onSelect:h,disabled:v,icon:E}=f;return o.jsxs("button",{role:"menuitem",type:"button",disabled:v,ref:k=>{l.current[d]=k},className:D("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",v?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{v||(h(),a(!1))},children:[E&&o.jsx(E,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),m]},d)})})]})},qn=(r,e,t,s)=>{var a,i,l,c;const n=[t,{code:e,...s||{}}];if((i=(a=r==null?void 0:r.services)==null?void 0:a.logger)!=null&&i.forward)return r.services.logger.forward(n,"warn","react-i18next::",!0);Re(n[0])&&(n[0]=`react-i18next:: ${n[0]}`),(c=(l=r==null?void 0:r.services)==null?void 0:l.logger)!=null&&c.warn?r.services.logger.warn(...n):console!=null&&console.warn&&console.warn(...n)},mr={},Ft=(r,e,t,s)=>{Re(t)&&mr[t]||(Re(t)&&(mr[t]=new Date),qn(r,e,t,s))},ss=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},St=(r,e,t)=>{r.loadNamespaces(e,ss(r,t))},xr=(r,e,t,s)=>{if(Re(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return St(r,t,s);t.forEach(n=>{r.options.ns.indexOf(n)<0&&r.options.ns.push(n)}),r.loadLanguages(e,ss(r,s))},Hn=(r,e,t={})=>!e.languages||!e.languages.length?(Ft(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(s,n)=>{var a;if(((a=t.bindI18n)==null?void 0:a.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!n(s.isLanguageChangingTo,r))return!1}}),Re=r=>typeof r=="string",Yn=r=>typeof r=="object"&&r!==null,Gn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Xn={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Jn=r=>Xn[r],Kn=r=>r.replace(Gn,Jn);let Qn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Kn};const ea=()=>Qn;let ta;const ra=()=>ta,sa=w.createContext();class na{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const aa=(r,e)=>{const t=w.useRef();return w.useEffect(()=>{t.current=r},[r,e]),t.current},ns=(r,e,t,s)=>r.getFixedT(e,t,s),ia=(r,e,t,s)=>w.useCallback(ns(r,e,t,s),[r,e,t,s]),Pt=(r,e={})=>{var R,C,P,G;const{i18n:t}=e,{i18n:s,defaultNS:n}=w.useContext(sa)||{},a=t||s||ra();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new na),!a){Ft(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const B=(W,M)=>Re(M)?M:Yn(M)&&Re(M.defaultValue)?M.defaultValue:Array.isArray(W)?W[W.length-1]:W,Z=[B,{},!1];return Z.t=B,Z.i18n={},Z.ready=!1,Z}(R=a.options.react)!=null&&R.wait&&Ft(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...ea(),...a.options.react,...e},{useSuspense:l,keyPrefix:c}=i;let f=n||((C=a.options)==null?void 0:C.defaultNS);f=Re(f)?[f]:f||["translation"],(G=(P=a.reportNamespaces).addUsedNamespaces)==null||G.call(P,f);const d=(a.isInitialized||a.initializedStoreOnce)&&f.every(B=>Hn(B,a,i)),m=ia(a,e.lng||null,i.nsMode==="fallback"?f:f[0],c),h=()=>m,v=()=>ns(a,e.lng||null,i.nsMode==="fallback"?f:f[0],c),[E,k]=w.useState(h);let F=f.join();e.lng&&(F=`${e.lng}${F}`);const y=aa(F),p=w.useRef(!0);w.useEffect(()=>{const{bindI18n:B,bindI18nStore:Z}=i;p.current=!0,!d&&!l&&(e.lng?xr(a,e.lng,f,()=>{p.current&&k(v)}):St(a,f,()=>{p.current&&k(v)})),d&&y&&y!==F&&p.current&&k(v);const W=()=>{p.current&&k(v)};return B&&(a==null||a.on(B,W)),Z&&(a==null||a.store.on(Z,W)),()=>{p.current=!1,a&&(B==null||B.split(" ").forEach(M=>a.off(M,W))),Z&&a&&Z.split(" ").forEach(M=>a.store.off(M,W))}},[a,F]),w.useEffect(()=>{p.current&&d&&k(h)},[a,c,d]);const S=[E,a,d];if(S.t=E,S.i18n=a,S.ready=d,d||!d&&!l)return S;throw new Promise(B=>{e.lng?xr(a,e.lng,f,()=>B()):St(a,f,()=>B())})},Tt={sm:"text-sm",md:"text-base",lg:"text-lg"};function pr(r,e,t,s,n,a,i,l,c){const{t:f}=Pt(),d=w.useRef(null),m=typeof s=="number"&&e.length>=s,h=()=>{var p;!i&&!m&&((p=d.current)==null||p.click())},v=p=>{const S=p.target.files;if(!S)return;const R=Array.from(S);let C=e.concat(R);s&&(C=C.slice(0,s)),t(C),p.target.value=""},E=p=>{if(p.preventDefault(),i||m)return;const S=Array.from(p.dataTransfer.files);let R=e.concat(S);s&&(R=R.slice(0,s)),t(R)},k=p=>{p.preventDefault()},F=p=>{const S=URL.createObjectURL(p);window.open(S)},y=p=>{const S=e.filter((R,C)=>C!==p);t(S)};return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"self-start mb-4 w-auto",children:o.jsx(Te,{type:"button",variant:"outline",size:a,icon:tr,onClick:h,disabled:i||m,children:f("ds.fileUploader.browse","Browse files")})}),!m&&o.jsxs("div",{className:D("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",i?"opacity-50 cursor-not-allowed":"hover:border-[var(--color-ds-border-default)]",Tt[a],c),onDrop:E,onDragOver:k,children:[o.jsx("input",{id:r,type:"file",ref:d,className:"hidden",multiple:s!==1,accept:n,onChange:v,disabled:i}),o.jsx(ke,{component:on,size:"md",className:"w-8 h-8 text-[var(--color-ds-text-secondary)]"}),o.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&&o.jsx("ul",{className:"mt-4 space-y-1",children:e.map((p,S)=>o.jsxs("li",{className:"flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx(tr,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),o.jsx("span",{className:"truncate pr-2",children:p.name})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Te,{variant:"ghost",size:"sm",icon:Lr,ariaLabel:f("ds.fileUploader.view","View"),onClick:()=>F(p)}),o.jsx(Te,{variant:"ghost",size:"sm",icon:Dt,ariaLabel:f("ds.fileUploader.remove","Remove"),onClick:()=>y(S)})]})]},S))}),o.jsx("div",{className:"pt-[5px] min-h-[18px] w-full",children:l!=null&&l.message?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}function as(r){const{control:e,name:t,rules:s,defaultValue:n,maxFiles:a,accept:i,size:l="sm",width:c="100%",label:f,labelHidden:d=!1,disabled:m=!1,hasError:h=!1,errorMessage:v="",className:E}=r,k=w.useId(),F=t||k;if(e&&t)return o.jsxs("div",{className:D("flex flex-col",E),style:{width:c},children:[f&&o.jsx("label",{htmlFor:F,className:D("pb-[10px] text-[var(--color-ds-text-primary)]",Tt[l],d&&"sr-only"),children:f}),o.jsx(we,{name:t,control:e,rules:s,defaultValue:n instanceof FileList?Array.from(n):n||[],render:({field:S,fieldState:R})=>pr(F,S.value,C=>S.onChange(C),a,i,l,m,R.error,E)})]});const[y,p]=w.useState(n instanceof FileList?Array.from(n):n||[]);return o.jsxs("div",{className:D("flex flex-col",E),style:{width:c},children:[f&&o.jsx("label",{htmlFor:F,className:D("pb-[10px] text-[var(--color-ds-text-primary)]",Tt[l],d&&"sr-only"),children:f}),pr(F,y,p,a,i,l,m,h?{message:v}:void 0,E)]})}const Me=({count:r=1,width:e,height:t="1em",variant:s="rect",className:n})=>{const a=Array.from({length:r});return o.jsx(o.Fragment,{children:a.map((i,l)=>o.jsx("span",{role:"status","aria-label":"Cargando...",className:D("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",n),style:{width:e??"auto",height:t}},l))})},et={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},oa={sm:"h-6",md:"h-10",lg:"h-12"},la={sm:"px-2",md:"px-2.5",lg:"px-3"},gr={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},ca={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function gt({id:r,type:e="text",size:t="sm",width:s="100%",label:n,labelHidden:a=!1,hasError:i=!1,errorMessage:l="",prefixIcon:c,suffixIcon:f,separator:d,suffixButton:m,disabled:h=!1,control:v,name:E,rules:k,defaultValue:F,loading:y=!1,className:p,...S}){const R=w.useId(),[C,P]=w.useState(!1),G=r||R,B=e==="password",W=c??(e==="number"?hn:void 0),M=B?C?un:Lr:f,L=D("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",et[t],oa[t],la[t],i?"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 y?o.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!a&&n&&o.jsx("label",{htmlFor:G,className:D("pb-2",et[t]),children:n}),o.jsx(Me,{width:"100%",height:ca[t],variant:"rect",className:"rounded-lg"}),o.jsx("div",{className:"min-h-[18px] w-full",children:o.jsx("span",{"aria-hidden":"true",children:" "})})]}):v&&E?o.jsx(we,{name:E,control:v,rules:k,defaultValue:F,render:({field:z,fieldState:N})=>o.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&o.jsx("label",{htmlFor:G,className:D("pb-2 text-[var(--color-ds-text-primary)]",et[t]),children:n}),o.jsxs("div",{className:"relative flex items-center w-full",children:[W&&o.jsx("div",{className:D("absolute left-0 flex items-center h-full",gr[t]),children:o.jsx(ke,{component:W,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),o.jsx("input",{...z,id:G,type:B?C?"text":"password":e,disabled:h,"aria-invalid":!!N.error,className:D(L,W&&"pl-9",M&&"pr-9",p),onInvalid:A=>A.preventDefault(),style:B&&!C?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),d&&o.jsx("div",{className:"flex items-center h-full",children:d}),m&&o.jsx("div",{className:"flex items-center h-full pr-2",children:m}),M&&o.jsx("button",{type:"button",onClick:()=>P(A=>!A),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:o.jsx(ke,{component:M,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),o.jsx("div",{className:"min-h-[18px]",children:N.error?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:N.error.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}):o.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&o.jsx("label",{htmlFor:G,className:D("pb-2 text-[var(--color-ds-text-primary)]",et[t]),children:n}),o.jsxs("div",{className:"relative flex items-center w-full",children:[W&&o.jsx("div",{className:D("absolute left-0 flex items-center h-full",gr[t]),children:o.jsx(ke,{component:W,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),o.jsx("input",{...S,id:G,type:B?C?"text":"password":e,disabled:h,"aria-invalid":i,className:D(L,W&&"pl-9",M&&"pr-9",p),onInvalid:z=>z.preventDefault(),style:B&&!C?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),d&&o.jsx("div",{className:"flex items-center h-full",children:d}),m&&o.jsx("div",{className:"flex items-center h-full",children:m}),M&&o.jsx("button",{type:"button",onClick:()=>P(z=>!z),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:o.jsx(ke,{component:M,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),o.jsx("div",{className:"min-h-[18px]",children:i&&l?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}const ua={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},wt=400,tt=8,is=({children:r,size:e="sm",position:t="top",className:s})=>{const[n,a]=w.useState(!1),[i,l]=w.useState({x:0,y:0}),c=w.useRef(null),f=w.useId();w.useEffect(()=>{if(n&&c.current){const h=c.current.getBoundingClientRect();let v=0,E=0;switch(t){case"top":v=h.left+h.width/2-wt/2,E=h.top-tt;break;case"bottom":v=h.left+h.width/2-wt/2,E=h.bottom+tt;break;case"left":v=h.left-wt-tt,E=h.top+h.height/2;break;case"right":v=h.right+tt,E=h.top+h.height/2;break}l({x:v,y:E})}},[n,t]);const d=()=>typeof r=="string"?o.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):o.jsx(o.Fragment,{children:r}),m=n?o.jsx("div",{id:f,role:"tooltip",className:D("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:`${i.y}px`,left:`${i.x}px`,transform:t==="left"||t==="right"?"translateY(-50%)":t==="top"?"translateY(-100%)":void 0},children:d()}):null;return o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button","aria-describedby":f,ref:c,className:D("inline-flex items-center justify-center focus:outline-none",ua[e],"text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]",s),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:o.jsx(xn,{className:"w-full h-full"})}),Rr.createPortal(m,document.body)]})};function da({name:r,label:e,type:t="text",size:s="sm",width:n,placeholder:a,validation:i,loadingDefaults:l,disabled:c,info:f}){var F;const{control:d,formState:{errors:m}}=pt(),h=!!m[r],v=((F=m[r])==null?void 0:F.message)||"",E="relative",k=n??"w-full";return o.jsxs("div",{className:E,children:[o.jsx(we,{name:r,control:d,rules:i,render:({field:y})=>o.jsx(gt,{label:e,size:s,width:k,placeholder:a,hasError:h,errorMessage:v,loading:l,type:t,...y,disabled:c})}),f&&o.jsx(is,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:f})]})}const Ut=w.memo(da);Ut.displayName="FormFieldInput";function fa({title:r,headerButtons:e,children:t,className:s}){return o.jsxs("div",{className:D("flex flex-col h-full",s),children:[o.jsxs("div",{className:"flex items-center justify-between py-4",children:[o.jsx("div",{className:`bg-[var(--color-ds-background-accent)] \r
|
|
22
|
+
<%s key={someKey} {...props} />`,G,Q,K,Q),re[Q+G]=!0)}if(Q=null,M!==void 0&&(t(M),Q=""+M),i(N)&&(t(N.key),Q=""+N.key),"key"in N){M={};for(var pe in N)pe!=="key"&&(M[pe]=N[pe])}else M=N;return Q&&l(M,typeof x=="function"?x.displayName||x.name||"Unknown":x),d(x,Q,ae,ne,n(),M,Y,ie)}function h(x){typeof x=="object"&&x!==null&&x.$$typeof===g&&x._store&&(x._store.validated=1)}var m=b,g=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),k=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),U=Symbol.for("react.client.reference"),R=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,B=Array.isArray,W=console.createTask?console.createTask:function(){return null};m={"react-stack-bottom-frame":function(x){return x()}};var X,H={},E=m["react-stack-bottom-frame"].bind(m,a)(),J=W(s(a)),re={};We.Fragment=j,We.jsx=function(x,N,M,G,ne){var ae=1e4>R.recentlyCreatedOwnerStacks++;return f(x,N,M,!1,G,ne,ae?Error("react-stack-top-frame"):E,ae?W(s(x)):J)},We.jsxs=function(x,N,M,G,ne){var ae=1e4>R.recentlyCreatedOwnerStacks++;return f(x,N,M,!0,G,ne,ae?Error("react-stack-top-frame"):E,ae?W(s(x)):J)}}()),We}var er;function Ws(){return er||(er=1,process.env.NODE_ENV==="production"?tt.exports=Zs():tt.exports=zs()),tt.exports}var o=Ws();function Vr(r){var e,t,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=Vr(r[e]))&&(s&&(s+=" "),s+=t)}else for(t in r)r[t]&&(s&&(s+=" "),s+=t);return s}function D(){for(var r,e,t=0,s="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=Vr(r))&&(s&&(s+=" "),s+=e);return s}const qs={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 Ee({component:r,size:e="sm",className:t,...s}){return o.jsx(r,{className:D(qs[e],t),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const Hs="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Ys={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"},Gs={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"},Xs={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},Js="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 Te({type:r="button",variant:e="primary",size:t="sm",width:s,disabled:n=!1,icon:a,iconPosition:i="left",ariaLabel:l,children:c,onClick:d,className:f}){const h=!!a,m=h&&!c,g=m?Xs[t]:Gs[t];return o.jsxs("button",{type:r,onClick:d,disabled:n,"aria-label":m?l:void 0,style:s?{width:s}:void 0,className:D(Hs,Ys[e],g,Js,f,h&&c&&"gap-2"),children:[a&&i==="left"&&o.jsx(Ee,{component:a,size:t}),c,a&&i==="right"&&o.jsx(Ee,{component:a,size:t})]})}function Ks({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 Qs=V.forwardRef(Ks);function en({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 Mr=V.forwardRef(en);function tn({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 rn=V.forwardRef(tn);function sn({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 nn=V.forwardRef(sn);function an({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 on=V.forwardRef(an);function ln({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 tr=V.forwardRef(ln);function cn({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 un=V.forwardRef(cn);function dn({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 Lr=V.forwardRef(dn);function fn({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 hn=V.forwardRef(fn);function mn({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 xn=V.forwardRef(mn);function pn({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 gn=V.forwardRef(pn);function vn({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 bn=V.forwardRef(vn);function yn({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 wn=V.forwardRef(yn);function jn({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 kn=V.forwardRef(jn);function En({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 Rt=V.forwardRef(En);function Nt({title:r,children:e,defaultOpen:t=!0,className:s}){const[n,a]=b.useState(t),i=b.useRef(null),l=b.useRef(null),[c,d]=b.useState(0),f=()=>{if(l.current){const h=l.current.scrollHeight;d(h)}};return b.useLayoutEffect(()=>{f()},[n]),b.useEffect(()=>{const h=l.current;if(!h)return;const m=new ResizeObserver(()=>{f()});return m.observe(h),()=>{m.disconnect()}},[]),o.jsxs("div",{className:D("flex flex-col w-full gap-3",s),children:[o.jsxs("button",{type:"button",onClick:()=>a(h=>!h),className:"flex items-center justify-between w-full hover:bg-[var(--color-ds-surface-hover)] transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"block w-1 h-5 bg-[var(--color-ds-background-accent)] rounded-sm"}),o.jsx("span",{className:"font-semibold text-[var(--color-ds-text-primary)]",children:r})]}),n?o.jsx(nn,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):o.jsx(Mr,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),o.jsx("div",{className:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",children:o.jsx("div",{className:"px-6",children:o.jsx("div",{ref:i,className:D("overflow-hidden transition-all duration-300 ease-in-out",n?"opacity-100":"opacity-0"),style:{maxHeight:n?`${c}px`:"0px"},children:o.jsx("div",{ref:l,className:"py-4",children:e})})})})]})}var Je=r=>r.type==="checkbox",De=r=>r instanceof Date,he=r=>r==null;const Ir=r=>typeof r=="object";var le=r=>!he(r)&&!Array.isArray(r)&&Ir(r)&&!De(r),Pr=r=>le(r)&&r.target?Je(r.target)?r.target.checked:r.target.value:r,_n=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,Ur=(r,e)=>r.has(_n(e)),Nn=r=>{const e=r.constructor&&r.constructor.prototype;return le(e)&&e.hasOwnProperty("isPrototypeOf")},Vt=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(!(Vt&&(r instanceof Blob||s))&&(t||le(r)))if(e=t?[]:{},!t&&!Nn(r))e=r;else for(const n in r)r.hasOwnProperty(n)&&(e[n]=de(r[n]));else return r;return e}var gt=r=>Array.isArray(r)?r.filter(Boolean):[],oe=r=>r===void 0,C=(r,e,t)=>{if(!e||!le(r))return t;const s=gt(e.split(/[,[\].]+?/)).reduce((n,a)=>he(n)?n:n[a],r);return oe(s)||s===r?oe(r[e])?t:r[e]:s},ge=r=>typeof r=="boolean",Mt=r=>/^\w*$/.test(r),Br=r=>gt(r.replace(/["|']|\]/g,"").split(/\.|\[/)),ee=(r,e,t)=>{let s=-1;const n=Mt(e)?[e]:Br(e),a=n.length,i=a-1;for(;++s<a;){const l=n[s];let c=t;if(s!==i){const d=r[l];c=le(d)||Array.isArray(d)?d:isNaN(+n[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const dt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ye={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ne={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Zr=b.createContext(null),Ke=()=>b.useContext(Zr),Fn=r=>{const{children:e,...t}=r;return b.createElement(Zr.Provider,{value:t},e)};var zr=(r,e,t,s=!0)=>{const n={defaultValues:e._defaultValues};for(const a in r)Object.defineProperty(n,a,{get:()=>{const i=a;return e._proxyFormState[i]!==ye.all&&(e._proxyFormState[i]=!s||ye.all),t&&(t[i]=!0),r[i]}});return n};const Lt=typeof window<"u"?V.useLayoutEffect:V.useEffect;function Sn(r){const e=Ke(),{control:t=e.control,disabled:s,name:n,exact:a}=r||{},[i,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 Lt(()=>t._subscribe({name:n,formState:c.current,exact:a,callback:d=>{!s&&l({...t._formState,...d})}}),[n,s,a]),b.useEffect(()=>{c.current.isValid&&t._setValid(!0)},[t]),b.useMemo(()=>zr(i,t,c.current,!1),[i,t])}var _e=r=>typeof r=="string",Wr=(r,e,t,s,n)=>_e(r)?(s&&e.watch.add(r),C(t,r,n)):Array.isArray(r)?r.map(a=>(s&&e.watch.add(a),C(t,a))):(s&&(e.watchAll=!0),t);function qr(r){const e=Ke(),{control:t=e.control,name:s,defaultValue:n,disabled:a,exact:i}=r||{},l=b.useRef(n),[c,d]=b.useState(t._getWatch(s,l.current));return Lt(()=>t._subscribe({name:s,formState:{values:!0},exact:i,callback:f=>!a&&d(Wr(s,t._names,f.values||t._formValues,!1,l.current))}),[s,t,a,i]),b.useEffect(()=>t._removeUnmounted()),c}function Hr(r){const e=Ke(),{name:t,disabled:s,control:n=e.control,shouldUnregister:a}=r,i=Ur(n._names.array,t),l=qr({control:n,name:t,defaultValue:C(n._formValues,t,C(n._defaultValues,t,r.defaultValue)),exact:!0}),c=Sn({control:n,name:t,exact:!0}),d=b.useRef(r),f=b.useRef(n.register(t,{...r.rules,value:l,...ge(r.disabled)?{disabled:r.disabled}:{}})),h=b.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!C(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!C(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!C(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!C(c.validatingFields,t)},error:{enumerable:!0,get:()=>C(c.errors,t)}}),[c,t]),m=b.useCallback(T=>f.current.onChange({target:{value:Pr(T),name:t},type:dt.CHANGE}),[t]),g=b.useCallback(()=>f.current.onBlur({target:{value:C(n._formValues,t),name:t},type:dt.BLUR}),[t,n._formValues]),F=b.useCallback(T=>{const y=C(n._fields,t);y&&T&&(y._f.ref={focus:()=>T.focus(),select:()=>T.select(),setCustomValidity:v=>T.setCustomValidity(v),reportValidity:()=>T.reportValidity()})},[n._fields,t]),j=b.useMemo(()=>({name:t,value:l,...ge(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:m,onBlur:g,ref:F}),[t,s,c.disabled,m,g,F,l]);return b.useEffect(()=>{const T=n._options.shouldUnregister||a;n.register(t,{...d.current.rules,...ge(d.current.disabled)?{disabled:d.current.disabled}:{}});const y=(v,k)=>{const A=C(n._fields,v);A&&A._f&&(A._f.mount=k)};if(y(t,!0),T){const v=de(C(n._options.defaultValues,t));ee(n._defaultValues,t,v),oe(C(n._formValues,t))&&ee(n._formValues,t,v)}return!i&&n.register(t),()=>{(i?T&&!n._state.action:T)?n.unregister(t):y(t,!1)}},[t,n,i,a]),b.useEffect(()=>{n._setDisabledField({disabled:s,name:t})},[s,t,n]),b.useMemo(()=>({field:j,formState:c,fieldState:h}),[j,c,h])}const je=r=>r.render(Hr(r));var Yr=(r,e,t,s,n)=>e?{...t[r],types:{...t[r]&&t[r].types?t[r].types:{},[s]:n||!0}}:{},Ye=r=>Array.isArray(r)?r:[r],rr=()=>{let r=[];return{get observers(){return r},next:n=>{for(const a of r)a.next&&a.next(n)},subscribe:n=>(r.push(n),{unsubscribe:()=>{r=r.filter(a=>a!==n)}}),unsubscribe:()=>{r=[]}}},Ft=r=>he(r)||!Ir(r);function Ae(r,e){if(Ft(r)||Ft(e))return r===e;if(De(r)&&De(e))return r.getTime()===e.getTime();const t=Object.keys(r),s=Object.keys(e);if(t.length!==s.length)return!1;for(const n of t){const a=r[n];if(!s.includes(n))return!1;if(n!=="ref"){const i=e[n];if(De(a)&&De(i)||le(a)&&le(i)||Array.isArray(a)&&Array.isArray(i)?!Ae(a,i):a!==i)return!1}}return!0}var fe=r=>le(r)&&!Object.keys(r).length,It=r=>r.type==="file",we=r=>typeof r=="function",ft=r=>{if(!Vt)return!1;const e=r?r.ownerDocument:0;return r instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},Gr=r=>r.type==="select-multiple",Pt=r=>r.type==="radio",Tn=r=>Pt(r)||Je(r),wt=r=>ft(r)&&r.isConnected;function On(r,e){const t=e.slice(0,-1).length;let s=0;for(;s<t;)r=oe(r)?s++:r[e[s++]];return r}function Cn(r){for(const e in r)if(r.hasOwnProperty(e)&&!oe(r[e]))return!1;return!0}function ce(r,e){const t=Array.isArray(e)?e:Mt(e)?[e]:Br(e),s=t.length===1?r:On(r,t),n=t.length-1,a=t[n];return s&&delete s[a],n!==0&&(le(s)&&fe(s)||Array.isArray(s)&&Cn(s))&&ce(r,t.slice(0,-1)),r}var Xr=r=>{for(const e in r)if(we(r[e]))return!0;return!1};function ht(r,e={}){const t=Array.isArray(r);if(le(r)||t)for(const s in r)Array.isArray(r[s])||le(r[s])&&!Xr(r[s])?(e[s]=Array.isArray(r[s])?[]:{},ht(r[s],e[s])):he(r[s])||(e[s]=!0);return e}function Jr(r,e,t){const s=Array.isArray(r);if(le(r)||s)for(const n in r)Array.isArray(r[n])||le(r[n])&&!Xr(r[n])?oe(e)||Ft(t[n])?t[n]=Array.isArray(r[n])?ht(r[n],[]):{...ht(r[n])}:Jr(r[n],he(e)?{}:e[n],t[n]):t[n]=!Ae(r[n],e[n]);return t}var qe=(r,e)=>Jr(r,e,ht(e));const sr={value:!1,isValid:!1},nr={value:!0,isValid:!0};var Kr=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&&!oe(r[0].attributes.value)?oe(r[0].value)||r[0].value===""?nr:{value:r[0].value,isValid:!0}:nr:sr}return sr},Qr=(r,{valueAsNumber:e,valueAsDate:t,setValueAs:s})=>oe(r)?r:e?r===""?NaN:r&&+r:t&&_e(r)?new Date(r):s?s(r):r;const ar={isValid:!1,value:null};var es=r=>Array.isArray(r)?r.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,ar):ar;function ir(r){const e=r.ref;return It(e)?e.files:Pt(e)?es(r.refs).value:Gr(e)?[...e.selectedOptions].map(({value:t})=>t):Je(e)?Kr(r.refs).value:Qr(oe(e.value)?r.ref.value:e.value,r)}var An=(r,e,t,s)=>{const n={};for(const a of r){const i=C(e,a);i&&ee(n,a,i._f)}return{criteriaMode:t,names:[...r],fields:n,shouldUseNativeValidation:s}},mt=r=>r instanceof RegExp,He=r=>oe(r)?r:mt(r)?r.source:le(r)?mt(r.value)?r.value.source:r.value:r,or=r=>({isOnSubmit:!r||r===ye.onSubmit,isOnBlur:r===ye.onBlur,isOnChange:r===ye.onChange,isOnAll:r===ye.all,isOnTouch:r===ye.onTouched});const lr="AsyncFunction";var $n=r=>!!r&&!!r.validate&&!!(we(r.validate)&&r.validate.constructor.name===lr||le(r.validate)&&Object.values(r.validate).find(e=>e.constructor.name===lr)),Dn=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),cr=(r,e,t)=>!t&&(e.watchAll||e.watch.has(r)||[...e.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const Ge=(r,e,t,s)=>{for(const n of t||Object.keys(r)){const a=C(r,n);if(a){const{_f:i,...l}=a;if(i){if(i.refs&&i.refs[0]&&e(i.refs[0],n)&&!s)return!0;if(i.ref&&e(i.ref,i.name)&&!s)return!0;if(Ge(l,e))break}else if(le(l)&&Ge(l,e))break}}};function ur(r,e,t){const s=C(r,t);if(s||Mt(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),i=C(e,a),l=C(r,a);if(i&&!Array.isArray(i)&&t!==a)return{name:t};if(l&&l.type)return{name:a,error:l};n.pop()}return{name:t}}var Rn=(r,e,t,s)=>{t(r);const{name:n,...a}=r;return fe(a)||Object.keys(a).length>=Object.keys(e).length||Object.keys(a).find(i=>e[i]===(!s||ye.all))},Vn=(r,e,t)=>!r||!e||r===e||Ye(r).some(s=>s&&(t?s===e:s.startsWith(e)||e.startsWith(s))),Mn=(r,e,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(e||r):(t?s.isOnBlur:n.isOnBlur)?!r:(t?s.isOnChange:n.isOnChange)?r:!0,Ln=(r,e)=>!gt(C(r,e)).length&&ce(r,e),In=(r,e,t)=>{const s=Ye(C(r,t));return ee(s,"root",e[t]),ee(r,t,s),r},ot=r=>_e(r);function dr(r,e,t="validate"){if(ot(r)||Array.isArray(r)&&r.every(ot)||ge(r)&&!r)return{type:t,message:ot(r)?r:"",ref:e}}var Pe=r=>le(r)&&!mt(r)?r:{value:r,message:""},fr=async(r,e,t,s,n,a)=>{const{ref:i,refs:l,required:c,maxLength:d,minLength:f,min:h,max:m,pattern:g,validate:F,name:j,valueAsNumber:T,mount:y}=r._f,v=C(t,j);if(!y||e.has(j))return{};const k=l?l[0]:i,A=L=>{n&&k.reportValidity&&(k.setCustomValidity(ge(L)?"":L||""),k.reportValidity())},S={},I=Pt(i),q=Je(i),Z=I||q,z=(T||It(i))&&oe(i.value)&&oe(v)||ft(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,U=Yr.bind(null,j,s,S),R=(L,B,W,X=Ne.maxLength,H=Ne.minLength)=>{const E=L?B:W;S[j]={type:L?X:H,message:E,ref:i,...U(L?X:H,E)}};if(a?!Array.isArray(v)||!v.length:c&&(!Z&&(z||he(v))||ge(v)&&!v||q&&!Kr(l).isValid||I&&!es(l).isValid)){const{value:L,message:B}=ot(c)?{value:!!c,message:c}:Pe(c);if(L&&(S[j]={type:Ne.required,message:B,ref:k,...U(Ne.required,B)},!s))return A(B),S}if(!z&&(!he(h)||!he(m))){let L,B;const W=Pe(m),X=Pe(h);if(!he(v)&&!isNaN(v)){const H=i.valueAsNumber||v&&+v;he(W.value)||(L=H>W.value),he(X.value)||(B=H<X.value)}else{const H=i.valueAsDate||new Date(v),E=x=>new Date(new Date().toDateString()+" "+x),J=i.type=="time",re=i.type=="week";_e(W.value)&&v&&(L=J?E(v)>E(W.value):re?v>W.value:H>new Date(W.value)),_e(X.value)&&v&&(B=J?E(v)<E(X.value):re?v<X.value:H<new Date(X.value))}if((L||B)&&(R(!!L,W.message,X.message,Ne.max,Ne.min),!s))return A(S[j].message),S}if((d||f)&&!z&&(_e(v)||a&&Array.isArray(v))){const L=Pe(d),B=Pe(f),W=!he(L.value)&&v.length>+L.value,X=!he(B.value)&&v.length<+B.value;if((W||X)&&(R(W,L.message,B.message),!s))return A(S[j].message),S}if(g&&!z&&_e(v)){const{value:L,message:B}=Pe(g);if(mt(L)&&!v.match(L)&&(S[j]={type:Ne.pattern,message:B,ref:i,...U(Ne.pattern,B)},!s))return A(B),S}if(F){if(we(F)){const L=await F(v,t),B=dr(L,k);if(B&&(S[j]={...B,...U(Ne.validate,B.message)},!s))return A(B.message),S}else if(le(F)){let L={};for(const B in F){if(!fe(L)&&!s)break;const W=dr(await F[B](v,t),k,B);W&&(L={...W,...U(B,W.message)},A(W.message),s&&(S[j]=L))}if(!fe(L)&&(S[j]={ref:k,...L},!s))return S}}return A(!0),S};const Pn={mode:ye.onSubmit,reValidateMode:ye.onChange,shouldFocusError:!0};function Un(r={}){let e={...Pn,...r},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:we(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 n=le(e.defaultValues)||le(e.values)?de(e.defaultValues||e.values)||{}:{},a=e.shouldUnregister?{}:de(n),i={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...f};const m={array:rr(),state:rr()},g=e.criteriaMode===ye.all,F=u=>p=>{clearTimeout(d),d=setTimeout(u,p)},j=async u=>{if(!e.disabled&&(f.isValid||h.isValid||u)){const p=e.resolver?fe((await q()).errors):await z(s,!0);p!==t.isValid&&m.state.next({isValid:p})}},T=(u,p)=>{!e.disabled&&(f.isValidating||f.validatingFields||h.isValidating||h.validatingFields)&&((u||Array.from(l.mount)).forEach(w=>{w&&(p?ee(t.validatingFields,w,p):ce(t.validatingFields,w))}),m.state.next({validatingFields:t.validatingFields,isValidating:!fe(t.validatingFields)}))},y=(u,p=[],w,$,O=!0,_=!0)=>{if($&&w&&!e.disabled){if(i.action=!0,_&&Array.isArray(C(s,u))){const P=w(C(s,u),$.argA,$.argB);O&&ee(s,u,P)}if(_&&Array.isArray(C(t.errors,u))){const P=w(C(t.errors,u),$.argA,$.argB);O&&ee(t.errors,u,P),Ln(t.errors,u)}if((f.touchedFields||h.touchedFields)&&_&&Array.isArray(C(t.touchedFields,u))){const P=w(C(t.touchedFields,u),$.argA,$.argB);O&&ee(t.touchedFields,u,P)}(f.dirtyFields||h.dirtyFields)&&(t.dirtyFields=qe(n,a)),m.state.next({name:u,isDirty:R(u,p),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else ee(a,u,p)},v=(u,p)=>{ee(t.errors,u,p),m.state.next({errors:t.errors})},k=u=>{t.errors=u,m.state.next({errors:t.errors,isValid:!1})},A=(u,p,w,$)=>{const O=C(s,u);if(O){const _=C(a,u,oe(w)?C(n,u):w);oe(_)||$&&$.defaultChecked||p?ee(a,u,p?_:ir(O._f)):W(u,_),i.mount&&j()}},S=(u,p,w,$,O)=>{let _=!1,P=!1;const te={name:u};if(!e.disabled){if(!w||$){(f.isDirty||h.isDirty)&&(P=t.isDirty,t.isDirty=te.isDirty=R(),_=P!==te.isDirty);const se=Ae(C(n,u),p);P=!!C(t.dirtyFields,u),se?ce(t.dirtyFields,u):ee(t.dirtyFields,u,!0),te.dirtyFields=t.dirtyFields,_=_||(f.dirtyFields||h.dirtyFields)&&P!==!se}if(w){const se=C(t.touchedFields,u);se||(ee(t.touchedFields,u,w),te.touchedFields=t.touchedFields,_=_||(f.touchedFields||h.touchedFields)&&se!==w)}_&&O&&m.state.next(te)}return _?te:{}},I=(u,p,w,$)=>{const O=C(t.errors,u),_=(f.isValid||h.isValid)&&ge(p)&&t.isValid!==p;if(e.delayError&&w?(c=F(()=>v(u,w)),c(e.delayError)):(clearTimeout(d),c=null,w?ee(t.errors,u,w):ce(t.errors,u)),(w?!Ae(O,w):O)||!fe($)||_){const P={...$,..._&&ge(p)?{isValid:p}:{},errors:t.errors,name:u};t={...t,...P},m.state.next(P)}},q=async u=>{T(u,!0);const p=await e.resolver(a,e.context,An(u||l.mount,s,e.criteriaMode,e.shouldUseNativeValidation));return T(u),p},Z=async u=>{const{errors:p}=await q(u);if(u)for(const w of u){const $=C(p,w);$?ee(t.errors,w,$):ce(t.errors,w)}else t.errors=p;return p},z=async(u,p,w={valid:!0})=>{for(const $ in u){const O=u[$];if(O){const{_f:_,...P}=O;if(_){const te=l.array.has(_.name),se=O._f&&$n(O._f);se&&f.validatingFields&&T([$],!0);const ve=await fr(O,l.disabled,a,g,e.shouldUseNativeValidation&&!p,te);if(se&&f.validatingFields&&T([$]),ve[_.name]&&(w.valid=!1,p))break;!p&&(C(ve,_.name)?te?In(t.errors,ve,_.name):ee(t.errors,_.name,ve[_.name]):ce(t.errors,_.name))}!fe(P)&&await z(P,p,w)}}return w.valid},U=()=>{for(const u of l.unMount){const p=C(s,u);p&&(p._f.refs?p._f.refs.every(w=>!wt(w)):!wt(p._f.ref))&&ie(u)}l.unMount=new Set},R=(u,p)=>!e.disabled&&(u&&p&&ee(a,u,p),!Ae(x(),n)),L=(u,p,w)=>Wr(u,l,{...i.mount?a:oe(p)?n:_e(u)?{[u]:p}:p},w,p),B=u=>gt(C(i.mount?a:n,u,e.shouldUnregister?C(n,u,[]):[])),W=(u,p,w={})=>{const $=C(s,u);let O=p;if($){const _=$._f;_&&(!_.disabled&&ee(a,u,Qr(p,_)),O=ft(_.ref)&&he(p)?"":p,Gr(_.ref)?[..._.ref.options].forEach(P=>P.selected=O.includes(P.value)):_.refs?Je(_.ref)?_.refs.forEach(P=>{(!P.defaultChecked||!P.disabled)&&(Array.isArray(O)?P.checked=!!O.find(te=>te===P.value):P.checked=O===P.value||!!O)}):_.refs.forEach(P=>P.checked=P.value===O):It(_.ref)?_.ref.value="":(_.ref.value=O,_.ref.type||m.state.next({name:u,values:de(a)})))}(w.shouldDirty||w.shouldTouch)&&S(u,O,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&re(u)},X=(u,p,w)=>{for(const $ in p){if(!p.hasOwnProperty($))return;const O=p[$],_=`${u}.${$}`,P=C(s,_);(l.array.has(u)||le(O)||P&&!P._f)&&!De(O)?X(_,O,w):W(_,O,w)}},H=(u,p,w={})=>{const $=C(s,u),O=l.array.has(u),_=de(p);ee(a,u,_),O?(m.array.next({name:u,values:de(a)}),(f.isDirty||f.dirtyFields||h.isDirty||h.dirtyFields)&&w.shouldDirty&&m.state.next({name:u,dirtyFields:qe(n,a),isDirty:R(u,_)})):$&&!$._f&&!he(_)?X(u,_,w):W(u,_,w),cr(u,l)&&m.state.next({...t}),m.state.next({name:i.mount?u:void 0,values:de(a)})},E=async u=>{i.mount=!0;const p=u.target;let w=p.name,$=!0;const O=C(s,w),_=se=>{$=Number.isNaN(se)||De(se)&&isNaN(se.getTime())||Ae(se,C(a,w,se))},P=or(e.mode),te=or(e.reValidateMode);if(O){let se,ve;const et=p.type?ir(O._f):Pr(u),Oe=u.type===dt.BLUR||u.type===dt.FOCUS_OUT,Ls=!Dn(O._f)&&!e.resolver&&!C(t.errors,w)&&!O._f.deps||Mn(Oe,C(t.touchedFields,w),t.isSubmitted,te,P),bt=cr(w,l,Oe);ee(a,w,et),Oe?(O._f.onBlur&&O._f.onBlur(u),c&&c(0)):O._f.onChange&&O._f.onChange(u);const yt=S(w,et,Oe),Is=!fe(yt)||bt;if(!Oe&&m.state.next({name:w,type:u.type,values:de(a)}),Ls)return(f.isValid||h.isValid)&&(e.mode==="onBlur"?Oe&&j():Oe||j()),Is&&m.state.next({name:w,...bt?{}:yt});if(!Oe&&bt&&m.state.next({...t}),e.resolver){const{errors:Xt}=await q([w]);if(_(et),$){const Ps=ur(t.errors,s,w),Jt=ur(Xt,s,Ps.name||w);se=Jt.error,w=Jt.name,ve=fe(Xt)}}else T([w],!0),se=(await fr(O,l.disabled,a,g,e.shouldUseNativeValidation))[w],T([w]),_(et),$&&(se?ve=!1:(f.isValid||h.isValid)&&(ve=await z(s,!0)));$&&(O._f.deps&&re(O._f.deps),I(w,ve,se,yt))}},J=(u,p)=>{if(C(t.errors,p)&&u.focus)return u.focus(),1},re=async(u,p={})=>{let w,$;const O=Ye(u);if(e.resolver){const _=await Z(oe(u)?u:O);w=fe(_),$=u?!O.some(P=>C(_,P)):w}else u?($=(await Promise.all(O.map(async _=>{const P=C(s,_);return await z(P&&P._f?{[_]:P}:P)}))).every(Boolean),!(!$&&!t.isValid)&&j()):$=w=await z(s);return m.state.next({...!_e(u)||(f.isValid||h.isValid)&&w!==t.isValid?{}:{name:u},...e.resolver||!u?{isValid:w}:{},errors:t.errors}),p.shouldFocus&&!$&&Ge(s,J,u?O:l.mount),$},x=u=>{const p={...i.mount?a:n};return oe(u)?p:_e(u)?C(p,u):u.map(w=>C(p,w))},N=(u,p)=>({invalid:!!C((p||t).errors,u),isDirty:!!C((p||t).dirtyFields,u),error:C((p||t).errors,u),isValidating:!!C(t.validatingFields,u),isTouched:!!C((p||t).touchedFields,u)}),M=u=>{u&&Ye(u).forEach(p=>ce(t.errors,p)),m.state.next({errors:u?t.errors:{}})},G=(u,p,w)=>{const $=(C(s,u,{_f:{}})._f||{}).ref,O=C(t.errors,u)||{},{ref:_,message:P,type:te,...se}=O;ee(t.errors,u,{...se,...p,ref:$}),m.state.next({name:u,errors:t.errors,isValid:!1}),w&&w.shouldFocus&&$&&$.focus&&$.focus()},ne=(u,p)=>we(u)?m.state.subscribe({next:w=>u(L(void 0,p),w)}):L(u,p,!0),ae=u=>m.state.subscribe({next:p=>{Vn(u.name,p.name,u.exact)&&Rn(p,u.formState||f,Ms,u.reRenderRoot)&&u.callback({values:{...a},...t,...p})}}).unsubscribe,Y=u=>(i.mount=!0,h={...h,...u.formState},ae({...u,formState:h})),ie=(u,p={})=>{for(const w of u?Ye(u):l.mount)l.mount.delete(w),l.array.delete(w),p.keepValue||(ce(s,w),ce(a,w)),!p.keepError&&ce(t.errors,w),!p.keepDirty&&ce(t.dirtyFields,w),!p.keepTouched&&ce(t.touchedFields,w),!p.keepIsValidating&&ce(t.validatingFields,w),!e.shouldUnregister&&!p.keepDefaultValue&&ce(n,w);m.state.next({values:de(a)}),m.state.next({...t,...p.keepDirty?{isDirty:R()}:{}}),!p.keepIsValid&&j()},Q=({disabled:u,name:p})=>{(ge(u)&&i.mount||u||l.disabled.has(p))&&(u?l.disabled.add(p):l.disabled.delete(p))},K=(u,p={})=>{let w=C(s,u);const $=ge(p.disabled)||ge(e.disabled);return ee(s,u,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:u}},name:u,mount:!0,...p}}),l.mount.add(u),w?Q({disabled:ge(p.disabled)?p.disabled:e.disabled,name:u}):A(u,!0,p.value),{...$?{disabled:p.disabled||e.disabled}:{},...e.progressive?{required:!!p.required,min:He(p.min),max:He(p.max),minLength:He(p.minLength),maxLength:He(p.maxLength),pattern:He(p.pattern)}:{},name:u,onChange:E,onBlur:E,ref:O=>{if(O){K(u,p),w=C(s,u);const _=oe(O.value)&&O.querySelectorAll&&O.querySelectorAll("input,select,textarea")[0]||O,P=Tn(_),te=w._f.refs||[];if(P?te.find(se=>se===_):_===w._f.ref)return;ee(s,u,{_f:{...w._f,...P?{refs:[...te.filter(wt),_,...Array.isArray(C(n,u))?[{}]:[]],ref:{type:_.type,name:u}}:{ref:_}}}),A(u,!1,void 0,_)}else w=C(s,u,{}),w._f&&(w._f.mount=!1),(e.shouldUnregister||p.shouldUnregister)&&!(Ur(l.array,u)&&i.action)&&l.unMount.add(u)}}},pe=()=>e.shouldFocusError&&Ge(s,J,l.mount),Ie=u=>{ge(u)&&(m.state.next({disabled:u}),Ge(s,(p,w)=>{const $=C(s,w);$&&(p.disabled=$._f.disabled||u,Array.isArray($._f.refs)&&$._f.refs.forEach(O=>{O.disabled=$._f.disabled||u}))},0,!1))},Ze=(u,p)=>async w=>{let $;w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let O=de(a);if(m.state.next({isSubmitting:!0}),e.resolver){const{errors:_,values:P}=await q();t.errors=_,O=P}else await z(s);if(l.disabled.size)for(const _ of l.disabled)ee(O,_,void 0);if(ce(t.errors,"root"),fe(t.errors)){m.state.next({errors:{}});try{await u(O,w)}catch(_){$=_}}else p&&await p({...t.errors},w),pe(),setTimeout(pe);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:fe(t.errors)&&!$,submitCount:t.submitCount+1,errors:t.errors}),$)throw $},Rs=(u,p={})=>{C(s,u)&&(oe(p.defaultValue)?H(u,de(C(n,u))):(H(u,p.defaultValue),ee(n,u,de(p.defaultValue))),p.keepTouched||ce(t.touchedFields,u),p.keepDirty||(ce(t.dirtyFields,u),t.isDirty=p.defaultValue?R(u,de(C(n,u))):R()),p.keepError||(ce(t.errors,u),f.isValid&&j()),m.state.next({...t}))},Ht=(u,p={})=>{const w=u?de(u):n,$=de(w),O=fe(u),_=O?n:$;if(p.keepDefaultValues||(n=w),!p.keepValues){if(p.keepDirtyValues){const P=new Set([...l.mount,...Object.keys(qe(n,a))]);for(const te of Array.from(P))C(t.dirtyFields,te)?ee(_,te,C(a,te)):H(te,C(_,te))}else{if(Vt&&oe(u))for(const P of l.mount){const te=C(s,P);if(te&&te._f){const se=Array.isArray(te._f.refs)?te._f.refs[0]:te._f.ref;if(ft(se)){const ve=se.closest("form");if(ve){ve.reset();break}}}}for(const P of l.mount)H(P,C(_,P))}a=de(_),m.array.next({values:{..._}}),m.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:""},i.mount=!f.isValid||!!p.keepIsValid||!!p.keepDirtyValues,i.watch=!!e.shouldUnregister,m.state.next({submitCount:p.keepSubmitCount?t.submitCount:0,isDirty:O?!1:p.keepDirty?t.isDirty:!!(p.keepDefaultValues&&!Ae(u,n)),isSubmitted:p.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:O?{}:p.keepDirtyValues?p.keepDefaultValues&&a?qe(n,a):t.dirtyFields:p.keepDefaultValues&&u?qe(n,u):p.keepDirty?t.dirtyFields:{},touchedFields:p.keepTouched?t.touchedFields:{},errors:p.keepErrors?t.errors:{},isSubmitSuccessful:p.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},Yt=(u,p)=>Ht(we(u)?u(a):u,p),Vs=(u,p={})=>{const w=C(s,u),$=w&&w._f;if($){const O=$.refs?$.refs[0]:$.ref;O.focus&&(O.focus(),p.shouldSelect&&we(O.select)&&O.select())}},Ms=u=>{t={...t,...u}},Gt={control:{register:K,unregister:ie,getFieldState:N,handleSubmit:Ze,setError:G,_subscribe:ae,_runSchema:q,_getWatch:L,_getDirty:R,_setValid:j,_setFieldArray:y,_setDisabledField:Q,_setErrors:k,_getFieldArray:B,_reset:Ht,_resetDefaultValues:()=>we(e.defaultValues)&&e.defaultValues().then(u=>{Yt(u,e.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:U,_disableForm:Ie,_subjects:m,_proxyFormState:f,get _fields(){return s},get _formValues(){return a},get _state(){return i},set _state(u){i=u},get _defaultValues(){return n},get _names(){return l},set _names(u){l=u},get _formState(){return t},get _options(){return e},set _options(u){e={...e,...u}}},subscribe:Y,trigger:re,register:K,handleSubmit:Ze,watch:ne,setValue:H,getValues:x,reset:Yt,resetField:Rs,clearErrors:M,unregister:ie,setError:G,setFocus:Vs,getFieldState:N};return{...Gt,formControl:Gt}}function Bn(r={}){const e=b.useRef(void 0),t=b.useRef(void 0),[s,n]=b.useState({isDirty:!1,isValidating:!1,isLoading:we(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:we(r.defaultValues)?void 0:r.defaultValues});e.current||(e.current={...r.formControl?r.formControl:Un(r),formState:s},r.formControl&&r.defaultValues&&!we(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const a=e.current.control;return a._options=r,Lt(()=>{const i=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(l=>({...l,isReady:!0})),a._formState.isReady=!0,i},[a]),b.useEffect(()=>a._disableForm(r.disabled),[a,r.disabled]),b.useEffect(()=>{r.mode&&(a._options.mode=r.mode),r.reValidateMode&&(a._options.reValidateMode=r.reValidateMode),r.errors&&!fe(r.errors)&&a._setErrors(r.errors)},[a,r.errors,r.mode,r.reValidateMode]),b.useEffect(()=>{r.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,r.shouldUnregister]),b.useEffect(()=>{if(a._proxyFormState.isDirty){const i=a._getDirty();i!==s.isDirty&&a._subjects.state.next({isDirty:i})}},[a,s.isDirty]),b.useEffect(()=>{r.values&&!Ae(r.values,t.current)?(a._reset(r.values,a._options.resetOptions),t.current=r.values,n(i=>({...i}))):a._resetDefaultValues()},[a,r.values]),b.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),e.current.formState=zr(s,a),e.current}const ts={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Zn={sm:"h-6",md:"h-10",lg:"h-12"},zn={sm:"px-2",md:"px-2.5",lg:"px-3"};function hr(r,e,t,s,n,a,i){const l=e?"datetime-local":"date";return o.jsxs(o.Fragment,{children:[o.jsx("input",{id:r,type:l,disabled:n,...s,className:D("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)]",ts[t],Zn[t],zn[t],a?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",n?"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)]",i)}),o.jsx("div",{children:a!=null&&a.message?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}function rs(r){const{control:e,name:t,rules:s,defaultValue:n,showTime:a=!1,size:i="sm",width:l="100%",label:c,labelHidden:d=!1,hasError:f=!1,errorMessage:h="",disabled:m=!1,className:g,onChange:F}=r,j=b.useId(),T=t||j;return o.jsxs("div",{className:D("flex flex-col",g),style:{width:l,maxWidth:"100%"},children:[c&&o.jsx("label",{htmlFor:T,className:D("pb-2 text-[var(--color-ds-text-primary)]",ts[i],d&&"sr-only"),children:c}),e&&t?o.jsx(je,{name:t,control:e,rules:s,defaultValue:n,render:({field:y,fieldState:v})=>hr(T,a,i,{value:y.value,onChange:y.onChange,onBlur:y.onBlur},m,v.error,g)}):hr(T,a,i,{defaultValue:n,onChange:F},m,f?{message:h}:void 0,g)]})}const Wn=({trigger:r,items:e,align:t="left",className:s})=>{const[n,a]=b.useState(!1),i=b.useRef(null),l=b.useRef([]);b.useEffect(()=>{const d=f=>{i.current&&!i.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]);const c=d=>{var h,m;const f=l.current.findIndex(g=>g===document.activeElement);if(d.key==="Escape")a(!1);else if(d.key==="ArrowDown"){d.preventDefault();const g=(f+1)%e.length;(h=l.current[g])==null||h.focus()}else if(d.key==="ArrowUp"){d.preventDefault();const g=(f-1+e.length)%e.length;(m=l.current[g])==null||m.focus()}};return o.jsxs("div",{className:D("relative inline-block",s),ref:i,children:[o.jsx("button",{type:"button",onClick:()=>a(d=>!d),className:"inline-flex items-center focus:outline-none","aria-haspopup":"menu","aria-expanded":n,children:r}),n&&o.jsx("div",{role:"menu","aria-orientation":"vertical",className:D("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((d,f)=>{const{label:h,onSelect:m,disabled:g,icon:F}=d;return o.jsxs("button",{role:"menuitem",type:"button",disabled:g,ref:j=>{l.current[f]=j},className:D("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",g?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{g||(m(),a(!1))},children:[F&&o.jsx(F,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),h]},f)})})]})},qn=(r,e,t,s)=>{var a,i,l,c;const n=[t,{code:e,...s||{}}];if((i=(a=r==null?void 0:r.services)==null?void 0:a.logger)!=null&&i.forward)return r.services.logger.forward(n,"warn","react-i18next::",!0);Re(n[0])&&(n[0]=`react-i18next:: ${n[0]}`),(c=(l=r==null?void 0:r.services)==null?void 0:l.logger)!=null&&c.warn?r.services.logger.warn(...n):console!=null&&console.warn&&console.warn(...n)},mr={},St=(r,e,t,s)=>{Re(t)&&mr[t]||(Re(t)&&(mr[t]=new Date),qn(r,e,t,s))},ss=(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,ss(r,t))},xr=(r,e,t,s)=>{if(Re(t)&&(t=[t]),r.options.preload&&r.options.preload.indexOf(e)>-1)return Tt(r,t,s);t.forEach(n=>{r.options.ns.indexOf(n)<0&&r.options.ns.push(n)}),r.loadLanguages(e,ss(r,s))},Hn=(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,n)=>{var a;if(((a=t.bindI18n)==null?void 0:a.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!n(s.isLanguageChangingTo,r))return!1}}),Re=r=>typeof r=="string",Yn=r=>typeof r=="object"&&r!==null,Gn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Xn={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Jn=r=>Xn[r],Kn=r=>r.replace(Gn,Jn);let Qn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Kn};const ea=()=>Qn;let ta;const ra=()=>ta,sa=b.createContext();class na{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const aa=(r,e)=>{const t=b.useRef();return b.useEffect(()=>{t.current=r},[r,e]),t.current},ns=(r,e,t,s)=>r.getFixedT(e,t,s),ia=(r,e,t,s)=>b.useCallback(ns(r,e,t,s),[r,e,t,s]),Ut=(r,e={})=>{var A,S,I,q;const{i18n:t}=e,{i18n:s,defaultNS:n}=b.useContext(sa)||{},a=t||s||ra();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new na),!a){St(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const Z=(U,R)=>Re(R)?R:Yn(R)&&Re(R.defaultValue)?R.defaultValue:Array.isArray(U)?U[U.length-1]:U,z=[Z,{},!1];return z.t=Z,z.i18n={},z.ready=!1,z}(A=a.options.react)!=null&&A.wait&&St(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...ea(),...a.options.react,...e},{useSuspense:l,keyPrefix:c}=i;let d=n||((S=a.options)==null?void 0:S.defaultNS);d=Re(d)?[d]:d||["translation"],(q=(I=a.reportNamespaces).addUsedNamespaces)==null||q.call(I,d);const f=(a.isInitialized||a.initializedStoreOnce)&&d.every(Z=>Hn(Z,a,i)),h=ia(a,e.lng||null,i.nsMode==="fallback"?d:d[0],c),m=()=>h,g=()=>ns(a,e.lng||null,i.nsMode==="fallback"?d:d[0],c),[F,j]=b.useState(m);let T=d.join();e.lng&&(T=`${e.lng}${T}`);const y=aa(T),v=b.useRef(!0);b.useEffect(()=>{const{bindI18n:Z,bindI18nStore:z}=i;v.current=!0,!f&&!l&&(e.lng?xr(a,e.lng,d,()=>{v.current&&j(g)}):Tt(a,d,()=>{v.current&&j(g)})),f&&y&&y!==T&&v.current&&j(g);const U=()=>{v.current&&j(g)};return Z&&(a==null||a.on(Z,U)),z&&(a==null||a.store.on(z,U)),()=>{v.current=!1,a&&(Z==null||Z.split(" ").forEach(R=>a.off(R,U))),z&&a&&z.split(" ").forEach(R=>a.store.off(R,U))}},[a,T]),b.useEffect(()=>{v.current&&f&&j(m)},[a,c,f]);const k=[F,a,f];if(k.t=F,k.i18n=a,k.ready=f,f||!f&&!l)return k;throw new Promise(Z=>{e.lng?xr(a,e.lng,d,()=>Z()):Tt(a,d,()=>Z())})},Ot={sm:"text-sm",md:"text-base",lg:"text-lg"};function pr(r,e,t,s,n,a,i,l,c){const{t:d}=Ut(),f=b.useRef(null),h=typeof s=="number"&&e.length>=s,m=()=>{var v;!i&&!h&&((v=f.current)==null||v.click())},g=v=>{const k=v.target.files;if(!k)return;const A=Array.from(k);let S=e.concat(A);s&&(S=S.slice(0,s)),t(S),v.target.value=""},F=v=>{if(v.preventDefault(),i||h)return;const k=Array.from(v.dataTransfer.files);let A=e.concat(k);s&&(A=A.slice(0,s)),t(A)},j=v=>{v.preventDefault()},T=v=>{const k=URL.createObjectURL(v);window.open(k)},y=v=>{const k=e.filter((A,S)=>S!==v);t(k)};return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"self-start mb-4 w-auto",children:o.jsx(Te,{type:"button",variant:"outline",size:a,icon:tr,onClick:m,disabled:i||h,children:d("ds.fileUploader.browse","Browse files")})}),!h&&o.jsxs("div",{className:D("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",i?"opacity-50 cursor-not-allowed":"hover:border-[var(--color-ds-border-default)]",Ot[a],c),onDrop:F,onDragOver:j,children:[o.jsx("input",{id:r,type:"file",ref:f,className:"hidden",multiple:s!==1,accept:n,onChange:g,disabled:i}),o.jsx(Ee,{component:on,size:"md",className:"w-8 h-8 text-[var(--color-ds-text-secondary)]"}),o.jsx("p",{className:"mt-3 text-[var(--color-ds-text-secondary)] text-center",children:d("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),e.length>0&&o.jsx("ul",{className:"mt-4 space-y-1",children:e.map((v,k)=>o.jsxs("li",{className:"flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx(tr,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),o.jsx("span",{className:"truncate pr-2",children:v.name})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(Te,{variant:"ghost",size:"sm",icon:Lr,ariaLabel:d("ds.fileUploader.view","View"),onClick:()=>T(v)}),o.jsx(Te,{variant:"ghost",size:"sm",icon:Rt,ariaLabel:d("ds.fileUploader.remove","Remove"),onClick:()=>y(k)})]})]},k))}),o.jsx("div",{className:"pt-[5px] min-h-[18px] w-full",children:l!=null&&l.message?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}function as(r){const{control:e,name:t,rules:s,defaultValue:n,maxFiles:a,accept:i,size:l="sm",width:c="100%",label:d,labelHidden:f=!1,disabled:h=!1,hasError:m=!1,errorMessage:g="",className:F}=r,j=b.useId(),T=t||j;if(e&&t)return o.jsxs("div",{className:D("flex flex-col",F),style:{width:c},children:[d&&o.jsx("label",{htmlFor:T,className:D("pb-[10px] text-[var(--color-ds-text-primary)]",Ot[l],f&&"sr-only"),children:d}),o.jsx(je,{name:t,control:e,rules:s,defaultValue:n instanceof FileList?Array.from(n):n||[],render:({field:k,fieldState:A})=>pr(T,k.value,S=>k.onChange(S),a,i,l,h,A.error,F)})]});const[y,v]=b.useState(n instanceof FileList?Array.from(n):n||[]);return o.jsxs("div",{className:D("flex flex-col",F),style:{width:c},children:[d&&o.jsx("label",{htmlFor:T,className:D("pb-[10px] text-[var(--color-ds-text-primary)]",Ot[l],f&&"sr-only"),children:d}),pr(T,y,v,a,i,l,h,m?{message:g}:void 0,F)]})}const Me=({count:r=1,width:e,height:t="1em",variant:s="rect",className:n})=>{const a=Array.from({length:r});return o.jsx(o.Fragment,{children:a.map((i,l)=>o.jsx("span",{role:"status","aria-label":"Cargando...",className:D("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",n),style:{width:e??"auto",height:t}},l))})},rt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},oa={sm:"h-6",md:"h-10",lg:"h-12"},la={sm:"px-2",md:"px-2.5",lg:"px-3"},gr={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},ca={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function vt({id:r,type:e="text",size:t="sm",width:s="100%",label:n,labelHidden:a=!1,hasError:i=!1,errorMessage:l="",prefixIcon:c,suffixIcon:d,separator:f,suffixButton:h,disabled:m=!1,control:g,name:F,rules:j,defaultValue:T,loading:y=!1,className:v,...k}){const A=b.useId(),[S,I]=b.useState(!1),q=r||A,Z=e==="password",U=c??(e==="number"?hn:void 0),R=Z?S?un:Lr:d,L=D("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",rt[t],oa[t],la[t],i?"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 y?o.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!a&&n&&o.jsx("label",{htmlFor:q,className:D("pb-2",rt[t]),children:n}),o.jsx(Me,{width:"100%",height:ca[t],variant:"rect",className:"rounded-lg"}),o.jsx("div",{className:"min-h-[18px] w-full",children:o.jsx("span",{"aria-hidden":"true",children:" "})})]}):g&&F?o.jsx(je,{name:F,control:g,rules:j,defaultValue:T,render:({field:B,fieldState:W})=>o.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&o.jsx("label",{htmlFor:q,className:D("pb-2 text-[var(--color-ds-text-primary)]",rt[t]),children:n}),o.jsxs("div",{className:"relative flex items-center w-full",children:[U&&o.jsx("div",{className:D("absolute left-0 flex items-center h-full",gr[t]),children:o.jsx(Ee,{component:U,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),o.jsx("input",{...B,id:q,type:Z?S?"text":"password":e,disabled:m,"aria-invalid":!!W.error,className:D(L,U&&"pl-9",R&&"pr-9",v),onInvalid:X=>X.preventDefault(),style:Z&&!S?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&o.jsx("div",{className:"flex items-center h-full",children:f}),h&&o.jsx("div",{className:"flex items-center h-full pr-2",children:h}),R&&o.jsx("button",{type:"button",onClick:()=>I(X=>!X),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:o.jsx(Ee,{component:R,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),o.jsx("div",{className:"min-h-[18px]",children:W.error?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:W.error.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}):o.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&o.jsx("label",{htmlFor:q,className:D("pb-2 text-[var(--color-ds-text-primary)]",rt[t]),children:n}),o.jsxs("div",{className:"relative flex items-center w-full",children:[U&&o.jsx("div",{className:D("absolute left-0 flex items-center h-full",gr[t]),children:o.jsx(Ee,{component:U,size:t,className:"text-[var(--color-ds-text-secondary)]"})}),o.jsx("input",{...k,id:q,type:Z?S?"text":"password":e,disabled:m,"aria-invalid":i,className:D(L,U&&"pl-9",R&&"pr-9",v),onInvalid:B=>B.preventDefault(),style:Z&&!S?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&o.jsx("div",{className:"flex items-center h-full",children:f}),h&&o.jsx("div",{className:"flex items-center h-full",children:h}),R&&o.jsx("button",{type:"button",onClick:()=>I(B=>!B),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:o.jsx(Ee,{component:R,size:t,className:"text-[var(--color-ds-text-secondary)]"})})]}),o.jsx("div",{className:"min-h-[18px]",children:i&&l?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}const ua={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},jt=400,st=8,is=({children:r,size:e="sm",position:t="top",className:s})=>{const[n,a]=b.useState(!1),[i,l]=b.useState({x:0,y:0}),c=b.useRef(null),d=b.useId();b.useEffect(()=>{if(n&&c.current){const m=c.current.getBoundingClientRect();let g=0,F=0;switch(t){case"top":g=m.left+m.width/2-jt/2,F=m.top-st;break;case"bottom":g=m.left+m.width/2-jt/2,F=m.bottom+st;break;case"left":g=m.left-jt-st,F=m.top+m.height/2;break;case"right":g=m.right+st,F=m.top+m.height/2;break}l({x:g,y:F})}},[n,t]);const f=()=>typeof r=="string"?o.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):o.jsx(o.Fragment,{children:r}),h=n?o.jsx("div",{id:d,role:"tooltip",className:D("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:`${i.y}px`,left:`${i.x}px`,transform:t==="left"||t==="right"?"translateY(-50%)":t==="top"?"translateY(-100%)":void 0},children:f()}):null;return o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button","aria-describedby":d,ref:c,className:D("inline-flex items-center justify-center focus:outline-none",ua[e],"text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]",s),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:o.jsx(xn,{className:"w-full h-full"})}),Rr.createPortal(h,document.body)]})};function da({name:r,label:e,type:t="text",size:s="sm",width:n,placeholder:a,validation:i,loadingDefaults:l,disabled:c,info:d}){var T;const{control:f,formState:{errors:h}}=Ke(),m=!!h[r],g=((T=h[r])==null?void 0:T.message)||"",F="relative",j=n??"w-full";return o.jsxs("div",{className:F,children:[o.jsx(je,{name:r,control:f,rules:i,render:({field:y})=>o.jsx(vt,{label:e,size:s,width:j,placeholder:a,hasError:m,errorMessage:g,loading:l,type:t,...y,disabled:c})}),d&&o.jsx(is,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:d})]})}const Bt=b.memo(da);Bt.displayName="FormFieldInput";function fa({title:r,headerButtons:e,children:t,className:s}){return o.jsxs("div",{className:D("flex flex-col h-full",s),children:[o.jsxs("div",{className:"flex items-center justify-between py-4",children:[o.jsx("div",{className:`bg-[var(--color-ds-background-accent)] \r
|
|
23
23
|
text-[var(--color-ds-text-on-accent)] \r
|
|
24
24
|
rounded-tr-[20px] \r
|
|
25
25
|
pl-4 pr-10\r
|
|
26
|
-
text-ds-lg`,children:r}),e&&o.jsx("div",{className:"flex items-center space-x-2",children:e})]}),o.jsx("main",{className:"flex-1 overflow-auto",children:t})]})}function os({options:r,value:e,onChange:t,children:s}){const n=w.useRef(null),[a,i]=w.useState({left:0,width:0});return w.useLayoutEffect(()=>{const l=n.current;if(!l)return;const c=()=>{const f=r.findIndex(F=>F.value===e);if(f<0)return;const d=l.children[f],m=d.querySelector("span"),h=(m==null?void 0:m.offsetWidth)??d.offsetWidth,v=d.offsetWidth,k=d.offsetLeft+(v-h)/2;i({left:k,width:h})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[e,r]),o.jsxs("div",{children:[o.jsxs("div",{className:"relative",children:[o.jsx("ul",{ref:n,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 o.jsx("li",{role:"tab","aria-selected":c,onClick:()=>t(l.value),className:D("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:o.jsx("span",{className:"inline-block",children:l.label})},l.value)})}),o.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:a.left,width:a.width}})]}),o.jsx("div",{className:"mt-4 pb-4 border-b border-[var(--color-ds-border-default-50)]",children:s[e]})]})}const Ot={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ha={sm:"h-6",md:"h-10",lg:"h-12"},ma={sm:"px-2",md:"px-2.5",lg:"px-3"},vr={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function yr(r,e,t,s,n,a,i,l,c){return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"relative flex items-center w-full",children:[o.jsx("select",{id:r,...s,disabled:n,className:D("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Ot[t],ha[t],ma[t],a?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",n?"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=>o.jsx("option",{value:f.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:f.label},f.value))}),c&&o.jsx("div",{className:"flex items-center h-full pr-2",children:c})]}),!i&&o.jsx("div",{className:"min-h-[18px] w-full",children:a!=null&&a.message?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Ge(r){const{control:e,name:t,rules:s,defaultValue:n,options:a=[],loadOptions:i,reloadDeps:l=[],value:c,onChange:f,size:d="sm",width:m="100%",label:h,labelHidden:v=!1,hasError:E=!1,errorMessage:k="",disableErrorPlaceholder:F=!1,disabled:y=!1,className:p,suffixButton:S}=r,R=w.useId(),C=t||R,[P,G]=w.useState(a),[B,Z]=w.useState(!!i);if(w.useEffect(()=>{i&&(Z(!0),i().then(W=>G(W)).finally(()=>Z(!1)))},[i,...l]),w.useEffect(()=>{!e&&P.length>0&&(c===void 0||c===""||!P.some(W=>W.value===c))&&(f==null||f(P[0].value))},[P,c,f,e]),e&&t){const{field:W,fieldState:M}=Hr({name:t,control:e,rules:s,defaultValue:n});return w.useEffect(()=>{if(!B&&P.length>0){const L=W.value;(L===void 0||!P.some(z=>z.value===L))&&W.onChange(P[0].value)}},[P,B,W]),o.jsxs("div",{className:D("flex flex-col",p),style:{width:m,maxWidth:"100%"},children:[h&&o.jsx("label",{htmlFor:C,className:D("pb-2 text-[var(--color-ds-text-primary)]",Ot[d],v&&"sr-only"),children:h}),B?o.jsx(Me,{width:"100%",height:vr[d],variant:"rect",className:"rounded-lg"}):yr(C,P,d,{value:W.value,onChange:L=>W.onChange(L.target.value)},y,M.error,F,p,S)]})}return o.jsxs("div",{className:D("flex flex-col",p),style:{width:m,maxWidth:"100%"},children:[h&&o.jsx("label",{htmlFor:C,className:D("pb-2 text-[var(--color-ds-text-primary)]",Ot[d],v&&"sr-only"),children:h}),B?o.jsx(Me,{width:"100%",height:vr[d],variant:"rect",className:"rounded-lg"}):yr(C,P,d,{value:c,onChange:W=>f==null?void 0:f(W.target.value)},y,E?{message:k}:void 0,F,p,S)]})}const br={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function ls({groupLabel:r,inputs:e=[],separator:t=o.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:n,showVisibleLabel:a=!1,size:i="sm",width:l}){const c=e.length;return o.jsxs("div",{className:D("flex flex-col",n),style:l?{width:l}:void 0,children:[o.jsx("label",{className:D("sr-only pb-2",br[i]),children:r}),a&&o.jsx("label",{className:D("pb-2",br[i]),children:r}),o.jsx("div",{className:"flex items-center flex-nowrap",children:e.map((f,d)=>{const{width:m,className:h,options:v,loadOptions:E,...k}=f,F=Array.isArray(v)||typeof E=="function";let y="rounded-lg";!s&&c>1&&(d===0?y="rounded-l-lg rounded-r-none":d===c-1?y="rounded-r-lg rounded-l-none":y="rounded-none");const p=D("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,R=D(h,y);return o.jsxs("div",{className:p,style:S,children:[F?o.jsx(Ge,{...k,size:i,className:R,options:v,loadOptions:E}):o.jsx(gt,{...k,size:i,className:R}),s&&d<c-1&&t]},d)})})]})}const wr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},xa={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function cs({groupLabel:r,options:e,control:t,name:s,rules:n,defaultValue:a,multiple:i=!0,size:l="sm",vertical:c=!0,className:f,showVisibleLabel:d=!0}){return o.jsx(we,{name:s,control:t,rules:n,defaultValue:a,render:({field:m,fieldState:h})=>{const{value:v,onChange:E}=m;h.error;const k=y=>i?Array.isArray(v)&&v.includes(y):v===y,F=y=>{if(i){const p=Array.isArray(v)?[...v]:[],S=p.indexOf(y);S>=0?p.splice(S,1):p.push(y),E(p)}else E(y)};return o.jsxs("div",{className:D("w-full",f),children:[o.jsx("label",{className:D("sr-only pb-2 text-[var(--color-ds-text-primary)]",wr[l]),children:r}),d&&o.jsx("label",{className:D("block pb-2 text-[var(--color-ds-text-primary)]",wr[l]),children:r}),o.jsx("div",{className:D(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:e.map(y=>o.jsxs("label",{className:"inline-flex items-center space-x-2 cursor-pointer select-none",children:[o.jsx("input",{type:i?"checkbox":"radio",name:s,value:y.value,checked:k(y.value),onChange:()=>F(y.value),className:D(xa[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]")}),o.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-md",children:y.label})]},y.value))})]})}})}function pa(r){function e(i){var l,c;for(const f of Object.keys(i)){if((l=i[f])!=null&&l.types||(c=i[f])!=null&&c.message)return f;if(typeof i[f]=="object"){const d=e(i[f]);if(d)return`${f}.${d}`}}return null}const t=e(r);if(!t)return;const s=`[name="${t}"]`,n=`[name^="${t}["], [name^="${t}."]`,a=document.querySelector(s)??document.querySelector(n);a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),a.focus({preventScroll:!0}))}const ga={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"},us=({id:r,message:e,variant:t="info",duration:s=5e3,onClose:n})=>(w.useEffect(()=>{const a=setTimeout(()=>n(r),s);return()=>clearTimeout(a)},[r,s,n]),o.jsxs("div",{className:D("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",ga[t]),role:"alert","aria-live":"assertive",children:[o.jsx("span",{className:"flex-1",children:e}),o.jsx("button",{onClick:()=>n(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let rt;const va=new Uint8Array(16);function ya(){if(!rt&&(rt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!rt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rt(va)}const ue=[];for(let r=0;r<256;++r)ue.push((r+256).toString(16).slice(1));function ba(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 wa=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),jr={randomUUID:wa};function ja(r,e,t){if(jr.randomUUID&&!r)return jr.randomUUID();r=r||{};const s=r.random||(r.rng||ya)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,ba(s)}const ds=w.createContext(null),fs=()=>{const r=w.useContext(ds);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},ka=({children:r})=>{const[e,t]=w.useState([]),s=(a,i="info",l=5e3)=>{const c=ja();t(f=>[...f,{id:c,message:a,variant:i,duration:l}])},n=a=>{t(i=>i.filter(l=>l.id!==a))};return o.jsxs(ds.Provider,{value:{show:s},children:[r,o.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:e.map(a=>o.jsx(us,{id:a.id,message:a.message,variant:a.variant,duration:a.duration,onClose:n},a.id))})]})},kr=(r,e,t)=>{if(r&&"reportValidity"in r){const s=O(t,e);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},hs=(r,e)=>{for(const t in e.fields){const s=e.fields[t];s&&s.ref&&"reportValidity"in s.ref?kr(s.ref,t,r):s&&s.refs&&s.refs.forEach(n=>kr(n,t,r))}},Ea=(r,e)=>{e.shouldUseNativeValidation&&hs(r,e);const t={};for(const s in r){const n=O(e.fields,s),a=Object.assign(r[s]||{},{ref:n&&n.ref});if(Na(e.names||Object.keys(r),s)){const i=Object.assign({},O(t,s));K(i,"root",a),K(t,s,i)}else K(t,s,a)}return t},Na=(r,e)=>{const t=Er(e);return r.some(s=>Er(s).match(`^${t}\\.\\d+`))};function Er(r){return r.replace(/\]|\[/g,"")}function Nr(r,e,t){return t===void 0&&(t={}),function(s,n,a){try{return Promise.resolve(function(i,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:n}))).then(function(f){return a.shouldUseNativeValidation&&hs({},a),{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(i){if(!i.inner)throw i;return{values:{},errors:Ea((l=i,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(l.inner||[]).reduce(function(f,d){if(f[d.path]||(f[d.path]={message:d.message,type:d.type}),c){var m=f[d.path].types,h=m&&m[d.type];f[d.path]=Yr(d.path,c,f,d.type,h?[].concat(h,d.message):d.message)}return f},{})),a)};var l,c}))}catch(i){return Promise.reject(i)}}}var jt,_r;function _a(){if(_r)return jt;_r=1;function r(y){this._maxSize=y,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(y){return this._values[y]},r.prototype.set=function(y,p){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=p};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,t=/^\d+$/,s=/^\d/,n=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,i=512,l=new r(i),c=new r(i),f=new r(i);jt={Cache:r,split:m,normalizePath:d,setter:function(y){var p=d(y);return c.get(y)||c.set(y,function(R,C){for(var P=0,G=p.length,B=R;P<G-1;){var Z=p[P];if(Z==="__proto__"||Z==="constructor"||Z==="prototype")return R;B=B[p[P++]]}B[p[P]]=C})},getter:function(y,p){var S=d(y);return f.get(y)||f.set(y,function(C){for(var P=0,G=S.length;P<G;)if(C!=null||!p)C=C[S[P++]];else return;return C})},join:function(y){return y.reduce(function(p,S){return p+(v(S)||t.test(S)?"["+S+"]":(p?".":"")+S)},"")},forEach:function(y,p,S){h(Array.isArray(y)?y:m(y),p,S)}};function d(y){return l.get(y)||l.set(y,m(y).map(function(p){return p.replace(a,"$2")}))}function m(y){return y.match(e)||[""]}function h(y,p,S){var R=y.length,C,P,G,B;for(P=0;P<R;P++)C=y[P],C&&(F(C)&&(C='"'+C+'"'),B=v(C),G=!B&&/^\d+$/.test(C),p.call(S,C,B,G,P,y))}function v(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function E(y){return y.match(s)&&!y.match(t)}function k(y){return n.test(y)}function F(y){return!v(y)&&(E(y)||k(y))}return jt}var Ve=_a(),kt,Fr;function Fa(){if(Fr)return kt;Fr=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=d=>d.match(r)||[],t=d=>d[0].toUpperCase()+d.slice(1),s=(d,m)=>e(d).join(m).toLowerCase(),n=d=>e(d).reduce((m,h)=>`${m}${m?h[0].toUpperCase()+h.slice(1).toLowerCase():h.toLowerCase()}`,"");return kt={words:e,upperFirst:t,camelCase:n,pascalCase:d=>t(n(d)),snakeCase:d=>s(d,"_"),kebabCase:d=>s(d,"-"),sentenceCase:d=>t(s(d," ")),titleCase:d=>e(d).map(t).join(" ")},kt}var Et=Fa(),st={exports:{}},Sr;function Sa(){if(Sr)return st.exports;Sr=1,st.exports=function(n){return r(e(n),n)},st.exports.array=r;function r(n,a){var i=n.length,l=new Array(i),c={},f=i,d=t(a),m=s(n);for(a.forEach(function(v){if(!m.has(v[0])||!m.has(v[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});f--;)c[f]||h(n[f],f,new Set);return l;function h(v,E,k){if(k.has(v)){var F;try{F=", node was:"+JSON.stringify(v)}catch{F=""}throw new Error("Cyclic dependency"+F)}if(!m.has(v))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(v));if(!c[E]){c[E]=!0;var y=d.get(v)||new Set;if(y=Array.from(y),E=y.length){k.add(v);do{var p=y[--E];h(p,m.get(p),k)}while(E);k.delete(v)}l[--i]=v}}}function e(n){for(var a=new Set,i=0,l=n.length;i<l;i++){var c=n[i];a.add(c[0]),a.add(c[1])}return Array.from(a)}function t(n){for(var a=new Map,i=0,l=n.length;i<l;i++){var c=n[i];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[1])}return a}function s(n){for(var a=new Map,i=0,l=n.length;i<l;i++)a.set(n[i],i);return a}return st.exports}var Ta=Sa();const Oa=Bs(Ta),Ca=Object.prototype.toString,Aa=Error.prototype.toString,$a=RegExp.prototype.toString,Da=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Ra=/^Symbol\((.*)\)(.*)$/;function Va(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Tr(r,e=!1){if(r==null||r===!0||r===!1)return""+r;const t=typeof r;if(t==="number")return Va(r);if(t==="string")return e?`"${r}"`:r;if(t==="function")return"[Function "+(r.name||"anonymous")+"]";if(t==="symbol")return Da.call(r).replace(Ra,"Symbol($1)");const s=Ca.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+Aa.call(r)+"]":s==="RegExp"?$a.call(r):null}function $e(r,e){let t=Tr(r,e);return t!==null?t:JSON.stringify(r,function(s,n){let a=Tr(this[s],e);return a!==null?a:n},2)}function ms(r){return r==null?[]:[].concat(r)}let xs,ps,gs,Ma=/\$\{\s*(\w+)\s*\}/g;xs=Symbol.toStringTag;class Or{constructor(e,t,s,n){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[xs]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=n,this.errors=[],this.inner=[],ms(e).forEach(a=>{if(xe.isError(a)){this.errors.push(...a.errors);const i=a.inner.length?a.inner:[a];this.inner.push(...i)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}ps=Symbol.hasInstance;gs=Symbol.toStringTag;class xe 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(Ma,(n,a)=>$e(t[a])):typeof e=="function"?e(t):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,t,s,n,a){const i=new Or(e,t,s,n);if(a)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[gs]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,xe)}static[ps](e){return Or[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let je={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 n=s!=null&&s!==t?` (cast from the value \`${$e(s,!0)}\`).`:".";return e!=="mixed"?`${r} must be a \`${e}\` type, but the final value was: \`${$e(t,!0)}\``+n:`${r} must match the configured type. The validated value was: \`${$e(t,!0)}\``+n}},me={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"},Ce={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"},Ct={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},La={isValue:"${path} field must be ${value}"},it={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Ia={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"},Pa={notType:r=>{const{path:e,value:t,spec:s}=r,n=s.types.length;if(Array.isArray(t)){if(t.length<n)return`${e} tuple value has too few items, expected a length of ${n} but got ${t.length} for value: \`${$e(t,!0)}\``;if(t.length>n)return`${e} tuple value has too many items, expected a length of ${n} but got ${t.length} for value: \`${$e(t,!0)}\``}return xe.formatError(je.notType,r)}};Object.assign(Object.create(null),{mixed:je,string:me,number:Ce,date:Ct,object:it,array:Ia,boolean:La,tuple:Pa});const Bt=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:n,otherwise:a}=t,i=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new ht(e,(l,c)=>{var f;let d=i(...l)?n:a;return(f=d==null?void 0:d(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(a=>a.getValue(t==null?void 0:t.value,t==null?void 0:t.parent,t==null?void 0:t.context)),n=this.fn(s,e,t);if(n===void 0||n===e)return e;if(!Bt(n))throw new TypeError("conditions must return a schema object");return n.resolve(t)}}const nt={context:"$",value:"."};class Le{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]===nt.context,this.isValue=this.key[0]===nt.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?nt.context:this.isValue?nt.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ve.getter(this.path,!0),this.map=t.map}getValue(e,t,s){let n=this.isContext?s:this.isValue?e:t;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}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}}Le.prototype.__isYupRef=!0;const Se=r=>r==null;function Ue(r){function e({value:t,path:s="",options:n,originalValue:a,schema:i},l,c){const{name:f,test:d,params:m,message:h,skipAbsent:v}=r;let{parent:E,context:k,abortEarly:F=i.spec.abortEarly,disableStackTrace:y=i.spec.disableStackTrace}=n;function p(M){return Le.isRef(M)?M.getValue(t,E,k):M}function S(M={}){const L=Object.assign({value:t,originalValue:a,label:i.spec.label,path:M.path||s,spec:i.spec,disableStackTrace:M.disableStackTrace||y},m,M.params);for(const N of Object.keys(L))L[N]=p(L[N]);const z=new xe(xe.formatError(M.message||h,L),t,L.path,M.type||f,L.disableStackTrace);return z.params=L,z}const R=F?l:c;let C={path:s,parent:E,type:f,from:n.from,createError:S,resolve:p,options:n,originalValue:a,schema:i};const P=M=>{xe.isError(M)?R(M):M?c(null):R(S())},G=M=>{xe.isError(M)?R(M):l(M)};if(v&&Se(t))return P(!0);let Z;try{var W;if(Z=d.call(C,t,C),typeof((W=Z)==null?void 0:W.then)=="function"){if(n.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Z).then(P,G)}}catch(M){G(M);return}P(Z)}return e.OPTIONS=r,e}function Ua(r,e,t,s=t){let n,a,i;return e?(Ve.forEach(e,(l,c,f)=>{let d=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:n,value:t});let m=r.type==="tuple",h=f?parseInt(d,10):0;if(r.innerType||m){if(m&&!f)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${i}" must contain an index to the tuple element, e.g. "${i}[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. `);n=t,t=t&&t[h],r=m?r.spec.types[h]:r.innerType}if(!f){if(!r.fields||!r.fields[d])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${i} which is a type: "${r.type}")`);n=t,t=t&&t[d],r=r.fields[d]}a=d,i=c?"["+l+"]":"."+l}),{schema:r,parent:n,parentPath:a}):{parent:n,parentPath:e,schema:r}}class mt extends Set{describe(){const e=[];for(const t of this.values())e.push(Le.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 mt(this.values())}merge(e,t){const s=this.clone();return e.forEach(n=>s.add(n)),t.forEach(n=>s.delete(n)),s}}function Be(r,e=new Map){if(Bt(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]=Be(r[s],e)}else if(r instanceof Map){t=new Map,e.set(r,t);for(const[s,n]of r.entries())t.set(s,Be(n,e))}else if(r instanceof Set){t=new Set,e.set(r,t);for(const s of r)t.add(Be(s,e))}else if(r instanceof Object){t={},e.set(r,t);for(const[s,n]of Object.entries(r))t[s]=Be(n,e)}else throw Error(`Unable to clone ${r}`);return t}class ve{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 mt,this._blacklist=new mt,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(je.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=Be(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 n=Object.assign({},t.spec,s.spec);return s.spec=n,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(a=>{e.tests.forEach(i=>{a.test(i.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((n,a)=>a.resolve(n,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,n,a;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:(n=e.recursive)!=null?n:this.spec.recursive,disableStackTrace:(a=e.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),n=t.assert==="ignore-optionality",a=s._cast(e,t);if(t.assert!==!1&&!s.isType(a)){if(n&&Se(a))return a;let i=$e(e),l=$e(a);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
|
|
26
|
+
text-ds-lg`,children:r}),e&&o.jsx("div",{className:"flex items-center space-x-2",children:e})]}),o.jsx("main",{className:"flex-1 overflow-auto",children:t})]})}function os({options:r,value:e,onChange:t,children:s}){const n=b.useRef(null),[a,i]=b.useState({left:0,width:0});return b.useLayoutEffect(()=>{const l=n.current;if(!l)return;const c=()=>{const d=r.findIndex(T=>T.value===e);if(d<0)return;const f=l.children[d],h=f.querySelector("span"),m=(h==null?void 0:h.offsetWidth)??f.offsetWidth,g=f.offsetWidth,j=f.offsetLeft+(g-m)/2;i({left:j,width:m})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[e,r]),o.jsxs("div",{children:[o.jsxs("div",{className:"relative",children:[o.jsx("ul",{ref:n,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 o.jsx("li",{role:"tab","aria-selected":c,onClick:()=>t(l.value),className:D("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:o.jsx("span",{className:"inline-block",children:l.label})},l.value)})}),o.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:a.left,width:a.width}})]}),o.jsx("div",{className:"mt-4 pb-4 border-b border-[var(--color-ds-border-default-50)]",children:s[e]})]})}const Ct={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ha={sm:"h-6",md:"h-10",lg:"h-12"},ma={sm:"px-2",md:"px-2.5",lg:"px-3"},vr={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function br(r,e,t,s,n,a,i,l,c){return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"relative flex items-center w-full",children:[o.jsx("select",{id:r,...s,disabled:n,className:D("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Ct[t],ha[t],ma[t],a?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",n?"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(d=>o.jsx("option",{value:d.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:d.label},d.value))}),c&&o.jsx("div",{className:"flex items-center h-full pr-2",children:c})]}),!i&&o.jsx("div",{className:"min-h-[18px] w-full",children:a!=null&&a.message?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Xe(r){const{control:e,name:t,rules:s,defaultValue:n,options:a=[],loadOptions:i,reloadDeps:l=[],value:c,onChange:d,size:f="sm",width:h="100%",label:m,labelHidden:g=!1,hasError:F=!1,errorMessage:j="",disableErrorPlaceholder:T=!1,disabled:y=!1,className:v,suffixButton:k}=r,A=b.useId(),S=t||A,[I,q]=b.useState(a),[Z,z]=b.useState(!!i);if(b.useEffect(()=>{i&&(z(!0),i().then(U=>q(U)).finally(()=>z(!1)))},[i,...l]),b.useEffect(()=>{!e&&I.length>0&&(c===void 0||c===""||!I.some(U=>U.value===c))&&(d==null||d(I[0].value))},[I,c,d,e]),e&&t){const{field:U,fieldState:R}=Hr({name:t,control:e,rules:s,defaultValue:n});return b.useEffect(()=>{if(!Z&&I.length>0){const L=U.value;(L===void 0||!I.some(B=>B.value===L))&&U.onChange(I[0].value)}},[I,Z,U]),o.jsxs("div",{className:D("flex flex-col",v),style:{width:h,maxWidth:"100%"},children:[m&&o.jsx("label",{htmlFor:S,className:D("pb-2 text-[var(--color-ds-text-primary)]",Ct[f],g&&"sr-only"),children:m}),Z?o.jsx(Me,{width:"100%",height:vr[f],variant:"rect",className:"rounded-lg"}):br(S,I,f,{value:U.value,onChange:L=>U.onChange(L.target.value)},y,R.error,T,v,k)]})}return o.jsxs("div",{className:D("flex flex-col",v),style:{width:h,maxWidth:"100%"},children:[m&&o.jsx("label",{htmlFor:S,className:D("pb-2 text-[var(--color-ds-text-primary)]",Ct[f],g&&"sr-only"),children:m}),Z?o.jsx(Me,{width:"100%",height:vr[f],variant:"rect",className:"rounded-lg"}):br(S,I,f,{value:c,onChange:U=>d==null?void 0:d(U.target.value)},y,F?{message:j}:void 0,T,v,k)]})}const yr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function ls({groupLabel:r,inputs:e=[],separator:t=o.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:n,showVisibleLabel:a=!1,size:i="sm",width:l}){const c=e.length;return o.jsxs("div",{className:D("flex flex-col",n),style:l?{width:l}:void 0,children:[o.jsx("label",{className:D("sr-only pb-2",yr[i]),children:r}),a&&o.jsx("label",{className:D("pb-2",yr[i]),children:r}),o.jsx("div",{className:"flex items-center flex-nowrap",children:e.map((d,f)=>{const{width:h,className:m,options:g,loadOptions:F,...j}=d,T=Array.isArray(g)||typeof F=="function";let y="rounded-lg";!s&&c>1&&(f===0?y="rounded-l-lg rounded-r-none":f===c-1?y="rounded-r-lg rounded-l-none":y="rounded-none");const v=D("inline-flex items-center flex-shrink-0 overflow-hidden",typeof h=="string"&&h.startsWith("w-")?h:void 0),k=typeof h=="string"&&!h.startsWith("w-")?{width:h}:void 0,A=D(m,y);return o.jsxs("div",{className:v,style:k,children:[T?o.jsx(Xe,{...j,size:i,className:A,options:g,loadOptions:F}):o.jsx(vt,{...j,size:i,className:A}),s&&f<c-1&&t]},f)})})]})}const wr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},xa={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function cs({groupLabel:r,options:e,control:t,name:s,rules:n,defaultValue:a,multiple:i=!0,size:l="sm",vertical:c=!0,className:d,showVisibleLabel:f=!0}){return o.jsx(je,{name:s,control:t,rules:n,defaultValue:a,render:({field:h,fieldState:m})=>{const{value:g,onChange:F}=h;m.error;const j=y=>i?Array.isArray(g)&&g.includes(y):g===y,T=y=>{if(i){const v=Array.isArray(g)?[...g]:[],k=v.indexOf(y);k>=0?v.splice(k,1):v.push(y),F(v)}else F(y)};return o.jsxs("div",{className:D("w-full",d),children:[o.jsx("label",{className:D("sr-only pb-2 text-[var(--color-ds-text-primary)]",wr[l]),children:r}),f&&o.jsx("label",{className:D("block pb-2 text-[var(--color-ds-text-primary)]",wr[l]),children:r}),o.jsx("div",{className:D(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:e.map(y=>o.jsxs("label",{className:"inline-flex items-center space-x-2 cursor-pointer select-none",children:[o.jsx("input",{type:i?"checkbox":"radio",name:s,value:y.value,checked:j(y.value),onChange:()=>T(y.value),className:D(xa[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]")}),o.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-md",children:y.label})]},y.value))})]})}})}function pa(r){function e(i){var l,c;for(const d of Object.keys(i)){if((l=i[d])!=null&&l.types||(c=i[d])!=null&&c.message)return d;if(typeof i[d]=="object"){const f=e(i[d]);if(f)return`${d}.${f}`}}return null}const t=e(r);if(!t)return;const s=`[name="${t}"]`,n=`[name^="${t}["], [name^="${t}."]`,a=document.querySelector(s)??document.querySelector(n);a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),a.focus({preventScroll:!0}))}const ga={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"},us=({id:r,message:e,variant:t="info",duration:s=5e3,onClose:n})=>(b.useEffect(()=>{const a=setTimeout(()=>n(r),s);return()=>clearTimeout(a)},[r,s,n]),o.jsxs("div",{className:D("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",ga[t]),role:"alert","aria-live":"assertive",children:[o.jsx("span",{className:"flex-1",children:e}),o.jsx("button",{onClick:()=>n(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let nt;const va=new Uint8Array(16);function ba(){if(!nt&&(nt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nt(va)}const ue=[];for(let r=0;r<256;++r)ue.push((r+256).toString(16).slice(1));function ya(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 wa=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),jr={randomUUID:wa};function ja(r,e,t){if(jr.randomUUID&&!r)return jr.randomUUID();r=r||{};const s=r.random||(r.rng||ba)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,ya(s)}const ds=b.createContext(null),fs=()=>{const r=b.useContext(ds);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},ka=({children:r})=>{const[e,t]=b.useState([]),s=(a,i="info",l=5e3)=>{const c=ja();t(d=>[...d,{id:c,message:a,variant:i,duration:l}])},n=a=>{t(i=>i.filter(l=>l.id!==a))};return o.jsxs(ds.Provider,{value:{show:s},children:[r,o.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:e.map(a=>o.jsx(us,{id:a.id,message:a.message,variant:a.variant,duration:a.duration,onClose:n},a.id))})]})},kr=(r,e,t)=>{if(r&&"reportValidity"in r){const s=C(t,e);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},hs=(r,e)=>{for(const t in e.fields){const s=e.fields[t];s&&s.ref&&"reportValidity"in s.ref?kr(s.ref,t,r):s&&s.refs&&s.refs.forEach(n=>kr(n,t,r))}},Ea=(r,e)=>{e.shouldUseNativeValidation&&hs(r,e);const t={};for(const s in r){const n=C(e.fields,s),a=Object.assign(r[s]||{},{ref:n&&n.ref});if(_a(e.names||Object.keys(r),s)){const i=Object.assign({},C(t,s));ee(i,"root",a),ee(t,s,i)}else ee(t,s,a)}return t},_a=(r,e)=>{const t=Er(e);return r.some(s=>Er(s).match(`^${t}\\.\\d+`))};function Er(r){return r.replace(/\]|\[/g,"")}function _r(r,e,t){return t===void 0&&(t={}),function(s,n,a){try{return Promise.resolve(function(i,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:n}))).then(function(d){return a.shouldUseNativeValidation&&hs({},a),{values:t.raw?Object.assign({},s):d,errors:{}}}))}catch(d){return l(d)}return c&&c.then?c.then(void 0,l):c}(0,function(i){if(!i.inner)throw i;return{values:{},errors:Ea((l=i,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(l.inner||[]).reduce(function(d,f){if(d[f.path]||(d[f.path]={message:f.message,type:f.type}),c){var h=d[f.path].types,m=h&&h[f.type];d[f.path]=Yr(f.path,c,d,f.type,m?[].concat(m,f.message):f.message)}return d},{})),a)};var l,c}))}catch(i){return Promise.reject(i)}}}var kt,Nr;function Na(){if(Nr)return kt;Nr=1;function r(y){this._maxSize=y,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(y){return this._values[y]},r.prototype.set=function(y,v){return this._size>=this._maxSize&&this.clear(),y in this._values||this._size++,this._values[y]=v};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,t=/^\d+$/,s=/^\d/,n=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,i=512,l=new r(i),c=new r(i),d=new r(i);kt={Cache:r,split:h,normalizePath:f,setter:function(y){var v=f(y);return c.get(y)||c.set(y,function(A,S){for(var I=0,q=v.length,Z=A;I<q-1;){var z=v[I];if(z==="__proto__"||z==="constructor"||z==="prototype")return A;Z=Z[v[I++]]}Z[v[I]]=S})},getter:function(y,v){var k=f(y);return d.get(y)||d.set(y,function(S){for(var I=0,q=k.length;I<q;)if(S!=null||!v)S=S[k[I++]];else return;return S})},join:function(y){return y.reduce(function(v,k){return v+(g(k)||t.test(k)?"["+k+"]":(v?".":"")+k)},"")},forEach:function(y,v,k){m(Array.isArray(y)?y:h(y),v,k)}};function f(y){return l.get(y)||l.set(y,h(y).map(function(v){return v.replace(a,"$2")}))}function h(y){return y.match(e)||[""]}function m(y,v,k){var A=y.length,S,I,q,Z;for(I=0;I<A;I++)S=y[I],S&&(T(S)&&(S='"'+S+'"'),Z=g(S),q=!Z&&/^\d+$/.test(S),v.call(k,S,Z,q,I,y))}function g(y){return typeof y=="string"&&y&&["'",'"'].indexOf(y.charAt(0))!==-1}function F(y){return y.match(s)&&!y.match(t)}function j(y){return n.test(y)}function T(y){return!g(y)&&(F(y)||j(y))}return kt}var Ve=Na(),Et,Fr;function Fa(){if(Fr)return Et;Fr=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=f=>f.match(r)||[],t=f=>f[0].toUpperCase()+f.slice(1),s=(f,h)=>e(f).join(h).toLowerCase(),n=f=>e(f).reduce((h,m)=>`${h}${h?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return Et={words:e,upperFirst:t,camelCase:n,pascalCase:f=>t(n(f)),snakeCase:f=>s(f,"_"),kebabCase:f=>s(f,"-"),sentenceCase:f=>t(s(f," ")),titleCase:f=>e(f).map(t).join(" ")},Et}var _t=Fa(),at={exports:{}},Sr;function Sa(){if(Sr)return at.exports;Sr=1,at.exports=function(n){return r(e(n),n)},at.exports.array=r;function r(n,a){var i=n.length,l=new Array(i),c={},d=i,f=t(a),h=s(n);for(a.forEach(function(g){if(!h.has(g[0])||!h.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)c[d]||m(n[d],d,new Set);return l;function m(g,F,j){if(j.has(g)){var T;try{T=", node was:"+JSON.stringify(g)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!h.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!c[F]){c[F]=!0;var y=f.get(g)||new Set;if(y=Array.from(y),F=y.length){j.add(g);do{var v=y[--F];m(v,h.get(v),j)}while(F);j.delete(g)}l[--i]=g}}}function e(n){for(var a=new Set,i=0,l=n.length;i<l;i++){var c=n[i];a.add(c[0]),a.add(c[1])}return Array.from(a)}function t(n){for(var a=new Map,i=0,l=n.length;i<l;i++){var c=n[i];a.has(c[0])||a.set(c[0],new Set),a.has(c[1])||a.set(c[1],new Set),a.get(c[0]).add(c[1])}return a}function s(n){for(var a=new Map,i=0,l=n.length;i<l;i++)a.set(n[i],i);return a}return at.exports}var Ta=Sa();const Oa=Bs(Ta),Ca=Object.prototype.toString,Aa=Error.prototype.toString,$a=RegExp.prototype.toString,Da=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Ra=/^Symbol\((.*)\)(.*)$/;function Va(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Tr(r,e=!1){if(r==null||r===!0||r===!1)return""+r;const t=typeof r;if(t==="number")return Va(r);if(t==="string")return e?`"${r}"`:r;if(t==="function")return"[Function "+(r.name||"anonymous")+"]";if(t==="symbol")return Da.call(r).replace(Ra,"Symbol($1)");const s=Ca.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+Aa.call(r)+"]":s==="RegExp"?$a.call(r):null}function $e(r,e){let t=Tr(r,e);return t!==null?t:JSON.stringify(r,function(s,n){let a=Tr(this[s],e);return a!==null?a:n},2)}function ms(r){return r==null?[]:[].concat(r)}let xs,ps,gs,Ma=/\$\{\s*(\w+)\s*\}/g;xs=Symbol.toStringTag;class Or{constructor(e,t,s,n){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[xs]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=n,this.errors=[],this.inner=[],ms(e).forEach(a=>{if(xe.isError(a)){this.errors.push(...a.errors);const i=a.inner.length?a.inner:[a];this.inner.push(...i)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}ps=Symbol.hasInstance;gs=Symbol.toStringTag;class xe 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(Ma,(n,a)=>$e(t[a])):typeof e=="function"?e(t):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,t,s,n,a){const i=new Or(e,t,s,n);if(a)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[gs]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,xe)}static[ps](e){return Or[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let ke={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 n=s!=null&&s!==t?` (cast from the value \`${$e(s,!0)}\`).`:".";return e!=="mixed"?`${r} must be a \`${e}\` type, but the final value was: \`${$e(t,!0)}\``+n:`${r} must match the configured type. The validated value was: \`${$e(t,!0)}\``+n}},me={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"},Ce={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"},At={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},La={isValue:"${path} field must be ${value}"},lt={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Ia={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"},Pa={notType:r=>{const{path:e,value:t,spec:s}=r,n=s.types.length;if(Array.isArray(t)){if(t.length<n)return`${e} tuple value has too few items, expected a length of ${n} but got ${t.length} for value: \`${$e(t,!0)}\``;if(t.length>n)return`${e} tuple value has too many items, expected a length of ${n} but got ${t.length} for value: \`${$e(t,!0)}\``}return xe.formatError(ke.notType,r)}};Object.assign(Object.create(null),{mixed:ke,string:me,number:Ce,date:At,object:lt,array:Ia,boolean:La,tuple:Pa});const Zt=r=>r&&r.__isYupSchema__;class xt{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:n,otherwise:a}=t,i=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new xt(e,(l,c)=>{var d;let f=i(...l)?n:a;return(d=f==null?void 0:f(c))!=null?d: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(a=>a.getValue(t==null?void 0:t.value,t==null?void 0:t.parent,t==null?void 0:t.context)),n=this.fn(s,e,t);if(n===void 0||n===e)return e;if(!Zt(n))throw new TypeError("conditions must return a schema object");return n.resolve(t)}}const it={context:"$",value:"."};class Le{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]===it.context,this.isValue=this.key[0]===it.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?it.context:this.isValue?it.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ve.getter(this.path,!0),this.map=t.map}getValue(e,t,s){let n=this.isContext?s:this.isValue?e:t;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}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}}Le.prototype.__isYupRef=!0;const Se=r=>r==null;function Ue(r){function e({value:t,path:s="",options:n,originalValue:a,schema:i},l,c){const{name:d,test:f,params:h,message:m,skipAbsent:g}=r;let{parent:F,context:j,abortEarly:T=i.spec.abortEarly,disableStackTrace:y=i.spec.disableStackTrace}=n;function v(R){return Le.isRef(R)?R.getValue(t,F,j):R}function k(R={}){const L=Object.assign({value:t,originalValue:a,label:i.spec.label,path:R.path||s,spec:i.spec,disableStackTrace:R.disableStackTrace||y},h,R.params);for(const W of Object.keys(L))L[W]=v(L[W]);const B=new xe(xe.formatError(R.message||m,L),t,L.path,R.type||d,L.disableStackTrace);return B.params=L,B}const A=T?l:c;let S={path:s,parent:F,type:d,from:n.from,createError:k,resolve:v,options:n,originalValue:a,schema:i};const I=R=>{xe.isError(R)?A(R):R?c(null):A(k())},q=R=>{xe.isError(R)?A(R):l(R)};if(g&&Se(t))return I(!0);let z;try{var U;if(z=f.call(S,t,S),typeof((U=z)==null?void 0:U.then)=="function"){if(n.sync)throw new Error(`Validation test of type: "${S.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(z).then(I,q)}}catch(R){q(R);return}I(z)}return e.OPTIONS=r,e}function Ua(r,e,t,s=t){let n,a,i;return e?(Ve.forEach(e,(l,c,d)=>{let f=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:n,value:t});let h=r.type==="tuple",m=d?parseInt(f,10):0;if(r.innerType||h){if(h&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${i}" must contain an index to the tuple element, e.g. "${i}[0]"`);if(t&&m>=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. `);n=t,t=t&&t[m],r=h?r.spec.types[m]:r.innerType}if(!d){if(!r.fields||!r.fields[f])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${i} which is a type: "${r.type}")`);n=t,t=t&&t[f],r=r.fields[f]}a=f,i=c?"["+l+"]":"."+l}),{schema:r,parent:n,parentPath:a}):{parent:n,parentPath:e,schema:r}}class pt extends Set{describe(){const e=[];for(const t of this.values())e.push(Le.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(n=>s.add(n)),t.forEach(n=>s.delete(n)),s}}function Be(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]=Be(r[s],e)}else if(r instanceof Map){t=new Map,e.set(r,t);for(const[s,n]of r.entries())t.set(s,Be(n,e))}else if(r instanceof Set){t=new Set,e.set(r,t);for(const s of r)t.add(Be(s,e))}else if(r instanceof Object){t={},e.set(r,t);for(const[s,n]of Object.entries(r))t[s]=Be(n,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(ke.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=Be(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 n=Object.assign({},t.spec,s.spec);return s.spec=n,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(a=>{e.tests.forEach(i=>{a.test(i.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((n,a)=>a.resolve(n,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,n,a;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:(n=e.recursive)!=null?n:this.spec.recursive,disableStackTrace:(a=e.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),n=t.assert==="ignore-optionality",a=s._cast(e,t);if(t.assert!==!1&&!s.isType(a)){if(n&&Se(a))return a;let i=$e(e),l=$e(a);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
|
|
27
27
|
|
|
28
28
|
attempted value: ${i}
|
|
29
|
-
`+(l!==i?`result of cast: ${l}`:""))}return a}_cast(e,t){let s=e===void 0?e:this.transforms.reduce((n,a)=>a.call(this,n,e,this),e);return s===void 0&&(s=this.getDefault(t)),s}_validate(e,t={},s,n){let{path:a,originalValue:i=e,strict:l=this.spec.strict}=t,c=e;l||(c=this._cast(c,Object.assign({assert:!1},t)));let f=[];for(let d of Object.values(this.internalTests))d&&f.push(d);this.runTests({path:a,value:c,originalValue:i,options:t,tests:f},s,d=>{if(d.length)return n(d,c);this.runTests({path:a,value:c,originalValue:i,options:t,tests:this.tests},s,n)})}runTests(e,t,s){let n=!1,{tests:a,value:i,originalValue:l,path:c,options:f}=e,d=k=>{n||(n=!0,t(k,i))},m=k=>{n||(n=!0,s(k,i))},h=a.length,v=[];if(!h)return m([]);let E={value:i,originalValue:l,path:c,options:f,schema:this};for(let k=0;k<a.length;k++){const F=a[k];F(E,d,function(p){p&&(Array.isArray(p)?v.push(...p):v.push(p)),--h<=0&&m(v)})}}asNestedTest({key:e,index:t,parent:s,parentPath:n,originalParent:a,options:i}){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 d=Object.assign({},i,{strict:!0,parent:s,value:f,originalValue:a[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${n||""}[${c?l:`"${l}"`}]`:(n?`${n}.`:"")+e});return(m,h,v)=>this.resolve(d)._validate(f,d,h,v)}validate(e,t){var s;let n=this.resolve(Object.assign({},t,{value:e})),a=(s=t==null?void 0:t.disableStackTrace)!=null?s:n.spec.disableStackTrace;return new Promise((i,l)=>n._validate(e,t,(c,f)=>{xe.isError(c)&&(c.value=f),l(c)},(c,f)=>{c.length?l(new xe(c,f,void 0,void 0,a)):i(f)}))}validateSync(e,t){var s;let n=this.resolve(Object.assign({},t,{value:e})),a,i=(s=t==null?void 0:t.disableStackTrace)!=null?s:n.spec.disableStackTrace;return n._validate(e,Object.assign({},t,{sync:!0}),(l,c)=>{throw xe.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new xe(l,e,void 0,void 0,i);a=c}),a}isValid(e,t){return this.validate(e,t).then(()=>!0,s=>{if(xe.isError(s))return!1;throw s})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(s){if(xe.isError(s))return!1;throw s}}_getDefault(e){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this,e):Be(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(n){return n===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(n){return n===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(e=je.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=je.notNull){return this.nullability(!1,e)}required(e=je.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=je.default),typeof t.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),n=Ue(t),a=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(i=>!(i.OPTIONS.name===t.name&&(a||i.OPTIONS.test===n.OPTIONS.test))),s.tests.push(n),s}when(e,t){!Array.isArray(e)&&typeof e!="string"&&(t=e,e=".");let s=this.clone(),n=ms(e).map(a=>new Le(a));return n.forEach(a=>{a.isSibling&&s.deps.push(a.key)}),s.conditions.push(typeof t=="function"?new ht(n,t):ht.fromOptions(n,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=je.oneOf){let s=this.clone();return e.forEach(n=>{s._whitelist.add(n),s._blacklist.delete(n)}),s.internalTests.whiteList=Ue({message:t,name:"oneOf",skipAbsent:!0,test(n){let a=this.schema._whitelist,i=a.resolveAll(this.resolve);return i.includes(n)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:i}})}}),s}notOneOf(e,t=je.notOneOf){let s=this.clone();return e.forEach(n=>{s._blacklist.add(n),s._whitelist.delete(n)}),s.internalTests.blacklist=Ue({message:t,name:"notOneOf",test(n){let a=this.schema._blacklist,i=a.resolveAll(this.resolve);return i.includes(n)?this.createError({params:{values:Array.from(a).join(", "),resolved:i}}):!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:n,optional:a,nullable:i}=t.spec;return{meta:n,label:s,optional:a,nullable:i,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,d)=>d.findIndex(m=>m.name===c.name)===f)}}}ve.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])ve.prototype[`${r}At`]=function(e,t,s={}){const{parent:n,parentPath:a,schema:i}=Ua(this,e,t,s.context);return i[r](n&&n[a],Object.assign({},s,{parent:n,path:e}))};for(const r of["equals","is"])ve.prototype[r]=ve.prototype.oneOf;for(const r of["not","nope"])ve.prototype[r]=ve.prototype.notOneOf;const Ba=()=>!0;function At(r){return new vs(r)}class vs extends ve{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Ba},e))}}At.prototype=vs.prototype;const Za=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function za(r){const e=$t(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 $t(r){var e,t;const s=Za.exec(r);return s?{year:Fe(s[1]),month:Fe(s[2],1)-1,day:Fe(s[3],1),hour:Fe(s[4]),minute:Fe(s[5]),second:Fe(s[6]),millisecond:s[7]?Fe(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:Fe(s[10]),minuteOffset:Fe(s[11])}:null}function Fe(r,e=0){return Number(r)||e}let Wa=/^[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])?)*$/,qa=/^((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,Ha=/^(?:[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,Ya="^\\d{4}-\\d{2}-\\d{2}",Ga="\\d{2}:\\d{2}:\\d{2}",Xa="(([+-]\\d{2}(:?\\d{2})?)|Z)",Ja=new RegExp(`${Ya}T${Ga}(\\.\\d+)?${Xa}$`),Ka=r=>Se(r)||r===r.trim(),Qa={}.toString();function ys(){return new bs}class bs extends ve{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 n=e!=null&&e.toString?e.toString():e;return n===Qa?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||je.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=me.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=me.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=me.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,n,a;return t&&(typeof t=="object"?{excludeEmptyString:s=!1,message:n,name:a}=t:n=t),this.test({name:a||"matches",message:n||me.matches,params:{regex:e},skipAbsent:!0,test:i=>i===""&&s||i.search(e)!==-1})}email(e=me.email){return this.matches(Wa,{name:"email",message:e,excludeEmptyString:!0})}url(e=me.url){return this.matches(qa,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=me.uuid){return this.matches(Ha,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t="",s,n;return e&&(typeof e=="object"?{message:t="",allowOffset:s=!1,precision:n=void 0}=e:t=e),this.matches(Ja,{name:"datetime",message:t||me.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:t||me.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:a=>{if(!a||s)return!0;const i=$t(a);return i?!!i.z:!1}}).test({name:"datetime_precision",message:t||me.datetime_precision,params:{precision:n},skipAbsent:!0,test:a=>{if(!a||n==null)return!0;const i=$t(a);return i?i.precision===n:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=me.trim){return this.transform(t=>t!=null?t.trim():t).test({message:e,name:"trim",test:Ka})}lowercase(e=me.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=me.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()})}}ys.prototype=bs.prototype;let ei=r=>r!=+r;function ws(){return new js}class js extends ve{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!ei(e)}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce)return e;let n=e;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return s.isType(n)||n===null?n:parseFloat(n)})})}min(e,t=Ce.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=Ce.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=Ce.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=Ce.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(s){return s>this.resolve(e)}})}positive(e=Ce.positive){return this.moreThan(0,e)}negative(e=Ce.negative){return this.lessThan(0,e)}integer(e=Ce.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(n=>Se(n)?n:Math[e](n))}}ws.prototype=js.prototype;let ks=new Date(""),ti=r=>Object.prototype.toString.call(r)==="[object Date]";function Zt(){return new Je}class Je extends ve{constructor(){super({type:"date",check(e){return ti(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,t,s)=>!s.spec.coerce||s.isType(e)||e===null?e:(e=za(e),isNaN(e)?Je.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let s;if(Le.isRef(e))s=e;else{let n=this.cast(e);if(!this._typeCheck(n))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=n}return s}min(e,t=Ct.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n>=this.resolve(s)}})}max(e,t=Ct.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n<=this.resolve(s)}})}}Je.INVALID_DATE=ks;Zt.prototype=Je.prototype;Zt.INVALID_DATE=ks;function ri(r,e=[]){let t=[],s=new Set,n=new Set(e.map(([i,l])=>`${i}-${l}`));function a(i,l){let c=Ve.split(i)[0];s.add(c),n.has(`${l}-${c}`)||t.push([l,c])}for(const i of Object.keys(r)){let l=r[i];s.add(i),Le.isRef(l)&&l.isSibling?a(l.path,i):Bt(l)&&"deps"in l&&l.deps.forEach(c=>a(c,i))}return Oa.array(Array.from(s),t).reverse()}function Cr(r,e){let t=1/0;return r.some((s,n)=>{var a;if((a=e.path)!=null&&a.includes(s))return t=n,!0}),t}function Es(r){return(e,t)=>Cr(r,e)-Cr(r,t)}const si=(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 ot(r){if("fields"in r){const e={};for(const[t,s]of Object.entries(r.fields))e[t]=ot(s);return r.setFields(e)}if(r.type==="array"){const e=r.optional();return e.innerType&&(e.innerType=ot(e.innerType)),e}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(ot)}):"optional"in r?r.optional():r}const ni=(r,e)=>{const t=[...Ve.normalizePath(e)];if(t.length===1)return t[0]in r;let s=t.pop(),n=Ve.getter(Ve.join(t),!0)(r);return!!(n&&s in n)};let Ar=r=>Object.prototype.toString.call(r)==="[object Object]";function $r(r,e){let t=Object.keys(r.fields);return Object.keys(e).filter(s=>t.indexOf(s)===-1)}const ai=Es([]);function Ns(r){return new _s(r)}class _s extends ve{constructor(e){super({type:"object",check(t){return Ar(t)||typeof t=="function"}}),this.fields=Object.create(null),this._sortErrors=ai,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var s;let n=super._cast(e,t);if(n===void 0)return this.getDefault(t);if(!this._typeCheck(n))return n;let a=this.fields,i=(s=t.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(n).filter(m=>!this._nodes.includes(m))),c={},f=Object.assign({},t,{parent:c,__validating:t.__validating||!1}),d=!1;for(const m of l){let h=a[m],v=m in n;if(h){let E,k=n[m];f.path=(t.path?`${t.path}.`:"")+m,h=h.resolve({value:k,context:t.context,parent:c});let F=h instanceof ve?h.spec:void 0,y=F==null?void 0:F.strict;if(F!=null&&F.strip){d=d||m in n;continue}E=!t.__validating||!y?h.cast(n[m],f):n[m],E!==void 0&&(c[m]=E)}else v&&!i&&(c[m]=n[m]);(v!==m in c||c[m]!==n[m])&&(d=!0)}return d?c:n}_validate(e,t={},s,n){let{from:a=[],originalValue:i=e,recursive:l=this.spec.recursive}=t;t.from=[{schema:this,value:i},...a],t.__validating=!0,t.originalValue=i,super._validate(e,t,s,(c,f)=>{if(!l||!Ar(f)){n(c,f);return}i=i||f;let d=[];for(let m of this._nodes){let h=this.fields[m];!h||Le.isRef(h)||d.push(h.asNestedTest({options:t,key:m,parent:f,parentPath:t.path,originalParent:i}))}this.runTests({tests:d,value:f,originalValue:i,options:t},s,m=>{n(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[n,a]of Object.entries(this.fields)){const i=s[n];s[n]=i===void 0?a:i}return t.withMutation(n=>n.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 n;const a=this.fields[s];let i=e;(n=i)!=null&&n.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[s]})),t[s]=a&&"getDefault"in a?a.getDefault(i):void 0}),t}setFields(e,t){let s=this.clone();return s.fields=e,s._nodes=ri(e,t),s._sortErrors=Es(Object.keys(e)),t&&(s._excludedEdges=t),s}shape(e,t=[]){return this.clone().withMutation(s=>{let n=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),n=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),n)})}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 ot(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,n])=>e.includes(s)&&e.includes(n)))}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 n=Ve.getter(e,!0);return this.transform(a=>{if(!a)return a;let i=a;return ni(a,e)&&(i=Object.assign({},a),s||delete i[e],i[t]=n(a)),i})}json(){return this.transform(si)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||it.exact,test(t){if(t==null)return!0;const s=$r(this.schema,t);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=it.noUnknown){typeof e!="boolean"&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(n){if(n==null)return!0;const a=$r(this.schema,n);return!e||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=it.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const s={};for(const n of Object.keys(t))s[e(n)]=t[n];return s})}camelCase(){return this.transformKeys(Et.camelCase)}snakeCase(){return this.transformKeys(Et.snakeCase)}constantCase(){return this.transformKeys(e=>Et.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[a,i]of Object.entries(t.fields)){var n;let l=e;(n=l)!=null&&n.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[a]})),s.fields[a]=i.describe(l)}return s}}Ns.prototype=_s.prototype;function ii({fields:r,explicitSchema:e}){return w.useMemo(()=>{if(e)return Nr(e);const t={};r.forEach(n=>{var i,l,c,f,d,m,h;let a;switch(n.type){case"text":case"password":case"email":if(a=ys(),(i=n.validation)!=null&&i.required){const v=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(v)}(l=n.validation)!=null&&l.minLength&&(a=a.min(n.validation.minLength.value,n.validation.minLength.message)),(c=n.validation)!=null&&c.maxLength&&(a=a.max(n.validation.maxLength.value,n.validation.maxLength.message)),(f=n.validation)!=null&&f.pattern&&(a=a.matches(n.validation.pattern.value,n.validation.pattern.message)),n.type==="email"&&(a=a.email("Email inválido"));break;case"number":if(a=ws(),(d=n.validation)!=null&&d.required){const v=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(v)}break;case"select":case"optionGroup":if(a=At(),(m=n.validation)!=null&&m.required){const v=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(v)}break;case"date":if(a=Zt(),(h=n.validation)!=null&&h.required){const v=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(v)}break;default:a=At()}t[n.name]=a});const s=Ns().shape(t);return Nr(s)},[r,e])}function oi(r){return w.useMemo(()=>{const e={};return r.forEach(t=>{e[t.name]=t}),e},[r])}function li(r){const e=w.useMemo(()=>r.filter(i=>i.type==="select"&&i.loadOptions),[r]),[t,s]=w.useState(e.length),[n,a]=w.useState({});return w.useEffect(()=>{e.length!==0&&e.forEach(i=>{i.loadOptions().then(l=>a(c=>({...c,[i.name]:l}))).finally(()=>s(l=>Math.max(0,l-1)))})},[e]),{loadingCount:t,optionsMap:n}}function ci(r,e){const t=w.useMemo(()=>r.filter(i=>i.disabledWhen),[r]),s=w.useMemo(()=>t.map(i=>i.disabledWhen.watchField),[t]),n=qr({control:e,name:s}),a={};return t.forEach(i=>{const l=s.indexOf(i.disabledWhen.watchField),c=n[l];a[i.name]=c===i.disabledWhen.watchValue}),a}const Dr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ui={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function zt({control:r,name:e,rules:t,defaultValue:s,size:n="sm",width:a="100%",label:i,labelHidden:l=!1,hasError:c=!1,errorMessage:f="",maxLength:d,showCounter:m=!1,className:h,...v}){const E=w.useId(),k=e||E,[F,y]=w.useState(s||"");if(r&&e)return o.jsx(we,{name:e,control:r,rules:t,defaultValue:s||"",render:({field:S,fieldState:R})=>{var C;return o.jsx(zt,{...v,size:n,width:a,label:i,labelHidden:l,hasError:!!R.error,errorMessage:((C=R.error)==null?void 0:C.message)||"",maxLength:d,showCounter:m,className:h,value:S.value,onChange:S.onChange})}});w.useEffect(()=>{y(s||"")},[s]);const p=S=>{var R;d!==void 0&&S.target.value.length>d||(y(S.target.value),(R=v.onChange)==null||R.call(v,S))};return o.jsxs("div",{className:D("flex flex-col",h),style:{width:a},children:[i&&o.jsx("label",{htmlFor:k,className:D("pb-2 text-[var(--color-ds-text-primary)]",Dr[n],l&&"sr-only"),children:i}),o.jsx("textarea",{id:k,className:D("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",Dr[n],ui[n],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",v.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:p,maxLength:d,...v}),o.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&f?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:f}):o.jsx("span",{"aria-hidden":"true",children:" "}),m&&d!==void 0&&o.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[F.length,"/",d]})]})]})}const di={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function Fs({control:r,name:e,rules:t,defaultValue:s=!1,label:n,labelHidden:a=!1,disabled:i=!1,size:l="sm",className:c,hasError:f=!1,errorMessage:d=""}){return o.jsx("div",{className:D("flex flex-col",c),children:o.jsx(we,{name:e,control:r,rules:t,defaultValue:s,render:({field:m,fieldState:h})=>{const v=h.error;return o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("input",{id:e,type:"checkbox",className:D(di[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",i&&"opacity-50 cursor-not-allowed"),checked:m.value,onChange:E=>m.onChange(E.target.checked),disabled:i}),o.jsx("span",{className:D("text-[var(--color-ds-text-primary)] text-ds-md",i&&"text-[var(--color-ds-text-secondary)]"),children:n}),f&&(v==null?void 0:v.message)&&o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:v.message})]})}})})}function Ss({name:r,control:e,searchFn:t,label:s,size:n="sm",width:a="100%",disabled:i=!1}){const[l,c]=w.useState([]),[f,d]=w.useState(!1),[m,h]=w.useState(!1),v=w.useRef(null),E=async y=>{if(y){d(!0);try{const p=await t(y);c(p),h(!0)}finally{d(!1)}}};w.useEffect(()=>{function y(p){v.current&&!v.current.contains(p.target)&&h(!1)}if(m)return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[m]);const k=n==="sm"?"text-ds-sm":n==="md"?"text-ds-md":"text-ds-lg",F=n==="sm"?"h-6":n==="md"?"h-10":"h-12";return o.jsx(we,{name:r,control:e,render:({field:y,fieldState:p})=>{var S;return o.jsxs("div",{ref:v,className:"relative flex flex-col",style:{width:a},children:[s&&o.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${k}`,children:s}),o.jsx(gt,{className:"rounded-r-none",type:"text",size:n,width:"100%",value:y.value,onChange:R=>y.onChange(R.target.value),disabled:i,hasError:p.invalid,errorMessage:(S=p.error)==null?void 0:S.message,suffixButton:o.jsx(Te,{type:"button",className:"!rounded-l-none",size:n,variant:"primary",onClick:()=>E(y.value),disabled:i,children:"Buscar"})}),f&&o.jsx("div",{className:`
|
|
29
|
+
`+(l!==i?`result of cast: ${l}`:""))}return a}_cast(e,t){let s=e===void 0?e:this.transforms.reduce((n,a)=>a.call(this,n,e,this),e);return s===void 0&&(s=this.getDefault(t)),s}_validate(e,t={},s,n){let{path:a,originalValue:i=e,strict:l=this.spec.strict}=t,c=e;l||(c=this._cast(c,Object.assign({assert:!1},t)));let d=[];for(let f of Object.values(this.internalTests))f&&d.push(f);this.runTests({path:a,value:c,originalValue:i,options:t,tests:d},s,f=>{if(f.length)return n(f,c);this.runTests({path:a,value:c,originalValue:i,options:t,tests:this.tests},s,n)})}runTests(e,t,s){let n=!1,{tests:a,value:i,originalValue:l,path:c,options:d}=e,f=j=>{n||(n=!0,t(j,i))},h=j=>{n||(n=!0,s(j,i))},m=a.length,g=[];if(!m)return h([]);let F={value:i,originalValue:l,path:c,options:d,schema:this};for(let j=0;j<a.length;j++){const T=a[j];T(F,f,function(v){v&&(Array.isArray(v)?g.push(...v):g.push(v)),--m<=0&&h(g)})}}asNestedTest({key:e,index:t,parent:s,parentPath:n,originalParent:a,options:i}){const l=e??t;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let d=s[l];const f=Object.assign({},i,{strict:!0,parent:s,value:d,originalValue:a[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${n||""}[${c?l:`"${l}"`}]`:(n?`${n}.`:"")+e});return(h,m,g)=>this.resolve(f)._validate(d,f,m,g)}validate(e,t){var s;let n=this.resolve(Object.assign({},t,{value:e})),a=(s=t==null?void 0:t.disableStackTrace)!=null?s:n.spec.disableStackTrace;return new Promise((i,l)=>n._validate(e,t,(c,d)=>{xe.isError(c)&&(c.value=d),l(c)},(c,d)=>{c.length?l(new xe(c,d,void 0,void 0,a)):i(d)}))}validateSync(e,t){var s;let n=this.resolve(Object.assign({},t,{value:e})),a,i=(s=t==null?void 0:t.disableStackTrace)!=null?s:n.spec.disableStackTrace;return n._validate(e,Object.assign({},t,{sync:!0}),(l,c)=>{throw xe.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new xe(l,e,void 0,void 0,i);a=c}),a}isValid(e,t){return this.validate(e,t).then(()=>!0,s=>{if(xe.isError(s))return!1;throw s})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(s){if(xe.isError(s))return!1;throw s}}_getDefault(e){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this,e):Be(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(n){return n===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(n){return n===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(e=ke.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=ke.notNull){return this.nullability(!1,e)}required(e=ke.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=ke.default),typeof t.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),n=Ue(t),a=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(i=>!(i.OPTIONS.name===t.name&&(a||i.OPTIONS.test===n.OPTIONS.test))),s.tests.push(n),s}when(e,t){!Array.isArray(e)&&typeof e!="string"&&(t=e,e=".");let s=this.clone(),n=ms(e).map(a=>new Le(a));return n.forEach(a=>{a.isSibling&&s.deps.push(a.key)}),s.conditions.push(typeof t=="function"?new xt(n,t):xt.fromOptions(n,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=ke.oneOf){let s=this.clone();return e.forEach(n=>{s._whitelist.add(n),s._blacklist.delete(n)}),s.internalTests.whiteList=Ue({message:t,name:"oneOf",skipAbsent:!0,test(n){let a=this.schema._whitelist,i=a.resolveAll(this.resolve);return i.includes(n)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:i}})}}),s}notOneOf(e,t=ke.notOneOf){let s=this.clone();return e.forEach(n=>{s._blacklist.add(n),s._whitelist.delete(n)}),s.internalTests.blacklist=Ue({message:t,name:"notOneOf",test(n){let a=this.schema._blacklist,i=a.resolveAll(this.resolve);return i.includes(n)?this.createError({params:{values:Array.from(a).join(", "),resolved:i}}):!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:n,optional:a,nullable:i}=t.spec;return{meta:n,label:s,optional:a,nullable:i,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,d,f)=>f.findIndex(h=>h.name===c.name)===d)}}}be.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])be.prototype[`${r}At`]=function(e,t,s={}){const{parent:n,parentPath:a,schema:i}=Ua(this,e,t,s.context);return i[r](n&&n[a],Object.assign({},s,{parent:n,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 Ba=()=>!0;function $t(r){return new vs(r)}class vs extends be{constructor(e){super(typeof e=="function"?{type:"mixed",check:e}:Object.assign({type:"mixed",check:Ba},e))}}$t.prototype=vs.prototype;const Za=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function za(r){const e=Dt(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 Dt(r){var e,t;const s=Za.exec(r);return s?{year:Fe(s[1]),month:Fe(s[2],1)-1,day:Fe(s[3],1),hour:Fe(s[4]),minute:Fe(s[5]),second:Fe(s[6]),millisecond:s[7]?Fe(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:Fe(s[10]),minuteOffset:Fe(s[11])}:null}function Fe(r,e=0){return Number(r)||e}let Wa=/^[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])?)*$/,qa=/^((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,Ha=/^(?:[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,Ya="^\\d{4}-\\d{2}-\\d{2}",Ga="\\d{2}:\\d{2}:\\d{2}",Xa="(([+-]\\d{2}(:?\\d{2})?)|Z)",Ja=new RegExp(`${Ya}T${Ga}(\\.\\d+)?${Xa}$`),Ka=r=>Se(r)||r===r.trim(),Qa={}.toString();function bs(){return new ys}class ys 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 n=e!=null&&e.toString?e.toString():e;return n===Qa?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||ke.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=me.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=me.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=me.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,n,a;return t&&(typeof t=="object"?{excludeEmptyString:s=!1,message:n,name:a}=t:n=t),this.test({name:a||"matches",message:n||me.matches,params:{regex:e},skipAbsent:!0,test:i=>i===""&&s||i.search(e)!==-1})}email(e=me.email){return this.matches(Wa,{name:"email",message:e,excludeEmptyString:!0})}url(e=me.url){return this.matches(qa,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=me.uuid){return this.matches(Ha,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t="",s,n;return e&&(typeof e=="object"?{message:t="",allowOffset:s=!1,precision:n=void 0}=e:t=e),this.matches(Ja,{name:"datetime",message:t||me.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:t||me.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:a=>{if(!a||s)return!0;const i=Dt(a);return i?!!i.z:!1}}).test({name:"datetime_precision",message:t||me.datetime_precision,params:{precision:n},skipAbsent:!0,test:a=>{if(!a||n==null)return!0;const i=Dt(a);return i?i.precision===n:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=me.trim){return this.transform(t=>t!=null?t.trim():t).test({message:e,name:"trim",test:Ka})}lowercase(e=me.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=me.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()})}}bs.prototype=ys.prototype;let ei=r=>r!=+r;function ws(){return new js}class js extends be{constructor(){super({type:"number",check(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!ei(e)}}),this.withMutation(()=>{this.transform((e,t,s)=>{if(!s.spec.coerce)return e;let n=e;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return s.isType(n)||n===null?n:parseFloat(n)})})}min(e,t=Ce.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=Ce.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=Ce.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=Ce.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(s){return s>this.resolve(e)}})}positive(e=Ce.positive){return this.moreThan(0,e)}negative(e=Ce.negative){return this.lessThan(0,e)}integer(e=Ce.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(n=>Se(n)?n:Math[e](n))}}ws.prototype=js.prototype;let ks=new Date(""),ti=r=>Object.prototype.toString.call(r)==="[object Date]";function zt(){return new Qe}class Qe extends be{constructor(){super({type:"date",check(e){return ti(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,t,s)=>!s.spec.coerce||s.isType(e)||e===null?e:(e=za(e),isNaN(e)?Qe.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let s;if(Le.isRef(e))s=e;else{let n=this.cast(e);if(!this._typeCheck(n))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=n}return s}min(e,t=At.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n>=this.resolve(s)}})}max(e,t=At.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(n){return n<=this.resolve(s)}})}}Qe.INVALID_DATE=ks;zt.prototype=Qe.prototype;zt.INVALID_DATE=ks;function ri(r,e=[]){let t=[],s=new Set,n=new Set(e.map(([i,l])=>`${i}-${l}`));function a(i,l){let c=Ve.split(i)[0];s.add(c),n.has(`${l}-${c}`)||t.push([l,c])}for(const i of Object.keys(r)){let l=r[i];s.add(i),Le.isRef(l)&&l.isSibling?a(l.path,i):Zt(l)&&"deps"in l&&l.deps.forEach(c=>a(c,i))}return Oa.array(Array.from(s),t).reverse()}function Cr(r,e){let t=1/0;return r.some((s,n)=>{var a;if((a=e.path)!=null&&a.includes(s))return t=n,!0}),t}function Es(r){return(e,t)=>Cr(r,e)-Cr(r,t)}const si=(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 ct(r){if("fields"in r){const e={};for(const[t,s]of Object.entries(r.fields))e[t]=ct(s);return r.setFields(e)}if(r.type==="array"){const e=r.optional();return e.innerType&&(e.innerType=ct(e.innerType)),e}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(ct)}):"optional"in r?r.optional():r}const ni=(r,e)=>{const t=[...Ve.normalizePath(e)];if(t.length===1)return t[0]in r;let s=t.pop(),n=Ve.getter(Ve.join(t),!0)(r);return!!(n&&s in n)};let Ar=r=>Object.prototype.toString.call(r)==="[object Object]";function $r(r,e){let t=Object.keys(r.fields);return Object.keys(e).filter(s=>t.indexOf(s)===-1)}const ai=Es([]);function _s(r){return new Ns(r)}class Ns extends be{constructor(e){super({type:"object",check(t){return Ar(t)||typeof t=="function"}}),this.fields=Object.create(null),this._sortErrors=ai,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var s;let n=super._cast(e,t);if(n===void 0)return this.getDefault(t);if(!this._typeCheck(n))return n;let a=this.fields,i=(s=t.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(n).filter(h=>!this._nodes.includes(h))),c={},d=Object.assign({},t,{parent:c,__validating:t.__validating||!1}),f=!1;for(const h of l){let m=a[h],g=h in n;if(m){let F,j=n[h];d.path=(t.path?`${t.path}.`:"")+h,m=m.resolve({value:j,context:t.context,parent:c});let T=m instanceof be?m.spec:void 0,y=T==null?void 0:T.strict;if(T!=null&&T.strip){f=f||h in n;continue}F=!t.__validating||!y?m.cast(n[h],d):n[h],F!==void 0&&(c[h]=F)}else g&&!i&&(c[h]=n[h]);(g!==h in c||c[h]!==n[h])&&(f=!0)}return f?c:n}_validate(e,t={},s,n){let{from:a=[],originalValue:i=e,recursive:l=this.spec.recursive}=t;t.from=[{schema:this,value:i},...a],t.__validating=!0,t.originalValue=i,super._validate(e,t,s,(c,d)=>{if(!l||!Ar(d)){n(c,d);return}i=i||d;let f=[];for(let h of this._nodes){let m=this.fields[h];!m||Le.isRef(m)||f.push(m.asNestedTest({options:t,key:h,parent:d,parentPath:t.path,originalParent:i}))}this.runTests({tests:f,value:d,originalValue:i,options:t},s,h=>{n(h.sort(this._sortErrors).concat(c),d)})})}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[n,a]of Object.entries(this.fields)){const i=s[n];s[n]=i===void 0?a:i}return t.withMutation(n=>n.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 n;const a=this.fields[s];let i=e;(n=i)!=null&&n.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[s]})),t[s]=a&&"getDefault"in a?a.getDefault(i):void 0}),t}setFields(e,t){let s=this.clone();return s.fields=e,s._nodes=ri(e,t),s._sortErrors=Es(Object.keys(e)),t&&(s._excludedEdges=t),s}shape(e,t=[]){return this.clone().withMutation(s=>{let n=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),n=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),n)})}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 ct(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,n])=>e.includes(s)&&e.includes(n)))}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 n=Ve.getter(e,!0);return this.transform(a=>{if(!a)return a;let i=a;return ni(a,e)&&(i=Object.assign({},a),s||delete i[e],i[t]=n(a)),i})}json(){return this.transform(si)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||lt.exact,test(t){if(t==null)return!0;const s=$r(this.schema,t);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=lt.noUnknown){typeof e!="boolean"&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(n){if(n==null)return!0;const a=$r(this.schema,n);return!e||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=lt.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const s={};for(const n of Object.keys(t))s[e(n)]=t[n];return s})}camelCase(){return this.transformKeys(_t.camelCase)}snakeCase(){return this.transformKeys(_t.snakeCase)}constantCase(){return this.transformKeys(e=>_t.snakeCase(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[a,i]of Object.entries(t.fields)){var n;let l=e;(n=l)!=null&&n.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[a]})),s.fields[a]=i.describe(l)}return s}}_s.prototype=Ns.prototype;function ii({fields:r,explicitSchema:e}){return b.useMemo(()=>{if(e)return _r(e);const t={};r.forEach(n=>{var i,l,c,d,f,h,m;let a;switch(n.type){case"text":case"password":case"email":if(a=bs(),(i=n.validation)!=null&&i.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}(l=n.validation)!=null&&l.minLength&&(a=a.min(n.validation.minLength.value,n.validation.minLength.message)),(c=n.validation)!=null&&c.maxLength&&(a=a.max(n.validation.maxLength.value,n.validation.maxLength.message)),(d=n.validation)!=null&&d.pattern&&(a=a.matches(n.validation.pattern.value,n.validation.pattern.message)),n.type==="email"&&(a=a.email("Email inválido"));break;case"number":if(a=ws(),(f=n.validation)!=null&&f.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}break;case"select":case"optionGroup":if(a=$t(),(h=n.validation)!=null&&h.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}break;case"date":if(a=zt(),(m=n.validation)!=null&&m.required){const g=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(g)}break;default:a=$t()}t[n.name]=a});const s=_s().shape(t);return _r(s)},[r,e])}function oi(r){return b.useMemo(()=>{const e={};return r.forEach(t=>{e[t.name]=t}),e},[r])}function li(r){const e=b.useMemo(()=>r.filter(i=>i.type==="select"&&i.loadOptions),[r]),[t,s]=b.useState(e.length),[n,a]=b.useState({});return b.useEffect(()=>{e.length!==0&&e.forEach(i=>{i.loadOptions().then(l=>a(c=>({...c,[i.name]:l}))).finally(()=>s(l=>Math.max(0,l-1)))})},[e]),{loadingCount:t,optionsMap:n}}function ci(r,e){const t=b.useMemo(()=>r.filter(i=>i.disabledWhen),[r]),s=b.useMemo(()=>t.map(i=>i.disabledWhen.watchField),[t]),n=qr({control:e,name:s}),a={};return t.forEach(i=>{const l=s.indexOf(i.disabledWhen.watchField),c=n[l];a[i.name]=c===i.disabledWhen.watchValue}),a}const Dr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},ui={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function Wt({control:r,name:e,rules:t,defaultValue:s,size:n="sm",width:a="100%",label:i,labelHidden:l=!1,hasError:c=!1,errorMessage:d="",maxLength:f,showCounter:h=!1,className:m,...g}){const F=b.useId(),j=e||F,[T,y]=b.useState(s||"");if(r&&e)return o.jsx(je,{name:e,control:r,rules:t,defaultValue:s||"",render:({field:k,fieldState:A})=>{var S;return o.jsx(Wt,{...g,size:n,width:a,label:i,labelHidden:l,hasError:!!A.error,errorMessage:((S=A.error)==null?void 0:S.message)||"",maxLength:f,showCounter:h,className:m,value:k.value,onChange:k.onChange})}});b.useEffect(()=>{y(s||"")},[s]);const v=k=>{var A;f!==void 0&&k.target.value.length>f||(y(k.target.value),(A=g.onChange)==null||A.call(g,k))};return o.jsxs("div",{className:D("flex flex-col",m),style:{width:a},children:[i&&o.jsx("label",{htmlFor:j,className:D("pb-2 text-[var(--color-ds-text-primary)]",Dr[n],l&&"sr-only"),children:i}),o.jsx("textarea",{id:j,className:D("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",Dr[n],ui[n],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",g.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:T,onChange:v,maxLength:f,...g}),o.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&d?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:d}):o.jsx("span",{"aria-hidden":"true",children:" "}),h&&f!==void 0&&o.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[T.length,"/",f]})]})]})}const di={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function Fs({control:r,name:e,rules:t,defaultValue:s=!1,label:n,labelHidden:a=!1,disabled:i=!1,size:l="sm",className:c,hasError:d=!1,errorMessage:f=""}){return o.jsx("div",{className:D("flex flex-col",c),children:o.jsx(je,{name:e,control:r,rules:t,defaultValue:s,render:({field:h,fieldState:m})=>{const g=m.error;return o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("input",{id:e,type:"checkbox",className:D(di[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",i&&"opacity-50 cursor-not-allowed"),checked:h.value,onChange:F=>h.onChange(F.target.checked),disabled:i}),o.jsx("span",{className:D("text-[var(--color-ds-text-primary)] text-ds-md",i&&"text-[var(--color-ds-text-secondary)]"),children:n}),d&&(g==null?void 0:g.message)&&o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:g.message})]})}})})}function Ss({name:r,control:e,searchFn:t,label:s,size:n="sm",width:a="100%",disabled:i=!1}){const{getValues:l,watch:c}=Ke(),[d,f]=b.useState([]),[h,m]=b.useState(!1),[g,F]=b.useState(!1),j=b.useRef(null),T=async k=>{if(k){m(!0);try{const A=await t(k,{getValues:l,watch:c});f(A),F(!0)}finally{m(!1)}}};b.useEffect(()=>{function k(A){j.current&&!j.current.contains(A.target)&&F(!1)}if(g)return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[g]);const y=n==="sm"?"text-ds-sm":n==="md"?"text-ds-md":"text-ds-lg",v=n==="sm"?"h-6":n==="md"?"h-10":"h-12";return o.jsx(je,{name:r,control:e,render:({field:k,fieldState:A})=>{var S;return o.jsxs("div",{ref:j,className:"relative flex flex-col",style:{width:a},children:[s&&o.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${y}`,children:s}),o.jsx(vt,{className:"rounded-r-none",type:"text",size:n,width:"100%",value:k.value,onChange:I=>k.onChange(I.target.value),disabled:i,hasError:A.invalid,errorMessage:(S=A.error)==null?void 0:S.message,suffixButton:o.jsx(Te,{type:"button",className:"!rounded-l-none",size:n,variant:"primary",onClick:()=>T(k.value),disabled:i,children:"Buscar"})}),h&&o.jsx("div",{className:`
|
|
30
30
|
absolute
|
|
31
31
|
top-14
|
|
32
32
|
left-0
|
|
33
33
|
right-0
|
|
34
34
|
z-10
|
|
35
|
-
`,children:o.jsx(Me,{width:"100%",height:n==="sm"?"1.5rem":n==="md"?"2.5rem":"3rem",variant:"rect",className:"rounded-lg"})}),
|
|
35
|
+
`,children:o.jsx(Me,{width:"100%",height:n==="sm"?"1.5rem":n==="md"?"2.5rem":"3rem",variant:"rect",className:"rounded-lg"})}),g&&!h&&d.length>0&&o.jsx("ul",{className:`
|
|
36
36
|
absolute
|
|
37
37
|
top-14
|
|
38
38
|
|
|
@@ -42,19 +42,19 @@ attempted value: ${i}
|
|
|
42
42
|
rounded-lg
|
|
43
43
|
bg-[var(--color-ds-background-page)]
|
|
44
44
|
shadow-lg
|
|
45
|
-
${
|
|
45
|
+
${y}
|
|
46
46
|
max-h-48
|
|
47
47
|
overflow-auto
|
|
48
48
|
z-10
|
|
49
|
-
`,children:
|
|
49
|
+
`,children:d.map(I=>o.jsx("li",{className:`
|
|
50
50
|
px-2
|
|
51
|
-
${
|
|
51
|
+
${v}
|
|
52
52
|
flex items-center
|
|
53
53
|
cursor-pointer
|
|
54
54
|
text-[var(--color-ds-text-primary)]
|
|
55
55
|
hover:bg-[var(--color-ds-background-surface)]
|
|
56
56
|
|
|
57
|
-
`,onClick:()=>{
|
|
57
|
+
`,onClick:()=>{k.onChange(I.value),F(!1)},children:I.label},I.value))})]})}})}function fi({schema:r}){const{layout:e,fields:t,onSubmit:s,successMessage:n,errorMessage:a,footerButtons:i,defaultValues:l,loadDefaultValues:c,validationSchema:d}=r,{show:f}=fs(),{t:h}=Ut(),m=ii({fields:t,explicitSchema:d}),g=Bn({resolver:m,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),F=b.useMemo(()=>({getValues:g.getValues,watch:g.watch}),[g.getValues,g.watch]),{control:j,reset:T,watch:y,handleSubmit:v,formState:{errors:k,isSubmitting:A}}=g,[S,I]=b.useState(!1);b.useEffect(()=>{c&&(I(!0),c().then(H=>T(H)).finally(()=>I(!1)))},[c,T]);const{loadingCount:q,optionsMap:Z}=li(t),z=oi(t),U=ci(t,j),R=b.useMemo(()=>{const H={};return e.forEach((E,J)=>{E.type==="tabs"&&(H[J]=E.tabs[0].key)}),H},[e]),[L,B]=b.useState(R),W=b.useCallback(H=>{const E=y(),{watchField:J,watchValue:re}=H;return typeof re=="function"?re(E):E[J]===re},[y]),X=b.useCallback(H=>{var M,G,ne,ae;let E;if(typeof H=="string"){if(E=z[H],!E)return null}else E=H;if("visibleWhen"in E&&E.visibleWhen&&!W(E.visibleWhen))return null;let J=!!E.disabled;if("disabledWhen"in E&&E.disabledWhen&&W(E.disabledWhen)&&(J=!0),!J&&"name"in E&&E.name&&U[E.name]&&(J=!0),E.type==="search"){const Y=ie=>E.searchFn(ie,F);return o.jsx(Ss,{name:E.name,control:j,searchFn:Y,label:E.label,size:E.size,width:E.width,disabled:J||A},E.name)}if(E.type==="inputGroup"){const Y=E,ie=Y.inputs.map(Q=>{var Ze;const K=typeof Q=="string"?z[Q]:Q;if(!K)return null;let pe=!!K.disabled;K.disabledWhen&&W(K.disabledWhen)&&(pe=!0),!pe&&U[K.name]&&(pe=!0);const Ie={name:K.name,control:j,rules:K.validation,defaultValue:void 0,label:K.label,size:K.size,width:K.width,placeholder:K.placeholder,hasError:!!k[K.name],errorMessage:((Ze=k[K.name])==null?void 0:Ze.message)||"",loading:S,disabled:pe,suffixButton:K.suffixButton};return K.type==="select"?{...Ie,options:K.options??Z[K.name]??[],loadOptions:K.options?void 0:K.loadOptions}:Ie}).filter(Q=>Q!==null);return o.jsx(ls,{groupLabel:Y.groupLabel,inputs:ie,separator:Y.separator,useSeparator:Y.useSeparator,className:Y.className,showVisibleLabel:Y.showVisibleLabel,size:Y.size},`inputGroup_${Y.groupLabel}`)}if(E.type==="button"){const Y=E;return o.jsx("div",{className:"self-center",children:o.jsx(Te,{type:"button",variant:Y.variant,size:Y.size,width:Y.width,icon:Y.icon,iconPosition:Y.iconPosition,ariaLabel:Y.ariaLabel,onClick:Y.onClick,disabled:J||A,children:Y.label})},Y.name)}const re=E.suffixButton,x=typeof re=="string"?X(re):re,N={name:E.name,control:j,disabled:J||A,label:E.label,size:E.size,width:E.width,placeholder:E.placeholder,info:E.info,suffixButton:x};switch(E.type){case"select":return o.jsx(je,{name:E.name,control:j,render:({field:Y})=>{var ie;return o.jsx(Xe,{...N,value:Y.value,onChange:Y.onChange,options:E.options??Z[E.name]??[],loadOptions:E.options?void 0:E.loadOptions,hasError:!!k[E.name],errorMessage:(ie=k[E.name])==null?void 0:ie.message,suffixButton:x})}},E.name);case"textarea":return o.jsx(je,{name:E.name,control:j,render:({field:Y,fieldState:ie})=>{var Q;return o.jsx(Wt,{...N,value:Y.value,onChange:Y.onChange,maxLength:E.maxLength,showCounter:!!E.showCounter,hasError:!!ie.error,errorMessage:((Q=ie.error)==null?void 0:Q.message)||""})}},E.name);case"file":return o.jsx(as,{...N,defaultValue:[],maxFiles:E.maxFiles,accept:E.accept,hasError:!!k[E.name],errorMessage:(M=k[E.name])==null?void 0:M.message},E.name);case"checkbox":return o.jsx(Fs,{...N,defaultValue:!1,hasError:!!k[E.name],errorMessage:(G=k[E.name])==null?void 0:G.message,name:E.name},E.name);case"date":return o.jsx(rs,{...N,defaultValue:"",showTime:!!E.showTime,hasError:!!k[E.name],errorMessage:(ne=k[E.name])==null?void 0:ne.message},E.name);case"optionGroup":return o.jsx(cs,{...N,options:E.options||[],multiple:E.multiple,vertical:E.vertical,groupLabel:E.groupLabel,defaultValue:E.defaultValue,className:E.width?void 0:"w-full",name:E.name},E.name);default:return o.jsx(Bt,{...N,type:E.type,loadingDefaults:S,hasError:!!k[E.name],errorMessage:(ae=k[E.name])==null?void 0:ae.message,suffixButton:x,name:E.name},E.name)}},[z,j,k,A,S,Z,W,U]);return o.jsx(Fn,{...g,children:o.jsxs("form",{noValidate:!0,onSubmit:v(async H=>{await s(H),f(n??h("ds.form.saveSuccess"),"success")},H=>{console.log("❌ errores de validación:",H),pa(H),f(a??h("ds.form.saveError"),"error")}),className:"space-y-6",children:[e.map((H,E)=>H.type==="rows"?o.jsx(b.Fragment,{children:H.sections.map((J,re)=>o.jsx("div",{className:"mb-6",children:o.jsx(Nt,{title:J.sectionTitle,defaultOpen:J.defaultOpen,children:J.rows.map((x,N)=>o.jsxs("div",{children:[x.title&&o.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:x.title}),o.jsx("div",{className:"flex flex-wrap -mx-2",children:x.columns.map((M,G)=>{var ne;return o.jsx("div",{className:`${M.width} px-2 flex flex-col`,children:o.jsx("div",{className:"space-y-4",children:M.fields?M.fields.map(ae=>X(ae)):(ne=M.rows)==null?void 0:ne.map((ae,Y)=>o.jsx("div",{className:"mb-1",children:o.jsx("div",{className:"flex flex-wrap -mx-2",children:ae.columns.map((ie,Q)=>{var K;return o.jsx("div",{className:`${ie.width} px-2`,children:(K=ie.fields)==null?void 0:K.map(pe=>X(pe))},Q)})})},Y))})},G)})})]},N))})},re))},E):o.jsx(os,{options:H.tabs.map(J=>({label:J.label,value:J.key})),value:L[E],onChange:J=>B(re=>({...re,[E]:J})),children:Object.fromEntries(H.tabs.map(J=>[J.key,o.jsx("div",{className:"space-y-6",children:J.sections.map((re,x)=>o.jsx("div",{className:"mb-6",children:o.jsx(Nt,{title:re.sectionTitle,defaultOpen:re.defaultOpen,children:re.rows.map((N,M)=>o.jsx("div",{children:o.jsx("div",{className:"flex flex-wrap -mx-2",children:N.columns.map((G,ne)=>{var ae;return o.jsx("div",{className:`${G.width??"flex-1"} px-2 flex flex-col`,children:o.jsx("div",{className:"space-y-4",children:(ae=G.fields)==null?void 0:ae.map((Y,ie)=>o.jsx(b.Fragment,{children:X(Y)},ie))})},ne)})})},M))})},x))},J.key)]))},E)),o.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:i??o.jsx(Te,{type:"submit",variant:"primary",icon:Qs,size:"sm",disabled:A||S||q>0,children:h(A?"ds.form.sending":"ds.form.submit")})})]})})}const hi={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function ut({icon:r,size:e="md",ariaLabel:t,disabled:s=!1,onClick:n,...a}){return o.jsx("button",{type:"button","aria-label":t,disabled:s,onClick:n,className:D("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",hi[e],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...a,children:o.jsx(r,{className:D(e==="sm"?"h-4 w-4":e==="md"?"h-5 w-5":"h-6 w-6")})})}function Ts({dark:r,onToggle:e}){return o.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:e,className:D("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:o.jsxs("div",{className:D("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:[o.jsx(Ee,{component:wn,size:"sm",className:D("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),o.jsx(Ee,{component:gn,size:"sm",className:D("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const Os=b.createContext({theme:"light",toggle:()=>{}});function mi({children:r}){const[e,t]=b.useState(!1),[s,n]=b.useState("light");b.useEffect(()=>{if(typeof window>"u")return;const i=localStorage.getItem("ds-theme");i==="light"||i==="dark"?n(i):window.matchMedia("(prefers-color-scheme: dark)").matches&&n("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 a=()=>n(i=>i==="light"?"dark":"light");return e?o.jsx(Os.Provider,{value:{theme:s,toggle:a},children:r}):null}const Cs=()=>b.useContext(Os),As=({pinnedPages:r,onRemovePinned:e,onBack:t,dark:s,locale:n,languageOptions:a,onChangeLocale:i,profile:l,profileOptions:c,onChangeProfile:d})=>{const f=r.slice(0,3),{toggle:h}=Cs(),{t:m,i18n:g}=Ut(),F=j=>{g.changeLanguage(j),i(j)};return o.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(ut,{icon:bn,size:"sm",ariaLabel:m("back"),onClick:t}),o.jsx(ut,{icon:kn,size:"sm",ariaLabel:m("clearPins"),onClick:()=>r.forEach(j=>e(j.id))}),f.map(j=>o.jsxs("div",{className:"flex items-center",children:[o.jsx("a",{href:j.href,className:D("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}),o.jsx(ut,{icon:Rt,size:"sm",ariaLabel:`${m("remove")} ${j.label}`,onClick:()=>e(j.id)})]},j.id))]}),o.jsx("div",{className:"flex-grow"}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(Xe,{size:"sm",width:"auto",options:a,value:n,onChange:F,disableErrorPlaceholder:!0}),o.jsx(Xe,{size:"sm",width:"auto",options:c,value:l,onChange:d,disableErrorPlaceholder:!0}),o.jsx(Ts,{dark:s,onToggle:h})]})]})},xi=({loading:r=!1,ariaLabel:e="Cargando..."})=>r?o.jsxs("div",{className:`\r
|
|
58
58
|
fixed inset-0\r
|
|
59
59
|
flex items-center justify-center\r
|
|
60
60
|
bg-[var(--color-ds-background-surface)]/90\r
|
|
@@ -65,7 +65,7 @@ attempted value: ${i}
|
|
|
65
65
|
border-gray-200\r
|
|
66
66
|
border-t-[var(--color-ds-button-primary-bg)]\r
|
|
67
67
|
animate-spin\r
|
|
68
|
-
`}),o.jsx("span",{className:"sr-only",children:e})]}):null,pi=({isOpen:r,onClose:e,title:t,children:s,footer:n})=>(
|
|
68
|
+
`}),o.jsx("span",{className:"sr-only",children:e})]}):null,pi=({isOpen:r,onClose:e,title:t,children:s,footer:n})=>(b.useEffect(()=>{const a=i=>i.key==="Escape"&&e();return r&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[r,e]),r?Rr.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 bg-[var(--color-ds-text-primary)]/50 z-40",onClick:e}),o.jsx("div",{className:"fixed inset-0 flex items-center justify-center px-4 z-50",children:o.jsxs("div",{className:`\r
|
|
69
69
|
relative\r
|
|
70
70
|
bg-[var(--color-ds-background-page)]\r
|
|
71
71
|
dark:bg-[var(--color-ds-background-surface)]\r
|
|
@@ -79,4 +79,4 @@ attempted value: ${i}
|
|
|
79
79
|
dark:bg-[var(--color-ds-background-surface)]\r
|
|
80
80
|
hover:bg-[var(--color-ds-background-accent)]/10\r
|
|
81
81
|
focus:outline-none\r
|
|
82
|
-
`,children:[o.jsx(Dt,{className:"w-5 h-5 text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]"}),o.jsx("span",{className:"sr-only",children:"Cerrar modal"})]})]}),o.jsx("div",{className:"px-6 py-6 text-[var(--color-ds-text-primary)]",children:s}),n&&o.jsx("div",{className:"px-6 py-4 border-t border-[var(--color-ds-border-muted)] bg-[var(--color-ds-background-surface)]",children:n})]})})]}),document.body):null),Wt=({items:r,selected:e,onSelect:t,level:s=0})=>{const[n,a]=w.useState(new Set),i=l=>{const c=new Set(n);s===0?(c.clear(),n.has(l)||c.add(l)):c.has(l)?c.delete(l):c.add(l),a(c),t(l)};return o.jsx("ul",{className:D(s>0?"mt-1":"mt-0"),children:r.map(l=>{const c=l.value===e,f=n.has(l.value),d=["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 o.jsxs("li",{children:[o.jsxs("button",{onClick:()=>l.children?i(l.value):t(l.value),className:D("w-full flex items-center justify-between h-8 transition-colors",d,m),children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[s===0&&l.icon&&o.jsx(l.icon,{className:"w-5 h-5 ml-2"}),o.jsx("span",{className:"text-ds-sm",children:l.label})]}),l.children&&(f?o.jsx(Mr,{className:D("w-4 h-4 ",h)}):o.jsx(rn,{className:D("w-4 h-4",h)}))]}),l.children&&o.jsx("div",{className:D("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:o.jsx(Wt,{items:l.children,selected:e,onSelect:t,level:s+1})})]},l.value)})})},gi="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",vi="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",$s=({appName:r,orgName:e,username:t,footerText:s,navItems:n,selectedNav:a,onSelectNav:i,width:l="200px"})=>{const{theme:c}=Cs(),f=c==="dark"?gi:vi;return o.jsxs("aside",{className:"flex flex-col h-screen bg-[var(--color-ds-background-page)]",style:{width:l},children:[o.jsxs("div",{className:"flex gap-1 flex-col items-center py-4 space-y-1",children:[o.jsx("img",{src:f,alt:"Logo Diputación",className:"w-20 h-20"}),o.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-lg ",children:r}),o.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:e}),o.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),o.jsx("div",{className:"w-1/5 h-0.5 rounded-full bg-[var(--color-ds-background-accent)] mt-2"})]}),o.jsx("nav",{className:"flex-1 overflow-auto pt-6",children:o.jsx(Wt,{items:n,selected:a,onSelect:i})}),o.jsx("div",{className:"px-4 w-full py-3",children:o.jsx("span",{className:"text-ds-sm w-full text-center text-[var(--color-ds-text-secondary)]",children:s})})]})};function yi({sidebar:r,header:e,children:t}){return o.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[o.jsx($s,{...r}),o.jsxs("div",{className:"flex-1 flex flex-col overflow-auto px-10 [scrollbar-gutter:stable_both-edges]",children:[o.jsx(As,{...e}),o.jsx("main",{className:"flex-1 ",children:t})]})]})}function bi({columns:r,data:e=[],loadData:t,idAccessor:s,multiSelect:n=!1,onSelectionChange:a,pageSize:i=10,initialSort:l,onSort:c,className:f}){const[d,m]=w.useState([]),[h,v]=w.useState(!!t),[E,k]=w.useState(new Set),[F,y]=w.useState(1),[p,S]=w.useState(l==null?void 0:l.sortBy),[R,C]=w.useState((l==null?void 0:l.sortDir)??"asc"),P=N=>typeof s=="function"?s(N):N[s];w.useEffect(()=>{let N=!1;return(async()=>{v(!0);try{const g=t?await t():e;N||m(g)}finally{N||v(!1)}})(),()=>{N=!0}},[e,t]),w.useEffect(()=>{k(new Set),y(1)},[d]);const G=w.useMemo(()=>{if(!p)return[...d];const N=R==="asc"?1:-1;return[...d].sort((A,g)=>{const q=A[p],J=g[p];return q==null?-N:J==null||q>J?N:q<J?-N:0})},[d,p,R]),B=Math.max(1,Math.ceil(G.length/i)),Z=w.useMemo(()=>{const N=(F-1)*i;return G.slice(N,N+i)},[G,F,i]),W=N=>{const A=new Set(E);A.has(N)?A.delete(N):A.add(N),k(A),a==null||a(d.filter(g=>A.has(P(g))))},M=()=>{const N=Z.every(g=>E.has(P(g))),A=new Set(E);N?Z.forEach(g=>A.delete(P(g))):Z.forEach(g=>A.add(P(g))),k(A),a==null||a(d.filter(g=>A.has(P(g))))},L=N=>{if(!N.sortable)return;const A=typeof N.accessor=="string"?N.accessor:N.sortKey;if(p===A){const g=R==="asc"?"desc":"asc";C(g),c==null||c(A,g)}else S(A),C("asc"),c==null||c(A,"asc");y(1)},z=()=>h?o.jsx("tbody",{children:Array.from({length:i}).map((N,A)=>o.jsxs("tr",{children:[n&&o.jsx("td",{className:"px-4 py-2",children:o.jsx(Me,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((g,q)=>o.jsx("td",{className:"px-4 py-2",children:o.jsx(Me,{width:"100%",height:"1em",variant:"rect"})},q))]},A))}):Z.length?o.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Z.map(N=>{const A=P(N);return o.jsxs("tr",{className:"hover:bg-gray-50",children:[n&&o.jsx("td",{className:"px-4 py-2",children:o.jsx("input",{type:"checkbox",checked:E.has(A),onChange:()=>W(A)})}),r.map((g,q)=>{const J=g.render?g.render(N):typeof g.accessor=="function"?g.accessor(N):N[g.accessor];return o.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-800",children:J},q)})]},A)})}):o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{colSpan:n?r.length+1:r.length,className:"px-4 py-8 text-center text-gray-500",children:"No hay datos"})})});return o.jsxs("div",{className:D("w-full overflow-auto",f),children:[o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[n&&o.jsx("th",{className:"px-4 py-2 text-left",children:o.jsx("input",{type:"checkbox",checked:Z.length>0&&Z.every(N=>E.has(P(N))),onChange:M})}),r.map(N=>{const A=typeof N.accessor=="string"?N.accessor:N.header,g=p===(typeof N.accessor=="string"?N.accessor:N.sortKey);return o.jsx("th",{className:D("px-4 py-2 text-left text-sm font-medium text-gray-700",N.width),onClick:()=>L(N),children:o.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer select-none",children:[o.jsx("span",{children:N.header}),N.sortable&&o.jsx("span",{className:"text-xs",children:g?R==="asc"?"▲":"▼":"⇵"})]})},A)})]})}),z()]}),o.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[o.jsx("div",{className:"text-sm text-gray-700",children:h?"Cargando datos...":`Página ${F} de ${B}`}),o.jsxs("div",{className:"space-x-2",children:[o.jsx(Te,{size:"sm",variant:"outline",disabled:h||F<=1,onClick:()=>y(N=>Math.max(1,N-1)),children:"Prev"}),o.jsx(Te,{size:"sm",variant:"outline",disabled:h||F>=B,onClick:()=>y(N=>Math.min(B,N+1)),children:"Next"})]})]})]})}function Ds({control:r,name:e,rules:t,defaultValue:s=!1,checked:n,onChange:a,disabled:i=!1,label:l,labelPosition:c="right",errorMessage:f="",className:d}){const m=w.useId();if(r&&e)return o.jsx(we,{name:e,control:r,rules:t,defaultValue:s,render:({field:v,fieldState:E})=>{var k;return o.jsx(Ds,{checked:v.value,onChange:v.onChange,disabled:i,label:l,labelPosition:c,errorMessage:((k=E.error)==null?void 0:k.message)||"",className:d})}});const h=!!n;return o.jsxs("div",{className:D("flex flex-col",d),children:[o.jsxs("label",{className:D("inline-flex items-center space-x-3 select-none",i&&"opacity-50 cursor-not-allowed"),htmlFor:m,children:[l&&c==="left"&&o.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l}),o.jsx("button",{id:m,type:"button",role:"switch","aria-checked":h,disabled:i,onClick:()=>!i&&(a==null?void 0:a(!h)),className:D("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:o.jsx("div",{className:D("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"&&o.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l})]}),o.jsx("div",{className:"pt-1 min-h-[18px] w-full",children:f?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:f}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}exports.Button=Te;exports.Checkbox=Fs;exports.CollapsibleSection=Nt;exports.DateInput=rs;exports.DropdownMenu=Wn;exports.FileUploader=as;exports.FormFieldInput=Ut;exports.FormPageLayout=fa;exports.FormRenderer=fi;exports.Header=As;exports.Icon=ke;exports.IconButton=lt;exports.InfoButton=is;exports.Input=gt;exports.InputGroup=ls;exports.LoadingScreen=xi;exports.Modal=pi;exports.OptionGroup=cs;exports.PageLayout=yi;exports.SearchField=Ss;exports.Select=Ge;exports.Sidebar=$s;exports.SidebarNav=Wt;exports.SkeletonLoader=Me;exports.Table=bi;exports.Tabs=os;exports.TextArea=zt;exports.ThemeProvider=mi;exports.ThemeToggle=Ts;exports.Toast=us;exports.ToastProvider=ka;exports.ToggleSwitch=Ds;exports.useToast=fs;
|
|
82
|
+
`,children:[o.jsx(Rt,{className:"w-5 h-5 text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]"}),o.jsx("span",{className:"sr-only",children:"Cerrar modal"})]})]}),o.jsx("div",{className:"px-6 py-6 text-[var(--color-ds-text-primary)]",children:s}),n&&o.jsx("div",{className:"px-6 py-4 border-t border-[var(--color-ds-border-muted)] bg-[var(--color-ds-background-surface)]",children:n})]})})]}),document.body):null),qt=({items:r,selected:e,onSelect:t,level:s=0})=>{const[n,a]=b.useState(new Set),i=l=>{const c=new Set(n);s===0?(c.clear(),n.has(l)||c.add(l)):c.has(l)?c.delete(l):c.add(l),a(c),t(l)};return o.jsx("ul",{className:D(s>0?"mt-1":"mt-0"),children:r.map(l=>{const c=l.value===e,d=n.has(l.value),f=["pl-2","pl-2","pl-2"][s]||"pl-4",h=s===0?d||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)]",m=s===0&&(d||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]";return o.jsxs("li",{children:[o.jsxs("button",{onClick:()=>l.children?i(l.value):t(l.value),className:D("w-full flex items-center justify-between h-8 transition-colors",f,h),children:[o.jsxs("div",{className:"flex items-center space-x-2",children:[s===0&&l.icon&&o.jsx(l.icon,{className:"w-5 h-5 ml-2"}),o.jsx("span",{className:"text-ds-sm",children:l.label})]}),l.children&&(d?o.jsx(Mr,{className:D("w-4 h-4 ",m)}):o.jsx(rn,{className:D("w-4 h-4",m)}))]}),l.children&&o.jsx("div",{className:D("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",d?"max-h-screen":"max-h-0"),children:o.jsx(qt,{items:l.children,selected:e,onSelect:t,level:s+1})})]},l.value)})})},gi="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",vi="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",$s=({appName:r,orgName:e,username:t,footerText:s,navItems:n,selectedNav:a,onSelectNav:i,width:l="200px"})=>{const{theme:c}=Cs(),d=c==="dark"?gi:vi;return o.jsxs("aside",{className:"flex flex-col h-screen bg-[var(--color-ds-background-page)]",style:{width:l},children:[o.jsxs("div",{className:"flex gap-1 flex-col items-center py-4 space-y-1",children:[o.jsx("img",{src:d,alt:"Logo Diputación",className:"w-20 h-20"}),o.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-lg ",children:r}),o.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:e}),o.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),o.jsx("div",{className:"w-1/5 h-0.5 rounded-full bg-[var(--color-ds-background-accent)] mt-2"})]}),o.jsx("nav",{className:"flex-1 overflow-auto pt-6",children:o.jsx(qt,{items:n,selected:a,onSelect:i})}),o.jsx("div",{className:"px-4 w-full py-3",children:o.jsx("span",{className:"text-ds-sm w-full text-center text-[var(--color-ds-text-secondary)]",children:s})})]})};function bi({sidebar:r,header:e,children:t}){return o.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[o.jsx($s,{...r}),o.jsxs("div",{className:"flex-1 flex flex-col overflow-auto px-10 [scrollbar-gutter:stable_both-edges]",children:[o.jsx(As,{...e}),o.jsx("main",{className:"flex-1 ",children:t})]})]})}function yi({columns:r,data:e,loadData:t,loading:s,idAccessor:n,multiSelect:a=!1,onSelectionChange:i,pageSize:l=10,initialSort:c,onSort:d,className:f}){const h=e!==void 0,[m,g]=b.useState([]),[F,j]=b.useState(!1),T=b.useRef(null);b.useEffect(()=>{var N;if(!t||h)return;(N=T.current)==null||N.abort();const x=new AbortController;return T.current=x,j(!0),t().then(M=>{x.signal.aborted||g(M)}).finally(()=>{x.signal.aborted||j(!1)}),()=>x.abort()},[t,h]);const y=b.useMemo(()=>h?e:m,[e,m,h]),v=s??(t?F:!1),[k,A]=b.useState(new Set),[S,I]=b.useState(1),[q,Z]=b.useState(c==null?void 0:c.sortBy),[z,U]=b.useState((c==null?void 0:c.sortDir)??"asc"),R=x=>typeof n=="function"?n(x):x[n],L=b.useRef(null);b.useEffect(()=>{L.current!==y&&(A(new Set),I(1),L.current=y)},[y]);const B=b.useMemo(()=>{if(!q)return y;const x=z==="asc"?1:-1;return[...y].sort((N,M)=>{const G=N[q],ne=M[q];return G==null?-x:ne==null||G>ne?x:G<ne?-x:0})},[y,q,z]),W=Math.max(1,Math.ceil(B.length/l)),X=b.useMemo(()=>{const x=(S-1)*l;return B.slice(x,x+l)},[B,S,l]),H=x=>{const N=new Set(k);N.has(x)?N.delete(x):N.add(x),A(N),i==null||i(y.filter(M=>N.has(R(M))))},E=()=>{const x=X.every(M=>k.has(R(M))),N=new Set(k);X.forEach(M=>{x?N.delete(R(M)):N.add(R(M))}),A(N),i==null||i(y.filter(M=>N.has(R(M))))},J=x=>{if(!x.sortable)return;const N=typeof x.accessor=="string"?x.accessor:x.sortKey;if(q===N){const M=z==="asc"?"desc":"asc";U(M),d==null||d(N,M)}else Z(N),U("asc"),d==null||d(N,"asc");I(1)},re=()=>v?o.jsx("tbody",{children:Array.from({length:l}).map((x,N)=>o.jsxs("tr",{children:[a&&o.jsx("td",{children:o.jsx(Me,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((M,G)=>o.jsx("td",{children:o.jsx(Me,{width:"100%",height:"1em",variant:"rect"})},G))]},N))}):X.length?o.jsx("tbody",{children:X.map(x=>{const N=R(x);return o.jsxs("tr",{className:"hover:bg-gray-50",children:[a&&o.jsx("td",{children:o.jsx("input",{type:"checkbox",checked:k.has(N),onChange:()=>H(N)})}),r.map((M,G)=>{const ne=M.render?M.render(x):typeof M.accessor=="function"?M.accessor(x):x[M.accessor];return o.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm",children:ne},G)})]},N)})}):o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{colSpan:r.length+(a?1:0),children:"No hay datos"})})});return o.jsxs("div",{className:D("w-full overflow-auto",f),children:[o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[a&&o.jsx("th",{children:o.jsx("input",{type:"checkbox",checked:X.length>0&&X.every(x=>k.has(R(x))),onChange:E})}),r.map(x=>{const N=typeof x.accessor=="string"?x.accessor:x.header,M=q===(typeof x.accessor=="string"?x.accessor:x.sortKey);return o.jsx("th",{className:D("px-4 py-2 text-left text-sm font-medium text-gray-700",x.width),onClick:()=>J(x),children:o.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer",children:[o.jsx("span",{children:x.header}),x.sortable&&o.jsx("span",{className:"text-xs",children:M?z==="asc"?"▲":"▼":"⇵"})]})},N)})]})}),re()]}),o.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[o.jsx("span",{className:"text-sm text-gray-700",children:v?"Cargando...":`Página ${S} de ${W}`}),o.jsxs("div",{className:"space-x-2",children:[o.jsx(Te,{size:"sm",variant:"outline",disabled:v||S<=1,onClick:()=>I(x=>Math.max(1,x-1)),children:"Prev"}),o.jsx(Te,{size:"sm",variant:"outline",disabled:v||S>=W,onClick:()=>I(x=>Math.min(W,x+1)),children:"Next"})]})]})]})}function Ds({control:r,name:e,rules:t,defaultValue:s=!1,checked:n,onChange:a,disabled:i=!1,label:l,labelPosition:c="right",errorMessage:d="",className:f}){const h=b.useId();if(r&&e)return o.jsx(je,{name:e,control:r,rules:t,defaultValue:s,render:({field:g,fieldState:F})=>{var j;return o.jsx(Ds,{checked:g.value,onChange:g.onChange,disabled:i,label:l,labelPosition:c,errorMessage:((j=F.error)==null?void 0:j.message)||"",className:f})}});const m=!!n;return o.jsxs("div",{className:D("flex flex-col",f),children:[o.jsxs("label",{className:D("inline-flex items-center space-x-3 select-none",i&&"opacity-50 cursor-not-allowed"),htmlFor:h,children:[l&&c==="left"&&o.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l}),o.jsx("button",{id:h,type:"button",role:"switch","aria-checked":m,disabled:i,onClick:()=>!i&&(a==null?void 0:a(!m)),className:D("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:o.jsx("div",{className:D("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",m?"translate-x-9":"translate-x-1")})}),l&&c==="right"&&o.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l})]}),o.jsx("div",{className:"pt-1 min-h-[18px] w-full",children:d?o.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:d}):o.jsx("span",{"aria-hidden":"true",children:" "})})]})}exports.Button=Te;exports.Checkbox=Fs;exports.CollapsibleSection=Nt;exports.DateInput=rs;exports.DropdownMenu=Wn;exports.FileUploader=as;exports.FormFieldInput=Bt;exports.FormPageLayout=fa;exports.FormRenderer=fi;exports.Header=As;exports.Icon=Ee;exports.IconButton=ut;exports.InfoButton=is;exports.Input=vt;exports.InputGroup=ls;exports.LoadingScreen=xi;exports.Modal=pi;exports.OptionGroup=cs;exports.PageLayout=bi;exports.SearchField=Ss;exports.Select=Xe;exports.Sidebar=$s;exports.SidebarNav=qt;exports.SkeletonLoader=Me;exports.Table=yi;exports.Tabs=os;exports.TextArea=Wt;exports.ThemeProvider=mi;exports.ThemeToggle=Ts;exports.Toast=us;exports.ToastProvider=ka;exports.ToggleSwitch=Ds;exports.useToast=fs;
|