PageSourceSearch

https://mozzartsport.co.ke/_nuxt/mNeB2jZQ.js

js mozzartsport.co.ke collected 2026-10-01 12:30:33 UTC 5,121 bytes, 1 lines download raw bytes

1import{_ as ae}from"./eqS3LETO.js";import{u as ne,b as oe,a as R,s as re,v as le,p as me,q as ie,I as ue,j as ce,m as de,w as pe}from"./B5q9wg_P.js";import{_ as fe}from"./DnyOcqUd.js";import{_ as _e}from"./BMKWUvCk.js";import{_ as ge}from"./D8LLJgRS.js";import{_ as ve}from"./DtrADgJP.js";import{a as we}from"./BKHRx1WD.js";import{y as be,b as p,d as ye,H as he,F as y,M as a,a0 as o,W as h,Z as r,a7 as U,z as s,L as P,X as f,Y as l,f as j}from"./D8GgcCdU.js";import{u as xe}from"./B-OOX_qf.js";import{u as ke}from"./B6cBWuNM.js";import{u as $e}from"./Dd89P9Ws.js";import"./BOprMc0p.js";import"./CHVwxmW2.js";const Ve={class:"h-screen"},Ce={class:"xxl:mx-auto xxl:max-w-[1664px] xl:mx-[84px] lg:mx-12 md:mx-6 mx-4 py-8 lg:h-auto pb-20"},Se={class:"flex border-b border-b-grayDark py-12 justify-center"},Ie={class:"bg-white p-6 w-full md:w-[480px]"},Ae={class:"text-center my-3 font-semibold text-hint text-darkMain"},Be={class:"flex flex-col md:flex-row items-center justify-center mt-6"},ze={class:"text-hint font-semibold text-darkMain mb-3 md:mb-0 md:mr-3"},Ee=be({__name:"new",setup(Ne){const{t:i}=ne(),x=de(),{features:D,website:q}=oe();R({title:i("meta_tags.new_comment.title")});const H=we(),{loggedIn:c,display_name:K,id:E}=re(H),O=xe(),{parentId:_,setLastSavedPath:W,setParentId:k}=O,{push:X}=le(),{path:w,params:$}=me();R({link:[{rel:"canonical",href:q+w.split("/").slice(0,-2).join("/")}]});const g=p(!1),u=p(""),v=p(""),{addToast:d}=ie(),{getFingerprint:Y}=ke(),{form:V,isFormValid:C,isInvalidInput:S,handleFieldBlur:I,handleValueChanged:A}=$e({...c.value?{}:{username:{required:!0}},comment:{required:!0}}),B=ye(()=>g.value||!C.value);he(()=>{_&&k(null)});const G=()=>{W(w)},z=p(),N=p(!1),Z=async()=>{const t={username:v.value,content:u.value,news_title:$.name,news_id:$.id,fingerprint:await Y()};return c.value&&(t.username=K.value,t.member_id=E.value),_&&(t.parent_id=_),t},J=()=>{const{$isDarkMode:t}=pe();z.value=grecaptcha.render("comment_recaptcha",{sitekey:x.public.recaptchaV2SiteKey,theme:t.value?"dark":"light"})},Q=t=>/https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,}/i.test(t),T=async()=>{if(!C.value)return;if(u.value.trim().length<15)return d({type:"warning",message:i("errors.comment_min_length")});if(Q(u.value))return d({type:"danger",message:i("errors.comment_no_links")});if(N.value){const e=grecaptcha.getResponse(z.value),m=await Z();return m.v2Token=e,await F(m)}g.value=!0,grecaptcha.ready(()=>{grecaptcha.execute(x.public.recaptchaV3SiteKey,{action:"sendComment"}).then(async e=>{const m=await Z();m.v3Token=e,await F(m)})})},F=async t=>{g.value=!0;try{await $fetch("/api/comments",{method:"POST",body:t}),_&&k(null),d({type:"success",message:i("success.leaveComment")});const e=w.split("/");e.pop(),X(e.join("/"))}catch(e){e.response.status===400?(N.value=!0,J()):e.response.status===409?d({type:"warning",message:i("errors.user_name_exist")}):d({type:"warning",message:i("errors.leaveComment")})}finally{g.value=!1}};return(t,e)=>{const m=ae,b=ce,ee=fe,L=_e,M=ge,te=ve,se=ue;return h(),y("div",Ve,[a(se,{name:"special"},{footer:o(()=>e[7]||(e[7]=[r("footer",null,null,-1)])),default:o(()=>[r("div",Ce,[a(m,{title:t.$t("send_a_comment"),"show-divider":!1},null,8,["title"]),r("div",Se,[r("div",Ie,[s(c)?U("",!0):(h(),y(P,{key:0},[s(D).enableLogin?(h(),y(P,{key:0},[a(ee,{to:"/login",onClick:G},{default:o(()=>[a(b,{class:"w-full"},{default:o(()=>[f(l(t.$t("logIn"))+" "+l(t.$t("and_comment")),1)]),_:1})]),_:1}),r("p",Ae,l(t.$t("or_comment_as_guest")),1)],64)):U("",!0),a(L,{modelValue:s(v),"onUpdate:modelValue":e[0]||(e[0]=n=>j(v)?v.value=n:null),label:t.$t("guest"),class:"mb-3",autofocus:!s(c),error:s(V).meta.username.error,"not-valid":s(S)("username"),onBlur:e[1]||(e[1]=n=>s(I)("username")),onInput:e[2]||(e[2]=n=>s(A)("username",n.target.value))},null,8,["modelValue","label","autofocus","error","not-valid"])],64)),a(L,{modelValue:s(u),"onUpdate:modelValue":e[3]||(e[3]=n=>j(u)?u.value=n:null),textarea:"",autofocus:s(c),label:t.$t("your_comment"),error:s(V).meta.comment.error,"not-valid":s(S)("comment"),class:"mb-3",onBlur:e[4]||(e[4]=n=>s(I)("comment")),onInput:e[5]||(e[5]=n=>s(A)("comment",n.target.value))},null,8,["modelValue","autofocus","label","error","not-valid"]),e[6]||(e[6]=r("div",{id:"comment_recaptcha",class:"mb-3"},null,-1)),a(b,{disabled:s(B),type:"secondary",class:"w-full hidden lg:block",onClick:T},{default:o(()=>[f(l(t.$t("send_a_comment")),1)]),_:1},8,["disabled"])])]),r("div",Be,[r("span",ze,l(t.$t("before_commenting"))+": ",1),a(M,{to:"privacy-policy",class:"font-semibold text-hint text-lightMain mb-3 md:mb-0 md:mr-3"},{default:o(()=>[f(l(t.$t("privacy_policy")),1)]),_:1}),a(M,{to:"terms-of-use",class:"font-semibold text-hint text-lightMain"},{default:o(()=>[f(l(t.$t("terms")),1)]),_:1})])]),a(te,null,{default:o(()=>[a(b,{disabled:s(B),class:"w-full",onClick:T},{default:o(()=>[f(l(t.$t("send_a_comment")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})])}}});
1export{Ee 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.