PageSourceSearch

https://www.gethopscotch.com/_next/static/chunks/app/(community)/(home)/page-4959df87c2da315b.js

js gethopscotch.com collected 2026-10-02 02:53:04 UTC 12,677 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9329],{35264:function(e,t,a){Promise.resolve().then(a.bind(a,2027))},92582:function(e,t,a){"use strict";a.d(t,{J:function(){return s}});var n=a(2265);function s(e){let{initialItems:t,pageSize:a=36,scopeKey:s,fetchPage:r}=e,[l,o]=(0,n.useState)(t||[]),[c,i]=(0,n.useState)([]),[u,d]=(0,n.useState)(2),[h,p]=(0,n.useState)(!1),[m,x]=(0,n.useState)(!1),f=(0,n.useCallback)(async()=>{o([...l,...c]),j()},[c,l]),j=(0,n.useCallback)(async()=>{let e=await r(u);i(e),p(e.length>0),d(u+1)},[r,u,a]);return(0,n.useEffect)(()=>{if("categories/welcome/featured"===s){x(!0);return}x(!1)},[s]),(0,n.useEffect)(()=>(o(t||[]),x(!0),d(2),()=>{x(!1),d(2),i([]),p(!1)}),[t]),(0,n.useEffect)(()=>(p(!1),j(),()=>{d(2),i([]),p(!1)}),[l]),{projectList:l,showLoadMoreButton:h,getNextPageOfProjects:f,loaded:m}}},72046:function(e,t,a){"use strict";var n=a(57437),s=a(53401);t.Z=e=>{var t;let{channels:a}=e,r=(0,s.C)(e=>e.channel.path),l=null!==(t=a.find(e=>e.path===r))&&void 0!==t?t:a[0];return(0,n.jsx)("h2",{className:"font-semibold text-xl px-10 sm:text-2xl",children:l.title.toUpperCase()})}},61655:function(e,t,a){"use strict";a.d(t,{E:function(){return i}});var n=a(57437),s=a(53401),r=a(92066),l=a(32990),o=a(79125),c=a(2265);let i=e=>{let{channels:t}=e,a=(0,s.C)(e=>{var t;return null===(t=e.auth.sessionUser)||void 0===t?void 0:t.user}),i=(0,s.C)(e=>e.channel.path),u=(0,s.C)(e=>e.channel.lastChannel),d=(0,s.C)(e=>e.channel.nextPage),h=(0,s.T)(),p=t[0];(0,c.useEffect)(()=>{h((0,r.r9)(""))},[h]),(0,c.useEffect)(()=>{i?i!==u&&h((0,l.gE)(u)):(h((0,l.gE)(p.path)),h((0,l.mS)(p.path)))},[h,u,d,i]);let m=e=>{var a;return null===(a=t.find(t=>t.path===e))||void 0===a?void 0:a.title};(0,c.useEffect)(()=>{if(i&&t.length>0){let e=m(i);h((0,r.UR)(e))}},[i,t]);let x=()=>{let e="We're not trying to be exclusive... but you need an account to see your following list!";h((0,l.gE)(i)),h((0,o.cf)({type:"CreateAccount",title:e})),h((0,r.vv)([r.bl.TapOnFollowingChannel,{window:e}]))},f=e=>{if("Following"===e.title&&!a){x();return}h((0,l.gE)(e.path)),h((0,l.mS)(e.path)),(0,r.rG)("tapped on a channel",{channel:e.title,platform:"hopscotch.lol"})};return(0,n.jsx)("nav",{children:(0,n.jsx)("ul",{className:"flex overflow-x-auto snap-x py-4 px-8 hide-scrollbar",children:t.map(e=>(0,n.jsx)("li",{className:"flex whitespace-nowrap px-2 py-1 ".concat(i===e.path?"bg-stone-300/80":"bg-stone-200/40","  mx-1 my-2 font-medium text-stone-500 hover:bg-stone-200 text-sm rounded-lg"),children:(0,n.jsx)("button",{onClick:()=>f(e),children:e.title.toUpperCase()})},e.id))})})}},7878:function(e,t,a){"use strict";var n=a(57437),s=a(53401),r=a(25523),l=a(40488),o=a(79125);t.Z=()=>{let{modal:e}=(0,s.C)(e=>e.modal),t=(0,s.T)();return(0,n.jsx)(r.default,{onClick:()=>{t((0,o.cf)({type:"UserFeedback",title:"Send a feedback message to the Hopscotch Team"}))},type:"button",styleType:"secondary",scale:"compact",ariaLabel:"UserFeedback"===e.type?"Close feedback":"Send feedback",customClassName:"fixed bottom-6 right-6 z-10 h-12 w-14 px-4 pt-1 text-stone-700 shadow-lg transition-transform hover:scale-110",children:"UserFeedback"===e.type?(0,n.jsx)(l.XdeleteIcon,{}):(0,n.jsx)(l.ChatIcon,{})})}},2027:function(e,t,a){"use strict";a.d(t,{default:function(){return x}});var n=a(57437),s=a(53401),r=a(84430),l=()=>{let e=(0,s.C)(e=>e.channel.loading),t=(0,s.C)(e=>1===e.channel.nextPage);return e&&t?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"h-screen absolute bg-stone-50 inset-0 z-50 flex items-center justify-center",children:(0,n.jsx)(r.Z,{fullscreen:!0,className:"h-full"})})}):null},o=a(61655),c=a(7878),i=a(70211),u=a(75757),d=a(72046),h=a(2265),p=a(93e3),m=a(92582),x=e=>{let{channels:t,initialProjects:a}=e,x=(0,s.C)(e=>e.channel.path),[f,j]=(0,h.useState)(a),v="categories/welcome/featured",y=(0,h.useMemo)(()=>x===v,[x,v]);(0,h.useEffect)(()=>{x&&(async()=>{if(y){j(a);return}j(await b(1))})()},[x,y,a]);let b=async e=>{let t=await (0,p.mW)(x,e);return t?t.projects:[]},{projectList:g,showLoadMoreButton:w,getNextPageOfProjects:C,loaded:_}=(0,m.J)({initialItems:f,scopeKey:x||v,fetchPage:b});return _?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("main",{className:"relative bg-stone-50",children:[(0,n.jsx)("h1",{className:"sr-only",children:"Make your own video games, animations, art, and more."}),(0,n.jsx)(l,{}),(0,n.jsx)(o.E,{channels:t}),(0,n.jsx)(d.Z,{channels:t}),(0,n.jsx)(u.Z,{projectList:g,userId:0,showLoadMoreButton:w,onLoadMore:C}),(0,n.jsx)(c.Z,{})]}),(0,n.jsx)(i.default,{})]}):(0,n.jsx)(r.Z,{})}},86258:function(e,t,a){"use strict";var n=a(57437),s=a(99478),r=a(27648),l=a(2265),o=a(17597),c=a(67195),i=a(44687),u=a(25523),d=a(92066),h=a(53401),p=a(40488),m=a(37262),x=a(72047),f=a(50192),j=a(22035);let v=e=>{let{sessionUser:t,uuid:a,userId:s,publishedAt:r,title:o}
1=e,c=(0,h.C)(e=>{var t;return(null===(t=e.editorProject)||void 0===t?void 0:t.project)||{}}),i=(0,h.T)(),[d,f]=(0,l.useState)(o),[v,y]=(0,l.useState)(null),b=(0,l.useRef)(null),g=(null==t?void 0:t.id)===s,w=!!r,C=async()=>{t&&d.trim()!==o&&await i((0,x.Zm)({project:c,projectTitle:d,sessionUser:t,action:w&&g?{is_update:!0,publish:!0}:void 0})),y(null)};return(0,l.useEffect)(()=>{var e,t;v===a?((0,m.Iv)(a).then(e=>{i((0,x.a0)(e))}),null===(e=b.current)||void 0===e||e.focus()):null===(t=b.current)||void 0===t||t.blur()},[v]),(0,l.useEffect)(()=>{f(o)},[o]),(0,n.jsxs)("div",{className:"flex max-w-full",children:[(0,n.jsx)("input",{ref:b,type:"text",className:"project-title-input text-2xl font-bold min-w-0 ".concat((0,j.Z9)(o)," mb-2 cursor-text focus:stone/40 focus:border-b-2 outline-none"),value:d,onClick:()=>y(a),onChange:e=>{f(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&v&&C()}}),v===a&&(0,n.jsx)(u.default,{type:"button",styleType:"ghost",ghostTone:"subtle",size:"sm",onClick:C,ariaLabel:"Save title",children:(0,n.jsx)(p.CheckMarkIcon,{className:"w-4 text-stone-400"})})]})};t.Z=e=>{let{title:t,creatorUsername:a,playCount:l,publishedAt:m,createdAt:x,thumbnail:y,uuid:b,userId:g,avatarUrl:w,likeCount:C}=e,_=(0,h.C)(e=>{var t;return null===(t=e.auth.sessionUser)||void 0===t?void 0:t.user}),N=(0,h.T)(),k=()=>{(0,d.rG)("Played a community project",{parameter_project_name:t,platform:"hopscotch.lol",linked_projects:!1}),N((0,d.UR)("")),N((0,d.r9)(""))},E=(0,s.u)(l),S=(0,s.u)(C),P=(null==_?void 0:_.id)===g,Z="https://www.gethopscotch.com/".concat(g,"/").concat(b);return(0,n.jsxs)("li",{className:"group my-8 mx-4 bg-white rounded-2xl w-80 transition duration-200 ease-in-out hover:scale-[1.025] hover:drop-shadow-md ",children:[(0,n.jsx)(r.default,{href:"/".concat(g,"/").concat(b),children:(0,n.jsx)(f.Z,{url:y,clickHandler:k},b)}),(0,n.jsxs)("div",{id:"projectCardLabel",className:"pt-2 pb-6 pl-4 pr-4",children:[(0,n.jsx)("div",{className:"flex items-center justify-between",children:(0,n.jsxs)("div",{className:"projectInformation max-w-full",children:[P?(0,n.jsx)(v,{sessionUser:_,uuid:b,userId:g,avatar:w,publishedAt:m,title:t}):(0,n.jsx)(r.default,{href:"/".concat(g,"/").concat(b),children:(0,n.jsx)("p",{id:"projectTitle",className:"text-2xl font-bold  mb-2 cursor-pointer ".concat((0,j.Z9)(t)),onClick:()=>k(),children:t})}),(0,n.jsx)(r.default,{href:{pathname:"/".concat(g)},as:"/".concat(g),children:(0,n.jsx)(o.default,{username:P?_.nickname:a,usernameStyle:"sm",avatarUrl:P?_.remote_avatar_url||_.avatar_type:w,avatarStyle:"sm",onClick:()=>(0,d.rG)("viewed_other_user_profile",{username_of_creator:a,user_id_of_creator:g,source:"community project browsing",platform:"hopscotch.lol"})})})]})}),(0,n.jsxs)("div",{id:"projectMetaData",className:"text-sm text-stone-400 flex gap-x-4 py-3 h-fit ",children:[(0,n.jsxs)("p",{children:[E," plays"]}),(0,n.jsxs)("p",{children:[S," likes"]}),(0,n.jsx)("p",{children:(0,s.E)(x||m)})]}),(0,n.jsxs)("div",{id:"project-card-ctas",className:"text-stone-500 px-2 text-sm py-2 flex justify-end opacity-0 group-hover:opacity-100 ease-in-out transition duration-150 space-x-2 ",children:[(0,n.jsx)(u.default,{id:"play-button",href:"/".concat(g,"/").concat(b),styleType:"secondary",scale:"compact",leftIcon:(0,n.jsx)(p.PlayIcon,{className:"h-4 w-4 text-stone-400"}),children:(0,n.jsx)("span",{className:"px-2",children:"Play"})}),(0,n.jsxs)(i.Z,{url:Z,amplitudeEventProperties:{project_name:t,url:Z,username_of_creator:a,platform:"hopscotch.lol"},children:[(0,n.jsx)(c.Z,{className:"h-4 w-4 text-stone-400"}),(0,n.jsx)("span",{className:"px-2",children:"Share"})]})]})]})]})}},75757:function(e,t,a){"use strict";var n=a(57437),s=a(2265),r=a(86258),l=a(25523),o=a(53401);t.Z=e=>{let{userId:t,projectList:a,onLoadMore:c,showLoadMoreButton:i,emptyMessage:u}=e,d=(0,o.C)(e=>e.channel.path),h=(0,o.C)(e=>e.channel.nextPage),p=(0,o.C)(e=>
1e.path.showMyClassProjects),[m,x]=(0,s.useState)(null);return((0,s.useEffect)(()=>{a&&(null==a?void 0:a.length)!==0?x(null):x(null!=u?u:!t&&d?"No projects here. Try another channel :D":h>1?"No more projects here.":p?"Hmm... it seems there's no projects in your class yet.":"Hmm... it seems this user hasn't published any projects yet.")},[a,u,t,d,h,p]),a)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("ul",{className:"place-content-center flex flex-wrap",children:null==a?void 0:a.map((e,t)=>{var a,s;return(0,n.jsx)(r.Z,{title:e.title,creatorUsername:e.user.nickname,playCount:e.play_count,publishedAt:null!==(a=e.correct_published_at)&&void 0!==a?a:"",thumbnail:e.screenshot_url,uuid:e.uuid,userId:e.user_id,avatarUrl:e.user.avatar_type,likeCount:e.number_of_stars,createdAt:null!==(s=e.edited_at)&&void 0!==s?s:""},e.uuid)})}),(0,n.jsx)("div",{className:"flex justify-center py-8 h-full min-h-[58px] ".concat(m&&"py-[18rem] px-[5rem]"),children:m?(0,n.jsx)("p",{className:"font-medium text-center md:text-xl",children:m}):i?(0,n.jsx)(l.default,{styleType:"primary",size:"md",onClick:c,children:"Load more"}):null})]}):null}},93583:function(e,t,a){"use strict";var n=a(57437),s=a(10129),r=a(40488);let l={neutral:"border border-stone-300 bg-white text-stone-950 shadow-xl",success:"border border-emerald-300 bg-emerald-100 text-emerald-800 shadow-xl"},o=(0,n.jsx)(r.CheckMarkIcon,{className:"h-5 w-5 shrink-0 text-emerald-700","aria-hidden":!0});t.Z=e=>{let{className:t="",title:a,open:r,variant:c="neutral",icon:i,onOpenChange:u}=e;return(0,n.jsxs)(s.zt,{duration:4e3,swipeDirection:"right",children:[(0,n.jsx)(s.fC,{type:"foreground",open:r,onOpenChange:u,className:"rounded-lg p-4 ".concat(l[c]," ").concat("data-[state=open]:animate-toast-enter data-[state=closed]:animate-toast-exit data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-[transform_250ms_cubic-bezier(0.16,1,0.3,1)] data-[swipe=end]:animate-toast-exit"," ").concat(t),children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[void 0!==i?i:"success"===c?o:null,(0,n.jsx)(s.Dx,{className:"text-sm font-semibold",children:a})]})}),(0,n.jsx)(s.l_,{className:"fixed bottom-0 right-0 z-10 p-8"})]})}},70211:function(e,t,a){"use strict";var n=a(57437),s=a(53401),r=a(93583),l=a(79331);t.default=e=>{let{}=e,{toast:t}=(0,s.C)(e=>e.toast),a=(0,s.T)();return(0,n.jsx)(r.Z,{open:t.show,title:t.title,variant:t.variant,onOpenChange:()=>a((0,l.fz)({show:!1,title:"",variant:"neutral"}))},t.key)}},50192:function(e,t,a){"use strict";var n=a(57437),s=a(33145),r=a(2265);t.Z=e=>{let{url:t,clickHandler:a}=e,[l,o]=(0,r.useState)(t),[c,i]=(0,r.useState)(!1);return(0,n.jsx)("div",{className:"w-80 h-60 relative",children:(0,n.jsx)(s.default,{unoptimized:!0,src:l,alt:"thumbnail",priority:!1,fill:!0,sizes:"(min-width: 320px) 320px, 240px",className:"".concat("rounded-tr-2xl rounded-tl-2xl border-b border-stone-100 object-cover transition-[opacity_2s_ease-in-out]"," ").concat(c?"":"opacity-0"),onError:()=>o("/missing_thumbnail.webp"),onLoad:()=>i(!0),onClick:a})})}},32990:function(e,t,a){"use strict";a.d(t,{gE:function(){return s},mS:function(){return r}});let n=(0,a(30727).oM)({name:"channel",initialState:{path:"",lastChannel:"",channelProjects:[],nextPage:1,loading:!1,reachedEnd:!1},reducers:{setChannelPath:(e,t)=>{e.path!==t.payload&&(e.path=t.payload,e.channelProjects=[],e.nextPage=1,e.loading=!1,e.reachedEnd=!1)},setLastChannel:(e,t)=>{e.lastChannel=t.payload},markAsLoading:e=>{e.loading=!0},addPageToDisplayedProjects:(e,t)=>{e.loading&&(e.channelProjects.push(...t.payload),e.nextPage++,e.loading=!1,e.reachedEnd=t.payload.length<36)}}}),{setChannelPath:s,setLastChannel:r,addPageToDisplayedProjects:l,markAsLoading:o}=n.actions;t.ZP=n.reducer}},function(e){e.O(0,[8218,2972,727,5878,8575,6162,2957,5845,3559,129,7200,2274,6220,3730,2971,2117,1744],function(){return e(e.s=35264)}),_N_E=e.O()}]);

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.