1import{a as e,l as t,g as n,c as i,d as o}from"./firebase-BmbSka2m.js";import"./main-CLju4K6_.js";const a=document.getElementById("posts-list"),s=document.getElementById("sidebar-tags"),l=document.getElementById("filter-input"),c=document.getElementById("blog-content"),r=document.getElementById("content-placeholder"),d=document.getElementById("content-viewer"),u=document.getElementById("content-title"),p=document.getElementById("content-meta"),g=document.getElementById("content-body"),m=document.getElementById("content-image");let f=[],y=null;function h(e){if(!e)return"";const t={"ç":"c","Ä":"g","ı":"i","ö":"o","Å":"s","ü":"u","Ã":"c","Ä":"g","İ":"i","Ã":"o","Å":"s","Ã":"u"};let n=e.toString().toLowerCase().trim();for(let i in t)n=n.replace(new RegExp(i,"g"),t[i]);return n.replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-")}function w(e){if(!s)return;const t=new Set;e.forEach(e=>{e.tags&&Array.isArray(e.tags)&&e.tags.forEach(e=>t.add(e))});const n=Array.from(t).sort();s.innerHTML=`\n <span class="tag-filter ${y?"":"active"}" onclick="filterByTag(null)">Tümü</span>\n ${n.filter(e=>"UX"!==e.toUpperCase()).map(e=>`\n <span class="tag-filter ${y===e?"active":""}" onclick="filterByTag('${e}')">${e}</span>\n `).join("")}\n `}function b(){const e=l?l.value.toLowerCase():"";v(f.filter(t=>{const n=t.title.toLowerCase().includes(e)||t.category&&t.category.toLowerCase().includes(e)||t.excerpt&&t.excerpt.toLowerCase().includes(e)||t.tags&&t.tags.some(t=>t.toLowerCase().includes(e)),i=!y||t.tags&&t.tags.includes(y);return n&&i}),!1)}function v(e,t=!0){if(!a)return;if(a.innerHTML="",0===e.length)return void(a.innerHTML='<p style="padding: 1rem; color: #888;">Yazı bulunamadı.</p>');t&&w(f);const n=["#F5A202","#035E7B","#002E2C","#776258","#896279"];e.forEach((e,t)=>{const i=document.createElement("div");i.className="post-item",i.dataset.id=e.id;const o=n[t%n.length];i.dataset.color=o,i.style.backgroundColor=o;let s="";if(e.tags&&e.tags.length>0){const t=e.tags.filter(e=>"UX"!==e.toUpperCase());t.length>0&&(s=`\n <div class="post-tags">\n ${t.map(e=>`<span class="tag-badge" style="background: rgba(255,255,255,0.2); color: white;">${e}</span>`).join("")}\n </div>\n `)}i.innerHTML=`\n <div style="display: flex; justify-content: space-between; align-items: flex-start;">\n <span class="post-item-category">${e.category||"UX&AI"}</span>\n ${e.isPinned?'<i data-lucide="pin" class="pin-icon" style="color: white;"></i>':""}\n </div>\n <div class="post-item-title">${e.title}</div>\n <div class="post-item-date">${e.date||""}</div>\n ${s}\n `,i.onclick=()=>I(e,o),a.appendChild(i)}),"undefined"!=typeof lucide&&lucide.createIcons()}function I(n,i=null){if(r&&(r.style.display="none"),d&&(d.style.display="block"),i&&document.documentElement.style.setProperty("--post-accent-color",i),u&&(u.innerText=n.title),p){let e=n.category||"",t=n.author||"";const i=/\bUX\s*&\s*AI\b|\bUX\b|\bTeam\b/gi;e=e.replace(i,"").replace(/^[â¢\s]+|[â¢\s]+$/g,"").trim(),t=t.replace(i,"").trim();const o=[];e&&o.push(e),t&&o.push(t),n.date&&o.push(n.date),p.innerText=o.join(" ⢠")}const o=document.querySelector(".blog-sidebar");if(o&&o.classList.contains("active")){o.classList.remove("active");const e=document.querySelector("#menu-toggle [data-lucide]");e&&"undefined"!=typeof lucide&&(e.setAttribute("data-lucide","menu"),lucide.createIcons())}if(g){let e="";if(n.tldr&&(e+=`\n <div class="tldr-box">\n <h3>TL;DR</h3>\n <p>${n.tldr}</p>\n </div>\n `),n.spotifyUrl){e+=`\n <div class="spotify-player">\n <iframe style="border-radius:12px" src="${(a=n.spotifyUrl)?a.includes("spotify.com/embed")?a:a.replace("spotify.com/","spotify.com/embed/"):null}" width="100%" height="152" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>\n </div>\n `}e+=n.content||"<p>İçerik bulunamadı.</p>",g.innerHTML=e}var a;m&&(n.image&&!n.hideImageInArticle&&"/cover.png"!==n.image&&"/uxai_logo.png"!==n.image&&""!==n.image.trim()?(m.style.backgroundImage=`url('${n.image}')`,m.style.display="block"):m.style.display="none"),document.querySelectorAll(".post-item").forEach(e
1=>{e.classList.toggle("active",e.dataset.id===n.id)}),c&&c.scrollTo(0,0);const s=h(n.title);history.pushState({postId:n.id},n.title,`/uxai/${s}`),document.title=`${n.title} - UX&AI Blog`,e&&t(e,"page_view",{page_title:n.title,page_location:window.location.href,page_path:window.location.pathname+window.location.search})}window.filterByTag=function(e){y=e,w(f),b()},l&&(l.oninput=()=>b()),window.onpopstate=e=>{if(e.state&&e.state.postId){const t=f.find(t=>t.id===e.state.postId);t&&I(t)}else location.reload()};const E=document.getElementById("menu-toggle"),$=document.querySelector(".blog-sidebar");E&&$&&(E.onclick=()=>{$.classList.toggle("active");const e=E.querySelector("[data-lucide]"),t=$.classList.contains("active");e&&"undefined"!=typeof lucide&&(e.setAttribute("data-lucide",t?"x":"menu"),lucide.createIcons())}),async function(){try{let e=(await n(i(o,"uxai_posts"))).docs.map(e=>({id:e.id,...e.data()}));f=function(e){return e.sort((e,t)=>{if(e.isPinned&&!t.isPinned)return-1;if(!e.isPinned&&t.isPinned)return 1;const n=e=>{if(!e)return 0;const t=new Date(e);if(!isNaN(t.getTime()))return t.getTime();const n=e.split("/");return 3===n.length?new Date(`${n[2]}-${n[1]}-${n[0]}`).getTime():0};return n(t.date)-n(e.date)})}(e),w(f),v(f),function(){let e=new URLSearchParams(window.location.search).get("post");const t=["#F5A202","#035E7B","#002E2C","#776258","#896279"];if(!e){const t=window.location.pathname;t.includes("/uxai/")&&(e=t.split("/uxai/").pop().replace(".html",""))}if(e&&f.length>0){const n=f.findIndex(t=>h(t.title)===e);if(-1!==n){return void I(f[n],t[n%t.length])}}f.length>0&&I(f[0],t[0])}()}catch(e){console.error("Error fetching posts:",e),a&&(a.innerHTML='<p style="text-align:center; padding: 1rem;">Yazılar yüklenirken bir hata oluÅtu.</p>')}}(); 2//# sourceMappingURL=uxai-CKFMEUlP.js.map
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.