PageSourceSearch

https://club.touchtight.com/assets/index-bxBTb9x5.js

js touchtight.com collected 2026-10-02 00:02:40 UTC 21,036 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/swiper-react-DcF17yCe.js","assets/react-vendor-DJtAp8P_.js","assets/SessionPlannerMobile-85wkJ1ZS.js","assets/mui-DvP2hOwX.js","assets/mui-styles-C9F12l22.js","assets/babel-helpers-D2wBBc1I.js","assets/app-DT7WuczB.js","assets/index-CyS3LFy6.js","assets/apollo-DL0KWP0Y.js","assets/index-CV9OfG1C.css","assets/dayjs-CFxoC4n5.js","assets/app-Cg4Kd3Rp.css","assets/moment-Bj79pgB5.js","assets/Modal-BzPnYVEi.js","assets/Button-C4goEOKP.js","assets/mutation--iSLlBrt.js","assets/query-CcmDMjHA.js","assets/imageOptimization-zUL1CBPb.js","assets/index.esm-CWqXbt53.js","assets/_baseClone-DByvJCmO.js","assets/_baseAssignValue-CjtYt4eh.js","assets/cloneDeep-mVQ3twB2.js","assets/Search-BEYvHCFs.js","assets/lodash-icp7yO-G.js","assets/merge-TfBrBrIh.js","assets/isArrayLikeObject-CcVCHQro.js","assets/map-BI8CQ8np.js","assets/browser-B3fhYDhb.js","assets/_arrayIncludes-DFQcso6E.js","assets/_baseIndexOf-DqPIyCu4.js","assets/hello-pangea-dnd-1bhs5THC.js","assets/some-YFJAbcVi.js","assets/values-DeBIqcD0.js","assets/index-B79atc36.js","assets/_baseDifference-BHjDay7E.js","assets/omit-BaIHraq0.js","assets/index-bEsv4Yks.js","assets/mui-x-DMY3qA32.js","assets/s3FileHandler-Bp64keCt.js","assets/compact-DZdspzxW.js","assets/swiper-react-CGdrHBuS.css"])))=>i.map(i=>d[i]);
2import{a as s,j as t}from"./react-vendor-DJtAp8P_.js";import{Z as ct,E as dt}from"./swiper-react-DcF17yCe.js";import{e as Ge,c as Ve,bk as pt,a4 as ut,m as ht,v as Ie,a0 as We,_ as gt,u as Me,d as mt,g as xt,F as ft,ca as yt,cb as St,ac as Ct}from"./app-DT7WuczB.js";import{B as Pe}from"./Button-C4goEOKP.js";import{aX as bt,aR as wt}from"./query-CcmDMjHA.js";import{bi as $e,aX as ie,bB as kt,bC as Mt}from"./index-CyS3LFy6.js";import{bG as Pt}from"./mutation--iSLlBrt.js";import"./dayjs-CFxoC4n5.js";import{D as It}from"./DeleteModal-BX6BaNP3.js";import"./moment-Bj79pgB5.js";import"./index.esm-CWqXbt53.js";import{u as Ue,ao as vt,aq as jt,z as T,T as le,C as Tt,a8 as At,j as He,aW as _t,w as Et,E as z,b_ as Dt,b$ as Ot,aC as Rt,an as Ne,aV as Bt}from"./mui-DvP2hOwX.js";import{M as Fe}from"./SessionPlannerMobile-85wkJ1ZS.js";import{S as Lt}from"./SearchHeader-BOq_PWig.js";import{U as Nt}from"./UpgradePlanModal-Cx-12O2U.js";import{V as Gt}from"./VideoPlayerModal-BgJm66DJ.js";import{u as Vt,a as Wt}from"./useCoordinatedLoading-XKQda0nS.js";import{S as $t}from"./SortMenu-CjsJdGGV.js";import{S as Ut}from"./Add-DRSElN7O.js";import{A as Ht}from"./AddPracticeToSessionModalGate-BB6n61YO.js";import{s as Ft}from"./search-DNkl80Xk.js";import{S as zt,A as qt}from"./AddPlaylistModal-CnE-eNO7.js";import{S as Yt}from"./Manage-BcZiAr0H.js";import{S as Qt}from"./Copy-Bx2E8fMZ.js";import{S as Xt}from"./DeleteGray-K_LbbGcc.js";import{S as Kt}from"./Share-AFIreKiA.js";import{M as Zt,S as Jt}from"./SharePlaylistModal-CSU5h6Fd.js";import{S as eo}from"./Trailer-gVffTodC.js";import{S as to}from"./PlaylistTwoTone-C2NT716u.js";import{S as oo}from"./Apple-CZyH-Klh.js";import{c as so}from"./compact-DZdspzxW.js";import{m as ao}from"./map-BI8CQ8np.js";import{u as ze,n as no}from"./apollo-DL0KWP0Y.js";import{PlanBuilder as ro}from"./index-C29Qg2hZ.js";import{S as lo}from"./Sort-DOORKFIJ.js";import"./mui-styles-C9F12l22.js";import"./babel-helpers-D2wBBc1I.js";import"./imageOptimization-zUL1CBPb.js";import"./Modal-BzPnYVEi.js";import"./Search-BEYvHCFs.js";import"./lodash-icp7yO-G.js";import"./merge-TfBrBrIh.js";import"./_baseAssignValue-CjtYt4eh.js";import"./_baseClone-DByvJCmO.js";import"./isArrayLikeObject-CcVCHQro.js";import"./browser-B3fhYDhb.js";import"./_arrayIncludes-DFQcso6E.js";import"./_baseIndexOf-DqPIyCu4.js";import"./hello-pangea-dnd-1bhs5THC.js";import"./some-YFJAbcVi.js";import"./values-DeBIqcD0.js";import"./index-B79atc36.js";import"./_baseDifference-BHjDay7E.js";import"./omit-BaIHraq0.js";import"./index-bEsv4Yks.js";import"./mui-x-DMY3qA32.js";import"./s3FileHandler-Bp64keCt.js";import"./cloneDeep-mVQ3twB2.js";import"./Filter-vdZeYdaV.js";import"./SearchBlue-Cq--C03-.js";import"./omitBy-CVfI2Mdq.js";import"./_basePickBy-jHhPNsuZ.js";import"./ArrowRightUp-CfAFwt7J.js";import"./Graphic-BzX0DM42.js";import"./seededSessionFill-BljGszd4.js";import"./popover-DQmY_bgT.js";import"./index-C53T7JDS.js";import"./floating-ui.dom-CpqR1Q5s.js";import"./index-CrwW5ro-.js";import"./subMonths-CpZP7vPB.js";import"./chevron-left-hHkvU2-n.js";import"./chevron-right-Bx281FLM.js";import"./sessionSections-a-lprBoU.js";import"./index-CvVUxn0l.js";import"./check-njpSxvzl.js";import"./index-Cor9x_UP.js";import"./checkbox-BCFY1QRf.js";
2import"./input-CuTRSUQZ.js";import"./editable-input-BbmoAFqJ.js";import"./chevron-down-D9vZfud1.js";import"./label-DlgL8a7V.js";import"./plus-jTnJ9Ylg.js";import"./arrow-right-CPcr9UUY.js";import"./funnel-CHKnj2yC.js";import"./ArrowLeft-Da6iFsoD.js";import"./AddBlack-qFPS8CaB.js";import"./PlaylistThumbnail-BQGQtBTO.js";import"./Tabs-lVcpmzV2.js";import"./orderBy-FNWL2R8s.js";import"./CreateEditSeasonModal-CSydoVwi.js";import"./AlertModal-CGXcj45Q.js";import"./DatePicker-BFwkswR8.js";try{let n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new n.Error().stack;l&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[l]="4da29d25-1dff-448d-b005-0039ab5b1860",n._sentryDebugIdIdentifier="sentry-dbid-4da29d25-1dff-448d-b005-0039ab5b1860")}catch{}const io=s.lazy(()=>gt(()=>import("./swiper-react-DcF17yCe.js").then(n=>n.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40]))),j={card:{width:"100%",padding:"0",borderRadius:"16px",cursor:"pointer",boxShadow:"0px 12px 24px -4px rgba(145, 158, 171, 0.12), 0px 0px 2px 0px rgba(145, 158, 171, 0.20)","&:hover":{backgroundColor:n=>n.backgroundColor.table,"& .carouselHeading":{color:n=>n.palette.primary.main}}},cardContent:{padding:"0px","&:last-child":{padding:"0px"}},heading:{fontSize:{xs:"18px",sm:"24px"},fontWeight:700,lineHeight:{xs:"30px",md:"48px"},color:"text.primary",cursor:"pointer"},description:{fontSize:{xs:"12px",md:"14px"},lineHeight:{xs:"18px",md:"22px"},color:"text.secondary"},chip:{height:"24px","& .MuiChip-avatar":{width:"18px",height:"18px"},"& .MuiChip-label":{fontSize:"13px",lineHeight:"18px"},backgroundColor:n=>`${n.legend}29`},menuIcon:{color:"#454F5B",height:"20px",width:"20px"}},co=n=>{const{className:l,style:c,onClick:p}=n;return t.jsx(z,{className:l,sx:{...c,display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"80px",right:"-12px !important",backgroundImage:"linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.5))",":hover":{backgroundImage:"linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.5))"}},onClick:p,children:t.jsx(Ot,{sx:{color:"text.primary"}})})},po=n=>{const{className:l,style:c,onClick:p}=n;return t.jsx(z,{className:l,sx:{...c,display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"80px",left:"-12px !important",backgroundImage:"linear-gradient(to left, rgba(255,255,255,0), rgba(255,255,255,0.5))",":hover":{backgroundImage:"linear-gradient(to left, rgba(255,255,255,0), rgba(255,255,255,0.5))"}},onClick:p,children:t.jsx(Dt,{sx:{color:"text.primary"}})})},uo=({playlistId:n,title:l="",videoCount:c=0,user:p={},canEdit:ce=!1,handleOpenMenu:de,handleClickView:A,setSelectedCollection:I=()=>{},setVideoIds:q=()=>{},onWatchTrailer:Y=()=>{},onAddToSession:Q=()=>{},onAddToPlaylist:X=()=>{},onAddToGoogleCalendar:h=()=>{},onAddToAppleCalendar:C=()=>{}})=>{var W,Se,$,ae;const{t:y}=Ge("engineRoom"),pe=$e(),v=s.useRef(null),[R,ue]=s.useState([]),[K,he]=s.useState(150),[Z,S]=s.useState(180),[D,J]=s.useState(!0),[ee,B]=s.useState(null),[g,L]=s.useState(null),m=s.useRef({x:0,y:0}),N=s.useRef(!1),O=Ue(e=>e.breakpoints.down("md")),M=Ve(),G=ze(),te=(ae=($=(Se=(W=M==null?void 0:M.userRolesPermissions)==null?void 0:W.permissions)==null?void 0:Se.engineRoom)==null?void 0:$.weeklySeasonPlans)==null?void 0:ae.add,_=e=>Array.isArray(e==null?void 0:e.categories)?e.categories.map(i=>i.id):[],ge=s.useMemo(()=>{const e=g&&pt(_(g),g==null?void 0:g.content_type,te),i=_(g).map(Number),d=[ie.WEEK_PLANS_46,ie.SEASON_PLANS].some(x=>i.includes(x));return so([{id:"watch-trailer",name:y("playlist.menu.watchTrailer"),icon:eo,iconCustomStyles:j.menuIcon,onClick:Y},e&&{id:"add-to-session",name:y(d?"playlist.menu.populateSessions":"playlist.menu.addToSession"),icon:kt,onClick:Q},{id:"add-to-playlist",name:y("playlist.menu.addToPlaylist"),icon:to,onClick:X},{id:"google-calendar",name:y("playlist.menu.addToGoogleCalendar"),icon:zt,iconCustomStyles:j.menuIcon,onClick:h},{id:"apple-calendar",name:y("playlist.menu.addToAppleCalendar"),icon:oo,iconCustomStyles:j.menuIcon,onClick:C}])},[g,te,Y,Q,X,h,C]),oe=s.useCallback((e,i)=>{var d;(d=e==null?void 0:e.stopPropagation)==null||d.call(e),L(i),I(i),q([...ao((i==null?void 0:i.videos)||[],"id")]),e!=null&&B(e.currentTarget??null)},[I,q]),a=s.useCallback(()=>{B(null),L(null)},[]),me=s.useCallback(e=>
2{e!==null&&S(e.offsetWidth)},[]),xe={dots:!1,infinite:!1,touchMove:!0,touchThreshold:100,speed:500,slidesToShow:5.25,slidesToScroll:5,arrows:!O,nextArrow:t.jsx(co,{}),prevArrow:t.jsx(po,{}),responsive:[{breakpoint:500,settings:{slidesToShow:1.15,slidesToScroll:1}},{breakpoint:1024,settings:{slidesToShow:1.75,slidesToScroll:1}},{breakpoint:1250,settings:{slidesToShow:2.25,slidesToScroll:2}},{breakpoint:1440,settings:{slidesToShow:2.75,slidesToScroll:2}},{breakpoint:1600,settings:{slidesToShow:3.25,slidesToScroll:3}},{breakpoint:1750,settings:{slidesToShow:3.75,slidesToScroll:3}},{breakpoint:2e3,settings:{slidesToShow:4.25,slidesToScroll:4}}]},V=async()=>{var d,x;J(!0);const e=await G.query({query:bt,variables:{getPlaylistVideosInput:{id:n,limit:10,offset:0}},fetchPolicy:"no-cache"}),i=(x=(d=e==null?void 0:e.data)==null?void 0:d.getPlaylistVideos)==null?void 0:x.data;ue((i==null?void 0:i.rows)||[]),J(!1)};s.useEffect(()=>{V()},[c]);const fe=s.useCallback(e=>{m.current={x:e.clientX,y:e.clientY},N.current=!1,e.preventDefault()},[]),se=s.useCallback(e=>{const i=Math.abs(e.clientX-m.current.x),d=Math.abs(e.clientY-m.current.y);N.current=i>5||d>5},[]),ye=(e,i,d)=>{var H;if(d!=="withHover"&&N.current){e.preventDefault();return}const{content_type:x,id:k,videos:P,title:U}=i,ne=x==="collection"?k:(H=P==null?void 0:P[0])==null?void 0:H.id,re=Ie(U,ne,k,x);pe(`/collections?${re}`),e.preventDefault()};return s.useEffect(()=>{const e=document.querySelector("main");v.current=e},[]),t.jsxs(t.Fragment,{children:[t.jsx(vt,{elevation:0,sx:j.card,children:t.jsxs(jt,{sx:j.cardContent,children:[t.jsxs(T,{container:!0,p:3,gap:.5,flexWrap:"nowrap",children:[t.jsxs(T,{flex:"1",children:[t.jsx(le,{className:"carouselHeading",sx:j.heading,onClick:A,children:l}),t.jsxs(T,{container:!0,gap:1,alignItems:"center",children:[t.jsx(le,{sx:j.description,children:y("playlist.videoCount",{count:c})}),t.jsx(Tt,{sx:j.chip,avatar:t.jsx(At,{alt:`${p.username}`,src:p.profile_image?`${Mt}/${p.profile_image}`:"",children:t.jsx(le,{sx:{fontSize:"11px"},children:ut(`${p.username} ${p.lastname}`)})}),label:`${p.username} ${p.lastname}`})]})]}),ce&&t.jsx(T,{children:t.jsx(He,{onClick:e=>de(e),children:t.jsx(_t,{})})})]}),t.jsx(Et,{}),t.jsx(z,{className:"slick-Box",sx:{padding:{xs:"16px 8px",sm:"16px 12px"},"& .slick-slide, & .slick-slide > div":{cursor:"pointer"},"& .slick-list":{paddingY:"4px"},"& .slick-arrow":{position:"absolute",zIndex:1,"&.slick-prev:before":{content:"unset"},"&.slick-next:before":{content:"unset"}}},children:t.jsxs(io,{...xe,children:[R.map(e=>{var i,d,x,k;return t.jsx(ct,{parentContainerRef:v,item:e,id:e.id,title:e.title,shortDescription:e.short_description,imageUrl:e.preview_image_url||e.main_poster_url,duration:e.content_type=="video"?(i=e.videos[0])==null?void 0:i.duration:!1,collectionVideosCount:e.content_type=="collection"?(d=e.videos)==null?void 0:d.length:!1,setCardHeight:he,canEdit:!!(M!=null&&M.id),isMenuOpen:!!(ee&&(g==null?void 0:g.id)===e.id),handleMenuClick:P=>oe(P,e),handleMouseDown:fe,handleMouseUp:se,handleClick:(P,U)=>ye(P,e,U),showPracticeDetails:!0,visits:(e==null?void 0:e.visits)??0,averageRating:(e==null?void 0:e.average_rating)??0,totalRatings:(e==null?void 0:e.totalRatings)??(e==null?void 0:e.total_ratings)??0,isLikedByUser:(e==null?void 0:e.isLikedByUser)??(e==null?void 0:e.is_liked_by_user)??!1,practiceShareUrl:`${window.location.origin}/collections?${Ie(e.title,e.content_type==="collection"?e.id:(k=(x=e.videos)==null?void 0:x[0])==null?void 0:k.id,e.id,e.content_type)}`,contentType:e==null?void 0:e.content_type,isLoggedInUser:!ht(M)},e.id)}),t.jsx(z,{ref:me,sx:e=>({height:K,width:Z,backgroundColor:e.backgroundColor.body,borderRadius:"8px",cursor:"pointer"}),onClick:A,children:t.jsx(T,{container:!0,justifyContent:"center",alignItems:"center",height:"100%",children:D?t.jsx(We,{}):t.jsx(le,{children:R.length?y("playlist.seeAllVideos"):y("playlist.noVideosAvailable")})})})]})})]})}),t.jsx(Fe,{itemHeight:"52px",width:"235px",items:ge,anchorEl:ee,enableDividers:!1,itemPadding:"14px 24px",handleClose:a})]})},ho=({clubColor:n})=>({btnSelect:{padding:"4px 11px",height:"38px",backgroundColor:n,"&:hover":{backgroundColor:n},"& .MuiButton-endIcon":{"& svg":{fontSize:"20px"},color:"#fff",marginLeft:{xs:"0px"},marginRight:{xs:"0px"}}},sortBtn:{backgroundColor:l=>l.button.backgroundColor.primary,"&:hover":{backgroundColor:l=>l.button.backgroundColor.secondary},height:"40px",color:"text.primary",padding:"0px 12px",border:"none","& .MuiButton-startIcon":{marginRight:{xs:"0px",md:"6px"},marginLeft:{xs:"2px",md:"0px"}}}
2,arrowDownIcon:{height:"24px",width:"24px"},iconButton:{height:"40px",width:"40px",borderRadius:"8px",backgroundColor:l=>l.button.backgroundColor.primary,"&:hover":{backgroundColor:l=>l.button.backgroundColor.secondary}}}),Zs=()=>{var Ee,De,Oe,Re,Be;const{t:n}=Ge("engineRoom"),l=window.location.pathname.split("/")[2],c=Me(o=>o.user.userPermission),p=Ve(),{isReadOnlyMode:ce}=mt(),de=$e(),A=s.useRef(null),I=Me(o=>{var r;return((r=o.search.engineRoom)==null?void 0:r.playlist)||""}),q=xt(),Y=ze(),{startLoading:Q,finishLoading:X}=Vt("playlistPageLoad"),[h,C]=s.useState([]),[y,pe]=s.useState(0),[v,R]=s.useState(!1),[ue,K]=s.useState(null),[he,Z]=s.useState(!1),[S,D]=s.useState(!1),[J]=no(Pt),[ee]=ft(),B=Ue(o=>o.breakpoints.down("sm")),[g,L]=s.useState(!1),m=(De=(Ee=p==null?void 0:p.userRolesPermissions)==null?void 0:Ee.permissions)==null?void 0:De.engineRoom,[N,O]=s.useState(!1),[M,G]=s.useState(null),[te,_]=s.useState(!1),[ge,oe]=s.useState(!1),[a,me]=s.useState(null),[xe,V]=s.useState([]),[fe,se]=s.useState(!1),[ye,W]=s.useState(!1),[Se,$]=s.useState([]),[ae,e]=s.useState(!1),[i,d]=s.useState(!1),x=s.useCallback(o=>{var Le;if(!o)return"";const{id:r,content_type:u,videos:b,title:w}=o,ke=u==="collection"?r:(Le=b==null?void 0:b[0])==null?void 0:Le.id;return Ie(w,ke,r,u)},[]),k=s.useCallback(()=>({title:(a==null?void 0:a.title)||"No title found",startTime:new Date().toISOString(),endTime:new Date(Date.now()+3600*1e3).toISOString(),description:(a==null?void 0:a.long_description)||"",location:`${window.location.origin}/collections?${x(a)}`}),[a,x]),P=s.useCallback(()=>{e(o=>!o)},[]),U=s.useCallback(()=>{a&&e(!0)},[a]),ne=s.useCallback(o=>o?Array.isArray(o==null?void 0:o.categories)?o.categories.map(r=>r.id):[]:[],[]),re=s.useMemo(()=>{const o=ne(a).map(Number);return[ie.WEEK_PLANS_46,ie.SEASON_PLANS].some(r=>o.includes(r))},[a,ne]),H=s.useCallback(()=>{d(!0)},[]),qe=s.useCallback(()=>{d(!1),V([])},[]),Ye=s.useCallback(()=>{(c==null?void 0:c.planId)<3?O(!0):re?H():se(!0)},[c==null?void 0:c.planId,re,H]),Qe=s.useCallback(()=>{(c==null?void 0:c.planId)<3?O(!0):W(!0)},[c==null?void 0:c.planId]),Xe=s.useCallback(()=>{window.open(yt(k()),"_blank")},[k]),Ke=s.useCallback(()=>{St(k())},[k]),Ce=Me(o=>o.club),be=ho({clubColor:Ce==null?void 0:Ce.color}),[f,E]=s.useState({page:0,value:"created_at",order:"DESC",searchQuery:I}),ve=p.id===((Oe=S==null?void 0:S.User)==null?void 0:Oe.id),we=()=>{_(!0)},Ze=()=>{_(!1),D(!1)},Je=()=>{oe(!0)},et=()=>{_(!0),L(!0)},tt=()=>{_(!1),D(!1),L(!1)},ot=()=>{oe(!1)},st=()=>{Z(!0)},je=()=>{Z(!1)},Te=s.useCallback(o=>{const r=o[0];h.length&&r.isIntersecting&&!v&&y>h.length&&E(u=>({...u,page:u.page+1}))},[v,y,h]),F=async()=>{var r,u;const o=Q("playlists");R(!0);try{const b=await Y.query({query:wt,variables:{getPlaylistsInput:{limit:10,offset:f.page*10,searchQuery:I,sortBy:f.value,sortOrder:f.order,category:l==="personal"?"coach":l==="club"?"club":"shared"}},fetchPolicy:"no-cache"}),w=(u=(r=b==null?void 0:b.data)==null?void 0:r.getPlaylists)==null?void 0:u.data;f.page===0?C([...w==null?void 0:w.rows]):C(ke=>[...ke,...w==null?void 0:w.rows]),pe(w==null?void 0:w.count)}catch(b){console.error("Error fetching playlists:",b)}finally{R(!1),X(o)}};s.useEffect(()=>{F()},[f.page,f.value,f.order,f.searchQuery,l]),s.useEffect(()=>{E(o=>({...o,page:0})),C([])},[l]),s.useEffect(()=>{let o=null;const r={root:null,rootMargin:"0px",threshold:1},u=new IntersectionObserver(Te,r);return A.current&&(u.observe(A.current),o=A.current),()=>{o&&u.unobserve(o)}},[Te]);const at=o=>{const r=f.value===o?f.order==="ASC"?"DESC":"ASC":"DESC";(f.value!==o||f.order!==r)&&C([]),E(u=>({...u,page:0,value:o,order:r}))},nt=[{id:1,label:"New to Old",value:"created_at"},{id:2,label:"A to Z",value:"title"}],Ae=[{name:"View",icon:Rt,iconCustomStyles:{width:"20px",height:"20px"},onClick:()=>_e(S.id)},{name:"Manage",onClick:we,icon:Yt},...((Re=m==null?void 0:m.clubPlaylists)==null?void 0:Re.add)==="yes"||((Be=m==null?void 0:m.sharedPlaylists)==null?void 0:Be.add)==="yes"||ve?[{name:"Share",onClick:Je,icon:Kt}]:[],{name:"Duplicate",onClick:et,icon:Qt},{name:"Delete",onClick:st,icon:Xt}
2],rt=(o,r)=>{K(o.currentTarget),D(r)},lt=()=>{K(null)},it=async()=>{const{data:{deletePlaylists:o}}=await J({variables:{deletePlaylistsInput:{ids:[S.id]}}}),{success:r,message:u}=o;r&&(ee({msg:u,variant:"success"}),je(),C([]),E(b=>({...b,page:0})),D(!1),F())},_e=o=>{de(`/playlists/${o}`)};return s.useEffect(()=>{E(o=>({...o,page:0,searchQuery:I})),C([])},[I]),t.jsxs(t.Fragment,{children:[t.jsxs(Ne,{container:!0,direction:"column",children:[t.jsx(Lt,{onChangeParentCallback:o=>q(Ft({key:"playlist",value:o})),reduxSearchValue:I,showFilterBtn:!1,showSortBtn:!1,removeTopBorder:!0,searchPlaceholder:"Search playlist title...",flexWrap:"nowrap",customElements:!ce&&t.jsx(T,{children:t.jsx(Pe,{customStyles:{height:"40px"},text:B?"Create":"Create Playlist",onClick:()=>c.planId<3?O(!0):we(),startIcon:t.jsx(Ut,{})})}),customSortEle:t.jsx(t.Fragment,{children:B?t.jsx(He,{onClick:o=>G(o.currentTarget),sx:be.iconButton,children:t.jsx(lo,{})}):t.jsx(Pe,{text:"Sort by",variant:"outlined",customStyles:be.sortBtn,endIcon:t.jsx(Bt,{sx:be.arrowDownIcon}),onClick:o=>G(o.currentTarget)})})}),t.jsx(T,{container:!0,gap:5,overflow:"auto",height:"calc(100% - 90px)",sx:{width:"inherit",padding:{xs:"16px",sm:"24px"}},children:(h==null?void 0:h.length)>0&&h.map(o=>t.jsx(uo,{title:o.title,videoCount:o.videoCount,user:o.User,playlistId:o.id,canEdit:!0,handleOpenMenu:r=>rt(r,o),currentPlaylist:l,handleClickView:()=>_e(o.id),setSelectedCollection:me,setVideoIds:V,onWatchTrailer:U,onAddToSession:Ye,onAddToPlaylist:Qe,onAddToGoogleCalendar:Xe,onAddToAppleCalendar:Ke},o.id))}),v&&h.length===0&&t.jsx(Ne,{container:!0,direction:"column",gap:2,sx:{padding:{xs:"16px",sm:"16px 24px"}},children:[1,2,3].map(o=>t.jsx(Wt,{},o))}),v&&h.length>0&&t.jsx(T,{flex:"1",mb:1,children:t.jsx(We,{})}),!v&&h.length===0&&t.jsx(dt,{title:l==="shared"?"No Playlists Shared":"No Playlists Added Yet",action:l!=="shared"?t.jsx(Pe,{variant:"contained",text:"Create Playlist",onClick:()=>we()}):null}),t.jsx(z,{ref:A,sx:{margin:"4px"}})]}),t.jsx(Fe,{itemHeight:"52px",width:"180px",items:ve?Ae:Ct(Ae,m==null?void 0:m.clubPlaylists),anchorEl:ue,enableDividers:!1,itemPadding:"14px 24px",handleClose:lt}),t.jsx(It,{handleClose:je,open:he,title:"Delete Playlist?",actionBtnTitle:"Delete Playlist",handleDelete:it,entityName:S==null?void 0:S.title}),t.jsx(Zt,{selectedPlaylist:S,open:te,handleClose:g?tt:Ze,getPlaylists:F,isDuplicate:g,setFilters:E,setPlaylists:C,refetchPlaylist:F}),t.jsx(Jt,{open:ge,handleClose:ot,selectedPlaylist:S,setFilters:E,setPlaylists:C,refetchPlaylist:F}),t.jsx(Nt,{open:N,handleClose:()=>{O(!1)},heading:"Unlock Unlimited Views With a Growth or Coach Bundle Max Plan",mainHeading:"Upgrade for Full Access!",description:n("limitExceeded")}),t.jsx(Ht,{open:fe,handleClose:()=>{se(!1),V([])},videoIds:xe,setSelectedCollectionIds:$,workflow:"ENGINE_ROOM"}),t.jsx(qt,{open:ye,handleClose:()=>W(!1),setSelectedCollectionIds:$,collectionIds:a!=null&&a.id?[a.id]:[]}),t.jsx(Gt,{open:ae,handleClose:P,videoData:{...a,url:a==null?void 0:a.trailer_hls,videoCollectionId:a==null?void 0:a.id},maxWidth:"md"}),t.jsx(ro,{open:i,selectedCollectionId:a==null?void 0:a.id,handleClose:qe}),t.jsx($t,{sortMenuAnchor:M,menuItems:nt,sort:f,handleChangeSortBy:at,setSortMenuAnchor:G})]})};export{Zs 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.