PageSourceSearch

https://rentize-f4055.firebaseapp.com/assets/AdPlacement-DP4StN4I.js

js rentize-f4055.firebaseapp.com collected 2026-10-03 14:09:11 UTC 7,653 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/firebase-firestore-DTF8F7Ek.js","assets/firebase-core-B-dLRyw9.js","assets/firebase-client-pO3ITL04.js","assets/index-DkQzOdFs.js","assets/react-dom-By-GmpSA.js","assets/tanstack-BNewqH_0.js","assets/react-router-TvAePPuW.js","assets/react-helmet-CCjUqEyS.js","assets/i18n-B3m0byW6.js","assets/index-Hr3ANPZN.css"])))=>i.map(i=>d[i]);
2import{_ as e}from"./index-DkQzOdFs.js";import{r as t,j as a}from"./react-dom-By-GmpSA.js";import{logEvent as i}from"./firebase-analytics-WT0zFUYH.js";import{getClientAnalytics as r,getClientFirestore as s,getClientAuth as n}from"./firebase-client-pO3ITL04.js";import{addDoc as l,collection as o,Timestamp as c}from"./firebase-firestore-DTF8F7Ek.js";import"./tanstack-BNewqH_0.js";import"./react-router-TvAePPuW.js";import"./react-helmet-CCjUqEyS.js";import"./i18n-B3m0byW6.js";import"./firebase-core-B-dLRyw9.js";function d(){let e=sessionStorage.getItem("rentize_session_id");return e||(e=`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,sessionStorage.setItem("rentize_session_id",e)),e}async function m(){const t=n(),a=s(),i=t.currentUser;if(!i)return{anonymousId:d(),isAuthenticated:!1};try{const{doc:t,getDoc:r}=await e(async()=>{const{doc:e,getDoc:t}=await import("./firebase-firestore-DTF8F7Ek.js");return{doc:e,getDoc:t}},__vite__mapDeps([0,1])),s=(await r(t(a,"users",i.uid))).data();return{anonymousId:i.uid,role:s?.roles?.[0],verificationLevel:s?.verificationLevel,city:s?.city,isAuthenticated:!0}}catch(r){return{anonymousId:i.uid,isAuthenticated:!0}}}function p(){const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"}function u({placement:n,className:u="",compact:f=!1,preloadedAd:v}){const[g,h]=t.useState(v??null),[x,b]=t.useState(void 0===v),y=t.useRef(null),w=t.useRef(!1);t.useEffect(()=>{if(void 0!==v)return h(v),void b(!1);let t=!1;return(async()=>{try{b(!0);const[{getClientFirestore:a},{collection:i,query:r,where:s,getDocs:l,Timestamp:o}]=await Promise.all([e(()=>import("./firebase-client-pO3ITL04.js"),__vite__mapDeps([2,3,4,5,6,7,8,9,1])),e(()=>import("./firebase-firestore-DTF8F7Ek.js"),__vite__mapDeps([0,1]))]),c=a(),d=o.now(),m=r(i(c,"ads"),s("status","==","active"),s("schedule.startDate","<=",d),s("schedule.endDate",">=",d)),p=await l(m);if(t)return;const u=p.docs.map(e=>({id:e.id,...e.data()})).filter(e=>e.placements.some(e=>e.type===n));u.length>0&&h(u[0])}catch(a){}finally{t||b(!1)}})(),()=>{t=!0}},[n,v]),t.useEffect(()=>{if(!g||w.current)return;const e=y.current;if(!e)return;const t=new IntersectionObserver(e=>{e[0].isIntersecting&&!w.current&&(w.current=!0,async function(e,t){const a=await r(),n=s();a&&i(a,"ad_impression",{ad_id:e.id,advertiser_id:e.advertiser.id,campaign_name:e.campaign.name,placement_type:t.placementType,value:e.pricing.amount});try{await l(o(n,"ad_events"),{eventId:crypto.randomUUID(),timestamp:c.now(),adId:e.id,advertiserId:e.advertiser.id,campaignName:e.campaign.name,placementType:t.placementType,eventType:"impression",session:{sessionId:d(),pageUrl:t.pageUrl,referrer:document.referrer,device:p(),browser:navigator.userAgent.
2split(" ").slice(-1)[0],os:navigator.platform},user:await m()})}catch(u){}}(g,{placementType:n,pageUrl:window.location.pathname}).catch(()=>{}),t.disconnect())},{threshold:.5});return t.observe(e),()=>t.disconnect()},[g,n]),t.useEffect(()=>{w.current=!1},[g?.id]);const j=t.useCallback(e=>{y.current=e},[]),_=async()=>{g&&(await async function(e,t){const a=await r(),n=s();a&&i(a,"ad_click",{ad_id:e.id,advertiser_id:e.advertiser.id,campaign_name:e.campaign.name,placement_type:t.placementType,value:e.pricing.amount});try{await l(o(n,"ad_events"),{eventId:crypto.randomUUID(),timestamp:c.now(),adId:e.id,advertiserId:e.advertiser.id,campaignName:e.campaign.name,placementType:t.placementType,eventType:"click",session:{sessionId:d(),pageUrl:t.pageUrl,device:p()},user:await m()})}catch(u){}}(g,{placementType:n,pageUrl:window.location.pathname}),window.open(g.creative.linkUrl,"_blank","noopener,noreferrer"))};return x?a.jsx("div",{ref:j,className:`ad-placeholder animate-pulse bg-gray-100 rounded-lg ${u}`,children:a.jsx("div",{className:"h-full w-full"})}):g?"property-list-inline"===n?f?a.jsxs("button",{ref:j,onClick:_,className:`group bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden hover:shadow-md transition-all duration-300 flex h-56 w-full text-left ${u}`,children:[a.jsxs("div",{className:"relative w-72 shrink-0 overflow-hidden bg-gray-100",children:[a.jsx("img",{src:g.creative.imageUrl,alt:g.creative.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",loading:"lazy"}),a.jsx("div",{className:"absolute top-2 right-2 z-10 bg-yellow-400 text-gray-900 px-2.5 py-1 rounded-full text-xs font-bold uppercase tracking-wide shadow-md",children:"Hirdetés"})]}),a.jsx("div",{className:"flex-1 p-5 flex flex-col justify-between",children:a.jsxs("div",{children:[a.jsx("div",{className:"flex items-start justify-between mb-2",children:a.jsxs("div",{className:"flex-1",children:[a.jsx("h3",{className:"text-lg font-bold text-gray-900 group-hover:text-blue-600 transition-colors mb-1",children:g.creative.title}),g.creative.description&&a.jsx("p",{className:"text-gray-600 text-sm line-clamp-2",children:g.creative.description})]})}),g.creative.callToAction&&a.jsx("div",{className:"mt-2",children:a.jsxs("span",{className:"inline-block px-4 py-2 bg-blue-600 text-white text-sm font-semibold rounded-lg hover:bg-blue-700 transition-colors",children:[g.creative.callToAction," →"]})})]})})]}):a.jsxs("button",{ref:j,onClick:_,className:`group relative bg-white rounded-xl shadow-sm border-2 border-yellow-400 overflow-hidden hover:shadow-md transition-all duration-300 w-full text-left ${u}`,children:[a.jsx("div",{className:"absolute top-2 right-2 z-10 bg-yellow-400 text-gray-900 px-3 py-1 rounded-full text-xs font-bold uppercase tracking-wide shadow-md",children:"Hirdetés"}),a.jsx("div",{className:"relative aspect-[4/3] overflow-hidden bg-gray-100",children:a.jsx("img",{src:g.creative.imageUrl,alt:g.creative.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",loading:"lazy"})}),a.jsxs("div",{className:"p-4",children:[a.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-2 line-clamp-2",children:g.creative.title}),g.creative.description&&a.jsx("p",{className:"text-sm text-gray-600 mb-3 line-clamp-2",children:g.creative.description}),g.creative.callToAction&&a.jsxs("span",{className:"inline-block px-4 py-2 bg-blue-600 text-white text-sm font-semibold rounded-lg hover:bg-blue-700 transition-colors",children:[g.creative.callToAction," →"]})]}),!1]}):a.jsxs("div",{ref:j,className:`ad-container ${u}`,children:[a.jsx("p",{className:"text-xs text-gray-500 mb-2 uppercase tracking-wide",children:"Hirdetés"}),a.jsxs("button",{onClick:_,className:"w-full text-left hover:opacity-90 transition-opacity focus:outline-none focus:ring-2 focus:ring-blue-500 rounded-lg overflow-hidden",children:[a.jsx("img",{src:g.creative.imageUrl,alt:g.creative.title,className:"w-full h-auto rounded-lg shadow-sm",loading:"lazy"}),a.jsxs("div",{className:"mt-3",children:[a.jsx("h3",{className:"font-semibold text-gray-900 text-base",children:g.creative.title}),g.creative.description&&a.jsx("p",{className:"text-sm text-gray-600 mt-1 line-clamp-2",children:g.creative.description}),g.creative.callToAction&&a.jsxs("span",{className:"inline-block mt-2 text-sm font-medium text-blue-600 hover:text-blue-700",children:[g.creative.callToAction," →"]})]})]}),!1]}):null}export{u as default};

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.