1import{u as h,m as k,l as y}from"./D5MLA-hU.js";import{n as $}from"./DnT6CYIS.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="863003e1-184d-4e71-9ac5-473a3d9b718b",e._sentryDebugIdIdentifier="sentry-dbid-863003e1-184d-4e71-9ac5-473a3d9b718b")}catch{}})();const d=e=>{let t;if(typeof Buffer<"u")t=Buffer.from(e,"utf8").toString("base64");else{let a="";for(const s of new TextEncoder().encode(e))a+=String.fromCharCode(s);t=btoa(a)}return t.replace(/\+/g,"-").replace(/\//g,"~").replace(/=+$/,"")},_=new Set(["aktivasi","akun","api-docs","daftar","garansi","hapus-akun","informasi","karir","kebijakan-cookie","kebijakan-privasi","kontak","lokasi","masuk","masuk-link","partner","perbaikan","promo","reset-password","service-terdekat","syarat-ketentuan","tentang","tracking"]),v=/^[a-z0-9-]+$/,x=e=>!!e&&v.test(e)&&!e.startsWith("service-")&&!_.has(e),w=(e,t)=>`/${x(e)?e:"artikel"}/${t}`,S=(e,t,a)=>`c_RR,title_~${d(e)},description_~${d(t)},p_${d(JSON.stringify(a))}`,D=(e,t,a)=>`/_og/d/${S(t,a,e)}.png`,A=[{re:/hubungi kami/i,to:"/kontak"},{re:/konsultasi/i,to:"/kontak"},{re:/booking servis/i,to:"/perbaikan"},{re:/booking/i,to:"/perbaikan"}],j=(e,t=a=>a)=>{const a=new Set;let s=0;return(e||"").replace(/(<a\b[^>]*>)|(<\/a>)|>([^<]+)</gi,(r,n,o,u)=>{if(n)return s++,r;if(o)return s=Math.max(0,s-1),r;if(s>0)return r;let c=u;for(const{re:p,to:l}of A)a.has(l)||(c=c.replace(new RegExp(p.source,"i"),i=>(a.add(l),`<a href="${t(l)}">${i}</a>`)));return`>${c}<`})},b=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),q=(e,t,a="Baca juga")=>{if(!t)return e||"";const s=`<aside class="baca-juga"><strong>${b(a)}:</strong> <a href="${t.href}">${b(t.title)}</a></aside>`,r=[...(e||"").matchAll(/<h2\b/gi)].map(o=>o.index??0),n=r[1]??r[0];return n==null?s+(e||""):e.slice(0,n)+s+e.slice(n)},I=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/�*39;|'/g,"'").replace(/ /g," "),C=e=>e.toLowerCase().normalize("NFKD").replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-").slice(0,60)||"bagian",z=e=>{const t=[],a=new Map;return{html:(e||"").replace(/<(h2|h3)\b([^>]*)>([\s\S]*?)<\/\1>/gi,(r,n,o,u)=>{const c=I(u.replace(/<[^>]+>/g,"")).replace(/\s+/g," ").trim();if(!c)return r;const p=n.toLowerCase()==="h2"?2:3,l=o.match(/\bid\s*=\s*["']([^"']+)["']/);if(l)return t.push({id:l[1],text:c,level:p}),r;let i=C(c);const g=a.get(i)??0;return a.set(i,g+1),g&&(i=`${i}-${g+1}`),t.push({id:i,text:c,level:p}),`<${n}${o} id="${i}">${u}</${n}>`}),toc:t}},E=e=>e?new Date(e).toLocaleDateString("id-ID",{day:"numeric",month:"long",year:"numeric"}):"",f=e=>{const t=e.category?.slug??"artikel";return{slug:e.slug,catSlug:t,img:e.cover_image||e.og_image||D(w(t,e.slug),e.title,e.excerpt??""),cat:e.category?.name??"",date:E(e.published_at),title:e.title,excerpt:e.excerpt??"",readMinutes:e.read_minutes??0}},m=e=>e?{slug:e.slug,title:e.title,catSlug:e.category??"artikel"}
1:null,L=e=>({...f(e),body:e.body??"",tags:e.tags??[],seoTitle:e.seo?.title??e.title,seoDesc:e.seo?.description??e.excerpt??"",publishedAt:e.published_at,coverImage:e.cover_image,prev:m(e.prev),next:m(e.next)}),N=()=>{const e=y(),{locale:t}=h(),{data:a,status:s}=k(`cms-articles-${t.value}`,()=>$fetch("/api/v1/cms/articles",{query:{per_page:6,locale:t.value}}).then(r=>(r.data??[]).map(f)).catch(()=>[]),{default:()=>[],getCachedData:r=>$(e,r)});return{articles:a,status:s}},O=(e,t)=>{const a=()=>({items:[],meta:{current_page:1,last_page:1,total:0,per_page:9}}),{locale:s}=h(),{data:r,status:n}=k(`cms-articles-list-${s.value}`,()=>$fetch("/api/v1/cms/articles",{query:{per_page:9,first_page_extra:t?.value?void 0:1,page:e.value,tag:t?.value||void 0,locale:s.value}}).then(o=>({items:(o.data??[]).map(f),meta:o.meta??a().meta})).catch(()=>a()),{default:a,watch:t?[e,t]:[e]});return{data:r,status:n}},U=(e,t="id")=>$fetch(`/api/v1/cms/articles/${encodeURIComponent(e)}`,{query:{locale:t}}).then(a=>a.data?L(a.data):null);export{w as a,z as b,N as c,U as f,q as i,j as l,O as u};
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.