galliard-ui 1.0.9 → 1.0.11

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const l=require("react/jsx-runtime"),y=require("react");function nn(e,t){const o=e.icons,r=e.aliases||Object.create(null),n=Object.create(null);function i(s){if(o[s])return n[s]=[];if(!(s in n)){n[s]=null;const c=r[s]&&r[s].parent,a=c&&i(c);a&&(n[s]=[c].concat(a))}return n[s]}return Object.keys(o).concat(Object.keys(r)).forEach(i),n}const Me=Object.freeze({left:0,top:0,width:16,height:16}),le=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),be=Object.freeze({...Me,...le}),ge=Object.freeze({...be,body:"",hidden:!1});function tn(e,t){const o={};!e.hFlip!=!t.hFlip&&(o.hFlip=!0),!e.vFlip!=!t.vFlip&&(o.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(o.rotate=r),o}function $e(e,t){const o=tn(e,t);for(const r in ge)r in le?r in e&&!(r in o)&&(o[r]=le[r]):r in t?o[r]=t[r]:r in e&&(o[r]=e[r]);return o}function on(e,t,o){const r=e.icons,n=e.aliases||Object.create(null);let i={};function s(c){i=$e(r[c]||n[c],i)}return s(t),o.forEach(s),$e(e,i)}function Pe(e,t){const o=[];if(typeof e!="object"||typeof e.icons!="object")return o;e.not_found instanceof Array&&e.not_found.forEach(n=>{t(n,null),o.push(n)});const r=nn(e);for(const n in r){const i=r[n];i&&(t(n,on(e,n,i)),o.push(n))}return o}const rn={provider:"",aliases:{},not_found:{},...Me};function pe(e,t){for(const o in t)if(o in e&&typeof e[o]!=typeof t[o])return!1;return!0}function Ae(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!pe(e,rn))return null;const o=t.icons;for(const n in o){const i=o[n];if(!n||typeof i.body!="string"||!pe(i,ge))return null}const r=t.aliases||Object.create(null);for(const n in r){const i=r[n],s=i.parent;if(!n||typeof s!="string"||!o[s]&&!r[s]||!pe(i,ge))return null}return t}const we=Object.create(null);function sn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function X(e,t){const o=we[e]||(we[e]=Object.create(null));return o[t]||(o[t]=sn(e,t))}function Re(e,t){return Ae(t)?Pe(t,(o,r)=>{r?e.icons[o]=r:e.missing.add(o)}):[]}function cn(e,t,o){try{if(typeof o.body=="string")return e.icons[t]={...o},!0}catch{}return!1}const Le=/^[a-z0-9]+(-[a-z0-9]+)*$/,ue=(e,t,o,r="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),a=n.pop(),u={provider:n.length>0?n[0]:r,prefix:a,name:c};return t&&!ce(u)?null:u}const i=n[0],s=i.split("-");if(s.length>1){const c={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!ce(c)?null:c}if(o&&r===""){const c={provider:r,prefix:"",name:i};return t&&!ce(c,o)?null:c}return null},ce=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let oe=!1;function Be(e){return typeof e=="boolean"&&(oe=e),oe}function Te(e){const t=typeof e=="string"?ue(e,!0,oe):e;if(t){const o=X(t.provider,t.prefix),r=t.name;return o.icons[r]||(o.missing.has(r)?null:void 0)}}function an(e,t){const o=ue(e,!0,oe);if(!o)return!1;const r=X(o.provider,o.prefix);return t?cn(r,o.name,t):(r.missing.add(o.name),!0)}function ln(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),oe&&!t&&!e.prefix){let n=!1;return Ae(e)&&(e.prefix="",Pe(e,(i,s)=>{an(i,s)&&(n=!0)})),n}const o=e.prefix;if(!ce({prefix:o,name:"a"}))return!1;const r=X(t,o);return!!Re(r,e)}const ze=Object.freeze({width:null,height:null}),Ge=Object.freeze({...ze,...le}),un=/(-?[0-9.]*[0-9]+[0-9.]*)/g,fn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ee(e,t,o){if(t===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*t*o)/o;if(typeof e!="string")return e;const r=e.split(un);if(r===null||!r.length)return e;const n=[];let i=r.shift(),s=fn.test(i);for(;;){if(s){const c=parseFloat(i);isNaN(c)?n.push(i):n.push(Math.ceil(c*t*o)/o)}else n.push(i);if(i=r.shift(),i===void 0)return n.join("");s=!s}}function dn(e,t="defs"){let o="";const r=e.indexOf("<"+t);for(;r>=0;){const n=e.indexOf(">",r),i=e.indexOf("</"+t);if(n===-1||i===-1)break;const s=e.indexOf(">",i);if(s===-1)break;o+=e.slice(n+1,i).trim(),e=e.slice(0,r).trim()+e.slice(s+1)}return{defs:o,content:e}}function pn(e,t){return e?"<defs>"+e+"</defs>"+t:t}function mn(e,t,o){const r=dn(e);return pn(r.defs,t+r.content+o)}const hn=e=>e==="unset"||e==="undefined"||e==="none";function gn(e,t){const o={...be,...e},r={...Ge,...t},n={left:o.left,top:o.top,width:o.width,height:o.height};let i=o.body;[o,r].forEach(b=>{const d=[],h=b.hFlip,w=b.vFlip;let v=b.rotate;h?w?v+=2:(d.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),d.push("scale(-1 1)"),n.top=n.left=0):w&&(d.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),d.push("scale(1 -1)"),n.top=n.left=0);let I;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:I=n.height/2+n.top,d.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:d.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:I=n.width/2+n.left,d.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}v%2===1&&(n.left!==n.top&&(I=n.left,n.left=n.top,n.top=I),n.width!==n.height&&(I=n.width,n.width=n.height,n.height=I)),d.length&&(i=mn(i,'<g transform="'+d.join(" ")+'">',"</g>"))});const s=r.width,c=r.height,a=n.width,u=n.height;let f,m;s===null?(m=c===null?"1em":c==="auto"?u:c,f=Ee(m,a/u)):(f=s==="auto"?a:s,m=c===null?Ee(f,u/a):c==="auto"?u:c);const p={},g=(b,d)=>{hn(d)||(p[b]=d.toString())};g("width",f),g("height",m);const _=[n.left,n.top,a,u];return p.viewBox=_.join(" "),{attributes:p,viewBox:_,body:i}}const xn=/\sid="(\S+)"/g,_n="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let yn=0;function bn(e,t=_n){const o=[];let r;for(;r=xn.exec(e);)o.push(r[1]);if(!o.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(i=>{const s=typeof t=="function"?t(i):t+(yn++).toString(),c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+s+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const xe=Object.create(null);function vn(e,t){xe[e]=t}function _e(e){return xe[e]||xe[""]}function ve(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const je=Object.create(null),ee=["https://api.simplesvg.com","https://api.unisvg.com"],ae=[];for(;ee.length>0;)ee.length===1||Math.random()>.5?ae.push(ee.shift()):ae.push(ee.pop());je[""]=ve({resources:["https://api.iconify.design"].concat(ae)});function jn(e,t){const o=ve(t);return o===null?!1:(je[e]=o,!0)}function Ie(e){return je[e]}const In=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ne=In();function $n(e,t){const o=Ie(e);if(!o)return 0;let r;if(!o.maxURL)r=0;else{let n=0;o.resources.forEach(s=>{n=Math.max(n,s.length)});const i=t+".json?icons=";r=o.maxURL-n-o.path.length-i.length}return r}function wn(e){return e===404}const Tn=(e,t,o)=>{const r=[],n=$n(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},c=0;return o.forEach((a,u)=>{c+=a.length+1,c>=n&&u>0&&(r.push(s),s={type:i,provider:e,prefix:t,icons:[]},c=a.length),s.icons.push(a)}),r.push(s),r};function En(e){if(typeof e=="string"){const t=Ie(e);if(t)return t.path}return"/"}const Nn=(e,t,o)=>{if(!Ne){o("abort",424);return}let r=En(t.provider);switch(t.type){case"icons":{const i=t.prefix,c=t.icons.join(","),a=new URLSearchParams({icons:c});r+=i+".json?"+a.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:o("abort",400);return}let n=503;Ne(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{o(wn(s)?"abort":"next",s)});return}return n=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?o("abort",i):o("next",n)});return}setTimeout(()=>{o("success",i)})}).catch(()=>{o("next",n)})},Sn={prepare:Tn,send:Nn};function qe(e,t){e.forEach(o=>{const r=o.loaderCallbacks;r&&(o.loaderCallbacks=r.filter(n=>n.id!==t))})}function kn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let o=!1;const r=e.provider,n=e.prefix;t.forEach(i=>{const s=i.icons,c=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==n)return!0;const u=a.name;if(e.icons[u])s.loaded.push({provider:r,prefix:n,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:n,name:u});else return o=!0,!0;return!1}),s.pending.length!==c&&(o||qe([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let Cn=0;function Dn(e,t,o){const r=Cn++,n=qe.bind(null,o,r);if(!t.pending.length)return n;const i={id:r,icons:t,callback:e,abort:n};return o.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),n}function Fn(e){const t={loaded:[],missing:[],pending:[]},o=Object.create(null);e.sort((n,i)=>n.provider!==i.provider?n.provider.localeCompare(i.provider):n.prefix!==i.prefix?n.prefix.localeCompare(i.prefix):n.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(n=>{if(r.name===n.name&&r.prefix===n.prefix&&r.provider===n.provider)return;r=n;const i=n.provider,s=n.prefix,c=n.name,a=o[i]||(o[i]=Object.create(null)),u=a[s]||(a[s]=X(i,s));let f;c in u.icons?f=t.loaded:s===""||u.missing.has(c)?f=t.missing:f=t.pending;const m={provider:i,prefix:s,name:c};f.push(m)}),t}function On(e,t=!0,o=!1){const r=[];return e.forEach(n=>{const i=typeof n=="string"?ue(n,t,o):n;i&&r.push(i)}),r}const Mn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Pn(e,t,o,r){const n=e.resources.length,i=e.random?Math.floor(Math.random()*n):e.index;let s;if(e.random){let x=e.resources.slice(0);for(s=[];x.length>1;){const $=Math.floor(Math.random()*x.length);s.push(x[$]),x=x.slice(0,$).concat(x.slice($+1))}s=s.concat(x)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let a="pending",u=0,f,m=null,p=[],g=[];typeof r=="function"&&g.push(r);function _(){m&&(clearTimeout(m),m=null)}function b(){a==="pending"&&(a="aborted"),_(),p.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),p=[]}function d(x,$){$&&(g=[]),typeof x=="function"&&g.push(x)}function h(){return{startTime:c,payload:t,status:a,queriesSent:u,queriesPending:p.length,subscribe:d,abort:b}}function w(){a="failed",g.forEach(x=>{x(void 0,f)})}function v(){p.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),p=[]}function I(x,$,k){const E=$!=="success";switch(p=p.filter(j=>j!==x),a){case"pending":break;case"failed":if(E||!e.dataAfterTimeout)return;break;default:return}if($==="abort"){f=k,w();return}if(E){f=k,p.length||(s.length?S():w());return}if(_(),v(),!e.random){const j=e.resources.indexOf(x.resource);j!==-1&&j!==e.index&&(e.index=j)}a="completed",g.forEach(j=>{j(k)})}function S(){if(a!=="pending")return;_();const x=s.shift();if(x===void 0){if(p.length){m=setTimeout(()=>{_(),a==="pending"&&(v(),w())},e.timeout);return}w();return}const $={status:"pending",resource:x,callback:(k,E)=>{I($,k,E)}};p.push($),u++,m=setTimeout(S,e.rotate),o(x,t,$.callback)}return setTimeout(S),h}function Ue(e){const t={...Mn,...e};let o=[];function r(){o=o.filter(c=>c().status==="pending")}function n(c,a,u){const f=Pn(t,c,a,(m,p)=>{r(),u&&u(m,p)});return o.push(f),f}function i(c){return o.find(a=>c(a))||null}return{query:n,find:i,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Se(){}const me=Object.create(null);function An(e){if(!me[e]){const t=Ie(e);if(!t)return;const o=Ue(t),r={config:t,redundancy:o};me[e]=r}return me[e]}function Rn(e,t,o){let r,n;if(typeof e=="string"){const i=_e(e);if(!i)return o(void 0,424),Se;n=i.send;const s=An(e);s&&(r=s.redundancy)}else{const i=ve(e);if(i){r=Ue(i);const s=e.resources?e.resources[0]:"",c=_e(s);c&&(n=c.send)}}return!r||!n?(o(void 0,424),Se):r.query(t,n,o)().abort}function ke(){}function Ln(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,kn(e)}))}function Bn(e){const t=[],o=[];return e.forEach(r=>{(r.match(Le)?t:o).push(r)}),{valid:t,invalid:o}}function ne(e,t,o){function r(){const n=e.pendingIcons;t.forEach(i=>{n&&n.delete(i),e.icons[i]||e.missing.add(i)})}if(o&&typeof o=="object")try{if(!Re(e,o).length){r();return}}catch(n){console.error(n)}r(),Ln(e)}function Ce(e,t){e instanceof Promise?e.then(o=>{t(o)}).catch(()=>{t(null)}):t(e)}function zn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:o,prefix:r}=e,n=e.iconsToLoad;if(delete e.iconsToLoad,!n||!n.length)return;const i=e.loadIcon;if(e.loadIcons&&(n.length>1||!i)){Ce(e.loadIcons(n,r,o),f=>{ne(e,n,f)});return}if(i){n.forEach(f=>{const m=i(f,r,o);Ce(m,p=>{const g=p?{prefix:r,icons:{[f]:p}}:null;ne(e,[f],g)})});return}const{valid:s,invalid:c}=Bn(n);if(c.length&&ne(e,c,null),!s.length)return;const a=r.match(Le)?_e(o):null;if(!a){ne(e,s,null);return}a.prepare(o,r,s).forEach(f=>{Rn(o,f,m=>{ne(e,f.icons,m)})})}))}const Gn=(e,t)=>{const o=On(e,!0,Be()),r=Fn(o);if(!r.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(r.loaded,r.missing,r.pending,ke)}),()=>{a=!1}}const n=Object.create(null),i=[];let s,c;return r.pending.forEach(a=>{const{provider:u,prefix:f}=a;if(f===c&&u===s)return;s=u,c=f,i.push(X(u,f));const m=n[u]||(n[u]=Object.create(null));m[f]||(m[f]=[])}),r.pending.forEach(a=>{const{provider:u,prefix:f,name:m}=a,p=X(u,f),g=p.pendingIcons||(p.pendingIcons=new Set);g.has(m)||(g.add(m),n[u][f].push(m))}),i.forEach(a=>{const u=n[a.provider][a.prefix];u.length&&zn(a,u)}),t?Dn(t,r,i):ke};function qn(e,t){const o={...e};for(const r in t){const n=t[r],i=typeof n;r in ze?(n===null||n&&(i==="string"||i==="number"))&&(o[r]=n):i===typeof o[r]&&(o[r]=r==="rotate"?n%4:n)}return o}const Un=/[\s,]+/;function Yn(e,t){t.split(Un).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Qn(e,t=0){const o=e.replace(/^-?[0-9.]*/,"");function r(n){for(;n<0;)n+=4;return n%4}if(o===""){const n=parseInt(e);return isNaN(n)?0:r(n)}else if(o!==e){let n=0;switch(o){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-o.length));return isNaN(i)?0:(i=i/n,i%1===0?r(i):0)}}return t}function Hn(e,t){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)o+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}function Wn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Jn(e){return"data:image/svg+xml,"+Wn(e)}function Zn(e){return'url("'+Jn(e)+'")'}let te;function Xn(){try{te=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{te=null}}function Vn(e){return te===void 0&&Xn(),te?te.createHTML(e):e}const Ye={...Ge,inline:!1},Kn={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},et={display:"inline-block"},ye={backgroundColor:"currentColor"},Qe={backgroundColor:"transparent"},De={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Fe={WebkitMask:ye,mask:ye,background:Qe};for(const e in Fe){const t=Fe[e];for(const o in De)t[e+o]=De[o]}const nt={...Ye,inline:!0};function Oe(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const tt=(e,t,o)=>{const r=t.inline?nt:Ye,n=qn(r,t),i=t.mode||"svg",s={},c=t.style||{},a={...i==="svg"?Kn:{}};if(o){const d=ue(o,!1,!0);if(d){const h=["iconify"],w=["provider","prefix"];for(const v of w)d[v]&&h.push("iconify--"+d[v]);a.className=h.join(" ")}}for(let d in t){const h=t[d];if(h!==void 0)switch(d){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":a.ref=h;break;case"className":a[d]=(a[d]?a[d]+" ":"")+h;break;case"inline":case"hFlip":case"vFlip":n[d]=h===!0||h==="true"||h===1;break;case"flip":typeof h=="string"&&Yn(n,h);break;case"color":s.color=h;break;case"rotate":typeof h=="string"?n[d]=Qn(h):typeof h=="number"&&(n[d]=h);break;case"ariaHidden":case"aria-hidden":h!==!0&&h!=="true"&&delete a["aria-hidden"];break;default:r[d]===void 0&&(a[d]=h)}}const u=gn(e,n),f=u.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),i==="svg"){a.style={...s,...c},Object.assign(a,f);let d=0,h=t.id;return typeof h=="string"&&(h=h.replace(/-/g,"_")),a.dangerouslySetInnerHTML={__html:Vn(bn(u.body,h?()=>h+"ID"+d++:"iconifyReact"))},y.createElement("svg",a)}const{body:m,width:p,height:g}=e,_=i==="mask"||(i==="bg"?!1:m.indexOf("currentColor")!==-1),b=Hn(m,{...f,width:p+"",height:g+""});return a.style={...s,"--svg":Zn(b),width:Oe(f.width),height:Oe(f.height),...et,..._?ye:Qe,...c},y.createElement("span",a)};Be(!0);vn("",Sn);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!ln(r))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let o in t){const r="IconifyProviders["+o+"] is invalid.";try{const n=t[o];if(typeof n!="object"||!n||n.resources===void 0)continue;jn(o,n)||console.error(r)}catch{console.error(r)}}}}function He(e){const[t,o]=y.useState(!!e.ssr),[r,n]=y.useState({});function i(g){if(g){const _=e.icon;if(typeof _=="object")return{name:"",data:_};const b=Te(_);if(b)return{name:_,data:b}}return{name:""}}const[s,c]=y.useState(i(!!e.ssr));function a(){const g=r.callback;g&&(g(),n({}))}function u(g){if(JSON.stringify(s)!==JSON.stringify(g))return a(),c(g),!0}function f(){var g;const _=e.icon;if(typeof _=="object"){u({name:"",data:_});return}const b=Te(_);if(u({name:_,data:b}))if(b===void 0){const d=Gn([_],f);n({callback:d})}else b&&((g=e.onLoad)===null||g===void 0||g.call(e,_))}y.useEffect(()=>(o(!0),a),[]),y.useEffect(()=>{t&&f()},[e.icon,t]);const{name:m,data:p}=s;return p?tt({...be,...p},e,m):e.children?e.children:e.fallback?e.fallback:y.createElement("span",{})}const F=y.forwardRef((e,t)=>He({...e,_ref:t}));y.forwardRef((e,t)=>He({inline:!0,...e,_ref:t}));const ot="_container_j1lh3_26",rt="_title_j1lh3_46",it="_containerInputError_j1lh3_50",st="_containerInput_j1lh3_50",ct="_inputElement_j1lh3_69",at="_errorMessage_j1lh3_80",lt="_icon_j1lh3_92",ut="_containerCustomIcon_j1lh3_99",R={container:ot,title:rt,containerInputError:it,containerInput:st,inputElement:ct,errorMessage:at,icon:lt,containerCustomIcon:ut},re=e=>{switch(e){case"none":return 0;case"sm":return 5;case"md":return 10;case"lg":return 15;case"full":return 9999;default:return 0}},ft=y.forwardRef(function({placeholder:t,value:o,setValue:r,label:n,typeInput:i,HorV:s,errorMessage:c,font:a,fontLabel:u,rounded:f,width:m,height:p,border:g,shadow:_,textSize:b,textColor:d,bgColor:h,customContainerClass:w,customInputClass:v,customIconRClass:I,customIconLClass:S,seeIconLeft:x=!0,seeIconRight:$,iconColorL:k,iconColorR:E,iconColorPass:j,iconSizeL:O,iconSizeR:A,iconSizePass:M,iconLeft:Y,iconRight:z,customIconLeft:Q,customIconRight:G,args:W},J){const[C,B]=y.useState(!1),Z=y.useMemo(()=>re(f??"full"),[f]);return l.jsxs("div",{className:R.container,style:{flexDirection:s==="horizontal"?"row":"column"},children:[l.jsx("label",{className:R.title,style:{fontSize:b,color:d,height:s==="horizontal"?35:"auto",display:s==="horizontal"?"flex":"block",alignItems:s==="horizontal"?"center":"initial",marginRight:s==="horizontal"?10:0,marginBottom:s==="vertical"?5:0,fontFamily:u},children:n}),l.jsxs("div",{className:R.containerInputError,children:[l.jsxs("div",{className:`${R.containerInput} ${w}`,style:{borderRadius:Z,width:!m&&i==="datetime-local"?"auto":m,height:p,border:g||g===void 0?"":"none",boxShadow:_?"0 0 5px #00000075":"",backgroundColor:h},children:[Q?l.jsx("div",{className:`${R.containerCustomIcon} ${S}`,children:Q}):x&&l.jsx(F,{icon:Y??"mi:user",className:`${R.icon} ${S}`,style:{color:k,fontSize:O}}),l.jsx("input",{ref:J,className:`${R.inputElement} ${v}`,style:{fontSize:b,color:d,fontFamily:a},type:i==="password"&&C?"text":i,placeholder:t,value:o,onChange:q=>r?.(q.target.value),...W}),i==="password"&&l.jsx(F,{onClick:()=>B(!C),icon:C?"fluent:eye-20-filled":"fluent:eye-hide-20-filled",className:`${R.icon}`,style:{color:j,fontSize:M,marginRight:10,cursor:i=="password"?"pointer":"default"}}),G?l.jsx("div",{className:`${R.containerCustomIcon} ${I}`,children:G}):$&&l.jsx(F,{icon:z??"mi:user",className:`${R.icon} ${I}`,style:{color:E,fontSize:A}})]}),c!==""&&l.jsx("p",{className:R.errorMessage,children:c})]})]})}),dt="_container_5daeb_26",pt="_containerInputError_5daeb_50",mt="_containerInput_5daeb_50",ht="_inputElement_5daeb_69",gt="_errorMessage_5daeb_80",xt="_icon_5daeb_92",_t="_containerCustomIcon_5daeb_99",H={container:dt,containerInputError:pt,containerInput:mt,inputElement:ht,errorMessage:gt,icon:xt,containerCustomIcon:_t},yt=y.forwardRef(function({label:t,value:o,errorMessage:r,textSize:n,textColor:i,setValue:s,useLinkable:c,link:a,font:u,iconSize:f,seeIcon:m,icon:p,iconColor:g,customInputClass:_,customLabelClass:b,customIconClass:d,customIcon:h,args:w},v){const I=y.useId();return l.jsx("div",{ref:v,className:H.container,children:l.jsxs("div",{className:H.containerInputError,children:[l.jsxs("div",{className:H.containerInput,children:[l.jsx("input",{className:`${H.inputElement} ${_}`,style:{fontSize:n,color:i},type:"checkbox",checked:o,onChange:S=>s(S.target.checked),...w}),h?l.jsx("div",{className:`${H.containerCustomIcon} ${d}`,children:h}):m&&l.jsx(F,{icon:p??"mi:user",className:`${H.icon} ${d}`,style:{color:g,fontSize:f}}),c?l.jsx("a",{className:b,href:a||"#",style:{fontSize:n,color:i,textDecoration:"underline",fontFamily:u},children:t}):l.jsx("label",{htmlFor:I,className:b,style:{fontSize:n,color:i,fontFamily:u},children:t})]}),r!==""&&l.jsx("p",{className:H.errorMessage,children:r})]})})}),bt="_container_v1dbe_26",vt="_containerInputError_v1dbe_51",jt="_containerInput_v1dbe_51",It="_errorMessage_v1dbe_81",$t="_icon_v1dbe_93",wt="_containerCustomIcon_v1dbe_100",Tt="_containerInputAndOptions_v1dbe_100",Et="_containerOptions_v1dbe_100",Nt="_optionElement_v1dbe_100",St="_containerIconOption_v1dbe_100",kt="_containerLabel_v1dbe_112",Ct="_textOption_v1dbe_142",Dt="_iconArrow_v1dbe_150",N={container:bt,containerInputError:vt,containerInput:jt,errorMessage:It,icon:$t,containerCustomIcon:wt,containerInputAndOptions:Tt,containerOptions:Et,optionElement:Nt,containerIconOption:St,containerLabel:kt,textOption:Ct,iconArrow:Dt},We=(e,t)=>{y.useEffect(()=>{const o=r=>{const n=e.current;!n||n.contains(r.target)||t(r)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}},[e,t])},Ft=y.forwardRef(function({label:t,value:o,setValue:r,options:n,placeholder:i,errorMessage:s,orientation:c="bottom",iconInRight:a=!1,font:u,fontLabel:f,rounded:m,border:p=!0,textSize:g="1.4em",textColor:_="#000",labelSize:b="1.4em",labelColor:d="#000",width:h=250,height:w=40,bgColor:v,shadow:I=!1,icon:S,iconSize:x=20,iconsOptionsSize:$=20,seeIcon:k=!1,seeOptionsIcons:E=!1,iconsColor:j="#000",customIcon:O,customContainerClass:A,customInputClass:M,customLabelClass:Y,customIconClass:z,customOptionClass:Q},G){const[W,J]=y.useState(null),[C,B]=y.useState(!1),Z=y.useRef(null),q={valueOption:null,text:i??"Selecciona una opción",icon:"hugeicons:cursor-magic-selection-04"};We(Z,()=>{B(!1)}),y.useEffect(()=>{let D=[q,...n];J(D)},[]);const ie=y.useMemo(()=>re(m??"lg"),[m]);return l.jsxs("div",{ref:G,className:`${N.container} ${A}`,children:[l.jsxs("div",{className:N.containerLabel,style:{flexDirection:a?"row-reverse":"row",justifyContent:a?"flex-end":"flex-start"},children:[O?l.jsx("div",{className:`${N.containerCustomIcon} ${z}`,style:{height:x},children:O}):k&&l.jsx(F,{icon:S??"icon-park-outline:dot",className:`${N.icon} ${z}`,style:{color:j,fontSize:x}}),l.jsx("label",{className:Y,style:{fontSize:b,color:d,fontFamily:f},children:t})]}),l.jsxs("div",{className:N.containerInputError,children:[l.jsxs("div",{ref:Z,className:N.containerInputAndOptions,children:[l.jsxs("div",{onClick:D=>{D.stopPropagation(),B(!C)},className:`${N.containerInput} ${M}`,style:{width:h,height:w,border:p?"":"none",boxShadow:I?"0 0 10px #00000050":"",borderRadius:ie,backgroundColor:v},children:[E&&o?.valueOption&&l.jsx(l.Fragment,{children:o?.customIcon?l.jsx("div",{className:N.containerCustomIcon,children:o?.customIcon}):o?.icon&&l.jsx(F,{icon:o.icon,className:N.icon,style:{color:o.iconColor?o.iconColor:j,fontSize:$}})}),l.jsx("p",{className:N.textOption,style:{fontSize:b,color:d,fontWeight:o?.valueOption?"bold":"",fontFamily:u},children:o?.text?o.text:q.text}),l.jsx(F,{icon:"ri:arrow-down-s-line",className:`${N.icon} ${N.iconArrow}`})]}),C&&l.jsx("div",{className:N.containerOptions,style:{top:c==="bottom"?"calc(100% + 10px)":c==="left"||c==="right"?0:"",left:c==="right"?"calc(100% + 10px)":c==="top"||c==="bottom"?0:"",bottom:c==="top"?"calc(100% + 10px)":"",right:c==="left"?"calc(100% + 10px)":""},children:W?.map((D,V)=>l.jsxs("div",{onClick:K=>{K.stopPropagation(),B(!1),r(D)},className:`${N.optionElement} ${Q}`,children:[E&&l.jsx("div",{className:`${N.containerIconOption}`,children:D.customIcon?D.customIcon:E&&l.jsx(F,{icon:D.icon??"icon-park-outline:dot",className:`${N.icon} ${N.containerIconOption}`,style:{color:D.iconColor?D.iconColor:j,fontSize:$}})}),l.jsx("p",{className:N.textOption,style:{fontSize:g,color:_,fontFamily:u},children:D.text?D.text:q.text})]},V))})]}),s!==""&&l.jsx("p",{className:N.errorMessage,children:s})]})]})}),Ot="_container_1nag4_26",Mt="_containerInputError_1nag4_50",Pt="_errorMessage_1nag4_80",At="_icon_1nag4_92",Rt="_containerCustomIcon_1nag4_99",Lt="_containerInputFile_1nag4_114",Bt="_containerSelectedFile_1nag4_114",zt="_textInput_1nag4_132",Gt="_inputFile_1nag4_142",qt="_fileName_1nag4_158",Ut="_backdrop_1nag4_175",P={container:Ot,containerInputError:Mt,errorMessage:Pt,icon:At,containerCustomIcon:Rt,containerInputFile:Lt,containerSelectedFile:Bt,textInput:zt,inputFile:Gt,fileName:qt,backdrop:Ut},he={images:{common:"image/png, image/jpeg, image/gif, image/webp",png:"image/png",jpg:"image/jpeg, image/jpg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",ico:"image/x-icon, image/vnd.microsoft.icon",tiff:"image/tiff",bmp:"image/bmp",heic:"image/heic, image/heif"},docs:{pdf:"application/pdf",word:".doc, .docx, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document",excel:".xls, .xlsx, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",powerpoint:".ppt, .pptx, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",odp:"application/vnd.oasis.opendocument.presentation",txt:"text/plain",rtf:"application/rtf",csv:"text/csv",markdown:"text/markdown, .md",epub:"application/epub+zip"},archives:{zip:"application/zip, application/x-zip-compressed",rar:"application/x-rar-compressed, .rar",sevenZ:"application/x-7z-compressed",tar:"application/x-tar",gz:"application/gzip",iso:"application/x-iso9660-image, .iso"},media:{audio:"audio/*",video:"video/*",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg, video/ogg",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo"},fonts:{woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf, application/x-font-ttf",otf:"font/otf, application/x-font-opentype",eot:"application/vnd.ms-fontobject"},code:{html:"text/html",css:"text/css",js:"text/javascript, application/javascript, .mjs",ts:"application/typescript, .ts, .tsx",json:"application/json",xml:"application/xml, text/xml",python:"text/x-python, .py",java:"text/x-java-source, .java, application/java-archive, .jar",csharp:"text/plain, .cs",cpp:"text/x-c++, .cpp, .h, .hpp",c:"text/x-c, .c",php:"application/x-httpd-php, .php",sql:"application/sql, .sql",sh:"application/x-sh, .sh",yaml:"text/yaml, .yaml, .yml"}},Je=e=>{if(Array.isArray(e))return e.map(o=>Je(o)).filter(o=>o!==void 0).join(", ");if(e!=="*"){if(typeof e=="string"){if(e in he){const t=he[e];return Object.values(t).join(", ")}return}if(typeof e=="object"){const t=[];return Object.keys(e).forEach(o=>{const r=e[o],n=he[o];r&&n&&r.forEach(i=>{const s=n[i];s&&t.push(s)})}),t.join(", ")}}},Yt="_btnThemeDark_1hn8j_26",Qt="_iconButton_1hn8j_58",Ht="_containerCustomIcon_1hn8j_65",Wt="_btnBorderedThemeDark_1hn8j_78",Jt="_btnThemeGreen_1hn8j_98",Zt="_btnBorderedThemeGreen_1hn8j_150",Xt="_btnThemeBlue_1hn8j_170",Vt="_btnBorderedThemeBlue_1hn8j_222",Kt="_btnThemeRed_1hn8j_242",eo="_btnBorderedThemeRed_1hn8j_294",no="_btnThemePurple_1hn8j_314",to="_btnBorderedThemePurple_1hn8j_366",oo="_btnThemeGray_1hn8j_386",ro="_btnBorderedThemeGray_1hn8j_438",io="_btnThemeLight_1hn8j_458",so="_btnBorderedThemeLight_1hn8j_510",co="_btnThemeYellow_1hn8j_530",ao="_btnBorderedThemeYellow_1hn8j_582",se={btnThemeDark:Yt,iconButton:Qt,containerCustomIcon:Ht,btnBorderedThemeDark:Wt,btnThemeGreen:Jt,btnBorderedThemeGreen:Zt,btnThemeBlue:Xt,btnBorderedThemeBlue:Vt,btnThemeRed:Kt,btnBorderedThemeRed:eo,btnThemePurple:no,btnBorderedThemePurple:to,btnThemeGray:oo,btnBorderedThemeGray:ro,btnThemeLight:io,btnBorderedThemeLight:so,btnThemeYellow:co,btnBorderedThemeYellow:ao},Ze=y.forwardRef(function({label:t="Texto del Botón",action:o=()=>{alert("Botón presionado")},font:r,width:n,height:i,bgColor:s,txtColor:c,icon:a="tabler:send",seeIcon:u=!0,textSize:f,iconColor:m,iconSize:p,styleType:g="ThemeDark",rounded:_="md",borderedStyle:b=!1,iconOn:d,padding:h,shadow:w=!1,colorShadow:v,customClassButton:I,customClassLabel:S,customClassIcon:x,customIcon:$,args:k},E){const j=y.useMemo(()=>re(_??"full"),[_]);return l.jsxs("button",{ref:E,className:`${se[`btn${g}`]} ${b&&se[`btnBordered${g}`]} ${I}`,style:{borderRadius:j,width:n??"auto",height:i??"auto",flexDirection:d==="left"?"row-reverse":"row",boxShadow:`${w?"0 0 7px "+(v||"#000"):""}`,padding:h,background:s},onClick:O=>{O.preventDefault(),o()},...k,children:[t&&l.jsx("p",{className:`${S}`,style:{fontSize:f,fontFamily:r,color:c},children:t}),$?l.jsx("div",{className:`${se.containerCustomIcon} ${x}`,children:$}):u&&l.jsx(F,{icon:a,className:`${se.iconButton} ${x}`,style:{fontSize:p,color:m}})]})}),lo=y.forwardRef(function({label:t,errorMessage:o,acceptFiles:r="*",selectedFileE:n,setSelectedFileE:i,maxMBSize:s,shadow:c=!0,textButtonCancel:a="Cancelar",font:u,width:f,height:m,bgColor:p,bgColorHover:g,labelSize:_,labelColor:b,rounded:d="md",iconSize:h=30,seeIcon:w=!0,icon:v,iconColor:I="#fff",customFIleClass:S,customSelectedClass:x,customLabelClass:$,customIconClass:k,customIcon:E,args:j},O){const A=y.useId(),M=y.useRef(0),[Y,z]=y.useState(n),[Q,G]=y.useState(!1),[W,J]=y.useState(null),[C,B]=y.useState(!1),Z=Je(r),q=()=>{z(null),i(null)},ie=T=>{if(J(null),s){const en=s*1024*1024;if(T.size>en){J(`El archivo excede el límite de ${s} MB.`),q();return}}z(T),i(T)},D=T=>{T.preventDefault(),T.target.files&&T.target.files[0]?ie(T.target.files[0]):q()},V=T=>{T.preventDefault(),T.stopPropagation(),M.current+=1,T.type==="dragenter"||T.type==="dragover"?B(!0):T.type==="dragleave"&&B(!1)},K=T=>{T.preventDefault(),T.stopPropagation(),M.current-=1,M.current===0&&B(!1)},Ke=T=>{T.preventDefault(),T.stopPropagation(),B(!1),M.current=0,T.dataTransfer.files&&T.dataTransfer.files[0]&&ie(T.dataTransfer.files[0])},de=y.useMemo(()=>re(d??"lg"),[d]);return l.jsx("div",{className:P.container,children:l.jsxs("div",{className:P.containerInputError,children:[Y?l.jsxs("div",{className:`${P.containerSelectedFile} ${x}`,style:{boxShadow:c?"0 0 5px #00000050":"",borderRadius:de,width:f,height:m},children:[w&&l.jsx(F,{icon:"uim:paperclip",className:P.icon}),l.jsx("p",{className:P.fileName,style:{fontFamily:u},children:Y?.name}),l.jsx("div",{className:P.backdrop,style:{borderRadius:de},children:l.jsx(Ze,{styleType:"ThemeRed",action:q,label:a,rounded:"full",icon:"fa:trash",iconSize:"1.4rem",iconColor:"#fff",textSize:12,padding:"7px"})})]}):l.jsxs("label",{htmlFor:A,className:`${P.containerInputFile} ${S}`,onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),onDragEnter:V,onDragLeave:K,onDragOver:T=>T.preventDefault(),onDrop:Ke,style:{boxShadow:c?"0 0 5px #00000050":"",borderRadius:de,backgroundColor:C?"#fff":Q?g:p,borderColor:C?p||"#6936ee":"",width:f,height:m,fontFamily:u},children:[!E||C?w&&l.jsx(F,{icon:C?"tabler:drag-drop":v??"mingcute:upload-3-fill",className:`${P.icon} ${k}`,onDragEnter:V,onDragLeave:K,style:{color:C?p||"#6936ee":I,fontSize:h}}):l.jsx("div",{className:`${P.containerCustomIcon} ${k}`,style:{height:h??"2rem"},children:E}),l.jsx("span",{className:`${P.textInput} ${$}`,style:{fontSize:_,color:C?p||"#6936ee":b,fontFamily:u},onDragEnter:V,onDragLeave:K,children:C?"Suelta para agregar":t??"Click o arrastra un archivo"}),l.jsx("input",{ref:O,id:A,type:"file",accept:Z,className:P.inputFile,onChange:D,...j})]}),l.jsx("p",{className:P.errorMessage,children:W||o||""})]})})}),uo="_container_sbkx2_26",fo="_containerInputError_sbkx2_50",po="_inputElement_sbkx2_69",mo="_errorMessage_sbkx2_80",ho="_icon_sbkx2_92",go="_containerCustomIcon_sbkx2_99",xo="_containerLabel_sbkx2_111",_o="_containerGroupRadio_sbkx2_127",yo="_containerRadio_sbkx2_134",L={container:uo,containerInputError:fo,inputElement:po,errorMessage:mo,icon:ho,containerCustomIcon:go,containerLabel:xo,containerGroupRadio:_o,containerRadio:yo},bo=y.forwardRef(function({label:t,labelSize:o,labelColor:r,options:n,errorMessage:i,textSize:s,textColor:c,setValue:a,name:u,font:f,fontLabel:m,HorV:p="horizontal",icon:g,iconInRight:_,iconSize:b,iconColor:d,customIcon:h,seeIcon:w=!0,customInputClass:v,customLabelClass:I,customTextClass:S,customIconLabelClass:x,customContainerRadiosClass:$},k){const E=y.useId();return l.jsxs("div",{ref:k,className:L.container,children:[l.jsxs("div",{className:L.containerLabel,style:{flexDirection:_?"row-reverse":"row",justifyContent:_?"flex-end":"flex-start"},children:[h?l.jsx("div",{className:`${L.containerCustomIcon} ${x}`,style:{height:b},children:h}):w&&l.jsx(F,{icon:g??"mi:user",className:`${L.icon} ${x}`,style:{color:d,fontSize:b}}),l.jsx("label",{style:{fontSize:o,color:r,fontFamily:m},className:S,children:t})]}),l.jsxs("div",{className:L.containerInputError,children:[l.jsx("div",{className:`${L.containerGroupRadio} ${$}`,style:{flexDirection:p==="vertical"?"column":"row",alignItems:p==="vertical"?"stretch":"center",justifyContent:p==="vertical"?"center":"flex-start"},children:n.map((j,O)=>{const A=`${E}-${O}`;return l.jsxs("div",{className:L.containerRadio,children:[l.jsx("input",{id:A,className:`${L.inputElement} ${v}`,style:{fontSize:s,color:c},type:"radio",name:u,value:j.value,onChange:M=>a(M.target.value)}),j.customIcon?l.jsx("div",{className:`${L.containerCustomIcon} ${j.customIconClass}`,children:j.customIcon}):j.seeIcon&&l.jsx(F,{icon:j.icon??"mi:user",className:`${L.icon} ${j.customIconClass}`,style:{color:j.iconColor,fontSize:b}}),l.jsx("label",{htmlFor:A,className:I,style:{fontSize:s,color:c,fontFamily:f},children:j.label})]},E+j.value)})}),i!==""&&l.jsx("p",{className:L.errorMessage,children:i})]})]})}),vo="_container_msjnc_26",jo="_containerInputError_msjnc_50",Io="_containerInput_msjnc_50",$o="_inputElement_msjnc_69",wo="_errorMessage_msjnc_80",To="_icon_msjnc_92",Eo="_containerCustomIcon_msjnc_99",No="_containerLabel_msjnc_111",So="_counterCharacter_msjnc_142",U={container:vo,containerInputError:jo,containerInput:Io,inputElement:$o,errorMessage:wo,icon:To,containerCustomIcon:Eo,containerLabel:No,counterCharacter:So},ko=y.forwardRef(function({placeholder:t,value:o,setValue:r,label:n,errorMessage:i,seeMaxCharCounter:s=!0,maxCharacters:c=300,resize:a=!0,font:u,fontLabel:f,rounded:m,width:p=250,height:g=100,maxWidth:_=500,maxHeight:b=500,border:d,shadow:h,textSize:w,textColor:v,bgColor:I,customContainerClass:S,customTextAreaClass:x,customIconClass:$,seeIcon:k,iconInRight:E=!1,iconColor:j,iconSize:O,icon:A,customIcon:M,args:Y},z){const Q=y.useMemo(()=>re(m??"lg"),[m]);return l.jsxs("div",{className:U.container,children:[l.jsxs("div",{className:U.containerLabel,style:{flexDirection:E?"row-reverse":"row",justifyContent:E?"flex-end":"flex-start"},children:[M?l.jsx("div",{className:`${U.containerCustomIcon} ${$}`,style:{height:O},children:M}):k&&l.jsx(F,{icon:A??"mi:user",className:`${U.icon} ${$}`,style:{color:j,fontSize:O}}),l.jsx("label",{style:{fontSize:w,color:v,fontFamily:f},children:n})]}),l.jsxs("div",{className:U.containerInputError,children:[l.jsxs("div",{className:`${U.containerInput} ${S}`,style:{borderRadius:Q,border:d||d===void 0?"":"none",boxShadow:h?"0 0 5px #00000075":"",backgroundColor:I,resize:a?"both":"none",width:p,height:g,minWidth:p,minHeight:g,maxWidth:_,maxHeight:b},children:[l.jsx("textarea",{ref:z,className:`${U.inputElement} ${x}`,style:{fontSize:w,color:v,fontFamily:u},placeholder:t,value:o,maxLength:c,onChange:G=>r?.(G.target.value),...Y}),s&&l.jsxs("p",{className:U.counterCharacter,children:[o?o?.length:0,"/",c]})]}),i!==""&&l.jsx("p",{className:U.errorMessage,children:i})]})]})}),Co=["America/Mexico_City","America/New_York","America/Los_Angeles","America/Bogota","America/Argentina/Buenos_Aires","America/Sao_Paulo","Europe/Madrid","Europe/London","Europe/Paris","Asia/Tokyo","Asia/Shanghai","Australia/Sydney","UTC"],fe="America/Mexico_City";function Xe(e,t){return new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).formatToParts(e).reduce((r,n)=>(r[n.type]=n.value,r),{})}function Do(e){if(!e)return 0;let t;return typeof e=="string"?t=new Date(e):t=e,Math.floor(t.getTime()/1e3)}function Fo(e,t=fe){if(!e)return"";const o=new Date(e*1e3),r=Xe(o,t);return`${r.year}-${r.month}-${r.day}`}function Ve(e,t=fe){if(!e)return"";const o=["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"],r=new Date(e*1e3),n=Xe(r,t),i=parseInt(n.month,10)-1,s=o[i]||n.month,c=n.dayPeriod?n.dayPeriod.toUpperCase().replace(/\./g,""):"";return`${n.day}/${s}/${n.year} - ${n.hour}:${n.minute} ${c}`}function Oo(e,t=fe){if(!e)return"";const o=new Date(e*1e3),n=new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(o).reduce((i,s)=>(i[s.type]=s.value,i),{});return`${n.year}-${n.month}-${n.day} ${n.hour}:${n.minute}`}function Mo(e,t=fe){return Ve(e,t).split(" - ")[0]}exports.ButtonGal=Ze;exports.CheckBoxGal=yt;exports.DropDownGal=Ft;exports.InputFileGal=lo;exports.InputRadioGal=bo;exports.InputTextGal=ft;exports.TIMEZONES=Co;exports.TextAreaGal=ko;exports.convertToUnix=Do;exports.unixToDate=Fo;exports.unixToDateTime=Oo;exports.unixToDateTimeString=Ve;exports.unixToStringYMD=Mo;exports.useOnClickOutside=We;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const u=require("react/jsx-runtime"),b=require("react");function rn(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function i(c){if(n[c])return r[c]=[];if(!(c in r)){r[c]=null;const a=o[c]&&o[c].parent,l=a&&i(a);l&&(r[c]=[a].concat(l))}return r[c]}return Object.keys(n).concat(Object.keys(o)).forEach(i),r}const Pe=Object.freeze({left:0,top:0,width:16,height:16}),le=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),je=Object.freeze({...Pe,...le}),be=Object.freeze({...je,body:"",hidden:!1});function on(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Te(e,t){const n=on(e,t);for(const o in be)o in le?o in e&&!(o in n)&&(n[o]=le[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function sn(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function c(a){i=Te(o[a]||r[a],i)}return c(t),n.forEach(c),Te(e,i)}function Ae(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=rn(e);for(const r in o){const i=o[r];i&&(t(r,sn(e,r,i)),n.push(r))}return n}const cn={provider:"",aliases:{},not_found:{},...Pe};function he(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Be(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!he(e,cn))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r||typeof i.body!="string"||!he(i,be))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],c=i.parent;if(!r||typeof c!="string"||!n[c]&&!o[c]||!he(i,be))return null}return t}const ke=Object.create(null);function an(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function H(e,t){const n=ke[e]||(ke[e]=Object.create(null));return n[t]||(n[t]=an(e,t))}function ze(e,t){return Be(t)?Ae(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function ln(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}const Ge=/^[a-z0-9]+(-[a-z0-9]+)*$/,ue=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const a=r.pop(),l=r.pop(),d={provider:r.length>0?r[0]:o,prefix:l,name:a};return t&&!ie(d)?null:d}const i=r[0],c=i.split("-");if(c.length>1){const a={provider:o,prefix:c.shift(),name:c.join("-")};return t&&!ie(a)?null:a}if(n&&o===""){const a={provider:o,prefix:"",name:i};return t&&!ie(a,n)?null:a}return null},ie=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let re=!1;function qe(e){return typeof e=="boolean"&&(re=e),re}function Ne(e){const t=typeof e=="string"?ue(e,!0,re):e;if(t){const n=H(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function un(e,t){const n=ue(e,!0,re);if(!n)return!1;const o=H(n.provider,n.prefix);return t?ln(o,n.name,t):(o.missing.add(n.name),!0)}function fn(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),re&&!t&&!e.prefix){let r=!1;return Be(e)&&(e.prefix="",Ae(e,(i,c)=>{un(i,c)&&(r=!0)})),r}const n=e.prefix;if(!ie({prefix:n,name:"a"}))return!1;const o=H(t,n);return!!ze(o,e)}const Ue=Object.freeze({width:null,height:null}),Ye=Object.freeze({...Ue,...le}),dn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,pn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Se(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(dn);if(o===null||!o.length)return e;const r=[];let i=o.shift(),c=pn.test(i);for(;;){if(c){const a=parseFloat(i);isNaN(a)?r.push(i):r.push(Math.ceil(a*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");c=!c}}function mn(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const r=e.indexOf(">",o),i=e.indexOf("</"+t);if(r===-1||i===-1)break;const c=e.indexOf(">",i);if(c===-1)break;n+=e.slice(r+1,i).trim(),e=e.slice(0,o).trim()+e.slice(c+1)}return{defs:n,content:e}}function hn(e,t){return e?"<defs>"+e+"</defs>"+t:t}function gn(e,t,n){const o=mn(e);return hn(o.defs,t+o.content+n)}const xn=e=>e==="unset"||e==="undefined"||e==="none";function bn(e,t){const n={...je,...e},o={...Ye,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(j=>{const h=[],s=j.hFlip,f=j.vFlip;let p=j.rotate;s?f?p+=2:(h.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),h.push("scale(-1 1)"),r.top=r.left=0):f&&(h.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),h.push("scale(1 -1)"),r.top=r.left=0);let x;switch(p<0&&(p-=Math.floor(p/4)*4),p=p%4,p){case 1:x=r.height/2+r.top,h.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:h.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:x=r.width/2+r.left,h.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}p%2===1&&(r.left!==r.top&&(x=r.left,r.left=r.top,r.top=x),r.width!==r.height&&(x=r.width,r.width=r.height,r.height=x)),h.length&&(i=gn(i,'<g transform="'+h.join(" ")+'">',"</g>"))});const c=o.width,a=o.height,l=r.width,d=r.height;let m,y;c===null?(y=a===null?"1em":a==="auto"?d:a,m=Se(y,l/d)):(m=c==="auto"?l:c,y=a===null?Se(m,d/l):a==="auto"?d:a);const g={},v=(j,h)=>{xn(h)||(g[j]=h.toString())};v("width",m),v("height",y);const _=[r.left,r.top,l,d];return g.viewBox=_.join(" "),{attributes:g,viewBox:_,body:i}}const yn=/\sid="(\S+)"/g,vn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let _n=0;function In(e,t=vn){const n=[];let o;for(;o=yn.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const c=typeof t=="function"?t(i):t+(_n++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+c+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const ye=Object.create(null);function jn(e,t){ye[e]=t}function ve(e){return ye[e]||ye[""]}function we(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const $e=Object.create(null),ee=["https://api.simplesvg.com","https://api.unisvg.com"],ce=[];for(;ee.length>0;)ee.length===1||Math.random()>.5?ce.push(ee.shift()):ce.push(ee.pop());$e[""]=we({resources:["https://api.iconify.design"].concat(ce)});function wn(e,t){const n=we(t);return n===null?!1:($e[e]=n,!0)}function Ee(e){return $e[e]}const $n=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ce=$n();function En(e,t){const n=Ee(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(c=>{r=Math.max(r,c.length)});const i=t+".json?icons=";o=n.maxURL-r-n.path.length-i.length}return o}function Tn(e){return e===404}const kn=(e,t,n)=>{const o=[],r=En(e,t),i="icons";let c={type:i,provider:e,prefix:t,icons:[]},a=0;return n.forEach((l,d)=>{a+=l.length+1,a>=r&&d>0&&(o.push(c),c={type:i,provider:e,prefix:t,icons:[]},a=l.length),c.icons.push(l)}),o.push(c),o};function Nn(e){if(typeof e=="string"){const t=Ee(e);if(t)return t.path}return"/"}const Sn=(e,t,n)=>{if(!Ce){n("abort",424);return}let o=Nn(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});o+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let r=503;Ce(e+o).then(i=>{const c=i.status;if(c!==200){setTimeout(()=>{n(Tn(c)?"abort":"next",c)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",r)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",r)})},Cn={prepare:kn,send:Sn};function Qe(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function Dn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(i=>{const c=i.icons,a=c.pending.length;c.pending=c.pending.filter(l=>{if(l.prefix!==r)return!0;const d=l.name;if(e.icons[d])c.loaded.push({provider:o,prefix:r,name:d});else if(e.missing.has(d))c.missing.push({provider:o,prefix:r,name:d});else return n=!0,!0;return!1}),c.pending.length!==a&&(n||Qe([e],i.id),i.callback(c.loaded.slice(0),c.missing.slice(0),c.pending.slice(0),i.abort))})}))}let Fn=0;function Rn(e,t,n){const o=Fn++,r=Qe.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(c=>{(c.loaderCallbacks||(c.loaderCallbacks=[])).push(i)}),r}function On(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const i=r.provider,c=r.prefix,a=r.name,l=n[i]||(n[i]=Object.create(null)),d=l[c]||(l[c]=H(i,c));let m;a in d.icons?m=t.loaded:c===""||d.missing.has(a)?m=t.missing:m=t.pending;const y={provider:i,prefix:c,name:a};m.push(y)}),t}function Ln(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const i=typeof r=="string"?ue(r,t,n):r;i&&o.push(i)}),o}const Mn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Pn(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let c;if(e.random){let I=e.resources.slice(0);for(c=[];I.length>1;){const E=Math.floor(Math.random()*I.length);c.push(I[E]),I=I.slice(0,E).concat(I.slice(E+1))}c=c.concat(I)}else c=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",d=0,m,y=null,g=[],v=[];typeof o=="function"&&v.push(o);function _(){y&&(clearTimeout(y),y=null)}function j(){l==="pending"&&(l="aborted"),_(),g.forEach(I=>{I.status==="pending"&&(I.status="aborted")}),g=[]}function h(I,E){E&&(v=[]),typeof I=="function"&&v.push(I)}function s(){return{startTime:a,payload:t,status:l,queriesSent:d,queriesPending:g.length,subscribe:h,abort:j}}function f(){l="failed",v.forEach(I=>{I(void 0,m)})}function p(){g.forEach(I=>{I.status==="pending"&&(I.status="aborted")}),g=[]}function x(I,E,k){const N=E!=="success";switch(g=g.filter(w=>w!==I),l){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){m=k,f();return}if(N){m=k,g.length||(c.length?$():f());return}if(_(),p(),!e.random){const w=e.resources.indexOf(I.resource);w!==-1&&w!==e.index&&(e.index=w)}l="completed",v.forEach(w=>{w(k)})}function $(){if(l!=="pending")return;_();const I=c.shift();if(I===void 0){if(g.length){y=setTimeout(()=>{_(),l==="pending"&&(p(),f())},e.timeout);return}f();return}const E={status:"pending",resource:I,callback:(k,N)=>{x(E,k,N)}};g.push(E),d++,y=setTimeout($,e.rotate),n(I,t,E.callback)}return setTimeout($),s}function We(e){const t={...Mn,...e};let n=[];function o(){n=n.filter(a=>a().status==="pending")}function r(a,l,d){const m=Pn(t,a,l,(y,g)=>{o(),d&&d(y,g)});return n.push(m),m}function i(a){return n.find(l=>a(l))||null}return{query:r,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:o}}function De(){}const ge=Object.create(null);function An(e){if(!ge[e]){const t=Ee(e);if(!t)return;const n=We(t),o={config:t,redundancy:n};ge[e]=o}return ge[e]}function Bn(e,t,n){let o,r;if(typeof e=="string"){const i=ve(e);if(!i)return n(void 0,424),De;r=i.send;const c=An(e);c&&(o=c.redundancy)}else{const i=we(e);if(i){o=We(i);const c=e.resources?e.resources[0]:"",a=ve(c);a&&(r=a.send)}}return!o||!r?(n(void 0,424),De):o.query(t,r,n)().abort}function Fe(){}function zn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dn(e)}))}function Gn(e){const t=[],n=[];return e.forEach(o=>{(o.match(Ge)?t:n).push(o)}),{valid:t,invalid:n}}function ne(e,t,n){function o(){const r=e.pendingIcons;t.forEach(i=>{r&&r.delete(i),e.icons[i]||e.missing.add(i)})}if(n&&typeof n=="object")try{if(!ze(e,n).length){o();return}}catch(r){console.error(r)}o(),zn(e)}function Re(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function qn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Re(e.loadIcons(r,o,n),m=>{ne(e,r,m)});return}if(i){r.forEach(m=>{const y=i(m,o,n);Re(y,g=>{const v=g?{prefix:o,icons:{[m]:g}}:null;ne(e,[m],v)})});return}const{valid:c,invalid:a}=Gn(r);if(a.length&&ne(e,a,null),!c.length)return;const l=o.match(Ge)?ve(n):null;if(!l){ne(e,c,null);return}l.prepare(n,o,c).forEach(m=>{Bn(n,m,y=>{ne(e,m.icons,y)})})}))}const Un=(e,t)=>{const n=Ln(e,!0,qe()),o=On(n);if(!o.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(o.loaded,o.missing,o.pending,Fe)}),()=>{l=!1}}const r=Object.create(null),i=[];let c,a;return o.pending.forEach(l=>{const{provider:d,prefix:m}=l;if(m===a&&d===c)return;c=d,a=m,i.push(H(d,m));const y=r[d]||(r[d]=Object.create(null));y[m]||(y[m]=[])}),o.pending.forEach(l=>{const{provider:d,prefix:m,name:y}=l,g=H(d,m),v=g.pendingIcons||(g.pendingIcons=new Set);v.has(y)||(v.add(y),r[d][m].push(y))}),i.forEach(l=>{const d=r[l.provider][l.prefix];d.length&&qn(l,d)}),t?Rn(t,o,i):Fe};function Yn(e,t){const n={...e};for(const o in t){const r=t[o],i=typeof r;o in Ue?(r===null||r&&(i==="string"||i==="number"))&&(n[o]=r):i===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const Qn=/[\s,]+/;function Wn(e,t){t.split(Qn).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Zn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/r,i%1===0?o(i):0)}}return t}function Jn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Xn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Kn(e){return"data:image/svg+xml,"+Xn(e)}function Hn(e){return'url("'+Kn(e)+'")'}let te;function Vn(){try{te=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{te=null}}function et(e){return te===void 0&&Vn(),te?te.createHTML(e):e}const Ze={...Ye,inline:!1},nt={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},tt={display:"inline-block"},_e={backgroundColor:"currentColor"},Je={backgroundColor:"transparent"},Oe={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Le={WebkitMask:_e,mask:_e,background:Je};for(const e in Le){const t=Le[e];for(const n in Oe)t[e+n]=Oe[n]}const rt={...Ze,inline:!0};function Me(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const ot=(e,t,n)=>{const o=t.inline?rt:Ze,r=Yn(o,t),i=t.mode||"svg",c={},a=t.style||{},l={...i==="svg"?nt:{}};if(n){const h=ue(n,!1,!0);if(h){const s=["iconify"],f=["provider","prefix"];for(const p of f)h[p]&&s.push("iconify--"+h[p]);l.className=s.join(" ")}}for(let h in t){const s=t[h];if(s!==void 0)switch(h){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":l.ref=s;break;case"className":l[h]=(l[h]?l[h]+" ":"")+s;break;case"inline":case"hFlip":case"vFlip":r[h]=s===!0||s==="true"||s===1;break;case"flip":typeof s=="string"&&Wn(r,s);break;case"color":c.color=s;break;case"rotate":typeof s=="string"?r[h]=Zn(s):typeof s=="number"&&(r[h]=s);break;case"ariaHidden":case"aria-hidden":s!==!0&&s!=="true"&&delete l["aria-hidden"];break;default:o[h]===void 0&&(l[h]=s)}}const d=bn(e,r),m=d.attributes;if(r.inline&&(c.verticalAlign="-0.125em"),i==="svg"){l.style={...c,...a},Object.assign(l,m);let h=0,s=t.id;return typeof s=="string"&&(s=s.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:et(In(d.body,s?()=>s+"ID"+h++:"iconifyReact"))},b.createElement("svg",l)}const{body:y,width:g,height:v}=e,_=i==="mask"||(i==="bg"?!1:y.indexOf("currentColor")!==-1),j=Jn(y,{...m,width:g+"",height:v+""});return l.style={...c,"--svg":Hn(j),width:Me(m.width),height:Me(m.height),...tt,..._?_e:Je,...a},b.createElement("span",l)};qe(!0);jn("",Cn);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!fn(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;wn(n,r)||console.error(o)}catch{console.error(o)}}}}function Xe(e){const[t,n]=b.useState(!!e.ssr),[o,r]=b.useState({});function i(v){if(v){const _=e.icon;if(typeof _=="object")return{name:"",data:_};const j=Ne(_);if(j)return{name:_,data:j}}return{name:""}}const[c,a]=b.useState(i(!!e.ssr));function l(){const v=o.callback;v&&(v(),r({}))}function d(v){if(JSON.stringify(c)!==JSON.stringify(v))return l(),a(v),!0}function m(){var v;const _=e.icon;if(typeof _=="object"){d({name:"",data:_});return}const j=Ne(_);if(d({name:_,data:j}))if(j===void 0){const h=Un([_],m);r({callback:h})}else j&&((v=e.onLoad)===null||v===void 0||v.call(e,_))}b.useEffect(()=>(n(!0),l),[]),b.useEffect(()=>{t&&m()},[e.icon,t]);const{name:y,data:g}=c;return g?ot({...je,...g},e,y):e.children?e.children:e.fallback?e.fallback:b.createElement("span",{})}const F=b.forwardRef((e,t)=>Xe({...e,_ref:t}));b.forwardRef((e,t)=>Xe({inline:!0,...e,_ref:t}));const st="_container_j1lh3_26",it="_title_j1lh3_46",ct="_containerInputError_j1lh3_50",at="_containerInput_j1lh3_50",lt="_inputElement_j1lh3_69",ut="_errorMessage_j1lh3_80",ft="_icon_j1lh3_92",dt="_containerCustomIcon_j1lh3_99",P={container:st,title:it,containerInputError:ct,containerInput:at,inputElement:lt,errorMessage:ut,icon:ft,containerCustomIcon:dt},oe=e=>{switch(e){case"none":return 0;case"sm":return 5;case"md":return 10;case"lg":return 15;case"full":return 9999;default:return 0}},pt=b.forwardRef(function({placeholder:t,value:n,setValue:o,label:r,typeInput:i,HorV:c,errorMessage:a,font:l,fontLabel:d,rounded:m,width:y,height:g,border:v,shadow:_,textSize:j,textColor:h,bgColor:s,customContainerClass:f,customInputClass:p,customIconRClass:x,customIconLClass:$,seeIconLeft:I=!0,seeIconRight:E,iconColorL:k,iconColorR:N,iconColorPass:w,iconSizeL:D,iconSizeR:L,iconSizePass:R,iconLeft:U,iconRight:Y,customIconLeft:B,customIconRight:z,args:J},X){const[O,G]=b.useState(!1),W=b.useMemo(()=>oe(m??"full"),[m]);return u.jsxs("div",{className:P.container,style:{flexDirection:c==="horizontal"?"row":"column"},children:[u.jsx("label",{className:P.title,style:{fontSize:j,color:h,height:c==="horizontal"?35:"auto",display:c==="horizontal"?"flex":"block",alignItems:c==="horizontal"?"center":"initial",marginRight:c==="horizontal"?10:0,marginBottom:c==="vertical"?5:0,fontFamily:d},children:r}),u.jsxs("div",{className:P.containerInputError,children:[u.jsxs("div",{className:`${P.containerInput} ${f}`,style:{borderRadius:W,width:!y&&i==="datetime-local"?"auto":y,height:g,border:v||v===void 0?"":"none",boxShadow:_?"0 0 5px #00000075":"",backgroundColor:s},children:[B?u.jsx("div",{className:`${P.containerCustomIcon} ${$}`,children:B}):I&&u.jsx(F,{icon:U??"mi:user",className:`${P.icon} ${$}`,style:{color:k,fontSize:D}}),u.jsx("input",{ref:X,className:`${P.inputElement} ${p}`,style:{fontSize:j,color:h,fontFamily:l},type:i==="password"&&O?"text":i,placeholder:t,value:n,onChange:Q=>o?.(Q.target.value),...J}),i==="password"&&u.jsx(F,{onClick:()=>G(!O),icon:O?"fluent:eye-20-filled":"fluent:eye-hide-20-filled",className:`${P.icon}`,style:{color:w,fontSize:R,marginRight:10,cursor:i=="password"?"pointer":"default"}}),z?u.jsx("div",{className:`${P.containerCustomIcon} ${x}`,children:z}):E&&u.jsx(F,{icon:Y??"mi:user",className:`${P.icon} ${x}`,style:{color:N,fontSize:L}})]}),a!==""&&u.jsx("p",{className:P.errorMessage,children:a})]})]})}),mt="_container_5daeb_26",ht="_containerInputError_5daeb_50",gt="_containerInput_5daeb_50",xt="_inputElement_5daeb_69",bt="_errorMessage_5daeb_80",yt="_icon_5daeb_92",vt="_containerCustomIcon_5daeb_99",Z={container:mt,containerInputError:ht,containerInput:gt,inputElement:xt,errorMessage:bt,icon:yt,containerCustomIcon:vt},_t=b.forwardRef(function({label:t,value:n,errorMessage:o,textSize:r,textColor:i,setValue:c,useLinkable:a,link:l,font:d,iconSize:m,seeIcon:y,icon:g,iconColor:v,customInputClass:_,customLabelClass:j,customIconClass:h,customIcon:s,args:f},p){const x=b.useId();return u.jsx("div",{ref:p,className:Z.container,children:u.jsxs("div",{className:Z.containerInputError,children:[u.jsxs("div",{className:Z.containerInput,children:[u.jsx("input",{className:`${Z.inputElement} ${_}`,style:{fontSize:r,color:i},type:"checkbox",checked:n,onChange:$=>c($.target.checked),...f}),s?u.jsx("div",{className:`${Z.containerCustomIcon} ${h}`,children:s}):y&&u.jsx(F,{icon:g??"mi:user",className:`${Z.icon} ${h}`,style:{color:v,fontSize:m}}),a?u.jsx("a",{className:j,href:l||"#",style:{fontSize:r,color:i,textDecoration:"underline",fontFamily:d},children:t}):u.jsx("label",{htmlFor:x,className:j,style:{fontSize:r,color:i,fontFamily:d},children:t})]}),o!==""&&u.jsx("p",{className:Z.errorMessage,children:o})]})})}),It="_container_v1dbe_26",jt="_containerInputError_v1dbe_51",wt="_containerInput_v1dbe_51",$t="_errorMessage_v1dbe_81",Et="_icon_v1dbe_93",Tt="_containerCustomIcon_v1dbe_100",kt="_containerInputAndOptions_v1dbe_100",Nt="_containerOptions_v1dbe_100",St="_optionElement_v1dbe_100",Ct="_containerIconOption_v1dbe_100",Dt="_containerLabel_v1dbe_112",Ft="_textOption_v1dbe_142",Rt="_iconArrow_v1dbe_150",S={container:It,containerInputError:jt,containerInput:wt,errorMessage:$t,icon:Et,containerCustomIcon:Tt,containerInputAndOptions:kt,containerOptions:Nt,optionElement:St,containerIconOption:Ct,containerLabel:Dt,textOption:Ft,iconArrow:Rt},Ke=(e,t)=>{b.useEffect(()=>{const n=o=>{const r=e.current;!r||r.contains(o.target)||t(o)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])},Ot=b.forwardRef(function({label:t,value:n,setValue:o,options:r,placeholder:i,errorMessage:c,orientation:a="bottom",iconInRight:l=!1,font:d,fontLabel:m,rounded:y,border:g=!0,textSize:v="1.4em",textColor:_="#000",labelSize:j="1.4em",labelColor:h="#000",width:s=250,height:f=40,bgColor:p,shadow:x=!1,HorV:$="vertical",icon:I,iconSize:E=20,iconsOptionsSize:k=20,seeIcon:N=!1,seeOptionsIcons:w=!1,iconsColor:D="#000",customIcon:L,customContainerClass:R,customInputClass:U,customLabelClass:Y,customIconClass:B,customOptionClass:z},J){const[X,O]=b.useState(null),[G,W]=b.useState(!1),Q=b.useRef(null),K={valueOption:null,text:i??"Selecciona una opción",icon:"hugeicons:cursor-magic-selection-04"};Ke(Q,()=>{W(!1)}),b.useEffect(()=>{let C=[K,...r];O(C)},[]);const de=b.useMemo(()=>oe(y??"lg"),[y]);return u.jsxs("div",{ref:J,className:`${S.container} ${R}`,style:{flexDirection:$==="horizontal"?"row":"column"},children:[u.jsxs("div",{className:S.containerLabel,style:{flexDirection:l?"row-reverse":"row",justifyContent:l?"flex-end":"flex-start"},children:[L?u.jsx("div",{className:`${S.containerCustomIcon} ${B}`,style:{height:E},children:L}):N&&u.jsx(F,{icon:I??"icon-park-outline:dot",className:`${S.icon} ${B}`,style:{color:D,fontSize:E}}),u.jsx("label",{className:Y,style:{fontSize:j,color:h,height:$==="horizontal"?35:"auto",display:$==="horizontal"?"flex":"block",alignItems:$==="horizontal"?"center":"initial",marginRight:$==="horizontal"?10:0,marginBottom:$==="vertical"?5:0,fontFamily:m},children:t})]}),u.jsxs("div",{className:S.containerInputError,children:[u.jsxs("div",{ref:Q,className:S.containerInputAndOptions,children:[u.jsxs("div",{onClick:C=>{C.stopPropagation(),W(!G)},className:`${S.containerInput} ${U}`,style:{width:s,height:f,border:g?"":"none",boxShadow:x?"0 0 10px #00000050":"",borderRadius:de,backgroundColor:p},children:[w&&n?.valueOption&&u.jsx(u.Fragment,{children:n?.customIcon?u.jsx("div",{className:S.containerCustomIcon,children:n?.customIcon}):n?.icon&&u.jsx(F,{icon:n.icon,className:S.icon,style:{color:n.iconColor?n.iconColor:D,fontSize:k}})}),u.jsx("p",{className:S.textOption,style:{fontSize:j,color:h,fontWeight:n?.valueOption?"bold":"",fontFamily:d},children:n?.text?n.text:K.text}),u.jsx(F,{icon:"ri:arrow-down-s-line",className:`${S.icon} ${S.iconArrow}`})]}),G&&u.jsx("div",{className:S.containerOptions,style:{top:a==="bottom"?"calc(100% + 10px)":a==="left"||a==="right"?0:"",left:a==="right"?"calc(100% + 10px)":a==="top"||a==="bottom"?0:"",bottom:a==="top"?"calc(100% + 10px)":"",right:a==="left"?"calc(100% + 10px)":""},children:X?.map((C,V)=>u.jsxs("div",{onClick:pe=>{pe.stopPropagation(),W(!1),o(C)},className:`${S.optionElement} ${z}`,children:[w&&u.jsx("div",{className:`${S.containerIconOption}`,children:C.customIcon?C.customIcon:w&&u.jsx(F,{icon:C.icon??"icon-park-outline:dot",className:`${S.icon} ${S.containerIconOption}`,style:{color:C.iconColor?C.iconColor:D,fontSize:k}})}),u.jsx("p",{className:S.textOption,style:{fontSize:v,color:_,fontFamily:d},children:C.text?C.text:K.text})]},V))})]}),c!==""&&u.jsx("p",{className:S.errorMessage,children:c})]})]})}),Lt="_container_1nag4_26",Mt="_containerInputError_1nag4_50",Pt="_errorMessage_1nag4_80",At="_icon_1nag4_92",Bt="_containerCustomIcon_1nag4_99",zt="_containerInputFile_1nag4_114",Gt="_containerSelectedFile_1nag4_114",qt="_textInput_1nag4_132",Ut="_inputFile_1nag4_142",Yt="_fileName_1nag4_158",Qt="_backdrop_1nag4_175",M={container:Lt,containerInputError:Mt,errorMessage:Pt,icon:At,containerCustomIcon:Bt,containerInputFile:zt,containerSelectedFile:Gt,textInput:qt,inputFile:Ut,fileName:Yt,backdrop:Qt},xe={images:{common:"image/png, image/jpeg, image/gif, image/webp",png:"image/png",jpg:"image/jpeg, image/jpg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",ico:"image/x-icon, image/vnd.microsoft.icon",tiff:"image/tiff",bmp:"image/bmp",heic:"image/heic, image/heif"},docs:{pdf:"application/pdf",word:".doc, .docx, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document",excel:".xls, .xlsx, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",powerpoint:".ppt, .pptx, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",odp:"application/vnd.oasis.opendocument.presentation",txt:"text/plain",rtf:"application/rtf",csv:"text/csv",markdown:"text/markdown, .md",epub:"application/epub+zip"},archives:{zip:"application/zip, application/x-zip-compressed",rar:"application/x-rar-compressed, .rar",sevenZ:"application/x-7z-compressed",tar:"application/x-tar",gz:"application/gzip",iso:"application/x-iso9660-image, .iso"},media:{audio:"audio/*",video:"video/*",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg, video/ogg",mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",avi:"video/x-msvideo"},fonts:{woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf, application/x-font-ttf",otf:"font/otf, application/x-font-opentype",eot:"application/vnd.ms-fontobject"},code:{html:"text/html",css:"text/css",js:"text/javascript, application/javascript, .mjs",ts:"application/typescript, .ts, .tsx",json:"application/json",xml:"application/xml, text/xml",python:"text/x-python, .py",java:"text/x-java-source, .java, application/java-archive, .jar",csharp:"text/plain, .cs",cpp:"text/x-c++, .cpp, .h, .hpp",c:"text/x-c, .c",php:"application/x-httpd-php, .php",sql:"application/sql, .sql",sh:"application/x-sh, .sh",yaml:"text/yaml, .yaml, .yml"}},He=e=>{if(Array.isArray(e))return e.map(n=>He(n)).filter(n=>n!==void 0).join(", ");if(e!=="*"){if(typeof e=="string"){if(e in xe){const t=xe[e];return Object.values(t).join(", ")}return}if(typeof e=="object"){const t=[];return Object.keys(e).forEach(n=>{const o=e[n],r=xe[n];o&&r&&o.forEach(i=>{const c=r[i];c&&t.push(c)})}),t.join(", ")}}},Wt="_btnThemeDark_1hn8j_26",Zt="_iconButton_1hn8j_58",Jt="_containerCustomIcon_1hn8j_65",Xt="_btnBorderedThemeDark_1hn8j_78",Kt="_btnThemeGreen_1hn8j_98",Ht="_btnBorderedThemeGreen_1hn8j_150",Vt="_btnThemeBlue_1hn8j_170",er="_btnBorderedThemeBlue_1hn8j_222",nr="_btnThemeRed_1hn8j_242",tr="_btnBorderedThemeRed_1hn8j_294",rr="_btnThemePurple_1hn8j_314",or="_btnBorderedThemePurple_1hn8j_366",sr="_btnThemeGray_1hn8j_386",ir="_btnBorderedThemeGray_1hn8j_438",cr="_btnThemeLight_1hn8j_458",ar="_btnBorderedThemeLight_1hn8j_510",lr="_btnThemeYellow_1hn8j_530",ur="_btnBorderedThemeYellow_1hn8j_582",se={btnThemeDark:Wt,iconButton:Zt,containerCustomIcon:Jt,btnBorderedThemeDark:Xt,btnThemeGreen:Kt,btnBorderedThemeGreen:Ht,btnThemeBlue:Vt,btnBorderedThemeBlue:er,btnThemeRed:nr,btnBorderedThemeRed:tr,btnThemePurple:rr,btnBorderedThemePurple:or,btnThemeGray:sr,btnBorderedThemeGray:ir,btnThemeLight:cr,btnBorderedThemeLight:ar,btnThemeYellow:lr,btnBorderedThemeYellow:ur},Ve=b.forwardRef(function({label:t="Texto del Botón",action:n=()=>{alert("Botón presionado")},font:o,width:r,height:i,bgColor:c,txtColor:a,icon:l="tabler:send",seeIcon:d=!0,textSize:m,iconColor:y,iconSize:g,styleType:v="ThemeDark",rounded:_="md",borderedStyle:j=!1,iconOn:h,padding:s,shadow:f=!1,colorShadow:p,customClassButton:x,customClassLabel:$,customClassIcon:I,customIcon:E,args:k},N){const w=b.useMemo(()=>oe(_??"full"),[_]);return u.jsxs("button",{ref:N,className:`${se[`btn${v}`]} ${j&&se[`btnBordered${v}`]} ${x}`,style:{borderRadius:w,width:r??"auto",height:i??"auto",flexDirection:h==="left"?"row-reverse":"row",boxShadow:`${f?"0 0 7px "+(p||"#000"):""}`,padding:s,background:c},onClick:D=>{D.preventDefault(),n()},...k,children:[t&&u.jsx("p",{className:`${$}`,style:{fontSize:m,fontFamily:o,color:a},children:t}),E?u.jsx("div",{className:`${se.containerCustomIcon} ${I}`,children:E}):d&&u.jsx(F,{icon:l,className:`${se.iconButton} ${I}`,style:{fontSize:g,color:y}})]})}),fr=b.forwardRef(function({label:t,errorMessage:n,acceptFiles:o="*",selectedFileE:r,setSelectedFileE:i,maxMBSize:c,shadow:a=!0,textButtonCancel:l="Cancelar",font:d,width:m,height:y,bgColor:g,bgColorHover:v,labelSize:_,labelColor:j,rounded:h="md",iconSize:s=30,seeIcon:f=!0,icon:p,iconColor:x="#fff",customFIleClass:$,customSelectedClass:I,customLabelClass:E,customIconClass:k,customIcon:N,args:w},D){const L=b.useId(),R=b.useRef(0),[U,Y]=b.useState(r),[B,z]=b.useState(!1),[J,X]=b.useState(null),[O,G]=b.useState(!1),W=He(o),Q=()=>{Y(null),i(null)},K=T=>{if(X(null),c){const tn=c*1024*1024;if(T.size>tn){X(`El archivo excede el límite de ${c} MB.`),Q();return}}Y(T),i(T)},de=T=>{T.preventDefault(),T.target.files&&T.target.files[0]?K(T.target.files[0]):Q()},C=T=>{T.preventDefault(),T.stopPropagation(),R.current+=1,T.type==="dragenter"||T.type==="dragover"?G(!0):T.type==="dragleave"&&G(!1)},V=T=>{T.preventDefault(),T.stopPropagation(),R.current-=1,R.current===0&&G(!1)},pe=T=>{T.preventDefault(),T.stopPropagation(),G(!1),R.current=0,T.dataTransfer.files&&T.dataTransfer.files[0]&&K(T.dataTransfer.files[0])},me=b.useMemo(()=>oe(h??"lg"),[h]);return u.jsx("div",{className:M.container,children:u.jsxs("div",{className:M.containerInputError,children:[U?u.jsxs("div",{className:`${M.containerSelectedFile} ${I}`,style:{boxShadow:a?"0 0 5px #00000050":"",borderRadius:me,width:m,height:y},children:[f&&u.jsx(F,{icon:"uim:paperclip",className:M.icon}),u.jsx("p",{className:M.fileName,style:{fontFamily:d},children:U?.name}),u.jsx("div",{className:M.backdrop,style:{borderRadius:me},children:u.jsx(Ve,{styleType:"ThemeRed",action:Q,label:l,rounded:"full",icon:"fa:trash",iconSize:"1.4rem",iconColor:"#fff",textSize:12,padding:"7px"})})]}):u.jsxs("label",{htmlFor:L,className:`${M.containerInputFile} ${$}`,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),onDragEnter:C,onDragLeave:V,onDragOver:T=>T.preventDefault(),onDrop:pe,style:{boxShadow:a?"0 0 5px #00000050":"",borderRadius:me,backgroundColor:O?"#fff":B?v:g,borderColor:O?g||"#6936ee":"",width:m,height:y,fontFamily:d},children:[!N||O?f&&u.jsx(F,{icon:O?"tabler:drag-drop":p??"mingcute:upload-3-fill",className:`${M.icon} ${k}`,onDragEnter:C,onDragLeave:V,style:{color:O?g||"#6936ee":x,fontSize:s}}):u.jsx("div",{className:`${M.containerCustomIcon} ${k}`,style:{height:s??"2rem"},children:N}),u.jsx("span",{className:`${M.textInput} ${E}`,style:{fontSize:_,color:O?g||"#6936ee":j,fontFamily:d},onDragEnter:C,onDragLeave:V,children:O?"Suelta para agregar":t??"Click o arrastra un archivo"}),u.jsx("input",{ref:D,id:L,type:"file",accept:W,className:M.inputFile,onChange:de,...w})]}),u.jsx("p",{className:M.errorMessage,children:J||n||""})]})})}),dr="_container_sbkx2_26",pr="_containerInputError_sbkx2_50",mr="_inputElement_sbkx2_69",hr="_errorMessage_sbkx2_80",gr="_icon_sbkx2_92",xr="_containerCustomIcon_sbkx2_99",br="_containerLabel_sbkx2_111",yr="_containerGroupRadio_sbkx2_127",vr="_containerRadio_sbkx2_134",A={container:dr,containerInputError:pr,inputElement:mr,errorMessage:hr,icon:gr,containerCustomIcon:xr,containerLabel:br,containerGroupRadio:yr,containerRadio:vr},_r=b.forwardRef(function({label:t,labelSize:n,labelColor:o,options:r,errorMessage:i,textSize:c,textColor:a,setValue:l,name:d,font:m,fontLabel:y,HorV:g="horizontal",icon:v,iconInRight:_,iconSize:j,iconColor:h,customIcon:s,seeIcon:f=!0,customInputClass:p,customLabelClass:x,customTextClass:$,customIconLabelClass:I,customContainerRadiosClass:E},k){const N=b.useId();return u.jsxs("div",{ref:k,className:A.container,children:[u.jsxs("div",{className:A.containerLabel,style:{flexDirection:_?"row-reverse":"row",justifyContent:_?"flex-end":"flex-start"},children:[s?u.jsx("div",{className:`${A.containerCustomIcon} ${I}`,style:{height:j},children:s}):f&&u.jsx(F,{icon:v??"mi:user",className:`${A.icon} ${I}`,style:{color:h,fontSize:j}}),u.jsx("label",{style:{fontSize:n,color:o,fontFamily:y},className:$,children:t})]}),u.jsxs("div",{className:A.containerInputError,children:[u.jsx("div",{className:`${A.containerGroupRadio} ${E}`,style:{flexDirection:g==="vertical"?"column":"row",alignItems:g==="vertical"?"stretch":"center",justifyContent:g==="vertical"?"center":"flex-start"},children:r.map((w,D)=>{const L=`${N}-${D}`;return u.jsxs("div",{className:A.containerRadio,children:[u.jsx("input",{id:L,className:`${A.inputElement} ${p}`,style:{fontSize:c,color:a},type:"radio",name:d,value:w.value,onChange:R=>l(R.target.value)}),w.customIcon?u.jsx("div",{className:`${A.containerCustomIcon} ${w.customIconClass}`,children:w.customIcon}):w.seeIcon&&u.jsx(F,{icon:w.icon??"mi:user",className:`${A.icon} ${w.customIconClass}`,style:{color:w.iconColor,fontSize:j}}),u.jsx("label",{htmlFor:L,className:x,style:{fontSize:c,color:a,fontFamily:m},children:w.label})]},N+w.value)})}),i!==""&&u.jsx("p",{className:A.errorMessage,children:i})]})]})}),Ir="_container_msjnc_26",jr="_containerInputError_msjnc_50",wr="_containerInput_msjnc_50",$r="_inputElement_msjnc_69",Er="_errorMessage_msjnc_80",Tr="_icon_msjnc_92",kr="_containerCustomIcon_msjnc_99",Nr="_containerLabel_msjnc_111",Sr="_counterCharacter_msjnc_142",q={container:Ir,containerInputError:jr,containerInput:wr,inputElement:$r,errorMessage:Er,icon:Tr,containerCustomIcon:kr,containerLabel:Nr,counterCharacter:Sr},Cr=b.forwardRef(function({placeholder:t,value:n,setValue:o,label:r,errorMessage:i,seeMaxCharCounter:c=!0,maxCharacters:a=300,resize:l=!0,font:d,fontLabel:m,rounded:y,width:g=250,height:v=100,maxWidth:_=500,maxHeight:j=500,border:h,shadow:s,textSize:f,textColor:p,bgColor:x,customContainerClass:$,customTextAreaClass:I,customIconClass:E,seeIcon:k,iconInRight:N=!1,iconColor:w,iconSize:D,icon:L,customIcon:R,args:U},Y){const B=b.useMemo(()=>oe(y??"lg"),[y]);return u.jsxs("div",{className:q.container,children:[u.jsxs("div",{className:q.containerLabel,style:{flexDirection:N?"row-reverse":"row",justifyContent:N?"flex-end":"flex-start"},children:[R?u.jsx("div",{className:`${q.containerCustomIcon} ${E}`,style:{height:D},children:R}):k&&u.jsx(F,{icon:L??"mi:user",className:`${q.icon} ${E}`,style:{color:w,fontSize:D}}),u.jsx("label",{style:{fontSize:f,color:p,fontFamily:m},children:r})]}),u.jsxs("div",{className:q.containerInputError,children:[u.jsxs("div",{className:`${q.containerInput} ${$}`,style:{borderRadius:B,border:h||h===void 0?"":"none",boxShadow:s?"0 0 5px #00000075":"",backgroundColor:x,resize:l?"both":"none",width:g,height:v,minWidth:g,minHeight:v,maxWidth:_,maxHeight:j},children:[u.jsx("textarea",{ref:Y,className:`${q.inputElement} ${I}`,style:{fontSize:f,color:p,fontFamily:d},placeholder:t,value:n,maxLength:a,onChange:z=>o?.(z.target.value),...U}),c&&u.jsxs("p",{className:q.counterCharacter,children:[n?n?.length:0,"/",a]})]}),i!==""&&u.jsx("p",{className:q.errorMessage,children:i})]})]})}),Dr=["America/Mexico_City","America/New_York","America/Los_Angeles","America/Bogota","America/Argentina/Buenos_Aires","America/Sao_Paulo","Europe/Madrid","Europe/London","Europe/Paris","Asia/Tokyo","Asia/Shanghai","Australia/Sydney","UTC"],fe="America/Mexico_City";function en(e,t){return new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).formatToParts(e).reduce((o,r)=>(o[r.type]=r.value,o),{})}function ae(e){if(!e)return 0;let t;return typeof e=="string"?t=new Date(e):t=e,Math.floor(t.getTime()/1e3)}function Fr(e,t=fe){if(!e)return"";const n=new Date(e*1e3),o=en(n,t);return`${o.year}-${o.month}-${o.day}`}function nn(e,t=fe){if(!e)return"";const n=["ENE","FEB","MAR","ABR","MAY","JUN","JUL","AGO","SEP","OCT","NOV","DIC"],o=new Date(e*1e3),r=en(o,t),i=parseInt(r.month,10)-1,c=n[i]||r.month,a=r.dayPeriod?r.dayPeriod.toUpperCase().replace(/\./g,""):"";return`${r.day}/${c}/${r.year} - ${r.hour}:${r.minute} ${a}`}function Ie(e,t=fe){if(!e)return"";const n=new Date(e*1e3),r=new Intl.DateTimeFormat("es-MX",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(n).reduce((i,c)=>(i[c.type]=c.value,i),{});return`${r.year}-${r.month}-${r.day} ${r.hour}:${r.minute}`}function Rr(e,t=fe){return nn(e,t).split(" - ")[0]}function Or(e){let t=!0;const n=b.useCallback((s,f)=>!s||s===void 0||s.length===0?"Este campo "+f:s+" "+f,[]),o=b.useCallback((s,f,p,x)=>f!==!0&&(s==null||typeof s=="string"&&s.trim()==="")?(t=!1,x?.(n(p,"es obligatorio")),!1):!0,[]),r=b.useCallback((s,f,p,x)=>s.length<f?(t=!1,x?.(n(p,"debe tener mínimo "+f.toString()+" caracteres")),!1):!0,[]),i=b.useCallback((s,f,p,x)=>s.length>f?(t=!1,x?.(n(p,"debe tener máximo "+f.toString()+" caracteres")),!1):!0,[]),c=b.useCallback((s,f,p,x)=>s===f?(t=!1,x?.(n(p,"debe ser igual a: "+f)),!1):!0,[]),a=b.useCallback((s,f,p,x)=>f.test(s)?!0:(t=!1,x?.(n(p,"tiene un formato inválido")),!1),[]),l=b.useCallback((s,f,p)=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)?!0:(t=!1,p?.(n(f,"no es un correo electrónico válido")),!1),[n]),d=b.useCallback((s,f,p)=>/^[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}$/.test(s)?!0:(t=!1,p?.(n(f,"no es un número de teléfono válido")),!1),[n]),m=b.useCallback((s,f,p)=>/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/.test(s)?!0:(t=!1,p?.(n(f,"no es una URL válida")),!1),[n]),y=b.useCallback((s,f,p)=>/^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{8,}$/.test(s)?!0:(t=!1,p?.(n(f,"debe tener al menos 8 caracteres, un número y un símbolo")),!1),[n]),g=b.useCallback((s,f,p)=>typeof s=="number"?(t=!1,p?.(n(f,"debe ser un número")),!1):!0,[n]),v=b.useCallback((s,f,p,x)=>s<f?(t=!1,x?.(n(p,"debe ser mayor a "+f.toString())),!1):!0,[n]),_=b.useCallback((s,f,p,x)=>s>f?(t=!1,x?.(n(p,"debe ser menor a "+f.toString())),!1):!0,[n]),j=b.useCallback((s,f,p)=>Number.isInteger(s)?!0:(t=!1,p?.(n(f,"debe ser un número entero (sin decimales)")),!1),[n]),h=b.useCallback((s,f,p,x)=>f===s?(t=!1,x?.(n(p,"debe ser igual a "+f.toString())),!1):!0,[n]);try{return e.forEach(s=>{if(o(s.value,s.canBeNull,s.nameInput,s.setError))switch(s.typeInput){case"text":if(typeof s.minLength=="number"&&s.minLength>0&&typeof s.value=="string"&&!r(s.value,s.minLength,s.nameInput,s.setError)||typeof s.maxLength=="number"&&s.maxLength>0&&typeof s.value=="string"&&!i(s.value,s.maxLength,s.nameInput,s.setError)||typeof s.needBeEqualTo=="string"&&typeof s.value=="string"&&!c(s.value,s.needBeEqualTo,s.nameInput,s.setError)||typeof s.regex=="string"&&typeof s.value=="string"&&!a(s.value,s.regex,s.nameInput,s.setError))return;break;case"email":if(typeof s.value=="string"&&!l(s.value,s.nameInput,s.setError))return;break;case"phone":if(typeof s.value=="string"&&!d(s.value,s.nameInput,s.setError))return;break;case"url":if(typeof s.value=="string"&&!m(s.value,s.nameInput,s.setError))return;break;case"pass":if(typeof s.value=="string"&&!y(s.value,s.nameInput,s.setError))return;break;case"num":if(!g(s.value,s.nameInput,s.setError)||typeof s.min=="number"&&s.min>0&&typeof s.value=="number"&&!v(s.value,s.min,s.nameInput,s.setError)||typeof s.max=="number"&&s.max>0&&typeof s.value=="number"&&!_(s.value,s.max,s.nameInput,s.setError)||s.isInteger===!0&&typeof s.value=="number"&&!j(s.value,s.nameInput,s.setError)||typeof s.needBeEqualTo=="number"&&s.needBeEqualTo>0&&typeof s.value=="number"&&!h(s.value,s.needBeEqualTo,s.nameInput,s.setError))return;break;case"bool":if(s.mustBeTrue===!0&&s.value!==!0){t=!1,s.setError?.(n(s.nameInput,"debe estar seleccionado"));return}break;case"date":case"date-time":let f,p,x;if(typeof s.value=="number"&&s.value.toString().length===10)f=s.value;else if(s.value instanceof Date||typeof s.value=="string")f=ae(s.value);else throw new Error("Formato de fecha inválido");if(s.min&&s.min instanceof Date)p=ae(s.min);else throw new Error("La propiedad 'min' tiene un formato de fecha inválido o no existe");if(s.max&&s.max instanceof Date)x=ae(s.max);else throw new Error("La propiedad 'max' tiene un formato de fecha inválido o no existe");if(f<p){t=!1,s.setError?.(n(s.nameInput,"la fecha no puede ser menor que "+Ie(p)));return}if(f>x){t=!1,s.setError?.(n(s.nameInput,"la fecha no puede ser mayor que "+Ie(x)));return}break;case"time":case"data":return;default:console.warn("Tipo de validacion no reconocida");break}}),t}catch(s){const f=s.message;throw console.error(`Error: ${f}`),s}}exports.ButtonGal=Ve;exports.CheckBoxGal=_t;exports.DropDownGal=Ot;exports.InputFileGal=fr;exports.InputRadioGal=_r;exports.InputTextGal=pt;exports.TIMEZONES=Dr;exports.TextAreaGal=Cr;exports.convertToUnix=ae;exports.unixToDate=Fr;exports.unixToDateTime=Ie;exports.unixToDateTimeString=nn;exports.unixToStringYMD=Rr;exports.useOnClickOutside=Ke;exports.useValidateForms=Or;