PageSourceSearch

https://rubpage.com/assets/BlogArticlePage-DM1kP8Za.js

js rubpage.com collected 2026-10-02 19:37:18 UTC 9,672 bytes, 16 lines download raw bytes

1import{j as e}from"./vendor-query-nkyHp8gL.js";import{h as L,r as d,L as p}from"./vendor-react-BNT0nzvx.js";import{W as y,L as f,P as b,n as $,ak as C,o as k,B as T,Z as B}from"./index-UlqsakHc.js";import{t as S,a as A}from"./seo-utils-BHrYjSae.js";import{B as P}from"./Breadcrumbs-DYhNFUrn.js";import{a as I,u as R}from"./use-blog-articles-7h4SF9gm.js";import{B as j}from"./badge-BgKH0HTc.js";import D from"./purify.es-C5KSVp3G.js";import{C as z}from"./calendar-BFyvQri4.js";import{C as M}from"./chevron-right-Cm0QdkHJ.js";import{T as q,L as E}from"./tag-Du89wQ64.js";import{C as F}from"./check-7w7r-eFz.js";import"./vendor-ui-DPPUfW-O.js";import"./vendor-charts-B_MCcq71.js";import"./vendor-supabase-BRDBMtg7.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const H=y("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const O=y("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]),l="https://rubpage.com",U=n=>{const t=/<h([23])[^>]*>(.*?)<\/h\1>/gi,o=[];let s;for(;(s=t.exec(n))!==null;){const a=s[2].replace(/<[^>]+>/g,"").trim(),i=a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");o.push({level:parseInt(s[1]),text:a,id:i})}return o},W=n=>{const t=/<h2[^>]*>(.*?)<\/h2>\s*<p>(.*?)<\/p>/gi,o=[];let s;for(;(s=t.exec(n))!==null;){const a=s[1].replace(/<[^>]+>/g,"").trim(),i=s[2].replace(/<[^>]+>/g,"").trim();a.endsWith("?")&&i.length>20&&o.push({question:a,answer:i})}return o},Q=n=>n.replace(/<h([23])([^>]*)>(.*?)<\/h\1>/gi,(t,o,s,a)=>{const c=a.replace(/<[^>]+>/g,"").trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return`<h${o}${s} id="${c}">${a}</h${o}>`}),w=({url:n,title:t})=>{const[o,s]=d.useState(!1),a=d.useCallback(()=>{navigator.clipboard.writeText(n).then(()=>{s(!0),setTimeout(()=>s(!1),2e3)})},[n]),i=encodeURIComponent(n),c=encodeURIComponent(t);return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground mr-1",children:"Share:"}),e.jsx("a",{href:`https://twitter.com/intent/tweet?url=${i}&text=${c}`,target:"_blank",rel:"nofollow noopener noreferrer",className:"w-8 h-8 rounded-full bg-muted flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors","aria-label":"Share on X (Twitter)",children:e.jsx(O,{className:"w-3.5 h-3.5"})}),e.jsx("a",{href:`https://www.facebook.com/sharer/sharer.php?u=${i}`,target:"_blank",rel:"nofollow noopener noreferrer",className:"w-8 h-8 rounded-full bg-muted flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors","aria-label":"Share on Facebook",children:e.jsx(H,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:a,className:"w-8 h-8 rounded-full bg-muted flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors","aria-label":"Copy link",children:o?e.jsx(F,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(E,{className:"w-3.5 h-3.5"})})]})},le=()=>{const{slug:n}=L(),{data:t,isLoading:o}=I(n??""),{data:s}=R(),a=d.useMemo(()=>t?U(t.content):[],[t]),i=d.useMemo(()=>t?W(t.content):[],[t]),c=d.useMemo(()=>t?Q(t.content):"",[t]),h=d.useMemo(()=>!t||!s?[]:s.filter(r=>r.id!==t.id&&r.category===t.category).slice(0,3),[t,s]);if(o)return e.jsxs(f,{children:[e.jsx(b,{title:"Loading Article... | RubPage Blog",noindex:!0}),e.jsx("div",{className:"flex justify-center py-32",children:e.jsx($,{className:"w-6 h-6 animate-spin text-muted-foreground"})})]});if(!t)return e.jsx(C,{});const N=S(t.meta_title||`${t.title} | RubPage Blog`,60),g=A(t.meta_description||t.excerpt||t.title,155),m=`/blog/${t.slug}`,u=t.published_at?new Date(t.published_at).toISOString():void 0,_=new Date(t.updated_at).toISOString(),x=[{"@type":"BlogPosting",headline:t.title,de
11scription:g,url:`${l}${m}`,datePublished:u,dateModified:_,wordCount:t.word_count,author:{"@type":"Person",name:t.author_name},publisher:{"@type":"Organization",name:"RubPage",url:l},...t.featured_image_url?{image:t.featured_image_url}:{},mainEntityOfPage:{"@type":"WebPage","@id":`${l}${m}`}},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:l},{"@type":"ListItem",position:2,name:"Blog",item:`${l}/blog`},{"@type":"ListItem",position:3,name:t.title}]}];return i.length>0&&x.push({"@type":"FAQPage",mainEntity:i.map(r=>({"@type":"Question",name:r.question,acceptedAnswer:{"@type":"Answer",text:r.answer}}))}),e.jsxs(f,{children:[e.jsx(b,{title:N,description:g,canonical:m,ogImage:t.featured_image_url??void 0,type:"article",jsonLd:x,noindex:!1}),e.jsxs("article",{className:"max-w-[760px] mx-auto px-4 py-8",children:[e.jsx(P,{items:[{label:"Home",href:"/"},{label:"Blog",href:"/blog"},{label:t.title}]}),t.featured_image_url&&e.jsx("div",{className:"mt-4 mb-6 rounded-xl overflow-hidden bg-muted",children:e.jsx("img",{src:t.featured_image_url,alt:t.featured_image_alt||`${t.title} — body rub wellness illustration`,className:"w-full h-auto max-h-[400px] object-contain",loading:"eager"})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-muted-foreground mb-4",children:[e.jsx(j,{variant:"secondary",className:"capitalize",children:t.category}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(k,{className:"w-3.5 h-3.5"}),t.reading_time_minutes," min read"]}),u&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(z,{className:"w-3.5 h-3.5"}),new Date(u).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})]})]}),e.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground leading-tight mb-4",children:t.title}),e.jsxs("div",{className:"flex items-center justify-between gap-3 mb-8 pb-6 border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[t.author_avatar_url&&e.jsx("img",{src:t.author_avatar_url,alt:t.author_name,className:"w-10 h-10 rounded-full object-cover"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:t.author_name}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.word_count.toLocaleString()," words"]})]})]}),e.jsx(w,{url:`${l}/blog/${t.slug}`,title:t.title})]}),a.length>2&&e.jsxs("nav",{className:"bg-muted/50 rounded-lg p-5 mb-8 border border-border",children:[e.jsx("h2",{className:"text-sm font-semibold text-foreground mb-3",children:"Table of Contents"}),e.jsx("ol",{className:"space-y-1.5",children:a.filter(r=>r.level===2).map((r,v)=>e.jsx("li",{children:e.jsxs("a",{href:`#${r.id}`,className:"text-sm text-primary hover:underline flex items-center gap-1.5",children:[e.jsx(M,{className:"w-3 h-3"}),r.text]})},v))})]}),e.jsx("div",{className:`prose prose-neutral dark:prose-invert max-w-none
12            prose-headings:text-foreground prose-p:text-foreground/90 prose-a:text-primary
13            prose-h2:text-2xl prose-h2:mt-10 prose-h2:mb-4
14            prose-h3:text-xl prose-h3:mt-8 prose-h3:mb-3
15            prose-li:text-foreground/90 prose-strong:text-foreground
16            prose-img:rounded-lg`,dangerouslySetInnerHTML:{__html:D.sanitize(c,{ALLOWED_TAGS:["p","br","strong","em","a","div","span","h1","h2","h3","h4","img","ul","ol","li","blockquote","code","pre","table","thead","tbody","tr","th","td","figure","figcaption","hr","sup","sub","mark","del","ins","details","summary"],ALLOWED_ATTR:["href","src","alt","class","id","target","rel","loading","width","height"]})}}),e.jsxs("div",{className:"mt-10 pt-6 border-t border-border flex flex-wrap items-center justify-between gap-4",children:[t.tags.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(q,{className:"w-4 h-4 text-muted-foreground"}),t.tags.map(r=>e.jsx(j,{variant:"outline",className:"text-xs",children:r},r))]}),e.jsx(w,{url:`${l}/blog/${t.slug}`,title:t.title})]}),h.length>0&&e.jsxs("section",{className:"mt-12 pt-8 border-t border-border",children:[e.jsx("h2",{className:"text-xl font-bold text-foreground mb-5",children:"Related Articles"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:h.map(r=>e.jsxs(p,{to:`/blog/${r.slug}`,className:"group block rounded-lg border border-border bg-card overflow-hidden hover:border-primary/50 transition-colors",children:[r.featured_image_url&&e.jsx("img",{src:r.featured_image_url,alt:r.featured_image_alt||r.title,className:"w-full h-32 object-cover",loading:"lazy",width:400,height:128}),e.jsxs("div",{className:"p-3",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-2",children:r.title}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[r.reading_time_minutes," min read"]})]})]},r.id))})]}),e.jsxs("section",{className:"mt-12 p-6 bg-primary/5 rounded-xl border border-primary/20 text-center",children:[e.jsx("h2",{className:"text-lg font-bold text-foreground mb-2",children:"Find Providers Near You"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Browse body rub and massage providers in your city"}),e.jsx(T,{asChild:!0,children:e.jsxs(p,{to:"/cities",children:["Browse Cities ",e.jsx(B,{className:"w-4 h-4 ml-1.5"})]})})]})]})]})};export{le 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.