PageSourceSearch

https://markneilcordero.dev/_next/static/chunks/8adfe6433b0a437c.js?dpl=dpl_AjfLKDuLj9o5B3c3vZMSKwgLPPGd

js markneilcordero.dev collected 2026-10-02 01:52:58 UTC 10,536 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,1214,e=>{"use strict";e.s(["default",()=>h]);var t=e.i(18050),a=e.i(71645),r=e.i(22016),l=e.i(21829),s=e.i(80401);e.i(41983);var i=e.i(79053),o=e.i(86301),n=e.i(95280),c=e.i(72225);let d=[i.Navigation,o.Pagination,n.A11y,c.Autoplay];function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),a=(e||"").replace(/\r\n/g,"\n");a=a.replace(/^---\n([\s\S]*?)\n---\n?/,"");let r=[],l=(a=(a=(a=(a=(a=(a=(a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/(\S)<strong>/g,"$1 <strong>").replace(/<\/strong>(\S)/g,"</strong> $1").replace(/(\S)<em>/g,"$1 <em>").replace(/<\/em>(\S)/g,"</em> $1")}(a=(a=(a=(a=(a=a.replace(/```([\s\S]*?)```/g,(e,a)=>(r.push('<pre class="bg-light p-2 rounded border"><code>'.concat(t(a),"</code></pre>")),"@@BLOCK".concat(r.length-1,"@@")))).replace(/`([^`]+?)`/g,(e,a)=>'<code class="bg-light px-1 rounded border">'.concat(t(a),"</code>"))).replace(/^###### (.*)$/gm,"<h6>$1</h6>").replace(/^##### (.*)$/gm,"<h5>$1</h5>").replace(/^#### (.*)$/gm,"<h4>$1</h4>").replace(/^### (.*)$/gm,"<h3>$1</h3>").replace(/^## (.*)$/gm,"<h4>$1</h4>").replace(/^# (.*)$/gm,"<h3>$1</h3>")).replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>")).replace(/(^|[^\*])\*(?!\s)(.+?)\*(?!\s)/g,"$1<em>$2</em>"))).replace(/!\[([^\]]*)\]\((?:\s*)(((?:https?:\/\/|data:image\/[a-zA-Z+]+;base64,|\/|www\.)[^\s)]+))(?:\s*)\)/g,(e,a,r)=>{let l=r.startsWith("www.")?"https://".concat(r):r;return'<img src="'.concat(l,'" alt="').concat(t(a),'" loading="lazy" class="img-fluid rounded my-2" />')})).replace(/\[([^\]]+)\]\((?:\s*)((?:https?:\/\/|mailto:|tel:|\/|#|www\.)[^\s)]+)(?:\s*)\)/g,(e,t,a)=>{let r=a.startsWith("www.")?"https://".concat(a):a,l=/^(https?:\/\/|mailto:|tel:)/i.test(r);return'<a href="'.concat(r,'"').concat(l?' target="_blank" rel="noopener noreferrer"':"",">").concat(t,"</a>")})).replace(/^>\s?(.*)$/gm,'<blockquote class="blockquote">$1</blockquote>')).replace(/^\s{0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/gm,"<hr/>")).replace(/(^|[\s(])((?:https?:\/\/)[^\s)]+)(?=[\s),]|$)/g,(e,t,a)=>"".concat(t,'<a href="').concat(a,'" target="_blank" rel="noopener noreferrer">').concat(a,"</a>"))).replace(/(^|[\s(])(www\.[^\s)]+)(?=[\s),]|$)/g,(e,t,a)=>"".concat(t,'<a href="https://').concat(a,'" target="_blank" rel="noopener noreferrer">').concat(a,"</a>"))).split("\n"),s="",i=!1;for(let e of l){let t=/^[-*]\s+(.*)$/.exec(e);t?(i||(s+="<ul>",i=!0),s+="<li>".concat(t[1],"</li>")):(i&&(s+="</ul>",i=!1),s+=e+"\n")}return i&&(s+="</ul>"),s=s.replace(/\n{2,}/g,"</p><p>").replace(/^(?!<(?:h\d|ul|pre|p|\/p|table|li|blockquote|img|code|hr|a))([^\n]+)/gm,"<p>$1</p>").replace(/@@BLOCK(\d+)@@/g,(e,t)=>r[Number(t)])}function g(e){let{content:a,slugOrId:l}=e,s=m(a||"").replace(/<[^>]+>/g,""),i=s.length>150?s.slice(0,150)+"…":s;return(0,t.jsxs)("div",{className:"small",children:[(0,t.jsx)("p",{className:"text-truncate",style:{maxHeight:"4.5em",overflow:"hidden"},children:i}),(0,t.jsx)(r.default,{href:"/blogs/".concat(encodeURIComponent(l)),className:"btn btn-link btn-sm p-0",children:"Read More"})]})}async function p(e){var t,a;if(null==(a=navigator)||null==(t=a.clipboard)?void 0:t.writeText)return void await navigator.clipboard.writeText(e);let r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r)}function h(){let[e,r]=(0,a.useState)([]),[i,o]=(0,a.useState)([]),[n,c]=(0,a.useState)(!0),[h,u]=(0,a.useState)(""),[b,x]=(0,a.useState)({});(0,a.useEffect)(()=>{let e=!0;return(async()=>{c(!0),u("");let t=l.supabase.from("blogs").select("id, slug, title, image_url, content_html, published, sort_order, created_at").eq("published",!0).order("sort_order",{ascending:!0}).order("created_at",{ascending:!1}),a=l.supabase.from("promos").select("id, title, subtitle, image_url, icon_class, cta_text, cta_url, sort_order").eq("placement","blogs").eq("active",!0).order("sort_order",{ascending:!0}),[s,i]=await Promise.all([t,a]);if(e){if(s.error){let e=await l.supabase.from("blogs").select("id, title, image_url, content_html, published, sort_order, created_at").eq("published",!0).order("sort_order",{ascending:!0}).order("created_at",{ascending:!1});e.error?(u(e.error.message||"Failed to load blogs."),r([])):r((e.data||[]).map(e=>({...e,slug:void 0})))}else r(s.data||[]);!i.error&&Array.isArray(i.data)?o(i.data):o([]),c(!1)}})(),()=>{e=!1}},[]);let f=(e,t)=>
1{let a=(null==e?void 0:e.title)||"New portfolio blog";return["I found this practical portfolio blog from Mark Neil Cordero: ".concat(a,"."),"It shares useful insight for teams, clients, and developers interested in better web systems and full stack delivery.",t,"#MarkNeilCordero #FullStackDeveloper #WebDevelopment"].join("\n\n")},w=async(e,t)=>{x(t=>({...t,[e.id]:"loading"}));try{let a=m(e.content_html||"").replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,700),r=await fetch("/api/chatbot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectName:"Mark Neil Portfolio",pageUrl:t,systemPrompt:"You create social sharing captions for Mark Neil Cordero's portfolio blogs. Return only the final copyable caption. Make it engaging, professional, and concise. Include the exact blog link and 3 to 5 relevant hashtags. Do not use markdown headings or explanations.",messages:[{role:"user",content:"Create a share caption for this blog.\n\nTitle: ".concat(e.title||"Untitled Blog","\nLink: ").concat(t,"\nPreview: ").concat(a)}]})});if(!r.ok||!r.body)throw Error("Failed to generate share copy.");let l=r.body.getReader(),s=new TextDecoder,i="",o=!1;for(;!o;){let e=await l.read();o=e.done,e.value&&(i+=s.decode(e.value,{stream:!0}))}let n=function(e,t){let a=(e||"").trim(),r=a.match(/#[\w-]+/g)||[],l=["#MarkNeilCordero","#FullStackDeveloper","#WebDevelopment"].filter(e=>!r.includes(e)),s=a.includes(t)?a:"".concat(a,"\n\n").concat(t),i=r.length>=3?"":"\n\n".concat(l.slice(0,Math.max(0,3-r.length)).join(" "));return"".concat(s).concat(i).trim()}(i,t);await p(n||f(e,t)),x(t=>({...t,[e.id]:"copied"}))}catch(a){console.error("AI share copy failed:",a);try{await p(f(e,t)),x(t=>({...t,[e.id]:"copied"}))}catch(t){x(t=>({...t,[e.id]:"error"}))}}finally{window.setTimeout(()=>{x(t=>({...t,[e.id]:""}))},2600)}};return(0,t.jsxs)("section",{className:"container my-4","aria-labelledby":"blogs-title",children:[(0,t.jsxs)("h1",{className:"h3 mb-3",id:"blogs-title",children:[(0,t.jsx)("i",{className:"fa-solid fa-blog me-2","aria-hidden":"true"}),"Blogs"]}),h&&(0,t.jsxs)("div",{className:"alert alert-danger",role:"alert",children:[(0,t.jsx)("i",{className:"fa-solid fa-triangle-exclamation me-2","aria-hidden":"true"}),h]}),n?(0,t.jsxs)("div",{className:"text-center my-5",children:[(0,t.jsx)("div",{className:"spinner-border",role:"status"}),(0,t.jsx)("p",{className:"mt-3",children:"Loading blogs…"})]}):0===(e||[]).length?(0,t.jsx)("div",{className:"alert alert-info",children:"No blog posts yet."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.Swiper,{modules:d,spaceBetween:20,slidesPerView:1,navigation:!0,pagination:{clickable:!0},grabCursor:!0,watchOverflow:!0,breakpoints:{768:{slidesPerView:1},1200:{slidesPerView:1}},className:"public-content-swiper blogs-page-swiper",children:e.map(e=>{var a;let r=null!=(a=e.slug)?a:String(e.id),l=window.location.origin,i=l?"".concat(l,"/blogs/").concat(encodeURIComponent(r)):"/blogs/".concat(encodeURIComponent(r));return(0,t.jsx)(s.SwiperSlide,{children:(0,t.jsxs)("div",{className:"card text-bg-light mb-3 h-100",children:[(0,t.jsxs)("div",{className:"card-header d-flex align-items-center justify-content-between",children:[(0,t.jsx)("span",{children:e.title}),e.created_at&&(0,t.jsx)("small",{className:"text-body-secondary",children:new Date(e.created_at).toLocaleDateString()})]}),(0,t.jsxs)("div",{className:"card-body d-flex flex-column",children:[e.image_url&&(0,t.jsx)("img",{src:e.image_url||"https://placehold.co/480x270?text=Blog",alt:e.title,className:"img-fluid rounded mb-2",style:{objectFit:"cover",maxHeight:400,width:"100%"},loading:"lazy"}),(0,t.jsx)("h5",{className:"card-title",children:e.title}),(0,t.jsx)(g,{content:e.content_html,slugOrId:r}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)("button",{type:"button",className:"btn btn-sm btn-primary",onClick:()=>w(e,i),disabled:"loading"===b[e.id],children:["loading"===b[e.id]?(0,t.jsx)("span",{className:"spinner-border spinner-border-sm me-2","aria-hidden":"true"}):(0,t.jsx)("i",{className:"fa-regular fa-copy me-2","aria-hidden":"true"}),"loading"===b[e.id]?"Writing share copy...":"copied"===b[e.id]?"Copied Share Text":"error"===b[e.id]?"Copy Failed":"Copy Link to Share"]})})]})]})},e.id)})}),i.length>0&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("h2",{className:"h5 mb-3",children:[(0,t.jsx)("i",{className:"fa-solid fa-bullhorn me-2","aria-hidden":"true"}),"Sponsored / Self-Ads"]}),(0,t.jsx)(s.Swiper,{modules:d,spaceBetween:20,slidesPerView:1,loop:i.length>1,autoplay:{delay:3200,disableOnInteraction:!1,pauseOnMouseEnter:!0},navigation:i.length>1,pagination:{clickable:!0},grabCursor:i.length>1,watchOverflow:!0,breakpoints:{768:{slidesPerView:1},1200:{slidesPerView:1}},className:"public-content-swiper promos-page-swiper",children:i.map(e=>(0,t.jsx)(s.SwiperSlide,{children:(0,t.jsx)("div",{className:"card border-primary-subtle",children:(0,t.jsxs)("div",{className:"row g-0 align-items-center",children:[e.image_url&&(0,t.jsx)("div",{className:"col-12 col-md-3",children:(0,t.jsx)("img",{src:e.image_url,alt:e.title||"Promo",className:"img-fluid rounded-start",style:{objectFit:"cover",maxHeight:140,width:"100%"},loading:"lazy"})}),(0,t.jsx)("div",{className:"col",children:(0,t.jsxs)("div",{className:"card-body",children:[(0,t.jsxs)("div",{className:"d-flex align-items-center gap-2 mb-1",children:[e.icon_class&&(0,t.jsx)("i",{className:"".concat(e.icon_class," text-muted"),"aria-hidden":"true"}),(0,t.jsx)("h3",{className:"h6 mb-0",children:e.title})]}),e.subtitle&&(0,t.jsx)("p",{className:"small text-muted mb-2",children:e.subt
1itle}),e.cta_text&&e.cta_url&&(0,t.jsx)("a",{href:e.cta_url,target:"_blank",rel:"noreferrer",className:"btn btn-sm btn-primary",children:e.cta_text})]})})]})})},e.id))})]})]})]})}}]);

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.