1import{j as e}from"./vendor-three-Bmn2g83e.js";import{j as L,r as c,L as h,H as F}from"./vendor-react-kRHgybFd.js";import{i as g}from"./main-D9e5nRIT.js";import{ag as w,b0 as P,aX as J,g as $,aR as v}from"./vendor-misc-DSUDoLcJ.js";const B=t=>t.replace(/[^a-zA-Z0-9\s]/g,"").split(/\s+/).map(a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join(""),z=(t,a,l,s)=>{const n=B(t.name),i=a?B(a.name):null;return{reddit:[{label:"Rally post",subject:`[${t.name}] Our school isn't on the Brain Battle leaderboard yet â let's fix that`,body:`Hey r/${n} students! 2 3I just checked the national Brain Battle leaderboard and ${t.name} isn't even on it yet ð¤ 4 5Brain Battles is a free platform where students compete head-to-head in academic quiz battles. Every win earns points for your school â rankings are public and updated in real time. 6 7I registered ${t.name} â ${l} 8 9Join free in 30 seconds (no credit card): ${s} 10 11Who's in? Let's get ${t.name} into the top 10.`},...a?[{label:"Rival challenge",subject:`${t.name} just registered on Brain Battles â ${a.name} is on notice`,body:`Calling all ${t.name} students â 12 13${a.name} is currently beating us on the national Brain Battle leaderboard and I refuse to accept that. 14 15Brain Battles = free academic 1v1 quiz battles. Every win earns points for ${t.name}. The more of us who join, the faster we climb. 16 17Join now: ${s} 18Our school page: ${l} 19 20${a.name} students, your move. ð 21 22#BrainBattle #${n}vs${i}`}]:[]],twitter:[{label:"School rally",body:`${t.name} students â we're not on the Brain Battle leaderboard yet and that's a problem ð¤ 23 24Free academic 1v1 battles. Every win = points for ${t.name}. Join in 30s: 25${s} 26 27#BrainBattle #${n}`},...a?[{label:"Rival callout",body:`Yo ${a.name} students â ${t.name} just registered on Brain Battles. Lobby is open. Who's repping ${a.name}? ð 28 29${s} 30 31#${n}vs${i} #BrainBattle`}]:[],{label:"Rank flex",body:`${t.name} is officially on the national Brain Battle leaderboard ð 32 33Free academic 1v1s â every win earns points for our school 34 35Join: ${s} 36 37#${n} #BrainBattle`}],tiktok:[{label:"Challenge hook",body:`POV: ${t.name} students are taking over the Brain Battle leaderboard ð§ âï¸ 38 39Free academic quiz battles â join your school's team in 30 seconds 40 41ð Link: ${s} 42 43#BrainBattle #${n} #StudyTok #CollegeTok #AcademicChallenge`},...a?[{label:"School rivalry",body:`${t.name} vs ${a.name} â who has the bigger brain? ð§ 44 45Free academic 1v1 battles on Brain Battles. Join your school. 46 47ð ${s} 48 49#${n} #${i} #BrainBattle #CollegeRivalry`}]:[],{label:"Study motivation",body:`Not all students study for grades â some of us study to WIN ð 50 51Brain Battles: free academic 1v1s that rank your school nationally 52 53Rep ${t.name}: ${s} 54 55#${n} #BrainBattle #StudyTok`}],instagram:[{label:"Feed caption",body:`${t.name} students â it's time to put our school on the map ðºï¸ð 56 57Brain Battles is a free platform where students compete in academic 1v1s and earn points for their school on the national leaderboard. Every subject. Every level. 58 59Join free (30 seconds, no credit card): 60${s} 61 62See our school's ranking: 63${l} 64 65. 66. 67. 68#BrainBattle #${n} #StudyGram #CollegeLife #UniversityLife #StudentLife #AcademicChallenge #StudyMotivation #CollegeStudent`},{label:"Story CTA",body:`ð§ ${t.name} is now competing on Brain Battles! 69 70â Free â no credit card 71â 1v1 academic quiz battles 72â Every win = points for ${t.name} 73 74ð Join: ${s}`}],facebook:[{label:"Campus group post",body:`Hey ${t.name} students! 75 76Just discovered Brain Battles â a completely free platform where students compete in academic quiz battles and earn points for their school on the national leaderboard. 77 78${t.name} is now registered. Every battle you win earns us points. The more of us who join, the higher we rank. 79 80ð Register free (30 seconds): ${s} 81ð See ${t.name}'s ranking: ${l} 82 83Who's in? Drop a ð below if you're joining!`},...a?[{label:"Rivalry post",body:`${t.name} students â ${a.name} is ahead of us on the Brain Battles leaderboard and I am NOT okay with that ð¤ 84 85Brain Battles = free academic quiz battles. Register and fight for ${t.name}: 86${s} 87 88Tag a ${t.name} friend below ð`}]:[]]}},A=[{key:"reddit",label:"Reddit",emoji:"ð´",color:"#FF4500"},{key:"twitter",label:"X / Twitter",emoji:"ð",color:"#e2e8f0"},{key:"tiktok",label:"TikTok",emoji:"ðµ",color:"#69C9D0"},{key:"instagram",label:"Instagram",emoji:"ð¸",color:"#E1306C"},{key:"facebook",label:"FB Campus",emoji:"ð¬",color:"#1877F2"}],q=({template:t,platformKey:a,idx:l})=>{const[s,n]=c.useState(""),i=(m,x)=>{navigator.clipboard.writeText(m).then(()=>{n(x),setTimeout(()=>n(""),2e3)})},d=!!t.subject;return e.jsxs("div",{className:"bg-slate-700/40 border border-white/25 rounded-2xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-white/25",children:[e.jsx("span",{className:"text-white/60 text-sm font-semibold",children:t.label}),d&&e.jsxs("button",{onClick:()=>i(t.subject,`subj-${l}`),className:"flex items-center gap-1.5 text-xs text-white/60 hover:text-white transition-colors",children:[s===`subj-${l}`?e.jsx($,{className:"w-3 h-3 text-green-400"}):e.jsx(v,{className:"w-3 h-3"}),"Copy subject"]})]}),d&&e.jsxs("div",{className:"px-4 pt-3 pb-1",children:[e.jsx("p",{className:"text-white/60 text-xs mb-1",children:"Subject line:"}),e.jsx("p",{className:"text-white/80 text-sm font-semibold",children:t.subject})]}),e.jsxs("div",{className:"px-4 pt-3 pb-4",children:[d&&e.jsx("p",{className:"text-white/60 text-xs mb-1 mt-2",children:"Body:"}),e.jsx("pre",{className:"text-white/70 text-sm whitespace-pre-wrap font-sans leading-relaxed",children:t.body}),e.jsxs("button",{onClick:()=>i(d?`${t.subject} 89 90${t.body}`:t.body,`body-${l}`),className:"mt-4 flex items-center gap-2 px-4 py-2 bg-purple-600 hover:bg-purple-500 text-white text-sm font-semibold rounded-xl transition-all",children:[s===`body-${l}`?e.jsx($,{className:"w-4 h-4"}):e.jsx(v,{className:"w-4 h-4"}),s===`body-${l}`?"Copied!":"Copy post"]})]})]})},D=()=>{const{slug:t}=L(),[a,l]=c.useState(null),[s,n]=c.useState([]),[i,d]=c.useState(null),[m,x]=c.useState("reddit"),[N,p]=c.useState(!0),[u,k]=c.useState("");
90if(c.useEffect(()=>{(async()=>{p(!0);try{const[r,T]=await Promise.all([g.get(`/api/schools/${t}`),g.get("/api/schools/leaderboard?limit=20")]),j=r.data.school;l(j);const b=(T.data.leaderboard||[]).filter(E=>E.id!==j.id);n(b),b.length>0&&d(b[0])}catch(r){k(r.response?.status===404?"School not found.":"Failed to load school.")}finally{p(!1)}})()},[t]),N)return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-purple-950 to-slate-900 flex items-center justify-center",children:e.jsx("div",{className:"w-10 h-10 border-2 border-purple-500 border-t-transparent rounded-full animate-spin"})});if(u||!a)return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-purple-950 to-slate-900 flex items-center justify-center p-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-red-400 mb-4",children:u||"School not found."}),e.jsx(h,{to:"/schools",className:"text-purple-400 hover:text-purple-300",children:"â Back to rankings"})]})});const f=`https://scholar.0xpi.com/schools/${a.slug}`,y=`https://scholar.0xpi.com/register?school=${a.slug}`,S=z(a,i,f,y)[m]||[],C=`${a.name} Social Share Kit â Brain Battles`,R=`Copy-paste social media templates to recruit ${a.name} students to Brain Battles and challenge rival schools.`;return e.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-purple-950 to-slate-900",children:[e.jsxs(F,{children:[e.jsx("title",{children:C}),e.jsx("meta",{name:"description",content:R}),e.jsx("link",{rel:"canonical",href:`https://scholar.0xpi.com/schools/${a.slug}/share-kit`})]}),e.jsx("div",{className:"h-1 w-full",style:{background:`linear-gradient(to right, ${a.colorPrimary||"#7c3aed"}, ${a.colorSecondary||a.colorPrimary||"#7c3aed"}88)`}}),e.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-10 pb-24",children:[e.jsxs(h,{to:`/schools/${a.slug}`,className:"inline-flex items-center gap-1 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[e.jsx(w,{className:"w-4 h-4"})," Back to ",a.name]}),e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center text-xl flex-shrink-0",style:{backgroundColor:a.colorPrimary||"#7c3aed"},children:"ð"}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-black text-white",children:[a.name," Share Kit"]}),e.jsx("p",{className:"text-white/60 text-sm",children:"Copy-paste posts to recruit students & challenge rivals"})]})]})}),s.length>0&&e.jsxs("div",{className:"mb-6 bg-slate-700/40 border border-white/25 rounded-2xl p-4",children:[e.jsx("label",{className:"block text-white/50 text-xs mb-2",children:"Rival school for challenge posts (optional)"}),e.jsxs("select",{value:i?.id||"",onChange:o=>d(s.find(r=>r.id===o.target.value)||null),className:"w-full bg-black/40 border border-white/25 text-white rounded-xl px-3 py-2 text-sm focus:outline-none focus:border-purple-500",children:[e.jsx("option",{value:"",children:"No rival (general posts only)"}),s.map(o=>e.jsxs("option",{value:o.id,children:[o.name,o.location?` â ${o.location}`:""]},o.id))]})]}),e.jsxs("div",{className:"mb-6 bg-slate-700/40 border border-white/25 rounded-2xl p-4",children:[e.jsx("p",{className:"text-white/50 text-xs mb-3",children:"Links included in every post:"}),e.jsx("div",{className:"space-y-2",children:[{label:"Recruit link",url:y},{label:"School profile",url:f}].map(({label:o,url:r})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-white/60 text-xs w-24 flex-shrink-0",children:[o,":"]}),e.jsx("span",{className:"text-white/60 text-xs font-mono truncate flex-1",children:r}),e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0 text-white/50 hover:text-white/60 transition-colors",children:e.jsx(P,{className:"w-3 h-3"})})]},o))})]}),e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1 mb-6 scrollbar-hide",children:A.map(o=>e.jsxs("button",{onClick:()=>x(o.key),className:`flex-shrink-0 flex items-center gap-2 px-4 py-2 rounded-xl text-sm font-semibold transition-all border ${m===o.key?"bg-slate-800/60 border-white/30 text-white":"bg-slate-700/40 border-white/25 text-white/50 hover:text-white hover:bg-white/10"}`,children:[e.jsx("span",{children:o.emoji}),e.jsx("span",{children:o.label})]},o.key))}),e.jsx("div",{className:"space-y-4",children:S.map((o,r)=>
90e.jsx(q,{template:o,platformKey:m,idx:r},r))}),e.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row gap-3",children:[e.jsxs(h,{to:`/schools/${a.slug}`,className:"flex items-center justify-center gap-2 px-5 py-3 border border-white/25 text-white/60 hover:text-white hover:border-white/30 rounded-xl transition-all text-sm",children:[e.jsx(w,{className:"w-4 h-4"})," School profile"]}),e.jsx(h,{to:"/schools",className:"flex items-center justify-center gap-2 px-5 py-3 border border-white/25 text-white/60 hover:text-white hover:border-white/30 rounded-xl transition-all text-sm",children:"Full rankings"}),e.jsxs(h,{to:"/brain-battles",className:"flex items-center justify-center gap-2 px-5 py-3 bg-gradient-to-r from-purple-600 to-blue-600 text-white font-bold rounded-xl hover:scale-105 transition-all text-sm",children:[e.jsx(J,{className:"w-4 h-4"})," Start battling"]})]})]})]})};export{D 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.