PageSourceSearch

https://frtassets.fotocasa.es/_sui/6338.7868470b.js

js fotocasa.es collected 2026-09-24 09:02:15 UTC 8,806 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6338],{uTwT:function(e,t,n){n.d(t,{m_:function(){return $},PR:function(){return Q},ZI:function(){return ee},KL:function(){return te},Bc:function(){return ne},k$:function(){return oe}});var o=n("R9Vz"),r=n("GiSx"),i=n("ERkP"),a=n("wvKO"),s=n("9/X4"),l=n("M3rB"),c=n("7Jh9"),u=n("aF86"),p=n("3Xn3"),d=n("m83L"),f=n("4Ary"),h=n("Yan9"),x=n("rboX"),y=n("WLht"),v=n("Fzvy"),g=n("jg1C"),[m,b]=(0,l.A)("Tooltip",[p.Bk]),w=(0,p.Bk)(),T="TooltipProvider",C=700,E="tooltip.open",[k,R]=m(T),j=e=>{const{__scopeTooltip:t,delayDuration:n=C,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,s=i.useRef(!0),l=i.useRef(!1),c=i.useRef(0);return i.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),(0,g.jsx)(k,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:i.useCallback((()=>{window.clearTimeout(c.current),s.current=!1}),[]),onClose:i.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>s.current=!0),o)}),[o]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback((e=>{l.current=e}),[]),disableHoverableContent:r,children:a})};j.displayName=T;var _="Tooltip",[L,P]=m(_),D=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,c=R(_,e.__scopeTooltip),d=w(t),[f,h]=i.useState(null),x=(0,u.B)(),v=i.useRef(0),m=s??c.disableHoverableContent,b=l??c.delayDuration,T=i.useRef(!1),[C,k]=(0,y.i)({prop:o,defaultProp:r??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(E))):c.onClose(),a?.(e)},caller:_}),j=i.useMemo((()=>C?T.current?"delayed-open":"instant-open":"closed"),[C]),P=i.useCallback((()=>{window.clearTimeout(v.current),v.current=0,T.current=!1,k(!0)}),[k]),D=i.useCallback((()=>{window.clearTimeout(v.current),v.current=0,k(!1)}),[k]),I=i.useCallback((()=>{window.clearTimeout(v.current),v.current=window.setTimeout((()=>{T.current=!0,k(!0),v.current=0}),b)}),[b,k]);return i.useEffect((()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)}),[]),(0,g.jsx)(p.bL,{...d,children:(0,g.jsx)(L,{scope:t,contentId:x,open:C,stateAttribute:j,trigger:f,onTriggerChange:h,onTriggerEnter:i.useCallback((()=>{c.isOpenDelayedRef.current?I():P()}),[c.isOpenDelayedRef,I,P]),onTriggerLeave:i.useCallback((()=>{m?D():(window.clearTimeout(v.current),v.current=0)}),[D,m]),onOpen:P,onClose:D,disableHoverableContent:m,children:n})})};D.displayName=_;var I="TooltipTrigger",O=i.forwardRef(((e,t)=>{const{__scopeTooltip:n,...o}=e,r=P(I,n),l=R(I,n),c=w(n),u=i.useRef(null),d=(0,s.s)(t,u,r.onTriggerChange),f=i.useRef(!1),x=i.useRef(!1),y=i.useCallback((()=>f.current=!1),[]);return i.useEffect((()=>()=>document.removeEventListener("pointerup",y)),[y]),(0,g.jsx)(p.Mz,{asChild:!0,...c,children:(0,g.jsx)(h.sG.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:(0,a.mK)(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(x.current||l.isPointerInTransitRef.current||(r.onTriggerEnter(),x.current=!0))})),onPointerLeave:(0,a.mK)(e.onPointerLeave,(()=>{r.onTriggerLeave(),x.current=!1})),onPointerDown:(0,a.mK)(e.onPointerDown,(()=>{r.open&&r.onClose(),f.current=!0,document.addEventListener("pointerup",y,{once:!0})})),onFocus:(0,a.mK)(e.onFocus,(()=>{f.current||r.onOpen()})),onBlur:(0,a.mK)(e.onBlur,r.onClose),onClick:(0,a.mK)(e.onClick,r.onClose)})})}));O.displayName=I;var N="TooltipPortal",[M,A]=m(N,{forceMount:void 0}),K=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,i=P(N,t);return(0,g.jsx)(M,{scope:t,forceMount:n,children:(0,g.jsx)(f.C,{present:n||i.open,children:(0,g.jsx)(d.Z,{asChild:!0,container:r,children:o})})})};K.displayName=N;var B="TooltipContent",H=i.forwardRef(((e,t)=>{const n=A(B,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,a=P(B,e.__scopeTooltip);return(0,g.jsx)(f.C,{present:o||a.open,children:a.disableHoverableContent?(0,g.jsx)(G,{side:r,...i,ref:t}):(0,g.jsx)(F,{side:r,...i,ref:t})})})),F=i.forwardRef(((e,t)=>{const n=P(B,e.__scopeTooltip),o=R(B,e.__scopeTooltip),r=i.useRef(null),a=(0,s.s)(t,r),[l,c]=i.useState(null),{trigger:u,onClose:p}=n,d=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback((()=>{c(null),f(!1)}),[f]),x=i.useCallback(((e,t)=>{const n=e.currentTarget,o={x:e.clientX,y:e.clientY},r=function(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return o}(o,function(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}(o,n.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(o.y-n.y)>=(e.y-n.y)*(o.x-n.x)))break;t.pop()}t.push(o)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const o=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(o.y-t.y)>
1=(e.y-t.y)*(o.x-t.x)))break;n.pop()}n.push(o)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...r,...function(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}(t.getBoundingClientRect())]);c(i),f(!0)}),[f]);return i.useEffect((()=>()=>h()),[h]),i.useEffect((()=>{if(u&&d){const e=e=>x(e,d),t=e=>x(e,u);return u.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[u,d,x,h]),i.useEffect((()=>{if(l){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},o=u?.contains(t)||d?.contains(t),r=!function(e,t){const{x:n,y:o}=e;let r=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,u=s.x,p=s.y;c>o!=p>o&&n<(u-l)*(o-c)/(p-c)+l&&(r=!r)}return r}(n,l);o?h():r&&(h(),p())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,d,l,p,h]),(0,g.jsx)(G,{...e,ref:a})})),[X,z]=m(_,{isInside:!1}),Y=(0,x.Dc)("TooltipContent"),G=i.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,u=P(B,n),d=w(n),{onClose:f}=u;return i.useEffect((()=>(document.addEventListener(E,f),()=>document.removeEventListener(E,f))),[f]),i.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,f]),(0,g.jsx)(c.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,g.jsxs)(p.UC,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,g.jsx)(Y,{children:o}),(0,g.jsx)(X,{scope:n,isInside:!0,children:(0,g.jsx)(v.bL,{id:u.contentId,role:"tooltip",children:r||o})})]})})}));H.displayName=B;var S="TooltipArrow",W=i.forwardRef(((e,t)=>{const{__scopeTooltip:n,...o}=e,r=w(n);return z(S,n).isInside?null:(0,g.jsx)(p.i3,{...r,...o,ref:t})}));W.displayName=S;var Z=j,q=D,J=O,U=K,V=H,$=e=>(0,g.jsx)(q,(0,r.IA)({},e));$.displayName="Tooltip";var Q=e=>(0,g.jsx)(W,(0,r.IA)({"data-panot-component":"tooltip-arrow",className:"fill-info-container"},e));Q.displayName="TooltipArrow";var ee=(0,i.forwardRef)(((e,t)=>{var n=e,{className:i,sideOffset:a=4}=n,s=(0,r.YG)(n,["className","sideOffset"]);return(0,g.jsx)(V,(0,r.IA)({ref:t,"data-panot-component":"tooltip-content",className:(0,o.cn)("z-tooltip overflow-hidden rounded-sm bg-info-container text-on-info-container text-caption px-md py-sm data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out",i),sideOffset:a},s))}));ee.displayName="TooltipContent";var te=e=>(0,g.jsx)(U,(0,r.IA)({},e));te.displayName="TooltipPortal";var ne=e=>(0,g.jsx)(Z,(0,r.IA)({},e));ne.displayName="TooltipProvider";var oe=(0,i.forwardRef)(((e,t)=>(0,g.jsx)(J,(0,r.IA)({ref:t},e))));oe.displayName="TooltipTrigger"}}]);

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.