PageSourceSearch

https://thainexus.co.th/assets/Legal-xT4h5stU.js

js thainexus.co.th collected 2026-10-02 02:39:48 UTC 4,148 bytes, 2 lines download raw bytes

1import{u as L,I as v,J as D,a3 as _,r as f,c4 as p,c5 as E,K as S,c6 as T,c7 as N,j as e,P as h,E as j,e as y,M as k,N as P,O as $,c8 as B}from"./index-Dr-C1Rfi.js";import{M as C}from"./MarkdownBody-GBwdJUAt.js";import"./markdownHref-Bd_SivnA.js";function A(n,l){var s;if(!n||!(l!=null&&l.body))return n;const r=(s=String(l.body).match(/\*\*Effective Date:\*\*[^\n]*/))==null?void 0:s[0];if(!r)return n;const i=typeof n.body=="string"?n.body:"",c=/\*\*Effective Date:\*\*/.test(i)?i.replace(/\*\*Effective Date:\*\*[^\n]*/,r):`${r}
2${i}`;return c===i?n:{...n,body:c}}function M(n,l){const r=(Array.isArray(n)?n:[]).map(t=>{var d;return{slug:t.slug,title:B(t,l).title||t.title_en,dated:typeof((d=t.body)==null?void 0:d.dated)=="string"?t.body.dated:""}}),i=new Map(r.map(t=>[t.slug,t])),c=[],s=new Set;for(const t of N){const d=i.get(t.slug)||{slug:t.slug,title:t.title,dated:t.dated||""};c.push(d),s.add(t.slug)}for(const t of r)t.slug&&!s.has(t.slug)&&c.push(t);return c}function I({slug:n}){const l=L(),r=v(),i=D(),c=_(),s=n||r.slug,[t,d]=f.useState(null),[a,u]=f.useState(()=>s?p(s):null);if(f.useEffect(()=>{if(!s){E("legal").then(o=>{o!=null&&o.length&&d(o)});return}u(p(s)||null);let g=!1;return S("legal",s).then(o=>{if(g||!o)return;const x=T(o,i);if(x){const m=p(s);u((s==="proxy-purchase-terms"||s==="terms-of-service-for-mailbox-rental"||s==="storage-and-disposal-policy")&&m?{...x,body:m.body,dated:m.dated,description:m.description,seoDescription:m.description}:A(x,m))}}),()=>{g=!0}},[s,i]),!s){const g=t!=null?M(t,i):N;return e.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 py-12",children:[e.jsx(h,{title:l("legal.meta.title","Legal Policies | Thai Nexus"),description:l("legal.meta.description","Terms of service, privacy, cookies, mailbox terms, proxy purchase terms, storage, trading conditions, restricted items, and advertising policies for Thai Nexus."),canonicalPath:"/legal"}),e.jsx(j,{items:[{label:l("legal.crumb","Legal")}]}),e.jsx("h1",{className:"text-4xl font-extrabold text-primary tracking-tight",children:l("legal.h1","Legal")}),e.jsx("p",{className:"mt-4 text-lg text-foreground/80",children:l("legal.intro",`Official policies of ${c.legalName}.`)}),e.jsx("ul",{className:"mt-8 divide-y divide-border border border-border rounded-lg bg-white",children:g.map(o=>e.jsx("li",{children:e.jsxs(y,{to:`/legal/${o.slug}`,className:"block p-5 hover:bg-secondary/40 transition-colors",children:[e.jsx("h2",{className:"font-semibold text-primary",children:o.title}),o.dated?e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:o.dated}):null]})},o.slug))})]})}if(!a)return e.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-24 text-center",children:[e.jsx(h,{title:l("common.document_not_found","Document not found"),description:l("common.all_legal","All legal documents"),canonicalPath:`/legal/${s}`,noindex:!0}),e.jsx("h1",{className:"text-2xl font-bold text-primary",children:l("common.document_not_found","Document not found")}),e.jsx(y,{to:"/legal",className:"mt-4 inline-block text-primary underline",children:l("common.all_legal","All legal documents")})]});const b=k(l,"legal",a.slug,{title:a.seoTitle||`${a.title} | Thai Nexus`,description:a.seoDescription||a.description||`${a.title} of ${c.legalName}.`});return e.jsxs("article",{className:"max-w-3xl mx-auto px-4 sm:px-6 py-12",children:[e.jsx(h,{title:b.title,description:b.description,canonicalPath:a.canonicalPath||`/legal/${a.slug}`,noindex:a.robots==="noindex",hasThaiAlternate:a._thaiHreflang===!0,hreflangLocales:a._hreflangLocales||[]}),e.jsx(P,{show:$(a._cmsEntry||a,i)}),e.jsx(j,{items:[{label:l("legal.crumb","Legal"),to:"/legal"},{label:a.title}]}),e.jsx("h1",{className:"text-4xl font-extrabold text-primary tracking-tight",children:a.title}),e.jsxs("p",{className:"mt-2 font-mono text-xs text-muted-foreground",children:[a.dated," · ",c.legalName]}),e.jsx(C,{className:"mt-10 article-body prose-legal",children:a.body}),e.jsx("p",{className:"mt-12 text-sm",children:e.jsx(y,{to:"/legal",className:"font-semibold text-primary hover:text-accent",children:l("common.all_legal","All legal documents")})})]})}export{I 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.