@dipusevilla/componentes-iu 1.0.25 → 1.0.26

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 CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),as=require("react-dom");function wn(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const q=wn(v);function kn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ht={exports:{}},et={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),as=require("react-dom");function wn(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const Z=wn(v);function kn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var pt={exports:{}},rt={};/**
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 br;function jn(){if(br)return et;br=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function e(s,n,a){var o=null;if(a!==void 0&&(o=""+a),n.key!==void 0&&(o=""+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:o,ref:n!==void 0?n:null,props:a}}return et.Fragment=t,et.jsx=e,et.jsxs=e,et}var tt={};/**
9
+ */var br;function jn(){if(br)return rt;br=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function e(s,n,a){var o=null;if(a!==void 0&&(o=""+a),n.key!==void 0&&(o=""+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:o,ref:n!==void 0?n:null,props:a}}return rt.Fragment=t,rt.jsx=e,rt.jsxs=e,rt}var st={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,26 +14,26 @@
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 yr;function En(){return yr||(yr=1,process.env.NODE_ENV!=="production"&&function(){function r(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===P?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case j:return"Fragment";case w:return"Profiler";case T:return"StrictMode";case F:return"Suspense";case B:return"SuspenseList";case $:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case N:return"Portal";case E:return(h.displayName||"Context")+".Provider";case y:return(h._context.displayName||"Context")+".Consumer";case M:var _=h.render;return h=h.displayName,h||(h=_.displayName||_.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case X:return _=h.displayName||null,_!==null?_:r(h.type)||"Memo";case S:_=h._payload,h=h._init;try{return r(h(_))}catch{}}return null}function t(h){return""+h}function e(h){try{t(h);var _=!1}catch{_=!0}if(_){_=console;var D=_.error,W=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return D.call(_,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",W),t(h)}}function s(h){if(h===j)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===S)return"<...>";try{var _=r(h);return _?"<"+_+">":"<...>"}catch{return"<...>"}}function n(){var h=R.A;return h===null?null:h.getOwner()}function a(){return Error("react-stack-top-frame")}function o(h){if(V.call(h,"key")){var _=Object.getOwnPropertyDescriptor(h,"key").get;if(_&&_.isReactWarning)return!1}return h.key!==void 0}function l(h,_){function D(){Q||(Q=!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)",_))}D.isReactWarning=!0,Object.defineProperty(h,"key",{get:D,configurable:!0})}function c(){var h=r(this.type);return se[h]||(se[h]=!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.")),h=this.props.ref,h!==void 0?h:null}function u(h,_,D,W,te,ie,me,Z){return D=ie.ref,h={$$typeof:b,type:h,key:_,props:ie,_owner:te},(D!==void 0?D:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:c}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:me}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function f(h,_,D,W,te,ie,me,Z){var re=_.children;if(re!==void 0)if(W)if(H(re)){for(W=0;W<re.length;W++)m(re[W]);Object.freeze&&Object.freeze(re)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(re);if(V.call(_,"key")){re=r(h);var le=Object.keys(_).filter(function(ye){return ye!=="key"});W=0<le.length?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}",J[re+W]||(le=0<le.length?"{"+le.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var yr;function En(){return yr||(yr=1,process.env.NODE_ENV!=="production"&&function(){function r(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===P?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case j:return"Fragment";case w:return"Profiler";case T:return"StrictMode";case F:return"Suspense";case W:return"SuspenseList";case $:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case N:return"Portal";case E:return(h.displayName||"Context")+".Provider";case y:return(h._context.displayName||"Context")+".Consumer";case M:var _=h.render;return h=h.displayName,h||(h=_.displayName||_.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case J:return _=h.displayName||null,_!==null?_:r(h.type)||"Memo";case S:_=h._payload,h=h._init;try{return r(h(_))}catch{}}return null}function t(h){return""+h}function e(h){try{t(h);var _=!1}catch{_=!0}if(_){_=console;var L=_.error,B=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return L.call(_,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),t(h)}}function s(h){if(h===j)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===S)return"<...>";try{var _=r(h);return _?"<"+_+">":"<...>"}catch{return"<...>"}}function n(){var h=R.A;return h===null?null:h.getOwner()}function a(){return Error("react-stack-top-frame")}function o(h){if(V.call(h,"key")){var _=Object.getOwnPropertyDescriptor(h,"key").get;if(_&&_.isReactWarning)return!1}return h.key!==void 0}function l(h,_){function L(){Q||(Q=!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)",_))}L.isReactWarning=!0,Object.defineProperty(h,"key",{get:L,configurable:!0})}function c(){var h=r(this.type);return re[h]||(re[h]=!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.")),h=this.props.ref,h!==void 0?h:null}function u(h,_,L,B,te,le,pe,se){return L=le.ref,h={$$typeof:b,type:h,key:_,props:le,_owner:te},(L!==void 0?L:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:c}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:pe}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function f(h,_,L,B,te,le,pe,se){var q=_.children;if(q!==void 0)if(B)if(H(q)){for(B=0;B<q.length;B++)m(q[B]);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 m(q);if(V.call(_,"key")){q=r(h);var ie=Object.keys(_).filter(function(ne){return ne!=="key"});B=0<ie.length?"{key: someKey, "+ie.join(": ..., ")+": ...}":"{key: someKey}",X[q+B]||(ie=0<ie.length?"{"+ie.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} />`,W,re,le,re),J[re+W]=!0)}if(re=null,D!==void 0&&(e(D),re=""+D),o(_)&&(e(_.key),re=""+_.key),"key"in _){D={};for(var ne in _)ne!=="key"&&(D[ne]=_[ne])}else D=_;return re&&l(D,typeof h=="function"?h.displayName||h.name||"Unknown":h),u(h,re,ie,te,n(),D,me,Z)}function m(h){typeof h=="object"&&h!==null&&h.$$typeof===b&&h._store&&(h._store.validated=1)}var p=v,b=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),E=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),R=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=Object.prototype.hasOwnProperty,H=Array.isArray,K=console.createTask?console.createTask:function(){return null};p={"react-stack-bottom-frame":function(h){return h()}};var Q,se={},Y=p["react-stack-bottom-frame"].bind(p,a)(),g=K(s(a)),J={};tt.Fragment=j,tt.jsx=function(h,_,D,W,te){var ie=1e4>R.recentlyCreatedOwnerStacks++;return f(h,_,D,!1,W,te,ie?Error("react-stack-top-frame"):Y,ie?K(s(h)):g)},tt.jsxs=function(h,_,D,W,te){var ie=1e4>R.recentlyCreatedOwnerStacks++;return f(h,_,D,!0,W,te,ie?Error("react-stack-top-frame"):Y,ie?K(s(h)):g)}}()),tt}var vr;function Nn(){return vr||(vr=1,process.env.NODE_ENV==="production"?ht.exports=jn():ht.exports=En()),ht.exports}var i=Nn();function os(r){var t,e,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(t=0;t<n;t++)r[t]&&(e=os(r[t]))&&(s&&(s+=" "),s+=e)}else for(e in r)r[e]&&(s&&(s+=" "),s+=e);return s}function L(){for(var r,t,e=0,s="",n=arguments.length;e<n;e++)(r=arguments[e])&&(t=os(r))&&(s&&(s+=" "),s+=t);return s}const _n={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 Ce({component:r,size:t="sm",className:e,...s}){return i.jsx(r,{className:L(_n[t],e),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const Sn="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Fn={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"},Tn={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"},Cn={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},On="disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-[var(--color-ds-background-disabled)] disabled:text-[var(--color-ds-text-on-accent)] disabled:ring-1 disabled:ring-inset disabled:ring-[var(--color-ds-border-muted)]";function $e({type:r="button",variant:t="primary",size:e="sm",width:s,disabled:n=!1,icon:a,iconPosition:o="left",ariaLabel:l,children:c,onClick:u,className:f}){const m=!!a,p=m&&!c,b=p?Cn[e]:Tn[e];return i.jsxs("button",{type:r,onClick:u,disabled:n,"aria-label":p?l:void 0,style:s?{width:s}:void 0,className:L(Sn,Fn[t],b,On,f,m&&c&&"gap-2"),children:[a&&o==="left"&&i.jsx(Ce,{component:a,size:e}),c,a&&o==="right"&&i.jsx(Ce,{component:a,size:e})]})}function An({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Mn=q.forwardRef(An);function Rn({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const is=q.forwardRef(Rn);function Vn({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const $n=q.forwardRef(Vn);function Dn({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const In=q.forwardRef(Dn);function Ln({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.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 Pn=q.forwardRef(Ln);function zn({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.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 wr=q.forwardRef(zn);function Un({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.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 Bn=q.forwardRef(Un);function Wn({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.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"}),q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const ls=q.forwardRef(Wn);function Zn({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.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 qn=q.forwardRef(Zn);function Gn({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.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 Hn=q.forwardRef(Gn);function Yn({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.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 Xn=q.forwardRef(Yn);function Jn({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.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 Kn=q.forwardRef(Jn);function Qn({title:r,titleId:t,...e},s){return q.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":t},e),r?q.createElement("title",{id:t},r):null,q.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const Qt=q.forwardRef(Qn);function zt({title:r,children:t,defaultOpen:e=!0,className:s}){const[n,a]=v.useState(e),o=v.useRef(null),l=v.useRef(null),[c,u]=v.useState(0),f=()=>{if(l.current){const m=l.current.scrollHeight;u(m)}};return v.useLayoutEffect(()=>{f()},[n]),v.useEffect(()=>{const m=l.current;if(!m)return;const p=new ResizeObserver(()=>{f()});return p.observe(m),()=>{p.disconnect()}},[]),i.jsxs("div",{className:L("flex flex-col w-full gap-3",s),children:[i.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:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"block w-1 h-5 bg-[var(--color-ds-background-accent)] rounded-sm"}),i.jsx("span",{className:"font-semibold text-[var(--color-ds-text-primary)]",children:r})]}),n?i.jsx(In,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):i.jsx(is,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),i.jsx("div",{className:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",children:i.jsx("div",{className:"px-6",children:i.jsx("div",{ref:o,className:L("overflow-hidden transition-all duration-300 ease-in-out",n?"opacity-100":"opacity-0"),style:{maxHeight:n?`${c}px`:"0px"},children:i.jsx("div",{ref:l,className:"py-4",children:t})})})})]})}const er="-",ea=r=>{const t=ra(r),{conflictingClassGroups:e,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:o=>{const l=o.split(er);return l[0]===""&&l.length!==1&&l.shift(),cs(l,t)||ta(o)},getConflictingClassGroupIds:(o,l)=>{const c=e[o]||[];return l&&s[o]?[...c,...s[o]]:c}}},cs=(r,t)=>{var o;if(r.length===0)return t.classGroupId;const e=r[0],s=t.nextPart.get(e),n=s?cs(r.slice(1),s):void 0;if(n)return n;if(t.validators.length===0)return;const a=r.join(er);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},kr=/^\[(.+)\]$/,ta=r=>{if(kr.test(r)){const t=kr.exec(r)[1],e=t==null?void 0:t.substring(0,t.indexOf(":"));if(e)return"arbitrary.."+e}},ra=r=>{const{theme:t,classGroups:e}=r,s={nextPart:new Map,validators:[]};for(const n in e)Ut(e[n],s,n,t);return s},Ut=(r,t,e,s)=>{r.forEach(n=>{if(typeof n=="string"){const a=n===""?t:jr(t,n);a.classGroupId=e;return}if(typeof n=="function"){if(sa(n)){Ut(n(s),t,e,s);return}t.validators.push({validator:n,classGroupId:e});return}Object.entries(n).forEach(([a,o])=>{Ut(o,jr(t,a),e,s)})})},jr=(r,t)=>{let e=r;return t.split(er).forEach(s=>{e.nextPart.has(s)||e.nextPart.set(s,{nextPart:new Map,validators:[]}),e=e.nextPart.get(s)}),e},sa=r=>r.isThemeGetter,na=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,e=new Map,s=new Map;const n=(a,o)=>{e.set(a,o),t++,t>r&&(t=0,s=e,e=new Map)};return{get(a){let o=e.get(a);if(o!==void 0)return o;if((o=s.get(a))!==void 0)return n(a,o),o},set(a,o){e.has(a)?e.set(a,o):n(a,o)}}},Bt="!",Wt=":",aa=Wt.length,oa=r=>{const{prefix:t,experimentalParseClassName:e}=r;let s=n=>{const a=[];let o=0,l=0,c=0,u;for(let N=0;N<n.length;N++){let j=n[N];if(o===0&&l===0){if(j===Wt){a.push(n.slice(c,N)),c=N+aa;continue}if(j==="/"){u=N;continue}}j==="["?o++:j==="]"?o--:j==="("?l++:j===")"&&l--}const f=a.length===0?n:n.substring(c),m=ia(f),p=m!==f,b=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:b}};if(t){const n=t+Wt,a=s;s=o=>o.startsWith(n)?a(o.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(e){const n=s;s=a=>e({className:a,parseClassName:n})}return s},ia=r=>r.endsWith(Bt)?r.substring(0,r.length-1):r.startsWith(Bt)?r.substring(1):r,la=r=>{const t=Object.fromEntries(r.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const n=[];let a=[];return s.forEach(o=>{o[0]==="["||t[o]?(n.push(...a.sort(),o),a=[]):a.push(o)}),n.push(...a.sort()),n}},ca=r=>({cache:na(r.cacheSize),parseClassName:oa(r),sortModifiers:la(r),...ea(r)}),da=/\s+/,ua=(r,t)=>{const{parseClassName:e,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:a}=t,o=[],l=r.trim().split(da);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:m,modifiers:p,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:j}=e(f);if(m){c=f+(c.length>0?" "+c:c);continue}let T=!!j,w=s(T?N.substring(0,j):N);if(!w){if(!T){c=f+(c.length>0?" "+c:c);continue}if(w=s(N),!w){c=f+(c.length>0?" "+c:c);continue}T=!1}const y=a(p).join(":"),E=b?y+Bt:y,M=E+w;if(o.includes(M))continue;o.push(M);const F=n(w,T);for(let B=0;B<F.length;++B){const X=F[B];o.push(E+X)}c=f+(c.length>0?" "+c:c)}return c};function fa(){let r=0,t,e,s="";for(;r<arguments.length;)(t=arguments[r++])&&(e=ds(t))&&(s&&(s+=" "),s+=e);return s}const ds=r=>{if(typeof r=="string")return r;let t,e="";for(let s=0;s<r.length;s++)r[s]&&(t=ds(r[s]))&&(e&&(e+=" "),e+=t);return e};function ha(r,...t){let e,s,n,a=o;function o(c){const u=t.reduce((f,m)=>m(f),r());return e=ca(u),s=e.cache.get,n=e.cache.set,a=l,l(c)}function l(c){const u=s(c);if(u)return u;const f=ua(c,e);return n(c,f),f}return function(){return a(fa.apply(null,arguments))}}const fe=r=>{const t=e=>e[r]||[];return t.isThemeGetter=!0,t},us=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ma=/^\d+\/\d+$/,pa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ga=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ba=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ya=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,He=r=>ma.test(r),ee=r=>!!r&&!Number.isNaN(Number(r)),Ie=r=>!!r&&Number.isInteger(Number(r)),Rt=r=>r.endsWith("%")&&ee(r.slice(0,-1)),Ae=r=>pa.test(r),va=()=>!0,wa=r=>xa.test(r)&&!ga.test(r),hs=()=>!1,ka=r=>ba.test(r),ja=r=>ya.test(r),Ea=r=>!z(r)&&!U(r),Na=r=>Ke(r,xs,hs),z=r=>us.test(r),Ue=r=>Ke(r,gs,wa),Vt=r=>Ke(r,Ca,ee),Er=r=>Ke(r,ms,hs),_a=r=>Ke(r,ps,ja),mt=r=>Ke(r,bs,ka),U=r=>fs.test(r),rt=r=>Qe(r,gs),Sa=r=>Qe(r,Oa),Nr=r=>Qe(r,ms),Fa=r=>Qe(r,xs),Ta=r=>Qe(r,ps),pt=r=>Qe(r,bs,!0),Ke=(r,t,e)=>{const s=us.exec(r);return s?s[1]?t(s[1]):e(s[2]):!1},Qe=(r,t,e=!1)=>{const s=fs.exec(r);return s?s[1]?t(s[1]):e:!1},ms=r=>r==="position"||r==="percentage",ps=r=>r==="image"||r==="url",xs=r=>r==="length"||r==="size"||r==="bg-size",gs=r=>r==="length",Ca=r=>r==="number",Oa=r=>r==="family-name",bs=r=>r==="shadow",Aa=()=>{const r=fe("color"),t=fe("font"),e=fe("text"),s=fe("font-weight"),n=fe("tracking"),a=fe("leading"),o=fe("breakpoint"),l=fe("container"),c=fe("spacing"),u=fe("radius"),f=fe("shadow"),m=fe("inset-shadow"),p=fe("text-shadow"),b=fe("drop-shadow"),N=fe("blur"),j=fe("perspective"),T=fe("aspect"),w=fe("ease"),y=fe("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...M(),U,z],B=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],S=()=>[U,z,c],$=()=>[He,"full","auto",...S()],P=()=>[Ie,"none","subgrid",U,z],R=()=>["auto",{span:["full",Ie,U,z]},Ie,U,z],V=()=>[Ie,"auto",U,z],H=()=>["auto","min","max","fr",U,z],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],se=()=>["auto",...S()],Y=()=>[He,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],g=()=>[r,U,z],J=()=>[...M(),Nr,Er,{position:[U,z]}],h=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",Fa,Na,{size:[U,z]}],D=()=>[Rt,rt,Ue],W=()=>["","none","full",u,U,z],te=()=>["",ee,rt,Ue],ie=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[ee,Rt,Nr,Er],re=()=>["","none",N,U,z],le=()=>["none",ee,U,z],ne=()=>["none",ee,U,z],ye=()=>[ee,U,z],Fe=()=>[He,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ae],breakpoint:[Ae],color:[va],container:[Ae],"drop-shadow":[Ae],ease:["in","out","in-out"],font:[Ea],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ae],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ae],shadow:[Ae],spacing:["px",ee],text:[Ae],"text-shadow":[Ae],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",He,z,U,T]}],container:["container"],columns:[{columns:[ee,z,U,l]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",U,z]}],basis:[{basis:[He,"full","auto",l,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,He,"auto","initial","none",z]}],grow:[{grow:["",ee,U,z]}],shrink:[{shrink:["",ee,U,z]}],order:[{order:[Ie,"first","last","none",U,z]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:se()}],mx:[{mx:se()}],my:[{my:se()}],ms:[{ms:se()}],me:[{me:se()}],mt:[{mt:se()}],mr:[{mr:se()}],mb:[{mb:se()}],ml:[{ml:se()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[l,"screen",...Y()]}],"min-w":[{"min-w":[l,"screen","none",...Y()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",e,rt,Ue]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,U,Vt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rt,z]}],"font-family":[{font:[Sa,z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,U,z]}],"line-clamp":[{"line-clamp":[ee,"none",U,Vt]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":["none",U,z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",U,z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:g()}],"text-color":[{text:g()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",U,Ue]}],"text-decoration-color":[{decoration:g()}],"underline-offset":[{"underline-offset":[ee,"auto",U,z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U,z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",U,z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:h()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ie,U,z],radial:["",U,z],conic:[Ie,U,z]},Ta,_a]}],"bg-color":[{bg:g()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:g()}],"gradient-via":[{via:g()}],"gradient-to":[{to:g()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:g()}],"border-color-x":[{"border-x":g()}],"border-color-y":[{"border-y":g()}],"border-color-s":[{"border-s":g()}],"border-color-e":[{"border-e":g()}],"border-color-t":[{"border-t":g()}],"border-color-r":[{"border-r":g()}],"border-color-b":[{"border-b":g()}],"border-color-l":[{"border-l":g()}],"divide-color":[{divide:g()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,U,z]}],"outline-w":[{outline:["",ee,rt,Ue]}],"outline-color":[{outline:g()}],shadow:[{shadow:["","none",f,pt,mt]}],"shadow-color":[{shadow:g()}],"inset-shadow":[{"inset-shadow":["none",m,pt,mt]}],"inset-shadow-color":[{"inset-shadow":g()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:g()}],"ring-offset-w":[{"ring-offset":[ee,Ue]}],"ring-offset-color":[{"ring-offset":g()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":g()}],"text-shadow":[{"text-shadow":["none",p,pt,mt]}],"text-shadow-color":[{"text-shadow":g()}],opacity:[{opacity:[ee,U,z]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":g()}],"mask-image-linear-to-color":[{"mask-linear-to":g()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":g()}],"mask-image-t-to-color":[{"mask-t-to":g()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":g()}],"mask-image-r-to-color":[{"mask-r-to":g()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":g()}],"mask-image-b-to-color":[{"mask-b-to":g()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":g()}],"mask-image-l-to-color":[{"mask-l-to":g()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":g()}],"mask-image-x-to-color":[{"mask-x-to":g()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":g()}],"mask-image-y-to-color":[{"mask-y-to":g()}],"mask-image-radial":[{"mask-radial":[U,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":g()}],"mask-image-radial-to-color":[{"mask-radial-to":g()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":g()}],"mask-image-conic-to-color":[{"mask-conic-to":g()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:h()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",U,z]}],filter:[{filter:["","none",U,z]}],blur:[{blur:re()}],brightness:[{brightness:[ee,U,z]}],contrast:[{contrast:[ee,U,z]}],"drop-shadow":[{"drop-shadow":["","none",b,pt,mt]}],"drop-shadow-color":[{"drop-shadow":g()}],grayscale:[{grayscale:["",ee,U,z]}],"hue-rotate":[{"hue-rotate":[ee,U,z]}],invert:[{invert:["",ee,U,z]}],saturate:[{saturate:[ee,U,z]}],sepia:[{sepia:["",ee,U,z]}],"backdrop-filter":[{"backdrop-filter":["","none",U,z]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[ee,U,z]}],"backdrop-contrast":[{"backdrop-contrast":[ee,U,z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,U,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,U,z]}],"backdrop-invert":[{"backdrop-invert":["",ee,U,z]}],"backdrop-opacity":[{"backdrop-opacity":[ee,U,z]}],"backdrop-saturate":[{"backdrop-saturate":[ee,U,z]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,U,z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",U,z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",U,z]}],ease:[{ease:["linear","initial",w,U,z]}],delay:[{delay:[ee,U,z]}],animate:[{animate:["none",y,U,z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,U,z]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[U,z,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],accent:[{accent:g()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:g()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",U,z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",U,z]}],fill:[{fill:["none",...g()]}],"stroke-w":[{stroke:[ee,rt,Ue,Vt]}],stroke:[{stroke:["none",...g()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ma=ha(Aa);var lt=r=>r.type==="checkbox",Be=r=>r instanceof Date,be=r=>r==null;const ys=r=>typeof r=="object";var ue=r=>!be(r)&&!Array.isArray(r)&&ys(r)&&!Be(r),vs=r=>ue(r)&&r.target?lt(r.target)?r.target.checked:r.target.value:r,Ra=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,ws=(r,t)=>r.has(Ra(t)),Va=r=>{const t=r.constructor&&r.constructor.prototype;return ue(t)&&t.hasOwnProperty("isPrototypeOf")},tr=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function xe(r){let t;const e=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)t=new Date(r);else if(r instanceof Set)t=new Set(r);else if(!(tr&&(r instanceof Blob||s))&&(e||ue(r)))if(t=e?[]:{},!e&&!Va(r))t=r;else for(const n in r)r.hasOwnProperty(n)&&(t[n]=xe(r[n]));else return r;return t}var Ct=r=>Array.isArray(r)?r.filter(Boolean):[],de=r=>r===void 0,A=(r,t,e)=>{if(!t||!ue(r))return e;const s=Ct(t.split(/[,[\].]+?/)).reduce((n,a)=>be(n)?n:n[a],r);return de(s)||s===r?de(r[t])?e:r[t]:s},ke=r=>typeof r=="boolean",rr=r=>/^\w*$/.test(r),ks=r=>Ct(r.replace(/["|']|\]/g,"").split(/\.|\[/)),ae=(r,t,e)=>{let s=-1;const n=rr(t)?[t]:ks(t),a=n.length,o=a-1;for(;++s<a;){const l=n[s];let c=e;if(s!==o){const u=r[l];c=ue(u)||Array.isArray(u)?u:isNaN(+n[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const Et={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ne={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Me={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},js=v.createContext(null),ct=()=>v.useContext(js),$a=r=>{const{children:t,...e}=r;return v.createElement(js.Provider,{value:e},t)};var Es=(r,t,e,s=!0)=>{const n={defaultValues:t._defaultValues};for(const a in r)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Ne.all&&(t._proxyFormState[o]=!s||Ne.all),e&&(e[o]=!0),r[o]}});return n};const sr=typeof window<"u"?q.useLayoutEffect:q.useEffect;function Da(r){const t=ct(),{control:e=t.control,disabled:s,name:n,exact:a}=r||{},[o,l]=v.useState(e._formState),c=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return sr(()=>e._subscribe({name:n,formState:c.current,exact:a,callback:u=>{!s&&l({...e._formState,...u})}}),[n,s,a]),v.useEffect(()=>{c.current.isValid&&e._setValid(!0)},[e]),v.useMemo(()=>Es(o,e,c.current,!1),[o,e])}var Oe=r=>typeof r=="string",Ns=(r,t,e,s,n)=>Oe(r)?(s&&t.watch.add(r),A(e,r,n)):Array.isArray(r)?r.map(a=>(s&&t.watch.add(a),A(e,a))):(s&&(t.watchAll=!0),e);function nr(r){const t=ct(),{control:e=t.control,name:s,defaultValue:n,disabled:a,exact:o}=r||{},l=v.useRef(n),[c,u]=v.useState(e._getWatch(s,l.current));return sr(()=>e._subscribe({name:s,formState:{values:!0},exact:o,callback:f=>!a&&u(Ns(s,e._names,f.values||e._formValues,!1,l.current))}),[s,e,a,o]),v.useEffect(()=>e._removeUnmounted()),c}function _s(r){const t=ct(),{name:e,disabled:s,control:n=t.control,shouldUnregister:a}=r,o=ws(n._names.array,e),l=nr({control:n,name:e,defaultValue:A(n._formValues,e,A(n._defaultValues,e,r.defaultValue)),exact:!0}),c=Da({control:n,name:e,exact:!0}),u=v.useRef(r),f=v.useRef(n.register(e,{...r.rules,value:l,...ke(r.disabled)?{disabled:r.disabled}:{}})),m=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!A(c.errors,e)},isDirty:{enumerable:!0,get:()=>!!A(c.dirtyFields,e)},isTouched:{enumerable:!0,get:()=>!!A(c.touchedFields,e)},isValidating:{enumerable:!0,get:()=>!!A(c.validatingFields,e)},error:{enumerable:!0,get:()=>A(c.errors,e)}}),[c,e]),p=v.useCallback(T=>f.current.onChange({target:{value:vs(T),name:e},type:Et.CHANGE}),[e]),b=v.useCallback(()=>f.current.onBlur({target:{value:A(n._formValues,e),name:e},type:Et.BLUR}),[e,n._formValues]),N=v.useCallback(T=>{const w=A(n._fields,e);w&&T&&(w._f.ref={focus:()=>T.focus(),select:()=>T.select(),setCustomValidity:y=>T.setCustomValidity(y),reportValidity:()=>T.reportValidity()})},[n._fields,e]),j=v.useMemo(()=>({name:e,value:l,...ke(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:p,onBlur:b,ref:N}),[e,s,c.disabled,p,b,N,l]);return v.useEffect(()=>{const T=n._options.shouldUnregister||a;n.register(e,{...u.current.rules,...ke(u.current.disabled)?{disabled:u.current.disabled}:{}});const w=(y,E)=>{const M=A(n._fields,y);M&&M._f&&(M._f.mount=E)};if(w(e,!0),T){const y=xe(A(n._options.defaultValues,e));ae(n._defaultValues,e,y),de(A(n._formValues,e))&&ae(n._formValues,e,y)}return!o&&n.register(e),()=>{(o?T&&!n._state.action:T)?n.unregister(e):w(e,!1)}},[e,n,o,a]),v.useEffect(()=>{n._setDisabledField({disabled:s,name:e})},[s,e,n]),v.useMemo(()=>({field:j,formState:c,fieldState:m}),[j,c,m])}const Se=r=>r.render(_s(r));var Ss=(r,t,e,s,n)=>t?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[s]:n||!0}}:{},at=r=>Array.isArray(r)?r:[r],_r=()=>{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=[]}}},Zt=r=>be(r)||!ys(r);function Pe(r,t){if(Zt(r)||Zt(t))return r===t;if(Be(r)&&Be(t))return r.getTime()===t.getTime();const e=Object.keys(r),s=Object.keys(t);if(e.length!==s.length)return!1;for(const n of e){const a=r[n];if(!s.includes(n))return!1;if(n!=="ref"){const o=t[n];if(Be(a)&&Be(o)||ue(a)&&ue(o)||Array.isArray(a)&&Array.isArray(o)?!Pe(a,o):a!==o)return!1}}return!0}var ge=r=>ue(r)&&!Object.keys(r).length,ar=r=>r.type==="file",_e=r=>typeof r=="function",Nt=r=>{if(!tr)return!1;const t=r?r.ownerDocument:0;return r instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Fs=r=>r.type==="select-multiple",or=r=>r.type==="radio",Ia=r=>or(r)||lt(r),$t=r=>Nt(r)&&r.isConnected;function La(r,t){const e=t.slice(0,-1).length;let s=0;for(;s<e;)r=de(r)?s++:r[t[s++]];return r}function Pa(r){for(const t in r)if(r.hasOwnProperty(t)&&!de(r[t]))return!1;return!0}function he(r,t){const e=Array.isArray(t)?t:rr(t)?[t]:ks(t),s=e.length===1?r:La(r,e),n=e.length-1,a=e[n];return s&&delete s[a],n!==0&&(ue(s)&&ge(s)||Array.isArray(s)&&Pa(s))&&he(r,e.slice(0,-1)),r}var Ts=r=>{for(const t in r)if(_e(r[t]))return!0;return!1};function _t(r,t={}){const e=Array.isArray(r);if(ue(r)||e)for(const s in r)Array.isArray(r[s])||ue(r[s])&&!Ts(r[s])?(t[s]=Array.isArray(r[s])?[]:{},_t(r[s],t[s])):be(r[s])||(t[s]=!0);return t}function Cs(r,t,e){const s=Array.isArray(r);if(ue(r)||s)for(const n in r)Array.isArray(r[n])||ue(r[n])&&!Ts(r[n])?de(t)||Zt(e[n])?e[n]=Array.isArray(r[n])?_t(r[n],[]):{..._t(r[n])}:Cs(r[n],be(t)?{}:t[n],e[n]):e[n]=!Pe(r[n],t[n]);return e}var st=(r,t)=>Cs(r,t,_t(t));const Sr={value:!1,isValid:!1},Fr={value:!0,isValid:!0};var Os=r=>{if(Array.isArray(r)){if(r.length>1){const t=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!de(r[0].attributes.value)?de(r[0].value)||r[0].value===""?Fr:{value:r[0].value,isValid:!0}:Fr:Sr}return Sr},As=(r,{valueAsNumber:t,valueAsDate:e,setValueAs:s})=>de(r)?r:t?r===""?NaN:r&&+r:e&&Oe(r)?new Date(r):s?s(r):r;const Tr={isValid:!1,value:null};var Ms=r=>Array.isArray(r)?r.reduce((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t,Tr):Tr;function Cr(r){const t=r.ref;return ar(t)?t.files:or(t)?Ms(r.refs).value:Fs(t)?[...t.selectedOptions].map(({value:e})=>e):lt(t)?Os(r.refs).value:As(de(t.value)?r.ref.value:t.value,r)}var za=(r,t,e,s)=>{const n={};for(const a of r){const o=A(t,a);o&&ae(n,a,o._f)}return{criteriaMode:e,names:[...r],fields:n,shouldUseNativeValidation:s}},St=r=>r instanceof RegExp,nt=r=>de(r)?r:St(r)?r.source:ue(r)?St(r.value)?r.value.source:r.value:r,Or=r=>({isOnSubmit:!r||r===Ne.onSubmit,isOnBlur:r===Ne.onBlur,isOnChange:r===Ne.onChange,isOnAll:r===Ne.all,isOnTouch:r===Ne.onTouched});const Ar="AsyncFunction";var Ua=r=>!!r&&!!r.validate&&!!(_e(r.validate)&&r.validate.constructor.name===Ar||ue(r.validate)&&Object.values(r.validate).find(t=>t.constructor.name===Ar)),Ba=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),Mr=(r,t,e)=>!e&&(t.watchAll||t.watch.has(r)||[...t.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const ot=(r,t,e,s)=>{for(const n of e||Object.keys(r)){const a=A(r,n);if(a){const{_f:o,...l}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!s)return!0;if(o.ref&&t(o.ref,o.name)&&!s)return!0;if(ot(l,t))break}else if(ue(l)&&ot(l,t))break}}};function Rr(r,t,e){const s=A(r,e);if(s||rr(e))return{error:s,name:e};const n=e.split(".");for(;n.length;){const a=n.join("."),o=A(t,a),l=A(r,a);if(o&&!Array.isArray(o)&&e!==a)return{name:e};if(l&&l.type)return{name:a,error:l};n.pop()}return{name:e}}var Wa=(r,t,e,s)=>{e(r);const{name:n,...a}=r;return ge(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!s||Ne.all))},Za=(r,t,e)=>!r||!t||r===t||at(r).some(s=>s&&(e?s===t:s.startsWith(t)||t.startsWith(s))),qa=(r,t,e,s,n)=>n.isOnAll?!1:!e&&n.isOnTouch?!(t||r):(e?s.isOnBlur:n.isOnBlur)?!r:(e?s.isOnChange:n.isOnChange)?r:!0,Ga=(r,t)=>!Ct(A(r,t)).length&&he(r,t),Ha=(r,t,e)=>{const s=at(A(r,e));return ae(s,"root",t[e]),ae(r,e,s),r},wt=r=>Oe(r);function Vr(r,t,e="validate"){if(wt(r)||Array.isArray(r)&&r.every(wt)||ke(r)&&!r)return{type:e,message:wt(r)?r:"",ref:t}}var Ye=r=>ue(r)&&!St(r)?r:{value:r,message:""},$r=async(r,t,e,s,n,a)=>{const{ref:o,refs:l,required:c,maxLength:u,minLength:f,min:m,max:p,pattern:b,validate:N,name:j,valueAsNumber:T,mount:w}=r._f,y=A(e,j);if(!w||t.has(j))return{};const E=l?l[0]:o,M=V=>{n&&E.reportValidity&&(E.setCustomValidity(ke(V)?"":V||""),E.reportValidity())},F={},B=or(o),X=lt(o),S=B||X,$=(T||ar(o))&&de(o.value)&&de(y)||Nt(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,P=Ss.bind(null,j,s,F),R=(V,H,K,Q=Me.maxLength,se=Me.minLength)=>{const Y=V?H:K;F[j]={type:V?Q:se,message:Y,ref:o,...P(V?Q:se,Y)}};if(a?!Array.isArray(y)||!y.length:c&&(!S&&($||be(y))||ke(y)&&!y||X&&!Os(l).isValid||B&&!Ms(l).isValid)){const{value:V,message:H}=wt(c)?{value:!!c,message:c}:Ye(c);if(V&&(F[j]={type:Me.required,message:H,ref:E,...P(Me.required,H)},!s))return M(H),F}if(!$&&(!be(m)||!be(p))){let V,H;const K=Ye(p),Q=Ye(m);if(!be(y)&&!isNaN(y)){const se=o.valueAsNumber||y&&+y;be(K.value)||(V=se>K.value),be(Q.value)||(H=se<Q.value)}else{const se=o.valueAsDate||new Date(y),Y=h=>new Date(new Date().toDateString()+" "+h),g=o.type=="time",J=o.type=="week";Oe(K.value)&&y&&(V=g?Y(y)>Y(K.value):J?y>K.value:se>new Date(K.value)),Oe(Q.value)&&y&&(H=g?Y(y)<Y(Q.value):J?y<Q.value:se<new Date(Q.value))}if((V||H)&&(R(!!V,K.message,Q.message,Me.max,Me.min),!s))return M(F[j].message),F}if((u||f)&&!$&&(Oe(y)||a&&Array.isArray(y))){const V=Ye(u),H=Ye(f),K=!be(V.value)&&y.length>+V.value,Q=!be(H.value)&&y.length<+H.value;if((K||Q)&&(R(K,V.message,H.message),!s))return M(F[j].message),F}if(b&&!$&&Oe(y)){const{value:V,message:H}=Ye(b);if(St(V)&&!y.match(V)&&(F[j]={type:Me.pattern,message:H,ref:o,...P(Me.pattern,H)},!s))return M(H),F}if(N){if(_e(N)){const V=await N(y,e),H=Vr(V,E);if(H&&(F[j]={...H,...P(Me.validate,H.message)},!s))return M(H.message),F}else if(ue(N)){let V={};for(const H in N){if(!ge(V)&&!s)break;const K=Vr(await N[H](y,e),E,H);K&&(V={...K,...P(H,K.message)},M(K.message),s&&(F[j]=V))}if(!ge(V)&&(F[j]={ref:E,...V},!s))return F}}return M(!0),F};const Ya={mode:Ne.onSubmit,reValidateMode:Ne.onChange,shouldFocusError:!0};function Xa(r={}){let t={...Ya,...r},e={submitCount:0,isDirty:!1,isReady:!1,isLoading:_e(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const s={};let n=ue(t.defaultValues)||ue(t.values)?xe(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:xe(n),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...f};const p={array:_r(),state:_r()},b=t.criteriaMode===Ne.all,N=d=>x=>{clearTimeout(u),u=setTimeout(d,x)},j=async d=>{if(!t.disabled&&(f.isValid||m.isValid||d)){const x=t.resolver?ge((await X()).errors):await $(s,!0);x!==e.isValid&&p.state.next({isValid:x})}},T=(d,x)=>{!t.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((d||Array.from(l.mount)).forEach(k=>{k&&(x?ae(e.validatingFields,k,x):he(e.validatingFields,k))}),p.state.next({validatingFields:e.validatingFields,isValidating:!ge(e.validatingFields)}))},w=(d,x=[],k,I,O=!0,C=!0)=>{if(I&&k&&!t.disabled){if(o.action=!0,C&&Array.isArray(A(s,d))){const G=k(A(s,d),I.argA,I.argB);O&&ae(s,d,G)}if(C&&Array.isArray(A(e.errors,d))){const G=k(A(e.errors,d),I.argA,I.argB);O&&ae(e.errors,d,G),Ga(e.errors,d)}if((f.touchedFields||m.touchedFields)&&C&&Array.isArray(A(e.touchedFields,d))){const G=k(A(e.touchedFields,d),I.argA,I.argB);O&&ae(e.touchedFields,d,G)}(f.dirtyFields||m.dirtyFields)&&(e.dirtyFields=st(n,a)),p.state.next({name:d,isDirty:R(d,x),dirtyFields:e.dirtyFields,errors:e.errors,isValid:e.isValid})}else ae(a,d,x)},y=(d,x)=>{ae(e.errors,d,x),p.state.next({errors:e.errors})},E=d=>{e.errors=d,p.state.next({errors:e.errors,isValid:!1})},M=(d,x,k,I)=>{const O=A(s,d);if(O){const C=A(a,d,de(k)?A(n,d):k);de(C)||I&&I.defaultChecked||x?ae(a,d,x?C:Cr(O._f)):K(d,C),o.mount&&j()}},F=(d,x,k,I,O)=>{let C=!1,G=!1;const oe={name:d};if(!t.disabled){if(!k||I){(f.isDirty||m.isDirty)&&(G=e.isDirty,e.isDirty=oe.isDirty=R(),C=G!==oe.isDirty);const ce=Pe(A(n,d),x);G=!!A(e.dirtyFields,d),ce?he(e.dirtyFields,d):ae(e.dirtyFields,d,!0),oe.dirtyFields=e.dirtyFields,C=C||(f.dirtyFields||m.dirtyFields)&&G!==!ce}if(k){const ce=A(e.touchedFields,d);ce||(ae(e.touchedFields,d,k),oe.touchedFields=e.touchedFields,C=C||(f.touchedFields||m.touchedFields)&&ce!==k)}C&&O&&p.state.next(oe)}return C?oe:{}},B=(d,x,k,I)=>{const O=A(e.errors,d),C=(f.isValid||m.isValid)&&ke(x)&&e.isValid!==x;if(t.delayError&&k?(c=N(()=>y(d,k)),c(t.delayError)):(clearTimeout(u),c=null,k?ae(e.errors,d,k):he(e.errors,d)),(k?!Pe(O,k):O)||!ge(I)||C){const G={...I,...C&&ke(x)?{isValid:x}:{},errors:e.errors,name:d};e={...e,...G},p.state.next(G)}},X=async d=>{T(d,!0);const x=await t.resolver(a,t.context,za(d||l.mount,s,t.criteriaMode,t.shouldUseNativeValidation));return T(d),x},S=async d=>{const{errors:x}=await X(d);if(d)for(const k of d){const I=A(x,k);I?ae(e.errors,k,I):he(e.errors,k)}else e.errors=x;return x},$=async(d,x,k={valid:!0})=>{for(const I in d){const O=d[I];if(O){const{_f:C,...G}=O;if(C){const oe=l.array.has(C.name),ce=O._f&&Ua(O._f);ce&&f.validatingFields&&T([I],!0);const je=await $r(O,l.disabled,a,b,t.shouldUseNativeValidation&&!x,oe);if(ce&&f.validatingFields&&T([I]),je[C.name]&&(k.valid=!1,x))break;!x&&(A(je,C.name)?oe?Ha(e.errors,je,C.name):ae(e.errors,C.name,je[C.name]):he(e.errors,C.name))}!ge(G)&&await $(G,x,k)}}return k.valid},P=()=>{for(const d of l.unMount){const x=A(s,d);x&&(x._f.refs?x._f.refs.every(k=>!$t(k)):!$t(x._f.ref))&&Z(d)}l.unMount=new Set},R=(d,x)=>!t.disabled&&(d&&x&&ae(a,d,x),!Pe(h(),n)),V=(d,x,k)=>Ns(d,l,{...o.mount?a:de(x)?n:Oe(d)?{[d]:x}:x},k,x),H=d=>Ct(A(o.mount?a:n,d,t.shouldUnregister?A(n,d,[]):[])),K=(d,x,k={})=>{const I=A(s,d);let O=x;if(I){const C=I._f;C&&(!C.disabled&&ae(a,d,As(x,C)),O=Nt(C.ref)&&be(x)?"":x,Fs(C.ref)?[...C.ref.options].forEach(G=>G.selected=O.includes(G.value)):C.refs?lt(C.ref)?C.refs.forEach(G=>{(!G.defaultChecked||!G.disabled)&&(Array.isArray(O)?G.checked=!!O.find(oe=>oe===G.value):G.checked=O===G.value||!!O)}):C.refs.forEach(G=>G.checked=G.value===O):ar(C.ref)?C.ref.value="":(C.ref.value=O,C.ref.type||p.state.next({name:d,values:xe(a)})))}(k.shouldDirty||k.shouldTouch)&&F(d,O,k.shouldTouch,k.shouldDirty,!0),k.shouldValidate&&J(d)},Q=(d,x,k)=>{for(const I in x){if(!x.hasOwnProperty(I))return;const O=x[I],C=`${d}.${I}`,G=A(s,C);(l.array.has(d)||ue(O)||G&&!G._f)&&!Be(O)?Q(C,O,k):K(C,O,k)}},se=(d,x,k={})=>{const I=A(s,d),O=l.array.has(d),C=xe(x);ae(a,d,C),O?(p.array.next({name:d,values:xe(a)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&k.shouldDirty&&p.state.next({name:d,dirtyFields:st(n,a),isDirty:R(d,C)})):I&&!I._f&&!be(C)?Q(d,C,k):K(d,C,k),Mr(d,l)&&p.state.next({...e}),p.state.next({name:o.mount?d:void 0,values:xe(a)})},Y=async d=>{o.mount=!0;const x=d.target;let k=x.name,I=!0;const O=A(s,k),C=ce=>{I=Number.isNaN(ce)||Be(ce)&&isNaN(ce.getTime())||Pe(ce,A(a,k,ce))},G=Or(t.mode),oe=Or(t.reValidateMode);if(O){let ce,je;const ft=x.type?Cr(O._f):vs(d),De=d.type===Et.BLUR||d.type===Et.FOCUS_OUT,bn=!Ba(O._f)&&!t.resolver&&!A(e.errors,k)&&!O._f.deps||qa(De,A(e.touchedFields,k),e.isSubmitted,oe,G),At=Mr(k,l,De);ae(a,k,ft),De?(O._f.onBlur&&O._f.onBlur(d),c&&c(0)):O._f.onChange&&O._f.onChange(d);const Mt=F(k,ft,De),yn=!ge(Mt)||At;if(!De&&p.state.next({name:k,type:d.type,values:xe(a)}),bn)return(f.isValid||m.isValid)&&(t.mode==="onBlur"?De&&j():De||j()),yn&&p.state.next({name:k,...At?{}:Mt});if(!De&&At&&p.state.next({...e}),t.resolver){const{errors:xr}=await X([k]);if(C(ft),I){const vn=Rr(e.errors,s,k),gr=Rr(xr,s,vn.name||k);ce=gr.error,k=gr.name,je=ge(xr)}}else T([k],!0),ce=(await $r(O,l.disabled,a,b,t.shouldUseNativeValidation))[k],T([k]),C(ft),I&&(ce?je=!1:(f.isValid||m.isValid)&&(je=await $(s,!0)));I&&(O._f.deps&&J(O._f.deps),B(k,je,ce,Mt))}},g=(d,x)=>{if(A(e.errors,x)&&d.focus)return d.focus(),1},J=async(d,x={})=>{let k,I;const O=at(d);if(t.resolver){const C=await S(de(d)?d:O);k=ge(C),I=d?!O.some(G=>A(C,G)):k}else d?(I=(await Promise.all(O.map(async C=>{const G=A(s,C);return await $(G&&G._f?{[C]:G}:G)}))).every(Boolean),!(!I&&!e.isValid)&&j()):I=k=await $(s);return p.state.next({...!Oe(d)||(f.isValid||m.isValid)&&k!==e.isValid?{}:{name:d},...t.resolver||!d?{isValid:k}:{},errors:e.errors}),x.shouldFocus&&!I&&ot(s,g,d?O:l.mount),I},h=d=>{const x={...o.mount?a:n};return de(d)?x:Oe(d)?A(x,d):d.map(k=>A(x,k))},_=(d,x)=>({invalid:!!A((x||e).errors,d),isDirty:!!A((x||e).dirtyFields,d),error:A((x||e).errors,d),isValidating:!!A(e.validatingFields,d),isTouched:!!A((x||e).touchedFields,d)}),D=d=>{d&&at(d).forEach(x=>he(e.errors,x)),p.state.next({errors:d?e.errors:{}})},W=(d,x,k)=>{const I=(A(s,d,{_f:{}})._f||{}).ref,O=A(e.errors,d)||{},{ref:C,message:G,type:oe,...ce}=O;ae(e.errors,d,{...ce,...x,ref:I}),p.state.next({name:d,errors:e.errors,isValid:!1}),k&&k.shouldFocus&&I&&I.focus&&I.focus()},te=(d,x)=>_e(d)?p.state.subscribe({next:k=>d(V(void 0,x),k)}):V(d,x,!0),ie=d=>p.state.subscribe({next:x=>{Za(d.name,x.name,d.exact)&&Wa(x,d.formState||f,gn,d.reRenderRoot)&&d.callback({values:{...a},...e,...x})}}).unsubscribe,me=d=>(o.mount=!0,m={...m,...d.formState},ie({...d,formState:m})),Z=(d,x={})=>{for(const k of d?at(d):l.mount)l.mount.delete(k),l.array.delete(k),x.keepValue||(he(s,k),he(a,k)),!x.keepError&&he(e.errors,k),!x.keepDirty&&he(e.dirtyFields,k),!x.keepTouched&&he(e.touchedFields,k),!x.keepIsValidating&&he(e.validatingFields,k),!t.shouldUnregister&&!x.keepDefaultValue&&he(n,k);p.state.next({values:xe(a)}),p.state.next({...e,...x.keepDirty?{isDirty:R()}:{}}),!x.keepIsValid&&j()},re=({disabled:d,name:x})=>{(ke(d)&&o.mount||d||l.disabled.has(x))&&(d?l.disabled.add(x):l.disabled.delete(x))},le=(d,x={})=>{let k=A(s,d);const I=ke(x.disabled)||ke(t.disabled);return ae(s,d,{...k||{},_f:{...k&&k._f?k._f:{ref:{name:d}},name:d,mount:!0,...x}}),l.mount.add(d),k?re({disabled:ke(x.disabled)?x.disabled:t.disabled,name:d}):M(d,!0,x.value),{...I?{disabled:x.disabled||t.disabled}:{},...t.progressive?{required:!!x.required,min:nt(x.min),max:nt(x.max),minLength:nt(x.minLength),maxLength:nt(x.maxLength),pattern:nt(x.pattern)}:{},name:d,onChange:Y,onBlur:Y,ref:O=>{if(O){le(d,x),k=A(s,d);const C=de(O.value)&&O.querySelectorAll&&O.querySelectorAll("input,select,textarea")[0]||O,G=Ia(C),oe=k._f.refs||[];if(G?oe.find(ce=>ce===C):C===k._f.ref)return;ae(s,d,{_f:{...k._f,...G?{refs:[...oe.filter($t),C,...Array.isArray(A(n,d))?[{}]:[]],ref:{type:C.type,name:d}}:{ref:C}}}),M(d,!1,void 0,C)}else k=A(s,d,{}),k._f&&(k._f.mount=!1),(t.shouldUnregister||x.shouldUnregister)&&!(ws(l.array,d)&&o.action)&&l.unMount.add(d)}}},ne=()=>t.shouldFocusError&&ot(s,g,l.mount),ye=d=>{ke(d)&&(p.state.next({disabled:d}),ot(s,(x,k)=>{const I=A(s,k);I&&(x.disabled=I._f.disabled||d,Array.isArray(I._f.refs)&&I._f.refs.forEach(O=>{O.disabled=I._f.disabled||d}))},0,!1))},Fe=(d,x)=>async k=>{let I;k&&(k.preventDefault&&k.preventDefault(),k.persist&&k.persist());let O=xe(a);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:C,values:G}=await X();e.errors=C,O=G}else await $(s);if(l.disabled.size)for(const C of l.disabled)ae(O,C,void 0);if(he(e.errors,"root"),ge(e.errors)){p.state.next({errors:{}});try{await d(O,k)}catch(C){I=C}}else x&&await x({...e.errors},k),ne(),setTimeout(ne);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ge(e.errors)&&!I,submitCount:e.submitCount+1,errors:e.errors}),I)throw I},ut=(d,x={})=>{A(s,d)&&(de(x.defaultValue)?se(d,xe(A(n,d))):(se(d,x.defaultValue),ae(n,d,xe(x.defaultValue))),x.keepTouched||he(e.touchedFields,d),x.keepDirty||(he(e.dirtyFields,d),e.isDirty=x.defaultValue?R(d,xe(A(n,d))):R()),x.keepError||(he(e.errors,d),f.isValid&&j()),p.state.next({...e}))},hr=(d,x={})=>{const k=d?xe(d):n,I=xe(k),O=ge(d),C=O?n:I;if(x.keepDefaultValues||(n=k),!x.keepValues){if(x.keepDirtyValues){const G=new Set([...l.mount,...Object.keys(st(n,a))]);for(const oe of Array.from(G))A(e.dirtyFields,oe)?ae(C,oe,A(a,oe)):se(oe,A(C,oe))}else{if(tr&&de(d))for(const G of l.mount){const oe=A(s,G);if(oe&&oe._f){const ce=Array.isArray(oe._f.refs)?oe._f.refs[0]:oe._f.ref;if(Nt(ce)){const je=ce.closest("form");if(je){je.reset();break}}}}for(const G of l.mount)se(G,A(C,G))}a=xe(C),p.array.next({values:{...C}}),p.state.next({values:{...C}})}l={mount:x.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!x.keepIsValid||!!x.keepDirtyValues,o.watch=!!t.shouldUnregister,p.state.next({submitCount:x.keepSubmitCount?e.submitCount:0,isDirty:O?!1:x.keepDirty?e.isDirty:!!(x.keepDefaultValues&&!Pe(d,n)),isSubmitted:x.keepIsSubmitted?e.isSubmitted:!1,dirtyFields:O?{}:x.keepDirtyValues?x.keepDefaultValues&&a?st(n,a):e.dirtyFields:x.keepDefaultValues&&d?st(n,d):x.keepDirty?e.dirtyFields:{},touchedFields:x.keepTouched?e.touchedFields:{},errors:x.keepErrors?e.errors:{},isSubmitSuccessful:x.keepIsSubmitSuccessful?e.isSubmitSuccessful:!1,isSubmitting:!1})},mr=(d,x)=>hr(_e(d)?d(a):d,x),xn=(d,x={})=>{const k=A(s,d),I=k&&k._f;if(I){const O=I.refs?I.refs[0]:I.ref;O.focus&&(O.focus(),x.shouldSelect&&_e(O.select)&&O.select())}},gn=d=>{e={...e,...d}},pr={control:{register:le,unregister:Z,getFieldState:_,handleSubmit:Fe,setError:W,_subscribe:ie,_runSchema:X,_getWatch:V,_getDirty:R,_setValid:j,_setFieldArray:w,_setDisabledField:re,_setErrors:E,_getFieldArray:H,_reset:hr,_resetDefaultValues:()=>_e(t.defaultValues)&&t.defaultValues().then(d=>{mr(d,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:P,_disableForm:ye,_subjects:p,_proxyFormState:f,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(d){o=d},get _defaultValues(){return n},get _names(){return l},set _names(d){l=d},get _formState(){return e},get _options(){return t},set _options(d){t={...t,...d}}},subscribe:me,trigger:J,register:le,handleSubmit:Fe,watch:te,setValue:se,getValues:h,reset:mr,resetField:ut,clearErrors:D,unregister:Z,setError:W,setFocus:xn,getFieldState:_};return{...pr,formControl:pr}}function Ja(r={}){const t=v.useRef(void 0),e=v.useRef(void 0),[s,n]=v.useState({isDirty:!1,isValidating:!1,isLoading:_e(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:_e(r.defaultValues)?void 0:r.defaultValues});t.current||(t.current={...r.formControl?r.formControl:Xa(r),formState:s},r.formControl&&r.defaultValues&&!_e(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const a=t.current.control;return a._options=r,sr(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(l=>({...l,isReady:!0})),a._formState.isReady=!0,o},[a]),v.useEffect(()=>a._disableForm(r.disabled),[a,r.disabled]),v.useEffect(()=>{r.mode&&(a._options.mode=r.mode),r.reValidateMode&&(a._options.reValidateMode=r.reValidateMode),r.errors&&!ge(r.errors)&&a._setErrors(r.errors)},[a,r.errors,r.mode,r.reValidateMode]),v.useEffect(()=>{r.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,r.shouldUnregister]),v.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==s.isDirty&&a._subjects.state.next({isDirty:o})}},[a,s.isDirty]),v.useEffect(()=>{r.values&&!Pe(r.values,e.current)?(a._reset(r.values,a._options.resetOptions),e.current=r.values,n(o=>({...o}))):a._resetDefaultValues()},[a,r.values]),v.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()}),t.current.formState=Es(s,a),t.current}const Rs={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Ka={sm:"h-6",md:"h-10",lg:"h-12"},Qa={sm:"px-2",md:"px-2.5",lg:"px-3"};function Dr(r,t,e,s,n,a,o){const l=t?"datetime-local":"date",c=L("box-border w-full rounded-lg border outline-none transition font-[var(--font-primary)]",Rs[e],Ka[e],Qa[e],a?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]"),m=Ma(c,n?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-disabled)] cursor-not-allowed opacity-60":"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",o);return i.jsxs(i.Fragment,{children:[i.jsx("input",{id:r,type:l,disabled:n,"aria-disabled":n,"data-disabled":n?"true":"false",...s,className:m}),i.jsx("div",{children:a!=null&&a.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Vs(r){const{control:t,name:e,rules:s,defaultValue:n,showTime:a=!1,size:o="sm",width:l="100%",label:c,labelHidden:u=!1,hasError:f=!1,errorMessage:m="",disabled:p=!1,className:b,onChange:N}=r,j=v.useId(),T=e||j;return i.jsxs("div",{className:L("flex flex-col",b),style:{width:l,maxWidth:"100%"},children:[c&&i.jsx("label",{htmlFor:T,className:L("pb-2 text-[var(--color-ds-text-primary)]",Rs[o],u&&"sr-only"),children:c}),t&&e?i.jsx(Se,{name:e,control:t,rules:s,defaultValue:n,render:({field:w,fieldState:y})=>Dr(T,a,o,{value:w.value,onChange:w.onChange,onBlur:w.onBlur},p,y.error,b)}):Dr(T,a,o,{defaultValue:n,onChange:N},p,f?{message:m}:void 0,b)]})}const eo=({trigger:r,items:t,align:e="left",className:s})=>{const[n,a]=v.useState(!1),o=v.useRef(null),l=v.useRef([]);v.useEffect(()=>{const u=f=>{o.current&&!o.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const c=u=>{var m,p;const f=l.current.findIndex(b=>b===document.activeElement);if(u.key==="Escape")a(!1);else if(u.key==="ArrowDown"){u.preventDefault();const b=(f+1)%t.length;(m=l.current[b])==null||m.focus()}else if(u.key==="ArrowUp"){u.preventDefault();const b=(f-1+t.length)%t.length;(p=l.current[b])==null||p.focus()}};return i.jsxs("div",{className:L("relative inline-block",s),ref:o,children:[i.jsx("button",{type:"button",onClick:()=>a(u=>!u),className:"inline-flex items-center focus:outline-none","aria-haspopup":"menu","aria-expanded":n,children:r}),n&&i.jsx("div",{role:"menu","aria-orientation":"vertical",className:L("absolute mt-2 min-w-[160px] bg-[var(--color-ds-background-page)]","border border-[var(--color-ds-border-muted)] rounded shadow-lg z-10",e==="right"?"right-0":"left-0"),onKeyDown:c,children:t.map((u,f)=>{const{label:m,onSelect:p,disabled:b,icon:N}=u;return i.jsxs("button",{role:"menuitem",type:"button",disabled:b,ref:j=>{l.current[f]=j},className:L("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",b?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{b||(p(),a(!1))},children:[N&&i.jsx(N,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),m]},f)})})]})},to=(r,t,e,s)=>{var a,o,l,c;const n=[e,{code:t,...s||{}}];if((o=(a=r==null?void 0:r.services)==null?void 0:a.logger)!=null&&o.forward)return r.services.logger.forward(n,"warn","react-i18next::",!0);We(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)},Ir={},qt=(r,t,e,s)=>{We(e)&&Ir[e]||(We(e)&&(Ir[e]=new Date),to(r,t,e,s))},$s=(r,t)=>()=>{if(r.isInitialized)t();else{const e=()=>{setTimeout(()=>{r.off("initialized",e)},0),t()};r.on("initialized",e)}},Gt=(r,t,e)=>{r.loadNamespaces(t,$s(r,e))},Lr=(r,t,e,s)=>{if(We(e)&&(e=[e]),r.options.preload&&r.options.preload.indexOf(t)>-1)return Gt(r,e,s);e.forEach(n=>{r.options.ns.indexOf(n)<0&&r.options.ns.push(n)}),r.loadLanguages(t,$s(r,s))},ro=(r,t,e={})=>!t.languages||!t.languages.length?(qt(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(r,{lng:e.lng,precheck:(s,n)=>{var a;if(((a=e.bindI18n)==null?void 0:a.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!n(s.isLanguageChangingTo,r))return!1}}),We=r=>typeof r=="string",so=r=>typeof r=="object"&&r!==null,no=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ao={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},oo=r=>ao[r],io=r=>r.replace(no,oo);let lo={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:io};const co=()=>lo;let uo;const fo=()=>uo,ho=v.createContext();class mo{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const po=(r,t)=>{const e=v.useRef();return v.useEffect(()=>{e.current=r},[r,t]),e.current},Ds=(r,t,e,s)=>r.getFixedT(t,e,s),xo=(r,t,e,s)=>v.useCallback(Ds(r,t,e,s),[r,t,e,s]),ir=(r,t={})=>{var M,F,B,X;const{i18n:e}=t,{i18n:s,defaultNS:n}=v.useContext(ho)||{},a=e||s||fo();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new mo),!a){qt(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const S=(P,R)=>We(R)?R:so(R)&&We(R.defaultValue)?R.defaultValue:Array.isArray(P)?P[P.length-1]:P,$=[S,{},!1];return $.t=S,$.i18n={},$.ready=!1,$}(M=a.options.react)!=null&&M.wait&&qt(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...co(),...a.options.react,...t},{useSuspense:l,keyPrefix:c}=o;let u=n||((F=a.options)==null?void 0:F.defaultNS);u=We(u)?[u]:u||["translation"],(X=(B=a.reportNamespaces).addUsedNamespaces)==null||X.call(B,u);const f=(a.isInitialized||a.initializedStoreOnce)&&u.every(S=>ro(S,a,o)),m=xo(a,t.lng||null,o.nsMode==="fallback"?u:u[0],c),p=()=>m,b=()=>Ds(a,t.lng||null,o.nsMode==="fallback"?u:u[0],c),[N,j]=v.useState(p);let T=u.join();t.lng&&(T=`${t.lng}${T}`);const w=po(T),y=v.useRef(!0);v.useEffect(()=>{const{bindI18n:S,bindI18nStore:$}=o;y.current=!0,!f&&!l&&(t.lng?Lr(a,t.lng,u,()=>{y.current&&j(b)}):Gt(a,u,()=>{y.current&&j(b)})),f&&w&&w!==T&&y.current&&j(b);const P=()=>{y.current&&j(b)};return S&&(a==null||a.on(S,P)),$&&(a==null||a.store.on($,P)),()=>{y.current=!1,a&&(S==null||S.split(" ").forEach(R=>a.off(R,P))),$&&a&&$.split(" ").forEach(R=>a.store.off(R,P))}},[a,T]),v.useEffect(()=>{y.current&&f&&j(p)},[a,c,f]);const E=[N,a,f];if(E.t=N,E.i18n=a,E.ready=f,f||!f&&!l)return E;throw new Promise(S=>{t.lng?Lr(a,t.lng,u,()=>S()):Gt(a,u,()=>S())})},Ht={sm:"text-sm",md:"text-base",lg:"text-lg"};function Pr(r,t,e,s,n,a,o,l,c){const{t:u}=ir(),f=v.useRef(null),m=typeof s=="number"&&t.length>=s,p=()=>{var y;!o&&!m&&((y=f.current)==null||y.click())},b=y=>{const E=y.target.files;if(!E)return;const M=Array.from(E);let F=t.concat(M);s&&(F=F.slice(0,s)),e(F),y.target.value=""},N=y=>{if(y.preventDefault(),o||m)return;const E=Array.from(y.dataTransfer.files);let M=t.concat(E);s&&(M=M.slice(0,s)),e(M)},j=y=>{y.preventDefault()},T=y=>{const E=URL.createObjectURL(y);window.open(E)},w=y=>{const E=t.filter((M,F)=>F!==y);e(E)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"self-start mb-4 w-auto",children:i.jsx($e,{type:"button",variant:"outline",size:a,icon:wr,onClick:p,disabled:o||m,children:u("ds.fileUploader.browse","Browse files")})}),!m&&i.jsxs("div",{className:L("relative flex bg-[var(--color-ds-background-page)] flex-col items-center justify-center border-2 border-dashed border-[var(--color-ds-border-muted)] rounded-lg p-4",o?"opacity-50 cursor-not-allowed":"hover:border-[var(--color-ds-border-default)]",Ht[a],c),onDrop:N,onDragOver:j,children:[i.jsx("input",{id:r,type:"file",ref:f,className:"hidden",multiple:s!==1,accept:n,onChange:b,disabled:o}),i.jsx(Ce,{component:Pn,size:"md",className:"w-8 h-8 text-[var(--color-ds-text-secondary)]"}),i.jsx("p",{className:"mt-3 text-[var(--color-ds-text-secondary)] text-center",children:u("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),t.length>0&&i.jsx("ul",{className:"mt-4 space-y-1",children:t.map((y,E)=>i.jsxs("li",{className:"flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(wr,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),i.jsx("span",{className:"truncate pr-2",children:y.name})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx($e,{variant:"ghost",size:"sm",icon:ls,ariaLabel:u("ds.fileUploader.view","View"),onClick:()=>T(y)}),i.jsx($e,{variant:"ghost",size:"sm",icon:Qt,ariaLabel:u("ds.fileUploader.remove","Remove"),onClick:()=>w(E)})]})]},E))}),i.jsx("div",{className:"pt-[5px] min-h-[18px] w-full",children:l!=null&&l.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Is(r){const{control:t,name:e,rules:s,defaultValue:n,maxFiles:a,accept:o,size:l="sm",width:c="100%",label:u,labelHidden:f=!1,disabled:m=!1,hasError:p=!1,errorMessage:b="",className:N}=r,j=v.useId(),T=e||j;if(t&&e)return i.jsxs("div",{className:L("flex flex-col",N),style:{width:c},children:[u&&i.jsx("label",{htmlFor:T,className:L("pb-[10px] text-[var(--color-ds-text-primary)]",Ht[l],f&&"sr-only"),children:u}),i.jsx(Se,{name:e,control:t,rules:s,defaultValue:n instanceof FileList?Array.from(n):n||[],render:({field:E,fieldState:M})=>Pr(T,E.value,F=>E.onChange(F),a,o,l,m,M.error,N)})]});const[w,y]=v.useState(n instanceof FileList?Array.from(n):n||[]);return i.jsxs("div",{className:L("flex flex-col",N),style:{width:c},children:[u&&i.jsx("label",{htmlFor:T,className:L("pb-[10px] text-[var(--color-ds-text-primary)]",Ht[l],f&&"sr-only"),children:u}),Pr(T,w,y,a,o,l,m,p?{message:b}:void 0,N)]})}const qe=({count:r=1,width:t,height:e="1em",variant:s="rect",className:n})=>{const a=Array.from({length:r});return i.jsx(i.Fragment,{children:a.map((o,l)=>i.jsx("span",{role:"status","aria-label":"Cargando...",className:L("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",n),style:{width:t??"auto",height:e}},l))})},xt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},go={sm:"h-6",md:"h-10",lg:"h-12"},bo={sm:"px-2",md:"px-2.5",lg:"px-3"},zr={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},yo={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Ot({id:r,type:t="text",size:e="sm",width:s="100%",label:n,labelHidden:a=!1,hasError:o=!1,errorMessage:l="",prefixIcon:c,suffixIcon:u,separator:f,suffixButton:m,disabled:p=!1,control:b,name:N,rules:j,defaultValue:T,loading:w=!1,className:y,...E}){const M=v.useId(),[F,B]=v.useState(!1),X=r||M,S=t==="password",P=c??(t==="number"?qn:void 0),R=S?F?Bn:ls:u,V=L("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",xt[e],go[e],bo[e],o?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]","bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]","disabled:bg-[var(--color-ds-background-disabled)]","disabled:border-[var(--color-ds-border-muted)]","disabled:text-[var(--color-ds-text-disabled)]","disabled:cursor-not-allowed");return w?i.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!a&&n&&i.jsx("label",{htmlFor:X,className:L("pb-2",xt[e]),children:n}),i.jsx(qe,{width:"100%",height:yo[e],variant:"rect",className:"rounded-lg"}),i.jsx("div",{className:"min-h-[18px] w-full",children:i.jsx("span",{"aria-hidden":"true",children:" "})})]}):b&&N?i.jsx(Se,{name:N,control:b,rules:j,defaultValue:T,render:({field:H,fieldState:K})=>i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&i.jsx("label",{htmlFor:X,className:L("pb-2 text-[var(--color-ds-text-primary)]",xt[e]),children:n}),i.jsxs("div",{className:"relative flex items-center w-full",children:[P&&i.jsx("div",{className:L("absolute left-0 flex items-center h-full",zr[e]),children:i.jsx(Ce,{component:P,size:e,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...H,id:X,type:S?F?"text":"password":t,disabled:p,"aria-invalid":!!K.error,className:L(V,P&&"pl-9",R&&"pr-9",y),onInvalid:Q=>Q.preventDefault(),style:S&&!F?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&i.jsx("div",{className:"flex items-center h-full",children:f}),m&&i.jsx("div",{className:"flex items-center h-full pr-2",children:m}),R&&i.jsx("button",{type:"button",onClick:()=>B(Q=>!Q),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Ce,{component:R,size:e,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:K.error?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:K.error.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}):i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&i.jsx("label",{htmlFor:X,className:L("pb-2 text-[var(--color-ds-text-primary)]",xt[e]),children:n}),i.jsxs("div",{className:"relative flex items-center w-full",children:[P&&i.jsx("div",{className:L("absolute left-0 flex items-center h-full",zr[e]),children:i.jsx(Ce,{component:P,size:e,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...E,id:X,type:S?F?"text":"password":t,disabled:p,"aria-invalid":o,className:L(V,P&&"pl-9",R&&"pr-9",y),onInvalid:H=>H.preventDefault(),style:S&&!F?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&i.jsx("div",{className:"flex items-center h-full",children:f}),m&&i.jsx("div",{className:"flex items-center h-full",children:m}),R&&i.jsx("button",{type:"button",onClick:()=>B(H=>!H),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Ce,{component:R,size:e,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:o&&l?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}const vo={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Dt=400,gt=8,Ls=({children:r,size:t="sm",position:e="top",className:s})=>{const[n,a]=v.useState(!1),[o,l]=v.useState({x:0,y:0}),c=v.useRef(null),u=v.useId();v.useEffect(()=>{if(n&&c.current){const p=c.current.getBoundingClientRect();let b=0,N=0;switch(e){case"top":b=p.left+p.width/2-Dt/2,N=p.top-gt;break;case"bottom":b=p.left+p.width/2-Dt/2,N=p.bottom+gt;break;case"left":b=p.left-Dt-gt,N=p.top+p.height/2;break;case"right":b=p.right+gt,N=p.top+p.height/2;break}l({x:b,y:N})}},[n,e]);const f=()=>typeof r=="string"?i.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):i.jsx(i.Fragment,{children:r}),m=n?i.jsx("div",{id:u,role:"tooltip",className:L("fixed z-50 w-[250px] bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)] text-ds-sm rounded p-2 shadow-lg","pointer-events-none"),style:{top:`${o.y}px`,left:`${o.x}px`,transform:e==="left"||e==="right"?"translateY(-50%)":e==="top"?"translateY(-100%)":void 0},children:f()}):null;return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button","aria-describedby":u,ref:c,className:L("inline-flex items-center justify-center focus:outline-none",vo[t],"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:i.jsx(Hn,{className:"w-full h-full"})}),as.createPortal(m,document.body)]})};function wo({name:r,label:t,type:e="text",size:s="sm",width:n,placeholder:a,validation:o,loadingDefaults:l,disabled:c,info:u}){var T;const{control:f,formState:{errors:m}}=ct(),p=!!m[r],b=((T=m[r])==null?void 0:T.message)||"",N="relative",j=n??"w-full";return i.jsxs("div",{className:N,children:[i.jsx(Se,{name:r,control:f,rules:o,render:({field:w})=>i.jsx(Ot,{label:t,size:s,width:j,placeholder:a,hasError:p,errorMessage:b,loading:l,type:e,...w,disabled:c})}),u&&i.jsx(Ls,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:u})]})}const lr=v.memo(wo);lr.displayName="FormFieldInput";function ko({title:r,headerButtons:t,children:e,className:s}){return i.jsxs("div",{className:L("flex flex-col h-full",s),children:[i.jsxs("div",{className:"flex items-center justify-between py-4",children:[i.jsx("div",{className:`bg-[var(--color-ds-background-accent)] \r
22
+ <%s key={someKey} {...props} />`,B,q,ie,q),X[q+B]=!0)}if(q=null,L!==void 0&&(e(L),q=""+L),o(_)&&(e(_.key),q=""+_.key),"key"in _){L={};for(var de in _)de!=="key"&&(L[de]=_[de])}else L=_;return q&&l(L,typeof h=="function"?h.displayName||h.name||"Unknown":h),u(h,q,le,te,n(),L,pe,se)}function m(h){typeof h=="object"&&h!==null&&h.$$typeof===b&&h._store&&(h._store.validated=1)}var p=v,b=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),E=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),R=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=Object.prototype.hasOwnProperty,H=Array.isArray,K=console.createTask?console.createTask:function(){return null};p={"react-stack-bottom-frame":function(h){return h()}};var Q,re={},Y=p["react-stack-bottom-frame"].bind(p,a)(),x=K(s(a)),X={};st.Fragment=j,st.jsx=function(h,_,L,B,te){var le=1e4>R.recentlyCreatedOwnerStacks++;return f(h,_,L,!1,B,te,le?Error("react-stack-top-frame"):Y,le?K(s(h)):x)},st.jsxs=function(h,_,L,B,te){var le=1e4>R.recentlyCreatedOwnerStacks++;return f(h,_,L,!0,B,te,le?Error("react-stack-top-frame"):Y,le?K(s(h)):x)}}()),st}var vr;function Nn(){return vr||(vr=1,process.env.NODE_ENV==="production"?pt.exports=jn():pt.exports=En()),pt.exports}var i=Nn();function os(r){var t,e,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(t=0;t<n;t++)r[t]&&(e=os(r[t]))&&(s&&(s+=" "),s+=e)}else for(e in r)r[e]&&(s&&(s+=" "),s+=e);return s}function I(){for(var r,t,e=0,s="",n=arguments.length;e<n;e++)(r=arguments[e])&&(t=os(r))&&(s&&(s+=" "),s+=t);return s}const _n={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 Ce({component:r,size:t="sm",className:e,...s}){return i.jsx(r,{className:I(_n[t],e),"aria-hidden":s["aria-label"]?void 0:!0,...s})}const Sn="inline-flex items-center justify-center box-border font-[var(--font-primary)] font-medium rounded-lg transition focus:outline-none",Fn={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"},Tn={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"},Cn={sm:"h-6 w-6 p-0",md:"h-10 w-10 p-0",lg:"h-12 w-12 p-0"},On="disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-[var(--color-ds-background-disabled)] disabled:text-[var(--color-ds-text-on-accent)] disabled:ring-1 disabled:ring-inset disabled:ring-[var(--color-ds-border-muted)]";function $e({type:r="button",variant:t="primary",size:e="sm",width:s,disabled:n=!1,icon:a,iconPosition:o="left",ariaLabel:l,children:c,onClick:u,className:f}){const m=!!a,p=m&&!c,b=p?Cn[e]:Tn[e];return i.jsxs("button",{type:r,onClick:u,disabled:n,"aria-label":p?l:void 0,style:s?{width:s}:void 0,className:I(Sn,Fn[t],b,On,f,m&&c&&"gap-2"),children:[a&&o==="left"&&i.jsx(Ce,{component:a,size:e}),c,a&&o==="right"&&i.jsx(Ce,{component:a,size:e})]})}function An({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Mn=Z.forwardRef(An);function Rn({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const is=Z.forwardRef(Rn);function Vn({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const $n=Z.forwardRef(Vn);function Dn({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const In=Z.forwardRef(Dn);function Ln({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.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 Pn=Z.forwardRef(Ln);function zn({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.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 wr=Z.forwardRef(zn);function Un({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.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 Bn=Z.forwardRef(Un);function Wn({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.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"}),Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const ls=Z.forwardRef(Wn);function Zn({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.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 qn=Z.forwardRef(Zn);function Gn({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.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 Hn=Z.forwardRef(Gn);function Yn({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.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 Xn=Z.forwardRef(Yn);function Jn({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.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 Kn=Z.forwardRef(Jn);function Qn({title:r,titleId:t,...e},s){return Z.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":t},e),r?Z.createElement("title",{id:t},r):null,Z.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const tr=Z.forwardRef(Qn);function Bt({title:r,children:t,defaultOpen:e=!0,className:s}){const[n,a]=v.useState(e),o=v.useRef(null),l=v.useRef(null),[c,u]=v.useState(0),f=()=>{if(l.current){const m=l.current.scrollHeight;u(m)}};return v.useLayoutEffect(()=>{f()},[n]),v.useEffect(()=>{const m=l.current;if(!m)return;const p=new ResizeObserver(()=>{f()});return p.observe(m),()=>{p.disconnect()}},[]),i.jsxs("div",{className:I("flex flex-col w-full gap-3",s),children:[i.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:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"block w-1 h-5 bg-[var(--color-ds-background-accent)] rounded-sm"}),i.jsx("span",{className:"font-semibold text-[var(--color-ds-text-primary)]",children:r})]}),n?i.jsx(In,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"}):i.jsx(is,{className:"w-5 h-5 text-[var(--color-ds-text-primary)]"})]}),i.jsx("div",{className:"box-border w-full rounded-lg bg-[var(--color-ds-background-surface)] overflow-hidden",children:i.jsx("div",{className:"px-6",children:i.jsx("div",{ref:o,className:I("overflow-hidden transition-all duration-300 ease-in-out",n?"opacity-100":"opacity-0"),style:{maxHeight:n?`${c}px`:"0px"},children:i.jsx("div",{ref:l,className:"py-4",children:t})})})})]})}const rr="-",ea=r=>{const t=ra(r),{conflictingClassGroups:e,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:o=>{const l=o.split(rr);return l[0]===""&&l.length!==1&&l.shift(),cs(l,t)||ta(o)},getConflictingClassGroupIds:(o,l)=>{const c=e[o]||[];return l&&s[o]?[...c,...s[o]]:c}}},cs=(r,t)=>{var o;if(r.length===0)return t.classGroupId;const e=r[0],s=t.nextPart.get(e),n=s?cs(r.slice(1),s):void 0;if(n)return n;if(t.validators.length===0)return;const a=r.join(rr);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},kr=/^\[(.+)\]$/,ta=r=>{if(kr.test(r)){const t=kr.exec(r)[1],e=t==null?void 0:t.substring(0,t.indexOf(":"));if(e)return"arbitrary.."+e}},ra=r=>{const{theme:t,classGroups:e}=r,s={nextPart:new Map,validators:[]};for(const n in e)Wt(e[n],s,n,t);return s},Wt=(r,t,e,s)=>{r.forEach(n=>{if(typeof n=="string"){const a=n===""?t:jr(t,n);a.classGroupId=e;return}if(typeof n=="function"){if(sa(n)){Wt(n(s),t,e,s);return}t.validators.push({validator:n,classGroupId:e});return}Object.entries(n).forEach(([a,o])=>{Wt(o,jr(t,a),e,s)})})},jr=(r,t)=>{let e=r;return t.split(rr).forEach(s=>{e.nextPart.has(s)||e.nextPart.set(s,{nextPart:new Map,validators:[]}),e=e.nextPart.get(s)}),e},sa=r=>r.isThemeGetter,na=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,e=new Map,s=new Map;const n=(a,o)=>{e.set(a,o),t++,t>r&&(t=0,s=e,e=new Map)};return{get(a){let o=e.get(a);if(o!==void 0)return o;if((o=s.get(a))!==void 0)return n(a,o),o},set(a,o){e.has(a)?e.set(a,o):n(a,o)}}},Zt="!",qt=":",aa=qt.length,oa=r=>{const{prefix:t,experimentalParseClassName:e}=r;let s=n=>{const a=[];let o=0,l=0,c=0,u;for(let N=0;N<n.length;N++){let j=n[N];if(o===0&&l===0){if(j===qt){a.push(n.slice(c,N)),c=N+aa;continue}if(j==="/"){u=N;continue}}j==="["?o++:j==="]"?o--:j==="("?l++:j===")"&&l--}const f=a.length===0?n:n.substring(c),m=ia(f),p=m!==f,b=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:b}};if(t){const n=t+qt,a=s;s=o=>o.startsWith(n)?a(o.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(e){const n=s;s=a=>e({className:a,parseClassName:n})}return s},ia=r=>r.endsWith(Zt)?r.substring(0,r.length-1):r.startsWith(Zt)?r.substring(1):r,la=r=>{const t=Object.fromEntries(r.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const n=[];let a=[];return s.forEach(o=>{o[0]==="["||t[o]?(n.push(...a.sort(),o),a=[]):a.push(o)}),n.push(...a.sort()),n}},ca=r=>({cache:na(r.cacheSize),parseClassName:oa(r),sortModifiers:la(r),...ea(r)}),da=/\s+/,ua=(r,t)=>{const{parseClassName:e,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:a}=t,o=[],l=r.trim().split(da);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:m,modifiers:p,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:j}=e(f);if(m){c=f+(c.length>0?" "+c:c);continue}let T=!!j,w=s(T?N.substring(0,j):N);if(!w){if(!T){c=f+(c.length>0?" "+c:c);continue}if(w=s(N),!w){c=f+(c.length>0?" "+c:c);continue}T=!1}const y=a(p).join(":"),E=b?y+Zt:y,M=E+w;if(o.includes(M))continue;o.push(M);const F=n(w,T);for(let W=0;W<F.length;++W){const J=F[W];o.push(E+J)}c=f+(c.length>0?" "+c:c)}return c};function fa(){let r=0,t,e,s="";for(;r<arguments.length;)(t=arguments[r++])&&(e=ds(t))&&(s&&(s+=" "),s+=e);return s}const ds=r=>{if(typeof r=="string")return r;let t,e="";for(let s=0;s<r.length;s++)r[s]&&(t=ds(r[s]))&&(e&&(e+=" "),e+=t);return e};function ha(r,...t){let e,s,n,a=o;function o(c){const u=t.reduce((f,m)=>m(f),r());return e=ca(u),s=e.cache.get,n=e.cache.set,a=l,l(c)}function l(c){const u=s(c);if(u)return u;const f=ua(c,e);return n(c,f),f}return function(){return a(fa.apply(null,arguments))}}const he=r=>{const t=e=>e[r]||[];return t.isThemeGetter=!0,t},us=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ma=/^\d+\/\d+$/,pa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ga=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ba=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ya=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,He=r=>ma.test(r),ee=r=>!!r&&!Number.isNaN(Number(r)),Ie=r=>!!r&&Number.isInteger(Number(r)),$t=r=>r.endsWith("%")&&ee(r.slice(0,-1)),Ae=r=>pa.test(r),va=()=>!0,wa=r=>xa.test(r)&&!ga.test(r),hs=()=>!1,ka=r=>ba.test(r),ja=r=>ya.test(r),Ea=r=>!z(r)&&!U(r),Na=r=>Ke(r,xs,hs),z=r=>us.test(r),Ue=r=>Ke(r,gs,wa),Dt=r=>Ke(r,Ca,ee),Er=r=>Ke(r,ms,hs),_a=r=>Ke(r,ps,ja),xt=r=>Ke(r,bs,ka),U=r=>fs.test(r),nt=r=>Qe(r,gs),Sa=r=>Qe(r,Oa),Nr=r=>Qe(r,ms),Fa=r=>Qe(r,xs),Ta=r=>Qe(r,ps),gt=r=>Qe(r,bs,!0),Ke=(r,t,e)=>{const s=us.exec(r);return s?s[1]?t(s[1]):e(s[2]):!1},Qe=(r,t,e=!1)=>{const s=fs.exec(r);return s?s[1]?t(s[1]):e:!1},ms=r=>r==="position"||r==="percentage",ps=r=>r==="image"||r==="url",xs=r=>r==="length"||r==="size"||r==="bg-size",gs=r=>r==="length",Ca=r=>r==="number",Oa=r=>r==="family-name",bs=r=>r==="shadow",Aa=()=>{const r=he("color"),t=he("font"),e=he("text"),s=he("font-weight"),n=he("tracking"),a=he("leading"),o=he("breakpoint"),l=he("container"),c=he("spacing"),u=he("radius"),f=he("shadow"),m=he("inset-shadow"),p=he("text-shadow"),b=he("drop-shadow"),N=he("blur"),j=he("perspective"),T=he("aspect"),w=he("ease"),y=he("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...M(),U,z],W=()=>["auto","hidden","clip","visible","scroll"],J=()=>["auto","contain","none"],S=()=>[U,z,c],$=()=>[He,"full","auto",...S()],P=()=>[Ie,"none","subgrid",U,z],R=()=>["auto",{span:["full",Ie,U,z]},Ie,U,z],V=()=>[Ie,"auto",U,z],H=()=>["auto","min","max","fr",U,z],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],re=()=>["auto",...S()],Y=()=>[He,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],x=()=>[r,U,z],X=()=>[...M(),Nr,Er,{position:[U,z]}],h=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",Fa,Na,{size:[U,z]}],L=()=>[$t,nt,Ue],B=()=>["","none","full",u,U,z],te=()=>["",ee,nt,Ue],le=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[ee,$t,Nr,Er],q=()=>["","none",N,U,z],ie=()=>["none",ee,U,z],de=()=>["none",ee,U,z],ne=()=>[ee,U,z],je=()=>[He,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ae],breakpoint:[Ae],color:[va],container:[Ae],"drop-shadow":[Ae],ease:["in","out","in-out"],font:[Ea],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ae],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ae],shadow:[Ae],spacing:["px",ee],text:[Ae],"text-shadow":[Ae],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",He,z,U,T]}],container:["container"],columns:[{columns:[ee,z,U,l]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",U,z]}],basis:[{basis:[He,"full","auto",l,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,He,"auto","initial","none",z]}],grow:[{grow:["",ee,U,z]}],shrink:[{shrink:["",ee,U,z]}],order:[{order:[Ie,"first","last","none",U,z]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[l,"screen",...Y()]}],"min-w":[{"min-w":[l,"screen","none",...Y()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",e,nt,Ue]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,U,Dt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$t,z]}],"font-family":[{font:[Sa,z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,U,z]}],"line-clamp":[{"line-clamp":[ee,"none",U,Dt]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":["none",U,z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",U,z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:x()}],"text-color":[{text:x()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",U,Ue]}],"text-decoration-color":[{decoration:x()}],"underline-offset":[{"underline-offset":[ee,"auto",U,z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U,z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",U,z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:h()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ie,U,z],radial:["",U,z],conic:[Ie,U,z]},Ta,_a]}],"bg-color":[{bg:x()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:x()}],"gradient-via":[{via:x()}],"gradient-to":[{to:x()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:x()}],"border-color-x":[{"border-x":x()}],"border-color-y":[{"border-y":x()}],"border-color-s":[{"border-s":x()}],"border-color-e":[{"border-e":x()}],"border-color-t":[{"border-t":x()}],"border-color-r":[{"border-r":x()}],"border-color-b":[{"border-b":x()}],"border-color-l":[{"border-l":x()}],"divide-color":[{divide:x()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,U,z]}],"outline-w":[{outline:["",ee,nt,Ue]}],"outline-color":[{outline:x()}],shadow:[{shadow:["","none",f,gt,xt]}],"shadow-color":[{shadow:x()}],"inset-shadow":[{"inset-shadow":["none",m,gt,xt]}],"inset-shadow-color":[{"inset-shadow":x()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:x()}],"ring-offset-w":[{"ring-offset":[ee,Ue]}],"ring-offset-color":[{"ring-offset":x()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":x()}],"text-shadow":[{"text-shadow":["none",p,gt,xt]}],"text-shadow-color":[{"text-shadow":x()}],opacity:[{opacity:[ee,U,z]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":x()}],"mask-image-linear-to-color":[{"mask-linear-to":x()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":x()}],"mask-image-t-to-color":[{"mask-t-to":x()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":x()}],"mask-image-r-to-color":[{"mask-r-to":x()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":x()}],"mask-image-b-to-color":[{"mask-b-to":x()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":x()}],"mask-image-l-to-color":[{"mask-l-to":x()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":x()}],"mask-image-x-to-color":[{"mask-x-to":x()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":x()}],"mask-image-y-to-color":[{"mask-y-to":x()}],"mask-image-radial":[{"mask-radial":[U,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":x()}],"mask-image-radial-to-color":[{"mask-radial-to":x()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":x()}],"mask-image-conic-to-color":[{"mask-conic-to":x()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:h()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",U,z]}],filter:[{filter:["","none",U,z]}],blur:[{blur:q()}],brightness:[{brightness:[ee,U,z]}],contrast:[{contrast:[ee,U,z]}],"drop-shadow":[{"drop-shadow":["","none",b,gt,xt]}],"drop-shadow-color":[{"drop-shadow":x()}],grayscale:[{grayscale:["",ee,U,z]}],"hue-rotate":[{"hue-rotate":[ee,U,z]}],invert:[{invert:["",ee,U,z]}],saturate:[{saturate:[ee,U,z]}],sepia:[{sepia:["",ee,U,z]}],"backdrop-filter":[{"backdrop-filter":["","none",U,z]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[ee,U,z]}],"backdrop-contrast":[{"backdrop-contrast":[ee,U,z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,U,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,U,z]}],"backdrop-invert":[{"backdrop-invert":["",ee,U,z]}],"backdrop-opacity":[{"backdrop-opacity":[ee,U,z]}],"backdrop-saturate":[{"backdrop-saturate":[ee,U,z]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,U,z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",U,z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",U,z]}],ease:[{ease:["linear","initial",w,U,z]}],delay:[{delay:[ee,U,z]}],animate:[{animate:["none",y,U,z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,U,z]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[U,z,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:je()}],"translate-x":[{"translate-x":je()}],"translate-y":[{"translate-y":je()}],"translate-z":[{"translate-z":je()}],"translate-none":["translate-none"],accent:[{accent:x()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:x()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",U,z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",U,z]}],fill:[{fill:["none",...x()]}],"stroke-w":[{stroke:[ee,nt,Ue,Dt]}],stroke:[{stroke:["none",...x()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ma=ha(Aa);var dt=r=>r.type==="checkbox",Be=r=>r instanceof Date,ye=r=>r==null;const ys=r=>typeof r=="object";var fe=r=>!ye(r)&&!Array.isArray(r)&&ys(r)&&!Be(r),vs=r=>fe(r)&&r.target?dt(r.target)?r.target.checked:r.target.value:r,Ra=r=>r.substring(0,r.search(/\.\d+(\.|$)/))||r,ws=(r,t)=>r.has(Ra(t)),Va=r=>{const t=r.constructor&&r.constructor.prototype;return fe(t)&&t.hasOwnProperty("isPrototypeOf")},sr=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ge(r){let t;const e=Array.isArray(r),s=typeof FileList<"u"?r instanceof FileList:!1;if(r instanceof Date)t=new Date(r);else if(r instanceof Set)t=new Set(r);else if(!(sr&&(r instanceof Blob||s))&&(e||fe(r)))if(t=e?[]:{},!e&&!Va(r))t=r;else for(const n in r)r.hasOwnProperty(n)&&(t[n]=ge(r[n]));else return r;return t}var At=r=>Array.isArray(r)?r.filter(Boolean):[],ue=r=>r===void 0,A=(r,t,e)=>{if(!t||!fe(r))return e;const s=At(t.split(/[,[\].]+?/)).reduce((n,a)=>ye(n)?n:n[a],r);return ue(s)||s===r?ue(r[t])?e:r[t]:s},ke=r=>typeof r=="boolean",nr=r=>/^\w*$/.test(r),ks=r=>At(r.replace(/["|']|\]/g,"").split(/\.|\[/)),ae=(r,t,e)=>{let s=-1;const n=nr(t)?[t]:ks(t),a=n.length,o=a-1;for(;++s<a;){const l=n[s];let c=e;if(s!==o){const u=r[l];c=fe(u)||Array.isArray(u)?u:isNaN(+n[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;r[l]=c,r=r[l]}};const _t={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Me={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},js=v.createContext(null),ut=()=>v.useContext(js),$a=r=>{const{children:t,...e}=r;return v.createElement(js.Provider,{value:e},t)};var Es=(r,t,e,s=!0)=>{const n={defaultValues:t._defaultValues};for(const a in r)Object.defineProperty(n,a,{get:()=>{const o=a;return t._proxyFormState[o]!==_e.all&&(t._proxyFormState[o]=!s||_e.all),e&&(e[o]=!0),r[o]}});return n};const ar=typeof window<"u"?Z.useLayoutEffect:Z.useEffect;function Da(r){const t=ut(),{control:e=t.control,disabled:s,name:n,exact:a}=r||{},[o,l]=v.useState(e._formState),c=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return ar(()=>e._subscribe({name:n,formState:c.current,exact:a,callback:u=>{!s&&l({...e._formState,...u})}}),[n,s,a]),v.useEffect(()=>{c.current.isValid&&e._setValid(!0)},[e]),v.useMemo(()=>Es(o,e,c.current,!1),[o,e])}var Oe=r=>typeof r=="string",Ns=(r,t,e,s,n)=>Oe(r)?(s&&t.watch.add(r),A(e,r,n)):Array.isArray(r)?r.map(a=>(s&&t.watch.add(a),A(e,a))):(s&&(t.watchAll=!0),e);function or(r){const t=ut(),{control:e=t.control,name:s,defaultValue:n,disabled:a,exact:o}=r||{},l=v.useRef(n),[c,u]=v.useState(e._getWatch(s,l.current));return ar(()=>e._subscribe({name:s,formState:{values:!0},exact:o,callback:f=>!a&&u(Ns(s,e._names,f.values||e._formValues,!1,l.current))}),[s,e,a,o]),v.useEffect(()=>e._removeUnmounted()),c}function _s(r){const t=ut(),{name:e,disabled:s,control:n=t.control,shouldUnregister:a}=r,o=ws(n._names.array,e),l=or({control:n,name:e,defaultValue:A(n._formValues,e,A(n._defaultValues,e,r.defaultValue)),exact:!0}),c=Da({control:n,name:e,exact:!0}),u=v.useRef(r),f=v.useRef(n.register(e,{...r.rules,value:l,...ke(r.disabled)?{disabled:r.disabled}:{}})),m=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!A(c.errors,e)},isDirty:{enumerable:!0,get:()=>!!A(c.dirtyFields,e)},isTouched:{enumerable:!0,get:()=>!!A(c.touchedFields,e)},isValidating:{enumerable:!0,get:()=>!!A(c.validatingFields,e)},error:{enumerable:!0,get:()=>A(c.errors,e)}}),[c,e]),p=v.useCallback(T=>f.current.onChange({target:{value:vs(T),name:e},type:_t.CHANGE}),[e]),b=v.useCallback(()=>f.current.onBlur({target:{value:A(n._formValues,e),name:e},type:_t.BLUR}),[e,n._formValues]),N=v.useCallback(T=>{const w=A(n._fields,e);w&&T&&(w._f.ref={focus:()=>T.focus(),select:()=>T.select(),setCustomValidity:y=>T.setCustomValidity(y),reportValidity:()=>T.reportValidity()})},[n._fields,e]),j=v.useMemo(()=>({name:e,value:l,...ke(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:p,onBlur:b,ref:N}),[e,s,c.disabled,p,b,N,l]);return v.useEffect(()=>{const T=n._options.shouldUnregister||a;n.register(e,{...u.current.rules,...ke(u.current.disabled)?{disabled:u.current.disabled}:{}});const w=(y,E)=>{const M=A(n._fields,y);M&&M._f&&(M._f.mount=E)};if(w(e,!0),T){const y=ge(A(n._options.defaultValues,e));ae(n._defaultValues,e,y),ue(A(n._formValues,e))&&ae(n._formValues,e,y)}return!o&&n.register(e),()=>{(o?T&&!n._state.action:T)?n.unregister(e):w(e,!1)}},[e,n,o,a]),v.useEffect(()=>{n._setDisabledField({disabled:s,name:e})},[s,e,n]),v.useMemo(()=>({field:j,formState:c,fieldState:m}),[j,c,m])}const Fe=r=>r.render(_s(r));var Ss=(r,t,e,s,n)=>t?{...e[r],types:{...e[r]&&e[r].types?e[r].types:{},[s]:n||!0}}:{},it=r=>Array.isArray(r)?r:[r],_r=()=>{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=[]}}},Gt=r=>ye(r)||!ys(r);function Pe(r,t){if(Gt(r)||Gt(t))return r===t;if(Be(r)&&Be(t))return r.getTime()===t.getTime();const e=Object.keys(r),s=Object.keys(t);if(e.length!==s.length)return!1;for(const n of e){const a=r[n];if(!s.includes(n))return!1;if(n!=="ref"){const o=t[n];if(Be(a)&&Be(o)||fe(a)&&fe(o)||Array.isArray(a)&&Array.isArray(o)?!Pe(a,o):a!==o)return!1}}return!0}var be=r=>fe(r)&&!Object.keys(r).length,ir=r=>r.type==="file",Se=r=>typeof r=="function",St=r=>{if(!sr)return!1;const t=r?r.ownerDocument:0;return r instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Fs=r=>r.type==="select-multiple",lr=r=>r.type==="radio",Ia=r=>lr(r)||dt(r),It=r=>St(r)&&r.isConnected;function La(r,t){const e=t.slice(0,-1).length;let s=0;for(;s<e;)r=ue(r)?s++:r[t[s++]];return r}function Pa(r){for(const t in r)if(r.hasOwnProperty(t)&&!ue(r[t]))return!1;return!0}function me(r,t){const e=Array.isArray(t)?t:nr(t)?[t]:ks(t),s=e.length===1?r:La(r,e),n=e.length-1,a=e[n];return s&&delete s[a],n!==0&&(fe(s)&&be(s)||Array.isArray(s)&&Pa(s))&&me(r,e.slice(0,-1)),r}var Ts=r=>{for(const t in r)if(Se(r[t]))return!0;return!1};function Ft(r,t={}){const e=Array.isArray(r);if(fe(r)||e)for(const s in r)Array.isArray(r[s])||fe(r[s])&&!Ts(r[s])?(t[s]=Array.isArray(r[s])?[]:{},Ft(r[s],t[s])):ye(r[s])||(t[s]=!0);return t}function Cs(r,t,e){const s=Array.isArray(r);if(fe(r)||s)for(const n in r)Array.isArray(r[n])||fe(r[n])&&!Ts(r[n])?ue(t)||Gt(e[n])?e[n]=Array.isArray(r[n])?Ft(r[n],[]):{...Ft(r[n])}:Cs(r[n],ye(t)?{}:t[n],e[n]):e[n]=!Pe(r[n],t[n]);return e}var at=(r,t)=>Cs(r,t,Ft(t));const Sr={value:!1,isValid:!1},Fr={value:!0,isValid:!0};var Os=r=>{if(Array.isArray(r)){if(r.length>1){const t=r.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return r[0].checked&&!r[0].disabled?r[0].attributes&&!ue(r[0].attributes.value)?ue(r[0].value)||r[0].value===""?Fr:{value:r[0].value,isValid:!0}:Fr:Sr}return Sr},As=(r,{valueAsNumber:t,valueAsDate:e,setValueAs:s})=>ue(r)?r:t?r===""?NaN:r&&+r:e&&Oe(r)?new Date(r):s?s(r):r;const Tr={isValid:!1,value:null};var Ms=r=>Array.isArray(r)?r.reduce((t,e)=>e&&e.checked&&!e.disabled?{isValid:!0,value:e.value}:t,Tr):Tr;function Cr(r){const t=r.ref;return ir(t)?t.files:lr(t)?Ms(r.refs).value:Fs(t)?[...t.selectedOptions].map(({value:e})=>e):dt(t)?Os(r.refs).value:As(ue(t.value)?r.ref.value:t.value,r)}var za=(r,t,e,s)=>{const n={};for(const a of r){const o=A(t,a);o&&ae(n,a,o._f)}return{criteriaMode:e,names:[...r],fields:n,shouldUseNativeValidation:s}},Tt=r=>r instanceof RegExp,ot=r=>ue(r)?r:Tt(r)?r.source:fe(r)?Tt(r.value)?r.value.source:r.value:r,Or=r=>({isOnSubmit:!r||r===_e.onSubmit,isOnBlur:r===_e.onBlur,isOnChange:r===_e.onChange,isOnAll:r===_e.all,isOnTouch:r===_e.onTouched});const Ar="AsyncFunction";var Ua=r=>!!r&&!!r.validate&&!!(Se(r.validate)&&r.validate.constructor.name===Ar||fe(r.validate)&&Object.values(r.validate).find(t=>t.constructor.name===Ar)),Ba=r=>r.mount&&(r.required||r.min||r.max||r.maxLength||r.minLength||r.pattern||r.validate),Mr=(r,t,e)=>!e&&(t.watchAll||t.watch.has(r)||[...t.watch].some(s=>r.startsWith(s)&&/^\.\w+/.test(r.slice(s.length))));const lt=(r,t,e,s)=>{for(const n of e||Object.keys(r)){const a=A(r,n);if(a){const{_f:o,...l}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],n)&&!s)return!0;if(o.ref&&t(o.ref,o.name)&&!s)return!0;if(lt(l,t))break}else if(fe(l)&&lt(l,t))break}}};function Rr(r,t,e){const s=A(r,e);if(s||nr(e))return{error:s,name:e};const n=e.split(".");for(;n.length;){const a=n.join("."),o=A(t,a),l=A(r,a);if(o&&!Array.isArray(o)&&e!==a)return{name:e};if(l&&l.type)return{name:a,error:l};n.pop()}return{name:e}}var Wa=(r,t,e,s)=>{e(r);const{name:n,...a}=r;return be(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!s||_e.all))},Za=(r,t,e)=>!r||!t||r===t||it(r).some(s=>s&&(e?s===t:s.startsWith(t)||t.startsWith(s))),qa=(r,t,e,s,n)=>n.isOnAll?!1:!e&&n.isOnTouch?!(t||r):(e?s.isOnBlur:n.isOnBlur)?!r:(e?s.isOnChange:n.isOnChange)?r:!0,Ga=(r,t)=>!At(A(r,t)).length&&me(r,t),Ha=(r,t,e)=>{const s=it(A(r,e));return ae(s,"root",t[e]),ae(r,e,s),r},jt=r=>Oe(r);function Vr(r,t,e="validate"){if(jt(r)||Array.isArray(r)&&r.every(jt)||ke(r)&&!r)return{type:e,message:jt(r)?r:"",ref:t}}var Ye=r=>fe(r)&&!Tt(r)?r:{value:r,message:""},$r=async(r,t,e,s,n,a)=>{const{ref:o,refs:l,required:c,maxLength:u,minLength:f,min:m,max:p,pattern:b,validate:N,name:j,valueAsNumber:T,mount:w}=r._f,y=A(e,j);if(!w||t.has(j))return{};const E=l?l[0]:o,M=V=>{n&&E.reportValidity&&(E.setCustomValidity(ke(V)?"":V||""),E.reportValidity())},F={},W=lr(o),J=dt(o),S=W||J,$=(T||ir(o))&&ue(o.value)&&ue(y)||St(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,P=Ss.bind(null,j,s,F),R=(V,H,K,Q=Me.maxLength,re=Me.minLength)=>{const Y=V?H:K;F[j]={type:V?Q:re,message:Y,ref:o,...P(V?Q:re,Y)}};if(a?!Array.isArray(y)||!y.length:c&&(!S&&($||ye(y))||ke(y)&&!y||J&&!Os(l).isValid||W&&!Ms(l).isValid)){const{value:V,message:H}=jt(c)?{value:!!c,message:c}:Ye(c);if(V&&(F[j]={type:Me.required,message:H,ref:E,...P(Me.required,H)},!s))return M(H),F}if(!$&&(!ye(m)||!ye(p))){let V,H;const K=Ye(p),Q=Ye(m);if(!ye(y)&&!isNaN(y)){const re=o.valueAsNumber||y&&+y;ye(K.value)||(V=re>K.value),ye(Q.value)||(H=re<Q.value)}else{const re=o.valueAsDate||new Date(y),Y=h=>new Date(new Date().toDateString()+" "+h),x=o.type=="time",X=o.type=="week";Oe(K.value)&&y&&(V=x?Y(y)>Y(K.value):X?y>K.value:re>new Date(K.value)),Oe(Q.value)&&y&&(H=x?Y(y)<Y(Q.value):X?y<Q.value:re<new Date(Q.value))}if((V||H)&&(R(!!V,K.message,Q.message,Me.max,Me.min),!s))return M(F[j].message),F}if((u||f)&&!$&&(Oe(y)||a&&Array.isArray(y))){const V=Ye(u),H=Ye(f),K=!ye(V.value)&&y.length>+V.value,Q=!ye(H.value)&&y.length<+H.value;if((K||Q)&&(R(K,V.message,H.message),!s))return M(F[j].message),F}if(b&&!$&&Oe(y)){const{value:V,message:H}=Ye(b);if(Tt(V)&&!y.match(V)&&(F[j]={type:Me.pattern,message:H,ref:o,...P(Me.pattern,H)},!s))return M(H),F}if(N){if(Se(N)){const V=await N(y,e),H=Vr(V,E);if(H&&(F[j]={...H,...P(Me.validate,H.message)},!s))return M(H.message),F}else if(fe(N)){let V={};for(const H in N){if(!be(V)&&!s)break;const K=Vr(await N[H](y,e),E,H);K&&(V={...K,...P(H,K.message)},M(K.message),s&&(F[j]=V))}if(!be(V)&&(F[j]={ref:E,...V},!s))return F}}return M(!0),F};const Ya={mode:_e.onSubmit,reValidateMode:_e.onChange,shouldFocusError:!0};function Xa(r={}){let t={...Ya,...r},e={submitCount:0,isDirty:!1,isReady:!1,isLoading:Se(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const s={};let n=fe(t.defaultValues)||fe(t.values)?ge(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:ge(n),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...f};const p={array:_r(),state:_r()},b=t.criteriaMode===_e.all,N=d=>g=>{clearTimeout(u),u=setTimeout(d,g)},j=async d=>{if(!t.disabled&&(f.isValid||m.isValid||d)){const g=t.resolver?be((await J()).errors):await $(s,!0);g!==e.isValid&&p.state.next({isValid:g})}},T=(d,g)=>{!t.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((d||Array.from(l.mount)).forEach(k=>{k&&(g?ae(e.validatingFields,k,g):me(e.validatingFields,k))}),p.state.next({validatingFields:e.validatingFields,isValidating:!be(e.validatingFields)}))},w=(d,g=[],k,D,O=!0,C=!0)=>{if(D&&k&&!t.disabled){if(o.action=!0,C&&Array.isArray(A(s,d))){const G=k(A(s,d),D.argA,D.argB);O&&ae(s,d,G)}if(C&&Array.isArray(A(e.errors,d))){const G=k(A(e.errors,d),D.argA,D.argB);O&&ae(e.errors,d,G),Ga(e.errors,d)}if((f.touchedFields||m.touchedFields)&&C&&Array.isArray(A(e.touchedFields,d))){const G=k(A(e.touchedFields,d),D.argA,D.argB);O&&ae(e.touchedFields,d,G)}(f.dirtyFields||m.dirtyFields)&&(e.dirtyFields=at(n,a)),p.state.next({name:d,isDirty:R(d,g),dirtyFields:e.dirtyFields,errors:e.errors,isValid:e.isValid})}else ae(a,d,g)},y=(d,g)=>{ae(e.errors,d,g),p.state.next({errors:e.errors})},E=d=>{e.errors=d,p.state.next({errors:e.errors,isValid:!1})},M=(d,g,k,D)=>{const O=A(s,d);if(O){const C=A(a,d,ue(k)?A(n,d):k);ue(C)||D&&D.defaultChecked||g?ae(a,d,g?C:Cr(O._f)):K(d,C),o.mount&&j()}},F=(d,g,k,D,O)=>{let C=!1,G=!1;const oe={name:d};if(!t.disabled){if(!k||D){(f.isDirty||m.isDirty)&&(G=e.isDirty,e.isDirty=oe.isDirty=R(),C=G!==oe.isDirty);const ce=Pe(A(n,d),g);G=!!A(e.dirtyFields,d),ce?me(e.dirtyFields,d):ae(e.dirtyFields,d,!0),oe.dirtyFields=e.dirtyFields,C=C||(f.dirtyFields||m.dirtyFields)&&G!==!ce}if(k){const ce=A(e.touchedFields,d);ce||(ae(e.touchedFields,d,k),oe.touchedFields=e.touchedFields,C=C||(f.touchedFields||m.touchedFields)&&ce!==k)}C&&O&&p.state.next(oe)}return C?oe:{}},W=(d,g,k,D)=>{const O=A(e.errors,d),C=(f.isValid||m.isValid)&&ke(g)&&e.isValid!==g;if(t.delayError&&k?(c=N(()=>y(d,k)),c(t.delayError)):(clearTimeout(u),c=null,k?ae(e.errors,d,k):me(e.errors,d)),(k?!Pe(O,k):O)||!be(D)||C){const G={...D,...C&&ke(g)?{isValid:g}:{},errors:e.errors,name:d};e={...e,...G},p.state.next(G)}},J=async d=>{T(d,!0);const g=await t.resolver(a,t.context,za(d||l.mount,s,t.criteriaMode,t.shouldUseNativeValidation));return T(d),g},S=async d=>{const{errors:g}=await J(d);if(d)for(const k of d){const D=A(g,k);D?ae(e.errors,k,D):me(e.errors,k)}else e.errors=g;return g},$=async(d,g,k={valid:!0})=>{for(const D in d){const O=d[D];if(O){const{_f:C,...G}=O;if(C){const oe=l.array.has(C.name),ce=O._f&&Ua(O._f);ce&&f.validatingFields&&T([D],!0);const Ee=await $r(O,l.disabled,a,b,t.shouldUseNativeValidation&&!g,oe);if(ce&&f.validatingFields&&T([D]),Ee[C.name]&&(k.valid=!1,g))break;!g&&(A(Ee,C.name)?oe?Ha(e.errors,Ee,C.name):ae(e.errors,C.name,Ee[C.name]):me(e.errors,C.name))}!be(G)&&await $(G,g,k)}}return k.valid},P=()=>{for(const d of l.unMount){const g=A(s,d);g&&(g._f.refs?g._f.refs.every(k=>!It(k)):!It(g._f.ref))&&se(d)}l.unMount=new Set},R=(d,g)=>!t.disabled&&(d&&g&&ae(a,d,g),!Pe(h(),n)),V=(d,g,k)=>Ns(d,l,{...o.mount?a:ue(g)?n:Oe(d)?{[d]:g}:g},k,g),H=d=>At(A(o.mount?a:n,d,t.shouldUnregister?A(n,d,[]):[])),K=(d,g,k={})=>{const D=A(s,d);let O=g;if(D){const C=D._f;C&&(!C.disabled&&ae(a,d,As(g,C)),O=St(C.ref)&&ye(g)?"":g,Fs(C.ref)?[...C.ref.options].forEach(G=>G.selected=O.includes(G.value)):C.refs?dt(C.ref)?C.refs.forEach(G=>{(!G.defaultChecked||!G.disabled)&&(Array.isArray(O)?G.checked=!!O.find(oe=>oe===G.value):G.checked=O===G.value||!!O)}):C.refs.forEach(G=>G.checked=G.value===O):ir(C.ref)?C.ref.value="":(C.ref.value=O,C.ref.type||p.state.next({name:d,values:ge(a)})))}(k.shouldDirty||k.shouldTouch)&&F(d,O,k.shouldTouch,k.shouldDirty,!0),k.shouldValidate&&X(d)},Q=(d,g,k)=>{for(const D in g){if(!g.hasOwnProperty(D))return;const O=g[D],C=`${d}.${D}`,G=A(s,C);(l.array.has(d)||fe(O)||G&&!G._f)&&!Be(O)?Q(C,O,k):K(C,O,k)}},re=(d,g,k={})=>{const D=A(s,d),O=l.array.has(d),C=ge(g);ae(a,d,C),O?(p.array.next({name:d,values:ge(a)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&k.shouldDirty&&p.state.next({name:d,dirtyFields:at(n,a),isDirty:R(d,C)})):D&&!D._f&&!ye(C)?Q(d,C,k):K(d,C,k),Mr(d,l)&&p.state.next({...e}),p.state.next({name:o.mount?d:void 0,values:ge(a)})},Y=async d=>{o.mount=!0;const g=d.target;let k=g.name,D=!0;const O=A(s,k),C=ce=>{D=Number.isNaN(ce)||Be(ce)&&isNaN(ce.getTime())||Pe(ce,A(a,k,ce))},G=Or(t.mode),oe=Or(t.reValidateMode);if(O){let ce,Ee;const mt=g.type?Cr(O._f):vs(d),De=d.type===_t.BLUR||d.type===_t.FOCUS_OUT,bn=!Ba(O._f)&&!t.resolver&&!A(e.errors,k)&&!O._f.deps||qa(De,A(e.touchedFields,k),e.isSubmitted,oe,G),Rt=Mr(k,l,De);ae(a,k,mt),De?(O._f.onBlur&&O._f.onBlur(d),c&&c(0)):O._f.onChange&&O._f.onChange(d);const Vt=F(k,mt,De),yn=!be(Vt)||Rt;if(!De&&p.state.next({name:k,type:d.type,values:ge(a)}),bn)return(f.isValid||m.isValid)&&(t.mode==="onBlur"?De&&j():De||j()),yn&&p.state.next({name:k,...Rt?{}:Vt});if(!De&&Rt&&p.state.next({...e}),t.resolver){const{errors:xr}=await J([k]);if(C(mt),D){const vn=Rr(e.errors,s,k),gr=Rr(xr,s,vn.name||k);ce=gr.error,k=gr.name,Ee=be(xr)}}else T([k],!0),ce=(await $r(O,l.disabled,a,b,t.shouldUseNativeValidation))[k],T([k]),C(mt),D&&(ce?Ee=!1:(f.isValid||m.isValid)&&(Ee=await $(s,!0)));D&&(O._f.deps&&X(O._f.deps),W(k,Ee,ce,Vt))}},x=(d,g)=>{if(A(e.errors,g)&&d.focus)return d.focus(),1},X=async(d,g={})=>{let k,D;const O=it(d);if(t.resolver){const C=await S(ue(d)?d:O);k=be(C),D=d?!O.some(G=>A(C,G)):k}else d?(D=(await Promise.all(O.map(async C=>{const G=A(s,C);return await $(G&&G._f?{[C]:G}:G)}))).every(Boolean),!(!D&&!e.isValid)&&j()):D=k=await $(s);return p.state.next({...!Oe(d)||(f.isValid||m.isValid)&&k!==e.isValid?{}:{name:d},...t.resolver||!d?{isValid:k}:{},errors:e.errors}),g.shouldFocus&&!D&&lt(s,x,d?O:l.mount),D},h=d=>{const g={...o.mount?a:n};return ue(d)?g:Oe(d)?A(g,d):d.map(k=>A(g,k))},_=(d,g)=>({invalid:!!A((g||e).errors,d),isDirty:!!A((g||e).dirtyFields,d),error:A((g||e).errors,d),isValidating:!!A(e.validatingFields,d),isTouched:!!A((g||e).touchedFields,d)}),L=d=>{d&&it(d).forEach(g=>me(e.errors,g)),p.state.next({errors:d?e.errors:{}})},B=(d,g,k)=>{const D=(A(s,d,{_f:{}})._f||{}).ref,O=A(e.errors,d)||{},{ref:C,message:G,type:oe,...ce}=O;ae(e.errors,d,{...ce,...g,ref:D}),p.state.next({name:d,errors:e.errors,isValid:!1}),k&&k.shouldFocus&&D&&D.focus&&D.focus()},te=(d,g)=>Se(d)?p.state.subscribe({next:k=>d(V(void 0,g),k)}):V(d,g,!0),le=d=>p.state.subscribe({next:g=>{Za(d.name,g.name,d.exact)&&Wa(g,d.formState||f,gn,d.reRenderRoot)&&d.callback({values:{...a},...e,...g})}}).unsubscribe,pe=d=>(o.mount=!0,m={...m,...d.formState},le({...d,formState:m})),se=(d,g={})=>{for(const k of d?it(d):l.mount)l.mount.delete(k),l.array.delete(k),g.keepValue||(me(s,k),me(a,k)),!g.keepError&&me(e.errors,k),!g.keepDirty&&me(e.dirtyFields,k),!g.keepTouched&&me(e.touchedFields,k),!g.keepIsValidating&&me(e.validatingFields,k),!t.shouldUnregister&&!g.keepDefaultValue&&me(n,k);p.state.next({values:ge(a)}),p.state.next({...e,...g.keepDirty?{isDirty:R()}:{}}),!g.keepIsValid&&j()},q=({disabled:d,name:g})=>{(ke(d)&&o.mount||d||l.disabled.has(g))&&(d?l.disabled.add(g):l.disabled.delete(g))},ie=(d,g={})=>{let k=A(s,d);const D=ke(g.disabled)||ke(t.disabled);return ae(s,d,{...k||{},_f:{...k&&k._f?k._f:{ref:{name:d}},name:d,mount:!0,...g}}),l.mount.add(d),k?q({disabled:ke(g.disabled)?g.disabled:t.disabled,name:d}):M(d,!0,g.value),{...D?{disabled:g.disabled||t.disabled}:{},...t.progressive?{required:!!g.required,min:ot(g.min),max:ot(g.max),minLength:ot(g.minLength),maxLength:ot(g.maxLength),pattern:ot(g.pattern)}:{},name:d,onChange:Y,onBlur:Y,ref:O=>{if(O){ie(d,g),k=A(s,d);const C=ue(O.value)&&O.querySelectorAll&&O.querySelectorAll("input,select,textarea")[0]||O,G=Ia(C),oe=k._f.refs||[];if(G?oe.find(ce=>ce===C):C===k._f.ref)return;ae(s,d,{_f:{...k._f,...G?{refs:[...oe.filter(It),C,...Array.isArray(A(n,d))?[{}]:[]],ref:{type:C.type,name:d}}:{ref:C}}}),M(d,!1,void 0,C)}else k=A(s,d,{}),k._f&&(k._f.mount=!1),(t.shouldUnregister||g.shouldUnregister)&&!(ws(l.array,d)&&o.action)&&l.unMount.add(d)}}},de=()=>t.shouldFocusError&&lt(s,x,l.mount),ne=d=>{ke(d)&&(p.state.next({disabled:d}),lt(s,(g,k)=>{const D=A(s,k);D&&(g.disabled=D._f.disabled||d,Array.isArray(D._f.refs)&&D._f.refs.forEach(O=>{O.disabled=D._f.disabled||d}))},0,!1))},je=(d,g)=>async k=>{let D;k&&(k.preventDefault&&k.preventDefault(),k.persist&&k.persist());let O=ge(a);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:C,values:G}=await J();e.errors=C,O=G}else await $(s);if(l.disabled.size)for(const C of l.disabled)ae(O,C,void 0);if(me(e.errors,"root"),be(e.errors)){p.state.next({errors:{}});try{await d(O,k)}catch(C){D=C}}else g&&await g({...e.errors},k),de(),setTimeout(de);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:be(e.errors)&&!D,submitCount:e.submitCount+1,errors:e.errors}),D)throw D},ht=(d,g={})=>{A(s,d)&&(ue(g.defaultValue)?re(d,ge(A(n,d))):(re(d,g.defaultValue),ae(n,d,ge(g.defaultValue))),g.keepTouched||me(e.touchedFields,d),g.keepDirty||(me(e.dirtyFields,d),e.isDirty=g.defaultValue?R(d,ge(A(n,d))):R()),g.keepError||(me(e.errors,d),f.isValid&&j()),p.state.next({...e}))},et=(d,g={})=>{const k=d?ge(d):n,D=ge(k),O=be(d),C=O?n:D;if(g.keepDefaultValues||(n=k),!g.keepValues){if(g.keepDirtyValues){const G=new Set([...l.mount,...Object.keys(at(n,a))]);for(const oe of Array.from(G))A(e.dirtyFields,oe)?ae(C,oe,A(a,oe)):re(oe,A(C,oe))}else{if(sr&&ue(d))for(const G of l.mount){const oe=A(s,G);if(oe&&oe._f){const ce=Array.isArray(oe._f.refs)?oe._f.refs[0]:oe._f.ref;if(St(ce)){const Ee=ce.closest("form");if(Ee){Ee.reset();break}}}}for(const G of l.mount)re(G,A(C,G))}a=ge(C),p.array.next({values:{...C}}),p.state.next({values:{...C}})}l={mount:g.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!g.keepIsValid||!!g.keepDirtyValues,o.watch=!!t.shouldUnregister,p.state.next({submitCount:g.keepSubmitCount?e.submitCount:0,isDirty:O?!1:g.keepDirty?e.isDirty:!!(g.keepDefaultValues&&!Pe(d,n)),isSubmitted:g.keepIsSubmitted?e.isSubmitted:!1,dirtyFields:O?{}:g.keepDirtyValues?g.keepDefaultValues&&a?at(n,a):e.dirtyFields:g.keepDefaultValues&&d?at(n,d):g.keepDirty?e.dirtyFields:{},touchedFields:g.keepTouched?e.touchedFields:{},errors:g.keepErrors?e.errors:{},isSubmitSuccessful:g.keepIsSubmitSuccessful?e.isSubmitSuccessful:!1,isSubmitting:!1})},tt=(d,g)=>et(Se(d)?d(a):d,g),xn=(d,g={})=>{const k=A(s,d),D=k&&k._f;if(D){const O=D.refs?D.refs[0]:D.ref;O.focus&&(O.focus(),g.shouldSelect&&Se(O.select)&&O.select())}},gn=d=>{e={...e,...d}},pr={control:{register:ie,unregister:se,getFieldState:_,handleSubmit:je,setError:B,_subscribe:le,_runSchema:J,_getWatch:V,_getDirty:R,_setValid:j,_setFieldArray:w,_setDisabledField:q,_setErrors:E,_getFieldArray:H,_reset:et,_resetDefaultValues:()=>Se(t.defaultValues)&&t.defaultValues().then(d=>{tt(d,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:P,_disableForm:ne,_subjects:p,_proxyFormState:f,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(d){o=d},get _defaultValues(){return n},get _names(){return l},set _names(d){l=d},get _formState(){return e},get _options(){return t},set _options(d){t={...t,...d}}},subscribe:pe,trigger:X,register:ie,handleSubmit:je,watch:te,setValue:re,getValues:h,reset:tt,resetField:ht,clearErrors:L,unregister:se,setError:B,setFocus:xn,getFieldState:_};return{...pr,formControl:pr}}function Ja(r={}){const t=v.useRef(void 0),e=v.useRef(void 0),[s,n]=v.useState({isDirty:!1,isValidating:!1,isLoading:Se(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:Se(r.defaultValues)?void 0:r.defaultValues});t.current||(t.current={...r.formControl?r.formControl:Xa(r),formState:s},r.formControl&&r.defaultValues&&!Se(r.defaultValues)&&r.formControl.reset(r.defaultValues,r.resetOptions));const a=t.current.control;return a._options=r,ar(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(l=>({...l,isReady:!0})),a._formState.isReady=!0,o},[a]),v.useEffect(()=>a._disableForm(r.disabled),[a,r.disabled]),v.useEffect(()=>{r.mode&&(a._options.mode=r.mode),r.reValidateMode&&(a._options.reValidateMode=r.reValidateMode),r.errors&&!be(r.errors)&&a._setErrors(r.errors)},[a,r.errors,r.mode,r.reValidateMode]),v.useEffect(()=>{r.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,r.shouldUnregister]),v.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==s.isDirty&&a._subjects.state.next({isDirty:o})}},[a,s.isDirty]),v.useEffect(()=>{r.values&&!Pe(r.values,e.current)?(a._reset(r.values,a._options.resetOptions),e.current=r.values,n(o=>({...o}))):a._resetDefaultValues()},[a,r.values]),v.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()}),t.current.formState=Es(s,a),t.current}const Rs={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},Ka={sm:"h-6",md:"h-10",lg:"h-12"},Qa={sm:"px-2",md:"px-2.5",lg:"px-3"};function Dr(r,t,e,s,n,a,o){const l=t?"datetime-local":"date",c=I("box-border w-full rounded-lg border outline-none transition font-[var(--font-primary)]",Rs[e],Ka[e],Qa[e],a?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]"),m=Ma(c,n?"bg-[var(--color-ds-background-disabled)] border-[var(--color-ds-border-muted)] text-[var(--color-ds-text-disabled)] cursor-not-allowed opacity-60":"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",o);return i.jsxs(i.Fragment,{children:[i.jsx("input",{id:r,type:l,disabled:n,"aria-disabled":n,"data-disabled":n?"true":"false",...s,className:m}),i.jsx("div",{children:a!=null&&a.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Vs(r){const{control:t,name:e,rules:s,defaultValue:n,showTime:a=!1,size:o="sm",width:l="100%",label:c,labelHidden:u=!1,hasError:f=!1,errorMessage:m="",disabled:p=!1,className:b,onChange:N}=r,j=v.useId(),T=e||j;return i.jsxs("div",{className:I("flex flex-col",b),style:{width:l,maxWidth:"100%"},children:[c&&i.jsx("label",{htmlFor:T,className:I("pb-2 text-[var(--color-ds-text-primary)]",Rs[o],u&&"sr-only"),children:c}),t&&e?i.jsx(Fe,{name:e,control:t,rules:s,defaultValue:n,render:({field:w,fieldState:y})=>Dr(T,a,o,{value:w.value,onChange:w.onChange,onBlur:w.onBlur},p,y.error,b)}):Dr(T,a,o,{defaultValue:n,onChange:N},p,f?{message:m}:void 0,b)]})}const eo=({trigger:r,items:t,align:e="left",className:s})=>{const[n,a]=v.useState(!1),o=v.useRef(null),l=v.useRef([]);v.useEffect(()=>{const u=f=>{o.current&&!o.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const c=u=>{var m,p;const f=l.current.findIndex(b=>b===document.activeElement);if(u.key==="Escape")a(!1);else if(u.key==="ArrowDown"){u.preventDefault();const b=(f+1)%t.length;(m=l.current[b])==null||m.focus()}else if(u.key==="ArrowUp"){u.preventDefault();const b=(f-1+t.length)%t.length;(p=l.current[b])==null||p.focus()}};return i.jsxs("div",{className:I("relative inline-block",s),ref:o,children:[i.jsx("button",{type:"button",onClick:()=>a(u=>!u),className:"inline-flex items-center focus:outline-none","aria-haspopup":"menu","aria-expanded":n,children:r}),n&&i.jsx("div",{role:"menu","aria-orientation":"vertical",className:I("absolute mt-2 min-w-[160px] bg-[var(--color-ds-background-page)]","border border-[var(--color-ds-border-muted)] rounded shadow-lg z-10",e==="right"?"right-0":"left-0"),onKeyDown:c,children:t.map((u,f)=>{const{label:m,onSelect:p,disabled:b,icon:N}=u;return i.jsxs("button",{role:"menuitem",type:"button",disabled:b,ref:j=>{l.current[f]=j},className:I("w-full flex items-center px-4 py-2 text-[var(--color-ds-text-primary)] text-ds-md transition-colors",b?"opacity-50 cursor-not-allowed":"hover:bg-[var(--color-ds-background-surface)]"),onClick:()=>{b||(p(),a(!1))},children:[N&&i.jsx(N,{className:"w-5 h-5 mr-2 text-[var(--color-ds-text-secondary)]"}),m]},f)})})]})},to=(r,t,e,s)=>{var a,o,l,c;const n=[e,{code:t,...s||{}}];if((o=(a=r==null?void 0:r.services)==null?void 0:a.logger)!=null&&o.forward)return r.services.logger.forward(n,"warn","react-i18next::",!0);We(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)},Ir={},Ht=(r,t,e,s)=>{We(e)&&Ir[e]||(We(e)&&(Ir[e]=new Date),to(r,t,e,s))},$s=(r,t)=>()=>{if(r.isInitialized)t();else{const e=()=>{setTimeout(()=>{r.off("initialized",e)},0),t()};r.on("initialized",e)}},Yt=(r,t,e)=>{r.loadNamespaces(t,$s(r,e))},Lr=(r,t,e,s)=>{if(We(e)&&(e=[e]),r.options.preload&&r.options.preload.indexOf(t)>-1)return Yt(r,e,s);e.forEach(n=>{r.options.ns.indexOf(n)<0&&r.options.ns.push(n)}),r.loadLanguages(t,$s(r,s))},ro=(r,t,e={})=>!t.languages||!t.languages.length?(Ht(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(r,{lng:e.lng,precheck:(s,n)=>{var a;if(((a=e.bindI18n)==null?void 0:a.indexOf("languageChanging"))>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!n(s.isLanguageChangingTo,r))return!1}}),We=r=>typeof r=="string",so=r=>typeof r=="object"&&r!==null,no=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ao={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},oo=r=>ao[r],io=r=>r.replace(no,oo);let lo={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:io};const co=()=>lo;let uo;const fo=()=>uo,ho=v.createContext();class mo{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const po=(r,t)=>{const e=v.useRef();return v.useEffect(()=>{e.current=r},[r,t]),e.current},Ds=(r,t,e,s)=>r.getFixedT(t,e,s),xo=(r,t,e,s)=>v.useCallback(Ds(r,t,e,s),[r,t,e,s]),cr=(r,t={})=>{var M,F,W,J;const{i18n:e}=t,{i18n:s,defaultNS:n}=v.useContext(ho)||{},a=e||s||fo();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new mo),!a){Ht(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const S=(P,R)=>We(R)?R:so(R)&&We(R.defaultValue)?R.defaultValue:Array.isArray(P)?P[P.length-1]:P,$=[S,{},!1];return $.t=S,$.i18n={},$.ready=!1,$}(M=a.options.react)!=null&&M.wait&&Ht(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...co(),...a.options.react,...t},{useSuspense:l,keyPrefix:c}=o;let u=n||((F=a.options)==null?void 0:F.defaultNS);u=We(u)?[u]:u||["translation"],(J=(W=a.reportNamespaces).addUsedNamespaces)==null||J.call(W,u);const f=(a.isInitialized||a.initializedStoreOnce)&&u.every(S=>ro(S,a,o)),m=xo(a,t.lng||null,o.nsMode==="fallback"?u:u[0],c),p=()=>m,b=()=>Ds(a,t.lng||null,o.nsMode==="fallback"?u:u[0],c),[N,j]=v.useState(p);let T=u.join();t.lng&&(T=`${t.lng}${T}`);const w=po(T),y=v.useRef(!0);v.useEffect(()=>{const{bindI18n:S,bindI18nStore:$}=o;y.current=!0,!f&&!l&&(t.lng?Lr(a,t.lng,u,()=>{y.current&&j(b)}):Yt(a,u,()=>{y.current&&j(b)})),f&&w&&w!==T&&y.current&&j(b);const P=()=>{y.current&&j(b)};return S&&(a==null||a.on(S,P)),$&&(a==null||a.store.on($,P)),()=>{y.current=!1,a&&(S==null||S.split(" ").forEach(R=>a.off(R,P))),$&&a&&$.split(" ").forEach(R=>a.store.off(R,P))}},[a,T]),v.useEffect(()=>{y.current&&f&&j(p)},[a,c,f]);const E=[N,a,f];if(E.t=N,E.i18n=a,E.ready=f,f||!f&&!l)return E;throw new Promise(S=>{t.lng?Lr(a,t.lng,u,()=>S()):Yt(a,u,()=>S())})},Xt={sm:"text-sm",md:"text-base",lg:"text-lg"};function Pr(r,t,e,s,n,a,o,l,c){const{t:u}=cr(),f=v.useRef(null),m=typeof s=="number"&&t.length>=s,p=()=>{var y;!o&&!m&&((y=f.current)==null||y.click())},b=y=>{const E=y.target.files;if(!E)return;const M=Array.from(E);let F=t.concat(M);s&&(F=F.slice(0,s)),e(F),y.target.value=""},N=y=>{if(y.preventDefault(),o||m)return;const E=Array.from(y.dataTransfer.files);let M=t.concat(E);s&&(M=M.slice(0,s)),e(M)},j=y=>{y.preventDefault()},T=y=>{const E=URL.createObjectURL(y);window.open(E)},w=y=>{const E=t.filter((M,F)=>F!==y);e(E)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"self-start mb-4 w-auto",children:i.jsx($e,{type:"button",variant:"outline",size:a,icon:wr,onClick:p,disabled:o||m,children:u("ds.fileUploader.browse","Browse files")})}),!m&&i.jsxs("div",{className:I("relative flex bg-[var(--color-ds-background-page)] flex-col items-center justify-center border-2 border-dashed border-[var(--color-ds-border-muted)] rounded-lg p-4",o?"opacity-50 cursor-not-allowed":"hover:border-[var(--color-ds-border-default)]",Xt[a],c),onDrop:N,onDragOver:j,children:[i.jsx("input",{id:r,type:"file",ref:f,className:"hidden",multiple:s!==1,accept:n,onChange:b,disabled:o}),i.jsx(Ce,{component:Pn,size:"md",className:"w-8 h-8 text-[var(--color-ds-text-secondary)]"}),i.jsx("p",{className:"mt-3 text-[var(--color-ds-text-secondary)] text-center",children:u("ds.fileUploader.dragDrop","Drag & drop your files here or click to browse")})]}),t.length>0&&i.jsx("ul",{className:"mt-4 space-y-1",children:t.map((y,E)=>i.jsxs("li",{className:"flex items-center justify-between text-[var(--color-ds-text-secondary)] text-sm",children:[i.jsxs("div",{className:"flex items-center",children:[i.jsx(wr,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),i.jsx("span",{className:"truncate pr-2",children:y.name})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx($e,{variant:"ghost",size:"sm",icon:ls,ariaLabel:u("ds.fileUploader.view","View"),onClick:()=>T(y)}),i.jsx($e,{variant:"ghost",size:"sm",icon:tr,ariaLabel:u("ds.fileUploader.remove","Remove"),onClick:()=>w(E)})]})]},E))}),i.jsx("div",{className:"pt-[5px] min-h-[18px] w-full",children:l!=null&&l.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function Is(r){const{control:t,name:e,rules:s,defaultValue:n,maxFiles:a,accept:o,size:l="sm",width:c="100%",label:u,labelHidden:f=!1,disabled:m=!1,hasError:p=!1,errorMessage:b="",className:N}=r,j=v.useId(),T=e||j;if(t&&e)return i.jsxs("div",{className:I("flex flex-col",N),style:{width:c},children:[u&&i.jsx("label",{htmlFor:T,className:I("pb-[10px] text-[var(--color-ds-text-primary)]",Xt[l],f&&"sr-only"),children:u}),i.jsx(Fe,{name:e,control:t,rules:s,defaultValue:n instanceof FileList?Array.from(n):n||[],render:({field:E,fieldState:M})=>Pr(T,E.value,F=>E.onChange(F),a,o,l,m,M.error,N)})]});const[w,y]=v.useState(n instanceof FileList?Array.from(n):n||[]);return i.jsxs("div",{className:I("flex flex-col",N),style:{width:c},children:[u&&i.jsx("label",{htmlFor:T,className:I("pb-[10px] text-[var(--color-ds-text-primary)]",Xt[l],f&&"sr-only"),children:u}),Pr(T,w,y,a,o,l,m,p?{message:b}:void 0,N)]})}const qe=({count:r=1,width:t,height:e="1em",variant:s="rect",className:n})=>{const a=Array.from({length:r});return i.jsx(i.Fragment,{children:a.map((o,l)=>i.jsx("span",{role:"status","aria-label":"Cargando...",className:I("bg-[var(--color-ds-border-muted)] animate-pulse inline-block",s==="circle"?"rounded-full":"rounded",n),style:{width:t??"auto",height:e}},l))})},bt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},go={sm:"h-6",md:"h-10",lg:"h-12"},bo={sm:"px-2",md:"px-2.5",lg:"px-3"},zr={sm:"pl-2",md:"pl-2.5",lg:"pl-3"},yo={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Mt({id:r,type:t="text",size:e="sm",width:s="100%",label:n,labelHidden:a=!1,hasError:o=!1,errorMessage:l="",prefixIcon:c,suffixIcon:u,separator:f,suffixButton:m,disabled:p=!1,control:b,name:N,rules:j,defaultValue:T,loading:w=!1,className:y,...E}){const M=v.useId(),[F,W]=v.useState(!1),J=r||M,S=t==="password",P=c??(t==="number"?qn:void 0),R=S?F?Bn:ls:u,V=I("box-border w-full rounded-lg border placeholder-[var(--color-ds-text-secondary)] outline-none transition font-[var(--font-primary)] appearance-none",bt[e],go[e],bo[e],o?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]","bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]","disabled:bg-[var(--color-ds-background-disabled)]","disabled:border-[var(--color-ds-border-muted)]","disabled:text-[var(--color-ds-text-disabled)]","disabled:cursor-not-allowed");return w?i.jsxs("div",{className:"flex flex-col",style:{width:s,maxWidth:"100%"},children:[!a&&n&&i.jsx("label",{htmlFor:J,className:I("pb-2",bt[e]),children:n}),i.jsx(qe,{width:"100%",height:yo[e],variant:"rect",className:"rounded-lg"}),i.jsx("div",{className:"min-h-[18px] w-full",children:i.jsx("span",{"aria-hidden":"true",children:" "})})]}):b&&N?i.jsx(Fe,{name:N,control:b,rules:j,defaultValue:T,render:({field:H,fieldState:K})=>i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&i.jsx("label",{htmlFor:J,className:I("pb-2 text-[var(--color-ds-text-primary)]",bt[e]),children:n}),i.jsxs("div",{className:"relative flex items-center w-full",children:[P&&i.jsx("div",{className:I("absolute left-0 flex items-center h-full",zr[e]),children:i.jsx(Ce,{component:P,size:e,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...H,id:J,type:S?F?"text":"password":t,disabled:p,"aria-invalid":!!K.error,className:I(V,P&&"pl-9",R&&"pr-9",y),onInvalid:Q=>Q.preventDefault(),style:S&&!F?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&i.jsx("div",{className:"flex items-center h-full",children:f}),m&&i.jsx("div",{className:"flex items-center h-full pr-2",children:m}),R&&i.jsx("button",{type:"button",onClick:()=>W(Q=>!Q),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Ce,{component:R,size:e,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:K.error?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:K.error.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}):i.jsxs("div",{className:"flex flex-col",style:{width:s},children:[!a&&n&&i.jsx("label",{htmlFor:J,className:I("pb-2 text-[var(--color-ds-text-primary)]",bt[e]),children:n}),i.jsxs("div",{className:"relative flex items-center w-full",children:[P&&i.jsx("div",{className:I("absolute left-0 flex items-center h-full",zr[e]),children:i.jsx(Ce,{component:P,size:e,className:"text-[var(--color-ds-text-secondary)]"})}),i.jsx("input",{...E,id:J,type:S?F?"text":"password":t,disabled:p,"aria-invalid":o,className:I(V,P&&"pl-9",R&&"pr-9",y),onInvalid:H=>H.preventDefault(),style:S&&!F?{WebkitTextSecurity:"disc",MozTextSecurity:"disc"}:void 0}),f&&i.jsx("div",{className:"flex items-center h-full",children:f}),m&&i.jsx("div",{className:"flex items-center h-full",children:m}),R&&i.jsx("button",{type:"button",onClick:()=>W(H=>!H),className:"absolute right-0 flex items-center h-full pr-2",tabIndex:-1,children:i.jsx(Ce,{component:R,size:e,className:"text-[var(--color-ds-text-secondary)]"})})]}),i.jsx("div",{className:"min-h-[18px]",children:o&&l?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:l}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}const vo={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Lt=400,yt=8,Ls=({children:r,size:t="sm",position:e="top",className:s})=>{const[n,a]=v.useState(!1),[o,l]=v.useState({x:0,y:0}),c=v.useRef(null),u=v.useId();v.useEffect(()=>{if(n&&c.current){const p=c.current.getBoundingClientRect();let b=0,N=0;switch(e){case"top":b=p.left+p.width/2-Lt/2,N=p.top-yt;break;case"bottom":b=p.left+p.width/2-Lt/2,N=p.bottom+yt;break;case"left":b=p.left-Lt-yt,N=p.top+p.height/2;break;case"right":b=p.right+yt,N=p.top+p.height/2;break}l({x:b,y:N})}},[n,e]);const f=()=>typeof r=="string"?i.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):i.jsx(i.Fragment,{children:r}),m=n?i.jsx("div",{id:u,role:"tooltip",className:I("fixed z-50 w-[250px] bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)] text-ds-sm rounded p-2 shadow-lg","pointer-events-none"),style:{top:`${o.y}px`,left:`${o.x}px`,transform:e==="left"||e==="right"?"translateY(-50%)":e==="top"?"translateY(-100%)":void 0},children:f()}):null;return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button","aria-describedby":u,ref:c,className:I("inline-flex items-center justify-center focus:outline-none",vo[t],"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:i.jsx(Hn,{className:"w-full h-full"})}),as.createPortal(m,document.body)]})};function wo({name:r,label:t,type:e="text",size:s="sm",width:n,placeholder:a,validation:o,loadingDefaults:l,disabled:c,info:u}){var T;const{control:f,formState:{errors:m}}=ut(),p=!!m[r],b=((T=m[r])==null?void 0:T.message)||"",N="relative",j=n??"w-full";return i.jsxs("div",{className:N,children:[i.jsx(Fe,{name:r,control:f,rules:o,render:({field:w})=>i.jsx(Mt,{label:t,size:s,width:j,placeholder:a,hasError:p,errorMessage:b,loading:l,type:e,...w,disabled:c})}),u&&i.jsx(Ls,{size:s,position:"left",className:"absolute top-1/2 right-2 -translate-y-1/2",children:u})]})}const dr=v.memo(wo);dr.displayName="FormFieldInput";function ko({title:r,headerButtons:t,children:e,className:s}){return i.jsxs("div",{className:I("flex flex-col h-full",s),children:[i.jsxs("div",{className:"flex items-center justify-between py-4",children:[i.jsx("div",{className:`bg-[var(--color-ds-background-accent)] \r
23
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}),t&&i.jsx("div",{className:"flex items-center space-x-2",children:t})]}),i.jsx("main",{className:"flex-1 overflow-auto",children:e})]})}function Ps({options:r,value:t,onChange:e,children:s}){const n=v.useRef(null),[a,o]=v.useState({left:0,width:0});return v.useLayoutEffect(()=>{const l=n.current;if(!l)return;const c=()=>{const u=r.findIndex(T=>T.value===t);if(u<0)return;const f=l.children[u],m=f.querySelector("span"),p=(m==null?void 0:m.offsetWidth)??f.offsetWidth,b=f.offsetWidth,j=f.offsetLeft+(b-p)/2;o({left:j,width:p})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[t,r]),i.jsxs("div",{children:[i.jsxs("div",{className:"relative",children:[i.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===t;return i.jsx("li",{role:"tab","aria-selected":c,onClick:()=>e(l.value),className:L("cursor-pointer whitespace-nowrap px-4 py-2 transition-colors duration-150 ease-in-out",c?"text-[var(--color-ds-background-accent)]":"text-[var(--color-ds-text-primary)]"),children:i.jsx("span",{className:"inline-block",children:l.label})},l.value)})}),i.jsx("span",{className:"absolute bottom-0 h-1 bg-[var(--color-ds-background-accent)] transition-all duration-200 ease-in-out rounded-t-full",style:{left:a.left,width:a.width}})]}),i.jsx("div",{className:"mt-4 pb-4 border-b border-[var(--color-ds-border-default-50)]",children:s[t]})]})}const Yt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},jo={sm:"h-6",md:"h-10",lg:"h-12"},Eo={sm:"px-2",md:"px-2.5",lg:"px-3"},Ur={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Br(r,t,e,s,n,a,o,l,c){return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative flex items-center w-full",children:[i.jsx("select",{id:r,...s,disabled:n,className:L("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Yt[e],jo[e],Eo[e],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:t.map(u=>i.jsx("option",{value:u.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:u.label},u.value))}),c&&i.jsx("div",{className:"flex items-center h-full pr-2",children:c})]}),!o&&i.jsx("div",{className:"min-h-[18px] w-full",children:a!=null&&a.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function it(r){const{control:t,name:e,rules:s,defaultValue:n,options:a=[],loadOptions:o,reloadDeps:l=[],value:c,onChange:u,size:f="sm",width:m="100%",label:p,labelHidden:b=!1,hasError:N=!1,errorMessage:j="",disableErrorPlaceholder:T=!1,disabled:w=!1,className:y,suffixButton:E}=r,M=v.useId(),F=e||M,[B,X]=v.useState(a),[S,$]=v.useState(!!o);if(v.useEffect(()=>{o&&($(!0),o().then(P=>X(P)).finally(()=>$(!1)))},[o,...l]),v.useEffect(()=>{!t&&B.length>0&&(c===void 0||c===""||!B.some(P=>P.value===c))&&(u==null||u(B[0].value))},[B,c,u,t]),t&&e){const{field:P,fieldState:R}=_s({name:e,control:t,rules:s,defaultValue:n});return v.useEffect(()=>{if(!S&&B.length>0){const V=P.value;(V===void 0||!B.some(H=>H.value===V))&&P.onChange(B[0].value)}},[B,S,P]),i.jsxs("div",{className:L("flex flex-col",y),style:{width:m,maxWidth:"100%"},children:[p&&i.jsx("label",{htmlFor:F,className:L("pb-2 text-[var(--color-ds-text-primary)]",Yt[f],b&&"sr-only"),children:p}),S?i.jsx(qe,{width:"100%",height:Ur[f],variant:"rect",className:"rounded-lg"}):Br(F,B,f,{value:P.value,onChange:V=>P.onChange(V.target.value)},w,R.error,T,y,E)]})}return i.jsxs("div",{className:L("flex flex-col",y),style:{width:m,maxWidth:"100%"},children:[p&&i.jsx("label",{htmlFor:F,className:L("pb-2 text-[var(--color-ds-text-primary)]",Yt[f],b&&"sr-only"),children:p}),S?i.jsx(qe,{width:"100%",height:Ur[f],variant:"rect",className:"rounded-lg"}):Br(F,B,f,{value:c,onChange:P=>u==null?void 0:u(P.target.value)},w,N?{message:j}:void 0,T,y,E)]})}const Wr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function zs({groupLabel:r,inputs:t=[],separator:e=i.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:n,showVisibleLabel:a=!1,size:o="sm",width:l}){const c=t.length;return i.jsxs("div",{className:L("flex flex-col",n),style:l?{width:l}:void 0,children:[i.jsx("label",{className:L("sr-only pb-2",Wr[o]),children:r}),a&&i.jsx("label",{className:L("pb-2",Wr[o]),children:r}),i.jsx("div",{className:"flex items-center flex-nowrap",children:t.map((u,f)=>{const{width:m,className:p,options:b,loadOptions:N,...j}=u,T=Array.isArray(b)||typeof N=="function";let w="rounded-lg";!s&&c>1&&(f===0?w="rounded-l-lg rounded-r-none":f===c-1?w="rounded-r-lg rounded-l-none":w="rounded-none");const y=L("inline-flex items-center flex-shrink-0 overflow-hidden",typeof m=="string"&&m.startsWith("w-")?m:void 0),E=typeof m=="string"&&!m.startsWith("w-")?{width:m}:void 0,M=L(p,w);return i.jsxs("div",{className:y,style:E,children:[T?i.jsx(it,{...j,size:o,className:M,options:b,loadOptions:N}):i.jsx(Ot,{...j,size:o,className:M}),s&&f<c-1&&e]},f)})})]})}const Zr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},No={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function Us({groupLabel:r,options:t,control:e,name:s,rules:n,defaultValue:a,multiple:o=!0,size:l="sm",vertical:c=!0,className:u,showVisibleLabel:f=!0}){return i.jsx(Se,{name:s,control:e,rules:n,defaultValue:a,render:({field:m,fieldState:p})=>{const{value:b,onChange:N}=m;p.error;const j=w=>o?Array.isArray(b)&&b.includes(w):b===w,T=w=>{if(o){const y=Array.isArray(b)?[...b]:[],E=y.indexOf(w);E>=0?y.splice(E,1):y.push(w),N(y)}else N(w)};return i.jsxs("div",{className:L("w-full",u),children:[i.jsx("label",{className:L("sr-only pb-2 text-[var(--color-ds-text-primary)]",Zr[l]),children:r}),f&&i.jsx("label",{className:L("block pb-2 text-[var(--color-ds-text-primary)]",Zr[l]),children:r}),i.jsx("div",{className:L(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:t.map(w=>i.jsxs("label",{className:"inline-flex items-center space-x-2 cursor-pointer select-none",children:[i.jsx("input",{type:o?"checkbox":"radio",name:s,value:w.value,checked:j(w.value),onChange:()=>T(w.value),className:L(No[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]")}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-md",children:w.label})]},w.value))})]})}})}function _o(r){function t(o){var l,c;for(const u of Object.keys(o)){if((l=o[u])!=null&&l.types||(c=o[u])!=null&&c.message)return u;if(typeof o[u]=="object"){const f=t(o[u]);if(f)return`${u}.${f}`}}return null}const e=t(r);if(!e)return;const s=`[name="${e}"]`,n=`[name^="${e}["], [name^="${e}."]`,a=document.querySelector(s)??document.querySelector(n);a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),a.focus({preventScroll:!0}))}const So={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"},Bs=({id:r,message:t,variant:e="info",duration:s=5e3,onClose:n})=>(v.useEffect(()=>{const a=setTimeout(()=>n(r),s);return()=>clearTimeout(a)},[r,s,n]),i.jsxs("div",{className:L("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",So[e]),role:"alert","aria-live":"assertive",children:[i.jsx("span",{className:"flex-1",children:t}),i.jsx("button",{onClick:()=>n(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let bt;const Fo=new Uint8Array(16);function To(){if(!bt&&(bt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bt(Fo)}const pe=[];for(let r=0;r<256;++r)pe.push((r+256).toString(16).slice(1));function Co(r,t=0){return pe[r[t+0]]+pe[r[t+1]]+pe[r[t+2]]+pe[r[t+3]]+"-"+pe[r[t+4]]+pe[r[t+5]]+"-"+pe[r[t+6]]+pe[r[t+7]]+"-"+pe[r[t+8]]+pe[r[t+9]]+"-"+pe[r[t+10]]+pe[r[t+11]]+pe[r[t+12]]+pe[r[t+13]]+pe[r[t+14]]+pe[r[t+15]]}const Oo=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qr={randomUUID:Oo};function Ao(r,t,e){if(qr.randomUUID&&!r)return qr.randomUUID();r=r||{};const s=r.random||(r.rng||To)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Co(s)}const Ws=v.createContext(null),Zs=()=>{const r=v.useContext(Ws);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},Mo=({children:r})=>{const[t,e]=v.useState([]),s=(a,o="info",l=5e3)=>{const c=Ao();e(u=>[...u,{id:c,message:a,variant:o,duration:l}])},n=a=>{e(o=>o.filter(l=>l.id!==a))};return i.jsxs(Ws.Provider,{value:{show:s},children:[r,i.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:t.map(a=>i.jsx(Bs,{id:a.id,message:a.message,variant:a.variant,duration:a.duration,onClose:n},a.id))})]})},Gr=(r,t,e)=>{if(r&&"reportValidity"in r){const s=A(e,t);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},qs=(r,t)=>{for(const e in t.fields){const s=t.fields[e];s&&s.ref&&"reportValidity"in s.ref?Gr(s.ref,e,r):s&&s.refs&&s.refs.forEach(n=>Gr(n,e,r))}},Ro=(r,t)=>{t.shouldUseNativeValidation&&qs(r,t);const e={};for(const s in r){const n=A(t.fields,s),a=Object.assign(r[s]||{},{ref:n&&n.ref});if(Vo(t.names||Object.keys(r),s)){const o=Object.assign({},A(e,s));ae(o,"root",a),ae(e,s,o)}else ae(e,s,a)}return e},Vo=(r,t)=>{const e=Hr(t);return r.some(s=>Hr(s).match(`^${e}\\.\\d+`))};function Hr(r){return r.replace(/\]|\[/g,"")}function Yr(r,t,e){return e===void 0&&(e={}),function(s,n,a){try{return Promise.resolve(function(o,l){try{var c=(t!=null&&t.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[e.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},t,{context:n}))).then(function(u){return a.shouldUseNativeValidation&&qs({},a),{values:e.raw?Object.assign({},s):u,errors:{}}}))}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:Ro((l=o,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(l.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),c){var m=u[f.path].types,p=m&&m[f.type];u[f.path]=Ss(f.path,c,u,f.type,p?[].concat(p,f.message):f.message)}return u},{})),a)};var l,c}))}catch(o){return Promise.reject(o)}}}var It,Xr;function $o(){if(Xr)return It;Xr=1;function r(w){this._maxSize=w,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(w){return this._values[w]},r.prototype.set=function(w,y){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=y};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,e=/^\d+$/,s=/^\d/,n=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,l=new r(o),c=new r(o),u=new r(o);It={Cache:r,split:m,normalizePath:f,setter:function(w){var y=f(w);return c.get(w)||c.set(w,function(M,F){for(var B=0,X=y.length,S=M;B<X-1;){var $=y[B];if($==="__proto__"||$==="constructor"||$==="prototype")return M;S=S[y[B++]]}S[y[B]]=F})},getter:function(w,y){var E=f(w);return u.get(w)||u.set(w,function(F){for(var B=0,X=E.length;B<X;)if(F!=null||!y)F=F[E[B++]];else return;return F})},join:function(w){return w.reduce(function(y,E){return y+(b(E)||e.test(E)?"["+E+"]":(y?".":"")+E)},"")},forEach:function(w,y,E){p(Array.isArray(w)?w:m(w),y,E)}};function f(w){return l.get(w)||l.set(w,m(w).map(function(y){return y.replace(a,"$2")}))}function m(w){return w.match(t)||[""]}function p(w,y,E){var M=w.length,F,B,X,S;for(B=0;B<M;B++)F=w[B],F&&(T(F)&&(F='"'+F+'"'),S=b(F),X=!S&&/^\d+$/.test(F),y.call(E,F,S,X,B,w))}function b(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function N(w){return w.match(s)&&!w.match(e)}function j(w){return n.test(w)}function T(w){return!b(w)&&(N(w)||j(w))}return It}var Ze=$o(),Lt,Jr;function Do(){if(Jr)return Lt;Jr=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,t=f=>f.match(r)||[],e=f=>f[0].toUpperCase()+f.slice(1),s=(f,m)=>t(f).join(m).toLowerCase(),n=f=>t(f).reduce((m,p)=>`${m}${m?p[0].toUpperCase()+p.slice(1).toLowerCase():p.toLowerCase()}`,"");return Lt={words:t,upperFirst:e,camelCase:n,pascalCase:f=>e(n(f)),snakeCase:f=>s(f,"_"),kebabCase:f=>s(f,"-"),sentenceCase:f=>e(s(f," ")),titleCase:f=>t(f).map(e).join(" ")},Lt}var Pt=Do(),yt={exports:{}},Kr;function Io(){if(Kr)return yt.exports;Kr=1,yt.exports=function(n){return r(t(n),n)},yt.exports.array=r;function r(n,a){var o=n.length,l=new Array(o),c={},u=o,f=e(a),m=s(n);for(a.forEach(function(b){if(!m.has(b[0])||!m.has(b[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)c[u]||p(n[u],u,new Set);return l;function p(b,N,j){if(j.has(b)){var T;try{T=", node was:"+JSON.stringify(b)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!m.has(b))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(b));if(!c[N]){c[N]=!0;var w=f.get(b)||new Set;if(w=Array.from(w),N=w.length){j.add(b);do{var y=w[--N];p(y,m.get(y),j)}while(N);j.delete(b)}l[--o]=b}}}function t(n){for(var a=new Set,o=0,l=n.length;o<l;o++){var c=n[o];a.add(c[0]),a.add(c[1])}return Array.from(a)}function e(n){for(var a=new Map,o=0,l=n.length;o<l;o++){var c=n[o];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,o=0,l=n.length;o<l;o++)a.set(n[o],o);return a}return yt.exports}var Lo=Io();const Po=kn(Lo),zo=Object.prototype.toString,Uo=Error.prototype.toString,Bo=RegExp.prototype.toString,Wo=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Zo=/^Symbol\((.*)\)(.*)$/;function qo(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Qr(r,t=!1){if(r==null||r===!0||r===!1)return""+r;const e=typeof r;if(e==="number")return qo(r);if(e==="string")return t?`"${r}"`:r;if(e==="function")return"[Function "+(r.name||"anonymous")+"]";if(e==="symbol")return Wo.call(r).replace(Zo,"Symbol($1)");const s=zo.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+Uo.call(r)+"]":s==="RegExp"?Bo.call(r):null}function ze(r,t){let e=Qr(r,t);return e!==null?e:JSON.stringify(r,function(s,n){let a=Qr(this[s],t);return a!==null?a:n},2)}function Gs(r){return r==null?[]:[].concat(r)}let Hs,Ys,Xs,Go=/\$\{\s*(\w+)\s*\}/g;Hs=Symbol.toStringTag;class es{constructor(t,e,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[Hs]="Error",this.name="ValidationError",this.value=e,this.path=s,this.type=n,this.errors=[],this.inner=[],Gs(t).forEach(a=>{if(we.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Ys=Symbol.hasInstance;Xs=Symbol.toStringTag;class we extends Error{static formatError(t,e){const s=e.label||e.path||"this";return e=Object.assign({},e,{path:s,originalPath:e.path}),typeof t=="string"?t.replace(Go,(n,a)=>ze(e[a])):typeof t=="function"?t(e):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,e,s,n,a){const o=new es(t,e,s,n);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Xs]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,we)}static[Ys](t){return es[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Te={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:t,value:e,originalValue:s})=>{const n=s!=null&&s!==e?` (cast from the value \`${ze(s,!0)}\`).`:".";return t!=="mixed"?`${r} must be a \`${t}\` type, but the final value was: \`${ze(e,!0)}\``+n:`${r} must match the configured type. The validated value was: \`${ze(e,!0)}\``+n}},ve={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"},Le={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"},Xt={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ho={isValue:"${path} field must be ${value}"},kt={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Yo={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"},Xo={notType:r=>{const{path:t,value:e,spec:s}=r,n=s.types.length;if(Array.isArray(e)){if(e.length<n)return`${t} tuple value has too few items, expected a length of ${n} but got ${e.length} for value: \`${ze(e,!0)}\``;if(e.length>n)return`${t} tuple value has too many items, expected a length of ${n} but got ${e.length} for value: \`${ze(e,!0)}\``}return we.formatError(Te.notType,r)}};Object.assign(Object.create(null),{mixed:Te,string:ve,number:Le,date:Xt,object:kt,array:Yo,boolean:Ho,tuple:Xo});const cr=r=>r&&r.__isYupSchema__;class Ft{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:n,otherwise:a}=e,o=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new Ft(t,(l,c)=>{var u;let f=o(...l)?n:a;return(u=f==null?void 0:f(c))!=null?u:c})}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let s=this.refs.map(a=>a.getValue(e==null?void 0:e.value,e==null?void 0:e.parent,e==null?void 0:e.context)),n=this.fn(s,t,e);if(n===void 0||n===t)return t;if(!cr(n))throw new TypeError("conditions must return a schema object");return n.resolve(e)}}const vt={context:"$",value:"."};class Ge{constructor(t,e={}){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 t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===vt.context,this.isValue=this.key[0]===vt.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?vt.context:this.isValue?vt.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ze.getter(this.path,!0),this.map=e.map}getValue(t,e,s){let n=this.isContext?s:this.isValue?t:e;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}cast(t,e){return this.getValue(t,e==null?void 0:e.parent,e==null?void 0:e.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Ge.prototype.__isYupRef=!0;const Ve=r=>r==null;function Xe(r){function t({value:e,path:s="",options:n,originalValue:a,schema:o},l,c){const{name:u,test:f,params:m,message:p,skipAbsent:b}=r;let{parent:N,context:j,abortEarly:T=o.spec.abortEarly,disableStackTrace:w=o.spec.disableStackTrace}=n;function y(R){return Ge.isRef(R)?R.getValue(e,N,j):R}function E(R={}){const V=Object.assign({value:e,originalValue:a,label:o.spec.label,path:R.path||s,spec:o.spec,disableStackTrace:R.disableStackTrace||w},m,R.params);for(const K of Object.keys(V))V[K]=y(V[K]);const H=new we(we.formatError(R.message||p,V),e,V.path,R.type||u,V.disableStackTrace);return H.params=V,H}const M=T?l:c;let F={path:s,parent:N,type:u,from:n.from,createError:E,resolve:y,options:n,originalValue:a,schema:o};const B=R=>{we.isError(R)?M(R):R?c(null):M(E())},X=R=>{we.isError(R)?M(R):l(R)};if(b&&Ve(e))return B(!0);let $;try{var P;if($=f.call(F,e,F),typeof((P=$)==null?void 0:P.then)=="function"){if(n.sync)throw new Error(`Validation test of type: "${F.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve($).then(B,X)}}catch(R){X(R);return}B($)}return t.OPTIONS=r,t}function Jo(r,t,e,s=e){let n,a,o;return t?(Ze.forEach(t,(l,c,u)=>{let f=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:n,value:e});let m=r.type==="tuple",p=u?parseInt(f,10):0;if(r.innerType||m){if(m&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(e&&p>=e.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);n=e,e=e&&e[p],r=m?r.spec.types[p]:r.innerType}if(!u){if(!r.fields||!r.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${r.type}")`);n=e,e=e&&e[f],r=r.fields[f]}a=f,o=c?"["+l+"]":"."+l}),{schema:r,parent:n,parentPath:a}):{parent:n,parentPath:t,schema:r}}class Tt extends Set{describe(){const t=[];for(const e of this.values())t.push(Ge.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const s of this.values())e.push(t(s));return e}clone(){return new Tt(this.values())}merge(t,e){const s=this.clone();return t.forEach(n=>s.add(n)),e.forEach(n=>s.delete(n)),s}}function Je(r,t=new Map){if(cr(r)||!r||typeof r!="object")return r;if(t.has(r))return t.get(r);let e;if(r instanceof Date)e=new Date(r.getTime()),t.set(r,e);else if(r instanceof RegExp)e=new RegExp(r),t.set(r,e);else if(Array.isArray(r)){e=new Array(r.length),t.set(r,e);for(let s=0;s<r.length;s++)e[s]=Je(r[s],t)}else if(r instanceof Map){e=new Map,t.set(r,e);for(const[s,n]of r.entries())e.set(s,Je(n,t))}else if(r instanceof Set){e=new Set,t.set(r,e);for(const s of r)e.add(Je(s,t))}else if(r instanceof Object){e={},t.set(r,e);for(const[s,n]of Object.entries(r))e[s]=Je(n,t)}else throw Error(`Unable to clone ${r}`);return e}class Ee{constructor(t){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 Tt,this._blacklist=new Tt,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Te.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const e=Object.create(Object.getPrototypeOf(this));return e.type=this.type,e._typeCheck=this._typeCheck,e._whitelist=this._whitelist.clone(),e._blacklist=this._blacklist.clone(),e.internalTests=Object.assign({},this.internalTests),e.exclusiveTests=Object.assign({},this.exclusiveTests),e.deps=[...this.deps],e.conditions=[...this.conditions],e.tests=[...this.tests],e.transforms=[...this.transforms],e.spec=Je(Object.assign({},this.spec,t)),e}label(t){let e=this.clone();return e.spec.label=t,e}meta(...t){if(t.length===0)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},t[0]),e}withMutation(t){let e=this._mutate;this._mutate=!0;let s=t(this);return this._mutate=e,s}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let e=this,s=t.clone();const n=Object.assign({},e.spec,s.spec);return s.spec=n,s.internalTests=Object.assign({},e.internalTests,s.internalTests),s._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),s._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),s.tests=e.tests,s.exclusiveTests=e.exclusiveTests,s.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),s.transforms=[...e.transforms,...s.transforms],s}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let e=this;if(e.conditions.length){let s=e.conditions;e=e.clone(),e.conditions=[],e=s.reduce((n,a)=>a.resolve(n,t),e),e=e.resolve(t)}return e}resolveOptions(t){var e,s,n,a;return Object.assign({},t,{from:t.from||[],strict:(e=t.strict)!=null?e:this.spec.strict,abortEarly:(s=t.abortEarly)!=null?s:this.spec.abortEarly,recursive:(n=t.recursive)!=null?n:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,e={}){let s=this.resolve(Object.assign({value:t},e)),n=e.assert==="ignore-optionality",a=s._cast(t,e);if(e.assert!==!1&&!s.isType(a)){if(n&&Ve(a))return a;let o=ze(t),l=ze(a);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
26
+ text-ds-lg`,children:r}),t&&i.jsx("div",{className:"flex items-center space-x-2",children:t})]}),i.jsx("main",{className:"flex-1 overflow-auto",children:e})]})}function Ps({options:r,value:t,onChange:e,children:s}){const n=v.useRef(null),[a,o]=v.useState({left:0,width:0});return v.useLayoutEffect(()=>{const l=n.current;if(!l)return;const c=()=>{const u=r.findIndex(T=>T.value===t);if(u<0)return;const f=l.children[u],m=f.querySelector("span"),p=(m==null?void 0:m.offsetWidth)??f.offsetWidth,b=f.offsetWidth,j=f.offsetLeft+(b-p)/2;o({left:j,width:p})};return c(),window.addEventListener("resize",c),l.addEventListener("scroll",c),()=>{window.removeEventListener("resize",c),l.removeEventListener("scroll",c)}},[t,r]),i.jsxs("div",{children:[i.jsxs("div",{className:"relative",children:[i.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===t;return i.jsx("li",{role:"tab","aria-selected":c,onClick:()=>e(l.value),className:I("cursor-pointer whitespace-nowrap px-4 py-2 transition-colors duration-150 ease-in-out",c?"text-[var(--color-ds-background-accent)]":"text-[var(--color-ds-text-primary)]"),children:i.jsx("span",{className:"inline-block",children:l.label})},l.value)})}),i.jsx("span",{className:"absolute bottom-0 h-1 bg-[var(--color-ds-background-accent)] transition-all duration-200 ease-in-out rounded-t-full",style:{left:a.left,width:a.width}})]}),i.jsx("div",{className:"mt-4 pb-4 border-b border-[var(--color-ds-border-default-50)]",children:s[t]})]})}const Jt={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},jo={sm:"h-6",md:"h-10",lg:"h-12"},Eo={sm:"px-2",md:"px-2.5",lg:"px-3"},Ur={sm:"1.5rem",md:"2.5rem",lg:"3rem"};function Br(r,t,e,s,n,a,o,l,c){return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"relative flex items-center w-full",children:[i.jsx("select",{id:r,...s,disabled:n,className:I("box-border w-full rounded-lg border bg-[var(--color-ds-background-page)] outline-none transition font-[var(--font-primary)]",Jt[e],jo[e],Eo[e],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:t.map(u=>i.jsx("option",{value:u.value,className:"bg-[var(--color-ds-background-page)] text-[var(--color-ds-text-primary)]",children:u.label},u.value))}),c&&i.jsx("div",{className:"flex items-center h-full pr-2",children:c})]}),!o&&i.jsx("div",{className:"min-h-[18px] w-full",children:a!=null&&a.message?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:a.message}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}function ct(r){const{control:t,name:e,rules:s,defaultValue:n,options:a=[],loadOptions:o,reloadDeps:l=[],value:c,onChange:u,size:f="sm",width:m="100%",label:p,labelHidden:b=!1,hasError:N=!1,errorMessage:j="",disableErrorPlaceholder:T=!1,disabled:w=!1,className:y,suffixButton:E}=r,M=v.useId(),F=e||M,[W,J]=v.useState(a),[S,$]=v.useState(!!o);if(v.useEffect(()=>{o&&($(!0),o().then(P=>J(P)).finally(()=>$(!1)))},[o,...l]),v.useEffect(()=>{!t&&W.length>0&&(c===void 0||c===""||!W.some(P=>P.value===c))&&(u==null||u(W[0].value))},[W,c,u,t]),t&&e){const{field:P,fieldState:R}=_s({name:e,control:t,rules:s,defaultValue:n});return v.useEffect(()=>{if(!S&&W.length>0){const V=P.value;(V===void 0||!W.some(H=>H.value===V))&&P.onChange(W[0].value)}},[W,S,P]),i.jsxs("div",{className:I("flex flex-col",y),style:{width:m,maxWidth:"100%"},children:[p&&i.jsx("label",{htmlFor:F,className:I("pb-2 text-[var(--color-ds-text-primary)]",Jt[f],b&&"sr-only"),children:p}),S?i.jsx(qe,{width:"100%",height:Ur[f],variant:"rect",className:"rounded-lg"}):Br(F,W,f,{value:P.value,onChange:V=>P.onChange(V.target.value)},w,R.error,T,y,E)]})}return i.jsxs("div",{className:I("flex flex-col",y),style:{width:m,maxWidth:"100%"},children:[p&&i.jsx("label",{htmlFor:F,className:I("pb-2 text-[var(--color-ds-text-primary)]",Jt[f],b&&"sr-only"),children:p}),S?i.jsx(qe,{width:"100%",height:Ur[f],variant:"rect",className:"rounded-lg"}):Br(F,W,f,{value:c,onChange:P=>u==null?void 0:u(P.target.value)},w,N?{message:j}:void 0,T,y,E)]})}const Wr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"};function zs({groupLabel:r,inputs:t=[],separator:e=i.jsx("span",{className:"px-1 select-none",children:"/"}),useSeparator:s=!0,className:n,showVisibleLabel:a=!1,size:o="sm",width:l}){const c=t.length;return i.jsxs("div",{className:I("flex flex-col",n),style:l?{width:l}:void 0,children:[i.jsx("label",{className:I("sr-only pb-2",Wr[o]),children:r}),a&&i.jsx("label",{className:I("pb-2",Wr[o]),children:r}),i.jsx("div",{className:"flex items-center flex-nowrap",children:t.map((u,f)=>{const{width:m,className:p,options:b,loadOptions:N,...j}=u,T=Array.isArray(b)||typeof N=="function";let w="rounded-lg";!s&&c>1&&(f===0?w="rounded-l-lg rounded-r-none":f===c-1?w="rounded-r-lg rounded-l-none":w="rounded-none");const y=I("inline-flex items-center flex-shrink-0 overflow-hidden",typeof m=="string"&&m.startsWith("w-")?m:void 0),E=typeof m=="string"&&!m.startsWith("w-")?{width:m}:void 0,M=I(p,w);return i.jsxs("div",{className:y,style:E,children:[T?i.jsx(ct,{...j,size:o,className:M,options:b,loadOptions:N}):i.jsx(Mt,{...j,size:o,className:M}),s&&f<c-1&&e]},f)})})]})}const Zr={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},No={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function Us({groupLabel:r,options:t,control:e,name:s,rules:n,defaultValue:a,multiple:o=!0,size:l="sm",vertical:c=!0,className:u,showVisibleLabel:f=!0}){return i.jsx(Fe,{name:s,control:e,rules:n,defaultValue:a,render:({field:m,fieldState:p})=>{const{value:b,onChange:N}=m;p.error;const j=w=>o?Array.isArray(b)&&b.includes(w):b===w,T=w=>{if(o){const y=Array.isArray(b)?[...b]:[],E=y.indexOf(w);E>=0?y.splice(E,1):y.push(w),N(y)}else N(w)};return i.jsxs("div",{className:I("w-full",u),children:[i.jsx("label",{className:I("sr-only pb-2 text-[var(--color-ds-text-primary)]",Zr[l]),children:r}),f&&i.jsx("label",{className:I("block pb-2 text-[var(--color-ds-text-primary)]",Zr[l]),children:r}),i.jsx("div",{className:I(c?"flex flex-col gap-2":"flex flex-wrap gap-4"),children:t.map(w=>i.jsxs("label",{className:"inline-flex items-center space-x-2 cursor-pointer select-none",children:[i.jsx("input",{type:o?"checkbox":"radio",name:s,value:w.value,checked:j(w.value),onChange:()=>T(w.value),className:I(No[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]")}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-md",children:w.label})]},w.value))})]})}})}function _o(r){function t(o){var l,c;for(const u of Object.keys(o)){if((l=o[u])!=null&&l.types||(c=o[u])!=null&&c.message)return u;if(typeof o[u]=="object"){const f=t(o[u]);if(f)return`${u}.${f}`}}return null}const e=t(r);if(!e)return;const s=`[name="${e}"]`,n=`[name^="${e}["], [name^="${e}."]`,a=document.querySelector(s)??document.querySelector(n);a&&(a.scrollIntoView({behavior:"smooth",block:"center"}),a.focus({preventScroll:!0}))}const So={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"},Bs=({id:r,message:t,variant:e="info",duration:s=5e3,onClose:n})=>(v.useEffect(()=>{const a=setTimeout(()=>n(r),s);return()=>clearTimeout(a)},[r,s,n]),i.jsxs("div",{className:I("w-80 max-w-full border-l-4 rounded shadow-md p-4 mb-2 flex justify-between items-start",So[e]),role:"alert","aria-live":"assertive",children:[i.jsx("span",{className:"flex-1",children:t}),i.jsx("button",{onClick:()=>n(r),className:"ml-4 text-xl font-bold leading-none focus:outline-none",children:"×"})]}));let vt;const Fo=new Uint8Array(16);function To(){if(!vt&&(vt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vt(Fo)}const xe=[];for(let r=0;r<256;++r)xe.push((r+256).toString(16).slice(1));function Co(r,t=0){return xe[r[t+0]]+xe[r[t+1]]+xe[r[t+2]]+xe[r[t+3]]+"-"+xe[r[t+4]]+xe[r[t+5]]+"-"+xe[r[t+6]]+xe[r[t+7]]+"-"+xe[r[t+8]]+xe[r[t+9]]+"-"+xe[r[t+10]]+xe[r[t+11]]+xe[r[t+12]]+xe[r[t+13]]+xe[r[t+14]]+xe[r[t+15]]}const Oo=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qr={randomUUID:Oo};function Ao(r,t,e){if(qr.randomUUID&&!r)return qr.randomUUID();r=r||{};const s=r.random||(r.rng||To)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Co(s)}const Ws=v.createContext(null),Zs=()=>{const r=v.useContext(Ws);if(!r)throw new Error("useToast debe usarse dentro de <ToastProvider>");return r},Mo=({children:r})=>{const[t,e]=v.useState([]),s=(a,o="info",l=5e3)=>{const c=Ao();e(u=>[...u,{id:c,message:a,variant:o,duration:l}])},n=a=>{e(o=>o.filter(l=>l.id!==a))};return i.jsxs(Ws.Provider,{value:{show:s},children:[r,i.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col items-end",children:t.map(a=>i.jsx(Bs,{id:a.id,message:a.message,variant:a.variant,duration:a.duration,onClose:n},a.id))})]})},Gr=(r,t,e)=>{if(r&&"reportValidity"in r){const s=A(e,t);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},qs=(r,t)=>{for(const e in t.fields){const s=t.fields[e];s&&s.ref&&"reportValidity"in s.ref?Gr(s.ref,e,r):s&&s.refs&&s.refs.forEach(n=>Gr(n,e,r))}},Ro=(r,t)=>{t.shouldUseNativeValidation&&qs(r,t);const e={};for(const s in r){const n=A(t.fields,s),a=Object.assign(r[s]||{},{ref:n&&n.ref});if(Vo(t.names||Object.keys(r),s)){const o=Object.assign({},A(e,s));ae(o,"root",a),ae(e,s,o)}else ae(e,s,a)}return e},Vo=(r,t)=>{const e=Hr(t);return r.some(s=>Hr(s).match(`^${e}\\.\\d+`))};function Hr(r){return r.replace(/\]|\[/g,"")}function Yr(r,t,e){return e===void 0&&(e={}),function(s,n,a){try{return Promise.resolve(function(o,l){try{var c=(t!=null&&t.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[e.mode==="sync"?"validateSync":"validate"](s,Object.assign({abortEarly:!1},t,{context:n}))).then(function(u){return a.shouldUseNativeValidation&&qs({},a),{values:e.raw?Object.assign({},s):u,errors:{}}}))}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(!o.inner)throw o;return{values:{},errors:Ro((l=o,c=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(l.inner||[]).reduce(function(u,f){if(u[f.path]||(u[f.path]={message:f.message,type:f.type}),c){var m=u[f.path].types,p=m&&m[f.type];u[f.path]=Ss(f.path,c,u,f.type,p?[].concat(p,f.message):f.message)}return u},{})),a)};var l,c}))}catch(o){return Promise.reject(o)}}}var Pt,Xr;function $o(){if(Xr)return Pt;Xr=1;function r(w){this._maxSize=w,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(w){return this._values[w]},r.prototype.set=function(w,y){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=y};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,e=/^\d+$/,s=/^\d/,n=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,o=512,l=new r(o),c=new r(o),u=new r(o);Pt={Cache:r,split:m,normalizePath:f,setter:function(w){var y=f(w);return c.get(w)||c.set(w,function(M,F){for(var W=0,J=y.length,S=M;W<J-1;){var $=y[W];if($==="__proto__"||$==="constructor"||$==="prototype")return M;S=S[y[W++]]}S[y[W]]=F})},getter:function(w,y){var E=f(w);return u.get(w)||u.set(w,function(F){for(var W=0,J=E.length;W<J;)if(F!=null||!y)F=F[E[W++]];else return;return F})},join:function(w){return w.reduce(function(y,E){return y+(b(E)||e.test(E)?"["+E+"]":(y?".":"")+E)},"")},forEach:function(w,y,E){p(Array.isArray(w)?w:m(w),y,E)}};function f(w){return l.get(w)||l.set(w,m(w).map(function(y){return y.replace(a,"$2")}))}function m(w){return w.match(t)||[""]}function p(w,y,E){var M=w.length,F,W,J,S;for(W=0;W<M;W++)F=w[W],F&&(T(F)&&(F='"'+F+'"'),S=b(F),J=!S&&/^\d+$/.test(F),y.call(E,F,S,J,W,w))}function b(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function N(w){return w.match(s)&&!w.match(e)}function j(w){return n.test(w)}function T(w){return!b(w)&&(N(w)||j(w))}return Pt}var Ze=$o(),zt,Jr;function Do(){if(Jr)return zt;Jr=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,t=f=>f.match(r)||[],e=f=>f[0].toUpperCase()+f.slice(1),s=(f,m)=>t(f).join(m).toLowerCase(),n=f=>t(f).reduce((m,p)=>`${m}${m?p[0].toUpperCase()+p.slice(1).toLowerCase():p.toLowerCase()}`,"");return zt={words:t,upperFirst:e,camelCase:n,pascalCase:f=>e(n(f)),snakeCase:f=>s(f,"_"),kebabCase:f=>s(f,"-"),sentenceCase:f=>e(s(f," ")),titleCase:f=>t(f).map(e).join(" ")},zt}var Ut=Do(),wt={exports:{}},Kr;function Io(){if(Kr)return wt.exports;Kr=1,wt.exports=function(n){return r(t(n),n)},wt.exports.array=r;function r(n,a){var o=n.length,l=new Array(o),c={},u=o,f=e(a),m=s(n);for(a.forEach(function(b){if(!m.has(b[0])||!m.has(b[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)c[u]||p(n[u],u,new Set);return l;function p(b,N,j){if(j.has(b)){var T;try{T=", node was:"+JSON.stringify(b)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!m.has(b))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(b));if(!c[N]){c[N]=!0;var w=f.get(b)||new Set;if(w=Array.from(w),N=w.length){j.add(b);do{var y=w[--N];p(y,m.get(y),j)}while(N);j.delete(b)}l[--o]=b}}}function t(n){for(var a=new Set,o=0,l=n.length;o<l;o++){var c=n[o];a.add(c[0]),a.add(c[1])}return Array.from(a)}function e(n){for(var a=new Map,o=0,l=n.length;o<l;o++){var c=n[o];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,o=0,l=n.length;o<l;o++)a.set(n[o],o);return a}return wt.exports}var Lo=Io();const Po=kn(Lo),zo=Object.prototype.toString,Uo=Error.prototype.toString,Bo=RegExp.prototype.toString,Wo=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Zo=/^Symbol\((.*)\)(.*)$/;function qo(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Qr(r,t=!1){if(r==null||r===!0||r===!1)return""+r;const e=typeof r;if(e==="number")return qo(r);if(e==="string")return t?`"${r}"`:r;if(e==="function")return"[Function "+(r.name||"anonymous")+"]";if(e==="symbol")return Wo.call(r).replace(Zo,"Symbol($1)");const s=zo.call(r).slice(8,-1);return s==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):s==="Error"||r instanceof Error?"["+Uo.call(r)+"]":s==="RegExp"?Bo.call(r):null}function ze(r,t){let e=Qr(r,t);return e!==null?e:JSON.stringify(r,function(s,n){let a=Qr(this[s],t);return a!==null?a:n},2)}function Gs(r){return r==null?[]:[].concat(r)}let Hs,Ys,Xs,Go=/\$\{\s*(\w+)\s*\}/g;Hs=Symbol.toStringTag;class es{constructor(t,e,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[Hs]="Error",this.name="ValidationError",this.value=e,this.path=s,this.type=n,this.errors=[],this.inner=[],Gs(t).forEach(a=>{if(we.isError(a)){this.errors.push(...a.errors);const o=a.inner.length?a.inner:[a];this.inner.push(...o)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Ys=Symbol.hasInstance;Xs=Symbol.toStringTag;class we extends Error{static formatError(t,e){const s=e.label||e.path||"this";return e=Object.assign({},e,{path:s,originalPath:e.path}),typeof t=="string"?t.replace(Go,(n,a)=>ze(e[a])):typeof t=="function"?t(e):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,e,s,n,a){const o=new es(t,e,s,n);if(a)return o;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Xs]="Error",this.name=o.name,this.message=o.message,this.type=o.type,this.value=o.value,this.path=o.path,this.errors=o.errors,this.inner=o.inner,Error.captureStackTrace&&Error.captureStackTrace(this,we)}static[Ys](t){return es[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Te={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:t,value:e,originalValue:s})=>{const n=s!=null&&s!==e?` (cast from the value \`${ze(s,!0)}\`).`:".";return t!=="mixed"?`${r} must be a \`${t}\` type, but the final value was: \`${ze(e,!0)}\``+n:`${r} must match the configured type. The validated value was: \`${ze(e,!0)}\``+n}},ve={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"},Le={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"},Kt={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ho={isValue:"${path} field must be ${value}"},Et={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Yo={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"},Xo={notType:r=>{const{path:t,value:e,spec:s}=r,n=s.types.length;if(Array.isArray(e)){if(e.length<n)return`${t} tuple value has too few items, expected a length of ${n} but got ${e.length} for value: \`${ze(e,!0)}\``;if(e.length>n)return`${t} tuple value has too many items, expected a length of ${n} but got ${e.length} for value: \`${ze(e,!0)}\``}return we.formatError(Te.notType,r)}};Object.assign(Object.create(null),{mixed:Te,string:ve,number:Le,date:Kt,object:Et,array:Yo,boolean:Ho,tuple:Xo});const ur=r=>r&&r.__isYupSchema__;class Ct{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:n,otherwise:a}=e,o=typeof s=="function"?s:(...l)=>l.every(c=>c===s);return new Ct(t,(l,c)=>{var u;let f=o(...l)?n:a;return(u=f==null?void 0:f(c))!=null?u:c})}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let s=this.refs.map(a=>a.getValue(e==null?void 0:e.value,e==null?void 0:e.parent,e==null?void 0:e.context)),n=this.fn(s,t,e);if(n===void 0||n===t)return t;if(!ur(n))throw new TypeError("conditions must return a schema object");return n.resolve(e)}}const kt={context:"$",value:"."};class Ge{constructor(t,e={}){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 t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===kt.context,this.isValue=this.key[0]===kt.value,this.isSibling=!this.isContext&&!this.isValue;let s=this.isContext?kt.context:this.isValue?kt.value:"";this.path=this.key.slice(s.length),this.getter=this.path&&Ze.getter(this.path,!0),this.map=e.map}getValue(t,e,s){let n=this.isContext?s:this.isValue?t:e;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}cast(t,e){return this.getValue(t,e==null?void 0:e.parent,e==null?void 0:e.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Ge.prototype.__isYupRef=!0;const Ve=r=>r==null;function Xe(r){function t({value:e,path:s="",options:n,originalValue:a,schema:o},l,c){const{name:u,test:f,params:m,message:p,skipAbsent:b}=r;let{parent:N,context:j,abortEarly:T=o.spec.abortEarly,disableStackTrace:w=o.spec.disableStackTrace}=n;function y(R){return Ge.isRef(R)?R.getValue(e,N,j):R}function E(R={}){const V=Object.assign({value:e,originalValue:a,label:o.spec.label,path:R.path||s,spec:o.spec,disableStackTrace:R.disableStackTrace||w},m,R.params);for(const K of Object.keys(V))V[K]=y(V[K]);const H=new we(we.formatError(R.message||p,V),e,V.path,R.type||u,V.disableStackTrace);return H.params=V,H}const M=T?l:c;let F={path:s,parent:N,type:u,from:n.from,createError:E,resolve:y,options:n,originalValue:a,schema:o};const W=R=>{we.isError(R)?M(R):R?c(null):M(E())},J=R=>{we.isError(R)?M(R):l(R)};if(b&&Ve(e))return W(!0);let $;try{var P;if($=f.call(F,e,F),typeof((P=$)==null?void 0:P.then)=="function"){if(n.sync)throw new Error(`Validation test of type: "${F.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve($).then(W,J)}}catch(R){J(R);return}W($)}return t.OPTIONS=r,t}function Jo(r,t,e,s=e){let n,a,o;return t?(Ze.forEach(t,(l,c,u)=>{let f=c?l.slice(1,l.length-1):l;r=r.resolve({context:s,parent:n,value:e});let m=r.type==="tuple",p=u?parseInt(f,10):0;if(r.innerType||m){if(m&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(e&&p>=e.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);n=e,e=e&&e[p],r=m?r.spec.types[p]:r.innerType}if(!u){if(!r.fields||!r.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${r.type}")`);n=e,e=e&&e[f],r=r.fields[f]}a=f,o=c?"["+l+"]":"."+l}),{schema:r,parent:n,parentPath:a}):{parent:n,parentPath:t,schema:r}}class Ot extends Set{describe(){const t=[];for(const e of this.values())t.push(Ge.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const s of this.values())e.push(t(s));return e}clone(){return new Ot(this.values())}merge(t,e){const s=this.clone();return t.forEach(n=>s.add(n)),e.forEach(n=>s.delete(n)),s}}function Je(r,t=new Map){if(ur(r)||!r||typeof r!="object")return r;if(t.has(r))return t.get(r);let e;if(r instanceof Date)e=new Date(r.getTime()),t.set(r,e);else if(r instanceof RegExp)e=new RegExp(r),t.set(r,e);else if(Array.isArray(r)){e=new Array(r.length),t.set(r,e);for(let s=0;s<r.length;s++)e[s]=Je(r[s],t)}else if(r instanceof Map){e=new Map,t.set(r,e);for(const[s,n]of r.entries())e.set(s,Je(n,t))}else if(r instanceof Set){e=new Set,t.set(r,e);for(const s of r)e.add(Je(s,t))}else if(r instanceof Object){e={},t.set(r,e);for(const[s,n]of Object.entries(r))e[s]=Je(n,t)}else throw Error(`Unable to clone ${r}`);return e}class Ne{constructor(t){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 Ot,this._blacklist=new Ot,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Te.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const e=Object.create(Object.getPrototypeOf(this));return e.type=this.type,e._typeCheck=this._typeCheck,e._whitelist=this._whitelist.clone(),e._blacklist=this._blacklist.clone(),e.internalTests=Object.assign({},this.internalTests),e.exclusiveTests=Object.assign({},this.exclusiveTests),e.deps=[...this.deps],e.conditions=[...this.conditions],e.tests=[...this.tests],e.transforms=[...this.transforms],e.spec=Je(Object.assign({},this.spec,t)),e}label(t){let e=this.clone();return e.spec.label=t,e}meta(...t){if(t.length===0)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},t[0]),e}withMutation(t){let e=this._mutate;this._mutate=!0;let s=t(this);return this._mutate=e,s}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let e=this,s=t.clone();const n=Object.assign({},e.spec,s.spec);return s.spec=n,s.internalTests=Object.assign({},e.internalTests,s.internalTests),s._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),s._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),s.tests=e.tests,s.exclusiveTests=e.exclusiveTests,s.withMutation(a=>{t.tests.forEach(o=>{a.test(o.OPTIONS)})}),s.transforms=[...e.transforms,...s.transforms],s}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let e=this;if(e.conditions.length){let s=e.conditions;e=e.clone(),e.conditions=[],e=s.reduce((n,a)=>a.resolve(n,t),e),e=e.resolve(t)}return e}resolveOptions(t){var e,s,n,a;return Object.assign({},t,{from:t.from||[],strict:(e=t.strict)!=null?e:this.spec.strict,abortEarly:(s=t.abortEarly)!=null?s:this.spec.abortEarly,recursive:(n=t.recursive)!=null?n:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,e={}){let s=this.resolve(Object.assign({value:t},e)),n=e.assert==="ignore-optionality",a=s._cast(t,e);if(e.assert!==!1&&!s.isType(a)){if(n&&Ve(a))return a;let o=ze(t),l=ze(a);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}".
27
27
 
28
28
  attempted value: ${o}
29
- `+(l!==o?`result of cast: ${l}`:""))}return a}_cast(t,e){let s=t===void 0?t:this.transforms.reduce((n,a)=>a.call(this,n,t,this),t);return s===void 0&&(s=this.getDefault(e)),s}_validate(t,e={},s,n){let{path:a,originalValue:o=t,strict:l=this.spec.strict}=e,c=t;l||(c=this._cast(c,Object.assign({assert:!1},e)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:a,value:c,originalValue:o,options:e,tests:u},s,f=>{if(f.length)return n(f,c);this.runTests({path:a,value:c,originalValue:o,options:e,tests:this.tests},s,n)})}runTests(t,e,s){let n=!1,{tests:a,value:o,originalValue:l,path:c,options:u}=t,f=j=>{n||(n=!0,e(j,o))},m=j=>{n||(n=!0,s(j,o))},p=a.length,b=[];if(!p)return m([]);let N={value:o,originalValue:l,path:c,options:u,schema:this};for(let j=0;j<a.length;j++){const T=a[j];T(N,f,function(y){y&&(Array.isArray(y)?b.push(...y):b.push(y)),--p<=0&&m(b)})}}asNestedTest({key:t,index:e,parent:s,parentPath:n,originalParent:a,options:o}){const l=t??e;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let u=s[l];const f=Object.assign({},o,{strict:!0,parent:s,value:u,originalValue:a[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${n||""}[${c?l:`"${l}"`}]`:(n?`${n}.`:"")+t});return(m,p,b)=>this.resolve(f)._validate(u,f,p,b)}validate(t,e){var s;let n=this.resolve(Object.assign({},e,{value:t})),a=(s=e==null?void 0:e.disableStackTrace)!=null?s:n.spec.disableStackTrace;return new Promise((o,l)=>n._validate(t,e,(c,u)=>{we.isError(c)&&(c.value=u),l(c)},(c,u)=>{c.length?l(new we(c,u,void 0,void 0,a)):o(u)}))}validateSync(t,e){var s;let n=this.resolve(Object.assign({},e,{value:t})),a,o=(s=e==null?void 0:e.disableStackTrace)!=null?s:n.spec.disableStackTrace;return n._validate(t,Object.assign({},e,{sync:!0}),(l,c)=>{throw we.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new we(l,t,void 0,void 0,o);a=c}),a}isValid(t,e){return this.validate(t,e).then(()=>!0,s=>{if(we.isError(s))return!1;throw s})}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(s){if(we.isError(s))return!1;throw s}}_getDefault(t){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this,t):Je(e)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,e){const s=this.clone({nullable:t});return s.internalTests.nullable=Xe({message:e,name:"nullable",test(n){return n===null?this.schema.spec.nullable:!0}}),s}optionality(t,e){const s=this.clone({optional:t});return s.internalTests.optionality=Xe({message:e,name:"optionality",test(n){return n===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(t=Te.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Te.notNull){return this.nullability(!1,t)}required(t=Te.required){return this.clone().withMutation(e=>e.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let e=this.clone();return e.transforms.push(t),e}test(...t){let e;if(t.length===1?typeof t[0]=="function"?e={test:t[0]}:e=t[0]:t.length===2?e={name:t[0],test:t[1]}:e={name:t[0],message:t[1],test:t[2]},e.message===void 0&&(e.message=Te.default),typeof e.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),n=Xe(e),a=e.exclusive||e.name&&s.exclusiveTests[e.name]===!0;if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(s.exclusiveTests[e.name]=!!e.exclusive),s.tests=s.tests.filter(o=>!(o.OPTIONS.name===e.name&&(a||o.OPTIONS.test===n.OPTIONS.test))),s.tests.push(n),s}when(t,e){!Array.isArray(t)&&typeof t!="string"&&(e=t,t=".");let s=this.clone(),n=Gs(t).map(a=>new Ge(a));return n.forEach(a=>{a.isSibling&&s.deps.push(a.key)}),s.conditions.push(typeof e=="function"?new Ft(n,e):Ft.fromOptions(n,e)),s}typeError(t){let e=this.clone();return e.internalTests.typeError=Xe({message:t,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=Te.oneOf){let s=this.clone();return t.forEach(n=>{s._whitelist.add(n),s._blacklist.delete(n)}),s.internalTests.whiteList=Xe({message:e,name:"oneOf",skipAbsent:!0,test(n){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(n)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),s}notOneOf(t,e=Te.notOneOf){let s=this.clone();return t.forEach(n=>{s._blacklist.add(n),s._whitelist.delete(n)}),s.internalTests.blacklist=Xe({message:e,name:"notOneOf",test(n){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(n)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),s}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:s,meta:n,optional:a,nullable:o}=e.spec;return{meta:n,label:s,optional:a,nullable:o,default:e.getDefault(t),type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,u,f)=>f.findIndex(m=>m.name===c.name)===u)}}}Ee.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])Ee.prototype[`${r}At`]=function(t,e,s={}){const{parent:n,parentPath:a,schema:o}=Jo(this,t,e,s.context);return o[r](n&&n[a],Object.assign({},s,{parent:n,path:t}))};for(const r of["equals","is"])Ee.prototype[r]=Ee.prototype.oneOf;for(const r of["not","nope"])Ee.prototype[r]=Ee.prototype.notOneOf;const Ko=()=>!0;function Jt(r){return new Js(r)}class Js extends Ee{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Ko},t))}}Jt.prototype=Js.prototype;const Qo=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ei(r){const t=Kt(r);if(!t)return Date.parse?Date.parse(r):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let e=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(e=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(e=0-e)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+e,t.second,t.millisecond)}function Kt(r){var t,e;const s=Qo.exec(r);return s?{year:Re(s[1]),month:Re(s[2],1)-1,day:Re(s[3],1),hour:Re(s[4]),minute:Re(s[5]),second:Re(s[6]),millisecond:s[7]?Re(s[7].substring(0,3)):0,precision:(t=(e=s[7])==null?void 0:e.length)!=null?t:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:Re(s[10]),minuteOffset:Re(s[11])}:null}function Re(r,t=0){return Number(r)||t}let ti=/^[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])?)*$/,ri=/^((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,si=/^(?:[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,ni="^\\d{4}-\\d{2}-\\d{2}",ai="\\d{2}:\\d{2}:\\d{2}",oi="(([+-]\\d{2}(:?\\d{2})?)|Z)",ii=new RegExp(`${ni}T${ai}(\\.\\d+)?${oi}$`),li=r=>Ve(r)||r===r.trim(),ci={}.toString();function Ks(){return new Qs}class Qs extends Ee{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,e,s)=>{if(!s.spec.coerce||s.isType(t)||Array.isArray(t))return t;const n=t!=null&&t.toString?t.toString():t;return n===ci?t:n})})}required(t){return super.required(t).withMutation(e=>e.test({message:t||Te.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(e=>e.OPTIONS.name!=="required"),t))}length(t,e=ve.length){return this.test({message:e,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(s){return s.length===this.resolve(t)}})}min(t,e=ve.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s.length>=this.resolve(t)}})}max(t,e=ve.max){return this.test({name:"max",exclusive:!0,message:e,params:{max:t},skipAbsent:!0,test(s){return s.length<=this.resolve(t)}})}matches(t,e){let s=!1,n,a;return e&&(typeof e=="object"?{excludeEmptyString:s=!1,message:n,name:a}=e:n=e),this.test({name:a||"matches",message:n||ve.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&s||o.search(t)!==-1})}email(t=ve.email){return this.matches(ti,{name:"email",message:t,excludeEmptyString:!0})}url(t=ve.url){return this.matches(ri,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ve.uuid){return this.matches(si,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let e="",s,n;return t&&(typeof t=="object"?{message:e="",allowOffset:s=!1,precision:n=void 0}=t:e=t),this.matches(ii,{name:"datetime",message:e||ve.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:e||ve.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:a=>{if(!a||s)return!0;const o=Kt(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:e||ve.datetime_precision,params:{precision:n},skipAbsent:!0,test:a=>{if(!a||n==null)return!0;const o=Kt(a);return o?o.precision===n:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ve.trim){return this.transform(e=>e!=null?e.trim():e).test({message:t,name:"trim",test:li})}lowercase(t=ve.lowercase){return this.transform(e=>Ve(e)?e:e.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Ve(e)||e===e.toLowerCase()})}uppercase(t=ve.uppercase){return this.transform(e=>Ve(e)?e:e.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Ve(e)||e===e.toUpperCase()})}}Ks.prototype=Qs.prototype;let di=r=>r!=+r;function en(){return new tn}class tn extends Ee{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!di(t)}}),this.withMutation(()=>{this.transform((t,e,s)=>{if(!s.spec.coerce)return t;let n=t;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(t,e=Le.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(t)}})}max(t,e=Le.max){return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(t)}})}lessThan(t,e=Le.lessThan){return this.test({message:e,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(s){return s<this.resolve(t)}})}moreThan(t,e=Le.moreThan){return this.test({message:e,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(s){return s>this.resolve(t)}})}positive(t=Le.positive){return this.moreThan(0,t)}negative(t=Le.negative){return this.lessThan(0,t)}integer(t=Le.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(t=>Ve(t)?t:t|0)}round(t){var e;let s=["ceil","floor","round","trunc"];if(t=((e=t)==null?void 0:e.toLowerCase())||"round",t==="trunc")return this.truncate();if(s.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+s.join(", "));return this.transform(n=>Ve(n)?n:Math[t](n))}}en.prototype=tn.prototype;let rn=new Date(""),ui=r=>Object.prototype.toString.call(r)==="[object Date]";function dr(){return new dt}class dt extends Ee{constructor(){super({type:"date",check(t){return ui(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,e,s)=>!s.spec.coerce||s.isType(t)||t===null?t:(t=ei(t),isNaN(t)?dt.INVALID_DATE:new Date(t)))})}prepareParam(t,e){let s;if(Ge.isRef(t))s=t;else{let n=this.cast(t);if(!this._typeCheck(n))throw new TypeError(`\`${e}\` must be a Date or a value that can be \`cast()\` to a Date`);s=n}return s}min(t,e=Xt.min){let s=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(s)}})}max(t,e=Xt.max){let s=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(s)}})}}dt.INVALID_DATE=rn;dr.prototype=dt.prototype;dr.INVALID_DATE=rn;function fi(r,t=[]){let e=[],s=new Set,n=new Set(t.map(([o,l])=>`${o}-${l}`));function a(o,l){let c=Ze.split(o)[0];s.add(c),n.has(`${l}-${c}`)||e.push([l,c])}for(const o of Object.keys(r)){let l=r[o];s.add(o),Ge.isRef(l)&&l.isSibling?a(l.path,o):cr(l)&&"deps"in l&&l.deps.forEach(c=>a(c,o))}return Po.array(Array.from(s),e).reverse()}function ts(r,t){let e=1/0;return r.some((s,n)=>{var a;if((a=t.path)!=null&&a.includes(s))return e=n,!0}),e}function sn(r){return(t,e)=>ts(r,t)-ts(r,e)}const hi=(r,t,e)=>{if(typeof r!="string")return r;let s=r;try{s=JSON.parse(r)}catch{}return e.isType(s)?s:r};function jt(r){if("fields"in r){const t={};for(const[e,s]of Object.entries(r.fields))t[e]=jt(s);return r.setFields(t)}if(r.type==="array"){const t=r.optional();return t.innerType&&(t.innerType=jt(t.innerType)),t}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(jt)}):"optional"in r?r.optional():r}const mi=(r,t)=>{const e=[...Ze.normalizePath(t)];if(e.length===1)return e[0]in r;let s=e.pop(),n=Ze.getter(Ze.join(e),!0)(r);return!!(n&&s in n)};let rs=r=>Object.prototype.toString.call(r)==="[object Object]";function ss(r,t){let e=Object.keys(r.fields);return Object.keys(t).filter(s=>e.indexOf(s)===-1)}const pi=sn([]);function nn(r){return new an(r)}class an extends Ee{constructor(t){super({type:"object",check(e){return rs(e)||typeof e=="function"}}),this.fields=Object.create(null),this._sortErrors=pi,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,e={}){var s;let n=super._cast(t,e);if(n===void 0)return this.getDefault(e);if(!this._typeCheck(n))return n;let a=this.fields,o=(s=e.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(n).filter(m=>!this._nodes.includes(m))),c={},u=Object.assign({},e,{parent:c,__validating:e.__validating||!1}),f=!1;for(const m of l){let p=a[m],b=m in n;if(p){let N,j=n[m];u.path=(e.path?`${e.path}.`:"")+m,p=p.resolve({value:j,context:e.context,parent:c});let T=p instanceof Ee?p.spec:void 0,w=T==null?void 0:T.strict;if(T!=null&&T.strip){f=f||m in n;continue}N=!e.__validating||!w?p.cast(n[m],u):n[m],N!==void 0&&(c[m]=N)}else b&&!o&&(c[m]=n[m]);(b!==m in c||c[m]!==n[m])&&(f=!0)}return f?c:n}_validate(t,e={},s,n){let{from:a=[],originalValue:o=t,recursive:l=this.spec.recursive}=e;e.from=[{schema:this,value:o},...a],e.__validating=!0,e.originalValue=o,super._validate(t,e,s,(c,u)=>{if(!l||!rs(u)){n(c,u);return}o=o||u;let f=[];for(let m of this._nodes){let p=this.fields[m];!p||Ge.isRef(p)||f.push(p.asNestedTest({options:e,key:m,parent:u,parentPath:e.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:e},s,m=>{n(m.sort(this._sortErrors).concat(c),u)})})}clone(t){const e=super.clone(t);return e.fields=Object.assign({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}concat(t){let e=super.concat(t),s=e.fields;for(let[n,a]of Object.entries(this.fields)){const o=s[n];s[n]=o===void 0?a:o}return e.withMutation(n=>n.setFields(s,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let e={};return this._nodes.forEach(s=>{var n;const a=this.fields[s];let o=t;(n=o)!=null&&n.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[s]})),e[s]=a&&"getDefault"in a?a.getDefault(o):void 0}),e}setFields(t,e){let s=this.clone();return s.fields=t,s._nodes=fi(t,e),s._sortErrors=sn(Object.keys(t)),e&&(s._excludedEdges=e),s}shape(t,e=[]){return this.clone().withMutation(s=>{let n=s._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),n=[...s._excludedEdges,...e]),s.setFields(Object.assign(s.fields,t),n)})}partial(){const t={};for(const[e,s]of Object.entries(this.fields))t[e]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(t)}deepPartial(){return jt(this)}pick(t){const e={};for(const s of t)this.fields[s]&&(e[s]=this.fields[s]);return this.setFields(e,this._excludedEdges.filter(([s,n])=>t.includes(s)&&t.includes(n)))}omit(t){const e=[];for(const s of Object.keys(this.fields))t.includes(s)||e.push(s);return this.pick(e)}from(t,e,s){let n=Ze.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return mi(a,t)&&(o=Object.assign({},a),s||delete o[t],o[e]=n(a)),o})}json(){return this.transform(hi)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||kt.exact,test(e){if(e==null)return!0;const s=ss(this.schema,e);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,e=kt.noUnknown){typeof t!="boolean"&&(e=t,t=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:e,test(n){if(n==null)return!0;const a=ss(this.schema,n);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return s.spec.noUnknown=t,s}unknown(t=!0,e=kt.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform(e=>{if(!e)return e;const s={};for(const n of Object.keys(e))s[t(n)]=e[n];return s})}camelCase(){return this.transformKeys(Pt.camelCase)}snakeCase(){return this.transformKeys(Pt.snakeCase)}constantCase(){return this.transformKeys(t=>Pt.snakeCase(t).toUpperCase())}describe(t){const e=(t?this.resolve(t):this).clone(),s=super.describe(t);s.fields={};for(const[a,o]of Object.entries(e.fields)){var n;let l=t;(n=l)!=null&&n.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[a]})),s.fields[a]=o.describe(l)}return s}}nn.prototype=an.prototype;function xi({fields:r,explicitSchema:t}){return v.useMemo(()=>{if(t)return Yr(t);const e={};r.forEach(n=>{var o,l,c,u,f,m,p;let a;switch(n.type){case"text":case"password":case"email":if(a=Ks(),(o=n.validation)!=null&&o.required){const b=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(b)}(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)),(u=n.validation)!=null&&u.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=en(),(f=n.validation)!=null&&f.required){const b=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(b)}break;case"select":case"optionGroup":if(a=Jt(),(m=n.validation)!=null&&m.required){const b=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(b)}break;case"date":if(a=dr(),(p=n.validation)!=null&&p.required){const b=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(b)}break;default:a=Jt()}e[n.name]=a});const s=nn().shape(e);return Yr(s)},[r,t])}function gi(r){return v.useMemo(()=>{const t={};return r.forEach(e=>{t[e.name]=e}),t},[r])}function bi(r){const t=v.useMemo(()=>r.filter(o=>o.type==="select"&&o.loadOptions),[r]),[e,s]=v.useState(t.length),[n,a]=v.useState({});return v.useEffect(()=>{t.length!==0&&t.forEach(o=>{o.loadOptions().then(l=>a(c=>({...c,[o.name]:l}))).finally(()=>s(l=>Math.max(0,l-1)))})},[t]),{loadingCount:e,optionsMap:n}}function yi(r,t){const e=v.useMemo(()=>r.filter(o=>o.disabledWhen),[r]),s=v.useMemo(()=>e.map(o=>o.disabledWhen.watchField),[e]),n=nr({control:t,name:s}),a={};return e.forEach(o=>{const l=s.indexOf(o.disabledWhen.watchField),c=n[l];a[o.name]=c===o.disabledWhen.watchValue}),a}const ns={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},vi={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function ur({control:r,name:t,rules:e,defaultValue:s,size:n="sm",width:a="100%",label:o,labelHidden:l=!1,hasError:c=!1,errorMessage:u="",maxLength:f,showCounter:m=!1,className:p,...b}){const N=v.useId(),j=t||N,[T,w]=v.useState(s||"");if(r&&t)return i.jsx(Se,{name:t,control:r,rules:e,defaultValue:s||"",render:({field:E,fieldState:M})=>{var F;return i.jsx(ur,{...b,size:n,width:a,label:o,labelHidden:l,hasError:!!M.error,errorMessage:((F=M.error)==null?void 0:F.message)||"",maxLength:f,showCounter:m,className:p,value:E.value,onChange:E.onChange})}});v.useEffect(()=>{w(s||"")},[s]);const y=E=>{var M;f!==void 0&&E.target.value.length>f||(w(E.target.value),(M=b.onChange)==null||M.call(b,E))};return i.jsxs("div",{className:L("flex flex-col",p),style:{width:a},children:[o&&i.jsx("label",{htmlFor:j,className:L("pb-2 text-[var(--color-ds-text-primary)]",ns[n],l&&"sr-only"),children:o}),i.jsx("textarea",{id:j,className:L("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",ns[n],vi[n],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",b.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:y,maxLength:f,...b}),i.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&u?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u}):i.jsx("span",{"aria-hidden":"true",children:" "}),m&&f!==void 0&&i.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[T.length,"/",f]})]})]})}const wi={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function on({control:r,name:t,rules:e,defaultValue:s=!1,label:n,labelHidden:a=!1,disabled:o=!1,size:l="sm",className:c,hasError:u=!1,errorMessage:f=""}){return i.jsx("div",{className:L("flex flex-col",c),children:i.jsx(Se,{name:t,control:r,rules:e,defaultValue:s,render:({field:m,fieldState:p})=>{const b=p.error;return i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:t,type:"checkbox",className:L(wi[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",o&&"opacity-50 cursor-not-allowed"),checked:m.value,onChange:N=>m.onChange(N.target.checked),disabled:o}),i.jsx("span",{className:L("text-[var(--color-ds-text-primary)] text-ds-md",o&&"text-[var(--color-ds-text-secondary)]"),children:n}),u&&(b==null?void 0:b.message)&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:b.message})]})}})})}function ln({name:r,control:t,searchFn:e,resolveByValue:s,label:n,size:a="sm",width:o="100%",disabled:l=!1}){const{watch:c,getValues:u,setValue:f}=ct(),m=nr({control:t,name:r}),[p,b]=v.useState([]),[N,j]=v.useState(!1),[T,w]=v.useState(!1),[y,E]=v.useState(""),M=v.useRef(null),F=v.useMemo(()=>{const $=new Map;for(const P of p)$.set(String(P.value),P.label??"");return $},[p]),B=async $=>{if($){j(!0);try{const P=await e($,{watch:c,getValues:u});b(P??[]),w(!0)}finally{j(!1)}}};v.useEffect(()=>{function $(P){M.current&&!M.current.contains(P.target)&&w(!1)}if(T)return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[T]),v.useEffect(()=>{const $=m?String(m):"";if(!$){E("");return}const P=F.get($);if(P){E(P);return}let R=!1;return(async()=>{if(s)try{const V=await s($);R||E((V==null?void 0:V.label)??$)}catch{R||E($)}else E($)})(),()=>{R=!0}},[m,F,s]);const X=a==="sm"?"text-ds-sm":a==="md"?"text-ds-md":"text-ds-lg",S=a==="sm"?"h-6":a==="md"?"h-10":"h-12";return i.jsx(Se,{name:r,control:t,render:({field:$,fieldState:P})=>{var R;return i.jsxs("div",{ref:M,className:"relative flex flex-col",style:{width:o},children:[n&&i.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${X}`,children:n}),i.jsx(Ot,{className:"rounded-r-none",type:"text",size:a,width:"100%",value:y,onChange:V=>{const H=V.target.value;E(H),f(r,"",{shouldDirty:!0})},disabled:l,hasError:P.invalid,errorMessage:(R=P.error)==null?void 0:R.message,onFocus:()=>y&&B(y),suffixButton:i.jsx($e,{type:"button",className:"!rounded-l-none",size:a,variant:"primary",onClick:()=>B(y),disabled:l,children:"Buscar"})}),N&&i.jsx("div",{className:"absolute top-14 left-0 right-0 z-10",children:i.jsx(qe,{width:"100%",height:a==="sm"?"1.5rem":a==="md"?"2.5rem":"3rem",variant:"rect",className:"rounded-lg"})}),T&&!N&&p.length>0&&i.jsx("ul",{className:`
29
+ `+(l!==o?`result of cast: ${l}`:""))}return a}_cast(t,e){let s=t===void 0?t:this.transforms.reduce((n,a)=>a.call(this,n,t,this),t);return s===void 0&&(s=this.getDefault(e)),s}_validate(t,e={},s,n){let{path:a,originalValue:o=t,strict:l=this.spec.strict}=e,c=t;l||(c=this._cast(c,Object.assign({assert:!1},e)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:a,value:c,originalValue:o,options:e,tests:u},s,f=>{if(f.length)return n(f,c);this.runTests({path:a,value:c,originalValue:o,options:e,tests:this.tests},s,n)})}runTests(t,e,s){let n=!1,{tests:a,value:o,originalValue:l,path:c,options:u}=t,f=j=>{n||(n=!0,e(j,o))},m=j=>{n||(n=!0,s(j,o))},p=a.length,b=[];if(!p)return m([]);let N={value:o,originalValue:l,path:c,options:u,schema:this};for(let j=0;j<a.length;j++){const T=a[j];T(N,f,function(y){y&&(Array.isArray(y)?b.push(...y):b.push(y)),--p<=0&&m(b)})}}asNestedTest({key:t,index:e,parent:s,parentPath:n,originalParent:a,options:o}){const l=t??e;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof l=="number";let u=s[l];const f=Object.assign({},o,{strict:!0,parent:s,value:u,originalValue:a[l],key:void 0,[c?"index":"key"]:l,path:c||l.includes(".")?`${n||""}[${c?l:`"${l}"`}]`:(n?`${n}.`:"")+t});return(m,p,b)=>this.resolve(f)._validate(u,f,p,b)}validate(t,e){var s;let n=this.resolve(Object.assign({},e,{value:t})),a=(s=e==null?void 0:e.disableStackTrace)!=null?s:n.spec.disableStackTrace;return new Promise((o,l)=>n._validate(t,e,(c,u)=>{we.isError(c)&&(c.value=u),l(c)},(c,u)=>{c.length?l(new we(c,u,void 0,void 0,a)):o(u)}))}validateSync(t,e){var s;let n=this.resolve(Object.assign({},e,{value:t})),a,o=(s=e==null?void 0:e.disableStackTrace)!=null?s:n.spec.disableStackTrace;return n._validate(t,Object.assign({},e,{sync:!0}),(l,c)=>{throw we.isError(l)&&(l.value=c),l},(l,c)=>{if(l.length)throw new we(l,t,void 0,void 0,o);a=c}),a}isValid(t,e){return this.validate(t,e).then(()=>!0,s=>{if(we.isError(s))return!1;throw s})}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(s){if(we.isError(s))return!1;throw s}}_getDefault(t){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this,t):Je(e)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,e){const s=this.clone({nullable:t});return s.internalTests.nullable=Xe({message:e,name:"nullable",test(n){return n===null?this.schema.spec.nullable:!0}}),s}optionality(t,e){const s=this.clone({optional:t});return s.internalTests.optionality=Xe({message:e,name:"optionality",test(n){return n===void 0?this.schema.spec.optional:!0}}),s}optional(){return this.optionality(!0)}defined(t=Te.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Te.notNull){return this.nullability(!1,t)}required(t=Te.required){return this.clone().withMutation(e=>e.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let e=this.clone();return e.transforms.push(t),e}test(...t){let e;if(t.length===1?typeof t[0]=="function"?e={test:t[0]}:e=t[0]:t.length===2?e={name:t[0],test:t[1]}:e={name:t[0],message:t[1],test:t[2]},e.message===void 0&&(e.message=Te.default),typeof e.test!="function")throw new TypeError("`test` is a required parameters");let s=this.clone(),n=Xe(e),a=e.exclusive||e.name&&s.exclusiveTests[e.name]===!0;if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(s.exclusiveTests[e.name]=!!e.exclusive),s.tests=s.tests.filter(o=>!(o.OPTIONS.name===e.name&&(a||o.OPTIONS.test===n.OPTIONS.test))),s.tests.push(n),s}when(t,e){!Array.isArray(t)&&typeof t!="string"&&(e=t,t=".");let s=this.clone(),n=Gs(t).map(a=>new Ge(a));return n.forEach(a=>{a.isSibling&&s.deps.push(a.key)}),s.conditions.push(typeof e=="function"?new Ct(n,e):Ct.fromOptions(n,e)),s}typeError(t){let e=this.clone();return e.internalTests.typeError=Xe({message:t,name:"typeError",skipAbsent:!0,test(s){return this.schema._typeCheck(s)?!0:this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=Te.oneOf){let s=this.clone();return t.forEach(n=>{s._whitelist.add(n),s._blacklist.delete(n)}),s.internalTests.whiteList=Xe({message:e,name:"oneOf",skipAbsent:!0,test(n){let a=this.schema._whitelist,o=a.resolveAll(this.resolve);return o.includes(n)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:o}})}}),s}notOneOf(t,e=Te.notOneOf){let s=this.clone();return t.forEach(n=>{s._blacklist.add(n),s._whitelist.delete(n)}),s.internalTests.blacklist=Xe({message:e,name:"notOneOf",test(n){let a=this.schema._blacklist,o=a.resolveAll(this.resolve);return o.includes(n)?this.createError({params:{values:Array.from(a).join(", "),resolved:o}}):!0}}),s}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:s,meta:n,optional:a,nullable:o}=e.spec;return{meta:n,label:s,optional:a,nullable:o,default:e.getDefault(t),type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,u,f)=>f.findIndex(m=>m.name===c.name)===u)}}}Ne.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])Ne.prototype[`${r}At`]=function(t,e,s={}){const{parent:n,parentPath:a,schema:o}=Jo(this,t,e,s.context);return o[r](n&&n[a],Object.assign({},s,{parent:n,path:t}))};for(const r of["equals","is"])Ne.prototype[r]=Ne.prototype.oneOf;for(const r of["not","nope"])Ne.prototype[r]=Ne.prototype.notOneOf;const Ko=()=>!0;function Qt(r){return new Js(r)}class Js extends Ne{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Ko},t))}}Qt.prototype=Js.prototype;const Qo=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function ei(r){const t=er(r);if(!t)return Date.parse?Date.parse(r):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let e=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(e=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(e=0-e)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+e,t.second,t.millisecond)}function er(r){var t,e;const s=Qo.exec(r);return s?{year:Re(s[1]),month:Re(s[2],1)-1,day:Re(s[3],1),hour:Re(s[4]),minute:Re(s[5]),second:Re(s[6]),millisecond:s[7]?Re(s[7].substring(0,3)):0,precision:(t=(e=s[7])==null?void 0:e.length)!=null?t:void 0,z:s[8]||void 0,plusMinus:s[9]||void 0,hourOffset:Re(s[10]),minuteOffset:Re(s[11])}:null}function Re(r,t=0){return Number(r)||t}let ti=/^[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])?)*$/,ri=/^((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,si=/^(?:[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,ni="^\\d{4}-\\d{2}-\\d{2}",ai="\\d{2}:\\d{2}:\\d{2}",oi="(([+-]\\d{2}(:?\\d{2})?)|Z)",ii=new RegExp(`${ni}T${ai}(\\.\\d+)?${oi}$`),li=r=>Ve(r)||r===r.trim(),ci={}.toString();function Ks(){return new Qs}class Qs extends Ne{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,e,s)=>{if(!s.spec.coerce||s.isType(t)||Array.isArray(t))return t;const n=t!=null&&t.toString?t.toString():t;return n===ci?t:n})})}required(t){return super.required(t).withMutation(e=>e.test({message:t||Te.required,name:"required",skipAbsent:!0,test:s=>!!s.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(e=>e.OPTIONS.name!=="required"),t))}length(t,e=ve.length){return this.test({message:e,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(s){return s.length===this.resolve(t)}})}min(t,e=ve.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s.length>=this.resolve(t)}})}max(t,e=ve.max){return this.test({name:"max",exclusive:!0,message:e,params:{max:t},skipAbsent:!0,test(s){return s.length<=this.resolve(t)}})}matches(t,e){let s=!1,n,a;return e&&(typeof e=="object"?{excludeEmptyString:s=!1,message:n,name:a}=e:n=e),this.test({name:a||"matches",message:n||ve.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&s||o.search(t)!==-1})}email(t=ve.email){return this.matches(ti,{name:"email",message:t,excludeEmptyString:!0})}url(t=ve.url){return this.matches(ri,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=ve.uuid){return this.matches(si,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let e="",s,n;return t&&(typeof t=="object"?{message:e="",allowOffset:s=!1,precision:n=void 0}=t:e=t),this.matches(ii,{name:"datetime",message:e||ve.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:e||ve.datetime_offset,params:{allowOffset:s},skipAbsent:!0,test:a=>{if(!a||s)return!0;const o=er(a);return o?!!o.z:!1}}).test({name:"datetime_precision",message:e||ve.datetime_precision,params:{precision:n},skipAbsent:!0,test:a=>{if(!a||n==null)return!0;const o=er(a);return o?o.precision===n:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=ve.trim){return this.transform(e=>e!=null?e.trim():e).test({message:t,name:"trim",test:li})}lowercase(t=ve.lowercase){return this.transform(e=>Ve(e)?e:e.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Ve(e)||e===e.toLowerCase()})}uppercase(t=ve.uppercase){return this.transform(e=>Ve(e)?e:e.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Ve(e)||e===e.toUpperCase()})}}Ks.prototype=Qs.prototype;let di=r=>r!=+r;function en(){return new tn}class tn extends Ne{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!di(t)}}),this.withMutation(()=>{this.transform((t,e,s)=>{if(!s.spec.coerce)return t;let n=t;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(t,e=Le.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(t)}})}max(t,e=Le.max){return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(t)}})}lessThan(t,e=Le.lessThan){return this.test({message:e,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(s){return s<this.resolve(t)}})}moreThan(t,e=Le.moreThan){return this.test({message:e,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(s){return s>this.resolve(t)}})}positive(t=Le.positive){return this.moreThan(0,t)}negative(t=Le.negative){return this.lessThan(0,t)}integer(t=Le.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(t=>Ve(t)?t:t|0)}round(t){var e;let s=["ceil","floor","round","trunc"];if(t=((e=t)==null?void 0:e.toLowerCase())||"round",t==="trunc")return this.truncate();if(s.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+s.join(", "));return this.transform(n=>Ve(n)?n:Math[t](n))}}en.prototype=tn.prototype;let rn=new Date(""),ui=r=>Object.prototype.toString.call(r)==="[object Date]";function fr(){return new ft}class ft extends Ne{constructor(){super({type:"date",check(t){return ui(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,e,s)=>!s.spec.coerce||s.isType(t)||t===null?t:(t=ei(t),isNaN(t)?ft.INVALID_DATE:new Date(t)))})}prepareParam(t,e){let s;if(Ge.isRef(t))s=t;else{let n=this.cast(t);if(!this._typeCheck(n))throw new TypeError(`\`${e}\` must be a Date or a value that can be \`cast()\` to a Date`);s=n}return s}min(t,e=Kt.min){let s=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(s)}})}max(t,e=Kt.max){let s=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(s)}})}}ft.INVALID_DATE=rn;fr.prototype=ft.prototype;fr.INVALID_DATE=rn;function fi(r,t=[]){let e=[],s=new Set,n=new Set(t.map(([o,l])=>`${o}-${l}`));function a(o,l){let c=Ze.split(o)[0];s.add(c),n.has(`${l}-${c}`)||e.push([l,c])}for(const o of Object.keys(r)){let l=r[o];s.add(o),Ge.isRef(l)&&l.isSibling?a(l.path,o):ur(l)&&"deps"in l&&l.deps.forEach(c=>a(c,o))}return Po.array(Array.from(s),e).reverse()}function ts(r,t){let e=1/0;return r.some((s,n)=>{var a;if((a=t.path)!=null&&a.includes(s))return e=n,!0}),e}function sn(r){return(t,e)=>ts(r,t)-ts(r,e)}const hi=(r,t,e)=>{if(typeof r!="string")return r;let s=r;try{s=JSON.parse(r)}catch{}return e.isType(s)?s:r};function Nt(r){if("fields"in r){const t={};for(const[e,s]of Object.entries(r.fields))t[e]=Nt(s);return r.setFields(t)}if(r.type==="array"){const t=r.optional();return t.innerType&&(t.innerType=Nt(t.innerType)),t}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(Nt)}):"optional"in r?r.optional():r}const mi=(r,t)=>{const e=[...Ze.normalizePath(t)];if(e.length===1)return e[0]in r;let s=e.pop(),n=Ze.getter(Ze.join(e),!0)(r);return!!(n&&s in n)};let rs=r=>Object.prototype.toString.call(r)==="[object Object]";function ss(r,t){let e=Object.keys(r.fields);return Object.keys(t).filter(s=>e.indexOf(s)===-1)}const pi=sn([]);function nn(r){return new an(r)}class an extends Ne{constructor(t){super({type:"object",check(e){return rs(e)||typeof e=="function"}}),this.fields=Object.create(null),this._sortErrors=pi,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,e={}){var s;let n=super._cast(t,e);if(n===void 0)return this.getDefault(e);if(!this._typeCheck(n))return n;let a=this.fields,o=(s=e.stripUnknown)!=null?s:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(n).filter(m=>!this._nodes.includes(m))),c={},u=Object.assign({},e,{parent:c,__validating:e.__validating||!1}),f=!1;for(const m of l){let p=a[m],b=m in n;if(p){let N,j=n[m];u.path=(e.path?`${e.path}.`:"")+m,p=p.resolve({value:j,context:e.context,parent:c});let T=p instanceof Ne?p.spec:void 0,w=T==null?void 0:T.strict;if(T!=null&&T.strip){f=f||m in n;continue}N=!e.__validating||!w?p.cast(n[m],u):n[m],N!==void 0&&(c[m]=N)}else b&&!o&&(c[m]=n[m]);(b!==m in c||c[m]!==n[m])&&(f=!0)}return f?c:n}_validate(t,e={},s,n){let{from:a=[],originalValue:o=t,recursive:l=this.spec.recursive}=e;e.from=[{schema:this,value:o},...a],e.__validating=!0,e.originalValue=o,super._validate(t,e,s,(c,u)=>{if(!l||!rs(u)){n(c,u);return}o=o||u;let f=[];for(let m of this._nodes){let p=this.fields[m];!p||Ge.isRef(p)||f.push(p.asNestedTest({options:e,key:m,parent:u,parentPath:e.path,originalParent:o}))}this.runTests({tests:f,value:u,originalValue:o,options:e},s,m=>{n(m.sort(this._sortErrors).concat(c),u)})})}clone(t){const e=super.clone(t);return e.fields=Object.assign({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}concat(t){let e=super.concat(t),s=e.fields;for(let[n,a]of Object.entries(this.fields)){const o=s[n];s[n]=o===void 0?a:o}return e.withMutation(n=>n.setFields(s,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let e={};return this._nodes.forEach(s=>{var n;const a=this.fields[s];let o=t;(n=o)!=null&&n.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[s]})),e[s]=a&&"getDefault"in a?a.getDefault(o):void 0}),e}setFields(t,e){let s=this.clone();return s.fields=t,s._nodes=fi(t,e),s._sortErrors=sn(Object.keys(t)),e&&(s._excludedEdges=e),s}shape(t,e=[]){return this.clone().withMutation(s=>{let n=s._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),n=[...s._excludedEdges,...e]),s.setFields(Object.assign(s.fields,t),n)})}partial(){const t={};for(const[e,s]of Object.entries(this.fields))t[e]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(t)}deepPartial(){return Nt(this)}pick(t){const e={};for(const s of t)this.fields[s]&&(e[s]=this.fields[s]);return this.setFields(e,this._excludedEdges.filter(([s,n])=>t.includes(s)&&t.includes(n)))}omit(t){const e=[];for(const s of Object.keys(this.fields))t.includes(s)||e.push(s);return this.pick(e)}from(t,e,s){let n=Ze.getter(t,!0);return this.transform(a=>{if(!a)return a;let o=a;return mi(a,t)&&(o=Object.assign({},a),s||delete o[t],o[e]=n(a)),o})}json(){return this.transform(hi)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Et.exact,test(e){if(e==null)return!0;const s=ss(this.schema,e);return s.length===0||this.createError({params:{properties:s.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,e=Et.noUnknown){typeof t!="boolean"&&(e=t,t=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:e,test(n){if(n==null)return!0;const a=ss(this.schema,n);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return s.spec.noUnknown=t,s}unknown(t=!0,e=Et.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform(e=>{if(!e)return e;const s={};for(const n of Object.keys(e))s[t(n)]=e[n];return s})}camelCase(){return this.transformKeys(Ut.camelCase)}snakeCase(){return this.transformKeys(Ut.snakeCase)}constantCase(){return this.transformKeys(t=>Ut.snakeCase(t).toUpperCase())}describe(t){const e=(t?this.resolve(t):this).clone(),s=super.describe(t);s.fields={};for(const[a,o]of Object.entries(e.fields)){var n;let l=t;(n=l)!=null&&n.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[a]})),s.fields[a]=o.describe(l)}return s}}nn.prototype=an.prototype;function xi({fields:r,explicitSchema:t}){return v.useMemo(()=>{if(t)return Yr(t);const e={};r.forEach(n=>{var o,l,c,u,f,m,p;let a;switch(n.type){case"text":case"password":case"email":if(a=Ks(),(o=n.validation)!=null&&o.required){const b=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(b)}(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)),(u=n.validation)!=null&&u.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=en(),(f=n.validation)!=null&&f.required){const b=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(b)}break;case"select":case"optionGroup":if(a=Qt(),(m=n.validation)!=null&&m.required){const b=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(b)}break;case"date":if(a=fr(),(p=n.validation)!=null&&p.required){const b=typeof n.validation.required=="string"?n.validation.required:"Campo obligatorio";a=a.required(b)}break;default:a=Qt()}e[n.name]=a});const s=nn().shape(e);return Yr(s)},[r,t])}function gi(r){return v.useMemo(()=>{const t={};return r.forEach(e=>{t[e.name]=e}),t},[r])}function bi(r){const t=v.useMemo(()=>r.filter(o=>o.type==="select"&&o.loadOptions),[r]),[e,s]=v.useState(t.length),[n,a]=v.useState({});return v.useEffect(()=>{t.length!==0&&t.forEach(o=>{o.loadOptions().then(l=>a(c=>({...c,[o.name]:l}))).finally(()=>s(l=>Math.max(0,l-1)))})},[t]),{loadingCount:e,optionsMap:n}}function yi(r,t){const e=v.useMemo(()=>r.filter(o=>o.disabledWhen),[r]),s=v.useMemo(()=>e.map(o=>o.disabledWhen.watchField),[e]),n=or({control:t,name:s}),a={};return e.forEach(o=>{const l=s.indexOf(o.disabledWhen.watchField),c=n[l];a[o.name]=c===o.disabledWhen.watchValue}),a}const ns={sm:"text-ds-sm",md:"text-ds-md",lg:"text-ds-lg"},vi={sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function hr({control:r,name:t,rules:e,defaultValue:s,size:n="sm",width:a="100%",label:o,labelHidden:l=!1,hasError:c=!1,errorMessage:u="",maxLength:f,showCounter:m=!1,className:p,...b}){const N=v.useId(),j=t||N,[T,w]=v.useState(s||"");if(r&&t)return i.jsx(Fe,{name:t,control:r,rules:e,defaultValue:s||"",render:({field:E,fieldState:M})=>{var F;return i.jsx(hr,{...b,size:n,width:a,label:o,labelHidden:l,hasError:!!M.error,errorMessage:((F=M.error)==null?void 0:F.message)||"",maxLength:f,showCounter:m,className:p,value:E.value,onChange:E.onChange})}});v.useEffect(()=>{w(s||"")},[s]);const y=E=>{var M;f!==void 0&&E.target.value.length>f||(w(E.target.value),(M=b.onChange)==null||M.call(b,E))};return i.jsxs("div",{className:I("flex flex-col",p),style:{width:a},children:[o&&i.jsx("label",{htmlFor:j,className:I("pb-2 text-[var(--color-ds-text-primary)]",ns[n],l&&"sr-only"),children:o}),i.jsx("textarea",{id:j,className:I("box-border bg-[var(--color-ds-background-page)] w-full resize vertical rounded-lg border outline-none transition font-[var(--font-primary)]",ns[n],vi[n],c?"border-[var(--color-ds-border-error)]":"border-[var(--color-ds-border-default)]",b.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:y,maxLength:f,...b}),i.jsxs("div",{className:"flex justify-between pt-1 min-h-[18px]",children:[c&&u?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u}):i.jsx("span",{"aria-hidden":"true",children:" "}),m&&f!==void 0&&i.jsxs("span",{className:"text-xs text-[var(--color-ds-text-secondary)]",children:[T.length,"/",f]})]})]})}const wi={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"};function on({control:r,name:t,rules:e,defaultValue:s=!1,label:n,labelHidden:a=!1,disabled:o=!1,size:l="sm",className:c,hasError:u=!1,errorMessage:f=""}){return i.jsx("div",{className:I("flex flex-col",c),children:i.jsx(Fe,{name:t,control:r,rules:e,defaultValue:s,render:({field:m,fieldState:p})=>{const b=p.error;return i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("input",{id:t,type:"checkbox",className:I(wi[l],"text-[var(--color-ds-button-primary-bg)]","border-[var(--color-ds-border-default)]",o&&"opacity-50 cursor-not-allowed"),checked:m.value,onChange:N=>m.onChange(N.target.checked),disabled:o}),i.jsx("span",{className:I("text-[var(--color-ds-text-primary)] text-ds-md",o&&"text-[var(--color-ds-text-secondary)]"),children:n}),u&&(b==null?void 0:b.message)&&i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:b.message})]})}})})}function ln({name:r,control:t,searchFn:e,resolveByValue:s,label:n,size:a="sm",width:o="100%",disabled:l=!1}){const{watch:c,getValues:u,setValue:f}=ut(),m=or({control:t,name:r}),[p,b]=v.useState([]),[N,j]=v.useState(!1),[T,w]=v.useState(!1),[y,E]=v.useState(""),M=v.useRef(null),F=v.useMemo(()=>{const $=new Map;for(const P of p)$.set(String(P.value),P.label??"");return $},[p]),W=async $=>{if($){j(!0);try{const P=await e($,{watch:c,getValues:u});b(P??[]),w(!0)}finally{j(!1)}}};v.useEffect(()=>{function $(P){M.current&&!M.current.contains(P.target)&&w(!1)}if(T)return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[T]),v.useEffect(()=>{const $=m?String(m):"";if(!$){E("");return}const P=F.get($);if(P){E(P);return}let R=!1;return(async()=>{if(s)try{const V=await s($);R||E((V==null?void 0:V.label)??$)}catch{R||E($)}else E($)})(),()=>{R=!0}},[m,F,s]);const J=a==="sm"?"text-ds-sm":a==="md"?"text-ds-md":"text-ds-lg",S=a==="sm"?"h-6":a==="md"?"h-10":"h-12";return i.jsx(Fe,{name:r,control:t,render:({field:$,fieldState:P})=>{var R;return i.jsxs("div",{ref:M,className:"relative flex flex-col",style:{width:o},children:[n&&i.jsx("label",{className:`pb-2 text-[var(--color-ds-text-primary)] ${J}`,children:n}),i.jsx(Mt,{className:"rounded-r-none",type:"text",size:a,width:"100%",value:y,onChange:V=>{const H=V.target.value;E(H),f(r,"",{shouldDirty:!0})},disabled:l,hasError:P.invalid,errorMessage:(R=P.error)==null?void 0:R.message,onFocus:()=>y&&W(y),suffixButton:i.jsx($e,{type:"button",className:"!rounded-l-none",size:a,variant:"primary",onClick:()=>W(y),disabled:l,children:"Buscar"})}),N&&i.jsx("div",{className:"absolute top-14 left-0 right-0 z-10",children:i.jsx(qe,{width:"100%",height:a==="sm"?"1.5rem":a==="md"?"2.5rem":"3rem",variant:"rect",className:"rounded-lg"})}),T&&!N&&p.length>0&&i.jsx("ul",{className:`
30
30
  absolute top-14 left-0 right-0
31
31
  border-[var(--color-ds-border-default)]
32
32
  rounded-lg bg-[var(--color-ds-background-page)]
33
- shadow-lg ${X} max-h-48 overflow-auto z-10
33
+ shadow-lg ${J} max-h-48 overflow-auto z-10
34
34
  `,children:p.map(V=>i.jsx("li",{className:`px-2 ${S} flex items-center cursor-pointer
35
35
  text-[var(--color-ds-text-primary)]
36
- hover:bg-[var(--color-ds-background-surface)]`,onClick:()=>{f(r,String(V.value),{shouldDirty:!0,shouldValidate:!0}),E(V.label??String(V.value)),w(!1)},children:V.label},String(V.value)))})]})}})}function ki({schema:r}){const{layout:t,fields:e,onSubmit:s,successMessage:n,errorMessage:a,footerButtons:o,defaultValues:l,loadDefaultValues:c,validationSchema:u}=r,{show:f}=Zs(),{t:m}=ir(),p=xi({fields:e,explicitSchema:u}),b=Ja({resolver:p,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),N=v.useMemo(()=>({getValues:b.getValues,watch:b.watch}),[b.getValues,b.watch]),{control:j,reset:T,watch:w,handleSubmit:y,formState:{errors:E,isSubmitting:M}}=b,[F,B]=v.useState(!1);v.useEffect(()=>{c&&(B(!0),c().then(Y=>T(Y)).finally(()=>B(!1)))},[c,T]);const{loadingCount:X,optionsMap:S}=bi(e),$=gi(e),P=yi(e,j),R=v.useMemo(()=>{const Y={};return t.forEach((g,J)=>{g.type==="tabs"&&(Y[J]=g.tabs[0].key)}),Y},[t]),[V,H]=v.useState(R),K=v.useCallback(Y=>{if(F)return!1;const g=b.getValues(),{watchField:J,watchValue:h}=Y;return typeof h=="function"?h(g):g[J]===h},[b,F]),Q=v.useMemo(()=>e.filter(Y=>"clearWhen"in Y&&Y.clearWhen).map(Y=>({name:Y.name,rule:Y.clearWhen})),[e]);v.useEffect(()=>{if(!Q.length)return;const Y=J=>{Q.forEach(({name:h,rule:_})=>{if(!(_.watchField in J)||J[_.watchField]===void 0)return;if(typeof _.watchValue=="function"?_.watchValue(J):J[_.watchField]===_.watchValue){const W=_.clearTo??"";J[h]!==W&&b.setValue(h,W,{shouldDirty:!0,shouldValidate:!0})}})},g=b.watch((J,h)=>{if(!(h!=null&&h.name)||!Q.some(({rule:W})=>W.watchField===h.name))return;const D=b.getValues();Y(D)});return()=>{var J;return(J=g==null?void 0:g.unsubscribe)==null?void 0:J.call(g)}},[b,Q]);const se=v.useCallback(Y=>{var W,te,ie,me;let g;if(typeof Y=="string"){if(g=$[Y],!g)return null}else g=Y;if("visibleWhen"in g&&g.visibleWhen&&!K(g.visibleWhen))return null;let J=!!g.disabled;if("disabledWhen"in g&&g.disabledWhen&&K(g.disabledWhen)&&(J=!0),!J&&"name"in g&&g.name&&P[g.name]&&(J=!0),g.type==="search"){const Z=re=>g.searchFn(re,N);return i.jsx(ln,{name:g.name,control:j,searchFn:Z,label:g.label,size:g.size,width:g.width,disabled:J||M},g.name)}if(g.type==="inputGroup"){const Z=g,re=Z.inputs.map(le=>{var ut;const ne=typeof le=="string"?$[le]:le;if(!ne)return null;let ye=!!ne.disabled;ne.disabledWhen&&K(ne.disabledWhen)&&(ye=!0),!ye&&P[ne.name]&&(ye=!0);const Fe={name:ne.name,control:j,rules:ne.validation,defaultValue:void 0,label:ne.label,size:ne.size,width:ne.width,placeholder:ne.placeholder,hasError:!!E[ne.name],errorMessage:((ut=E[ne.name])==null?void 0:ut.message)||"",loading:F,disabled:ye,suffixButton:ne.suffixButton};return ne.type==="select"?{...Fe,options:ne.options??S[ne.name]??[],loadOptions:ne.options?void 0:ne.loadOptions}:Fe}).filter(le=>le!==null);return i.jsx(zs,{groupLabel:Z.groupLabel,inputs:re,separator:Z.separator,useSeparator:Z.useSeparator,className:Z.className,showVisibleLabel:Z.showVisibleLabel,size:Z.size},`inputGroup_${Z.groupLabel}`)}if(g.type==="button"){const Z=g;return i.jsx("div",{className:"self-center",children:i.jsx($e,{type:"button",variant:Z.variant,size:Z.size,width:Z.width,icon:Z.icon,iconPosition:Z.iconPosition,ariaLabel:Z.ariaLabel,onClick:Z.onClick,disabled:J||M,children:Z.label})},Z.name)}const h=g.suffixButton,_=typeof h=="string"?se(h):h,D={name:g.name,control:j,disabled:J||M,label:g.label,size:g.size,width:g.width,placeholder:g.placeholder,info:g.info,suffixButton:_};switch(g.type){case"select":return i.jsx(Se,{name:g.name,control:j,render:({field:Z})=>{var re;return i.jsx(it,{...D,value:Z.value,onChange:Z.onChange,options:g.options??S[g.name]??[],loadOptions:g.options?void 0:g.loadOptions,hasError:!!E[g.name],errorMessage:(re=E[g.name])==null?void 0:re.message,suffixButton:_})}},g.name);case"textarea":return i.jsx(Se,{name:g.name,control:j,render:({field:Z,fieldState:re})=>{var le;return i.jsx(ur,{...D,value:Z.value,onChange:Z.onChange,maxLength:g.maxLength,showCounter:!!g.showCounter,hasError:!!re.error,errorMessage:((le=re.error)==null?void 0:le.message)||""})}},g.name);case"file":return i.jsx(Is,{...D,defaultValue:[],maxFiles:g.maxFiles,accept:g.accept,hasError:!!E[g.name],errorMessage:(W=E[g.name])==null?void 0:W.message},g.name);case"checkbox":return i.jsx(on,{...D,defaultValue:!1,hasError:!!E[g.name],errorMessage:(te=E[g.name])==null?void 0:te.message,name:g.name},g.name);case"date":return i.jsx(Vs,{...D,defaultValue:"",showTime:!!g.showTime,hasError:!!E[g.name],errorMessage:(ie=E[g.name])==null?void 0:ie.message},g.name);case"optionGroup":return i.jsx(Us,{...D,options:g.options||[],multiple:g.multiple,vertical:g.vertical,groupLabel:g.groupLabel,defaultValue:g.defaultValue,className:g.width?void 0:"w-full",name:g.name},g.name);default:return i.jsx(lr,{...D,type:g.type,loadingDefaults:F,hasError:!!E[g.name],errorMessage:(me=E[g.name])==null?void 0:me.message,suffixButton:_,name:g.name},g.name)}},[$,j,E,M,F,S,K,P]);return i.jsx($a,{...b,children:i.jsxs("form",{noValidate:!0,onSubmit:y(async Y=>{await s(Y),f(n??m("ds.form.saveSuccess"),"success")},Y=>{console.log("❌ errores de validación:",Y),_o(Y),f(a??m("ds.form.saveError"),"error")}),className:"space-y-6",children:[t.map((Y,g)=>Y.type==="rows"?i.jsx(v.Fragment,{children:Y.sections.map((J,h)=>i.jsx("div",{className:"mb-6",children:i.jsx(zt,{title:J.sectionTitle,defaultOpen:J.defaultOpen,children:J.rows.map((_,D)=>i.jsxs("div",{children:[_.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:_.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:_.columns.map((W,te)=>{var ie;return i.jsx("div",{className:`${W.width} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:W.fields?W.fields.map(me=>se(me)):(ie=W.rows)==null?void 0:ie.map((me,Z)=>i.jsx("div",{className:"mb-1",children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:me.columns.map((re,le)=>{var ne;return i.jsx("div",{className:`${re.width} px-2`,children:(ne=re.fields)==null?void 0:ne.map(ye=>se(ye))},le)})})},Z))})},te)})})]},D))})},h))},g):i.jsx(Ps,{options:Y.tabs.map(J=>({label:J.label,value:J.key})),value:V[g],onChange:J=>H(h=>({...h,[g]:J})),children:Object.fromEntries(Y.tabs.map(J=>[J.key,i.jsx("div",{className:"space-y-6",children:J.sections.map((h,_)=>i.jsx("div",{className:"mb-6",children:i.jsx(zt,{title:h.sectionTitle,defaultOpen:h.defaultOpen,children:h.rows.map((D,W)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:D.columns.map((te,ie)=>{var me;return i.jsx("div",{className:`${te.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(me=te.fields)==null?void 0:me.map((Z,re)=>i.jsx(v.Fragment,{children:se(Z)},re))})},ie)})})},W))})},_))},J.key)]))},g)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:o??i.jsx($e,{type:"submit",variant:"primary",icon:Mn,size:"sm",disabled:M||F||X>0,children:m(M?"ds.form.sending":"ds.form.submit")})})]})})}const ji={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function cn({icon:r,size:t="md",ariaLabel:e,disabled:s=!1,onClick:n,...a}){return i.jsx("button",{type:"button","aria-label":e,disabled:s,onClick:n,className:L("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",ji[t],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...a,children:i.jsx(r,{className:L(t==="sm"?"h-4 w-4":t==="md"?"h-5 w-5":"h-6 w-6")})})}function dn({dark:r,onToggle:t}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:t,className:L("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:i.jsxs("div",{className:L("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[i.jsx(Ce,{component:Kn,size:"sm",className:L("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(Ce,{component:Xn,size:"sm",className:L("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const un=v.createContext({theme:"light",toggle:()=>{}});function Ei({children:r}){const[t,e]=v.useState(!1),[s,n]=v.useState("light");v.useEffect(()=>{if(typeof window>"u")return;const o=localStorage.getItem("ds-theme");o==="light"||o==="dark"?n(o):window.matchMedia("(prefers-color-scheme: dark)").matches&&n("dark"),e(!0)},[]),v.useEffect(()=>{t&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,t]);const a=()=>n(o=>o==="light"?"dark":"light");return t?i.jsx(un.Provider,{value:{theme:s,toggle:a},children:r}):null}const fn=()=>v.useContext(un),hn=({pinnedPages:r,onRemovePinned:t,onBack:e,dark:s,locale:n,languageOptions:a,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:u})=>{const f=r.slice(0,3),{toggle:m}=fn(),{t:p,i18n:b}=ir(),N=j=>{b.changeLanguage(j),o(j)};return i.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[i.jsx("div",{className:"flex items-center space-x-2",children:f.map(j=>i.jsxs("div",{className:"flex items-center",children:[i.jsx("a",{href:j.href,className:L("inline-flex items-center rounded-lg","py-1 px-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:j.label}),i.jsx(cn,{icon:Qt,size:"sm",ariaLabel:`${p("remove")} ${j.label}`,onClick:()=>t(j.id)})]},j.id))}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(it,{size:"sm",width:"auto",options:a,value:n,onChange:N,disableErrorPlaceholder:!0}),i.jsx(it,{size:"sm",width:"auto",options:c,value:l,onChange:u,disableErrorPlaceholder:!0}),i.jsx(dn,{dark:s,onToggle:m})]})]})},Ni=({loading:r=!1,ariaLabel:t="Cargando..."})=>r?i.jsxs("div",{className:`\r
36
+ hover:bg-[var(--color-ds-background-surface)]`,onClick:()=>{f(r,String(V.value),{shouldDirty:!0,shouldValidate:!0}),E(V.label??String(V.value)),w(!1)},children:V.label},String(V.value)))})]})}})}function ki({schema:r}){const{layout:t,fields:e,onSubmit:s,successMessage:n,errorMessage:a,footerButtons:o,defaultValues:l,loadDefaultValues:c,validationSchema:u}=r,{show:f}=Zs(),{t:m}=cr(),p=xi({fields:e,explicitSchema:u}),b=Ja({resolver:p,mode:"onBlur",reValidateMode:"onChange",defaultValues:l??{}}),N=v.useMemo(()=>({getValues:b.getValues,watch:b.watch}),[b.getValues,b.watch]),{control:j,reset:T,watch:w,handleSubmit:y,formState:{errors:E,isSubmitting:M}}=b,[F,W]=v.useState(!1);v.useEffect(()=>{c&&(W(!0),c().then(Y=>T(Y)).finally(()=>W(!1)))},[c,T]);const{loadingCount:J,optionsMap:S}=bi(e),$=gi(e),P=yi(e,j),R=v.useMemo(()=>{const Y={};return t.forEach((x,X)=>{x.type==="tabs"&&(Y[X]=x.tabs[0].key)}),Y},[t]),[V,H]=v.useState(R),K=v.useCallback(Y=>{if(F)return!1;const x=b.getValues(),{watchField:X,watchValue:h}=Y;return!(X in x)||x[X]===void 0?!1:typeof h=="function"?h(x):x[X]===h},[b,F]),Q=v.useMemo(()=>e.filter(Y=>"clearWhen"in Y&&Y.clearWhen).map(Y=>({name:Y.name,rule:Y.clearWhen})),[e]);v.useEffect(()=>{if(!Q.length)return;const Y=X=>{Q.forEach(({name:h,rule:_})=>{if(!(_.watchField in X)||X[_.watchField]===void 0)return;if(typeof _.watchValue=="function"?_.watchValue(X):X[_.watchField]===_.watchValue){const B=_.clearTo??"";X[h]!==B&&b.setValue(h,B,{shouldDirty:!0,shouldValidate:!0})}})},x=b.watch((X,h)=>{if(!(h!=null&&h.name)||!Q.some(({rule:B})=>B.watchField===h.name))return;const L=b.getValues();Y(L)});return()=>{var X;return(X=x==null?void 0:x.unsubscribe)==null?void 0:X.call(x)}},[b,Q]);const re=v.useCallback(Y=>{var te,le,pe,se;let x;if(typeof Y=="string"){if(x=$[Y],!x)return null}else x=Y;if("visibleWhen"in x&&x.visibleWhen&&!K(x.visibleWhen))return null;let X=!!x.disabled;const h="disabledWhen"in x&&!!x.disabledWhen;if(h&&(K(x.disabledWhen)?X=!0:X=!1),!h&&"name"in x&&x.name&&P[x.name]&&(X=!0),x.type==="search"){const q=ie=>x.searchFn(ie,N);return i.jsx(ln,{name:x.name,control:j,searchFn:q,label:x.label,size:x.size,width:x.width,disabled:X||M},x.name)}if(x.type==="inputGroup"){const q=x,ie=q.inputs.map(de=>{var tt;const ne=typeof de=="string"?$[de]:de;if(!ne)return null;let je=!!ne.disabled;const ht="disabledWhen"in ne&&!!ne.disabledWhen;ht&&(K(ne.disabledWhen)?je=!0:je=!1),!ht&&P[ne.name]&&(je=!0);const et={name:ne.name,control:j,rules:ne.validation,defaultValue:void 0,label:ne.label,size:ne.size,width:ne.width,placeholder:ne.placeholder,hasError:!!E[ne.name],errorMessage:((tt=E[ne.name])==null?void 0:tt.message)||"",loading:F,disabled:je,suffixButton:ne.suffixButton};return ne.type==="select"?{...et,options:ne.options??S[ne.name]??[],loadOptions:ne.options?void 0:ne.loadOptions}:et}).filter(de=>de!==null);return i.jsx(zs,{groupLabel:q.groupLabel,inputs:ie,separator:q.separator,useSeparator:q.useSeparator,className:q.className,showVisibleLabel:q.showVisibleLabel,size:q.size},`inputGroup_${q.groupLabel}`)}if(x.type==="button"){const q=x;return i.jsx("div",{className:"self-center",children:i.jsx($e,{type:"button",variant:q.variant,size:q.size,width:q.width,icon:q.icon,iconPosition:q.iconPosition,ariaLabel:q.ariaLabel,onClick:q.onClick,disabled:X||M,children:q.label})},q.name)}const _=x.suffixButton,L=typeof _=="string"?re(_):_,B={name:x.name,control:j,disabled:X||M,label:x.label,size:x.size,width:x.width,placeholder:x.placeholder,info:x.info,suffixButton:L};switch(x.type){case"select":return i.jsx(Fe,{name:x.name,control:j,render:({field:q})=>{var ie;return i.jsx(ct,{...B,value:q.value,onChange:q.onChange,options:x.options??S[x.name]??[],loadOptions:x.options?void 0:x.loadOptions,hasError:!!E[x.name],errorMessage:(ie=E[x.name])==null?void 0:ie.message,suffixButton:L})}},x.name);case"textarea":return i.jsx(Fe,{name:x.name,control:j,render:({field:q,fieldState:ie})=>{var de;return i.jsx(hr,{...B,value:q.value,onChange:q.onChange,maxLength:x.maxLength,showCounter:!!x.showCounter,hasError:!!ie.error,errorMessage:((de=ie.error)==null?void 0:de.message)||""})}},x.name);case"file":return i.jsx(Is,{...B,defaultValue:[],maxFiles:x.maxFiles,accept:x.accept,hasError:!!E[x.name],errorMessage:(te=E[x.name])==null?void 0:te.message},x.name);case"checkbox":return i.jsx(on,{...B,defaultValue:!1,hasError:!!E[x.name],errorMessage:(le=E[x.name])==null?void 0:le.message,name:x.name},x.name);case"date":return i.jsx(Vs,{...B,defaultValue:"",showTime:!!x.showTime,hasError:!!E[x.name],errorMessage:(pe=E[x.name])==null?void 0:pe.message},x.name);case"optionGroup":return i.jsx(Us,{...B,options:x.options||[],multiple:x.multiple,vertical:x.vertical,groupLabel:x.groupLabel,defaultValue:x.defaultValue,className:x.width?void 0:"w-full",name:x.name},x.name);default:return i.jsx(dr,{...B,type:x.type,loadingDefaults:F,hasError:!!E[x.name],errorMessage:(se=E[x.name])==null?void 0:se.message,suffixButton:L,name:x.name},x.name)}},[$,j,E,M,F,S,K,P]);return i.jsx($a,{...b,children:i.jsxs("form",{noValidate:!0,onSubmit:y(async Y=>{await s(Y),f(n??m("ds.form.saveSuccess"),"success")},Y=>{console.log("❌ errores de validación:",Y),_o(Y),f(a??m("ds.form.saveError"),"error")}),className:"space-y-6",children:[t.map((Y,x)=>Y.type==="rows"?i.jsx(v.Fragment,{children:Y.sections.map((X,h)=>i.jsx("div",{className:"mb-6",children:i.jsx(Bt,{title:X.sectionTitle,defaultOpen:X.defaultOpen,children:X.rows.map((_,L)=>i.jsxs("div",{children:[_.title&&i.jsx("h2",{className:"mb-2 text-lg text-[var(--color-ds-text-primary)]",children:_.title}),i.jsx("div",{className:"flex flex-wrap -mx-2",children:_.columns.map((B,te)=>{var le;return i.jsx("div",{className:`${B.width} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:B.fields?B.fields.map(pe=>re(pe)):(le=B.rows)==null?void 0:le.map((pe,se)=>i.jsx("div",{className:"mb-1",children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:pe.columns.map((q,ie)=>{var de;return i.jsx("div",{className:`${q.width} px-2`,children:(de=q.fields)==null?void 0:de.map(ne=>re(ne))},ie)})})},se))})},te)})})]},L))})},h))},x):i.jsx(Ps,{options:Y.tabs.map(X=>({label:X.label,value:X.key})),value:V[x],onChange:X=>H(h=>({...h,[x]:X})),children:Object.fromEntries(Y.tabs.map(X=>[X.key,i.jsx("div",{className:"space-y-6",children:X.sections.map((h,_)=>i.jsx("div",{className:"mb-6",children:i.jsx(Bt,{title:h.sectionTitle,defaultOpen:h.defaultOpen,children:h.rows.map((L,B)=>i.jsx("div",{children:i.jsx("div",{className:"flex flex-wrap -mx-2",children:L.columns.map((te,le)=>{var pe;return i.jsx("div",{className:`${te.width??"flex-1"} px-2 flex flex-col`,children:i.jsx("div",{className:"space-y-4",children:(pe=te.fields)==null?void 0:pe.map((se,q)=>i.jsx(v.Fragment,{children:re(se)},q))})},le)})})},B))})},_))},X.key)]))},x)),i.jsx("footer",{className:"py-4 w-full flex justify-center space-x-4",children:o??i.jsx($e,{type:"submit",variant:"primary",icon:Mn,size:"sm",disabled:M||F||J>0,children:m(M?"ds.form.sending":"ds.form.submit")})})]})})}const ji={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"};function cn({icon:r,size:t="md",ariaLabel:e,disabled:s=!1,onClick:n,...a}){return i.jsx("button",{type:"button","aria-label":e,disabled:s,onClick:n,className:I("inline-flex items-center justify-center","rounded-full","bg-transparent","text-[var(--color-ds-text-primary)]","transition-transform","focus:outline-none",ji[t],s?"opacity-50 cursor-not-allowed":["hover:scale-110","hover:animate-pulse"]),...a,children:i.jsx(r,{className:I(t==="sm"?"h-4 w-4":t==="md"?"h-5 w-5":"h-6 w-6")})})}function dn({dark:r,onToggle:t}){return i.jsx("button",{type:"button","aria-pressed":r,"aria-label":r?"Cambiar a modo claro":"Cambiar a modo oscuro",onClick:t,className:I("relative inline-flex items-center transition-colors focus:outline-none duration-200 ease-in-out","bg-[var(--color-ds-background-accent)]","h-6 w-12 rounded-full"),children:i.jsxs("div",{className:I("absolute bg-[var(--color-ds-background-page)] flex items-center justify-center rounded-full transition-transform duration-200 ease-in-out","h-5 w-5",r?"translate-x-6":"translate-x-1"),children:[i.jsx(Ce,{component:Kn,size:"sm",className:I("absolute transition-opacity duration-200 ease-in-out",r?"opacity-0":"opacity-100 text-[var(--color-ds-background-accent)]")}),i.jsx(Ce,{component:Xn,size:"sm",className:I("absolute transition-opacity duration-200 ease-in-out",r?"opacity-100 text-[var(--color-ds-background-accent)]":"opacity-0")})]})})}const un=v.createContext({theme:"light",toggle:()=>{}});function Ei({children:r}){const[t,e]=v.useState(!1),[s,n]=v.useState("light");v.useEffect(()=>{if(typeof window>"u")return;const o=localStorage.getItem("ds-theme");o==="light"||o==="dark"?n(o):window.matchMedia("(prefers-color-scheme: dark)").matches&&n("dark"),e(!0)},[]),v.useEffect(()=>{t&&(document.documentElement.classList.toggle("dark",s==="dark"),s==="dark"?localStorage.setItem("ds-theme","dark"):localStorage.removeItem("ds-theme"))},[s,t]);const a=()=>n(o=>o==="light"?"dark":"light");return t?i.jsx(un.Provider,{value:{theme:s,toggle:a},children:r}):null}const fn=()=>v.useContext(un),hn=({pinnedPages:r,onRemovePinned:t,onBack:e,dark:s,locale:n,languageOptions:a,onChangeLocale:o,profile:l,profileOptions:c,onChangeProfile:u})=>{const f=r.slice(0,3),{toggle:m}=fn(),{t:p,i18n:b}=cr(),N=j=>{b.changeLanguage(j),o(j)};return i.jsxs("header",{className:"flex items-center bg-[var(--color-ds-background-page)] py-2",children:[i.jsx("div",{className:"flex items-center space-x-2",children:f.map(j=>i.jsxs("div",{className:"flex items-center",children:[i.jsx("a",{href:j.href,className:I("inline-flex items-center rounded-lg","py-1 px-1 my-1 text-ds-sm","bg-transparent text-[var(--color-ds-text-primary)]","transition-colors duration-200 ease-in-out","hover:bg-[var(--color-ds-border-muted)] hover:animate-pulse"),children:j.label}),i.jsx(cn,{icon:tr,size:"sm",ariaLabel:`${p("remove")} ${j.label}`,onClick:()=>t(j.id)})]},j.id))}),i.jsx("div",{className:"flex-grow"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(ct,{size:"sm",width:"auto",options:a,value:n,onChange:N,disableErrorPlaceholder:!0}),i.jsx(ct,{size:"sm",width:"auto",options:c,value:l,onChange:u,disableErrorPlaceholder:!0}),i.jsx(dn,{dark:s,onToggle:m})]})]})},Ni=({loading:r=!1,ariaLabel:t="Cargando..."})=>r?i.jsxs("div",{className:`\r
37
37
  fixed inset-0\r
38
38
  flex items-center justify-center\r
39
39
  bg-[var(--color-ds-background-surface)]/90\r
@@ -58,4 +58,4 @@ attempted value: ${o}
58
58
  dark:bg-[var(--color-ds-background-surface)]\r
59
59
  hover:bg-[var(--color-ds-background-accent)]/10\r
60
60
  focus:outline-none\r
61
- `,children:[i.jsx(Qt,{className:"w-5 h-5 text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]"}),i.jsx("span",{className:"sr-only",children:"Cerrar modal"})]})]}),i.jsx("div",{className:"px-6 py-6 text-[var(--color-ds-text-primary)]",children:s}),n&&i.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),fr=({items:r,selected:t,onSelect:e,level:s=0})=>{const[n,a]=v.useState(new Set),o=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)};return i.jsx("ul",{className:L(s>0?"mt-1":"mt-0"),children:r.map(l=>{var N;const c=l.value===t,u=n.has(l.value),f=["pl-2","pl-2","pl-2"][s]||"pl-4",m=s===0?u||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)]",p=s===0&&(u||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]",b=!!((N=l.children)!=null&&N.length);return i.jsxs("li",{children:[i.jsxs("button",{type:"button",onClick:()=>b?o(l.value):e(l.value),"aria-expanded":b?u:void 0,className:L("w-full flex items-center justify-between h-8 transition-colors",f,m),children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[s===0&&l.icon&&i.jsx(l.icon,{className:"w-5 h-5 ml-2"}),i.jsx("span",{className:"text-ds-sm",children:l.label})]}),b&&(u?i.jsx(is,{className:L("w-4 h-4",p)}):i.jsx($n,{className:L("w-4 h-4",p)}))]}),b&&i.jsx("div",{className:L("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",u?"max-h-screen":"max-h-0"),children:i.jsx(fr,{items:l.children,selected:t,onSelect:e,level:s+1})})]},l.value)})})},Si="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",Fi="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",mn=({appName:r,orgName:t,username:e,footerText:s,navItems:n,selectedNav:a,onSelectNav:o,width:l="200px"})=>{const{theme:c}=fn(),u=c==="dark"?Si:Fi;return i.jsxs("aside",{className:"flex flex-col h-screen bg-[var(--color-ds-background-page)]",style:{width:l},children:[i.jsxs("div",{className:"flex gap-1 flex-col items-center py-4 space-y-1",children:[i.jsx("img",{src:u,alt:"Logo Diputación",className:"w-20 h-20"}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-lg ",children:r}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:e}),i.jsx("div",{className:"w-1/5 h-0.5 rounded-full bg-[var(--color-ds-background-accent)] mt-2"})]}),i.jsx("nav",{className:"flex-1 overflow-auto pt-3",children:i.jsx(fr,{items:n,selected:a,onSelect:o})}),i.jsx("div",{className:"px-4 w-full py-3",children:i.jsx("span",{className:"text-ds-sm w-full text-center text-[var(--color-ds-text-secondary)]",children:s})})]})};function Ti({sidebar:r,header:t,children:e}){return i.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[i.jsx(mn,{...r}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-auto px-10 [scrollbar-gutter:stable_both-edges]",children:[i.jsx(hn,{...t}),i.jsx("main",{className:"flex-1 ",children:e})]})]})}function Ci({columns:r,data:t,loadData:e,loading:s,idAccessor:n,multiSelect:a=!1,onSelectionChange:o,pageSize:l=10,initialSort:c,onSort:u,className:f}){const m=t!==void 0,[p,b]=v.useState([]),[N,j]=v.useState(!1),T=v.useRef(null);v.useEffect(()=>{var _;if(!e||m)return;(_=T.current)==null||_.abort();const h=new AbortController;return T.current=h,j(!0),e().then(D=>{h.signal.aborted||b(D)}).finally(()=>{h.signal.aborted||j(!1)}),()=>h.abort()},[e,m]);const w=v.useMemo(()=>m?t:p,[t,p,m]),y=s??(e?N:!1),[E,M]=v.useState(new Set),[F,B]=v.useState(1),[X,S]=v.useState(c==null?void 0:c.sortBy),[$,P]=v.useState((c==null?void 0:c.sortDir)??"asc"),R=h=>typeof n=="function"?n(h):h[n],V=v.useRef(null);v.useEffect(()=>{V.current!==w&&(M(new Set),B(1),V.current=w)},[w]);const H=v.useMemo(()=>{if(!X)return w;const h=$==="asc"?1:-1;return[...w].sort((_,D)=>{const W=_[X],te=D[X];return W==null?-h:te==null||W>te?h:W<te?-h:0})},[w,X,$]),K=Math.max(1,Math.ceil(H.length/l)),Q=v.useMemo(()=>{const h=(F-1)*l;return H.slice(h,h+l)},[H,F,l]),se=h=>{const _=new Set(E);_.has(h)?_.delete(h):_.add(h),M(_),o==null||o(w.filter(D=>_.has(R(D))))},Y=()=>{const h=Q.every(D=>E.has(R(D))),_=new Set(E);Q.forEach(D=>{h?_.delete(R(D)):_.add(R(D))}),M(_),o==null||o(w.filter(D=>_.has(R(D))))},g=h=>{if(!h.sortable)return;const _=typeof h.accessor=="string"?h.accessor:h.sortKey;if(X===_){const D=$==="asc"?"desc":"asc";P(D),u==null||u(_,D)}else S(_),P("asc"),u==null||u(_,"asc");B(1)},J=()=>y?i.jsx("tbody",{children:Array.from({length:l}).map((h,_)=>i.jsxs("tr",{children:[a&&i.jsx("td",{children:i.jsx(qe,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((D,W)=>i.jsx("td",{children:i.jsx(qe,{width:"100%",height:"1em",variant:"rect"})},W))]},_))}):Q.length?i.jsx("tbody",{children:Q.map(h=>{const _=R(h);return i.jsxs("tr",{className:"hover:bg-gray-50",children:[a&&i.jsx("td",{children:i.jsx("input",{type:"checkbox",checked:E.has(_),onChange:()=>se(_)})}),r.map((D,W)=>{const te=D.render?D.render(h):typeof D.accessor=="function"?D.accessor(h):h[D.accessor];return i.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm",children:te},W)})]},_)})}):i.jsx("tbody",{children:i.jsx("tr",{children:i.jsx("td",{colSpan:r.length+(a?1:0),children:"No hay datos"})})});return i.jsxs("div",{className:L("w-full overflow-auto",f),children:[i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsxs("tr",{children:[a&&i.jsx("th",{children:i.jsx("input",{type:"checkbox",checked:Q.length>0&&Q.every(h=>E.has(R(h))),onChange:Y})}),r.map(h=>{const _=typeof h.accessor=="string"?h.accessor:h.header,D=X===(typeof h.accessor=="string"?h.accessor:h.sortKey);return i.jsx("th",{className:L("px-4 py-2 text-left text-sm font-medium text-gray-700",h.width),onClick:()=>g(h),children:i.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer",children:[i.jsx("span",{children:h.header}),h.sortable&&i.jsx("span",{className:"text-xs",children:D?$==="asc"?"▲":"▼":"⇵"})]})},_)})]})}),J()]}),i.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[i.jsx("span",{className:"text-sm text-gray-700",children:y?"Cargando...":`Página ${F} de ${K}`}),i.jsxs("div",{className:"space-x-2",children:[i.jsx($e,{size:"sm",variant:"outline",disabled:y||F<=1,onClick:()=>B(h=>Math.max(1,h-1)),children:"Prev"}),i.jsx($e,{size:"sm",variant:"outline",disabled:y||F>=K,onClick:()=>B(h=>Math.min(K,h+1)),children:"Next"})]})]})]})}function pn({control:r,name:t,rules:e,defaultValue:s=!1,checked:n,onChange:a,disabled:o=!1,label:l,labelPosition:c="right",errorMessage:u="",className:f}){const m=v.useId();if(r&&t)return i.jsx(Se,{name:t,control:r,rules:e,defaultValue:s,render:({field:b,fieldState:N})=>{var j;return i.jsx(pn,{checked:b.value,onChange:b.onChange,disabled:o,label:l,labelPosition:c,errorMessage:((j=N.error)==null?void 0:j.message)||"",className:f})}});const p=!!n;return i.jsxs("div",{className:L("flex flex-col",f),children:[i.jsxs("label",{className:L("inline-flex items-center space-x-3 select-none",o&&"opacity-50 cursor-not-allowed"),htmlFor:m,children:[l&&c==="left"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l}),i.jsx("button",{id:m,type:"button",role:"switch","aria-checked":p,disabled:o,onClick:()=>!o&&(a==null?void 0:a(!p)),className:L("relative inline-flex items-center h-8 w-16","bg-[var(--color-ds-background-accent)] rounded-full transition-colors duration-200","focus:outline-none "),children:i.jsx("div",{className:L("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",p?"translate-x-9":"translate-x-1")})}),l&&c==="right"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l})]}),i.jsx("div",{className:"pt-1 min-h-[18px] w-full",children:u?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}exports.Button=$e;exports.Checkbox=on;exports.CollapsibleSection=zt;exports.DateInput=Vs;exports.DropdownMenu=eo;exports.FileUploader=Is;exports.FormFieldInput=lr;exports.FormPageLayout=ko;exports.FormRenderer=ki;exports.Header=hn;exports.Icon=Ce;exports.IconButton=cn;exports.InfoButton=Ls;exports.Input=Ot;exports.InputGroup=zs;exports.LoadingScreen=Ni;exports.Modal=_i;exports.OptionGroup=Us;exports.PageLayout=Ti;exports.SearchField=ln;exports.Select=it;exports.Sidebar=mn;exports.SidebarNav=fr;exports.SkeletonLoader=qe;exports.Table=Ci;exports.Tabs=Ps;exports.TextArea=ur;exports.ThemeProvider=Ei;exports.ThemeToggle=dn;exports.Toast=Bs;exports.ToastProvider=Mo;exports.ToggleSwitch=pn;exports.useToast=Zs;
61
+ `,children:[i.jsx(tr,{className:"w-5 h-5 text-[var(--color-ds-text-secondary)] hover:text-[var(--color-ds-text-primary)]"}),i.jsx("span",{className:"sr-only",children:"Cerrar modal"})]})]}),i.jsx("div",{className:"px-6 py-6 text-[var(--color-ds-text-primary)]",children:s}),n&&i.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),mr=({items:r,selected:t,onSelect:e,level:s=0})=>{const[n,a]=v.useState(new Set),o=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)};return i.jsx("ul",{className:I(s>0?"mt-1":"mt-0"),children:r.map(l=>{var N;const c=l.value===t,u=n.has(l.value),f=["pl-2","pl-2","pl-2"][s]||"pl-4",m=s===0?u||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)]",p=s===0&&(u||c)?"text-[var(--color-ds-text-on-accent)]":"text-[var(--color-ds-text-secondary)]",b=!!((N=l.children)!=null&&N.length);return i.jsxs("li",{children:[i.jsxs("button",{type:"button",onClick:()=>b?o(l.value):e(l.value),"aria-expanded":b?u:void 0,className:I("w-full flex items-center justify-between h-8 transition-colors",f,m),children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[s===0&&l.icon&&i.jsx(l.icon,{className:"w-5 h-5 ml-2"}),i.jsx("span",{className:"text-ds-sm",children:l.label})]}),b&&(u?i.jsx(is,{className:I("w-4 h-4",p)}):i.jsx($n,{className:I("w-4 h-4",p)}))]}),b&&i.jsx("div",{className:I("overflow-hidden transition-[max-height] duration-300 ease-in-out","border-l-1 border-[var(--color-ds-background-accent)] ml-6",u?"max-h-screen":"max-h-0"),children:i.jsx(mr,{items:l.children,selected:t,onSelect:e,level:s+1})})]},l.value)})})},Si="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",Fi="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",mn=({appName:r,orgName:t,username:e,footerText:s,navItems:n,selectedNav:a,onSelectNav:o,width:l="200px"})=>{const{theme:c}=fn(),u=c==="dark"?Si:Fi;return i.jsxs("aside",{className:"flex flex-col h-screen bg-[var(--color-ds-background-page)]",style:{width:l},children:[i.jsxs("div",{className:"flex gap-1 flex-col items-center py-4 space-y-1",children:[i.jsx("img",{src:u,alt:"Logo Diputación",className:"w-20 h-20"}),i.jsx("span",{className:"text-[var(--color-ds-text-primary)] text-ds-lg ",children:r}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:t}),i.jsx("span",{className:"text-ds-sm text-[var(--color-ds-text-secondary)]",children:e}),i.jsx("div",{className:"w-1/5 h-0.5 rounded-full bg-[var(--color-ds-background-accent)] mt-2"})]}),i.jsx("nav",{className:"flex-1 overflow-auto pt-3",children:i.jsx(mr,{items:n,selected:a,onSelect:o})}),i.jsx("div",{className:"px-4 w-full py-3",children:i.jsx("span",{className:"text-ds-sm w-full text-center text-[var(--color-ds-text-secondary)]",children:s})})]})};function Ti({sidebar:r,header:t,children:e}){return i.jsxs("div",{className:"flex h-screen overflow-hidden bg-[var(--color-ds-background-page)]",children:[i.jsx(mn,{...r}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-auto px-10 [scrollbar-gutter:stable_both-edges]",children:[i.jsx(hn,{...t}),i.jsx("main",{className:"flex-1 ",children:e})]})]})}function Ci({columns:r,data:t,loadData:e,loading:s,idAccessor:n,multiSelect:a=!1,onSelectionChange:o,pageSize:l=10,initialSort:c,onSort:u,className:f}){const m=t!==void 0,[p,b]=v.useState([]),[N,j]=v.useState(!1),T=v.useRef(null);v.useEffect(()=>{var _;if(!e||m)return;(_=T.current)==null||_.abort();const h=new AbortController;return T.current=h,j(!0),e().then(L=>{h.signal.aborted||b(L)}).finally(()=>{h.signal.aborted||j(!1)}),()=>h.abort()},[e,m]);const w=v.useMemo(()=>m?t:p,[t,p,m]),y=s??(e?N:!1),[E,M]=v.useState(new Set),[F,W]=v.useState(1),[J,S]=v.useState(c==null?void 0:c.sortBy),[$,P]=v.useState((c==null?void 0:c.sortDir)??"asc"),R=h=>typeof n=="function"?n(h):h[n],V=v.useRef(null);v.useEffect(()=>{V.current!==w&&(M(new Set),W(1),V.current=w)},[w]);const H=v.useMemo(()=>{if(!J)return w;const h=$==="asc"?1:-1;return[...w].sort((_,L)=>{const B=_[J],te=L[J];return B==null?-h:te==null||B>te?h:B<te?-h:0})},[w,J,$]),K=Math.max(1,Math.ceil(H.length/l)),Q=v.useMemo(()=>{const h=(F-1)*l;return H.slice(h,h+l)},[H,F,l]),re=h=>{const _=new Set(E);_.has(h)?_.delete(h):_.add(h),M(_),o==null||o(w.filter(L=>_.has(R(L))))},Y=()=>{const h=Q.every(L=>E.has(R(L))),_=new Set(E);Q.forEach(L=>{h?_.delete(R(L)):_.add(R(L))}),M(_),o==null||o(w.filter(L=>_.has(R(L))))},x=h=>{if(!h.sortable)return;const _=typeof h.accessor=="string"?h.accessor:h.sortKey;if(J===_){const L=$==="asc"?"desc":"asc";P(L),u==null||u(_,L)}else S(_),P("asc"),u==null||u(_,"asc");W(1)},X=()=>y?i.jsx("tbody",{children:Array.from({length:l}).map((h,_)=>i.jsxs("tr",{children:[a&&i.jsx("td",{children:i.jsx(qe,{width:"1rem",height:"1rem",variant:"circle"})}),r.map((L,B)=>i.jsx("td",{children:i.jsx(qe,{width:"100%",height:"1em",variant:"rect"})},B))]},_))}):Q.length?i.jsx("tbody",{children:Q.map(h=>{const _=R(h);return i.jsxs("tr",{className:"hover:bg-gray-50",children:[a&&i.jsx("td",{children:i.jsx("input",{type:"checkbox",checked:E.has(_),onChange:()=>re(_)})}),r.map((L,B)=>{const te=L.render?L.render(h):typeof L.accessor=="function"?L.accessor(h):h[L.accessor];return i.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm",children:te},B)})]},_)})}):i.jsx("tbody",{children:i.jsx("tr",{children:i.jsx("td",{colSpan:r.length+(a?1:0),children:"No hay datos"})})});return i.jsxs("div",{className:I("w-full overflow-auto",f),children:[i.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[i.jsx("thead",{className:"bg-gray-50",children:i.jsxs("tr",{children:[a&&i.jsx("th",{children:i.jsx("input",{type:"checkbox",checked:Q.length>0&&Q.every(h=>E.has(R(h))),onChange:Y})}),r.map(h=>{const _=typeof h.accessor=="string"?h.accessor:h.header,L=J===(typeof h.accessor=="string"?h.accessor:h.sortKey);return i.jsx("th",{className:I("px-4 py-2 text-left text-sm font-medium text-gray-700",h.width),onClick:()=>x(h),children:i.jsxs("div",{className:"inline-flex items-center space-x-1 cursor-pointer",children:[i.jsx("span",{children:h.header}),h.sortable&&i.jsx("span",{className:"text-xs",children:L?$==="asc"?"▲":"▼":"⇵"})]})},_)})]})}),X()]}),i.jsxs("div",{className:"flex items-center justify-between py-2 px-4",children:[i.jsx("span",{className:"text-sm text-gray-700",children:y?"Cargando...":`Página ${F} de ${K}`}),i.jsxs("div",{className:"space-x-2",children:[i.jsx($e,{size:"sm",variant:"outline",disabled:y||F<=1,onClick:()=>W(h=>Math.max(1,h-1)),children:"Prev"}),i.jsx($e,{size:"sm",variant:"outline",disabled:y||F>=K,onClick:()=>W(h=>Math.min(K,h+1)),children:"Next"})]})]})]})}function pn({control:r,name:t,rules:e,defaultValue:s=!1,checked:n,onChange:a,disabled:o=!1,label:l,labelPosition:c="right",errorMessage:u="",className:f}){const m=v.useId();if(r&&t)return i.jsx(Fe,{name:t,control:r,rules:e,defaultValue:s,render:({field:b,fieldState:N})=>{var j;return i.jsx(pn,{checked:b.value,onChange:b.onChange,disabled:o,label:l,labelPosition:c,errorMessage:((j=N.error)==null?void 0:j.message)||"",className:f})}});const p=!!n;return i.jsxs("div",{className:I("flex flex-col",f),children:[i.jsxs("label",{className:I("inline-flex items-center space-x-3 select-none",o&&"opacity-50 cursor-not-allowed"),htmlFor:m,children:[l&&c==="left"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l}),i.jsx("button",{id:m,type:"button",role:"switch","aria-checked":p,disabled:o,onClick:()=>!o&&(a==null?void 0:a(!p)),className:I("relative inline-flex items-center h-8 w-16","bg-[var(--color-ds-background-accent)] rounded-full transition-colors duration-200","focus:outline-none "),children:i.jsx("div",{className:I("absolute h-6 w-6 bg-[var(--color-ds-background-page)] rounded-full shadow transform transition-transform duration-200",p?"translate-x-9":"translate-x-1")})}),l&&c==="right"&&i.jsx("span",{className:"text-ds-md text-[var(--color-ds-text-primary)]",children:l})]}),i.jsx("div",{className:"pt-1 min-h-[18px] w-full",children:u?i.jsx("span",{className:"text-xs text-[var(--color-ds-text-error)]",children:u}):i.jsx("span",{"aria-hidden":"true",children:" "})})]})}exports.Button=$e;exports.Checkbox=on;exports.CollapsibleSection=Bt;exports.DateInput=Vs;exports.DropdownMenu=eo;exports.FileUploader=Is;exports.FormFieldInput=dr;exports.FormPageLayout=ko;exports.FormRenderer=ki;exports.Header=hn;exports.Icon=Ce;exports.IconButton=cn;exports.InfoButton=Ls;exports.Input=Mt;exports.InputGroup=zs;exports.LoadingScreen=Ni;exports.Modal=_i;exports.OptionGroup=Us;exports.PageLayout=Ti;exports.SearchField=ln;exports.Select=ct;exports.Sidebar=mn;exports.SidebarNav=mr;exports.SkeletonLoader=qe;exports.Table=Ci;exports.Tabs=Ps;exports.TextArea=hr;exports.ThemeProvider=Ei;exports.ThemeToggle=dn;exports.Toast=Bs;exports.ToastProvider=Mo;exports.ToggleSwitch=pn;exports.useToast=Zs;