PageSourceSearch

https://rtdacademy.com/static/js/async/39371.519e60c92b.js

js rtdacademy.com collected 2026-10-05 09:42:21 UTC 7,404 bytes, 1 lines download raw bytes

1"use strict";(self.rspackChunkreact=self.rspackChunkreact||[]).push([[39371],{14694(e,s,l){l.r(s);var a=l(74848),t=l(96540),r=l(47767),n=l(89520),i=l(95624),c=l(31510),o=l(9801),d=l(95575),x=l(24947),m=l(59612),h=l(50802),u=l(80827),p=l(8723),g=l(37946),f=l(90232),j=l(71201),N=l(50205),v=l(32307),b=l(43197),y=l(18931);l(13840),s.default=()=>{var e,s,l,w,A,k,S,C,P,E,T,B,H,I;let{familyId:L,entryId:z}=(0,r.g)(),D=(0,r.Zp)(),[F,_]=(0,t.useState)(null),[q,R]=(0,t.useState)(null),[Y,G]=(0,t.useState)(!0),[K,M]=(0,t.useState)(null),[O,U]=(0,t.useState)(0),[V,Z]=(0,t.useState)(!1);console.log("PublicPortfolioEntry loaded with:",{familyId:L,entryId:z}),(0,t.useEffect)(()=>{(async()=>{if(!L||!z){M("Invalid portfolio link"),G(!1);return}try{let e=(0,n.getFunctions)(),s=(0,n.httpsCallable)(e,"getPublicPortfolioEntry"),l=await s({familyId:L,entryId:z});if(!l.data.success){M(l.data.error||"Failed to load portfolio entry"),G(!1);return}_(l.data.entry),l.data.studentInfo&&R(l.data.studentInfo),G(!1)}catch(e){console.error("Error loading portfolio entry:",e),M(e.message||"Failed to load portfolio entry"),G(!1)}})()},[L,z]);let J=()=>{var e,s,l;return(null==F?void 0:F.tags)?((null==(e=F.tags.activities)?void 0:e.length)||0)+((null==(s=F.tags.assessments)?void 0:s.length)||0)+((null==(l=F.tags.resources)?void 0:l.length)||0):0};return Y?(0,a.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-purple-50 to-blue-50 flex items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(p.A,{className:"w-12 h-12 text-purple-600 animate-spin mx-auto mb-4"}),(0,a.jsx)("p",{className:"text-gray-600",children:"Loading portfolio entry..."})]})}):K?(0,a.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-purple-50 to-blue-50 flex items-center justify-center",children:(0,a.jsxs)(i.Card,{className:"max-w-md w-full p-8 text-center",children:[(0,a.jsx)(g.A,{className:"w-16 h-16 text-red-500 mx-auto mb-4"}),(0,a.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Oops!"}),(0,a.jsx)("p",{className:"text-gray-600 mb-6",children:K}),(0,a.jsxs)(c.Button,{onClick:()=>D("/"),variant:"outline",children:[(0,a.jsx)(f.A,{className:"w-4 h-4 mr-2"}),"Go to Home"]})]})}):(0,a.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-purple-50 to-blue-50",children:[(0,a.jsx)("div",{className:"bg-white border-b shadow-sm sticky top-0 z-10",children:(0,a.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"p-2 bg-purple-100 rounded-lg",children:(0,a.jsx)(j.A,{className:"w-6 h-6 text-purple-600"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-bold text-gray-900",children:"Portfolio Entry"}),q&&(0,a.jsxs)("p",{className:"text-sm text-gray-600",children:[q.firstName,"'s Portfolio ",q.schoolYear&&"• ".concat(q.schoolYear)]})]})]}),(0,a.jsxs)(c.Button,{variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(window.location.href),Z(!0),setTimeout(()=>Z(!1),2e3)},className:"gap-2",children:[(0,a.jsx)(N.A,{className:"w-4 h-4"}),V?"Copied!":"Share"]})]})})}),(0,a.jsx)("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:(0,a.jsxs)(i.Card,{className:"overflow-hidden",children:[(0,a.jsx)("div",{className:"bg-gradient-to-r from-purple-500 to-blue-600 p-6 text-white",children:(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)("div",{className:"p-3 bg-white/20 rounded-lg backdrop-blur",children:(()=>{switch(null==F?void 0:F.type){case"image":return(0,a.jsx)(m.A,{className:"w-5 h-5"});case"video":return(0,a.jsx)(h.A,{className:"w-5 h-5"});default:return(0,a.jsx)(u.A,{className:"w-5 h-5"})}})()}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h2",{className:"text-2xl font-bold mb-2",children:F.title}),(0,a.jsxs)("div",{className:"flex items-center gap-4 text-white/90 text-sm",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(v.A,{className:"w-4 h-4"}),(H=F.date)?("string"==typeof H?new Date(H):H).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}):""]}),J()>0&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(b.A,{className:"w-4 h-4"}),J()," tags"]})]})]})]})}),(0,a.jsxs)("div",{className:"p-6 space-y-6",children:["image"===F.type&&(null==(e=F.files)?void 0:e.length)>0&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("img",{src:null==(s=F.files[O])?void 0:s.url,alt:null==(l=F.files[O])?void 0:l.name,className:"w-full rounded-lg shadow-lg"}),F.files.length>1&&(0,a.jsx)("div",{className:"flex justify-center gap-2",children:F.files.map((e,s)=>(0,a.jsx)("button",{onClick:()=>U(s),className:"w-2 h-2 rounded-full transition-colors ".concat(s===O?"bg-purple-600":"bg-gray-300"),"aria-label":"View image ".concat(s+1)},s))})]}),"video"===F.type&&(null==(w=F.files)?void 0:w.length)>0&&(0,a.jsx)("div",{className:"rounded-lg overflow-hidden bg-black",children:(0,a.jsx)("video",{src:null==(A=F.files[0])?void 0:A.url,className:"w-full",controls:!0})}),F.content&&(0,a.jsx)("div",{className:"bg-gray-50 rounded-lg p-6",children:(I=F.content)?(0,a.jsx)("div",{className:"ql-snow",children:(0,a.jsx)("div",{className:"ql-editor",dangerouslySetInnerHTML:{__html:(0,d.K)(I)},style:{padding:"12px 15px",minHeight:"auto",fontSize:"16px",lineHeight:"1.6"}})}):null}),(null==(k=F.files)?void 0:k.length)>0&&"image"!==F.type&&"video"!==F.type&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h3",{className:"font-semibold text-gray-900",children:"Attachments"}),(0,a.jsx)("div",{className:"space-y-2",children:F.files.map((e,s)=>(0,a.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,a.jsx)(u.A,{className:"w-5 h-5 text-gray-600"}),(0,a.jsx)("span",{className:"flex-1 text-sm font-medium",children:e.name}),(0,a.jsx)(y.A,{className:"w-4 h-4 text-gray-400"})]},s))})]}),F.reflections&&(0,a.jsxs)("div",{className:"bg-purple-50 rounded-lg p-6",children:[(0,a.jsx)("h3",{className:"font-semibold text-purple-900 mb-2",children:"Reflections"}),(0,a.jsx)("p",{className:"text-gray-700 whitespace-pre-wrap",children:F.reflections})]}),J()>0&&(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h3",{className:"font-semibold text-gray-900",children:"Learning Tags"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[null==(C=F.tags)||null==(S=C.activities)?void 0:S.map((e,s)=>(0,a.jsx)(x.Badge,{className:"bg-blue-100 text-blue-700 border-blue-200",children:e},"a-".concat(s))),null==(E=F.tags)||null==(P=E.assessments)?void 0:P.map((e,s)=>(0,a.jsx)(x.Badge,{className:"bg-green-100 text-green-700 border-green-200",children:e},"as-".concat(s))),null==(B=F.tags)||null==(T=B.resources)?void 0:T.map((e,s)=>(0,a.jsx)(x.Badge,{className:"bg-purple-100 text-purple-700 border-purple-200",children:e},"r-".concat(s)))]})]})]}),(0,a.jsx)("div",{className:"bg-gray-50 px-6 py-4 border-t",children:(0,a.jsx)("p",{className:"text-xs text-gray-500 text-center",children:"This portfolio entry is part of a student's learning journey at RTD Academy"})})]})}),(0,a.jsx)(o.A,{fileName:"PublicPortfolioEntry.js"})]})}}}]);

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.