@homlista-devs/ui 1.6.4 → 1.6.5
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,74 +1,74 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),I=require("react"),ye=require("effector"),Gt=require("effector-react");function Wt(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return r.default=e,Object.freeze(r)}const y=Wt(I);function Je(e,r){return!r||r==="all"?e:e.filter(s=>s.categoryId===r)}function Qe(e,r){const s=[...e];return s.sort((o,a)=>{let n="",l="";return r.column==="title"?(n=o.title.toLowerCase(),l=a.title.toLowerCase()):r.column==="metric"&&(n=Ve(o.metricValue),l=Ve(a.metricValue)),n<l?r.direction==="asc"?-1:1:n>l?r.direction==="asc"?1:-1:0}),s}function Ve(e){if(!e)return 0;const r=e.match(/[\d.]+/);return r?parseFloat(r[0]):0}function Ye(e,r){return r==="all"?e.length:e.filter(s=>s.categoryId===r).length}function et(e){const{propertyPrice:r,downPayment:s,loanTerm:o,interestRate:a,propertyTax:n=0,hoaFees:l=0}=e,i=r-s,c=a/100/12,m=o*12;let u;if(c===0)u=i/m;else{const b=Math.pow(1+c,m);u=i*(c*b)/(b-1)}const d=u*m,x=d-i,N=u+n+l;return{monthlyPayment:Math.round(u*100)/100,totalMonthlyPayment:Math.round(N*100)/100,totalAmount:Math.round(d*100)/100,totalInterest:Math.round(x*100)/100,loanPrincipal:Math.round(i*100)/100,breakdown:{principalAndInterest:Math.round(u*100)/100,propertyTax:Math.round(n*100)/100,hoaFees:Math.round(l*100)/100}}}function ae(e,r="MXN"){return new Intl.NumberFormat("es-MX",{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function Ut(e,r=3){return`${e.toFixed(r)} %`}function qt(e){const r={};return(!e.propertyPrice||e.propertyPrice<=0)&&(r.propertyPrice="El precio de la propiedad debe ser mayor a 0"),(!e.downPayment||e.downPayment<0)&&(r.downPayment="El enganche debe ser mayor o igual a 0"),e.propertyPrice&&e.downPayment&&e.downPayment>=e.propertyPrice&&(r.downPayment="El enganche debe ser menor al precio de la propiedad"),(!e.loanTerm||e.loanTerm<=0)&&(r.loanTerm="El plazo del préstamo debe ser mayor a 0"),(e.interestRate===void 0||e.interestRate<0)&&(r.interestRate="La tasa de interés debe ser mayor o igual a 0"),{isValid:Object.keys(r).length===0,errors:r}}function tt(e){var r,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(s=tt(e[r]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function rt(){for(var e,r,s=0,o="",a=arguments.length;s<a;s++)(e=arguments[s])&&(r=tt(e))&&(o&&(o+=" "),o+=r);return o}const _e=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,De=rt,J=(e,r)=>s=>{var o;if(r?.variants==null)return De(e,s?.class,s?.className);const{variants:a,defaultVariants:n}=r,l=Object.keys(a).map(m=>{const u=s?.[m],d=n?.[m];if(u===null)return null;const x=_e(u)||_e(d);return a[m][x]}),i=s&&Object.entries(s).reduce((m,u)=>{let[d,x]=u;return x===void 0||(m[d]=x),m},{}),c=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((m,u)=>{let{class:d,className:x,...N}=u;return Object.entries(N).every(b=>{let[j,f]=b;return Array.isArray(f)?f.includes({...n,...i}[j]):{...n,...i}[j]===f})?[...m,d,x]:m},[]);return De(e,l,c,s?.class,s?.className)},Xt=J("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});function Be(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function Zt(...e){return r=>{let s=!1;const o=e.map(a=>{const n=Be(a,r);return!s&&typeof n=="function"&&(s=!0),n});if(s)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Be(e[a],null)}}}}function Kt(e){const r=Qt(e),s=y.forwardRef((o,a)=>{const{children:n,...l}=o,i=y.Children.toArray(n),c=i.find(er);if(c){const m=c.props.children,u=i.map(d=>d===c?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:d);return t.jsx(r,{...l,ref:a,children:y.isValidElement(m)?y.cloneElement(m,void 0,u):null})}return t.jsx(r,{...l,ref:a,children:n})});return s.displayName=`${e}.Slot`,s}var Jt=Kt("Slot");function Qt(e){const r=y.forwardRef((s,o)=>{const{children:a,...n}=s;if(y.isValidElement(a)){const l=rr(a),i=tr(n,a.props);return a.type!==y.Fragment&&(i.ref=o?Zt(o,l):l),y.cloneElement(a,i)}return y.Children.count(a)>1?y.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Yt=Symbol("radix.slottable");function er(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Yt}function tr(e,r){const s={...r};for(const o in r){const a=e[o],n=r[o];/^on[A-Z]/.test(o)?a&&n?s[o]=(...i)=>{const c=n(...i);return a(...i),c}:a&&(s[o]=a):o==="style"?s[o]={...a,...n}:o==="className"&&(s[o]=[a,n].filter(Boolean).join(" "))}return{...e,...s}}function rr(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}const Ie="-",sr=e=>{const r=ar(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{const i=l.split(Ie);return i[0]===""&&i.length!==1&&i.shift(),st(i,r)||or(l)},getConflictingClassGroupIds:(l,i)=>{const c=s[l]||[];return i&&o[l]?[...c,...o[l]]:c}}},st=(e,r)=>{if(e.length===0)return r.classGroupId;const s=e[0],o=r.nextPart.get(s),a=o?st(e.slice(1),o):void 0;if(a)return a;if(r.validators.length===0)return;const n=e.join(Ie);return r.validators.find(({validator:l})=>l(n))?.classGroupId},He=/^\[(.+)\]$/,or=e=>{if(He.test(e)){const r=He.exec(e)[1],s=r?.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},ar=e=>{const{theme:r,classGroups:s}=e,o={nextPart:new Map,validators:[]};for(const a in s)Te(s[a],o,a,r);return o},Te=(e,r,s,o)=>{e.forEach(a=>{if(typeof a=="string"){const n=a===""?r:Ge(r,a);n.classGroupId=s;return}if(typeof a=="function"){if(nr(a)){Te(a(o),r,s,o);return}r.validators.push({validator:a,classGroupId:s});return}Object.entries(a).forEach(([n,l])=>{Te(l,Ge(r,n),s,o)})})},Ge=(e,r)=>{let s=e;return r.split(Ie).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},nr=e=>e.isThemeGetter,ir=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,o=new Map;const a=(n,l)=>{s.set(n,l),r++,r>e&&(r=0,o=s,s=new Map)};return{get(n){let l=s.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return a(n,l),l},set(n,l){s.has(n)?s.set(n,l):a(n,l)}}},ze="!",Pe=":",lr=Pe.length,cr=e=>{const{prefix:r,experimentalParseClassName:s}=e;let o=a=>{const n=[];let l=0,i=0,c=0,m;for(let b=0;b<a.length;b++){let j=a[b];if(l===0&&i===0){if(j===Pe){n.push(a.slice(c,b)),c=b+lr;continue}if(j==="/"){m=b;continue}}j==="["?l++:j==="]"?l--:j==="("?i++:j===")"&&i--}const u=n.length===0?a:a.substring(c),d=dr(u),x=d!==u,N=m&&m>c?m-c:void 0;return{modifiers:n,hasImportantModifier:x,baseClassName:d,maybePostfixModifierPosition:N}};if(r){const a=r+Pe,n=o;o=l=>l.startsWith(a)?n(l.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(s){const a=o;o=n=>s({className:n,parseClassName:a})}return o},dr=e=>e.endsWith(ze)?e.substring(0,e.length-1):e.startsWith(ze)?e.substring(1):e,mr=e=>{const r=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const a=[];let n=[];return o.forEach(l=>{l[0]==="["||r[l]?(a.push(...n.sort(),l),n=[]):n.push(l)}),a.push(...n.sort()),a}},ur=e=>({cache:ir(e.cacheSize),parseClassName:cr(e),sortModifiers:mr(e),...sr(e)}),pr=/\s+/,xr=(e,r)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:n}=r,l=[],i=e.trim().split(pr);let c="";for(let m=i.length-1;m>=0;m-=1){const u=i[m],{isExternal:d,modifiers:x,hasImportantModifier:N,baseClassName:b,maybePostfixModifierPosition:j}=s(u);if(d){c=u+(c.length>0?" "+c:c);continue}let f=!!j,v=o(f?b.substring(0,j):b);if(!v){if(!f){c=u+(c.length>0?" "+c:c);continue}if(v=o(b),!v){c=u+(c.length>0?" "+c:c);continue}f=!1}const M=n(x).join(":"),P=N?M+ze:M,C=P+v;if(l.includes(C))continue;l.push(C);const S=a(v,f);for(let F=0;F<S.length;++F){const z=S[F];l.push(P+z)}c=u+(c.length>0?" "+c:c)}return c};function fr(){let e=0,r,s,o="";for(;e<arguments.length;)(r=arguments[e++])&&(s=ot(r))&&(o&&(o+=" "),o+=s);return o}const ot=e=>{if(typeof e=="string")return e;let r,s="";for(let o=0;o<e.length;o++)e[o]&&(r=ot(e[o]))&&(s&&(s+=" "),s+=r);return s};function hr(e,...r){let s,o,a,n=l;function l(c){const m=r.reduce((u,d)=>d(u),e());return s=ur(m),o=s.cache.get,a=s.cache.set,n=i,i(c)}function i(c){const m=o(c);if(m)return m;const u=xr(c,s);return a(c,u),u}return function(){return n(fr.apply(null,arguments))}}const A=e=>{const r=s=>s[e]||[];return r.isThemeGetter=!0,r},at=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,gr=/^\d+\/\d+$/,br=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yr=/\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$/,vr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>gr.test(e),T=e=>!!e&&!Number.isNaN(Number(e)),K=e=>!!e&&Number.isInteger(Number(e)),Ne=e=>e.endsWith("%")&&T(e.slice(0,-1)),U=e=>br.test(e),kr=()=>!0,Nr=e=>yr.test(e)&&!vr.test(e),it=()=>!1,Cr=e=>wr.test(e),Mr=e=>jr.test(e),Sr=e=>!h(e)&&!g(e),Tr=e=>ie(e,dt,it),h=e=>at.test(e),ee=e=>ie(e,mt,Nr),Ce=e=>ie(e,Rr,T),We=e=>ie(e,lt,it),zr=e=>ie(e,ct,Mr),he=e=>ie(e,ut,Cr),g=e=>nt.test(e),de=e=>le(e,mt),Pr=e=>le(e,Ar),Ue=e=>le(e,lt),Er=e=>le(e,dt),Ir=e=>le(e,ct),ge=e=>le(e,ut,!0),ie=(e,r,s)=>{const o=at.exec(e);return o?o[1]?r(o[1]):s(o[2]):!1},le=(e,r,s=!1)=>{const o=nt.exec(e);return o?o[1]?r(o[1]):s:!1},lt=e=>e==="position"||e==="percentage",ct=e=>e==="image"||e==="url",dt=e=>e==="length"||e==="size"||e==="bg-size",mt=e=>e==="length",Rr=e=>e==="number",Ar=e=>e==="family-name",ut=e=>e==="shadow",Lr=()=>{const e=A("color"),r=A("font"),s=A("text"),o=A("font-weight"),a=A("tracking"),n=A("leading"),l=A("breakpoint"),i=A("container"),c=A("spacing"),m=A("radius"),u=A("shadow"),d=A("inset-shadow"),x=A("text-shadow"),N=A("drop-shadow"),b=A("blur"),j=A("perspective"),f=A("aspect"),v=A("ease"),M=A("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...C(),g,h],F=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],w=()=>[g,h,c],L=()=>[oe,"full","auto",...w()],X=()=>[K,"none","subgrid",g,h],re=()=>["auto",{span:["full",K,g,h]},K,g,h],Z=()=>[K,"auto",g,h],se=()=>["auto","min","max","fr",g,h],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...w()],W=()=>[oe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],k=()=>[e,g,h],me=()=>[...C(),Ue,We,{position:[g,h]}],ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",Er,Tr,{size:[g,h]}],V=()=>[Ne,de,ee],R=()=>["","none","full",m,g,h],H=()=>["",T,de,ee],ue=()=>["solid","dashed","dotted","double"],$e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>[T,Ne,Ue,We],Fe=()=>["","none",b,g,h],pe=()=>["none",T,g,h],xe=()=>["none",T,g,h],ke=()=>[T,g,h],fe=()=>[oe,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[U],breakpoint:[U],color:[kr],container:[U],"drop-shadow":[U],ease:["in","out","in-out"],font:[Sr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[U],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[U],shadow:[U],spacing:["px",T],text:[U],"text-shadow":[U],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oe,h,g,f]}],container:["container"],columns:[{columns:[T,h,g,i]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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:S()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[K,"auto",g,h]}],basis:[{basis:[oe,"full","auto",i,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[T,oe,"auto","initial","none",h]}],grow:[{grow:["",T,g,h]}],shrink:[{shrink:["",T,g,h]}],order:[{order:[K,"first","last","none",g,h]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[i,"screen",...W()]}],"min-w":[{"min-w":[i,"screen","none",...W()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",s,de,ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,g,Ce]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ne,h]}],"font-family":[{font:[Pr,h,r]}],"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:[a,g,h]}],"line-clamp":[{"line-clamp":[T,"none",g,Ce]}],leading:[{leading:[n,...w()]}],"list-image":[{"list-image":["none",g,h]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",g,h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[T,"from-font","auto",g,ee]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[T,"auto",g,h]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",g,h]}],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",g,h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:me()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},K,g,h],radial:["",g,h],conic:[K,g,h]},Ir,zr]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[T,g,h]}],"outline-w":[{outline:["",T,de,ee]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,ge,he]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ge,he]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[T,ee]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",x,ge,he]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[T,g,h]}],"mix-blend":[{"mix-blend":[...$e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$e()}],"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":[T]}],"mask-image-linear-from-pos":[{"mask-linear-from":O()}],"mask-image-linear-to-pos":[{"mask-linear-to":O()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":O()}],"mask-image-t-to-pos":[{"mask-t-to":O()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":O()}],"mask-image-r-to-pos":[{"mask-r-to":O()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":O()}],"mask-image-b-to-pos":[{"mask-b-to":O()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":O()}],"mask-image-l-to-pos":[{"mask-l-to":O()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":O()}],"mask-image-x-to-pos":[{"mask-x-to":O()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":O()}],"mask-image-y-to-pos":[{"mask-y-to":O()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[g,h]}],"mask-image-radial-from-pos":[{"mask-radial-from":O()}],"mask-image-radial-to-pos":[{"mask-radial-to":O()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[T]}],"mask-image-conic-from-pos":[{"mask-conic-from":O()}],"mask-image-conic-to-pos":[{"mask-conic-to":O()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:me()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",g,h]}],filter:[{filter:["","none",g,h]}],blur:[{blur:Fe()}],brightness:[{brightness:[T,g,h]}],contrast:[{contrast:[T,g,h]}],"drop-shadow":[{"drop-shadow":["","none",N,ge,he]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",T,g,h]}],"hue-rotate":[{"hue-rotate":[T,g,h]}],invert:[{invert:["",T,g,h]}],saturate:[{saturate:[T,g,h]}],sepia:[{sepia:["",T,g,h]}],"backdrop-filter":[{"backdrop-filter":["","none",g,h]}],"backdrop-blur":[{"backdrop-blur":Fe()}],"backdrop-brightness":[{"backdrop-brightness":[T,g,h]}],"backdrop-contrast":[{"backdrop-contrast":[T,g,h]}],"backdrop-grayscale":[{"backdrop-grayscale":["",T,g,h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[T,g,h]}],"backdrop-invert":[{"backdrop-invert":["",T,g,h]}],"backdrop-opacity":[{"backdrop-opacity":[T,g,h]}],"backdrop-saturate":[{"backdrop-saturate":[T,g,h]}],"backdrop-sepia":[{"backdrop-sepia":["",T,g,h]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",g,h]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[T,"initial",g,h]}],ease:[{ease:["linear","initial",v,g,h]}],delay:[{delay:[T,g,h]}],animate:[{animate:["none",M,g,h]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,g,h]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:ke()}],"skew-x":[{"skew-x":ke()}],"skew-y":[{"skew-y":ke()}],transform:[{transform:[g,h,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"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:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",g,h]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",g,h]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[T,de,ee,Ce]}],stroke:[{stroke:["none",...k()]}],"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"]}},Or=hr(Lr);function p(...e){return Or(rt(e))}const q=y.forwardRef(({className:e,variant:r,size:s,asChild:o=!1,disabled:a,...n},l)=>{const i=o?Jt:"button";return t.jsx(i,{className:p(Xt({variant:r,size:s,className:e})),ref:l,type:n.type||"button",disabled:a,"aria-disabled":a?"true":void 0,...n})});q.displayName="Button";const $r=e=>{switch(e){case"h1":return"text-4xl font-bold leading-tight tracking-tight";case"h2":return"text-3xl font-bold leading-tight tracking-tight";case"h3":return"text-2xl font-semibold leading-tight tracking-normal";case"h4":return"text-xl font-semibold leading-snug tracking-normal";case"h5":return"text-lg font-medium leading-snug tracking-normal";case"h6":return"text-base font-medium leading-normal tracking-normal";case"body":return"text-base font-normal leading-normal";case"body-sm":return"text-sm font-normal leading-normal";case"body-lg":return"text-lg font-normal leading-relaxed";case"caption":return"text-xs font-normal leading-normal tracking-wide";case"label":return"text-sm font-medium leading-normal tracking-wide";default:return"text-base font-normal leading-normal"}},Fr=e=>{switch(e){case"primary":return"text-foreground";case"secondary":return"text-muted-foreground";case"muted":return"text-muted-foreground";case"error":return"text-destructive";case"success":return"text-success";case"warning":return"text-warning";default:return"text-foreground"}},Vr=e=>{switch(e){case"light":return"font-light";case"normal":return"font-normal";case"medium":return"font-medium";case"semibold":return"font-semibold";case"bold":return"font-bold";default:return""}},_r=e=>{switch(e){case"left":return"text-left";case"center":return"text-center";case"right":return"text-right";case"justify":return"text-justify";default:return"text-left"}},E=({variant:e="body",color:r="primary",weight:s,align:o="left",truncate:a=!1,children:n,className:l,as:i,...c})=>{const m=i||Dr(e),u=p("m-0",$r(e),Fr(r),Vr(s),_r(o),a&&"truncate",l);return t.jsx(m,{className:u,...c,children:n})};function Dr(e){switch(e){case"h1":return"h1";case"h2":return"h2";case"h3":return"h3";case"h4":return"h4";case"h5":return"h5";case"h6":return"h6";default:return"p"}}const Br=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},Hr=e=>{switch(e){case"sm":return"shadow-sm";case"md":return"shadow-md";case"lg":return"shadow-lg";default:return"shadow-none"}},Gr=e=>{switch(e){case"sm":return"rounded-sm";case"md":return"rounded-md";case"lg":return"rounded-lg";default:return"rounded-none"}},Re=({children:e,title:r,subtitle:s,className:o,padding:a="md",shadow:n="md",borderRadius:l="md",onClick:i})=>{const c=!!i,m=p("bg-card",Br(a),Hr(n),Gr(l),"transition-all duration-200 ease-in-out",c&&"cursor-pointer hover:-translate-y-0.5 hover:shadow-lg active:translate-y-0",o);return t.jsxs("div",{className:m,onClick:i,children:[(r||s)&&t.jsxs("div",{className:"mb-4",children:[r&&t.jsx("div",{className:"mb-2",children:t.jsx(E,{variant:"h3",children:r})}),s&&t.jsx("div",{className:"text-muted-foreground",children:t.jsx(E,{variant:"body-sm",color:"muted",children:s})})]}),t.jsx("div",{className:"flex-1",children:e})]})},Wr=({children:e})=>t.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:e}),Ur=Object.assign(Re,{Footer:Wr});function qr(e,r,s,o,a,n){const l=(e-90)*Math.PI/180,i=(r-90)*Math.PI/180,c=a+s*Math.cos(l),m=n+s*Math.sin(l),u=a+s*Math.cos(i),d=n+s*Math.sin(i),x=a+o*Math.cos(i),N=n+o*Math.sin(i),b=a+o*Math.cos(l),j=n+o*Math.sin(l),f=r-e>180?1:0;return[`M ${c} ${m}`,`A ${s} ${s} 0 ${f} 1 ${u} ${d}`,`L ${x} ${N}`,`A ${o} ${o} 0 ${f} 0 ${b} ${j}`,"Z"].join(" ")}function Xr(e,r,s,o,a){const n=e.reduce((c,m)=>c+m.value,0);if(n===0)return[];let l=0;const i=[];return e.forEach(c=>{const m=c.value/n*360,u=l,d=l+m,x=qr(u,d,r,s,o,a);i.push({path:x,segment:c}),l=d}),i}const Ae=y.forwardRef(({segments:e,size:r=300,innerRadiusRatio:s=.6,centerContent:o,showLegend:a=!1,legendPosition:n="bottom",className:l,onSegmentClick:i,onSegmentHover:c},m)=>{const[u,d]=y.useState(null),x=r/2,N=r/2,b=2,j=r/2-b,f=j*s,v=Xr(e,j,f,x,N),M=C=>{d(C),c?.(C)},P=n==="left"||n==="right";return t.jsxs("div",{ref:m,className:p("flex gap-4",P?"flex-row items-center":"flex-col items-center",n==="right"&&"flex-row-reverse",n==="top"&&"flex-col-reverse",l),children:[t.jsxs("div",{className:"relative inline-block",style:{width:r,height:r},children:[t.jsx("svg",{width:r,height:r,viewBox:`0 0 ${r} ${r}`,children:v.map(({path:C,segment:S},F)=>t.jsx("path",{d:C,fill:S.color,stroke:"white",strokeWidth:b,className:p("transition-opacity duration-200",u&&u!==S&&"opacity-50",i&&"cursor-pointer"),onMouseEnter:()=>M(S),onMouseLeave:()=>M(null),onClick:()=>i?.(S)},`${S.label}-${F}`))}),o&&t.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center",style:{maxWidth:f*1.8},children:o})]}),a&&t.jsx("div",{className:p("flex gap-2",P?"flex-col":"flex-row flex-wrap justify-center"),children:e.map((C,S)=>t.jsxs("div",{className:p("flex items-center gap-2 text-sm transition-opacity duration-200",u&&u!==C&&"opacity-50",i&&"cursor-pointer"),onMouseEnter:()=>M(C),onMouseLeave:()=>M(null),onClick:()=>i?.(C),children:[t.jsx("div",{className:"h-3 w-3 rounded-sm flex-shrink-0",style:{backgroundColor:C.color}}),t.jsx("span",{className:"text-muted-foreground",children:C.label})]},`${C.label}-${S}`))})]})});Ae.displayName="DonutChart";function Zr(e,r,s={}){const{initialCategory:o=null,initialSort:a=null,enableSearch:n=!1}=s,[l,i]=I.useState(o),[c,m]=I.useState(a),[u,d]=I.useState(""),x=I.useMemo(()=>Je(e,l),[e,l]),N=I.useMemo(()=>{if(!n||!u.trim())return x;const v=u.toLowerCase();return x.filter(M=>M.title.toLowerCase().includes(v)||M.subtitle?.toLowerCase().includes(v))},[x,u,n]),b=I.useMemo(()=>c?Qe(N,c):N,[N,c]),j=I.useCallback(v=>Ye(e,v),[e]),f=I.useCallback(()=>{i(o),m(a),d("")},[o,a]);return{activeCategory:l,setActiveCategory:i,sort:c,setSort:m,searchQuery:u,setSearchQuery:d,filteredEntities:b,getCategoryCount:j,resetFilters:f}}const Kr=J("inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",selected:"bg-primary text-primary-foreground hover:bg-primary/90 ring-2 ring-primary ring-offset-2"},size:{default:"h-8 px-4 py-1.5",sm:"h-7 px-3 py-1 text-xs",lg:"h-9 px-5 py-2"}},defaultVariants:{variant:"default",size:"default"}}),ve=y.forwardRef(({className:e,variant:r,size:s,icon:o,selected:a,dismissible:n,onDismiss:l,children:i,disabled:c,...m},u)=>{const d=a?"selected":r;return t.jsxs("button",{type:"button",className:p(Kr({variant:d,size:s,className:e})),ref:u,disabled:c,"aria-disabled":c?"true":void 0,"aria-pressed":a?"true":"false",...m,children:[o&&t.jsx("span",{className:"mr-1.5 inline-flex items-center","aria-hidden":"true",children:o}),t.jsx("span",{children:i}),n&&l&&t.jsx("button",{type:"button",className:"ml-1.5 inline-flex items-center hover:opacity-70",onClick:x=>{x.stopPropagation(),l()},"aria-label":"Remove",children:"×"})]})});ve.displayName="Chip";const Le=y.forwardRef(({categories:e,activeCategory:r,onCategoryChange:s,showCount:o,getCategoryCount:a,className:n},l)=>t.jsx("div",{ref:l,role:"tablist","aria-label":"Filter by category",className:p("flex flex-wrap gap-2 overflow-x-auto pb-2",n),children:e.map(i=>{const c=r===i.id,m=o&&a?a(i.id):void 0;return t.jsxs(ve,{role:"tab","aria-selected":c,"aria-controls":`entities-panel-${i.id}`,selected:c,variant:c?"selected":"outline",icon:typeof i.icon=="string"?i.icon:i.icon?y.createElement(i.icon):void 0,onClick:()=>s(c?null:i.id),children:[i.label,m!==void 0&&t.jsxs("span",{className:"ml-1.5 opacity-70",children:["(",m,")"]})]},i.id)})}));Le.displayName="CategoryChips";const Jr=J(["flex w-full rounded-md border bg-background px-3 py-2","text-base transition-colors","file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:["border-input","focus-visible:ring-primary"],error:["border-destructive","focus-visible:ring-destructive"],success:["border-success","focus-visible:ring-success"]},inputSize:{sm:"h-8 text-sm",default:"h-10",lg:"h-12 text-lg"}},defaultVariants:{variant:"default",inputSize:"default"}}),Qr=J(["block text-sm font-medium mb-1.5","transition-colors"],{variants:{variant:{default:"text-foreground",error:"text-destructive",success:"text-success"},required:{true:"after:content-['*'] after:ml-0.5 after:text-destructive",false:""}},defaultVariants:{variant:"default",required:!1}}),Yr=J("mt-1.5 text-sm",{variants:{variant:{default:"text-muted-foreground",error:"text-destructive",success:"text-success"}},defaultVariants:{variant:"default"}}),te=y.forwardRef(({className:e,containerClassName:r,labelClassName:s,variant:o,inputSize:a,label:n,helperText:l,error:i,required:c,prefix:m,suffix:u,id:d,...x},N)=>{const b=y.useId(),j=d||b,f=`${j}-helper`,v=`${j}-error`,M=i?"error":o,P=i||l;return t.jsxs("div",{className:p("w-full",r),children:[n&&t.jsx("label",{htmlFor:j,className:p(Qr({variant:M,required:c}),s),children:n}),t.jsxs("div",{className:"relative",children:[m&&t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),t.jsx("input",{id:j,ref:N,className:p(Jr({variant:M,inputSize:a}),m&&"pl-10",u&&"pr-10",e),"aria-invalid":i?"true":"false","aria-describedby":P?i?v:f:void 0,...x}),u&&t.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:u})]}),P&&t.jsx("p",{id:i?v:f,className:Yr({variant:M}),role:i?"alert":void 0,children:P})]})});te.displayName="Input";const es=e=>{switch(e){case"sm":return"max-w-md";case"md":return"max-w-2xl";case"lg":return"max-w-4xl";case"xl":return"max-w-6xl";default:return"max-w-2xl"}},pt=({isOpen:e,onClose:r,title:s,children:o,size:a="md",showCloseButton:n=!0,closeOnOverlayClick:l=!0,closeOnEscape:i=!0})=>{const c=I.useRef(null);if(I.useEffect(()=>{if(!e||!i)return;const b=j=>{j.key==="Escape"&&r()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[e,i,r]),I.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[e]),I.useEffect(()=>{e&&c.current&&c.current.focus()},[e]),!e)return null;const m=p("fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4"),u=p("bg-card rounded-lg shadow-xl w-full max-h-[90vh] overflow-hidden flex flex-col",es(a)),d=p("p-6 border-b border-border flex items-center justify-between"),x=p("p-6 overflow-y-auto flex-1"),N=p("bg-none border-none text-xl cursor-pointer text-muted-foreground p-1 rounded-sm flex items-center justify-center hover:bg-accent hover:text-accent-foreground focus:outline-2 focus:outline-primary focus:outline-offset-2");return t.jsx("div",{className:m,onClick:l?r:void 0,children:t.jsxs("div",{ref:c,className:u,onClick:b=>b.stopPropagation(),tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":s?"modal-title":void 0,children:[(s||n)&&t.jsxs("div",{className:d,children:[s&&t.jsx(E,{variant:"h3",className:"text-foreground",children:s}),n&&t.jsx("button",{onClick:r,"aria-label":"Close modal",className:N,children:"×"})]}),t.jsx("div",{className:x,children:o})]})})},xt=({children:e,actions:r,...s})=>t.jsxs(pt,{...s,children:[t.jsx("div",{className:"p-6 overflow-y-auto flex-1",children:e}),r&&t.jsx("div",{className:"p-6 border-t border-border flex justify-end gap-3",children:r})]}),ts=({isOpen:e,onClose:r,onConfirm:s,title:o,message:a,confirmText:n="Confirm",cancelText:l="Cancel"})=>t.jsx(xt,{isOpen:e,onClose:r,title:o,actions:t.jsxs(t.Fragment,{children:[t.jsx(q,{variant:"secondary",onClick:r,children:l}),t.jsx(q,{variant:"default",onClick:s,children:n})]}),children:t.jsx(E,{children:a})}),rs=J(["flex w-full rounded-md border bg-background px-3 py-2","text-base transition-colors","appearance-none cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:["border-input","focus-visible:ring-primary"],error:["border-destructive","focus-visible:ring-destructive"],success:["border-success","focus-visible:ring-success"]},selectSize:{sm:"h-8 text-sm",default:"h-10",lg:"h-12 text-lg"}},defaultVariants:{variant:"default",selectSize:"default"}}),ss=J(["block text-sm font-medium mb-1.5","transition-colors"],{variants:{variant:{default:"text-foreground",error:"text-destructive",success:"text-success"},required:{true:"after:content-['*'] after:ml-0.5 after:text-destructive",false:""}},defaultVariants:{variant:"default",required:!1}}),os=J("mt-1.5 text-sm",{variants:{variant:{default:"text-muted-foreground",error:"text-destructive",success:"text-success"}},defaultVariants:{variant:"default"}});/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),I=require("react"),ye=require("effector"),Ht=require("effector-react");function Gt(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return r.default=e,Object.freeze(r)}const y=Gt(I);function Ke(e,r){return!r||r==="all"?e:e.filter(s=>s.categoryId===r)}function Je(e,r){const s=[...e];return s.sort((o,a)=>{let n="",l="";return r.column==="title"?(n=o.title.toLowerCase(),l=a.title.toLowerCase()):r.column==="metric"&&(n=Ve(o.metricValue),l=Ve(a.metricValue)),n<l?r.direction==="asc"?-1:1:n>l?r.direction==="asc"?1:-1:0}),s}function Ve(e){if(!e)return 0;const r=e.match(/[\d.]+/);return r?parseFloat(r[0]):0}function Qe(e,r){return r==="all"?e.length:e.filter(s=>s.categoryId===r).length}function Ye(e){const{propertyPrice:r,downPayment:s,loanTerm:o,interestRate:a,propertyTax:n=0,hoaFees:l=0}=e,i=r-s,c=a/100/12,m=o*12;let u;if(c===0)u=i/m;else{const b=Math.pow(1+c,m);u=i*(c*b)/(b-1)}const d=u*m,x=d-i,C=u+n+l;return{monthlyPayment:Math.round(u*100)/100,totalMonthlyPayment:Math.round(C*100)/100,totalAmount:Math.round(d*100)/100,totalInterest:Math.round(x*100)/100,loanPrincipal:Math.round(i*100)/100,breakdown:{principalAndInterest:Math.round(u*100)/100,propertyTax:Math.round(n*100)/100,hoaFees:Math.round(l*100)/100}}}function ae(e,r="MXN"){return new Intl.NumberFormat("es-MX",{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function Wt(e,r=3){return`${e.toFixed(r)} %`}function Ut(e){const r={};return(!e.propertyPrice||e.propertyPrice<=0)&&(r.propertyPrice="El precio de la propiedad debe ser mayor a 0"),(!e.downPayment||e.downPayment<0)&&(r.downPayment="El enganche debe ser mayor o igual a 0"),e.propertyPrice&&e.downPayment&&e.downPayment>=e.propertyPrice&&(r.downPayment="El enganche debe ser menor al precio de la propiedad"),(!e.loanTerm||e.loanTerm<=0)&&(r.loanTerm="El plazo del préstamo debe ser mayor a 0"),(e.interestRate===void 0||e.interestRate<0)&&(r.interestRate="La tasa de interés debe ser mayor o igual a 0"),{isValid:Object.keys(r).length===0,errors:r}}function et(e){var r,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(s=et(e[r]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function tt(){for(var e,r,s=0,o="",a=arguments.length;s<a;s++)(e=arguments[s])&&(r=et(e))&&(o&&(o+=" "),o+=r);return o}const _e=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,De=tt,J=(e,r)=>s=>{var o;if(r?.variants==null)return De(e,s?.class,s?.className);const{variants:a,defaultVariants:n}=r,l=Object.keys(a).map(m=>{const u=s?.[m],d=n?.[m];if(u===null)return null;const x=_e(u)||_e(d);return a[m][x]}),i=s&&Object.entries(s).reduce((m,u)=>{let[d,x]=u;return x===void 0||(m[d]=x),m},{}),c=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((m,u)=>{let{class:d,className:x,...C}=u;return Object.entries(C).every(b=>{let[j,f]=b;return Array.isArray(f)?f.includes({...n,...i}[j]):{...n,...i}[j]===f})?[...m,d,x]:m},[]);return De(e,l,c,s?.class,s?.className)},qt=J("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});function Be(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function Xt(...e){return r=>{let s=!1;const o=e.map(a=>{const n=Be(a,r);return!s&&typeof n=="function"&&(s=!0),n});if(s)return()=>{for(let a=0;a<o.length;a++){const n=o[a];typeof n=="function"?n():Be(e[a],null)}}}}function Zt(e){const r=Jt(e),s=y.forwardRef((o,a)=>{const{children:n,...l}=o,i=y.Children.toArray(n),c=i.find(Yt);if(c){const m=c.props.children,u=i.map(d=>d===c?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:d);return t.jsx(r,{...l,ref:a,children:y.isValidElement(m)?y.cloneElement(m,void 0,u):null})}return t.jsx(r,{...l,ref:a,children:n})});return s.displayName=`${e}.Slot`,s}var Kt=Zt("Slot");function Jt(e){const r=y.forwardRef((s,o)=>{const{children:a,...n}=s;if(y.isValidElement(a)){const l=tr(a),i=er(n,a.props);return a.type!==y.Fragment&&(i.ref=o?Xt(o,l):l),y.cloneElement(a,i)}return y.Children.count(a)>1?y.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Qt=Symbol("radix.slottable");function Yt(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qt}function er(e,r){const s={...r};for(const o in r){const a=e[o],n=r[o];/^on[A-Z]/.test(o)?a&&n?s[o]=(...i)=>{const c=n(...i);return a(...i),c}:a&&(s[o]=a):o==="style"?s[o]={...a,...n}:o==="className"&&(s[o]=[a,n].filter(Boolean).join(" "))}return{...e,...s}}function tr(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}const Ie="-",rr=e=>{const r=or(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{const i=l.split(Ie);return i[0]===""&&i.length!==1&&i.shift(),rt(i,r)||sr(l)},getConflictingClassGroupIds:(l,i)=>{const c=s[l]||[];return i&&o[l]?[...c,...o[l]]:c}}},rt=(e,r)=>{if(e.length===0)return r.classGroupId;const s=e[0],o=r.nextPart.get(s),a=o?rt(e.slice(1),o):void 0;if(a)return a;if(r.validators.length===0)return;const n=e.join(Ie);return r.validators.find(({validator:l})=>l(n))?.classGroupId},He=/^\[(.+)\]$/,sr=e=>{if(He.test(e)){const r=He.exec(e)[1],s=r?.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},or=e=>{const{theme:r,classGroups:s}=e,o={nextPart:new Map,validators:[]};for(const a in s)Te(s[a],o,a,r);return o},Te=(e,r,s,o)=>{e.forEach(a=>{if(typeof a=="string"){const n=a===""?r:Ge(r,a);n.classGroupId=s;return}if(typeof a=="function"){if(ar(a)){Te(a(o),r,s,o);return}r.validators.push({validator:a,classGroupId:s});return}Object.entries(a).forEach(([n,l])=>{Te(l,Ge(r,n),s,o)})})},Ge=(e,r)=>{let s=e;return r.split(Ie).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},ar=e=>e.isThemeGetter,nr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,o=new Map;const a=(n,l)=>{s.set(n,l),r++,r>e&&(r=0,o=s,s=new Map)};return{get(n){let l=s.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return a(n,l),l},set(n,l){s.has(n)?s.set(n,l):a(n,l)}}},ze="!",Pe=":",ir=Pe.length,lr=e=>{const{prefix:r,experimentalParseClassName:s}=e;let o=a=>{const n=[];let l=0,i=0,c=0,m;for(let b=0;b<a.length;b++){let j=a[b];if(l===0&&i===0){if(j===Pe){n.push(a.slice(c,b)),c=b+ir;continue}if(j==="/"){m=b;continue}}j==="["?l++:j==="]"?l--:j==="("?i++:j===")"&&i--}const u=n.length===0?a:a.substring(c),d=cr(u),x=d!==u,C=m&&m>c?m-c:void 0;return{modifiers:n,hasImportantModifier:x,baseClassName:d,maybePostfixModifierPosition:C}};if(r){const a=r+Pe,n=o;o=l=>l.startsWith(a)?n(l.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(s){const a=o;o=n=>s({className:n,parseClassName:a})}return o},cr=e=>e.endsWith(ze)?e.substring(0,e.length-1):e.startsWith(ze)?e.substring(1):e,dr=e=>{const r=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const a=[];let n=[];return o.forEach(l=>{l[0]==="["||r[l]?(a.push(...n.sort(),l),n=[]):n.push(l)}),a.push(...n.sort()),a}},mr=e=>({cache:nr(e.cacheSize),parseClassName:lr(e),sortModifiers:dr(e),...rr(e)}),ur=/\s+/,pr=(e,r)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:n}=r,l=[],i=e.trim().split(ur);let c="";for(let m=i.length-1;m>=0;m-=1){const u=i[m],{isExternal:d,modifiers:x,hasImportantModifier:C,baseClassName:b,maybePostfixModifierPosition:j}=s(u);if(d){c=u+(c.length>0?" "+c:c);continue}let f=!!j,v=o(f?b.substring(0,j):b);if(!v){if(!f){c=u+(c.length>0?" "+c:c);continue}if(v=o(b),!v){c=u+(c.length>0?" "+c:c);continue}f=!1}const M=n(x).join(":"),P=C?M+ze:M,T=P+v;if(l.includes(T))continue;l.push(T);const N=a(v,f);for(let A=0;A<N.length;++A){const z=N[A];l.push(P+z)}c=u+(c.length>0?" "+c:c)}return c};function xr(){let e=0,r,s,o="";for(;e<arguments.length;)(r=arguments[e++])&&(s=st(r))&&(o&&(o+=" "),o+=s);return o}const st=e=>{if(typeof e=="string")return e;let r,s="";for(let o=0;o<e.length;o++)e[o]&&(r=st(e[o]))&&(s&&(s+=" "),s+=r);return s};function fr(e,...r){let s,o,a,n=l;function l(c){const m=r.reduce((u,d)=>d(u),e());return s=mr(m),o=s.cache.get,a=s.cache.set,n=i,i(c)}function i(c){const m=o(c);if(m)return m;const u=pr(c,s);return a(c,u),u}return function(){return n(xr.apply(null,arguments))}}const L=e=>{const r=s=>s[e]||[];return r.isThemeGetter=!0,r},ot=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,at=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hr=/^\d+\/\d+$/,gr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,br=/\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$/,yr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>hr.test(e),S=e=>!!e&&!Number.isNaN(Number(e)),K=e=>!!e&&Number.isInteger(Number(e)),Ne=e=>e.endsWith("%")&&S(e.slice(0,-1)),U=e=>gr.test(e),jr=()=>!0,kr=e=>br.test(e)&&!yr.test(e),nt=()=>!1,Nr=e=>vr.test(e),Cr=e=>wr.test(e),Mr=e=>!h(e)&&!g(e),Sr=e=>ie(e,ct,nt),h=e=>ot.test(e),ee=e=>ie(e,dt,kr),Ce=e=>ie(e,Ir,S),We=e=>ie(e,it,nt),Tr=e=>ie(e,lt,Cr),he=e=>ie(e,mt,Nr),g=e=>at.test(e),de=e=>le(e,dt),zr=e=>le(e,Rr),Ue=e=>le(e,it),Pr=e=>le(e,ct),Er=e=>le(e,lt),ge=e=>le(e,mt,!0),ie=(e,r,s)=>{const o=ot.exec(e);return o?o[1]?r(o[1]):s(o[2]):!1},le=(e,r,s=!1)=>{const o=at.exec(e);return o?o[1]?r(o[1]):s:!1},it=e=>e==="position"||e==="percentage",lt=e=>e==="image"||e==="url",ct=e=>e==="length"||e==="size"||e==="bg-size",dt=e=>e==="length",Ir=e=>e==="number",Rr=e=>e==="family-name",mt=e=>e==="shadow",Ar=()=>{const e=L("color"),r=L("font"),s=L("text"),o=L("font-weight"),a=L("tracking"),n=L("leading"),l=L("breakpoint"),i=L("container"),c=L("spacing"),m=L("radius"),u=L("shadow"),d=L("inset-shadow"),x=L("text-shadow"),C=L("drop-shadow"),b=L("blur"),j=L("perspective"),f=L("aspect"),v=L("ease"),M=L("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...T(),g,h],A=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],w=()=>[g,h,c],O=()=>[oe,"full","auto",...w()],X=()=>[K,"none","subgrid",g,h],re=()=>["auto",{span:["full",K,g,h]},K,g,h],Z=()=>[K,"auto",g,h],se=()=>["auto","min","max","fr",g,h],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...w()],W=()=>[oe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],k=()=>[e,g,h],me=()=>[...T(),Ue,We,{position:[g,h]}],ce=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",Pr,Sr,{size:[g,h]}],V=()=>[Ne,de,ee],R=()=>["","none","full",m,g,h],H=()=>["",S,de,ee],ue=()=>["solid","dashed","dotted","double"],$e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[S,Ne,Ue,We],Fe=()=>["","none",b,g,h],pe=()=>["none",S,g,h],xe=()=>["none",S,g,h],ke=()=>[S,g,h],fe=()=>[oe,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[U],breakpoint:[U],color:[jr],container:[U],"drop-shadow":[U],ease:["in","out","in-out"],font:[Mr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[U],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[U],shadow:[U],spacing:["px",S],text:[U],"text-shadow":[U],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oe,h,g,f]}],container:["container"],columns:[{columns:[S,h,g,i]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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:N()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[K,"auto",g,h]}],basis:[{basis:[oe,"full","auto",i,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[S,oe,"auto","initial","none",h]}],grow:[{grow:["",S,g,h]}],shrink:[{shrink:["",S,g,h]}],order:[{order:[K,"first","last","none",g,h]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[i,"screen",...W()]}],"min-w":[{"min-w":[i,"screen","none",...W()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",s,de,ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,g,Ce]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ne,h]}],"font-family":[{font:[zr,h,r]}],"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:[a,g,h]}],"line-clamp":[{"line-clamp":[S,"none",g,Ce]}],leading:[{leading:[n,...w()]}],"list-image":[{"list-image":["none",g,h]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",g,h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[S,"from-font","auto",g,ee]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[S,"auto",g,h]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",g,h]}],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",g,h]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:me()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},K,g,h],radial:["",g,h],conic:[K,g,h]},Er,Tr]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[S,g,h]}],"outline-w":[{outline:["",S,de,ee]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,ge,he]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ge,he]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[S,ee]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",x,ge,he]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[S,g,h]}],"mix-blend":[{"mix-blend":[...$e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$e()}],"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":[S]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[g,h]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[S]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:me()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",g,h]}],filter:[{filter:["","none",g,h]}],blur:[{blur:Fe()}],brightness:[{brightness:[S,g,h]}],contrast:[{contrast:[S,g,h]}],"drop-shadow":[{"drop-shadow":["","none",C,ge,he]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",S,g,h]}],"hue-rotate":[{"hue-rotate":[S,g,h]}],invert:[{invert:["",S,g,h]}],saturate:[{saturate:[S,g,h]}],sepia:[{sepia:["",S,g,h]}],"backdrop-filter":[{"backdrop-filter":["","none",g,h]}],"backdrop-blur":[{"backdrop-blur":Fe()}],"backdrop-brightness":[{"backdrop-brightness":[S,g,h]}],"backdrop-contrast":[{"backdrop-contrast":[S,g,h]}],"backdrop-grayscale":[{"backdrop-grayscale":["",S,g,h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[S,g,h]}],"backdrop-invert":[{"backdrop-invert":["",S,g,h]}],"backdrop-opacity":[{"backdrop-opacity":[S,g,h]}],"backdrop-saturate":[{"backdrop-saturate":[S,g,h]}],"backdrop-sepia":[{"backdrop-sepia":["",S,g,h]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",g,h]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[S,"initial",g,h]}],ease:[{ease:["linear","initial",v,g,h]}],delay:[{delay:[S,g,h]}],animate:[{animate:["none",M,g,h]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,g,h]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:ke()}],"skew-x":[{"skew-x":ke()}],"skew-y":[{"skew-y":ke()}],transform:[{transform:[g,h,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"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:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",g,h]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",g,h]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[S,de,ee,Ce]}],stroke:[{stroke:["none",...k()]}],"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"]}},Lr=fr(Ar);function p(...e){return Lr(tt(e))}const q=y.forwardRef(({className:e,variant:r,size:s,asChild:o=!1,disabled:a,...n},l)=>{const i=o?Kt:"button";return t.jsx(i,{className:p(qt({variant:r,size:s,className:e})),ref:l,type:n.type||"button",disabled:a,"aria-disabled":a?"true":void 0,...n})});q.displayName="Button";const Or=e=>{switch(e){case"h1":return"text-4xl font-bold leading-tight tracking-tight";case"h2":return"text-3xl font-bold leading-tight tracking-tight";case"h3":return"text-2xl font-semibold leading-tight tracking-normal";case"h4":return"text-xl font-semibold leading-snug tracking-normal";case"h5":return"text-lg font-medium leading-snug tracking-normal";case"h6":return"text-base font-medium leading-normal tracking-normal";case"body":return"text-base font-normal leading-normal";case"body-sm":return"text-sm font-normal leading-normal";case"body-lg":return"text-lg font-normal leading-relaxed";case"caption":return"text-xs font-normal leading-normal tracking-wide";case"label":return"text-sm font-medium leading-normal tracking-wide";default:return"text-base font-normal leading-normal"}},$r=e=>{switch(e){case"primary":return"text-foreground";case"secondary":return"text-muted-foreground";case"muted":return"text-muted-foreground";case"error":return"text-destructive";case"success":return"text-success";case"warning":return"text-warning";default:return"text-foreground"}},Fr=e=>{switch(e){case"light":return"font-light";case"normal":return"font-normal";case"medium":return"font-medium";case"semibold":return"font-semibold";case"bold":return"font-bold";default:return""}},Vr=e=>{switch(e){case"left":return"text-left";case"center":return"text-center";case"right":return"text-right";case"justify":return"text-justify";default:return"text-left"}},E=({variant:e="body",color:r="primary",weight:s,align:o="left",truncate:a=!1,children:n,className:l,as:i,...c})=>{const m=i||_r(e),u=p("m-0",Or(e),$r(r),Fr(s),Vr(o),a&&"truncate",l);return t.jsx(m,{className:u,...c,children:n})};function _r(e){switch(e){case"h1":return"h1";case"h2":return"h2";case"h3":return"h3";case"h4":return"h4";case"h5":return"h5";case"h6":return"h6";default:return"p"}}const Dr=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},Br=e=>{switch(e){case"sm":return"shadow-sm";case"md":return"shadow-md";case"lg":return"shadow-lg";default:return"shadow-none"}},Hr=e=>{switch(e){case"sm":return"rounded-sm";case"md":return"rounded-md";case"lg":return"rounded-lg";default:return"rounded-none"}},Re=({children:e,title:r,subtitle:s,className:o,padding:a="md",shadow:n="md",borderRadius:l="md",onClick:i})=>{const c=!!i,m=p("bg-card",Dr(a),Br(n),Hr(l),"transition-all duration-200 ease-in-out",c&&"cursor-pointer hover:-translate-y-0.5 hover:shadow-lg active:translate-y-0",o);return t.jsxs("div",{className:m,onClick:i,children:[(r||s)&&t.jsxs("div",{className:"mb-4",children:[r&&t.jsx("div",{className:"mb-2",children:t.jsx(E,{variant:"h3",children:r})}),s&&t.jsx("div",{className:"text-muted-foreground",children:t.jsx(E,{variant:"body-sm",color:"muted",children:s})})]}),t.jsx("div",{className:"flex-1",children:e})]})},Gr=({children:e})=>t.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:e}),Wr=Object.assign(Re,{Footer:Gr});function Ur(e,r,s,o,a,n){const l=(e-90)*Math.PI/180,i=(r-90)*Math.PI/180,c=a+s*Math.cos(l),m=n+s*Math.sin(l),u=a+s*Math.cos(i),d=n+s*Math.sin(i),x=a+o*Math.cos(i),C=n+o*Math.sin(i),b=a+o*Math.cos(l),j=n+o*Math.sin(l),f=r-e>180?1:0;return[`M ${c} ${m}`,`A ${s} ${s} 0 ${f} 1 ${u} ${d}`,`L ${x} ${C}`,`A ${o} ${o} 0 ${f} 0 ${b} ${j}`,"Z"].join(" ")}function qr(e,r,s,o,a){const n=e.reduce((c,m)=>c+m.value,0);if(n===0)return[];let l=0;const i=[];return e.forEach(c=>{const m=c.value/n*360,u=l,d=l+m,x=Ur(u,d,r,s,o,a);i.push({path:x,segment:c}),l=d}),i}const Ae=y.forwardRef(({segments:e,size:r=300,innerRadiusRatio:s=.6,centerContent:o,showLegend:a=!1,legendPosition:n="bottom",className:l,onSegmentClick:i,onSegmentHover:c},m)=>{const[u,d]=y.useState(null),x=r/2,C=r/2,b=2,j=r/2-b,f=j*s,v=qr(e,j,f,x,C),M=T=>{d(T),c?.(T)},P=n==="left"||n==="right";return t.jsxs("div",{ref:m,className:p("flex gap-4",P?"flex-row items-center":"flex-col items-center",n==="right"&&"flex-row-reverse",n==="top"&&"flex-col-reverse",l),children:[t.jsxs("div",{className:"relative inline-block",style:{width:r,height:r},children:[t.jsx("svg",{width:r,height:r,viewBox:`0 0 ${r} ${r}`,children:v.map(({path:T,segment:N},A)=>t.jsx("path",{d:T,fill:N.color,stroke:"white",strokeWidth:b,className:p("transition-opacity duration-200",u&&u!==N&&"opacity-50",i&&"cursor-pointer"),onMouseEnter:()=>M(N),onMouseLeave:()=>M(null),onClick:()=>i?.(N)},`${N.label}-${A}`))}),o&&t.jsx("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center",style:{maxWidth:f*1.8},children:o})]}),a&&t.jsx("div",{className:p("flex gap-2",P?"flex-col":"flex-row flex-wrap justify-center"),children:e.map((T,N)=>t.jsxs("div",{className:p("flex items-center gap-2 text-sm transition-opacity duration-200",u&&u!==T&&"opacity-50",i&&"cursor-pointer"),onMouseEnter:()=>M(T),onMouseLeave:()=>M(null),onClick:()=>i?.(T),children:[t.jsx("div",{className:"h-3 w-3 rounded-sm flex-shrink-0",style:{backgroundColor:T.color}}),t.jsx("span",{className:"text-muted-foreground",children:T.label})]},`${T.label}-${N}`))})]})});Ae.displayName="DonutChart";function Xr(e,r,s={}){const{initialCategory:o=null,initialSort:a=null,enableSearch:n=!1}=s,[l,i]=I.useState(o),[c,m]=I.useState(a),[u,d]=I.useState(""),x=I.useMemo(()=>Ke(e,l),[e,l]),C=I.useMemo(()=>{if(!n||!u.trim())return x;const v=u.toLowerCase();return x.filter(M=>M.title.toLowerCase().includes(v)||M.subtitle?.toLowerCase().includes(v))},[x,u,n]),b=I.useMemo(()=>c?Je(C,c):C,[C,c]),j=I.useCallback(v=>Qe(e,v),[e]),f=I.useCallback(()=>{i(o),m(a),d("")},[o,a]);return{activeCategory:l,setActiveCategory:i,sort:c,setSort:m,searchQuery:u,setSearchQuery:d,filteredEntities:b,getCategoryCount:j,resetFilters:f}}const Zr=J("inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",selected:"bg-primary text-primary-foreground hover:bg-primary/90 ring-2 ring-primary ring-offset-2"},size:{default:"h-8 px-4 py-1.5",sm:"h-7 px-3 py-1 text-xs",lg:"h-9 px-5 py-2"}},defaultVariants:{variant:"default",size:"default"}}),ve=y.forwardRef(({className:e,variant:r,size:s,icon:o,selected:a,dismissible:n,onDismiss:l,children:i,disabled:c,...m},u)=>{const d=a?"selected":r;return t.jsxs("button",{type:"button",className:p(Zr({variant:d,size:s,className:e})),ref:u,disabled:c,"aria-disabled":c?"true":void 0,"aria-pressed":a?"true":"false",...m,children:[o&&t.jsx("span",{className:"mr-1.5 inline-flex items-center","aria-hidden":"true",children:o}),t.jsx("span",{children:i}),n&&l&&t.jsx("button",{type:"button",className:"ml-1.5 inline-flex items-center hover:opacity-70",onClick:x=>{x.stopPropagation(),l()},"aria-label":"Remove",children:"×"})]})});ve.displayName="Chip";const Le=y.forwardRef(({categories:e,activeCategory:r,onCategoryChange:s,showCount:o,getCategoryCount:a,className:n},l)=>t.jsx("div",{ref:l,role:"tablist","aria-label":"Filter by category",className:p("flex flex-wrap gap-2 overflow-x-auto pb-2",n),children:e.map(i=>{const c=r===i.id,m=o&&a?a(i.id):void 0;return t.jsxs(ve,{role:"tab","aria-selected":c,"aria-controls":`entities-panel-${i.id}`,selected:c,variant:c?"selected":"outline",icon:typeof i.icon=="string"?i.icon:i.icon?y.createElement(i.icon):void 0,onClick:()=>s(c?null:i.id),children:[i.label,m!==void 0&&t.jsxs("span",{className:"ml-1.5 opacity-70",children:["(",m,")"]})]},i.id)})}));Le.displayName="CategoryChips";const Kr=J(["flex w-full rounded-md border bg-background px-3 py-2","text-base transition-colors","file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:["border-input","focus-visible:ring-primary"],error:["border-destructive","focus-visible:ring-destructive"],success:["border-success","focus-visible:ring-success"]},inputSize:{sm:"h-8 text-sm",default:"h-10",lg:"h-12 text-lg"}},defaultVariants:{variant:"default",inputSize:"default"}}),Jr=J(["block text-sm font-medium mb-1.5","transition-colors"],{variants:{variant:{default:"text-foreground",error:"text-destructive",success:"text-success"},required:{true:"after:content-['*'] after:ml-0.5 after:text-destructive",false:""}},defaultVariants:{variant:"default",required:!1}}),Qr=J("mt-1.5 text-sm",{variants:{variant:{default:"text-muted-foreground",error:"text-destructive",success:"text-success"}},defaultVariants:{variant:"default"}}),te=y.forwardRef(({className:e,containerClassName:r,labelClassName:s,variant:o,inputSize:a,label:n,helperText:l,error:i,required:c,prefix:m,suffix:u,id:d,...x},C)=>{const b=y.useId(),j=d||b,f=`${j}-helper`,v=`${j}-error`,M=i?"error":o,P=i||l;return t.jsxs("div",{className:p("w-full",r),children:[n&&t.jsx("label",{htmlFor:j,className:p(Jr({variant:M,required:c}),s),children:n}),t.jsxs("div",{className:"relative",children:[m&&t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),t.jsx("input",{id:j,ref:C,className:p(Kr({variant:M,inputSize:a}),m&&"pl-10",u&&"pr-10",e),"aria-invalid":i?"true":"false","aria-describedby":P?i?v:f:void 0,...x}),u&&t.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:u})]}),P&&t.jsx("p",{id:i?v:f,className:Qr({variant:M}),role:i?"alert":void 0,children:P})]})});te.displayName="Input";const Yr=e=>{switch(e){case"sm":return"max-w-md";case"md":return"max-w-2xl";case"lg":return"max-w-4xl";case"xl":return"max-w-6xl";default:return"max-w-2xl"}},ut=({isOpen:e,onClose:r,title:s,children:o,size:a="md",showCloseButton:n=!0,closeOnOverlayClick:l=!0,closeOnEscape:i=!0})=>{const c=I.useRef(null);if(I.useEffect(()=>{if(!e||!i)return;const b=j=>{j.key==="Escape"&&r()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[e,i,r]),I.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[e]),I.useEffect(()=>{e&&c.current&&c.current.focus()},[e]),!e)return null;const m=p("fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4"),u=p("bg-card rounded-lg shadow-xl w-full max-h-[90vh] overflow-hidden flex flex-col",Yr(a)),d=p("p-6 border-b border-border flex items-center justify-between"),x=p("p-6 overflow-y-auto flex-1"),C=p("bg-none border-none text-xl cursor-pointer text-muted-foreground p-1 rounded-sm flex items-center justify-center hover:bg-accent hover:text-accent-foreground focus:outline-2 focus:outline-primary focus:outline-offset-2");return t.jsx("div",{className:m,onClick:l?r:void 0,children:t.jsxs("div",{ref:c,className:u,onClick:b=>b.stopPropagation(),tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":s?"modal-title":void 0,children:[(s||n)&&t.jsxs("div",{className:d,children:[s&&t.jsx(E,{variant:"h3",className:"text-foreground",children:s}),n&&t.jsx("button",{onClick:r,"aria-label":"Close modal",className:C,children:"×"})]}),t.jsx("div",{className:x,children:o})]})})},pt=({children:e,actions:r,...s})=>t.jsxs(ut,{...s,children:[t.jsx("div",{className:"p-6 overflow-y-auto flex-1",children:e}),r&&t.jsx("div",{className:"p-6 border-t border-border flex justify-end gap-3",children:r})]}),es=({isOpen:e,onClose:r,onConfirm:s,title:o,message:a,confirmText:n="Confirm",cancelText:l="Cancel"})=>t.jsx(pt,{isOpen:e,onClose:r,title:o,actions:t.jsxs(t.Fragment,{children:[t.jsx(q,{variant:"secondary",onClick:r,children:l}),t.jsx(q,{variant:"default",onClick:s,children:n})]}),children:t.jsx(E,{children:a})}),ts=J(["flex w-full rounded-md border bg-background px-3 py-2","text-base transition-colors","appearance-none cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{variant:{default:["border-input","focus-visible:ring-primary"],error:["border-destructive","focus-visible:ring-destructive"],success:["border-success","focus-visible:ring-success"]},selectSize:{sm:"h-8 text-sm",default:"h-10",lg:"h-12 text-lg"}},defaultVariants:{variant:"default",selectSize:"default"}}),rs=J(["block text-sm font-medium mb-1.5","transition-colors"],{variants:{variant:{default:"text-foreground",error:"text-destructive",success:"text-success"},required:{true:"after:content-['*'] after:ml-0.5 after:text-destructive",false:""}},defaultVariants:{variant:"default",required:!1}}),ss=J("mt-1.5 text-sm",{variants:{variant:{default:"text-muted-foreground",error:"text-destructive",success:"text-success"}},defaultVariants:{variant:"default"}});/**
|
|
2
2
|
* @license lucide-react v0.547.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const os=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),as=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,o)=>o?o.toUpperCase():s.toLowerCase()),qe=e=>{const r=as(e);return r.charAt(0).toUpperCase()+r.slice(1)},xt=(...e)=>e.filter((r,s,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===s).join(" ").trim(),ns=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
|
|
7
7
|
* @license lucide-react v0.547.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var
|
|
11
|
+
*/var is={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
12
12
|
* @license lucide-react v0.547.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const ls=I.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:n,iconNode:l,...i},c)=>I.createElement("svg",{ref:c,...is,width:r,height:r,stroke:e,strokeWidth:o?Number(s)*24/Number(r):s,className:xt("lucide",a),...!n&&!ns(i)&&{"aria-hidden":"true"},...i},[...l.map(([m,u])=>I.createElement(m,u)),...Array.isArray(n)?n:[n]]));/**
|
|
17
17
|
* @license lucide-react v0.547.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const G=(e,r)=>{const s=I.forwardRef(({className:o,...a},n)=>I.createElement(
|
|
21
|
+
*/const G=(e,r)=>{const s=I.forwardRef(({className:o,...a},n)=>I.createElement(ls,{ref:n,iconNode:r,className:xt(`lucide-${os(qe(e))}`,`lucide-${e}`,o),...a}));return s.displayName=qe(e),s};/**
|
|
22
22
|
* @license lucide-react v0.547.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const
|
|
26
|
+
*/const cs=[["path",{d:"M10 4 8 6",key:"1rru8s"}],["path",{d:"M17 19v2",key:"ts1sot"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M7 19v2",key:"12npes"}],["path",{d:"M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5",key:"14ym8i"}]],ds=G("bath",cs);/**
|
|
27
27
|
* @license lucide-react v0.547.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const ms=[["path",{d:"M2 4v16",key:"vw9hq8"}],["path",{d:"M2 8h18a2 2 0 0 1 2 2v10",key:"1dgv2r"}],["path",{d:"M2 17h20",key:"18nfp3"}],["path",{d:"M6 8v9",key:"1yriud"}]],us=G("bed",ms);/**
|
|
32
32
|
* @license lucide-react v0.547.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const ps=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],xs=G("car",ps);/**
|
|
37
37
|
* @license lucide-react v0.547.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const fs=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hs=G("chevron-down",fs);/**
|
|
42
42
|
* @license lucide-react v0.547.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
46
|
+
*/const gs=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],bs=G("grid-3x3",gs);/**
|
|
47
47
|
* @license lucide-react v0.547.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
51
|
+
*/const ys=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],vs=G("heart",ys);/**
|
|
52
52
|
* @license lucide-react v0.547.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const ws=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],js=G("house",ws);/**
|
|
57
57
|
* @license lucide-react v0.547.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const ks=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Ns=G("map-pin",ks);/**
|
|
62
62
|
* @license lucide-react v0.547.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
66
|
+
*/const Cs=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],Ms=G("maximize",Cs);/**
|
|
67
67
|
* @license lucide-react v0.547.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
71
|
+
*/const Ss=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Ts=G("menu",Ss);/**
|
|
72
72
|
* @license lucide-react v0.547.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const Is=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ze=G("x",Is),we=y.forwardRef(({className:e,containerClassName:r,labelClassName:s,variant:o,selectSize:a,label:n,helperText:l,error:i,required:c,options:m,placeholder:u,id:d,...x},N)=>{const b=y.useId(),j=d||b,f=`${j}-helper`,v=`${j}-error`,M=i?"error":o,P=i||l;return t.jsxs("div",{className:p("w-full",r),children:[n&&t.jsx("label",{htmlFor:j,className:p(ss({variant:M,required:c}),s),children:n}),t.jsxs("div",{className:"relative",children:[t.jsxs("select",{id:j,ref:N,className:p(rs({variant:M,selectSize:a}),"pr-10",e),"aria-invalid":i?"true":"false","aria-describedby":P?i?v:f:void 0,...x,children:[u&&t.jsx("option",{value:"",disabled:!0,children:u}),m.map(C=>t.jsx("option",{value:C.value,disabled:C.disabled,children:C.label},C.value))]}),t.jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:t.jsx(gs,{className:"h-4 w-4"})})]}),P&&t.jsx("p",{id:i?v:f,className:os({variant:M}),role:i?"alert":void 0,children:P})]})});we.displayName="Select";const Rs=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},je=({children:e,header:r,sidebar:s,footer:o,padding:a="md"})=>{const n=p("min-h-screen flex flex-col"),l=p("bg-card border-b border-border z-10"),i=p("flex flex-1"),c=p("w-70 bg-card border-r border-border p-6"),m=p("flex-1 flex flex-col"),u=p("flex-1 mx-auto w-full max-w-7xl",Rs(a));return t.jsxs("div",{className:n,children:[r&&t.jsx("header",{className:l,children:r}),t.jsxs("div",{className:i,children:[s&&t.jsx("aside",{className:c,children:s}),t.jsx("div",{className:m,children:t.jsx("main",{className:u,children:e})})]}),o&&t.jsx("footer",{className:"bg-card border-t border-border mt-auto",children:o})]})},As=({children:e,header:r,sidebar:s})=>t.jsx(je,{header:r,sidebar:s,padding:"lg",children:t.jsx("div",{className:"max-w-screen-2xl",children:e})}),Ls=({children:e,title:r,subtitle:s})=>t.jsx(je,{padding:"lg",children:t.jsxs("div",{className:"max-w-md mx-auto",children:[t.jsxs("div",{className:"text-center mb-8",children:[r&&t.jsx(E,{variant:"h2",className:"mb-2",children:r}),s&&t.jsx(E,{variant:"body",color:"muted",children:s})]}),e]})}),Os=({children:e,header:r,footer:s})=>t.jsx(je,{header:r,footer:s,padding:"none",children:e}),ht=y.forwardRef(({message:e="No entities found",icon:r,action:s,className:o},a)=>t.jsxs("div",{ref:a,role:"status","aria-live":"polite",className:p("flex flex-col items-center justify-center py-12 px-4 text-center",o),children:[r&&t.jsx("div",{className:"mb-4 text-4xl opacity-50","aria-hidden":"true",children:r}),t.jsx(E,{variant:"body-lg",className:"text-muted-foreground mb-4",children:e}),s&&t.jsx(q,{variant:"outline",onClick:s.onClick,children:s.label})]}));ht.displayName="EntityDirectoryEmptyState";const gt=y.forwardRef(({error:e,onRetry:r,className:s},o)=>{const a=typeof e=="string"?e:e.message;return t.jsxs("div",{ref:o,role:"alert","aria-live":"assertive",className:p("flex flex-col items-center justify-center py-12 px-4 text-center",s),children:[t.jsx("div",{className:"mb-4 text-4xl","aria-hidden":"true",children:"⚠️"}),t.jsx(E,{variant:"body-lg",className:"text-destructive mb-2 font-semibold",children:"Error"}),t.jsx(E,{variant:"body",className:"text-muted-foreground mb-4",children:a}),r&&t.jsx(q,{variant:"outline",onClick:r,children:"Try Again"})]})});gt.displayName="EntityDirectoryErrorState";const bt=y.forwardRef(({title:e,description:r,className:s},o)=>t.jsxs("div",{ref:o,className:p("space-y-1.5",s),children:[t.jsx(E,{variant:"h2",className:"font-bold",children:e}),r&&t.jsx(E,{variant:"body",className:"text-muted-foreground",children:r})]}));bt.displayName="EntityDirectoryHeader";const yt=y.forwardRef(({entity:e,categories:r,showIcon:s=!0,showCategoryBadge:o=!0,showMetric:a=!0,compact:n=!1,className:l},i)=>{const c=r?.find(x=>x.id===e.categoryId),m=!!e.onClick,u=()=>{e.onClick&&!e.disabled&&e.onClick()},d=x=>{m&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),u())};return t.jsxs("div",{ref:i,role:m?"button":"listitem",tabIndex:m&&!e.disabled?0:void 0,onClick:u,onKeyDown:d,"aria-disabled":e.disabled,className:p("flex items-center gap-4 border-b border-border transition-colors",n?"p-3":"p-4",m&&!e.disabled&&"cursor-pointer hover:bg-accent/50 focus-visible:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e.disabled&&"opacity-50 cursor-not-allowed",l),children:[s&&t.jsx("div",{className:p("flex-shrink-0 flex items-center justify-center bg-muted rounded-full",n?"w-8 h-8 text-lg":"w-10 h-10 text-xl"),"aria-hidden":"true",children:typeof e.icon=="string"?t.jsx("span",{children:e.icon}):e.icon?y.createElement(e.icon):t.jsx("span",{className:"text-muted-foreground",children:"•"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx(E,{variant:n?"body-sm":"body",className:"font-semibold truncate",children:e.title}),e.subtitle&&t.jsx(E,{variant:n?"caption":"body-sm",className:"text-muted-foreground truncate",children:e.subtitle})]}),o&&c&&t.jsx(ve,{variant:"secondary",size:n?"sm":"default",className:"flex-shrink-0 bg-foreground text-background hover:bg-foreground/90","aria-label":`Category: ${c.label}`,children:c.label}),a&&e.metricValue&&t.jsxs("div",{className:"flex-shrink-0 text-right min-w-[4rem]",children:[t.jsx(E,{variant:n?"body-sm":"body",className:"font-medium",children:e.metricValue}),e.metricLabel&&t.jsx(E,{variant:"caption",className:"text-muted-foreground",children:e.metricLabel})]})]})});yt.displayName="EntityDirectoryListItem";const vt=y.forwardRef(({columns:e,showIcon:r,sort:s,onSortChange:o,compact:a,className:n},l)=>{const i=d=>{if(!o)return;const x=s?.column===d&&s?.direction==="asc"?"desc":"asc";o({column:d,direction:x})},c=d=>{i(d)},m=(d,x)=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(x))},u=d=>d!=="title"&&d!=="metric"?null:!s||s.column!==d?t.jsx("span",{className:"ml-1 text-muted-foreground opacity-50","aria-hidden":"true",children:"⇅"}):t.jsx("span",{className:"ml-1","aria-hidden":"true",children:s.direction==="asc"?"↑":"↓"});return t.jsxs("div",{ref:l,role:"row",className:p("flex items-center gap-4 bg-background border-b border-border font-medium text-sm text-muted-foreground",a?"px-3 py-2":"px-4 py-3",n),children:[r&&t.jsx("div",{className:a?"w-8":"w-10"}),e.map(d=>{const x=d.sortable&&(d.key==="title"||d.key==="metric"),N=s?.column===d.key;return t.jsxs("div",{role:"columnheader","aria-sort":N?s?.direction==="asc"?"ascending":"descending":void 0,className:p(d.key==="title"&&"flex-1",d.key==="category"&&"w-40",d.key==="metric"&&"w-24 text-right",d.align==="center"&&"text-center",d.align==="right"&&"text-right",x&&"cursor-pointer hover:text-foreground transition-colors select-none",N&&"text-foreground"),style:d.width?{width:d.width}:void 0,onClick:x&&(d.key==="title"||d.key==="metric")?()=>c(d.key):void 0,tabIndex:x?0:void 0,onKeyDown:x&&(d.key==="title"||d.key==="metric")?b=>m(b,d.key):void 0,children:[d.label,x&&u(d.key)]},d.key)})]})});vt.displayName="EntityDirectoryTableHeader";const wt=y.forwardRef(({entities:e,categories:r,showIcons:s=!0,showCategoryBadges:o=!0,showMetric:a=!0,metricLabel:n,sortable:l=!1,sort:i,onSortChange:c,compact:m=!1,renderItem:u,className:d},x)=>{const N=[{key:"title",label:n?"Nombre":"Name",sortable:l},...o?[{key:"category",label:"Categoría",sortable:!1}]:[],...a&&n?[{key:"metric",label:n,sortable:l,align:"right"}]:[]];return t.jsxs("div",{ref:x,role:"table","aria-label":"Entity directory",className:p("border border-border rounded-lg overflow-hidden",d),children:[t.jsx(vt,{columns:N,showIcon:s,sort:i,onSortChange:c,compact:m}),t.jsx("div",{role:"rowgroup",children:e.map(b=>u?t.jsx(y.Fragment,{children:u(b)},b.id):t.jsx(yt,{entity:b,categories:r,showIcon:s,showCategoryBadge:o,showMetric:a,compact:m},b.id))})]})});wt.displayName="EntityDirectoryList";const jt=y.forwardRef(({rows:e=5,className:r},s)=>t.jsxs("div",{ref:s,role:"status","aria-live":"polite","aria-label":"Loading entities",className:p("space-y-3",r),children:[Array.from({length:e}).map((o,a)=>t.jsxs("div",{className:"flex items-center gap-4 p-4 border border-border rounded-lg animate-pulse",children:[t.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex-shrink-0"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-4 bg-muted rounded w-1/3"}),t.jsx("div",{className:"h-3 bg-muted rounded w-1/2"})]}),t.jsx("div",{className:"h-6 bg-muted rounded-full w-24 flex-shrink-0"}),t.jsx("div",{className:"h-4 bg-muted rounded w-16 flex-shrink-0"})]},a)),t.jsx("span",{className:"sr-only",children:"Loading..."})]}));jt.displayName="EntityDirectoryLoadingState";const kt=y.forwardRef(({value:e,onChange:r,placeholder:s="Search entities...",className:o},a)=>t.jsxs("div",{className:p("relative",o),children:[t.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none",children:t.jsx("svg",{className:"w-4 h-4 text-muted-foreground","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",children:t.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})})}),t.jsx("input",{ref:a,type:"search",value:e,onChange:n=>r(n.target.value),placeholder:s,className:p("block w-full pl-10 pr-3 py-2 border border-input rounded-md","bg-background text-foreground placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent","transition-colors"),"aria-label":"Search entities"}),e&&t.jsx("button",{type:"button",onClick:()=>r(""),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}));kt.displayName="EntityDirectorySearchFilter";const Nt=y.forwardRef(({entities:e,categories:r,title:s,description:o,activeCategory:a,onCategoryChange:n,showCategoryCount:l,getCategoryCount:i,enableSearch:c=!1,searchQuery:m="",onSearchChange:u,searchPlaceholder:d,sortable:x=!1,sort:N,onSortChange:b,showIcons:j=!0,showCategoryBadges:f=!0,showMetric:v=!0,metricLabel:M,compact:P=!1,loading:C=!1,error:S,emptyMessage:F,onRetry:z,emptyState:w,errorState:L,loadingState:X,renderItem:re,className:Z,style:se},Y)=>{const B=r&&r.length>0,D=!C&&!S&&e.length===0,W=!C&&!!S;return t.jsxs("div",{ref:Y,className:p("space-y-6",Z),style:se,children:[t.jsx(bt,{title:s,description:o}),B&&n&&t.jsx(Le,{categories:r,activeCategory:a,onCategoryChange:n,showCount:l,getCategoryCount:i}),c&&u&&t.jsx(kt,{value:m,onChange:u,placeholder:d}),C&&(X||t.jsx(jt,{})),W&&(L||t.jsx(gt,{error:S,onRetry:z})),D&&(w||t.jsx(ht,{message:F})),!C&&!W&&!D&&t.jsx(wt,{entities:e,categories:r,showIcons:j,showCategoryBadges:f,showMetric:v,metricLabel:M,sortable:x,sort:N,onSortChange:b,compact:P,renderItem:re})]})});Nt.displayName="EntityDirectory";function $s(e){return{variant:e.variant||"minimal",logo:e.logo,navigationItems:e.navigationItems||[],loginButtonText:e.loginButtonText||"Iniciar Sesión",showMobileMenu:e.showMobileMenu??!0}}const Ct=I.forwardRef(({variant:e,logo:r,navigationItems:s,loginButtonText:o,showMobileMenu:a,className:n,logoClassName:l,navigationClassName:i,navigationItemClassName:c,loginButtonClassName:m,mobileMenuButtonClassName:u,id:d,"aria-label":x},N)=>{const[b,j]=I.useState(!1),f=$s({variant:e,logo:r,navigationItems:s,loginButtonText:o,showMobileMenu:a}),v=f.variant==="modern",M=f.variant==="luxury",P=M&&f.showMobileMenu;return t.jsxs(t.Fragment,{children:[t.jsxs("header",{ref:N,id:d,role:"banner","aria-label":x||"Site header",className:p("flex items-center justify-between relative w-full",M?"px-16 py-2":"px-6 py-1",n),children:[f.logo&&t.jsx("div",{className:"shrink-0",children:typeof f.logo=="string"?t.jsx("p",{className:p("leading-normal",M?"font-heading text-xl font-normal uppercase tracking-[0.04em]":"font-black tracking-wider text-xl",v?"text-zinc-900":"text-white",l),children:f.logo}):f.logo}),f.navigationItems.length>0&&t.jsx("nav",{className:p("hidden md:flex items-center",M?"ml-auto gap-4":v?"gap-4 bg-transparent border-0 shadow-none":"gap-4 px-6 py-2 bg-white border border-gray-200 rounded-full shadow-sm",i),"aria-label":"Main navigation",children:f.navigationItems.map((C,S)=>t.jsxs("div",{className:"flex items-center gap-4",children:[S>0&&t.jsx("div",{className:"flex items-center justify-center h-6 w-0","aria-hidden":"true",children:t.jsx("div",{className:"h-0 w-6 rotate-90",children:t.jsx("div",{className:p("h-px w-full",M?"bg-white":"bg-gray-200")})})}),t.jsx("a",{href:C.href,className:p(M?"font-body text-sm font-normal uppercase tracking-[0.05em] leading-5 text-white hover:text-white/80 transition-colors":"text-gray-900 text-sm font-medium leading-5 hover:text-black transition-colors",c),children:C.label})]},C.id))}),t.jsxs("div",{className:p("flex items-center shrink-0","gap-6 p-4"),children:[t.jsx("button",{type:"button",className:p("hidden md:flex items-center justify-center px-4 py-2 text-sm font-medium leading-5 transition-colors",M?"font-body h-9 bg-white text-zinc-900 border border-zinc-200 rounded-none hover:bg-zinc-100":v?"h-10 bg-zinc-900 text-white border-0 rounded-md hover:bg-zinc-800":"h-9 bg-white border border-gray-200 text-zinc-900 rounded-full hover:bg-zinc-200",m),children:f.loginButtonText}),P&&t.jsx("button",{type:"button","aria-label":"Open navigation panel",className:p("hidden md:flex items-center justify-center border border-zinc-200 bg-white px-3 py-2 text-zinc-900 transition-colors hover:bg-zinc-100",u),children:t.jsx(Xe,{className:"h-[15px] w-[15px]"})}),f.showMobileMenu&&t.jsx("button",{type:"button",onClick:()=>j(!b),"aria-label":b?"Close menu":"Open menu","aria-expanded":b,className:p("flex md:hidden items-center justify-center px-3 py-2 bg-white transition-colors",M?"h-10 w-10 rounded-md border border-zinc-200 hover:bg-zinc-100":v?"rounded-xl border border-zinc-200 hover:bg-gray-50":"rounded-full hover:bg-gray-50",u),children:b?t.jsx(Ze,{className:p("text-gray-900",M?"h-[15px] w-[15px]":"h-4 w-4")}):t.jsx(Xe,{className:p("text-gray-900",M?"h-[15px] w-[15px]":"h-4 w-4")})})]})]}),b&&f.showMobileMenu&&t.jsxs("div",{className:"fixed inset-0 z-40 md:hidden",role:"dialog","aria-modal":"true","aria-label":"Mobile menu",children:[t.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>j(!1),"aria-hidden":"true"}),t.jsx("div",{className:"fixed right-0 top-0 h-full w-full max-w-sm bg-white shadow-xl",children:t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsx("div",{className:"flex items-center justify-end px-6 py-4",children:t.jsx("button",{type:"button",onClick:()=>j(!1),"aria-label":"Close menu",className:"flex h-10 w-10 items-center justify-center rounded-full bg-zinc-100 text-zinc-900 hover:bg-zinc-200",children:t.jsx(Ze,{className:"h-5 w-5"})})}),t.jsx("nav",{className:"flex-1 overflow-y-auto px-6 py-4",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[f.navigationItems.map(C=>t.jsx("a",{href:C.href,className:"block text-base font-medium text-zinc-900 hover:text-zinc-600 transition-colors py-2",onClick:()=>j(!1),children:C.label},C.id)),t.jsx("div",{className:"mt-4 pt-4 border-t border-zinc-200",children:t.jsx("button",{type:"button",className:"w-full h-12 flex items-center justify-center rounded-full bg-zinc-100 text-zinc-900 font-semibold",children:f.loginButtonText})})]})})]})})]})]})});Ct.displayName="Header";const Fs=e=>({content:e.content,theme:e.theme||{},variant:e.variant||"modern",layout:e.layout||"centered"}),Vs={center:"object-center",top:"object-top",bottom:"object-bottom",left:"object-left",right:"object-right","left-top":"object-left-top","left-bottom":"object-left-bottom","right-top":"object-right-top","right-bottom":"object-right-bottom"},Mt=I.forwardRef(({content:e,theme:r,variant:s="modern",layout:o="centered",searchForm:a,logo:n,navigation:l,className:i,id:c,"aria-label":m},u)=>{const d=Fs({content:e,theme:r,variant:s,layout:o}),x=d.variant==="modern",N=d.variant==="modern"||d.variant==="luxury";return t.jsx("section",{ref:u,id:c,"aria-label":m||"Hero banner",className:p("relative",x&&"px-4 lg:px-8",i),children:t.jsxs("div",{className:p("relative flex min-h-[600px] flex-col",x?"lg:min-h-[85vh] rounded-2xl overflow-hidden":"lg:min-h-screen","bg-gradient-to-br from-zinc-900 to-zinc-800","text-white"),children:[d.theme.backgroundImage&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"absolute inset-0 z-0",children:t.jsx("img",{src:d.theme.backgroundImage,alt:"",className:p("h-full w-full object-cover",d.theme.backgroundPosition&&Vs[d.theme.backgroundPosition]||"object-center"),loading:"eager",decoding:"async"})}),t.jsx("div",{className:"absolute inset-0 z-[1] bg-gradient-to-b from-black/40 via-black/40 via-[68.25%] to-transparent"})]}),l&&t.jsx("div",{className:"relative z-10",children:l}),t.jsx("div",{className:"relative z-10 flex flex-col items-center justify-center px-4 py-12 lg:flex-1 lg:py-24",children:t.jsxs("div",{className:"w-full max-w-6xl text-center",children:[d.variant==="minimal"&&n&&t.jsx("div",{className:"mb-8 flex items-center justify-center",children:n}),d.content.title&&t.jsxs("div",{className:"mb-16 space-y-8",children:[t.jsx("h1",{className:"text-4xl font-bold tracking-wide text-white sm:text-5xl lg:text-6xl",children:d.content.title}),d.content.subtitle&&t.jsx("p",{className:"mt-4 text-xl text-white/90 sm:text-2xl",children:d.content.subtitle})]}),d.variant==="minimal"&&d.content.metrics&&d.content.metrics.length>0&&t.jsx("div",{className:"mb-16",children:t.jsx("div",{className:"mx-auto grid max-w-4xl grid-cols-1 gap-8 md:grid-cols-3",children:d.content.metrics.map((b,j)=>t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"mb-2 text-3xl font-bold text-white md:text-4xl",children:b.value}),t.jsx("div",{className:"text-sm text-white/80 md:text-base",children:b.label})]},j))})}),a&&t.jsx("div",{className:"relative z-20 mx-auto w-full max-w-4xl",children:a})]})}),N&&d.content.metrics&&d.content.metrics.length>0&&t.jsx("div",{className:"absolute bottom-0 right-0 z-10 hidden md:block",children:t.jsx("div",{className:"flex h-20 w-full max-w-4xl items-center gap-6 rounded-tl-2xl bg-white px-8 py-4 text-zinc-900 md:h-24 md:gap-12 md:px-12 md:py-6",children:d.content.metrics.map((b,j)=>t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-xl font-semibold leading-tight md:text-2xl",children:b.value}),t.jsx("div",{className:"text-xs leading-tight text-zinc-600 md:text-sm",children:b.label})]},j))})}),d.variant==="minimal"&&t.jsx("div",{className:"relative z-10 pb-8",children:t.jsx("div",{className:"flex justify-center",children:t.jsx("div",{className:"h-1 w-8 rounded-full bg-white/30","aria-hidden":"true"})})})]})})});Mt.displayName="HeroBanner";const St=[{value:"15-years",label:"15 años fijos",years:15},{value:"20-years",label:"20 años fijos",years:20},{value:"30-years",label:"30 años fijos",years:30},{value:"40-years",label:"40 años fijos",years:40}],_s=St.map(e=>({value:e.value,label:e.label})),be={propertyPrice:2e7,downPayment:2e5,loanProgram:"30-years",interestRate:6.5},Me={principalAndInterest:"#0a2540",propertyTax:"#4da6c7",hoaFees:"#7fc9e3"},Tt=y.forwardRef(({initialPropertyPrice:e=be.propertyPrice,initialDownPayment:r=be.downPayment,initialLoanProgram:s=be.loanProgram,initialInterestRate:o=be.interestRate,showPropertyTax:a=!1,showHoaFees:n=!1,className:l,onCalculationChange:i},c)=>{const[m,u]=y.useState(e),[d,x]=y.useState(r),[N,b]=y.useState(s),[j,f]=y.useState(o),[v,M]=y.useState(0),[P,C]=y.useState(0),S=y.useMemo(()=>{const w=St.find(X=>X.value===N)?.years||30;return et({propertyPrice:m,downPayment:d,loanTerm:w,interestRate:j,propertyTax:a?v:void 0,hoaFees:n?P:void 0})},[m,d,N,j,v,P,a,n]);y.useEffect(()=>{i?.(S)},[S,i]);const F=y.useMemo(()=>{const z=[{label:"Principal e Intereses",value:S.breakdown.principalAndInterest,color:Me.principalAndInterest}];return a&&S.breakdown.propertyTax>0&&z.push({label:"Impuesto Predial",value:S.breakdown.propertyTax,color:Me.propertyTax}),n&&S.breakdown.hoaFees>0&&z.push({label:"Cuota HOA",value:S.breakdown.hoaFees,color:Me.hoaFees}),z},[S,a,n]);return t.jsx("div",{ref:c,className:p("w-full",l),children:t.jsx(Re,{padding:"lg",className:"w-full",children:t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{children:[t.jsx(E,{variant:"h2",className:"mb-2",children:"Calculadora de Hipotecas"}),t.jsx(E,{variant:"body",color:"secondary",className:"max-w-2xl",children:"Calcule el pago mensual de su hipoteca, incluyendo capital e intereses, impuestos prediales y cuota de la asociación de propietarios. Ajuste los valores para obtener una tasa más precisa."})]}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[t.jsxs("div",{className:"space-y-4",children:[t.jsx(te,{label:"Precio de la propiedad",type:"number",value:m,onChange:z=>u(Number(z.target.value)),suffix:"MXN",min:0,step:1e4}),t.jsx(te,{label:"Enganche",type:"number",value:d,onChange:z=>x(Number(z.target.value)),suffix:"MXN",min:0,step:1e4}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(we,{label:"Programa de préstamos",value:N,onChange:z=>b(z.target.value),options:_s}),t.jsx(te,{label:"Tasa de interés",type:"number",value:j,onChange:z=>f(Number(z.target.value)),suffix:"%",min:0,max:100,step:.1})]}),a&&t.jsx(te,{label:"Impuesto predial mensual",type:"number",value:v,onChange:z=>M(Number(z.target.value)),suffix:"MXN",min:0,step:100}),n&&t.jsx(te,{label:"Cuota HOA mensual",type:"number",value:P,onChange:z=>C(Number(z.target.value)),suffix:"MXN",min:0,step:100})]}),t.jsxs("div",{className:"flex flex-col items-center justify-center",children:[t.jsx(Ae,{segments:F,size:320,innerRadiusRatio:.65,centerContent:t.jsxs("div",{className:"text-center",children:[t.jsx(E,{variant:"h1",className:"font-bold mb-1",children:ae(S.totalMonthlyPayment)}),t.jsx(E,{variant:"body-sm",color:"secondary",children:"Tu Pago"})]}),showLegend:!0,legendPosition:"bottom"}),t.jsxs("div",{className:"mt-6 text-center space-y-1",children:[t.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-success",children:[t.jsx(Es,{className:"h-4 w-4"}),t.jsx("span",{className:"font-medium",children:"Trending up by 5.2% this month"})]}),t.jsx(E,{variant:"caption",color:"secondary",children:"Showing total visitors for the last 6 months"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 pt-4 border-t",children:[t.jsxs("div",{children:[t.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Monto del préstamo"}),t.jsx(E,{variant:"body",weight:"semibold",children:ae(S.loanPrincipal)})]}),t.jsxs("div",{children:[t.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Pago mensual"}),t.jsx(E,{variant:"body",weight:"semibold",children:ae(S.monthlyPayment)})]}),t.jsxs("div",{children:[t.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Interés total"}),t.jsx(E,{variant:"body",weight:"semibold",children:ae(S.totalInterest)})]}),t.jsxs("div",{children:[t.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Total a pagar"}),t.jsx(E,{variant:"body",weight:"semibold",children:ae(S.totalAmount)})]})]})]})})})});Tt.displayName="MortgageCalculator";const Ds=(e,r,s)=>{if(r)return"text-white";if(s)switch(e.type){case"Venta":return"bg-stone-950 text-white";case"Desarrollo":return"bg-cyan-600 text-white";case"Renta":return"bg-cyan-950 text-white";case"Remate":return"bg-orange-700 text-white";default:return"bg-stone-950 text-white"}switch(e.variant||Bs(e.type)){case"primary":return"bg-primary text-primary-foreground";case"secondary":return"bg-secondary text-secondary-foreground";case"success":return"bg-success text-success-foreground";case"warning":return"bg-warning text-warning-foreground";case"error":return"bg-error text-error-foreground";case"info":return"bg-info text-info-foreground";default:return"bg-secondary text-secondary-foreground"}},Bs=e=>{switch(e){case"Venta":return"primary";case"Desarrollo":return"success";case"Renta":return"info";case"Remate":return"warning";default:return"secondary"}},Hs=({property:e,className:r,onLike:s,onImageClick:o,showLikeButton:a=!0,variant:n="default",badgeColors:l})=>{const[i,c]=I.useState(0),[m,u]=I.useState(!1),[d,x]=I.useState(!1),N=_=>{_.preventDefault(),_.stopPropagation();const V=!m;u(V),s?.(e.id,V)},b=_=>{_.preventDefault(),_.stopPropagation(),o?.(i,e.id)},j=(_,V)=>!_||!V?"Price not available":`$${_.toLocaleString()} ${V}`,f=n==="compact",v=n==="minimal",M=p("relative overflow-hidden bg-card transition-all duration-300 ease-out cursor-pointer",f?"rounded-xl hover:shadow-lg border px-4 shadow-md":v?"rounded-2xl w-[454px] flex flex-col gap-4":"rounded-2xl hover:-translate-y-1 hover:shadow-xl shadow-md",r),P=p("relative overflow-hidden",f?"rounded-xl px-4 shadow-md":v?"rounded-2xl":""),C=p("w-full h-full object-cover",f?"":v?"rounded-2xl":"transition-transform duration-300 hover:scale-105"),S=p("absolute z-10 flex flex-wrap gap-2",f?"top-3 left-3":"top-4 left-4"),F=p("font-semibold",f?"rounded-full px-3 py-1 text-xs":v?"rounded-full px-3 h-7 flex items-center justify-center text-base":"px-2 py-1 rounded-lg font-medium uppercase tracking-wide text-xs"),z=p("absolute z-10 cursor-pointer transition-all duration-200",f?"top-3 right-3 p-1 shadow-md rounded-full":v?"top-4 right-4 w-7 h-7 flex items-center justify-center hover:scale-105":"top-4 right-4 bg-background/90 backdrop-blur-sm border border-border/20 text-foreground w-10 h-10 flex items-center justify-center rounded-full hover:bg-background hover:scale-105"),w=p("absolute left-1/2 -translate-x-1/2 flex z-10",v?"bottom-4 gap-2 p-4":"bottom-4 gap-1"),L=p("w-2 h-2 rounded-full border-none cursor-pointer transition-all duration-200 hover:scale-120"),X=p(f?"p-2":v?"flex flex-col gap-2":"p-6"),re=p("font-semibold text-foreground line-clamp-2 leading-tight",f?"text-base mb-2":v?"text-base":"text-lg font-bold mb-2"),Z=p("font-bold",f?"text-lg text-primary mb-2":v?"text-lg text-foreground":"text-xl text-primary mb-2"),se=p("text-muted-foreground",f?"text-sm flex items-center gap-1 mb-4":v?"text-base":"text-base mb-4"),Y=p("flex items-center",f?"justify-between mt-3 mb-4":v?"gap-3":"gap-4 mb-4"),B=p("flex items-center gap-1 text-muted-foreground","text-sm"),D=p("text-sm text-muted-foreground line-clamp-2",f?"mt-2":""),k=!(e.images&&e.images.length>0)||d,me=()=>t.jsxs("div",{className:"w-full h-full bg-gradient-to-br from-primary/10 via-primary/5 to-secondary/10 flex flex-col items-center justify-center gap-3",children:[t.jsx("div",{className:"rounded-full bg-primary/10 p-6",children:t.jsx(ks,{size:f?32:48,className:"text-primary/40"})}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No image available"})]}),ce=t.jsxs("div",{className:M,children:[t.jsxs("div",{className:p(P,f?"h-52":v?"h-[481px]":"aspect-[4/3]"),children:[k?t.jsx(me,{}):t.jsxs("div",{className:"relative w-full h-full","aria-hidden":"true",children:[t.jsx("img",{src:e.images[i],alt:e.title,className:C,onClick:o?b:void 0,onError:()=>x(!0)}),t.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent to-black/40 pointer-events-none rounded-2xl"})]}),t.jsx("div",{className:S,children:e.transactionTypes.map((_,V)=>{const R=l?.[_.type];return t.jsx("span",{className:p(F,Ds(_,R,v)),style:R?{backgroundColor:R}:void 0,children:_.type},V)})}),a&&t.jsx("button",{onClick:N,className:z,"aria-label":m?"Unlike property":"Like property",children:f?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:m?"red":"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:m?"red":"currentColor",className:"h-5 w-5",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733C11.285 4.876 9.623 3.75 7.688 3.75 5.099 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"})}):t.jsx(ws,{size:20,fill:m?"currentColor":"none",className:v?"text-white":m?"text-destructive":"",strokeWidth:v?1.5:2})}),!f&&!k&&e.images.length>1&&t.jsx("div",{className:w,children:e.images.map((_,V)=>t.jsx("button",{className:p(L,V===i?"bg-white":"bg-white/50"),onClick:R=>{R.preventDefault(),R.stopPropagation(),c(V)},"aria-label":`Go to image ${V+1}`,"aria-current":V===i},V))})]}),t.jsxs("div",{className:X,children:[t.jsx("h3",{className:re,children:e.title}),t.jsx("p",{className:Z,children:j(e.price?.amount,e.price?.currency)}),t.jsxs("p",{className:se,children:[f&&t.jsx(Cs,{size:14}),e.location.city,", ",e.location.state]}),t.jsxs("div",{className:Y,children:[t.jsxs("div",{className:B,children:[t.jsx(ps,{size:v?20:16}),t.jsx("span",{children:e.features.bedrooms})]}),t.jsxs("div",{className:B,children:[t.jsx(ms,{size:v?20:16}),t.jsx("span",{children:e.features.bathrooms})]}),t.jsxs("div",{className:B,children:[t.jsx(fs,{size:v?20:16}),t.jsx("span",{children:e.features.parking})]}),t.jsxs("div",{className:B,children:[t.jsx(Ss,{size:v?20:16}),t.jsxs("span",{children:[e.features.area," m²"]})]})]}),e.amenities.length>0&&t.jsx("p",{className:D,children:e.amenities.join(", ")})]})]});return e.href?t.jsx("a",{href:e.href,className:"no-underline text-inherit",children:ce}):ce},zt=I.forwardRef(({images:e,transactionType:r,totalPhotos:s,onViewAllClick:o,onImageClick:a,className:n},l)=>{const i=e.slice(0,5),c=m=>{a?.(m)};return t.jsxs("div",{ref:l,className:p("w-full h-full grid grid-cols-2 gap-2",n),children:[t.jsx("div",{className:"relative col-span-1 row-span-2 rounded-2xl overflow-hidden group cursor-pointer",children:i[0]?t.jsxs(t.Fragment,{children:[t.jsx("img",{src:i[0],alt:"Property main view",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(0)}),r&&t.jsx("div",{className:"absolute top-4 left-4 bg-white rounded-full px-4 py-2 shadow-md",children:t.jsx("span",{className:"text-sm font-medium text-foreground",children:r})})]}):t.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-muted-foreground",children:"No image"})})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[1]?t.jsx("img",{src:i[1],alt:"Property view 2",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(1)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[2]?t.jsx("img",{src:i[2],alt:"Property view 3",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(2)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[3]?t.jsx("img",{src:i[3],alt:"Property view 4",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(3)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[4]?t.jsxs(t.Fragment,{children:[t.jsx("img",{src:i[4],alt:"Property view 5",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(4)}),s&&s>5&&t.jsx("div",{className:"absolute bottom-4 right-4",children:t.jsxs("button",{onClick:m=>{m.stopPropagation(),o?.()},className:"flex items-center gap-2 bg-white rounded-full px-4 py-2 shadow-md hover:shadow-lg transition-all duration-200 hover:scale-105",children:[t.jsx(ys,{className:"w-4 h-4 text-foreground"}),t.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Ver las ",s," fotos"]})]})})]}):t.jsx("div",{className:"w-full h-full bg-muted"})})]})});zt.displayName="PropertyGallery";function Gs({onSubmit:e,defaultValues:r,propertyTypeOptions:s,transactionTypeOptions:o,locationOptions:a}){const n=y.useMemo(()=>({propertyType:r?.propertyType||s[0]?.value||"",transactionType:r?.transactionType||o[0]?.value||"",location:r?.location||a[0]?.value||""}),[r,s,o,a]),[l,i]=y.useState(n),c=y.useCallback(u=>{i(d=>{const x=typeof u=="function"?u(d):u;return JSON.stringify(d)===JSON.stringify(x)?d:x})},[]),m=y.useCallback(u=>{u.preventDefault(),e?.({propertyType:l.propertyType,transactionType:l.transactionType,location:l.location})},[l,e]);return{formData:l,setFormData:c,handleSubmit:m,propertyTypeOptions:s,transactionTypeOptions:o,locationOptions:a}}const Oe=({variant:e="pill",isSubmitting:r,className:s})=>{const o="relative size-12 rounded-full bg-black text-white transition-all duration-200 hover:bg-black/90 hover:shadow-md flex items-center justify-center",a="w-full";return e==="mobile"?t.jsxs(q,{type:"submit",className:p(a,s),children:[t.jsx(Ee,{className:"h-4 w-4"}),r?"Searching...":"Search"]}):t.jsx(q,{type:"submit",size:"icon",variant:"ghost","aria-label":r?"Searching...":"Search properties",className:p(o,s),disabled:r,children:t.jsx(Ee,{className:"h-6 w-6"})})},$=({label:e,options:r,value:s,onChange:o,className:a,containerClassName:n})=>{const l=y.useMemo(()=>r.map(c=>({value:c.value,label:c.label})),[r]),i=y.useCallback(c=>{o(c.target.value)},[o]);return t.jsx("div",{className:p("flex min-w-0 flex-1 items-center",n),children:t.jsx("div",{className:"flex-1 px-6 py-3.5",children:t.jsx(we,{label:e,options:l,value:s,className:p("w-full border-none bg-transparent focus:outline-none focus:ring-0 text-base text-muted-foreground h-auto p-0",a),labelClassName:"text-sm font-semibold text-foreground mb-1 text-left",onChange:i})})})},Ws=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,error:n,className:l})=>t.jsx("div",{className:p("rounded-xl bg-white shadow-lg p-6",l),children:t.jsxs("form",{className:"space-y-6",onSubmit:a,children:[t.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[t.jsx($,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("propertyType")}),t.jsx($,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("transactionType")}),t.jsx($,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("location")})]}),t.jsxs(q,{type:"submit",className:"w-full",size:"lg",disabled:o,children:[t.jsx(Ee,{className:"h-4 w-4 mr-2"}),o?"Searching...":"Search Properties"]}),n&&t.jsx("div",{className:"bg-destructive/10 text-destructive mt-3 rounded-lg p-3 text-center text-sm",role:"alert",children:n})]})}),Us=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n})=>t.jsx("form",{className:p("w-full max-w-md",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex flex-col gap-3 rounded-2xl bg-white p-4 shadow-lg",children:[t.jsx($,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",onChange:s("propertyType")}),t.jsx($,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",onChange:s("transactionType")}),t.jsx($,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",onChange:s("location")}),t.jsx(Oe,{variant:"mobile",isSubmitting:o})]})}),ne=({className:e})=>t.jsx("div",{className:p("w-px self-stretch bg-gray-300 mx-6",e)}),qs=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n,buttonLabel:l="Conoce Más"})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch bg-white border border-gray-300 shadow-xl relative z-10 px-3",children:[t.jsx($,{label:"Tipo de propiedad",options:r.propertyTypeOptions,value:e.propertyType,onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx($,{label:"Transacción",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx($,{label:"Ciudad",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center py-3",children:t.jsx("button",{type:"submit",disabled:o,className:"h-10 px-4 py-2 bg-zinc-900 text-white text-sm font-medium rounded-md hover:bg-zinc-800 transition-colors disabled:opacity-50 whitespace-nowrap","aria-label":o?"Buscando propiedades...":l,children:o?"Buscando...":l})})]})}),Xs=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch rounded-full bg-white border border-gray-300 shadow-xl relative z-10 p-1.5",children:[t.jsx($,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx($,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx($,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center",children:t.jsx(Oe,{variant:"pill",isSubmitting:o,className:"bg-black"})})]})}),Zs=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a})=>t.jsx("form",{className:"mt-4 block md:hidden",onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"grid grid-cols-1 gap-3 rounded-2xl bg-white p-4 shadow-lg",children:[t.jsx($,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",onChange:s("propertyType")}),t.jsx($,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",onChange:s("transactionType")}),t.jsx($,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",onChange:s("location")}),t.jsx(Oe,{variant:"mobile",isSubmitting:o})]})}),Ks=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n,buttonLabel:l="Conoce Más"})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch rounded-lg bg-white border border-gray-300 shadow-xl relative z-10 px-3",children:[t.jsx($,{label:"Tipo de propiedad",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"rounded-tl-full rounded-bl-full",onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx($,{label:"Transacción",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx($,{label:"Ciudad",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center py-3",children:t.jsx("button",{type:"submit",disabled:o,className:"h-10 px-4 py-2 bg-zinc-900 text-white text-sm font-medium rounded-md hover:bg-zinc-800 transition-colors disabled:opacity-50 whitespace-nowrap","aria-label":o?"Buscando propiedades...":l,children:o?"Buscando...":l})})]})}),Ke={minimal:Xs,modern:Ks,luxury:qs,compact:Us,card:Ws},Pt=({onSubmit:e,defaultValues:r,className:s,variant:o="minimal",propertyTypeOptions:a,transactionTypeOptions:n,locationOptions:l,buttonLabel:i})=>{const[c,m]=y.useState(!1),[u,d]=y.useState(null),x=Gs({onSubmit:e,defaultValues:r,propertyTypeOptions:a,transactionTypeOptions:n,locationOptions:l}),{formData:N,setFormData:b,handleSubmit:j,propertyTypeOptions:f,transactionTypeOptions:v,locationOptions:M}=x,P=y.useCallback(async z=>{z.preventDefault(),d(null),m(!0);try{await j(z)}catch(w){const L=w instanceof Error?w.message:"Search failed. Please try again.";d(L),console.error("Search error:",w)}finally{m(!1)}},[j]),C=y.useCallback(z=>w=>{d(null),b(L=>({...L,[z]:w}))},[b]),S=y.useMemo(()=>({propertyTypeOptions:f,transactionTypeOptions:v,locationOptions:M}),[f,v,M]),F=Ke[o]||Ke.minimal;return t.jsxs(t.Fragment,{children:[t.jsx(F,{formData:N,options:S,isSubmitting:c,error:u,className:s,onFieldChange:C,onSubmit:P,...(o==="modern"||o==="luxury")&&{buttonLabel:i}}),o==="minimal"&&t.jsx(Zs,{formData:N,options:S,isSubmitting:c,onFieldChange:C,onSubmit:P})]})};Pt.displayName="SearchFeature";const Js=({href:e,children:r})=>t.jsx("a",{href:e,className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-50 focus:px-4 focus:py-2 focus:bg-primary focus:text-white focus:rounded",children:r}),Qs={spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem"},radius:{none:"0",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},typography:{fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}]},fontWeight:{thin:"100",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"}},shadows:{none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",DEFAULT:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",md:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",lg:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xl:"0 25px 50px -12px rgb(0 0 0 / 0.25)"},zIndex:{dropdown:1e3,sticky:1020,fixed:1030,modalBackdrop:1040,modal:1050,popover:1060,tooltip:1070,toast:1080},duration:{instant:"0ms",fast:"150ms",normal:"300ms",slow:"500ms"},easing:{linear:"linear",in:"ease-in",out:"ease-out",inOut:"ease-in-out"}},Et={button:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-4 py-2",lg:"h-11 px-8",icon:"h-10 w-10"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"}},input:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-3 py-2",lg:"h-11 px-3 py-2"}},card:{variant:{default:"bg-card text-card-foreground",elevated:"bg-card text-card-foreground shadow-lg",outlined:"bg-card text-card-foreground border-2"}}},It={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},Rt={withOpacity:(e,r)=>r!==void 0?`hsl(var(${e}) / ${r})`:`hsl(var(${e}))`,get:e=>`hsl(var(--${e}))`},At={generateId:(e="ds")=>`${e}-${Math.random().toString(36).substr(2,9)}`,focus:{visible:"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",within:"focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2"},sr:{only:"absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0",not:"not-sr-only"}},Lt={icon:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-8 h-8"},avatar:{xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12",xl:"w-16 h-16"}},Ot={fade:{in:"animate-in fade-in duration-200",out:"animate-out fade-out duration-200"},slide:{inFromLeft:"animate-in slide-in-from-left duration-200",inFromRight:"animate-in slide-in-from-right duration-200",inFromTop:"animate-in slide-in-from-top duration-200",inFromBottom:"animate-in slide-in-from-bottom duration-200"},scale:{in:"animate-in scale-in duration-200",out:"animate-out scale-out duration-200"}},$t={container:{responsive:"container mx-auto px-4 sm:px-6 lg:px-8",fluid:"w-full max-w-none",centered:"container mx-auto px-4 flex items-center justify-center min-h-screen"},grid:{responsive:"grid gap-4 sm:gap-6 lg:gap-8",cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5",6:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6"}},flex:{center:"flex items-center justify-center",between:"flex items-center justify-between",start:"flex items-center justify-start",end:"flex items-center justify-end",col:"flex flex-col",colCenter:"flex flex-col items-center justify-center"}},Ft={isDark:()=>typeof window>"u"?!1:document.documentElement.classList.contains("dark"),toggle:()=>{typeof window>"u"||document.documentElement.classList.toggle("dark")},set:e=>{typeof window>"u"||document.documentElement.classList.toggle("dark",e==="dark")}},Vt={debounce:(e,r)=>{let s;return(...o)=>{clearTimeout(s),s=setTimeout(()=>e(...o),r)}},throttle:(e,r)=>{let s;return(...o)=>{s||(e(...o),s=!0,setTimeout(()=>s=!1,r))}}},_t=I.createContext(null),Ys=()=>{const e=I.useContext(_t);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},eo={name:"light",colors:{primary:"#007bff",secondary:"#6c757d",success:"#28a745",warning:"#ffc107",error:"#dc3545",info:"#17a2b8",background:"#ffffff",surface:"#f8f9fa",text:"#212529",textSecondary:"#6c757d",border:"#dee2e6",borderLight:"#e9ecef"},shapes:{borderRadius:{small:"4px",medium:"8px",large:"12px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)",medium:"0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12)",large:"0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.10)",xl:"0 15px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05)"}},to={name:"dark",colors:{primary:"#0d6efd",secondary:"#6c757d",success:"#198754",warning:"#fd7e14",error:"#dc3545",info:"#0dcaf0",background:"#121212",surface:"#1e1e1e",text:"#ffffff",textSecondary:"#adb5bd",border:"#495057",borderLight:"#343a40"},shapes:{borderRadius:{small:"4px",medium:"8px",large:"12px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.4)",medium:"0 3px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3)",large:"0 10px 20px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3)",xl:"0 15px 25px rgba(0, 0, 0, 0.4), 0 5px 10px rgba(0, 0, 0, 0.3)"}},ro={name:"corporate",colors:{primary:"#1a365d",secondary:"#2d3748",success:"#38a169",warning:"#d69e2e",error:"#e53e3e",info:"#3182ce",background:"#f7fafc",surface:"#ffffff",text:"#1a202c",textSecondary:"#4a5568",border:"#e2e8f0",borderLight:"#edf2f7"},shapes:{borderRadius:{small:"2px",medium:"4px",large:"6px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Georgia, "Times New Roman", serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06)",medium:"0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06)",large:"0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)"}},so={name:"minimal",colors:{primary:"#000000",secondary:"#666666",success:"#00aa00",warning:"#ffaa00",error:"#aa0000",info:"#00aaaa",background:"#ffffff",surface:"#fafafa",text:"#000000",textSecondary:"#666666",border:"#cccccc",borderLight:"#e0e0e0"},shapes:{borderRadius:{small:"0px",medium:"0px",large:"0px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:"Helvetica, Arial, sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"none",medium:"none",large:"none",xl:"none"}},Se={light:eo,dark:to,corporate:ro,minimal:so},Dt=ye.createEvent(),Bt=ye.createEvent(),Ht=ye.createEvent(),Q=ye.createStore(Se.light).on(Dt,(e,r)=>Se[r]||e).on(Bt,(e,r)=>r).on(Ht,()=>Se.light),oo=Q.map(e=>e.name),ao=Q.map(e=>e.colors);Q.map(e=>e.shapes);Q.map(e=>e.typography);Q.map(e=>e.spacing);Q.map(e=>e.shadows);const no=({children:e})=>{const s={theme:Gt.useUnit(Q)};return t.jsx(_t.Provider,{value:s,children:e})};exports.$theme=Q;exports.$themeColors=ao;exports.$themeName=oo;exports.AuthLayout=Ls;exports.Button=q;exports.Card=Re;exports.CategoryChips=Le;exports.Chip=ve;exports.CompoundCard=Ur;exports.ConfirmModal=ts;exports.DashboardLayout=As;exports.DonutChart=Ae;exports.EntityDirectory=Nt;exports.Header=Ct;exports.HeroBanner=Mt;exports.Input=te;exports.MarketingLayout=Os;exports.Modal=pt;exports.ModalWithActions=xt;exports.MortgageCalculator=Tt;exports.PageLayout=je;exports.PropertyCard=Hs;exports.PropertyGallery=zt;exports.SearchFeature=Pt;exports.Select=we;exports.SkipLink=Js;exports.Text=E;exports.ThemeProvider=no;exports.a11y=At;exports.accessibilityUtils=At;exports.animationUtils=Ot;exports.animations=Ot;exports.breakpoints=It;exports.calculateMortgage=et;exports.cn=p;exports.colorUtils=Rt;exports.colors=Rt;exports.componentSizes=Lt;exports.componentVariants=Et;exports.countEntitiesByCategory=Ye;exports.designSystem=Qs;exports.filterEntitiesByCategory=Je;exports.formatCurrency=ae;exports.formatPercentage=Ut;exports.layout=$t;exports.layoutUtils=$t;exports.performance=Vt;exports.performanceUtils=Vt;exports.resetTheme=Ht;exports.responsiveBreakpoints=It;exports.setCustomTheme=Bt;exports.setTheme=Dt;exports.sizes=Lt;exports.sortEntities=Qe;exports.theme=Ft;exports.themeUtils=Ft;exports.useEntityFilter=Zr;exports.useTheme=Ys;exports.validateMortgageInput=qt;exports.variants=Et;
|
|
86
|
+
*/const Is=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xe=G("x",Is),we=y.forwardRef(({className:e,containerClassName:r,labelClassName:s,variant:o,selectSize:a,label:n,helperText:l,error:i,required:c,options:m,placeholder:u,id:d,...x},C)=>{const b=y.useId(),j=d||b,f=`${j}-helper`,v=`${j}-error`,M=i?"error":o,P=i||l;return t.jsxs("div",{className:p("w-full",r),children:[n&&t.jsx("label",{htmlFor:j,className:p(rs({variant:M,required:c}),s),children:n}),t.jsxs("div",{className:"relative",children:[t.jsxs("select",{id:j,ref:C,className:p(ts({variant:M,selectSize:a}),"pr-10",e),"aria-invalid":i?"true":"false","aria-describedby":P?i?v:f:void 0,...x,children:[u&&t.jsx("option",{value:"",disabled:!0,children:u}),m.map(T=>t.jsx("option",{value:T.value,disabled:T.disabled,children:T.label},T.value))]}),t.jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:t.jsx(hs,{className:"h-4 w-4"})})]}),P&&t.jsx("p",{id:i?v:f,className:ss({variant:M}),role:i?"alert":void 0,children:P})]})});we.displayName="Select";const Rs=e=>{switch(e){case"sm":return"p-4";case"md":return"p-6";case"lg":return"p-8";default:return"p-0"}},je=({children:e,header:r,sidebar:s,footer:o,padding:a="md"})=>{const n=p("min-h-screen flex flex-col"),l=p("bg-card border-b border-border z-10"),i=p("flex flex-1"),c=p("w-70 bg-card border-r border-border p-6"),m=p("flex-1 flex flex-col"),u=p("flex-1 mx-auto w-full max-w-7xl",Rs(a));return t.jsxs("div",{className:n,children:[r&&t.jsx("header",{className:l,children:r}),t.jsxs("div",{className:i,children:[s&&t.jsx("aside",{className:c,children:s}),t.jsx("div",{className:m,children:t.jsx("main",{className:u,children:e})})]}),o&&t.jsx("footer",{className:"bg-card border-t border-border mt-auto",children:o})]})},As=({children:e,header:r,sidebar:s})=>t.jsx(je,{header:r,sidebar:s,padding:"lg",children:t.jsx("div",{className:"max-w-screen-2xl",children:e})}),Ls=({children:e,title:r,subtitle:s})=>t.jsx(je,{padding:"lg",children:t.jsxs("div",{className:"max-w-md mx-auto",children:[t.jsxs("div",{className:"text-center mb-8",children:[r&&t.jsx(E,{variant:"h2",className:"mb-2",children:r}),s&&t.jsx(E,{variant:"body",color:"muted",children:s})]}),e]})}),Os=({children:e,header:r,footer:s})=>t.jsx(je,{header:r,footer:s,padding:"none",children:e}),ft=y.forwardRef(({message:e="No entities found",icon:r,action:s,className:o},a)=>t.jsxs("div",{ref:a,role:"status","aria-live":"polite",className:p("flex flex-col items-center justify-center py-12 px-4 text-center",o),children:[r&&t.jsx("div",{className:"mb-4 text-4xl opacity-50","aria-hidden":"true",children:r}),t.jsx(E,{variant:"body-lg",className:"text-muted-foreground mb-4",children:e}),s&&t.jsx(q,{variant:"outline",onClick:s.onClick,children:s.label})]}));ft.displayName="EntityDirectoryEmptyState";const ht=y.forwardRef(({error:e,onRetry:r,className:s},o)=>{const a=typeof e=="string"?e:e.message;return t.jsxs("div",{ref:o,role:"alert","aria-live":"assertive",className:p("flex flex-col items-center justify-center py-12 px-4 text-center",s),children:[t.jsx("div",{className:"mb-4 text-4xl","aria-hidden":"true",children:"⚠️"}),t.jsx(E,{variant:"body-lg",className:"text-destructive mb-2 font-semibold",children:"Error"}),t.jsx(E,{variant:"body",className:"text-muted-foreground mb-4",children:a}),r&&t.jsx(q,{variant:"outline",onClick:r,children:"Try Again"})]})});ht.displayName="EntityDirectoryErrorState";const gt=y.forwardRef(({title:e,description:r,className:s},o)=>t.jsxs("div",{ref:o,className:p("space-y-1.5",s),children:[t.jsx(E,{variant:"h2",className:"font-bold",children:e}),r&&t.jsx(E,{variant:"body",className:"text-muted-foreground",children:r})]}));gt.displayName="EntityDirectoryHeader";const bt=y.forwardRef(({entity:e,categories:r,showIcon:s=!0,showCategoryBadge:o=!0,showMetric:a=!0,compact:n=!1,className:l},i)=>{const c=r?.find(x=>x.id===e.categoryId),m=!!e.onClick,u=()=>{e.onClick&&!e.disabled&&e.onClick()},d=x=>{m&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),u())};return t.jsxs("div",{ref:i,role:m?"button":"listitem",tabIndex:m&&!e.disabled?0:void 0,onClick:u,onKeyDown:d,"aria-disabled":e.disabled,className:p("flex items-center gap-4 border-b border-border transition-colors",n?"p-3":"p-4",m&&!e.disabled&&"cursor-pointer hover:bg-accent/50 focus-visible:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e.disabled&&"opacity-50 cursor-not-allowed",l),children:[s&&t.jsx("div",{className:p("flex-shrink-0 flex items-center justify-center bg-muted rounded-full",n?"w-8 h-8 text-lg":"w-10 h-10 text-xl"),"aria-hidden":"true",children:typeof e.icon=="string"?t.jsx("span",{children:e.icon}):e.icon?y.createElement(e.icon):t.jsx("span",{className:"text-muted-foreground",children:"•"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx(E,{variant:n?"body-sm":"body",className:"font-semibold truncate",children:e.title}),e.subtitle&&t.jsx(E,{variant:n?"caption":"body-sm",className:"text-muted-foreground truncate",children:e.subtitle})]}),o&&c&&t.jsx(ve,{variant:"secondary",size:n?"sm":"default",className:"flex-shrink-0 bg-foreground text-background hover:bg-foreground/90","aria-label":`Category: ${c.label}`,children:c.label}),a&&e.metricValue&&t.jsxs("div",{className:"flex-shrink-0 text-right min-w-[4rem]",children:[t.jsx(E,{variant:n?"body-sm":"body",className:"font-medium",children:e.metricValue}),e.metricLabel&&t.jsx(E,{variant:"caption",className:"text-muted-foreground",children:e.metricLabel})]})]})});bt.displayName="EntityDirectoryListItem";const yt=y.forwardRef(({columns:e,showIcon:r,sort:s,onSortChange:o,compact:a,className:n},l)=>{const i=d=>{if(!o)return;const x=s?.column===d&&s?.direction==="asc"?"desc":"asc";o({column:d,direction:x})},c=d=>{i(d)},m=(d,x)=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(x))},u=d=>d!=="title"&&d!=="metric"?null:!s||s.column!==d?t.jsx("span",{className:"ml-1 text-muted-foreground opacity-50","aria-hidden":"true",children:"⇅"}):t.jsx("span",{className:"ml-1","aria-hidden":"true",children:s.direction==="asc"?"↑":"↓"});return t.jsxs("div",{ref:l,role:"row",className:p("flex items-center gap-4 bg-background border-b border-border font-medium text-sm text-muted-foreground",a?"px-3 py-2":"px-4 py-3",n),children:[r&&t.jsx("div",{className:a?"w-8":"w-10"}),e.map(d=>{const x=d.sortable&&(d.key==="title"||d.key==="metric"),C=s?.column===d.key;return t.jsxs("div",{role:"columnheader","aria-sort":C?s?.direction==="asc"?"ascending":"descending":void 0,className:p(d.key==="title"&&"flex-1",d.key==="category"&&"w-40",d.key==="metric"&&"w-24 text-right",d.align==="center"&&"text-center",d.align==="right"&&"text-right",x&&"cursor-pointer hover:text-foreground transition-colors select-none",C&&"text-foreground"),style:d.width?{width:d.width}:void 0,onClick:x&&(d.key==="title"||d.key==="metric")?()=>c(d.key):void 0,tabIndex:x?0:void 0,onKeyDown:x&&(d.key==="title"||d.key==="metric")?b=>m(b,d.key):void 0,children:[d.label,x&&u(d.key)]},d.key)})]})});yt.displayName="EntityDirectoryTableHeader";const vt=y.forwardRef(({entities:e,categories:r,showIcons:s=!0,showCategoryBadges:o=!0,showMetric:a=!0,metricLabel:n,sortable:l=!1,sort:i,onSortChange:c,compact:m=!1,renderItem:u,className:d},x)=>{const C=[{key:"title",label:n?"Nombre":"Name",sortable:l},...o?[{key:"category",label:"Categoría",sortable:!1}]:[],...a&&n?[{key:"metric",label:n,sortable:l,align:"right"}]:[]];return t.jsxs("div",{ref:x,role:"table","aria-label":"Entity directory",className:p("border border-border rounded-lg overflow-hidden",d),children:[t.jsx(yt,{columns:C,showIcon:s,sort:i,onSortChange:c,compact:m}),t.jsx("div",{role:"rowgroup",children:e.map(b=>u?t.jsx(y.Fragment,{children:u(b)},b.id):t.jsx(bt,{entity:b,categories:r,showIcon:s,showCategoryBadge:o,showMetric:a,compact:m},b.id))})]})});vt.displayName="EntityDirectoryList";const wt=y.forwardRef(({rows:e=5,className:r},s)=>t.jsxs("div",{ref:s,role:"status","aria-live":"polite","aria-label":"Loading entities",className:p("space-y-3",r),children:[Array.from({length:e}).map((o,a)=>t.jsxs("div",{className:"flex items-center gap-4 p-4 border border-border rounded-lg animate-pulse",children:[t.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex-shrink-0"}),t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsx("div",{className:"h-4 bg-muted rounded w-1/3"}),t.jsx("div",{className:"h-3 bg-muted rounded w-1/2"})]}),t.jsx("div",{className:"h-6 bg-muted rounded-full w-24 flex-shrink-0"}),t.jsx("div",{className:"h-4 bg-muted rounded w-16 flex-shrink-0"})]},a)),t.jsx("span",{className:"sr-only",children:"Loading..."})]}));wt.displayName="EntityDirectoryLoadingState";const jt=y.forwardRef(({value:e,onChange:r,placeholder:s="Search entities...",className:o},a)=>t.jsxs("div",{className:p("relative",o),children:[t.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none",children:t.jsx("svg",{className:"w-4 h-4 text-muted-foreground","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",children:t.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})})}),t.jsx("input",{ref:a,type:"search",value:e,onChange:n=>r(n.target.value),placeholder:s,className:p("block w-full pl-10 pr-3 py-2 border border-input rounded-md","bg-background text-foreground placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent","transition-colors"),"aria-label":"Search entities"}),e&&t.jsx("button",{type:"button",onClick:()=>r(""),className:"absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}));jt.displayName="EntityDirectorySearchFilter";const kt=y.forwardRef(({entities:e,categories:r,title:s,description:o,activeCategory:a,onCategoryChange:n,showCategoryCount:l,getCategoryCount:i,enableSearch:c=!1,searchQuery:m="",onSearchChange:u,searchPlaceholder:d,sortable:x=!1,sort:C,onSortChange:b,showIcons:j=!0,showCategoryBadges:f=!0,showMetric:v=!0,metricLabel:M,compact:P=!1,loading:T=!1,error:N,emptyMessage:A,onRetry:z,emptyState:w,errorState:O,loadingState:X,renderItem:re,className:Z,style:se},Y)=>{const B=r&&r.length>0,D=!T&&!N&&e.length===0,W=!T&&!!N;return t.jsxs("div",{ref:Y,className:p("space-y-6",Z),style:se,children:[t.jsx(gt,{title:s,description:o}),B&&n&&t.jsx(Le,{categories:r,activeCategory:a,onCategoryChange:n,showCount:l,getCategoryCount:i}),c&&u&&t.jsx(jt,{value:m,onChange:u,placeholder:d}),T&&(X||t.jsx(wt,{})),W&&(O||t.jsx(ht,{error:N,onRetry:z})),D&&(w||t.jsx(ft,{message:A})),!T&&!W&&!D&&t.jsx(vt,{entities:e,categories:r,showIcons:j,showCategoryBadges:f,showMetric:v,metricLabel:M,sortable:x,sort:C,onSortChange:b,compact:P,renderItem:re})]})});kt.displayName="EntityDirectory";function $s(e){return{variant:e.variant||"minimal",logo:e.logo,navigationItems:e.navigationItems||[],loginButtonText:e.loginButtonText||"Iniciar Sesión",showMobileMenu:e.showMobileMenu??!0}}const Nt=I.forwardRef(({variant:e,logo:r,navigationItems:s,loginButtonText:o,showMobileMenu:a,className:n,logoClassName:l,navigationClassName:i,navigationItemClassName:c,loginButtonClassName:m,mobileMenuButtonClassName:u,id:d,"aria-label":x},C)=>{const[b,j]=I.useState(!1),f=$s({variant:e,logo:r,navigationItems:s,loginButtonText:o,showMobileMenu:a}),v=f.variant==="modern",M=f.variant==="luxury",P=M&&f.showMobileMenu,T=b?P?"Close navigation panel":"Close menu":P?"Open navigation panel":"Open menu";return t.jsxs(t.Fragment,{children:[t.jsxs("header",{ref:C,id:d,role:"banner","aria-label":x||"Site header",className:p("flex items-center justify-between relative w-full space-x-4",M?"px-16 py-2":"px-6 py-1",n),children:[f.logo&&t.jsx("div",{className:"shrink-0 w-2/3 md:w-1/5 text-ellipsis overflow-hidden text-nowrap",children:typeof f.logo=="string"?t.jsx("p",{className:p("leading-normal",M?"font-heading text-xl font-normal uppercase tracking-[0.04em]":"font-black tracking-wider text-xl",v?"text-zinc-900":"text-white",l),children:f.logo}):f.logo}),f.navigationItems.length>0&&t.jsx("nav",{className:p("hidden md:flex items-center max-w-fit",M?"ml-auto gap-4":v?"gap-4 bg-transparent border-0 shadow-none":"gap-4 px-6 py-2 bg-white border border-gray-200 rounded-full shadow-sm",i),"aria-label":"Main navigation",children:f.navigationItems.map((N,A)=>t.jsxs("div",{className:"flex items-center gap-4",children:[A>0&&t.jsx("div",{className:"flex items-center justify-center h-6 w-0","aria-hidden":"true",children:t.jsx("div",{className:"h-0 w-6 rotate-90",children:t.jsx("div",{className:p("h-px w-full",M?"bg-white":"bg-gray-200")})})}),t.jsx("a",{href:N.href,className:p(M?"font-body text-sm font-normal uppercase tracking-[0.05em] leading-5 text-white hover:text-white/80 transition-colors":"text-gray-900 text-sm font-medium leading-5 hover:text-black transition-colors text-ellipsis overflow-hidden text-nowrap",c),children:N.label})]},N.id))}),t.jsxs("div",{className:p("flex items-center shrink-0 w-1/5","gap-6 p-4"),children:[t.jsx("button",{type:"button",className:p("hidden md:flex items-center justify-center px-4 py-2 text-sm font-medium leading-5 transition-colors",M?"font-body h-9 bg-white text-zinc-900 border border-zinc-200 rounded-none hover:bg-zinc-100":v?"h-10 bg-zinc-900 text-white border-0 rounded-md hover:bg-zinc-800":"h-9 bg-white border border-gray-200 text-zinc-900 rounded-full hover:bg-zinc-200",m),children:f.loginButtonText}),f.showMobileMenu&&t.jsx("button",{type:"button",onClick:()=>j(!b),"aria-label":T,"aria-expanded":b,className:p("flex md:hidden items-center justify-center px-3 py-2 bg-white transition-colors",M?"border border-zinc-200 text-zinc-900 hover:bg-zinc-100":v?"rounded-xl border border-zinc-200 hover:bg-gray-50":"rounded-full hover:bg-gray-50",u),children:b?t.jsx(Xe,{className:p("text-gray-900",M?"h-[15px] w-[15px]":"h-4 w-4")}):t.jsx(Ts,{className:p("text-gray-900",M?"h-[15px] w-[15px]":"h-4 w-4")})})]})]}),b&&f.showMobileMenu&&t.jsxs("div",{className:"fixed inset-0 z-40 md:hidden",role:"dialog","aria-modal":"true","aria-label":"Mobile menu",children:[t.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>j(!1),"aria-hidden":"true"}),t.jsx("div",{className:"fixed right-0 top-0 h-full w-full max-w-sm bg-white shadow-xl",children:t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsx("div",{className:"flex items-center justify-end px-6 py-4",children:t.jsx("button",{type:"button",onClick:()=>j(!1),"aria-label":"Close menu",className:"flex h-10 w-10 items-center justify-center rounded-full bg-zinc-100 text-zinc-900 hover:bg-zinc-200",children:t.jsx(Xe,{className:"h-5 w-5"})})}),t.jsx("nav",{className:"flex-1 overflow-y-auto px-6 py-4",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[f.navigationItems.map(N=>t.jsx("a",{href:N.href,className:"block text-base font-medium text-zinc-900 hover:text-zinc-600 transition-colors py-2",onClick:()=>j(!1),children:N.label},N.id)),t.jsx("div",{className:"mt-4 pt-4 border-t border-zinc-200",children:t.jsx("button",{type:"button",className:"w-full h-12 flex items-center justify-center rounded-full bg-zinc-100 text-zinc-900 font-semibold",children:f.loginButtonText})})]})})]})})]})]})});Nt.displayName="Header";const Fs=e=>({content:e.content,theme:e.theme||{},variant:e.variant||"modern",layout:e.layout||"centered"}),Vs={center:"object-center",top:"object-top",bottom:"object-bottom",left:"object-left",right:"object-right","left-top":"object-left-top","left-bottom":"object-left-bottom","right-top":"object-right-top","right-bottom":"object-right-bottom"},Ct=I.forwardRef(({content:e,theme:r,variant:s="modern",layout:o="centered",searchForm:a,logo:n,navigation:l,className:i,id:c,"aria-label":m},u)=>{const d=Fs({content:e,theme:r,variant:s,layout:o}),x=d.variant==="modern",C=d.variant==="modern"||d.variant==="luxury";return t.jsx("section",{ref:u,id:c,"aria-label":m||"Hero banner",className:p("relative",x&&"px-4 lg:px-8",i),children:t.jsxs("div",{className:p("relative flex min-h-[600px] flex-col",x?"lg:min-h-[85vh] rounded-2xl overflow-hidden":"lg:min-h-screen","bg-gradient-to-br from-zinc-900 to-zinc-800","text-white"),children:[d.theme.backgroundImage&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"absolute inset-0 z-0",children:t.jsx("img",{src:d.theme.backgroundImage,alt:"",className:p("h-full w-full object-cover",d.theme.backgroundPosition&&Vs[d.theme.backgroundPosition]||"object-center"),loading:"eager",decoding:"async"})}),t.jsx("div",{className:"absolute inset-0 z-[1] bg-gradient-to-b from-black/40 via-black/40 via-[68.25%] to-transparent"})]}),l&&t.jsx("div",{className:"relative z-10",children:l}),t.jsx("div",{className:"relative z-10 flex flex-col items-center justify-center px-4 py-12 lg:flex-1 lg:py-24",children:t.jsxs("div",{className:"w-full max-w-6xl text-center",children:[d.variant==="minimal"&&n&&t.jsx("div",{className:"mb-8 flex items-center justify-center",children:n}),d.content.title&&t.jsxs("div",{className:"mb-16 space-y-8",children:[t.jsx("h1",{className:"text-4xl font-bold tracking-wide text-white sm:text-5xl lg:text-6xl",children:d.content.title}),d.content.subtitle&&t.jsx("p",{className:"mt-4 text-xl text-white/90 sm:text-2xl",children:d.content.subtitle})]}),d.variant==="minimal"&&d.content.metrics&&d.content.metrics.length>0&&t.jsx("div",{className:"mb-16",children:t.jsx("div",{className:"mx-auto grid max-w-4xl grid-cols-1 gap-8 md:grid-cols-3",children:d.content.metrics.map((b,j)=>t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"mb-2 text-3xl font-bold text-white md:text-4xl",children:b.value}),t.jsx("div",{className:"text-sm text-white/80 md:text-base",children:b.label})]},j))})}),a&&t.jsx("div",{className:"relative z-20 mx-auto w-full max-w-4xl",children:a})]})}),C&&d.content.metrics&&d.content.metrics.length>0&&t.jsx("div",{className:"absolute bottom-0 right-0 z-10 hidden md:block",children:t.jsx("div",{className:"flex h-20 w-full max-w-4xl items-center gap-6 rounded-tl-2xl bg-white px-8 py-4 text-zinc-900 md:h-24 md:gap-12 md:px-12 md:py-6",children:d.content.metrics.map((b,j)=>t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-xl font-semibold leading-tight md:text-2xl",children:b.value}),t.jsx("div",{className:"text-xs leading-tight text-zinc-600 md:text-sm",children:b.label})]},j))})}),d.variant==="minimal"&&t.jsx("div",{className:"relative z-10 pb-8",children:t.jsx("div",{className:"flex justify-center",children:t.jsx("div",{className:"h-1 w-8 rounded-full bg-white/30","aria-hidden":"true"})})})]})})});Ct.displayName="HeroBanner";const Mt=[{value:"15-years",label:"15 años fijos",years:15},{value:"20-years",label:"20 años fijos",years:20},{value:"30-years",label:"30 años fijos",years:30},{value:"40-years",label:"40 años fijos",years:40}],_s=Mt.map(e=>({value:e.value,label:e.label})),be={propertyPrice:2e7,downPayment:2e5,loanProgram:"30-years",interestRate:6.5},Me={principalAndInterest:"#0a2540",propertyTax:"#4da6c7",hoaFees:"#7fc9e3"},St=y.forwardRef(({initialPropertyPrice:e=be.propertyPrice,initialDownPayment:r=be.downPayment,initialLoanProgram:s=be.loanProgram,initialInterestRate:o=be.interestRate,showPropertyTax:a=!1,showHoaFees:n=!1,className:l,onCalculationChange:i},c)=>{const[m,u]=y.useState(e),[d,x]=y.useState(r),[C,b]=y.useState(s),[j,f]=y.useState(o),[v,M]=y.useState(0),[P,T]=y.useState(0),N=y.useMemo(()=>{const w=Mt.find(X=>X.value===C)?.years||30;return Ye({propertyPrice:m,downPayment:d,loanTerm:w,interestRate:j,propertyTax:a?v:void 0,hoaFees:n?P:void 0})},[m,d,C,j,v,P,a,n]);y.useEffect(()=>{i?.(N)},[N,i]);const A=y.useMemo(()=>{const z=[{label:"Principal e Intereses",value:N.breakdown.principalAndInterest,color:Me.principalAndInterest}];return a&&N.breakdown.propertyTax>0&&z.push({label:"Impuesto Predial",value:N.breakdown.propertyTax,color:Me.propertyTax}),n&&N.breakdown.hoaFees>0&&z.push({label:"Cuota HOA",value:N.breakdown.hoaFees,color:Me.hoaFees}),z},[N,a,n]);return t.jsx("div",{ref:c,className:p("w-full",l),children:t.jsx(Re,{padding:"lg",className:"w-full",children:t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{children:[t.jsx(E,{variant:"h2",className:"mb-2",children:"Calculadora de Hipotecas"}),t.jsx(E,{variant:"body",color:"secondary",className:"max-w-2xl",children:"Calcule el pago mensual de su hipoteca, incluyendo capital e intereses, impuestos prediales y cuota de la asociación de propietarios. Ajuste los valores para obtener una tasa más precisa."})]}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[t.jsxs("div",{className:"space-y-4",children:[t.jsx(te,{label:"Precio de la propiedad",type:"number",value:m,onChange:z=>u(Number(z.target.value)),suffix:"MXN",min:0,step:1e4}),t.jsx(te,{label:"Enganche",type:"number",value:d,onChange:z=>x(Number(z.target.value)),suffix:"MXN",min:0,step:1e4}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(we,{label:"Programa de préstamos",value:C,onChange:z=>b(z.target.value),options:_s}),t.jsx(te,{label:"Tasa de interés",type:"number",value:j,onChange:z=>f(Number(z.target.value)),suffix:"%",min:0,max:100,step:.1})]}),a&&t.jsx(te,{label:"Impuesto predial mensual",type:"number",value:v,onChange:z=>M(Number(z.target.value)),suffix:"MXN",min:0,step:100}),n&&t.jsx(te,{label:"Cuota HOA mensual",type:"number",value:P,onChange:z=>T(Number(z.target.value)),suffix:"MXN",min:0,step:100})]}),t.jsxs("div",{className:"flex flex-col items-center justify-center",children:[t.jsx(Ae,{segments:A,size:320,innerRadiusRatio:.65,centerContent:t.jsxs("div",{className:"text-center",children:[t.jsx(E,{variant:"h1",className:"font-bold mb-1",children:ae(N.totalMonthlyPayment)}),t.jsx(E,{variant:"body-sm",color:"secondary",children:"Tu Pago"})]}),showLegend:!0,legendPosition:"bottom"}),t.jsxs("div",{className:"mt-6 text-center space-y-1",children:[t.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-success",children:[t.jsx(Es,{className:"h-4 w-4"}),t.jsx("span",{className:"font-medium",children:"Trending up by 5.2% this month"})]}),t.jsx(E,{variant:"caption",color:"secondary",children:"Showing total visitors for the last 6 months"})]})]})]}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 pt-4 border-t",children:[t.jsxs("div",{children:[t.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Monto del préstamo"}),t.jsx(E,{variant:"body",weight:"semibold",children:ae(N.loanPrincipal)})]}),t.jsxs("div",{children:[t.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Pago mensual"}),t.jsx(E,{variant:"body",weight:"semibold",children:ae(N.monthlyPayment)})]}),t.jsxs("div",{children:[t.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Interés total"}),t.jsx(E,{variant:"body",weight:"semibold",children:ae(N.totalInterest)})]}),t.jsxs("div",{children:[t.jsx(E,{variant:"caption",color:"secondary",className:"mb-1",children:"Total a pagar"}),t.jsx(E,{variant:"body",weight:"semibold",children:ae(N.totalAmount)})]})]})]})})})});St.displayName="MortgageCalculator";const Ds=(e,r,s)=>{if(r)return"text-white";if(s)switch(e.type){case"Venta":return"bg-stone-950 text-white";case"Desarrollo":return"bg-cyan-600 text-white";case"Renta":return"bg-cyan-950 text-white";case"Remate":return"bg-orange-700 text-white";default:return"bg-stone-950 text-white"}switch(e.variant||Bs(e.type)){case"primary":return"bg-primary text-primary-foreground";case"secondary":return"bg-secondary text-secondary-foreground";case"success":return"bg-success text-success-foreground";case"warning":return"bg-warning text-warning-foreground";case"error":return"bg-error text-error-foreground";case"info":return"bg-info text-info-foreground";default:return"bg-secondary text-secondary-foreground"}},Bs=e=>{switch(e){case"Venta":return"primary";case"Desarrollo":return"success";case"Renta":return"info";case"Remate":return"warning";default:return"secondary"}},Hs=({property:e,className:r,onLike:s,onImageClick:o,showLikeButton:a=!0,variant:n="default",badgeColors:l})=>{const[i,c]=I.useState(0),[m,u]=I.useState(!1),[d,x]=I.useState(!1),C=_=>{_.preventDefault(),_.stopPropagation();const V=!m;u(V),s?.(e.id,V)},b=_=>{_.preventDefault(),_.stopPropagation(),o?.(i,e.id)},j=(_,V)=>!_||!V?"Price not available":`$${_.toLocaleString()} ${V}`,f=n==="compact",v=n==="minimal",M=p("relative overflow-hidden bg-card transition-all duration-300 ease-out cursor-pointer",f?"rounded-xl hover:shadow-lg border px-4 shadow-md":v?"rounded-2xl w-[454px] flex flex-col gap-4":"rounded-2xl hover:-translate-y-1 hover:shadow-xl shadow-md",r),P=p("relative overflow-hidden",f?"rounded-xl px-4 shadow-md":v?"rounded-2xl":""),T=p("w-full h-full object-cover",f?"":v?"rounded-2xl":"transition-transform duration-300 hover:scale-105"),N=p("absolute z-10 flex flex-wrap gap-2",f?"top-3 left-3":"top-4 left-4"),A=p("font-semibold",f?"rounded-full px-3 py-1 text-xs":v?"rounded-full px-3 h-7 flex items-center justify-center text-base":"px-2 py-1 rounded-lg font-medium uppercase tracking-wide text-xs"),z=p("absolute z-10 cursor-pointer transition-all duration-200",f?"top-3 right-3 p-1 shadow-md rounded-full":v?"top-4 right-4 w-7 h-7 flex items-center justify-center hover:scale-105":"top-4 right-4 bg-background/90 backdrop-blur-sm border border-border/20 text-foreground w-10 h-10 flex items-center justify-center rounded-full hover:bg-background hover:scale-105"),w=p("absolute left-1/2 -translate-x-1/2 flex z-10",v?"bottom-4 gap-2 p-4":"bottom-4 gap-1"),O=p("w-2 h-2 rounded-full border-none cursor-pointer transition-all duration-200 hover:scale-120"),X=p(f?"p-2":v?"flex flex-col gap-2":"p-6"),re=p("font-semibold text-foreground line-clamp-2 leading-tight",f?"text-base mb-2":v?"text-base":"text-lg font-bold mb-2"),Z=p("font-bold",f?"text-lg text-primary mb-2":v?"text-lg text-foreground":"text-xl text-primary mb-2"),se=p("text-muted-foreground",f?"text-sm flex items-center gap-1 mb-4":v?"text-base":"text-base mb-4"),Y=p("flex items-center",f?"justify-between mt-3 mb-4":v?"gap-3":"gap-4 mb-4"),B=p("flex items-center gap-1 text-muted-foreground","text-sm"),D=p("text-sm text-muted-foreground line-clamp-2",f?"mt-2":""),k=!(e.images&&e.images.length>0)||d,me=()=>t.jsxs("div",{className:"w-full h-full bg-gradient-to-br from-primary/10 via-primary/5 to-secondary/10 flex flex-col items-center justify-center gap-3",children:[t.jsx("div",{className:"rounded-full bg-primary/10 p-6",children:t.jsx(js,{size:f?32:48,className:"text-primary/40"})}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No image available"})]}),ce=t.jsxs("div",{className:M,children:[t.jsxs("div",{className:p(P,f?"h-52":v?"h-[481px]":"aspect-[4/3]"),children:[k?t.jsx(me,{}):t.jsxs("div",{className:"relative w-full h-full","aria-hidden":"true",children:[t.jsx("img",{src:e.images[i],alt:e.title,className:T,onClick:o?b:void 0,onError:()=>x(!0)}),t.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent to-black/40 pointer-events-none rounded-2xl"})]}),t.jsx("div",{className:N,children:e.transactionTypes.map((_,V)=>{const R=l?.[_.type];return t.jsx("span",{className:p(A,Ds(_,R,v)),style:R?{backgroundColor:R}:void 0,children:_.type},V)})}),a&&t.jsx("button",{onClick:C,className:z,"aria-label":m?"Unlike property":"Like property",children:f?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:m?"red":"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:m?"red":"currentColor",className:"h-5 w-5",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733C11.285 4.876 9.623 3.75 7.688 3.75 5.099 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"})}):t.jsx(vs,{size:20,fill:m?"currentColor":"none",className:v?"text-white":m?"text-destructive":"",strokeWidth:v?1.5:2})}),!f&&!k&&e.images.length>1&&t.jsx("div",{className:w,children:e.images.map((_,V)=>t.jsx("button",{className:p(O,V===i?"bg-white":"bg-white/50"),onClick:R=>{R.preventDefault(),R.stopPropagation(),c(V)},"aria-label":`Go to image ${V+1}`,"aria-current":V===i},V))})]}),t.jsxs("div",{className:X,children:[t.jsx("h3",{className:re,children:e.title}),t.jsx("p",{className:Z,children:j(e.price?.amount,e.price?.currency)}),t.jsxs("p",{className:se,children:[f&&t.jsx(Ns,{size:14}),e.location.city,", ",e.location.state]}),t.jsxs("div",{className:Y,children:[t.jsxs("div",{className:B,children:[t.jsx(us,{size:v?20:16}),t.jsx("span",{children:e.features.bedrooms})]}),t.jsxs("div",{className:B,children:[t.jsx(ds,{size:v?20:16}),t.jsx("span",{children:e.features.bathrooms})]}),t.jsxs("div",{className:B,children:[t.jsx(xs,{size:v?20:16}),t.jsx("span",{children:e.features.parking})]}),t.jsxs("div",{className:B,children:[t.jsx(Ms,{size:v?20:16}),t.jsxs("span",{children:[e.features.area," m²"]})]})]}),e.amenities.length>0&&t.jsx("p",{className:D,children:e.amenities.join(", ")})]})]});return e.href?t.jsx("a",{href:e.href,className:"no-underline text-inherit",children:ce}):ce},Tt=I.forwardRef(({images:e,transactionType:r,totalPhotos:s,onViewAllClick:o,onImageClick:a,className:n},l)=>{const i=e.slice(0,5),c=m=>{a?.(m)};return t.jsxs("div",{ref:l,className:p("w-full h-full grid grid-cols-2 gap-2",n),children:[t.jsx("div",{className:"relative col-span-1 row-span-2 rounded-2xl overflow-hidden group cursor-pointer",children:i[0]?t.jsxs(t.Fragment,{children:[t.jsx("img",{src:i[0],alt:"Property main view",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(0)}),r&&t.jsx("div",{className:"absolute top-4 left-4 bg-white rounded-full px-4 py-2 shadow-md",children:t.jsx("span",{className:"text-sm font-medium text-foreground",children:r})})]}):t.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-muted-foreground",children:"No image"})})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[1]?t.jsx("img",{src:i[1],alt:"Property view 2",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(1)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[2]?t.jsx("img",{src:i[2],alt:"Property view 3",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(2)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[3]?t.jsx("img",{src:i[3],alt:"Property view 4",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(3)}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsx("div",{className:"relative col-span-1 row-span-1 rounded-2xl overflow-hidden group cursor-pointer",children:i[4]?t.jsxs(t.Fragment,{children:[t.jsx("img",{src:i[4],alt:"Property view 5",className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",onClick:()=>c(4)}),s&&s>5&&t.jsx("div",{className:"absolute bottom-4 right-4",children:t.jsxs("button",{onClick:m=>{m.stopPropagation(),o?.()},className:"flex items-center gap-2 bg-white rounded-full px-4 py-2 shadow-md hover:shadow-lg transition-all duration-200 hover:scale-105",children:[t.jsx(bs,{className:"w-4 h-4 text-foreground"}),t.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Ver las ",s," fotos"]})]})})]}):t.jsx("div",{className:"w-full h-full bg-muted"})})]})});Tt.displayName="PropertyGallery";function Gs({onSubmit:e,defaultValues:r,propertyTypeOptions:s,transactionTypeOptions:o,locationOptions:a}){const n=y.useMemo(()=>({propertyType:r?.propertyType||s[0]?.value||"",transactionType:r?.transactionType||o[0]?.value||"",location:r?.location||a[0]?.value||""}),[r,s,o,a]),[l,i]=y.useState(n),c=y.useCallback(u=>{i(d=>{const x=typeof u=="function"?u(d):u;return JSON.stringify(d)===JSON.stringify(x)?d:x})},[]),m=y.useCallback(u=>{u.preventDefault(),e?.({propertyType:l.propertyType,transactionType:l.transactionType,location:l.location})},[l,e]);return{formData:l,setFormData:c,handleSubmit:m,propertyTypeOptions:s,transactionTypeOptions:o,locationOptions:a}}const Oe=({variant:e="pill",isSubmitting:r,className:s})=>{const o="relative size-12 rounded-full bg-black text-white transition-all duration-200 hover:bg-black/90 hover:shadow-md flex items-center justify-center",a="w-full";return e==="mobile"?t.jsxs(q,{type:"submit",className:p(a,s),children:[t.jsx(Ee,{className:"h-4 w-4"}),r?"Searching...":"Search"]}):t.jsx(q,{type:"submit",size:"icon",variant:"ghost","aria-label":r?"Searching...":"Search properties",className:p(o,s),disabled:r,children:t.jsx(Ee,{className:"h-6 w-6"})})},F=({label:e,options:r,value:s,onChange:o,className:a,containerClassName:n})=>{const l=y.useMemo(()=>r.map(c=>({value:c.value,label:c.label})),[r]),i=y.useCallback(c=>{o(c.target.value)},[o]);return t.jsx("div",{className:p("flex min-w-0 flex-1 items-center",n),children:t.jsx("div",{className:"flex-1 px-6 py-3.5",children:t.jsx(we,{label:e,options:l,value:s,className:p("w-full border-none bg-transparent focus:outline-none focus:ring-0 text-base text-muted-foreground h-auto p-0",a),labelClassName:"text-sm font-semibold text-foreground mb-1 text-left",onChange:i})})})},Ws=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,error:n,className:l})=>t.jsx("div",{className:p("rounded-xl bg-white shadow-lg p-6",l),children:t.jsxs("form",{className:"space-y-6",onSubmit:a,children:[t.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("propertyType")}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("transactionType")}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",className:"placeholder:text-muted-foreground",onChange:s("location")})]}),t.jsxs(q,{type:"submit",className:"w-full",size:"lg",disabled:o,children:[t.jsx(Ee,{className:"h-4 w-4 mr-2"}),o?"Searching...":"Search Properties"]}),n&&t.jsx("div",{className:"bg-destructive/10 text-destructive mt-3 rounded-lg p-3 text-center text-sm",role:"alert",children:n})]})}),Us=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n})=>t.jsx("form",{className:p("w-full max-w-md",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex flex-col gap-3 rounded-2xl bg-white p-4 shadow-lg",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",onChange:s("propertyType")}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",onChange:s("transactionType")}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",onChange:s("location")}),t.jsx(Oe,{variant:"mobile",isSubmitting:o})]})}),ne=({className:e})=>t.jsx("div",{className:p("w-px self-stretch bg-gray-300 mx-6",e)}),qs=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n,buttonLabel:l="Conoce Más"})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch bg-white border border-gray-300 shadow-xl relative z-10 px-3",children:[t.jsx(F,{label:"Tipo de propiedad",options:r.propertyTypeOptions,value:e.propertyType,onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx(F,{label:"Transacción",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx(F,{label:"Ciudad",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center py-3",children:t.jsx("button",{type:"submit",disabled:o,className:"h-10 px-4 py-2 bg-zinc-900 text-white text-sm font-medium rounded-md hover:bg-zinc-800 transition-colors disabled:opacity-50 whitespace-nowrap","aria-label":o?"Buscando propiedades...":l,children:o?"Buscando...":l})})]})}),Xs=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch rounded-full bg-white border border-gray-300 shadow-xl relative z-10 p-1.5",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center",children:t.jsx(Oe,{variant:"pill",isSubmitting:o,className:"bg-black"})})]})}),Zs=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a})=>t.jsx("form",{className:"mt-4 block md:hidden",onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"grid grid-cols-1 gap-3 rounded-2xl bg-white p-4 shadow-lg",children:[t.jsx(F,{label:"Property Type",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"flex items-center",onChange:s("propertyType")}),t.jsx(F,{label:"Transaction",options:r.transactionTypeOptions,value:e.transactionType,containerClassName:"flex items-center",onChange:s("transactionType")}),t.jsx(F,{label:"Location",options:r.locationOptions,value:e.location,containerClassName:"flex items-center",onChange:s("location")}),t.jsx(Oe,{variant:"mobile",isSubmitting:o})]})}),Ks=({formData:e,options:r,onFieldChange:s,isSubmitting:o,onSubmit:a,className:n,buttonLabel:l="Conoce Más"})=>t.jsx("form",{className:p("relative mx-auto w-full max-w-5xl",n),onSubmit:a,"aria-label":"Property search form",children:t.jsxs("div",{className:"flex items-stretch rounded-lg bg-white border border-gray-300 shadow-xl relative z-10 px-3",children:[t.jsx(F,{label:"Tipo de propiedad",options:r.propertyTypeOptions,value:e.propertyType,containerClassName:"rounded-tl-full rounded-bl-full",onChange:s("propertyType")}),t.jsx(ne,{}),t.jsx(F,{label:"Transacción",options:r.transactionTypeOptions,value:e.transactionType,onChange:s("transactionType")}),t.jsx(ne,{}),t.jsx(F,{label:"Ciudad",options:r.locationOptions,value:e.location,containerClassName:"flex min-w-0 flex-[1.2] items-center",onChange:s("location")}),t.jsx("div",{className:"flex items-center py-3",children:t.jsx("button",{type:"submit",disabled:o,className:"h-10 px-4 py-2 bg-zinc-900 text-white text-sm font-medium rounded-md hover:bg-zinc-800 transition-colors disabled:opacity-50 whitespace-nowrap","aria-label":o?"Buscando propiedades...":l,children:o?"Buscando...":l})})]})}),Ze={minimal:Xs,modern:Ks,luxury:qs,compact:Us,card:Ws},zt=({onSubmit:e,defaultValues:r,className:s,variant:o="minimal",propertyTypeOptions:a,transactionTypeOptions:n,locationOptions:l,buttonLabel:i})=>{const[c,m]=y.useState(!1),[u,d]=y.useState(null),x=Gs({onSubmit:e,defaultValues:r,propertyTypeOptions:a,transactionTypeOptions:n,locationOptions:l}),{formData:C,setFormData:b,handleSubmit:j,propertyTypeOptions:f,transactionTypeOptions:v,locationOptions:M}=x,P=y.useCallback(async z=>{z.preventDefault(),d(null),m(!0);try{await j(z)}catch(w){const O=w instanceof Error?w.message:"Search failed. Please try again.";d(O),console.error("Search error:",w)}finally{m(!1)}},[j]),T=y.useCallback(z=>w=>{d(null),b(O=>({...O,[z]:w}))},[b]),N=y.useMemo(()=>({propertyTypeOptions:f,transactionTypeOptions:v,locationOptions:M}),[f,v,M]),A=Ze[o]||Ze.minimal;return t.jsxs(t.Fragment,{children:[t.jsx(A,{formData:C,options:N,isSubmitting:c,error:u,className:s,onFieldChange:T,onSubmit:P,...(o==="modern"||o==="luxury")&&{buttonLabel:i}}),o==="minimal"&&t.jsx(Zs,{formData:C,options:N,isSubmitting:c,onFieldChange:T,onSubmit:P})]})};zt.displayName="SearchFeature";const Js=({href:e,children:r})=>t.jsx("a",{href:e,className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-50 focus:px-4 focus:py-2 focus:bg-primary focus:text-white focus:rounded",children:r}),Qs={spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem"},radius:{none:"0",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},typography:{fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}]},fontWeight:{thin:"100",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"}},shadows:{none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",DEFAULT:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",md:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",lg:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xl:"0 25px 50px -12px rgb(0 0 0 / 0.25)"},zIndex:{dropdown:1e3,sticky:1020,fixed:1030,modalBackdrop:1040,modal:1050,popover:1060,tooltip:1070,toast:1080},duration:{instant:"0ms",fast:"150ms",normal:"300ms",slow:"500ms"},easing:{linear:"linear",in:"ease-in",out:"ease-out",inOut:"ease-in-out"}},Pt={button:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-4 py-2",lg:"h-11 px-8",icon:"h-10 w-10"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"}},input:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-3 py-2",lg:"h-11 px-3 py-2"}},card:{variant:{default:"bg-card text-card-foreground",elevated:"bg-card text-card-foreground shadow-lg",outlined:"bg-card text-card-foreground border-2"}}},Et={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},It={withOpacity:(e,r)=>r!==void 0?`hsl(var(${e}) / ${r})`:`hsl(var(${e}))`,get:e=>`hsl(var(--${e}))`},Rt={generateId:(e="ds")=>`${e}-${Math.random().toString(36).substr(2,9)}`,focus:{visible:"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",within:"focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2"},sr:{only:"absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0",not:"not-sr-only"}},At={icon:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-8 h-8"},avatar:{xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12",xl:"w-16 h-16"}},Lt={fade:{in:"animate-in fade-in duration-200",out:"animate-out fade-out duration-200"},slide:{inFromLeft:"animate-in slide-in-from-left duration-200",inFromRight:"animate-in slide-in-from-right duration-200",inFromTop:"animate-in slide-in-from-top duration-200",inFromBottom:"animate-in slide-in-from-bottom duration-200"},scale:{in:"animate-in scale-in duration-200",out:"animate-out scale-out duration-200"}},Ot={container:{responsive:"container mx-auto px-4 sm:px-6 lg:px-8",fluid:"w-full max-w-none",centered:"container mx-auto px-4 flex items-center justify-center min-h-screen"},grid:{responsive:"grid gap-4 sm:gap-6 lg:gap-8",cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5",6:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6"}},flex:{center:"flex items-center justify-center",between:"flex items-center justify-between",start:"flex items-center justify-start",end:"flex items-center justify-end",col:"flex flex-col",colCenter:"flex flex-col items-center justify-center"}},$t={isDark:()=>typeof window>"u"?!1:document.documentElement.classList.contains("dark"),toggle:()=>{typeof window>"u"||document.documentElement.classList.toggle("dark")},set:e=>{typeof window>"u"||document.documentElement.classList.toggle("dark",e==="dark")}},Ft={debounce:(e,r)=>{let s;return(...o)=>{clearTimeout(s),s=setTimeout(()=>e(...o),r)}},throttle:(e,r)=>{let s;return(...o)=>{s||(e(...o),s=!0,setTimeout(()=>s=!1,r))}}},Vt=I.createContext(null),Ys=()=>{const e=I.useContext(Vt);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},eo={name:"light",colors:{primary:"#007bff",secondary:"#6c757d",success:"#28a745",warning:"#ffc107",error:"#dc3545",info:"#17a2b8",background:"#ffffff",surface:"#f8f9fa",text:"#212529",textSecondary:"#6c757d",border:"#dee2e6",borderLight:"#e9ecef"},shapes:{borderRadius:{small:"4px",medium:"8px",large:"12px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)",medium:"0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12)",large:"0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.10)",xl:"0 15px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05)"}},to={name:"dark",colors:{primary:"#0d6efd",secondary:"#6c757d",success:"#198754",warning:"#fd7e14",error:"#dc3545",info:"#0dcaf0",background:"#121212",surface:"#1e1e1e",text:"#ffffff",textSecondary:"#adb5bd",border:"#495057",borderLight:"#343a40"},shapes:{borderRadius:{small:"4px",medium:"8px",large:"12px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.4)",medium:"0 3px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3)",large:"0 10px 20px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3)",xl:"0 15px 25px rgba(0, 0, 0, 0.4), 0 5px 10px rgba(0, 0, 0, 0.3)"}},ro={name:"corporate",colors:{primary:"#1a365d",secondary:"#2d3748",success:"#38a169",warning:"#d69e2e",error:"#e53e3e",info:"#3182ce",background:"#f7fafc",surface:"#ffffff",text:"#1a202c",textSecondary:"#4a5568",border:"#e2e8f0",borderLight:"#edf2f7"},shapes:{borderRadius:{small:"2px",medium:"4px",large:"6px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:'Georgia, "Times New Roman", serif',fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06)",medium:"0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06)",large:"0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)"}},so={name:"minimal",colors:{primary:"#000000",secondary:"#666666",success:"#00aa00",warning:"#ffaa00",error:"#aa0000",info:"#00aaaa",background:"#ffffff",surface:"#fafafa",text:"#000000",textSecondary:"#666666",border:"#cccccc",borderLight:"#e0e0e0"},shapes:{borderRadius:{small:"0px",medium:"0px",large:"0px",round:"50%"},borderWidth:{thin:"1px",medium:"2px",thick:"3px"}},typography:{fontFamily:"Helvetica, Arial, sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xxl:"1.5rem"},fontWeight:{light:300,regular:400,medium:500,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},shadows:{none:"none",small:"none",medium:"none",large:"none",xl:"none"}},Se={light:eo,dark:to,corporate:ro,minimal:so},_t=ye.createEvent(),Dt=ye.createEvent(),Bt=ye.createEvent(),Q=ye.createStore(Se.light).on(_t,(e,r)=>Se[r]||e).on(Dt,(e,r)=>r).on(Bt,()=>Se.light),oo=Q.map(e=>e.name),ao=Q.map(e=>e.colors);Q.map(e=>e.shapes);Q.map(e=>e.typography);Q.map(e=>e.spacing);Q.map(e=>e.shadows);const no=({children:e})=>{const s={theme:Ht.useUnit(Q)};return t.jsx(Vt.Provider,{value:s,children:e})};exports.$theme=Q;exports.$themeColors=ao;exports.$themeName=oo;exports.AuthLayout=Ls;exports.Button=q;exports.Card=Re;exports.CategoryChips=Le;exports.Chip=ve;exports.CompoundCard=Wr;exports.ConfirmModal=es;exports.DashboardLayout=As;exports.DonutChart=Ae;exports.EntityDirectory=kt;exports.Header=Nt;exports.HeroBanner=Ct;exports.Input=te;exports.MarketingLayout=Os;exports.Modal=ut;exports.ModalWithActions=pt;exports.MortgageCalculator=St;exports.PageLayout=je;exports.PropertyCard=Hs;exports.PropertyGallery=Tt;exports.SearchFeature=zt;exports.Select=we;exports.SkipLink=Js;exports.Text=E;exports.ThemeProvider=no;exports.a11y=Rt;exports.accessibilityUtils=Rt;exports.animationUtils=Lt;exports.animations=Lt;exports.breakpoints=Et;exports.calculateMortgage=Ye;exports.cn=p;exports.colorUtils=It;exports.colors=It;exports.componentSizes=At;exports.componentVariants=Pt;exports.countEntitiesByCategory=Qe;exports.designSystem=Qs;exports.filterEntitiesByCategory=Ke;exports.formatCurrency=ae;exports.formatPercentage=Wt;exports.layout=Ot;exports.layoutUtils=Ot;exports.performance=Ft;exports.performanceUtils=Ft;exports.resetTheme=Bt;exports.responsiveBreakpoints=Et;exports.setCustomTheme=Dt;exports.setTheme=_t;exports.sizes=At;exports.sortEntities=Je;exports.theme=$t;exports.themeUtils=$t;exports.useEntityFilter=Xr;exports.useTheme=Ys;exports.validateMortgageInput=Ut;exports.variants=Pt;
|
|
87
87
|
//# sourceMappingURL=design-system.cjs.js.map
|