1"use strict";(self.webpackChunkplayform_front_2_0=self.webpackChunkplayform_front_2_0||[]).push([[4273],{57784:(e,l,o)=>{o.d(l,{Z:()=>D});var n=o(72791),t=o(61889),a=o(63733),i=o(97299),s=o.n(i),r=o(42582),c=o.n(r),d=o(46213),u=o(62153),m=o(82548),g=o(89979),h=o(81048),x=o(95080),C=o(95764),v=o(87749),b=o(87569),_=o(91),Z=o(46228),p=o(7619),j=o(43539),N=o(51805);const f="CollectionCard_CollectionCard__-6Fik",k="CollectionCard_CollectionCardWithHover__+VsOc",T="CollectionCard_CollectionCardImgWrapperEmpty__bc0Q7",I="CollectionCard_CollectionCardImgEmpty__QvHij",O="CollectionCard_CollectionCardTag__o9cKv";var P=o(80184);const E=e=>{const{addDialog:l,collectionThumbnail:o,collectionId:n,collectionName:i,collectionTotal:s,currentUserId:r,isAuthorized:c,isBookmarked:u,isCollectionOwner:m,isPrivate:f,onClick:k,TagsComponent:O,to:E,toggleCollectionBookmark:y,username:w,userUrl:D,variant:S}=e;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{className:(0,a.Z)("relative h-full text-0 leading-none",!o&&T),children:[(0,P.jsx)(t.ZP,{className:"pointer-events-none absolute right-0 top-0 z-1 -m-1 flex p-2",justifyContent:"flex-end",spacing:1,container:!0,children:O}),(0,P.jsx)(x.Z,{className:(0,a.Z)("block h-full w-full bg-light bg-cover bg-center bg-no-repeat","light"===S&&"bg-primary",!o&&I),style:{backgroundImage:"url(".concat(o||N.Z,")")},onClick:k,children:E&&(0,P.jsx)(p.Z,{className:"absolute inset-0 z-1",to:E})})]}),(0,P.jsx)("div",{className:(0,a.Z)("absolute inset-x-0 bottom-0 z-1 bg-primary","light"===S&&"bg-light"),children:(0,P.jsxs)("div",{className:"relative z-2 leading-none",children:[(0,P.jsxs)("div",{className:"pr-9",children:[(0,P.jsx)(x.Z,{onClick:k,className:"w-full justify-start py-2 pl-2",children:(0,P.jsx)(d.Z,{variant:"body1",maxLine:2,children:i})}),!1===c||m?null:(0,P.jsx)("div",{className:"absolute right-0.5 top-0.5 z-1",children:(0,P.jsx)(j.Z,{color:"secondary",className:"min-h-9 min-w-9 text-base",onClick:e=>{e.stopPropagation(),r?null===y||void 0===y||y({collectionId:n}):null===l||void 0===l||l({[h.qu.LOGIN_REQUIRED]:{dialogName:h.qu.LOGIN_REQUIRED}})},size:"small",icon:!0,children:u?(0,P.jsx)(Z.Z,{fontSize:"inherit"}):(0,P.jsx)(_.Z,{fontSize:"inherit"})})})]}),(0,P.jsx)(x.Z,{onClick:k,className:"w-full justify-start px-2 pb-2 text-left",children:(0,P.jsxs)(t.ZP,{className:"text-white-med-on-dark",alignItems:"center",component:"span",container:!0,children:[(0,P.jsxs)(t.ZP,{component:"span",className:"flex items-center",xs:!0,item:!0,children:[(0,P.jsx)(t.ZP,{component:"span",className:"flex items-center",xs:"auto",item:!0,children:f?(0,P.jsx)(v.Z,{className:"mr-1 align-middle text-xs"}):(0,P.jsx)(b.Z,{className:"mr-1 align-middle text-xs"})}),(0,P.jsx)(t.ZP,{component:"span",xs:!0,item:!0,zeroMinWidth:!0,children:(0,P.jsx)(d.Z,{variant:"overline",className:"block",children:(0,P.jsx)(p.Z,{target:"_blank",color:"light",to:D,children:g.rv.getSlicedName(g.rv.splitName(w),15)})})})]}),(0,P.jsx)(t.ZP,{component:"span",xs:"auto",item:!0,children:(0,P.jsxs)("div",{className:"flex items-center text-right",children:[(0,P.jsx)(C.Z,{className:"mr-1 align-middle text-xs"}),(0,P.jsx)(d.Z,{variant:"overline",className:"block",children:s})]})})]})})]})})]})},y=(0,n.memo)(E),w=[],D=e=>{var l,o;let{collection:i,onClick:r=m.Bi,to:x,variant:C,addDialog:v,currentUserId:b,toggleCollectionBookmark:_,isAuthorized:Z}=e;const p=Boolean(null===i||void 0===i?void 0:i.bookmark),{id:j,is_private:N,username:T,count:I,thumbnail:E}=i,D=c()(b)===c()(null===i||void 0===i||null===(l=i.user)||void 0===l?void 0:l.id),S=null===i||void 0===i?void 0:i.user,R=(0,n.useCallback)((()=>{b?null===r||void 0===r||r(j):null===v||void 0===v||v({[h.qu.LOGIN_REQUIRED]:{dialogName:h.qu.LOGIN_REQUIRED}})}),[r,v,j,b]),A=null!==i&&void 0!==i&&i.is_draft&&null!==i&&void 0!==i&&i.name?"Draft: ":"",B="".concat(A).concat((null===i||void 0===i?void 0:i.name)||u.u2.DRAFT_COLLECTION_NAME),F=null!==(o=null===i||void 0===i?void 0:i.tags)&&void 0!==o?o:w,z=(0,n.useMemo)((()=>s()(F,0,3).map(((e,l)=>(0,P.jsx)(t.ZP,{item:!0,title:e,children:(0,P.jsx)(d.Z,{className:O,variant:"body2",component:"div",noWrap:!0,children:e})},l)))),[F]);return(0,P.jsx)("div",{className:(0,a.Z)("relative block h-full w-full text-left",f,(r||x)&&k),children:(0,P.jsx)(y,{addDialog:v,collectionThumbnail:null===E||void 0===E?void 0:E.file,collectionId:j,collectionName:B,collectionTotal:I,currentUserId:b,isAuthorized:Z,isBookmarked:p,isCollectionOwner:D,isPrivate:N,onClick:R,TagsComponent:z,toggleCollectionBookmark:_,username:T,userUrl:g.jE.getUserProfileUrl(S),variant:C})})}},32053:(e,l,o)=>{o.d(l,{Z:()=>m,e:()=>u});var n=o(72791),t=o(63733),a=o(25228),i=o(43896),s=o(20890),r=o(23617),c=o(80184);const d={className:r.Z.TabsOneIndicator},u=e=>{let{label:l="",...o}=e;return(0,c.jsx)(i.Z,{...o,className:r.Z.TabOne,label:"string"===typeof l?(0,c.jsx)(s.Z,{variant:"button",children:l}):l})};const m=function(e){const{centered:l,children:o,className:i,onChange:s,value:u,variant:m}=e,g=(0,n.useCallback)(((e,l)=>{null===s||void 0===s||s(l)}),[s]);return(0,c.jsx)(a.Z,{className:(0,t.Z)(r.Z.TabsOne,i),value:u,onChange:g,TabIndicatorProps:d,centered:l,variant:m,children:o})}},75116:(e,l,o)=>{o.d(l,{Z:()=>n});const n=(0,o(28644).Z)((()=>Promise.all([o.e(2737),o.e(8357)]).then(o.bind(o,24741))))},8899:(e,l,o)=>{o.r(l),o.d(l,{default:()=>I});var n=o(72791),t=o(63733),a=o(92511),i=o(78687),s=o(87781),r=o(20890),c=o(34508),d=o(47558),u=o(76739),m=o(57784),g=o(6927),h=o(43539),x=o(17062),C=o(27563),v=o(84800),b=o(75116),_=o(88623),Z=o(67663),p=(o(32053),o(82902)),j=o(81048),N=o(52846),f=o(13501),k=o(80184);
1const T="collections",I=(0,i.$j)((e=>({currentUserId:x.O.currentUserId(e),mode:g.wl.mode(e),currentPostId:x.O.currentPostId(e),currentCollectionId:x.O.currentCollectionId(e),collection:g.wl.collection(e),collectionListLoading:x.O.loading["collections.list"](e),explorePageCollectionList:x.O.explorePageCollectionList(e),collectionSearchData:g.wl.collectionSearchData(e),isAuthorized:C.LL.isAuthorized(e)})),(e=>(0,s.DE)({openPage:g.Nw.openPage,addDialog:j.E4.addDialog,listCollection:v._n.collections.list,reloadCollections:g.Nw.collection.reload,updateSearch:g.Nw.collection.updateSearch,toggleCollectionBookmark:v._n.collections.toggleCollectionBookmark},e)))((e=>{const{reloadCollections:l,openPage:o,listCollection:i,toggleCollectionBookmark:s,updateSearch:g,addDialog:x,currentPostId:C,currentCollectionId:v,collection:j,currentUserId:I,collectionListLoading:O,collectionSearchData:P,mode:E,explorePageCollectionList:y,scrollRef:w,isAuthorized:D,isGridInViewport:S,isMediumscreenAbove:R,isSmallscreenAbove:A}=e,{search:B}=P,[F,z]=(0,n.useState)(""),L=y.length,U=Boolean(L),{showSearch:G}=P,{listParams:W,listType:J,loaded:M}=j,Q=(0,_.D9)(E)||"",q=E===T,H=F===T,K=W.search&&!U&&!O,V=(0,n.useCallback)((()=>{i({param:W,listType:J})}),[W,J,i]),$=(0,n.useCallback)((e=>{o({id:e})}),[o]),X=(0,n.useCallback)((()=>{o({id:void 0})}),[o]),Y=(0,n.useCallback)((e=>{const{index:l}=e;if(!y[l])return null;const o=y[l],n=o.id;return(0,k.jsx)(m.Z,{addDialog:x,onClick:$,currentUserId:I,collection:o,toggleCollectionBookmark:s,isAuthorized:D},n)}),[y,D,I,x,$,s]),ee=(0,n.useMemo)((()=>({gridContainer:(0,t.Z)(f.Z.GridImages,H&&f.Z.GridImagesShown)})),[H]);(0,n.useEffect)((()=>{q&&!M&&l()}),[q,M,l]),(0,n.useEffect)((()=>{E&&(Q!==T?z(E):Q===T&&E!==T&&z(""))}),[E,Q]);const[le,oe]=(0,n.useState)("trending");return q||H?(0,k.jsxs)(n.Fragment,{children:[(0,k.jsxs)("div",{className:(0,a.m6)("mx-auto",!q&&"hidden",!R&&f.Z.PaddingTopResponsive,f.Z.ExplorePageContainer),children:[(0,k.jsx)(Z.Z,{className:"mb-7",title:"Collections",subtitle:"A group of images curated by the community to use for your next Playform project"}),(0,k.jsx)(N.Z,{}),(0,k.jsxs)("div",{className:"flex",children:[(0,k.jsxs)("div",{className:"flex w-1/100 min-w-0 flex-auto",children:[(0,k.jsx)(p.Z,{className:(0,t.Z)("w-full",f.Z.PageInputSearch),value:B,onChange:e=>{var l;g(null===e||void 0===e||null===(l=e.target)||void 0===l?void 0:l.value)},loading:Boolean(O&&B),placeholder:"Search for collections",size:"small"}),B&&!K?(0,k.jsx)(h.Z,{className:"ml-2",onClick:()=>g(""),color:"secondary",size:"small",children:"Clear"}):null]}),null]}),U?(0,k.jsx)(d.Z,{loadingPosition:S?"fixed":"absolute",config:c.GRID_CONFIG,classes:ee,scrollRef:w,dataLength:L,renderItem:Y,loading:Boolean(O),onEndOfGrid:V,autoHeight:!0}):null,K?(0,k.jsxs)("div",{className:f.Z.EmptyContainer,children:[(0,k.jsx)(r.Z,{variant:"subtitle1",children:'There are no result for "'.concat(W.search,'" keyword')}),(0,k.jsx)(h.Z,{onClick:()=>g(""),color:"secondary",children:"RESET SEARCH"})]}):null,!O||U||G?null:(0,k.jsx)("div",{className:(0,t.Z)("text-center",f.Z.ListLoadingContainer),children:(0,k.jsx)(u.OF,{loading:!0,disableShrink:!0})})]}),C||E!==T?null:(0,k.jsx)(b.Z,{delay:600,source:"explore_collections",onClickBack:X,collectionId:v||0})]}):null}))},52846:(e,l,o)=>{o.d(l,{Z:()=>x});var n=o(72791),t=o(63733),a=o(42419),i=o(78687),s=o(27296),r=o(43539),c=o(81048),d=o(88623),u=o(61418),m=o(92511),g=o(90560),h=o(80184);const x=function(e){const l=(0,i.I0)(),o=(0,n.useRef)(null),x=o.current,[C,v]=(0,n.use
1State)(!1),{isMediumscreenAbove:b}=(0,d.Gc)(),_=(0,n.useMemo)((()=>({name:"Page",onScroll:e=>{x&&e>=x.offsetTop+x.clientHeight?v(!0):v(!1)}})),[x]);return(0,s.BO)(_),(0,h.jsx)("div",{ref:o,children:(0,h.jsxs)(u.Z,{container:"body",children:[(0,h.jsx)("div",{className:(0,m.m6)("fixed bottom-4 right-3 z-1 flex flex-col items-end sm:bottom-9 sm:right-9",g.Z.FloatingFilterContainer,C&&g.Z.FloatingFilterContainerShow),children:b?(0,h.jsx)(r.Z,{className:"mb-2",onClick:()=>{l(c.E4.openDialog({[c.D_.NEW_PROJECT]:{dialogName:c.D_.NEW_PROJECT}}))},variant:"contained",color:"secondary",startIcon:(0,h.jsx)(a.Z,{}),children:"CREATE PROJECT"}):null}),b?null:(0,h.jsx)(r.Z,{className:(0,t.Z)("fixed mb-2",g.Z.ButtonIconCreateProjectAlignRight,g.Z.FloatingFilterContainerShow),onClick:()=>{l(c.E4.openDialog({[c.D_.NEW_PROJECT]:{dialogName:c.D_.NEW_PROJECT}}))},variant:"contained",color:"secondary",startIcon:(0,h.jsx)(a.Z,{}),children:"CREATE"})]})})}},67663:(e,l,o)=>{o.d(l,{Z:()=>s});o(72791);var n=o(20890),t=o(92511),a=o(13501),i=o(80184);const s=e=>
1{const{className:l,subtitle:o,title:s}=e;return(0,i.jsxs)("div",{className:(0,t.m6)("pr-6",a.Z.PageTitleContainer,l),children:[(0,i.jsx)(n.Z,{variant:"h4",className:"mb-2",children:s}),(0,i.jsx)(n.Z,{className:"text-white-med-on-dark",variant:"body1",children:o})]})}},23617:(e,l,o)=>{o.d(l,{Z:()=>n});const n={TabsOne:"Tabs_TabsOne__ZJR18",TabOne:"Tabs_TabOne__CD73a",TabsOneIndicator:"Tabs_TabsOneIndicator__qaZer",TabsOutlined:"Tabs_TabsOutlined__vr7pg",TabsOutlinedIndicator:"Tabs_TabsOutlinedIndicator__lZBnW",TabOutlined:"Tabs_TabOutlined__DpyIJ",TabsOutlinedCompact:"Tabs_TabsOutlinedCompact__ip5Nw",TabsOutlinedActiveBordered:"Tabs_TabsOutlinedActiveBordered__mn-S1",TabsOutlinedSmall:"Tabs_TabsOutlinedSmall__Wzkx8"}},90560:(e,l,o)=>{o.d(l,{Z:()=>n});const n={FloatingFilterContainer:"FloatingActions_FloatingFilterContainer__fZ-bK",ButtonIconCreateProjectAlignRight:"FloatingActions_ButtonIconCreateProjectAlignRight__ED1vk",ButtonIconCreateProject:"FloatingActions_ButtonIconCreateProject__3UrKg",FloatingFilterContainerShow:"FloatingActions_FloatingFilterContainerShow__KOKZu"}}}]); 2//# sourceMappingURL=4273.b55635f20d33734185c4.js.map
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.