PageSourceSearch

https://shmadrid.com/_next/static/chunks/2343.16accc7469ad9e9c.js

js shmadrid.com collected 2026-10-02 12:45:34 UTC 16,153 bytes, 5 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2343,4724],{2343:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(7876),r=n(6235),a=n(1908),l=n(9241),s=n(4379),i=n(4232);function c(e){let{open:t,setOpen:n,media:c=[],className:u}=e,[d,p]=(0,i.useState)(0),[f,m]=(0,i.useState)(0),g=(0,i.useRef)([]),b=c.length,h=b>1,v=(0,i.useMemo)(()=>c[d],[d,c]),x=(0,i.useCallback)(e=>{h&&p(t=>"next"===e?(t+1)%b:(t-1+b)%b)},[h,b]);return(0,i.useEffect)(()=>{if(!t||!h)return;let e=e=>{"ArrowLeft"===e.key&&(e.preventDefault(),x("prev")),"ArrowRight"===e.key&&(e.preventDefault(),x("next"))};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[x,h,t]),(0,i.useEffect)(()=>{var e;t&&(null==(e=g.current[d])||e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"}))},[d,t]),(0,i.useEffect)(()=>{t&&p(e=>0===b?0:Math.min(e,b-1))},[b,t]),(0,o.jsx)(r.lG,{open:t,onOpenChange:n,children:(0,o.jsxs)(r.Cf,{onOpenAutoFocus:e=>e.preventDefault(),onFocusCapture:e=>{e.target===e.currentTarget&&e.currentTarget.blur()},className:(0,l.A)("w-full max-w-[98vw] sm:max-w-[96vw] lg:max-w-[94vw] xl:max-w-[92vw] flex items-center justify-center border-0 bg-transparent p-0 overflow-visible shadow-none focus:outline-none focus-visible:outline-none text-white [&>button]:hidden",u),children:[(0,o.jsx)(r.L3,{className:"sr-only",children:(null==v?void 0:v.type)==="video"?"Galeria de videos del inmueble. Elemento ".concat(d+1," de ").concat(b):"Galeria de fotos del inmueble. Elemento ".concat(d+1," de ").concat(b)}),(0,o.jsx)(r.rr,{className:"sr-only",children:h?"Usa las flechas del teclado o los controles de navegaci\xf3n para recorrer la galer\xeda.":"Vista ampliada del contenido multimedia del inmueble."}),b>0?(0,o.jsx)("div",{className:"relative w-full",children:(0,o.jsxs)("div",{className:"relative overflow-hidden rounded-[28px] bg-black/90",onTouchStart:e=>{m(e.touches[0].clientX)},onTouchEnd:e=>{let t=e.changedTouches[0].clientX;t-f>50?x("prev"):f-t>50&&x("next")},children:[h?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("button",{type:"button","data-gallery-control":"true",onClick:e=>{e.stopPropagation(),x("prev")},className:"absolute inset-y-0 left-0 z-[15] hidden w-1/2 appearance-none border-0 bg-transparent p-0 focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 [-webkit-tap-highlight-color:transparent] md:block md:cursor-previous-white","aria-label":"Previous media area"}),(0,o.jsx)("button",{type:"button","data-gallery-control":"true",onClick:e=>{e.stopPropagation(),x("next")},className:"absolute inset-y-0 right-0 z-[15] hidden w-1/2 appearance-none border-0 bg-transparent p-0 focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 [-webkit-tap-highlight-color:transparent] md:block md:cursor-next-white","aria-label":"Next media area"})]}):null,(0,o.jsx)("button",{type:"button","data-gallery-control":"true",onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),n(!1)},"aria-label":"Close gallery",className:"absolute right-5 top-5 z-30 inline-flex h-11 w-11 cursor-pointer items-center justify-center rounded-full border border-white/20 bg-black/45 text-white backdrop-blur-sm transition hover:bg-black/60 appearance-none focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 [-webkit-tap-highlight-color:transparent]",children:(0,o.jsx)(a.uv,{className:"h-5 w-5"})}),(0,o.jsxs)("div",{className:"absolute left-5 top-5 z-20 rounded-full bg-black/45 px-3 py-1.5 text-xs font-gillSansNova uppercase tracking-[0.2em] text-white/90 backdrop-blur-sm",children:[d+1," / ",b]}),h?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.$,{type:"button",variant:"primary","data-gallery-control":"true",onClick:e=>{e.stopPropagation(),x("prev")},onMouseDown:e=>e.preventDefault(),"aria-label":"Previous media",className:"absolute left-4 top-1/2 z-20 hidden h-12 w-12 cursor-pointer -translate-y-1/2 rounded-full border border-white/20 bg-black/35 text-white backdrop-blur-sm hover:bg-black/55 appearance-none focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 [-webkit-tap-highlight-color:transparent] md:inline-flex",children:(0,o.jsx)(a.YJ,{className:"h-5 w-5 stroke-white"})}),(0,o.jsx)(s.$,{type:"button",variant:"primary","data-gallery-control":"true",onClick:e=>{e.stopPropagation(),x("next")},onMouseDown:e=>e.preventDefault(),"aria-label":"Next media",className:"absolute right-4 top-1/2 z-20 hidden h-12 w-12 cursor-pointer -translate-y-1/2 roun
1ded-full border border-white/20 bg-black/35 text-white backdrop-blur-sm hover:bg-black/55 appearance-none focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 [-webkit-tap-highlight-color:transparent] md:inline-flex",children:(0,o.jsx)(a.vK,{className:"h-5 w-5 stroke-white"})})]}):null,(0,o.jsx)("div",{className:"flex min-h-[68vh] items-center justify-center px-1 py-3 sm:min-h-[62vh] sm:px-4 sm:py-6 lg:px-6 lg:py-8",children:(0,o.jsx)("div",{className:"relative flex w-full items-center justify-center overflow-hidden rounded-xl",children:(null==v?void 0:v.type)==="video"?(0,o.jsx)("video",{src:v.src,autoPlay:!0,loop:!0,muted:!0,controls:!0,className:"relative z-10 max-h-[calc(100vh-180px)] w-auto max-w-full rounded-xl object-contain sm:max-h-[82vh] sm:w-full"}):(0,o.jsx)("img",{src:null==v?void 0:v.src,alt:"Media ".concat(d+1),className:"relative z-10 max-h-[calc(100vh-180px)] w-auto max-w-full rounded-xl object-contain sm:max-h-[82vh] sm:w-full"})})}),h?(0,o.jsx)("div",{"data-gallery-control":"true",className:"absolute inset-x-0 bottom-0 z-20 bg-gradient-to-t from-black/90 via-black/55 to-transparent px-4 pb-4 pt-12 sm:px-6 lg:px-8",onClick:e=>e.stopPropagation(),children:(0,o.jsx)("div",{className:"overflow-x-auto no-scrollbar",children:(0,o.jsx)("div",{className:"mx-auto flex w-max items-center gap-2 rounded-2xl bg-black/35 px-3 py-3 backdrop-blur-md",children:c.map((e,t)=>(0,o.jsx)("button",{"data-gallery-control":"true",ref:e=>{g.current[t]=e},onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),p(t)},className:(0,l.A)("relative h-12 w-12 cursor-pointer overflow-hidden rounded-lg border transition-all duration-200 appearance-none focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 [-webkit-tap-highlight-color:transparent] sm:h-14 sm:w-14 lg:h-16 lg:w-16",t===d?"scale-105 border-white shadow-[0_0_0_2px_rgba(255,255,255,0.25)]":"border-white/10 opacity-60 hover:opacity-90"),type:"button","aria-label":"Go to media ".concat(t+1),"aria-current":t===d,children:"video"===e.type?(0,o.jsx)("video",{src:e.src,className:"h-full w-full object-cover",muted:!0}):(0,o.jsx)("img",{src:e.src,alt:"Thumbnail ".concat(t+1),className:"h-full w-full object-cover"})},"".concat(e.src,"-").concat(t)))})})}):null]})}):(0,o.jsx)("div",{className:"flex items-center justify-center w-full h-full text-gray-300",children:"No hay media para mostrar."})]})})}},6235:(e,t,n)=>{n.d(t,{lG:()=>Y,Cf:()=>ee,rr:()=>eo,c7:()=>et,L3:()=>en});var o=n(7876),r=n(4232),a=n(3716),l=n(714),s=n(1844),i=n(294),c=n(8162),u=n(3520),d=n(870),p=n(1893),f=n(6822),m=n(6326),g=n(2658),b=n(6324),h=n(4769),v=n(2987),x="Dialog",[w,y]=(0,s.A)(x),[N,j]=w(x),k=e=>{let{__scopeDialog:t,children:n,open:a,defaultOpen:l,onOpenChange:s,modal:u=!0}=e,d=r.useRef(null),p=r.useRef(null),[f=!1,m]=(0,c.i)({prop:a,defaultProp:l,onChange:s});return(0,o.jsx)(N,{scope:t,triggerRef:d,contentRef:p,contentId:(0,i.B)(),titleId:(0,i.B)(),descriptionId:(0,i.B)(),open:f,onOpenChange:m,onOpenToggle:r.useCallback(()=>m(e=>!e),[m]),modal:u,children:n})};k.displayName=x;var D="DialogTrigger";r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,s=j(D,n),i=(0,l.s)(t,s.triggerRef);return(0,o.jsx)(m.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":B(s.open),...r,ref:i,onClick:(0,a.m)(e.onClick,s.onOpenToggle)})}).displayName=D;var C="DialogPortal",[R,O]=w(C,{forceMount:void 0}),E=e=>{let{__scopeDialog:t,forceMount:n,children:a,container:l}=e,s=j(C,t);return(0,o.jsx)(R,{scope:t,forceMount:n,children:r.Children.map(a,e=>(0,o.jsx)(f.C,{present:n||s.open,children:(0,o.jsx)(p.Z,{asChild:!0,container:l,children:e})}))})};E.displayName=C;var I="DialogOverlay",M=r.forwardRef((e,t)=>{let n=O(I,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,l=j(I,e.__scopeDialog);return l.modal?(0,o.jsx)(f.C,{present:r||l.open,children:(0,o.jsx)(T,{...a,ref:t})}):null});M.displayName=I;var T=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=j(I,n);return(0,o.jsx)(b.A,{as:v.DX,allowPinchZoom:!0,shards:[a.contentRef],children:(0,o.jsx)(m.sG.div,{"data-state":B(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),P="DialogContent",_=r.forwardRef((e,t)=>
1{let n=O(P,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,l=j(P,e.__scopeDialog);return(0,o.jsx)(f.C,{present:r||l.open,children:l.modal?(0,o.jsx)(A,{...a,ref:t}):(0,o.jsx)(F,{...a,ref:t})})});_.displayName=P;var A=r.forwardRef((e,t)=>{let n=j(P,e.__scopeDialog),s=r.useRef(null),i=(0,l.s)(t,n.contentRef,s);return r.useEffect(()=>{let e=s.current;if(e)return(0,h.Eq)(e)},[]),(0,o.jsx)(z,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,a.m)(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:(0,a.m)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:(0,a.m)(e.onFocusOutside,e=>e.preventDefault())})}),F=r.forwardRef((e,t)=>{let n=j(P,e.__scopeDialog),a=r.useRef(!1),l=r.useRef(!1);return(0,o.jsx)(z,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||n.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,l.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(l.current=!0));let o=t.target;n.triggerRef.current?.contains(o)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&l.current&&t.preventDefault()}})}),z=r.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:i,...c}=e,p=j(P,n),f=r.useRef(null),m=(0,l.s)(t,f);return(0,g.Oh)(),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.n,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:s,onUnmountAutoFocus:i,children:(0,o.jsx)(u.qW,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":B(p.open),...c,ref:m,onDismiss:()=>p.onOpenChange(!1)})}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(H,{titleId:p.titleId}),(0,o.jsx)(K,{contentRef:f,descriptionId:p.descriptionId})]})]})}),U="DialogTitle",L=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=j(U,n);return(0,o.jsx)(m.sG.h2,{id:a.titleId,...r,ref:t})});L.displayName=U;var S="DialogDescription",G=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=j(S,n);return(0,o.jsx)(m.sG.p,{id:a.descriptionId,...r,ref:t})});G.displayName=S;var W="DialogClose",$=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,l=j(W,n);return(0,o.jsx)(m.sG.button,{type:"button",...r,ref:t,onClick:(0,a.m)(e.onClick,()=>l.onOpenChange(!1))})});function B(e){return e?"open":"closed"}$.displayName=W;var q="DialogTitleWarning",[V,X]=(0,s.q)(q,{contentName:P,titleName:U,docsSlug:"dialog"}),H=({titleId:e})=>{let t=X(q),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
3If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
5For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return r.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},K=({contentRef:e,descriptionId:t})=>{let n=X("DialogDescriptionWarning"),o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`;return r.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Z=n(3704),J=n(1908);let Y=k,Q=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,o.jsx)(M,{ref:t,className:(0,Z.cn)("fixed inset-0 z-[2000] bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...r})});Q.displayName=M.displayName;let ee=r.forwardRef((e,t)=>{let{className:n,children:r,...a}=e;return(0,o.jsxs)(E,{children:[(0,o.jsx)(Q,{}),(0,o.jsxs)(_,{ref:t,className:(0,Z.cn)("overflow-y-scroll no-scrollbar max-h-[90vh] fixed left-[50%] top-[50%] z-[2001] grid w-11/12 max-w-3xl translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-8 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",n),...a,children:[r,(0,o.jsxs)($,{className:"absolute right-4 top-4 roun
5ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground md:p-4",children:[(0,o.jsx)(J.uv,{}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});ee.displayName=_.displayName;let et=e=>{let{className:t,...n}=e;return(0,o.jsx)("div",{className:(0,Z.cn)("flex flex-col gap-2  text-left",t),...n})};et.displayName="DialogHeader";let en=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,o.jsx)(L,{ref:t,className:(0,Z.cn)("",n),...r})});en.displayName=L.displayName;let eo=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,o.jsx)(G,{ref:t,className:(0,Z.cn)("mt-4 text-black",n),...r})});eo.displayName=G.displayName},6822:(e,t,n)=>{n.d(t,{C:()=>l});var o=n(4232),r=n(714),a=n(1285),l=e=>{let{present:t,children:n}=e,l=function(e){var t,n;let[r,l]=o.useState(),i=o.useRef({}),c=o.useRef(e),u=o.useRef("none"),[d,p]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},o.useReducer((e,t)=>n[e][t]??e,t));return o.useEffect(()=>{let e=s(i.current);u.current="mounted"===d?e:"none"},[d]),(0,a.N)(()=>{let t=i.current,n=c.current;if(n!==e){let o=u.current,r=s(t);e?p("MOUNT"):"none"===r||t?.display==="none"?p("UNMOUNT"):n&&o!==r?p("ANIMATION_OUT"):p("UNMOUNT"),c.current=e}},[e,p]),(0,a.N)(()=>{if(r){let e,t=r.ownerDocument.defaultView??window,n=n=>{let o=s(i.current).includes(n.animationName);if(n.target===r&&o&&(p("ANIMATION_END"),!c.current)){let n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},o=e=>{e.target===r&&(u.current=s(i.current))};return r.addEventListener("animationstart",o),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}p("ANIMATION_END")},[r,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:o.useCallback(e=>{e&&(i.current=getComputedStyle(e)),l(e)},[])}}(t),i="function"==typeof n?n({present:l.isPresent}):o.Children.only(n),c=(0,r.s)(l.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}(i));return"function"==typeof n||l.isPresent?o.cloneElement(i,{ref:c}):null};function s(e){return e?.animationName||"none"}l.displayName="Presence"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.