PageSourceSearch

https://polarchefben.com/static/js/5623.5e2c12c6.chunk.js

js polarchefben.com collected 2026-10-09 21:32:41 UTC 696,471 bytes, 2 lines download raw bytes

1(globalThis.webpackChunktest=globalThis.webpackChunktest||[]).push([[2259,2310,2997,3657,5401,5623,6076,6237,7650,8942,9459],{49143(){},49053(){},90988(){},50872(){},68351(){},18720(e,t,o){"use strict";o.r(t),o.d(t,{default:()=>Ct});var i=o(82483),n=o(97756),r=o(99998),s=o(57513),a=o(52891),l=o(65470),d=o(52307),c=o(67626),p=o(7636),u=o(65941),x=o.n(u),m=o(25982),h=o(18945),g=o(15269),f=o(18246),y=o(24029),b=o(76143),_=o(71897),v=o(80685),w=o(2767),j=o(86699),C=o.n(j),S=o(75135),k=o(34301),A=o(66576),F=o(38372),D=o(48954),z=o(86687),T=o(61690),E=o(1901),W=o(91400),R=o(87307),M=o(56723);const I=i.memo(function(e){let{content_type:t,link:o,text:r,community_post_title:s,time:d,post_id:c,hideLocation:p=!1,imageSrc:u=null,is_example:x=!1}=e;const{t:h}=(0,n.Bd)(),[g,y]=(0,i.useState)({days:0,hours:0,minutes:0,seconds:0}),[b,_]=(0,i.useState)(null),[v,w]=(0,i.useState)("..."),[j,C]=(0,i.useState)(""),[S,k]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!d)return void w(h("community.event.noTimeSpecified"));const e=new Date(d);if(isNaN(e.getTime()))return void w(h("community.event.invalidDate"));_(e);const t=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()],o=e.getDate(),i=["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()],n=e.getFullYear(),r=e.getHours(),s=r>=12?"PM":"AM",a=r%12||12,l=e.getMinutes().toString().padStart(2,"0");C(`${`${a}:${l} ${s}`}, ${t}, ${i} ${o}, ${n}`);const c=()=>{const t=new Date,o=e-t;if(o<=0)return k(!0),y({days:0,hours:0,minutes:0,seconds:0}),void w(h("community.event.started"));k(!1);const i=Math.floor(o/864e5),n=Math.floor(o%864e5/36e5),r=Math.floor(o%36e5/6e4),s=Math.floor(o%6e4/1e3);y({days:i,hours:n,minutes:r,seconds:s}),w((e=>{if(e<=0)return h("community.event.started");const t=Math.floor(e/864e5),o=Math.floor(e%864e5/36e5),i=Math.floor(e%36e5/6e4);return t>0?1===t?h("community.event.in1Day"):h("community.event.inDays",{count:t}):o>0?1===o?h("community.event.in1Hour"):h("community.event.inHours",{count:o}):i>0?1===i?h("community.event.in1Minute"):h("community.event.inMinutes",{count:i}):h("community.event.inLessThanAMinute")})(o))};c();const p=setInterval(c,1e3);return()=>clearInterval(p)},[d]);const z=(()=>{switch(t){case"mgm":return D;case"mzm":return A;case"mmt":return F;default:return null}})(),T=(()=>{switch(t){case"mgm":return"Google Meet";case"mzm":return"Zoom";case"mmt":return"Microsoft Teams";default:return"Meeting"}})(),I=(0,W.$)(s)||"Event";return(0,M.jsxs)(a.A,{sx:{backgroundColor:"transparent",padding:"0px",marginBottom:"16px"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"16px"},children:[(0,M.jsx)("div",{style:{width:"40px",height:"40px",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"10px",flexShrink:0},children:z?(0,M.jsx)("img",{src:z,alt:T,style:{width:"40px",height:"40px"}}):(0,M.jsx)(f.m1g,{style:{fontSize:"40px",color:"#6B7280"}})}),(0,M.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",alignItems:"center",height:"48px"},children:(0,M.jsx)(l.A,{variant:"h6",style:{fontWeight:"bold",fontSize:"16px",color:"#1D1D1D",lineHeight:"1.3"},children:I})})]}),u&&(0,M.jsx)("div",{style:{marginBottom:"18px"},children:(0,M.jsx)("img",{src:u,alt:I,style:{width:"100%",maxHeight:"400px",objectFit:"contain",borderRadius:"12px",display:"block"}})}),r&&(0,M.jsx)(l.A,{variant:"body2",style:{color:"#4B5563",fontSize:"15px",lineHeight:"1.6",marginBottom:"20px",whiteSpace:"pre-wrap"},dangerouslySetInnerHTML:{__html:r}}),d&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{style:{marginBottom:"20px"},children:j&&(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"8px"},children:[(0,M.jsx)(E.dDC,{style:{fontSize:"18px",color:"#6C89AF",marginRight:"10px"}}),(0,M.jsx)(l.A,{variant:"body2",style:{color:"#374151",fontSize:"14px",fontWeight:"500"},children:j})]})}),(0,M.jsxs)(a.A,{sx:{backgroundColor:"#F9FBFF",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"20px 0px",width:"100%",margin:"0 auto",marginBottom:"20px",textAlign:"center"},children:[(0,M.jsx)(l.A,{variant:"body2",style:{color:"#6B7280",fontSize:"13px",fontWeight:"500",marginBottom:"12px"},children:"Event Starting Soon"}),(0,M.jsxs)("div",{style:{display:"flex",justifyContent:"center",gap:"24px",flexWrap:"wrap"},children:[(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,M.jsx)(l.A,{variant:"h4",style:{fontWeight:"bold",fontSize:"32px",color:"#1D1D1D",lineHeight:"1"},children:g.days.toString().padStart(2,"0")}),(0,M.jsx)(l.A,{variant:"caption",style:{color:"#6B7280",fontSize:"12px",marginTop:"4px"},children:"days"})]}),(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,M.jsx)(l.A,{variant:"h4",style:{fontWeight:"bold",fontSize:"32px",color:"#1D1D1D",lineHeight:"1"},children:g.hours.toString().padStart(2,"0")}),(0,M.jsx)(l.A,{variant:"caption",style:{color:"#6B7280",fontSize:"12px",marginTop:"4px"},children:"hours"})]}),(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,M.jsx)(l.A,{variant:"h4",style:{fontWeight:"bold",fontSize:"32px",color:"#1D1D1D",lineHeight:"1"},children:g.minutes.toString().padStart(2,"0")}),(0,M.jsx)(l.A,{variant:"caption",style:{color:"#6B7280",fontSize:"12px",marginTop:"4px"},children:"min"})]}),(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,M.jsx)(l.A,{variant:"h4",style:{fontWeight:"bold",fontSize:"32px",color:"#1D1D1D",lineHeight:"1"},children:g.seconds.toString().padStart(2,"0")}),(0,M.jsx)(l.A,{variant:"caption",style:{color:"#6B7280",fontSize:"12px",marginTop:"4px"},children:"sec"})]})]})]})]}),(0,M.jsxs)("div",{style:{display:"flex",gap:"12px"},children:[(0,M.jsx)(m.A,{variant:"contained",fullWidth:!0,disabled:x,onClick:e=>{e.stopPropagation(),x||window.open((0,R.g)(o),"_blank","noopener,noreferrer")},sx:{backgroundColor:"var(--brand-color)",color:"#fff",textTransform:"none",fontWeight:"600",fontSize:"15px",padding:"12px 24px",borderRadius:"10px",boxShadow:"none","&:hover":{backgroundColor:"var(--brand-color-hover)",boxShadow:"none"}
1,"&:disabled":{backgroundColor:"#E5E7EB",color:"#9CA3AF"}},children:h("community.event.joinEvent")}),(0,M.jsx)(m.A,{variant:"outlined",fullWidth:!0,onClick:e=>{e.stopPropagation(),(()=>{if(x)return;if(!b||!o||!s)return;const e=(0,W.$)(s),t=e=>`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,"0")}${String(e.getUTCDate()).padStart(2,"0")}T${String(e.getUTCHours()).padStart(2,"0")}${String(e.getUTCMinutes()).padStart(2,"0")}${String(e.getUTCSeconds()).padStart(2,"0")}Z`,i=e=>e?e.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\n/g,"\\n"):"",n=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//WithMe//Event//EN","BEGIN:VEVENT",`DTSTART:${t(b)}`,`DTEND:${t(new Date(b.getTime()+36e5))}`,`SUMMARY:${i(e)}`,`DESCRIPTION:${i(r||"")}\\n${i(o)}`,`LOCATION:${i(o)}`,`URL:${o}`,"STATUS:CONFIRMED","SEQUENCE:0","BEGIN:VALARM","TRIGGER:-PT15M","ACTION:DISPLAY",`DESCRIPTION:Reminder: ${i(e)}`,"END:VALARM","END:VEVENT","END:VCALENDAR"].join("\r\n"),a=new Blob([n],{type:"text/calendar;charset=utf-8"}),l=URL.createObjectURL(a),d=document.createElement("a");d.href=l,d.download=`${(e||"event").replace(/[^a-z0-9]/gi,"_").toLowerCase()}.ics`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(l)})()},startIcon:(0,M.jsx)(f.r2j,{style:{fontSize:"18px"}}),sx:{borderColor:"#E4EBF6",color:"#1D1D1D",textTransform:"none",fontWeight:"500",fontSize:"15px",padding:"12px 24px",borderRadius:"10px","&:hover":{borderColor:"#C7D1DE",backgroundColor:"#F9FAFB"}},children:"Add to Calendar"})]})]})});var P=o(71481),B=o(28110);const L=o(98635);function N(e,t){const o=new Date-new Date(e),i=Math.floor(o/6e4),n=Math.floor(o/36e5),r=Math.floor(o/864e5);return i<1?t("community.post.timeDelta.justNow"):i<60?t("community.post.timeDelta.minutesAgo",{minutes:i}):n<24?t("community.post.timeDelta.hoursAgo",{hours:n}):t("community.post.timeDelta.daysAgo",{days:r})}k.Uy.GlobalWorkerOptions.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${k.Uy.version}/pdf.worker.js`;function O(e,t){return e.length<=t?e:e.substring(0,t)+"..."}const U=i.memo(function(e){let{pdf_src:t,pre_upload:o,fullscreen:i,content_width_type:n,handleFullscreenPDFOpen:r}=e;return(0,M.jsxs)("div",{style:{position:"relative",height:"auto",width:"400px"},children:[(0,M.jsx)(S.A,{pdfFile:o||i?t:L.CONTENT_CLOUDFRONT+t,content_width_type:n}),(0,M.jsx)("a",{className:"hover_modal_icon",onClick:()=>{r(o?t:L.CONTENT_CLOUDFRONT+t,"pdf")},children:i?null:(0,M.jsx)(v.C2y,{className:"fullscreen_icon",style:{width:"20px",height:"20px",bottom:"post"===n?"50px":"40px",right:"10px",zIndex:"999"}})})]})}),$=i.memo(function(e){let{audio_src:t,pre_upload:o}=e;return(0,M.jsx)("div",{style:{position:"relative",width:"100%",padding:"12px",backgroundColor:"#f8f9fa",borderRadius:"8px",border:"1px solid #E4EBF6",marginBottom:"16px"},children:(0,M.jsx)(C(),{className:"react-player",src:o?t:L.CONTENT_CLOUDFRONT+t,controls:!0,style:{width:"100%",height:"40px",outline:"none"}})})}
1),H=e=>{let{post_index:t,username:o,display_name:r,user_icon:d,time:c,subscription:u,text:x,content_file:v,content_type:w,post_like_count:j,post_tier:S,influencer_tier_names:E={},n_threads:W,n_comments:H,threads:V,tags_list:Y,onClick:G,onLike:Z,post_id:X,post_user_value_count:K,link:J,pinned:q,current_user:Q,influencer_name:ee,handleUpdatePinnedPost:te,handleRemovePinnedPost:oe,isPinnedPost:ie,community_post_title:ne,editPost:re,getBrandColor:se,deletePost:ae,event_time:le,scheduled_date:de,hideLocation:ce=!1,handleEditingContentModal:pe,is_example:ue=!1}=e;const{t:xe}=(0,n.Bd)(),me=E[S],he=!!(de&&new Date(de)>new Date),[ge,fe]=(0,i.useState)(!1),[ye,be]=(0,i.useState)(null),[_e,ve]=(0,i.useState)(!1),[we,je]=(0,i.useState)(""),[Ce,Se]=(0,i.useState)(!1),ke=Array.isArray(Y)&&Y.find(e=>e&&"all"!==e.toLowerCase())||null,[Ae,Fe]=(0,i.useState)(""),[De,ze]=(0,i.useState)(""),[Te,Ee]=(0,i.useState)(null),[We,Re]=(0,i.useState)(null),[Me,Ie]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{if("pdf"===w&&v)try{Ie(!0);const e=L.CONTENT_CLOUDFRONT+v,t=await k.Uy.getDocument(e).promise,o=await t.getPage(1),i=.5,n=o.getViewport({scale:i}),r=document.createElement("canvas"),s=r.getContext("2d");r.height=n.height,r.width=n.width,await o.render({canvasContext:s,viewport:n}).promise;const a=r.toDataURL("image/png");Re(a),Ie(!1)}catch(e){console.error("Error loading PDF preview:",e),Ie(!1),Re(null)}else Re(null)})()},[w,v]);const Pe=(()=>{if(!V||0===V.length)return[];const e=new Set,t=[];return V.forEach(o=>{o.user_icon&&!e.has(o.user_icon)&&(e.add(o.user_icon),t.push({icon:o.user_icon,name:o.username||"Anonymous"})),o.comments&&o.comments.length>0&&o.comments.forEach(o=>{o.user_icon&&!e.has(o.user_icon)&&(e.add(o.user_icon),t.push({icon:o.user_icon,name:o.commenter_display_name||o.commenter||"Anonymous"}))})}),t.slice(0,4)})(),{threadCount:Be,commentCount:Le}=(()=>{if(!V||0===V.length)return ue?{threadCount:W||0,commentCount:H||0}:{threadCount:0,commentCount:0};let e=V.length,t=0;return V.forEach(e=>{e.comments&&e.comments.length>0&&(t+=e.comments.length)}),{threadCount:e,commentCount:t}})(),Ne=()=>{Ee(null)},Oe=["vid","vid-rec"].includes(w),Ue=["vey","vel","vev","vtw","vwi"].includes(w),$e=["pdf","aud","god","gos"].includes(w),He=["mot","mgm","mzm","mmt"].includes(w),Ve=ue&&["img","vid","vid-rec","aud","pdf"].includes(w)||(v||J)&&("img"===w||Oe||Ue||$e)&&!He;return(0,M.jsx)("div",{onClick:()=>G(t),style:{padding:"16px",position:"relative",borderRadius:"12px",cursor:"pointer",transition:"background-color 0.2s ease, box-shadow 0.2s ease",boxShadow:q?"0 1px 3px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(60, 85, 243, 0.30), 0 0 16px rgba(60, 85, 243, 0.12)":"0 1px 3px rgba(0, 0, 0, 0.05)"},children:(0,M.jsxs)("div",{style:{position:"relative"},children:[(0,M.jsxs)("div",{style:{position:"absolute",top:"0px",right:"0px",display:"flex",alignItems:"center",gap:"8px",zIndex:5},children:[q&&(0,M.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px"},children:[(0,M.jsx)(b.Yn5,{style:{fontSize:"14px",color:"var(--brand-color)"}}),(0,M.jsx)("span",{style:{fontSize:"12px",color:"var(--brand-color)",fontWeight:"600"},children:xe("community.post.pinned")})]}),Q&&(Q===ee||Q===o)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("span",{onClick:e=>{e.stopPropagation(),Ee(e.currentTarget)},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",padding:"4px",borderRadius:"4px",transition:"background 0.15s"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f0f0f0",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.Xwq,{style:{fontSize:"20px",color:"#666"}})}),(0,M.jsxs)(h.A,{anchorEl:Te,open:Boolean(Te),onClose:Ne,onClick:e=>e.stopPropagation(),autoFocus:!1,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px",border:"1px #f4f4f4 solid"},"& .MuiMenuItem-root":{"&:focus":{backgroundColor:"transparent"},"&.Mui-focusVisible":{backgroundColor:"transparent"},"&:hover":{backgroundColor:"#f5f5f5"}}},children:[!q&&Q===ee&&!ie&&(0,M.jsx)(p.A,{onClick:e=>{e.stopPropagation(),e.preventDefault(),te&&te(X,t),Ne()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:xe("community.post.menu.pin")}),q&&Q===ee&&(0,M.jsx)(p.A,{onClick:e=>{e.stopPropagation(),e.preventDefault(),oe&&oe(X,t),Ne()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:xe("community.post.menu.removePin")}),(Q===ee||Q===o)&&re&&(0,M.jsx)(p.A,{onClick:e=>{e.stopPropagation(),G&&G(t,!0),Ne()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:xe("community.post.menu.edit")}),(Q===ee||Q===o)&&ae&&(0,M.jsx)(p.A,{onClick:e=>{e.stopPropagation(),ae&&ae(X,t),Ne()},sx:{color:"var(--danger-color)",fontWeight:"500",fontSize:"14px"},children:xe("community.post.menu.delete")})]})]})]}),he&&(0,M.jsx)("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:4,backgroundColor:"rgba(24, 24, 24, 0.7)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",borderRadius:"1000px",pointerEvents:"none"},children:(0,M.jsxs)("div",{style:{display:"flex",padding:"10px 20px"},children:[(0,M.jsx)(P.lhZ,{style:{fontSize:"16px",color:"#fff",margin:"auto auto auto auto"}}),(0,M.jsx)("span",{style:{color:"#fff",fontSize:"14px",fontWeight:"700",margin:"auto auto auto 10px",
1whiteSpace:"nowrap"},children:xe("common.liveIn",{time:(0,B.g)(new Date,new Date(de))})})]})}),(0,M.jsxs)("div",{style:he?{filter:"blur(4px)"}:void 0,children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",marginBottom:"12px",paddingRight:"60px"},children:[(0,M.jsx)(g.A,{alt:o,src:d,style:{marginRight:"12px",width:"44px",height:"44px",border:"2px solid #f0f0f0"}}),(0,M.jsxs)("div",{style:{flex:1},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",marginBottom:"0px"},children:[(0,M.jsx)(l.A,{variant:"subtitle2",style:{fontWeight:"bold",marginRight:"2px",fontSize:"16px"},children:O(r,20)}),"Creator"===u&&(0,M.jsx)(y.IIi,{style:{fontSize:"14px",color:se()}}),S>0&&(0,M.jsx)("span",{style:{margin:"0px 8px 0px 0px",display:"inline-flex",alignItems:"center",backgroundColor:"#e1e4ff",color:"var(--brand-color)",padding:"2px 6px",fontSize:"10px",fontWeight:"600",borderRadius:"50px"},children:O(me,16)})]}),(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"2px",flexWrap:"wrap"},children:[(0,M.jsx)(l.A,{variant:"body2",color:"textSecondary",sx:{fontSize:"12px"},children:N(c,xe)}),ke&&(0,M.jsx)(l.A,{variant:"body2",color:"textSecondary",sx:{fontSize:"12px"},children:(Ye=ke,Ye?"all"===Ye.toLowerCase()?"All":Ye.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "):"")})]})]})]}),(0,M.jsxs)(s.Ay,{container:!0,alignItems:"flex-start",children:[(0,M.jsx)(s.Ay,{xs:Ve?8:12,children:!Ve&&J&&["mot","mgm","mzm","mmt"].includes(w)?null:(0,M.jsx)(l.A,{variant:"body2",style:{wordBreak:"break-word",whiteSpace:"pre-wrap",fontSize:"15px",lineHeight:"1.5",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",color:"#1D1D1D",marginTop:"8px",paddingRight:Ve?"16px":"60px"},dangerouslySetInnerHTML:{__html:x}})}),Ve&&(0,M.jsx)(s.Ay,{xs:4,style:{display:"flex",justifyContent:"flex-end",alignItems:"flex-start"},children:(0,M.jsx)("div",{style:{width:"100%",maxWidth:"180px",aspectRatio:"16/9",minHeight:"100px",position:"relative",borderRadius:"12px",border:"aud"===w?"none":"1px solid #E4EBF6",overflow:"hidden",background:"god"===w?"#DEF1FF":"gos"===w?"#DEFFE9":"#f3f3f3",display:"flex",justifyContent:"center",alignItems:"center"},children:(()=>{if(ue&&!v){const e={img:{bg:"linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%)",color:"#4CAF50",icon:"\ud83d\uddbc\ufe0f"},vid:{bg:"linear-gradient(135deg, #F3E5F5 0%, #CE93D8 100%)",color:"#9C27B0",icon:"\u25b6"},"vid-rec":{bg:"linear-gradient(135deg, #F3E5F5 0%, #CE93D8 100%)",color:"#9C27B0",icon:"\u25b6"},aud:{bg:"linear-gradient(135deg, #FFF3E0 0%, #FFCC80 100%)",color:"#FF9800",icon:"\u266a"},pdf:{bg:"linear-gradient(135deg, #FFEBEE 0%, #EF9A9A 100%)",color:"#F44336",icon:"\ud83d\udcc4"}},t=e[w]||e.img;return(0,M.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:t.bg,borderRadius:"12px",fontSize:"32px",color:t.color},children:t.icon})}if(!v&&!J)return null;if("img"===w)return(0,M.jsx)("img",{src:L.CONTENT_CLOUDFRONT+v,alt:xe("common.postContent"),style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"12px",display:"block"}});if(Oe)return(0,M.jsx)("video",{src:L.CONTENT_CLOUDFRONT+v+"#t=0.001",playsInline:!0,preload:"metadata",muted:!0,style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"12px",display:"block"}});if("vey"===w)return(0,M.jsx)("iframe",{title:xe("community.youTubePreview"),src:`https://www.youtube-nocookie.com/embed/${v}?rel=0&modestbranding=1`,frameBorder:"0",allow:"accelerometer; encrypted-media; gyroscope; picture-in-picture; fullscreen",allowFullScreen:!0,style:{width:"100%",height:"100%",border:"none",pointerEvents:"none"}});if("vel"===w)return(0,M.jsx)("iframe",{title:xe("community.loomPreview"),src:`https://www.loom.com/embed/${v}?autoplay=false`,frameBorder:"0",allowFullScreen:!0,style:{width:"100%",height:"100%",border:"none",pointerEvents:"none"}});if("vev"===w)return(0,M.jsx)("iframe",{title:xe("common.vimeoPlayer","Vimeo video player"),src:`https://player.vimeo.com/video/${v}`,frameBorder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,style:{width:"100%",height:"100%",border:"none",pointerEvents:"none"}});if("vtw"===w){const e=v||"",t=e.startsWith("ch")?`https://player.twitch.tv/?channel=${e.slice(2)}&parent=${window.location.hostname}`:e.startsWith("c")?`https://clips.twitch.tv/embed?clip=${e.slice(1)}&parent=${window.location.hostname}`:`https://player.twitch.tv/?video=${e.slice(1)}&parent=${window.location.hostname}`;return(0,M.jsx)("iframe",{title:xe("common.twitchPlayer","Twitch video player"),src:t,frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0,style:{width:"100%",height:"100%",border:"none",pointerEvents:"none"}})}if("vwi"===w)return(0,M.jsx)("iframe",{title:xe("common.wistiaPlayer","Wistia video player"),src:`https://fast.wistia.com/embed/iframe/${v}?autoPlay=false`,frameBorder:"0",allow:"autoplay; fullscreen",allowFullScreen:!0,style:{width:"100%",height:"100%",border:"none",pointerEvents:"none"}});if("pdf"===w)return Me?(0,M.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:"#f8f9fa",borderRadius:"12px",padding:"16px"},children:[(0,M.jsx)(f.MY6,{style:{fontSize:"48px",color:"#dc3545",marginBottom:"8px"}}),(0,M.jsx)("span",{style:{fontSize:"12px",color:"#666",fontWeight:"500"},children:xe("community.composer.loading")})]}):We?(0,M.jsx)("img",{src:We,alt:xe("common.pdfPreview"),style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"12px",display:"block"}}):(0,M.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:"#f8f9fa",borderRadius:"12px",padding:"16px"},children:[(0,M.jsx)(f.MY6,{style:{fontSize:"48px",color:"#dc3545",marginBottom:"8px"}}),(0,M.jsx)("span",{style:{fontSize:"12px",color:"#666",fontWeight:"500"},children:xe("community.post.content.pdfDocument")})]});if("aud"===w)return(0,M.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:"#fff",borderRadius:"12px",padding:"8px"},children:(0,M.jsx)(C(),{className:"react-player",src:L.CONTENT_CLOUDFRONT+v,controls:!0,style:{width:"100%",height:"32px",outline:"none"}})});if("god"===w)return(0,M.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",borderRadius:"12px",padding:"16px"},children:[(0,M.jsx)("img",{src:T,alt:xe("dashboard.paidDms.googleDocs"),style:{width:"48px",height:"48px",marginBottom:"8px"}}),(0,M.jsx)("span",{style:{fontSize:"12px",color:"#666",fontWeight:"500"},children:xe("dashboard.paidDms.googleDocs")})]});if("gos"===w)return(0,M.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",borderRadius:"12px",padding:"16px"},children:[(0,M.jsx)("img",{src:z,alt:xe("dashboard.paidDms.googleSheets"),style:{width:"48px",height:"48px",marginBottom:"8px",objectFit:"contain"}}),(0,M.jsx)("span",{style:{fontSize:"12px",color:"#666",fontWeight:"500"},children:xe("dashboard.paidDms.googleSheets")})]});if(He){let e=null,t=xe("community.post.event");const o=()=>"mgm"===w?"#FFF6DC":"mzm"===w?"#E5F1FF":"mmt"===w?"#E6E7FF":"#F9FBFF";return"mzm"===w?(e=(0,M.jsx)("img",{src:A,alt:xe("profile.zoom"),style:{width:"80px",height:"auto"}}),t=xe("community.composer.zoomMeeting")):"mgm"===w?(e=(0,M.jsx)("img",{src:D,alt:xe("community.composer.googleMeet"),style:{width:"auto",height:"60px"}}),t=xe("community.composer.googleMeet")):"mmt"===w?(e=(0,M.jsx)("img",{src:F,alt:xe("community.composer.microsoftTeams"),style:{width:"auto",height:"48px"}}),t=xe("community.composer.microsoftTeams")):"mot"===w&&(e=(0,M.jsx)(f.bw7,{style:{fontSize:"48px",color:"#6C89AF"}}),t=xe("community.post.event")),(0,M.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:o(),borderRadius:"12px",padding:"16px"},children:e})}return null})()})})]}),(0,M.jsx)("div",{style:{width:"100%"},children:(0,M.jsxs)(M.Fragment,{children:[!Ve&&(v||J&&["god","gos"].includes(w))&&(0,M.jsxs)("div",{style:{position:"relative",padding:"0px 0px 0px 0px"},children:[["gos","god"].includes(w)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px",marginBottom:"16
1px",position:"relative"},children:["gos"===w&&(0,M.jsx)("img",{src:z,alt:xe("dashboard.paidDms.googleSheets"),style:{width:"24px",marginRight:"16px"}}),"god"===w&&(0,M.jsx)("img",{src:T,alt:xe("dashboard.paidDms.googleDocs"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["gos"===w&&xe("community.post.googleSheets"),"god"===w&&xe("community.post.googleDocs")]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>{return e=(0,R.g)(J),t=w,Fe(e),ze(t),void Se(!0);var e,t},rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:xe("community.post.actions.open")})})]}),"aud"===w&&(0,M.jsx)("div",{style:{position:"relative",height:"auto",width:"100%",maxWidth:"600px"},children:(0,M.jsx)($,{audio_src:v})}),"pdf"===w&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(U,{fullscreen:Ce,pdf_src:v,content_width_type:"post",handleFullscreenPDFOpen:e=>{je(e),ve(!0)}})})]}),!Ve&&J&&["mot","mgm","mzm","mmt"].includes(w)&&(0,M.jsx)("div",{style:{position:"relative",padding:"0px",margin:"20px auto",width:"100%"},onClick:e=>e.stopPropagation(),children:(0,M.jsx)(I,{content_type:w,link:J,text:x,community_post_title:ne,time:le||c,post_id:X,imageSrc:v?L.CONTENT_CLOUDFRONT+v:null,hideLocation:ce,is_example:ue})})]})}),(0,M.jsx)(s.Ay,{container:!0,children:(0,M.jsx)(s.Ay,{xs:12,children:(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:"12px",gap:"15px",paddingTop:"8px"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px",backgroundColor:1===K?"#eaebfd":"transparent",padding:"2px 6px",borderRadius:"50px",transition:"background-color 0.15s ease"},onClick:e=>{e.stopPropagation(),"function"===typeof Z&&void 0!==X&&(0===K&&(be(X),fe(!0)),Z(X,t))},children:[(0,M.jsx)("span",{style:{fontSize:"16px",color:1===K?"var(--brand-color)":"#222"},children:"\ud83d\udc4d"}),(0,M.jsx)(l.A,{variant:"caption",style:{color:1===K?"var(--brand-color)":"#666",fontSize:"13px",fontWeight:"600"},children:j}),ge&&ye===X&&(0,M.jsx)(_.A,{zIndex:2e3,onComplete:()=>{be(null),fe(!1)},duration:2300,force:.15,particleCount:10,width:180,particleSize:6,colors:["#3c55f3","#fa87da","#2cd983","#f6bd50"]})]}),(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,M.jsx)("span",{style:{fontSize:"16px"},children:"\ud83d\udcac"}),(0,M.jsx)(l.A,{variant:"caption",style:{color:"#666",fontSize:"13px",fontWeight:"500"},children:xe("community.post.replies",{count:Be+Le})}),Pe.length>0&&(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",marginLeft:"8px"},children:[Pe.map((e,t)=>(0,M.jsx)(g.A,{alt:e.name,src:e.icon,style:{width:"24px",height:"24px",marginLeft:t>0?"-8px":"0px",fontSize:"10px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"}},t)),4===Pe.length&&(0,M.jsx)("div",{style:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"#f0f0f0",marginLeft:"-8px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",color:"#666",fontWeight:"500"},children:"+"})]})]})]})})})]})]})});var Ye};var V=o(24879),Y=o(85555),G=o(16253),Z=o(22829),X=o(7325),K=o(42751),J=o(16351),q=o(44318),Q=(o(50872),o(13075)),ee=o(11671),te=o(45745),oe=o(26855),ie=o(67056),ne=o(23490),re=o(99113),se=o(4396),ae=o(54024),le=o(53354),de=(o(48578),o(50114)),ce=o(47977),pe=o(43081);const ue=o(98635),xe=(0,oe.Ay)(e=>{let{className:t,...o}=e;return(0,M.jsx)(ie.A,{...o,classes:{popper:t}})})(e=>{let{theme:t}=e;return{[`& .${ne.A.tooltip}`]:{backgroundColor:"#222222 !important",color:"#ffffff",boxShadow:t.shadows[1],fontSize:11,margin:"0px"}}}),me=["#3c55f3","#fa87da","#2cd983","#f6bd50"];function he(e,t){const o=new Date-new Date(e),i=Math.floor(o/1e3),n=Math.floor(i/60),r=Math.floor(n/60),s=Math.floor(r/24);return t?i<60?t("community.post.timeDelta.justNow"):n<60?t("community.post.timeDelta.minutesAgo",{minutes:n}):r<24?t("community.post.timeDelta.hoursAgo",{hours:r}):t("community.post.timeDelta.daysAgo",{days:s}):i<60?"Just now":n<60?`${n}m ago`:r<24?`${r}h ago`:`${s}d ago`}const ge=e=>e?"all"===e.toLowerCase()?"All":e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "):"",fe=i.memo(function(e){let{video_src:t,pre_upload:o}=e;(0,i.useEffect)(()=>{try{n.current.src({type:"video/mp4",src:o?t:ue.CONTENT_CLOUDFRONT+t}),window.innerWidth<900&&n.current.play()}catch(e){}},[t]);const n=i.useRef(null);return(0,M.jsx)("div",{className:"video-container",style:{borderRadius:"8px !important",overflow:"hidden",height:"100%",width:"100%"},children:(0,M.jsx)("div",{className:"video-container",style:{width:"100%",height:"100%"},children:(0,M.jsx)(w.A,{style:{height:"56.25vw",width:"100vw",zIndex:"9999"},onReady:e=>{n.current=e,e.options().autoplay&&e.pause()},options:{autoplay:!0,controls:!0,muted:!1,fluid:!0,width:"100%",height:"100%",loop:!0,preload:"auto",playbackRates:[.25,.5,1,1.5,2],sources:[{src:o?t:ue.CONTENT_CLOUDFRONT+t,type:"video/mp4"}],poster:""},page:"influencer_banner"})})})}),ye=i.memo(function(e){let{video_src:t}=e;const{t:o}=(0,n.Bd)();return(0,M.jsx)("div",{className:"video-container",style:{borderRadius:"8px !important",overflow:"hidden",height:"100%",width:"100%"},children:(0,M.jsx)("div",{className:"video-container",style:{width:"100%",height:"100%"},children:(0,M.jsx)("div",{style:{width:"100%",height:"100%",aspectRatio:"16/9",borderRadius:"8px",overflow:"hidden"},children:(0,M.jsx)("iframe",{position:"absolute",border:"none",width:"100%",height:"100%",src:"https://www.youtube-nocookie.com/embed/"+t+"?si=zjwU1BLkbSYRvl1j?rel=0&amp;modestbranding=1",title:o("dashboard.widgets.articles.youtubePlayer"),frameborder:"0",allow:"accelerometer; encrypted-media; gyroscope; fullscreen;
1",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:!0})})})})}),be=i.memo(function(e){let{video_src:t}=e;return(0,M.jsx)("div",{className:"video-container",style:{borderRadius:"8px !important",overflow:"hidden",height:"100%",width:"100%"},children:(0,M.jsx)("div",{className:"video-container",style:{width:"100%",height:"100%"},children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0"},children:(0,M.jsx)("iframe",{src:"https://www.loom.com/embed/"+t+"?sid=879009a9-7ce5-4bc0-84cc-dc6633dc222c?autoplay=false",frameborder:"0",webkitallowfullscreen:!0,mozallowfullscreen:!0,allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})})})}),_e=i.memo(function(e){let{video_src:t}=e;return(0,M.jsx)("div",{className:"video-container",style:{borderRadius:"8px !important",overflow:"hidden",height:"100%",width:"100%"},children:(0,M.jsx)("div",{className:"video-container",style:{width:"100%",height:"100%"},children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0"},children:(0,M.jsx)("iframe",{src:"https://player.vimeo.com/video/"+t,frameborder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})})})}),ve=i.memo(function(e){let{video_src:t}=e;const o=null!==t&&void 0!==t&&t.startsWith("ch")?"https://player.twitch.tv/?channel="+t.slice(2)+"&parent="+window.location.hostname:null!==t&&void 0!==t&&t.startsWith("c")?"https://clips.twitch.tv/embed?clip="+t.slice(1)+"&parent="+window.location.hostname:t?"https://player.twitch.tv/?video="+t.slice(1)+"&parent="+window.location.hostname:"";return(0,M.jsx)("div",{className:"video-container",style:{borderRadius:"8px !important",overflow:"hidden",height:"100%",width:"100%"},children:(0,M.jsx)("div",{className:"video-container",style:{width:"100%",height:"100%"},children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0"},children:(0,M.jsx)("iframe",{src:o,frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})})})}),we=i.memo(function(e){let{video_src:t}=e;return(0,M.jsx)("div",{className:"video-container",style:{borderRadius:"8px !important",overflow:"hidden",height:"100%",width:"100%"},children:(0,M.jsx)("div",{className:"video-container",style:{width:"100%",height:"100%"},children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0"},children:(0,M.jsx)("iframe",{src:"https://fast.wistia.com/embed/iframe/"+t+"?autoPlay=false",frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})})})}),je=i.memo(function(e){let{video_src:t,type:o,id:i,handleFullscreenOpen:n,fullscreen:r}=e;return(0,M.jsx)("div",{className:"video-container",style:{borderRadius:"8px !important",overflow:"hidden",height:"calc(100vh - 40px)",margin:"auto 0px 0px 0px",width:"100%"},children:(0,M.jsx)("div",{className:"video-container",style:{width:"100%",height:"100vh",overflow:"hidden"},children:(0,M.jsxs)("div",{style:{width:"100%",height:"100vh",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{id:"google_sheet_"+o+"_"+String(i),src:t,style:{display:"block",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("a",{className:"hover_modal_icon",onClick:()=>{n(t,"gos")},children:r?null:(0,M.jsx)(v.C2y,{className:"fullscreen_icon",style:{width:"20px",height:"20px",bottom:"10px",right:"10px"}})})]})})})}),Ce=i.memo(function(e){let{video_src:t,type:o,id:i,handleFullscreenOpen:n,fullscreen:r}=e;return(0,M.jsx)("div",{className:"video-container",style:{borderRadius:"8px !important",overflow:"hidden",height:"calc(100vh - 40px)",margin:"auto 0px 0px 0px",width:"100%"},children:(0,M.jsx)("div",{className:"video-container",style:{width:"100%",height:"100vh",overflow:"hidden"},children:(0,M.jsxs)("div",{style:{width:"100%",height:"100vh",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{id:"google_doc_"+o+"_"+String(i),src:t,style:{display:"block",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("a",{className:"hover_modal_icon",onClick:()=>{n(t,"god")},children:r?null:(0,M.jsx)(v.C2y,{className:"fullscreen_icon",style:{width:"20px",height:"20px",bottom:"10px",right:"10px"}})})]})})})}),Se=i.memo(function(e){let{image_src:t,pre_upload:o,fullscreen:r,post_type:s,handleFullscreenOpen:a}=e;const{t:l}=(0,n.Bd)(),[d,c]=(0,i.useState)({width:0,height:0});return(0,i.useEffect)(()=>{const e=new Image;e.src=o||r?t:ue.CONTENT_CLOUDFRONT+t,e.onload=()=>
1{c({width:e.naturalWidth,height:e.naturalHeight})}},[t,o,r]),(0,M.jsxs)("div",{style:{position:"relative",maxHeight:"100vh"},children:[(0,M.jsx)("img",{src:o||r?t:ue.CONTENT_CLOUDFRONT+t,alt:l("common.selectedImage"),style:{maxWidth:"100vw",maxHeight:"100vh",height:r&&d.height>window.innerHeight?"100vh":"auto",width:r?d.height<window.innerWidth?"100vw":"auto":"100%",objectFit:"contain",borderRadius:r?"0px":"6px",overflow:"hidden",margin:"0px 0px 0px 0px"}}),(0,M.jsx)("a",{className:"hover_modal_icon",onClick:()=>{a(o?t:ue.CONTENT_CLOUDFRONT+t,"img")},children:r?null:(0,M.jsx)(v.C2y,{className:"fullscreen_icon",style:{width:"20px",height:"20px",bottom:"10px",right:"10px"}})})]})}),ke=i.memo(function(e){let{pdf_src:t,pre_upload:o,fullscreen:i,content_width_type:n,handleFullscreenPDFOpen:r}=e;return(0,M.jsxs)("div",{style:{position:"relative"},children:[(0,M.jsx)(S.A,{pdfFile:o||i?t:ue.CONTENT_CLOUDFRONT+t,content_width_type:n}),(0,M.jsx)("a",{className:"hover_modal_icon",onClick:()=>{r(o?t:ue.CONTENT_CLOUDFRONT+t,"pdf")},children:i?null:(0,M.jsx)(v.C2y,{className:"fullscreen_icon",style:{width:"20px",height:"20px",bottom:"post"===n?"50px":"40px",right:"10px",zIndex:"999"}})})]})}),Ae=i.memo(function(e){let{pdf_src:t,pre_upload:o,fullscreen:i,content_width_type:n,handleFullscreenPDFOpen:r}=e;return(0,M.jsx)("div",{style:{position:"relative"},children:(0,M.jsx)(S.A,{pdfFile:t,content_width_type:"fullscreen",width:window.innerWidth,height:window.innerHeight})})}),Fe=i.memo(function(e){let{audio_src:t,pre_upload:o}=e;return(0,M.jsx)("div",{className:"props.image_container",style:{position:"relative"},children:(0,M.jsx)(C(),{className:"react-player",src:o?t:ue.CONTENT_CLOUDFRONT+t,controls:!0,style:{width:"100%",margin:"0px 0px 16px 0px",borderRadius:"0px"}})})}),De=e=>{let{post_index:t,username:o,display_name:u,user_icon:v,current_user_icon:w,influencer_name:j,time:S,subscription:k,text:E,photos:W,video:I,threads:B,tags_list:L,n_threads:N,n_comments:O,loadAdditionalThreads:U,post_id:$,deletePost:H,submitThread:oe,deleteThread:ie,submitComment:ne,deleteComment:De,content_type:ze,content_file:Te,editPost:Ee,subscriber_tier:We,editThread:Re,editComment:Me,post_like_count:Ie,post_user_value_count:Pe,loadAdditionalComments:Be,postLikeChange:Le,post_tier:Ne,influencer_tier_names:Oe={},threadLikeChange:Ue,commentLikeChange:$e,current_username:He,influencer_info:Ve,OpenSubscribePopup:Ye,OpenWaitingListPopup:Ge,current_subscription_tier:Ze,CloseSubscribePopup:Xe,CloseWaitingListPopup:Ke,currency:Je,current_tier:qe,redirectCallback:Qe,resetThreadTextId:et,resetCommentTextId:tt,setResetThreadTextId:ot,setResetCommentTextId:it,resetPostEditTextId:nt,setResetPostEditTextId:rt,resetThreadEditTextId:st,setResetThreadEditTextId:at,resetCommentEditTextId:lt,setResetCommentEditTextId:dt,snackbarMsgOuter:ct,snackbarOpenOuter:pt,snackbarColorOuter:ut,setSnackbarOpenOuter:xt,snackbarTypeOuter:mt,onClose:ht,windowWidth:gt,event_time:ft,scheduled_date:yt,community_post_title:bt,setSelectedFileThread:_t,setSelectedPreviewUrlThread:vt,setSelectedPreviewIdThread:wt,selectedPreviewIdThread:jt,setSelectedPreviewIdComment:Ct,selectedPreviewIdComment:St,setFileTypeThread:kt,setShowPostButtonThread:At,setIsMediaAttachedThread:Ft,setSelectedFileComment:Dt,setSelectedPreviewUrlComment:zt,setFileTypeComment:Tt,setShowPostButtonComment:Et,setIsMediaAttachedComment:Wt,isMediaAttachedThread:Rt,selectedFileThread:Mt,selectedPreviewUrlThread:It,fileTypeThread:Pt,showPostButtonThread:Bt,isMediaAttachedComment:Lt,selectedFileComment:Nt,selectedPreviewUrlComment:Ot,fileTypeComment:Ut,showPostButtonComment:$t,isMediaAttachedEdit:Ht,selectedFileEdit:Vt,selectedPreviewUrlEdit:Yt,fileTypeEdit:Gt,setSelectedFileEdit:Zt,setSelectedPreviewUrlEdit:Xt,setFileTypeEdit:Kt,setIsMediaAttachedEdit:Jt,setEmbedUrlIsOpen:qt,setSnackbarEmbed:Qt,setEmbedUrlType:eo,setDocModalOpen:to,setSnackbarOpenDoc:oo,setDocType:io,setActiveDocFileType:no,setMeetingModalOpen:ro,setMeetingType:so,setSnackbarOpenMeeting:ao,setMeetingTimeComment:lo,embedUrlKeyThread:co,embedUrlKeyComment:po,link:uo,setPostMeetingTime:xo,setUpdateEditPostData:mo,snackbarSeverityOuter:ho,snackbarPreMsgClick:go,snackbarPostMsgClick:fo,snackbarTextClick:yo,saveFile:bo,recordedFileFormat:_o,snackbarOpenClick:vo,snackbarSeverityClick:wo,snackbarColorClick:jo,setSnackbarOpenClick:Co,setMeetingTimeEditPost:So,handleUpdatePinnedPost:ko,handleRemovePinnedPost:Ao,pinnedPost:Fo,isPinnedPost:Do,getBrandColor:zo,currentTabInfo:To,editPostTags:Eo,setEditPostTags:Wo,is_me:R
1o,meetingImageEdit:Mo,setMeetingImageEdit:Io,meetingImageFileNameEdit:Po,setMeetingImageFileNameEdit:Bo,meetingType:Lo,onEditCategory:No,openInEditMode:Oo,late_payment:Uo,stripe_customer_id2:$o}=e;const{t:Ho}=(0,n.Bd)(),Vo=!!(yt&&new Date(yt)>new Date),[Yo,Go]=(0,i.useState)(void 0),[Zo,Xo]=(0,i.useState)(""),Ko=void 0===Yo?Vo?new Date(yt):void 0:null===Yo?void 0:Yo,[Jo,qo]=(0,i.useState)(He),[Qo,ei]=(0,i.useState)(0),[ti,oi]=(0,i.useState)(!1),[ii,ni]=(0,i.useState)(""),[ri,si]=i.useState(!1),[ai,li]=(0,i.useState)(null),[di,ci]=(0,i.useState)(-1),[pi,ui]=(0,i.useState)(""),[xi,mi]=(0,i.useState)(""),[hi,gi]=(0,i.useState)(""),[fi,yi]=(0,i.useState)(!1),[bi,_i]=(0,i.useState)([]),[vi,wi]=(0,i.useState)(!1),[ji,Ci]=(0,i.useState)(null),[Si,ki]=(0,i.useState)(!1),[Ai,Fi]=(0,i.useState)(null),[Di,zi]=(0,i.useState)(""),[Ti,Ei]=(0,i.useState)(""),[Wi,Ri]=(0,i.useState)(""),[Mi,Ii]=(0,i.useState)(""),[Pi,Bi]=(0,i.useState)(""),[Li,Ni]=(0,i.useState)(""),[Oi,Ui]=(0,i.useState)(""),[$i,Hi]=(0,i.useState)(""),[Vi,Yi]=(0,i.useState)(""),[Gi,Zi]=(0,i.useState)(""),[Xi,Ki]=(0,i.useState)(""),[Ji,qi]=(0,i.useState)(""),[Qi,en]=(0,i.useState)(""),[tn,on]=(0,i.useState)(""),[nn,rn]=(0,i.useState)(""),[sn,an]=(0,i.useState)(""),[ln,dn]=(0,i.useState)(""),[cn,pn]=(0,i.useState)(""),[un,xn]=(0,i.useState)(""),[mn,hn]=(0,i.useState)(""),gn=(0,i.useMemo)(()=>Array.isArray(L)?L.filter(e=>"string"===typeof e&&""!==e.trim()):[],[L]),fn=(0,i.useMemo)(()=>{const e=["all"];To&&Array.isArray(To.tags)&&To.tags.map(e=>"string"===typeof e?e.trim().toLowerCase():"").filter(e=>e);To&&Array.isArray(To.tags)&&To.tags.length>
10&&To.tags.forEach(t=>{"string"===typeof t&&""!==t.trim()&&e.push(t.trim())}),Array.isArray(Eo)&&Eo.length>0&&Eo.forEach(t=>{if("string"===typeof t&&""!==t.trim()&&"all"!==t.trim().toLowerCase()){const o=t.trim().toLowerCase();e.some(e=>e.toLowerCase()===o)||e.push(t.trim())}});const t=new Map;e.forEach(e=>{if("string"!==typeof e)return;const o=e.trim();if(!o)return;const i=o.toLowerCase();t.has(i)||t.set(i,o)});const o=Array.from(t.values());return o.length>0?o:["all"]},[To,Eo]),yn=(0,i.useMemo)(()=>Array.isArray(Eo)&&Eo.length>0&&Eo[0]?Eo[0]:gn.length>0?gn[0]:"all",[Eo,gn]),bn=(0,i.useMemo)(()=>gn.find(e=>e&&"all"!==e.toLowerCase())||null,[gn]),[_n,vn]=(0,i.useState)(!1),[wn,jn]=(0,i.useState)(!1),[Cn,Sn]=(0,i.useState)(""),[kn,An]=(0,i.useState)(0),[Fn,Dn]=(0,i.useState)(""),[zn,Tn]=(0,i.useState)(""),[En,Wn]=(0,i.useState)(!1),[Rn,Mn]=(0,i.useState)(""),In=(0,i.useRef)(!1);(0,i.useEffect)(()=>("function"===typeof mo&&mo(()=>Sn),()=>{"function"===typeof mo&&mo(null)}),[mo]),(0,i.useEffect)(()=>{Oo&&void 0!==E&&null!==E&&$&&null!==t&&void 0!==t&&""!==t&&!In.current&&(In.current=!0,setTimeout(()=>{Bn(E,$,t,Te,L)},100)),Oo||(In.current=!1)},[Oo,E,$,t,Te,L]);const Pn=e=>{Mn(e),Wn(!0)},Bn=function(e,t,o,i){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];Sn(e),Dn(t),Tn(o),Go(Vo?new Date(yt):void 0),Xo("");const r=Boolean(i),s=["vey","vel","vev","vtw","vwi"].includes(ze);if(Xt(["mot","mgm","mzm","mmt","gos","god"].includes(ze)?uo||"":r?s?i:ue.CONTENT_CLOUDFRONT+i:""),Kt(ze),Jt(r),["mot","mgm","mzm","mmt"].includes(ze)&&ft&&("function"===typeof xo&&xo(ft),"function"===typeof So&&So(ft),"function"===typeof Io&&i&&Io(ue.CONTENT_CLOUDFRONT+i),"function"===typeof Bo&&i&&Bo("")),"function"===typeof Wo){const e=Array.isArray(n)?n.filter(e=>"string"===typeof e&&""!==e.trim()):[];e.length>0?Wo(e):Wo(["all"])}vn(!0),setTimeout(()=>{jn(!0)},10)},[Ln,Nn]=(0,i.useState)(!1),[On,Un]=(0,i.useState)(""),[$n,Hn]=(0,i.useState)(""),[Vn,Yn]=(0,i.useState)(""),Gn=(e,t,o,i,n,r,s)=>{Nn(!0),Un(e),Hn(t),Yn(i),Tn(o);const a=Boolean(n),l=["vey","vel","vev","vtw","vwi"].includes(r);Xt(["mot","mgm","mzm","mmt"].includes(r)?s||"":a?l?n:ue.CONTENT_CLOUDFRONT+n:""),Kt(r),n&&Jt(!0)},[Zn,Xn]=(0,i.useState)(!1),[Kn,Jn]=(0,i.useState)(""),[qn,Qn]=(0,i.useState)(""),er=(e,t)=>{Jn(e),Qn(t),Xn(!0)},[tr,or]=(0,i.useState)(!1),[ir,nr]=(0,i.useState)(""),[rr,sr]=(0,i.useState)(""),[ar,lr]=(0,i.useState)(""),dr=(e,t,o,i,n,r,s,a)=>{nr(e),or(!0),sr(t),Tn(o),Yn(i),lr(n);const l=Boolean(r),d=["vey","vel","vev","vtw","vwi"].includes(s);Xt(["mot","mgm","mzm","mmt"].includes(s)?a||"":l?d?r:ue.CONTENT_CLOUDFRONT+r:""),Kt(s),r&&Jt(!0)},cr=(e,t,o,i)=>{ki(!0),Fi(e.currentTarget),zi(t),Ei(o),Ri(i)},pr=(e,t,o,i,n,r)=>{ki(!0),Fi(e.currentTarget),zi(t),Ii(o),Bi(i),Ni(n),Un(r)},ur=()=>{jn(!1),setTimeout(()=>{vn(!1),Dt(""),Xt(""),"function"===typeof Wo&&Wo(["all"]),Mo&&Mo.startsWith("blob:")&&URL.revokeObjectURL(Mo),"function"===typeof Io&&Io(""),"function"===typeof Bo&&Bo("")},300)},xr=(e,t,o,i,n,r,s)=>{ki(!0),Fi(e.currentTarget),zi(t),Bi(i),Ni(n),Ui(o),Hi(r),nr(s)},mr=()=>{ki(!1),Fi(null),zi(""),Ei(""),Ri(""),Ii(""),Bi(""),Ni("")},hr=(e,t)=>{ci(e),mi(""),gi(""),ui("")},gr=e=>{e.target.value.length>=500?(Vr("var(--danger-color)"),$r("error"),Or(Ho("community.post.maxCharLimit500")),Lr(!0)):mi(e.target.value)},fr=(e,t)=>{if(!(""===e&&"txt"===t||null===e&&"txt"===t||void 0===e&&"txt"===t))return!0;Pr("var(--danger-color)","error",Ho("community.post.errorUpdatingContent"))},yr=()=>{const e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=e=>{const t=e.target.files[0];if("image/png"===t.type||"image/jpg"===t.type||"image/jpeg"===t.type){const e=URL.createObjectURL(t);Zt(t),Xt(e),Kt("img"),Jt(!0)}else $r("error"),Lr(!0),Vr("var(--danger-color)"),Or(Ho("community.post.unsupportedImageType"))},e.click()},br=()=>{_t(""),vt(""),kt("txt"),Ft(!1),At(!1),wt("")},_r=()=>{Dt(""),zt(""),Tt("txt"),Wt(!1),Et(!1),Ct("")},vr=()=>{Zt(""),Xt(""),Kt("txt"),Jt(!1)},wr=e=>{Ci(e)},jr=()=>{Ci(null)},Cr=e=>{li(e),si(!0)},[Sr,kr]=(0,i.useState)(1),[Ar,Fr]=(0,i.useState)(Ne);(0,i.useEffect)(()=>{Fr(Ne)},[Ne]);const[Dr,zr]=(0,i.useState)(null);(0,i.useEffect)(()=>{""===He?(zr(!1),Rr(Ho("community.post.loginToJoin"))):qe>
1=Ar||0===Ar?(Rr(Ho("community.post.joinConversation")),zr(!0)):(zr(!1),Rr(Ho("community.post.upgradeToJoin")))},[Ne,He]);const[Tr,Er]=(0,i.useState)("");(0,i.useEffect)(()=>{Er(Oe[Ne])},[Ne]);const[Wr,Rr]=(0,i.useState)(""),[Mr,Ir]=(0,i.useState)();(0,i.useEffect)(()=>{Ir(O)},[O]);const Pr=(e,t,o)=>{Vr(e),$r(t),Or(o),Lr(!0)},[Br,Lr]=(0,i.useState)(!1),[Nr,Or]=(0,i.useState)(""),[Ur,$r]=(0,i.useState)("false"),[Hr,Vr]=(0,i.useState)("false"),Yr=e=>en(e.currentTarget),Gr=()=>en(null),Zr=()=>Zi(null),Xr=e=>xn(e.currentTarget),Kr=()=>xn(null),Jr=()=>on(null),qr=()=>hn(null),Qr=e=>qi(e.currentTarget),es=()=>qi(null),ts=()=>Yi(null),os=e=>pn(e.currentTarget),is=()=>pn(null),ns=e=>rn(e.currentTarget),rs=()=>rn(null),ss=e=>{const t=document.createElement("input");t.type="file",t.accept="audio/*",t.onchange=t=>{const o=t.target.files[0],i=URL.createObjectURL(o);Dt(o),zt(i),Tt("aud"),Et(!0),Wt(!0),Ct(e)},t.click()},as=()=>{const e=document.createElement("input");e.type="file",e.accept="video/*",e.onchange=e=>{const t=e.target.files[0];if("video/mp4"===t.type||"video/quicktime"===t.type){const e=URL.createObjectURL(t);Zt(t),Xt(e),Kt("vid"),Jt(!0)}},e.click()},ls=()=>{const e=document.createElement("input");e.type="file",e.accept="audio/*",e.onchange=e=>{const t=e.target.files[0],o=URL.createObjectURL(t);Zt(t),Xt(o),Kt("aud"),Jt(!0)},e.click()},ds=()=>{const e=document.createElement("input");e.type="file",e.accept="application/pdf",e.onchange=e=>{const t=e.target.files[0];if(t.size/1024/1024<=5)if("application/pdf"===t.type){const e=URL.createObjectURL(t);Zt(t),Xt(e),Kt("pdf"),Jt(!0)}else $r("error"),Lr(!0),Vr("var(--danger-color)"),Or(Ho("community.post.unsupportedPdf"));else $r("error"),Lr(!0),Vr("var(--danger-color)"),Or(Ho("community.post.pdfSizeLimit"))},e.click()};(0,i.useEffect)(()=>{qo(He)},[He]),(0,i.useEffect)(()=>{$===et&&(ni(""),ot(null))},[et]),(0,i.useEffect)(()=>{$===tt&&(ci(-1),mi(""),gi(""),yi(!1),it(null))},[tt]),(0,i.useEffect)(()=>{$===nt&&(vn(!1),rt(null))},[nt]),(0,i.useEffect)(()=>{$===st&&(Nn(!1),at(null))},[st]),(0,i.useEffect)(()=>{$===lt&&(or(!1),dt(null))},[lt]);he(S,Ho);return(0,M.jsxs)("div",{id:"post"+$,style:{padding:"20px 0px 10px 0px",backgroundColor:"#fff",borderRadius:"8px",position:"relative"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"15px"},children:[(0,M.jsx)(g.A,{alt:He,src:v,style:{marginRight:"10px"}}),(0,M.jsxs)("div",{children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[(0,M.jsx)(l.A,{variant:"subtitle1",style:{fontWeight:"bold",marginRight:"2px"},children:(0,ae.A)(u,20)}),(0,M.jsxs)("div",{style:{minWidth:0===Ne?"150px":"Creator"===k?"300px":"100px",display:"flex",marginBottom:"2px"},children:["Creator"===k&&(0,M.jsx)(y.IIi,{style:{fontSize:"16px",color:zo()}}),0===Ne?"":(0,M.jsx)("span",{style:{margin:"0px 5px 0px 0px",display:"inline-flex",alignItems:"center",backgroundColor:"#e1e4ff",color:"var(--brand-color)",padding:"4px 8px",fontSize:"11px",fontWeight:"600",borderRadius:"50px"},children:window.innerWidth<400?(0,M.jsx)(M.Fragment,{children:(0,ae.A)(Tr,16)}):(0,M.jsx)(M.Fragment,{children:window.innerWidth<900?(0,M.jsx)(M.Fragment,{children:(0,ae.A)(Tr,20)}):(0,M.jsx)(M.Fragment,{children:(0,ae.A)(Tr,40)})})})]})]}),(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"2px",flexWrap:"wrap"},children:[(0,M.jsx)(l.A,{variant:"body2",color:"textSecondary",sx:{fontSize:"12px",marginTop:"-2px"},children:he(S,Ho)}),bn&&(0,M.jsx)(l.A,{variant:"body2",color:"textSecondary",sx:{fontSize:"12px"},children:ge(bn)})]})]})]}),Fo?(0,M.jsx)(M.Fragment,{children:Jo===j?(0,M.jsx)(xe,{title:Ho("community.post.removePin"),placement:"bottom",children:(0,M.jsx)("div",{style:{position:"absolute",top:"25px",right:"30px",display:"flex",color:"var(--brand-color)",flexDirection:"column",alignItems:"center",cursor:"pointer"},onClick:()=>{Ao($,t)},children:(0,M.jsx)(b.Yn5,{style:{fontSize:"18px"}})})}):(0,M.jsx)(xe,{title:Ho("community.post.pinnedPost"),placement:"bottom",children:(0,M.jsx)("div",{style:{position:"absolute",top:"25px",right:"txt"===ze&&Jo!==o?"0px":"30px",display:"flex",color:"var(--brand-color)",flexDirection:"column",alignItems:"center"},children:(0,M.jsx)(b.Yn5,{style:{fontSize:"18px"}})})})}):null,""===Jo?null:(0,M.jsx)(M.Fragment,{children:Jo===o?(0,M.jsx)("div",{style:{position:"absolute",top:"25px",right:"80px",display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer",zIndex:1001},onClick:e=>cr(e,"postMenu",$,t),children:(0,M.jsx)(ee.IXD,{})}):(0,M.jsx)(M.Fragment,{children:Jo===j?(0,M.jsx)("div",{style:{position:"absolute",top:"25px",right:"80px",display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer",zIndex:1001},onClick:e=>cr(e,"postMenuInfluencer",$,t),children:(0,M.jsx)(ee.IXD,{})}):null})}),ht&&(!gt||gt<900)&&(0,M.jsx)("div",{style:{position:"absolute",top:"22px",right:"0px",display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer",width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.1)",justifyContent:"center",transition:"all 0.2s ease",zIndex:1e3},onClick:ht,children:(0,M.jsx)(Z.$8F,{style:{fontSize:"14px",color:"#666",transition:"color 0.2s ease"}})}),ht&&(0,M.jsx)("div",{style:{position:"absolute",top:"22px",right:"0px",display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer",width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.1)",justifyContent:"center",transition:"all 0.2s ease",zIndex:1e3},onClick:ht,children:(0,M.jsx)(Z.$8F,{style:{fontSize:"14px",color:"#666",transition:"color 0.2s ease",backgroundColor:"none"}})}),(0,M.jsxs)("div",{style:{position:"absolute",top:"22px",right:"30px",display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer",borderRadius:"50px",backgroundColor:1===Pe?"#eaebfd":"#fff",padding:"2px 6px",zIndex:1001},onClick:""===Jo?e=>Ye(e,Ve.icon_image_path,Ve.influencer,Ve.current_tier,"",Ve.influencer_name,Je):()=>{Le($,t),0===Pe&&Cr($)},children:[(0,M.jsx)("span",{style:{cursor:"pointer",fontSize:"16px",margin:"0px 3px 0px 0px",color:1===Pe?"var(--brand-color)":"#222"},children:"\ud83d\udc4d"}),(0,M.jsx)(M.Fragment,{children:ri&&ai===$&&(0,M.jsx)(_.A,{zIndex:1e4,onComplete:()=>{li(""),si(!1)},duration:2300,force:.15,particleCount:10,width:200,particleSize:6,colors:me})}),(0,M.jsx)(l.A,{variant:"subtitle1",style:{fontWeight:"bold",fontSize:"15px",marginBottom:"0px",margin:"0px",lineHeight:"20px",color:1===Pe?"var(--brand-color)":"#222"},children:Ie})]}),(0,M.jsx)(l.A,{className:"text_content",variant:"body1",style:{marginBottom:"16
1px",wordBreak:"break-word",whiteSpace:"pre-wrap"},dangerouslySetInnerHTML:{__html:E}}),(0,M.jsx)("div",{children:(0,M.jsxs)(M.Fragment,{children:[(Te||uo&&["mot","mzm","mgm","mmt","gos","god"].includes(ze))&&(0,M.jsxs)("div",{style:{position:"relative",padding:"0px 0px 0px 0px"},children:["img"===ze&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(Se,{image_src:Te,handleFullscreenOpen:er})}),"vid"===ze&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(fe,{video_src:Te})})}),"vey"===ze&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(ye,{video_src:Te})})}),"vel"===ze&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(be,{video_src:Te})})}),"vev"===ze&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(_e,{video_src:Te})})}),"vtw"===ze&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(ve,{video_src:Te})})}),"vwi"===ze&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(we,{video_src:Te})})}),["gos","god"].includes(ze)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px",marginBottom:"16px",position:"relative"},children:["gos"===ze&&(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{width:"24px",marginRight:"16px"}}),"god"===ze&&(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["gos"===ze&&"Google Sheets","god"===ze&&"Google Docs"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>er((0,R.g)(uo),ze),rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:"Open"})})]}),"aud"===ze&&(0,M.jsx)("div",{style:{position:"relative"},children:(0,M.jsx)(Fe,{audio_src:Te})}),"pdf"===ze&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(ke,{fullscreen:Zn,pdf_src:Te,content_width_type:"post",handleFullscreenPDFOpen:Pn})})]}),uo&&["mot","mgm","mzm","mmt"].includes(ze)&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{style:{position:"relative",padding:"0px"},children:(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",position:"relative",borderRadius:"8px",padding:"0 16px",marginBottom:"16px"},children:["mot"===ze&&(0,M.jsx)(K.AnD,{style:{width:"24px",marginRight:"16px",color:"#6C89AF"}}),"mgm"===ze&&(0,M.jsx)("img",{src:D,alt:Ho("community.composer.googleMeet"),style:{width:"24px",marginRight:"16px"}}),"mmt"===ze&&(0,M.jsx)("img",{src:F,alt:Ho("community.composer.microsoftTeams"),style:{width:"24px",marginRight:"16px"}}),"mzm"===ze&&(0,M.jsx)("img",{src:A,alt:Ho("profile.zoom"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1,display:"flex",alignItems:"center"},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["mot"===ze&&"Meeting","mgm"===ze&&"Google Meet","mmt"===ze&&"Microsoft Teams","mzm"===ze&&"Zoom"]})}),(0,M.jsx)("span",{style:{display:"inline-flex",marginLeft:"auto"},children:(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:e=>{window.open((0,R.g)(uo),"_blank","noopener,noreferrer")},sx:{padding:"5px 7px",display:"inline-block",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:Ho("community.post.join")})})})]})}),(0,M.jsx)("div",{style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",marginTop:"-5px",marginBottom:"16
1px"},children:(0,M.jsx)(m.A,{variant:"outlined",size:"small",onClick:e=>{e.stopPropagation(),(()=>{if(!ft||!uo||!bt)return;const e=new Date(ft);if(isNaN(e.getTime()))return;const t=e=>`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,"0")}${String(e.getUTCDate()).padStart(2,"0")}T${String(e.getUTCHours()).padStart(2,"0")}${String(e.getUTCMinutes()).padStart(2,"0")}${String(e.getUTCSeconds()).padStart(2,"0")}Z`,o=e=>e?e.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\n/g,"\\n"):"",i=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//WithMe//Event//EN","BEGIN:VEVENT",`DTSTART:${t(e)}`,`DTEND:${t(new Date(e.getTime()+36e5))}`,`SUMMARY:${o(bt)}`,`DESCRIPTION:${o(E||"")}\\n${o(uo)}`,`LOCATION:${o(uo)}`,`URL:${uo}`,"STATUS:CONFIRMED","SEQUENCE:0","BEGIN:VALARM","TRIGGER:-PT15M","ACTION:DISPLAY",`DESCRIPTION:Reminder: ${o(bt)}`,"END:VALARM","END:VEVENT","END:VCALENDAR"].join("\r\n"),n=new Blob([i],{type:"text/calendar;charset=utf-8"}),r=URL.createObjectURL(n),s=document.createElement("a");s.href=r,s.download=`${bt.replace(/[^a-z0-9]/gi,"_").toLowerCase()}.ics`,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(r)})()},startIcon:(0,M.jsx)(f.r2j,{style:{fontSize:"14px"}}),sx:{borderColor:"#E4EBF6",color:"#1D1D1D",textTransform:"none",fontWeight:"500",fontSize:"11px",padding:"4px 8px",borderRadius:"6px",minWidth:"auto",height:"24px","&:hover":{borderColor:"#C7D1DE",backgroundColor:"#F9FAFB"}},children:Ho("community.post.addToCalendar")})}),Te&&(0,M.jsx)(a.A,{sx:{margin:"16px 0px 0px 0px"},children:(0,M.jsx)(Se,{image_src:Te,handleFullscreenOpen:er})})]})]})}),(0,M.jsxs)("div",{style:{borderTop:"1px solid #f5f5f5",paddingTop:"10px"},children:[(0,M.jsxs)(Y.A,{children:[N>B.length?(0,M.jsx)(m.A,{sx:{backgroundColor:"transparent",fontSize:"12px",padding:"0",margin:"0px 0px 10px 0px",textAlign:"left",textTransform:"uppercase",color:"var(--brand-color)",minWidth:"0px","&:hover":{textDecoration:"underline",backgroundColor:"#fff"},".MuiButton-text":{textTransform:"uppercase"}},onClick:()=>{U($,t)},children:"Load previous"}):"",[...B].reverse().map((e,o)=>{const n=B.length-1-o;return(0,M.jsx)("div",{style:{display:"flex",flexDirection:"column",margin:"5px 0px",boxSizing:"border-box"},children:(0,M.jsxs)("div",{style:{display:"flex",marginBottom:"10px"},children:[(0,M.jsx)(g.A,{alt:He,src:e.user_icon,style:{margin:"8px 10px 0px 0px"}}),(0,M.jsxs)("div",{style:{width:"100%",boxSizing:"border-box"},children:[(0,M.jsxs)("div",{style:{backgroundColor:"#F5F9FF",borderRadius:"10px",boxSizing:"border-box",padding:"8px 10px",position:"relative"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,M.jsx)(l.A,{variant:"subtitle2",style:{fontWeight:"bold",marginRight:"6px"},children:(0,ae.A)(e.user_display_name,20)}),window.innerWidth>450?(0,M.jsx)(l.A,{variant:"body2",color:"textSecondary",sx:{fontSize:"12px",marginTop:"-2px"},children:he(e.time,Ho)}):null]}),window.innerWidth<=450?(0,M.jsx)(l.A,{variant:"body2",color:"textSecondary",sx:{fontSize:"12px",marginTop:"0px"},children:he(e.time,Ho)}):null,(0,M.jsx)(l.A,{className:"text_content",variant:"body2",style:{width:"90%",minWidth:"90%",maxWidth:"90%",wordBreak:"break-word"},children:(0,M.jsx)(X.A,{options:{target:"_blank"},children:e.text.split("\n").map((e,t)=>(0,M.jsxs)(i.Fragment,{children:[e,(0,M.jsx)("br",{})]},t))})}),(0,M.jsxs)(M.Fragment,{children:[""===Jo?null:(0,M.jsx)(M.Fragment,{children:Jo===e.user?(0,M.jsx)("div",{style:{position:"absolute",top:"12px",right:"45px",display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer"},onClick:o=>pr(o,"threadMenu",e.id,t,n,e.text),children:(0,M.jsx)(ee.IXD,{})}):(0,M.jsx)(M.Fragment,{children:Jo===j?(0,M.jsx)("div",{style:{position:"absolute",top:"12px",right:"45px",display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer"},onClick:o=>pr(o,"threadMenuInfluencer",e.id,t,n,e.text),children:(0,M.jsx)(ee.IXD,{})}):null})}),(0,M.jsx)("div",{children:(0,M.jsx)(M.Fragment,{children:(e.file||["mot","mzm","mgm","mmt","gos","god"].includes(e.content_type)&&e.link)&&(0,M.jsxs)("div",{style:{position:"relative",padding:"10px 0px 0px 0px"},children:["img"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(Se,{image_src:e.f
1ile,handleFullscreenOpen:er})}),"vid"===e.content_type&&(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:(0,M.jsx)(fe,{video_src:e.file})}),"vey"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(ye,{video_src:e.file})})}),"vel"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(be,{video_src:e.file})})}),"vev"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)("iframe",{src:"https://player.vimeo.com/video/"+e.file,frameborder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})}),"vtw"===e.content_type&&e.file&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)("iframe",{src:e.file.startsWith("ch")?"https://player.twitch.tv/?channel="+e.file.slice(2)+"&parent="+window.location.hostname:e.file.startsWith("c")?"https://clips.twitch.tv/embed?clip="+e.file.slice(1)+"&parent="+window.location.hostname:"https://player.twitch.tv/?video="+e.file.slice(1)+"&parent="+window.location.hostname,frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})}),"vwi"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)("iframe",{src:"https://fast.wistia.com/embed/iframe/"+e.file+"?autoPlay=false",frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})}),["gos","god"].includes(e.content_type)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px",marginBottom:"16px",position:"relative"},children:["gos"===e.content_type&&(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{width:"24px",marginRight:"16px"}}),"god"===e.content_type&&(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["gos"===e.content_type&&"Google Sheets","god"===e.content_type&&"Google Docs"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>er((0,R.g)(e.link),e.content_type),rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:"Open"})})]}),"aud"===e.content_type&&(0,M.jsx)("div",{style:{position:"relative"},children:(0,M.jsx)("div",{className:"image_container",style:{position:"relative"},children:(0,M.jsx)(C(),{className:"react-player",src:ue.CONTENT_CLOUDFRONT+e.file,controls:!0,style:{width:"100%",margin:"0px",borderRadius:"0px"}})})}),"pdf"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(ke,{fullscreen:Zn,pdf_src:e.file,content_width_type:"thread",handleFullscreenPDFOpen:Pn})}),e.link&&["mot","mgm","mzm","mmt"].includes(e.content_type)&&(0,M.jsx)("div",{style:{position:"relative",padding:"0px"},children:(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px"},children:["mot"===e.content_type&&(0,M.jsx)(K.AnD,{style:{width:"24px",marginRight:"16px",color:"#6C89AF"}}),"mgm"===e.content_type&&(0,M.jsx)("img",{src:D,alt:Ho("community.composer.googleMeet"),style:{width:"24px",marginRight:"16px"}}),"mmt"===e.content_type&&(0,M.jsx)("img",{src:F,alt:Ho("community.composer.microsoftTeams"),style:{width:"24px",marginRight:"16px"}}),"mzm"===e.content_type&&(0,M.jsx)("img",{src:A,alt:Ho("profile.zoom"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1,display:"flex",alignItems:"center"},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["mot"===e.content_type&&"Meeting","mgm"===e.content_type&&"Google Meet","mmt"===e.content_type&&"Microsoft Teams","mzm"===e.content_type&&"Zoom"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,href:(0,R.g)(e.link),target:"_blank",rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:Ho("community.post.join")})})]})})]})})}),(0,M.jsxs)("div",{style:{position:"absolute",top:"8px",right:"5
1px",display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer",borderRadius:"50px",padding:"2px 6px"},onClick:""===Jo?e=>Ye(e,Ve.icon_image_path,Ve.influencer,Ve.current_tier,"",Ve.influencer_name,Je):()=>{Ue(e.id,t,n),0===e.user_like_value&&Cr(e.id)},children:[(0,M.jsx)("span",{style:{marginBottom:"0px",cursor:"pointer",fontSize:"14px",marginRight:"3px",color:1===e.user_like_value?"var(--brand-color)":"#222"},children:(e.user_like_value,"\ud83d\udc4d")}),(0,M.jsx)(M.Fragment,{children:ri&&ai===e.id&&(0,M.jsx)(_.A,{zIndex:1e4,onComplete:()=>{li(""),si(!1)},duration:2800,force:.15,particleCount:10,width:200,particleSize:6,colors:me})}),(0,M.jsx)(l.A,{variant:"subtitle1",style:{fontWeight:"bold",fontSize:"12px",marginBottom:"0px",margin:"0px",lineHeight:"20px",color:1===e.user_like_value?"var(--brand-color)":"#222"},children:e.like_count})]})]})]}),(0,M.jsx)(m.A,{color:"primary",sx:{backgroundColor:"transparent",fontSize:"12px",padding:"0",margin:"3px 0px 0px 10px",textAlign:"left",textTransform:"uppercase",color:"var(--brand-color)",minWidth:"0px","&:hover":{backgroundColor:"#fff",textDecoration:"underline"},".MuiButton-root MuiButton-text":{textTransform:"uppercase"}},onClick:""===Jo?e=>Ye(e,Ve.icon_image_path,Ve.influencer,Ve.current_tier,"",Ve.influencer_name,Je):()=>{hr(o,e.user),yi(!0)},onMouseEnter:()=>wr(o),onMouseLeave:jr,children:Ho("community.post.reply")}),e.comments&&e.n_comments>0&&(0,M.jsxs)("div",{className:"feed-padding",children:[Sr===e.n_comments||e.n_comments<=1?null:(0,M.jsxs)(m.A,{color:"primary",sx:{backgroundColor:"transparent",fontSize:"12px",padding:"0",margin:"3px 10px 0px 0px",textAlign:"left",textTransform:"uppercase",color:"var(--brand-color)",minWidth:"0px","&:hover":{textDecoration:"underline",backgroundColor:"#fff"},".MuiButton-text":{textTransform:"uppercase"}},onClick:()=>{Be(e.id,t,n),_i([...bi,o]),kr(e.comments.length)},children:["Load previous ",(0,M.jsx)(te.fK4,{style:{fontSize:"14px"}})]}),e.n_comments>1&&(0,M.jsx)(M.Fragment,{children:bi.includes(o)&&(0,M.jsxs)(m.A,{color:"primary",sx:{backgroundColor:"transparent",fontSize:"12px",padding:"0",margin:"3px 0px 0px 0px",textAlign:"left",textTransform:"uppercase",color:"var(--brand-color)",minWidth:"0px","&:hover":{textDecoration:"underline",backgroundColor:"#fff"},".MuiButton-text":{textTransform:"uppercase"}},onClick:()=>{li(""),kr(1),_i(bi.filter(e=>e!==o))},children:["Hide previous ",(0,M.jsx)(te.wAb,{style:{fontSize:"14px"}})]})}),bi.includes(o)?[...e.comments].reverse().map((r,s)=>{const d=[...e.comments].length-1-s;return(0,M.jsxs)("div",{style:{display:"flex",marginBottom:"10px",position:"relative"},children:[(0,M.jsx)(g.A,{alt:He,src:r.user_icon,style:{margin:"8px 10px 0px 0px"}}),(0,M.jsxs)("div",{style:{width:"100%",boxSizing:"border-box"},children:[(0,M.jsxs)("div",{style:{backgroundColor:"#F5F9FF",borderRadius:"10px",boxSizing:"border-box",padding:"8px 10px",position:"relative"},children:[" ",(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,M.jsx)(l.A,{variant:"subtitle2",style:{fontWeight:"bold",marginRight:"6px"},children:(0,ae.A)(r.commenter_display_name,20)}),window.innerWidth>450?(0,M.jsx)(l.A,{variant:"body2",color:"textSecondary",sx:{fontSize:"12px",marginTop:"-2px"},children:he(r.time,Ho)}):null]}),window.innerWidth<=450?(0,M.jsx)(l.A,{variant:"body2",color:"textSecondary",sx:{fontSize:"12px",marginTop:"0px"},children:he(r.time,Ho)}):null,(0,M.jsx)(l.A,{className:"text_content",variant:"body2",style:{width:"90%",wordBreak:"break-word"},children:(0,M.jsx)(X.A,{options:{target:"_blank"},children:r.text.split("\n").map((e,t)=>(0,M.jsxs)(i.Fragment,{children:[e,(0,M.jsx)("br",{})]},t))})}),(0,M.jsxs)(M.Fragment,{children:[""===Jo?null:(0,M.jsx)(M.Fragment,{children:Jo===r.commenter?(0,M.jsx)("div",{onClick:e=>{xr(e,"commentMenu",r.id,t,n,d,r.text)},style:{position:"absolute",top:"12px",right:"45px",display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer"},children:(0,M.jsx)(ee.IXD,{})}):(0,M.jsx)(M.Fragment,{children:Jo===j?(0,M.jsx)("div",{style:{position:"absolute",top:"12px",right:"45px",display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer"},onClick:e=>{xr(e,"commentMenuInfluencer",r.id,t,n,d,r.text)},children:(0,M.jsx)(ee.IXD,{})}):null})}),(0,M.jsx)("div",{children:(0,M.jsx)(M.Fragment,{children:(r.file||["mot","mzm","mgm","mmt","gos","god"].includes(r.content_type)&&r.link)&&(0,M.jsxs)("div",{style:{position:"relative",padding:"10px 0px 0px 0px"},children:["img"===r.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(Se,{image_src:r.file,handleFullscreenOpen:er})}),"vid"===r.content_type&&(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:(0,M.jsx)(fe,{video_src:r.file})}),"vey"===r.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16
1px"},children:(0,M.jsx)(ye,{video_src:r.file})})}),"vel"===r.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(be,{video_src:r.file})})}),"vev"===r.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)("iframe",{src:"https://player.vimeo.com/video/"+r.file,frameborder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})}),"vtw"===r.content_type&&r.file&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)("iframe",{src:r.file.startsWith("ch")?"https://player.twitch.tv/?channel="+r.file.slice(2)+"&parent="+window.location.hostname:r.file.startsWith("c")?"https://clips.twitch.tv/embed?clip="+r.file.slice(1)+"&parent="+window.location.hostname:"https://player.twitch.tv/?video="+r.file.slice(1)+"&parent="+window.location.hostname,frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})}),"vwi"===r.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)("iframe",{src:"https://fast.wistia.com/embed/iframe/"+r.file+"?autoPlay=false",frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})}),["gos","god"].includes(r.content_type)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px",marginBottom:"16px",position:"relative"},children:["gos"===r.content_type&&(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{width:"24px",marginRight:"16px"}}),"god"===r.content_type&&(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["gos"===r.content_type&&"Google Sheets","god"===r.content_type&&"Google Docs"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>er((0,R.g)(r.link),r.content_type),rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:"Open"})})]}),"aud"===r.content_type&&(0,M.jsx)("div",{style:{position:"relative"},children:(0,M.jsx)("div",{className:"image_container",style:{position:"relative"},children:(0,M.jsx)(C(),{className:"react-player",src:ue.CONTENT_CLOUDFRONT+r.file,controls:!0,style:{width:"100%",margin:"0px",borderRadius:"0px"}})})}),"pdf"===r.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(ke,{fullscreen:Zn,pdf_src:r.file,content_width_type:"comment",handleFullscreenPDFOpen:Pn})}),r.link&&["mot","mgm","mzm","mmt"].includes(r.content_type)&&(0,M.jsx)("div",{style:{position:"relative",padding:"0px"},children:(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px"},children:["mot"===r.content_type&&(0,M.jsx)(K.AnD,{style:{width:"24px",marginRight:"16px",color:"#6C89AF"}}),"mgm"===r.content_type&&(0,M.jsx)("img",{src:D,alt:Ho("community.composer.googleMeet"),style:{width:"24px",marginRight:"16px"}}),"mmt"===r.content_type&&(0,M.jsx)("img",{src:F,alt:Ho("community.composer.microsoftTeams"),style:{width:"24px",marginRight:"16px"}}),"mzm"===r.content_type&&(0,M.jsx)("img",{src:A,alt:Ho("profile.zoom"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsxs)(a.A,{sx:{flexGrow:1,display:"flex",alignItems:"center"},children:[(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["mot"===r.content_type&&"Meeting","mgm"===r.content_type&&"Google Meet","mmt"===r.content_type&&"Microsoft Teams","mzm"===r.content_type&&"Zoom"]}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,href:(0,R.g)(r.link),target:"_blank",rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"}},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:Ho("community.post.join")})})]})]})})]})})}),(0,M.jsxs)("div",{style:{position:"absolute",top:"8px",right:"5
1px",display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer",borderRadius:"50px",padding:"2px 6px"},onClick:""===Jo?e=>Ye(e,Ve.icon_image_path,Ve.influencer,Ve.current_tier,"",Ve.influencer_name,Je):()=>{$e(r.id,t,n,d),0===r.user_like_value&&Cr(r.id)},children:[(0,M.jsx)("span",{style:{marginBottom:"0px",cursor:"pointer",fontSize:"14px",color:1===r.user_like_value?"var(--brand-color)":"#222",marginRight:"3px"},children:(r.user_like_value,"\ud83d\udc4d")}),(0,M.jsx)(M.Fragment,{children:ri&&ai===r.id&&(0,M.jsx)(_.A,{zIndex:1e4,duration:2800,force:.15,particleCount:10,width:200,particleSize:6,colors:me,onComplete:()=>{li(""),si(!1)}})}),(0,M.jsx)(l.A,{variant:"subtitle1",style:{fontWeight:"bold",fontSize:"12px",marginBottom:"0px",margin:"0px",lineHeight:"20px",color:1===r.user_like_value?"var(--brand-color)":"#222"},children:r.like_count})]})]})]}),(0,M.jsx)(m.A,{color:"primary",sx:{backgroundColor:"transparent",fontSize:"12px",padding:"0",margin:"3px 0px 0px 10px",textAlign:"left",textTransform:"uppercase",color:"var(--brand-color)",minWidth:"0px","&:hover":{backgroundColor:"#fff",textDecoration:"underline"},".MuiButton-root MuiButton-text":{textTransform:"uppercase"}},onClick:""===Jo?e=>Ye(e,Ve.icon_image_path,Ve.influencer,Ve.current_tier,"",Ve.influencer_name,Je):()=>{hr(o,r.commenter),yi(!0)},onMouseEnter:()=>wr(s),onMouseLeave:jr,children:Ho("community.post.reply")})]})]},s)}):[...e.comments].reverse().slice(Math.max(0,e.comments.length-1)).map((e,r,s)=>{const d=s.length-1-r;return(0,M.jsxs)("div",{style:{display:"flex",marginBottom:"10px",position:"relative"},children:[(0,M.jsx)(g.A,{alt:He,src:e.user_icon,style:{margin:"8px 10px 0px 0px"}}),(0,M.jsxs)("div",{style:{width:"100%",boxSizing:"border-box"},children:[(0,M.jsxs)("div",{style:{backgroundColor:"#F5F9FF",borderRadius:"10px",boxSizing:"border-box",padding:"8px 10px",position:"relative"},children:[" ",(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,M.jsx)(l.A,{variant:"subtitle2",style:{fontWeight:"bold",marginRight:"6px"},children:(0,ae.A)(e.commenter_display_name,20)}),window.innerWidth>450?(0,M.jsx)(l.A,{variant:"body2",color:"textSecondary",sx:{fontSize:"12px",marginTop:"-2px"},children:he(e.time,Ho)}):null]}),window.innerWidth<=450?(0,M.jsx)(l.A,{variant:"body2",color:"textSecondary",sx:{fontSize:"12px",marginTop:"0px"},children:he(e.time,Ho)}):null,(0,M.jsx)(l.A,{className:"text_content",variant:"body2",style:{width:"90%",wordBreak:"break-word"},children:(0,M.jsx)(X.A,{options:{target:"_blank"},children:e.text.split("\n").map((e,t)=>(0,M.jsxs)(i.Fragment,{children:[e,(0,M.jsx)("br",{})]},t))})}),(0,M.jsxs)(M.Fragment,{children:[""===Jo?null:(0,M.jsx)(M.Fragment,{children:Jo===e.commenter?(0,M.jsx)("div",{onClick:o=>xr(o,"commentMenu",e.id,t,n,d,e.text),style:{position:"absolute",top:"12px",right:"45px",display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer"},children:(0,M.jsx)(ee.IXD,{})}):(0,M.jsx)(M.Fragment,{children:Jo===j?(0,M.jsx)("div",{style:{position:"absolute",top:"12px",right:"45px",display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer"},onClick:o=>xr(o,"commentMenuInfluencer",e.id,t,n,d,e.text),children:(0,M.jsx)(ee.IXD,{})}):null})}),(0,M.jsx)("div",{children:(0,M.jsx)(M.Fragment,{children:(e.file||["mot","mzm","mgm","mmt","gos","god"].includes(e.content_type)&&e.link)&&(0,M.jsxs)("div",{style:{position:"relative",padding:"10px 0px 0px 0px"},children:["img"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(Se,{image_src:e.file,handleFullscreenOpen:er})}),"vid"===e.content_type&&(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:(0,M.jsx)(fe,{video_src:e.file})}),"vey"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(ye,{video_src:e.file})})}),"vel"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)(be,{video_src:e.file})})}),"vev"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden",marginBottom:"16
1px"},children:(0,M.jsx)("iframe",{src:"https://player.vimeo.com/video/"+e.file,frameborder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})}),"vtw"===e.content_type&&e.file&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)("iframe",{src:e.file.startsWith("ch")?"https://player.twitch.tv/?channel="+e.file.slice(2)+"&parent="+window.location.hostname:e.file.startsWith("c")?"https://clips.twitch.tv/embed?clip="+e.file.slice(1)+"&parent="+window.location.hostname:"https://player.twitch.tv/?video="+e.file.slice(1)+"&parent="+window.location.hostname,frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})}),"vwi"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden",marginBottom:"16px"},children:(0,M.jsx)("iframe",{src:"https://fast.wistia.com/embed/iframe/"+e.file+"?autoPlay=false",frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}})})}),["gos","god"].includes(e.content_type)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px",marginBottom:"16px",position:"relative"},children:["gos"===e.content_type&&(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{width:"24px",marginRight:"16px"}}),"god"===e.content_type&&(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["gos"===e.content_type&&"Google Sheets","god"===e.content_type&&"Google Docs"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>er((0,R.g)(e.link),e.content_type),rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:"Open"})})]}),"aud"===e.content_type&&(0,M.jsx)("div",{style:{position:"relative"},children:(0,M.jsx)("div",{className:"image_container",style:{position:"relative"},children:(0,M.jsx)(C(),{className:"react-player",src:ue.CONTENT_CLOUDFRONT+e.file,controls:!0,style:{width:"100%",margin:"0px",borderRadius:"0px"}})})}),"pdf"===e.content_type&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(ke,{fullscreen:Zn,pdf_src:e.file,content_width_type:"comment",handleFullscreenPDFOpen:Pn})}),e.link&&["mot","mgm","mzm","mmt"].includes(e.content_type)&&(0,M.jsx)("div",{style:{position:"relative",padding:"0px"},children:(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px"},children:["mot"===e.content_type&&(0,M.jsx)(K.AnD,{style:{width:"24px",marginRight:"16px",color:"#6C89AF"}}),"mgm"===e.content_type&&(0,M.jsx)("img",{src:D,alt:Ho("community.composer.googleMeet"),style:{width:"24px",marginRight:"16px"}}),"mmt"===e.content_type&&(0,M.jsx)("img",{src:F,alt:Ho("community.composer.microsoftTeams"),style:{width:"24px",marginRight:"16px"}}),"mzm"===e.content_type&&(0,M.jsx)("img",{src:A,alt:Ho("profile.zoom"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsxs)(a.A,{sx:{flexGrow:1,display:"flex",alignItems:"center"},children:[(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["mot"===e.content_type&&"Meeting","mgm"===e.content_type&&"Google Meet","mmt"===e.content_type&&"Microsoft Teams","mzm"===e.content_type&&"Zoom"]}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,href:(0,R.g)(e.link),target:"_blank",rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"}},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:Ho("community.post.join")})})]})]})})]})})}),(0,M.jsxs)("div",{style:{position:"absolute",top:"8px",right:"5
1px",display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer",borderRadius:"50px",padding:"2px 6px"},onClick:""===Jo?e=>Ye(e,Ve.icon_image_path,Ve.influencer,Ve.current_tier,"",Ve.influencer_name,Je):()=>{$e(e.id,t,n,d),0===e.user_like_value&&Cr(e.id)},children:[(0,M.jsx)("span",{style:{marginBottom:"0px",cursor:"pointer",fontSize:"14px",color:1===e.user_like_value?"var(--brand-color)":"#222",marginRight:"3px"},children:(e.user_like_value,"\ud83d\udc4d")}),(0,M.jsx)(M.Fragment,{children:ri&&ai===e.id&&(0,M.jsx)(_.A,{zIndex:1e4,duration:2800,force:.15,particleCount:10,width:200,particleSize:6,colors:me,onComplete:()=>{li(""),si(!1)}})}),(0,M.jsx)(l.A,{variant:"subtitle1",style:{fontWeight:"bold",fontSize:"12px",marginBottom:"0px",margin:"0px",lineHeight:"20px",color:1===e.user_like_value?"var(--brand-color)":"#222"},children:e.like_count})]})]})]}),(0,M.jsx)(m.A,{color:"primary",sx:{backgroundColor:"transparent",fontSize:"12px",padding:"0",margin:"3px 0px 0px 10px",textAlign:"left",textTransform:"uppercase",color:"var(--brand-color)",minWidth:"0px","&:hover":{textDecoration:"underline",backgroundColor:"#fff"},".MuiButton-text":{textTransform:"uppercase"}},onClick:""===Jo?e=>Ye(e,Ve.icon_image_path,Ve.influencer,Ve.current_tier,"",Ve.influencer_name,Je):()=>{hr(o,e.commenter),yi(!0)},children:Ho("community.post.reply")})]})]},r)})]}),di===o&&(0,M.jsxs)(x(),{opposite:!0,children:[(0,M.jsxs)("div",{className:"feed-padding",style:{display:"flex"},children:[(0,M.jsx)(g.A,{alt:He,src:w,style:{marginRight:"12px"}}),(0,M.jsx)(Q.A,{id:"emailCaptureInput",maxRows:5,className:"text-input community-inputs",style:{border:"#C7D1DE 1px solid",display:"block",fontWeight:"500",margin:"auto auto auto auto",fontSize:"16px",padding:"10px 15px",height:"18px",color:"#1D1D1D",borderRadius:"8px",width:"100%",fontFamily:"Roboto",resize:"none"},disabled:!Dr,placeholder:Wr,maxLength:5e3,value:xi,onChange:gr}),(xi.length>0||""!==Ot)&&"temp"!==Ot?(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,disabled:!1,onClick:()=>{((e,t,o,i)=>{ne(xi,e,o,t,i)})(e.id,n,t,$)},sx:{marginLeft:"8px",padding:"2px 5px",textAlign:"center",height:"42px",maxWidth:"42px",minWidth:"42px",fontWeight:"600",display:"inline-block",borderRadius:"7px",border:"2px var(--brand-color) solid",boxSizing:"border-box",textTransform:"none",color:"var(--brand-color)",backgroundColor:"var(--brand-color)",fontSize:"15px","&:hover":{backgroundColor:"var(--brand-color-hover)",color:"#fff",border:"2px var(--brand-color-hover) solid","& .modal-close-icon":{color:"#fff"}}},children:(0,M.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",fontSize:"15px !important"},children:(0,M.jsx)(Z.$_z,{style:{color:"#fff",margin:"auto",fontSize:"15px !important"}})})}):"",(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>{ci(-1),yi(!1)},sx:{marginLeft:"8px",padding:"2px 5px",textAlign:"center",height:"42px",maxWidth:"42px",minWidth:"42px",fontWeight:"600",display:"inline-block",borderRadius:"7px",border:"2px var(--brand-color) solid",boxSizing:"border-box",textTransform:"none",backgroundColor:"var(--brand-color)",fontSize:"15px","&:hover":{backgroundColor:"var(--brand-color-hover)",color:"#fff",border:"2px var(--brand-color-hover) solid","& .modal-close-icon":{color:"#fff"}}},children:(0,M.jsx)("div",{style:{width:"100%",height:"100%",display:"flex"},children:(0,M.jsx)(Z.$8F,{className:"modal-close-icon",style:{color:"#fff",margin:"auto"}})})})]}),(0,M.jsxs)(M.Fragment,{children:[Ot&&St===e.id&&(0,M.jsxs)("div",{style:{position:"relative",padding:"10px 0px 0px 0px"},children:["img"===Ut&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Se,{pre_upload:!0,image_src:Ot,handleFullscreenOpen:er}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:_r,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vid"===Ut&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(fe,{video_src:Ot,pre_upload:!0}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:_r,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vey"===Ut&&(0,M.jsxs)("div",{style:{width:"100%",height:"100%",aspectRatio:"16/9",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{position:"absolute",border:"none",width:"100%",height:"100%",src:"https://www.youtube-nocookie.com/embed/"+po+"?si=zjwU1BLkbSYRvl1j?rel=0&amp;modestbranding=1",title:Ho("dashboard.widgets.articles.youtubePlayer"),frameborder:"0",allow:"accelerometer; encrypted-media; gyroscope; fullscreen;
1",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:!0}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:_r,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vel"===Ut&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0"},children:[(0,M.jsx)("iframe",{src:"https://www.loom.com/embed/"+po+"?sid=879009a9-7ce5-4bc0-84cc-dc6633dc222c?autoplay=false",frameborder:"0",webkitallowfullscreen:!0,mozallowfullscreen:!0,allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:_r,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vev"===Ut&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:"https://player.vimeo.com/video/"+po,frameborder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:_r,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vtw"===Ut&&po&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:po.startsWith("ch")?"https://player.twitch.tv/?channel="+po.slice(2)+"&parent="+window.location.hostname:po.startsWith("c")?"https://clips.twitch.tv/embed?clip="+po.slice(1)+"&parent="+window.location.hostname:"https://player.twitch.tv/?video="+po.slice(1)+"&parent="+window.location.hostname,frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:_r,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vwi"===Ut&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:"https://fast.wistia.com/embed/iframe/"+po+"?autoPlay=false",frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:_r,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),["gos","god"].includes(Ut)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"8px",padding:"0 16px",marginBottom:"16px",position:"relative"},children:["gos"===Ut&&(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{width:"24px",marginRight:"16px"}}),"god"===Ut&&(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["gos"===Ut&&"Google Sheets","god"===Ut&&"Google Docs"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>er((0,R.g)(Ot),Ut),rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:"Open"})}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:_r,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"aud"===Ut&&(0,M.jsx)("div",{style:{position:"relative"},children:(0,M.jsxs)("div",{className:"image_container",style:{position:"relative"},children:[(0,M.jsx)(C(),{className:"react-player",src:Ot,controls:!0,style:{width:"100%",margin:"0px",borderRadius:"0px"}}),(0,M.jsx)("div",{style:{justifyContent:"flex-end",display:"flex",width:"30px",position:"absolute",top:"11px",right:"10px"},children:(0,M.jsx)("div",{style:{border:"1px #D3DCE7 solid",backgroundColor:"#fff",padding:"5px",height:"18px",width:"18px",margin:"0px 0px 0px 0px",borderRadius:"20px","&:hover":{cursor:"pointer"}},children:(0,M.jsx)("a",{onClick:_r,children:(0,M.jsx)(Z.$8F,{className:"content-upload-icons"})})})})]})}),["mgm","mzm","mmt","mot"].includes(Ut)&&(0,M.jsxs)("div",{style:{position:"relative"},children:[(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px"},children:["mgm"===Ut&&(0,M.jsx)("img",{src:D,alt:Ho("community.composer.googleMeet"),style:{width:"24px",marginRight:"16px"}}),"mzm"===Ut&&(0,M.jsx)("img",{src:A,alt:Ho("profile.zoom"),style:{width:"24px",marginRight:"16px"}}),"mmt"===Ut&&(0,M.jsx)("img",{src:F,alt:Ho("community.composer.microsoftTeams"),style:{width:"24px",marginRight:"16px"}}),"mot"===Ut&&(0,M.jsx)(K.AnD,{style:{width:"24px",marginRight:"16px",color:"#6C89AF"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1,display:"flex",alignItems:"center"},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["mgm"===Ut&&"Google Meet","mzm"===Ut&&"Zoom","mmt"===Ut&&"Microsoft Teams","mot"===Ut&&"Meeting"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,href:(0,R.g)(Ot),target:"_blank",rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"}},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:Ho("community.post.join")})})]}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px","&:hover":{cursor:"pointer"}},children:(0,M.jsx)("a",{onClick:_r,children:(0,M.jsx)("div",{style:{backgroundColor:"rgba(255,255,255,0.75)",borderRadius:"50px",padding:"5px",height:"20px",width:"20px",display:"flex"},children:(0,M.jsx)(Z.$8F,{className:"modal-close-icon",style:{color:"#222222",margin:"auto"}})})})})]}),"pdf"===Ut&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(ke,{fullscreen:Zn,pdf_src:Ot,pre_upload:!0,content_width_type:"comment",handleFullscreenPDFOpen:Pn}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:_r,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]})]}),Lt&&St===e.id||!Dr?null:(0,M.jsxs)("div",{className:"community-compose-actions",style:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginTop:8,gap:8,marginLeft:"52px"},children:[(0,M.jsx)("span",{onClick:()=>(e=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=t=>{const o=t.target.files[0];if("image/png"===o.type||"image/jpg"===o.type||"image/jpeg"===o.type){const t=URL.createObjectURL(o);Dt(o),zt(t),Tt("img"),Et(!0),Wt(!0),Ct(e)}else $r("error"),Lr(!0),Vr("var(--danger-color)"),Or(Ho("community.post.unsupportedImageType"))},t.click()})(e.id),style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.J2d,{style:{color:"#666666",fontSize:18}})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadOrEmbedVideo"),placement:"bottom",children:(0,M.jsx)("span",{onClick:Yr,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.m1g,{style:{color:"#666666",fontSize:18}})})}),(0,M.jsxs)(h.A,{id:"comment-video-menu",anchorEl:Qi,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(Qi),onClose:Gr,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{Gr(),(e=>{const t=document.createElement("input");t.type="file",t.accept="video/*",t.onchange=t=>{const o=t.target.files[0];if("video/mp4"===o.type||"video/quicktime"===o.type){const t=URL.createObjectURL(o);Dt(o),zt(t),Tt("vid"),Et(!0),Wt(!0),Ct(e)}else $r("error"),Lr(!0),Vr("var(--danger-color)"),Or(Ho("community.post.unsupportedVideoType"))},t.click()})(e.id)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)(f.m1g,{style:{verticalAlign:"middle",color:"#666666",marginRight:8,width:16,height:16}}),Ho("community.composer.upload")]}),(0,M.jsxs)(p.A,{onClick:()=>{Gr(),qt(!0),Qt(!1),eo("comment"),Ct(e.id)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)(q.aT,{style:{verticalAlign:"middle",color:"#666666",marginRight:8,width:16,height:16}}),Ho("community.composer.embed")]})]}),(0,M.jsx)(xe,{title:Ho("community.post.audio"),placement:"bottom",children:(0,M.jsx)("span",{onClick:()=>{Zr(),ss(e.id)},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.j0C,{style:{color:"#666666",fontSize:18}})})}),(0,M.jsx)(h.A,{id:"comment-audio-menu",anchorEl:Gi,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(Gi),onClose:Zr,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsxs)(p.A,{type:"button",onClick:()=>{Zr(),ss(e.id)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)(f.j0C,{style:{verticalAlign:"middle",color:"#666666",marginRight:8,width:16,height:16}}),Ho("community.composer.upload")]})}),(0,M.jsx)(xe,{title:Ho("community.post.document"),placement:"bottom",children:(0,M.jsx)("span",{onClick:Xr,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.Txu,{style:{color:"#666666",fontSize:18}})})}),(0,M.jsxs)(h.A,{id:"comment-doc-menu",anchorEl:un,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(un),onClose:Kr,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{Kr(),(e=>{const t=document.createElement("input");t.type="file",t.accept="application/pdf",t.onchange=t=>{const o=t.target.files[0],i=URL.createObjectURL(o);Dt(o),zt(i),Tt("pdf"),Et(!0),Wt(!0),Ct(e)},t.click()})(e.id)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)(f.Txu,{style:{verticalAlign:"middle",color:"#666666",marginRight:8}}),Ho("community.post.uploadPdf")]}),(0,M.jsxs)(p.A,{onClick:()=>{Kr(),to(!0),Tt("gos"),io("comment"),no("gos"),oo(!1),Ct(e.id)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{verticalAlign:"middle",width:16,height:16,marginRight:8}}),Ho("community.composer.googleSheet")]}),(0,M.jsxs)(p.A,{onClick:()=>{Kr(),to(!0),Tt("god"),io("comment"),no("god"),oo(!1),Ct(e.id)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{verticalAlign:"middle",width:16,height:16,marginRight:8}}),Ho("community.composer.googleDoc")]})]})]})]})]})]})]})},o)})]}),fi?(0,M.jsx)(M.Fragment,{}):(0,M.jsxs)("div",{style:{display:"flex",width:"pdf"===Pt.content_type?"calc(100% - 50px)":"100%",maxWidth:"pdf"===Pt.content_type?"calc(100% - 50px)":"100%",borderTop:N>=1?"1px solid #f5f5f5":"",padding:N>=1?"30px 0px 10px 0px":""},children:[(0,M.jsx)(g.A,{alt:He,src:w,style:{marginRight:"12px"}}),Dr?(0,M.jsxs)("div",{style:{display:"block",width:It?"calc(100% - 103px)":"100%",padding:"0px 0px 10px 0px",boxSizing:"border-box"},children:[(0,M.jsx)(Q.A,{id:"emailCaptureInput",maxRows:5,className:"text-input community-inputs",style:{border:"#C7D1DE 1px solid",display:"block",fontWeight:"500",margin:"auto auto auto auto",fontSize:"16px",padding:"10px 15px",height:"18px",color:"#1D1D1D",borderRadius:"8px",width:"calc(100% - 30px)",fontFamily:"Roboto",resize:"none"},maxLength:5e3,disabled:!Dr,placeholder:Wr,value:ii,onChange:e=>ni(e.target.value)}),It&&jt===$&&(0,M.jsxs)("div",{style:{position:"relative",padding:("aud-rec"===Pt||"vid-rec"===Pt)&&window.length<600?"0px 0px 0px 0px":"10px 0px 0px 0px"},children:["img"===Pt&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Se,{pre_upload:!0,image_src:It,handleFullscreenOpen:er}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:br,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vid"===Pt&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(fe,{pre_upload:!0,video_src:It}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:br,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vey"===Pt&&(0,M.jsxs)("div",{style:{width:"100%",height:"100%",aspectRatio:"16/9",borderRadius:"8px",overflow:"hidden"},children:[(
10,M.jsx)("iframe",{position:"absolute",border:"none",width:"100%",height:"100%",src:"https://www.youtube-nocookie.com/embed/"+co+"?si=zjwU1BLkbSYRvl1j?rel=0&amp;modestbranding=1",title:Ho("dashboard.widgets.articles.youtubePlayer"),frameborder:"0",allow:"accelerometer; encrypted-media; gyroscope; fullscreen;",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:!0}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:br,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vel"===Pt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0"},children:[(0,M.jsx)("iframe",{src:"https://www.loom.com/embed/"+co+"?sid=879009a9-7ce5-4bc0-84cc-dc6633dc222c?autoplay=false",frameborder:"0",webkitallowfullscreen:!0,mozallowfullscreen:!0,allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:br,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vev"===Pt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:"https://player.vimeo.com/video/"+co,frameborder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:br,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vtw"===Pt&&co&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:co.startsWith("ch")?"https://player.twitch.tv/?channel="+co.slice(2)+"&parent="+window.location.hostname:co.startsWith("c")?"https://clips.twitch.tv/embed?clip="+co.slice(1)+"&parent="+window.location.hostname:"https://player.twitch.tv/?video="+co.slice(1)+"&parent="+window.location.hostname,frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:br,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vwi"===Pt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:"https://fast.wistia.com/embed/iframe/"+co+"?autoPlay=false",frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:br,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),["gos","god"].includes(Pt)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"8px",padding:"0 16px",marginBottom:"16
1px",position:"relative"},children:["gos"===Pt&&(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{width:"24px",marginRight:"16px"}}),"god"===Pt&&(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["gos"===Pt&&"Google Sheets","god"===Pt&&"Google Docs"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>er((0,R.g)(It),Pt),rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:"Open"})}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:br,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"aud"===Pt&&(0,M.jsx)("div",{style:{position:"relative"},children:(0,M.jsxs)("div",{className:"image_container",style:{position:"relative"},children:[(0,M.jsx)(C(),{className:"react-player",src:It,controls:!0,style:{width:"100%",margin:"0px",borderRadius:"0px"}}),(0,M.jsx)("div",{style:{justifyContent:"flex-end",display:"flex",width:"30px",position:"absolute",top:"11px",right:"10px"},children:(0,M.jsx)("div",{style:{border:"1px #D3DCE7 solid",backgroundColor:"#fff",padding:"5px",height:"18px",width:"18px",margin:"0px 0px 0px 0px",borderRadius:"20px","&:hover":{cursor:"pointer"}},children:(0,M.jsx)("a",{onClick:br,children:(0,M.jsx)(Z.$8F,{className:"content-upload-icons"})})})})]})}),It&&["mot","mgm","mzm","mmt"].includes(Pt)&&(0,M.jsxs)("div",{style:{position:"relative",padding:"0px"},children:[(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px",marginBottom:"16px"},children:["mot"===Pt&&(0,M.jsx)(K.AnD,{style:{width:"24px",marginRight:"16px",color:"#6C89AF"}}),"mgm"===Pt&&(0,M.jsx)("img",{src:D,alt:Ho("community.composer.googleMeet"),style:{width:"24px",marginRight:"16px"}}),"mmt"===Pt&&(0,M.jsx)("img",{src:F,alt:Ho("community.composer.microsoftTeams"),style:{width:"24px",marginRight:"16px"}}),"mzm"===Pt&&(0,M.jsx)("img",{src:A,alt:Ho("profile.zoom"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsxs)(a.A,{sx:{flexGrow:1,display:"flex",alignItems:"center"},children:[(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["mot"===Pt&&"Meeting","mgm"===Pt&&"Google Meet","mmt"===Pt&&"Microsoft Teams","mzm"===Pt&&"Zoom"]}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,href:(0,R.g)(It),target:"_blank",rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"}},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:Ho("community.post.join")})})]})]}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",zIndex:1},children:(0,M.jsx)("div",{style:{border:"1px #D3DCE7 solid",backgroundColor:"#fff",padding:"5px",height:"18px",width:"18px",borderRadius:"20px","&:hover":{cursor:"pointer"}},children:(0,M.jsx)("a",{onClick:br,children:(0,M.jsx)(Z.$8F,{className:"content-upload-icons"})})})})]}),"pdf"===Pt&&(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)("div",{style:{width:"pdf"===Pt.content_type?"calc(100% - 50px)":"100%",maxWidth:"pdf"===Pt.content_type?"calc(100% - 50px)":"100%",boxSizing:"border-box"},children:[(0,M.jsx)(ke,{fullscreen:Zn,pdf_src:It,pre_upload:!0,content_width_type:"thread",handleFullscreenPDFOpen:Pn}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:br,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]})})]}),Rt&&jt===$||!Dr?null:(0,M.jsxs)("div",{className:"community-compose-actions",style:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginTop:8,gap:8},children:[(0,M.jsx)("span",{onClick:()=>(e=>{const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=t=>{const o=t.target.files[0];if("image/png"===o.type||"image/jpg"===o.type||"image/jpeg"===o.type){const t=URL.createObjectURL(o);_t(o),vt(t),wt(e),kt("img"),At(!0),Ft(!0)}else $r("error"),Lr(!0),Vr("var(--danger-color)"),Or(Ho("community.post.unsupportedImageType"))},t.click()})($),style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.J2d,{style:{color:"#666666",fontSize:18}})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadOrEmbedVideo"),placement:"bottom",children:(0,M.jsx)("span",{onClick:e=>on(e.currentTarget),style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.m1g,{style:{color:"#666666",fontSize:18}})})}),(0,M.jsxs)(h.A,{id:"thread-video-menu",anchorEl:tn,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(tn),onClose:Jr,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{Jr(),(e=>{const t=document.createElement("input");t.type="file",t.accept="video/*",t.onchange=t=>{const o=t.target.files[0];if("video/mp4"===o.type||"video/quicktime"===o.type){const t=URL.createObjectURL(o);_t(o),vt(t),kt("vid"),At(!0),Ft(!0),wt(e)}else $r("error"),Lr(!0),Vr("var(--danger-color)"),Or(Ho("community.post.unsupportedVideoType"))},t.click()})($)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)(f.m1g,{style:{verticalAlign:"middle",color:"#666666",marginRight:8,width:16,height:16}}),Ho("community.composer.upload")]}),(0,M.jsxs)(p.A,{onClick:()=>{Jr(),qt(!0),Qt(!1),eo("thread"),wt($)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)(q.aT,{style:{verticalAlign:"middle",color:"#666666",marginRight:8,width:16,height:16}}),Ho("community.composer.embed")]})]}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadAudio"),placement:"bottom",children:(0,M.jsx)("span",{onClick:()=>{(e=>{const t=document.createElement("input");t.type="file",t.accept="audio/*",t.onchange=t=>{const o=t.target.files[0],i=URL.createObjectURL(o);_t(o),vt(i),kt("aud"),At(!0),Ft(!0),wt(e)},t.click()})($)},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.j0C,{style:{color:"#666666",fontSize:18}})})}),(0,M.jsx)(xe,{title:Ho("community.post.document"),placement:"bottom",children:(0,M.jsx)("span",{onClick:e=>hn(e.currentTarget),style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.Txu,{style:{color:"#666666",fontSize:18}})})}),(0,M.jsxs)(h.A,{id:"thread-doc-menu",anchorEl:mn,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(mn),onClose:qr,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{qr(),(e=>{const t=document.createElement("input");t.type="file",t.accept="application/pdf",t.onchange=t=>{const o=t.target.files[0],i=URL.createObjectURL(o);_t(o),vt(i),kt("pdf"),At(!0),Ft(!0),wt(e)},t.click()})($)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)(f.Txu,{style:{verticalAlign:"middle",color:"#666666",marginRight:8}}),Ho("community.post.uploadPdf")]}),(0,M.jsxs)(p.A,{onClick:()=>{qr(),to(!0),kt("gos"),io("thread"),no("gos"),oo(!1),wt($)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{verticalAlign:"middle",width:16,height:16,marginRight:8}}),Ho("community.composer.googleSheet")]}),(0,M.jsxs)(p.A,{onClick:()=>{qr(),to(!0),kt("god"),io("thread"),no("god"),oo(!1),wt($)},sx:{color:"black",fontWeight:500,fontSize:14},children:[(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{verticalAlign:"middle",width:16,height:16,marginRight:8}}),Ho("community.composer.googleDoc")]})]})]})]}):(0,M.jsxs)(M.Fragment,{children:["Login to join the conversation"===Wr?(0,M.jsx)("div",{id:"emailCaptureInput",className:"text-input community-inputs",style:{border:"#C7D1DE 1px solid",display:"flex",alignItems:"center",fontWeight:"500",margin:"auto auto auto auto",fontSize:"16px",padding:"10px 15px",height:"20px",color:"#AFBED3",borderRadius:"8px",width:"100%",fontFamily:"Roboto",resize:"none",cursor:"pointer",backgroundColor:"#FAFAFA"},onClick:()=>{Qe($)},children:Wr}):null,"Upgrade to join the conversation"===Wr?(0,M.jsx)("div",{id:"emailCaptureInput",className:"text-input community-inputs",style:{border:"#C7D1DE 1px solid",display:"flex",alignItems:"center",fontWeight:"500",margin:"auto auto auto auto",fontSize:"16px",padding:"10px 15px",height:"20px",color:"#AFBED3",borderRadius:"8px",width:"100%",fontFamily:"Roboto",resize:"none",cursor:"pointer",backgroundColor:"#FAFAFA"},onClick:e=>Ye(e,Ve.icon_image_path,Ve.influencer,Ve.current_tier,"",Ve.influencer_name,Je),children:Wr}):null]}),""!==Jo?(0,M.jsx)(M.Fragment,{children:""===ii&&""===It||"temp"===It?null:(0,M.jsx)(x(),{children:(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,disabled:!1,onClick:()=>{oe(ii,$,t)},sx:{marginLeft:"8px",padding:"2px 5px",textAlign:"center",height:"42px",maxWidth:"42px",minWidth:"42px",fontWeight:"600",display:"inline-block",borderRadius:"7px",border:"2px var(--brand-color) solid",boxSizing:"border-box",textTransform:"none",color:"var(--brand-color)",backgroundColor:"var(--brand-color)",fontSize:"15px","&:hover":{backgroundColor:"var(--brand-color-hover)",color:"#fff",border:"2px var(--brand-color-hover) solid","& .modal
1-close-icon":{color:"#fff"}}},children:(0,M.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",fontSize:"15px !important"},children:(0,M.jsx)(Z.$_z,{style:{color:"#fff",margin:"auto",fontSize:"15px !important"}})})})})}):null]})]}),Zn?(0,M.jsx)(V.A,{sx:{backgroundColor:"black",overflow:"auto",display:"flex",outline:"none",width:"100vw",minHeight:"100vh",zIndex:"9999"},open:Zn,children:(0,M.jsxs)(x(),{in:Zn,children:[(0,M.jsx)("a",{className:"hover_modal_icon",style:{zIndex:"1999",paddingBottom:"0px"},onClick:()=>{Xn(!1)},children:(0,M.jsx)(Z.$8F,{className:"fullscreen_icon",style:{position:"fixed",width:"20px",height:"20px",top:window.innerWidth>1280||window.innerWidth>900?"6px":"10px",right:(window.innerWidth>1280||window.innerWidth,"10px")}})}),(0,M.jsx)(s.Ay,{container:!0,xs:12,md:12,lg:12,alignItems:"center",justifyContent:"center",direction:"column",sx:{width:"100vw",minHeight:"100vh",margin:"auto auto 0px auto",overflow:"hidden"},children:(0,M.jsx)(s.Ay,{sx:{minHeight:"240px",backgroundColor:"#000",margin:"auto auto 0px auto",width:"100%",height:"100%",minWidth:"auto",boxShadow:"0 5px 25px 0 rgba(35, 40, 105, 0.04)",position:"relative"},children:(0,M.jsx)(s.Ay,{xs:12,container:!0,justifyContent:"center",alignItems:"center",children:(0,M.jsx)(s.Ay,{xs:12,children:Kn&&(0,M.jsxs)("div",{style:{position:"relative",padding:"0px 0px 0px 0px"},children:["img"===qn&&(0,M.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,M.jsx)(Se,{image_src:Kn,fullscreen:Kn})}),"gos"===qn&&(0,M.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,M.jsx)(je,{video_src:Kn,fullscreen:Kn})}),"god"===qn&&(0,M.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,M.jsx)(Ce,{video_src:Kn,fullscreen:Kn})})]})})})})})]})}):null,En?(0,M.jsx)(V.A,{sx:{backgroundColor:"black",overflow:"auto",display:"flex",outline:"none",width:"100vw",minHeight:"100vh",zIndex:"9999"},open:En,children:(0,M.jsxs)(x(),{in:En,children:[(0,M.jsx)("a",{className:"hover_modal_icon",style:{zIndex:"1999"},onClick:()=>{Wn(!1)},children:(0,M.jsx)(Z.$8F,{className:"fullscreen_icon",style:{position:"fixed",width:"20px",height:"20px",top:window.innerWidth>1280?"10px":window.innerWidth>600?"30px":"10px",right:window.innerWidth>1280?"10px":window.innerWidth>600?"30px":"10px"}})}),(0,M.jsx)(s.Ay,{container:!0,xs:12,md:12,lg:12,alignItems:"center",justifyContent:"center",direction:"column",sx:{width:"100vw",minHeight:"100vh",overflow:"auto",margin:"0px auto auto auto"},children:(0,M.jsx)(s.Ay,{xs:12,container:!0,justifyContent:"center",alignItems:"center",children:(0,M.jsx)(s.Ay,{xs:12,children:(0,M.jsx)("div",{style:{position:"relative",padding:"0px 0px 0px 0px"},children:(0,M.jsx)(Ae,{pdf_src:Rn})})})})})]})}):null,_n&&(0,r.createPortal)((0,M.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:window.innerWidth<900?"flex-end":"center",justifyContent:"center",zIndex:4e3,padding:window.innerWidth<900?"0px":"20px",opacity:wn?1:0,transition:"opacity 0.3s ease-in-out"},onClick:ur,children:(0,M.jsxs)("div",{style:{maxWidth:window.innerWidth<600?"100%":"800px",width:"100%",height:"auto",maxHeight:"85vh",backgroundColor:"#fff",borderRadius:window.innerWidth<900?"20px 20px 0px 0px":"16px",position:"relative",boxShadow:window.innerWidth<900?"0 -10px 40px rgba(0, 0, 0, 0.15)":"0 20px 60px rgba(0, 0, 0, 0.15)",overflow:"visible",display:"flex",flexDirection:"column",transform:wn?"translateY(0)":window.innerWidth<900?"translateY(100%)":"scale(0.8) translateY(50px)",opacity:wn?1:0,transition:"all 0.3s ease-out",outline:"none"},onClick:e=>e.stopPropagation(),children:[(0,M.jsx)("div",{style:{position:"absolute",top:"15px",right:"15px",cursor:"pointer",zIndex:1301,width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.1)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",opacity:wn?1:0,transform:wn?"scale(1)":"scale(0.8)",transitionDelay:wn?"0.2s":"0s"},children:(0,M.jsx)(Z.$8F,{onClick:ur,style:{fontSize:"18px",color:"#666",transition:"color 0.2s ease"}})}),(0,M.jsx)("div",{style:{padding:"25px 25px 20px 25px",background:"linear-gradient(135deg, rgba(247,249,252,0.8) 0%, rgba(255,255,255,0.4) 100%)",borderBottom:"1px solid #E4EBF6",opacity:wn?1:0,transform:wn?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:wn?"0.1s":"0s"},children:(0,M.jsx)(l.A,{variant:"h5",style:{color:"#1D1D1D",fontWeight:"700",fontSize:window.innerWidth<600?"18px":"20px",textAlign:"center",fontFamily:"Roboto, sans-serif",letterSpacing:"-0.5px",margin:0},children:Ho("community.post.editPost")})}),(0,M.jsxs)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",overflow:"visible",opacity:wn?1:0,transform:wn?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:wn?"0.2s":"0s"},children:[(0,M.jsxs)("div",{style:{flex:1,minHeight:0,overflowY:"auto",overflowX:"visible",padding:"10px 25px 20px 25px",WebkitOverflowScrolling:"touch"},children:[(0,M.jsx)("div",{style:{flex:"0 0 auto",overflow:"visible"},children:(0,M.jsx)(s.Ay,{xs:12,container:!0,justifyContent:"center",alignItems:"center",children:(0,M.jsx)(s.Ay,{xs:12,style:{paddingBottom:"10px",paddingTop:"10px",backgroundColor:"white",borderRadius:"10px"},children:(0,M.jsx)(a.A,{sx:{borderRadius:"8px",overflow:"visible"},children:(0,M.jsx)(de.A,{children:(0,M.jsx)(ce.A,{value:Cn||"",onChange:e=>{Sn((0,pe.D4)(e)),An(e.length),e.length>=25e3&&(Vr("var(--danger-color)"),$r("error"),Or(Ho("community.post.maxCharLimit5000")),Lr(!0))},placeholder:Ho("community.post.enterNewDescription"),minHeight:200,maxHeight:300,maxLength:25e3})})})})})}),(0,M.jsxs)(s.Ay,{xs:12,container:!0,justifyContent:"center",alignItems:"center",children:[(0,M.jsxs)(s.Ay,{xs:12,style:{paddingBottom:"10px",paddingTop:"10px"},children:[(0,M.jsx)(l.A,{style:{color:"#1D1D1D",fontSize:"13px",fontWeight:600,marginBottom:"6px"},children:Ho("community.post.postCategory")}),(0,M.jsxs)("div",{style:{display:"flex",gap:"8px",alignItems:"flex-start"},children:[(0,M.jsx)(d.A,{fullWidth:!0,size:"small",sx:{flex:1},children:(0,M.jsx)(c.A,{value:yn||"all",onChange:e=>{if("function"===typeof Wo){const t=e.target.value;Wo(t?[t]:["all"])}},displayEmpty:!0,sx:{backgroundColor:"#fff",borderRadius:"8px",maxHeight:"42px",minHeight:"42px","& .MuiSelect-select":{padding:"8px 14px",textTransform:"capitalize"}},MenuProps:{style:{zIndex:9999},PaperProps:{sx:{maxHeight:300}}},children:fn&&fn.length>0?fn.map(e=>(0,M.jsx)(p.A,{value:e,sx:{textTransform:"capitalize"},children:"all"===e.toLowerCase()?Ho("community.allTab"):ge(e)},e)):(0,M.jsx)(p.A,{value:"all",children:Ho("community.post.all")})})}),No&&(0,M.jsx)(m.A,{variant:"outlined",size:"small",onClick:()=>{No&&No(null)},sx:{minWidth:"auto",padding:"8px 16px",borderRadius:"8px",borderColor:"#C7D1DE",color:"#1D1D1D",fontSize:"13px",fontWeight:500,textTransform:"none",whiteSpace:"nowrap",height:"42px","&:hover":{borderColor:"#6C89AF",backgroundColor:"rgba(110, 137, 175, 0.04)"}},children:Ho("community.post.newCategory")})]}),(0,M.jsx)(l.A,{variant:"caption",style:{display:"block",marginTop:"6px",color:"#6E89AF",fontSize:"11px",lineHeight:1.4},children:Ho("community.post.categoryHint")})]}),(0,M.jsxs)(s.Ay,{xs:12,style:{paddingBottom:"10px",paddingTop:"10px"},children:[(0,M.jsxs)(l.A,{style:{color:"#1D1D1D",fontSize:"13px",fontWeight:600,marginBottom:"6px",display:"flex",alignItems:"center"},children:[Ho("community.composer.scheduleThisPost"),(0,M.jsxs)("span",{style:{color:"#9
1CA3AF",fontWeight:500,marginLeft:"6px"},children:["(",Ho("community.composer.optional"),")"]})]}),(0,M.jsx)("style",{children:"\n                                    .community-edit-schedule-datetimepicker input {\n                                       border-radius: 8px !important;\n                                       border-color: rgba(0, 0, 0, 0.23) !important;\n                                    }\n                                    .community-edit-schedule-datetimepicker input:focus,\n                                    .community-edit-schedule-datetimepicker input:active {\n                                       border-color: var(--brand-color) !important;\n                                    }\n                                 "}),(0,M.jsxs)("div",{style:{display:"flex",gap:"8px",alignItems:"flex-start"},children:[(0,M.jsxs)("div",{style:{flex:1},children:[(0,M.jsx)(J.A,{className:"community-edit-schedule-datetimepicker",isCentered:!0,id:"community-edit-schedule-datetimepicker",placeholder:Ho("community.composer.selectScheduleDate"),value:Ko,onChange:e=>{e<new Date?Xo(Ho("community.composer.scheduleDatePast")):(Xo(""),Go(e))},formatStyle:"large",okLabel:Ho("community.composer.schedulePost"),cancelLabel:Ho("common.cancel"),icon:(0,M.jsx)(P.itz,{style:{color:"var(--secondary-icon-color)"}})}),(0,M.jsx)("p",{style:{color:"#999",fontSize:"11px",margin:"6px 0 0 0",fontStyle:"italic"},children:Intl.DateTimeFormat().resolvedOptions().timeZone})]}),Ko&&(0,M.jsx)(m.A,{variant:"outlined",size:"small",onClick:()=>{Go(null),Xo("")},sx:{minWidth:"auto",padding:"8px 16px",borderRadius:"8px",borderColor:"var(--danger-color)",color:"var(--danger-color)",fontSize:"13px",fontWeight:500,textTransform:"none",whiteSpace:"nowrap",height:"42px","&:hover":{borderColor:"var(--danger-color)",backgroundColor:"rgba(220, 38, 38, 0.04)"}},children:Ho("community.composer.clearSchedule")})]}),Zo&&(0,M.jsx)(l.A,{variant:"caption",sx:{color:"var(--danger-color)",display:"block",marginTop:"6px"},children:Zo})]}),(0,M.jsxs)(s.Ay,{xs:12,style:{paddingBottom:"10px",paddingTop:"10px"},children:[Yt&&(0,M.jsxs)("div",{style:{position:"relative",padding:"0px 0px 0px 0px"},children:["img"===Gt&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Se,{pre_upload:!0,fullscreen:!1,image_src:Yt,handleFullscreenOpen:er}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vid"===Gt&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(fe,{pre_upload:!0,video_src:Yt}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vey"===Gt&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(ye,{video_src:Yt}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vel"===Gt&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(be,{video_src:Yt}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vev"===Gt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:"https://player.vimeo.com/video/"+Yt,frameborder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vtw"===Gt&&Yt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:Yt.startsWith("ch")?"https://player.twitch.tv/?channel="+Yt.slice(2)+"&parent="+window.location.hostname:Yt.startsWith("c")?"https://clips.twitch.tv/embed?clip="+Yt.slice(1)+"&parent="+window.location.hostname:"https://player.twitch.tv/?video="+Yt.slice(1)+"&parent="+window.location.hostname,frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vwi"===Gt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:"https://fast.wistia.com/embed/iframe/"+Yt+"?autoPlay=false",frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),["gos","god"].includes(Gt)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"8px",padding:"0 16px",marginBottom:"16
1px",position:"relative"},children:["gos"===Gt&&(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{width:"24px",marginRight:"16px"}}),"god"===Gt&&(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["gos"===Gt&&"Google Sheets","god"===Gt&&"Google Docs"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>er((0,R.g)(Yt),Gt),rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:"Open"})}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"aud"===Gt&&(0,M.jsx)("div",{style:{position:"relative"},children:(0,M.jsxs)("div",{className:"image_container",style:{position:"relative"},children:[(0,M.jsx)(C(),{className:"react-player",src:Yt,controls:!0,style:{width:"100%",margin:"0px",borderRadius:"0px"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"11px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]})}),Yt&&["mot","mgm","mzm","mmt"].includes(Gt)&&(0,M.jsxs)("div",{style:{position:"relative",padding:"0px"},children:[(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px",marginBottom:"16px"},children:["mot"===Gt&&(0,M.jsx)(K.AnD,{style:{width:"24px",marginRight:"16px",color:"#6C89AF"}}),"mgm"===Gt&&(0,M.jsx)("img",{src:D,alt:Ho("community.composer.googleMeet"),style:{width:"24px",marginRight:"16px"}}),"mmt"===Gt&&(0,M.jsx)("img",{src:F,alt:Ho("community.composer.microsoftTeams"),style:{width:"24px",marginRight:"16px"}}),"mzm"===Gt&&(0,M.jsx)("img",{src:A,alt:Ho("profile.zoom"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1,display:"flex",alignItems:"center"},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["mot"===Gt&&"Meeting","mgm"===Gt&&"Google Meet","mmt"===Gt&&"Microsoft Teams","mzm"===Gt&&"Zoom"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,href:(0,R.g)(Yt),target:"_blank",rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"}},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:Ho("community.post.join")})})]}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})}),Te&&!Vt&&(0,M.jsx)(a.A,{sx:{margin:"16px 0px 0px 0px"},children:(0,M.jsx)(Se,{image_src:Te,handleFullscreenOpen:er})}),"edit"===Lo&&Mo&&Vt&&(0,M.jsx)(a.A,{sx:{margin:"16px 0px 0px 0px"},children:(0,M.jsx)(Se,{image_src:Mo.startsWith("blob:")||Mo.startsWith("http")?Mo:ue.CONTENT_CLOUDFRONT+Mo,handleFullscreenOpen:er,pre_upload:Mo.startsWith("blob:")})})]}),"pdf"===Gt&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(ke,{fullscreen:Zn,pdf_src:Yt,pre_upload:!0,content_width_type:"post",handleFullscreenPDFOpen:Pn}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]})]}),(0,M.jsx)("div",{children:Ht?null:(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:"3px",justifyContent:"space-between"},children:[(0,M.jsx)(xe,{title:Ho("community.composer.uploadImage"),placement:"bottom",children:(0,M.jsx)("span",{onClick:yr,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.R1W,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.image")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.R1W,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.image")}):null]})})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadOrEmbedVideo"),placement:"bottom",children:(0,M.jsx)("span",{onClick:Qr,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.Zgf,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.video")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.Zgf,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.video")}):null]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:Ji,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(Ji),onClose:Qr,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{es(),as()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.Zgf,{style:{verticalAlign:"middle",color:"#6C89AF",marginRight:"8px",width:"16px",height:"16px"}}),Ho("community.composer.upload")]}),(0,M.jsxs)(p.A,{onClick:()=>{es(),qt(!0),Qt(!1),eo("edit")},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(q.aT,{style:{verticalAlign:"middle",width:"16px",height:"16px",color:"#6C89AF",marginRight:"8px"}}),Ho("community.composer.embed")]})]})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadAudio"),placement:"bottom",children:(0,M.jsx)("span",{onClick:()=>{ts(),ls()},className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.EVA,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.audio")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.EVA,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.audio")}):null]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:Vi,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(Vi),onClose:e=>Yi(e.currentTarget),sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"}},children:(0,M.jsx)("div",{children:(0,M.jsxs)(p.A,{type:"button",onClick:()=>{ts(),ls()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.EVA,{style:{verticalAlign:"middle",color:"#6C89AF",marginRight:"8px",width:"16px",height:"16px"}}),Ho("community.composer.upload")]})})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadDoc"),placement:"bottom",children:(0,M.jsx)("span",{onClick:os,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.Gp9,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.doc")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.Gp9,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.doc")}):null]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:cn,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(cn),onClose:is,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{is(),ds()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.kl1,{style:{verticalAlign:"middle",color:"#6C89AF",marginRight:"8px"}}),Ho("community.post.uploadPdf")]}),(0,M.jsxs)(p.A,{onClick:()=>{is(),to(!0),Kt("gos"),io("edit"),no("gos"),oo(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:z,style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),Ho("community.composer.googleSheet")]}),(0,M.jsxs)(p.A,{onClick:()=>{is(),to(!0),Kt("god"),io("edit"),no("god"),oo(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:T,style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),Ho("community.composer.googleDoc")]})]})}),(0,M.jsx)(xe,{title:Ho("community.composer.addMeeting"),placement:"bottom",children:(0,M.jsx)("span",{onClick:ns,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(P.LyP,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.meet")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(P.LyP,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.meet")})]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:nn,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(nn),onClose:rs,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{rs(),ro(!0),Kt("mzm"),so("edit"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:A,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),"Zoom"]}),(0,M.jsxs)(p.A,{onClick:()=>{rs(),ro(!0),Kt("mgm"),ao(!1),so("edit")},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:D,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),"Google Meet"]}),(0,M.jsxs)(p.A,{onClick:()=>{rs(),ro(!0),Kt("mmt"),so("edit"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:F,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),"Microsoft Teams"]}),(0,M.jsxs)(p.A,{onClick:()=>{rs(),ro(!0),Kt("mot"),so("edit"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.AnD,{style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),"Other"]})]})})]})})]})]})]}),(0,M.jsx)("div",{style:{padding:"20px 25px 25px 25px",borderTop:"1px solid #E4EBF6",flexShrink:0,backgroundColor:"#fff",opacity:wn?1:0,transform:wn?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:wn?"0.3s":"0s",position:window.innerWidth<900?"sticky":"relative",bottom:window.innerWidth<900?"0":"auto",left:0,right:0,zIndex:2},children:(0,M.jsx)(m.A,{disableRipple:!0,fullWidth:!0,variant:"contained",disabled:"temp"===Yt,sx:{backgroundColor:"temp"===Yt?"#E4EBF6":"var(--brand-color)",color:"temp"===Yt?"#9CA3B4":"white",fontSize:"14px",textTransform:"none",borderRadius:"12px",boxShadow:"none",fontWeight:"600",padding:"12px 20px",border:"temp"===Yt?"2px solid #E4EBF6":"2px solid var(--brand-color)",transition:"all 0.2s ease-in-out",cursor:"temp"===Yt?"not-allowed":"pointer","&:hover":"temp"===Yt?{backgroundColor:"#E4EBF6",border:"2px s
1olid #E4EBF6",transform:"none",boxShadow:"none"}:{backgroundColor:"var(--brand-color)",border:"2px solid var(--brand-color)",opacity:.8,transform:"translateY(-1px)",boxShadow:"none"}},type:"submit",value:"submit",onClick:()=>{if(!0===fr(Cn,Gt)){const e=void 0===Yo?void 0:null===Yo?null:Yo.toISOString();Ee(Cn,Fn,zn,Yt,e),So(""),ur()}},children:"Update"})})]})]})}),document.body),_n&&(pt||vo)&&(0,r.createPortal)((0,M.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,pointerEvents:"none",zIndex:5e3,display:"flex",alignItems:"flex-end",justifyContent:"center",paddingBottom:"50px"},children:(0,M.jsxs)("div",{style:{pointerEvents:"auto",zIndex:5e3},children:[(0,M.jsx)(se.default,{msg:ct,open:pt,backgroundColor:ut,severity:ho,handleClose:()=>{xt(!1)},autoHide:4e3}),(0,M.jsx)(le.A,{msg_pre:go,msg_post:fo,click_text:yo,click_process:()=>{var e=new Date,t=e.getDate()+"/"+(e.getMonth()+1)+"/"+e.getFullYear()+"_"+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();bo(Yt,t+"_recording"+_o)},open:vo,severity:wo,backgroundColor:jo,handleClose:()=>{Co(!1)},autoHide:null})]})}),document.body),Ln?(0,M.jsx)(V.A,{sx:{backgroundColor:"transparent",overflow:"auto",display:"flex",outline:"none",width:"100vw",minHeight:"100vh",zIndex:"9998"},open:Gn,children:(0,M.jsx)(x(),{in:Gn,children:(0,M.jsxs)(s.Ay,{container:!0,xs:12,md:9,lg:6,alignItems:"center",justifyContent:"center",direction:"column",sx:{width:"100vw",minHeight:"100vh",paddingTop:"calc(30px + 1vw)",paddingBottom:"calc(30px + 1vw)",overflow:"auto",margin:"0px auto auto auto"},children:[(0,M.jsx)(se.default,{msg:ct,open:pt,backgroundColor:ut,severity:ho,handleClose:()=>{xt(!1)},autoHide:4e3}),(0,M.jsx)(le.A,{msg_pre:go,msg_post:fo,click_text:yo,click_process:()=>{var e=new Date,t=e.getDate()+"/"+(e.getMonth()+1)+"/"+e.getFullYear()+"_"+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();bo(Yt,t+"_recording"+_o)},open:vo,severity:wo,backgroundColor:jo,handleClose:()=>{Co(!1)},autoHide:null}),(0,M.jsxs)(s.Ay,{sx:{minHeight:"240px",backgroundColor:"#fff",borderRadius:"10px",margin:"30px auto",maxWidth:"calc(100% - 20px)",width:window.innerWidth>=1280?"100%":"800px",overflow:"auto",boxShadow:"0 5px 25px 0 rgba(35, 40, 105, 0.04)",padding:"25px 20px",position:"relative"},children:[(0,M.jsx)(Z.$8F,{onClick:()=>{Nn(!1)},style:{fontSize:"20px",fontWeight:"300",textAlign:"right",display:"flex",top:"15px",right:"15px",position:"absolute",padding:"0px",cursor:"pointer"},color:"#023648"}),(0,M.jsx)(s.Ay,{xs:12,alignItems:"center",justifyContent:"center",children:(0,M.jsx)(l.A,{style:{color:"black",fontSize:"16px",fontWeight:"600",textTransform:"none",textAlign:"center",cursor:"default",margin:"0px 0px 3px 0px",padding:"0px",backgroundColor:"transparent",width:"100%"},children:Ho("community.post.editComment")})}),(0,M.jsxs)(s.Ay,{xs:12,container:!0,justifyContent:"center",alignItems:"center",children:[(0,M.jsx)(s.Ay,{xs:12,style:{paddingBottom:"10px",paddingTop:"10px",backgroundColor:"white",borderRadius:"10px"},children:(0,M.jsx)(re.A,{size:"small",hiddenLabel:!0,name:"post_description",placeholder:Ho("community.post.enterNewDescription"),inputProps:{maxLength:5e3},multiline:!0,maxRows:8,minRows:2,value:On,onChange:e=>Un(e.target.value),style:{width:"100%",border:"1px solid #C7D1DE",justifyContent:"center",fontWeight:"500",marginRight:"auto",marginTop:"0px"},id:"filled-basic1",variant:"filled",InputProps:{style:{fontSize:"16px",color:"#1D1D1D",fontWeight:"500",borderRadius:"8px",padding:"0px 10px",backgroundColor:"#FFF"},disableUnderline:!0},sx:{marginBottom:"0px",borderRadius:"5px",border:"0px",backgroundColor:"#fff",input:{color:"#1D1D1D"}}})}),(0,M.jsxs)(s.Ay,{xs:12,style:{paddingBottom:"10px",paddingTop:"10px"},children:[Yt&&(0,M.jsxs)("div",{style:{position:"relative",padding:"0px 0px 0px 0px"},children:["img"===Gt&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Se,{pre_upload:!0,fullscreen:!1,image_src:Yt,handleFullscreenOpen:er}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vid"===Gt&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(fe,{pre_upload:!0,video_src:Yt}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vey"===Gt&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(ye,{video_src:Yt}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vel"===Gt&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(be,{video_src:Yt}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vev"===Gt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:"https://player.vimeo.com/video/"+Yt,frameborder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vtw"===Gt&&Yt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:Yt.startsWith("ch")?"https://player.twitch.tv/?channel="+Yt.slice(2)+"&parent="+window.location.hostname:Yt.startsWith("c")?"https://clips.twitch.tv/embed?clip="+Yt.slice(1)+"&parent="+window.location.hostname:"https://player.twitch.tv/?video="+Yt.slice(1)+"&parent="+window.location.hostname,frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vwi"===Gt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:"https://fast.wistia.com/embed/iframe/"+Yt+"?autoPlay=false",frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),["gos","god"].includes(Gt)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",backgroundColor:"#fff",height:"60px",border:"1px solid #E4EBF6",borderRadius:"8px",padding:"0 16px",marginBottom:"16
1px",position:"relative"},children:["gos"===Gt&&(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{width:"24px",marginRight:"16px"}}),"god"===Gt&&(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["gos"===Gt&&"Google Sheets","god"===Gt&&"Google Docs"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>er((0,R.g)(Yt),Gt),rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:"Open"})}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"aud"===Gt&&(0,M.jsx)("div",{style:{position:"relative"},children:(0,M.jsxs)("div",{className:"image_container",style:{position:"relative"},children:[(0,M.jsx)(C(),{className:"react-player",src:Yt,controls:!0,style:{width:"100%",margin:"0px",borderRadius:"0px"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"11px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]})}),Yt&&["mot","mgm","mzm","mmt"].includes(Gt)&&(0,M.jsxs)("div",{style:{position:"relative",padding:"0px"},children:[(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px",marginBottom:"16px"},children:["mot"===Gt&&(0,M.jsx)(K.AnD,{style:{width:"24px",marginRight:"16px",color:"#6C89AF"}}),"mgm"===Gt&&(0,M.jsx)("img",{src:D,alt:Ho("community.composer.googleMeet"),style:{width:"24px",marginRight:"16px"}}),"mmt"===Gt&&(0,M.jsx)("img",{src:F,alt:Ho("community.composer.microsoftTeams"),style:{width:"24px",marginRight:"16px"}}),"mzm"===Gt&&(0,M.jsx)("img",{src:A,alt:Ho("profile.zoom"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1,display:"flex",alignItems:"center"},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["mot"===Gt&&"Meeting","mgm"===Gt&&"Google Meet","mmt"===Gt&&"Microsoft Teams","mzm"===Gt&&"Zoom"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,href:(0,R.g)(Yt),target:"_blank",rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"}},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:Ho("community.post.join")})})]}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"pdf"===Gt&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(ke,{fullscreen:Zn,pdf_src:Yt,pre_upload:!0,content_width_type:"post",handleFullscreenPDFOpen:Pn}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]})]}),(0,M.jsx)("div",{children:Ht?null:(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:"10px",justifyContent:"space-between"},children:[(0,M.jsx)(xe,{title:Ho("community.composer.uploadImage"),placement:"bottom",children:(0,M.jsx)("span",{onClick:yr,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.R1W,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.image")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.R1W,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.image")}):null]})})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadOrEmbedVideo"),placement:"bottom",children:(0,M.jsx)("span",{onClick:Qr,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.Zgf,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.video")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.Zgf,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.video")}):null]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:Ji,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(Ji),onClose:es,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{es(),as()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.Zgf,{style:{verticalAlign:"middle",color:"#6C89AF",marginRight:"8px",width:"16px",height:"16px"}}),Ho("community.composer.upload")]}),(0,M.jsxs)(p.A,{onClick:()=>{es(),qt(!0),Qt(!1),eo("edit")},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(q.aT,{style:{verticalAlign:"middle",width:"16px",height:"16px",color:"#6C89AF",marginRight:"8px"}}),Ho("community.composer.embed")]})]})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadAudio"),placement:"bottom",children:(0,M.jsx)("span",{onClick:()=>{ts(),ls()},className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.EVA,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.audio")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.EVA,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.audio")}):null]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:Vi,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(Vi),onClose:ts,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsx)("div",{children:(0,M.jsxs)(p.A,{type:"button",onClick:()=>{ts(),ls()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.EVA,{style:{verticalAlign:"middle",color:"#6C89AF",marginRight:"8px",width:"16px",height:"16px"}}),Ho("community.composer.upload")]})})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadDoc"),placement:"bottom",children:(0,M.jsx)("span",{onClick:os,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.Gp9,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.doc")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.Gp9,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.doc")}):null]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:cn,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(cn),onClose:is,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{is(),ds()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.kl1,{style:{verticalAlign:"middle",color:"#6C89AF",marginRight:"8px"}}),Ho("community.post.uploadPdf")]}),(0,M.jsxs)(p.A,{onClick:()=>{is(),to(!0),Kt("gos"),io("edit"),no("gos"),oo(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:z,style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),Ho("community.composer.googleSheet")]}),(0,M.jsxs)(p.A,{onClick:()=>{is(),to(!0),Kt("god"),io("edit"),no("god"),oo(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:T,style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),Ho("community.composer.googleDoc")]})]})}),(0,M.jsx)(xe,{title:Ho("community.composer.addMeeting"),placement:"bottom",children:(0,M.jsx)("span",{onClick:ns,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(P.LyP,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.meet")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(P.LyP,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.meet")})]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:nn,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(nn),onClose:rs,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{rs(),ro(!0),Kt("mzm"),so("edit"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:A,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),"Zoom"]}),(0,M.jsxs)(p.A,{onClick:()=>{rs(),ro(!0),Kt("mgm"),so("edit"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:D,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),"Google Meet"]}),(0,M.jsxs)(p.A,{onClick:()=>{rs(),ro(!0),Kt("mmt"),so("edit"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:F,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),"Microsoft Teams"]}),(0,M.jsxs)(p.A,{onClick:()=>{rs(),ro(!0),Kt("mot"),so("edit"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.AnD,{style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),"Other"]})]})})]})})]})]}),(0,M.jsx)(m.A,{fullWidth:!0,variant:"contained",disabled:"temp"===Yt,sx:{width:"100%",backgroundColor:"temp"===Yt?"var(--secondary-color)":"var(--brand-color)",fontSize:"16px",textTransform:"none",margin:"5px auto 0px auto",height:"40px",boxShadow:"none",fontWeight:"600","
1:hover":{bgcolor:"var(--brand-color-hover)",color:"white",boxShadow:"none"}},type:"submit",value:"submit",onClick:()=>{!0===fr(On,Gt)&&(Re($n,On,zn,Vn,$,Yt),So(""))},children:Ho("community.post.updateThread")})]})]})})}):null,tr?(0,M.jsx)(V.A,{sx:{backgroundColor:"transparent",overflow:"auto",display:"flex",outline:"none",width:"100vw",minHeight:"100vh",zIndex:"9998"},open:dr,children:(0,M.jsx)(x(),{in:dr,children:(0,M.jsxs)(s.Ay,{container:!0,xs:12,md:9,lg:6,alignItems:"center",justifyContent:"center",direction:"column",sx:{width:"100vw",minHeight:"100vh",paddingTop:"calc(30px + 1vw)",paddingBottom:"calc(30px + 1vw)",overflow:"auto",margin:"0px auto auto auto"},children:[(0,M.jsx)(se.default,{msg:ct,open:pt,backgroundColor:ut,severity:ho,handleClose:()=>{xt(!1)},autoHide:4e3}),(0,M.jsx)(le.A,{msg_pre:go,msg_post:fo,click_text:yo,click_process:()=>{var e=new Date,t=e.getDate()+"/"+(e.getMonth()+1)+"/"+e.getFullYear()+"_"+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();bo(Yt,t+"_recording"+_o)},open:vo,severity:wo,backgroundColor:jo,handleClose:()=>{Co(!1)},autoHide:null}),(0,M.jsxs)(s.Ay,{sx:{minHeight:"240px",backgroundColor:"#fff",borderRadius:"10px",margin:"30px auto",maxWidth:"calc(100% - 20px)",width:window.innerWidth>=1280?"100%":"800px",overflow:"auto",boxShadow:"0 5px 25px 0 rgba(35, 40, 105, 0.04)",padding:"25px 20px",position:"relative"},children:[(0,M.jsx)(Z.$8F,{onClick:()=>{or(!1)},style:{fontSize:"20px",fontWeight:"300",textAlign:"right",display:"flex",top:"15px",right:"15px",position:"absolute",padding:"0px",cursor:"pointer"},color:"#023648"}),(0,M.jsx)(s.Ay,{xs:12,alignItems:"center",justifyContent:"center",children:(0,M.jsx)(l.A,{style:{color:"black",fontSize:"16px",fontWeight:"600",textTransform:"none",textAlign:"center",cursor:"default",margin:"0px 0px 3px 0px",padding:"0px",backgroundColor:"transparent",width:"100%"},children:Ho("community.post.editComment")})}),(0,M.jsxs)(s.Ay,{xs:12,container:!0,justifyContent:"center",alignItems:"center",children:[(0,M.jsx)(s.Ay,{xs:12,style:{paddingBottom:"10px",paddingTop:"10px",backgroundColor:"white",borderRadius:"10px"},children:(0,M.jsx)(re.A,{size:"small",hiddenLabel:!0,name:"post_description",placeholder:Ho("community.post.enterNewDescription"),inputProps:{maxLength:5e3},multiline:!0,maxRows:8,minRows:2,value:ir,onChange:e=>nr(e.target.value),style:{width:"100%",border:"1px solid #C7D1DE",justifyContent:"center",fontWeight:"500",marginRight:"auto",marginTop:"0px"},id:"filled-basic1",variant:"filled",InputProps:{style:{fontSize:"16px",color:"#1D1D1D",fontWeight:"500",borderRadius:"8px",padding:"0px 10px",backgroundColor:"#FFF"},disableUnderline:!0},sx:{marginBottom:"0px",borderRadius:"5px",border:"0px",backgroundColor:"#fff",input:{color:"#1D1D1D"}}})}),(0,M.jsxs)(s.Ay,{xs:12,style:{paddingBottom:"10px",paddingTop:"10px"},children:[Yt&&(0,M.jsxs)("div",{style:{position:"relative",padding:"0px 0px 0px 0px"},children:["img"===Gt&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Se,{pre_upload:!0,fullscreen:!1,image_src:Yt,handleFullscreenOpen:er}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vid"===Gt&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(fe,{pre_upload:!0,video_src:Yt}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vey"===Gt&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(ye,{video_src:Yt}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vel"===Gt&&(0,M.jsxs)("div",{style:{borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)(be,{video_src:Yt}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vev"===Gt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:"https://player.vimeo.com/video/"+Yt,frameborder:"0",allow:"autoplay; fullscreen; picture-in-picture",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vtw"===Gt&&Yt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:Yt.startsWith("ch")?"https://player.twitch.tv/?channel="+Yt.slice(2)+"&parent="+window.location.hostname:Yt.startsWith("c")?"https://clips.twitch.tv/embed?clip="+Yt.slice(1)+"&parent="+window.location.hostname:"https://player.twitch.tv/?video="+Yt.slice(1)+"&parent="+window.location.hostname,frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"vwi"===Gt&&(0,M.jsxs)("div",{style:{position:"relative",paddingBottom:"56.25%",height:"0",borderRadius:"8px",overflow:"hidden"},children:[(0,M.jsx)("iframe",{src:"https://fast.wistia.com/embed/iframe/"+Yt+"?autoPlay=false",frameborder:"0",allow:"autoplay; fullscreen",allowfullscreen:!0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),["gos","god"].includes(Gt)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",backgroundColor:"#fff",height:"60px",border:"1px solid #E4EBF6",borderRadius:"8px",padding:"0 16px",marginBottom:"16
1px",position:"relative"},children:["gos"===Gt&&(0,M.jsx)("img",{src:z,alt:Ho("dashboard.paidDms.googleSheets"),style:{width:"24px",marginRight:"16px"}}),"god"===Gt&&(0,M.jsx)("img",{src:T,alt:Ho("dashboard.paidDms.googleDocs"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["gos"===Gt&&"Google Sheets","god"===Gt&&"Google Docs"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,onClick:()=>er((0,R.g)(Yt),Gt),rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"},cursor:"pointer"},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:"Open"})}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"aud"===Gt&&(0,M.jsx)("div",{style:{position:"relative"},children:(0,M.jsxs)("div",{className:"image_container",style:{position:"relative"},children:[(0,M.jsx)(C(),{className:"react-player",src:Yt,controls:!0,style:{width:"100%",margin:"0px",borderRadius:"0px"}}),(0,M.jsx)("div",{style:{position:"absolute",top:"11px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]})}),["mgm","mzm","mmt","mot"].includes(Gt)&&(0,M.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",height:"60px",border:"1px solid #E4EBF6",backgroundColor:"#fff",borderRadius:"8px",padding:"0 16px",marginBottom:"16px",position:"relative"},children:["mot"===Gt&&(0,M.jsx)(K.AnD,{style:{width:"24px",marginRight:"16px",color:"#6C89AF"}}),"mgm"===Gt&&(0,M.jsx)("img",{src:D,alt:Ho("community.composer.googleMeet"),style:{width:"24px",marginRight:"16px"}}),"mmt"===Gt&&(0,M.jsx)("img",{src:F,alt:Ho("community.composer.microsoftTeams"),style:{width:"24px",marginRight:"16px"}}),"mzm"===Gt&&(0,M.jsx)("img",{src:A,alt:Ho("profile.zoom"),style:{width:"24px",marginRight:"16px"}}),(0,M.jsx)(a.A,{sx:{flexGrow:1,display:"flex",alignItems:"center"},children:(0,M.jsxs)("p",{style:{fontWeight:500,fontFamily:"Roboto",color:"#000",margin:0},children:["mot"===Gt&&"Meeting","mgm"===Gt&&"Google Meet","mmt"===Gt&&"Microsoft Teams","mzm"===Gt&&"Zoom"]})}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,href:(0,R.g)(Yt),target:"_blank",rel:"noopener noreferrer",sx:{padding:"5px 7px",display:"inline-block",marginLeft:"auto",borderRadius:"8px !important",textTransform:"none",textAlign:"center",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"}},children:(0,M.jsx)("span",{className:"fa fa-search",style:{fontWeight:"500",fontSize:"14px"},children:Ho("community.post.join")})}),(0,M.jsx)("div",{style:{position:"absolute",top:"-10px",right:"-10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]}),"pdf"===Gt&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(ke,{fullscreen:Zn,pdf_src:Yt,pre_upload:!0,content_width_type:"post",handleFullscreenPDFOpen:Pn}),(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:vr,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]})]}),(0,M.jsx)("div",{children:Ht?null:(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",marginTop:"10px",justifyContent:"space-between"},children:[(0,M.jsx)(xe,{title:Ho("community.composer.uploadImage"),placement:"bottom",children:(0,M.jsx)("span",{onClick:yr,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.R1W,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.image")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.R1W,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.image")}):null]})})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadOrEmbedVideo"),placement:"bottom",children:(0,M.jsx)("span",{onClick:Qr,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.Zgf,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.video")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.Zgf,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.video")}):null]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:Ji,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(Ji),onClose:es,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{es(),as()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.Zgf,{style:{verticalAlign:"middle",color:"#6C89AF",marginRight:"8px",width:"16px",height:"16px"}}),Ho("community.composer.upload")]}),(0,M.jsxs)(p.A,{onClick:()=>{es(),qt(!0),Qt(!1),eo("edit")},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(q.aT,{style:{verticalAlign:"middle",width:"16px",height:"16px",color:"#6C89AF",marginRight:"8px"}}),Ho("community.composer.embed")]})]})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadAudio"),placement:"bottom",children:(0,M.jsx)("span",{onClick:()=>{ts(),ls()},className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.EVA,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.audio")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.EVA,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.audio")}):null]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:Vi,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(Vi),onClose:ts,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsx)("div",{children:(0,M.jsxs)(p.A,{type:"button",onClick:()=>{ts(),ls()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.EVA,{style:{verticalAlign:"middle",color:"#6C89AF",marginRight:"8px",width:"16px",height:"16px"}}),Ho("community.composer.upload")]})})}),(0,M.jsx)(xe,{title:Ho("community.composer.uploadDoc"),placement:"bottom",children:(0,M.jsx)("span",{onClick:os,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(K.Gp9,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.doc")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(K.Gp9,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),window.innerWidth<1280?(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.doc")}):null]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:cn,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(cn),onClose:is,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{is(),ds()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.kl1,{style:{verticalAlign:"middle",color:"#6C89AF",marginRight:"8px"}}),Ho("community.post.uploadPdf")]}),(0,M.jsxs)(p.A,{onClick:()=>{is(),to(!0),Kt("gos"),io("edit"),no("gos"),oo(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:z,style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),Ho("community.composer.googleSheet")]}),(0,M.jsxs)(p.A,{onClick:()=>{is(),to(!0),Kt("god"),io("edit"),no("god"),oo(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:T,style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),Ho("community.composer.googleDoc")]})]})}),(0,M.jsx)(xe,{title:Ho("community.composer.addMeeting"),placement:"bottom",children:(0,M.jsx)("span",{onClick:ns,className:"fa fa-search",style:{fontWeight:"600",textAlign:"center",fontSize:"14px",cursor:"pointer",width:"19%",backgroundColor:"#F5F9FF",display:"flex",borderRadius:"6px"},children:window.innerWidth>1280?(0,M.jsxs)("div",{style:{margin:"auto",display:"flex",width:"55px",padding:"8px 0px",justifyContent:"center"},children:[(0,M.jsx)(P.LyP,{style:{color:"#6C89AF",margin:"auto 0px auto auto",width:"40px",fontSize:"14px",display:"inline-block"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:"auto auto auto 0px",display:"inline-block",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.meet")})]}):(0,M.jsxs)("div",{style:{margin:"auto",display:"block",width:"100%",padding:"8px 0px"},children:[(0,M.jsx)(P.LyP,{style:{color:"#6C89AF",margin:"auto",width:"100%",fontSize:"16px"}}),(0,M.jsx)("p",{style:{color:"#6C89AF",margin:" 0px auto 0px auto",fontSize:window.innerWidth<500?"12px":"10px",textAlign:"center"},children:Ho("community.post.meet")})]})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:nn,keepMounted:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(nn),onClose:rs,sx:{"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid"},zIndex:9999},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{rs(),ro(!0),so("edit"),Kt("mzm"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:A,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),"Zoom"]}),(0,M.jsxs)(p.A,{onClick:()=>{rs(),ro(!0),so("edit"),Kt("mgm"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:D,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),"Google Meet"]}),(0,M.jsxs)(p.A,{onClick:()=>{rs(),ro(!0),so("edit"),Kt("mmt"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:F,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),"Microsoft Teams"]}),(0,M.jsxs)(p.A,{onClick:()=>{rs(),ro(!0),so("edit"),Kt("mot"),ao(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.AnD,{style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),"Other"]})]})})]})})]})]}),(0,M.jsx)(m.A,{fullWidth:!0,variant:"contained",disabled:"temp"===Yt,sx:{width:"100%",backgroundColor:"temp"===Yt?"var(--secondary-color)":"var(--brand-color)",fontSize:"16px",textTransform:"none",margin:"5px auto 0px auto",height:"40px",boxShadow:"none",fontWeight:"600","
1:hover":{bgcolor:"var(--brand-color-hover)",color:"white",boxShadow:"none"}},type:"submit",value:"submit",onClick:()=>{!0===fr(ir,Gt)&&Me(ir,rr,zn,Vn,ar,$,Yt)},children:Ho("community.post.updateComment")})]})]})})}):null,(0,M.jsxs)(h.A,{anchorEl:Ai,open:Si,onClose:mr,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:9999,"& .MuiPaper-root":{marginTop:"20px",overflow:"hidden",backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.1) 0px 6px 12px 0px, rgba(229, 229, 229, 0.01) 0px 0px 0px 1px;",border:"1px #e7e9ef solid"}},children:["postMenu"===Di&&[(0,M.jsx)(M.Fragment,{children:!1!==Fo||Jo!==j||Do?null:(0,M.jsx)(p.A,{onClick:()=>{ko(Ti,t),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.pin")})}),(0,M.jsx)(M.Fragment,{children:!0===Fo&&Jo===j&&0===t?(0,M.jsx)(p.A,{onClick:()=>{Ao(Ti,t),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.removePin")}):null}),(0,M.jsx)(p.A,{onClick:()=>{Bn(E,Ti,Wi,Te,L),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.edit")}),(0,M.jsx)(p.A,{onClick:()=>{H(Ti,Wi),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.delete")})],"threadMenu"===Di&&[(0,M.jsx)(p.A,{onClick:()=>{Gn(B[Li].text,B[Li].id,Pi,Li,B[Li].file,B[Li].content_type,B[Li].link),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.edit")}),(0,M.jsx)(p.A,{onClick:()=>{ie(Mi,Pi,Li),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.delete")})],"commentMenu"===Di&&[(0,M.jsx)(p.A,{onClick:()=>{dr(B[Li].comments[$i].text,Oi,Pi,Li,$i,B[Li].comments[$i].file,B[Li].comments[$i].content_type,B[Li].comments[$i].link),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.edit")}),(0,M.jsx)(p.A,{onClick:()=>{De(Oi,Pi,Li,$i),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.delete")})],"postMenuInfluencer"===Di&&[(0,M.jsx)(p.A,{onClick:()=>{H(Ti,Wi),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.delete")})],"threadMenuInfluencer"===Di&&[(0,M.jsx)(p.A,{onClick:()=>{ie(Mi,Pi,Li),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.delete")})],"commentMenuInfluencer"===Di&&[(0,M.jsx)(p.A,{onClick:()=>{De(Oi,Pi,Li,$i),mr()},sx:{color:"var(--rebranding-primary-text-color)",fontWeight:"500",fontSize:"14px"},children:Ho("community.post.menu.delete")})]]}),(0,M.jsx)(se.default,{msg:Nr,open:Br,severity:Ur,backgroundColor:Hr,handleClose:()=>{Lr(!1)},autoHide:4e3})]})},ze=e=>{let{is_me:t,open:o,onClose:r,postData:s,postIndex:a,windowWidth:l=window.innerWidth,getBrandColor:d,onEditCategory:c,openInEditMode:p=!1,...u}=e;const{t:x}=(0,n.Bd)(),[m,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>(o?(h(!1),document.body.style.overflow="hidden",setTimeout(()=>{h(!0)},10)):document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[o]);const g=()=>{h(!1),setTimeout(()=>{r()},300)},f=CSS&&CSS.supports&&CSS.supports("height","95dvh");return s?(0,M.jsx)(M.Fragment,{children:o&&(0,M.jsx)(V.A,{open:o,onClose:g,"aria-labelledby":"community-post-modal-title","aria-describedby":"community-post-modal-description",style:{zIndex:3e3,outline:"0"},sx:{zIndex:3e3},children:(0,M.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,outline:"0",backgroundColor:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:l<900?"flex-end":"center",justifyContent:"center",zIndex:3e3,padding:l<900?"0px":"20px",opacity:m?1:0,transition:"opacity 0.3s ease-in-out"},onClick:e=>{e.target===e.currentTarget&&g()},children:(0,M.jsx)("div",{style:{maxWidth:l<600?"100%":"650px",
1width:"100%",height:"auto",maxHeight:l<900?f?"95dvh":"95vh":"90vh",backgroundColor:"#fff",borderRadius:l<900?"20px 20px 0px 0px":"16px",position:"relative",boxShadow:l<900?"0 -10px 40px rgba(0, 0, 0, 0.15)":"0 20px 60px rgba(0, 0, 0, 0.15)",overflow:"hidden",transform:m?"translateY(0)":l<900?"translateY(100%)":"scale(0.8) translateY(50px)",opacity:m?1:0,transition:"all 0.3s ease-out"},onClick:e=>e.stopPropagation(),children:(0,M.jsx)("div",{style:{maxHeight:l<900?f?"95dvh":"95vh":"90vh",overflow:"auto",opacity:m?1:0,transform:m?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:m?"0.1s":"0s"},children:(0,M.jsx)("div",{style:{padding:"0px 16px 16px 16px"},children:(0,M.jsx)(De,{onEditCategory:c,openInEditMode:p,post_index:a,username:s.username,display_name:s.display_name,user_icon:s.user_icon,time:s.time,subscription:s.subscription,text:s.text,photos:s.photos,content_type:s.content_type,content_file:s.file,video:s.video,threads:s.threads,tags_list:s.tags_list,post_tier:s.tier,n_threads:s.n_threads,n_comments:s.n_comments,post_id:s.post_id,post_like_count:s.like_count,post_user_value_count:s.user_like_value,current_tier:s.current_tier,onClose:g,link:s.link,pinnedPost:s.pinned,is_me:t,event_time:s.event_time,scheduled_date:s.scheduled_date,community_post_title:s.community_post_title,windowWidth:l,getBrandColor:d,hideLocation:!0,...u},a)})})})})})}):null};o(14395);o(13236);var Te=o(11672),Ee=o(501);(0,oe.Ay)(e=>{let{className:t,...o}=e;return(0,M.jsx)(ie.A,{...o,classes:{popper:t}})})(e=>{let{theme:t}=e;return{[`& .${ne.A.tooltip}`]:{backgroundColor:"#222222 !important",color:"#ffffff",boxShadow:t.shadows[1],fontSize:11,margin:"0px"}}}),(0,oe.Ay)(e=>(0,M.jsx)(Te.A,{...e}))(e=>{let{theme:t}=e;return{backgroundColor:"#FFFFFFF",flexDirection:"flex-end",marginBottom:"0px","& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{margin:"0px"},"& .MuiAccordionSummary-content":{},"& .css-1elwnq4-MuiPaper-root-MuiAccordion-root:before":{background:"none"},"& .MuiPaper-root .MuiAccordion-root .Mui-expanded":{margin:"0px",backgroundColor:"pink"},"& .MuiAccordionSummary-content.Mui-expanded":{margin:"0px !important"}}}),(0,oe.Ay)(Ee.A)(e=>{let{theme:t}=e;return{padding:t.spacing(0),backgroundColor:"#FFFFFF"}});var We=o(26701),Re=o(8118),Me=o.n(Re),Ie=o(51127),Pe=o(49322),Be=o(46804);const Le=e=>(0,Be.UX)(e),Ne=e=>{const[t,o,i]=e.split("-").map(Number);return new Date(t,o-1,i)},Oe=e=>(0,Be.UX)(e),Ue=(e,t)=>{const o=e=>String(e).padStart(2,"0"),i=`${o(e.getHours())}:${o(e.getMinutes())}`;if(!t)return i;return`${i} - ${`${o(t.getHours())}:${o(t.getMinutes())}`}`},$e=e=>{let{brandColor:t,events:o=[],onAddEvent:r,windowWidth:s,is_me:a}=e;const{t:l}=(0,n.Bd)(),[d,c]=(0,i.useState)("list"),p=(0,i.useMemo)(()=>{if(!o||0===o.length)return[];return o.filter(e=>e.is_example||e.event_time&&e.content_type&&["mgm","mzm","mmt","mot"].includes(e.content_type)).map(e=>e.is_example?{id:e.id,title:e.community_post_title||"Event",start:e.event_time,type:"virtual",platform:"mzm"===e.content_type?"Zoom":"mgm"===e.content_type?"Google Meet":"mmt"===e.content_type?"Microsoft Teams":"Other",link:e.link||"",icon:null,is_example:!0}:(e=>{var t;const o=new Date(e.event_time),i=new Date(o.getTime()+36e5);let n="Other";"mgm"===e.content_type?n="Google Meet":"mzm"===e.content_type?n="Zoom":"mmt"===e.content_type?n="Microsoft Teams":"mot"===e.content_type&&(n="Other");let r=e.community_post_title||"";if(!r&&e.text){const t=e.text.match(/^[^.!?\n]+/);r=t?t[0].trim():e.text.substring(0,50).trim(),r.length>60&&(r=r.substring(0,57)+"...")}return r||(r=`Meeting - ${(0,Be.UX)(o)}`),{id:(null===(t=e.id)||void 0===t?void 0:t.toString())||`event-${e.id}`,title:r,start:e.event_time,end:i.toISOString(),type:"virtual",platform:n,description:e.text||"",link:e.link||"",user:e.user||e.user_display_name||"",user_icon:e.user_icon||""}})(e)).filter(e=>new Date(e.start)>=new Date(Date.now()-864e5)).sort((e,t)=>new Date(e.start)-new Date(t.start))},[o]),[u,x]=(0,i.useState)(()=>{const e=new Date;return new Date(e.getFullYear(),e.getMonth(),1)}),[h,g]=(0,i.useState)(()=>{const e=new Date;return Le(e)}),y=(0,i.useMemo)(()=>{const e={};return p.forEach(t=>{const o=new Date(t.start),i=Le(o);e[i]||(e[i]=[]),e[i].push(t)}),Object.keys(e).forEach(t=>{e[t].sort((e,t)=>
1new Date(e.start)-new Date(t.start))}),e},[p]),b=(0,i.useMemo)(()=>{const e=[],t=new Date(u.getFullYear(),u.getMonth(),1),o=new Date(t);o.setDate(o.getDate()-o.getDay());for(let i=0;i<42;i+=1){const t=new Date(o);t.setDate(o.getDate()+i);const n=Le(t);e.push({key:n,date:t,label:t.getDate(),isCurrentMonth:t.getMonth()===u.getMonth(),isToday:n===Le(new Date),isSelected:n===h,hasEvents:Boolean(y[n])})}return e},[u,y,h]),_=(0,i.useMemo)(()=>{const e=[];for(let t=0;t<b.length;t+=7)e.push(b.slice(t,t+7));return e},[b]),v=h&&y[h]||[],w=h?(j=Ne(h),(0,Be.UX)(j)):l("community.upcomingEvents.selectADay");var j;const C=`${u.getFullYear()}-${String(u.getMonth()+1).padStart(2,"0")}`,S=[l("community.upcomingEvents.daySun","Sun"),l("community.upcomingEvents.dayMon","Mon"),l("community.upcomingEvents.dayTue","Tue"),l("community.upcomingEvents.dayWed","Wed"),l("community.upcomingEvents.dayThu","Thu"),l("community.upcomingEvents.dayFri","Fri"),l("community.upcomingEvents.daySat","Sat")],k={border:"1px solid #E4EBF6",backgroundColor:"#FFFFFF",borderRadius:"50%",width:36,height:36,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.2s ease"},z=e=>({width:40,height:40,borderRadius:"50%",border:e.isSelected?`2px solid ${t}`:"1px solid transparent",backgroundColor:e.isSelected?t:e.isToday?"rgba(110, 137, 175, 0.14)":"transparent",color:e.isSelected?"#ffffff":e.isCurrentMonth?"#1D1D1D":"#C6D3E6",fontWeight:e.isSelected||e.isToday?700:500,cursor:"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",justifyContent:"center"}),T=e=>({border:e?`1.5px solid ${t}`:"1.5px solid #E4EBF6",backgroundColor:"#FFFFFF",borderRadius:10,padding:8,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease"}),E=e=>{c(e)},R=e=>{x(t=>new Date(t.getFullYear(),t.getMonth()+e,1))},I=(e,t)=>{if(t.preventDefault(),t.stopPropagation(),e.is_example)return;const o=(e=>{const t=new Date(e.start),o=e.end?new Date(e.end):new Date(t.getTime()+36e5),i=e=>`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,"0")}${String(e.getUTCDate()).padStart(2,"0")}T${String(e.getUTCHours()).padStart(2,"0")}${String(e.getUTCMinutes()).padStart(2,"0")}${String(e.getUTCSeconds()).padStart(2,"0")}Z`,n=i(t),r=i(o);let s=e.link||"";s&&(e.platform&&e.platform.toLowerCase().includes("zoom")?s.includes("zoom.us/j/")||s.includes("zoom.us/s/")?s.startsWith("http://")||s.startsWith("https://")||(s=`https://${s}`):s.includes("web.zoom.us")?(s.startsWith("http://")||s.startsWith("https://")||(s=`https://${s}`),s=s.replace("web.zoom.us","zoom.us")):/^\d+$/.test(s.trim())?s=`https://zoom.us/j/${s.trim()}`:s.startsWith("http://")||s.startsWith("https://")||(s=`https://zoom.us/j/${s}`):e.platform&&e.platform.toLowerCase().includes("google meet")?s.includes("meet.google.com")?s.startsWith("http://")||s.startsWith("https://")||(s=`https://${s}`):s.startsWith("http://")||s.startsWith("https://")||(s=`https://meet.google.com/${s}`):e.platform&&e.platform.toLowerCase().includes("microsoft teams")?(s.includes("teams.microsoft.com"),s.startsWith("http://")||s.startsWith("https://")||(s=`https://${s}`)):s.startsWith("http://")||s.startsWith("https://")||(s=`https://${s}`));let a="";s?a=s:e.platform&&(a=`${e.platform} Meeting`);let l=e.description||"";return s&&l?l=`${l}\n\nJoin: ${s}`:s&&(l=`Join: ${s}`),`https://calendar.google.com/calendar/render?${new URLSearchParams({action:"TEMPLATE",text:e.title,dates:`${n}/${r}`,details:l,location:a}).toString()}`})(e);window.open(o,"_blank")},P=function(e){let{variant:o="default"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=new Date(e.start),n=e.end?new Date(e.end):null,r="virtual"===e.type,s=r?t:"#2F9E5B";return(0,M.jsxs)("div",{style:{border:e.is_example?"2px dashed #D1D5DB":"1px solid #E4EBF6",borderRadius:"12px",backgroundColor:"#FFFFFF",padding:"14px 16px",position:"relative",...e.is_example?{animation:"exampleEventBorderPulse 2.5s ease-in-out infinite",overflow:"visible"}:{}},children:[e.is_example&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("style",{children:"@keyframes exampleEventBorderPulse { 0%, 100% { border-color: #D1D5DB; box-shadow: 0 0 0px rgba(165, 180, 252, 0); } 50% { border-color: #A5B4FC; box-shadow: 0 0 12px rgba(165, 180, 252, 0.4); } }"}),(0,M.jsx)("span",{style:{position:"absolute",top:"-8px",right:"12px",fontSize:"11px",fontWeight:600,color:"#8B7355",backgroundColor:"#F0ECFF",padding:"2px 10px",borderRadius:"10px",zIndex:1},children:"Example"})]}),(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14},children:[(0,M.jsx)("div",{style:{width:"48px",height:"48px",borderRadius:"12px",backgroundColor:(()=>
1{if(r){const t=(()=>{if(!r)return null;const t=(e.platform||"").toLowerCase();return t.includes("zoom")?"zoom":t.includes("microsoft teams")||t.includes("teams")?"teams":t.includes("google meet")||t.includes("google")?"meet":null})();return"zoom"===t?"#E6F1FF":"teams"===t?"#E7E8FF":"meet"===t?"#FFF5DC":"rgba(110, 137, 175, 0.08)"}return"rgba(47, 158, 91, 0.08)"})(),display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:(()=>{var t;if(!r)return(0,M.jsx)(f.StZ,{style:{color:s,fontSize:"24px"}});const o=(null===(t=e.platform)||void 0===t?void 0:t.toLowerCase())||"";return o.includes("google meet")||o.includes("google")?(0,M.jsx)("img",{src:D,alt:l("community.composer.googleMeet"),style:{width:28,height:28,objectFit:"contain"}}):o.includes("zoom")?(0,M.jsx)("img",{src:A,alt:l("profile.zoom"),style:{width:36,height:36,objectFit:"contain"}}):o.includes("microsoft teams")||o.includes("teams")?(0,M.jsx)("img",{src:F,alt:l("community.composer.microsoftTeams"),style:{width:28,height:28,objectFit:"contain"}}):(0,M.jsx)(f.m1g,{style:{color:s,fontSize:"24px"}})})()}),(0,M.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,M.jsx)("p",{style:{margin:0,fontSize:"14px",fontWeight:600,color:"#1D1D1D",lineHeight:1.3,letterSpacing:"-0.3px"},children:(0,W.$)(e.title)}),(0,M.jsxs)("span",{style:{fontSize:"12px",color:"#9CA3AF",fontWeight:500},children:[Oe(i)," \u2022 ",Ue(i,n)]})]}),r&&!e.is_example&&(0,M.jsx)(m.A,{variant:"contained",size:"small",onClick:t=>I(e,t),style:{textTransform:"none",backgroundColor:"#F2F4FF",minWidth:"20px",borderRadius:8,padding:"6px 8px",boxShadow:"none",flexShrink:0},title:l("community.upcomingEvents.addToGoogleCalendar"),children:(0,M.jsx)(f.jhO,{style:{fontSize:"16px",color:"var(--brand-color)"}})})]})]},e.id)};return(0,M.jsxs)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"24px",boxShadow:"0 16px 40px rgba(24, 39, 75, 0.06)",marginTop:0},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16,marginBottom:24},children:[(0,M.jsx)("div",{children:(0,M.jsx)("p",{style:{fontSize:16,fontWeight:600,margin:0,color:"#1D1D1D"},children:l("community.upcomingEvents.title")})}),(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"relative",zIndex:s<600?50:999},children:[(0,M.jsx)("button",{type:"button",onClick:()=>E("list"),style:T("list"===d),"aria-label":l("community.showListView"),children:(0,M.jsx)(f.hVZ,{style:{color:"list"===d?t:"#6E89AF"}})}),(0,M.jsx)("button",{type:"button",onClick:()=>E("calendar"),style:T("calendar"===d),"aria-label":l("community.showCalendarView"),children:(0,M.jsx)(f.xkj,{style:{color:"calendar"===d?t:"#6E89AF"}})}),s>=600&&!0===a&&(0,M.jsx)("button",{type:"button",onClick:()=>{r&&r()},style:T(!1),"aria-label":l("community.createNewEvent"),children:(0,M.jsx)(f.r2j,{style:{color:"#6E89AF"}})})]})]}),"list"===d?(0,M.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:p.length?p.map(e=>P(e)):(0,M.jsx)("div",{style:{border:"1px dashed #C6D3E6",borderRadius:18,padding:"32px 24px",textAlign:"center",color:"#6E89AF",fontSize:14,backgroundColor:"#F7FAFF"},children:l(a?"community.upcomingEvents.noEventsCreator":"community.upcomingEvents.noEvents")})}):(0,M.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:28},children:[(0,M.jsxs)("div",{style:{flex:"1 1 320px",minWidth:280},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,M.jsx)("button",{type:"button",onClick:()=>R(-1),style:k,"aria-label":l("community.previousMonth"),children:(0,M.jsx)(f.h$A,{style:{color:"#6E89AF"}})}),(0,M.jsx)("p",{style:{margin:0,fontWeight:700,color:"#1D1D1D",fontSize:16},children:C}),(0,M.jsx)("button",{type:"button",onClick:()=>R(1),style:k,"aria-label":l("community.nextMonth"),children:(0,M.jsx)(f.klJ,{style:{color:"#6E89AF"}})})]}),(0,M.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gap:6,marginTop:18,color:"#6E89AF",fontSize:12,fontWeight:600,textAlign:"center"},children:S.map(e=>(0,M.jsx)("div",{children:e},e))}),(0,M.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gap:8,marginTop:8},children:_.map((e,o)=>e.map(e=>(0,M.jsxs)("div",{style:{textAlign:"center"},children:[(0,M.jsx)("button",{type:"button",onClick:()=>(e=>{if(g(e.key),!e.isCurrentMonth){const t=Ne(e.key);x(new Date(t.getFullYear(),t.getMonth(),1))}})(e),style:z(e),children:e.label}),(0,M.jsx)("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",marginTop:6,backgroundColor:e.hasEvents?t:"transparent",opacity:e.hasEvents?1:0,transition:"all 0.2s ease"}})]},`${o}-${e.key}`)))})]}),(0,M.jsxs)("div",{style:{flex:"1 1 280px",minWidth:260,display:"flex",flexDirection:"column",gap:16},children:[(0,M.jsxs)("div",{children:[(0,M.jsx)("p",{style:{margin:"0 0 8px",fontWeight:600,color:"#1D1D1D",fontSize:15},children:w}),(0,M.jsx)("span",{style:{color:"#6E89AF",fontSize:13},children:v.length?l("community.upcomingEvents.yourSessions"):l("community.upcomingEvents.noSessionsYet")})]}),(0,M.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:v.length?v.map(e=>P(e,{variant:"compact"})):(0,M.jsx)("div",{style:{border:"1px dashed #C6D3E6",borderRadius:18,padding:"28px 24px",color:"#6E89AF",fontSize:14,backgroundColor:"#F6F8FB"},children:l(a?"community.upcomingEvents.noEventsPlannedCreator":"community.upcomingEvents.noEventsPlanned")})})]})]})]})};var He=o(20792),Ve=o(32189),Ye=o(98725),Ge=o(29158),Ze=o(31652),Xe=o(50044),Ke=o(67908),Je=o(76410),qe=o(71756);const Qe=o(98635);k.Uy.GlobalWorkerOptions.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${k.Uy.version}/pdf.worker.js`;const et=(0,oe.Ay)(e=>{let{className:t,...o}=e;return(0,M.jsx)(ie.A,{...o,classes:{popper:t}})})(e=>{let{theme:t}=e;return{[`& .${ne.A.tooltip}`]:{backgroundColor:"#222222 !important",color:"#ffffff",boxShadow:t.shadows[1],fontSize:11,margin:"0px"}}}),tt=["img","vid","vid-rec","vey","vel","vev","vtw","vwi","aud","aud-rec","pdf","gos","god","mgm","mzm","mmt","mot"],ot=e=>e&&"all"!==e?e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "):e,it=e=>{if(null==e||"string"!==typeof e)return"";const t=e.trim();if(""===t)return"";return""===t.replace(/<[^>]*>/g,"").trim()?"":e};const nt=function(e){const{t:t}=(0,n.Bd)(),{windowWidth:o,currentUser:s,currentUserIcon:d,placeholder:c,textValue:u,onTextChange:x,onTextLengthChange:b,onAttachImage:_,selectedPreviewUrl:w,fileType:j,onRemoveAttachment:S,onSubmit:E,disabled:W,brandColor:R,scheduleDate:I,onScheduleDateChange:P,handleClickVideo:B,handleCloseVideo:L,handleShareVideo:N,handleClickAudio:O,handleCloseAudio:U,handleShareAudio:$,handleClickDoc:H,handleCloseDoc:Y,handleSharePDF:X,handleClick:J,handleClose:ee,getDevices:te,handleRemoveContent:oe,handleFullscreenOpen:ie,anchorElVideo:ne,anchorElAudio:re,anchorElDoc:ae,anchorEl:le,setFileType:pe,setIsMediaAttached:ue,setSelectedPreviewUrl:xe,setEmbedUrlType:me,setEmbedUrlIsOpen:he,setSnackbarEmbed:ge,setDocModalOpen:fe,setDocType:ye,setSnackbarOpenDoc:be,setMeetingModalOpen:_e,setMeetingType:ve,setSnackbarOpenMeeting:we,recordingStatus:je,setRecordingStatus:Ce,recordingDurationMins:Se,setRecordingDurationMins:ke,recordingDurationSeconds:Ae,setRecordingDurationSeconds:Fe,recordingDevices:De,setRecordingDevices:ze,handleAudioDeviceChange:Te,mediaRecorder:Ee,mediaStream:We,mediaDevices:Re,setADevID:Me,aDevID:Pe,changingDevice:Le,setChangingDevice:Ne,localStream
1:Oe,videoBitsPerSecond:Ue,handleVideoDeviceChange:$e,setVDevID:He,vDevID:Ve,recordedFileFormat:Ye,setRecordedFileFormat:Ge,saveFile:Ze,setSelectedFile:nt,setShowPostButton:rt,embedUrlKey:st,is_me:at,meetingLink:lt,setMeetingLink:dt,docLink:ct,setDocLink:pt,embedVideoUrl:ut,setEmbedVideoUrl:xt,postMeetingTime:mt,setPostMeetingTime:ht,meetingModalOpen:gt,docModalOpen:ft,embedUrlIsOpen:yt,processEmbedUrlSet:bt,embedUrlType:_t,setEmbedVideoUrlThread:vt,setEmbedVideoUrlComment:wt,setEmbedVideoUrlEdit:jt,snackbarMsgEmbed:Ct,snackbarEmbed:St,embedVideoUrlThread:kt,embedVideoUrlComment:At,embedVideoUrlEdit:Ft,docType:Dt,activeDocFileType:zt,setActiveDocFileType:Tt,setFileTypeThread:Et,setDocLinkThread:Wt,setFileTypeComment:Rt,setDocLinkComment:Mt,setDocLinkEdit:It,setFileTypeEdit:Pt,snackbarMsgDoc:Bt,snackbarOpenDoc:Lt,fileTypeThread:Nt,fileTypeComment:Ot,fileTypeEdit:Ut,docLinkThread:$t,docLinkComment:Ht,docLinkEdit:Vt,checkDocLink:Yt,meetingType:Gt,setMeetingLinkThread:Zt,setMeetingLinkComment:Xt,setMeetingLinkEdit:Kt,setMeetingImageEdit:Jt,setMeetingImageFileNameEdit:qt,meetingLinkThread:Qt,meetingLinkComment:eo,meetingLinkEdit:to,meetingImageEdit:oo,meetingImageFileNameEdit:io,snackbarMsgMeeting:no,snackbarOpenMeeting:ro,snackbarSeverityMeeting:so,snackbarColorMeeting:ao,checkMeetingLink:lo,currentTabInfo:co,uploadPostTags:po,setUploadPostTags:uo,addCommunityCategory:xo,editCategoryModalOpen:mo,onEditCategory:ho,setSelectedFileEdit:go,pendingCategories:fo,setPendingCategories:yo}=e,bo="img"===j,_o="vid"===j||"vid-rec"===j,vo=["vey","vel","vev","vtw","vwi"].includes(j),wo="aud"===j||"aud-rec"===j,jo="pdf"===j,Co="gos"===j||"god"===j,So=["mgm","mzm","mmt","mot"].includes(j),[ko,Ao]=(0,i.useState)(!1),[Fo,Do]=(0,i.useState)(""),[zo,To]=(0,i.useState)(""),[Eo,Wo]=(0,i.useState)(null),[Ro,Mo]=(0,i.useState)(!1),[Io,Po]=(0,i.useState)(null),[Bo,Lo]=(0,i.useState)(""),[No,Oo]=(0,i.useState)(null),[Uo,$o]=(0,i.useState)(!1),[Ho,Vo]=(0,i.useState)(!1),[Yo,Go]=(0,i.useState)(""),[Zo,Xo]=(0,i.useState)(!1),[Ko,Jo]=(0,i.useState)(""),[qo,Qo]=(0,i.useState)(!1),[ei,ti]=(0,i.useState)(!1),[oi,ii]=(0,i.useState)(!1),[ni,ri]=(0,i.useState)(!1),[si,ai]=(0,i.useState)(!1),[li,di]=(0,i.useState)(!1),[ci,pi]=(0,i.useState)(!1);(0,i.useEffect)(()=>()=>{Fo&&URL.revokeObjectURL(Fo)},[Fo]),(0,i.useEffect)(()=>{"txt"===j&&Fo&&(URL.revokeObjectURL(Fo),Do(""),To(""))},[j,Fo]),(0,i.useEffect)(()=>{const e=po&&po.length>0?po[0]:null,t=((null===co||void 0===co?void 0:co.tags)||[]).filter(e=>null!=e&&""!==e),o=fo&&fo.length>0?fo[0]:null,i=o&&!t.includes(o)?[...t,o]:t;e&&""!==e?"all"!==e&&i.length>0&&!i.includes(e)&&uo([i[0]]):i.length>0?uo([i[0]]):uo(["all"])},[po,uo,co,fo]),(0,i.useEffect)(()=>{(async()=>{if(jo&&w)try{Mo(!0);const e=w,t=await k.Uy.getDocument(e).promise,o=await t.getPage(1),i=.5,n=o.getViewport({scale:i}),r=document.createElement("canvas"),s=r.getContext("2d");r.height=n.height,r.width=n.width,await o.render({canvasContext:s,viewport:n}).promise;const a=r.toDataURL("image/png");Wo(a),Mo(!1)}catch(e){console.error("Error loading PDF preview:",e),Mo(!1),Wo(null)}else Wo(null)})()},[jo,w]),(0,i.useEffect)(()=>{gt?setTimeout(()=>{ai(!0)},10):ai(!1)},[gt]),(0,i.useEffect)(()=>{ft?setTimeout(()=>{di(!0)},10):di(!1)},[ft]),(0,i.useEffect)(()=>{yt?setTimeout(()=>{pi(!0)},10):pi(!1)},[yt]);const ui=i.useMemo(()=>{if(!vo)return"";if("vey"===j)return st?`https://www.youtube-nocookie.com/embed/${st}?rel=0&modestbranding=1`:w;if("vel"===j)return st?`https://www.loom.com/embed/${st}?autoplay=false`:w;if("vev"===j)return st?`https://player.vimeo.com/video/${st}`:w;if("vtw"===j){if(!st)return w;return st.startsWith("ch")?`https://player.twitch.tv/?channel=${st.slice(2)}&parent=${window.location.hostname}`:st.startsWith("c")?`https://clips.twitch.tv/embed?clip=${st.slice(1)}&parent=${window.location.hostname}`:`https://player.twitch.tv/?video=${st.slice(1)}&parent=${window.location.hostname}`}return"vwi"===j?st?`https://fast.wistia.net/embed/iframe/${st}`:w:""},[vo,j,st,w]),xi=Boolean((vo?ui:w)||w)&&tt.includes(j),mi=()=>
1{if(!xi)return null;if(bo&&w)return(0,M.jsx)("img",{src:w,alt:t("nav.selected"),style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"12px",display:"block"}});if(_o&&w)return(0,M.jsx)("video",{src:w,controls:!0,playsInline:!0,preload:"metadata",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}});if(vo&&ui)return(0,M.jsx)("iframe",{title:t("common.embedPreview","Embed preview"),src:ui,frameBorder:"0",allow:"accelerometer; encrypted-media; gyroscope; picture-in-picture; fullscreen",allowFullScreen:!0,loading:"lazy",referrerPolicy:"strict-origin-when-cross-origin",style:{width:"100%",height:"100%",border:"none",pointerEvents:"none"}});if(wo&&w)return(0,M.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:"#fff",borderRadius:"12px",padding:"8px"},children:(0,M.jsx)(C(),{className:"react-player",src:w,controls:!0,style:{width:"100%",height:"32px",outline:"none"}})});if(jo&&w)return Ro?(0,M.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:"#f8f9fa",borderRadius:"12px",padding:"16px"},children:[(0,M.jsx)(f.MY6,{style:{fontSize:"48px",color:"#dc3545",marginBottom:"8px"}}),(0,M.jsx)("span",{style:{fontSize:"12px",color:"#666",fontWeight:"500"},children:t("community.composer.loading")})]}):Eo?(0,M.jsx)("img",{src:Eo,alt:t("common.pdfPreview"),style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"12px",display:"block"}}):(0,M.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:"#f8f9fa",borderRadius:"12px",padding:"16px"},children:[(0,M.jsx)(f.MY6,{style:{fontSize:"48px",color:"#dc3545",marginBottom:"8px"}}),(0,M.jsx)("span",{style:{fontSize:"12px",color:"#666",fontWeight:"500"},children:t("community.composer.pdfDocument")})]});if(Co&&w)return(0,M.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:"#FFFFFF",borderRadius:"12px",padding:"8px"},children:["gos"===j&&(0,M.jsx)("img",{src:z,alt:t("dashboard.paidDms.googleSheets"),style:{width:32,height:32,marginBottom:"4px"}}),"god"===j&&(0,M.jsx)("img",{src:T,alt:t("dashboard.paidDms.googleDocs"),style:{width:32,height:32,marginBottom:"4px"}}),(0,M.jsx)("span",{style:{color:"#6C89AF",fontSize:11,fontWeight:500},children:"gos"===j?"Sheets":"Docs"})]});if(So&&w){const e=()=>"mgm"===j?"#FFF6DC":"mzm"===j?"#E5F1FF":"mmt"===j?"#E6E7FF":"#F9FBFF";return Fo?(0,M.jsx)("img",{src:Fo,alt:t("community.post.event"),style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"12px"}}):(0,M.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",backgroundColor:e(),borderRadius:"12px",padding:"8px"},children:["mzm"===j&&(0,M.jsx)("img",{src:A,alt:t("profile.zoom"),style:{width:80,height:"auto",objectFit:"contain"}}),"mgm"===j&&(0,M.jsx)("img",{src:D,alt:t("community.composer.googleMeet"),style:{width:"auto",height:60,objectFit:"contain"}}),"mmt"===j&&(0,M.jsx)("img",{src:F,alt:t("community.composer.microsoftTeams"),style:{width:"auto",height:48,objectFit:"contain"}}),"mot"===j&&(0,M.jsx)(f.bw7,{style:{color:"#6C89AF",fontSize:32}})]})}return null},hi=()=>{ti(!1),ri(!1),setTimeout(()=>{ii(!1)},300)},gi=()=>{E(),o<600&&hi()},fi=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,M.jsxs)("div",{id:"community-composer",style:{backgroundColor:"var(--rebranding-content-background-color)",border:e&&o<600?"none":"#E4EBF6 1px solid",borderRadius:"12px",boxSizing:"border-box",padding:e&&o<600?0:o<600?12:20,position:"relative",boxShadow:"0 1px 6px rgba(110,137,175,0.04)"},children:[(0,M.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"flex-start",boxSizing:"border-box"},children:[(0,M.jsx)(g.A,{alt:s,src:d,style:{marginTop:2}}),(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"100%",gap:12,boxSizing:"border-box"},children:[(0,M.jsxs)("div",{style:{display:"flex",width:"100%",gap:12,boxSizing:"border-box"},children:[(0,M.jsx)("div",{style:{flex:xi&&o>=600?1.2:1,boxSizing:"border-box"},children:at&&ko?(0,M.jsx)(a.A,{id:"communityComposerInput",sx:{backgroundColor:"white",borderRadius:"8px",overflow:"visible"},children:(0,M.jsx)(de.A,{children:(0,M.jsx)(ce.A,{value:u||"",onChange:e=>{x(e),b(e.length)},placeholder:t("community.placeholders.addContent"),minHeight:200,maxHeight:300,maxLength:25e3})})}):(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(Q.A,{id:"communityComposerInput",minRows:3,maxRows:10,className:"community-inputs",style:{border:"none",display:"block",fontWeight:"500",fontSize:16,padding:"10px 0px",boxSizing:"border-box",color:"#1D1D1D",borderRadius:0,width:"100%",fontFamily:"Roboto",resize:"none",outline:"none",backgroundColor:"transparent",overflow:"auto"},disabled:W,placeholder:at?t("community.placeholders.addContent"):c,maxLength:5e3,value:it(u),onChange:e=>x(e.target.value)})})}),xi&&o>=600&&(0,M.jsx)("div",{style:{marginRight:"0px",marginLeft:"auto"},children:(0,M.jsxs)("div",{style:{width:"100%",maxWidth:"180px",aspectRatio:"16/9",minHeight:"100px",maxHeight:"101.25px",position:"relative",borderRadius:"12px",overflow:"hidden",background:"rgb(243, 243, 243)",display:"flex",justifyContent:"center",alignItems:"center"},children:[mi(),(0,M.jsx)("div",{style:{position:"absolute",top:8,right:8,curs
1or:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:S,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]})})]}),xi&&o<600&&(0,M.jsx)("div",{style:{width:"100%"},children:(0,M.jsxs)("div",{style:{width:"100%",aspectRatio:"16/9",position:"relative",borderRadius:"12px",overflow:"hidden",background:"rgb(243, 243, 243)",display:"flex",justifyContent:"center",alignItems:"center"},children:[mi(),(0,M.jsx)("div",{style:{position:"absolute",top:8,right:8,cursor:"pointer",zIndex:10},children:(0,M.jsx)(G.A,{onClick:S,size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})]})})]})]}),(0,M.jsxs)("div",{style:{display:"flex",flexDirection:o<600?"column":"row",alignItems:o<600?"stretch":"center",justifyContent:"space-between",marginTop:"8px",gap:o<600?"12px":"0"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginLeft:"0px",flexWrap:"wrap"},children:[(0,M.jsx)("span",{onClick:_,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.J2d,{style:{color:"#666666",fontSize:22}})}),(0,M.jsx)(et,{title:t("community.composer.uploadOrEmbedVideo"),placement:"bottom",children:(0,M.jsx)("span",{onClick:B,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.m1g,{style:{color:"#666666",fontSize:22}})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:ne,keepMounted:!0,disablePortal:!1,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(ne),onClose:L,ModalProps:{disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0},sx:{zIndex:10001,"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid",zIndex:10001}},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{L(),N()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(f.m1g,{style:{verticalAlign:"middle",width:"16px",height:"16px",color:"#6C89AF",marginRight:"8px"}}),t("community.composer.upload")]}),(0,M.jsxs)(p.A,{onClick:()=>{L(),me("post"),he(!0),ge(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(q.aT,{style:{verticalAlign:"middle",width:"16px",height:"16px",color:"#6C89AF",marginRight:"8px"}}),t("community.composer.embed")]})]})}),(0,M.jsx)(et,{title:t("community.composer.uploadAudio"),placement:"bottom",children:(0,M.jsx)("span",{onClick:()=>{L(),$()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.j0C,{style:{color:"#666666",fontSize:22}})})}),(0,M.jsx)(et,{title:t("community.composer.uploadDoc"),placement:"bottom",children:(0,M.jsx)("span",{onClick:H,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.Txu,{style:{color:"#666666",fontSize:22}})})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:ae,keepMounted:!0,disablePortal:!1,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(ae),onClose:Y,ModalProps:{disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0},sx:{zIndex:10001,"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid",zIndex:10001}},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{Y(),X()},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(K.kl1,{style:{verticalAlign:"middle",color:"#6C89AF",marginRight:"8px"}}),t("community.composer.uploadPdf")]}),(0,M.jsxs)(p.A,{onClick:()=>{Y(),fe(!0),pe("gos"),ye("post"),be(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:z,style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),t("community.composer.googleSheet")]}),(0,M.jsxs)(p.A,{onClick:()=>{Y(),fe(!0),pe("god"),ye("post"),be(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:T,style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),t("community.composer.googleDoc")]})]})}),at&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(et,{title:t("community.composer.addMeeting"),placement:"bottom",children:(0,M.jsx)("span",{className:"calendar-meeting-button","aria-label":t("community.ariaLabels.addMeeting"),onClick:J,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.xkj,{style:{color:"#666666",fontSize:22}})})}),(0,M.jsx)(et,{title:t("community.composer.schedulePost"),placement:"bottom",children:(0,M.jsx)("span",{className:"schedule-post-button","aria-label":t("community.composer.schedulePost"),onClick:e=>Po(e.currentTarget),style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",transition:"background 0.15s",padding:"4px"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(f.Tu,{style:{color:I?R||"var(--brand-color)":"#666666",fontSize:22}})})}),(0,M.jsx)(Je.Ay,{open:Boolean(Io),anchorEl:Io,onClose:()=>Po(null),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},sx:{zIndex:10001},children:(0,M.jsxs)("div",{style:{padding:"16px",minWidth:"260px"},children:[(0,M.jsx)("p",{style:{color:"#000",fontWeight:"600",fontSize:"14px",margin:"0 0 10px 0"},children:t("community.composer.selectScheduleDate")}),(0,M.jsx)("input",{type:"datetime-local",style:{border:"1px solid #D9DADB",borderRadius:"6px",padding:"8px",width:"100%",boxSizing:"border-box",fontFamily:"Roboto",fontSize:"14px",color:"#3B55F3"}
1,value:I?(()=>{const e=new Date(I);if(isNaN(e.getTime()))return"";return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}T${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`})():"",min:(()=>{const e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}T${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`})(),onChange:e=>{const o=new Date(e.target.value);isNaN(o.getTime())?P(null):o<new Date?Lo(t("community.composer.scheduleDatePast")):(Lo(""),P(o.toISOString()))}}),(0,M.jsx)("p",{style:{color:"#999",fontSize:"11px",margin:"6px 0 0 0",fontStyle:"italic"},children:Intl.DateTimeFormat().resolvedOptions().timeZone}),Bo&&(0,M.jsx)("p",{style:{color:"var(--danger-color)",fontSize:"12px",margin:"8px 0 0 0"},children:Bo}),I&&(0,M.jsx)(m.A,{fullWidth:!0,onClick:()=>{P(null),Lo(""),Po(null)},sx:{textTransform:"none",color:"var(--danger-color)",fontWeight:"600",marginTop:"10px"},children:t("community.composer.clearSchedule")})]})}),(0,M.jsx)(h.A,{id:"simple-menu",anchorEl:le,keepMounted:!0,disablePortal:!1,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:Boolean(le),onClose:ee,ModalProps:{disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0},sx:{zIndex:10001,"& .MuiPaper-root":{backgroundColor:"#fff",boxShadow:"rgba(0, 0, 0, 0.05) 0px 6px 12px 0px, rgba(229, 229, 229, 0.05) 0px 0px 0px 1px;",border:"1px #f4f4f4 solid",zIndex:10001}},children:(0,M.jsxs)("div",{children:[(0,M.jsxs)(p.A,{type:"button",onClick:()=>{ee(),_e(!0),pe("mzm"),ve("post"),we(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:A,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),t("community.composer.zoom")]}),(0,M.jsxs)(p.A,{onClick:()=>{ee(),_e(!0),pe("mgm"),ve("post"),we(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:D,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),t("community.composer.googleMeet")]}),(0,M.jsxs)(p.A,{onClick:()=>{ee(),_e(!0),pe("mmt"),ve("post"),we(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)("img",{src:F,style:{verticalAlign:"middle",height:"auto",width:"16px",marginRight:"8px"}}),t("community.composer.microsoftTeams")]}),(0,M.jsxs)(p.A,{onClick:()=>{ee(),_e(!0),pe("mot"),ve("post"),we(!1)},sx:{color:"black",fontWeight:"500",fontSize:"14px"},children:[(0,M.jsx)(f.bw7,{style:{verticalAlign:"middle",color:"#6C89AF",width:"16px",height:"16px",marginRight:"8px"}}),t("community.composer.other")]})]})})]}),at&&(0,M.jsx)("span",{onClick:()=>Ao(e=>!e),style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:"6px",padding:"4px",color:ko?R||"#4F6BED":"#666",backgroundColor:"transparent",border:"none",transition:"all 0.15s"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#f1f1f1",onMouseLeave:e=>e.currentTarget.style.backgroundColor="",children:(0,M.jsx)(v.C2y,{style:{fontSize:20}})}),(0,M.jsx)("div",{style:{width:"1px",height:"24px",backgroundColor:"#D3DCE7",flexShrink:0}}),(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px",flexShrink:0},children:[(0,M.jsx)(Ke.x,{onClickAway:e=>{e.target&&e.target.closest(".edit-category-btn")||Qo(!1)},children:(0,M.jsxs)("div",{style:{position:"relative",maxWidth:o<600?180:200,flexShrink:0},children:[(0,M.jsxs)(Ie.P.button,{whileTap:{scale:.98},onClick:()=>Qo(e=>!e),style:{width:"auto",maxWidth:"100%",zIndex:o<600?1500:100,background:"white",border:qo?`0px solid ${R||"#6C89AF"}`:"0px solid #C6D1DE",borderRadius:"8px",margin:"0px auto",padding:"8px 14px",fontSize:"15px",fontWeight:300,color:"#6B7280",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"border 0.2s, box-shadow 0.2s",outline:"none",position:"relative",minHeight:32,height:32},"aria-haspopup":"listbox","aria-expanded":!!qo,children:[(0,M.jsx)("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:(0,M.jsx)("span",{style:{fontWeight:400,fontSize:"15px",color:"#6B7280",lineHeight:1.2,maxWidth:o<600?120:150,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"middle"},title:po&&po[0]&&"all"!==po[0]?ot(po[0]):t("community.composer.allCategories"),children:po&&po[0]&&"all"!==po[0]?ot(po[0]).length>20?ot(po[0]).substring(0,20)+"...":ot(po[0]):t("community.composer.allCategories")})}),(0,M.jsx)(Ie.P.span,{animate:{rotate:qo?180:0},transition:{duration:.25},style:{display:"flex",alignItems:"center",marginLeft:"5px"},children:(0,M.jsx)(f.HmQ,{style:{fontSize:"18px",color:"#656565",transition:"transform 0.2s"}})})]}),(0,M.jsx)(Xe.N,{children:qo&&(0,M.jsxs)(Ie.P.ul,{initial:{opacity:0,y:-10}
1,animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.25},style:{position:"absolute",top:"calc(100% + 6px)",left:0,width:"100%",minWidth:o<600?180:200,background:"white",borderRadius:"10px",boxShadow:"0 8px 24px rgba(0,0,0,0.1)",padding:"6px 0",zIndex:o<600?1500:100,listStyle:"none",margin:0,border:"1px solid #E4EBF6",maxHeight:300,overflowY:"auto"},role:"listbox",children:[!1,(0,M.jsx)(Ie.P.li,{onClick:()=>{Qo(!1),uo(["all"])},whileHover:{backgroundColor:po&&"all"===po[0]?"rgba(110,137,175,0.06)":"rgba(110,137,175,0.04)"},style:{padding:"10px 14px",cursor:"pointer",display:"flex",alignItems:"center",fontWeight:po&&"all"===po[0]?600:500,color:po&&"all"===po[0]?R||"#6C89AF":"#1D1D1D",fontSize:"14px",background:po&&"all"===po[0]?"rgba(110,137,175,0.06)":"transparent",boxShadow:po&&"all"===po[0]?"0 1px 6px 0 rgba(110,137,175,0.04)":"none",transition:"background 0.15s, color 0.15s, box-shadow 0.15s",gap:8,minHeight:36},role:"option","aria-selected":po&&"all"===po[0],children:(0,M.jsx)("span",{style:{flex:1,display:"flex",alignItems:"center",gap:6,minWidth:0},children:(0,M.jsx)("span",{style:{maxWidth:200,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"middle"},title:t("community.composer.allCategories"),children:t("community.composer.allCategories")})})}),(()=>{const e=((null===co||void 0===co?void 0:co.tags)||[]).filter(e=>null!=e&&""!==e),t=fo&&fo.length>0?fo[0]:null,i=t&&!e.includes(t)?[...e,t]:e;return i.length>0&&(0,M.jsx)(M.Fragment,{children:i.map((e,i)=>{const n=po&&po[0]===e,r=ot(e)||"",s=t===e;return(0,M.jsxs)(Ie.P.li,{onClick:t=>{t.target.closest(".edit-category-btn")||(Qo(!1),uo([e]))},whileHover:{backgroundColor:n?"rgba(110,137,175,0.06)":"rgba(110,137,175,0.04)"},style:{padding:"10px 14px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",fontWeight:n?600:500,color:n?R||"#6C89AF":"#1D1D1D",fontSize:"14px",background:n?"rgba(110,137,175,0.06)":"transparent",boxShadow:n?"0 1px 6px 0 rgba(110,137,175,0.04)":"none",transition:"background 0.15s, color 0.15s, box-shadow 0.15s",gap:8,minHeight:36},role:"option","aria-selected":n,children:[(0,M.jsx)("span",{style:{flex:1,display:"flex",alignItems:"center",gap:6,minWidth:0},children:(0,M.jsx)("span",{style:{maxWidth:o<600?120:150,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"middle"},title:e,children:r.length>20?r.substring(0,20)+"...":r})}),at&&!s&&(0,M.jsx)("button",{className:"edit-category-btn",type:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),ho?ho(e):console.warn("onEditCategory prop not provided")},style:{padding:"4px",borderRadius:"50%",border:"none",background:"transparent",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",color:"#666",transition:"background 0.15s, color 0.15s",flexShrink:0,marginLeft:"8px"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="rgba(110,137,175,0.1)",e.currentTarget.style.color=R||"#6C89AF"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent",e.currentTarget.style.color="#666"},children:(0,M.jsx)(f.O18,{style:{fontSize:14}})})]},e||`cat-${i}`)})})})()]})})]})}),!1]})]}),(0,M.jsxs)("div",{style:{display:"flex",flexDirection:o<600?"column":"row",alignItems:o<600?"stretch":"center",gap:"8px",width:o<600?"100%":void 0,marginLeft:o<600?0:void 0,marginTop:o<600?"8px":0},children:[I&&(0,M.jsx)(qe.A,{size:"small",label:t("community.composer.scheduledFor",{date:(0,Be.zK)(new Date(I))}),onDelete:()=>P(null),deleteIcon:(0,M.jsx)(f.$9n,{}),sx:{backgroundColor:"#EEF1FB",color:"#3B55F3",fontWeight:600}}),(0,M.jsx)(m.A,{variant:"contained",disableElevation:!0,fullWidth:o<600,sx:{padding:o<600?"12px 20px":"6px 14px",textTransform:"none",fontWeight:600,borderRadius:"8px",backgroundColor:R||"var(--brand-color)",width:o<600?"100%":void 0,"&:hover":{backgroundColor:R?"undefined"!==typeof window?(()=>{try{const e=R.replace("#","");let t=parseInt(e,16),o=15+(t>>16),i=15+(t>>8&255),n=15+(255&t);return o=Math.min(255,o),i=Math.min(255,i),n=Math.min(255,n),`rgb(${o},${i},${n})`}catch{return R}})():R:"var(--brand-color-hover)"}},disabled:W,onClick:gi,children:t(I?"community.composer.schedulePost":"community.composer.submitPost")})]})]})]})};return(0,M.jsxs)(M.Fragment,{children:[o<600?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{style:{backgroundColor:"var(--rebranding-content-background-color)",border:"#E4EBF6 1px solid",borderRadius:"12px",boxSizing:"border-box",minHeight:60,padding:"12px",position:"relative",boxShadow:"0 1px 6px rgba(110,137,
1175,0.04)",cursor:"pointer"},onClick:()=>{e.isUnlockedCommunityPreview||(ii(!0),setTimeout(()=>{ri(!0)},10))},children:(0,M.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center",boxSizing:"border-box"},children:[(0,M.jsx)(g.A,{alt:s,src:d,style:{marginTop:2}}),(0,M.jsx)(Q.A,{readOnly:!0,minRows:1,className:"text-input community-inputs",style:{border:"none",display:"block",fontWeight:"500",fontSize:16,padding:"10px 12px",boxSizing:"border-box",color:"#999",borderRadius:8,width:"100%",fontFamily:"Roboto",resize:"none",backgroundColor:"transparent",cursor:"pointer"},value:"",placeholder:t("community.placeholders.clickToCreatePost")})]})}),oi&&(0,M.jsx)(V.A,{open:oi,onClose:hi,"aria-labelledby":"composer-modal-title","aria-describedby":"composer-modal-description",style:{zIndex:9999,outline:"0"},children:(0,M.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,outline:"0",backgroundColor:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:"flex-end",justifyContent:"center",zIndex:9999,padding:"0px",opacity:ni?1:0,transition:"opacity 0.3s ease-in-out",pointerEvents:mo?"none":"auto"},onClick:hi,children:(0,M.jsxs)("div",{style:{maxWidth:"100%",width:"100%",height:"auto",maxHeight:"90vh",minHeight:"60vh",backgroundColor:"#fff",borderRadius:"20px 20px 0px 0px",position:"relative",boxShadow:"0 -10px 40px rgba(0, 0, 0, 0.15)",overflow:"visible",transform:ni?"translateY(0)":"translateY(100%)",opacity:ni?1:0,transition:"all 0.3s ease-out",display:"flex",flexDirection:"column",border:"none",padding:0,pointerEvents:mo?"none":"auto"},onClick:e=>{e.stopPropagation()},children:[(0,M.jsx)("div",{style:{position:"absolute",top:"-70px",left:"50%",transform:"translateX(-50%)",cursor:"pointer",zIndex:10001,display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",transition:"all 0.2s ease",opacity:ni?1:0,transitionDelay:ni?"0.2s":"0s"},onClick:e=>{e.stopPropagation(),hi()},onMouseEnter:e=>{e.currentTarget.style.opacity="1"},onMouseLeave:e=>{e.currentTarget.style.opacity=ni?"1":"0"},children:(0,M.jsxs)("div",{style:{width:"auto",height:"40px",padding:"0px 12px",borderRadius:"12px",backgroundColor:"rgba(255, 255, 255, 0.3)",display:"flex",gap:"5px",alignItems:"center",justifyContent:"center",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",transition:"all 0.2s ease"},children:[(0,M.jsx)(f.HmQ,{style:{fontSize:"22px",color:"#fff",opacity:.8,transition:"color 0.2s ease"}}),(0,M.jsx)("span",{style:{color:"rgba(255, 255, 255, 0.9)",fontSize:"14px",fontWeight:500,textShadow:"0 1px 3px rgba(0, 0, 0, 0.3)"},children:"Close"})]})}),(0,M.jsx)("div",{style:{padding:"20px",flex:1,overflowY:"auto",opacity:ni?1:0,transform:ni?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:ni?"0.1s":"0s",display:"flex",flexDirection:"column"},children:fi(!0)})]})})})]}):fi(),(0,M.jsx)(V.A,{open:gt,onClose:()=>{_e(!1),"post"===Gt?(pe("txt"),dt("")):"thread"===Gt?(Et("txt"),Zt("")):"comment"===Gt?(Rt("txt"),Xt("")):"edit"===Gt&&(Pt("txt"),Kt(""),Jt(""),qt(""))},"aria-labelledby":"Thumbnail selection","aria-describedby":"Select thumbnail from video",style:{zIndex:"9999"},children:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(se.default,{msg:no,open:ro,severity:so,backgroundColor:ao,handleClose:()=>{we(!1)},autoHide:null}),(0,M.jsxs)(a.A,{sx:{position:"absolute",display:"flex",flexDirection:"column",alignItems:"center",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"#fff",maxWidth:"600px",width:e.windowWidth<350?"300px":e.windowWidth<500?"90%":"450px",minWidth:"320px",borderRadius:"6px",boxShadow:24,padding:"30px",boxSizing:"border-box"},children:[(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px","&:hover":{cursor:"pointer"}},children:(0,M.jsx)("a",{onClick:()=>{_e(!1),"post"===Gt?(pe("txt"),dt(""),ht(""),nt(""),Fo&&URL.revokeObjectURL(Fo),Do(""),To("")):"thread"===Gt?(Et("txt"),Zt(""),ht("")):"comment"===Gt?(Rt("txt"),Xt(""),ht("")):"edit"===Gt&&(Pt("txt"),Kt(""),Jt(""),qt(""))},children:(0,M.jsx)(G.A,{size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})}),(0,M.jsx)("div",{style:{display:"block",width:"100%",height:"100%",margin:"0px",textAlign:"center"},children:(()=>{const e="post"===Gt?j:"thread"===Gt?Nt:"comment"===Gt?Ot:"edit"===Gt?Ut:"";if("mot"===e)return(0,M.jsx)(f.bw7,{style:{verticalAlign:"middle",color:"#6C89AF",width:"24px",height:"24px",margin:"-3px 2px 0px 8px"}});{const t="mzm"===e?A:"mgm"===e?D:"mmt"===e?F:null;return t&&(0,M.jsx)("img",{src:t,style:{verticalAlign:"middle",height:"auto",height:"mzm"===e?"14px":"mgm"===e?"32px":"26px",margin:"-3px 2px 0px 8px"}})}})()}),(0,M.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,M.jsxs)("h3",{style:{color:"#000",fontSize:"18px",fontFamily:"Roboto",fontWeight:"600",textAlign:"center"},children:["Add ",(()=>{switch("post"===Gt?j:"thread"===Gt?Nt:"comment"===Gt?Ot:"edit"===Gt?Ut:""){case"mzm":return t("community.composer.zoomMeeting");case"mgm":return t("community.composer.googleMeetMeeting");case"mmt":return t("community.composer.microsoftTeamsMeeting");case"mot":return t("community.composer.meeting");default:return""}})()]})}),(0,M.jsx)("p",{style:{color:"#000",width:(e.windowWidth,"100%"),fontWeight:"600",fontSize:"14px",margin:"10px auto 10px 0px",textAlign:"center"},children:t("community.composer.addMeetingLink")}),(0,M.jsx)("form",{autoComplete:"off",style:{backgroundColor:"#ffffff",color:"#fff",borderRadius:"8px",padding:"2px 7px",display:"flex",flexDirection:"column",border:"1px solid #D9DADB",width:"100%",fontFamily:"roboto",minWidth:"280px",zIndex:"10",boxSizing:"border-box",margin:"auto",marginBottom:"10px"},children:(0,M.jsx)("input",{type:"text",className:"text-input-with-button email-field",id:"emailCaptureInput",placeholder:t("community.placeholders.meetingUrl"),maxLength:200,style:{border:"none",padding:"0px 0px 0px 0px",width:"100%",textAlign:"center",height:"40px",fontWeight:"400",color:"#3B55F3",fontSize:"16px",fontFamily:"Roboto"},value:"post"===Gt?lt:"thread"===Gt?Qt:"comment"===Gt?eo:to,autoComplete:"off",onChange:e=>{"post"===Gt?dt(e.target.value):"thread"===Gt?Zt(e.target.value):"comment"===Gt?Xt(e.target.value):"edit"===Gt&&Kt(e.target.value)}})}),(0,M.jsxs)("p",{style:{color:"#6D89AF",width:(e.windowWidth,"100%"),fontWeight:"600",fontSize:"12px",margin:"0px auto 10px 0px",textAlign:"center"},children:[(0,M.jsx)(y.wfp,{style:{verticalAlign:"middle",marginTop:"-2px",paddingRight:"3px",fontSize:"16px"}}),t("post"===Gt?"mzm"===j?"community.composer.allZoomLinksAccepted":"mgm"===j?"community.composer.allGoogleMeetLinksAccepted":"mmt"===j?"community.composer.allMicrosoftTeamsLinksAccepted":"mot"===j?"community.composer.allMeetingLinksAccepted":"pdf"===j?"community.composer.allPdfFilesAccepted":"vey"===j?"community.composer.allYouTubeUrlsAccepted":"vel"===j?"community.composer.allLoomUrlsAccepted":"community.composer.allLinksAccepted":"thread"===Gt?"mzm"===Nt?"community.composer.allZoomLinksAccepted":"mgm"===Nt?"community.composer.allGoogleMeetLinksAccepted":"mmt"===Nt?"community.composer.allMicrosoftTeamsLinksAccepted":"mot"===Nt?"community.composer.allMeetingLinksAccepted":"pdf"===Nt?"community.composer.allPdfFilesAccepted":"vey"===Nt?"community.composer.allYouTubeUrlsAccepted":"vel"===Nt?"community.composer.allLoomUrlsAccepted":"community.composer.allLinksAccepted":"comment"===Gt?"mzm"===Ot?"community.composer.allZoomLinksAccepted":"mgm"===Ot?"community.composer.allGoogleMeetLinksAccepted":"mmt"===Ot?"community.composer.allMicrosoftTeamsLinksAccepted":"mot"===Ot?"community.composer.allMeetingLinksAccepted":"pdf"===Ot?"community.composer.allPdfFilesAccepted":"vey"===Ot?"community.composer.allYouTubeUrlsAccepted":"vel"===Ot?"community.composer.allLoomUrlsAccepted":"community.composer.allLinksAccepted":"mzm"===Ut?"community.composer.allZoomLinksAccepted":"mgm"===Ut?"community.composer.allGoogleMeetLinksAccepted":"mmt"===Ut?"community.composer.allMicrosoftTeamsLinksAccepted":"mot"===Ut?"community.composer.allMeetingLinksAccepted":"pdf"===Ut?"community.composer.allPdfFilesAccepted":"vey"===Ut?"community.composer.allYouTubeUrlsAccepted":"vel"===Ut?"community.composer.allLoomUrlsAccepted":"community.composer.allLinksAccepted")]}),(0,M.jsx)("p",{style:{color:"#000",width:(e.windowWidth,"100%"),fontWeight:"600",fontSize:"14px",margin:"30px auto 10px 0px",textAlign:"center"},children:t("community.composer.selectMeetingTime")}),(0,M.jsxs)("form",{autoComplete:"off",style:{backgroundColor:"#ffffff",color:"#fff",borderRadius:"8px",padding:e.windowWidth>600?"2px 17px 2px 7px":"0px",display:"flex",flexDirection:"column",border:"1px solid #D9DADB",width:"100%",fontFamily:"roboto",minWidth:"280px",zIndex:"10",boxSizing:"border-box",margin:e.windowWidth>600?"0px auto auto auto":"0px auto",position:"relative"},children:[(0,M.jsx)("div",{style:{position:"relative",width:"100%",display:"flex"},children:(0,M.jsx)("input",{type:"datetime-local",className:"text-input-with-button time-field",id:"meetingTimePicker",style:{border:"none",padding:"0px 0px",width:e.windowWidth>600?"100%":"90%",margin:"auto",backgroundColor:"white",textAlign:"center",height:"40px",fontWeight:"400",color:"#3B55F3",fontSize:"16px",fontFamily:"Roboto"},value:mt?(()=>{const e=new Date(mt);if(isNaN(e.getTime()))return"";return`${e.getFullYear()}
1-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}T${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`})():"",min:(()=>{const e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}T${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`})(),onChange:e=>{const t=new Date(e.target.value);isNaN(t.getTime())?ht(""):ht(t.toISOString())}})}),e.windowWidth>600&&(0,M.jsx)("div",{style:{position:"absolute",right:"15px",top:"50%",transform:"translateY(-50%)",cursor:"pointer"},onClick:()=>document.getElementById("meetingTimePicker").showPicker(),children:(0,M.jsx)("div",{style:{backgroundColor:"#3B55F3",color:"white",padding:"2px",display:"flex",borderRadius:"50%",fontSize:"12px",fontWeight:"600",width:"20px",height:"20px",textAlign:"center"},children:(0,M.jsx)(f.xkj,{style:{verticalAlign:"middle",margin:"auto"}})})})]}),(0,M.jsx)("p",{style:{color:"#6D89AF",width:(e.windowWidth,"100%"),fontWeight:"600",fontSize:"12px",margin:"10px auto 10px 0px",textAlign:"center"},children:t("community.composer.timeTimezone")}),""!==mt?(0,M.jsx)("p",{style:{cursor:"pointer",textAlign:"center",color:"var(--danger-color)",fontSize:"14px",textTransform:"none",width:"auto",fontWeight:"600",maxWidth:"400px",marginTop:"5px",bottom:"20px",":hover":{bgcolor:"var(--brand-color-hover)",color:"white",borderColor:"var(--brand-color-hover)"}},onClick:()=>ht(""),children:"Clear Time"}):(0,M.jsx)("p",{style:{width:"100%",textAlign:"center",color:"#6D89AF",fontSize:"14px",textTransform:"none",width:(e.windowWidth,"100%"),fontWeight:"600",maxWidth:"400px",marginTop:"5px",bottom:"20px"},children:"No Meeting Time Selected"}),("post"===Gt||"edit"===Gt)&&(0,M.jsxs)("div",{style:{marginTop:"18px",width:"100%"},children:[(0,M.jsx)("p",{style:{color:"#000",width:"100%",fontWeight:"600",fontSize:"14px",margin:"0px auto 10px auto",textAlign:"center"},children:t("community.composer.addEventImage")}),(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"10px"},children:[(0,M.jsxs)(m.A,{variant:"outlined",component:"label",sx:{textTransform:"none",borderRadius:"8px",borderColor:"#D9DADB",color:"#1D1D1D",fontWeight:"600",maxWidth:"400px",width:"100%"},children:[zo||io?t("community.composer.changeImage",{filename:zo||io}):t("community.composer.chooseImage"),(0,M.jsx)("input",{hidden:!0,type:"file",accept:"image/png,image/jpeg",onChange:e=>{var t,o;const i=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!i)return;if(null===(o=i.type)||void 0===o||!o.startsWith("image/"))return;(Fo||oo)&&URL.revokeObjectURL(Fo||oo);const n=URL.createObjectURL(i);"edit"===Gt?(Jt(n),qt(i.name),go(i)):(Do(n),To(i.name),nt(i))}})]}),(Fo||oo)&&(0,M.jsxs)("div",{style:{width:"100%",maxWidth:"400px"},children:[(0,M.jsx)("img",{src:Fo||(oo.startsWith("blob:")||oo.startsWith("http")?oo:Qe.CONTENT_CLOUDFRONT+oo),alt:t("community.post.event"),style:{width:"100%",maxHeight:"220px",objectFit:"cover",borderRadius:"10px",border:"1px solid #E4EBF6"}}),(0,M.jsx)(m.A,{variant:"text",onClick:()=>{"edit"===Gt?(oo&&URL.revokeObjectURL(oo),Jt(""),qt(""),go("")):(Fo&&URL.revokeObjectURL(Fo),Do(""),To(""),nt(""))},sx:{textTransform:"none",color:"var(--danger-color)",fontWeight:"600",marginTop:"6px"},children:"Remove image"})]})]})]}),(0,M.jsx)(m.A,{fullWidth:!0,variant:"contained",sx:{backgroundColor:"var(--brand-color)",fontSize:"14px",textTransform:"none",width:(e.windowWidth,"100%"),borderRadius:"6px",boxShadow:"none",fontWeight:"600",maxWidth:"400px",marginTop:"10px",":hover":{bgcolor:"var(--brand-color-hover)",color:"white",boxShadow:"none"}},className:"image_update_button",type:"submit",value:"submit",disabled:"post"===Gt?""===lt:"thread"===Gt?""===Qt:"comment"===Gt?""===eo:""===to,onClick:()=>{lo()},children:t("community.composer.addMeeting")})]})]})}),(0,M.jsx)(V.A,{open:ft,onClose:()=>{fe(!1),Tt(""),"post"===Dt?(pe("txt"),pt("")):"thread"===Dt?(Et("txt"),Wt("")):"comment"===Dt?(Rt("txt"),Mt("")):"edit"===Dt&&(Pt("txt"),It(""))}
1,"aria-labelledby":"Thumbnail selection","aria-describedby":"Select thumbnail from video",style:{zIndex:"9999"},children:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(se.default,{msg:Bt,open:Lt,severity:"error",backgroundColor:"var(--danger-color)",handleClose:()=>{be(!1)},autoHide:null}),(0,M.jsxs)(a.A,{sx:{position:"absolute",display:"flex",flexDirection:"column",alignItems:"center",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"#fff",maxWidth:"600px",width:e.windowWidth<350?"300px":e.windowWidth<500?"90%":"450px",minWidth:"320px",borderRadius:"6px",boxShadow:24,padding:"30px",boxSizing:"border-box"},children:[(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px","&:hover":{cursor:"pointer"}},children:(0,M.jsx)("a",{onClick:()=>{fe(!1),Tt(""),"post"===Dt?(pe("txt"),pt("")):"thread"===Dt?(Et("txt"),Wt("")):"comment"===Dt?(Rt("txt"),Mt("")):"edit"===Dt&&(Pt("txt"),It(""))},children:(0,M.jsx)(G.A,{size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})}),(0,M.jsx)("div",{style:{display:"block",width:"100%",height:"100%",margin:"0px",textAlign:"center"},children:(()=>{const e="post"===Dt?j:zt;return"god"===e?(0,M.jsx)("img",{src:T,style:{verticalAlign:"middle",height:"26px",margin:"-3px 2px 0px 8px"}}):"gos"===e?(0,M.jsx)("img",{src:z,style:{verticalAlign:"middle",height:"26px",margin:"-3px 2px 0px 8px"}}):void 0})()}),(0,M.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,M.jsxs)("h3",{style:{color:"var(--light-theme-text-color)",fontSize:"20px",fontFamily:"Roboto",fontWeight:"600",textAlign:"center"},children:[t("community.composer.add")," ",(()=>{const e="post"===Dt?j:zt;return"gos"===e?t("community.composer.googleSheet"):"god"===e?t("community.composer.googleDoc"):""})()]})}),(0,M.jsx)("form",{autocomplete:"off",style:{backgroundColor:"#ffffff",color:"#fff",borderRadius:"8px",padding:"2px 7px",display:"flex",border:"1px solid #D9DADB",width:"100%",fontFamily:"roboto",minWidth:"280px",zIndex:"10",boxSizing:"border-box",margin:"auto"},children:(0,M.jsx)("input",{type:"text",className:"text-input-with-button email-field",id:"emailCaptureInput",placeholder:(()=>{const e="post"===Dt?j:zt;return"gos"===e?t("community.composer.typeOrPasteSheetUrl"):"god"===e?t("community.composer.typeOrPasteDocUrl"):""})(),maxLength:200,multiline:!0,style:{border:"none",padding:"0px 0px 0px 0px",width:"100%",textAlign:"center",height:"40px",fontWeight:"400",color:"#3B55F3",fontSize:"16px",fontFamily:"Roboto"},value:"post"===Dt?ct:"thread"===Dt?$t:"comment"===Dt?Ht:Vt,autoComplete:"off",onChange:e=>{"post"===Dt?pt(e.target.value):"thread"===Dt?Wt(e.target.value):"comment"===Dt?Mt(e.target.value):"edit"===Dt&&It(e.target.value)}})}),(0,M.jsxs)("p",{style:{color:"#6D89AF",width:(e.windowWidth,"100%"),fontWeight:"600",fontSize:"12px",margin:"12px auto 10px 0px",textAlign:"center"},children:[(0,M.jsx)(y.wfp,{style:{verticalAlign:"middle",marginTop:"-2px",paddingRight:"3px",fontSize:"16px"}}),(()=>{const e="post"===Dt?j:zt;return t("gos"===e?"community.composer.allGoogleSheetLinksAccepted":"god"===e?"community.composer.allGoogleDocLinksAccepted":"community.composer.allGoogleDocOrSheetLinksAccepted")})()]}),(0,M.jsx)(m.A,{fullWidth:!0,variant:"contained",sx:{backgroundColor:"var(--brand-color)",fontSize:"14px",textTransform:"none",width:(e.windowWidth,"100%"),borderRadius:"6px",boxShadow:"none",fontWeight:"600",maxWidth:"400px",marginTop:"10px",":hover":{bgcolor:"var(--brand-color-hover)",color:"white",boxShadow:"none"}},className:"image_update_button",type:"submit",value:"submit",disabled:"post"===Dt?""===ct:"thread"===Dt?""===$t:"comment"===Dt?""===Ht:""===Vt,onClick:()=>{Yt()},children:"post"===Dt?"gos"===j?t("community.composer.addSheet"):"god"===j?t("community.composer.addDoc"):"":"thread"===Dt?"gos"===Nt?t("community.composer.addSheet"):"god"===Nt?t("community.composer.addDoc"):"":"comment"===Dt?"gos"===Ot?t("community.composer.addSheet"):"god"===Ot?t("community.composer.addDoc"):"":"gos"===Ut?t("community.composer.addSheet"):"god"===Ut?t("community.composer.addDoc"):""})]})]})}),(0,M.jsx)(V.A,{open:yt,onClose:()=>{he(!1),"post"===_t?xt(""):"thread"===_t?vt(""):"comment"===_t?wt(""):"edit"===_t&&jt("")}
1,"aria-labelledby":"Thumbnail selection","aria-describedby":"Select thumbnail from video",style:{zIndex:9999},children:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(se.default,{msg:Ct,open:St,severity:"error",backgroundColor:"var(--danger-color",handleClose:()=>{ge(!1)},autoHide:null}),(0,M.jsxs)(a.A,{sx:{position:"absolute",display:"flex",flexDirection:"column",alignItems:"center",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"#fff",maxWidth:"600px",width:e.windowWidth<350?"300px":e.windowWidth<500?"90%":"450px",minWidth:"320px",borderRadius:"6px",boxShadow:24,padding:"20px 20px",boxSizing:"border-box",zIndex:9999},children:[(0,M.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px","&:hover":{cursor:"pointer"}},children:(0,M.jsx)("a",{onClick:()=>{he(!1),"post"===_t?xt(""):"thread"===_t?vt(""):"comment"===_t?wt(""):"edit"===_t&&jt("")},children:(0,M.jsx)(G.A,{size:"small",sx:{border:"1px solid #D3DCE7",backgroundColor:"#fff",p:"5px",height:"28px",width:"28px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#f5f5f5"}},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"16px",color:"#222"}})})})}),(0,M.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,M.jsx)("h3",{style:{color:"var(--light-theme-text-color)",fontSize:"20px",fontFamily:"Roboto",fontWeight:"600",textAlign:"center"},children:t("community.composer.embedVideoUrl")})}),(0,M.jsx)("form",{autocomplete:"off",style:{backgroundColor:"#ffffff",color:"#fff",borderRadius:"8px",padding:"2px 7px",display:"flex",border:"1px solid #D9DADB",width:"100%",fontFamily:"roboto",minWidth:"280px",zIndex:"10",boxSizing:"border-box",margin:"auto"},children:(0,M.jsx)("input",{type:"text",className:"text-input-with-button email-field",id:"emailCaptureInput",placeholder:t("community.composer.typeOrPasteVideoUrl"),maxLength:200,multiline:!0,style:{border:"none",padding:"0px 0px 0px 0px",width:"100%",textAlign:"center",height:"40px",fontWeight:"400",color:"#3B55F3",fontSize:"16px",fontFamily:"Roboto"},value:"post"===_t?ut:"thread"===_t?kt:"comment"===_t?At:Ft,autoComplete:"off",onChange:e=>{"post"===_t?xt(e.target.value):"thread"===_t?vt(e.target.value):"comment"===_t?wt(e.target.value):jt(e.target.value)}})}),(0,M.jsxs)("p",{style:{color:"#6D89AF",width:(e.windowWidth,"100%"),fontWeight:"600",fontSize:"12px",magrin:"0px auto 0px 0px",textAlign:"center"},children:[(0,M.jsx)(y.wfp,{style:{verticalAlign:"middle",marginTop:"-2px",paddingRight:"3px",fontSize:"16px"}}),t("community.composer.youtubeOrLoomAccepted")]}),(0,M.jsx)(m.A,{fullWidth:!0,variant:"contained",sx:{backgroundColor:"var(--brand-color)",fontSize:"14px",textTransform:"none",width:(e.windowWidth,"100%"),borderRadius:"6px",boxShadow:"none",fontWeight:"600",maxWidth:"400px",marginTop:"10px",":hover":{bgcolor:"var(--brand-color-hover)",color:"white",boxShadow:"none"}},className:"image_update_button",type:"submit",value:"submit",onClick:()=>{bt()},children:t("community.composer.embed")})]})]})}),Uo&&(0,r.createPortal)((0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(se.default,{msg:Ko,open:Zo,severity:"error",backgroundColor:"var(--danger-color)",handleClose:()=>{Xo(!1)},autoHide:null}),(0,M.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:o<900?"flex-end":"center",justifyContent:"center",zIndex:1e4,padding:o<900?"0px":"20px",opacity:Ho?1:0,transition:"opacity 0.3s ease-in-out",pointerEvents:"auto"},onClick:()=>{Vo(!1),setTimeout(()=>{$o(!1),Go("")},300)},children:(0,M.jsxs)("div",{style:{maxWidth:o<600?"100%":"500px",width:"100%",height:"auto",maxHeight:"85vh",backgroundColor:"#fff",borderRadius:o<900?"20px 20px 0px 0px":"16px",position:"relative",boxShadow:o<900?"0 -10px 40px rgba(0, 0, 0, 0.15)":"0 20px 60px rgba(0, 0, 0, 0.15)",overflow:"hidden",display:"flex",flexDirection:"column",transform:Ho?"translateY(0)":o<900?"translateY(100%)":"scale(0.8) translateY(50px)",opacity:Ho?1:0,transition:"all 0.3s ease-out",outline:"none",pointerEvents:"auto",zIndex:10001},onClick:e=>e.stopPropagation(),children:[(0,M.jsx)("div",{style:{position:"absolute",top:"15p
1x",right:"15px",cursor:"pointer",zIndex:10002,width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.1)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",opacity:Ho?1:0,transform:Ho?"scale(1)":"scale(0.8)",transitionDelay:Ho?"0.2s":"0s",pointerEvents:"auto"},onClick:()=>{Vo(!1),setTimeout(()=>{$o(!1),Go("")},300)},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"18px",color:"#666",transition:"color 0.2s ease"}})}),(0,M.jsx)("div",{style:{padding:"25px 25px 20px 25px",background:"linear-gradient(135deg, rgba(247,249,252,0.8) 0%, rgba(255,255,255,0.4) 100%)",borderBottom:"1px solid #E4EBF6",opacity:Ho?1:0,transform:Ho?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:Ho?"0.1s":"0s"},children:(0,M.jsx)(l.A,{variant:"h5",style:{color:"#1D1D1D",fontWeight:"700",fontSize:o<600?"18px":"20px",textAlign:"center",fontFamily:"Roboto, sans-serif",letterSpacing:"-0.5px",margin:0},children:t("community.composer.createNewCategory")})}),(0,M.jsxs)("div",{style:{flex:1,minHeight:0,overflowY:"auto",padding:"20px 25px 20px 25px",paddingRight:"25px",opacity:Ho?1:0,transform:Ho?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:Ho?"0.2s":"0s",maxHeight:"calc(80vh - 90px - 80px)"},children:[(0,M.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,M.jsx)(l.A,{style:{color:"#333",fontSize:"14px",fontWeight:"600",marginBottom:"8px",fontFamily:"Roboto, sans-serif",textAlign:"left"},children:t("community.composer.categoryName")}),(0,M.jsx)("input",{type:"text",className:"text-input",style:{display:"block",fontWeight:"500",fontSize:"15px",padding:"12px 15px",color:"#1D1D1D",borderRadius:"8px",border:"1px solid #C7D1DE",width:"100%",fontFamily:"Roboto",outline:"none",boxSizing:"border-box",pointerEvents:"auto",position:"relative",zIndex:o<900?10003:"auto"},placeholder:t("community.composer.enterCategoryName"),maxLength:50,value:Yo,onChange:e=>{Go(e.target.value)},onClick:e=>e.stopPropagation(),onFocus:e=>e.stopPropagation()})]}),(0,M.jsxs)(l.A,{style:{color:"#6D89AF",fontSize:"12px",fontWeight:"600",marginTop:"10px",fontFamily:"Roboto, sans-serif",textAlign:"left",display:"flex",alignItems:"center",gap:"4px"},children:[(0,M.jsx)(y.wfp,{style:{fontSize:"16px"}}),t("community.composer.categoryNamesHint")]})]}),(0,M.jsx)("div",{style:{padding:"20px 25px 25px 25px",borderTop:"1px solid #E4EBF6",flexShrink:0,backgroundColor:"#fff",opacity:Ho?1:0,transform:Ho?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:Ho?"0.3s":"0s",position:o<900?"sticky":"relative",bottom:o<900?"0":"auto",left:0,right:0,zIndex:2},children:(0,M.jsx)(m.A,{disableRipple:!0,fullWidth:!0,variant:"contained",disabled:!Yo||""===Yo.trim(),sx:{backgroundColor:Yo&&""!==Yo.trim()?"var(--brand-color)":"#E4EBF6",color:Yo&&""!==Yo.trim()?"white":"#9CA3B4",fontSize:"14px",textTransform:"none",borderRadius:"12px",boxShadow:"none",fontWeight:"600",padding:"12px 20px",border:Yo&&""!==Yo.trim()?"2px solid var(--brand-color)":"2px solid #E4EBF6",transition:"all 0.2s ease-in-out",cursor:Yo&&""!==Yo.trim()?"pointer":"not-allowed","&:hover":Yo&&""!==Yo.trim()?{backgroundColor:"var(--brand-color)",border:"2px solid var(--brand-color)",opacity:.8,transform:"translateY(-1px)",boxShadow:"none"}:{backgroundColor:"#E4EBF6",border:"2px solid #E4EBF6",transform:"none",boxShadow:"none"}},type:"submit",onClick:async()=>{const e=Yo.trim();if(!e)return Jo(t("community.composer.pleaseEnterValidCategoryName")),void Xo(!0);const o=(null===co||void 0===co?void 0:co.tags)||[],i=fo&&fo.length>0&&fo[0]===e;if(o.includes(e)||i)return Jo(t("community.composer.categoryAlreadyExists")),void Xo(!0);try{await xo(e)}catch(n){}yo([e]),uo([e]),Vo(!1),setTimeout(()=>{$o(!1),Go(""),Xo(!1)},300)},children:t("community.composer.createCategory")})})]})})]}),document.body)]})};var rt=o(2320),st=o(15920),at=o(98604),lt=o(91957),dt=o(44158),ct=o(56533),pt=o(20757),ut=o(95384),xt=o(16348),mt=o(21451),ht=o(39969),gt=o(87860);
1const ft=(0,i.lazy)(()=>o.e(9844).then(o.bind(o,97463))),yt=o(98635),bt=((0,oe.Ay)(e=>{let{className:t,...o}=e;return(0,M.jsx)(ie.A,{...o,classes:{popper:t}})})(e=>{let{theme:t}=e;return{[`& .${ne.A.tooltip}`]:{backgroundColor:"#222222 !important",color:"#ffffff",boxShadow:t.shadows[1],fontSize:11,margin:"0px"}}}),(0,oe.Ay)(Ve.A)(e=>{let{theme:t}=e;return{"& .MuiPaginationItem-root":{fontWeight:500,fontFamily:"Roboto",color:"black",backgroundColor:"var(--rebrandind-background-color)",borderRadius:"8px","&:hover":{backgroundColor:"#e3e7fc",color:"var(--brand-color)"}},"& .Mui-selected":{backgroundColor:"#e3e7fc",color:"var(--brand-color)",borderRadius:"8px",fontWeight:500,fontFamily:"Roboto"},"& .Mui-selected:hover":{backgroundColor:"#d7ddfc",color:"var(--brand-color)",borderRadius:"8px",fontWeight:500,fontFamily:"Roboto"}}})),_t={display:"flex",height:"auto",minHeight:"100vh",minWidth:"100vw",overflowY:"hidden",outline:"none",zIndex:"9999"},vt=e=>e&&"all"!==e?e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" "):e,wt=(e,t,o,i)=>({mockTags:[`\ud83d\udc4b ${i("community.exampleTags.startHere")}`,`\ud83d\udce3 ${i("community.exampleTags.announcements")}`,`\ud83c\udfc6 ${i("community.exampleTags.wins")}`,`\u2753 ${i("community.exampleTags.qAndA")}`,`\ud83d\udcda ${i("community.exampleTags.resources")}`],mockPosts:[{post_id:"mock-1",username:e||"influencer",display_name:o||e||"Community Creator",user_icon:t||"",time:new Date(Date.now()-72e5).toISOString(),subscription:null,text:i("community.examplePosts.post1"),content_type:"img",file:"",tier:0,n_threads:3,n_comments:8,like_count:12,user_like_value:0,threads:[],tags_list:[`\ud83d\udce3 ${i("community.exampleTags.announcements")}`],link:"",pinned:!0,community_post_title:"",event_time:"",is_example:!0},{post_id:"mock-2",username:e||"influencer",display_name:o||e||"Community Creator",user_icon:t||"",time:new Date(Date.now()-18e6).toISOString(),subscription:null,text:i("community.examplePosts.post2"),content_type:"vid",file:"",tier:0,n_threads:2,n_comments:5,like_count:8,user_like_value:0,threads:[],tags_list:[`\ud83c\udfc6 ${i("community.exampleTags.wins")}`],link:"",pinned:!1,community_post_title:"",event_time:"",is_example:!0},{post_id:"mock-3",username:e||"influencer",display_name:o||e||"Community Creator",user_icon:t||"",time:new Date(Date.now()-36e5).toISOString(),subscription:null,text:i("community.examplePosts.post3"),content_type:"mzm",file:"",tier:0,n_threads:4,n_comments:12,like_count:15,user_like_value:0,threads:[],tags_list:[`\u2753 ${i("community.exampleTags.qAndA")}`],link:"https://zoom.us/j/example",pinned:!1,community_post_title:i("community.examplePosts.event1Title"),event_time:new Date(Date.now()+864e5).toISOString(),is_example:!0},{post_id:"mock-4",username:e||"influencer",display_name:o||e||"Community Creator",user_icon:t||"",time:new Date(Date.now()-1728e5).toISOString(),subscription:null,text:i("community.examplePosts.post4"),content_type:"aud",file:"",tier:0,n_threads:5,n_comments:18,like_count:22,user_like_value:0,threads:[],tags_list:[`\ud83d\udcda ${i("community.exampleTags.resources")}`],link:"",pinned:!1,community_post_title:"",event_time:"",is_example:!0},{post_id:"mock-5",username:e||"influencer",display_name:o||e||"Community Creator",user_icon:t||"",time:new Date(Date.now()-2592e5).toISOString(),subscription:null,text:i("community.examplePosts.post5"),content_type:"pdf",file:"",tier:0,n_threads:1,n_comments:3,like_count:6,user_like_value:0,threads:[],tags_list:[`\ud83d\udcda ${i("community.exampleTags.resources")}`],link:"",pinned:!1,community_post_title:"",event_time:"",is_example:!0},{post_id:"mock-6",username:e||"influencer",display_name:o||e||"Community Creator",user_icon:t||"",time:new Date(Date.now()-3456e5).toISOString(),subscription:null,text:i("community.examplePosts.post6"),content_type:"txt",file:"",tier:0,n_threads:7,n_comments:25,like_count:30,user_like_value:0,threads:[],tags_list:[`\ud83d\udce3 ${i("community.exampleTags.announcements")}`],link:"",pinned:!1,community_post_title:"",event_time:"",is_example:!0}
1,{post_id:"mock-7",username:e||"influencer",display_name:o||e||"Community Creator",user_icon:t||"",time:new Date(Date.now()-72e5).toISOString(),subscription:null,text:i("community.examplePosts.post7"),content_type:"mgm",file:"",tier:0,n_threads:3,n_comments:10,like_count:14,user_like_value:0,threads:[],tags_list:[`\ud83d\udc4b ${i("community.exampleTags.startHere")}`],link:"https://meet.google.com/example",pinned:!1,community_post_title:i("community.examplePosts.event2Title"),event_time:new Date(Date.now()+6048e5).toISOString(),is_example:!0},{post_id:"mock-8",username:e||"influencer",display_name:o||e||"Community Creator",user_icon:t||"",time:new Date(Date.now()-6048e5).toISOString(),subscription:null,text:i("community.examplePosts.post8"),content_type:"img",file:"",tier:0,n_threads:2,n_comments:7,like_count:19,user_like_value:0,threads:[],tags_list:[`\u2753 ${i("community.exampleTags.qAndA")}`],link:"",pinned:!1,community_post_title:"",event_time:"",is_example:!0}]}),jt=e=>{let{description:t}=e;const{t:o}=(0,n.Bd)(),[r,s]=(0,i.useState)(!1),a=(null===t||void 0===t?void 0:t.replace(/<[^>]*>/g,""))||"";if(!(a.length>120))return(0,M.jsx)("div",{style:{fontSize:"14px",color:"#6C757D",lineHeight:"1.5",margin:"0 0 16px 0",fontFamily:"Roboto, sans-serif"},dangerouslySetInnerHTML:{__html:(0,gt.A)(t)}});if(r)return(0,M.jsxs)("div",{style:{margin:"0 0 16px 0"},children:[(0,M.jsx)("div",{style:{fontSize:"14px",color:"#6C757D",lineHeight:"1.5",margin:"0",fontFamily:"Roboto, sans-serif"},dangerouslySetInnerHTML:{__html:(0,gt.A)(t)}}),(0,M.jsx)("span",{onClick:()=>s(!1),style:{fontSize:"13px",color:"var(--brand-color)",cursor:"pointer",fontWeight:"600",fontFamily:"Roboto, sans-serif"},children:o("community.library.hide","Hide")})]});const l=a.substring(0,120)+"...";return(0,M.jsxs)("div",{style:{margin:"0 0 16px 0"},children:[(0,M.jsx)("p",{style:{fontSize:"14px",color:"#6C757D",lineHeight:"1.5",margin:"0",fontFamily:"Roboto, sans-serif"},children:l}),(0,M.jsx)("span",{onClick:()=>s(!0),style:{fontSize:"13px",color:"var(--brand-color)",cursor:"pointer",fontWeight:"600",fontFamily:"Roboto, sans-serif"},children:o("community.library.readMore","Read more")})]})};const Ct=function e(t){var o,u,h,g,b,_;const{t:v}=(0,n.Bd)(),w=t.previewRolloutOwner&&t.isCustomerPreview,j=(0,ut.gw)(),C=()=>!!j&&(Ic("var(--brand-color)","info",v("elements.previewBar.readOnlyAction","This is a preview \u2014 nothing you do here is saved, and your customers will not see this message.")),!0),S=v("community.composer.placeholder"),k=()=>{var e,o;const i=(null===(e=t.designProperties)||void 0===e?void 0:e.brandColorUpdated)||(null===(o=t.designProperties)||void 0===o?void 0:o.brandColor);return i&&"#FDB62B"!==i&&null!==i&&""!==i?i:"var(--brand-color)"},[A,F]=(0,i.useState)(!0),[D,z]=(0,i.useState)(""),[T,E]=(0,i.useState)(0),[W,R]=(0,i.useState)(null),[I,B]=(0,i.useState)(null),[L,N]=(0,i.useState)([]),[O,U]=(0,i.useState)(0),[$,Y]=(0,i.useState)(!1),[G,X]=(0,i.useState)(!1),[J,q]=(0,i.useState)(!1),[Q,ee]=(0,i.useState)(""),[te,oe]=(0,i.useState)(""),[ie,ne]=(0,i.useState)("txt"),[re,ae]=(0,i.useState)(!0),[le,de]=(0,i.useState)(!1),[ce,ue]=(0,i.useState)(""),[xe,me]=(0,i.useState)(""),[he,ge]=(0,i.useState)("txt"),[fe,ye]=(0,i.useState)(!0),[be,_e]=(0,i.useState)(""),[ve,we]=(0,i.useState)(!1),[je,Ce]=(0,i.useState)(""),[Se,ke]=(0,i.useState)(""),[Ae,Fe]=(0,i.useState)("txt"),[De,Te]=(0,i.useState)(!0),[Ee,Re]=(0,i.useState)(""),[Le,Ne]=(0,i.useState)(!1),[Oe,Ue]=(0,i.useState)(""),[Ve,Je]=(0,i.useState)(""),[qe,Qe]=(0,i.useState)("txt"),[et,tt]=(0,i.useState)(""),[ot,it]=(0,i.useState)(!1),[gt,Ct]=i.useState("posts"),[St,kt]=(0,i.useState)(!1),[At,Ft]=(0,i.useState)(!1),[Dt,zt]=(0,i.useState)(!0),Tt=(0,i.useRef)(null),Et=(0,i.useRef)(null),Wt=(0,i.useRef)(L);(0,i.useEffect)(()=>{Wt.current=L},[L]);const[Rt,Mt]=(0,i.useState)(!1),[It,Pt]=(0,i.useState)(""),[Bt,Lt]=(0,i.useState)("false"),[Nt,Ot]=(0,i.useState)("false"),[Ut,$t]=(0,i.useState)(!1),[Ht,Vt]=(0,i.useState)(""),[Yt,Gt]=(0,i.useState)(""),[Zt,Xt]=(0,i.useState)(""),[Kt,Jt]=(0,i.useState)("var(--brand-color)"),[qt,Qt]=(0,i.useState)(!1),[eo,to]=(0,i.useState)(!1),[oo,io]=(0,i.useState)(""),[no,ro]=(0,i.useState)("var(--brand-color)"),[so,ao]=(0,i.useState)("error"),[lo,co]=(0,i.useState)("\xa3"),[po,uo]=(0,i.useState)(!1),[xo,mo]=(0,i.useState)(""),[ho,go]=(0,i.useState)(!1),[fo,yo]=(0,i.useState)(""),[bo,_o]=(0,i.useState)(null),[vo,wo]=(0,i.useState)(null),[jo,Co]=(0,i.useState)(null),[So,ko]=(0,i.useState)(null),[Ao,Fo]=(0,i.useState)(null),{currentMonth:Do,previousMonth:zo}=function(){const e=["January","February","March","April","May","June","July","August","September","October","November","December"],t=new Date,o=t.getMonth();let i=o-1;t.getFullYear();-1===i&&(i=11);const n=e[o],r=e[i];return{currentMonth:n,previousMonth:r}}(),[To,Eo]=(0,i.useState)(!1),[Wo,Ro]=(0,i.useState)(null),[Mo,Io]=(0,i.useState)(0),[Po,Bo]=(0,i.useState)(null),[Lo,No]=(0,i.useState)(null),[Oo,Uo]=(0,i.useState)(null),[$o,Ho]=(0,i.useState)(null),[Vo,Yo]=(0,i.useState)(null),[Go,Zo]=(0,i.useState)(null),[Xo,Ko]=(0,i.useState)(null),[Jo,qo]=(0,i.useState)(!1),[Qo,ei]=(0,i.useState)(0),[ti,oi]=(0,i.useState)(0),[ii,ni]=(0,i.useState)(!1),[ri,si]=(0,i.useState)("error"),[ai,li]=(0,i.useState)("error"),di=(0,i.useRef)(),ci=(0,i.useRef)(),pi=(0,i.useRef)(),[ui,xi]=(0,i.useState)(""),[mi,hi]=(0,i.useState)(""),[gi,fi]=(0,i.useState)("stopped"),[yi,bi]=(0,i.useState)("00"),[_i,vi]=(0,i.useState)("00"),[wi,ji]=(0,i.useState)(!1),[Ci,Si]=(0,i.useState)(""),[ki,Ai]=(0,i.useState)(!0),[Fi,Di]=(0,i.useState)(0),[zi,Ti]=(0,i.useState)(""),Ei=(0,i.useRef)(),[Wi,Ri]=(0,i.useState)({audioin:null,audioout:null,videoin:null}),Mi={audio:{autoplay:!0,deviceId:ui,sampleRate:44100}},Ii={audio:{autoplay:!0,deviceId:ui,sampleRate:44100},video:{autoplay:!0,deviceId:mi},height:{ideal:1920}},[Pi,Bi]=(0,i.useState)(),[Li,Ni]=(0,i.useState)(""),[Oi,Ui]=(0,i.useState)(""),[$i,Hi]=(0,i.useState)(-1),[Vi,Yi]=(0,i.useState)(-1),[Gi,Zi]=(0,i.useState)(!1),[Xi,Ki]=(0,i.useState)(""),[Ji,qi]=(0,i.useState)(""),[Qi,en]=(0,i.useState)(""),[tn,on]=(0,i.useState)(""),[nn,rn]=(0,i.useState)(""),[sn,an]=(0,i.useState)(""),[ln,dn]=(0,i.useState)(""),[cn,pn]=(0,i.useState)(""),[un,xn]=(0,i.useState)(""),[mn,hn]=(0,i.useState)(""),[gn,fn]=(0,i.useState)(""),[yn,bn]=(0,i.useState)(""),[_n,vn]=(0,i.useState)(""),[wn,jn]=(0,i.useState)(null),[Cn,Sn]=(0,i.useState)(""),[kn,An]=(0,i.useState)(""),[Fn,Dn]=(0,i.useState)(!1),[zn,Tn]=(0,i.useState)(""),[En,Wn]=(0,i.useState)(""),[Rn,Mn]=(0,i.useState)(""),[In,Pn]=(0,i.useState)(""),[Bn,Ln]=(0,i.useState)(""),[Nn,On]=(0,i.useState)(""),[Un,$n]=(0,i.useState)(""),[Hn,
1Vn]=(0,i.useState)(!1),[Yn,Gn]=(0,i.useState)(""),[Zn,Xn]=(0,i.useState)(""),[Kn,Jn]=(0,i.useState)(""),[qn,Qn]=(0,i.useState)(""),[er,tr]=(0,i.useState)(""),[or,ir]=(0,i.useState)(""),[nr,rr]=(0,i.useState)(null),[sr,ar]=(0,i.useState)(0),lr=(0,i.useRef)(),dr=(0,i.useRef)(),[cr,pr]=(0,i.useState)(""),ur=(0,i.useRef)(),[xr,mr]=(0,i.useState)(""),hr=(0,i.useRef)(!1),[gr,fr]=(0,i.useState)("post..."),[yr,br]=(0,i.useState)(""),[_r,vr]=(0,i.useState)(null),[wr,jr]=(0,i.useState)(null),[Cr,Sr]=(0,i.useState)(null),[kr,Ar]=(0,i.useState)(null),[Fr,Dr]=(0,i.useState)(null),[zr,Tr]=(0,i.useState)(null),[Er,Wr]=(0,i.useState)(null),[Rr,Mr]=(0,i.useState)(null),[Ir,Pr]=(0,i.useState)(null),[Br,Lr]=(0,i.useState)(null),[Nr,Or]=(0,i.useState)(null),[Ur,$r]=(0,i.useState)(null),[Hr,Vr]=(0,i.useState)(null),[Yr,Gr]=(0,i.useState)(null),[Zr,Xr]=(0,i.useState)(null),[Kr,Jr]=(0,i.useState)(null),[qr,Qr]=(0,i.useState)(0),[es,ts]=(0,i.useState)((0,mt.wE)()),[os,is]=(0,i.useState)([]),[ns,rs]=(0,i.useState)(null),[ss,as]=(0,i.useState)(""),ls=(0,ht.wW)(yt.URL,t.influencer,"commc",ns)||`${yt.URL}${t.influencer}`,[ds,cs]=(0,i.useState)(!1),[ps,us]=(0,i.useState)(!1),[xs,ms]=(0,i.useState)({}),[hs,gs]=(0,i.useState)("posts"),[fs,ys]=(0,i.useState)(null),[bs,_s]=(0,i.useState)(""),[vs,ws]=(0,i.useState)(!1),[js,Cs]=(0,i.useState)(!1),[Ss,ks]=(0,i.useState)(null),[As,Fs]=(0,i.useState)(!1),[Ds,zs]=(0,i.useState)(null),[Ts,Es]=(0,i.useState)(!1),[Ws,Rs]=(0,i.useState)(null),[Ms,Is]=(0,i.useState)(!1),[Ps,Bs]=(0,i.useState)(-1),[Ls,Ns]=(0,i.useState)(1),[Os,Us]=(0,i.useState)([]),[$s,Hs]=(0,i.useState)(0),[Vs,Ys]=(0,i.useState)(0),[Gs,Zs]=(0,i.useState)(!0),[Xs,Ks]=(0,i.useState)(!1),[Js,qs]=(0,i.useState)("all"),[Qs,ea]=(0,i.useState)("all"),[ta,oa]=(0,i.useState)("latest"),[ia,na]=(0,i.useState)(""),[ra,sa]=(0,i.useState)([]),[aa,la]=(0,i.useState)([]),[da,ca]=(0,i.useState)({anchorEl:null,content_menu_open:!1,category_menu_open:!1,tier_menu_open:!1,sort_menu_open:!1}),[pa,ua]=(0,i.useState)(null),[xa,ma]=(0,i.useState)(!1),[ha,ga]=(0,i.useState)(null),[fa,ya]=(0,i.useState)(null),[ba,_a]=(0,i.useState)(-1),[va,wa]=(0,i.useState)([]),[ja,Ca]=(0,i.useState)(0),[Sa,ka]=(0,i.useState)(0),[Aa,Fa]=(0,i.useState)(1),[Da,za]=(0,i.useState)(!0),[Ta,Ea]=(0,i.useState)(!1),[Wa,Ra]=(0,i.useState)("all"),[Ma,Ia]=(0,i.useState)("all"),[Pa,Ba]=(0,i.useState)("latest"),[La,Na]=(0,i.useState)(""),[Oa,Ua]=(0,i.useState)([]),[$a,Ha]=(0,i.useState)([]),[Va,Ya]=(0,i.useState)({anchorEl:null,content_menu_open:!1,category_menu_open:!1,sort_menu_open:!1}),[Ga,Za]=(0,i.useState)(null),[Xa,Ka]=(0,i.useState)(1),[Ja,qa]=(0,i.useState)([]),[Qa,el]=(0,i.useState)(0),[tl,ol]=(0,i.useState)(0),[il,nl]=(0,i.useState)(!0),[rl,sl]=(0,i.useState)(!1),al=e=>{Fs(!0),ks(null),zs(null),Rs(null);const o=new FormData;o.append("currency",t.currency||"gbp"),Me()({method:"post",url:(0,mt.wE)()+"api/influencer/community/library_product/"+e,data:o,withCredentials:!0}).then(e=>{e.data.content_item&&ks(e.data.content_item),Fs(!1)}).catch(e=>{Fs(!1)})},ll=(e,o,i)=>{const n="_uncategorised_"===o?"_-_-other_-_-":o||"",r=new FormData;r.append("influencer_str",t.influencer),r.append("category",""),r.append("sort","latest"),r.append("content_type",""),r.append("tab","paid_collections"),r.append("collection",e),r.append("post_id","null"),r.append("page_n",i),r.append("currency",t.currency||"gbp"),r.append("tier",-1),r.append("chapter",n),Me()({method:"post",url:(0,mt.wE)()+"api/influencer_content_data_latest_v8",data:r,withCredentials:!0}).then(e=>{const t=e.data.content_list||[];qa(t),el(e.data.content_list_length||0),ol(t.length),Ka(i),t.length>=(e.data.content_list_length||0)||t.length>=20?nl(!1):nl(!0),e.data.course_chapters&&zs(t=>t?{...t,course_chapters:e.data.course_chapters}:t),Es(!1)}).catch(e=>{Es(!1)})},dl=()=>{var e;if(rl)return;sl(!0);const o=(null===Ds||void 0===Ds||null===(e=Ds.course)||void 0===e?void 0:e.name)||"",i="_uncategorised_"===Ga?"_-_-other_-_-":Ga||"",n=new FormData;n.append("influencer_str",t.influencer),n.append("category",""),n.append("content_type",""),n.append("start_index",tl),n.append("sort","latest"),n.append("tab","paid_collections"),n.append("collection",o),n.append("page_n",Xa),n.append("currency",t.currency||"gbp"),n.append("tier",-1),n.append("chapter",i),n.append("post_id","null"),Me()({method:"post",url:(0,mt.wE)()+"api/influencer_content_data_inf_scroll_v6",data:n,withCredentials:!0}).then(e=>{const t=e.data.content_list||[],o=[...Ja,...t];qa(o),ol(e=>e+t.length),sl(!1),(0===t.length||o.length>=Qa||o.length>=20)&&nl(!1)}).catch(()=>{sl(!1)})},cl=e=>{var t;const o=(null===Ds||void 0===Ds||null===(t=Ds.course)||void 0===t?void 0:t.name)||"";Ka(e),nl(!0),ll(o,Ga,e)},pl=e=>{Es(!0),zs(null),ks(null),Rs(null),Za(null),qa([]),el(0),ol(0),Ka(1),nl(!0);const o=new FormData;o.append("currency",t.currency||"gbp"),Me()({method:"post",url:(0,mt.wE)()+"api/influencer/community/library_course/"+e,data:o,withCredentials:!0}).then(e=>{if(e.data.course){zs(e.data);const t=e.data.chapters&&e.data.chapters.length>0?e.data.chapters[0].chapter_name:null;Za(t),ll(e.data.course.name,t,1)}else Es(!1)}).catch(e=>{Es(!1)})},ul=function(e,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=void 0!==i.content_filter?i.content_filter:Js,r=void 0!==i.category_filter?i.category_filter:Qs,s=void 0!==i.sort_filter?i.sort_filter:ta,a=new FormData;a.append("influencer_str",t.influencer),a.append("category",r),a.append("sort",s),a.append("content_type",n),a.append("tab","sub_posts"),a.append("collection",""),a.append("digital_product",""),a.append("post_id","null"),a.append("page_n",o),a.append("currency",t.currency||"gbp"),a.append("tier",e),Me()({method:"post",url:(0,mt.wE)()+"api/influencer_content_data_tab_change_v8",data:a,withCredentials:!0}).then(e=>{const t=e.data.content_list||[];Us(t),sa(e.data.content_types||[]),la(e.data.categories_filter||[]),Hs(e.data.content_list_length||0),Ys(t.length),Ns(o),t.length>=(e.data.content_list_length||0)?Zs(!1):Zs(!0),Is(!1)}).catch(()=>{Us([]),Hs(0),Ys(0),Zs(!1),Is(!1)})},xl=()=>{if(Xs||Ms)return;Ks(!0);const e=new FormData;e.append("influencer_str",t.influencer),e.append("category",Qs),e.append("sort",ta),e.append("content_type",Js),e.append("tab","sub_posts"),e.a
1ppend("collection",""),e.append("digital_product",""),e.append("page_n",Ls),e.append("start_index",Vs),e.append("currency",t.currency||"gbp"),e.append("tier",Ps),e.append("post_id","null"),Me()({method:"post",url:(0,mt.wE)()+"api/influencer_content_data_inf_scroll_v6",data:e,withCredentials:!0}).then(e=>{const t=e.data.content_list||[],o=[...Os,...t];Us(o),Ys(e=>e+t.length),Ks(!1),0===t.length||o.length>=$s?Zs(!1):Zs(!0)}).catch(()=>{Ks(!1)})},ml=e=>{Ns(e),Zs(!0),ul(Ps,e)},hl=e=>{var o;const i=null===e||void 0===e?void 0:e.id;if(!i&&0!==i)return;Is(!0),Rs(e||null),ks(null),zs(null),Us([]),Hs(0),Ys(0),Ns(1),Zs(!0),qs("all"),ea("all"),oa("latest"),na("");const n=Number.isFinite(Number(null===e||void 0===e?void 0:e.tier))?Number(e.tier):-1;Bs(n),ul(n,1,{content_filter:"all",category_filter:"all",sort_filter:"latest"});const r=new FormData;r.append("currency",t.currency);const s=t.influencer||(null===(o=t.influencer_info)||void 0===o?void 0:o.influencer)||t.influencer_name,a=function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find(e=>String(e.id)===String(i)||String(e.tier)===String(i)),o=Number.isFinite(Number(null===e||void 0===e?void 0:e.tier))?Number(e.tier):-1,n=t&&Number.isFinite(Number(t.tier))?Number(t.tier):o;Rs(t||e||null),n!==Ps&&(Bs(n),ul(n,1)),window.scrollTo({top:0,behavior:"instant"})};Me()({method:"post",url:(0,mt.wE)()+"api/influencer/storefront_initial_data/"+s,data:r,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{var t,o;const i=null===(t=e.data)||void 0===t||null===(o=t.data)||void 0===o?void 0:o.subscriptions,n=Array.isArray(i)?i:(null===i||void 0===i?void 0:i.tiers)||[];n.length>0?a(n):Me()({method:"get",url:(0,mt.wE)()+"api/influencer/"+s,withCredentials:!0}).then(e=>{var t,o,i,n;const r=(null===(t=e.data)||void 0===t||null===(o=t.data)||void 0===o?void 0:o.subscriptions)||(null===(i=e.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.tiers)||[];a(Array.isArray(r)?r:[])}).catch(()=>{a([])})}).catch(()=>{Me()({method:"get",url:(0,mt.wE)()+"api/influencer/"+s,withCredentials:!0}).then(e=>{var t,o,i,n;const r=(null===(t=e.data)||void 0===t||null===(o=t.data)||void 0===o?void 0:o.subscriptions)||(null===(i=e.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.tiers)||[];a(Array.isArray(r)?r:[])}).catch(()=>{a([])})})},gl=(e,t)=>{const o="content"===e?t:Js,i="category"===e?t:Qs,n="sort"===e?t:ta;"content"===e&&qs(t),"category"===e&&ea(t),"sort"===e&&oa(t),Us([]),Hs(0),Ys(0),Ns(1),Zs(!0),Is(!0),ul(Ps,1,{content_filter:o,category_filter:i,sort_filter:n})},fl=aa,yl=["latest","saved","trending","shuffle","most views","most likes","purchased"],bl=[[Ps,(null===Ws||void 0===Ws?void 0:Ws.name)||v("community.library.memberships","Membership")]],_l=e=>{const t=document.getElementById(`membership-content-${e}`);t&&t.scrollIntoView({behavior:"smooth",block:"center"})},vl=e=>{ua(e||null),ks(null),zs(null),Rs(null),window.scrollTo({top:0,behavior:"instant"})},wl=e=>{ga(e||null),ks(null),zs(null),Rs(null),ua(null),ya(null),window.scrollTo({top:0,behavior:"instant"})},jl=e=>{ya(e||null),ks(null),zs(null),Rs(null),ua(null),ga(null),window.scrollTo({top:0,behavior:"instant"})},[Cl,Sl]=(0,i.useState)(0),[kl,Al]=(0,i.useState)(!1),[Fl,Dl]=(0,i.useState)(""),[zl,Tl]=(0,i.useState)(""),[El,Wl]=(0,i.useState)(""),[Rl,Ml]=(0,i.useState)("month"),[Il,Pl]=(0,i.useState)(0),[Bl,Ll]=(0,i.useState)(!1),[Nl,Ol]=(0,i.useState)(""),[Ul,$l]=(0,i.useState)(""),[Hl,Vl]=(0,i.useState)(["all"]),[Yl,Gl]=(0,i.useState)([]),[Zl,Xl]=(0,i.useState)(["all"]),[Kl,Jl]=(0,i.useState)([]),[ql,Ql]=(0,i.useState)("all"),[ed,td]=(0,i.useState)(""),[od,id]=(0,i.useState)(null),[nd,rd]=(0,i.useState)(!1),sd=(0,i.useRef)(null),[ad,ld]=(0,i.useState)([]),[dd,cd]=(0,i.useState)([]),[pd,ud]=(0,i.useState)(!1),[xd,md]=(0,i.useState)(!1),[hd,gd]=(0,i.useState)(null),[fd,yd]=(0,i.useState)(""),[bd,_d]=(0,i.useState)(!1),[vd,wd]=(0,i.useState)(()=>{try{const e=localStorage.getItem("dismissedExampleTabs");return e?JSON.parse(e):[]}catch{return[]}}),jd=!vd.includes(ns);(0,i.useEffect)(()=>{if(!$&&0===L.length&&vd.includes(ns)){const e=vd.filter(e=>e!==ns);wd(e),localStorage.setItem("dismissedExampleTabs",JSON.stringify(e))}},[$,L.length,ns]);const[Cd,Sd]=(0,i.useState)([]),[kd,Ad]=(0,i.useState)({}),[Fd,Dd]=(0,i.useState)(!1),[zd,Td]=(0,i.useState)(null),[Ed,Wd]=(0,i.useState)(""),[Rd,Md]=(0,i.useState)(""),[Id,Pd]=(0,i.useState)(0),[Bd,Ld]=(0,i.useState)(""),Nd=(0,i.useMemo)(()=>
1{if(!xs||!Array.isArray(xs.tags))return[];const e=xs.tags.filter(e=>e&&"string"===typeof e&&""!==e.trim()),t=xs.category_order||[];if(!Array.isArray(t)||0===t.length)return e;const o=new Map;t.forEach((e,t)=>{"string"===typeof e&&o.set(e.toLowerCase(),{cat:e,index:t})});const i=[],n=[],r=new Set;return t.forEach(t=>{const o="string"===typeof t?t.toLowerCase():"",n=e.find(e=>e.toLowerCase()===o);n&&!r.has(n.toLowerCase())&&(i.push(n),r.add(n.toLowerCase()))}),e.forEach(e=>{r.has(e.toLowerCase())||n.push(e)}),[...i,...n]},[null===xs||void 0===xs?void 0:xs.tags,null===xs||void 0===xs?void 0:xs.category_order]),[Od,Ud]=(0,i.useState)([]),$d=(0,i.useRef)(null),Hd=(0,i.useRef)(null);(0,i.useEffect)(()=>{Ud(Nd.map(e=>({id:e,name:e})))},[Nd]),(0,i.useEffect)(()=>(sd.current&&clearTimeout(sd.current),!ed||ed.trim().length<2?(id(null),void rd(!1)):(rd(!0),sd.current=setTimeout(()=>{const e=new FormData;e.append("query",ed.trim()),Me()({method:"post",url:(0,mt.wE)()+"api/influencer/community/search/"+t.influencer+"/"+ns,data:e,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{id(e.data.results||[]),rd(!1)}).catch(e=>{console.error("Community search error:",e),id([]),rd(!1)})},400),()=>{sd.current&&clearTimeout(sd.current)})),[ed,ns]);const Vd=(0,i.useCallback)(async e=>{$d.current&&clearTimeout($d.current),$d.current=setTimeout(async()=>{const t=e.map(e=>"string"===typeof e?e:e.name||e.id),o=new FormData;o.append("tab_id",ns),o.append("category_order",JSON.stringify(t));try{const e=await Me()({method:"POST",url:es+"api/influencer/community/set_category_order",data:o,headers:{"Content-type":"application/json"},withCredentials:!0});e.data.success&&(xs&&ms({...xs,category_order:e.data.category_order||t}),is(o=>o.map(o=>o.id===ns?{...o,category_order:e.data.category_order||t}:o)))}catch(i){console.error("Error saving category order:",i)}},500)},[ns,xs,es]),Yd=!!t.isUnlockedCommunityPreview||!(t.mobilePreview||"preview"===t.current_page_view&&"user"===t.view_type);function Gd(e){let t=new FormData;return t.append("tag",e),t.append("tab_id",ns),Me()({method:"POST",url:es+"api/influencer/community/add_tag",data:t,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{if(e.data.success)return is(t=>t.map(t=>t.id===ns&&Array.isArray(t.tags)?{...t,tags:t.tags.includes(e.data.tag)?t.tags:[...t.tags,e.data.tag]}:t)),xs&&Array.isArray(xs.tags)?xs.tags.includes(e.data.tag)||ms({...xs,tags:[...xs.tags,e.data.tag]}):xs&&ms({...xs,tags:[e.data.tag]}),e.data.tag;throw new Error("Failed to add category")}).catch(e=>{throw console.log(e),e})}function Zd(e,t){let o=new FormData;o.append("orig_tag_name",e),o.append("tag",t),o.append("tab_id",ns),Me()({method:"POST",url:es+"api/influencer/community/edit_tag",data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(t=>{if(t.data.success){const o=t.data.tag;if(Ud(t=>t.map(t=>{const i="string"===typeof t?t:t.name||t.id;return i&&i.toLowerCase()===e.toLowerCase()?"string"===typeof t?o:{...t,id:o,name:o}:t})),is(t=>t.map(t=>t.id===ns&&Array.isArray(t.tags)?{...t,tags:t.tags.map(t=>t===e?o:t)}:t)),xs&&Array.isArray(xs.tags)){const t=xs.tags.findIndex(t=>t===e);if(-1!==t){let i=[...xs.tags];i[t]=o;let n=xs.category_order;Array.isArray(n)&&(n=n.map(t=>"string"===typeof t&&t.toLowerCase()===e.toLowerCase()?o:t)),ms({...xs,tags:i,category_order:n})}}ql===e?(Ql(o),Vl([o]),cp(o)):"all"===ql&&cp("all")}}).catch(e=>{console.log(e)})}const Xd=async e=>{try{const t=new FormData;t.append("tag",e),t.append("tab_id",ns),t.append("check_only","true");const o=await Me()({method:"post",url:es+"api/influencer/community/delete_tag",data:t,headers:{"Content-type":"application/json"},withCredentials:!0});if(o.data.post_count>0)Md(e),Pd(o.data.post_count),Ld(""),_d(!0);else{const t=new FormData;t.append("tag",e),t.append("tab_id",ns),await Me()({method:"post",url:es+"api/influencer/community/delete_tag",data:t,headers:{"Content-type":"application/json"},withCredentials:!0});const o=((null===xs||void 0===xs?void 0:xs.tags)||[]).filter(t=>t!==e);ms(e=>({...e,tags:o}));const i=(Od||[]).filter(t=>{var o;return(null===(o=t.name)||void 0===o?void 0:o.toLowerCase())!==e.toLowerCase()});Ud(i),ql===e&&Ql("all"),Ic("var(--brand-color)","success",v("community.category.deleteSuccess"))}}catch(t){Ic("var(--danger-color)","error",v("community.category.deleteError")||"Error deleting category")}};function Kd(e,t,o){let i=new FormData;i.append("post_id",e),i.append("post_index",t),i.append("action",o),Me()({method:"POST",url:es+"api/influencer/community/pinned_post",data:i,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{let i=[...L];"remove"===o?(i.splice(t,0,i.splice(e.data.post_index,1)[0]),i[e.data.post_index].pinned=!1,i.sort((e,t)=>
1new Date(t.time)-new Date(e.time))):(i.unshift(i.splice(e.data.post_index,1)[0]),i[0].pinned=!0),N(i)})}const Jd=(e,t)=>{Kd(e,t,"add")},qd=(e,t)=>{Kd(e,t,"remove")},[Qd,ec]=(0,i.useState)(null);(0,i.useEffect)(()=>{const e=L.some(e=>!0===e.pinned);ec(e)},[L]);const tc=(e,o)=>{if(t.windowWidth<900&&("gos"===o||"god"===o)){const t=e.split("/")[5];let i=e;"gos"===o?i=`https://docs.google.com/spreadsheets/d/${t}/edit`:"god"===o&&(i=`https://docs.google.com/document/d/${t}/edit`),window.open(i,"_blank")}else Ol(e),$l(o),Ll(!0)},oc=e=>{vr(e.currentTarget)},ic=()=>{vr(null)},nc=()=>{const e=document.getElementById("community-composer");e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{const t=e.querySelector(`[aria-label="${v("community.addMeeting")}"], .calendar-meeting-button`);if(t)t.click();else{const t=e.querySelector('svg[style*="color"][style*="666"]');t&&t.closest("span")&&t.closest("span").click()}},300))},rc=e=>{Ar(e.currentTarget)},sc=()=>{Ar(null)},ac=e=>{Sr(e.currentTarget)},lc=()=>{Sr(null)},dc=e=>{jr(e.currentTarget)},cc=()=>{jr(null)},pc=()=>{let e="";if("post"===kn)if(zn.includes("youtube.com/"))e=zn.split("youtube.com/")[1].split("v=")[1].split("&")[0],Sn(e),Dn(!1),oe("youtube"),q(!0),ne("vey"),Tn(""),ae(!0);else if(zn.includes("youtu.be/"))e=zn.split("youtu.be/")[1].split("?")[0],Sn(e),Dn(!1),oe("youtube"),q(!0),ne("vey"),Tn(""),ae(!0);else if(zn.includes("loom.com/share/"))e=zn.split("loom.com/share/")[1].split("?")[0],Sn(e),Dn(!1),oe("loom"),q(!0),ne("vel"),Tn(""),ae(!0);else if(zn.includes("vimeo.com/")){const t=zn.match(/vimeo\.com\/(?:video\/)?(\d+)(?:\/([a-zA-Z0-9]+))?/),o=zn.match(/[?&]h=([a-zA-Z0-9]+)/);if(t&&t[1]){const i=t[2]||(o?o[1]:null);e=i?t[1]+"?h="+i:t[1]}else e="";e&&(Sn(e),Dn(!1),oe("vimeo"),q(!0),ne("vev"),Tn(""),ae(!0))}else if(zn.includes("twitch.tv/")||zn.includes("clips.twitch.tv/")){const t=zn.match(/twitch\.tv\/videos\/(\d+)/),o=zn.match(/clips\.twitch\.tv\/([A-Za-z0-9_-]+)/),i=t||o?null:zn.match(/twitch\.tv\/([A-Za-z0-9_]+)$/);t?e="v"+t[1]:o?e="c"+o[1]:i&&(e="ch"+i[1]),e&&(Sn(e),Dn(!1),oe("twitch"),q(!0),ne("vtw"),Tn(""),ae(!0))}else if(zn.includes("wistia.com/")){const t=zn.match(/wistia\.(?:com|net)\/(?:medias|embed\/iframe)\/([A-Za-z0-9]+)/);e=t?t[1]:"",e&&(Sn(e),Dn(!1),oe("wistia"),q(!0),ne("vwi"),Tn(""),ae(!0))}else mo(v("community.errors.invalidYouTubeLoomUrl")),uo(!0);else if("thread"===kn)if(En.includes("youtube.com/"))e=En.split("youtube.com/")[1].split("v=")[1].split("&")[0],Mn(e),Dn(!1),me("youtube"),de(!0),ge("vey"),Wn(""),ye(!0);else if(En.includes("youtu.be/"))e=En.split("youtu.be/")[1].split("?")[0],Mn(e),Dn(!1),me("youtube"),de(!0),ge("vey"),Wn(""),ye(!0);else if(En.includes("loom.com/share/"))e=En.split("loom.com/share/")[1].split("?")[0],Mn(e),Dn(!1),me("loom"),de(!0),ge("vel"),Wn(""),ye(!0);else if(En.includes("vimeo.com/")){const t=En.match(/vimeo\.com\/(?:video\/)?(\d+)(?:\/([a-zA-Z0-9]+))?/),o=En.match(/[?&]h=([a-zA-Z0-9]+)/);if(t&&t[1]){const i=t[2]||(o?o[1]:null);e=i?t[1]+"?h="+i:t[1]}else e="";e&&(Mn(e),Dn(!1),me("vimeo"),de(!0),ge("vev"),Wn(""),ye(!0))}else if(En.includes("twitch.tv/")||En.includes("clips.twitch.tv/")){const t=En.match(/twitch\.tv\/videos\/(\d+)/),o=En.match(/clips\.twitch\.tv\/([A-Za-z0-9_-]+)/),i=t||o?null:En.match(/twitch\.tv\/([A-Za-z0-9_]+)$/);t?e="v"+t[1]:o?e="c"+o[1]:i&&(e="ch"+i[1]),e&&(Mn(e),Dn(!1),me("twitch"),de(!0),ge("vtw"),Wn(""),ye(!0))}else if(En.includes("wistia.com/")){const t=En.match(/wistia\.(?:com|net)\/(?:medias|embed\/iframe)\/([A-Za-z0-9]+)/);e=t?t[1]:"",e&&(Mn(e),Dn(!1),me("wistia"),de(!0),ge("vwi"),Wn(""),ye(!0))}else mo(v("community.errors.invalidYouTubeLoomUrl")),uo(!0);else if("comment"===kn)if(In.includes("youtube.com/"))e=In.split("youtube.com/")[1].split("v=")[1].split("&")[0],Ln(e),Dn(!1),ke("youtube"),we(!0),Fe("vey"),Pn(""),Te(!0);else if(In.includes("youtu.be/"))e=In.split("youtu.be/")[1].split("?")[0],Ln(e),Dn(!1),ke("youtube"),we(!0),Fe("vey"),Pn(""),Te(!0);else if(In.includes("loom.com/share/"))e=In.split("loom.com/share/")[1].split("?")[0],Ln(e),Dn(!1),ke("loom"),we(!0),Fe("vel"),Pn(""),Te(!0);else if(In.includes("vimeo.com/")){const t=In.match(/vimeo\.com\/(?:video\/)?(\d+)(?:\/([a-zA-Z0-9]+))?/),o=In.match(/[?&]h=([a-zA-Z0-9]+)/);if(t&&t[1]){const i=t[2]||(o?o[1]:null);e=i?t[1]+"?h="+i:t[1]}else e="";e&&(Ln(e),Dn(!1),ke("vimeo"),we(!0),Fe("vev"),Pn(""),Te(!0))}else if(In.includes("twitch.tv/")||In.includes("clips.twitch.tv/")){const t=In.match(/twitch\.tv\/videos\/(\d+)/),o=In.match(/clips\.twitch\.tv\/([A-Za-z0-9_-]+)/),i=t||o?null:In.match(/twitch\.tv\/([A-Za-z0-9_]+)$/);t?e="v"+t[1]:o?e="c"+o[1]:i&&(e="ch"+i[1]),e&&(Ln(e),Dn(!1),ke("twitch"),we(!0),Fe("vtw"),Pn(""),Te(!0))}else if(In.includes("wistia.com/")){const t=In.match(/wistia\.(?:com|net)\/(?:medias|embed\/iframe)\/([A-Za-z0-9]+)/);e=t?t[1]:"",e&&(Ln(e),Dn(!1),ke("wistia"),we(!0),Fe("vwi"),Pn(""),Te(!0))}else mo(v("community.errors.invalidYouTubeLoomUrl")),uo(!0);else if("edit"===kn)if(Nn.includes("youtube.com/"))e=Nn.split("youtube.com/")[1].split("v=")[1].split("&")[0],$n(e),Dn(!1),Je(e),Ne(!0),Qe("vey"),On("");else if(Nn.includes("youtu.be/"))e=Nn.split("youtu.be/")[1].split("?")[0],$n(e),Dn(!1),Je(e),Ne(!0),Qe("vey"),On("");else if(Nn.includes("loom.com/share/"))e=Nn.split("loom.com/share/")[1].split("?")[0],$n(e),Dn(!1),Je(e),Ne(!0),Qe("vel"),On("");else if(Nn.includes("vimeo.com/")){const t=Nn.match(/vimeo\.com\/(?:video\/)?(\d+)(?:\/([a-zA-Z0-9]+))?/),o=Nn.match(/[?&]h=([a-zA-Z0-9]+)/);if(t&&t[1]){const i=t[2]||(o?o[1]:null);e=i?t[1]+"?h="+i:t[1]}else e="";e&&($n(e),Dn(!1),Je(e),Ne(!0),Qe("vev"),On(""))}else if(Nn.includes("twitch.tv/")||Nn.includes("clips.twitch.tv/")){const t=Nn.match(/twitch\.tv\/videos\/(\d+)/),o=Nn.match(/clips\.twitch\.tv\/([A-Za-z0-9_-]+)/),i=t||o?null:Nn.match(/twitch\.tv\/([A-Za-z0-9_]+)$/);t?e="v"+t[1]:o?e="c"+o[1]:i&&(e="ch"+i[1]),e&&($n(e),Dn(!1),Je(e),Ne(!0),Qe("vtw"),On(""))}else if(Nn.includes("wistia.com/")){const t=Nn.match(/wistia\.(?:com|net)\/(?:medias|embed\/iframe)\/([A-Za-z0-9]+)/);e=t?t[1]:"",e&&($n(e),Dn(!1),Je(e),Ne(!0),Qe("vwi"),On(""))}else mo(v("community.errors.invalidYouTubeLoomUrl")),uo(!0)},uc=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},xc=()=>{let e=!1;if("post"===Xi)if("mgm"===ie){if(!Ji.includes("meet.google.com/"))return void Pc("var(--danger-color)","error",v("community.errors.invalidGoogleMeetLink"));oe(Ji),q(!0),ae(!0),Zi(!1),qi(""),e=!0}else if("mzm"===ie){if(!Ji.includes("web.zoom.us/"))return void Pc("var(--danger-color)","error",v("community.errors.invalidZoomLink"));oe(Ji),q(!0),ae(!0),Zi(!1),qi(""),e=!0}else if("mmt"===ie){if(!Ji.includes("teams.microsoft.com/l/meetup-join"))return void Pc("var(--danger-color)","error",v("community.errors.invalidMicrosoftTeamsLink"));oe(Ji),q(!0),ae(!0),Zi(!1),qi(""),e=!0}else"mot"===ie&&(oe(Ji),q(!0),ae(!0),Zi(!1),qi(""),e=!0);else if("thread"===Xi)if("mgm"===he){if(!tn.includes("meet.google.com/"))return void Pc("var(--danger-color)","error",v("community.errors.invalidGoogleMeetLink"));me(tn),de(!0),ye(!0),Zi(!1),on(""),e=!0}else if("mzm"===he){if(!tn.includes("web.zoom.us/"))return void Pc("var(--danger-color)","error",v("community.errors.invalidZoomLink"));me(tn),de(!0),ye(!0),Zi(!1),on(""),e=!0}else if("mmt"===he){if(!tn.includes("teams.microsoft.com/l/meetup-join"))return void Pc("var(--danger-color)","error",v("community.errors.invalidMicrosoftTeamsLink"));me(tn),de(!0),ye(!0),Zi(!1),on(""),e=!0}else"mot"===he&&(me(tn),de(!0),ye(!0),Zi(!1),on(""),e=!0);else if("comment"===Xi)if("mgm"===Ae){if(!sn.includes("meet.google.com/"))return void Pc("var(--danger-color)","error",v("community.errors.invalidGoogleMeetLink"));ke(sn),we(!0),Te(!0),Zi(!1),an(""),e=!0}else if("mzm"===Ae){if(!sn.includes("web.zoom.us/"))return void Pc("var(--danger-color)","error",v("community.errors.invalidZoomLink"));ke(sn),we(!0),Te(!0),Zi(!1),an(""),e=!0}else if("mmt"===Ae){if(!sn.includes("teams.microsoft.com/l/meetup-join"))return void Pc("var(--danger-color)","error",v("community.errors.invalidMicrosoftTeamsLink"));ke(sn),we(!0),Te(!0),Zi(!1),an(""),e=!0}else"mot"===Ae&&(ke(sn),we(!0),Te(!0),Zi(!1),an(""),e=!0);else if("edit"===Xi)if("mgm"===qe){if(!gn.includes("meet.google.com/"))return void Pc("var(--danger-color)","error",v("community.errors.invalidGoogleMeetLink"));Je(gn),Ne(!0),Zi(!1),fn(""),e=!0}else if("mzm"===qe){if(!gn.includes("web.zoom.us/"))return void Pc("var(--danger-color)","error",v("community.errors.invalidZoomLink"));Je(gn),Ne(!0),Zi(!1),fn(""),e=!0}else if("mmt"===qe){if(!gn.includes("teams.microsoft.com/l/meetup-join"))return void Pc("var(--danger-color)","error",v("community.errors.invalidMicrosoftTeamsLink"));Je(gn),Ne(!0),Zi(!1),fn(""),e=!0}else"mot"===qe&&(Je(gn),Ne(!0),Zi(!1),fn(""),e=!0);if(!e)return;const t=(e=>{switch(e){case"mzm":return"Zoom Meeting";case"mgm":return"Google Meet Meeting";case"mmt":return"Microsoft Teams Meeting";default:return"Meeting"}})("post"===Xi?ie:"thread"===Xi?he:"comment"===Xi?Ae:"edit"===Xi?qe:"");let o="";if(""!==et){const e=new Date(et),i=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"][e.getDay()],r=e.getDate(),s=i[e.getMonth()];let a=e.getHours();const l=a>=12?"pm":"am";a%=12,a=a||12;const d=`${a}:${e.getMinutes().toString().padStart(2,"0")}${l}`,c=new Date,p=Math.abs(e-c),u=Math.ceil(p/864e5);o=u<=7?`${t} scheduled for ${n} at ${d}`:`${t} scheduled for the ${r}${uc(r)} of ${s} at ${d}`}else o=`${t} - Look forward to meeting you there!`;"post"===Xi?z(e=>""!==e?e+"\n\n"+o:o):"thread"===Xi?rn(o):"comment"===Xi?dn(o):"edit"===Xi&&(pn(et||""),wn&&"function"===typeof wn&&wn(e=>""!==e?e+"\n\n"+o:o))},mc=(e,t)=>{const o=e.trim().toLowerCase();if("gos"===t){if(o.includes("drive.google.com"))return v("community.errors.googleDriveLinkSheets","This is a Google Drive link. Please open the spreadsheet in Google Sheets and share that link instead (docs.google.com/spreadsheets/...)");if(o.includes("docs.google.com/document/"))return v("community.errors.googleDocsNotSheets","This is a Google Docs link. Please share a Google Sheets link instead (docs.google.com/spreadsheets/...)");if(o.includes("docs.google.com/presentation/")||o.includes("docs.google.com/forms/"))return v("community.errors.wrongGoogleType","Please share a Google Sheets link (docs.google.com/spreadsheets/...)");if(!o.includes("docs.google.com/spreadsheets/"))return v("community.errors.invalidGoogleSheetsLink")}else if("god"===t){if(o.includes("drive.google.com"))return v("community.errors.googleDriveLinkDocs","This is a Google Drive link. Please open the document in Google Docs and share that link instead (docs.google.com/document/...)");if(o.includes("docs.google.com/spreadsheets/"))return v("community.errors.googleSheetsNotDocs","This is a Google Sheets link. Please share a Google Docs link instead (docs.google.com/document/...)");if(o.includes("docs.google.com/presentation/")||o.includes("docs.google.com/forms/"))return v("community.errors.wrongGoogleType","Please share a Google Docs link (docs.google.com/document/...)");if(!o.includes("docs.google.com/document/"))return v("community.errors.invalidGoogleDocsLink")}return null},hc=()=>{if("post"===Yn){if("gos"===ie){const e=mc(Kn,"gos");e?(yo(e),go(!0)):(oe(Kn),q(!0),ae(!0),Vn(!1),Jn(""))}else if("god"===ie){const e=mc(Kn,"god");e?(yo(e),go(!0)):(oe(Kn),q(!0),ae(!0),Vn(!1),Jn(""))}}else if("thread"===Yn){if("gos"===he){const e=mc(qn,"gos");e?(yo(e),go(!0)):(me(qn),de(!0),ye(!0),Vn(!1),Qn(""))}else if("god"===he){const e=mc(qn,"god");e?(yo(e),go(!0)):(me(qn),de(!0),ye(!0),Vn(!1),Qn(""))}}else if("comment"===Yn){if("gos"===Ae){const e=mc(er,"gos");e?(yo(e),go(!0)):(ke(er),we(!0),Te(!0),Vn(!1),tr(""))}else if("god"===Ae){const e=mc(er,"god");e?(yo(e),go(!0)):(ke(er),we(!0),Te(!0),Vn(!1),tr(""))}}else if("edit"===Yn)if("gos"===qe){const e=mc(or,"gos");e?(yo(e),go(!0)):(Je(or),Ne(!0),Vn(!1),ir(""))}else if("god"===qe){const e=mc(or,"god");e?(yo(e),go(!0)):(Je(or),Ne(!0),Vn(!1),ir(""))}};(0,i.useEffect)(()=>{F(!0),cs(!0);const e=(0,mt.wE)();e!==es&&ts(e);const o=new FormData;o.append("currency",t.currency),o.append("post_id",t.post_id);const i=new URLSearchParams(window.location.search);let n=t.tab_id;const r=i.get("tab_id");r&&!t.hide_tab_switcher&&(n=r,rs(r)),Me()({method:"post",url:e+"api/influencer/community/initial_load2/"+t.influencer+"/"+n,data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{var o,i;if(t.isUnlockedCommunityPreview&&t.previewCommunityData&&"edit_community"!==t.my_platform_page){const o=Array.isArray(t.previewCommunityData.tags)?t.previewCommunityData.tags:[],i={...t.previewCommunityData,tags:o};let n=o,r=[];const s=e.data.post_info||[],a=s.some(e=>e.tags_list&&Array.isArray(e.tags_list)&&e.tags_list.length>0);if(0!==o.length&&0!==s.length&&a)r=s;else{const{mockTags:e,mockPosts:i}=wt(t.influencer_name||t.influencer,t.influencer_icon,t.display_name||t.influencer_name,v);0===o.length&&(n=e),r=0!==s.length&&a?s:i}const l={...i,tags:n};return is([l,...e.data.community_tab_info]),cs(!1),rs(l.id),as(l.name),ms(l),N(r),U(r.length),zt(!1),kt(!0),F(!1),void us(Yd)}const r=t.mobilePreview||"preview"===t.current_page_view&&"user"===t.view_type,s=Array.isArray(e.data.community_tab_info)?r?e.data.community_tab_info.filter(e=>!e.hidden):e.data.community_tab_info:[];is(s),cs(!1);const a=new URLSearchParams(window.location.search).get("tab_id");let l,d;const c=null!==(o=null!==(i=e.data.tab_overwrite)&&void 0!==i?i:a)&&void 0!==o?o:n;let p=null;if(null!==c&&void 0!==c&&""!==String(c)&&(p=s.find(e=>String(e.id)===String(c))),!p&&s.length>0&&(p=s[0]),p){var u,x,m,h,g;rs(p.id),as(null===(u=p)||void 0===u?void 0:u.name);const e=p?{...p,tags:Array.isArray(p.tags)?p.tags:[]}:{};ms(e),Sl(null!==(x=null===(m=p)||void 0===m?void 0:m.n_members)&&void 0!==x?x:0),l=null===(h=p)||void 0===h?void 0:h.access,d=null===(g=p)||void 0===g?void 0:g.n_posts}else ms({}),as(""),l=!1,d=0;if(cd(e.data.library||[]),!0===l||w){var f;N(e.data.post_info),ld(e.data.events),null!==d&&void 0!==d||(d=e.data.n_posts),U(d);const o=null===(f=p)||void 0===f?void 0:f.n_posts;(o&&o>0||d>0||e.data.post_info&&e.data.post_info.length>0)&&Y(!0),zt(!(d<6)),kt(!0),F(!1),w?us(!0):t.isLoggedOutView?us(!1):u
1s(!(t.mobilePreview||"preview"===t.current_page_view&&"user"===t.view_type)&&!0===l)}else N([]),U(0),zt(!1),kt(!0),F(!1),us(!1)}).catch(e=>{F(!1)})},[null===(o=t.activeProductData)||void 0===o||null===(u=o.active_products)||void 0===u||null===(h=u[0])||void 0===h||null===(g=h.community)||void 0===g||null===(b=g.tabs)||void 0===b?void 0:b.map(e=>`${e.id}:${e.hidden}`).join(",")]),(0,i.useEffect)(()=>{var e;!0===St&&!1===qt&&("null"!==String(t.post_id)&&(e=t.post_id,document.querySelector("#post"+e).scrollIntoView({behavior:"smooth",block:"start"})),Qt(!0))},[St]);const gc=(0,i.useCallback)(()=>{if(!0===St&&!1===At){Ft(!0);const o=new FormData;var e=[];const i=Wt.current;for(let t=0;t<i.length;t++)e.push(i[t].post_id);o.append("existing_ids",e),o.append("tag",ql),Me()({method:"POST",url:es+"api/influencer/community/load_more2/"+t.influencer+"/"+ns,data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{N(t=>{const o=[...t,...e.data.post_info];return e.data.n_posts<=e.data.post_info.length+t.length&&zt(!1),o}),U(e.data.n_posts),F(!1),Ft(!1)}).catch(e=>{F(!1),Ft(!1)})}},[St,At,ql,ns,t.influencer]);(0,i.useEffect)(()=>{const e=Et.current;if(!e||!Dt||At||!St)return;const t=new IntersectionObserver(e=>{const[t]=e;t.isIntersecting&&Dt&&!At&&St&&gc()},{rootMargin:"200px",threshold:.1});return t.observe(e),()=>{e&&t.unobserve(e)}},[Dt,At,St,gc]);const fc=()=>{ee(""),oe(""),ne("txt"),q(!1),ae(!1)};async function yc(e,t,o,i,n,r,s,a,l,d,c){let p=arguments.length>11&&void 0!==arguments[11]?arguments[11]:null,u=arguments.length>12&&void 0!==arguments[12]?arguments[12]:null,x=arguments.length>13&&void 0!==arguments[13]?arguments[13]:null,m=arguments.length>14&&void 0!==arguments[14]?arguments[14]:void 0;async function h(e,o){const i=e*o,n=Math.min(i+o,t.size),r=t.slice(i,n),s=b[e],a=n-i;for(let d=0;d<5;d++)try{const o=(await Me().put(s,r,{headers:{"Content-Type":t.type},onUploadProgress:t=>{C[e]=t.loaded/t.total*a},signal:ur.current.signal})).headers.etag;S[e]=o;break}catch(l){if(d>=4)return Promise.reject(`Max retries reached for chunk ${e+1}`);await new Promise(e=>setTimeout(e,1e3))}}const g=new FormData;pr(new AbortController),mr(Date.now()/1e3),"txt"===o?fr("Text..."):"img"===o?fr("Image..."):"aud"===o?fr("Audio..."):"vid"===o?fr("Video..."):"vey"===o?fr("Youtube..."):"vel"===o?fr("Loom..."):"vev"===o?fr("Vimeo..."):"vtw"===o?fr("Twitch..."):"vwi"===o?fr("Wistia..."):"mgm"===o?fr("Google Meet..."):"mot"===o?fr("Meeting..."):"mmt"===o?fr("Microsoft Teams..."):"mot"===o?fr("Meeting Other..."):"gos"===o?fr("Google Sheet..."):"god"===o&&fr("Google Doc..."),qo(!0),Ho(0),Yo("Preparing file..."),Zo("Step 1 of 3:");let f=!1;f=!window.location.host.includes("localhost")&&("vid"===o.toLowerCase()||"aud"===o.toLowerCase())&&t.size>100*Math.pow(1024,2),g.append("type",o.toLowerCase()),t&&t.name&&"txt"!==o&&!["vel","vey","vev","vtw","vwi","gos","god"].includes(o)&&g.append("ext",function(e){const t=e.split(".");return 1===t.length?"":t[t.length-1]}(t.name)),f?g.append("upload_type","multipart"):g.append("upload_type","single"),"post"===r&&(g.append("tab_id",c),g.append("post_tags",JSON.stringify(x||[]))),g.append("influencer_str",n),g.append("post_id",s),g.append("thread_id",a),g.append("comment_id",l),g.append("text",e),g.append("content_type",t?t.type:""),p&&g.append("link",p),["mgm","mot","mzm","mmt"].includes(o)&&g.append("event_time",u),"post"===r&&void 0!==m&&g.append("schedule_date",m?m.split(".")[0]:"null");let y="",b=[],_="";const w=10485760,j=t?Math.ceil(t.size/w):0;let C=new Array(j).fill(0),S=new Array(j);g.append("num_parts",j);let k="";"post"===r?k=!0===d?es+"api/influencer/community/edit_post_v2":es+"api/influencer/community/submit_post_v3":"thread"===r?k=!0===d?es+"api/influencer/community/edit_thread_v2":es+"api/influencer/community/submit_thread_v2":"comment"===r&&(k=!0===d?es+"api/influencer/community/edit_comment_v2":es+"api/influencer/community/submit_comment_v2");try{const e=await Me()({method:"post",url:k,data:g,headers:{"Content-type":"application/json"},withCredentials:!0});if(e.data.access_denied)throw new Error("Access Denied");if(!(!t||!t.name||!e.data.upload_uri&&!e.data.urls)){if(Ho(0),Yo(v("community.upload.uploading")),Zo("Step 2 of 3:"),f=e.data.multipart,f){b=e.data.urls,y=e.data.uploadId,_=e.data.fileKey;const o=[];for(let e=0;e<j;e++)o.push(h(e,w));const i=dr.current=setInterval(()=>{const e=C.reduce((e,t)=>
1e+t,0),o=100*e/j;hr.current||(hr.current=!0,ar(Date.now()),oi(t.size));let n="";if(t.size>=1048576){n=`${Math.round(e/1048576)}MB of ${Math.round(t.size/1048576)}MB`}else if(t.size>=1024){n=`${Math.round(e/1024)}KB of ${Math.round(t.size/1024)}KB`}else{n=`${Math.round(e)}Bytes of ${Math.round(t.size)}Bytes`}Ho(e/t.size*100),Yo(`Uploading...(${n})`),100===o&&clearInterval(i)},300);await Promise.all(o),clearInterval(i);const n=S.map((e,t)=>{let{ETag:o}=e;return{ETag:S[t],PartNumber:t+1}});let r=new FormData;r.append("key",_),r.append("uploadId",y),r.append("partsInfo",n),r.append("etags",S);await Me()({method:"post",url:es+"api/complete_multipart_upload/",data:r,withCredentials:!0})}else{await Me().put(e.data.upload_uri,t,{headers:{"Content-Type":t.type},signal:cr.signal,onUploadProgress:e=>{hr.current||(hr.current=!0,ar(Date.now()),oi(e.total));let t="";if(e.total>=1048576){t=`${Math.round(e.loaded/1048576)}MB of ${Math.round(e.total/1048576)}MB`}else if(e.total>=1024){t=`${Math.round(e.loaded/1024)}KB of ${Math.round(e.total/1024)}KB`}else{t=`${Math.round(e.loaded)}Bytes of ${Math.round(e.total)}Bytes`}Ho(e.loaded/e.total*100),Yo(`Uploading...(${t})`)}})}if(Ho(100),Yo("Processing..."),Zo("Step 3 of 3"),Uo(0),!0===d){const t=await async function(e,t,o,i){let n=new FormData;n.append("text",o),n.append("content_type",i);const r=await Me()({method:"post",url:es+"api/community_content/complete_edit/"+t+"/"+e,data:n,headers:{"Content-type":"application/json"},withCredentials:!0});return r}(e.data.message_id,e.data.message_type,e.data.text,e.data.content_type);if(t.data.access_denied)throw new Error("Access Denied")}else{const t=await async function(e,t){performance.now();const o=await Me()({method:"get",url:es+"api/community_content/complete/"+t+"/"+e,headers:{"Content-type":"application/json"},withCredentials:!0});return o}(e.data.message_id,e.data.message_type);if(t.data.access_denied)throw new Error("Access Denied")}}else Ho(100),Yo("Finished"),Uo(0);return Yo("Finished"),Zo(""),qo(!1),clearInterval(lr.current),dr.current&&clearInterval(dr.current),ei(0),oi(0),Ko([]),Uo(null),hr.current=!1,e.data.content}catch(D){var A,F;f&&async function e(t){try{t&&(ur.current.abort(),"aud-rec"===i||"vid-rec"===i?(Bc("var(--danger-color)","error",v("community.upload.failedConnection"),v("community.upload.andTryLater"),v("community.upload.downloadRecording")),"post"===r?Ui(te):"thread"===r?Ui(xe):"comment"===r&&Ui(Se)):Ic("var(--danger-color)","error",v("community.upload.failedConnection")),clearInterval(lr.current),dr.current&&clearInterval(dr.current),qo(!1),ei(0),oi(0),ni(!0),si("error"),Mt(!0),Ko([]),hr.current=!1);let e=new FormData;e.append("key",_),e.append("uploadId",y),await Me()({method:"post",url:es+"api/abort_multipart_upload/",data:e,withCredentials:!0})}catch{setTimeout(()=>{e(!1)},2e3)}}(!0),clearInterval(lr.current),dr.current&&clearInterval(dr.current),qo(!1),ei(0),oi(0),ni(!0),si("error"),Mt(!0),Ko([]),hr.current=!1;const e=null===(A=D.response)||void 0===A||null===(F=A.data)||void 0===F?void 0:F.error;throw"Invalid file type for video"===e?Ic("var(--danger-color)","error",`${e}. Please upload a video with one of the following file types: mp4, mov`):"Invalid file type for audio"===e?Ic("var(--danger-color)","error",`${e}. Please upload audio with one of the following file types: mp3, mp4, wav, aac, m4a`):"Invalid file type for image"===e?Ic("var(--danger-color)","error",`${e}. Please upload an image with one of the following file types: jpeg, jpg, png`):"Invalid file type for pdf"===e?Ic("var(--danger-color)","error",`${e}. Invalid file type. Please upload a pdf file`):"aud-rec"===i||"vid-rec"===i?(Bc("var(--danger-color)","error",v("community.upload.failedConnection"),v("community.upload.andTryLater"),v("community.upload.downloadRecording")),"post"===r?Ui(te):"thread"===r?Ui(xe):"comment"===r&&Ui(Se)):Ic("var(--danger-color)","error",v("community.upload.failedConnection")),new Error("Server error")}}async function bc(e){if(C())return;if(t.late_payment)return void(0,xt.A)();if(X(!0),Yl.length>0)try{const e=(null===xs||void 0===xs?void 0:xs.tags)||[],t=Yl.filter(t=>!e.includes(t));for(const o of t)await Gd(o);Gl([])}catch(n){return Ic("var(--danger-color)","error","Failed to create categories. Please try again."),void X(!1)}let o;o=await yc(D,Q,"aud-rec"===ie?"aud":"vid-rec"===ie?"vid":ie,ie,t.influencer,"post","","","",!1,e,["gos","god","mot","mzm","mgm","mmt"].includes(ie)?te:["vey","vel","vev","vtw","vwi"].includes(ie)?Cn:null,["mgm","mot","mzm","mmt"].includes(ie)?et:null,Hl,W),X(!0);const i=new FormData;i.append("influencer_str",t.influencer),i.append("tab_id",xs.id),Me()({method:"POST",url:es+"api/influencer/community/load_latest_post",data:i,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{var o,i,n,r;ld(e.data.events),z(""),E(0),X(!1),ee(""),oe(""),ne("txt"),q(!1),ae(!1),Vl(["all"]),Gl([]);const s=!!(null!==(o=e.data.new_post_info)&&void 0!==o&&null!==(i=o[0])&&void 0!==i&&i.scheduled_date&&new Date(e.data.new_post_info[0].scheduled_date)>new Date);R(null);let a=[];a=0===L.length?[e.data.new_post_info[0]]:[e.data.new_post_info[0],...L],a.length>
10&&(a[0].tags_list=Array.isArray(Hl)?[...Hl]:[]),N(a),Y(!0);const l=Array.isArray(Hl)?Hl.filter(e=>e&&"all"!==e&&""!==e.trim()):[];if(l.length>0&&cp(l[0]),Ic("var(--brand-color)","success",s?v("community.composer.scheduledFor",{date:(0,Be.zK)(new Date(e.data.new_post_info[0].scheduled_date))}):v("community.post.submitSuccess")),["mgm","mzm","mmt","mot"].includes(null===(n=e.data.new_post_info[0])||void 0===n?void 0:n.content_type)&&null!==(r=e.data.new_post_info[0])&&void 0!==r&&r.event_time&&setTimeout(()=>{window.scrollTo({top:0,behavior:"smooth"})},100),!s){t.influencer===e.data.new_post_info[0].username&&window.Intercom("update",{active_on_community_last_7_days:!0});const o=new FormData;o.append("post_id",e.data.new_post_info[0].post_id),Me()({method:"POST",url:es+"api/influencer/community/send_new_post_community_email",data:o,headers:{"Content-type":"application/json"},withCredentials:!0})}})}(0,i.useEffect)(()=>{ur.current=cr},[cr]);const _c=(e,t)=>{if(C())return;const o=new FormData;o.append("post_id",e),o.append("post_index",t),Me()({method:"POST",url:es+"api/influencer/community/post_like_update",data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{let t=[...L];t[e.data.post_index].like_count=e.data.post_like_count,t[e.data.post_index].user_like_value=e.data.like_val,N(t)}).catch(e=>{})};async function vc(e,o,i,n){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(C())return;if(Kl&&Kl.length>0)try{const e=Kl[0];((null===xs||void 0===xs?void 0:xs.tags)||[]).includes(e)||await Gd(e),Jl([])}catch(u){return void Ic("var(--danger-color)","error","Failed to create category. Please try again.")}const s=Array.isArray(Zl)?Zl.filter(e=>e&&"all"!==e&&""!==e.trim()):[],a=L[i],l=(null===a||void 0===a?void 0:a.event_time)||null,d=["mgm","mot","mzm","mmt"].includes(qe)&&(cn||l)||null;let c;c=await yc(e,Oe,"aud-rec"===qe?"aud":"vid-rec"===qe?"vid":qe,qe,t.influencer,"post",o,"","",!0,null,["mot","mzm","mgm","mmt","gos","god"].includes(qe)?n:["vey","vel","vev","vtw","vwi"].includes(qe)?Un:null,d,s,r);const p=new FormData;p.append("post_index",i),p.append("post_id",o),p.append("tab_id",xs.id),Me()({method:"POST",url:es+"api/influencer/community/load_edited_post",data:p,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{ld(e.data.events),Co(o);let t=[...L];if(t[e.data.post_index].text=e.data.text,t[e.data.post_index].file=e.data.file,t[e.data.post_index].content_type=e.data.content_type,t[e.data.post_index].community_post_title=e.data.community_post_title,t[e.data.post_index].link=e.data.link,void 0!==e.data.event_time&&(t[e.data.post_index].event_time=e.data.event_time),void 0!==e.data.scheduled_date&&(t[e.data.post_index].scheduled_date=e.data.scheduled_date),void 0!==e.data.tags_list&&Array.isArray(e.data.tags_list))t[e.data.post_index].tags_list=e.data.tags_list;else{const o=s.length>0?s.filter(e=>e&&"all"!==e&&""!==e.trim()):[];t[e.data.post_index].tags_list=o}if(N(t),void 0!==e.data.updated_tags&&Array.isArray(e.data.updated_tags)){ms(t=>({...t,tags:e.data.updated_tags})),is(t=>t.map(t=>t.id===xs.id?{...t,tags:e.data.updated_tags}:t));const t=Array.isArray(e.data.tags_list)?e.data.tags_list.filter(e=>e&&"all"!==e&&""!==e.trim()):[];if(t.length>0)cp(t[0]);else{const t=ql.toLowerCase(),o=e.data.updated_tags.map(e=>e.toLowerCase());if("all"===t||"events"===t);else if(!o.includes(t))if(e.data.updated_tags.length>0){const t=e.data.updated_tags[0];cp(t)}else cp("all")}}else{const t=Array.isArray(e.data.tags_list)?e.data.tags_list.filter(e=>e&&"all"!==e&&""!==e.trim()):[];t.length>0&&cp(t[0])}X(!1),Ic("var(--brand-color)","success",v("community.post.editSuccess")),Ue(""),Je(""),Qe("txt"),Ne(!1),Xl(["all"]),Jl([]),yn&&yn.startsWith("blob:")&&URL.revokeObjectURL(yn),bn(""),vn(""),Ki(""),Ue("")}).catch(e=>{Ic("var(--danger-color)","error",v("community.upload.failedConnection"))})}const wc=(e,o)=>{if(C())return;const i=new FormData;i.append("post_id",e),i.append("post_index",o),i.append("tab_id",xs.id),i.append("influencer_str",t.influencer),Me()({method:"POST",url:es+"api/influencer/community/delete_post",data:i,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{if("true"===String(e.data.success)){let t;if(Uc&&null!==Hc&&Hc===o&&dp(),t=0===e.data.remove_index?L.slice(1):e.data.remove_index===L.length-1?L.slice(0,e.data.remove_index):[...L.slice(0,e.data.remove_index),...L.slice(e.data.remove_index+1)],N(t),0===t.length&&Y(!1),ld(e.data.events),void 0!==e.data.updated_tags&&Array.isArray(e.data.updated_tags)){ms(t=>({...t,tags:e.data.updated_tags})),is(t=>t.map(t=>
1t.id===xs.id?{...t,tags:e.data.updated_tags}:t));const t=ql.toLowerCase(),o=e.data.updated_tags.map(e=>e.toLowerCase());if("all"===t||"events"===t);else if(!o.includes(t))if(e.data.updated_tags.length>0){const t=e.data.updated_tags[0];cp(t)}else cp("all")}}Ic("var(--brand-color)","success",v("community.post.deleteSuccess"))}).catch(e=>{Ic("var(--danger-color)","error",v("dashboard.paidDms.deletePostError"))})},[jc,Cc]=(0,i.useState)([]);(0,i.useEffect)(()=>{t.is_me,Cc([{id:"posts",label:v("community.filters.posts")},{id:"upcoming-events",label:v("community.filters.upcomingEvents")},{id:"active-posts",label:v("community.filters.activePosts")}])},[t.is_me]),(0,i.useEffect)(()=>{ae(!!(T>0||J))},[T,J]),(0,i.useEffect)(()=>{},[gt]);const Sc=()=>{const e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=e=>{const t=e.target.files[0];if("image/png"===t.type||"image/jpg"===t.type||"image/jpeg"===t.type){const e=URL.createObjectURL(t);ee(t),oe(e),ne("img"),ae(!0),q(!0)}else si("error"),Mt(!0),Ot("var(--danger-color)"),Pt(v("common.upload.unsupportedImage"))},e.click()},kc=()=>{const e=document.createElement("input");e.type="file",e.accept="video/*",e.onchange=e=>{const t=e.target.files[0];if("video/mp4"===t.type||"video/quicktime"===t.type){const e=URL.createObjectURL(t);ee(t),oe(e),ne("vid"),ae(!0),q(!0)}else si("error"),Mt(!0),Ot("var(--danger-color)"),Pt(v("common.upload.unsupportedVideo"))},e.click()},Ac=()=>{const e=document.createElement("input");e.type="file",e.accept="audio/*",e.onchange=e=>{const t=e.target.files[0];if("audio/mpeg"===t.type||"audio/wav"===t.type||"video/mp4"===t.type||"audio/aac"===t.type){const e=URL.createObjectURL(t);ee(t),oe(e),ne("aud"),ae(!0),q(!0)}else si("error"),Mt(!0),Ot("var(--danger-color)"),Pt(v("common.upload.unsupportedAudio"))},e.click()},Fc=()=>{const e=document.createElement("input");e.type="file",e.accept=".pdf",e.onchange=e=>{const t=e.target.files[0];if(t.size/1024/1024<=5)if("application/pdf"===t.type){const e=URL.createObjectURL(t);ee(t),oe(e),ne("pdf"),ae(!0),q(!0)}else si("error"),Mt(!0),Ot("var(--danger-color)"),Pt(v("community.composer.unsupportedPdf"));else si("error"),Mt(!0),Ot("var(--danger-color)"),Pt(v("community.composer.pdfSizeLimit"))},e.click()};async function Dc(e){e.preventDefault();try{di.current="audio"===Ci?await navigator.mediaDevices.getUserMedia({audio:{autoplay:!0,deviceId:e.target.value,sampleRate:44100}}):await navigator.mediaDevices.getUserMedia({audio:{autoplay:!0,deviceId:e.target.value,sampleRate:44100},video:{autoplay:!0,deviceId:mi},height:{ideal:1920}}),pi.current=await navigator.mediaDevices.enumerateDevices(),Tc()}catch(t){}ji(!1)}async function zc(e){e.preventDefault();try{di.current=await navigator.mediaDevices.getUserMedia({audio:{autoplay:!0,deviceId:ui,sampleRate:44100},video:{autoplay:!0,deviceId:e.target.value},height:{ideal:1920}}),pi.current=await navigator.mediaDevices.enumerateDevices(),Tc()}catch(t){}document.getElementById("video_record").srcObject=di.current,ji(!1)}function Tc(){let e=[],t=[],o=[];pi.current.forEach(function(i){let n=0;"audioinput"===i.kind?e.push({label:i.label,id:i.deviceId,len:n++}):"videoinput"===i.kind?o.push({label:i.label,id:i.deviceId}):"audiooutput"===i.kind&&t.push({label:i.label,id:i.deviceId})}),Ri({audioin:e,videoin:o,audioout:t})}async function Ec(e,t){bi("00"),vi("00"),Di(0);try{di.current.getTracks().forEach(e=>e.stop()),di.current=null,pi.current=null,ci.current=null}catch{}Ri({audioin:null,audioout:null,videoin:null}),"post"===e||"aud-rec"!==ie&&"vid-rec"!==ie||fc(),"thread"===e||"aud-rec"!==he&&"vid-rec"!==he||(ue(""),me(""),ge("txt"),de(!1),ye(!1),_e("")),"comment"===e||"aud-rec"!==Ae&&"vid-rec"!==Ae||(Ce(""),ke(""),Fe("txt"),we(!1),Te(!1),Re("")),"edit"===e||"aud-rec"!==qe&&"vid-rec"!==qe||(Ue(""),Je(""),Qe("txt"),Ne(!1));try{di.current="video"===t?await navigator.mediaDevices.getUserMedia(Ii):await navigator.mediaDevices.getUserMedia(Mi),pi.current=await navigator.mediaDevices.enumerateDevices()}catch(o){Mt(!0),Pt(v("community.recording.noDevices")),si("error"),Ot("var(--danger-color)"),"post"===e?fc():"thread"===e?(ue(""),me(""),ge("txt"),de(!1),ye(!1),_e("")):"comment"===e?(Ce(""),ke(""),Fe("txt"),we(!1),Te(!1),Re("")):"edit"===e&&(Ue(""),Je(""),Qe("txt"),Ne(!1))}Tc(),Si(t),"video"===t?(Ai(!1),Bi(4e6)):Bi(10),pi.current.length>0?fi("ready"):fi("no_devices")}(0,i.useEffect)(()=>
1{if(!1===ki&&!0!==Fi&&"video"===Ci)try{Ei.current.srcObject=di.current,Di(!0),Ai(!0),Ti("")}catch(e){""===zi&&Ti(setInterval(()=>Di(Fi+1),1e3))}},[Ci,Fi,ki]);const[Wc,Rc]=(0,i.useState)(!1);async function Dc(e){e.preventDefault();try{di.current="audio"===Ci?await navigator.mediaDevices.getUserMedia({audio:{autoplay:!0,deviceId:e.target.value,sampleRate:44100}}):await navigator.mediaDevices.getUserMedia({audio:{autoplay:!0,deviceId:e.target.value,sampleRate:44100},video:{autoplay:!0,deviceId:mi},height:{ideal:1920}}),pi.current=await navigator.mediaDevices.enumerateDevices(),Tc()}catch(t){}ji(!1)}async function zc(e){e.preventDefault();try{di.current=await navigator.mediaDevices.getUserMedia({audio:{autoplay:!0,deviceId:ui,sampleRate:44100},video:{autoplay:!0,deviceId:e.target.value},height:{ideal:1920}}),pi.current=await navigator.mediaDevices.enumerateDevices(),Tc()}catch(t){}ji(!1)}const Mc=async(e,t)=>{const o=document.createElement("a");o.download=t,o.href=e,o.addEventListener("click",e=>{setTimeout(()=>URL.revokeObjectURL(o.href),3e4)}),o.click()},Ic=(e,t,o)=>{Ot(e),Lt(t),Pt(o),Mt(!0)},Pc=(e,t,o)=>{ro(e),ao(t),io(o),to(!0)},Bc=(e,t,o,i,n)=>{Jt(e),li(t),Vt(o),Gt(i),Xt(n),$t(!0)},Lc=function(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.isUnlockedCommunityPreview||(Vc(e),Gc(L[e]),Xc(o),$c(!0))},[Nc,Oc]=(0,i.useState)([""]),[Uc,$c]=(0,i.useState)(!1),[Hc,Vc]=(0,i.useState)(null),[Yc,Gc]=(0,i.useState)(null),[Zc,Xc]=(0,i.useState)(!1),Kc=("storefront"!==t.pageLayoutType&&t.pageLayoutTypeUpdated,t.is_me?null:(e=>{const o=(null===(e=t.influencer_info)||void 0===e?void 0:e.influencer)||t.influencer||t.influencer_name||("undefined"!==typeof window?window.location.pathname.split("/").filter(Boolean)[0]:"");return o&&xs&&Object.prototype.hasOwnProperty.call(xs,"affiliate_enabled")&&!0===xs.affiliate_enabled?{productType:"community",productId:(null===xs||void 0===xs?void 0:xs.id)||ns||t.tab_id||0,productName:(null===xs||void 0===xs?void 0:xs.name)||t.community_name||"Community",influencer:o}:null})()),Jc=t.windowWidth>=1280?Kc:null,qc=Boolean(t.windowWidth<1280&&Kc),Qc=(0,M.jsxs)(M.Fragment,{children:[St&&null!==t.current_user&&""!==t.current_user&&(t.is_me||ps)&&(0,M.jsxs)("div",{style:{width:"100%",maxWidth:"100%",minWidth:0,margin:"12px auto 4px auto",padding:"0",boxSizing:"border-box",overflow:"hidden"},children:[(0,M.jsx)("style",{children:"\n                              .community-categories-scroll::-webkit-scrollbar {\n                                 height: 6px;\n                              }\n                              .community-categories-scroll::-webkit-scrollbar-track {\n                                 background: transparent;\n                              }\n                              .community-categories-scroll::-webkit-scrollbar-thumb {\n                                 background: #D1D5DB;\n                                 border-radius: 3px;\n                              }\n                              .community-categories-scroll::-webkit-scrollbar-thumb:hover {\n                                 background: #9CA3AF;\n                              }\n                              .community-categories-scroll {\n                                 scrollbar-width: thin;\n                                 scrollbar-color: #D1D5DB transparent;\n                              }\n                           "}),(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"14px",padding:"12px 16px",backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"14px",marginBottom:"14px",cursor:"text",position:"relative"},onClick:()=>{const e=document.getElementById("community-search-input");e&&e.focus()},children:[(0,M.jsx)("div",{style:{width:36,height:36,borderRadius:"10px",backgroundColor:"#F3F4F6",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:nd?(0,M.jsx)(He.A,{size:16,sx:{color:"#9CA3AF"}}):(0,M.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#9CA3AF",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,M.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,M.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}),(0,M.jsx)("div",{style:{flex:1,minWidth:0},children:ed?(0,M.jsx)("input",{id:"community-search-input",type:"text",value:ed,onChange:e=>td(e.target.value),style:{border:"none",outline:"none",width:"100%",fontSize:"15px",fontWeight:500,color:"#1D1D1D",fontFamily:"Roboto, sans-serif",backgroundColor:"transparent",padding:0}}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("input",{id:"community-search-input",type:"text",value:ed,onChange:e=>td(e.target.value),placeholder:v("community.searchPlaceholder")||"Search this community",style:{border:"none",outline:"none",width:"100%",fontSize:"15px",fontWeight:500,color:"#1D1D1D",fontFamily:"Roboto, sans-serif",backgroundColor:"transparent",padding:0}}
1),(0,M.jsx)("p",{style:{fontSize:"12px",color:"#9CA3AF",margin:"2px 0 0 0",fontFamily:"Roboto, sans-serif"},children:v("community.searchSubtext")||"Posts, threads, comments..."})]})}),ed&&(0,M.jsx)("span",{onClick:e=>{e.stopPropagation(),td(""),id(null)},style:{display:"flex",cursor:"pointer",color:"#9CA3AF",flexShrink:0},children:(0,M.jsx)(Z.$8F,{style:{fontSize:18}})})]}),(0,M.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px",paddingLeft:"5px"},children:[(0,M.jsx)("span",{style:{fontSize:"11px",fontWeight:700,color:"#9CA3AF",letterSpacing:"1px",textTransform:"uppercase"},children:Fd?v("community.editCategories")||"Edit Categories":v("community.browseByCategory")||"Browse by Category"}),t.is_me&&(0,M.jsx)("button",{onClick:()=>Dd(e=>!e),style:{display:"flex",alignItems:"center",gap:"6px",padding:Fd?"7px 16px":"5px 12px",borderRadius:Fd?"999px":"8px",border:"none",backgroundColor:Fd?"#1D1D1D":"transparent",color:Fd?"#fff":"#6B7280",fontSize:"12px",fontWeight:600,cursor:"pointer",fontFamily:"Roboto, sans-serif",outline:"none",transition:"all 0.15s"},onMouseEnter:e=>{Fd||(e.currentTarget.style.color="#1D1D1D")},onMouseLeave:e=>{Fd||(e.currentTarget.style.color="#6B7280")},children:Fd?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,M.jsx)("polyline",{points:"20 6 9 17 4 12"})}),v("common.done")||"Done"]}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,M.jsx)("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),(0,M.jsx)("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),(0,M.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),(0,M.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),(0,M.jsx)("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),(0,M.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),(0,M.jsx)("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),(0,M.jsx)("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),(0,M.jsx)("line",{x1:"17",y1:"16",x2:"23",y2:"16"})]}),v("community.customize")||"Customize"]})})]}),Fd&&(0,M.jsx)("div",{style:{padding:"10px 14px",marginBottom:"10px",backgroundColor:"#F3F4F6",borderRadius:"10px",fontSize:"13px",color:"#6B7280",fontFamily:"Roboto, sans-serif"},children:v("community.editCategoriesHint")||"Drag the handle to reorder \xb7 Tap a pill to rename \xb7 Tap \u2715 to remove"}),(0,M.jsx)("div",{ref:Hd,className:"community-categories-scroll",style:{display:"flex",alignItems:"center",gap:12,overflowX:"auto",overflowY:"hidden",WebkitOverflowScrolling:"touch",paddingBottom:"4px",width:"100%",maxWidth:"100%",minWidth:0,flexWrap:"nowrap"},children:(0,M.jsxs)("div",{style:{display:"flex",gap:12,flexWrap:"nowrap",minWidth:"max-content",alignItems:"flex-start"},children:[(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:4,flexShrink:0},children:[(0,M.jsx)("button",{onClick:()=>{Ql("all"),Ct("posts"),gs("posts"),Vl(["all"]),cp("all")},style:{padding:"8px 16px",height:"auto",borderRadius:"999px",border:"all"===ql?"1px solid #1D1D1D":"1px solid #E4EBF6",background:"all"===ql?"#1D1D1D":"white",color:"all"===ql?"#fff":"#1D1D1D",fontWeight:700,fontSize:13,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"all"===ql?"0px 2px 8px rgba(40, 71, 177, 0.07)":void 0,cursor:"pointer",transition:"background 0.15s, color 0.15s, border 0.15s",whiteSpace:"nowrap",flexShrink:0},children:v("community.allTab")},"all"),(0,M.jsx)("div",{style:{height:"20px",width:"1px"}})]}),t.windowWidth<600&&ad&&ad.length>0&&(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:4,flexShrink:0},children:[(0,M.jsx)("button",{onClick:()=>{Ql("events"),Ct("upcoming-events"),gs("events"),Vl(["all"]),window.scrollTo({top:0,behavior:"smooth"})},style:{padding:"8px 16px",height:"auto",borderRadius:"999px",border:"events"===ql?`1px solid ${k()}`:"1px solid #E4EBF6",background:"events"===ql?k():"white",color:"events"===ql?"#fff":"#1D1D1D",fontWeight:700,fontSize:13,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"events"===ql?"0px 2px 8px rgba(40, 71, 177, 0.07)":void 0,cursor:"pointer",transition:"background 0.15s, color 0.15s, border 0.15s",whiteSpace:"nowrap",flexShrink:0},children:v("community.upcomingEventsTab")}),(0,M.jsx)("div",{style:{height:"20px",width:"1px"}})]}),null!==t.current_user&&""!==t.current_user&&(t.is_me||ps&&Wc&&Array.isArray(null===xs||void 0===xs?void 0:xs.tags)&&xs.tags.filter(e=>e&&"string"===typeof e&&""!==e.trim()).length>0)&&(t.is_me?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Pe.ReactSortable,{list:Od,setList:e=>{Ud(e);const t=e.map(e=>
1"string"===typeof e?e:e.name||e.id);Vd(t)},animation:200,handle:".category-drag-handle",scroll:!1,scrollSensitivity:0,style:{display:"flex",alignItems:"center",gap:6,flexWrap:"nowrap",minWidth:"max-content"},children:Od.map((e,t)=>{const o="string"===typeof e?e:e.name||e.id,i=ql===o;return(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:4,flexShrink:0},children:[(0,M.jsxs)("button",{onClick:()=>{Fd||(Ql(o),Ct("posts"),gs("posts"),Vl([o]),cp(o))},style:{padding:"8px 16px",height:"auto",borderRadius:"999px",border:i?"1px solid #1D1D1D":"1px solid #E4EBF6",background:i?"#1D1D1D":"white",color:i?"#fff":"#1D1D1D",fontWeight:i?700:500,fontSize:13,display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",cursor:"pointer",transition:"all 0.15s",textAlign:"center",whiteSpace:"nowrap",flexShrink:0},children:[Fd&&(0,M.jsx)("span",{className:"category-drag-handle",style:{cursor:"grab",display:"inline-flex",color:"#9CA3AF",flexShrink:0},children:(0,M.jsx)(f.Pn8,{style:{fontSize:"14px"}})}),Fd&&zd===o?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("input",{autoFocus:!0,value:Ed,onChange:e=>Wd(e.target.value),onBlur:()=>{setTimeout(()=>{Td(e=>e===o?(Wd(""),null):e)},200)},onKeyDown:async e=>{if("Enter"===e.key){const e=Ed.trim();e&&e.toLowerCase()!==o.toLowerCase()&&await Zd(o,e),Td(null),Wd("")}"Escape"===e.key&&(Td(null),Wd(""))},onClick:e=>e.stopPropagation(),style:{border:"none",outline:"none",background:"transparent",fontSize:13,fontWeight:500,fontFamily:"Roboto, sans-serif",color:i?"#fff":"#1D1D1D",width:Math.max(40,8*Ed.length+10),padding:0}}),(0,M.jsx)("span",{onClick:async e=>{e.stopPropagation();const t=Ed.trim();t&&t.toLowerCase()!==o.toLowerCase()&&await Zd(o,t),Td(null),Wd("")},style:{cursor:"pointer",display:"inline-flex",color:i?"#fff":"#22C55E",flexShrink:0},children:(0,M.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,M.jsx)("polyline",{points:"20 6 9 17 4 12"})})})]}):(0,M.jsx)("span",{onClick:e=>{Fd&&(e.stopPropagation(),Td(o),Wd(o))},style:{cursor:Fd?"text":"pointer"},children:vt(o)}),Fd&&(0,M.jsx)("span",{onClick:e=>{e.stopPropagation(),Xd(o)},style:{cursor:"pointer",display:"inline-flex",color:"#9CA3AF",flexShrink:0,marginLeft:"2px"},onMouseEnter:e=>e.currentTarget.style.color="#EF4444",onMouseLeave:e=>e.currentTarget.style.color="#9CA3AF",children:(0,M.jsx)(Z.$8F,{style:{fontSize:"14px"}})})]}),!1]},o||`cat-${t}`)})}),Fd&&!t.isUnlockedCommunityPreview&&(0,M.jsxs)("button",{onClick:()=>{gd(null),yd(""),ud(!0),setTimeout(()=>{md(!0)},10)},style:{padding:"8px 16px",height:"auto",borderRadius:"999px",border:"1px solid #E4EBF6",background:"white",color:"#1D1D1D",fontWeight:500,fontSize:13,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.15s",gap:"6px",flexShrink:0},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#F3F4F6",onMouseLeave:e=>e.currentTarget.style.backgroundColor="white",children:[(0,M.jsx)(f.r2j,{style:{fontSize:15}}),v("community.addCategory")||"Add"]})]}):Nd.map((e,t)=>{const o=ql===e;return(0,M.jsx)("div",{style:{display:"flex",alignItems:"center",gap:6,flexShrink:0},children:(0,M.jsx)("button",{onClick:()=>{Ql(e),Ct("posts"),gs("posts"),Vl([e]),cp(e)},style:{padding:"8px 16px",height:"auto",borderRadius:"999px",border:o?`1px solid ${k()}`:"1px solid #E4EBF6",background:o?k():"white",color:o?"#fff":"#1D1D1D",fontWeight:700,fontSize:14,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:o?"0px 2px 8px rgba(40, 71, 177, 0.07)":void 0,cursor:"pointer",transition:"background 0.15s, color 0.15s, border 0.15s",textAlign:"center",whiteSpace:"nowrap",flexShrink:0},children:vt(e)})},e||`cat-${t}`)})),!1]})})]}),null!==od&&0===od.length&&!nd&&!(t.is_me&&jd&&0===L.length)&&(0,M.jsx)("p",{style:{fontSize:"14px",color:"#9CA3AF",textAlign:"center",margin:"20px 0",fontFamily:"Roboto, sans-serif"},children:v("common.noResults")||"No results found"})]});let ep="",tp="";const op=null!==od?od:L;if(op.length>0){const e=null===od?op.findIndex(e=>!0===e.pinned):-1;if(ep=op.map((o,i)=>i===e?null:(0,M.jsx)(s.Ay,{xs:12,className:t.windowWidth<1280?"content_island_mobile":"content_island",id:`post${o.post_id}`,style:{height:"auto",margin:"20px 0px 0px 0px"},children:(0,M.jsx)("div",{style:{padding:(t.windowWidth,"0px"),boxSizing:"border-box",width:"100%"},children:(0,M.jsx)(H,{post_index:i,username:o.username,display_name:o.display_name,user_icon:o.user_icon,time:o.time,subscription:o.subscription,text:o.text,content_type:o.content_type,content_file:o.file,post_tier:o.tier,influencer_tier_names:t.influencer_tiers,n_threads:o.n_threads,n_comments:o.n_comments,post_like_count:o.like_count,threads:o.threads,tags_list:o.tags_list,onClick:Lc,onLike:_c,post_id:o.post_id,post_user_value_count:o.user_like_value,link:o.link,pinned:o.pinned,current_user:t.current_user,influencer_name:t.influencer,handleUpdatePinnedPost:Jd,handleRemovePinnedPost:qd,isPinnedPost:Qd,community_post_title:o.community_post_title,editPost:vc,deletePost:wc,getBrandColor:k,event_time:o.event_time,scheduled_date:o.scheduled_date})})},i)),e>-1&&null===od){const o=L[e];tp=(0,M.jsx)(s.Ay,{xs:12,className:t.windowWidth<1280?"content_island_mobile":"content_island",id:`post${o.post_id}`,style:{height:"auto",margin:"20px 0px 0px 0px"},children:(0,M.jsx)("div",{style:{padding:(t.windowWidth,"0px"),boxSizing:"border-box",width:"100%"},children:(0,M.jsx)(H,{post_index:e,username:o.username,display_name:o.display_name,user_icon:o.user_icon,time:o.time,subscription:o.subscription,text:o.text,content_type:o.content_type,content_file:o.file,post_tier:o.tier,influencer_tier_names:t.influencer_tiers,n_threads:o.n_threads,n_comments:o.n_comments,post_like_count:o.like_count,threads:o.threads,tags_list:o.tags_list,onClick:Lc,onLike:_c,post_id:o.post_id,post_user_value_count:o.user_like_value,link:o.link,pinned:o.pinned,current_user:t.current_user,influencer_name:t.influencer,handleUpdatePinnedPost:Jd,handleRemovePinnedPost:qd,isPinnedPost:Qd,community_post_title:o.community_post_title,editPost:vc,deletePost:wc,getBrandColor:k,event_time:o.event_time,scheduled_date:o.scheduled_date,
1shareConfig:Kc})})},`pinned-${o.post_id}`)}}else if(t.is_me&&jd&&0===L.length&&!$){const{mockPosts:e}=wt(t.influencer_name||t.influencer,t.current_user_icon,t.display_name||t.influencer_name,v);let o="all"===ql?e:e.filter(e=>e.tags_list&&e.tags_list.some(e=>e.toLowerCase()===ql.toLowerCase()));if(ed&&ed.trim().length>=2){const e=ed.toLowerCase().trim();o=o.filter(t=>[t.text,t.username,t.display_name,t.community_post_title,...t.tags_list||[]].some(t=>t&&String(t).toLowerCase().includes(e)))}ep=(0,M.jsxs)("div",{children:[(0,M.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"8px",padding:"0px 0 12px 0",marginBottom:"8px"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",minWidth:0},children:[(0,M.jsx)(f.KE$,{style:{fontSize:"18px",color:"#B45309",strokeWidth:1.5,flexShrink:0}}),(0,M.jsx)("span",{style:{fontSize:"14px",color:"#6B7280",fontWeight:500,fontFamily:"Roboto, sans-serif",whiteSpace:"nowrap"},children:v("community.examplePosts.inspireTitle")})]}),(0,M.jsxs)("button",{onClick:()=>(()=>{const e=[...vd,ns];wd(e),localStorage.setItem("dismissedExampleTabs",JSON.stringify(e))})(),style:{fontSize:"13px",color:"#6B7280",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",fontWeight:500,padding:"6px 14px",borderRadius:"8px",border:"1px dashed #D1D5DB",backgroundColor:"transparent",fontFamily:"Roboto, sans-serif",transition:"all 0.15s",flexShrink:0,whiteSpace:"nowrap"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#F9FAFB",onMouseLeave:e=>e.currentTarget.style.backgroundColor="transparent",children:[(0,M.jsx)(Z.$8F,{style:{fontSize:14}})," ",v("community.examplePosts.clearAll")]})]}),o.filter(e=>!Cd.includes(e.post_id)).map((e,o)=>(0,M.jsxs)("div",{style:{height:"auto",margin:"16px 0px 0px 0px",position:"relative",border:"2px dashed #D1D5DB",borderRadius:"14px",overflow:"visible",backgroundColor:"#fff",animation:"exampleBorderPulse 2.5s ease-in-out infinite"},children:[(0,M.jsx)("div",{style:{position:"absolute",bottom:"12px",right:"12px",zIndex:2,display:"flex",alignItems:"center",gap:"8px"},children:(0,M.jsxs)("span",{onClick:()=>Sd(t=>[...t,e.post_id]),style:{display:"inline-flex",alignItems:"center",gap:"6px",fontSize:"11px",fontWeight:600,color:"#8B7355",backgroundColor:"#F0ECFF",padding:"5px 12px 5px 8px",borderRadius:"20px",border:"none",cursor:"pointer",transition:"all 0.15s"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#E4DFFF",onMouseLeave:e=>e.currentTarget.style.backgroundColor="#F0ECFF",children:[(0,M.jsx)(Z.$8F,{style:{fontSize:13,color:"#8B7355"}}),(0,M.jsx)("span",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#B45309",display:"inline-block",animation:"examplePulse 2s ease-in-out infinite"}}),(0,M.jsx)("style",{children:"@keyframes examplePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } } @keyframes exampleBorderPulse { 0%, 100% { border-color: #D1D5DB; box-shadow: 0 0 0px rgba(165, 180, 252, 0); } 50% { border-color: #A5B4FC; box-shadow: 0 0 12px rgba(165, 180, 252, 0.4); } }"}),v("community.examplePosts.example")]})}),(0,M.jsx)("div",{style:{boxSizing:"border-box",width:"100%"},children:(0,M.jsx)(H,{post_index:o,username:e.username,display_name:e.display_name,user_icon:e.user_icon,time:e.time,subscription:e.subscription,text:e.text,content_type:e.content_type||"txt",content_file:e.file||"",post_tier:e.tier||0,influencer_tier_names:t.influencer_tiers||{},n_threads:e.n_threads||0,n_comments:e.n_comments||0,post_like_count:e.like_count||e.n_likes||0,threads:e.threads||[],tags_list:e.tags_list||[],onClick:()=>{},onLike:()=>{},post_id:e.post_id,post_user_value_count:0,link:e.link||"",pinned:e.pinned||!1,current_user:t.current_user,influencer_name:t.influencer,handleUpdatePinnedPost:()=>{},handleRemovePinnedPost:()=>{},isPinnedPost:()=>!1,community_post_title:e.community_post_title||"",editPost:()=>{},deletePost:()=>{},getBrandColor:k,event_time:e.event_time,is_example:!0})})]},e.post_id))]})}else ep=(0,M.jsx)("p",{style:{fontSize:"14px",fontWeight:"500",margin:"40px auto 40px auto",color:"#6E89AF",textAlign:"center",width:"90%"},children:v("community.composer.nothingHereYet")});const[ip,np]=(0,i.useState)(!1),[rp,sp]=(0,i.useState)(""),[ap,lp]=(0,i.useState)("");(0,i.useEffect)(()=>
1{if(""===t.current_user?(sp("Login to join the conversation"),lp("/login")):Rc(!0),t.influencer_bool)if(w)us(!0);else if(t.isLoggedOutView)us(!1);else{var e;const o=null===(e=os.find(e=>e.id===ns))||void 0===e?void 0:e.access;us(!(t.mobilePreview||"preview"===t.current_page_view&&"user"===t.view_type)&&!0===o)}},[t.current_user,t.influencer_info.current_tier,t.view_type,t.isLoggedOutView,w,os,ns]);const dp=()=>{$c(!1),Vc(null),Gc(null),Xc(!1)},cp=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;L.length>0&&Y(!0),Ql(e),Vl("all"!==e&&"events"!==e?[e]:["all"]);const i=new FormData;i.append("tag",e),i.append("post_id",o),Me()({method:"POST",url:es+"api/influencer/community/initial_load_posts/"+t.influencer+"/"+ns,data:i,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{ld(e.data.events),e.data.library&&cd(e.data.library),N(e.data.post_info),U(e.data.n_posts),void 0!==e.data.n_members&&Sl(e.data.n_members),e.data.n_posts<6?zt(!1):zt(!0),F(!1)}).catch(e=>{F(!1)})},pp=function(e,o){var i;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;F(!0),rs(e),as(o),Ql("all");const r=null===(i=os.find(t=>t.id===e))||void 0===i?void 0:i.access;w?us(!0):t.isLoggedOutView?us(!1):us(!(t.mobilePreview||"preview"===t.current_page_view&&"user"===t.view_type)&&r);const s=os.find(t=>t.id===e);ms(s?{...s,tags:Array.isArray(s.tags)?s.tags:[]}:{});const a=new FormData;a.append("post_id",n),a.append("tag","all"),!0===r||w?Me()({method:"POST",url:es+"api/influencer/community/initial_load_posts/"+t.influencer+"/"+e,data:a,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{ld(e.data.events),cd(e.data.library||[]),N(e.data.post_info),U(e.data.n_posts),void 0!==e.data.n_members&&Sl(e.data.n_members),e.data.n_posts<6?zt(!1):zt(!0),F(!1)}).catch(e=>{F(!1)}):(F(!1),N([]),U(0),zt(!1),us(!1))};let up="20px";return up=t.windowWidth<600?"80px":t.windowWidth<900?"65px":"20px",(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)("div",{style:{width:"100%",boxSizing:"border-box",padding:t.hide_tab_switcher?"0px":t.windowWidth<600&&!t.is_me?"65px 0px 0px 0px":t.windowWidth<600?"0px 0px 0px 0px":t.windowWidth<1200&&!t.is_me?"65px 16px 0px 16px":t.windowWidth<1200?"0px 16px 0px 16px":"0px"},children:[ds?(0,M.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"20vh",zIndex:9999},children:(0,M.jsx)(He.A,{sx:{color:"var(--brand-color)"}})}):(0,M.jsxs)("div",{style:{marginTop:t.is_me?t.windowWidth<600?"-20px":t.windowWidth<1280?"-10px":"-25px":t.windowWidth<600?"-10px":t.windowWidth>=1280||t.windowWidth>=1200?"-15px":"0px"},children:[!1,St&&xs&&(t.is_me||ps)&&(0,M.jsx)(Ke.x,{onClickAway:()=>np(!1),children:(0,M.jsxs)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"14px",padding:t.windowWidth<600?"14px 10px":"16px 24px",maxWidth:"calc(1200px + (100% - 1200px) / 2)",width:"100%",margin:t.windowWidth<600?"10px auto 10px auto":"0 auto 10px auto",boxSizing:"border-box",position:"relative"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"18px"},children:[(()=>{const e=(null===xs||void 0===xs?void 0:xs.product_thumbnail)||(null===xs||void 0===xs?void 0:xs.thumbnail)||(null===xs||void 0===xs?void 0:xs.thumbnail_url)||(null===xs||void 0===xs?void 0:xs.thumbnailUrl),t=e&&"null"!==e&&"null/"!==e&&!e.endsWith("/fitwith/")?e.startsWith("null")?(0,at.A)(e):e:null;return t?(0,M.jsx)("img",{src:t,alt:"",style:{width:56,height:56,borderRadius:"14px",objectFit:"cover",flexShrink:0}}):(0,M.jsx)("div",{style:{width:56,height:56,borderRadius:"14px",flexShrink:0,background:`linear-gradient(135deg, ${"var(--brand-color)"===k()?"#667eea":k()} 0%, ${"var(--brand-color)"===k()?"#764ba2":k()}cc 100%)`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"20px",fontWeight:700,color:"#fff"},children:null!==xs&&void 0!==xs&&xs.name?xs.name.substring(0,2).toUpperCase():"CM"})})(),(0,M.jsxs)("div",{style:{flex:1,minWidth:0},children:[(()=>{const e=t.is_me?os:null===os||void 0===os?void 0:os.filter(e=>e.access),o=t.is_me&&e&&e.length>1;return(0,M.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px",cursor:o?"pointer":"default",borderRadius:"8px",padding:"2px 4px",margin:"-2px -4px",transition:"background-color 0.15s"},onClick:e=>{o&&!t.hide_tab_switcher&&(e.stopPropagation(),np(e=>!e))},onMouseEnter:e=>{o&&(e.currentTarget.style.backgroundColor="#F3F4F6")},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"},children:[(0,M.jsx)("h2",{style:{fontSize:"18px",fontWeight:700,color:"#1D1D1D",margin:0,fontFamily:"Roboto, sans-serif",lineHeight:1.3},children:(null===xs||void 0===xs?void 0:xs.name)||"Community"}),o&&!t.hide_tab_switcher&&(0,M.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#9CA3AF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[(0,M.jsx)("polyline",{points:"7 10 12 5 17 10"}),(0,M.jsx)("polyline",{points:"7 14 12 19 17 14"})]})]})})(),(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px",marginTop:"3px",flexWrap:"wrap"},children:[t.display_name&&(0,M.jsx)("span",{style:{fontSize:"13px",color:"#9
1CA3AF",fontFamily:"Roboto, sans-serif"},children:t.display_name}),t.display_name&&(0,M.jsx)("span",{style:{fontSize:"13px",color:"#D1D5DB"},children:"\xb7"}),(0,M.jsxs)("span",{style:{fontSize:"13px",color:"#9CA3AF",fontFamily:"Roboto, sans-serif",display:"inline-flex",alignItems:"center",gap:"4px"},children:[(0,M.jsx)(P.YXz,{style:{fontSize:"12px"}}),(0,M.jsx)("strong",{style:{color:"#1D1D1D",fontWeight:600},children:(null===Cl||void 0===Cl?void 0:Cl.toLocaleString())||0})," ",v("desktopSalesCard.members")]})]})]})]}),ip&&os&&os.length>1&&!t.hide_tab_switcher&&(0,M.jsx)("div",{style:{position:"absolute",top:"calc(100% + 6px)",left:0,minWidth:"280px",maxWidth:"400px",width:"auto",backgroundColor:"#fff",borderRadius:"14px",border:"1px solid #E4EBF6",boxShadow:"0 8px 24px rgba(0,0,0,0.1)",padding:"6px 0",zIndex:1e3,maxHeight:300,overflowY:"auto"},children:os.filter(e=>t.is_me||e.free||e.access).map(e=>{var t;const o=String(e.id)===String(ns),i=(null===e||void 0===e?void 0:e.product_thumbnail)||(null===e||void 0===e?void 0:e.thumbnail)||(null===e||void 0===e?void 0:e.thumbnail_url)||(null===e||void 0===e?void 0:e.thumbnailUrl),n=i&&"null"!==i&&"null/"!==i&&!i.endsWith("/fitwith/")?i.startsWith("null")?(0,at.A)(i):i:null;return(0,M.jsxs)("div",{onClick:t=>{t.stopPropagation(),pp(e.id,e.name),np(!1)},style:{padding:"10px 18px",cursor:"pointer",display:"flex",alignItems:"center",gap:"14px",backgroundColor:o?"#F8F9FA":"transparent",fontWeight:o?600:400,fontSize:"15px",color:"#1D1D1D",transition:"background-color 0.1s"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#F3F4F6",onMouseLeave:e=>e.currentTarget.style.backgroundColor=o?"#F8F9FA":"transparent",children:[n?(0,M.jsx)("img",{src:n,alt:"",style:{width:36,height:36,borderRadius:"10px",objectFit:"cover"}}):(0,M.jsx)("span",{style:{width:36,height:36,borderRadius:"10px",background:`linear-gradient(135deg, ${k()} 0%, ${k()}cc 100%)`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"13px",fontWeight:700,color:"#fff",flexShrink:0},children:(null===(t=e.name)||void 0===t?void 0:t.substring(0,2).toUpperCase())||"CM"}),e.name]},e.id)})}),(()=>{const e=e=>{const t="posts"===e?"community_tab_label":"library_tab_label",o=new FormData;o.append("tab_id",ns),o.append(t,bs),Me()({method:"post",url:(0,mt.wE)()+"api/influencer/community/set_tab_labels",data:o,withCredentials:!0}).then(()=>{ms(e=>({...e,[t]:bs||null}))}).catch(e=>console.error("Failed to save tab label:",e)),ys(null)},o=[{key:"posts",label:(null===xs||void 0===xs?void 0:xs.community_tab_label)||v("community.communityTab"),icon:(0,M.jsx)(f.U2r,{size:14})},{key:"library",label:(null===xs||void 0===xs?void 0:xs.library_tab_label)||v("community.libraryTab"),icon:(0,M.jsx)(f.XMY,{size:14})}].filter(e=>"library"!==e.key||t.is_me||dd&&dd.length>0);return o.length<=1?null:(0,M.jsx)("div",{style:{display:"inline-flex",gap:"0px",flexWrap:"wrap",marginTop:"14px",backgroundColor:"#F3F4F6",borderRadius:"10px",padding:"3px",maxWidth:"100%"},children:o.map(o=>{const i=gt===o.key||"posts"===o.key&&"library"!==gt,n=fs===o.key;return(0,M.jsxs)("button",{onClick:e=>{e.stopPropagation(),n||(Ct(o.key),ks(null),zs(null),"posts"===o.key&&(Ql("all"),gs("posts")))},style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",padding:"6px 16px",fontSize:"13px",fontWeight:i?600:500,color:i?"#1D1D1D":"#6B7280",backgroundColor:i?"#FFFFFF":"transparent",border:"none",borderRadius:"8px",cursor:"pointer",fontFamily:"Roboto, sans-serif",transition:"all 0.15s",boxShadow:i?"0 1px 3px rgba(0,0,0,0.08)":"none",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"calc(100vw - 40px)"},children:[(0,M.jsx)("span",{style:{display:"flex",opacity:i?1:.6},children:o.icon}),n?(0,M.jsx)("input",{autoFocus:!0,value:bs,onChange:e=>_s(e.target.value),onBlur:()=>e(o.key),onKeyDown:t=>{"Enter"===t.key&&e(o.key),"Escape"===t.key&&ys(null)},onClick:e=>e.stopPropagation(),maxLength:50,style:{border:"none",outline:"none",background:"transparent",fontSize:"13px",fontWeight:600,fontFamily:"Roboto, sans-serif",color:"#1D1D1D",width:Math.max(60,Math.min(8*bs.length,300))+"px",padding:0}}):(0,M.jsxs)(M.Fragment,{children:[o.label&&o.label.length>60?o.label.substring(0,60)+"...":o.label,t.is_me&&(0,M.jsx)(f.O18,{size:12,style:{marginLeft:"4px",opacity:.4,cursor:"pointer"},onClick:e=>{e.stopPropagation(),_s("posts"===o.key?(null===xs||void 0===xs?void 0:xs.community_tab_label)||"":(null===xs||void 0===xs?void 0:xs.library_tab_label)||""),ys(o.key)}})]})]},o.key)})})})(),t.windowWidth<1280&&"library"!==gt&&(0,M.jsx)("div",{style:{display:"flex",gap:"4px",marginTop:"14px",padding:"4px",backgroundColor:"#F3F4F6",borderRadius:"12px"},children:[{key:"posts",label:v("community.postsTab")},{key:"about",label:v("community.aboutTab")},{key:"upcoming-events",label:v("community.upcomingEventsTab")}].map(e=>(0,M.jsx)("button",{onClick:t=>{t.stopPropagation(),Ct(e.key),"posts"===e.key?(Ql("all"),gs("posts")):"upcoming-events"===e.key&&(Ql("events"),gs("events"))},style:{flex:1,padding:"8px 12px",fontSize:"13px",fontWeight:gt===e.key?600:500,color:gt===e.key?"#1D1D1D":"#6B7280",backgroundColor:gt===e.key?"#FFFFFF":"transparent",border:"none",borderRadius:"10px",cursor:"pointer",fontFamily:"Roboto, sans-serif",transition:"all 0.15s",boxShadow:gt===e.key?"0 1px 3px rgba(0,0,0,0.08)":"none",whiteSpace:"nowrap"},children:e.label},e.key))})]})}),St&&os&&os.length>1&&!xs&&!t.isLoggedOutView&&("storefront"!==t.pageLayoutType||(t.is_me||os.filter(e=>e.free||e.access).length>1))&&(0,M.jsx)("div",{style:{display:t.windowWidth<600?"block":"flex",justifyContent:"center",width:"100%",maxWidth:"1200px",margin:t.is_me?"10px auto 10px auto":"normal"===t.pageLayoutType?"20px auto 0px auto":t.windowWidth<600?"10px auto 10px auto":"10px auto 40px auto",padding:t.is_me?"0px":t.windowWidth<600?"0px 0px":t.windowWidth<1200?"0px 16px":"0px 0px",boxSizing:"border-box",position:"relative",zIndex:t.windowWidth<600?100:1100},children:(0,M.jsx)(Ie.P.div,{initial:{opacity:0,y:-10}
1,animate:{opacity:1,y:0},transition:{duration:.5,ease:"easeOut"},style:{width:"100%",display:"flex",justifyContent:"flex-start",justifyItems:t.windowWidth<600?"center":"flex-start",position:"relative",zIndex:t.windowWidth<600?100:1100},children:(0,M.jsx)("div",{style:{width:"100%",maxWidth:!0===t.mobilePreview?320:t.windowWidth<600?"calc(100vw - 32px)":340,position:"relative",margin:t.windowWidth<600?"0px auto":"0px",justifyContent:"center"},children:(0,M.jsx)(Ke.x,{onClickAway:()=>np(!1),children:(0,M.jsxs)("div",{style:{position:"relative",width:"100%"},children:[(0,M.jsxs)(Ie.P.button,{whileTap:{scale:.98},onClick:()=>{t.hide_tab_switcher||np(e=>!e)},style:{width:"100%",background:"white",border:ip?`1px solid ${k()}`:"1px solid #E4EBF6",borderRadius:"10px",margin:"0px auto",padding:"10px 16px",fontSize:"16px",fontWeight:600,maxWidth:!0===t.mobilePreview?"280px":t.windowWidth<600?"100%":"340px",color:"#1D1D1D",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",boxShadow:"0 1px 6px rgba(110,137,175,0.04)",transition:"border 0.2s, box-shadow 0.2s",outline:"none",position:"relative",minHeight:44,height:44},whileHover:{boxShadow:"0 2px 8px rgba(110,137,175,0.1)"},"aria-haspopup":"listbox","aria-expanded":!!ip,children:[(0,M.jsx)("span",{style:{display:"flex",alignItems:"center",gap:10,minWidth:0},children:(()=>{const e=os.find(e=>e.name===ss),t=(null===e||void 0===e?void 0:e.product_thumbnail)||(null===e||void 0===e?void 0:e.thumbnail)||(null===e||void 0===e?void 0:e.thumbnail_url)||(null===e||void 0===e?void 0:e.thumbnailUrl),o=t&&"null"!==t&&"null/"!==t&&!t.endsWith("/fitwith/")?t.startsWith("null")?(0,at.A)(t):t:null;return(0,M.jsxs)(M.Fragment,{children:[o?(0,M.jsx)("img",{src:o,alt:"",style:{width:32,height:32,borderRadius:"8px",objectFit:"cover",flexShrink:0}}):(0,M.jsx)("span",{style:{width:32,height:32,borderRadius:"8px",background:`linear-gradient(135deg, ${k()} 0%, ${k()}cc 100%)`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"13px",fontWeight:700,color:"#fff",flexShrink:0},children:null!==e&&void 0!==e&&e.name?e.name.substring(0,2).toUpperCase():"CM"}),(0,M.jsx)("span",{style:{fontWeight:600,fontSize:"16px",color:"#1D1D1D",lineHeight:1.2,maxWidth:200,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"middle"},title:e?e.name:"Select Tab",children:e?e.name:"Select Tab"}),!(null!==e&&void 0!==e&&e.free)&&!(null!==e&&void 0!==e&&e.access)&&(0,M.jsx)(P.JhU,{style:{fontSize:"14px",color:"#6E89AF",marginLeft:4}}),!(null!==e&&void 0!==e&&e.free)&&(null===e||void 0===e?void 0:e.access)&&(0,M.jsx)(K.Hu1,{style:{fontSize:"16px",color:"#6E89AF",marginLeft:4}})]})})()}),!t.hide_tab_switcher&&(0,M.jsx)(Ie.P.span,{animate:{rotate:ip?180:0},transition:{duration:.25},style:{display:"flex",alignItems:"center"},children:(0,M.jsx)(f.HmQ,{style:{fontSize:"22px",color:"#6E89AF",transition:"transform 0.2s"}})})]}),(0,M.jsx)(Xe.N,{children:ip&&!t.hide_tab_switcher&&(0,M.jsx)(Ie.P.ul,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.25},style:{position:"absolute",top:"calc(100% + 6px)",left:0,width:"100%",background:"white",borderRadius:"10px",boxShadow:"0 6px 24px rgba(110,137,175,0.10)",padding:"4px 0",zIndex:t.windowWidth<600?2e3:1e3,listStyle:"none",margin:0,border:"1px solid #E4EBF6"},role:"listbox",children:os.map(e=>{const t=e.name===ss;return(0,M.jsx)(Ie.P.li,{onClick:()=>{np(!1),pp(e.id,e.name)},whileHover:{backgroundColor:t?"rgba(110,137,175,0.06)":"rgba(110,137,175,0.04)"},style:{padding:"10px 18px",cursor:"pointer",display:"flex",alignItems:"center",fontWeight:t?700:500,color:t?k():"#1D1D1D",fontSize:"15px",background:t?"rgba(110,137,175,0.06)":"transparent",boxShadow:t?"0 1px 6px 0 rgba(110,137,175,0.04)":"none",transition:"background 0.15s, color 0.15s, box-shadow 0.15s",gap:8,minHeight:36,height:36},role:"option","aria-selected":t,children:(0,M.jsxs)("span",{style:{flex:1,display:"flex",alignItems:"center",gap:6,minWidth:0},children:[(0,M.jsx)("span",{style:{maxWidth:230,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"middle"},title:e.name,children:e.name}),!(null!==e&&void 0!==e&&e.free)&&!(null!==e&&void 0!==e&&e.access)&&(0,M.jsx)(P.JhU,{style:{fontSize:"14px",color:"#6E89AF"}}),!(null!==e&&void 0!==e&&e.free)&&(null===e||void 0===e?void 0:e.access)&&(0,M.jsx)(K.Hu1,{style:{fontSize:"14px",color:"#6E89AF"}})]})},e.id)})})})]})})})})}),A||!xs||0===Object.keys(xs).length?(0,M.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"20vh",zIndex:9999},children:(0,M.jsx)(He.A,{sx:{color:"var(--brand-color)"}})}):ps?(0,M.jsxs)(M.Fragment,{children:[t.windowWidth>
1=1280?"":(0,M.jsx)("div",{style:{overflowX:"hidden",width:"100%",margin:"10px 0px 16px 0px",filter:"none",minHeight:"calc(100vh - 400px)",minWidth:0,pointerEvents:"auto",userSelect:"text"},children:"posts"===gt?(0,M.jsx)(s.Ay,{item:!0,xs:12,lg:t.windowWidth<500?12:10,style:{height:"auto",margin:"0px 0px 0px 0px"},children:(0,M.jsxs)(s.Ay,{container:!0,children:[qc?(0,M.jsx)(s.Ay,{item:!0,xs:12,children:(0,M.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",padding:t.windowWidth<600?"0px 0px 12px 0px":"0px 16px 12px 16px",boxSizing:"border-box"},children:(0,M.jsx)(st.A,{productType:Kc.productType,productId:Kc.productId,productName:Kc.productName,influencer:Kc.influencer,hasAccess:!0,affiliateEnabled:!0===(null===xs||void 0===xs?void 0:xs.affiliate_enabled),buttonVariant:"text"})})}):null,(0,M.jsx)(s.Ay,{item:!0,xs:12,style:{height:"auto",borderRadius:"12px",margin:"0px 0px 0px 0px"},children:(0,M.jsx)("div",{style:{boxSizing:"border-box"},children:(0,M.jsx)(nt,{windowWidth:t.windowWidth,currentUser:t.current_user,currentUserIcon:t.current_user_icon,placeholder:S,textValue:D,onTextChange:e=>z(e),onTextLengthChange:E,onAttachImage:Sc,selectedPreviewUrl:te,fileType:ie,onRemoveAttachment:fc,onSubmit:()=>bc(ns),scheduleDate:W,onScheduleDateChange:R,disabled:j,brandColor:k(),handleClickVideo:ac,handleCloseVideo:lc,handleShareVideo:kc,handleClickAudio:dc,handleCloseAudio:cc,handleShareAudio:Ac,handleClickDoc:rc,handleCloseDoc:sc,handleSharePDF:Fc,handleClick:oc,handleClose:ic,getDevices:Ec,anchorElVideo:Cr,anchorElAudio:wr,anchorElDoc:kr,anchorEl:_r,setFileType:ne,setIsMediaAttached:q,setSelectedPreviewUrl:oe,setEmbedUrlType:An,setEmbedUrlIsOpen:Dn,setSnackbarEmbed:uo,setDocModalOpen:Vn,setDocType:Gn,setSnackbarOpenDoc:go,setMeetingModalOpen:Zi,setMeetingType:Ki,setSnackbarOpenMeeting:to,handleRemoveContent:fc,meetingLink:Ji,setMeetingLink:qi,docLink:Kn,setDocLink:Jn,embedVideoUrl:zn,setEmbedVideoUrl:Tn,postMeetingTime:et,setPostMeetingTime:tt,meetingModalOpen:Gi,docModalOpen:Hn,embedUrlIsOpen:Fn,recordingStatus:gi,setRecordingStatus:fi,recordingDurationMins:yi,setRecordingDurationMins:bi,recordingDurationSeconds:_i,setRecordingDurationSeconds:vi,recordingDevices:Wi,setRecordingDevices:Ri,mediaRecorder:ci,mediaStream:di,mediaDevices:pi,setADevID:xi,aDevID:ui,changingDevice:wi,setChangingDevice:ji,localStream:Ei,videoBitsPerSecond:Pi,setVDevID:hi,vDevID:mi,recordedFileFormat:Li,setRecordedFileFormat:Ni,setSelectedFile:ee,setShowPostButton:ae,embedUrlKey:Cn,is_me:t.is_me,handleAudioDeviceChange:Dc,handleVideoDeviceChange:zc,saveFile:Mc,handleFullscreenOpen:tc,processEmbedUrlSet:pc,embedUrlType:kn,setEmbedVideoUrlThread:Wn,setEmbedVideoUrlComment:Pn,setEmbedVideoUrlEdit:On,snackbarMsgEmbed:xo,snackbarEmbed:po,embedVideoUrlThread:En,embedVideoUrlComment:In,embedVideoUrlEdit:Nn,docType:Yn,activeDocFileType:Zn,setActiveDocFileType:Xn,setFileTypeThread:ge,setDocLinkThread:Qn,setFileTypeComment:Fe,setDocLinkComment:tr,setDocLinkEdit:ir,setFileTypeEdit:Qe,docLinkThread:qn,docLinkComment:er,docLinkEdit:or,checkDocLink:hc,meetingType:Xi,setMeetingLinkThread:on,setMeetingLinkComment:an,setMeetingLinkEdit:fn,meetingLinkThread:tn,meetingLinkComment:sn,meetingLinkEdit:gn,snackbarMsgMeeting:oo,snackbarOpenMeeting:eo,snackbarSeverityMeeting:so,snackbarColorMeeting:no,checkMeetingLink:xc,currentTabInfo:xs,uploadPostTags:Hl,setUploadPostTags:Vl,editPostTags:Zl,setEditPostTags:Xl,addCommunityCategory:Gd,editCategoryModalOpen:pd,onEditCategory:e=>{gd(e),yd(e),ud(!0),setTimeout(()=>{md(!0)},10)},isUnlockedCommunityPreview:t.isUnlockedCommunityPreview,setMeetingImageEdit:bn,setMeetingImageFileNameEdit:vn,meetingImageEdit:yn,meetingImageFileNameEdit:_n,setSelectedFileEdit:Ue,pendingCategories:Yl,setPendingCategories:Gl})})}),"posts"===gt&&(0,M.jsx)("div",{style:{width:"100%",minWidth:0,overflow:"hidden"},children:Qc}),"posts"===gt&&tp,(0,M.jsxs)("div",{ref:Tt,style:{minWidth:"100%"},children:[ep,Dt&&(0,M.jsx)("div",{ref:Et,style:{height:"1px",width:"100%",marginTop:"20px"}}),At&&Dt&&(0,M.jsx)(a.A,{sx:{display:"flex",width:"100%",marginTop:"20px"},children:(0,M.jsx)(He.A,{sx:{margin:"auto",color:"var(--brand-color)"}})}),!Dt&&O>0&&(0,M.jsx)("p",{style:{fontSize:"14px",fontWeight:"500",margin:"40px auto 40px auto",color:"#6E89AF",textAlign:"center",width:"90%"},children:v("community.reachedEnd")})]})]})}):"upcoming-events"===gt&&t.windowWidth<1280?(0,M.jsx)(s.Ay,{item:!0,xs:12,style:{height:"auto",margin:"0px 0px 0px 0px"},children:(0,M.jsx)($e,{brandColor:k(),events:0===L.length&&!$&&t.is_me&&jd&&0===ad.length?[{id:"mock-event-1",community_post_title:v("community.examplePosts.event1Title"),event_time:new Date(Date.now()+864e5).toISOString(),content_type:"mzm",link:"https://zoom.us/j/example",is_example:!0},{id:"mock-event-2",community_post_title:v("community.examplePosts.event2Title"),event_time:new Date(Date.now()+6048e5).toISOString(),content_type:"mgm",link:"https://meet.google.com/example",is_example:!0}]:ad,onAddEvent:nc,windowWidth:t.windowWidth,is_me:t.is_me})}):"about"===gt&&t.windowWidth<1280?(0,M.jsx)(s.Ay,{item:!0,xs:12,style:{height:"auto",margin:"0px 0px 0px 0px"},children:(0,M.jsxs)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"24px",marginBottom:"16
1px"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"14px",marginBottom:"16px"},children:[(()=>{const e=(null===xs||void 0===xs?void 0:xs.product_thumbnail)||(null===xs||void 0===xs?void 0:xs.thumbnail);return e&&"null"!==e?(0,M.jsx)("img",{src:e,alt:"",style:{width:56,height:56,borderRadius:"14px",objectFit:"cover",flexShrink:0}}):(0,M.jsx)("div",{style:{width:56,height:56,borderRadius:"14px",flexShrink:0,background:`linear-gradient(135deg, ${k()} 0%, ${k()}cc 100%)`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"20px",fontWeight:700,color:"#fff"},children:null!==xs&&void 0!==xs&&xs.name?xs.name.substring(0,2).toUpperCase():"CM"})})(),(0,M.jsxs)("div",{children:[(0,M.jsx)("h3",{style:{fontSize:"18px",fontWeight:700,color:"#1D1D1D",margin:0,fontFamily:"Roboto, sans-serif"},children:(null===xs||void 0===xs?void 0:xs.name)||"Community"}),(0,M.jsx)("p",{style:{fontSize:"13px",color:"#9CA3AF",margin:"2px 0 0 0",fontFamily:"Roboto, sans-serif"},children:t.display_name||t.influencer})]})]}),(0,M.jsx)(jt,{description:(null===xs||void 0===xs?void 0:xs.description)||v("community.preview.defaultDescription")}),(0,M.jsx)("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center",padding:"10px 0 4px 0",margin:"0 0 12px 0",borderTop:"1px solid #E4EBF6"},children:(0,M.jsxs)("div",{style:{textAlign:"center"},children:[(0,M.jsx)("p",{style:{fontSize:"14px",fontWeight:"700",color:"#1D1D1D",margin:"0",fontFamily:"Roboto, sans-serif"},children:Cl||0}),(0,M.jsx)("p",{style:{fontSize:"11px",color:"#9CA3AF",margin:"2px 0 0 0",fontFamily:"Roboto, sans-serif"},children:1===Cl?v("community.library.member","Member"):v("community.library.members","Members")})]})}),(0,M.jsx)(m.A,{onClick:()=>{Cs(!1),ws(!0)},variant:"contained",startIcon:(0,M.jsx)(f.C70,{}),style:{width:"100%",padding:"8px 24px",borderRadius:"8px",border:"none",color:"#fff",fontSize:"13px",fontWeight:"600",textTransform:"none",fontFamily:"Roboto, sans-serif",background:k()||"var(--brand-color)",boxShadow:"none"},children:v("community.share")})]})}):"library"===gt?(0,M.jsx)(rt.default,{...t,libraryItems:dd,setLibraryItems:cd,tabId:ns}):"_disabled_old_library_"===gt?(0,M.jsx)(s.Ay,{item:!0,xs:12,style:{height:"auto",margin:"0px 0px 0px 0px"},children:Ss||As||Ds||Ts||Ws||Ms||pa||ha||fa?(0,M.jsxs)("div",{children:[(0,M.jsxs)("div",{onClick:()=>{ks(null),Fs(!1),zs(null),Es(!1),Rs(null),Is(!1),ua(null),ga(null),ya(null)},style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 0",cursor:"pointer",marginBottom:"20px"},children:[(0,M.jsx)("span",{style:{fontSize:"18px",color:"#6B7280"},children:"\u2190"}),(0,M.jsx)("span",{style:{fontSize:"14px",fontWeight:600,color:"#6B7280",fontFamily:"Roboto, sans-serif"},children:v("community.library.backToLibrary","Back to Library")})]}),As||Ts||Ms?(0,M.jsx)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"40px",textAlign:"center"},children:(0,M.jsx)(He.A,{size:24})}):Ss?(0,M.jsx)("div",{style:{maxWidth:t.windowWidth<=600?"100%":"600px",width:"100%",margin:"0 auto",padding:"0px"},children:(0,M.jsx)(We.A,{...t,...Ss,windowWidth:t.windowWidth,is_me:!1,influencer:t.influencer,current_user:t.current_user,currency:t.currency,view_type:t.view_type,display_name:t.display_name},`library-product-${Ss.id}`)}):Ws?(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",width:t.windowWidth<=600?"100%":"600px",maxWidth:t.windowWidth<=600?"100%":"600px",minWidth:t.windowWidth>1500?"600px":"auto",margin:"0 auto"},children:[(null===Ws||void 0===Ws?void 0:Ws.name)&&(0,M.jsx)(l.A,{style:{fontSize:"20px",fontWeight:700,color:"#1D1D1D",marginBottom:"14px"},children:Ws.name}),(0,M.jsxs)("div",{style:{marginBottom:"18px"},children:[(0,M.jsx)(lt.A,{designProperties:t.designProperties,is_me:t.is_me,windowWidth:t.windowWidth,anchorEl:da.anchorEl,setState:e=>ca(t=>({...t,...e})),content_menu_open:da.content_menu_open,category_menu_open:da.category_menu_open,tier_menu_open:da.tier_menu_open,sort_menu_open:da.sort_menu_open,content_filter:Js,category_filter:Qs,tier_filter:Ps,sort_filter:ta,content_types:ra,categories:fl,sort_options:yl,tierOptions:bl,selected_tab:"sub_posts",onSelectContentType:e=>{ca(e=>({...e,content_menu_open:!1})),gl("content",e)},onSelectCategory:e=>{ca(e=>({...e,category_menu_open:!1})),gl("category",e)},onSelectTier:e=>{ca(e=>({...e,tier_menu_open:!1})),Bs(e),Us([]),Hs(0),Ys(0),Ns(1),Zs(!0),Is(!0),ul(e,1)},onSelectSort:e=>{ca(e=>({...e,sort_menu_open:!1})),gl("sort",e)}}),(0,M.jsx)(a.A,{sx:{justifyContent:"center",margin:"24px auto 20px 0px"},children:(0,M.jsx)(dt.A,{...t,is_me:t.is_me,influencer_username:t.influencer,influencer_display_name:t.display_name||t.influencer,type:"sub_posts",search_func:_l,search_func_collection:()=>{}})})]}),(()=>{const e=Math.ceil($s/20),o=(Os||[]).filter(e=>{if(!ia)return!0;const t=ia.toLowerCase(),o=(e.name||e.community_post_title||"").toLowerCase(),i=(e.description||e.content_text||"").replace(/<[^>]*>/g,"").toLowerCase();return o.includes(t)||i.includes(t)});return 0!==o.length||Gs?(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",width:t.windowWidth<=600?"100%":"600px",maxWidth:t.windowWidth<=600?"100%":"600px",minWidth:t.windowWidth>1500?"600px":"auto",margin:"0 auto"},children:[e>1&&(0,M.jsx)(s.Ay,{container:!0,alignItems:"center",justifyContent:"center",style:{marginTop:"20px",marginBottom:"20px"},children:(0,M.jsx)(bt,{count:e,page:Ls,onChange:(e,t)=>
1{ml(t),window.scrollTo({top:0,behavior:"smooth"})}})}),(0,M.jsx)(Ye.A,{dataLength:o.length,next:xl,hasMore:Gs,loader:(0,M.jsx)("div",{style:{textAlign:"center",padding:"20px"},children:(0,M.jsx)(He.A,{size:24})}),children:o.map(e=>(0,M.jsx)("div",{id:`membership-content-${e.id}`,style:{paddingBottom:"30px",width:t.windowWidth<=600?"100%":"600px",maxWidth:t.windowWidth<=600?"100%":"600px",minWidth:t.windowWidth>1500?"600px":"auto",margin:"0px auto"},children:(0,M.jsx)(We.A,{...t,...e,windowWidth:t.windowWidth,is_me:!1,influencer:t.influencer,current_user:t.current_user,currency:t.currency,view_type:t.view_type,display_name:t.display_name})},`membership-content-${e.id}`))})]}):(0,M.jsx)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"40px",textAlign:"center"},children:(0,M.jsx)("p",{style:{fontSize:"14px",color:"#9CA3AF"},children:v("community.library.noContent","No content available")})})})()]}):pa?(0,M.jsx)(ct.default,{...t,display_name:t.display_name,current_user:t.current_user,current_user_icon:t.current_user_icon,username:t.current_user,is_me:t.is_me,influencer:t.influencer,asyncActive:t.subscribe_popup_async_active,influencer_tiers:t.influencer_tiers,active_influencer_tiers:[...t.active_influencer_tiers||[],...t.subscribe_popup_async_active&&t.subscribe_popup_async_name?[t.subscribe_popup_async_name]:[]],influencer_info:t.influencer_info,currency:t.currency,selectedMemberTabOverwrite:t.selectedMemberTabOverwrite,post_id:t.post_id,async_apply:t.async_apply,windowWidth:t.windowWidth,setState:t.setState,scroll:!1,current_tier:t.is_me?4:t.subscribe_popup_current_tier,async_tier_access:!!t.is_me||t.async_tier_access,hide_offering_card:!0}):fa?(0,M.jsx)(pt.default,{...t,current_user:t.current_user,display_name:t.display_name,current_user_icon:t.current_user_icon,username:t.current_user,is_me:t.is_me,influencer:t.influencer,influencer_info:t.influencer_info,currency:t.currency,post_id:t.post_id,dm_active:t.dm_active,dmSettingsId:null===fa||void 0===fa?void 0:fa.id,windowWidth:Math.max(window.innerWidth,1280),activeProductData:t.activeProductData,setState:t.setState,setMaxMessageLength:()=>{},maxMessageLength:1e4,updateHasMessage:()=>{},isLibraryView:!0}):ha?(0,M.jsx)(e,{...t,display_name:t.display_name,current_user:t.current_user,current_user_icon:t.current_user_icon,username:t.current_user,is_me:t.is_me,influencer:t.influencer,influencer_tiers:t.influencer_tiers,active_influencer_tiers:t.active_influencer_tiers,influencer_info:t.influencer_info,currency:t.currency,current_tier:t.subscribe_popup_current_tier,post_id:t.post_id,tab_id:null===ha||void 0===ha?void 0:ha.id,hide_tab_switcher:!0,view_type:t.view_type,setState:t.setState,windowWidth:t.windowWidth,theme:t.theme}):Ds?(0,M.jsxs)("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",flexWrap:"wrap"},children:[Ds.chapters&&Ds.chapters.length>0&&!(!0===t.is_me&&t.windowWidth<=1424||!1===t.is_me&&t.windowWidth<=1100)&&(0,M.jsx)("div",{style:{position:"absolute",left:"0",top:"0",width:"25%",maxWidth:"250px",height:"fit-content",maxHeight:"calc(100vh - 100px)",overflowY:"auto",paddingRight:"20px",zIndex:1},children:(0,M.jsxs)("div",{style:{backgroundColor:"#fff",borderRadius:"10px",border:"1px solid #E4EBF6",padding:"20px",boxShadow:"0 2px 8px rgba(0,0,0,0.04)",position:"sticky",top:"80px"},children:[(0,M.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px",paddingBottom:"12px",borderBottom:"1px solid #E4EBF6"},children:(0,M.jsx)("span",{style:{fontSize:"16px",fontWeight:600,color:"#1D1D1D"},children:v("community.library.chapters","Chapters")})}),(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[Ds.chapters.map(e=>{const t=Ga===e.chapter_name;return(0,M.jsx)("div",{onClick:()=>{var t;Za(e.chapter_name),qa([]),nl(!0),ll((null===Ds||void 0===Ds||null===(t=Ds.course)||void 0===t?void 0:t.name)||"",e.chapter_name,1)},style:{padding:"10px 12px",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s ease",backgroundColor:t?"#E6EDFB":"transparent",border:t?"1px solid var(--brand-color, #2563EB)":"1px solid transparent",display:"flex",alignItems:"center",gap:"8px"},children:(0,M.jsx)("span",{style:{fontSize:"14px",fontWeight:t?600:500,color:t?"var(--brand-color, #2563EB)":"#1D1D1D",textTransform:"capitalize"},children:e.chapter_name})},e.id)}),Ds.chapter_content._uncategorised_&&Ds.chapter_content._uncategorised_.length>0&&(0,M.jsx)("div",{onClick:()=>{var e;Za("_uncategorised_"),qa([]),nl(!0),ll((null===Ds||void 0===Ds||null===(e=Ds.course)||void 0===e?void 0:e.name)||"","_uncategorised_",1)},style:{padding:"10px 12px",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s ease",backgroundColor:"_uncategorised_"===Ga?"#E6EDFB":"transparent",border:"_uncategorised_"===Ga?"1px solid var(--brand-color, #2563EB)":"1px solid transparent"},children:(0,M.jsx)("span",{style:{fontSize:"14px",fontWeight:"_uncategorised_"===Ga?600:500,color:"_uncategorised_"===Ga?"var(--brand-color, #2563EB)":"#1D1D1D"},children:v("community.library.other","Other")})})]})]})}),Ds.chapters&&Ds.chapters.length>0&&(!0===t.is_me&&t.windowWidth<=1424||!1===t.is_me&&t.windowWidth<=1100)&&(0,M.jsxs)("div",{style:{width:"100%",maxWidth:"600px",margin:"0 auto 20px auto",padding:"0 12px",boxSizing:"border-box"},children:[(0,M.jsx)("p",{style:{fontSize:"16px",fontWeight:600,color:"#1D1D1D",marginBottom:"12px"},children:v("community.library.chapters","Chapters")}),(0,M.jsx)(d.A,{fullWidth:!0,sx:{minWidth:0},children:(0,M.jsxs)(c.A,{value:Ga||"",onChange:e=>{var t;const o=e.target.value;Za(o),qa([]),nl(!0),ll((null===Ds||void 0===Ds||null===(t=Ds.course)||void 0===t?void 0:t.name)||"",o,1)},sx:{height:"42px",borderRadius:"8px",fontSize:{xs:"13px",sm:"14px"},fontWeight:500,textTransform:"capitalize",backgroundColor:"#fff","& .MuiSelect-select":{padding:{xs:"10px 32px 10px 12px",sm:"10px 32px 10px 14px"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#E4EBF6"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"var(--brand-color)"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"var(--brand-color)",borderWidth:"1px"}},MenuProps:{PaperProps:{sx:{maxHeight:"300px",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",maxWidth:"calc(100vw - 24px)"}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},children:[Ds.chapters.map(e=>(0,M.jsx)(p.A,{value:e.chapter_name,children:e.chapter_name}
1,e.id)),Ds.chapter_content._uncategorised_&&Ds.chapter_content._uncategorised_.length>0&&(0,M.jsx)(p.A,{value:"_uncategorised_",children:v("community.library.other","Other")})]})})]}),(()=>{const e=Math.ceil(Qa/20);return 0!==Ja.length||il?(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",width:t.windowWidth<=600?"100%":"600px",maxWidth:t.windowWidth<=600?"100%":"600px",minWidth:t.windowWidth>1500?"600px":"auto",margin:"0 auto"},children:[e>1&&(0,M.jsx)(s.Ay,{container:!0,alignItems:"center",justifyContent:"center",style:{marginTop:"20px",marginBottom:"20px"},children:(0,M.jsx)(bt,{count:e,page:Xa,onChange:(e,t)=>{cl(t),window.scrollTo({top:0,behavior:"smooth"})}})}),(0,M.jsx)(Ye.A,{dataLength:Ja.length,next:dl,hasMore:il,loader:(0,M.jsx)("div",{style:{textAlign:"center",padding:"20px"},children:(0,M.jsx)(He.A,{size:24})}),children:Ja.map(e=>(0,M.jsx)("div",{style:{paddingBottom:"30px",width:t.windowWidth<=600?"100%":"600px",maxWidth:t.windowWidth<=600?"100%":"600px",minWidth:t.windowWidth>1500?"600px":"auto",margin:"0px auto"},children:(0,M.jsx)(We.A,{...t,...e,windowWidth:t.windowWidth,is_me:!1,influencer:t.influencer,current_user:t.current_user,currency:t.currency,view_type:t.view_type,display_name:t.display_name})},`course-content-${e.id}`))}),e>1&&(0,M.jsx)(s.Ay,{container:!0,alignItems:"center",justifyContent:"center",style:{marginTop:"20px"},children:(0,M.jsx)(bt,{count:e,page:Xa,onChange:(e,t)=>
1{cl(t),window.scrollTo({top:0,behavior:"smooth"})}})})]}):(0,M.jsx)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"40px",textAlign:"center"},children:(0,M.jsx)("p",{style:{fontSize:"14px",color:"#9CA3AF"},children:v("community.library.noContent","No content in this chapter")})})})()]}):null]}):0===dd.length?(0,M.jsx)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"24px"},children:(0,M.jsx)("p",{style:{fontSize:"14px",color:"#9CA3AF",textAlign:"center",padding:"20px 0"},children:v("community.noLibraryItems")})}):(()=>{const e=dd.reduce((e,t)=>((e[t.type]=e[t.type]||[]).push(t),e),{}),o={membership:{icon:(0,M.jsx)(f.Ly4,{size:20}),label:v("community.library.memberships","Memberships"),bg:"#DBEAFE",color:"#1E40AF"},coaching:{icon:(0,M.jsx)(f.gq0,{size:20}),label:v("community.library.coaching","1:1 Coaching"),bg:"#FCE7F3",color:"#9D174D"},coaching_call:{icon:(0,M.jsx)(f.Pts,{size:20}),label:v("community.library.coachingCalls","Coaching calls"),bg:"#E0E7FF",color:"#3730A3"},webinar:{icon:(0,M.jsx)(f.Pts,{size:20}),label:v("community.library.webinars","Webinars"),bg:"#E0E7FF",color:"#3730A3"},course:{icon:(0,M.jsx)(f.XMY,{size:20}),label:v("community.library.courses","Courses"),bg:"#FEF3C7",color:"#92400E"},digital_product:{icon:(0,M.jsx)(f.BKg,{size:20}),label:v("community.library.digitalProducts","Digital products"),bg:"#EDE9FE",color:"#5B21B6"},community:{icon:(0,M.jsx)(f.ajf,{size:20}),label:v("community.library.communities","Communities"),bg:"#D1FAE5",color:"#065F46"},messages:{icon:(0,M.jsx)(f.Ine,{size:20}),label:v("community.library.customProducts","Custom products"),bg:"#FFEDD5",color:"#9A3412"},url:{icon:(0,M.jsx)(f.bw7,{size:20}),label:v("community.library.outsideUrls","Outside URLs"),bg:"#E0F2FE",color:"#0369A1"}},n=Math.min(3,Math.max(1,Math.floor((t.windowWidth-32)/172)));return Object.entries(e).map(e=>{var r,s,a;let[l,d]=e;const c=kd[l],p=c?d:d.slice(0,n);return(0,M.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,M.jsx)("span",{style:{fontSize:"18px",display:"flex",color:(null===(r=o[l])||void 0===r?void 0:r.color)||"#374151"},children:null===(s=o[l])||void 0===s?void 0:s.icon}),(0,M.jsx)("span",{style:{fontSize:"15px",fontWeight:700,color:"#1D1D1D",fontFamily:"Roboto, sans-serif"},children:(null===(a=o[l])||void 0===a?void 0:a.label)||l}),(0,M.jsx)("span",{style:{fontSize:"13px",color:"#9CA3AF",fontWeight:500},children:d.length})]}),d.length>n&&(0,M.jsx)("span",{onClick:e=>{e.stopPropagation(),Ad(e=>({...e,[l]:!e[l]}))},style:{fontSize:"13px",fontWeight:600,color:"var(--brand-color)",cursor:"pointer",fontFamily:"Roboto, sans-serif"},children:c?v("community.library.hide","Hide"):`${v("community.library.viewAll","View all")} \u2192`})]}),(0,M.jsx)("div",{style:{display:"grid",gridTemplateColumns:`repeat(${n}, 1fr)`,gap:"12px"},children:p.map(e=>{var n,r,s,a;return(0,M.jsxs)("div",{onClick:()=>{"digital_product"===e.type?(al(e.id),window.scrollTo({top:0,behavior:"instant"})):"course"===e.type?(pl(e.id),window.scrollTo({top:0,behavior:"instant"})):"community"===e.type?wl(e):"membership"===e.type?hl(e):"coaching"===e.type?(vl(e),window.scrollTo({top:0,behavior:"instant"})):"coaching_call"===e.type||"webinar"===e.type?e.url?window.open(e.url,"_blank"):window.location.assign(`/${t.influencer}?open_url_product=true&product_id=${e.id}`):"messages"===e.type?jl(e):"url"===e.type&&(e.url?window.open(e.url,"_blank"):window.location.assign(`/${t.influencer}?open_url_product=true&product_id=${e.id}`))},style:{backgroundColor:"#fff",borderRadius:"12px",border:"1px solid #E4EBF6",cursor:"pointer",transition:"all 0.2s",overflow:"hidden"},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 4px 12px rgba(0,0,0,0.08)",e.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.transform="none"},children:[(0,M.jsxs)("div",{style:{width:"100%",aspectRatio:"16/9",backgroundColor:"#F3F4F6",position:"relative",overflow:"hidden"},children:[(0,M.jsx)("img",{src:e.thumbnail||"data:,",alt:"",style:{width:"100%",height:"100%",objectFit:"cover",display:e.thumbnail?"block":"none",position:"relative",zIndex:1},onError:e=>{e.target.style.display="none"},onLoad:e=>
1{0===e.target.naturalWidth&&(e.target.style.display="none")}}),(0,M.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:(null===(n=o[e.type])||void 0===n?void 0:n.bg)||"#F3F4F6",position:"absolute",top:0,left:0},children:(0,M.jsx)("span",{style:{color:(null===(r=o[e.type])||void 0===r?void 0:r.color)||"#374151"},children:i.cloneElement((null===(s=o[e.type])||void 0===s?void 0:s.icon)||(0,M.jsx)(f.BKg,{size:36}),{size:36})})}),"course"===e.type&&(e.n_modules>0||e.n_lessons>0)&&(0,M.jsxs)("div",{style:{position:"absolute",bottom:"6px",left:"6px",right:"6px",display:"flex",gap:"4px"},children:[e.n_modules>0&&(0,M.jsxs)("span",{style:{backgroundColor:"rgba(0,0,0,0.6)",color:"#fff",fontSize:"10px",fontWeight:600,padding:"2px 6px",borderRadius:"4px"},children:[e.n_modules," ",1===e.n_modules?"chapter":"chapters"]}),e.n_lessons>0&&(0,M.jsxs)("span",{style:{backgroundColor:"rgba(0,0,0,0.6)",color:"#fff",fontSize:"10px",fontWeight:600,padding:"2px 6px",borderRadius:"4px"},children:[e.n_lessons," ",1===e.n_lessons?"post":"posts"]})]}),"digital_product"===e.type&&e.content_type&&(0,M.jsx)("span",{style:{position:"absolute",top:"6px",left:"6px",backgroundColor:"rgba(0,0,0,0.6)",color:"#fff",fontSize:"10px",fontWeight:600,padding:"2px 8px",borderRadius:"4px"},children:(a=e.content_type,{vid:"Video",aud:"Audio",img:"Image",pdf:"PDF",bnd:"Bundle",txt:"Text"}[a]||"")})]}),(0,M.jsxs)("div",{style:{padding:"12px 14px"},children:[(0,M.jsx)("p",{style:{fontSize:"13px",fontWeight:700,color:"#1D1D1D",margin:"0 0 4px 0",fontFamily:"Roboto, sans-serif",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",lineHeight:1.3},children:e.name}),e.description&&(0,M.jsx)("p",{style:{fontSize:"11px",color:"#6B7280",margin:0,fontFamily:"Roboto, sans-serif",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical"},children:e.description.replace(/<[^>]*>/g,"")})]})]},`${e.type}-${e.id}`)})})]},l)})})()}):""}),t.windowWidth>=1280?(0,M.jsx)("div",{style:{filter:"none",maxHeight:"",minHeight:"",overflow:"",pointerEvents:"auto",userSelect:"text"},children:(0,M.jsxs)(Ie.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.6,ease:"easeOut"},style:{display:"flex",height:"100%",width:"100%",position:"relative",gap:"40px",maxWidth:"1200px",margin:"0 auto",flexDirection:"row",padding:(t.windowWidth,"10px 0px 40px 0px"),boxSizing:"border-box",minHeight:"600px"},children:[(0,M.jsx)("div",{style:{flex:"2",display:"flex",flexDirection:"column",gap:"24px",minWidth:0,overflow:"hidden"},children:"library"===gt?(0,M.jsx)(rt.default,{...t,libraryItems:dd,setLibraryItems:cd,tabId:ns}):"_disabled_old_library_mobile_"===gt?(0,M.jsx)("div",{style:{padding:"0"},children:Ss||As||Ds||Ts||Ws||Ms||pa||ha||fa?(0,M.jsxs)("div",{children:[(0,M.jsxs)("div",{onClick:()=>{ks(null),Fs(!1),zs(null),Es(!1),Rs(null),Is(!1),ua(null),ga(null),ya(null)},style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 0",cursor:"pointer",marginBottom:"20px"},children:[(0,M.jsx)("span",{style:{fontSize:"18px",color:"#6B7280"},children:"\u2190"}),(0,M.jsx)("span",{style:{fontSize:"14px",fontWeight:600,color:"#6B7280",fontFamily:"Roboto, sans-serif"},children:v("community.library.backToLibrary","Back to Library")})]}),As||Ts||Ms?(0,M.jsx)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"40px",textAlign:"center"},children:(0,M.jsx)(He.A,{size:24})}):Ss?(0,M.jsx)("div",{style:{maxWidth:t.windowWidth<=600?"100%":"600px",width:"100%",margin:"0 auto",padding:"0px"},children:(0,M.jsx)(We.A,{...t,...Ss,windowWidth:t.windowWidth,is_me:!1,influencer:t.influencer,current_user:t.current_user,currency:t.currency,view_type:t.view_type,display_name:t.display_name},`library-product-${Ss.id}`)}):Ws?(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",width:t.windowWidth<=600?"100%":"600px",maxWidth:t.windowWidth<=600?"100%":"600px",minWidth:t.windowWidth>1500?"600px":"auto",margin:"0 auto"},children:[(null===Ws||void 0===Ws?void 0:Ws.name)&&(0,M.jsx)(l.A,{style:{fontSize:"20px",fontWeight:700,color:"#1D1D1D",marginBottom:"14px"},children:Ws.name}),(0,M.jsxs)("div",{style:{marginBottom:"18px"},children:[(0,M.jsx)(lt.A,{designProperties:t.designProperties,is_me:t.is_me,windowWidth:t.windowWidth,anchorEl:da.anchorEl,setState:e=>ca(t=>({...t,...e})),content_menu_open:da.content_menu_open,category_menu_open:da.category_menu_open,tier_menu_open:da.tier_menu_open,sort_menu_open:da.sort_menu_open,c
1ontent_filter:Js,category_filter:Qs,tier_filter:Ps,sort_filter:ta,content_types:ra,categories:fl,sort_options:yl,tierOptions:bl,selected_tab:"sub_posts",onSelectContentType:e=>{ca(e=>({...e,content_menu_open:!1})),gl("content",e)},onSelectCategory:e=>{ca(e=>({...e,category_menu_open:!1})),gl("category",e)},onSelectTier:e=>{ca(e=>({...e,tier_menu_open:!1})),Bs(e),Us([]),Hs(0),Ys(0),Ns(1),Zs(!0),Is(!0),ul(e,1)},onSelectSort:e=>{ca(e=>({...e,sort_menu_open:!1})),gl("sort",e)}}),(0,M.jsx)(a.A,{sx:{justifyContent:"center",margin:"24px auto 20px 0px"},children:(0,M.jsx)(dt.A,{...t,is_me:t.is_me,influencer_username:t.influencer,influencer_display_name:t.display_name||t.influencer,type:"sub_posts",search_func:_l,search_func_collection:()=>{}})})]}),(()=>{const e=Math.ceil($s/20),o=(Os||[]).filter(e=>{if(!ia)return!0;const t=ia.toLowerCase(),o=(e.name||e.community_post_title||"").toLowerCase(),i=(e.description||e.content_text||"").replace(/<[^>]*>/g,"").toLowerCase();return o.includes(t)||i.includes(t)});return 0!==o.length||Gs?(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",width:t.windowWidth<=600?"100%":"600px",maxWidth:t.windowWidth<=600?"100%":"600px",minWidth:t.windowWidth>1500?"600px":"auto",margin:"0 auto"},children:[e>1&&(0,M.jsx)(s.Ay,{container:!0,alignItems:"center",justifyContent:"center",style:{marginTop:"20px",marginBottom:"20px"},children:(0,M.jsx)(bt,{count:e,page:Ls,onChange:(e,t)=>
1{ml(t),window.scrollTo({top:0,behavior:"smooth"})}})}),(0,M.jsx)(Ye.A,{dataLength:o.length,next:xl,hasMore:Gs,loader:(0,M.jsx)("div",{style:{textAlign:"center",padding:"20px"},children:(0,M.jsx)(He.A,{size:24})}),children:o.map(e=>(0,M.jsx)("div",{id:`membership-content-${e.id}`,style:{paddingBottom:"30px",width:t.windowWidth<=600?"100%":"600px",maxWidth:t.windowWidth<=600?"100%":"600px",minWidth:t.windowWidth>1500?"600px":"auto",margin:"0px auto"},children:(0,M.jsx)(We.A,{...t,...e,windowWidth:t.windowWidth,is_me:!1,influencer:t.influencer,current_user:t.current_user,currency:t.currency,view_type:t.view_type,display_name:t.display_name})},`membership-content-${e.id}`))})]}):(0,M.jsx)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"40px",textAlign:"center"},children:(0,M.jsx)("p",{style:{fontSize:"14px",color:"#9CA3AF"},children:v("community.library.noContent","No content available")})})})()]}):pa?(0,M.jsx)(ct.default,{...t,display_name:t.display_name,current_user:t.current_user,current_user_icon:t.current_user_icon,username:t.current_user,is_me:t.is_me,influencer:t.influencer,asyncActive:t.subscribe_popup_async_active,influencer_tiers:t.influencer_tiers,active_influencer_tiers:[...t.active_influencer_tiers||[],...t.subscribe_popup_async_active&&t.subscribe_popup_async_name?[t.subscribe_popup_async_name]:[]],influencer_info:t.influencer_info,currency:t.currency,selectedMemberTabOverwrite:t.selectedMemberTabOverwrite,post_id:t.post_id,async_apply:t.async_apply,windowWidth:t.windowWidth,setState:t.setState,scroll:!1,current_tier:t.is_me?4:t.subscribe_popup_current_tier,async_tier_access:!!t.is_me||t.async_tier_access,hide_offering_card:!0}):fa?(0,M.jsx)(pt.default,{...t,current_user:t.current_user,display_name:t.display_name,current_user_icon:t.current_user_icon,username:t.current_user,is_me:t.is_me,influencer:t.influencer,influencer_info:t.influencer_info,currency:t.currency,post_id:t.post_id,dm_active:t.dm_active,dmSettingsId:null===fa||void 0===fa?void 0:fa.id,windowWidth:Math.max(window.innerWidth,1280),activeProductData:t.activeProductData,setState:t.setState,setMaxMessageLength:()=>{},maxMessageLength:1e4,updateHasMessage:()=>{},isLibraryView:!0}):ha?(0,M.jsx)(e,{...t,display_name:t.display_name,current_user:t.current_user,current_user_icon:t.current_user_icon,username:t.current_user,is_me:t.is_me,influencer:t.influencer,influencer_tiers:t.influencer_tiers,active_influencer_tiers:t.active_influencer_tiers,influencer_info:t.influencer_info,currency:t.currency,current_tier:t.subscribe_popup_current_tier,post_id:t.post_id,tab_id:null===ha||void 0===ha?void 0:ha.id,hide_tab_switcher:!0,view_type:t.view_type,setState:t.setState,windowWidth:t.windowWidth,theme:t.theme}):Ds?(0,M.jsxs)("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center",flexWrap:"wrap"},children:[Ds.chapters&&Ds.chapters.length>0&&!(!0===t.is_me&&t.windowWidth<=1424||!1===t.is_me&&t.windowWidth<=1100)&&(0,M.jsx)("div",{style:{position:"absolute",left:"0",top:"0",width:"25%",maxWidth:"250px",height:"fit-content",maxHeight:"calc(100vh - 100px)",overflowY:"auto",paddingRight:"20px",zIndex:1},children:(0,M.jsxs)("div",{style:{backgroundColor:"#fff",borderRadius:"10px",border:"1px solid #E4EBF6",padding:"20px",boxShadow:"0 2px 8px rgba(0,0,0,0.04)",position:"sticky",top:"80px"},children:[(0,M.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px",paddingBottom:"12px",borderBottom:"1px solid #E4EBF6"},children:(0,M.jsx)("span",{style:{fontSize:"16px",fontWeight:600,color:"#1D1D1D"},children:v("community.library.chapters","Chapters")})}),(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[Ds.chapters.map(e=>{const t=Ga===e.chapter_name;return(0,M.jsx)("div",{onClick:()=>{var t;Za(e.chapter_name),qa([]),nl(!0),ll((null===Ds||void 0===Ds||null===(t=Ds.course)||void 0===t?void 0:t.name)||"",e.chapter_name,1)},style:{padding:"10px 12px",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s ease",backgroundColor:t?"#E6EDFB":"transparent",border:t?"1px solid var(--brand-color, #2563EB)":"1px solid transparent",display:"flex",alignItems:"center",gap:"8px"},children:(0,M.jsx)("span",{style:{fontSize:"14px",fontWeight:t?600:500,color:t?"var(--brand-color, #2563EB)":"#1D1D1D",textTransform:"capitalize"},children:e.chapter_name})},e.id)}),Ds.chapter_content._uncategorised_&&Ds.chapter_content._uncategorised_.length>0&&(0,M.jsx)("div",{onClick:()=>{var e;Za("_uncategorised_"),qa([]),nl(!0),ll((null===Ds||void 0===Ds||null===(e=Ds.course)||void 0===e?void 0:e.name)||"","_uncategorised_",1)},style:{padding:"10px 12px",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s ease",backgroundColor:"_uncategorised_"===Ga?"#E6EDFB":"transparent",border:"_uncategorised_"===Ga?"1px solid var(--brand-color, #2563EB)":"1px solid transparent"},children:(0,M.jsx)("span",{style:{fontSize:"14px",fontWeight:"_uncategorised_"===Ga?600:500,color:"_uncategorised_"===Ga?"var(--brand-color, #2563EB)":"#1D1D1D"},children:v("community.library.other","Other")})})]})]})}),Ds.chapters&&Ds.chapters.length>0&&(!0===t.is_me&&t.windowWidth<=1424||!1===t.is_me&&t.windowWidth<=1100)&&(0,M.jsxs)("div",{style:{width:"100%",maxWidth:"600px",margin:"0 auto 20px auto",padding:"0 12px",boxSizing:"border-box"},children:[(0,M.jsx)("p",{style:{fontSize:"16px",fontWeight:600,color:"#1D1D1D",marginBottom:"12px"},children:v("community.library.chapters","Chapters")}),(0,M.jsx)(d.A,{fullWidth:!0,sx:{minWidth:0},children:(0,M.jsxs)(c.A,{value:Ga||"",onChange:e=>{var t;const o=e.target.value;Za(o),qa([]),nl(!0),ll((null===Ds||void 0===Ds||null===(t=Ds.course)||void 0===t?void 0:t.name)||"",o,1)},sx:{height:"42px",borderRadius:"8px",fontSize:{xs:"13px",sm:"14px"},fontWeight:500,textTransform:"capitalize",backgroundColor:"#fff","& .MuiSelect-select":{padding:{xs:"10px 32px 10px 12px",sm:"10px 32px 10px 14px"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#E4EBF6"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"var(--brand-color)"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"var(--brand-color)",borderWidth:"1px"}},MenuProps:{PaperProps:{sx:{maxHeight:"300px",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",maxWidth:"calc(100vw - 24px)"}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},children:[Ds.chapters.map(e=>(0,M.jsx)(p.A,{value:e.chapter_name,children:e.chapter_name}
1,e.id)),Ds.chapter_content._uncategorised_&&Ds.chapter_content._uncategorised_.length>0&&(0,M.jsx)(p.A,{value:"_uncategorised_",children:v("community.library.other","Other")})]})})]}),(()=>{const e=Math.ceil(Qa/20);return 0!==Ja.length||il?(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",width:t.windowWidth<=600?"100%":"600px",maxWidth:t.windowWidth<=600?"100%":"600px",minWidth:t.windowWidth>1500?"600px":"auto",margin:"0 auto"},children:[e>1&&(0,M.jsx)(s.Ay,{container:!0,alignItems:"center",justifyContent:"center",style:{marginTop:"20px",marginBottom:"20px"},children:(0,M.jsx)(bt,{count:e,page:Xa,onChange:(e,t)=>{cl(t),window.scrollTo({top:0,behavior:"smooth"})}})}),(0,M.jsx)(Ye.A,{dataLength:Ja.length,next:dl,hasMore:il,loader:(0,M.jsx)("div",{style:{textAlign:"center",padding:"20px"},children:(0,M.jsx)(He.A,{size:24})}),children:Ja.map(e=>(0,M.jsx)("div",{style:{paddingBottom:"30px",width:t.windowWidth<=600?"100%":"600px",maxWidth:t.windowWidth<=600?"100%":"600px",minWidth:t.windowWidth>1500?"600px":"auto",margin:"0px auto"},children:(0,M.jsx)(We.A,{...t,...e,windowWidth:t.windowWidth,is_me:!1,influencer:t.influencer,current_user:t.current_user,currency:t.currency,view_type:t.view_type,display_name:t.display_name})},`course-content-${e.id}`))}),e>1&&(0,M.jsx)(s.Ay,{container:!0,alignItems:"center",justifyContent:"center",style:{marginTop:"20px"},children:(0,M.jsx)(bt,{count:e,page:Xa,onChange:(e,t)=>
1{cl(t),window.scrollTo({top:0,behavior:"smooth"})}})})]}):(0,M.jsx)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"40px",textAlign:"center"},children:(0,M.jsx)("p",{style:{fontSize:"14px",color:"#9CA3AF"},children:v("community.library.noContent","No content in this chapter")})})})()]}):null]}):0===dd.length?(0,M.jsx)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"24px"},children:(0,M.jsx)("p",{style:{fontSize:"14px",color:"#9CA3AF",textAlign:"center",padding:"20px 0"},children:v("community.noLibraryItems")})}):(()=>{const e=dd.reduce((e,t)=>((e[t.type]=e[t.type]||[]).push(t),e),{}),o={membership:{icon:(0,M.jsx)(f.Ly4,{size:20}),label:v("community.library.memberships","Memberships"),bg:"#DBEAFE",color:"#1E40AF"},coaching:{icon:(0,M.jsx)(f.gq0,{size:20}),label:v("community.library.coaching","1:1 Coaching"),bg:"#FCE7F3",color:"#9D174D"},coaching_call:{icon:(0,M.jsx)(f.Pts,{size:20}),label:v("community.library.coachingCalls","Coaching calls"),bg:"#E0E7FF",color:"#3730A3"},webinar:{icon:(0,M.jsx)(f.Pts,{size:20}),label:v("community.library.webinars","Webinars"),bg:"#E0E7FF",color:"#3730A3"},course:{icon:(0,M.jsx)(f.XMY,{size:20}),label:v("community.library.courses","Courses"),bg:"#FEF3C7",color:"#92400E"},digital_product:{icon:(0,M.jsx)(f.BKg,{size:20}),label:v("community.library.digitalProducts","Digital products"),bg:"#EDE9FE",color:"#5B21B6"},community:{icon:(0,M.jsx)(f.ajf,{size:20}),label:v("community.library.communities","Communities"),bg:"#D1FAE5",color:"#065F46"},messages:{icon:(0,M.jsx)(f.Ine,{size:20}),label:v("community.library.customProducts","Custom products"),bg:"#FFEDD5",color:"#9A3412"},url:{icon:(0,M.jsx)(f.bw7,{size:20}),label:v("community.library.outsideUrls","Outside URLs"),bg:"#E0F2FE",color:"#0369A1"}};return Object.entries(e).map(e=>{var n,r,s;let[a,l]=e;const d=kd[a],c=d?l:l.slice(0,3);return(0,M.jsxs)("div",{style:{marginBottom:"28px"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"14px"},children:[(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,M.jsx)("span",{style:{fontSize:"18px",display:"flex",color:(null===(n=o[a])||void 0===n?void 0:n.color)||"#374151"},children:null===(r=o[a])||void 0===r?void 0:r.icon}),(0,M.jsx)("span",{style:{fontSize:"16px",fontWeight:700,color:"#1D1D1D",fontFamily:"Roboto, sans-serif"},children:(null===(s=o[a])||void 0===s?void 0:s.label)||a}),(0,M.jsx)("span",{style:{fontSize:"14px",color:"#9CA3AF",fontWeight:500},children:l.length})]}),l.length>3&&(0,M.jsx)("span",{onClick:e=>{e.stopPropagation(),Ad(e=>({...e,[a]:!e[a]}))},style:{fontSize:"13px",fontWeight:600,color:"var(--brand-color)",cursor:"pointer",fontFamily:"Roboto, sans-serif"},children:d?v("community.library.hide","Hide"):`${v("community.library.viewAll","View all")} \u2192`})]}),(0,M.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"14px"},children:c.map(e=>{var n,r,s,a;return(0,M.jsxs)("div",{onClick:()=>{"digital_product"===e.type?(al(e.id),window.scrollTo({top:0,behavior:"instant"})):"course"===e.type?(pl(e.id),window.scrollTo({top:0,behavior:"instant"})):"community"===e.type?wl(e):"membership"===e.type?hl(e):"coaching"===e.type?(vl(e),window.scrollTo({top:0,behavior:"instant"})):"coaching_call"===e.type||"webinar"===e.type?e.url?window.open(e.url,"_blank"):window.location.assign(`/${t.influencer}?open_url_product=true&product_id=${e.id}`):"messages"===e.type?jl(e):"url"===e.type&&(e.url?window.open(e.url,"_blank"):window.location.assign(`/${t.influencer}?open_url_product=true&product_id=${e.id}`))},style:{backgroundColor:"#fff",borderRadius:"12px",border:"1px solid #E4EBF6",cursor:"pointer",transition:"all 0.2s",overflow:"hidden"},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 4px 12px rgba(0,0,0,0.08)",e.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.transform="none"},children:[(0,M.jsxs)("div",{style:{width:"100%",aspectRatio:"16/9",backgroundColor:"#F3F4F6",position:"relative",overflow:"hidden"},children:[e.thumbnail?(0,M.jsx)("img",{src:e.thumbnail,alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,M.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:(null===(n=o[e.type])||void 0===n?void 0:n.bg)||"#F3F4F6"},children:(0,M.jsx)("span",{style:{color:(null===(r=o[e.type])||void 0===r?void 0:r.color)||"#374151"},children:i.cloneElement((null===(s=o[e.type])||void 0===s?void 0:s.icon)||(0,M.jsx)(f.BKg,{size:36}),{size:36})})}),"course"===e.type&&(e.n_modules>0||e.n_lessons>0)&&(0,M.jsxs)("div",{style:{position:"absolute",bottom:"8px",left:"8px",right:"8px",display:"flex",gap:"6px"},children:[e.n_modules>0&&(0,M.jsxs)("span",{style:{backgroundColor:"rgba(0,0,0,0.65)",color:"#fff",fontSize:"11px",fontWeight:600,padding:"3px 8px",borderRadius:"6px"},children:[e.n_modules," ",1===e.n_modules?"chapter":"chapters"]}
1),e.n_lessons>0&&(0,M.jsxs)("span",{style:{backgroundColor:"rgba(0,0,0,0.65)",color:"#fff",fontSize:"11px",fontWeight:600,padding:"3px 8px",borderRadius:"6px"},children:[e.n_lessons," ",1===e.n_lessons?"post":"posts"]})]}),"digital_product"===e.type&&e.content_type&&(0,M.jsx)("span",{style:{position:"absolute",top:"8px",left:"8px",backgroundColor:"rgba(0,0,0,0.65)",color:"#fff",fontSize:"11px",fontWeight:600,padding:"3px 8px",borderRadius:"6px"},children:(a=e.content_type,{vid:"Video",aud:"Audio",img:"Image",pdf:"PDF",bnd:"Bundle",txt:"Text"}[a]||"")})]}),(0,M.jsxs)("div",{style:{padding:"12px 14px"},children:[(0,M.jsx)("p",{style:{fontSize:"14px",fontWeight:700,color:"#1D1D1D",margin:"0 0 4px 0",fontFamily:"Roboto, sans-serif",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",lineHeight:1.3},children:e.name}),e.description&&(0,M.jsx)("p",{style:{fontSize:"12px",color:"#6B7280",margin:0,fontFamily:"Roboto, sans-serif",lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical"},children:e.description.replace(/<[^>]*>/g,"")})]})]},`${e.type}-${e.id}`)})})]},a)})})()}):(0,M.jsxs)(s.Ay,{container:!0,children:[(0,M.jsx)(s.Ay,{xs:12,style:{height:"auto",borderRadius:"12px",margin:"0px 0px 0px 0px",border:"none"},children:(0,M.jsx)("div",{style:{padding:"0px",boxSizing:"border-box"},children:(0,M.jsx)(nt,{windowWidth:t.windowWidth,currentUser:t.current_user,currentUserIcon:t.current_user_icon,placeholder:S,textValue:D,onTextChange:e=>z(e),onTextLengthChange:E,onAttachImage:Sc,selectedPreviewUrl:te,fileType:ie,onRemoveAttachment:fc,onSubmit:()=>bc(ns),scheduleDate:W,onScheduleDateChange:R,disabled:j,brandColor:k(),handleClickVideo:ac,handleCloseVideo:lc,handleShareVideo:kc,handleClickAudio:dc,handleCloseAudio:cc,handleShareAudio:Ac,handleClickDoc:rc,handleCloseDoc:sc,handleSharePDF:Fc,handleClick:oc,handleClose:ic,getDevices:Ec,anchorElVideo:Cr,anchorElAudio:wr,anchorElDoc:kr,anchorEl:_r,setFileType:ne,setIsMediaAttached:q,setSelectedPreviewUrl:oe,setEmbedUrlType:An,setEmbedUrlIsOpen:Dn,setSnackbarEmbed:uo,setDocModalOpen:Vn,setDocType:Gn,setSnackbarOpenDoc:go,setMeetingModalOpen:Zi,setMeetingType:Ki,setSnackbarOpenMeeting:to,handleRemoveContent:fc,meetingLink:Ji,setMeetingLink:qi,docLink:Kn,setDocLink:Jn,embedVideoUrl:zn,setEmbedVideoUrl:Tn,postMeetingTime:et,setPostMeetingTime:tt,meetingModalOpen:Gi,docModalOpen:Hn,embedUrlIsOpen:Fn,recordingStatus:gi,setRecordingStatus:fi,recordingDurationMins:yi,setRecordingDurationMins:bi,recordingDurationSeconds:_i,setRecordingDurationSeconds:vi,recordingDevices:Wi,setRecordingDevices:Ri,mediaRecorder:ci,mediaStream:di,mediaDevices:pi,setADevID:xi,aDevID:ui,changingDevice:wi,setChangingDevice:ji,localStream:Ei,videoBitsPerSecond:Pi,setVDevID:hi,vDevID:mi,recordedFileFormat:Li,setRecordedFileFormat:Ni,setSelectedFile:ee,setShowPostButton:ae,embedUrlKey:Cn,is_me:t.is_me,handleAudioDeviceChange:Dc,handleVideoDeviceChange:zc,saveFile:Mc,handleFullscreenOpen:tc,processEmbedUrlSet:pc,embedUrlType:kn,setEmbedVideoUrlThread:Wn,setEmbedVideoUrlComment:Pn,setEmbedVideoUrlEdit:On,snackbarMsgEmbed:xo,snackbarEmbed:po,embedVideoUrlThread:En,embedVideoUrlComment:In,embedVideoUrlEdit:Nn,docType:Yn,activeDocFileType:Zn,setActiveDocFileType:Xn,setFileTypeThread:ge,setDocLinkThread:Qn,setFileTypeComment:Fe,setDocLinkComment:tr,setDocLinkEdit:ir,setFileTypeEdit:Qe,snackbarMsgDoc:fo,snackbarOpenDoc:ho,fileTypeThread:he,fileTypeComment:Ae,fileTypeEdit:qe,docLinkThread:qn,docLinkComment:er,docLinkEdit:or,checkDocLink:hc,meetingType:Xi,setMeetingLinkThread:on,setMeetingLinkComment:an,setMeetingLinkEdit:fn,meetingLinkThread:tn,meetingLinkComment:sn,meetingLinkEdit:gn,snackbarMsgMeeting:oo,snackbarOpenMeeting:eo,snackbarSeverityMeeting:so,snackbarColorMeeting:no,checkMeetingLink:xc,currentTabInfo:xs,uploadPostTags:Hl,setUploadPostTags:Vl,addCommunityCategory:Gd,editCategoryModalOpen:pd,onEditCategory:e=>{gd(e),yd(e),ud(!0),setTimeout(()=>{md(!0)},10)},setMeetingImageEdit:bn,setMeetingImageFileNameEdit:vn,meetingImageEdit:yn,meetingImageFileNameEdit:_n,setSelectedFileEdit:Ue,pendingCategories:Yl,setPendingCategories:Gl})})}),(0,M.jsx)("div",{style:{width:"100%",minWidth:0,overflow:"hidden"},children:Qc}),tp,(0,M.jsx)("div",{style:{minWidth:"100%"},children:(0,M.jsxs)("div",{ref:Tt,style:{minWidth:"100%"},children:[ep,Dt&&(0,M.jsx)("div",{ref:Et,style:{height:"1px",width:"100%",marginTop:"20px"}}),At&&Dt&&(0,M.jsx)(a.A,{sx:{display:"flex",width:"100%",marginTop:"20px"},children:(0,M.jsx)(He.A,{sx:{margin:"auto",color:"var(--brand-color)"}})}),!Dt&&O>0&&(0,M.jsx)("p",{style:{fontSize:"14px",fontWeight:"500",margin:"40px auto 40px auto",color:"#6E89AF",textAlign:"center",width:"90%"},children:v("community.reachedEnd")})]})})]})}),(0,M.jsxs)("div",{style:{flex:"1",minWidth:"300px",maxWidth:"350px",display:"library"===gt?"none":"flex",flexDirection:"column",gap:"20px"},children:[(0,M.jsxs)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",overflow:"hidden",boxShadow:"0 1px 4px rgba(0, 0, 0, 0.01)"},children:[(()=>{const e=(null===xs||void 0===xs?void 0:xs.product_thumbnail)||(null===xs||void 0===xs?void 0:xs.thumbnail)||(null===xs||void 0===xs?void 0:xs.thumbnail_url)||(null===xs||void 0===xs?void 0:xs.thumbnailUrl),t=e&&"null"!==e&&"null/"!==e&&!e.endsWith("/fitwith/")?e.startsWith("null")?(0,at.A)(e):e:null;return t?(0,M.jsx)("div",{style:{width:"100%",aspectRatio:"1",overflow:"hidden"},children:(0,M.jsx)("img",{src:t,alt:(null===xs||void 0===xs?void 0:xs.name)||"",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})}):(0,M.jsx)("div",{style:{width:"100%",paddingBottom:"100%",position:"relative",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"},children:(0,M.jsx)("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"48px",fontWeight:"bold",color:"#fff"},children:null!==xs&&void 0!==xs&&xs.name?xs.name.substring(0,2).toUpperCase():"CM"})})})(),(0,M.jsxs)("div",{style:{padding:"16px 20px 0 20px"},children:[(0,M.jsx)("h3",{style:{fontSize:"18px",fontWeight:"600",color:"#1D1D1D",margin:"0 0 4px 0",fontFamily:"Roboto, sans-serif"},children:(null===xs||void 0===xs?void 0:xs.name)||"Community"}
1),(0,M.jsxs)("p",{style:{fontSize:"13px",color:"#9CA3AF",margin:"0 0 12px 0",fontFamily:"Roboto, sans-serif"},children:["withme.so/",t.influencer]}),(0,M.jsx)(jt,{description:(null===xs||void 0===xs?void 0:xs.description)||v("community.preview.defaultDescription")}),(0,M.jsx)("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center",padding:"10px 0 4px 0",margin:"0 0 2px 0",borderTop:"1px solid #E4EBF6"},children:(0,M.jsxs)("div",{style:{textAlign:"center"},children:[(0,M.jsx)("p",{style:{fontSize:"14px",fontWeight:"700",color:"#1D1D1D",margin:"0",fontFamily:"Roboto, sans-serif"},children:Cl||0}),(0,M.jsx)("p",{style:{fontSize:"11px",color:"#9CA3AF",margin:"2px 0 0 0",fontFamily:"Roboto, sans-serif"},children:1===Cl?v("community.library.member","Member"):v("community.library.members","Members")})]})}),(0,M.jsx)(m.A,{onClick:()=>{Cs(!1),ws(!0)},variant:"contained",startIcon:(0,M.jsx)(f.C70,{}),style:{width:"100%",padding:"8px 24px",borderRadius:"8px",border:"none",color:"#fff",fontSize:"13px",fontWeight:"600",textTransform:"none",fontFamily:"Roboto, sans-serif",background:k()||"var(--brand-color)",boxShadow:"none",transition:"all 0.2s ease",marginBottom:"15px"},children:v("community.share")})]})]}),(0,M.jsx)($e,{brandColor:k(),events:0===L.length&&!$&&t.is_me&&jd&&0===ad.length?[{id:"mock-event-1",community_post_title:v("community.examplePosts.event1Title"),event_time:new Date(Date.now()+864e5).toISOString(),content_type:"mzm",link:"https://zoom.us/j/example",is_example:!0},{id:"mock-event-2",community_post_title:v("community.examplePosts.event2Title"),event_time:new Date(Date.now()+6048e5).toISOString(),content_type:"mgm",link:"https://meet.google.com/example",is_example:!0}]:ad,onAddEvent:nc,windowWidth:t.windowWidth,is_me:t.is_me}),Jc?(0,M.jsxs)("div",{style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"12px",padding:"24px",boxShadow:"0 1px 4px rgba(0, 0, 0, 0.01)",overflow:"hidden"},children:[(0,M.jsx)("p",{style:{fontSize:"16px",marginBottom:"12px",fontWeight:"600",color:"#1D1D1D",marginTop:"0px"},children:v("community.sidebar.shareAndEarn")}),(0,M.jsx)("p",{style:{width:"100%",margin:"0px 0px 16px 0px",fontWeight:"500",fontSize:"14px",color:"#6E89AF",lineHeight:"20px"},children:v("community.sidebar.shareDescription")}),(0,M.jsx)("div",{style:{display:"flex"},children:(0,M.jsx)(st.A,{productType:Jc.productType,productId:Jc.productId,productName:Jc.productName,influencer:Jc.influencer,hasAccess:!0,affiliateEnabled:!0===(null===xs||void 0===xs?void 0:xs.affiliate_enabled),buttonVariant:"full",size:"small"})})]}):null]})]})}):""]}):(0,M.jsx)("div",{style:t.windowWidth<1200&&!t.is_me?{backgroundColor:"#fff",marginTop:"-100px",paddingTop:"100px",position:"relative",zIndex:5}:{display:"contents"},children:(0,M.jsx)(Ze.A,{windowWidth:t.windowWidth,influencer:t.influencer,display_name:t.display_name,influencer_name:t.influencer_name,influencer_icon:t.influencer_icon,currency:t.currency,designProperties:t.designProperties,current_user:t.current_user,connected_stripe_account_id:t.connected_stripe_account_id,stripe_direct_charge_account_id:t.stripe_direct_charge_account_id||(null===(_=t.influencer_info)||void 0===_?void 0:_.stripe_direct_charge_account_id),influencer_info:t.influencer_info,setState:t.setState,tabName:ss,tabId:ns,currentTabInfo:xs,accessToCurrentTab:ps,openCheckoutModal:kl,setOpenCheckoutModal:Al,selectedDuration:Rl,setSelectedDuration:Ml,promoCode:Fl,setPromoCode:Dl,promoError:El,setPromoError:Wl,checkoutPercentOff:Il,setCheckoutPercentOff:Pl,updateCommunitySubscriptionIntent:function(e,o){const i=new FormData;i.append("influencer",t.influencer),i.append("currency",t.currency),i.append("duration",e),i.append("community_tab_id",ns),i.append("promo_code",o),Me()({method:"post",url:es+"api/checkout/update_community_payment_intent",data:i,headers:{"Content-type":"application/json"},withCredentials:!0}).then(t=>{void 0!==t.data.coupon_percent_off&&(Pl(t.data.coupon_percent_off),Dl(t.data.promo_code),Wl(t.data.promo_error),Tl(t.data.coupon_percent_off>0?t.data.promo_code:"")),t.data.error||Ml(e)})},editedPromoCode:zl,setEditedPromoCode:Tl,openCommunityCheckout:function(){const e=new FormData;e.append("influencer",t.influencer),e.append("currency",t.currency),e.append("duration",Rl),e.append("community_tab_id",ns),e.append("promo_code",Fl),Me()({method:"post",url:es+"api/checkout/get_new_payment_intent_community",data:e,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{e.data.error?"non_connect"===e.data.error&&t.setState({openCheckoutError:!0}):Al(!0)})},getBrandColor:k,openFreeCommunity:e=>{let o=new FormData;o.append("influencer",t.influencer),Me()({method:"post",url:es+"api/influencer/check_late_payment",data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(o=>{if(o.data&&"boolean"===typeof o.data.late_payment)if(!0===o.data.late_payment)t.setState({openCheckoutError:!0});else{let o=new FormData;o.append("influencer",t.influencer),o.append("community_tab_id",e),Me()({method:"post",url:es+"api/influencer/unlock_free_community",headers:{"Content-type":"application/json"},data:o,withCredentials:!0}).then(o=>{if(!o.data.error){try{const e=sessionStorage.getItem("creator_meta_pixel_id");if(e&&window.fbq){const t=sessionStorage.getItem("creator_meta_pixel_uid")||"anon";window.fbq("trackSingle",e,"Purchase",{},{eventID:"purchase_"+t+"_"+Math.floor(Date.now()/6e4)})}}catch(i){}if(is(t=>t.map(t=>
1t.id===e?{...t,access:!0}:t)),ns===e){us(!0),ms(e=>({...e,access:!0,tags:Array.isArray(null===e||void 0===e?void 0:e.tags)?e.tags:[]})),F(!0);const o=new FormData;o.append("post_id",null),o.append("tag","all"),Me()({method:"POST",url:es+"api/influencer/community/initial_load_posts/"+t.influencer+"/"+e,data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{var t;ld(e.data.events),N(e.data.post_info),U(e.data.n_posts),void 0!==e.data.n_members&&Sl(e.data.n_members),Y(e.data.n_posts>0||(null===(t=e.data.post_info)||void 0===t?void 0:t.length)>0),e.data.n_posts<6?zt(!1):zt(!0),kt(!0),F(!1)}).catch(e=>{F(!1)})}}})}else{let o=new FormData;o.append("influencer",t.influencer),o.append("community_tab_id",e),Me()({method:"post",url:es+"api/influencer/unlock_free_community",headers:{"Content-type":"application/json"},data:o,withCredentials:!0}).then(o=>{if(!o.data.error){try{const e=sessionStorage.getItem("creator_meta_pixel_id");if(e&&window.fbq){const t=sessionStorage.getItem("creator_meta_pixel_uid")||"anon";window.fbq("trackSingle",e,"Purchase",{},{eventID:"purchase_"+t+"_"+Math.floor(Date.now()/6e4)})}}catch(i){}if(is(t=>t.map(t=>t.id===e?{...t,access:!0}:t)),ns===e){us(!0),ms(e=>({...e,access:!0,tags:Array.isArray(null===e||void 0===e?void 0:e.tags)?e.tags:[]})),F(!0);const o=new FormData;o.append("post_id",null),o.append("tag","all"),Me()({method:"POST",url:es+"api/influencer/community/initial_load_posts/"+t.influencer+"/"+e,data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{var t;ld(e.data.events),N(e.data.post_info),U(e.data.n_posts),void 0!==e.data.n_members&&Sl(e.data.n_members),(e.data.n_posts>0||(null===(t=e.data.post_info)||void 0===t?void 0:t.length)>0)&&Y(!0),e.data.n_posts<6?zt(!1):zt(!0),kt(!0),F(!1)}).catch(e=>{F(!1)})}}})}})},real_checkout:!t.previewRolloutOwner},ns)}),(0,M.jsx)(V.A,{open:vs,onClose:()=>ws(!1),style:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,M.jsxs)("div",{style:{backgroundColor:"#fff",borderRadius:"16px",padding:"24px",width:"90%",maxWidth:"400px",outline:"none",boxShadow:"0 20px 60px rgba(0,0,0,0.15)"},children:[(0,M.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},children:[(0,M.jsxs)("div",{children:[(0,M.jsx)("h3",{style:{margin:0,fontSize:"17px",fontWeight:700,color:"#1D1D1D",fontFamily:"Roboto, sans-serif"},children:v("community.shareModal.title","Share community")}),(0,M.jsxs)("p",{style:{margin:"4px 0 0",fontSize:"13px",color:"#6B7280",fontFamily:"Roboto, sans-serif"},children:[v("community.shareModal.subtitle","Invite people to")," ",yt.URL,t.influencer]})]}),(0,M.jsx)("span",{onClick:()=>ws(!1),style:{cursor:"pointer",color:"#9CA3AF",display:"flex"},children:(0,M.jsx)(Z.$8F,{style:{fontSize:20}})})]}),(0,M.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#F9FAFB",border:"1px solid #E5E7EB",borderRadius:"10px",padding:"10px 14px"},children:[(0,M.jsx)("span",{style:{flex:1,fontSize:"14px",color:"#374151",fontFamily:"Roboto, sans-serif",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:ls}),(0,M.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(ls),Cs(!0),setTimeout(()=>Cs(!1),2e3)},style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 14px",fontSize:"13px",fontWeight:600,color:js?"#059669":"#374151",backgroundColor:"#fff",border:"1px solid #D1D5DB",borderRadius:"8px",cursor:"pointer",fontFamily:"Roboto, sans-serif",whiteSpace:"nowrap",transition:"all 0.15s"},children:[(0,M.jsx)(f.scL,{size:15}),js?v("community.shareModal.copied","Copied!"):v("community.shareModal.copy","Copy")]})]})]})}),(0,M.jsx)(V.A,{sx:{backgroundColor:"transparent",overflow:"hidden",outline:"none"},open:To,style:{display:"flex",marginRight:"10px",marginLeft:"10px",alignItems:"center",justifyContent:"center"},children:(0,M.jsx)(x(),{in:To,children:(0,M.jsx)(s.Ay,{container:!0,xs:12,md:9,lg:6,alignItems:"center",justifyContent:"center",direction:"column",style:{width:"100vw",minHeight:"100vh",paddingTop:"calc(30px + 1vw)",paddingBottom:"calc(30px + 1vw)",overflow:"auto",margin:"auto"},children:(0,M.jsxs)(s.Ay,{sx:{minHeight:"290px",backgroundColor:"#fff",borderRadius:"10px",margin:"0px auto",maxWidth:"calc(100% - 20px)",width:"500px",overflow:"auto",boxShadow:"0 5px 25px 0 rgba(35, 40, 105, 0.04)",padding:"25px 20px",position:"relative"},children:[(0,M.jsx)(Z.$8F,{onClick:()=>{Eo(!1)},style:{fontSize:"20px",fontWeight:"300",textAlign:"right",display:"flex",top:"15p
1x",right:"15px",position:"absolute",padding:"0px",cursor:"pointer"},color:"#023648"}),(0,M.jsx)(s.Ay,{xs:12,alignItems:"center",justifyContent:"center",children:(0,M.jsx)(l.A,{style:{color:"black",fontSize:"16px",fontWeight:"600",textTransform:"none",textAlign:"center",cursor:"default",margin:"0px 0px 3px 0px",padding:"0px",backgroundColor:"transparent",width:"100%"},children:v("community.activeThreads.editPostTitle")})}),(0,M.jsx)(s.Ay,{xs:12,container:!0,justifyContent:"center",alignItems:"center",children:(0,M.jsx)(s.Ay,{xs:12,style:{paddingBottom:"10px",paddingTop:"10px",backgroundColor:"white",borderRadius:"10px"},children:(0,M.jsx)(i.Suspense,{fallback:(0,M.jsx)(M.Fragment,{}),children:(0,M.jsx)(ft,{modalPopupEditor:!0,currentText:null!==Wo?Wo:"",parentCallback:e=>{Mo>0&&Mo<=40&&Ro((0,pe.D4)(e))},snackbarCallback:()=>{},toolbarOptions:["emoji","history"],textEditorTextLength:40,placeholder:v("common.updateContentName"),lengthCallback:e=>Io(e)})})})}),(0,M.jsx)(m.A,{fullWidth:!0,variant:"contained",sx:{width:"100%",backgroundColor:"var(--brand-color)",fontSize:"16px",textTransform:"none",margin:"5px auto 0px auto",height:"40px",boxShadow:"none",fontWeight:"600",":hover":{bgcolor:"var(--brand-color-hover)",color:"white",boxShadow:"none"}},type:"submit",value:"submit",onClick:()=>{Mo>40||Mo<1?(si("error"),Mt(!0),Ot("var(--danger-color)"),Pt(v("community.post.titleLengthError"))):((e,o,i)=>{if(C())return;let n=i.replace(/<[^>]*>/g,"");const r=new FormData;r.append("post_id",e),r.append("post_index",o),r.append("new_title",n),r.append("influencer_str",t.influencer),Me()({method:"POST",url:es+"api/influencer/community/edit_post_title",data:r,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{if(!e.data.error){let t=[...L];t[e.data.post_index].community_post_title=e.data.new_title,N(t),Ic("var(--brand-color)","success",v("community.post.titleEditSuccess"))}Eo(!1)}).catch(e=>{Ic("var(--danger-color)","error",v("community.post.errorUpdatingContent"))})})(Po,Lo,Wo)},children:v("community.post.update")})]})})})}),(0,M.jsx)(se.default,{msg:It,open:Rt,severity:Bt,backgroundColor:Nt,handleClose:()=>{Mt(!1)},autoHide:4e3}),Jo?(0,M.jsx)(V.A,{open:Jo,sx:{zIndex:"9999",position:"absolute",width:"100%",height:"100%",overflow:"hidden"},children:(0,M.jsx)(a.A,{style:_t,sx:{display:"flex",width:"100%",height:"100%",margin:"auto",zIndex:"9999"},children:(0,M.jsxs)(s.Ay,{container:!0,spacing:0,direction:"column",alignItems:"center",justifyContent:"center",style:{minHeight:"90vh"},children:[(0,M.jsx)(He.A,{sx:{color:"var(--brand-color)"}}),(0,M.jsxs)("p",{style:{color:"var(--primary-text-color)",fontSize:"var(--medium-text)",fontWeight:"600"},children:["Submitting ",gr]}),(0,M.jsxs)("p",{style:{color:"var(--primary-text-color)",fontWeight:"600",fontSize:"12px"},children:[Math.round($o),"%"]}),(0,M.jsxs)("div",{className:"upload_toast onboarding_upload",style:{marginTop:"160px",display:"contents"},children:[(0,M.jsx)(Ge.A,{style:{width:"80vw"},variant:"determinate",defaultValue:0,value:$o}),(0,M.jsxs)("p",{style:{color:"#fff",fontSize:"12px"},children:[Go," ",Vo]}),"Finished"!==Vo&&Oo<60?(0,M.jsx)("p",{style:{color:"#fff",fontSize:"12px",position:"absolute",bottom:"30px"},children:null!==Oo&&0!==$o?v("dashboard.main.estimatedTimeSeconds",{seconds:Oo}):v("dashboard.main.calculatingTime")}):"Finished"!==Vo&&(0,M.jsx)("p",{style:{color:"#fff",fontSize:"12px",position:"absolute",bottom:"30px"},children:null!==Oo&&0!==$o?v("dashboard.main.estimatedTimeMinutes",{minutes:Math.floor(Oo/60),seconds:Oo%60}):v("dashboard.main.calculatingTime")})]})]})})}):(0,M.jsx)("div",{})]}),(0,M.jsx)(ze,{onEditCategory:e=>{e&&"new"!==e?(gd(e),yd(e)):(gd(null),yd("")),ud(!0),setTimeout(()=>{md(!0)},10)},is_me:t.is_me,late_payment:t.late_payment,stripe_customer_id2:t.stripe_customer_id2,open:Uc,onClose:dp,postData:Yc,postIndex:Hc,openInEditMode:Zc,windowWidth:t.windowWidth,current_username:t.current_user,current_user_icon:t.current_user_icon,current_subscription_tier:t.influencer_info.current_tier,influencer_tier_names:t.influencer_tiers,influencer_name:t.influencer,loadAdditionalThreads:(e,t)=>{const o=new FormData;o.append("post_id",e);var i=[];for(let n=0;n<L[t].threads.length;n++)i.push(L[t].threads[n].id);o.append("existing_thread_ids",i),Me()({method:"POST",url:es+"api/influencer/community/load_additional_threads",data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{let o=[...L];o[t].threads=[...L[t].threads,...e.data.new_thread_info],N(o)}).catch(e=>{})}
1,deletePost:wc,submitThread:async function(e,o,i){if(C())return;if(t.late_payment)return void(0,xt.A)();const n=new FormData;let r;r=await yc(e,ce,"aud-rec"===he?"aud":"vid-rec"===he?"vid":he,he,t.influencer,"thread",o,"","",!1,null,["mot","mzm","mgm","mmt","gos","god"].includes(he)?xe:["vey","vel","vev","vtw","vwi"].includes(he)?Rn:null,["mgm","mot","mzm","mmt"].includes(he)?nn:null),X(!0),n.append("post_id",o),n.append("post_index",i),n.append("tab_id",xs.id),Me()({method:"POST",url:es+"api/influencer/community/load_latest_thread",data:n,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{wo(o),ld(e.data.events);let i=[...L];i[e.data.post_index].threads=[e.data.new_thread_info,...L[e.data.post_index].threads],i[e.data.post_index].n_threads=i[e.data.post_index].n_threads+1,N(i),Ic("var(--brand-color)","success",v("dashboard.paidDms.threadSubmitted")),t.influencer===e.data.new_thread_info.username&&window.Intercom("update",{active_on_community_last_7_days:!0});const n=new FormData;n.append("thread_id",e.data.new_thread_info.id),ue(""),me(""),_e(""),ge("txt"),de(!1),Me()({method:"POST",url:es+"api/influencer/community/send_new_thread_community_email",data:n,headers:{"Content-type":"application/json"},withCredentials:!0})}).catch(e=>{Ic("var(--danger-color)","error",v("community.upload.failedConnection"))})},deleteThread:(e,o,i)=>{if(C())return;const n=new FormData;n.append("thread_id",e),n.append("thread_index",i),n.append("post_index",o),n.append("tab_id",xs.id),n.append("influencer_str",t.influencer),Me()({method:"POST",url:es+"api/influencer/community/delete_thread",data:n,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{if("true"===String(e.data.success)){if(0===e.data.thread_index){let e=[...L];e[o].threads=e[o].threads.slice(1),e[o].n_threads=e[o].n_threads-1,N(e)}else if(e.data.thread_index===L[o].threads.length-1){let t=[...L];t[o].threads=t[o].threads.slice(0,e.data.thread_index),t[o].n_threads=t[o].n_threads-1,N(t)}else{let t=[...L];t[o].threads=[...t[o].threads.slice(0,e.data.thread_index),...t[o].threads.slice(e.data.thread_index+1)],t[o].n_threads=t[o].n_threads-1,N(t)}ld(e.data.events)}}).catch(e=>{Ic("var(--danger-color)","error",v("dashboard.paidDms.deleteThreadError"))})},submitComment:async function(e,o,i,n,r){if(C())return;if(t.late_payment)return void(0,xt.A)();const s=new FormData;let a;a=await yc(e,je,"aud-rec"===Ae?"aud":"vid-rec"===Ae?"vid":Ae,Ae,t.influencer,"comment","",o,"",!1,null,["mot","mzm","mgm","mmt","gos","god"].includes(Ae)?Se:["vey","vel","vev","vtw","vwi"].includes(Ae)?Bn:null,["mgm","mot","mzm","mmt"].includes(Ae)?ln:null),X(!0),s.append("thread_id",o),s.append("post_index",i),s.append("thread_index",n),s.append("tab_id",xs.id),Me()({method:"POST",url:es+"api/influencer/community/load_latest_comment",data:s,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{_o(r);let o=[...L];o[e.data.post_index].threads[e.data.thread_index].comments=[e.data.new_comment_info,...o[e.data.post_index].threads[e.data.thread_index].comments],o[e.data.post_index].threads[e.data.thread_index].n_comments=o[e.data.post_index].threads[e.data.thread_index].n_comments+1,Ic("var(--brand-color)","success",v("community.comment.submitSuccess")),t.influencer===e.data.new_comment_info.commenter&&window.Intercom("update",{active_on_community_last_7_days:!0}),N(o),Ce(""),ke(""),Fe("txt"),Re(""),we(!1);const i=new FormData;i.append("comment_id",e.data.new_comment_info.id),Me()({method:"POST",url:es+"api/influencer/community/send_new_comment_community_email",data:i,headers:{"Content-type":"application/json"},withCredentials:!0})}).catch(e=>{Ic("var(--danger-color)","error",v("community.upload.failedConnection"))})},deleteComment:(e,o,i,n)=>{if(C())return;const r=new FormData;r.append("comment_id",e),r.append("thread_index",i),r.append("post_index",o),r.append("comment_index",n),r.append("tab_id",xs.id),r.append("influencer_str",t.influencer),Me()({method:"POST",url:es+"api/influencer/community/delete_comment",data:r,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>
1{if("true"===String(e.data.success)){if(0===e.data.comment_index){let t=[...L];t[o].threads[e.data.thread_index].comments=t[e.data.post_index].threads[e.data.thread_index].comments.slice(1),t[o].threads[e.data.thread_index].n_comments=t[o].threads[e.data.thread_index].n_comments-1,N(t)}else if(e.data.comment_index===L[e.data.post_index].threads.length-1){let t=[...L];t[e.data.post_index].threads[e.data.thread_index].comments=t[e.data.post_index].threads[e.data.thread_index].comments.slice(0,e.data.thread_index),t[o].threads[e.data.thread_index].n_comments=t[o].threads[e.data.thread_index].n_comments-1,N(t)}else{let t=[...L];t[e.data.post_index].threads[e.data.thread_index].comments=[...t[e.data.post_index].threads[e.data.thread_index].comments.slice(0,e.data.comment_index),...t[e.data.post_index].threads[e.data.thread_index].comments.slice(e.data.comment_index+1)],t[o].threads[e.data.thread_index].n_comments=t[o].threads[e.data.thread_index].n_comments-1,N(t)}ld(e.data.events)}}).catch(e=>{Ic("var(--danger-color)","error",v("dashboard.paidDms.deleteCommentError"))})},editPost:vc,editThread:async function(e,o,i,n,r,s){let a;a=await yc(o,Oe,"aud-rec"===qe?"aud":"vid-rec"===qe?"vid":qe,qe,t.influencer,"thread","",e,"",!0,null,["mot","mzm","mgm","mmt","gos","god"].includes(qe)?s:["vey","vel","vev","vtw","vwi"].includes(qe)?Un:null,["mgm","mot","mzm","mmt"].includes(qe)?mn:null);const l=new FormData;l.append("post_index",i),l.append("thread_id",e),l.append("thread_index",n),l.append("tab_id",xs.id),Me()({method:"POST",url:es+"api/influencer/community/load_edited_thread",data:l,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{ld(e.data.events),ko(r);let t=[...L];t[e.data.post_index].threads[e.data.thread_index].text=e.data.text,t[e.data.post_index].threads[e.data.thread_index].file=e.data.file,t[e.data.post_index].threads[e.data.thread_index].content_type=e.data.content_type,t[e.data.post_index].threads[e.data.thread_index].link=e.data.link,N(t),X(!1),Ic("var(--brand-color)","success",v("dashboard.paidDms.threadEdited")),Ue(""),Je(""),Qe("txt"),Ne(!1)}).catch(e=>{Ic("var(--danger-color)","error",v("community.upload.failedConnection"))})},editComment:async function(e,o,i,n,r,s,a){let l;l=await yc(e,Oe,"aud-rec"===qe?"aud":"vid-rec"===qe?"vid":qe,qe,t.influencer,"comment","","",o,!0,null,["mot","mzm","mgm","mmt","gos","god"].includes(qe)?a:["vey","vel","vev","vtw","vwi"].includes(qe)?Un:null,["mgm","mot","mzm","mmt"].includes(qe)?un:null);const d=new FormData;d.append("comment_id",o),d.append("post_index",i),d.append("thread_index",n),d.append("comment_index",r),d.append("tab_id",xs.id),Me()({method:"POST",url:es+"api/influencer/community/load_edited_comment",data:d,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{Fo(s);let t=[...L];t[e.data.post_index].threads[e.data.thread_index].comments[e.data.comment_index].text=e.data.text,t[e.data.post_index].threads[e.data.thread_index].comments[e.data.comment_index].file=e.data.file,t[e.data.post_index].threads[e.data.thread_index].comments[e.data.comment_index].content_type=e.data.content_type,t[e.data.post_index].threads[e.data.thread_index].comments[e.data.comment_index].link=e.data.link,N(t),X(!1),Ic("var(--brand-color)","success",v("community.comment.editSuccess")),Ue(""),Je(""),Qe("txt"),Ne(!1)}).catch(e=>{Ic("var(--danger-color)","error",v("community.upload.failedConnection"))})},loadAdditionalComments:(e,t,o)=>{const i=new FormData;i.append("thread_id",e);var n=[];for(let r=0;r<L[t].threads[o].comments.length;r++)n.push(L[t].threads[o].comments[r].id);i.append("existing_comment_ids",n),Me()({method:"POST",url:es+"api/influencer/community/load_additional_comments",data:i,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{let i=[...L];i[t].threads[o].comments=[...L[t].threads[o].comments,...e.data.new_comment_info],N(i)}).catch(e=>{})},postLikeChange:_c,threadLikeChange:(e,t,o)=>{if(C())return;const i=new FormData;i.append("thread_id",e),i.append("post_index",t),i.append("thread_index",o),Me()({method:"POST",url:es+"api/influencer/community/thread_like_update",data:i,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{let t=[...L];t[e.data.post_index].threads[e.data.thread_index].like_count=e.data.thread_like_count,t[e.data.post_index].threads[e.data.thread_index].user_like_value=e.data.like_val,N(t)}
1).catch(e=>{})},commentLikeChange:(e,t,o,i)=>{const n=new FormData;n.append("comment_id",e),n.append("post_index",t),n.append("thread_index",o),n.append("comment_index",i),Me()({method:"POST",url:es+"api/influencer/community/comment_like_update",data:n,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{let t=[...L];t[e.data.post_index].threads[e.data.thread_index].comments[e.data.comment_index].like_count=e.data.comment_like_count,t[e.data.post_index].threads[e.data.thread_index].comments[e.data.comment_index].user_like_value=e.data.like_val,N(t)}).catch(e=>{})},influencer_info:t.influencer_info,OpenSubscribePopup:t.OpenSubscribePopup,OpenWaitingListPopup:t.OpenWaitingListPopup,CloseSubscribePopup:t.CloseSubscribePopup,CloseWaitingListPopup:t.CloseWaitingListPopup,redirectCallback:e=>window.location.assign(`/login?influencer=${t.influencer}&open_community=true&post_id=${e}`),resetThreadTextId:vo,resetCommentTextId:bo,setResetThreadTextId:wo,setResetCommentTextId:_o,resetPostEditTextId:jo,setResetPostEditTextId:Co,resetThreadEditTextId:So,setResetThreadEditTextId:ko,resetCommentEditTextId:Ao,setResetCommentEditTextId:Fo,snackbarMsgOuter:It,snackbarOpenOuter:Rt,snackbarColorOuter:Nt,setSnackbarOpenOuter:Mt,snackbarTypeOuter:Bt,setSelectedFileThread:ue,setSelectedPreviewUrlThread:me,setSelectedPreviewIdThread:_e,selectedPreviewIdThread:be,setSelectedPreviewIdComment:Re,selectedPreviewIdComment:Ee,setFileTypeThread:ge,setShowPostButtonThread:ye,setIsMediaAttachedThread:de,setSelectedFileComment:Ce,setSelectedPreviewUrlComment:ke,setFileTypeComment:Fe,setShowPostButtonComment:Te,setIsMediaAttachedComment:we,isMediaAttachedThread:le,selectedFileThread:ce,selectedPreviewUrlThread:xe,fileTypeThread:he,showPostButtonThread:fe,isMediaAttachedComment:ve,selectedFileComment:je,selectedPreviewUrlComment:Se,fileTypeComment:Ae,showPostButtonComment:De,embedUrlKeyThread:Rn,embedUrlKeyComment:Bn,isMediaAttachedEdit:Le,selectedFileEdit:Oe,selectedPreviewUrlEdit:Ve,fileTypeEdit:qe,setSelectedFileEdit:Ue,setSelectedPreviewUrlEdit:Je,setFileTypeEdit:Qe,setIsMediaAttachedEdit:Ne,setEmbedUrlType:An,setEmbedUrlIsOpen:Dn,setSnackbarEmbed:uo,setDocModalOpen:Vn,setDocType:Gn,setSnackbarOpenDoc:go,setActiveDocFileType:Xn,setMeetingModalOpen:Zi,setMeetingType:Ki,setSnackbarOpenMeeting:to,setMeetingTimeComment:dn,snackbarSeverityOuter:ri,snackbarPreMsgClick:Ht,snackbarPostMsgClick:Yt,snackbarTextClick:Zt,saveFile:Mc,recordedFileFormat:Li,snackbarOpenClick:Ut,snackbarSeverityClick:ai,snackbarColorClick:Kt,setSnackbarOpenClick:$t,setMeetingTimeEditPost:pn,setPostMeetingTime:tt,setUpdateEditPostData:jn,handleUpdatePinnedPost:Jd,handleRemovePinnedPost:qd,isPinnedPost:Qd,getBrandColor:k,editPostTags:Zl,setEditPostTags:Xl,currentTabInfo:xs,meetingImageEdit:yn,setMeetingImageEdit:bn,meetingImageFileNameEdit:_n,setMeetingImageFileNameEdit:vn,meetingType:Xi}),(0,M.jsx)(V.A,{open:bd,onClose:()=>_d(!1),children:(0,M.jsxs)(a.A,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundColor:"#fff",borderRadius:"16px",padding:"32px",maxWidth:"440px",width:"90%",boxShadow:"0 20px 60px rgba(0,0,0,0.15)",outline:"none"},children:[(0,M.jsx)(l.A,{sx:{fontSize:"18px",fontWeight:700,color:"#1D1D1D",mb:1},children:v("community.category.deleteTitle")||"Delete Category"}),(0,M.jsx)(l.A,{sx:{fontSize:"14px",color:"#6B7280",mb:3,lineHeight:1.6},children:v("community.category.deleteWarning",{count:Id,category:Rd})||`This category has ${Id} posts. Move them to another category before deleting.`}),(0,M.jsx)(l.A,{sx:{fontSize:"13px",fontWeight:600,color:"#374151",mb:1},children:v("community.category.moveTo")||"Move posts to:"}),(0,M.jsxs)("select",{value:Bd,onChange:e=>Ld(e.target.value),style:{width:"100%",padding:"10px 14px",borderRadius:"10px",border:"1px solid #E4EBF6",fontSize:"14px",fontFamily:"Roboto, sans-serif",marginBottom:"24px",outline:"none",color:"#1D1D1D",backgroundColor:"#fff"},children:[(0,M.jsx)("option",{value:"",children:v("community.category.selectCategory")||"Select a category..."}),(()=>{const e=new Set;
1return((null===xs||void 0===xs?void 0:xs.tags)||[]).forEach(t=>{t&&e.add(t)}),(Od||[]).forEach(t=>{null!==t&&void 0!==t&&t.name&&e.add(t.name)}),((null===xs||void 0===xs?void 0:xs.category_order)||[]).forEach(t=>{t&&e.add(t)}),[...e].filter(e=>e!==Rd).map(e=>(0,M.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})()]}),(0,M.jsxs)(a.A,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[(0,M.jsx)(m.A,{onClick:()=>_d(!1),sx:{textTransform:"none",color:"#6B7280",fontWeight:600},children:v("common.cancel")}),(0,M.jsx)(m.A,{disabled:!Bd,onClick:async()=>{try{const e=new FormData;e.append("tab_id",ns),e.append("source_tag",Rd),e.append("target_tag",Bd),await Me()({method:"post",url:es+"api/influencer/community/move_tag_posts",data:e,headers:{"Content-type":"application/json"},withCredentials:!0});const t=((null===xs||void 0===xs?void 0:xs.tags)||[]).filter(e=>e!==Rd);ms(e=>({...e,tags:t}));const o=(Od||[]).filter(e=>{var t;return(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())!==Rd.toLowerCase()});Ud(o),ql===Rd&&Ql("all"),_d(!1),Ic("var(--brand-color)","success",v("community.category.deleteSuccess")),cp(ql===Rd?"all":ql)}catch(e){Ic("var(--danger-color)","error",v("community.category.deleteError")||"Error moving posts")}},variant:"contained",sx:{textTransform:"none",fontWeight:600,backgroundColor:"#EF4444",borderRadius:"10px","&:hover":{backgroundColor:"#DC2626"},"&:disabled":{backgroundColor:"#FCA5A5",color:"#fff"}},children:v("community.category.moveAndDelete")||"Move & Delete"})]})]})}),pd&&(0,r.createPortal)((0,M.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:t.windowWidth<900?"flex-end":"center",justifyContent:"center",zIndex:9999,padding:t.windowWidth<900?"0px":"20px",opacity:xd?1:0,transition:"opacity 0.3s ease-in-out"},onClick:()=>{md(!1),setTimeout(()=>{ud(!1),gd(null),yd("")},300)},children:(0,M.jsxs)("div",{style:{maxWidth:t.windowWidth<600?"100%":"500px",width:"100%",height:"auto",maxHeight:"85vh",backgroundColor:"#fff",borderRadius:t.windowWidth<900?"20px 20px 0px 0px":"16px",position:"relative",boxShadow:t.windowWidth<900?"0 -10px 40px rgba(0, 0, 0, 0.15)":"0 20px 60px rgba(0, 0, 0, 0.15)",overflow:"hidden",display:"flex",flexDirection:"column",transform:xd?"translateY(0)":t.windowWidth<900?"translateY(100%)":"scale(0.8) translateY(50px)",opacity:xd?1:0,transition:"all 0.3s ease-out",outline:"none"},onClick:e=>e.stopPropagation(),children:[(0,M.jsx)("div",{style:{position:"absolute",top:"15px",right:"15px",cursor:"pointer",zIndex:10001,width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.1)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",opacity:xd?1:0,transform:xd?"scale(1)":"scale(0.8)",transitionDelay:xd?"0.2s":"0s"},onClick:()=>{md(!1),setTimeout(()=>{ud(!1),gd(null),yd("")},300)},children:(0,M.jsx)(Z.$8F,{style:{fontSize:"18px",color:"#666",transition:"color 0.2s ease"}})}),(0,M.jsx)("div",{style:{padding:"25px 25px 20px 25px",background:"linear-gradient(135deg, rgba(247,249,252,0.8) 0%, rgba(255,255,255,0.4) 100%)",borderBottom:"1px solid #E4EBF6",opacity:xd?1:0,transform:xd?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:xd?"0.1s":"0s"},children:(0,M.jsx)(l.A,{variant:"h5",style:{color:"#1D1D1D",fontWeight:"700",fontSize:t.windowWidth<600?"18px":"20px",textAlign:"center",fontFamily:"Roboto, sans-serif",letterSpacing:"-0.5px",margin:0},children:v(hd?"community.category.edit":"community.category.createNew")})}),(0,M.jsxs)("div",{style:{flex:1,minHeight:0,overflowY:"auto",padding:"20px 25px 20px 25px",paddingRight:"25px",opacity:xd?1:0,transform:xd?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:xd?"0.2s":"0s",maxHeight:(t.windowWidth,"calc(80vh - 90px - 80px)"),position:"relative",zIndex:1},onClick:e=>e.stopPropagation(),children:[(0,M.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,M.jsx)(l.A,{style:{color:"#333",fontSize:"14px",fontWeight:"600",marginBottom:"8px",fontFamily:"Roboto, sans-serif",textAlign:"left"},children:v("community.category.name")}
1),(0,M.jsx)("input",{type:"text",className:"text-input",style:{display:"block",fontWeight:"500",fontSize:"15px",padding:"12px 15px",color:"#1D1D1D",borderRadius:"8px",border:"1px solid #C7D1DE",width:"100%",fontFamily:"Roboto",outline:"none",boxSizing:"border-box",position:"relative",zIndex:10},placeholder:v("community.category.namePlaceholder"),maxLength:50,value:fd,onChange:e=>{yd(e.target.value)},onClick:e=>e.stopPropagation(),onFocus:e=>e.stopPropagation()})]}),(0,M.jsxs)(l.A,{style:{color:"#6D89AF",fontSize:"12px",fontWeight:"600",marginTop:"10px",fontFamily:"Roboto, sans-serif",textAlign:"left",display:"flex",alignItems:"center",gap:"4px"},children:[(0,M.jsx)(y.wfp,{style:{fontSize:"16px"}}),v("community.category.nameHint")]})]}),(0,M.jsx)("div",{style:{padding:"20px 25px 25px 25px",borderTop:"1px solid #E4EBF6",flexShrink:0,backgroundColor:"#fff",opacity:xd?1:0,transform:xd?"translateY(0)":"translateY(20px)",transition:"all 0.4s ease-out",transitionDelay:xd?"0.3s":"0s",position:t.windowWidth<900?"sticky":"relative",bottom:t.windowWidth<900?"0":"auto",left:0,right:0,zIndex:2},children:(0,M.jsx)("div",{style:{display:"flex",gap:"12px",width:"100%",justifyContent:"center"},children:hd?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(m.A,{disableRipple:!0,variant:"contained",disabled:!fd||""===fd.trim()||fd.trim()===hd,sx:{backgroundColor:fd&&""!==fd.trim()&&fd.trim()!==hd?"var(--brand-color)":"#E4EBF6",color:fd&&""!==fd.trim()&&fd.trim()!==hd?"white":"#9CA3B4",fontSize:"14px",textTransform:"none",borderRadius:"12px",boxShadow:"none",fontWeight:"600",padding:"12px 20px",border:fd&&""!==fd.trim()&&fd.trim()!==hd?"2px solid var(--brand-color)":"2px solid #E4EBF6",transition:"all 0.2s ease-in-out",cursor:fd&&""!==fd.trim()&&fd.trim()!==hd?"pointer":"not-allowed",flex:1,"&:hover":fd&&""!==fd.trim()&&fd.trim()!==hd?{backgroundColor:"var(--brand-color)",border:"2px solid var(--brand-color)",opacity:.8,transform:"translateY(-1px)",boxShadow:"none"}:{backgroundColor:"#E4EBF6",border:"2px solid #E4EBF6",transform:"none",boxShadow:"none"}},onClick:async()=>{const e=fd.trim();if(!e)return void Ic("var(--danger-color)","error",v("community.category.validationError"));if(e===hd)return void Ic("var(--danger-color)","error","Category name unchanged");((null===xs||void 0===xs?void 0:xs.tags)||[]).includes(e)&&e!==hd?Ic("var(--danger-color)","error",v("community.category.alreadyExists")):(Zd(hd,e),md(!1),setTimeout(()=>{ud(!1),gd(null),yd(""),Ic("var(--brand-color)","success",v("community.category.updateSuccess"))},300))},children:v("community.category.saveChanges")}),(0,M.jsx)(m.A,{disableRipple:!0,variant:"outlined",sx:{borderColor:"var(--danger-color)",color:"var(--danger-color)",fontSize:"14px",textTransform:"none",borderRadius:"12px",fontWeight:"600",padding:"12px 20px",flex:1,transition:"all 0.2s ease-in-out","&:hover":{backgroundColor:"var(--danger-color)",color:"white",borderColor:"var(--danger-color)",transform:"translateY(-1px)"}},onClick:()=>{Xd(hd),md(!1),setTimeout(()=>{ud(!1),gd(null),yd("")},300)},children:v("community.category.delete")})]}):(0,M.jsx)(m.A,{disableRipple:!0,fullWidth:!0,variant:"contained",disabled:!fd||""===fd.trim(),sx:{backgroundColor:fd&&""!==fd.trim()?"var(--brand-color)":"#E4EBF6",color:fd&&""!==fd.trim()?"white":"#9CA3B4",fontSize:"14px",textTransform:"none",borderRadius:"12px",boxShadow:"none",fontWeight:"600",padding:"12px 20px",border:fd&&""!==fd.trim()?"2px solid var(--brand-color)":"2px solid #E4EBF6",transition:"all 0.2s ease-in-out",cursor:fd&&""!==fd.trim()?"pointer":"not-allowed","&:hover":fd&&""!==fd.trim()?{backgroundColor:"var(--brand-color)",border:"2px solid var(--brand-color)",opacity:.8,transform:"translateY(-1px)",boxShadow:"none"}:{backgroundColor:"#E4EBF6",border:"2px solid #E4EBF6",transform:"none",boxShadow:"none"}},onClick:async()=>{const e=fd.trim();if(!e)return void Ic("var(--danger-color)","error",v("community.category.validationError"));const t=(null===xs||void 0===xs?void 0:xs.tags)||[],o=Kl&&Kl.length>0&&Kl[0]===e;if(t.includes(e)||o)Ic("var(--danger-color)","error",v("community.category.alreadyExists"));else{if(hd)Jl([e]),Xl([e]);else try{await Gd(e),Ic("var(--brand-color)","success",v("community.category.created")||"Category created")}catch(i){return void Ic("var(--danger-color)","error","Failed to create category")}md(!1),setTimeout(()=>{ud(!1),gd(null),yd("")},300)}},children:v("community.category.create")})})})]})}),document.body)]})})}},85259(e,t,o){"use strict";o.d(t,{A:()=>g});var i=o(82483),n=o(52891),r=o(20792),s=o(18246),a=o(90200),l=o(98604),d=o(8118),c=o.n(d),p=o(97756),u=o(21451),x=o(56723);const m=o(98635),h=i.memo(e=>{const{t:t}=(0,p.Bd)(),[o,d]=(0,i.useState)([]),[h,g]=(0,i.useState)(!0);(0,i.useEffect)(()=>{var t,o,i,n,r;if("sign_up"===e.selected_tab&&e.influencer_content_list&&Array.isArray(e.influencer_content_list)&&e.influencer_content_list.length>0)return d(e.influencer_content_list),void g(!1);if("sign_up"===e.selected_tab&&e.influencer_content_list&&Array.isArray(e.influencer_content_list)&&0===e.influencer_content_list.length)return d([]),void g(!1);const s=null===(t=e.activeProductData)||void 0===t||null===(o=t.active_products)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.lead_capture;if(s){const e=!0===s.active||void 0===s.active,t=s.list||[];if(e&&t.length>0)return d(t),void g(!1)}const a=(null===(n=e.influencer_info)||void 0===n?void 0:n.influencer)||(null===(r=e.influencer_info)||void 0===r?void 0:r.username)||e.influencer_str||"";if(!a)return d([]),void g(!1);const l=window.location.hostname;let p=m.BACKEND_URL;
1["localhost","localhost:3000","fitwith.io","withme.so","with-me.shop","with-me.store"].includes(l.replace(/^www\./,""))||(p=(0,u.wE)());const x=new FormData;x.append("currency",e.currency||"usd"),c()({method:"post",url:`${p}api/influencer/storefront_initial_data/${a}`,data:x,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{var t;const o=(null===(t=e.data.data)||void 0===t?void 0:t.lead_captures)||[];d(o),g(!1)}).catch(e=>{console.log("Error fetching lead captures:",e),d([]),g(!1)})},[e.selected_tab,e.influencer_content_list,e.activeProductData,e.influencer_info,e.influencer_str,e.currency]);const f=e.windowWidth||("undefined"!==typeof window?window.innerWidth:1200),y=()=>{var t,o,i;const n=(null===(t=e.designProperties)||void 0===t?void 0:t.brandColorUpdated)||(null===(o=e.designProperties)||void 0===o?void 0:o.brandColor);return n&&""!==n&&null!==n?n:null!==(i=e.theme)&&void 0!==i&&i.brandColor&&""!==e.theme.brandColor&&null!==e.theme.brandColor?e.theme.brandColor:"#FDB62B"},b=(0,i.useMemo)(()=>(o||[]).filter(e=>!0!==(null===e||void 0===e?void 0:e.hidden)),[o]);if(h)return(0,x.jsx)(n.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,x.jsx)(r.A,{})});if(!b||0===b.length)return(0,x.jsxs)(n.A,{sx:{textAlign:"center",py:4},children:[(0,x.jsx)(s.Ine,{size:48,color:"#ccc",style:{margin:"0 auto 16px"}}),(0,x.jsx)(n.A,{sx:{color:"#6b7280",fontSize:"18px",fontWeight:600,mb:1},children:t("influencer.creatorView.noSignUpForms")}),(0,x.jsx)(n.A,{sx:{color:"#9ca3af",fontSize:"14px"},children:t("influencer.creatorView.checkBackSignUpForms")})]});const _=(()=>{var t,o,i,n,r,s,a,l;if(e.theme){var d,c,p,u,x,m,h,g;const t=e.theme.mixWith?e.theme.mixWith(e.theme.appText,e.theme.appBg,.4):"#6b7280";return{cardBg:e.theme.cardBg,cardBorder:e.theme.cardBorder,cardBgHover:e.theme.cardBgHover,hoverShadow:e.theme.hoverShadow,appText:e.theme.appText,secondaryText:t,brandColor:e.theme.brandColor,itemBgMode:(null===(d=e.designProperties)||void 0===d?void 0:d.itemBgModeUpdated)||(null===(c=e.designProperties)||void 0===c?void 0:c.itemBgMode)||"subtle",cardTextColor:(null===(p=e.designProperties)||void 0===p?void 0:p.cardTextColorUpdated)||(null===(u=e.designProperties)||void 0===u?void 0:u.cardTextColor),cardBg:"custom"===((null===(x=e.designProperties)||void 0===x?void 0:x.itemBgModeUpdated)||(null===(m=e.designProperties)||void 0===m?void 0:m.itemBgMode)||"subtle")&&((null===(h=e.designProperties)||void 0===h?void 0:h.itemCardBgColorUpdated)||(null===(g=e.designProperties)||void 0===g?void 0:g.itemCardBgColor))||e.theme.cardBg}}return{cardBg:"#FFFFFF",cardBorder:"#E5E7EB",cardBgHover:"#F9FAFB",hoverShadow:"0 2px 6px 0 rgba(16, 24, 40, 0.02)",appText:"#111827",secondaryText:"#6b7280",brandColor:y(),itemBgMode:(null===(t=e.designProperties)||void 0===t?void 0:t.itemBgModeUpdated)||(null===(o=e.designProperties)||void 0===o?void 0:o.itemBgMode)||"subtle",cardTextColor:(null===(i=e.designProperties)||void 0===i?void 0:i.cardTextColorUpdated)||(null===(n=e.designProperties)||void 0===n?void 0:n.cardTextColor),cardBg:"custom"===((null===(r=e.designProperties)||void 0===r?void 0:r.itemBgModeUpdated)||(null===(s=e.designProperties)||void 0===s?void 0:s.itemBgMode)||"subtle")&&((null===(a=e.designProperties)||void 0===a?void 0:a.itemCardBgColorUpdated)||(null===(l=e.designProperties)||void 0===l?void 0:l.itemCardBgColor))||"#FFFFFF"}})();return(0,x.jsx)(n.A,{sx:{padding:{xs:"0px 14px 60px 14px",lg:"0px 24px 60px 24px"},maxWidth:560,margin:"0 auto"},children:(0,x.jsx)(a.A,{items:b,windowWidth:f,productType:"lead_capture",getImageUrl:e=>{const t=(null===e||void 0===e?void 0:e.thumbnail)||(null===e||void 0===e?void 0:e.product_thumbnail)||(null===e||void 0===e?void 0:e.image)||(null===e||void 0===e?void 0:e.image_url)||"";return t&&"null/"!==t&&"null"!==t?(0,l.A)(t):null},getPriceStr:e=>null,getSeparatePrices:e=>({monthlyPrice:null,annualPrice:null}),getDescription:e=>(null===e||void 0===e?void 0:e.description)||(null===e||void 0===e?void 0:e.subtitle)||(null===e||void 0===e?void 0:e.bio)||"",getCtaLabel:(e,t)=>
1function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"lead_capture"===e&&(null===t||void 0===t?void 0:t.button_text)||"Submit"}(e,t),getBrandColor:y,handleOpenItem:()=>{},getTruncatedPlainText:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;if(!e)return"";const o=e.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim();return o.length<=t?o:o.slice(0,t).trim()+"\u2026"},getTruncatedHtml:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120;if(!e||"string"!==typeof e)return"";if(e.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim().length<=t)return e.trim();let o=0,i="",n=!1,r="";for(let s=0;s<e.length;s++){const a=e[s];if("<"===a)n=!0,r=a;else if(">"===a)n=!1,r+=a,i+=r,r="";else if(n)r+=a;else{if(!(o<t)){i+="...";break}i+=a,o++}}return i},surface:_,mobilePreview:!1,influencer_info:e.influencer_info,current_page_view:e.current_page_view,async_tier_apply:!1,isLoggedOutView:e.isLoggedOutView||!1,showLeadCaptureSnackbar:e.showLeadCaptureSnackbar})})}),g=h},56472(e,t,o){"use strict";o.d(t,{A:()=>h});o(82483);var i=o(97756),n=o(84664),r=o(10629),s=o(15269),a=o(52891),l=o(65470),d=o(71756),c=o(98604),p=o(18246),u=o(64841),x=o(15920),m=o(56723);function h(e){var t,o;let{item:h,windowWidth:g,openBuyNowCheckout:f,openURLProductView:y,influencer:b,currency:_,current_user:v,mobilePreview:w,is_me:j}=e;const{t:C}=(0,i.Bd)(),S="urc"===h.content_type||"urw"===h.content_type,k=h.content_price>0,A=5===h.current_tier,F=k&&!A,D="dm_url"===h.content_type||"url"===h.delivery_type,z=k?(0,u.A)(h.content_price,_):null,T="urw"===h.content_type?"webinar":S?"coaching_call":"url",E=!j&&!w&&!0===h.affiliate_enabled&&b;return(0,m.jsxs)(n.A,{sx:{borderRadius:"12px",margin:"40px auto 0px auto",maxWidth:"95%",border:"1px solid #d1d5db",backgroundColor:"#fff",alignItems:"center",position:"relative",p:2,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.05)",transition:"transform 200ms cubic-bezier(0.4,0,0.2,1), box-shadow 150ms cubic-bezier(0.4,0,0.2,1)",transform:"scale(1)","&:hover":w?{}:{transform:"scale(1.01)",backgroundColor:"#f3f4f6",boxShadow:"0 2px 6px rgba(0, 0, 0, 0.04)"}},onClick:()=>{if(!w)if(D)if(A){const e=h.url||h.text;e&&window.open(e.startsWith("http")?e:"https://"+e,"_blank")}else y&&y(h.id);else if(F){if(!v){if(y)y(h.id);else try{window.location.assign(`/register?post_url=${b}&mode=buynow&id=${h.id}`)}catch(e){}return}y?y(h.id):f&&f(_,h.thumbnail,h.name,"url",h.id)}else h.text&&window.open(h.text.startsWith("http")?h.text:"https://"+h.text,"_blank")},children:[(0,m.jsx)(r.A,{sx:{mr:1.25,minWidth:"auto"},children:h.thumbnail?(0,m.jsx)(s.A,{variant:"rounded",sx:{width:52,height:52,backgroundColor:"#eff6ff",color:"#3b82f6"},src:(0,c.A)(h.thumbnail)}):(0,m.jsx)(s.A,{variant:"rounded",sx:{width:52,height:52,backgroundColor:"#eff6ff",color:"#3b82f6"},children:S?(0,m.jsx)(p.Pts,{size:24}):(0,m.jsx)(p.bw7,{size:24})})}),(0,m.jsxs)(a.A,{sx:{flexGrow:1,pr:g>=600?14:0},children:[(0,m.jsx)(l.A,{variant:"subtitle1",sx:{fontWeight:600,color:"#111827",letterSpacing:"-0.2px",lineHeight:1.5,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",width:"95%"},children:h.name}),h.text&&!F&&(0,m.jsxs)(l.A,{variant:"body2",sx:{color:"#6b7280",fontSize:"0.8rem",letterSpacing:"-0.2px",mt:.25,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical"},children:[null===(t=h.text)||void 0===t?void 0:t.substring(0,30),(null===(o=h.text)||void 0===o?void 0:o.length)>30?"...":""]}),A&&(0,m.jsx)(d.A,{icon:(0,m.jsx)(p.RVi,{size:12}),label:C("urlcard.purchased"),size:"small",sx:{mt:.5,width:"fit-content",color:"#10b981",backgroundColor:"#d1fae5",fontWeight:600,fontSize:"0.7rem",height:"20px","& .MuiChip-icon":{color:"#10b981",marginLeft:"4px"},"& .MuiChip-label":{paddingLeft:"6px",paddingRight:"8px"},border:"0.5px solid #10b981",boxShadow:"0 1px 3px rgba(16, 185, 129, 0.1)"}}),F&&z&&(0,m.jsx)(d.A,{icon:(0,m.jsx)(p.$9J,{size:12}),label:z,size:"small",sx:{mt:.5,width:"fit-content",color:"#3b82f6",backgroundColor:"transparent",fontWeight:600,fontSize:"0.7rem",height:"20px","& .MuiChip-icon":{color:"#3b82f6",marginLeft:"4px"},"& .MuiChip-label":{paddingLeft:"6px",paddingRight:"8px"},border:"0.5px solid #3b82f6",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"}}),E&&(0,m.jsx)(a.A,{onClick:e=>e.stopPropagation(),sx:{mt:1},children:(0,m.jsx)(x.A,{productType:T,productId:h.id,productName:h.name,influencer:b,hasAccess:A,buttonVariant:"text",size:"small"})})]}),(0,m.jsx)(a.A,{sx:{position:"absolute",right:12,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:1},children:(0,m.jsx)(p.klJ,{size:20,color:"#999"})})]})}},70269(e,t,o){"use strict";o.r(t),o.d(t,{default:()=>ie});var i=o(82483),n=o(56723);const r=(0,i.lazy)(()=>Promise.all([o.e(7022),o.e(8721),o.e(3590),o.e(4418),o.e(4061),o.e(4993),o.e(9386),o.e(242),o.e(8119),o.e(2756)]).then(o.bind(o,88119)));function s(e){let{ClassicContent:t,...o}=e;const s=["async","paidDMs","community","sign_up","urls"].includes(o.selected_tab);return!0===o.previewRolloutOwner&&!0===o.isLoggedOutView&&s?(0,n.jsx)(i.Suspense,{fallback:null,children:(0,n.jsx)(r,{...o})}):(0,n.jsx)(t,{...o})}var a=o(97756),l=o(21451),d=(o(82350),o(26552),o(90988),o(99379),o(98725)),c=(o(26915),o(59742)),p=o(91509),u=(o(75128),o(13011),o(26701)),x=o(25982),m=o(57513),h=o(20792),g=o(99113),f=o(16253),y=o(52891),b=o(32189),_=o(65470),v=o(8118),w=o.n(v),j=(o(65941),o(34276),o(18720)),C=o(56533),S=o(20757),k=o(56472),A=o(11151),F=(o(70635),o(85259)),D=o(10670),z=o(64841),T=o(67116),E=o(24879),W=o(61126),R=o(62856),M=o(19632),I=o(63696),P=o(96143),B=o(36237),L=o(26855),N=o(43483),O=o(4396),U=o(41240),$=o(49322),H=o(1901),V=o(90050),Y=o(6868),G=o(18246),Z=o(42751),X=o(15920),K=o(22829),J=o(16348),q=o(95384);const Q=o(98635),ee=(0,L.Ay)(x.A)(e=>{let{theme:t}=e;return{color:t.palette.getContrastText("#3b55f3"),paddingLeft:"30px",paddingRight:"30px",backgroundColor:"#3b55f3","&:hover":{backgroundColor:"#3b55f3"}}}),te=((0,L.Ay)(y.A)(e=>{let{theme:t}=e;return{display:"flex",width:"fit-content",alignItems:"center",gap:"3px",backgroundColor:"#f5f9ff",padding:"7px 12px",borderRadius:"20px",color:"#6E89AF",fontSize:"12px",fontWeight:"600"}}),(0,L.Ay)(b.A)(e=>{let{theme:t}=e;return{"& .MuiPaginationItem-root":{fontWeight:500,fontFamily:"Roboto",color:"black",backgroundColor:"var(--rebrandind-background-color)",borderRadius:"8px","&:hover":{backgroundColor:"#e3e7fc",color:"var(--brand-color)"}},"& .Mui-selected":{backgroundColor:"#e3e7fc",color:"var(--brand-color)",borderRadius:"8px",fontWeight:500,fontFamily:"Roboto"},"& .Mui-selected:hover":{backgroundColor:"#d7ddfc",color:"var(--brand-color)",borderRadius:"8px",fontWeight:500,fontFamily:"Roboto"}}})),oe=function(e){var t,o,r,s,b,v,L,oe,ie,ne,re,se,ae,le,de,ce,pe,ue;const xe=e.previewRolloutOwner&&e.isCustomerPreview,me=e.isLoggedOutView&&!xe,he=(0,i.useContext)(c.T),ge=function(t){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return me||!xe&&((null===t||void 0===t?void 0:t.locked)||!e.current_user&&0===(null===t||void 0===t?void 0:t.collection_price)&&(!o||"paid_collections"===e.selected_tab)||o&&e.influencer_bool&&"preview"===e.current_page_view&&"paid_collections"===e.selected_tab&&"user-sub
1scribed"!==e.view_type)},{t:fe}=(0,a.Bd)(),ye=(0,q.gw)(),{currency:be}=(0,T.nm)(),[_e,ve]=(0,i.useState)(!1),[we,je]=(0,i.useState)(!1),[Ce,Se]=(0,i.useState)([]),[ke,Ae]=(0,i.useState)(!1),[Fe,De]=(0,i.useState)(null),[ze,Te]=(0,i.useState)(!1),[Ee,We]=(0,i.useState)(!1),[Re,Me]=(0,i.useState)(!1),[Ie,Pe]=(0,i.useState)(""),[Be,Le]=(0,i.useState)(!1),[Ne,Oe]=(0,i.useState)(null),[Ue,$e]=(0,i.useState)(""),[He,Ve]=(0,i.useState)(null),[Ye,Ge]=(0,i.useState)(!1),[Ze,Xe]=(0,i.useState)(!1),[Ke,Je]=(0,i.useState)(null),[qe,Qe]=(0,i.useState)(""),[et,tt]=(0,i.useState)(!1),ot=e.isDripFeedMode||(null===(t=e.state)||void 0===t?void 0:t.isDripFeedMode)||e.isProgressStatsMode||(null===(o=e.state)||void 0===o?void 0:o.isProgressStatsMode),[it,nt]=(0,i.useState)({}),[rt,st]=(0,i.useState)(null),[at,lt]=(0,i.useState)({}),[dt,ct]=(0,i.useState)(0),[pt,ut]=(0,i.useState)(null),xt=(t,o)=>{if(ye)return;const i=new FormData;i.append("content_id",t),i.append("course_id",o),w().post((0,l.wE)()+"api/influencer/community/toggle_lesson_completion",i,{withCredentials:!0}).then(o=>{if(o.data.error)return;if(e.influencer_content_list){const i=e.influencer_content_list.map(e=>e.id===t?{...e,is_completed:o.data.is_completed}:e);e.setState({influencer_content_list:i})}const i=null===gr||void 0===gr?void 0:gr[yr];if(null!==i&&void 0!==i&&i.id){const t=new FormData;t.append("course_id",i.id),w().post((0,l.wE)()+"api/influencer/load_course_chapters",t,{withCredentials:!0}).then(t=>{t.data.chapter_completion&&nt(t.data.chapter_completion),t.data.course_completion&&(st(t.data.course_completion),e.setState({_courseCompletionData:t.data.course_completion})),t.data.content_completion&&lt(t.data.content_completion),t.data.total_enrolled&&ct(t.data.total_enrolled)}).catch(()=>{})}}).catch(()=>{})},mt=`courseExamplesDismissed_${e.single_view_collection||""}`,[ht,gt]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(e.single_view_collection&&"string"===typeof e.single_view_collection&&e.single_view_collection.length>0)try{const t=`courseExamplesDismissed_${e.single_view_collection}`;gt("true"===localStorage.getItem(t))}catch{gt(!1)}},[e.single_view_collection]);const ft=()=>{gt(!0);try{localStorage.setItem(mt,"true")}catch{}},[yt,bt]=(0,i.useState)("ex-ch-1"),_t=t=>{bt(t);const o=St.findIndex(e=>e.id===t);e.setState&&e.setState({selectedExampleChapter:o>=0?o:0})},vt=(null===(r=e.influencer_info)||void 0===r?void 0:r.influencer)||e.influencer||e.influencer_name||"",wt=e.display_name||e.
1influencer_display_name||vt||"Creator",jt="https://openaccessimages.s3.eu-west-2.amazonaws.com/example_course_content",Ct={tier:0,current_tier:5,n_likes:0,n_comments:0,content_like:!1,is_favourite:!1,is_mine:!0,is_example:!0,influencer:vt,influencer_name:wt,icon_image_file:e.influencer_icon||"",pinned:!1,aspect_ratio:null,thumbnail_aspect_ratio:null,files:[],files_length:0,content_price:0,collection_price:0,downloadable:!1,content_settings:null,preview:null,description:"",scheduled_date:null,n_views:0,thumbnail_overlay_text:"",course_number:0,is_live:!1},[St,kt]=(0,i.useState)([{id:"ex-ch-1",name:fe("course.examples.chapter1","Getting Started"),drip_delay_days:0,drip_delay_unit:"days",lessons:[{...Ct,id:"ex-1",name:fe("course.examples.lesson1","Welcome & Introduction"),content_type:"vid",drip_delay_days:0,file:`${jt}/video_intro.mp4`,fileUrl:`${jt}/video_intro.mp4`,thumbnail:`${jt}/image_welcome.jpg`,text:fe("course.examples.lesson1Text","<p>Welcome to this course! Watch this intro video to learn what to expect and how to get the most out of the material.</p>"),added:new Date(Date.now()-36e5).toISOString()},{...Ct,id:"ex-2",name:fe("course.examples.lesson2","Course Overview & Goals"),content_type:"txt",drip_delay_days:0,file:null,thumbnail:null,text:fe("course.examples.lesson2Text","<p><strong>Course Overview</strong></p><p>This lesson outlines the key objectives and milestones you'll achieve throughout this course.</p><p>Set your own goals and track your progress as you work through each chapter.</p>"),added:new Date(Date.now()-72e5).toISOString()}]},{id:"ex-ch-2",name:fe("course.examples.chapter2","Core Concepts"),drip_delay_days:3,drip_delay_unit:"days",lessons:[{...Ct,id:"ex-3",name:fe("course.examples.lesson3","Key Principles"),content_type:"img",drip_delay_days:3,file:`${jt}/image_concepts.jpg`,fileUrl:`${jt}/image_concepts.jpg`,thumbnail:`${jt}/image_concepts.jpg`,files:[`${jt}/image_concepts.jpg`,`${jt}/image_gallery1.jpg`,`${jt}/image_gallery2.jpg`],files_length:3,text:fe("course.examples.lesson3Text","<p>Learn the fundamental principles that form the foundation of everything we cover in this course.</p>"),added:new Date(Date.now()-864e5).toISOString()},{...Ct,id:"ex-4",name:fe("course.examples.lesson4","Practical Workbook"),content_type:"pdf",drip_delay_days:7,file:`${jt}/workbook.pdf`,fileUrl:`${jt}/workbook.pdf`,thumbnail:`${jt}/image_exercise.jpg`,text:fe("course.examples.lesson4Text","<p>Download and work through this practical workbook to reinforce the concepts from the previous lesson.</p>"),added:new Date(Date.now()-1728e5).toISOString()},{...Ct,id:"ex-5",name:fe("course.examples.lesson5","Photo Gallery"),content_type:"img",drip_delay_days:10,file:`${jt}/image_gallery3.jpg`,fileUrl:`${jt}/image_gallery3.jpg`,thumbnail:`${jt}/image_gallery3.jpg`,files:[`${jt}/image_gallery3.jpg`,`${jt}/image_gallery4.jpg`],files_length:2,text:fe("course.examples.lesson5Text","<p>Follow along with these visual guides step by step.</p>"),added:new Date(Date.now()-2592e5).toISOString()}]},{id:"ex-ch-3",name:fe("course.examples.chapter3","Advanced Topics"),drip_delay_days:14,drip_delay_unit:"days",lessons:[{...Ct,id:"ex-6",name:fe("course.examples.lesson6","Deep Dive Session"),content_type:"aud",drip_delay_days:14,file:`${jt}/audio_deepdive.mp3`,fileUrl:`${jt}/audio_deepdive.mp3`,thumbnail:`${jt}/image_advanced.jpg`,text:fe("course.examples.lesson6Text","<p>An in-depth audio session exploring advanced techniques and strategies you can apply immediately.</p>"),added:new Date(Date.now()-3456e5).toISOString()},{...Ct,id:"ex-7",name:fe("course.examples.lesson7","Video Masterclass"),content_type:"vid",drip_delay_days:21,file:`${jt}/video_masterclass.mp4`,fileUrl:`${jt}/video_masterclass.mp4`,thumbnail:`${jt}/image_casestudy.jpg`,text:fe("course.examples.lesson7Text","<p>Watch this masterclass video covering advanced strategies.</p>"),added:new Date(Date.now()-432e6).toISOString()},{...Ct,id:"ex-8",name:fe("course.examples.lesson8","Case Study"),content_type:"txt",drip_delay_days:28,file:null,thumbnail:null,text:fe("course.examples.lesson8Text","<p><strong>Case Study</strong></p><p>Review this real-world case study to see how the concepts from this course are applied in practice.</p>"),added:new Date(Date.now()-5184e5).toISOString()}]}]),At=Math.max(0,St.findIndex(e=>e.id===yt)),Ft=e.is_me&&!ht&&!e.contentIsLoading&&!e.loading_page_change&&""!==e.single_view_collection&&("paid_collections"===e.selected_tab||"collections"===e.selected_tab||"courses"===e.selected_tab)&&(!e.course_chapters||0===e.course_chapters.length||1===e.course_chapters.length&&"_-_-other_-_-"===(null===(s=e.course_chapters[0])||void 0===s?void 0:s[0]))&&(!e.influencer_content_list||0===e.influencer_content_list.length);i.useEffect(()=>{Ft&&(nt({"ex-ch-1":{completion_rate:75,completed:3,total:2,enrolled:4},"ex-ch-2":{completion_rate:25,completed:1,total:3,enrolled:4},"ex-ch-3":{completion_rate:0,completed:0,total:3,enrolled:4}}),lt({"ex-1":{completions:4,completion_rate:100},"ex-2":{completions:3,completion_rate:75}
1,"ex-3":{completions:3,completion_rate:75},"ex-4":{completions:2,completion_rate:50},"ex-5":{completions:1,completion_rate:25},"ex-6":{completions:1,completion_rate:25},"ex-7":{completions:0,completion_rate:0},"ex-8":{completions:0,completion_rate:0}}),ct(4))},[Ft]);const Dt=async()=>{if(Ue.trim()&&Ne&&null!==He){Ge(!0);try{const t=new FormData;t.append("chapter_id",Ne),t.append("chapter_name",Ue.trim()),t.append("course_name",e.single_view_collection);const o=await w()({method:"post",url:Q.BACKEND_URL+"api/influencer/community/update_course_chapter_name",data:t,headers:{"Content-type":"application/json"},withCredentials:!0});if(o.data.success&&!o.data.error){const t=e.course_chapters||[],o=t.map((e,t)=>t===He?Array.isArray(e)?[Ue.trim(),e[1]]:"object"===typeof e?{...e,chapter_name:Ue.trim(),name:Ue.trim()}:Ue.trim():e);e.setState&&e.setState({course_chapters:o});const i=t[He],n=(e=>Array.isArray(e)?e[0]:"object"===typeof e?e.chapter_name||e.name||"":e)(i);e.selected_chapter===n&&e.handleCollectionTabChange&&e.handleCollectionTabChange(null,e.single_view_collection,e.selected_tab,null,null,null,Ue.trim()),Le(!1),Oe(null),$e(""),Ve(null)}else alert(o.data.error||"Failed to update chapter name")}catch(t){console.error("Error updating chapter name:",t),alert(fe("influencer.snackbar.chapterUpdateError"))}finally{Ge(!1)}}},zt=e=>{if(!e||0===e.length)return{regularChapters:[],otherChapter:null};const t=[];let o=null;return e.forEach(e=>{let i,n;Array.isArray(e)?(i=e[0],n=e):"string"===typeof e?(i=e,n=[e,null]):(i=e.chapter_name||e.name||"",n=[i,e.id||e.chapter_id||null]),"_-_-other_-_-"===i?o=n:t.push(n)}),{regularChapters:t,otherChapter:o}},Tt=e=>"_-_-other_-_-"===e?"Other":e;(0,i.useEffect)(()=>{if(ze&&e.course_chapters&&e.course_chapters.length>0){const{regularChapters:t}=zt(e.course_chapters||[]);if(0===Ce.length||Ce.length!==t.length){const e=t.map(e=>Array.isArray(e)?[...e]:e);Se(e)}}},[ze,e.course_chapters]);const[Et,Wt]=(0,i.useState)(!1),[Rt,Mt]=(0,i.useState)(!1),[It,Pt]=(0,i.useState)(!1),[Bt,Lt]=(0,i.useState)(!1),[Nt,Ot]=(0,i.useState)(!1),[Ut,$t]=(0,i.useState)(200),[Ht,Vt]=(0,i.useState)("2.00"),[Yt,Gt]=(0,i.useState)(1e4),[Zt,Xt]=(0,i.useState)(""),[Kt,Jt]=(0,i.useState)(!1),[qt,Qt]=(0,i.useState)(!1),[eo,to]=(0,i.useState)(!1),[oo,io]=(0,i.useState)(0),[no,ro]=(0,i.useState)(!1),[so,ao]=(0,i.useState)(!1),[lo,co]=(0,i.useState)(!1),[po,uo]=(0,i.useState)(!1),[xo,mo]=(0,i.useState)(!1),[ho,go]=(0,i.useState)(""),[fo,yo]=(0,i.useState)(0),[bo,_o]=(0,i.useState)([]),[vo,wo]=(0,i.useState)(""),[jo,Co]=(0,i.useState)(""),[So,ko]=(0,i.useState)(!1),[Ao,Fo]=(0,i.useState)(!1),[Do,zo]=(0,i.useState)(0),[To,Eo]=(0,i.useState)(""),[Wo,Ro]=(0,i.useState)([]),[Mo,Io]=(0,i.useState)(0),[Po,Bo]=(0,i.useState)(""),[Lo,No]=(0,i.useState)(""),[Oo,Uo]=(0,i.useState)(!1),[$o,Ho]=(0,i.useState)(!1),[Vo,Yo]=(0,i.useState)(0),[Go,Zo]=(0,i.useState)(""),[Xo,Ko]=(0,i.useState)([]),[Jo,qo]=(0,i.useState)(0),[Qo,ei]=(0,i.useState)(""),[ti,oi]=(0,i.useState)(""),[ii,ni]=(0,i.useState)(!1),[ri,si]=(0,i.useState)(!1),[ai,li]=(0,i.useState)(0),[di,ci]=(0,i.useState)(""),[pi,ui]=(0,i.useState)([]),[xi,mi]=(0,i.useState)(0),[hi,gi]=(0,i.useState)(""),[fi,yi]=(0,i.useState)(""),[bi,_i]=(0,i.useState)(!1),[vi,wi]=(0,i.useState)(!1),[ji,Ci]=(0,i.useState)(!1),[Si,ki]=(0,i.useState)(!1),[Ai,Fi]=(0,i.useState)(!1),[Di,zi]=(0,i.useState)("1 year"),[Ti,Ei]=(0,i.useState)(be||"GBP"),[Wi,Ri]=(0,i.useState)("\xa3"),[Mi,Ii]=(0,i.useState)(""),[Pi,Bi]=(0,i.useState)(!1),[Li,Ni]=(0,i.useState)(""),[Oi,Ui]=(0,i.useState)(),[$i,Hi]=(0,i.useState)(""),[Vi,Yi]=(0,i.useState)([]),[Gi,Zi]=(0,i.useState)(""),[Xi,Ki]=(0,i.useState)(""),[Ji,qi]=(0,i.useState)(0),[Qi,en]=(0,i.useState)(!0),[tn,on]=(0,i.useState)(!0),[nn,rn]=(0,i.useState)(!0),[sn,an]=(0,i.useState)(!0),[ln,dn]=(0,i.useState)(""),[cn,pn]=(0,i.useState)(!1),[un,xn]=(0,i.useState)("1 year"),[mn,hn]=(0,i.useState)(""),[gn,fn]=(0,i.useState)(""),[yn,bn]=(0,i.useState)(""),[_n,vn]=(0,i.useState)(!1),[wn,jn]=(0,i.useState)(!1),[Cn,Sn]=(0,i.useState)(!1),[kn,An]=(0,i.useState)(0),[Fn,Dn]=(0,i.useState)(!1),[zn,Tn]=(0,i.useState)(0),[En,Wn]=(0,i.useState)(0),[Rn,Mn]=(0,i.useState)(!1),[In,Pn]=(0,i.useState)(!1),[Bn,Ln]=(0,i.useState)([]),[Nn,On]=(0,i.useState)(!1),[Un,$n]=(0,i.useState)(""),[Hn,
1Vn]=(0,i.useState)(""),[Yn,Gn]=(0,i.useState)(""),[Zn,Xn]=(0,i.useState)(null),[Kn,Jn]=(0,i.useState)(0),[qn,Qn]=(0,i.useState)(0),[er,tr]=(0,i.useState)(""),[or,ir]=(0,i.useState)(!1),[nr,rr]=(0,i.useState)(""),[sr,ar]=(0,i.useState)(""),[lr,dr]=(0,i.useState)(""),[cr,pr]=(0,i.useState)(""),[ur,xr]=(0,i.useState)(1),[mr,hr]=(0,i.useState)(!0),[gr,fr]=(0,i.useState)(""),[yr,br]=(0,i.useState)(0),_r=(0,i.useMemo)(()=>{var e,t,o,i,n;if(!Array.isArray(gr)||yr<0)return null;const r=gr[yr];return r?{...r,course_name:r.course_name||r.name||"",name:r.course_name||r.name||"",description:r.description||r.product_sales_description||r.subtitle||"",subtitle:r.subtitle||r.description||r.product_sales_description||"",collection_price:null!==(e=null!==(t=r.collection_price)&&void 0!==t?t:r.price)&&void 0!==e?e:0,price:null!==(o=null!==(i=r.collection_price)&&void 0!==i?i:r.price)&&void 0!==o?o:0,compare_at_price:r.compare_at_price||0,compare_at_price_2:r.compare_at_price_2||0,files:r.files||r.sales_files||[],sales_files:r.sales_files||r.files||[],files_type:r.files_type||r.sales_file_types||[],sales_file_types:r.sales_file_types||r.files_type||[],collection_thumbnail:r.collection_thumbnail||r.thumbnail||r.product_thumbnail,thumbnail:r.thumbnail||r.collection_thumbnail||r.product_thumbnail,product_thumbnail:r.product_thumbnail||r.collection_thumbnail,content_count:null!==(n=r.content_count)&&void 0!==n?n:0,content_list:Array.isArray(r.content_list)?r.content_list:[],access:!1,access_duration:r.access_duration,access_duration_type:r.access_duration_type,cta_button_text:r.cta_button_text||r.button_text||"",password_required:r.password_required||!1}:null},[gr,yr]);(0,i.useEffect)(()=>{e.collection_data&&("paid_collections"===e.selected_tab&&(e.mobilePreview||me&&e.previewRolloutOwner)?fr([...e.collection_data.map(e=>({...e,locked:!0}))]):fr([...e.collection_data]))},[e.collection_data,e.single_view_collection,e.selected_tab,e.mobilePreview,me,e.previewRolloutOwner]),(0,i.useEffect)(()=>{if(e.influencer_content_list&&e.influencer_content_list.length>0){if(me&&e.previewRolloutOwner)Ln(e.influencer_content_list.map(e=>({...e,current_tier:-1,is_mine:!1,access:!1})));else if(e.mobilePreview){const t=e.influencer_content_list.map(e=>({...e,current_tier:-1}));Ln(t)}else Ln(e.influencer_content_list);hr(!1)}else hr(!0),Ln([])},[e.influencer_content_list,me,e.previewRolloutOwner,e.mobilePreview]),(0,i.useEffect)(()=>{e.setState({collectionContentReorderData:Bn.map(e=>e.id)})},[Bn]),(0,i.useEffect)(()=>{const t=Array.isArray(gr)?gr.findIndex(t=>t.course_name===e.single_view_collection||t.name===e.single_view_collection||String(t.id)===String(e.single_view_collection)):-1;br(t);const o=gr[t];Xn(null===o||void 0===o?void 0:o.id),Jn((null===o||void 0===o?void 0:o.price)||(null===o||void 0===o?void 0:o.collection_price)||0),Qn((null===o||void 0===o?void 0:o.compare_at_price)||0),tr((null===o||void 0===o?void 0:o.course_name)||(null===o||void 0===o?void 0:o.name))},[gr,e.single_view_collection]),(0,i.useEffect)(()=>{if(Ft)return;const t=null===gr||void 0===gr?void 0:gr[yr];if(null!==t&&void 0!==t&&t.id&&e.single_view_collection){const o=new FormData;o.append("course_id",t.id),w().post((0,l.wE)()+"api/influencer/load_course_chapters",o,{withCredentials:!0}).then(t=>{t.data.chapter_completion&&nt(t.data.chapter_completion),t.data.course_completion&&(st(t.data.course_completion),e.setState({_courseCompletionData:t.data.course_completion})),t.data.content_completion&&lt(t.data.content_completion),t.data.total_enrolled&&ct(t.data.total_enrolled)}).catch(()=>{})}},[gr,yr,Ft]),(0,i.useEffect)(()=>{if(Ft)return;const t=null===gr||void 0===gr?void 0:gr[yr];if(e.is_me&&null!==t&&void 0!==t&&t.id&&e.single_view_collection&&null!==t&&void 0!==t&&t.progress_tracking_enabled){const e=new FormData;e.append("course_id",t.id),w().post((0,l.wE)()+"api/influencer/community/load_progress_stats",e,{withCredentials:!0}).then(e=>{e.data.success&&e.data.course_stats&&ut(e.data.course_stats)}).catch(()=>{})}},[gr,yr,e.single_view_collection]);const vr=e=>{const t=Number(e);return Number.isFinite(t)?t:null},wr=Boolean(""!==e.single_view_collection&&null!==e.single_view_collection&&void 0!==e.single_view_collection),jr=!me&&Boolean(xe||e.is_me||!0===(null===(b=e.influencer_info)||void 0===b?void 0:b.access)||"number"===typeof e.current_tier&&e.current_tier>=0||"number"===typeof(null===(v=e.influencer_info)||void 0===v?void 0:v.current_tier)&&e.influencer_info.current_tier>=0),Cr=(t=>{if(e.is_me)return null;const o=(null===(t=e.influencer_info)||void 0===t?void 0:t.influencer)||e.influencer||e.influencer_name||("undefined"!==typeof window?window.location.pathname.split("/").filter(
1Boolean)[0]:"");if(!o)return null;if("sub_posts"===e.selected_tab||"posts"===e.selected_tab||"membership"===e.selected_tab||"all"===e.selected_tab){var i,n,r,s,a,l,d;const t=e.single_view_membership&&"object"===typeof e.single_view_membership,c=t?null!==(i=e.single_view_membership.affiliate_enabled)&&void 0!==i?i:null===(n=e.influencer_info)||void 0===n?void 0:n.membership_affiliate_enabled:null===(r=e.influencer_info)||void 0===r?void 0:r.membership_affiliate_enabled;if(!1===c)return null;if(!t&&!0!==c)return null;const p="number"===typeof(null===(s=e.influencer_info)||void 0===s?void 0:s.current_tier)?e.influencer_info.current_tier:null,u=null!==p&&p>=1&&p<=3?p:null,x=null!=(null===(a=e.single_view_membership)||void 0===a?void 0:a.tier)?e.single_view_membership.tier:null,m="number"===typeof e.current_tier&&e.current_tier>=1&&e.current_tier<=3?e.current_tier:"number"===typeof e.subpopup_tier_overwrite&&e.subpopup_tier_overwrite>=1&&e.subpopup_tier_overwrite<=3?e.subpopup_tier_overwrite:null;return{productType:"membership",productId:null!==(l=null!==(d=null!==u&&void 0!==u?u:x)&&void 0!==d?d:m)&&void 0!==l?l:1,productName:e.posts_name||"Membership",influencer:o}}if("paid_posts"===e.selected_tab||"digital_products"===e.selected_tab){var c;const t=Array.isArray(Bn)?Bn.find(e=>null!==vr(null===e||void 0===e?void 0:e.id)):null,i=vr(null!==(c=e.single_view_digital_product)&&void 0!==c?c:null===t||void 0===t?void 0:t.id);if(null===i)return null;const n=[Array.isArray(Bn)?Bn.find(e=>vr(null===e||void 0===e?void 0:e.id)===i):null,t].filter(Boolean),r=n[0]||null;if(!r)return null;const s=n.find(e=>Object.prototype.hasOwnProperty.call(e,"affiliate_enabled"));return!1===(null===s||void 0===s?void 0:s.affiliate_enabled)?null:{productType:"digital_product",productId:i,productName:(null===r||void 0===r?void 0:r.name)||(null===r||void 0===r?void 0:r.title)||e.digital_products_name||"Digital Product",influencer:o}}if(("paid_collections"===e.selected_tab||"collections"===e.selected_tab||"courses"===e.selected_tab)&&wr){var p;const t=Array.isArray(gr)&&yr>=0?gr[yr]:null,i=Array.isArray(gr)?gr.find(e=>null!==vr(null===e||void 0===e?void 0:e.id)):null,n=t||i,r=vr(null!==(p=e.collection_id)&&void 0!==p?p:null===n||void 0===n?void 0:n.id);return null===r?null:n?!0!==n.affiliate_enabled?null:{productType:"course",productId:r,productName:(null===n||void 0===n?void 0:n.course_name)||(null===n||void 0===n?void 0:n.name)||e.courses_name||"Course",influencer:o}:null}return null})(),Sr=Boolean(!e.is_me&&e.windowWidth>=1280&&("sub_posts"===e.selected_tab||"posts"===e.selected_tab||"membership"===e.selected_tab||"all"===e.selected_tab||("paid_collections"===e.selected_tab||"collections"===e.selected_tab||"courses"===e.selected_tab)&&wr)&&(null===Cr||void 0===Cr?void 0:Cr.influencer)&&("membership"!==(null===Cr||void 0===Cr?void 0:Cr.productType)||jr)),kr=(()=>{if(e.is_me||e.isLoggedOutView)return null;if("paid_posts"===e.selected_tab||"digital_products"===e.selected_tab){var t;const o=(null===(t=e.influencer_info)||void 0===t?void 0:t.influencer)||e.influencer||e.influencer_name||("undefined"!==typeof window?window.location.pathname.split("/").filter(Boolean)[0]:"");return o?{productType:"digital_product",influencer:o,productName:e.digital_products_name||"Digital Product"}:null}const o="storefront"!==e.pageLayoutType&&"storefront"!==e.pageLayoutTypeUpdated,i="sub_posts"===e.selected_tab||"sub_collections"===e.selected_tab||"membership"===e.selected_tab||"posts"===e.selected_tab||"all"===e.selected_tab;if(o&&i&&"membership"===(null===Cr||void 0===Cr?void 0:Cr.productType)&&null!==Cr&&void 0!==Cr&&Cr.influencer)return{productType:Cr.productType,productId:Cr.productId,influencer:Cr.influencer,productName:Cr.productName||e.posts_name||"Membership"};const n="paid_collections"===e.selected_tab||"collections"===e.selected_tab||"courses"===e.selected_tab;return o&&n&&wr&&"course"===(null===Cr||void 0===Cr?void 0:Cr.productType)&&null!==Cr&&void 0!==Cr&&Cr.influencer?{productType:Cr.productType,productId:Cr.productId,influencer:Cr.influencer,productName:Cr.productName||e.courses_name||"Course"}:null})();(0,i.useEffect)(()=>{xr(Math.ceil(e.content_list_length/20))},[e.content_list_length]);(0,i.useEffect)(()=>{"membership"===e.selected_tab&&Br()},[e.selected_tab]);const[Ar,Fr]=(0,i.useState)(!1);(0,i.useEffect)(()=>{"all"!==e.selected_tab&&"sub_posts"!==e.selected_tab&&"paid_posts"!==e.selected_tab||"all"===e.category_filter&&"latest"===e.sort_filter&&"all"===e.content_filter&&-1===e.tier_filter?"all"!==e.category_filter||"latest"!==e.sort_filter||"all"!==e.content_filter?Fr(!0):Fr(!1):Fr(!0)},[e.category_filter,e.sort_filter,e.content_filter,e.tier_filter,e.selected_tab]);const Dr=t=>{const o=new FormData;o.append("value",t),w()({method:"post",url:Q.BACKEND_URL+"api/influencer/update_free_active",data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(o=>{if(!o.data.error){ro(t);let o={...e.influencer_info};
1o.free_active=t,e.setState({influencer_info:o})}})},zr=()=>{Ei(Ti);const e=new FormData;e.append("currency",Ti),w()({method:"post",url:Q.BACKEND_URL+"api/influencer/load_dm_settings",data:e,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{e.data.error||(Ot(e.data.active),$t(e.data.minimum_price),Vt((0,z.A)(e.data.minimum_price,Ti,!1)),Gt(e.data.maximum_message_length),Lt(!0),"GBP"==Ti?(Ri("\xa3"),Ii("")):"EUR"==Ti?(Ri("\u20ac"),Ii("")):"USD"==Ti?(Ri("$"),Ii("")):"SEK"==Ti?(Ri(""),Ii(" kr")):"AUD"==Ti?(Ri("AU$"),Ii("")):"CAD"==Ti?(Ri("CA$"),Ii("")):"NZD"==Ti&&(Ri("NZ$"),Ii("")))})},Tr=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Pt(!1),!0===e?(Ni(4),Ui(3),Hi(di),Yi(pi),qi(xi),Zi(hi),Ki(fi),en(bi),on(vi),rn(Si),an(Ai),pn(ji),xn(Di),dn((0,z.A)(hi,Ti,!1)),hn((0,z.A)(fi,Ti,!1)),fn(""),bn("")):0==so?(Ni(1),Ui(0),Hi(ho),Yi(bo),qi(fo),Zi(vo),Ki(jo),en(So),on(Ao),dn((0,z.A)(vo,Ti,!1)),hn((0,z.A)(jo,Ti,!1)),fn(""),bn(""),An(Do)):0==lo?(Ni(2),Ui(1),Hi(To),Yi(Wo),qi(Mo),Zi(Po),Ki(Lo),en(Oo),on($o),dn((0,z.A)(Po,Ti,!1)),hn((0,z.A)(Lo,Ti,!1)),fn(""),bn(""),An(Vo)):0==po&&(Ni(3),Ui(2),Hi(Go),Yi(Xo),qi(Jo),Zi(Qo),Ki(ti),en(ii),on(ri),dn((0,z.A)(Qo,Ti,!1)),hn((0,z.A)(ti,Ti,!1)),fn(""),bn(""),An(ai)),Wt(!0)},Er=e=>{Pt(!0),4===e?(Ni(4),Ui(3),Hi(di),Yi(pi),qi(xi),Zi(hi),Ki(fi),en(bi),on(vi),rn(Si),an(Ai),pn(ji),xn(Di),dn((0,z.A)(hi,Ti,!1)),hn((0,z.A)(fi,Ti,!1)),fn(""),bn("")):1===e?(Ni(1),Ui(0),Hi(ho),Yi(bo),qi(fo),Zi(vo),Ki(jo),en(So),on(Ao),dn((0,z.A)(vo,Ti,!1)),hn((0,z.A)(jo,Ti,!1)),fn(""),bn(""),An(Do)):2===e?(Ni(2),Ui(1),Hi(To),Yi(Wo),qi(Mo),Zi(Po),Ki(Lo),en(Oo),on($o),dn((0,z.A)(Po,Ti,!1)),hn((0,z.A)(Lo,Ti,!1)),fn(""),bn(""),An(Vo)):3===e&&(Ni(3),Ui(2),Hi(Go),Yi(Xo),qi(Jo),Zi(Qo),Ki(ti),en(ii),on(ri),dn((0,z.A)(Qo,Ti,!1)),hn((0,z.A)(ti,Ti,!1)),fn(""),bn(""),An(ai)),Wt(!0)},Wr=(e,t)=>{let o=[...Vi];o[t]=e,Yi(o),qi(o.filter(e=>""!==e).length)};const Rr=(t,o,i)=>{if(1===Li&&e.waiting_list_influencer){const e=new URL(window.location.href);e.searchParams.has("new_membership")||(e.searchParams.set("new_membership","true"),window.history.pushState({},"",e))}let n=o.filter(e=>void 0!==e.name);t.preventDefault(),Sn(!0);const r=new FormData;r.append("tier_num",Li),r.append("tier_name",$i),r.append("month_price",Gi),r.append("annual_price",Xi),r.append("month_active",tn),r.append("annual_active",Qi),4===Li&&(r.append("async_price_2_rebill",cn),r.append("async_price_2_time",un),r.append("tier_hidden",nn),r.append("tier_apply",sn)),r.append("currency",Ti);const s=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value};for(let e=0;e<4;e++)e<n.length?"Custom benefit - write your own"===n[e].name?r.append(`perksText${e+1}`,s(n[e].customBenefitName)):"Paid messages"===n[e].name?r.append(`perksText${e+1}`,s(i+" "+n[e].paidMessagesTitleType)):r.append(`perksText${e+1}`,s(n[e].name)):r.append(`perksText${e+1}`,"");r.append("n_messages",i);w()({method:"post",url:Q.BACKEND_URL+"api/update_tier_info_v2",data:r,headers:{"Content-type":"application/json"},withCredentials:!0}).then(t=>{t.data.access_denied||t.data.error||(Br(),Wt(!1),vn(!1),e.handleCloseTiers(),Mt(!1))}),Sn(!1)},Mr=(e,t)=>{e.preventDefault();const o=new FormData;o.append("trial_length",t),w()({method:"post",url:Q.BACKEND_URL+"api/settings_update_trial_length",data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(e=>{!e.data.access_denied&&e.data.error})},Ir=e=>{let t=[...Vi];t.splice(e,1),t.push(""),Yi(t),qi(t.filter(e=>""!==e).length)},Pr=t=>{Sn(!0),t.preventDefault();const o=new FormData;o.append("tier_num",Li),w()({method:"post",url:Q.BACKEND_URL+"api/make_influencer_tier_inactive",data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(t=>{t.data.access_denied||t.data.error||(Br(),Wt(!1),vn(!1),jn(!1),e.handleCloseTiers(),Mt(!1))}),Sn(!1)};function Br(){Sn(!0),Ei(Ti);let t=new FormData;t.append("currency",Ti),w()({method:"post",url:Q.BACKEND_URL+"api/get_influencer_tier_info",data:t,headers:{"Content-type":"application/json"},withCredentials:!0}).then(t=>{t.data.free_tier_active?ro(!0):ro(!1),t.data.bronze_tier_active?ao(!0):ao(!1),t.data.silver_tier_active?co(!0):co(!1),t.data.gold_tier_active?uo(!0):uo(!1),t.data.async_t
1ier_active?mo(!0):mo(!1),e.setTrialLength(t.data.trial_length),go(t.data.bronze_tier_name),_o(t.data.bronze_perks_text.map(e=>""===e?void 0:e)),yo(t.data.bronze_perks_text.filter(e=>""!==e).length),wo(t.data.bronze_price),Co(t.data.bronze_annual_price),ko(t.data.bronze_annual_active),Fo(t.data.bronze_monthly_active),zo(t.data.bronze_n_messages),Eo(t.data.silver_tier_name),Io(t.data.silver_perks_text.filter(e=>""!==e).length),Ro(t.data.silver_perks_text.map(e=>""===e?void 0:e)),Bo(t.data.silver_price),No(t.data.silver_annual_price),Uo(t.data.silver_annual_active),Ho(t.data.silver_monthly_active),Yo(t.data.silver_n_messages),Zo(t.data.gold_tier_name),Ko(t.data.gold_perks_text.map(e=>""===e?void 0:e)),qo(t.data.gold_perks_text.filter(e=>""!==e).length),ei(t.data.gold_price),oi(t.data.gold_annual_price),ni(t.data.gold_annual_active),si(t.data.gold_monthly_active),li(t.data.gold_n_messages),ci(t.data.async_tier_name),ui(t.data.async_perks_text.map(e=>""===e?void 0:e)),mi(t.data.async_perks_text.filter(e=>""!==e).length),gi(t.data.async_price),yi(t.data.async_annual_price),_i(t.data.async_annual_active),wi(t.data.async_monthly_active),ki(t.data.async_tier_hidden),Fi(t.data.async_tier_apply),Ci(t.data.async_price_2_rebill),"GBP"==Ti?(Ri("\xa3"),Ii("")):"EUR"==Ti?(Ri("\u20ac"),Ii("")):"USD"==Ti?(Ri("$"),Ii("")):"SEK"==Ti?(Ri(""),Ii(" kr")):"AUD"==Ti?(Ri("AU$"),Ii("")):"CAD"==Ti?(Ri("CA$"),Ii("")):"NZD"==Ti&&(Ri("NZ$"),Ii("")),e.setState({tiersModal:!0}),1===t.data.async_price_2_time_length&&"year"===t.data.async_price_2_time_type?zi("1 year"):1===t.data.async_price_2_time_length&&"week"===t.data.async_price_2_time_type?zi("1 week"):2===t.data.async_price_2_time_length&&"week"===t.data.async_price_2_time_type?zi("2 weeks"):3===t.data.async_price_2_time_length&&"week"===t.data.async_price_2_time_type?zi("3 weeks"):4===t.data.async_price_2_time_length&&"week"===t.data.async_price_2_time_type?zi("4 weeks"):6===t.data.async_price_2_time_length&&"week"===t.data.async_price_2_time_type?zi("6 weeks"):8===t.data.async_price_2_time_length&&"week"===t.data.async_price_2_time_type?zi("8 weeks"):10===t.data.async_price_2_time_length&&"week"===t.data.async_price_2_time_type?zi("10 weeks"):12===t.data.async_price_2_time_length&&"week"===t.data.async_price_2_time_type?zi("12 weeks"):1===t.data.async_price_2_time_length&&"month"===t.data.async_price_2_time_type?zi("1 month"):2===t.data.async_price_2_time_length&&"month"===t.data.async_price_2_time_type?zi("2 months"):3===t.data.async_price_2_time_length&&"month"===t.data.async_price_2_time_type?zi("3 months"):6===t.data.async_price_2_time_length&&"month"===t.data.async_price_2_time_type?zi("6 months"):100===t.data.async_price_2_time_length&&"year"===t.data.async_price_2_time_type&&zi("forever")}),Sn(!1)}(0,i.useEffect)(()=>{const t=t=>{27===t.keyCode&&(e.setState({openProfileWhatsThis:!1}),e.setState({openOfferingWhatsThis:!1}),e.setState({openWaitingListWhatsThis:!1}),e.setState({openCallWhatsThis:!1}),e.setState({openContentWhatsThis:!1}),e.setState({openStripeWhatsThis:!1}),e.setState({openUrlWhatsThis:!1}),e.setState({openEditUrl:!1}),e.setState({openRefCalcWhatsThis:!1}))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[]),(0,i.useEffect)(()=>{!0===Rn&&(window.location.assign(window.location.href.split("#")[0]+"#checklist_waitlist"),e.setState({expandedDashboard:"dashboard"}),Mn(!1))},[Rn]),(0,i.useEffect)(()=>{let t=0;null!==e.missingProfiles&&0===e.missingProfiles.length&&(t+=1),!0===e.updatedPerks&&(t+=1),!0===e.uploadedContent&&(t+=1),!0===e.setupStripe&&(t+=1),e.setState({progressCount:t})},[e.setupStripe,e.updatedPerks,e.uploadedContent,e.sharedWaitingList,e.missingProfiles]),(0,i.useEffect)(()=>{if(0===e.tierChangeOptions.length)e.setState({tierText:""});else if(e.windowWidth<=1200)e.setState({tierText:"Setup your tiers and perks"});else{let t="";for(let o=0;o<e.tierChangeOptions.length;o++)t=0===o?"You can still "+e.tierChangeOptions[0]:o===e.tierChangeOptions.length-1?t+" and "+e.tierChangeOptions[o]:t+", "+e.tierChangeOptions[o];e.setState({tierText:t})}},[e.missingProfiles]),(0,i.useEffect)(()=>
1{if(null!==e.missingProfiles)if(0===e.missingProfiles.length)e.setState({missingText:""});else{if(e.windowWidth<=1200)e.setState({missingText:fe("dashboard.home.makeProfileStandOut")});else{let t="";const o=e=>fe({"profile photo":"dashboard.home.profilePhoto","header photo":"dashboard.home.headerPhoto","Short Bio":"dashboard.home.shortBio","Display Name":"dashboard.home.displayName"}[e]||e);for(let i=0;i<e.missingProfiles.length;i++)t=0===i?fe("dashboard.home.addYour")+" "+o(e.missingProfiles[0]):i===e.missingProfiles.length-1?t+" "+fe("dashboard.home.and")+" "+o(e.missingProfiles[i]):t+", "+o(e.missingProfiles[i]);e.setState({missingText:t})}}},[e.missingProfiles,fe]),(0,i.useEffect)(()=>{const t=t=>{27===t.keyCode&&(e.setRewatchVideoModal(!1),e.setState({tiersModal:!1}),e.setState({publishModal:!1}),e.setStripeModal(!1),e.setState({confettiModal:!1}))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[]);const[Lr,Nr]=(0,i.useState)(0),[Or,Ur]=(0,i.useState)(["Free",e.subscribe_popup_bronze_name,e.subscribe_popup_silver_name,e.subscribe_popup_gold_name,e.subscribe_popup_async_name]),$r=!0===e.is_me?"0px":"62px",[Hr,Vr]=(0,i.useState)(["Free"]),[Yr,Gr]=(0,i.useState)(["Free"]);(0,i.useEffect)(()=>{e.isExtraSmallDevice?Nr(1):e.isSmallDevice||e.isMediumDevice?Nr(2):e.isLargeDevice?Nr(3):e.isXLargeDevice&&Nr(4)},[e.isExtraSmallDevice,e.isSmallDevice,e.isMediumDevice,e.isLargeDevice,e.isXLargeDevice]),(0,i.useEffect)(()=>{let t=["Free"],o=["Free"];!0===e.subscribe_popup_bronze_active&&(t.push(e.subscribe_popup_bronze_name),o.push(e.subscribe_popup_bronze_name)),!0===e.subscribe_popup_silver_active&&(t.push(e.subscribe_popup_silver_name),o.push(e.subscribe_popup_silver_name)),!0===e.subscribe_popup_gold_active&&(t.push(e.subscribe_popup_gold_name),o.push(e.subscribe_popup_gold_name)),!0===e.subscribe_popup_async_active&&t.push(e.subscribe_popup_async_name),Vr(t),Gr(o),Ur(["Free",e.subscribe_popup_bronze_name,e.subscribe_popup_silver_name,e.subscribe_popup_gold_name,e.subscribe_popup_async_name])},[e.subscribe_popup_bronze_active,e.subscribe_popup_silver_active,e.subscribe_popup_gold_active,e.subscribe_popup_async_active,e.subscribe_popup_bronze_name,e.subscribe_popup_silver_name,e.subscribe_popup_gold_name,e.subscribe_popup_async_name]),(0,i.useEffect)(()=>{gr&&hr(!1)},[gr,e.single_view_collection]);const Zr=(0,i.useRef)(null),Xr=(0,i.useRef)(!1);(0,i.useEffect)(()=>{const t="app"===e.pageLayoutType||"app"===e.pageLayoutTypeUpdated,o=e.single_view_url_product&&"urls"===e.selected_tab,i=e.single_view_url_product?Number(e.single_view_url_product):null;if(!i||!t||!o)return void(i||(Zr.current=null));if(Zr.current===i||Xr.current)return;const n=e.single_view_url_product_item&&Number(e.single_view_url_product_item.id)===i,r=n&&e.single_view_url_product_item.sales_files&&Array.isArray(e.single_view_url_product_item.sales_files)&&e.single_view_url_product_item.sales_files.length>0,s=n&&e.single_view_url_product_item.product_sales_description&&""!==e.single_view_url_product_item.product_sales_description.trim();if(!n||!r||!s){var a;Xr.current=!0;const t=new FormData;t.append("currency",e.currency||"USD");const o=e.influencer||(null===(a=e.influencer_info)||void 0===a?void 0:a.influencer)||e.influencer_name;w()({method:"post",url:(0,l.wE)()+"api/influencer/storefront_initial_data/"+o,data:t,headers:{"Content-type":"application/json"},withCredentials:!0}).then(t=>{var o;const n=((null===(o=t.data.data)||void 0===o?void 0:o.urls)||[]).find(e=>Number(e.id)===i);if(n&&e.setState){const t={...n};
1if(t.sales_files&&Array.isArray(t.sales_files)&&t.sales_files.length>0){const e=Q.CONTENT_CLOUDFRONT||("localhost"===window.location.hostname?"http://localhost:4566/fitwith/":"https://cdn.withme.so/"),o=t.sales_files.map(t=>{if(!t||"string"!==typeof t)return t;const o=t.trim();if(o.startsWith("http://")||o.startsWith("https://"))return o;if(o.startsWith("null")){const e="localhost"===window.location.hostname?"http://localhost:4566/fitwith/":"https://cdn.withme.so/";return o.replace(/^null/,e)}return e+(e.endsWith("/")?"":"/")+o});t.sales_files=o}e.setState({single_view_url_product_item:t})}Zr.current=i,Xr.current=!1}).catch(e=>{console.error("Error fetching URL product data for app view:",e),Xr.current=!1})}else Zr.current=i;null!==Zr.current&&Zr.current!==i&&(Zr.current=null)},[e.single_view_url_product,e.selected_tab,e.pageLayoutType,e.pageLayoutTypeUpdated,e.currency,e.influencer,null===(L=e.influencer_info)||void 0===L?void 0:L.influencer,e.influencer_name,null===(oe=e.single_view_url_product_item)||void 0===oe?void 0:oe.id,e.setState]);const Kr=e.single_view_url_product&&e.influencer_content_list?e.influencer_content_list.find(t=>Number(t.id)===Number(e.single_view_url_product)):null,Jr=!Kr&&e.single_view_url_product_item?{...e.single_view_url_product_item,text:e.single_view_url_product_item.text||e.single_view_url_product_item.url,content_price:void 0!==e.single_view_url_product_item.content_price?e.single_view_url_product_item.content_price:e.single_view_url_product_item.price}:null,qr=Kr||Jr,Qr=e.single_view_url_product_item&&Number(e.single_view_url_product_item.id)===Number(e.single_view_url_product)?e.single_view_url_product_item:null,es=qr?{...qr,sales_f
1iles:(null===Qr||void 0===Qr?void 0:Qr.sales_files)||qr.sales_files,sales_file_types:(null===Qr||void 0===Qr?void 0:Qr.sales_file_types)||qr.sales_file_types,product_sales_description:(null===Qr||void 0===Qr?void 0:Qr.product_sales_description)||qr.product_sales_description,subtitle:(null===Qr||void 0===Qr?void 0:Qr.subtitle)||qr.subtitle,thumbnail:(null===Qr||void 0===Qr?void 0:Qr.button_image)||(null===Qr||void 0===Qr?void 0:Qr.product_thumbnail)||qr.thumbnail}:null;if(!!es&&!e.is_me){var ts,os,is,ns;const t=(null===(ts=e.designProperties)||void 0===ts?void 0:ts.brandColorUpdated)||(null===(os=e.designProperties)||void 0===os?void 0:os.brandColor)||"var(--brand-color)",o=!("storefront"===e.pageLayoutType||"storefront"===e.pageLayoutTypeUpdated);return(0,n.jsx)(A.default,{windowWidth:e.windowWidth,influencer:e.influencer,influencer_icon:e.influencer_icon,currency:e.currency,current_user:e.current_user,display_name:e.display_name,influencer_name:e.influencer_name,connected_stripe_account_id:e.connected_stripe_account_id||(null===(is=e.influencer_info)||void 0===is?void 0:is.connected_stripe_account_id),stripe_direct_charge_account_id:e.stripe_direct_charge_account_id||(null===(ns=e.influencer_info)||void 0===ns?void 0:ns.stripe_direct_charge_account_id),setState:e.setState,productName:es.name,productId:es.id,productUrl:es.text,currentProductInfo:{...es,files:es.sales_files||es.files||[],files_type:es.sales_file_types||es.files_type||[],description:es.product_sales_description||es.description||es.subtitle||es.content||"",free:0===es.content_price,access_duration:es.access_duration||null,access_duration_type:es.access_duration_type||null,is_coaching_call:"urc"===es.content_type||"urw"===es.content_type},accessToCurrentProduct:!me&&Number(es.id)===Number(e.single_view_url_product)&&(xe||5===es.current_tier||!0===es.access||!0===(null===Qr||void 0===Qr?void 0:Qr.access)),productPrice:es.content_price,real_checkout:!e.previewRolloutOwner,late_payment:e.late_payment||!1,getBrandColor:()=>t,designProperties:e.designProperties,showBackOnMobile:o,handleBack:()=>{e.setState&&e.setState({single_view_url_product:"",single_view_url_product_item:null,selected_tab:"urls"}),window.scrollTo({top:0,behavior:"instant"})}})}const rs="paid_collections"===e.selected_tab&&"storefront"!==e.pageLayoutType&&gr&&gr[yr]&&ge(gr[yr],!0);let ss=(0,n.jsx)(m.Ay,{container:!0,style:{marginTop:"0px",width:rs?"1200px":e.windowWidth<=600?!0===e.mobilePreview?"350px":"100vw":he?"min(600px, 100%)":"600px",minWidth:e.windowWidth>1500?"600px":"auto",overflow:e.windowWidth<600?"hidden":"visible",maxWidth:"100%",display:"block"},children:e.contentIsLoading||e.loading_page_change||mr&&("sub_collections"===e.selected_tab||"paid_collections"===e.selected_tab||"collections"===e.selected_tab)?(0,n.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px",width:"100%"}}):(0,n.jsx)(n.Fragment,{children:Bn.length>0||gr.length>0||e.is_me||("user-subscribed"===e.view_type||"user-waitlist"===e.view_type||"user"===e.view_type)&&""===e.single_view_collection?(0,n.jsxs)(n.Fragment,{children:[("sub_collections"===e.selected_tab||"paid_collections"===e.selected_tab||"collections"===e.selected_tab||"courses"===e.selected_tab)&&""!==e.single_view_collection&&Bn.length>0?gr&&gr[yr]&&ge(gr[yr])?(0,n.jsx)(n.Fragment,{}):(0,n.jsxs)(n.Fragment,{children:[" ",ur>1&&!0!==e.isCollectionContentReorder?(0,n.jsx)(m.Ay,{container:!0,xs:12,alignItems:"center",justifyContent:"center",sx:{margin:{xs:"20px auto 50px auto",lg:"20px auto 70px auto"}},children:(0,n.jsx)(te,{id:"top_pages",count:ur,page:e.page_n,onChange:(t,o)=>e.setPageN(o)})}):null]}):null,("sub_collections"===e.selected_tab||"paid_collections"===e.selected_tab||"collections"===e.selected_tab||"courses"===e.selected_tab||"paid_posts"===e.selected_tab||"paid_posts"===e.selected_tab||"urls"===e.selected_tab)&&""!==e.single_view_collection&&Bn.length>0?gr&&gr[yr]&&ge(gr[yr],!0)?(0,n.jsx)("div",{style:{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",position:"relative"},children:(0,n.jsx)(n.Fragment,{children:"storefront"===e.pageLayoutType||"storefront"===e.pageLayoutTypeUpd
1ated?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(n.Fragment,{children:_r?(0,n.jsx)(U.A,{windowWidth:e.windowWidth,influencer:e.influencer||(null===(ie=e.influencer_info)||void 0===ie?void 0:ie.influencer),influencer_icon:e.influencer_icon,currency:e.currency,designProperties:e.designProperties,current_user:e.current_user,selected_tab:e.selected_tab,display_name:e.display_name||e.influencer_name,influencer_name:e.influencer_name,connected_stripe_account_id:e.connected_stripe_account_id||(null===(ne=e.influencer_info)||void 0===ne?void 0:ne.connected_stripe_account_id),setState:e.setState,courseId:_r.id||Zn,courseData:_r,getBrandColor:()=>{var t,o;const i=(null===(t=e.designProperties)||void 0===t?void 0:t.brandColorUpdated)||(null===(o=e.designProperties)||void 0===o?void 0:o.brandColor);return i&&""!==i&&null!==i?i:"var(--brand-color)"},openBuyCollectionCheckout:e.openBuyCollectionCheckout,openFreeCollection:e.openFreeCollection,handleProfileTabChange:e.handleProfileTabChange,onCourseUnlocked:()=>{},handleBack:()=>{},real_checkout:!e.previewRolloutOwner,embeddedInTabView:!0}):null})})}):Bn.length<4?(0,n.jsxs)(n.Fragment,{children:[e.isCollectionContentReorder||ot?(0,n.jsx)(n.Fragment,{}):Bn.map((t,o)=>(0,n.jsx)(m.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,xl:12,style:{paddingTop:"0px",marginTop:"0px",paddingBottom:"urls"===e.selected_tab?"0px":"30px",width:e.windowWidth<=600?!0===e.mobilePreview?"350px":"100vw":he?"min(600px, 100%)":"600px",maxWidth:"600px",minWidth:e.windowWidth>1500?"600px":"auto",display:"block",margin:"0px auto",paddingLeft:"0px"},children:"url"===(null===t||void 0===t?void 0:t.content_type)||"urc"===(null===t||void 0===t?void 0:t.content_type)||"urw"===(null===t||void 0===t?void 0:t.content_type)||"dm_url"===(null===t||void 0===t?void 0:t.content_type)||"url"===(null===t||void 0===t?void 0:t.type)?(0,n.jsx)(k.A,{item:t,windowWidth:e.windowWidth,openBuyNowCheckout:e.openBuyNowCheckout,openURLProductView:e.openURLProductView,influencer:e.influencer,currency:e.currency,current_user:e.current_user,mobilePreview:e.mobilePreview}):(0,n.jsx)(u.A,{setState:e.setState,unlockFreeContent:e.unlockFreeContent,handleContentModalOpen:e.handleContentModalOpen,handleContentModalClose:e.handleContentModalClose,is_me:e.is_me,windowWidth:e.windowWidth,view_type:e.view_type,handleRemoveSavedContent:e.handleRemoveSavedContent,handleSavedContent:e.handleSavedContent,currency:e.currency,like_button_click_post:e.like_button_click_post,share_button_click:e.share_button_click,bookmark_button_post:e.bookmark_button_post,bookmark_button_click:e.bookmark_button_click,pinned_post_process:e.pinned_post_process,like_button_click:e.like_button_click,setShareId:$n,setShareInfluencer:Gn,setShareName:Vn,setShareOpen:On,django_data_func:e.get_and_post_data_skeleton,openTippingCheckout:e.openTippingCheckout,current_user:e.current_user,current_user_icon:e.current_user_icon,username:e.current_user,influencer:e.influencer,display_name:e.display_name,setCommentCount:e.setCommentCount,OpenSubscribePopup:e.OpenSubscribePopup,openBuyNowCheckout:e.openBuyNowCheckout,collectionsContentEdit:e.collectionsContentEdit,handleCollectionTabChange:e.handleCollectionTabChange,openBuyCollectionCheckout:e.openBuyCollectionCheckout,set_comment_snackbar:ir,set_comment_snackbar_message:rr,set_comment_snackbar_type:ar,set_comment_snackbar_background:dr,handleBuyNowCheckoutData:e.handleBuyNowCheckoutData,buyNowThumbnailUrl:e.buyNowThumbnailUrl,buyNowTitle:e.buyNowTitle,buyNowContentType:e.buyNowContentType,buyNowContentId:e.buyNowContentId,...e,...t,compare_at_price:t.compare_at_price||qn,onToggleComplete:Object.keys(it).length>0?xt:void 0,content_completion_stats:at,total_enrolled:dt,affiliate_enabled:"paid_collections"!==e.selected_tab&&"collections"!==e.selected_tab&&"courses"!==e.selected_tab||null==gr[yr]?"paid_posts"===e.selected_tab||"digital_products"===e.selected_tab?null===t||void 0===t?void 0:t.affiliate_enabled:void 0:gr[yr].affiliate_enabled,inlineShareEarnConfig:kr})},null===t||void 0===t?void 0:t.id)),ur>1&&!1===e.update_inf_scroll&&!0!==e.isCollectionContentReorder?(0,n.jsx)(m.Ay,{container:!0,xs:12,alignItems:"center",justifyContent:"center",style:{marginTop:"20px"},children:(0,n.jsx)(te,{count:ur,page:e.page_n,onChange:(t,o)=>{setTimeout(()=>{try{var t=document.getElementById("main_div").getBoundingClientRect(),i=document.getElementById("top_pages").getBoundingClientRect().top-t.top;window.scrollTo(50,i-window.innerHeight/2),e.setPageN(o)}catch(n){}},1e3)}})}):null]}):(0,n.jsxs)(d.A,{dataLength:Bn.length,next:e.handleObserver,hasMore:e.update_inf_scroll,loader:(0,n.jsx)(y.A,{s
1x:{display:"flex",width:"100%"},children:0===Bn.length?(0,n.jsx)(h.A,{sx:{margin:"auto auto auto auto",color:"var(--brand-color)"}}):(0,n.jsx)(h.A,{sx:{margin:"auto",color:"var(--brand-color)"}})}),endMessage:"",style:{top:"0px",overflow:"visible",backgroundColor:"var(--rebranding-background-color)"},scrollableTarget:"app"===e.pageLayoutType||"app"===e.pageLayoutTypeUpdated?"mobile-frame-scroll-container":void 0,children:[(0,n.jsx)(m.Ay,{container:!0,xs:12,lg:12,sx:{width:"100%",maxWidth:"100%"},children:e.isCollectionContentReorder?(0,n.jsx)(n.Fragment,{}):Bn.map((t,o)=>{var r;const s=(null===t||void 0===t?void 0:t.chapter)||"",a=o>0&&(null===(r=Bn[o-1])||void 0===r?void 0:r.chapter)||"",l="paid_collections"===e.selected_tab&&(0===o||s!==a)&&""!==s,d=e.course_chapters&&e.course_chapters.length>0?e.course_chapters.findIndex(e=>{let t;return t=Array.isArray(e)?e[0]:"string"===typeof e?e:e.chapter_name||e.name||"",t===s}):-1;return(0,n.jsxs)(i.Fragment,{children:[l&&(0,n.jsx)(m.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,xl:12,id:d>=0?`chapter-${d}`:void 0,style:{paddingTop:0===o?"0px":"20px",marginTop:0===o?"0px":"20px",paddingBottom:"10px",width:e.windowWidth<=600?!0===e.mobilePreview?"350px":"100vw":"600px",maxWidth:"600px",minWidth:e.windowWidth>1500?"600px":"auto",display:"block",margin:"0px auto",paddingLeft:"0px"},children:(0,n.jsx)(_.A,{sx:{fontSize:"18px",fontWeight:600,color:"#1D1D1D",paddingBottom:"8px",borderBottom:"2px solid #E4EBF6"},children:s})}),(0,n.jsx)(m.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,xl:12,style:{paddingTop:"0px",marginTop:"0px",paddingBottom:"urls"===e.selected_tab?"0px":"30px",width:e.windowWidth<=600?!0===e.mobilePreview?"350px":"100vw":"600px",maxWidth:"600px",minWidth:e.windowWidth>1500?"600px":"auto",display:"block",margin:"0px auto",paddingLeft:"0px"},children:"url"===(null===t||void 0===t?void 0:t.content_type)||"urc"===(null===t||void 0===t?void 0:t.content_type)||"urw"===(null===t||void 0===t?void 0:t.content_type)||"dm_url"===(null===t||void 0===t?void 0:t.content_type)||"url"===(null===t||void 0===t?void 0:t.type)?(0,n.jsx)(k.A,{item:t,windowWidth:e.windowWidth,openBuyNowCheckout:e.openBuyNowCheckout,openURLProductView:e.openURLProductView,influencer:e.influencer,currency:e.currency,current_user:e.current_user,mobilePreview:e.mobilePreview}):(0,n.jsx)(u.A,{setState:e.setState,unlockFreeContent:e.unlockFreeContent,display_name:e.display_name,handleContentModalOpen:e.handleContentModalOpen,handleContentModalClose:e.handleContentModalClose,is_me:e.is_me,windowWidth:e.windowWidth,view_type:e.view_type,handleRemoveSavedContent:e.handleRemoveSavedContent,handleSavedContent:e.handleSavedContent,currency:e.currency,like_button_click_post:e.like_button_click_post,share_button_click:e.share_button_click,bookmark_button_post:e.bookmark_button_post,bookmark_button_click:e.bookmark_button_click,pinned_post_process:e.pinned_post_process,like_button_click:e.like_button_click,setShareId:$n,setShareInfluencer:Gn,setShareName:Vn,setShareOpen:On,django_data_func:e.get_and_post_data_skeleton,openTippingCheckout:e.openTippingCheckout,current_user:e.current_user,current_user_icon:e.current_user_icon,username:e.current_user,influencer:e.influencer,setCommentCount:e.setCommentCount,OpenSubscribePopup:e.OpenSubscribePopup,openBuyNowCheckout:e.openBuyNowCheckout,openBuyCollectionCheckout:e.openBuyCollectionCheckout,set_comment_snackbar:ir,set_comment_snackbar_message:rr,set_comment_snackbar_type:ar,set_comment_snackbar_background:dr,handleBuyNowCheckoutData:e.handleBuyNowCheckoutData,buyNowThumbnailUrl:e.buyNowThumbnailUrl,buyNowTitle:e.buyNowTitle,buyNowContentType:e.buyNowContentType,buyNowContentId:e.buyNowContentId,...e,...t,compare_at_price:t.compare_at_price||qn,onToggleComplete:Object.keys(it).length>0?xt:void 0,content_completion_stats:at,total_enrolled:dt,affiliate_enabled:"paid_collections"!==e.selected_tab&&"collections"!==e.selected_tab&&"courses"!==e.selected_tab||null==gr[yr]?"paid_posts"===e.selected_tab||"digital_products"===e.selected_tab?null===t||void 0===t?void 0:t.affiliate_enabled:void 0:gr[yr].affiliate_enabled,inlineShareEarnConfig:kr})})]},null===t||void 0===t?void 0:t.id)})}),ur>1&&!1===e.update_inf_scroll&&!0!==e.isCollectionContentReorder?(0,n.jsx)(m.Ay,{container:!0,xs:12,alignItems:"center",justifyContent:"center",style:{marginTop:"20px"},children:(0,n.jsx)(te,{count:ur,page:e.page_n,onChange:(t,o)=>{setTimeout(()=>{try{var t=document.getElementById("main_div").getBoundingClientRect(),i=document.getElementById("top_pages").getBoundingClientRect().top-t.top;window.scrollTo(50,i-window.innerHeight/2),e.setPageN(o)}catch(n){}},1e3)}})}):null]}):Bn.length<4?(0,n.jsxs)(n.Fragment,{children:[Bn.map((t,o)=>{var r;const s=(null===t||void 0===t?void 0:t.chapter)||"",a=o>0&&(null===(r=Bn[o-1])||void 0===r?void 0:r.chapter)||"",l="paid_collections"===e.selected_tab&&(0===o||s!==a)&&""!==s,d=e.course_chapters&&e.course_chapters.length>0?e.course_chapters.findIndex(e=>{let t;return t=Array.isArray(e)?e[0]:"string"===typeof e?e:e.chapter_name||e.name||"",t===s}):-1;return(0,n.jsxs)(i.Fragment,{children:[l&&(0,n.jsx)(m.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,xl:12,id:d>=0?`chapter-${d}`:void 0,style:{paddingTop:0===o?"0px":"20px",marginTop:0===o?"0px":"20px",paddingBottom:"10px",width:"100%",display:"block",margin:"0px auto",paddingLeft:"0px"},children:(0,n.jsx)(_.A,{sx:{fontSize:"18px",fontWeight:600,color:"#1D1D1D",paddingBottom:"8px",borderBottom:"2px s
1olid #E4EBF6"},children:s})}),(0,n.jsx)(m.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,xl:12,style:{paddingTop:"0px",marginTop:"0px",paddingBottom:"urls"===e.selected_tab?"0px":"30px",width:"100%",display:"block",margin:"0px auto",paddingLeft:"0px"},children:"url"===(null===t||void 0===t?void 0:t.content_type)||"urc"===(null===t||void 0===t?void 0:t.content_type)||"urw"===(null===t||void 0===t?void 0:t.content_type)||"dm_url"===(null===t||void 0===t?void 0:t.content_type)||"url"===(null===t||void 0===t?void 0:t.type)?(0,n.jsx)(k.A,{item:t,windowWidth:e.windowWidth,openBuyNowCheckout:e.openBuyNowCheckout,openURLProductView:e.openURLProductView,influencer:e.influencer,currency:e.currency,current_user:e.current_user,mobilePreview:e.mobilePreview}):(0,n.jsx)(u.A,{setState:e.setState,unlockFreeContent:e.unlockFreeContent,display_name:e.display_name,handleContentModalOpen:e.handleContentModalOpen,handleContentModalClose:e.handleContentModalClose,is_me:e.is_me,windowWidth:e.windowWidth,view_type:e.view_type,handleRemoveSavedContent:e.handleRemoveSavedContent,handleSavedContent:e.handleSavedContent,currency:e.currency,like_button_click_post:e.like_button_click_post,share_button_click:e.share_button_click,bookmark_button_post:e.bookmark_button_post,bookmark_button_click:e.bookmark_button_click,pinned_post_process:e.pinned_post_process,like_button_click:e.like_button_click,setShareId:$n,setShareInfluencer:Gn,setShareName:Vn,setShareOpen:On,django_data_func:e.get_and_post_data_skeleton,openTippingCheckout:e.openTippingCheckout,current_user:e.current_user,current_user_icon:e.current_user_icon,username:e.current_user,influencer:e.influencer,setCommentCount:e.setCommentCount,OpenSubscribePopup:e.OpenSubscribePopup,openBuyNowCheckout:e.openBuyNowCheckout,openBuyCollectionCheckout:e.openBuyCollectionCheckout,set_comment_snackbar:ir,set_comment_snackbar_message:rr,set_comment_snackbar_type:ar,set_comment_snackbar_background:dr,handleBuyNowCheckoutData:e.handleBuyNowCheckoutData,buyNowThumbnailUrl:e.buyNowThumbnailUrl,buyNowTitle:e.buyNowTitle,buyNowContentType:e.buyNowContentType,buyNowContentId:e.buyNowContentId,...e,...t,compare_at_price:t.compare_at_price||qn,affiliate_enabled:"paid_collections"!==e.selected_tab&&"collections"!==e.selected_tab&&"courses"!==e.selected_tab||null==gr[yr]?"paid_posts"===e.selected_tab||"digital_products"===e.selected_tab?null===t||void 0===t?void 0:t.affiliate_enabled:void 0:gr[yr].affiliate_enabled,inlineShareEarnConfig:kr})})]},null===t||void 0===t?void 0:t.id)}),ur>1&&!1===e.update_inf_scroll&&!0!==e.isCollectionContentReorder?(0,n.jsx)(m.Ay,{container:!0,xs:12,alignItems:"center",justifyContent:"center",style:{marginTop:"20px"},children:(0,n.jsx)(te,{count:ur,page:e.page_n,onChange:(t,o)=>{setTimeout(()=>{try{var t=document.getElementById("main_div").getBoundingClientRect(),i=document.getElementById("top_pages").getBoundingClientRect().top-t.top;window.scrollTo(50,i-window.innerHeight/2),e.setPageN(o)}catch(n){}},1e3)}})}):null]}):(0,n.jsxs)(d.A,{dataLength:Bn.length,next:e.handleObserver,hasMore:e.update_inf_scroll,loader:(0,n.jsx)(y.A,{sx:{display:"flex",width:"100%"},children:0===Bn.length?(0,n.jsx)(h.A,{sx:{margin:"auto auto auto auto",color:"var(--brand-color)"}}):(0,n.jsx)(h.A,{sx:{margin:"auto",color:"var(--brand-color)"}})}),endMessage:"",style:{top:"0px",overflow:"visible",backgroundColor:"var(--rebranding-background-color)"},scrollableTarget:"app"===e.pageLayoutType||"app"===e.pageLayoutTypeUpdated?"mobile-frame-scroll-container":void 0,children:[(0,n.jsx)(m.Ay,{container:!0,xs:12,lg:12,sx:{width:"100%",maxWidth:"100%"},children:Bn.map((t,o)=>{var r;const s=(null===t||void 0===t?void 0:t.chapter)||"",a=o>0&&(null===(r=Bn[o-1])||void 0===r?void 0:r.chapter)||"",l="paid_collections"===e.selected_tab&&(0===o||s!==a)&&""!==s,d=e.course_chapters&&e.course_chapters.length>0?e.course_chapters.findIndex(e=>{let t;return t=Array.isArray(e)?e[0]:"string"===typeof e?e:e.chapter_name||e.name||"",t===s}):-1;return(0,n.jsxs)(i.Fragment,{children:[l&&(0,n.jsx)(m.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,xl:12,id:d>=0?`chapter-${d}`:void 0,style:{paddingTop:0===o?"0px":"20px",marginTop:0===o?"0px":"20px",paddingBottom:"10px",display:"block",margin:"0px auto",paddingLeft:"0px"},children:(0,n.jsx)(_.A,{sx:{fontSize:"18px",fontWeight:600,color:"#1D1D1D",paddingBottom:"8px",borderBottom:"2px s
1olid #E4EBF6"},children:s})}),(0,n.jsx)(m.Ay,{item:!0,xs:12,sm:12,md:12,lg:12,xl:12,style:{paddingTop:"0px",marginTop:"0px",paddingBottom:"urls"===e.selected_tab?"0px":"30px",display:"block",margin:"0px auto",paddingLeft:"0px"},children:"url"===(null===t||void 0===t?void 0:t.content_type)||"urc"===(null===t||void 0===t?void 0:t.content_type)||"urw"===(null===t||void 0===t?void 0:t.content_type)||"dm_url"===(null===t||void 0===t?void 0:t.content_type)||"url"===(null===t||void 0===t?void 0:t.type)?(0,n.jsx)(k.A,{item:t,windowWidth:e.windowWidth,openBuyNowCheckout:e.openBuyNowCheckout,openURLProductView:e.openURLProductView,influencer:e.influencer,currency:e.currency,current_user:e.current_user,mobilePreview:e.mobilePreview}):(0,n.jsx)(u.A,{setState:e.setState,unlockFreeContent:e.unlockFreeContent,display_name:e.display_name,handleContentModalOpen:e.handleContentModalOpen,handleContentModalClose:e.handleContentModalClose,is_me:e.is_me,windowWidth:e.windowWidth,view_type:e.view_type,handleRemoveSavedContent:e.handleRemoveSavedContent,handleSavedContent:e.handleSavedContent,currency:e.currency,like_button_click_post:e.like_button_click_post,share_button_click:e.share_button_click,bookmark_button_post:e.bookmark_button_post,bookmark_button_click:e.bookmark_button_click,pinned_post_process:e.pinned_post_process,like_button_click:e.like_button_click,setShareId:$n,setShareInfluencer:Gn,setShareName:Vn,setShareOpen:On,django_data_func:e.get_and_post_data_skeleton,openTippingCheckout:e.openTippingCheckout,current_user:e.current_user,current_user_icon:e.current_user_icon,username:e.current_user,influencer:e.influencer,setCommentCount:e.setCommentCount,OpenSubscribePopup:e.OpenSubscribePopup,openBuyNowCheckout:e.openBuyNowCheckout,openBuyCollectionCheckout:e.openBuyCollectionCheckout,set_comment_snackbar:ir,set_comment_snackbar_message:rr,set_comment_snackbar_type:ar,set_comment_snackbar_background:dr,handleBuyNowCheckoutData:e.handleBuyNowCheckoutData,buyNowThumbnailUrl:e.buyNowThumbnailUrl,buyNowTitle:e.buyNowTitle,buyNowContentType:e.buyNowContentType,buyNowContentId:e.buyNowContentId,...e,...t,compare_at_price:t.compare_at_price||qn,affiliate_enabled:"paid_collections"!==e.selected_tab&&"collections"!==e.selected_tab&&"courses"!==e.selected_tab||null==gr[yr]?"paid_posts"===e.selected_tab||"digital_products"===e.selected_tab?null===t||void 0===t?void 0:t.affiliate_enabled:void 0:gr[yr].affiliate_enabled,inlineShareEarnConfig:kr})})]},null===t||void 0===t?void 0:t.id)})}),ur>1&&!1===e.update_inf_scroll&&!0!==e.isCollectionContentReorder?(0,n.jsx)(m.Ay,{container:!0,xs:12,alignItems:"center",justifyContent:"center",style:{marginTop:"20px"},children:(0,n.jsx)(te,{count:ur,page:e.page_n,onChange:(t,o)=>{setTimeout(()=>{try{var t=document.getElementById("main_div").getBoundingClientRect(),i=document.getElementById("top_pages").getBoundingClientRect().top-t.top;window.scrollTo(50,i-window.innerHeight/2),e.setPageN(o)}catch(n){}},1e3)}})}):null]})]}):null})});return(0,n.jsxs)(n.Fragment,{children:["add_content"!==e.my_platform_page&&"edit_content"!==e.my_platform_page&&"add_course"!==e.my_platform_page&&"edit_course"!==e.my_platform_page&&(0,n.jsxs)("div",{style:{width:e.windowWidth>=1280?"":"100%",margin:e.windowWidth>=1280?"0px 40px":"0px 0px 0px 0px",backgroundColor:"var(--rebranding-background-color)"},children:["paid_collections"===e.selected_tab&&"courses"!==e.selected_tab&&!e.is_me&&""!==e.single_view_collection&&"library"!==e.courseLibraryTab&&e.course_chapters&&e.course_chapters.length>0&&(!0===e.is_me&&(e.windowWidth<=1100||e.windowWidth>=1280&&e.windowWidth<=1424)||!1===e.is_me&&e.windowWidth<=1100)&&!0!==e.isCollectionContentReorder&&!ot&&!(gr&&gr[yr]&&ge(gr[yr],!0))&&(()=>{const{regularChapters:t,otherChapter:o}=zt(e.course_chapters||[]);return!(0===t.length&&null!==o)})()&&(0,n.jsx)(y.A,{sx:{width:"100%",maxWidth:"600px",margin:"0 auto 20px auto",padding:{xs:"0 12px",sm:"0 20px"},minWidth:"0",boxSizing:"border-box"},children:(0,n.jsxs)(y.A,{sx:{backgroundColor:"#fff",borderRadius:Ee?"14px":"30px",border:"1px solid #E4EBF6",boxShadow:"0 2px 8px rgba(0,0,0,0.04)",overflow:"hidden",transition:"border-radius 0.2s"},children:[(0,n.jsxs)(y.A,{onClick:()=>We(!Ee),sx:{display:"flex",alignItems:"center",gap:"10px",padding:"14px 18px",cursor:"pointer","&:hover":{backgroundColor:"#F8F9FB"}},children:[(0,n.jsx)(G.klJ,{style:{fontSize:"18px",color:"#6E89AF",transform:Ee?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.2s"}}),(0,n.jsx)(_.A,{sx:{fontSize:"12px",fontWeight:700,color:"#6E89AF",letterSpacing:"1px",textTransform:"uppercase"},children:fe("influencer.headers.chapters")}),e.selected_chapter&&""!==e.selected_chapter&&"_-_-other_-_-"!==e.selected_chapter?
1(0,n.jsxs)(_.A,{sx:{fontSize:"13px",color:"#1D1D1D",fontWeight:500},children:["\xb7 ",Tt(e.selected_chapter)]}):Ft&&St[At]?(0,n.jsxs)(_.A,{sx:{fontSize:"13px",color:"#1D1D1D",fontWeight:500},children:["\xb7 ",St[At].name]}):null,(0,n.jsx)(y.A,{sx:{flex:1}})]}),Ee&&(0,n.jsx)(y.A,{sx:{padding:"0 16px 16px 16px"},children:(0,n.jsx)(y.A,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:(()=>{const{regularChapters:t,otherChapter:o}=zt(e.course_chapters||[]),i=[...t];return o&&t.length>0&&i.push(o),i.map((t,o)=>{const i=Array.isArray(t)?t[0]:t,r=Tt(i),s=e.selected_chapter===i||"Other"===e.selected_chapter&&"_-_-other_-_-"===i,a="_-_-other_-_-"===i?null:o+1;return(0,n.jsxs)(y.A,{onClick:()=>{e.handleCollectionTabChange(null,e.single_view_collection,e.selected_tab,null,null,null,i)},sx:{padding:"8px 12px",borderRadius:"12px",cursor:"pointer",transition:"all 0.15s ease",backgroundColor:s?"#FAFBFF":"#fff",border:s?"1.5px solid var(--brand-color)":"1.5px solid #E4EBF6","&:hover":{backgroundColor:"#F8F9FB"}},children:[(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[a&&(0,n.jsx)(y.A,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:s?"#DDE4F8":"#EDF0F7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,n.jsx)(_.A,{sx:{fontSize:"12px",fontWeight:700,color:s?"var(--brand-color)":"#6E89AF"},children:a})}),(0,n.jsx)(_.A,{sx:{fontSize:"13px",fontWeight:s?600:500,color:"#1D1D1D",flex:1,textTransform:"capitalize",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})]}),((o,r,s,a,l)=>{const d=Array.isArray(t)?t[1]:t.id||t.chapter_id||null,c="_-_-other_-_-"===i?it.other:d?it[String(d)]:null;if(0===Object.keys(it).length)return null;const p=null!==(o=null===c||void 0===c?void 0:c.completion_rate)&&void 0!==o?o:0,u=null!==(r=null===c||void 0===c?void 0:c.completed)&&void 0!==r?r:0,x=null!==(s=null===c||void 0===c?void 0:c.total)&&void 0!==s?s:0,m=null!==(a=null!==(l=null===c||void 0===c?void 0:c.enrolled)&&void 0!==l?l:dt)&&void 0!==a?a:0,h=e.is_me?p:x>0?Math.round(u/x*100):0;return(0,n.jsxs)(y.A,{sx:{px:"2px",pb:"2px",pt:"6px"},children:[(0,n.jsx)(y.A,{sx:{height:"3px",backgroundColor:"#E8ECF3",borderRadius:"2px",overflow:"hidden",width:"100%"},children:(0,n.jsx)(y.A,{sx:{width:`${h}%`,height:"100%",backgroundColor:100===h?"#43A047":"var(--brand-color)",borderRadius:"2px",transition:"width 0.3s ease",minWidth:h>0?"3px":"0px"}})}),(0,n.jsx)(_.A,{sx:{fontSize:"9px",color:"#B0B8C9",mt:"2px",textAlign:"right",fontWeight:500},children:e.is_me?fe("progress.usersCompleted",{completions:u,enrolled:m}):fe("progress.lessonsComplete",{completed:u,total:x})})]})})()]},o)})})()})})]})}),(0,n.jsx)(E.A,{open:Re,onClose:()=>{Me(!1),Pe("")},sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsxs)(y.A,{sx:{backgroundColor:"#fff",borderRadius:"8px",padding:"24px",width:"90%",maxWidth:"500px",outline:"none"},children:[(0,n.jsx)(_.A,{sx:{fontSize:"20px",fontWeight:600,marginBottom:"20px",color:"#1D1D1D"},children:fe("influencer.actions.addNewChapter")}),(0,n.jsx)(g.A,{fullWidth:!0,label:fe("influencer.chapter.nameLabel"),value:Ie,onChange:e=>{e.target.value.length<=200&&Pe(e.target.value)},inputProps:{maxLength:200},helperText:fe("influencer.chapter.charactersCounter",{current:Ie.length,max:200}),sx:{marginBottom:"12px"},onKeyPress:async t=>{if("Enter"===t.key&&Ie.trim()){const t=Ie.trim(),o=Array.isArray(gr)&&gr.length>0?gr.find(t=>t.course_name===e.single_view_collection||t.id===e.single_view_collection):null;if(o){const i=new FormData;i.append("course_name",o.course_name),i.append("chapter_name",t);const n=await w().post(Q.BACKEND_URL+"api/influencer/community/create_new_chapter",i,{withCredentials:!0});n.data.success&&(e.setState({course_chapters:[...e.course_chapters||[],[t,n.data.chapter_id]]}),Me(!1),Pe(""))}}}}),(0,n.jsx)(_.A,{sx:{fontSize:"14px",color:"#666",marginBottom:"20px",fontStyle:"italic"},children:fe("influencer.chapter.enterChapterName","Enter a name for your new chapter.")}),(0,n.jsxs)(y.A,{sx:{display:"flex",justifyContent:"flex-end",gap:"10px"},children:[(0,n.jsx)(x.A,{onClick:()=>{Me(!1),Pe("")},sx:{color:"#6E89AF"},children:fe("influencer.actions.cancel")}),(0,n.jsx)(x.A,{onClick:async()=>
1{if(Ie.trim()){const t=Ie.trim(),o=Array.isArray(gr)&&gr.length>0?gr.find(t=>t.course_name===e.single_view_collection||t.id===e.single_view_collection):null;if(o){const i=new FormData;i.append("course_name",o.course_name),i.append("chapter_name",t);const n=await w().post(Q.BACKEND_URL+"api/influencer/community/create_new_chapter",i,{withCredentials:!0});n.data.success&&(e.setState({course_chapters:[...e.course_chapters||[],[t,n.data.chapter_id]]}),Me(!1),Pe(""))}}},disabled:!Ie.trim(),variant:"contained",sx:{backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color)"},"&:disabled":{backgroundColor:"#9CA3AF"}},children:fe("influencer.actions.addChapter","Add Chapter")})]})]})}),(0,n.jsxs)(W.A,{open:ze,onClose:()=>{Te(!1),Se([]),De(null)},maxWidth:"sm",fullWidth:e.windowWidth<=900,sx:{"& .MuiDialog-paper":{borderRadius:"12px",maxHeight:"80vh",...e.windowWidth>900&&{maxWidth:"500px",width:"500px",margin:"auto"}}},children:[(0,n.jsx)(R.A,{sx:{fontSize:{xs:"16px",sm:"18px"},fontWeight:600,padding:{xs:"16px",sm:"20px"},paddingBottom:{xs:"12px",sm:"16px"},borderBottom:"1px solid #E4EBF6"},children:"Reorder Chapters"}),(0,n.jsx)(M.A,{sx:{padding:{xs:"16px",sm:"20px"}},children:(0,n.jsx)($.ReactSortable,{list:(()=>{const{regularChapters:t}=zt(e.course_chapters||[]);return(Ce.length>0?Ce:t.map(e=>Array.isArray(e)?[...e]:e)).filter(e=>"_-_-other_-_-"!==(Array.isArray(e)?e[0]:e.chapter_name||e.name||e))})(),setList:e=>{const t=e.filter(e=>"_-_-other_-_-"!==(Array.isArray(e)?e[0]:e.chapter_name||e.name||e));Se(t)},animation:200,ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",handle:".drag-handle",forceFallback:!1,fallbackOnBody:!0,swapThreshold:.65,delayOnTouchStart:!0,delay:0,style:{display:"flex",flexDirection:"column",gap:"8px"},children:(Ce.length>0?Ce:(()=>{const{regularChapters:t}=zt(e.course_chapters||[]);return t.map(e=>Array.isArray(e)?[...e]:e)})()).filter(e=>"_-_-other_-_-"!==(Array.isArray(e)?e[0]:e.chapter_name||e.name||e)).map((e,t)=>{const o=Array.isArray(e)?e[0]:e,i=Array.isArray(e)&&e[1]||t,r=Tt(o),s=t+1;return(0,n.jsxs)(y.A,{sx:{padding:{xs:"12px",sm:"14px"},borderRadius:"8px",cursor:"grab",transition:"all 0.2s ease",backgroundColor:"transparent",border:"1px solid #E4EBF6",display:"flex",alignItems:"center",gap:"12px",userSelect:"none",WebkitUserSelect:"none",touchAction:"none","&:hover":{backgroundColor:"#F4F6FB"},"&.sortable-ghost":{opacity:.4,backgroundColor:"#E6EDFB"},"&.sortable-chosen":{cursor:"grabbing",backgroundColor:"#E6EDFB",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"}},children:[(0,n.jsx)(y.A,{className:"drag-handle",sx:{cursor:"grab",touchAction:"none",display:"flex",alignItems:"center",pointerEvents:"auto"},children:(0,n.jsx)(H.LUV,{className:"drag-handle",style:{color:"#6E89AF",fontSize:"20px",cursor:"grab",pointerEvents:"none"}})}),(0,n.jsxs)(_.A,{sx:{fontSize:{xs:"14px",sm:"15px"},fontWeight:600,color:"#6E89AF",minWidth:"24px"},children:[s,"."]}),(0,n.jsx)(_.A,{sx:{fontSize:{xs:"14px",sm:"15px"},fontWeight:500,color:"#1D1D1D",flex:1},children:r})]},`${i||t}-${o}`)})})}),(0,n.jsxs)(I.A,{sx:{padding:{xs:"12px 16px",sm:"16px 20px"},borderTop:"1px solid #E4EBF6",gap:"8px"},children:[(0,n.jsxs)(x.A,{onClick:()=>{Te(!1),Se([]),De(null)},sx:{textTransform:"none",fontSize:{xs:"13px",sm:"14px"},fontWeight:600,color:"#FD2B2B",padding:{xs:"6px 16px",sm:"8px 20px"},"&:hover":{backgroundColor:"#FFF5F5"}},children:[(0,n.jsx)(Z.XoR,{style:{fontSize:"12px",marginRight:"6px"}}),"Cancel"]}),(0,n.jsxs)(x.A,{onClick:async()=>{Ae(!0);const t=new FormData;t.append("course_name",e.single_view_collection);const o=(Ce.length>0?Ce:e.course_chapters||[]).map(e=>Array.isArray(e)?e[1]:e.id||e.chapter_id||null).filter(e=>null!==e);t.append("chapter_ids",JSON.stringify(o));try{if(!(await w()({method:"post",url:Q.BACKEND_URL+"api/influencer/community/reorder_course_chapters",data:t,headers:{"Content-type":"application/json"},withCredentials:!0})).data.error){Te(!1),De(null);const{otherChapter:t}=zt(e.course_chapters||[]);let o=Ce.length>0?[...Ce]:(()=>{const{regularChapters:t}=zt(e.course_chapters||[]);return t})();t&&o.push(t),e.setState({course_chapters:o}),Se([])}}catch(i){console.error("Error reordering chapters:",i)}finally{Ae(!1)}},disabled:ke,sx:{textTransform:"none",fontSize:{xs:"13px",sm:"14px"},fontWeight:600,color:ke?"#ccc":"var(--brand-color)",padding:{xs:"6px 16px",sm:"8px 20px"},"&:hover":{backgroundColor:ke?"transparent":"#F4F6FB"}},children:[(0,n.jsx)(Z.eFy,{style:{fontSize:"12px",marginRight:"6px"}}),fe(ke?"common.saving":"common.save")]})]})]}),(0,n.jsx)(E.A,{open:Be,onClose:()=>{Ye||(Le(!1),Oe(null),$e(""),Ve(null))},sx:{display:"flex",alignItems:"center",justifyContent:"center"}
1,children:(0,n.jsxs)(y.A,{sx:{backgroundColor:"#fff",borderRadius:"8px",padding:"24px",width:"90%",maxWidth:"500px",outline:"none"},children:[(0,n.jsx)(_.A,{sx:{fontSize:"20px",fontWeight:600,marginBottom:"20px",color:"#1D1D1D"},children:fe("course.chapter.editTitle")}),(0,n.jsx)(g.A,{fullWidth:!0,label:fe("course.chapter.label"),value:Ue,onChange:e=>{e.target.value.length<=200&&$e(e.target.value)},inputProps:{maxLength:200},helperText:`${Ue.length}/200 characters`,disabled:Ye,sx:{marginBottom:"20px"},onKeyPress:e=>{"Enter"===e.key&&!Ye&&Ue.trim()&&Dt()}}),(0,n.jsxs)(y.A,{sx:{display:"flex",justifyContent:"flex-end",gap:"10px"},children:[(0,n.jsx)(x.A,{onClick:()=>{Ye||(Le(!1),Oe(null),$e(""),Ve(null))},disabled:Ye,sx:{color:"#6E89AF"},children:fe("common.cancel")}),(0,n.jsx)(x.A,{onClick:Dt,disabled:Ye||!Ue.trim(),variant:"contained",sx:{backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color)"},"&:disabled":{backgroundColor:"#9CA3AF"}},children:Ye?(0,n.jsx)(h.A,{size:20}):fe("common.save")})]})]})}),(0,n.jsx)(E.A,{open:Ze,onClose:()=>{et||(Xe(!1),Je(null),Qe(""))},sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsxs)(y.A,{sx:{backgroundColor:"#fff",borderRadius:"8px",padding:"24px",width:"90%",maxWidth:"400px",outline:"none"},children:[(0,n.jsx)(_.A,{sx:{fontSize:"20px",fontWeight:600,marginBottom:"12px",color:"#1D1D1D"},children:fe("influencer.chapter.deleteChapter","Delete Chapter")}),(0,n.jsx)(_.A,{sx:{fontSize:"14px",color:"#6E89AF",marginBottom:"20px"},children:fe("influencer.chapter.deleteChapterConfirm",'Are you sure you want to delete "{{name}}"? Content in this chapter will be moved to Other.',{name:qe})}),(0,n.jsxs)(y.A,{sx:{display:"flex",justifyContent:"flex-end",gap:"10px"},children:[(0,n.jsx)(x.A,{onClick:()=>{Xe(!1),Je(null),Qe("")},disabled:et,sx:{color:"#6E89AF"},children:fe("common.cancel")}),(0,n.jsx)(x.A,{onClick:async()=>{if(Ke){tt(!0);try{const t=new FormData;t.append("chapter_id",Ke),t.append("course_name",e.single_view_collection),await w().post(Q.BACKEND_URL+"api/influencer/community/delete_course_chapter",t,{withCredentials:!0});const o=(e.course_chapters||[]).filter(e=>{const t=Array.isArray(e)?e[1]:e.id||e.chapter_id||null;return String(t)!==String(Ke)}),{regularChapters:i,otherChapter:n}=zt(o),r=i.length>0?Array.isArray(i[0])?i[0][0]:i[0]:n?"_-_-other_-_-":"";e.setState&&e.setState({course_chapters:o,selected_chapter:r}),e.newContentSubmit&&e.newContentSubmit(null,r)}catch(t){console.error("Error deleting chapter:",t)}finally{tt(!1),Xe(!1),Je(null),Qe("")}}},disabled:et,variant:"contained",sx:{backgroundColor:"#EF4444","&:hover":{backgroundColor:"#DC2626"},"&:disabled":{backgroundColor:"#9CA3AF"}},children:et?(0,n.jsx)(h.A,{size:20}):fe("common.delete","Delete")})]})]})}),e.is_me&&("paid_collections"===e.selected_tab||"courses"===e.selected_tab)&&""!==e.single_view_collection&&"library"!==e.courseLibraryTab&&!0!==e.isCollectionContentReorder&&(e.windowWidth<=1100||e.windowWidth>=1280&&e.windowWidth<=1424)&&(0,n.jsx)(y.A,{sx:{width:"100%",maxWidth:"600px",margin:"0 auto 20px auto",padding:{xs:"0 12px",sm:"0 20px"},minWidth:"0",boxSizing:"border-box",marginTop:"0px"},children:(0,n.jsxs)(y.A,{sx:{backgroundColor:"#fff",borderRadius:Ee?"14px":"30px",border:"1px solid #E4EBF6",boxShadow:"0 2px 8px rgba(0,0,0,0.04)",overflow:"hidden",transition:"border-radius 0.2s"},children:[(0,n.jsxs)(y.A,{onClick:()=>We(!Ee),sx:{display:"flex",alignItems:"center",gap:"10px",padding:"14px 18px",cursor:"pointer","&:hover":{backgroundColor:"#F8F9FB"}},children:[(0,n.jsx)(G.klJ,{style:{fontSize:"18px",color:"#6E89AF",transform:Ee?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.2s"}}),(0,n.jsx)(_.A,{sx:{fontSize:"12px",fontWeight:700,color:"#6E89AF",letterSpacing:"1px",textTransform:"uppercase"},children:fe("influencer.headers.chapters")}),e.selected_chapter&&""!==e.selected_chapter&&"_-_-other_-_-"!==e.selected_chapter?(0,n.jsxs)(_.A,{sx:{fontSize:"13px",color:"#1D1D1D",fontWeight:500},children:["\xb7 ",Tt(e.selected_chapter)]}):Ft&&St[At]?(0,n.jsxs)(_.A,{sx:{fontSize:"13px",color:"#1D1D1D",fontWeight:500},children:["\xb7 ",St[At].name]}
1):null,(0,n.jsx)(y.A,{sx:{flex:1}}),(0,n.jsxs)(x.A,{size:"small",onClick:e=>{e.stopPropagation(),Me(!0)},sx:{textTransform:"none",fontSize:"12px",fontWeight:600,color:"var(--brand-color)",minWidth:"auto",padding:"4px 10px",borderRadius:"6px",backgroundColor:"#EDF0F7","&:hover":{backgroundColor:"#DDE4F8"}},children:[(0,n.jsx)(G.r2j,{style:{fontSize:"14px",marginRight:"4px"}}),fe("influencer.actions.chapter","Chapter")]})]}),Ee&&(0,n.jsxs)(y.A,{sx:{padding:"0 16px 16px 16px"},children:[(()=>{const{regularChapters:t,otherChapter:o}=zt(e.course_chapters||[]);if(0===t.length&&!o)return Ft?(0,n.jsx)($.ReactSortable,{list:St,setList:kt,animation:150,handle:".example-chapter-drag-mob-orig",style:{display:"flex",flexDirection:"column",gap:"8px"},children:St.map((e,t)=>(0,n.jsxs)(y.A,{onClick:()=>_t(e.id),sx:{padding:"4px 12px",borderRadius:"16px",cursor:"pointer",transition:"all 0.15s ease",backgroundColor:"#fff",border:At===t?"1.5px solid var(--brand-color)":"1.5px solid #E4EBF6","&:hover":{backgroundColor:"#F8F9FB"}},children:[(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,n.jsx)(y.A,{className:"example-chapter-drag-mob-orig",sx:{cursor:"grab",display:"flex",alignItems:"center"},children:(0,n.jsx)(H.LUV,{style:{color:"#9CA3AF",fontSize:"16px"}})}),(0,n.jsx)(y.A,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:At===t?"#DDE4F8":"#EDF0F7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,n.jsx)(_.A,{sx:{fontSize:"12px",fontWeight:700,color:At===t?"var(--brand-color)":"#6E89AF"},children:t+1})}),(0,n.jsx)(_.A,{sx:{fontSize:"13px",fontWeight:At===t?600:500,color:"#1D1D1D",flex:1},children:e.name}),(0,n.jsx)("span",{style:{fontSize:"9px",fontWeight:700,color:"#fff",backgroundColor:"#F59E0B",padding:"1px 6px",borderRadius:"4px",textTransform:"uppercase",flexShrink:0},children:fe("community.library.exampleBadge","EXAMPLE")})]}),((t,o,i,r)=>{const s=it[e.id];if(!s)return null;const a=null!==(t=s.completion_rate)&&void 0!==t?t:0,l=null!==(o=s.completed)&&void 0!==o?o:0,d=null!==(i=null!==(r=s.enrolled)&&void 0!==r?r:dt)&&void 0!==i?i:0;return(0,n.jsxs)(y.A,{sx:{px:"4px",pb:"6px",pt:"4px"},children:[(0,n.jsx)(y.A,{sx:{height:"5px",backgroundColor:"#E4EBF6",borderRadius:"3px",overflow:"hidden",width:"100%"},children:(0,n.jsx)(y.A,{sx:{width:`${a}%`,height:"100%",backgroundColor:100===a?"#43A047":"var(--brand-color)",borderRadius:"3px",transition:"width 0.3s ease",minWidth:a>0?"4px":"0px"}})}),(0,n.jsx)(_.A,{sx:{fontSize:"10px",color:"#9CA3AF",mt:"3px",textAlign:"center"},children:fe("progress.usersCompleted",{completions:l,enrolled:d})})]})})()]},e.id))}):(0,n.jsx)(_.A,{sx:{fontSize:"12px",color:"#9CA3AF",fontStyle:"italic",textAlign:"center",padding:"8px 0"},children:fe("influencer.chapters.notVisibleToUsers","Chapters are not visible to your customers until you add one.")});const i=function(t,o){let{isDraggable:i=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Array.isArray(t)?t[0]:t,s=Tt(r),a=e.selected_chapter===r||"Other"===e.selected_chapter&&"_-_-other_-_-"===r,l="_-_-other_-_-"===r,d=l?null:o+1;return(0,n.jsxs)(y.A,{onClick:()=>{e.handleCollectionTabChange(null,e.single_view_collection,e.selected_tab,null,null,null,r)},sx:{padding:"6px 12px",borderRadius:"16px",cursor:"pointer",transition:"all 0.15s ease",backgroundColor:"#fff",border:a?"1.5px solid var(--brand-color)":"1.5px solid #E4EBF6","&:hover":{backgroundColor:"#F8F9FB"}},children:[(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"10px"},children:[i&&e.is_me&&!l&&(0,n.jsx)(y.A,{className:"chapter-drag-handle-mobile",sx:{cursor:"grab",display:"flex",alignItems:"center",flexShrink:0,color:"#C4C9D4","&:hover":{color:"#6E89AF"}},children:(0,n.jsx)(H.LUV,{style:{fontSize:"18px"}})}),d&&(0,n.jsx)(y.A,{sx:{width:32,height:32,borderRadius:"50%",backgroundColor:a?"#DDE4F8":"#EDF0F7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,n.jsx)(_.A,{sx:{fontSize:"14px",fontWeight:700,color:a?"var(--brand-color)":"#6E89AF"},children:d})}
1),(0,n.jsx)(y.A,{sx:{flex:1,minWidth:0},children:(0,n.jsx)(_.A,{sx:{fontSize:"14px",fontWeight:a?600:500,color:"#1D1D1D",textTransform:"capitalize",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s})}),e.is_me&&!l&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.A,{onClick:i=>{i.stopPropagation();const n=Array.isArray(t)?t[1]:t.id||t.chapter_id||null;Le(!0),Oe(n),$e(r);const s=(e.course_chapters||[]).findIndex(e=>(Array.isArray(e)?e[0]:"string"===typeof e?e:e.chapter_name||e.name||"")===r);Ve(s>=0?s:o)},sx:{color:"#9CA3AF",padding:"3px","&:hover":{backgroundColor:"#E4EBF6",color:"#6E89AF"}},size:"small",children:(0,n.jsx)(G.O18,{style:{fontSize:"14px"}})}),(0,n.jsx)(f.A,{onClick:e=>{e.stopPropagation();const o=Array.isArray(t)?t[1]:t.id||t.chapter_id||null;o&&(Je(o),Qe(r),Xe(!0))},sx:{color:"#9CA3AF",padding:"3px","&:hover":{backgroundColor:"#FEE2E2",color:"#EF4444"}},size:"small",children:(0,n.jsx)(G.Tqh,{style:{fontSize:"14px"}})})]})]}),((o,i,s,a,l)=>{const d=Array.isArray(t)?t[1]:t.id||t.chapter_id||null,c="_-_-other_-_-"===r?it.other:d?it[String(d)]:null;if(0===Object.keys(it).length||!c)return null;const p=null!==(o=null===c||void 0===c?void 0:c.completion_rate)&&void 0!==o?o:0,u=null!==(i=null===c||void 0===c?void 0:c.completed)&&void 0!==i?i:0,x=null!==(s=null===c||void 0===c?void 0:c.total)&&void 0!==s?s:0,m=null!==(a=null!==(l=null===c||void 0===c?void 0:c.enrolled)&&void 0!==l?l:dt)&&void 0!==a?a:0,h=e.is_me?p:x>0?Math.round(u/x*100):0;return(0,n.jsxs)(y.A,{sx:{px:"4px",pb:"4px",pt:"2px"},children:[(0,n.jsx)(y.A,{sx:{height:"4px",backgroundColor:"#E4EBF6",borderRadius:"2px",overflow:"hidden",width:"100%"},children:(0,n.jsx)(y.A,{sx:{width:`${h}%`,height:"100%",backgroundColor:100===h?"#43A047":"var(--brand-color)",borderRadius:"2px",transition:"width 0.3s ease",minWidth:h>0?"4px":"0px"}})}),(0,n.jsx)(_.A,{sx:{fontSize:"10px",color:"#9CA3AF",mt:"2px",textAlign:"center"},children:e.is_me?fe("progress.usersCompleted",{completions:u,enrolled:m}):fe("progress.lessonsComplete",{completed:u,total:x})})]})})()]},r+"-mob-"+o)};if(e.is_me&&t.length>0)return(0,n.jsxs)(y.A,{sx:{display:"flex",flexDirection:"column",gap:"10px"},children:[(0,n.jsx)($.ReactSortable,{list:t.map((e,t)=>({id:"ch-"+(Array.isArray(e)?e[1]:e.id||e.chapter_id||t),chapter:e})),setList:o=>{const i=o.map(e=>e.chapter);if(t.map(e=>Array.isArray(e)?e[0]:e.chapter_name||e.name||"").join("||")===i.map(e=>Array.isArray(e)?e[0]:e.chapter_name||e.name||"").join("||"))return;const{otherChapter:n}=zt(e.course_chapters||[]),r=[...e.course_chapters];e.setState({course_chapters:n?[...i,n]:[...i]});const s=i.map(e=>Array.isArray(e)?e[1]:e.id||e.chapter_id||null).filter(Boolean),a=new FormData;a.append("course_name",e.single_view_collection),a.append("chapter_ids",JSON.stringify(s)),w().post(Q.BACKEND_URL+"api/influencer/community/reorder_course_chapters",a,{withCredentials:!0}).then(t=>{t.data.error&&e.setState({course_chapters:r})}).catch(()=>{e.setState({course_chapters:r})})},animation:150,handle:".chapter-drag-handle-mobile",style:{display:"flex",flexDirection:"column",gap:"10px"},children:t.map((e,t)=>i(e,t,{isDraggable:!0}))}),o&&i(o,t.length)]});const r=[...t];return o&&t.length>0&&r.push(o),(0,n.jsx)(y.A,{sx:{display:"flex",flexDirection:"column",gap:"10px"},children:r.map((e,t)=>i(e,t))})})(),(0,n.jsxs)(y.A,{onClick:()=>{Me(!0)},sx:{marginTop:"8px",padding:"12px",borderRadius:"30px",border:"2px dashed #D1D5DB",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",cursor:"pointer",transition:"all 0.15s","&:hover":{borderColor:"var(--brand-color)",backgroundColor:"#F8F9FF"}},children:[(0,n.jsx)(G.r2j,{style:{fontSize:"16px",color:"#6E89AF"}}),(0,n.jsx)(_.A,{sx:{fontSize:"13px",fontWeight:600,color:"#6E89AF"},children:fe("influencer.actions.addChapter","Add chapter")})]})]})]})}),e.is_me&&("paid_collections"===e.selected_tab||"courses"===e.selected_tab)&&""!==e.single_view_collection&&"library"!==e.courseLibraryTab&&!e.isCollectionContentReorder&&(e.windowWidth<=1100||e.windowWidth>
1=1280&&e.windowWidth<=1424)&&(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:{xs:"8px",sm:"12px"},flexWrap:"wrap",maxWidth:"600px",margin:"0 auto 16px auto",padding:{xs:"0 12px",sm:"0 20px"}},children:[!e.isCollectionContentReorder&&(0,n.jsxs)(x.A,{variant:"contained",size:"small",disableElevation:!0,onClick:()=>{const t=null===gr||void 0===gr?void 0:gr[yr];if(!t)return;const o=new FormData;o.append("course_id",t.id),w()({method:"post",url:(0,l.wE)()+"api/influencer/load_course_chapters",data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(o=>{var i;o.data.error||e.setState({open_content_upload:!0,content_type:0,uploadContentProductType:"course",new_chapter_list:o.data.course_chapters,chapter_content_counts:o.data.chapter_content_counts||{},editCourseContentId:"",selectedCourse:[[0,((null===(i=e.influencer_content_list)||void 0===i?void 0:i.length)||0)+1,t.id]],selected_chapter:e.selected_chapter})})},sx:{textTransform:"none",fontSize:"13px",fontWeight:600,borderRadius:"10px",padding:"8px 16px",backgroundColor:"var(--brand-color)",height:"38px","&:hover":{backgroundColor:"var(--brand-color-hover)"},display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(G.r2j,{style:{fontSize:"16px"}}),(0,n.jsx)("span",{children:fe("collections.noContent.button.course","Add Lesson")})]}),e.isCollectionContentReorder?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(_.A,{onClick:()=>{e.setState({isCollectionContentReorder:!1})},sx:{display:"flex",alignItems:"center",gap:"5px",cursor:"pointer",color:"var(--brand-color)",textTransform:"none",fontSize:"13px",fontFamily:"Roboto",fontWeight:500,"&:hover":{textDecoration:"underline"}},children:[(0,n.jsx)(Z.eFy,{style:{fontSize:"12px"},color:"var(--brand-color)"}),fe("common.save","Save")]}),(0,n.jsxs)(_.A,{onClick:()=>{e.setState({isCollectionContentReorder:!1})},sx:{display:"flex",alignItems:"center",gap:"5px",cursor:"pointer",color:"#FD2B2B",textTransform:"none",fontSize:"13px",fontFamily:"Roboto",fontWeight:500,"&:hover":{textDecoration:"underline"}},children:[(0,n.jsx)(Z.XoR,{style:{fontSize:"12px"},color:"#FD2B2B"}),fe("common.cancel","Cancel")]})]}):(0,n.jsxs)(_.A,{onClick:()=>{e.setState({isCollectionContentReorder:!0})},sx:{display:"flex",alignItems:"center",gap:"5px",cursor:"pointer",color:"#6E89AF",textTransform:"none",fontSize:"13px",fontFamily:"Roboto",fontWeight:500,"&:hover":{textDecoration:"underline"}},children:[(0,n.jsx)(G.bE5,{style:{fontSize:"12px"}}),fe("dashboard.collections.reorderLessons","Reorder Lessons")]}),!e.isCollectionContentReorder&&(0,n.jsxs)(_.A,{onClick:()=>e.setState({isDripFeedMode:!e.isDripFeedMode,isProgressStatsMode:!1,isCollectionContentReorder:!1}),sx:{display:"flex",alignItems:"center",gap:"5px",cursor:"pointer",color:e.isDripFeedMode?"var(--brand-color)":"#6E89AF",fontSize:"13px",fontFamily:"Roboto",fontWeight:500,"&:hover":{textDecoration:"underline"}},children:[(0,n.jsx)(G.Tu,{style:{fontSize:"13px"}}),fe("drip.setDripSchedule","Drip Feed")]})]}),Ft&&(e.windowWidth<=1100||e.windowWidth>=1280&&e.windowWidth<=1424)&&(e.isCollectionContentReorder?(0,n.jsx)(y.A,{sx:{maxWidth:"600px",margin:"0 auto",padding:{xs:"0 12px",sm:"0 20px"}},children:(0,n.jsx)($.ReactSortable,{list:(null===(re=St[At])||void 0===re?void 0:re.lessons)||[],setList:e=>{kt(t=>t.map((t,o)=>o===At?{...t,lessons:e}:t))},animation:150,style:{display:"flex",flexDirection:"column",gap:"0px"},children:((null===(se=St[At])||void 0===se?void 0:se.lessons)||[]).map((e,t)=>(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"15px",padding:"14px 16px",backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"10px",cursor:"grab",marginBottom:"10px",marginTop:0===t?"10px":"0px"},children:[(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"15px",width:"90%"},children:[(0,n.jsx)(y.A,{sx:{width:"28px",height:"28px",borderRadius:"50%",backgroundColor:"#F5F7FA",display:"flex",alignItems:"center",justifyContent:"center",color:"#6E89AF",fontSize:"14px",fontWeight:600},children:t+1}),(0,n.jsxs)(y.A,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"10px"},children:[(0,n.jsx)("p",{style:{fontSize:"16px",fontWeight:600,margin:0},children:e.name}),(0,n.jsx)("span",{style:{fontSize:"9px",fontWeight:700,color:"#fff",backgroundColor:"#F59E0B",padding:"1px 6px",borderRadius:"4px",textTransform:"uppercase"},children:fe("community.library.exampleBadge","EXAMPLE")})]})]}),(0,n.jsx)("div",{style:{cursor:"grab",height:"100%",display:"flex",alignItems:"center"},children:(0,n.jsx)(H.LUV,{style:{color:"#6E89AF",fontSize:"20px"}})})]},e.id))})}
1):(0,n.jsxs)(y.A,{sx:{maxWidth:"600px",margin:"0 auto",padding:{xs:"0 12px",sm:"0 20px"},display:"flex",flexDirection:"column",gap:"20px"},children:[(0,n.jsx)(y.A,{sx:{display:"flex",justifyContent:"center"},children:(0,n.jsxs)(x.A,{onClick:ft,size:"small",sx:{textTransform:"none",fontSize:"12px",fontWeight:500,color:"#9CA3AF",border:"1px dashed #D1D5DB",borderRadius:"8px",padding:"4px 14px","&:hover":{backgroundColor:"#F9FAFB",borderColor:"#9CA3AF"}},children:[(0,n.jsx)(K.$8F,{style:{fontSize:"14px",marginRight:"4px"}}),fe("course.examples.clearAll","Clear all examples")]})}),((null===(ae=St[At])||void 0===ae?void 0:ae.lessons)||[]).map((t,o)=>(0,n.jsxs)(y.A,{sx:{position:"relative"},children:[(0,n.jsx)(y.A,{sx:{position:"absolute",top:"10px",right:"10px",zIndex:10,backgroundColor:"#F59E0B",color:"#fff",fontSize:"10px",fontWeight:700,padding:"2px 8px",borderRadius:"4px",textTransform:"uppercase"},children:fe("community.library.exampleBadge","EXAMPLE")}),(0,n.jsx)(y.A,{sx:{border:"2px dashed #D1D5DB",borderRadius:"12px",overflow:"hidden"},children:(0,n.jsx)(u.A,{...t,fileUrl:t.fileUrl||t.file,thumbnailUrl:t.thumbnail,time:t.added,display_name:wt,username:vt,user_icon:e.influencer_icon||"",current_user:e.current_user,current_user_icon:e.current_user_icon,is_me:!0,windowWidth:e.windowWidth,currency:e.currency,setState:e.setState,designProperties:e.designProperties,content_completion_stats:at,total_enrolled:dt,progress_tracking_enabled:!0,loadFileUrl:()=>{},loadPreviewFileUrl:()=>{},setFileUrl:()=>{}})})]},t.id))]})),e.windowWidth>=900||wr&&("courses"===e.selected_tab||"paid_collections"===e.selected_tab||"collections"===e.selected_tab)&&""!==e.single_view_collection&&gr.length>0&&!e.contentIsLoading?(0,n.jsx)(m.Ay,{id:"content_container",container:!0,sx:{minHeight:"50vh",display:"library"===e.courseLibraryTab?"none":void 0},children:"scheduled"===e.selected_tab||"saved"===e.selected_tab||"saved_sub_posts"===e.selected_tab||"saved_paid_posts"===e.selected_tab||"live now"===e.selected_tab||"sub_collections"===e.selected_tab&&!0===e.contentIsLoading&&e.is_me||"sub_collections"===e.selected_tab&&!1===e.is_me||"sub_collections"===e.selected_tab&&gr.length>0&&!1===e.contentIsLoading||"paid_collections"===e.selected_tab&&!0===e.contentIsLoading&&e.is_me||"paid_collections"===e.selected_tab&&!1===e.is_me||"paid_collections"===e.selected_tab&&gr.length>0&&!1===e.contentIsLoading||"collections"===e.selected_tab&&!0===e.contentIsLoading&&e.is_me||"collections"===e.selected_tab&&!1===e.is_me||"collections"===e.selected_tab&&gr.length>0&&!1===e.contentIsLoading||"courses"===e.selected_tab&&wr&&!0===e.contentIsLoading&&e.is_me||"courses"===e.selected_tab&&wr&&!1===e.is_me||"courses"===e.selected_tab&&wr&&gr.length>0&&!1===e.contentIsLoading||"sub_posts"===e.selected_tab&&Bn.length>0||"sub_posts"===e.selected_tab&&0===Bn.length&&!1===e.is_me||"sub_posts"===e.selected_tab&&0===Bn.length&&Ar||"paid_posts"===e.selected_tab&&Bn.length>0||"paid_posts"===e.selected_tab&&0===Bn.length&&!1===e.is_me||"paid_posts"===e.selected_tab&&0===Bn.length&&Ar||"digital_products"===e.selected_tab&&Bn.length>0||"digital_products"===e.selected_tab&&0===Bn.length&&!1===e.is_me||"urls"===e.selected_tab&&Bn.length>0?(0,n.jsxs)(m.Ay,{xs:12,container:!0,justifyContent:"center",alignItems:"urls"===e.selected_tab||"courses"===e.selected_tab||"paid_collections"===e.selected_tab?"baseline":"center",sx:{marginTop:"paid_collections"===e.selected_tab&&""!==e.single_view_collection&&e.course_chapters&&e.course_chapters.length>0&&!1===e.is_me&&e.windowWidth<=1100&&!0!==e.isCollectionContentReorder&&!(gr&&gr[yr]&&ge(gr[yr],!0))&&(()=>{const{regularChapters:t,otherChapter:o}=zt(e.course_chapters||[]);return!(0===t.length&&null!==o)})()||"storefront"!==e.pageLayoutType||!1!==e.is_me&&"preview"!==e.current_page_view?"0px":"100px"},children:[""!==e.single_view_collection&&("sub_collections"===e.selected_tab||"paid_collections"===e.selected_tab||"collections"===e.selected_tab)||"sub_posts"===e.selected_tab||"paid_posts"===e.selected_tab||"digital_products"===e.selected_tab||("paid_collections"===e.selected_tab||"collections"===e.selected_tab||"courses"===e.selected_tab)&&""!==e.single_view_collection||"urls"===e.selected_tab?"paid_collections"!==e.selected_tab&&"courses"!==e.selected_tab||""===e.single_view_collection||!(e.course_chapters&&e.course_chapters.length>0||e.is_me&&("paid_collections"===e.selected_tab||"courses"===e.selected_tab))||!(e.windowWidth>900)||!0===e.isCollectionContentReorder||ot||gr&&gr[yr]&&ge(gr[yr],!0)||!(()=>{const{regularChapters:t,otherChapter:o}=zt(e.course_chapters||[]);return!(0===t.length&&null!==o)||e.is_me})()?(0,n.jsx)(n.Fragment,{children:!rs&&Sr&&null!==Cr&&void 0!==Cr&&Cr.influencer?(0,n.jsxs)(y.A,{s
1x:{width:"100%",maxWidth:"1360px",margin:"0 auto",position:"relative",...he?{display:"flex",flexDirection:"column",gap:"16px"}:{}},children:[(0,n.jsx)(y.A,{sx:{display:ot?"none":"flex",justifyContent:"center",width:"100%"},children:ss}),(0,n.jsx)(y.A,{sx:{position:he?"static":"absolute",top:0,right:"20px",width:he?"100%":"300px",zIndex:1},children:(0,n.jsx)(m.Ay,{item:!0,xs:12,className:e.windowWidth<1280?"content_island_mobile":"content_island",style:{backgroundColor:"var(--rebranding-content-background-color)",height:"auto",margin:"0px 0px 25px 0px",padding:"0px 0px 10px 0px"},children:(0,n.jsxs)("div",{style:{padding:"10px 16px",boxSizing:"border-box"},children:[(0,n.jsx)("p",{style:{fontSize:"16px"},children:(0,n.jsx)("strong",{children:fe("affiliate.shareAndEarn")})}),(0,n.jsx)("p",{style:{width:"100%",margin:"0px 0px 15px 0px",fontWeight:"500",fontSize:"14px",color:"#6E89AF"},children:"Share your affiliate link and earn commission when someone joins."}),(0,n.jsx)("div",{style:{display:"flex"},children:(0,n.jsx)(X.A,{productType:Cr.productType,productId:Cr.productId,productName:Cr.productName,influencer:Cr.influencer,hasAccess:!0,buttonVariant:"full",size:"small"})})]})})})]}):Ft&&e.isCollectionContentReorder&&e.windowWidth>1100&&!(e.windowWidth>=1280&&e.windowWidth<=1424)?(0,n.jsx)(y.A,{sx:{width:"100%",maxWidth:"600px",margin:"0 auto"},children:(0,n.jsx)($.ReactSortable,{list:(null===(pe=St[At])||void 0===pe?void 0:pe.lessons)||[],setList:e=>{kt(t=>t.map((t,o)=>o===At?{...t,lessons:e}:t))},animation:150,style:{display:"flex",flexDirection:"column",gap:"0px"},children:((null===(ue=St[At])||void 0===ue?void 0:ue.lessons)||[]).map((e,t)=>(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"15px",padding:"14px 16px",backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"10px",cursor:"grab",marginBottom:"10px",marginTop:0===t?"10px":"0px"},children:[(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"15px",width:"90%"},children:[(0,n.jsx)(y.A,{sx:{width:"28px",height:"28px",borderRadius:"50%",backgroundColor:"#F5F7FA",display:"flex",alignItems:"center",justifyContent:"center",color:"#6E89AF",fontSize:"14px",fontWeight:600},children:t+1}),(0,n.jsxs)(y.A,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"10px"},children:[(0,n.jsx)("p",{style:{fontSize:"16px",fontWeight:600,margin:0},children:e.name}),(0,n.jsx)("span",{style:{fontSize:"9px",fontWeight:700,color:"#fff",backgroundColor:"#F59E0B",padding:"1px 6px",borderRadius:"4px",textTransform:"uppercase"},children:fe("community.library.exampleBadge","EXAMPLE")})]})]}),(0,n.jsx)("div",{style:{cursor:"grab",height:"100%",display:"flex",alignItems:"center"},children:(0,n.jsx)(H.LUV,{style:{color:"#6E89AF",fontSize:"20px"}})})]},e.id))})}):(0,n.jsx)(n.Fragment,{children:ot?null:ss})}):(0,n.jsxs)(y.A,{sx:{position:"relative",width:"100%"},children:[(0,n.jsx)(y.A,{sx:{display:!0===e.is_me&&(e.windowWidth<=1100||e.windowWidth>=1280&&e.windowWidth<=1424)||!1===e.is_me&&e.windowWidth<=1100?"none":"block",position:"absolute",left:"0",top:"0px",width:"25%",maxWidth:"320px",height:"fit-content",maxHeight:"calc(100vh - 100px)",overflowY:"auto",paddingRight:"20px",zIndex:1},children:(0,n.jsxs)(y.A,{sx:{backgroundColor:"#fff",borderRadius:"14px",border:"1px solid #E4EBF6",padding:"24px 20px",boxShadow:"0 2px 8px rgba(0,0,0,0.04)",position:"sticky",top:"80px"},children:[(0,n.jsxs)(y.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[(0,n.jsx)(_.A,{sx:{fontSize:"12px",fontWeight:700,color:"#6E89AF",letterSpacing:"1px",textTransform:"uppercase"},children:fe("influencer.headers.chapters")}),e.is_me&&(0,n.jsxs)(x.A,{variant:"outlined",size:"small",onClick:()=>Me(!0),sx:{minWidth:0,padding:"2px 10px",fontSize:"12px",fontWeight:600,borderRadius:"8px",textTransform:"none",color:"var(--brand-color)",borderColor:"var(--brand-color)","&:hover":{backgroundColor:"#F4F6FB",borderColor:"var(--brand-color)"}},children:[(0,n.jsx)(G.r2j,{style:{fontSize:"14px",marginRight:"4px"}}),fe("influencer.actions.chapter","Chapter")]})]}
1),(0,n.jsx)(y.A,{sx:{display:"flex",flexDirection:"column",gap:"10px"},children:(()=>{const{regularChapters:t,otherChapter:o}=zt(e.course_chapters||[]),i=[...t];if(o&&i.push(o),0===i.length&&e.is_me)return Ft?(0,n.jsx)($.ReactSortable,{list:St,setList:kt,animation:150,handle:".example-chapter-drag",style:{display:"flex",flexDirection:"column",gap:"10px"},children:St.map((e,t)=>(0,n.jsxs)(y.A,{onClick:()=>_t(e.id),sx:{padding:"4px 12px",borderRadius:"16px",cursor:"pointer",transition:"all 0.15s ease",backgroundColor:"#fff",border:At===t?"1.5px solid var(--brand-color)":"1.5px solid #E4EBF6","&:hover":{backgroundColor:"#F8F9FB"}},children:[(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,n.jsx)(y.A,{className:"example-chapter-drag",sx:{cursor:"grab",display:"flex",alignItems:"center"},children:(0,n.jsx)(H.LUV,{style:{color:"#9CA3AF",fontSize:"16px"}})}),(0,n.jsx)(y.A,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:At===t?"#DDE4F8":"#EDF0F7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,n.jsx)(_.A,{sx:{fontSize:"12px",fontWeight:700,color:At===t?"var(--brand-color)":"#6E89AF"},children:t+1})}),(0,n.jsx)(_.A,{sx:{fontSize:"13px",fontWeight:At===t?600:500,color:"#1D1D1D",flex:1},children:e.name}),(0,n.jsx)("span",{style:{fontSize:"9px",fontWeight:700,color:"#fff",backgroundColor:"#F59E0B",padding:"1px 6px",borderRadius:"4px",textTransform:"uppercase",flexShrink:0},children:fe("community.library.exampleBadge","EXAMPLE")})]}),((t,o,i,r)=>{const s=it[e.id];if(!s)return null;const a=null!==(t=s.completion_rate)&&void 0!==t?t:0,l=null!==(o=s.completed)&&void 0!==o?o:0,d=null!==(i=null!==(r=s.enrolled)&&void 0!==r?r:dt)&&void 0!==i?i:0;return(0,n.jsxs)(y.A,{sx:{px:"4px",pb:"6px",pt:"4px"},children:[(0,n.jsx)(y.A,{sx:{height:"5px",backgroundColor:"#E4EBF6",borderRadius:"3px",overflow:"hidden",width:"100%"},children:(0,n.jsx)(y.A,{sx:{width:`${a}%`,height:"100%",backgroundColor:100===a?"#43A047":"var(--brand-color)",borderRadius:"3px",transition:"width 0.3s ease",minWidth:a>0?"4px":"0px"}})}),(0,n.jsx)(_.A,{sx:{fontSize:"10px",color:"#9CA3AF",mt:"3px",textAlign:"center"},children:fe("progress.usersCompleted",{completions:l,enrolled:d})})]})})()]},e.id))}):(0,n.jsx)(_.A,{sx:{fontSize:"12px",color:"#9CA3AF",fontStyle:"italic",textAlign:"center",padding:"8px 0"},children:fe("influencer.chapters.notVisibleToUsers","Chapters are not visible to your customers until you add one.")});const r=(t,o)=>{const i=Array.isArray(t)?t[0]:t,r=Tt(i),s=e.selected_chapter===i||"Other"===e.selected_chapter&&"_-_-other_-_-"===i,a="_-_-other_-_-"===i,l=a?null:o+1;return(0,n.jsxs)(y.A,{onClick:()=>{e.handleCollectionTabChange(null,e.single_view_collection,e.selected_tab,null,null,null,i)},sx:{padding:"8px 12px",borderRadius:"12px",cursor:"pointer",transition:"all 0.15s ease",backgroundColor:s?"#FAFBFF":"#fff",border:s?"1.5px solid var(--brand-color)":"1.5px solid #E4EBF6","&:hover":{backgroundColor:"#F8F9FB"},"&.sortable-ghost":{opacity:.4,backgroundColor:"#E6EDFB"},"&.sortable-chosen":{cursor:"grabbing",backgroundColor:"#E6EDFB",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"}},children:[(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[e.is_me&&!a&&(0,n.jsx)(y.A,{className:"chapter-sidebar-drag",sx:{cursor:"grab",display:"flex",alignItems:"center",flexShrink:0,touchAction:"none"},children:(0,n.jsx)(H.LUV,{style:{color:"#9CA3AF",fontSize:"16px",pointerEvents:"none"}})}),l&&(0,n.jsx)(y.A,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:s?"#DDE4F8":"#EDF0F7",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,n.jsx)(_.A,{sx:{fontSize:"12px",fontWeight:700,color:s?"var(--brand-color)":"#6E89AF"},children:l})}),(0,n.jsx)(_.A,{sx:{fontSize:"13px",fontWeight:s?600:500,color:"#1D1D1D",flex:1,textTransform:"capitalize",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r}),e.is_me&&!a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.A,{onClick:n=>{n.stopPropagation();const r=Array.isArray(t)?t[1]:t.id||t.chapter_id||null;Le(!0),Oe(r),$e(i);const s=(e.course_chapters||[]).findIndex(e=>(Array.isArray(e)?e[0]:"string"===typeof e?e:e.chapter_name||e.name||"")===i);Ve(s>=0?s:o)}
1,sx:{color:"#9CA3AF",padding:"3px","&:hover":{backgroundColor:"#E4EBF6",color:"#6E89AF"}},size:"small",children:(0,n.jsx)(G.O18,{style:{fontSize:"14px"}})}),(0,n.jsx)(f.A,{onClick:e=>{e.stopPropagation();const o=Array.isArray(t)?t[1]:t.id||t.chapter_id||null;o&&(Je(o),Qe(i),Xe(!0))},sx:{color:"#9CA3AF",padding:"3px","&:hover":{backgroundColor:"#FEE2E2",color:"#EF4444"}},size:"small",children:(0,n.jsx)(G.Tqh,{style:{fontSize:"14px"}})})]})]}),((o,r,s,a,l)=>{const d=Array.isArray(t)?t[1]:t.id||t.chapter_id||null,c="_-_-other_-_-"===i?it.other:d?it[String(d)]:null;if(0===Object.keys(it).length)return null;const p=null!==(o=null===c||void 0===c?void 0:c.completion_rate)&&void 0!==o?o:0,u=null!==(r=null===c||void 0===c?void 0:c.completed)&&void 0!==r?r:0,x=null!==(s=null===c||void 0===c?void 0:c.total)&&void 0!==s?s:0,m=null!==(a=null!==(l=null===c||void 0===c?void 0:c.enrolled)&&void 0!==l?l:dt)&&void 0!==a?a:0,h=e.is_me?p:x>0?Math.round(u/x*100):0;return(0,n.jsxs)(y.A,{sx:{px:"2px",pb:"2px",pt:"6px"},children:[(0,n.jsx)(y.A,{sx:{height:"3px",backgroundColor:"#E8ECF3",borderRadius:"2px",overflow:"hidden",width:"100%"},children:(0,n.jsx)(y.A,{sx:{width:`${h}%`,height:"100%",backgroundColor:100===h?"#43A047":"var(--brand-color)",borderRadius:"2px",transition:"width 0.3s ease",minWidth:h>0?"3px":"0px"}})}),(0,n.jsx)(_.A,{sx:{fontSize:"9px",color:"#B0B8C9",mt:"2px",textAlign:"right",fontWeight:500},children:e.is_me?fe("progress.usersCompleted",{completions:u,enrolled:m}):fe("progress.lessonsComplete",{completed:u,total:x})})]})})()]},`chapter-${Array.isArray(t)?t[1]:o}-${i}`)};return e.is_me&&t.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)($.ReactSortable,{list:t.map((e,t)=>({id:"ch-"+(Array.isArray(e)?e[1]:e.id||e.chapter_id||t),chapter:e})),setList:o=>{const i=o.map(e=>e.chapter);if(t.map(e=>Array.isArray(e)?e[0]:e.chapter_name||e.name||"").join("||")===i.map(e=>Array.isArray(e)?e[0]:e.chapter_name||e.name||"").join("||"))return;const{otherChapter:n}=zt(e.course_chapters||[]),r=[...e.course_chapters];e.setState({course_chapters:n?[...i,n]:[...i]});const s=i.map(e=>Array.isArray(e)?e[1]:e.id||e.chapter_id||null).filter(Boolean),a=new FormData;a.append("course_name",e.single_view_collection),a.append("chapter_ids",JSON.stringify(s)),w().post(Q.BACKEND_URL+"api/influencer/community/reorder_course_chapters",a,{withCredentials:!0}).then(t=>{t.data.error&&e.setState({course_chapters:r})}).catch(()=>{e.setState({course_chapters:r})})},animation:150,handle:".chapter-sidebar-drag",style:{display:"flex",flexDirection:"column",gap:"10px"},children:t.map((e,t)=>r(e,t))}),o&&r(o,t.length)]}):i.map((e,t)=>r(e,t))})()}),e.is_me&&(0,n.jsxs)(y.A,{onClick:()=>Me(!0),sx:{marginTop:"12px",padding:"10px",borderRadius:"30px",border:"2px dashed #D1D5DB",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",cursor:"pointer",transition:"all 0.15s","&:hover":{borderColor:"var(--brand-color)",backgroundColor:"#F8F9FF"}},children:[(0,n.jsx)(G.r2j,{style:{fontSize:"14px",color:"#6E89AF"}}),(0,n.jsx)(_.A,{sx:{fontSize:"12px",fontWeight:600,color:"#6E89AF"},children:fe("influencer.actions.addChapter","Add Chapter")})]})]})}),(0,n.jsx)(y.A,{sx:{display:"flex",justifyContent:"center",width:"100%",paddingLeft:"0px",...!e.is_me||"paid_collections"!==e.selected_tab||e.influencer_content_list&&0!==e.influencer_content_list.length?{}:{alignSelf:"stretch"}},children:!Ft||!e.is_me||e.influencer_content_list&&0!==e.influencer_content_list.length||e.selected_chapter&&""!==e.selected_chapter?!e.is_me||"paid_collections"!==e.selected_tab&&"courses"!==e.selected_tab||e.influencer_content_list&&0!==e.influencer_content_list.length||e.contentIsLoading?ot?null:ss:(0,n.jsx)(y.A,{sx:{width:"100%",maxWidth:"600px",margin:"20px auto",textAlign:"center",padding:"40px 20px"},children:(0,n.jsx)(_.A,{sx:{fontSize:"14px",color:"#9CA3AF",fontWeight:500},children:e.selected_chapter&&""!==e.selected_chapter?fe("collections.noContent.emptyChapter","This chapter has no content yet. Add lessons to get started."):fe("collections.noContent.emptyCourse","This course has no content yet. Add lessons to get started.")})}
1):e.isCollectionContentReorder?(0,n.jsx)(y.A,{sx:{width:"100%",maxWidth:"600px"},children:(0,n.jsx)($.ReactSortable,{list:(null===(le=St[At])||void 0===le?void 0:le.lessons)||[],setList:e=>{kt(t=>t.map((t,o)=>o===At?{...t,lessons:e}:t))},animation:150,style:{display:"flex",flexDirection:"column",gap:"0px"},children:((null===(de=St[At])||void 0===de?void 0:de.lessons)||[]).map((e,t)=>(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"15px",padding:"14px 16px",backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"10px",cursor:"grab",marginBottom:"10px",marginTop:0===t?"10px":"0px"},children:[(0,n.jsxs)(y.A,{sx:{display:"flex",alignItems:"center",gap:"15px",width:"90%"},children:[(0,n.jsx)(y.A,{sx:{width:"28px",height:"28px",borderRadius:"50%",backgroundColor:"#F5F7FA",display:"flex",alignItems:"center",justifyContent:"center",color:"#6E89AF",fontSize:"14px",fontWeight:600},children:t+1}),(0,n.jsxs)(y.A,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"10px"},children:[(0,n.jsx)("p",{style:{fontSize:"16px",fontWeight:600,margin:0},children:e.name}),(0,n.jsx)("span",{style:{fontSize:"9px",fontWeight:700,color:"#fff",backgroundColor:"#F59E0B",padding:"1px 6px",borderRadius:"4px",textTransform:"uppercase"},children:fe("community.library.exampleBadge","EXAMPLE")})]})]}),(0,n.jsx)("div",{className:"drag-handle",style:{cursor:"grab",height:"100%",display:"flex",alignItems:"center"},children:(0,n.jsx)(H.LUV,{style:{color:"#6E89AF",fontSize:"20px"}})})]},e.id))})}):(0,n.jsxs)(y.A,{sx:{width:"100%",maxWidth:"600px",display:"flex",flexDirection:"column",gap:"20px"},children:[(0,n.jsx)(y.A,{sx:{display:"flex",justifyContent:"center",mb:2},children:(0,n.jsxs)(x.A,{onClick:ft,size:"small",sx:{textTransform:"none",fontSize:"12px",fontWeight:500,color:"#9CA3AF",border:"1px dashed #D1D5DB",borderRadius:"8px",padding:"4px 14px","&:hover":{backgroundColor:"#F9FAFB",borderColor:"#9CA3AF"}},children:[(0,n.jsx)(K.$8F,{style:{fontSize:"14px",marginRight:"4px"}}),fe("course.examples.clearAll","Clear all examples")]})}),((null===(ce=St[At])||void 0===ce?void 0:ce.lessons)||[]).map((t,o)=>(0,n.jsxs)(m.Ay,{item:!0,xs:12,style:{width:e.windowWidth<=600?"100vw":"600px",maxWidth:"600px",display:"block",margin:"0px auto",position:"relative"},children:[(0,n.jsx)(y.A,{sx:{position:"absolute",top:"10px",right:"10px",zIndex:10,backgroundColor:"#F59E0B",color:"#fff",fontSize:"10px",fontWeight:700,padding:"2px 8px",borderRadius:"4px",textTransform:"uppercase"},children:fe("community.library.exampleBadge","EXAMPLE")}),(0,n.jsx)(y.A,{sx:{border:"2px dashed #D1D5DB",borderRadius:"12px",overflow:"hidden"},children:(0,n.jsx)(u.A,{...t,fileUrl:t.fileUrl||t.file,thumbnailUrl:t.thumbnail,time:t.added,display_name:wt,username:vt,user_icon:e.influencer_icon||"",current_user:e.current_user,current_user_icon:e.current_user_icon,is_me:!0,windowWidth:e.windowWidth,currency:e.currency,setState:e.setState,designProperties:e.designProperties,content_completion_stats:at,total_enrolled:dt,progress_tracking_enabled:!0,loadFileUrl:()=>{},loadPreviewFileUrl:()=>{},setFileUrl:()=>{}})})]},t.id))]})}),e.is_me&&("paid_collections"===e.selected_tab||"courses"===e.selected_tab)&&(0,n.jsxs)(y.A,{sx:{display:!0===e.is_me&&(e.windowWidth<=1100||e.windowWidth>=1280&&e.windowWidth<=1424)||!1===e.is_me&&e.windowWidth<=1100||!e.is_me?"none":"flex",position:"absolute",right:0,top:0,flexDirection:"row",alignItems:"center",justifyContent:"flex-end",gap:"12px",zIndex:1,whiteSpace:"nowrap"},children:[!e.isCollectionContentReorder&&(0,n.jsxs)(x.A,{variant:"contained",size:"small",disableElevation:!0,onClick:()=>{const t=null===gr||void 0===gr?void 0:gr[yr];if(!t)return;const o=new FormData;o.append("course_id",t.id),w()({method:"post",url:(0,l.wE)()+"api/influencer/load_course_chapters",data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(o=>{var i;o.data.error||e.setState({open_content_upload:!0,content_type:0,uploadContentProductType:"course",new_chapter_list:o.data.course_chapters,chapter_content_counts:o.data.chapter_content_counts||{},editCourseContentId:"",selectedCourse:[[0,((null===(i=e.influencer_content_list)||void 0===i?void 0:i.length)||0)+1,t.id]],selected_chapter:e.selected_chapter})})},sx:{textTransform:"none",fontSize:"13px",fontWeight:600,borderRadius:"10px",padding:"8px 20px",backgroundColor:"var(--brand-color)",height:"38px","&:hover":{backgroundColor:"var(--brand-color-hover)"},display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(G.r2j,{style:{fontSize:"16px"}}),(0,n.jsx)("span",{children:fe("collections.noContent.button.course","Add Lesson")})]}),e.isCollectionContentReorder?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(_.A,{onClick:()=>e.setState({isCollectionContentReorder:!1}),sx:{display:"flex",alignItems:"center",gap:"5px",cursor:"pointer",color:"var(--brand-color)",fontSize:"13px",fontFamily:"Roboto",fontWeight:500,"&:hover":{textDecoration:"underline"}},children:[(0,n.jsx)(Z.eFy,{style:{fontSize:"12px"},color:"var(--brand-color)"}),fe("common.save","Save")]}),(0,n.jsxs)(_.A,{onClick:()=>e.setState({isCollectionContentReorder:!1}),sx:{display:"flex",alignItems:"center",gap:"5px",cursor:"pointer",color:"#FD2B2B",fontSize:"13px",fontFamily:"Roboto",fontWeight:500,"&:hover":{textDecoration:"underline"}},children:[(0,n.jsx)(Z.XoR,{style:{fontSize:"12px"},color:"#FD2B2B"}),fe("common.cancel","Cancel")]})]}):(0,n.jsxs)(_.A,{onClick:()=>e.setState({isCollectionContentReorder:!0}),sx:{display:"flex",alignItems:"center",gap:"5px",cursor:"pointer",color:"#6E89AF",fontSize:"13px",fontFamily:"Roboto",fontWeight:500,"&:hover":{textDecoration:"underline"}},children:[(0,n.jsx)(G.bE5,{style:{fontSize:"12px"}}),fe("dashboard.collections.reorderLessons","Reorder Lessons")]}),!e.isCollectionContentReorder&&(0,n.jsxs)(_.A,{onClick:()=>e.setState({isDripFeedMode:!e.isDripFeedMode,isProgressStatsMode:!1,isCollectionContentReorder:!1}),sx:{display:"flex",alignItems:"center",gap:"5px",cursor:"pointer",color:e.isDripFeedMode?"var(--brand-color)":"#6E89AF",fontSize:"13px",fontFamily:"Roboto",fontWeight:500,"&:hover":{textDecoration:"underline"}},children:[(0,n.jsx)(G.Tu,{style:{fontSize:"13px"}}),fe("drip.setDripSchedule","Drip Feed")]})]})]}):null,("sub_posts"!==e.selected_tab&&"paid_posts"!==e.selected_tab||"all"===e.category_filter&&"latest"===e.sort_filter&&"all"===e.content_filter&&-1===e.tier_filter)&&"all"===e.category_filter&&"latest"===e.sort_filter&&"all"===e.content_filter||e.contentIsLoading||!1!==e.update_inf_scroll?null:(0,n.jsx)("p",{style:{fontSize:"14px",fontWeight:"500",textAlign:"center",width:"100%",margin:"100px auto 100px auto",color:"#6E89AF"},children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:fe("content.noMoreContent")}),(0,n.jsx)("span",{style:{color:"var(--brand-color)",textDecoration:"underline",cursor:"pointer",marginLeft:"4px"},onClick:()=>{e.setState({category_filter:"all",sort_filter:"latest",content_filter:"all",tier_filter:e.membershipBannerVisible?e.tier_filter:-1,contentIsLoading:!0,inf_scroll_loading:!0,influencer_content_list:[]});const t=new FormData;t.append("influencer_str",e.influencer_info.influencer),t.append("category","all"),t.append("sort","latest"),t.append("content_type","all"),t.append("tab",e.selected_tab),t.append("collection",""
1===e.single_view_collection?"":gr[gr[yr]]),t.append("post_id",null),t.append("page_n",1),t.append("currency",e.currency),t.append("tier","sub_posts"===e.selected_tab||"all"===e.selected_tab?e.tier_filter:-1);let o=(0,l.wE)();w()({method:"post",url:o+"api/influencer_content_data_tab_change_v8",headers:{"content-type":"application/json"},data:t,withCredentials:!0}).then(t=>{let o=[...t.data.content_list];if(!0===e.dashboard&&"user"===e.view_type)""!==e.single_view_collection||"sub_collections"!==e.selected_tab&&"paid_collections"!==e.selected_tab&&"collections"!==e.selected_tab?t.data.content_list.map((e,t)=>{o[t].current_tier=-1}):t.data.content_list.map((e,t)=>{e.data.map((e,i)=>{o[t].data[i].current_tier=-1})}),e.setState({subpopup_tier_overwrite:-1}),e.setState({subpopup_tier_async_overwrite:!1});else if(!0===e.dashboard&&"user-subscribed"===e.view_type){let i=0,n=!1;!0===e.subscribe_popup_bronze_active&!0===e.subscribe_popup_silver_active&!0===e.subscribe_popup_gold_active&!0===e.subscribe_popup_async_active?(i=2,n=!0):!0===e.subscribe_popup_bronze_active&e.subscribe_popup_silver_active&e.subscribe_popup_gold_active?(i=2,n=!1):!0===e.subscribe_popup_bronze_active&e.subscribe_popup_silver_active&e.subscribe_popup_async_active?(i=2,n=!0):!0===e.subscribe_popup_bronze_active&e.subscribe_popup_gold_active&e.subscribe_popup_async_active||!0===e.subscribe_popup_silver_active&e.subscribe_popup_gold_active&e.subscribe_popup_async_active?(i=3,n=!0):!0===e.subscribe_popup_bronze_active&e.subscribe_popup_silver_active||!0===e.subscribe_popup_bronze_active&e.subscribe_popup_gold_active?(i=1,n=!1):!0===e.subscribe_popup_silver_active&e.subscribe_popup_gold_active?(i=2,n=!1):!0===e.subscribe_popup_silver_active&e.subscribe_popup_async_active?(i=2,n=!0):!0===e.subscribe_popup_bronze_active&e.subscribe_popup_async_active?(i=1,n=!0):!0===e.subscribe_popup_gold_active&e.subscribe_popup_async_active?(i=3,n=!0):!0===e.subscribe_popup_bronze_active?(i=1,n=!1):!0===e.subscribe_popup_silver_active?(i=2,n=!1):!0===e.subscribe_popup_gold_active?(i=3,n=!1):!0===e.subscribe_popup_async_active&&(i=-1,n=!0),""!==e.single_view_collection||"sub_collections"!==e.selected_tab&&"paid_collections"!==e.selected_tab&&"collections"!==e.selected_tab?t.data.content_list.map((e,t)=>{o[t].current_tier=i}):t.data.content_list.map((e,t)=>{e.data.map((e,n)=>{o[t].data[n].current_tier=i})}),e.setState({subpopup_tier_overwrite:i}),e.setState({subpopup_tier_async_overwrite:n})}e.setState({refreshing_content_data:!1,influencer_content_list:t.data.content_list,contentIsLoading:!1,inf_scroll_loading:!1,content_list_length:t.data.content_list_length,page_position:t.data.content_list.length,page_n:1}),t.data.content_list.length>=t.data.content_list_length?e.setState({update_inf_scroll:!1}):e.setState({update_inf_scroll:!0})})},children:"Clear Filters"})]})})]}):(0,n.jsxs)("div",{style:{zIndex:"10",width:"100%"},children:["sub_posts"===e.selected_tab&&!e.contentIsLoading&&!e.refreshing_content_data&&(0,n.jsx)("div",{style:{width:"100%",marginTop:e.windowWidth>900?$r:"0px"},children:!e.is_me||"add_content"===e.my_platform_page&&"edit_content"===e.my_platform_page&&"add_course"===e.my_platform_page&&"edit_course"===e.my_platform_page?null:(0,n.jsx)(V.A,{setState:e.setState,my_platform_page:e.my_platform_page,content_type:e.content_type,disabled:!1,late_payment:e.late_payment,windowWidth:e.windowWidth,buttonAction:()=>{e.late_payment?(0,J.A)():(e.setState({content_type:0,my_platform_page:"add_content",from_subscriptions:"subscriptions"===e.current_page_view}),window.scrollTo({top:0,behavior:"instant"}))}})}),("sub_collections"===e.selected_tab||"paid_collections"===e.selected_tab||"collections"===e.selected_tab)&&!e.contentIsLoading&&0===gr.length&&e.is_me&&(0,n.jsx)("div",{style:{width:"100%",marginTop:e.windowWidth>900?$r:"0px"},children:(0,n.jsx)(Y.A,{setState:e.setState,my_platform_page:e.my_platform_page,content_type:e.content_type,disabled:!1,late_payment:e.late_payment,windowWidth:e.windowWidth,buttonAction:()=>{e.late_payment?(0,J.A)():e.setState({newPlaylistModal:!0})}})}),"membership"===e.selected_tab&&e.is_me&&(0,n.jsx)("div",{style:{margin:"0px auto",boxSizing:"border-box"},children:(0,n.jsx)(D.A,{setNewTierModal:Wt,trialLength:e.trialLength,setTrialLength:e.setTrialLength,updateTrialLength:Mr,openAddNewTier:Tr,setOfferingError:Mt,offeringError:Rt,setEditOffering:Pt,setShowInitialSlide:io,showInitialSlide:oo,editOffering:It,setTiersModal:t=>{e.setState({tiersModal:t})},tiersModal:e.tiersModal,updateFreeActive:Dr,freeActive:no,bronzeActive:so,silverA
1ctive:lo,goldActive:po,asyncActive:xo,bronzeAnnualActive:So,bronzeMonthlyActive:Ao,bronzeTierName:ho,bronzePerksText:bo,bronzeMonthlyPrice:vo,bronzeYearlyPrice:jo,silverAnnualActive:Oo,silverMonthlyActive:$o,silverTierName:To,silverPerksText:Wo,silverMonthlyPrice:Po,silverYearlyPrice:Lo,goldAnnualActive:ii,goldMonthlyActive:ri,goldTierName:Go,goldPerksText:Xo,goldMonthlyPrice:Qo,goldYearlyPrice:ti,asyncAnnualActive:bi,asyncMonthlyActive:vi,asyncTierHidden:Si,asyncTierApply:Ai,asyncTierName:di,asyncPerksText:pi,asyncMonthlyPrice:hi,asyncYearlyPrice:fi,currency:Ti,currencySymbol:Wi,currencySymbolPost:Mi,openEditTier:Er,handleCloseTiers:e.handleCloseTiers,setOpenOfferingWhatsThis:e.setOpenOfferingWhatsThis,openOfferingWhatsThis:e.openOfferingWhatsThis,asyncTier:Pi,setAsyncTier:Bi,influencerUsername:e.influencerUsername,asyncPrice2Rebill:ji,asyncPrice2Time:Di,loadTierInfo:Br,openPaidDMs:()=>zr()})}),"membership"===e.selected_tab||"async"===e.selected_tab?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(E.A,{open:Et,onClose:()=>Wt(!1),"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",disableAutoFocus:!0,sx:{backgroundColor:"rgba(0,0,0,0.47)",outline:"0",borderRadius:"5px",overflow:"hidden",display:"flex",zIndex:"9999",lineHeight:"25px",width:"100%",minHeight:"100vh",maxHeight:"100vh"},children:(0,n.jsx)(m.Ay,{container:!0,justifyContent:"center",sx:{minHeight:"100vh",display:"flex",width:"100%",margin:"auto",maxHeight:"500px",outline:"none"},children:(0,n.jsx)(P.default,{current_user:e.current_user,setNewTierModal:Wt,updatedTierNameInput:Kt,showSlider:Oi,setUpdatedTierNameInput:Jt,updatedMonthlyInput:qt,setUpdatedMonthlyInput:Qt,setShowInitialSlide:io,updatedAnnualInput:eo,setUpdatedAnnualInput:to,setOpenOfferingWhatsThis:e.setOpenOfferingWhatsThis,openOfferingWhatsThis:e.openOfferingWhatsThis,editOffering:It,windowWidth:e.windowWidth,setOfferingError:Mt,currency:Ti,currencySymbol:Wi,currencySymbolPost:Mi,setTiersModal:t=>{e.setState({tiersModal:t})},tierNum:Li,tierName:$i,setTierName:Hi,perksText:Vi,perksTextNum:Ji,monthlyPrice:Gi,yearlyPrice:Xi,annualActive:Qi,setMonthlyActive:on,setAnnualActive:en,monthlyActive:tn,monthlyPriceStr:ln,yearlyPriceStr:mn,setMonthlyPriceError:fn,monthlyPriceError:gn,setAnnualPriceError:bn,yearlyPriceError:yn,setMonthlyPriceStr:dn,setAnnualPriceStr:hn,updatePerks:Wr,updatePerksRemove:Ir,updateTier:Rr,setMonthlyPrice:Zi,setAnnualPrice:Ki,newTierBenefitsModal:_n,setNewTierBenefitsModal:vn,deleteTierModal:wn,setDeleteTierModal:jn,setWhatsThisModal:e.setWhatsThisModal,deleteTier:Pr,asyncTier:Pi,setAsyncTier:Bi,price2Rebill:cn,price2Time:un,setPrice2Rebill:pn,setPrice2Time:xn,tierHidden:nn,tierApply:sn,setTierHidden:rn,setTierApply:an,bronzeTierName:ho,silverTierName:To,goldTierName:Go,asyncTierName:di,nMessages:kn,setNMessages:An})})}),(0,n.jsx)(E.A,{open:e.whatsThisModal,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",disableAutoFocus:!0,sx:{backgroundColor:"rgba(0,0,0,0.47)",borderRadius:"5px",overflow:"hidden",minWidth:"50vw",outline:"0",display:"flex",zIndex:"9999",lineHeight:"25px"},children:(0,n.jsx)(m.Ay,{container:!0,justifyContent:"center",sx:{borderRadius:"5px",margin:"auto",maxWidth:"1400px"},children:(0,n.jsx)(m.Ay,{style:{justifyContent:"flex-end",alignItems:"center",width:"30%",minWidth:"350px",backgroundColor:"white",borderRadius:"10px",height:"40vh",minHeight:"500px"},children:(0,n.jsxs)(m.Ay,{container:!0,sx:{direction:"row",justifyContent:"center",alignItems:"center",display:"flex"},children:[(0,n.jsx)(m.Ay,{md:12,xs:12,sx:{marginTop:"10px",direction:"row",justifyContent:"center",alignItems:"center",display:"flex",backgroundColor:"green"},children:"Image"}),(0,n.jsx)(m.Ay,{md:12,xs:12,sx:{justifyContent:"center",alignItems:"center",display:"flex"},children:(0,n.jsx)("div",{style:{textAlign:"center",paddingTop:"0px",marginTop:"0px"},children:(0,n.jsx)("h2",{children:fe("selfServe.examplePopupTip")})})}),(0,n.jsx)(m.Ay,{md:12,xs:12,sx:{justifyContent:"center",alignItems:"center",display:"flex"},children:(0,n.jsx)("div",{style:{textAlign:"center",paddingTop:"0px",marginTop:"0px"},children:(0,n.jsx)("p",{children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac velit in odio suscipit semper. Ut ac cursus nunc."})})}),(0,n.jsx)(m.Ay,{container:!0,sx:{width:"100%",justifyContent:"center",paddingTop:"20px"},children:(0,n.jsx)(ee,{style:{paddingLeft:"70px",paddingRight:"70px"},onClick:()=>{e.setState({whatsThisModal:!1})},children:"OK,Got it"})})]})})})})]}):null,Bt?(0,n.jsx)(B.default,{paidDMsModal:!0,setPaidDMsModal:Lt,paidDMsActive:Fn,setPaidDMsActive:Dn,remainingPaidDMsCount:zn,setRemainingPaidDMsCount:Tn,paidDMsOrderCount:En,setPaidDMsOrderCount:Wn,paidDMsMaximumMessageLength:Yt,paidDMsMinimumPrice:Ut,paidDMsMinimumPriceStr:Ht,paid
1DMsActiveSettings:Nt,setPaidDMsMaximumMessageLength:Gt,setPaidDMsMinimumPrice:$t,setPaidDMsMinimumPriceStr:Vt,setPaidDMsActiveSettings:Ot,priceOfDMsError:Zt,setPriceOfDMsError:Xt,currency:Ti,currencySymbol:Wi,currencySymbolPost:Mi,setMaxMessageLength:e.setMaxMessageLength,setState:e.setState,handleTabNavigation:e.handleTabNavigation,current_page_view:e.current_page_view,windowWidth:e.windowWidth,...e}):null,"sign_up"===e.selected_tab&&(0,n.jsx)("div",{style:{marginTop:e.windowWidth>900?$r:"40px"},children:(0,n.jsx)(F.A,{activeProductData:e.activeProductData,showLeadCaptureSnackbar:e.showLeadCaptureSnackbar,...e})}),"community"===e.selected_tab?(0,n.jsx)("div",{style:{width:"100%",marginTop:e.windowWidth>900?$r:"0px"},children:e.is_me?(0,n.jsx)(n.Fragment,{children:e.community_is_active||!0===e.influencer_bool&&("user-subscribed"===e.view_type||"user-waitlist"===e.view_type||"user"===e.view_type)?(0,n.jsx)(j.default,{display_name:e.display_name,current_user:e.current_user,current_user_icon:e.current_user_icon,username:e.current_user,influencer_icon:e.influencer_icon,is_me:e.is_me,influencer:e.influencer,influencer_name:e.influencer_name,influencer_tiers:Or,active_influencer_tiers:Yr,influencer_info:e.influencer_info,OpenSubscribePopup:e.OpenSubscribePopup,OpenWaitingListPopup:e.OpenWaitingListPopup,CloseSubscribePopup:e.CloseSubscribePopup,CloseWaitingListPopup:e.CloseWaitingListPopup,currency:e.currency,current_tier:e.subscribe_popup_current_tier,post_id:e.post_id,tab_id:e.tab_id,updateCommunityActive:e.updateCommunityActive,view_type:e.view_type,n_page_views:e.n_page_views,connected_stripe_account_id:e.connected_stripe_account_id,setState:e.setState,mobilePreview:e.mobilePreview,...e}):(0,n.jsx)(p.A,{windowWidth:e.windowWidth,title:fe("community.welcomeTitle"),tooltipLink:null,description:fe("community.welcomeDescription"),buttonText:e.community_is_active?fe("community.disableButton"):fe("community.activateButton"),buttonAction:()=>{e.handleOpenHiddenTabModal()},buttonTextSecondary:fe("common.learnMore"),buttonActionSecondary:()=>{window.open("https://help.withme.so/en/articles/6922173-marketing-101-community-board-best-practices","_blank")},videoSrc:"https://openaccessimages.s3.eu-west-2.amazonaws.com/COMMUNITY+VIDEO+LIV.mp4",titleicon1:"\ud83e\udd1d",titleicon2:"\ud83d\udcac",titleicon3:"\ud83e\udd17",title1:fe("community.benefit1Title"),title2:fe("community.benefit2Title"),title3:fe("community.benefit3Title"),description1:fe("community.benefit1Description"),description2:fe("community.benefit2Description"),description3:fe("community.benefit3Description")})}):(0,n.jsx)(n.Fragment,{children:e.community_is_active?(0,n.jsx)(j.default,{display_name:e.display_name,current_user:e.current_user,current_user_icon:e.current_user_icon,influencer_icon:e.influencer_icon,username:e.current_user,influencer_name:e.influencer_name,is_me:e.is_me,influencer:e.influencer,influencer_tiers:Or,active_influencer_tiers:Hr,influencer_info:e.influencer_info,OpenSubscribePopup:e.OpenSubscribePopup,OpenWaitingListPopup:e.OpenWaitingListPopup,CloseSubscribePopup:e.CloseSubscribePopup,CloseWaitingListPopup:e.CloseWaitingListPopup,currency:e.currency,current_tier:e.subscribe_popup_current_tier,post_id:e.post_id,tab_id:e.tab_id,updateCommunityActive:e.updateCommunityActive,view_type:e.view_type,n_page_views:e.n_page_views,connected_stripe_account_id:e.connected_stripe_account_id,setState:e.setState,mobilePreview:e.mobilePreview,...e}):null})}):null,"async"===e.selected_tab&&"subscriptions"!==e.current_page_view?(0,n.jsx)("div",{children:(0,n.jsx)(C.default,{display_name:e.display_name,current_user:e.current_user,current_user_icon:e.current_user_icon,username:e.current_user,is_me:e.is_me,influencer:e.influencer,asyncActive:e.subscribe_popup_async_active,influencer_tiers:Or,active_influencer_tiers:Hr,influencer_info:e.influencer_info,OpenSubscribePopup:e.OpenSubscribePopup,OpenWaitingListPopup:e.OpenWaitingListPopup,CloseSubscribePopup:e.CloseSubscribePopup,CloseWaitingListPopup:e.CloseWaitingListPopup,currency:e.currency,current_tier:e.subscribe_popup_current_tier,post_id:e.post_id,async_t
1ier_access:e.async_tier_access,selectedMemberTabOverwrite:e.selectedMemberTabOverwrite,top_padding:$r,handleProfileTabChange:e.handleProfileTabChange,asyncAnnualActive:bi,asyncMonthlyActive:vi,asyncTierHidden:Si,asyncTierApply:Ai,asyncTierName:di,asyncPerksText:pi,asyncMonthlyPrice:hi,asyncYearlyPrice:fi,asyncTier:Pi,setAsyncTier:Bi,loadTierInfo:Br,influencerUsername:e.influencerUsername,asyncPrice2Rebill:ji,asyncPrice2Time:Di,setTiersModal:t=>{e.setState({tiersModal:t})},openAddNewTier:Tr,openEditTier:Er,async_apply:e.async_apply,setState:e.setState,scroll:e.open_coaching,windowWidth:e.windowWidth,...e})}):null,"paidDMs"===e.selected_tab?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{children:(0,n.jsx)(S.default,{influencer_bool:e.influencer_bool,current_user:e.current_user,display_name:e.display_name,current_user_icon:e.current_user_icon,username:e.current_user,is_me:e.is_me,influencer:e.influencer,influencer_info:e.influencer_info,currency:e.currency,post_id:e.post_id,dm_active:e.dm_active,selectedMemberTabOverwrite:e.selectedMemberTabOverwrite,top_padding:$r,handleProfileTabChange:e.handleProfileTabChange,openPaidDMs:()=>zr(),openDMCheckout:e.openDMCheckout,openGiftExtraMessageModal:e.openGiftExtraMessageModal,paidDMsActiveSettings:Nt,openCloseUserMessagingModal:e.openCloseUserMessagingModal,updateHasMessage:e.updateHasMessage,paidDMsModal:Bt,paidDMs_show:e.paidDMs_show,maxMessageLength:e.maxMessageLength,setMaxMessageLength:e.setMaxMessageLength,scroll:e.open_messages,paidDMs_has_message:e.paidDMs_has_message,dmAffiliateEnabled:e.dmAffiliateEnabled,dmSettingsId:e.dmSettingsId,windowWidth:e.windowWidth})})}):null]})}):(0,n.jsx)(m.Ay,{id:"content_container",sx:{minHeight:"50vh",display:"library"===e.courseLibraryTab?"none":void 0},container:!0,children:"scheduled"===e.selected_tab||"saved"===e.selected_tab||"saved_sub_posts"===e.selected_tab||"saved_paid_posts"===e.selected_tab||"live now"===e.selected_tab||"sub_collections"===e.selected_tab&&!0===e.contentIsLoading&&e.is_me||"sub_collections"===e.selected_tab&&!1===e.is_me||"sub_collections"===e.selected_tab&&gr.length>0&&!1===e.contentIsLoading||"paid_collections"===e.selected_tab&&!0===e.contentIsLoading&&e.is_me||"paid_collections"===e.selected_tab&&!1===e.is_me||"paid_collections"===e.selected_tab&&gr.length>0&&!1===e.contentIsLoading||"collections"===e.selected_tab&&!0===e.contentIsLoading&&e.is_me||"collections"===e.selected_tab&&!1===e.is_me||"collections"===e.selected_tab&&gr.length>0&&!1===e.contentIsLoading||"courses"===e.selected_tab&&wr&&!0===e.contentIsLoading&&e.is_me||"courses"===e.selected_tab&&wr&&!1===e.is_me||"courses"===e.selected_tab&&wr&&gr.length>0&&!1===e.contentIsLoading||"sub_posts"===e.selected_tab&&Bn.length>0||"sub_posts"===e.selected_tab&&0===Bn.length&&!1===e.is_me||"sub_posts"===e.selected_tab&&0===Bn.length&&Ar||"paid_posts"===e.selected_tab&&Bn.length>0||"paid_posts"===e.selected_tab&&0===Bn.length&&!1===e.is_me||"paid_posts"===e.selected_tab&&0===Bn.length&&Ar||"digital_products"===e.selected_tab&&Bn.length>0||"digital_products"===e.selected_tab&&0===Bn.length&&!1===e.is_me||"urls"===e.selected_tab&&Bn.length>0?(0,n.jsxs)(m.Ay,{xs:12,container:!0,justifyContent:"center",alignItems:"urls"===e.selected_tab?"baseline":"center",children:[""!==e.single_view_collection&&("sub_collections"===e.selected_tab||"paid_collections"===e.selected_tab||"collections"===e.selected_tab)||"sub_posts"===e.selected_tab||"paid_posts"===e.selected_tab||"digital_products"===e.selected_tab||("paid_collections"===e.selected_tab||"collections"===e.selected_tab||"courses"===e.selected_tab)&&""!==e.single_view_collection||"urls"===e.selected_tab?(0,n.jsx)(n.Fragment,{children:ot?null:ss}):null,("sub_posts"!==e.selected_tab&&"paid_posts"!==e.selected_tab||"all"===e.category_filter&&"latest"===e.sort_filter&&"all"===e.content_filter&&-1===e.tier_filter)&&"all"===e.category_filter&&"latest"===e.sort_filter&&"all"===e.content_filter||e.contentIsLoading||!1!==e.update_inf_scroll?null:(0,n.jsx)("div",{style:{fontSize:"14px",fontWeight:"500",margin:"50px auto 100px auto",textAlign:"center",width:"100%",color:"#6E89AF",display:"flex",textAlign:"center",width:"100%"},children:(0,n.jsx)("p",{style:{width:"90%",fontSize:"14px",fontWeight:"500",color:"#6E89AF",textAlign:"center",margin:"auto"},children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:fe("content.noMoreContent")}),(0,n.jsx)("span",{style:{color:"var(--brand-color)",textDecoration:"underline",cursor:"pointer",marginLeft:"4px"},onClick:()=>{e.setState({category_filter:"all",sort_filter:"latest",content_filter:"all",tier_filter:e.membershipBannerVisible?e.tier_filter:-1,contentIsLoading:!0,inf_scroll_loading:!0,influencer_content_list:[]});const t=new FormData;t.append("influencer_str",e.influencer_info.influencer),t.append("category","all"),t.append("sort","latest"),t.append("content_type","all"),t.append("tab",e.selected_tab),t.append("collection",""
1===e.single_view_collection?"":gr[yr]),t.append("post_id",null),t.append("page_n",1),t.append("currency",e.currency),t.append("tier","sub_posts"===e.selected_tab||"all"===e.selected_tab?e.tier_filter:-1);let o=(0,l.wE)();w()({method:"post",url:o+"api/influencer_content_data_tab_change_v8",headers:{"content-type":"application/json"},data:t,withCredentials:!0}).then(t=>{let o=[...t.data.content_list];if(!0===e.dashboard&&"user"===e.view_type)""!==e.single_view_collection||"sub_collections"!==e.selected_tab&&"paid_collections"!==e.selected_tab&&"collections"!==e.selected_tab?t.data.content_list.map((e,t)=>{o[t].current_tier=-1}):t.data.content_list.map((e,t)=>{e.data.map((e,i)=>{o[t].data[i].current_tier=-1})}),e.setState({subpopup_tier_overwrite:-1}),e.setState({subpopup_tier_async_overwrite:!1});else if(!0===e.dashboard&&"user-subscribed"===e.view_type){let i=0,n=!1;!0===e.subscribe_popup_bronze_active&!0===e.subscribe_popup_silver_active&!0===e.subscribe_popup_gold_active&!0===e.subscribe_popup_async_active?(i=2,n=!0):!0===e.subscribe_popup_bronze_active&e.subscribe_popup_silver_active&e.subscribe_popup_gold_active?(i=2,n=!1):!0===e.subscribe_popup_bronze_active&e.subscribe_popup_silver_active&e.subscribe_popup_async_active?(i=2,n=!0):!0===e.subscribe_popup_bronze_active&e.subscribe_popup_gold_active&e.subscribe_popup_async_active||!0===e.subscribe_popup_silver_active&e.subscribe_popup_gold_active&e.subscribe_popup_async_active?(i=3,n=!0):!0===e.subscribe_popup_bronze_active&e.subscribe_popup_silver_active||!0===e.subscribe_popup_bronze_active&e.subscribe_popup_gold_active?(i=1,n=!1):!0===e.subscribe_popup_silver_active&e.subscribe_popup_gold_active?(i=2,n=!1):!0===e.subscribe_popup_silver_active&e.subscribe_popup_async_active?(i=2,n=!0):!0===e.subscribe_popup_bronze_active&e.subscribe_popup_async_active?(i=1,n=!0):!0===e.subscribe_popup_gold_active&e.subscribe_popup_async_active?(i=3,n=!0):!0===e.subscribe_popup_bronze_active?(i=1,n=!1):!0===e.subscribe_popup_silver_active?(i=2,n=!1):!0===e.subscribe_popup_gold_active?(i=3,n=!1):!0===e.subscribe_popup_async_active&&(i=-1,n=!0),""!==e.single_view_collection||"sub_collections"!==e.selected_tab&&"paid_collections"!==e.selected_tab&&"collections"!==e.selected_tab?t.data.content_list.map((e,t)=>{o[t].current_tier=i}):t.data.content_list.map((e,t)=>{e.data.map((e,n)=>{o[t].data[n].current_tier=i})}),e.setState({subpopup_tier_overwrite:i}),e.setState({subpopup_tier_async_overwrite:n})}e.setState({refreshing_content_data:!1,influencer_content_list:t.data.content_list,contentIsLoading:!1,inf_scroll_loading:!1,content_list_length:t.data.content_list_length,page_position:t.data.content_list.length,page_n:1}),t.data.content_list.length>=t.data.content_list_length?e.setState({update_inf_scroll:!1}):e.setState({update_inf_scroll:!0})})},children:"Clear Filters"})]})})})]}):(0,n.jsxs)("div",{style:{marginTop:"community"===e.selected_tab&&e.windowWidth>900?"30px":"0px",backgroundColor:"var(--rebranding-background-color)",zIndex:"10",width:"100%"},children:[("sub_posts"===e.selected_tab||"paid_posts"===e.selected_tab||"urls"===e.selected_tab)&&!e.contentIsLoading&&(0,n.jsx)("div",{style:{width:"100%",marginTop:e.windowWidth>900?$r:"0px"},children:!e.is_me||"add_content"==e.my_platform_page&&"edit_content"==e.my_platform_page&&"add_course"==e.my_platform_page&&"edit_course"==e.my_platform_page?null:(0,n.jsx)(V.A,{setState:e.setState,my_platform_page:e.my_platform_page,content_type:e.content_type,disabled:!1,late_payment:e.late_payment,windowWidth:e.windowWidth,buttonAction:()=>{e.late_payment?(0,J.A)():(e.setState({content_type:0,my_platform_page:"add_content",from_subscriptions:"subscriptions"===e.current_page_view}),window.scrollTo({top:0,behavior:"instant"}))}})}),("sub_collections"===e.selected_tab||"paid_collections"===e.selected_tab||"collections"===e.selected_tab)&&!e.contentIsLoading&&0===Bn.length&&e.is_me&&(0,n.jsx)("div",{style:{width:"100%",marginTop:e.windowWidth>900?$r:"0px"},children:(0,n.jsx)(Y.A,{setState:e.setState,my_platform_page:e.my_platform_page,content_type:e.content_type,disabled:!1,late_payment:e.late_payment,windowWidth:e.windowWidth,buttonAction:()=>{e.late_payment?(0,J.A)():e.setState({newPlaylistModal:!0})}})}),"membership"===e.selected_tab&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(D.A,{setNewTierModal:Wt,trialLength:e.trialLength,setTrialLength:e.setTrialLength,updateTrialLength:Mr,openAddNewTier:Tr,setOfferingError:Mt,offeringError:Rt,setEditOffering:Pt,setShowInitialSlide:io,showInitialSlide:oo,editOffering:It,setTiersModal:t=>{e.setState({tiersModal:t})},tiersModal:e.tiersModal,updateFreeActive:Dr,freeActive:no,bronzeActive:so,silverA
1ctive:lo,goldActive:po,asyncActive:xo,bronzeAnnualActive:So,bronzeMonthlyActive:Ao,bronzeTierName:ho,bronzePerksText:bo,bronzeMonthlyPrice:vo,bronzeYearlyPrice:jo,silverAnnualActive:Oo,silverMonthlyActive:$o,silverTierName:To,silverPerksText:Wo,silverMonthlyPrice:Po,silverYearlyPrice:Lo,goldAnnualActive:ii,goldMonthlyActive:ri,goldTierName:Go,goldPerksText:Xo,goldMonthlyPrice:Qo,goldYearlyPrice:ti,asyncAnnualActive:bi,asyncMonthlyActive:vi,asyncTierHidden:Si,asyncTierApply:Ai,asyncTierName:di,asyncPerksText:pi,asyncMonthlyPrice:hi,asyncYearlyPrice:fi,currency:Ti,currencySymbol:Wi,currencySymbolPost:Mi,openEditTier:Er,handleCloseTiers:e.handleCloseTiers,setOpenOfferingWhatsThis:e.setOpenOfferingWhatsThis,openOfferingWhatsThis:e.openOfferingWhatsThis,asyncTier:Pi,setAsyncTier:Bi,influencerUsername:e.influencerUsername,asyncPrice2Rebill:ji,asyncPrice2Time:Di,loadTierInfo:Br,openPaidDMs:()=>zr(),...e})}),"membership"===e.selected_tab||"async"===e.selected_tab?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(E.A,{open:Et,onClose:()=>Wt(!1),"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",disableAutoFocus:!0,sx:{backgroundColor:"rgba(0,0,0,0.47)",outline:"0",borderRadius:"5px",overflow:"hidden",display:"flex",zIndex:"9999",lineHeight:"25px",width:"100%",minHeight:"100vh",maxHeight:"100vh"},children:(0,n.jsx)(m.Ay,{container:!0,justifyContent:"center",sx:{minHeight:"100vh",display:"flex",width:"100%",margin:"auto",maxHeight:"500px",outline:"none"},children:(0,n.jsx)(P.default,{current_user:e.current_user,setNewTierModal:Wt,updatedTierNameInput:Kt,showSlider:Oi,setUpdatedTierNameInput:Jt,updatedMonthlyInput:qt,setUpdatedMonthlyInput:Qt,setShowInitialSlide:io,updatedAnnualInput:eo,setUpdatedAnnualInput:to,setOpenOfferingWhatsThis:e.setOpenOfferingWhatsThis,openOfferingWhatsThis:e.openOfferingWhatsThis,editOffering:It,windowWidth:e.windowWidth,setOfferingError:Mt,currency:Ti,currencySymbol:Wi,currencySymbolPost:Mi,setTiersModal:t=>{e.setState({tiersModal:t})},tierNum:Li,tierName:$i,setTierName:Hi,perksText:Vi,perksTextNum:Ji,monthlyPrice:Gi,yearlyPrice:Xi,annualActive:Qi,setMonthlyActive:on,setAnnualActive:en,monthlyActive:tn,tierHidden:nn,setTierHidden:rn,tierApply:sn,setTierApply:an,monthlyPriceStr:ln,yearlyPriceStr:mn,setMonthlyPriceError:fn,monthlyPriceError:gn,setAnnualPriceError:bn,yearlyPriceError:yn,setMonthlyPriceStr:dn,setAnnualPriceStr:hn,updatePerks:Wr,updatePerksRemove:Ir,updateTier:Rr,setMonthlyPrice:Zi,setAnnualPrice:Ki,newTierBenefitsModal:_n,setNewTierBenefitsModal:vn,deleteTierModal:wn,setDeleteTierModal:jn,setWhatsThisModal:e.setWhatsThisModal,deleteTier:Pr,asyncTier:Pi,setAsyncTier:Bi,price2Rebill:cn,price2Time:un,setPrice2Rebill:pn,setPrice2Time:xn,bronzeTierName:ho,silverTierName:To,goldTierName:Go,asyncTierName:di,nMessages:kn,setNMessages:An})})}),(0,n.jsx)(E.A,{open:e.whatsThisModal,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",disableAutoFocus:!0,sx:{backgroundColor:"rgba(0,0,0,0.47)",borderRadius:"5px",overflow:"hidden",minWidth:"50vw",outline:"0",display:"flex",zIndex:"9999",lineHeight:"25px"},children:(0,n.jsx)(m.Ay,{container:!0,justifyContent:"center",sx:{borderRadius:"5px",margin:"auto",maxWidth:"1400px"},children:(0,n.jsx)(m.Ay,{style:{justifyContent:"flex-end",alignItems:"center",width:"30%",minWidth:"350px",backgroundColor:"white",borderRadius:"10px",height:"40vh",minHeight:"500px"},children:(0,n.jsxs)(m.Ay,{container:!0,sx:{direction:"row",justifyContent:"center",alignItems:"center",display:"flex"},children:[(0,n.jsx)(m.Ay,{md:12,xs:12,sx:{marginTop:"10px",direction:"row",justifyContent:"center",alignItems:"center",display:"flex",backgroundColor:"green"},children:"Image"}),(0,n.jsx)(m.Ay,{md:12,xs:12,sx:{justifyContent:"center",alignItems:"center",display:"flex"},children:(0,n.jsx)("div",{style:{textAlign:"center",paddingTop:"0px",marginTop:"0px"},children:(0,n.jsx)("h2",{children:fe("selfServe.examplePopupTip")})})}),(0,n.jsx)(m.Ay,{md:12,xs:12,sx:{justifyContent:"center",alignItems:"center",display:"flex"},children:(0,n.jsx)("div",{style:{textAlign:"center",paddingTop:"0px",marginTop:"0px"},children:(0,n.jsx)("p",{children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac velit in odio suscipit semper. Ut ac cursus nunc."})})}),(0,n.jsx)(m.Ay,{container:!0,sx:{width:"100%",justifyContent:"center",paddingTop:"20px"},children:(0,n.jsx)(ee,{style:{paddingLeft:"70px",paddingRight:"70px"},onClick:()=>{e.setState({whatsThisModal:!1})},children:"OK,Got it"})})]})})})})]}):null,Bt?(0,n.jsx)(B.default,{paidDMsModal:!0,setPaidDMsModal:Lt,paidDMsActive:Fn,setPaidDMsActive:Dn,remainingPaidDMsCount:zn,setRemainingPaidDMsCount:Tn,paidDMsOrderCount:En,setPaidDMsOrderCount:Wn,paidDMsMaximumMessageLength:Yt,paidDMsMinimumPrice:Ut,paidDMsMinimumPriceStr:Ht,paid
1DMsActiveSettings:Nt,setPaidDMsMaximumMessageLength:Gt,setPaidDMsMinimumPrice:$t,setPaidDMsMinimumPriceStr:Vt,setPaidDMsActiveSettings:Ot,priceOfDMsError:Zt,setPriceOfDMsError:Xt,currency:Ti,currencySymbol:Wi,currencySymbolPost:Mi,setMaxMessageLength:e.setMaxMessageLength,setState:e.setState,handleTabNavigation:e.handleTabNavigation,current_page_view:e.current_page_view,windowWidth:e.windowWidth,...e}):null,"async"===e.selected_tab&&"subscriptions"!==e.current_page_view?(0,n.jsx)(C.default,{display_name:e.display_name,current_user:e.current_user,current_user_icon:e.current_user_icon,username:e.current_user,is_me:e.is_me,asyncActive:e.subscribe_popup_async_active,influencer:e.influencer,influencer_tiers:Or,active_influencer_tiers:Hr,influencer_info:e.influencer_info,OpenSubscribePopup:e.OpenSubscribePopup,OpenWaitingListPopup:e.OpenWaitingListPopup,CloseSubscribePopup:e.CloseSubscribePopup,CloseWaitingListPopup:e.CloseWaitingListPopup,currency:e.currency,current_tier:e.subscribe_popup_current_tier,post_id:e.post_id,async_tier_access:e.async_tier_access,selectedMemberTabOverwrite:e.selectedMemberTabOverwrite,top_padding:$r,handleProfileTabChange:e.handleProfileTabChange,asyncAnnualActive:bi,asyncMonthlyActive:vi,asyncTierHidden:Si,asyncTierApply:Ai,asyncTierName:di,asyncPerksText:pi,asyncMonthlyPrice:hi,asyncYearlyPrice:fi,asyncTier:Pi,setAsyncTier:Bi,loadTierInfo:Br,influencerUsername:e.influencerUsername,asyncPrice2Rebill:ji,asyncPrice2Time:Di,setTiersModal:t=>{e.setState({tiersModal:t})},openAddNewTier:Tr,openEditTier:Er,async_apply:e.async_apply,setState:e.setState,scroll:e.open_coaching,windowWidth:e.windowWidth,...e}):null,"paidDMs"===e.selected_tab?(0,n.jsx)("div",{children:(0,n.jsx)(S.default,{influencer_bool:e.influencer_bool,current_user:e.current_user,display_name:e.display_name,current_user_icon:e.current_user_icon,username:e.current_user,is_me:e.is_me,influencer:e.influencer,influencer_info:e.influencer_info,currency:e.currency,post_id:e.post_id,dm_active:e.dm_active,selectedMemberTabOverwrite:e.selectedMemberTabOverwrite,top_padding:$r,handleProfileTabChange:e.handleProfileTabChange,openPaidDMs:()=>zr(),openDMCheckout:e.openDMCheckout,paidDMsActiveSettings:Nt,paidDMsModal:Bt,updateHasMessage:e.updateHasMessage,paidDMs_show:e.paidDMs_show,maxMessageLength:e.maxMessageLength,setMaxMessageLength:e.setMaxMessageLength,scroll:e.open_messages,...e})}):null,"sign_up"===e.selected_tab&&(0,n.jsx)("div",{style:{marginTop:e.windowWidth>900?$r:"40px"},children:(0,n.jsx)(F.A,{activeProductData:e.activeProductData,showLeadCaptureSnackbar:e.showLeadCaptureSnackbar,...e})}),"community"===e.selected_tab?(0,n.jsx)("div",{style:{width:"100%",marginTop:e.windowWidth>900?$r:"0px"},children:e.is_me?(0,n.jsx)(n.Fragment,{children:e.community_is_active||!0===e.influencer_bool&&("user-subscribed"===e.view_type||"user-waitlist"===e.view_type||"user"===e.view_type)?(0,n.jsx)(j.default,{display_name:e.display_name,current_user:e.current_user,current_user_icon:e.current_user_icon,influencer_icon:e.influencer_icon,influencer_name:e.influencer_name,username:e.current_user,is_me:e.is_me,influencer:e.influencer,influencer_tiers:Or,active_influencer_tiers:Yr,influencer_info:e.influencer_info,OpenSubscribePopup:e.OpenSubscribePopup,OpenWaitingListPopup:e.OpenWaitingListPopup,CloseSubscribePopup:e.CloseSubscribePopup,CloseWaitingListPopup:e.CloseWaitingListPopup,currency:e.currency,current_tier:e.subscribe_popup_current_tier,post_id:e.post_id,tab_id:e.tab_id,updateCommunityActive:e.updateCommunityActive,view_type:e.view_type,n_page_views:e.n_page_views,connected_stripe_account_id:e.connected_stripe_account_id,setState:e.setState,mobilePreview:e.mobilePreview,...e}):(0,n.jsx)(p.A,{windowWidth:e.windowWidth,title:fe("community.welcomeTitle"),tooltipLink:null,description:fe("community.welcomeDescription"),buttonText:e.community_is_active?fe("community.disableButton"):fe("community.activateButton"),buttonAction:()=>{e.handleOpenHiddenTabModal()},buttonTextSecondary:fe("common.learnMore"),buttonActionSecondary:()=>{window.open("https://help.withme.so/en/articles/6922173-marketing-101-community-board-best-practices","_blank")},videoSrc:"https://openaccessimages.s3.eu-west-2.amazonaws.com/COMMUNITY+VIDEO+LIV.mp4",titleicon1:"\ud83e\udd1d",titleicon2:"\ud83d\udcac",titleicon3:"\ud83e\udd17",title1:fe("community.benef
1it1Title"),title2:fe("community.benefit2Title"),title3:fe("community.benefit3Title"),description1:fe("community.benefit1Description"),description2:fe("community.benefit2Description"),description3:fe("community.benefit3Description")})}):(0,n.jsx)(n.Fragment,{children:e.community_is_active?(0,n.jsx)(j.default,{display_name:e.display_name,current_user:e.current_user,current_user_icon:e.current_user_icon,influencer_icon:e.influencer_icon,username:e.current_user,influencer_name:e.influencer_name,is_me:e.is_me,influencer:e.influencer,influencer_tiers:Or,active_influencer_tiers:Hr,influencer_info:e.influencer_info,OpenSubscribePopup:e.OpenSubscribePopup,OpenWaitingListPopup:e.OpenWaitingListPopup,CloseSubscribePopup:e.CloseSubscribePopup,CloseWaitingListPopup:e.CloseWaitingListPopup,currency:e.currency,current_tier:e.subscribe_popup_current_tier,post_id:e.post_id,tab_id:e.tab_id,updateCommunityActive:e.updateCommunityActive,view_type:e.view_type,n_page_views:e.n_page_views,connected_stripe_account_id:e.connected_stripe_account_id,setState:e.setState,mobilePreview:e.mobilePreview,...e}):null})}):null]})})]}),(0,n.jsx)(O.default,{msg:nr,open:or,severity:sr,backgroundColor:lr,autoHide:cr,handleClose:()=>{ir(!1)}}),(0,n.jsx)(N.A,{shareId:Un,shareInfluencer:Yn,shareName:Hn,shareOpen:Nn,setShareOpen:On})]})};function ie(e){return(0,n.jsx)(s,{...e,ClassicContent:oe})}},37731(e,t,o){"use strict";o.d(t,{A:()=>x});var i=o(82483),n=o(97756),r=o(57513),s=o(25982),a=o(24879),l=o(22829),d=o(7636),c=o(67626),p=(o(4396),o(80685)),u=o(56723);const x=e=>{let{open:t,handleClose:o,addToBenefitsList:x,editBenefit:m,asyncTier:h,benefitsList:g,removePaidMessageBenefit:f,removeFromBenefitsList:y,isEditing:b,replaceWithCustomBenefit:_,replaceBenefit:v,customBenefitName:w,handleCustomBenefitName:j,paidMessagesBenefitTotal:C,handlePaidMessagesBenefitTotal:S,paidMessagesTitleType:k,handlePaidMessagesTitleType:A}=e;const{t:F}=(0,n.Bd)(),[D,z]=i.useState("custom"),[T,E]=i.useState(!1),[W,R]=i.useState(!1),[M,I]=i.useState("");(0,i.useEffect)(()=>{w.length>30&&(R(!0),I(F("dashboard.benefits.maxCharsError")))},[w]);const P=F("dashboard.benefits.benefitOptions.membership",{returnObjects:!0}),B=F("dashboard.benefits.benefitOptions.async",{returnObjects:!0}),L=F("dashboard.benefits.benefitOptions.paidMessageTitles",{returnObjects:!0}),N=Array.isArray(P)?P:[],O=Array.isArray(B)?B:[],U=Array.isArray(null===L||void 0===L?void 0:L.plural)?L.plural:[],$=Array.isArray(null===L||void 0===L?void 0:L.singular)?L.singular:[],H=C>1?U:$,V=h?O:N,Y=N.length>0?N[0].name:"",G=N.length>1?N[1].name:"";return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a.A,{hideBackdrop:!0,open:t,onClose:o,sx:{zIndex:"9999",overflow:"auto",backgroundColor:"transparent",backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,u.jsxs)("div",{style:{backgroundColor:"white",maxWidth:"600px",paddingBottom:"20px",margin:"0px auto",marginTop:"5%",marginBottom:"5%",overflow:"auto",borderRadius:window.innerWidth>600?"10px":"0px"},children:[(0,u.jsxs)(r.Ay,{container:!0,style:{width:"90%",justifyContent:"center",alignItems:"center",height:"auto",margin:"20px auto 10px auto",maxHeight:"2000px",display:"flex"},children:[(0,u.jsx)(r.Ay,{lg:11,xs:11,children:!0===b?(0,u.jsxs)("h3",{children:[F("dashboard.benefits.editBenefitsTitle",{count:g.length}),!0===h?F("onboarding.yourOfferingModal.oneOnOneSupportSuffix"):""]}):(0,u.jsxs)("h3",{children:[F("dashboard.benefits.addBenefitsTitle",{count:g.length}),!0===h?F("onboarding.yourOfferingModal.oneOnOneSupportSuffix"):""]})}),(0,u.jsx)(r.Ay,{lg:1,xs:1,style:{top:"0px",padding:"0px",float:"right",textAlign:"right"},children:(0,u.jsx)("div",{style:{"&:hover":{cursor:"pointer"}},children:(0,u.jsx)("a",{onClick:()=>{o()},children:(0,u.jsx)(l.$8F,{className:"modal-close-icon",style:{width:"25px",height:"25px"}})})})})]}),(0,u.jsx)("div",{style:{backgroundColor:"#D3DCE7",marginTop:"0px",width:"90%",height:"1px",marginBottom:"10px",margin:"10px auto",padding:"0px 0px"}}),V.map(e=>{const t=e.name===Y,o=e.name===G,i=[...U,...$],n=g.some(e=>i.some(t=>e.name.includes(t))),a=g.some(t=>t.name===e.name),l=g.length>=4,d=b&&m===e.name?"Current":o&&n?"Remove":b&&o?"Edit":m===e.name?"Current":g.length>
1=4&&!a?"Max Benefits":l||a?"Remove":"Add";return(0,u.jsxs)(r.Ay,{container:!0,sx:{marginBottom:"10px",width:"90%",margin:"auto",padding:"20px 0px"},children:[(0,u.jsxs)(r.Ay,{xs:9,children:[(0,u.jsxs)("h4",{style:{margin:"0px 0px 10px 0px"},children:[e.name===G?F("dashboard.benefits.messages"):e.name," ",e.name===G?(0,u.jsx)("span",{style:{color:"var(--brand-color)",verticalAlign:"text-bottom",fontSize:"14px",margin:"0px 0px 0px 7px"},children:F("dashboard.benefits.new")}):""]}),(0,u.jsx)("p",{style:{color:"#6D89AF",fontSize:"14px",margin:"0px 0px 0px 0px"},children:e.description})]}),(0,u.jsx)(r.Ay,{xs:3,style:{display:"flex",alignItems:"right",justifyContent:"right",height:"max-content"},children:(0,u.jsxs)(s.A,{disabled:l&&!a,sx:{color:"#fff",backgroundColor:"Remove"===d||l&&!a?"#fff":"var(--brand-color)",color:"Remove"===d||l&&!a?"var(--brand-color)":"#fff",border:l&&!a?"1.5px solid #BDBDBD":"1.5px solid var(--brand-color)",fontFamily:"roboto",fontWeight:"500",fontSize:"13px",borderRadius:"8px","&:hover":{border:l&&!a?"1.5px solid var(--brand-color-hover":"1.5px solid var(--brand-color)",backgroundColor:"var(--brand-color-hover)",color:"#fff"}},onClick:()=>{"Remove"===d&&e.name===G?f(e.name):"Remove"===d?y(e.name):b?t||o?(z(e.name),E(!0)):v(m,e.name):o||t?(z(e.name),E(!0)):x(e.name)},children:["Remove"===d?(0,u.jsx)(p.B_9,{style:{fontSize:"13px",margin:"4.5px 3px auto 0px",rotate:"45deg"}}):"Max Benefits"===d||"Current"===d?(0,u.jsx)(p.sFm,{style:{fontSize:"13px",margin:"4.5px 3px auto 0px"}}):(0,u.jsx)(p.B_9,{style:{fontSize:"13px",margin:"4.5px 3px auto 0px"}}),"Remove"===d?F("dashboard.benefits.remove"):"Current"===d?F("dashboard.benefits.current"):"Edit"===d?F("common.edit"):"Max Benefits"===d?F("dashboard.benefits.maxBenefits"):"Add"===d?F("dashboard.benefits.add"):d]})})]},e.name)}),(0,u.jsx)("div",{style:{display:"flex",width:"100%"},children:(0,u.jsx)(s.A,{fullWidth:!0,onClick:()=>{o()},disableElevation:!0,sx:{padding:"5px 25px",width:"90%",textAlign:"center",display:"inline-block",color:"#fff",margin:"20px auto 15px auto",borderRadius:"10px",textTransform:"none",border:"2px var(--brand-color) solid",backgroundColor:"var(--brand-color)","&:hover":{color:"#fff",backgroundColor:"var(--brand-color-hover)",border:"2px var(--brand-color-hover) solid"}},children:(0,u.jsx)("span",{className:"fa fa-search",style:{fontWeight:"600",fontSize:"16px"},children:F("dashboard.benefits.finishedAddingBenefits")})})}),(0,u.jsxs)("p",{style:{color:"#6D89AF",fontSize:"14px",margin:"15px 0px 15px 0px",textAlign:"center"},children:[F("dashboard.benefits.cantFindPrompt")," ",(0,u.jsx)("span",{onClick:()=>{z("Custom benefit - write your own"),E(!0)},style:{color:"var(--brand-color)",textDecoration:"underline",cursor:"pointer"},children:F("dashboard.benefits.addYourOwn")})]})]})}),(0,u.jsx)(a.A,{open:T,onClose:o,sx:{zIndex:"9999",overflow:"auto",backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,u.jsx)("div",{style:{minHeight:"100vh",height:"100%",width:"100%",display:"flex"},children:(0,u.jsxs)("div",{style:{backgroundColor:"white",maxWidth:"450px",minWidth:"320px",width:"100%",paddingBottom:"20px",margin:"auto",overflow:"auto",borderRadius:window.innerWidth>600?"10px":"0px"},children:[(0,u.jsxs)(r.Ay,{container:!0,style:{width:"90%",justifyContent:"center",alignItems:"center",height:"auto",margin:"20px auto 10px auto",maxHeight:"2000px",display:"flex"},children:[(0,u.jsx)(r.Ay,{lg:11,xs:11,children:D===G?(0,u.jsx)("h3",{children:F("dashboard.benefits.messages")}):(0,u.jsx)("h3",{children:F("dashboard.benefits.customBenefit")})}),(0,u.jsx)(r.Ay,{lg:1,xs:1,style:{top:"0px",padding:"0px",float:"right",textAlign:"right"},children:(0,u.jsx)("div",{style:{"&:hover":{cursor:"pointer"}},children:(0,u.jsx)("a",{onClick:()=>{E(!1)},children:(0,u.jsx)(l.$8F,{className:"modal-close-icon",style:{width:"25px",height:"25px"}})})})})]}),(0,u.jsx)("div",{style:{backgroundColor:"#D3DCE7",marginTop:"0px",width:"90%",height:"1px",marginBottom:"10px",margin:"10px auto",padding:"0px 0px"}}),(0,u.jsxs)(u.Fragment,{children:[D!==G?(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)(r.Ay,{container:!0,sx:{width:"90%",margin:"auto"},children:[(0,u.jsx)("p",{className:"modal-title-text",style:{fontSize:"15px",margin:"20px 0px 10px 0px"}
1,children:F("dashboard.benefits.benefitName")}),(0,u.jsx)("input",{type:"text",className:"text-input",id:"tierPerksText",value:w,style:{display:"block",fontWeight:"400",margin:"0px auto 7px auto",fontSize:"16px",padding:"13px 15px",color:"#1D1D1D",borderRadius:"5px",width:"calc(100% - 30px)",fontFamily:"Roboto"},placeholder:F("dashboard.benefits.enterPerkPlaceholder"),onChange:e=>{e.target.value.length<=30?(j(e.target.value),R(!1),I("")):(j(e.target.value),R(!0),I(F("dashboard.benefits.maxCharsError")))}})]})}):(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)(r.Ay,{container:!0,sx:{width:"90%",margin:"auto"},children:[(0,u.jsxs)(r.Ay,{xs:12,sx:{},children:[(0,u.jsx)("p",{className:"modal-title-text",style:{fontSize:"15px",margin:"20px 0px 10px 0px"},children:F("dashboard.benefits.noOfMessages")}),(0,u.jsx)("input",{type:"text",className:"text-input",id:"tierPerksText",value:C,style:{display:"block",fontWeight:"400",margin:"0px auto 7px auto",fontSize:"16px",padding:"13px 15px",color:"#1D1D1D",borderRadius:"5px",width:"calc(100% - 30px)",fontFamily:"Roboto"},placeholder:F("dashboard.benefits.enterMessagesPlaceholder"),onChange:e=>{const t=e.target.value,o=parseInt(t);S(t);const i=1==C,n=1==o;if(i!==n&&k){const e=i?$.indexOf(k):U.indexOf(k);if(-1!==e){const t=n?$[e]:U[e];A(t)}}isNaN(o)||o<1||o>100?(R(!0),I(F("dashboard.benefits.numberRangeError"))):(R(!1),I(""))}})]}),(0,u.jsxs)(r.Ay,{xs:12,sx:{marginBottom:"7px"},children:[(0,u.jsx)("p",{className:"modal-title-text",style:{fontSize:"15px",margin:"20px 0px 10px 0px"},children:F("dashboard.benefits.selectTypeOfMessages")}),(0,u.jsx)(c.A,{sx:{maxHeight:"48px",minHeight:"48px",backgroundColor:"white",zIndex:"9999",width:"100%",margin:"auto"},labelId:"demo-simple-select-label",id:"demo-simple-select",value:k,onChange:e=>{A(e.target.value)},MenuProps:{style:{zIndex:"9999"}},children:H.map(e=>(0,u.jsx)(d.A,{value:e,sx:{textAlign:"left"},children:e}))})]})]})}),(0,u.jsx)(r.Ay,{container:!0,sx:{width:"90%",margin:"auto"},children:(0,u.jsx)(s.A,{fullWidth:!0,disabled:D===Y&&(w.length<=0||w.length>30)||D===G&&(isNaN(parseInt(C))||parseInt(C)<1||parseInt(C)>100),onClick:()=>{D===Y&&w.length>0&&w.length<=30||D===G&&C>0&&C<=100?!0===b&&D===Y?(_(m,D),E(!1)):!0===b&&D===G?(v(m,D),E(!1)):(x(D),E(!1)):w.length<=0?(R(!0),I(F("dashboard.benefits.enterBenefitNameError"))):w.length>30?(R(!0),I(F("dashboard.benefits.maxCharsError"))):C<=0?(R(!0),I(F("dashboard.benefits.invalidNumberMessagesError"))):C>100?(R(!0),I(F("dashboard.benefits.numberRangeError"))):(R(!0),I(F("dashboard.benefits.invalidInputError")))},disableElevation:!0,sx:{padding:"5px 25px",width:"100%",textAlign:"center",display:"inline-block",color:"#fff",margin:"20px 0px 15px 0px",borderRadius:"10px",textTransform:"none",border:"2px var(--brand-color) solid",backgroundColor:"var(--brand-color)","&:hover":{color:"#fff",backgroundColor:"var(--brand-color-hover)",border:"2px var(--brand-color-hover) solid"},"&:disabled":{backgroundColor:"#f5f5f5",color:"#bdbdbd",border:"2px #e0e0e0 solid"}},children:(0,u.jsx)("span",{className:"fa fa-search",style:{fontWeight:"600",fontSize:"16px"},children:F("onboarding.yourOfferingModal.addBenefit")})})}),W?(0,u.jsx)("div",{style:{color:"var(--danger-color)",fontWeight:"600",fontSize:"12px",textAlign:"center"},children:M}):null]})]})})})]})}},10670(e,t,o){"use strict";o.d(t,{A:()=>S});var i=o(82483),n=o(97756),r=o(57513),s=o(52891),a=o(25982);o.p;var l=o(52307),d=o(65470),c=o(99113),p=o(7636),u=(o(43081),o(80336),o(34815),o(22829)),x=o(24879),m=(o(60281),o(45227),o(46290),o(59909)),h=(o(11248),o(11672),o(501),o(42049)),g=o(81830),f=o(26855),y=o(20792),b=o(67056),_=o(23490),v=o(20751),w=o(56723);const j=(0,f.Ay)(m.A)(e=>{let{theme:t}=e;
1return{width:42,height:24,marginLeft:5,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:24},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(17px)",color:"#fff !important","& + .MuiSwitch-track":{opacity:1,backgroundColor:"var(--brand-color)"}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:20,height:20,borderRadius:40,transition:t.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:100,opacity:1,backgroundColor:"dark"===t.palette.mode?"rgba(255,255,255,.35)":"rgba(0,0,0,.25)",boxSizing:"border-box"}}}),C=(0,f.Ay)(e=>{let{className:t,...o}=e;return(0,w.jsx)(b.A,{...o,classes:{popper:t}})})(e=>{let{theme:t}=e;return{[`& .${_.A.tooltip}`]:{backgroundColor:"#222222 !important",color:"#ffffff",boxShadow:t.shadows[1],fontSize:11,margin:"0px"}}});function S(e){const{t:t}=(0,n.Bd)(),[o,m]=(0,i.useState)(!1),[f,b]=(0,i.useState)(!1),[_,S]=(0,i.useState)(""),[k,A]=(0,i.useState)(!0);(0,i.useEffect)(()=>{!0===e.tiersModal?A(!1):A(!0)},[e.tiersModal]);return(0,w.jsx)(w.Fragment,{children:k?(0,w.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",minHeight:"300px"},children:(0,w.jsx)(y.A,{sx:{color:"var(--brand-color)",margin:"auto"}})}):(0,w.jsxs)(s.A,{sx:{margin:{xs:"30px 0px 50px 0px",lg:"-30px auto 50px auto"},height:"100%",display:"flex",minHeight:"300px",padding:"0px 0px",flexDirection:"column",boxSizing:"border-box"},children:[!0===e.bronzeActive||!0===e.silverActive||!0===e.goldActive?(0,w.jsx)(r.Ay,{container:!0,spacing:2,style:{boxSizing:"border-box",backgroundColor:"#FFFFFF",border:"1px solid #E4EBF6",borderRadius:"8px",padding:"20px",width:"100%",margin:"0px auto 0px",position:"relative"},children:(0,w.jsx)(r.Ay,{item:!0,xs:12,children:(0,w.jsxs)("form",{style:{backgroundColor:"#ffffff",width:"100%",zIndex:"10"},children:[e.offeringError&&(0,w.jsx)("div",{style:{width:"100%",marginBottom:"20px"},children:(0,w.jsx)("span",{style:{display:"block",color:"var(--danger-color)",fontWeight:"600",fontSize:"15px"},children:t("onboarding.setupOffering.maxTiersError")})}),(0,w.jsxs)(r.Ay,{item:!0,xs:12,children:[(0,w.jsx)("p",{className:"onboarding_title",style:{fontSize:"16px",fontWeight:"600",letterSpacing:"0px",padding:"0 0 5px 0",lineHeight:"26px",textAlign:"left"},children:t("dashboard.membership.trials")}),(0,w.jsx)("p",{className:"onboarding_description",style:{padding:"0 0 20px 0",textAlign:"left",fontSize:"14px"},children:t("dashboard.membership.trialsDescription")}),(0,w.jsxs)(d.A,{style:{color:"#222222",fontSize:"15px",fontWeight:"600",padding:"5px 0",textAlign:"left",display:"flex",alignItems:"center"},children:[t("onboarding.setupOffering.trialLength"),(0,w.jsx)(C,{title:t("dashboard.membership.trialLengthTooltip"),placement:"top",children:(0,w.jsx)("span",{children:(0,w.jsx)(v.jDB,{style:{fontSize:"18px",margin:"0 0 0 5px",color:"#222222"}})})})]}),(0,w.jsx)(l.A,{hiddenLabel:!0,variant:"filled",sx:{marginBottom:"10px",width:"300px",backgroundColor:"#fff",border:"0px",borderRadius:"5px",paddingTop:"0px",display:"block",textAlign:"left"},children:(0,w.jsx)(c.A,{id:"outlined-select-counry",select:!0,disableUnderline:!0,displayEmpty:!0,variant:"filled",hiddenLabel:!0,fullWidth:!0,value:e.trialLength,onChange:e=>{},SelectProps:{notchedOutline:"none",disableUnderline:!0,style:{fontSize:"15px",color:"var(--light-theme-text-color)",backgroundColor:"#fff",border:"1px solid #C7D1DE",fontWeight:"500",padding:"0px",height:"40px",paddingLeft:"10px",textAlign:"left",borderRadius:"5px",width:"100%"},".MuiInputBase-input-MuiFilledInput-input:focus":{backgroundColor:"#fff"}},sx:{backgroundColor:"#fff",color:"var(--light-theme-text-color)",padding:"0px",width:"100%",marginBottom:"10px",".css-1003n0h-MuiSelect-select-MuiInputBase-input-MuiFilledInput-input: focus":{backgroundColor:"#fff"}},children:[0,1,3,5,7,10,14].map(o=>{let i="";return i=0===o?t("onboarding.setupOffering.noTrial"):1===o?t("onboarding.setupOffering.dayOne",{count:1}):t("onboarding.setupOffering.dayOther",{count:o}),(0,w.jsx)(p.A,{onClick:t=>{o>0?(S(o),b(!0)):(e.setTrialLength(o),e.updateTrialLength(t,o),e.handleCloseTiers(),e.setOfferingError(!1),e.loadTierInfo())},value:o,sx:{textAlign:"left"},children:i})})})})]})]})})}):null,(0,w.jsx)(r.Ay,{container:!0,spacing:2,style:{boxSizing:"border-box",backgroundColor:"#FFFFFF",borderRadius:"8px",border:"1px solid #E4EBF6",padding:"20px",width:"100%",margin:"30px auto 0px",position:"relative"},children:(0,w.jsx)(r.Ay,{item:!0,xs:12,children:(0,w.jsx)("form",{style:{backgroundColor:"#ffffff",width:"100%",zIndex:"10"},children:(0,w.jsxs)(r.Ay,{item:!0,xs:12,children:[(0,w.jsx)("p",{className:"onboarding_title",style:{fontSize:"16px",fontWeight:"600",letterSpacing:"0px",padding:"0 0 5px 0",lineHeight:"26px",textAlign:"left"},children:t("dashboard.membership.freeMemberships")}),(0,w.jsx)("p",{className:"onboarding_description",style:{padding:"0 0 20px 0",textAlign:"left",fontSize:"14px"},children:t("dashboard.membership.freeMembershipsDescription")}),(0,w.jsxs)(d.A,{style:{color:"#222222",fontSize:"14px",fontWeight:"600",paddingTop:"5px",paddingBottom:e.windowWidth<700?"5px":"0px",textAlign:"left",display:"flex",alignItems:"center"},children:[t("dashboard.membership.offerFreeMemberships"),(0,w.jsx)(C,{title:t("dashboard.membership.offerFreeMembershipsTooltip"),placement:"top",children:(0,w.jsx)("span",{children:(0,w.jsx)(v.jDB,{style:{fontSize:"18px",margin:"0 0 0 5px",color:"#222222"}})})})]}),(0,w.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,w.jsx)(h.A,{sx:{margin:"5px 0",fontWeight:"500"},children:(0,w.jsx)(g.A,{style:{paddingTop:"5px",paddingBottom:"10px",marginRight:"0px",marginLeft:"-5px"},control:(0,w.jsx)(j,{checked:e.freeActive,onChange:t=>{e.updateFreeActive(t.target.checked)}}),labelPlacement:"end",label:(0,w.jsx)("span",{style:{fontSize:"14px",fontWeight:"500",fontFamily:"roboto",margin:"0px 0px 0px 10px",color:"#000"},children:e.freeActive?t("onboarding.yourOfferingModal.enabled"):t("onboarding.yourOfferingModal.disabled")})})})})]})})})}),(0,w.jsx)(x.A,{open:o,onClose:()=>m(!1),"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",disableAutoFocus:!0,sx:{backgroundColor:"rgba(0,0,0,0.47)",outline:"0",borderRadius:"5px",display:"flex",zIndex:"9999",lineHeight:"25px",width:"100%",minHeight:"100vh",maxHeight:"100vh",overflow:"scroll"},children:(0,w.jsx)(r.Ay,{container:!0,justifyContent:"center",sx:{paddingTop:"20px",paddingBottom:"20px",width:"auto",borderRadius:"5px",margin:"auto"},children:(0,w.jsxs)(r.Ay,{style:{zIndex:"100",justifyContent:"flex-end",alignItems:"center",padding:"30px 10px",boxSizing:"border-box",width:"100vw",outline:"0px",maxWidth:"450px",backgroundColor:"white",borderRadius:"10px",height:"auto",minHeight:"auto",position:"relative"},children:[(0,w.jsx)("div",{style:{position:"absolute",right:"-35px",top:"0",height:"100%",width:"35px",opacity:"0"},onClick:()=>m(!1)}),(0,w.jsx)("div",{style:{position:"absolute",left:"-35px",top:"0",height:"100%",width:"35px",opacity:"0"},onClick:()=>m(!1)}),(0,w.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px","&:hover":{cursor:"pointer"}},children:(0,w.jsx)("a",{onClick:()=>{m(!1)},children:(0,w.jsx)(u.$8F,{className:"modal-close-icon"})})}),(0,w.jsxs)(r.Ay,{container:!0,sx:{justifyContent:"center",alignItems:"center",display:"flex",zIndex:"1000"},children:[(0,w.jsxs)("div",{style:{width:"100%",display:"block",margin:"10px 0px",marginBottom:"0px"},children:[(0,w.jsx)("h3",{style:{fontSize:"28px",margin:"10px auto 0px auto",textAlign:"center"},children:"\ud83e\uddd0"}),(0,w.jsx)("h3",{style:{margin:"20px auto",textAlign:"center"},children:t("onboarding.setupOffering.additionalTierTitle")}),(0,w.jsx)("p",{className:"onboarding_description",style:{padding:"0px 0px 10px 0px",fontWeight:"500",width:"100%",margin:"10px auto 5px auto",maxWidth:"300px",minWidth:"300px",textAlign:"left"},children:t("onboarding.setupOffering.additionalTierDescription")})]}),(0,w.jsx)(a.A,{variant:"contained",onClick:()=>
1{m(!1),e.openAddNewTier(!1),e.setTiersModal(!1)},disableElevation:!0,sx:{padding:"5px 25px",width:e.windowWidth<360?"100%":"160px",textAlign:"center",display:"inline-block",margin:"5px 5px",marginTop:"10px",borderRadius:"10px",textTransform:"none",border:"2px var(--brand-color) solid",color:"var(--brand-color)",backgroundColor:"white","&:hover":{backgroundColor:"white",border:"2px var(--brand-color-hover) solid"}},children:(0,w.jsx)("span",{className:"fa fa-search",style:{fontWeight:"600",fontSize:"16px"},children:t("onboarding.setupOffering.addTier")})}),(0,w.jsx)(a.A,{variant:"contained",onClick:()=>{m(!1)},disableElevation:!0,sx:{padding:"5px 25px",width:e.windowWidth<360?"100%":"160px",textAlign:"center",display:"inline-block",margin:"5px 5px",borderRadius:"10px",textTransform:"none",border:"2px var(--brand-color) solid",backgroundColor:"var(--brand-color)",marginTop:"10px","&:hover":{backgroundColor:"var(--brand-color-hover)",border:"2px var(--brand-color-hover) solid"}},children:(0,w.jsx)("span",{className:"fa fa-search",style:{fontWeight:"600",fontSize:"16px"},children:t("onboarding.setupOffering.goBack")})})]})]})})}),(0,w.jsx)(x.A,{open:f,onClose:()=>b(!1),"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",disableAutoFocus:!0,sx:{backgroundColor:"rgba(0,0,0,0.47)",outline:"0",borderRadius:"5px",display:"flex",zIndex:"9999",lineHeight:"25px",width:"100%",minHeight:"100vh",maxHeight:"100vh",overflow:"scroll"},children:(0,w.jsx)(r.Ay,{container:!0,justifyContent:"center",sx:{paddingTop:"20px",paddingBottom:"20px",width:"auto",borderRadius:"5px",margin:"auto"},children:(0,w.jsxs)(r.Ay,{style:{zIndex:"100",justifyContent:"flex-end",alignItems:"center",padding:"30px 10px",boxSizing:"border-box",width:"100vw",outline:"0px",maxWidth:"450px",backgroundColor:"white",borderRadius:"10px",height:"auto",minHeight:"auto",position:"relative"},children:[(0,w.jsx)("div",{style:{position:"absolute",right:"-35px",top:"0",height:"100%",width:"35px",opacity:"0"},onClick:()=>b(!1)}),(0,w.jsx)("div",{style:{position:"absolute",left:"-35px",top:"0",height:"100%",width:"35px",opacity:"0"},onClick:()=>b(!1)}),(0,w.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px","&:hover":{cursor:"pointer"}},children:(0,w.jsx)("a",{onClick:()=>{b(!1)},children:(0,w.jsx)(u.$8F,{className:"modal-close-icon"})})}),(0,w.jsxs)(r.Ay,{container:!0,sx:{justifyContent:"center",alignItems:"center",display:"flex",zIndex:"1000"},children:[(0,w.jsxs)("div",{style:{width:"100%",display:"block",margin:"10px 0px",marginBottom:"0px"},children:[(0,w.jsx)("h3",{style:{fontSize:"28px",margin:"10px auto 0px auto",textAlign:"center"},children:"\u2728"}),(0,w.jsx)("h3",{style:{margin:"20px auto",textAlign:"center"},children:t("onboarding.setupOffering.trialPeriodTitle")}),(0,w.jsx)("p",{className:"onboarding_description",style:{padding:"0px 0px 10px 0px",fontWeight:"500",width:"100%",margin:"10px auto 5px auto",maxWidth:"300px",minWidth:"300px",textAlign:"left"},children:t("onboarding.setupOffering.trialPeriodDescription")})]}),(0,w.jsx)(a.A,{variant:"contained",onClick:t=>{b(!1),e.setTrialLength(_),e.updateTrialLength(t,_),e.handleCloseTiers(),e.setOfferingError(!1),e.loadTierInfo()},disableElevation:!0,sx:{padding:"5px 25px",width:"160px",textAlign:"center",display:"inline-block",margin:"5px 5px",borderRadius:"10px",textTransform:"none",border:"2px var(--brand-color) solid",backgroundColor:"var(--brand-color)",marginTop:"10px","&:hover":{backgroundColor:"var(--brand-color-hover)",border:"2px var(--brand-color-hover) solid"}},children:(0,w.jsx)("span",{className:"fa fa-search",style:{fontWeight:"600",fontSize:"16px"},children:t("onboarding.setupOffering.addTrial")})}),(0,w.jsx)(a.A,{variant:"contained",onClick:t=>{b(!1),e.setTrialLength(0),e.updateTrialLength(t,0),e.handleCloseTiers(),e.setOfferingError(!1),e.loadTierInfo()},disableElevation:!0,sx:{padding:"5px 25px",width:"160px",textAlign:"center",display:"inline-block",margin:"5px 5px",marginTop:"10px",borderRadius:"10px",textTransform:"none",border:"2px var(--brand-color) solid",color:"var(--brand-color)",backgroundColor:"white","&:hover":{backgroundColor:"white",border:"2px var(--brand-color-hover) solid"}},children:(0,w.jsx)("span",{className:"fa fa-search",style:{fontWeight:"600",fontSize:"16px"},children:t("onboarding.setupOffering.skipTrial")})})]})]})})})]})})}},36237(e,t,o){"use strict";o.r(t),o.d(t,{default:()=>j});var i=o(82483),n=o(97756),r=o(25982),s=o(24879),a=o(22829),l=o(57513),d=o(42049),c=o(81830),p=o(90),u=o(8118),x=o.n(u),m=o(26855),h=(o(34815),o(59909)),g=o(64841),f=o(67116),y=o(56723);const b=o(98635),_=(0,m.Ay)(h.A)(e=>{let{theme:t}=e;
1return{width:42,height:24,marginLeft:5,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:24},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(17px)",color:"#fff !important","& + .MuiSwitch-track":{opacity:1,backgroundColor:"var(--brand-color)"}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:20,height:20,borderRadius:40,transition:t.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:100,opacity:1,backgroundColor:"dark"===t.palette.mode?"rgba(255,255,255,.35)":"rgba(0,0,0,.25)",boxSizing:"border-box"}}}),v={GBP:100,USD:100,EUR:100,SEK:1e3,AUD:150,CAD:150},w={GBP:[500,1e3],USD:[750,1500],EUR:[750,1500],SEK:[65,130],AUD:[1e3,2e3],CAD:[1e3,2e3]},j=e=>{const{t:t}=(0,n.Bd)(),{snackConfig:o,setSnackConfig:u}=(0,f.nm)(),[m,h]=(0,i.useState)("");return i.useEffect(()=>{e.addProduct&&e.setPaidDMsActiveSettings(!0)},[e.addProduct]),(0,y.jsx)(s.A,{open:e.paidDMsModal,onClose:()=>e.setPaidDMsModal(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:(0,y.jsx)(l.Ay,{container:!0,justifyContent:"center",sx:{minHeight:"100vh",display:"flex",maxWidth:"600px",margin:"auto",maxHeight:"600px",outline:"none"},children:(0,y.jsx)(l.Ay,{container:!0,sx:{justifyContent:"center",alignItems:"center",outline:"none",maxWidth:"600px",width:"100vw",minWidth:"320px",maxHeight:e.windowWidth>600?"calc(100vh - 20px)":"100vh",marginTop:e.windowWidth>600?"10px":"0px",paddingBottom:e.windowWidth>600?"20px":"100px",height:"auto",borderRadius:e.windowWidth>600?"10px":"0px",position:"relative",margin:"0px",boxShadow:e.windowWidth>=1200?"0 5px 25px 0 rgba(35, 40, 105, 0.04)":"",paddingTop:"50px",overflow:e.windowWidth>900?"":"auto",overflowX:"hidden"},children:(0,y.jsxs)("div",{style:{backgroundColor:"#ffffff",width:"100%",borderRadius:e.windowWidth>600?"10px":"0px",paddingBottom:e.windowWidth<600?"100px":"0px"},children:[(0,y.jsxs)(l.Ay,{container:!0,style:{width:(e.windowWidth,"90%"),justifyContent:"center",alignItems:"center",height:"auto",margin:"20px auto 10px auto",maxHeight:"2000px",display:"flex"},children:[(0,y.jsx)(l.Ay,{lg:11,xs:11,children:(0,y.jsx)("h3",{children:e.addProduct?t("dashboard.paidDms.addCustomProduct"):t("dashboard.paidDms.editCustomProduct")})}),(0,y.jsx)(l.Ay,{lg:1,xs:1,style:{top:"0px",padding:"0px",float:"right",textAlign:"right"},children:(0,y.jsx)("div",{style:{"&:hover":{cursor:"pointer"}},children:(0,y.jsx)("a",{onClick:()=>{e.setPaidDMsModal(!1)},children:(0,y.jsx)(a.$8F,{className:"modal-close-icon",style:{width:"25px",height:"25px"}})})})})]}),(0,y.jsx)("div",{style:{backgroundColor:"#D3DCE7",marginTop:"0px",width:"90%",height:"1px",marginBottom:"10px",margin:"10px auto 20px auto",padding:"0px 0px"}}),(0,y.jsxs)(l.Ay,{container:!0,sx:{width:"90%",margin:"auto"},justifyContent:"space-between",children:[(0,y.jsx)(l.Ay,{justifyContent:"space-between",container:!0,xs:12,sx:{margin:"10px 0px 10px 0px"},children:(0,y.jsxs)(l.Ay,{container:!0,justifyContent:"space-between",children:[(0,y.jsxs)(l.Ay,{md:12,xs:12,sx:{paddingBottom:"20px"},children:[(0,y.jsx)(l.Ay,{xs:12,md:12,lg:12,sx:{display:"flex",width:"100%"},children:(0,y.jsx)("span",{style:{color:"#222222",fontWeight:"700",fontSize:"14px"},children:t("dashboard.paidDms.priceOneMessage")})}),(0,y.jsxs)("form",{style:{backgroundColor:"#ffffff",color:"#fff",borderRadius:"5px",padding:"0px 15px",display:"flex",height:"46px",margin:"10px 0px 5px 0px",border:"1px solid #C7D1DE",width:"100%",maxWidth:"800px",zIndex:"10",boxSizing:"border-box"},children:[(0,y.jsx)("input",{type:"text",id:"emailCaptureInput",style:{border:"none",width:e.windowWidth>560?"85%":"72%",fontWeight:"500",color:"#1D1D1D",fontSize:"16px",fontFamily:"Roboto"},placeholder:t("dashboard.paidDms.minimumPricePlaceholder"),value:"0"!==e.paidDMsMinimumPriceStr?e.currencySymbol+e.paidDMsMinimumPriceStr+e.currencySymbolPost:"",onChange:o=>{let i=o.target.value.replace(/[^0-9.]/g,"");e.setPaidDMsMinimumPriceStr(i.replace("\xa3","").replace("$","").replace("\u20ac","").replace("AU$","").replace("CA$","").replace(" kr",""));let n=i;n.includes(".")?"."===n[n.length-2]?n+="0":"."===n[n.length-1]&&(n+="00"):n+=".00",n=n.replace(".","").replace(",","").replace("\xa3","").replace("$","").replace("\u20ac","").replace("AU$","").replace("CA$","").replace(" kr",""),e.setPaidDMsMinimumPrice(n),Number(n)<v[e.currency]?e.setPriceOfDMsError(t("onboarding.yourOfferingModal.minimumPriceError",{amount:(0,g.A)(v[e.currency],e.currency,!0)})):e.setPriceOfDMsError("")}}),(0,y.jsx)("span",{style:{fontWeight:"500",margin:"auto",fontSize:"12px",color:"grey",minWidth:"100px",textAlign:"end"},children:t("dashboard.paidDms.minimumSuffix",{amount:(0,g.A)(v[e.currency],e.currency,!0)})})]}),e.priceOfDMsError?(0,y.jsx)("div",{style:{width:"100%"},children:(0,y.jsx)("span",{style:{display:"block",color:"var(--danger-color)",fontWeight:"600",fontSize:"12px",textAlign:"center",paddingTop:"8px",width:"100%",margin:e.windowWidth>900?"0px auto ":"10px auto 0px"},children:e.priceOfDMsError})}):""]}),(0,y.jsxs)(l.Ay,{md:12,xs:12,children:[(0,y.jsx)(l.Ay,{xs:12,md:12,lg:12,sx:{dis
1play:"flex",width:"100%"},children:(0,y.jsx)("span",{style:{color:"#222222",fontWeight:"700",fontSize:"14px"},children:t("dashboard.paidDms.setMaxMessageLength")})}),(0,y.jsxs)("form",{style:{backgroundColor:"#ffffff",color:"#fff",borderRadius:"5px",padding:"0px 15px",display:"flex",height:"46px",margin:"10px 0px 5px 0px",border:"1px solid #C7D1DE",width:"100%",maxWidth:"800px",zIndex:"10",boxSizing:"border-box"},children:[(0,y.jsx)("input",{type:"number",id:"emailCaptureInput",style:{border:"none",width:e.windowWidth>560?"85%":"72%",fontWeight:"500",color:"#1D1D1D",fontSize:"16px",fontFamily:"Roboto"},placeholder:"1000",value:e.paidDMsMaximumMessageLength,onChange:o=>{o.target.value<1e4?h(t("dashboard.paidDms.minLengthError",{length:String(9999)})):h(""),e.setPaidDMsMaximumMessageLength(o.target.value)}}),(0,y.jsx)("span",{style:{fontWeight:"500",margin:"auto",fontSize:"12px",color:"grey",minWidth:"100px",textAlign:"end"},children:t("dashboard.paidDms.charMinimum")})]}),m?(0,y.jsx)("div",{style:{width:"100%"},children:(0,y.jsx)("span",{style:{display:"block",color:"var(--danger-color)",fontWeight:"600",fontSize:"12px",textAlign:"center",paddingTop:"8px",width:"100%",margin:e.windowWidth>900?"0px auto ":"10px auto 0px"},children:m})}):""]}),(0,y.jsxs)("div",{children:[(0,y.jsx)("span",{style:{color:"var(--danger-color)",fontWeight:"600",fontSize:"12px",textAlign:"left",paddingTop:"4px",display:"block"},children:e.monthlyPriceError}),(0,y.jsxs)("span",{style:{color:"#6D89AF",paddingTop:"0px",marginTop:"0px",fontSize:"10px",display:"block"},children:[(0,y.jsx)(p.$4v,{style:{color:"black",paddingRight:"5px",position:"relative",top:"1.5px"}}),t("dashboard.paidDms.pricesPerformBest",{low:(0,g.A)(w[e.currency][0],e.currency,!0),high:(0,g.A)(w[e.currency][1],e.currency,!0)})]})]})]})}),!e.addProduct&&(0,y.jsxs)(l.Ay,{container:!0,md:12,xs:12,sx:{display:"flex",justifyContent:"flex-end"},children:[(0,y.jsx)("div",{style:{backgroundColor:"#D3DCE7",width:"100%",height:"1px",margin:"20px auto 25px auto",padding:"0px 0px"}}),(0,y.jsxs)(l.Ay,{container:!0,xs:12,sx:{margin:"5px 0px 10px 0px"},children:[(0,y.jsx)(l.Ay,{xs:7,md:6,lg:6,sx:{display:"flex",width:"100%"},children:(0,y.jsx)("span",{style:{color:"#222222",fontWeight:"700",fontSize:"14px"},children:t("dashboard.paidDms.offerMessages")})}),(0,y.jsx)(l.Ay,{xs:0,md:0,lg:0,sx:{paddingTop:{xs:"5px",md:"0px"},paddingLeft:{xs:"0px"}}}),(0,y.jsx)(l.Ay,{xs:5,md:6,lg:6,sx:{paddingTop:{md:"0px"},display:"flex"},children:(0,y.jsx)(d.A,{sx:{margin:"auto 0px auto auto"},children:(0,y.jsx)(c.A,{control:(0,y.jsx)(_,{checked:e.paidDMsActiveSettings,onChange:t=>{e.setPaidDMsActiveSettings(t.target.checked)}}),labelPlacement:"start",label:(0,y.jsx)("span",{style:{fontSize:"14px",margin:"0px 5px 0px 0px",color:"#222222",fontWeight:"400",fontStyle:"var(--main-font-family)"},children:e.paidDMsActiveSettings?t("dashboard.paidDms.active"):t("dashboard.paidDms.notActive")})})})}),(0,y.jsx)("div",{children:(0,y.jsxs)("span",{style:{color:"#6D89AF",paddingTop:"0px",marginTop:"5px",fontSize:"10px",display:"block",lineHeight:"12px"},children:[(0,y.jsx)(p.$4v,{style:{color:"black",paddingRight:"5px",position:"relative",top:"1.5px"}}),!1===e.paidDMsActive?t("dashboard.paidDms.tierVisible"):t("dashboard.paidDms.tierHidden")]})})]}),(0,y.jsx)("div",{style:{backgroundColor:"#D3DCE7",width:"100%",height:"1px",margin:"20px auto 25px auto",padding:"0px 0px"}})]}),(0,y.jsxs)(l.Ay,{container:!0,sx:{width:"100%",display:"flex",paddingBottom:"30px",margin:"auto"},children:[(0,y.jsx)(l.Ay,{xs:6,sx:{margin:"auto auto auto auto"}}),(0,y.jsx)(l.Ay,{xs:6,sx:{display:"flex",width:"100%"},children:(0,y.jsx)(r.A,{variant:"contained",disableElevation:!0,sx:{padding:"8px 20px",width:"auto",marginRight:"0px",marginLeft:"auto",textAlign:"center",display:"inline-block",borderRadius:"10px",textTransform:"none",border:"2px var(--brand-color) solid",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)",border:"2px var(--brand-color-hover) solid"}},disabled:e.priceOfDMsError||m,onClick:()=>{const o=new FormData;o.append("currency",e.currency),o.append("new_price",e.paidDMsMinimumPrice),o.append("active",e.paidDMsActiveSettings),o.append("maximum_message_length",e.paidDMsMaximumMessageLength),x()({method:"post",url:b.BACKEND_URL+"api/influencer/update_dm_settings",data:o,headers:{"Content-type":"application/json"},withCredentials:!0}).then(o=>{o.data.error||(e.setPaidDMsModal(!1),e.setMaxMessageLength(e.paidDMsMaximumMessageLength),e.setState({paidDMs_show:e.paidDMsActiveSettings,updatedPerks:o.data.updated_tier_perks}),u({open:!0,message:e.paidDMsActiveSettings?e.addProduct?t("dashboard.paidDms.paidMessagesAdded"):t("dashboard.paidDms.paidMessagesUpdated"):t("dashboard.paidDms.paidMessagesRemoved")}
1),e.paidDMsActiveSettings?(e.handleTabNavigation("platform"),e.navigate("?page=messages")):e.handleTabNavigation("platform"))})},children:(0,y.jsx)("span",{className:"fa fa-search",style:{fontWeight:"600",fontSize:"15px"},children:e.addProduct?t("dashboard.paidDms.activateMessages"):t("dashboard.paidDms.submit")})})})]})]})]})})})})}},91509(e,t,o){"use strict";o.d(t,{A:()=>_});var i=o(82483),n=o(57513),r=o(52891),s=o(25982),a=o(67056),l=o(23490),d=o(26855),c=o(65941),p=o.n(c),u=o(24029),x=o(22829),m=o(4904),h=(o(14984),o(97756)),g=o(56723);const f=(0,d.Ay)(e=>{let{className:t,...o}=e;return(0,g.jsx)(a.A,{...o,classes:{popper:t}})})(e=>{let{theme:t}=e;return{[`& .${l.A.tooltip}`]:{backgroundColor:"#222222 !important",color:"#ffffff",boxShadow:t.shadows[1],fontSize:11,margin:"0px"}}}),y={fontSize:"16px",fontWeight:"600",color:"#222222",margin:"0px"},b=e=>{let{icon:t,checked:o,title:a,tooltipText:l,tooltipLink:d,description:c,buttonText:b,buttonAction:_,customComponent:v,showExitMark:w,buttonTextSecondary:j,buttonActionSecondary:C,videoSrc:S,title1:k,title2:A,title3:F,description1:D,description2:z,asyncPage:T,windowWidth:E,description3:W,titleicon1:R,titleicon2:M,titleicon3:I,noMembers:P,noPaidDMMembers:B,paidDMsActiveSettings:L,paidDMsModal:N,paidDMs_show:O,messagePage:U,isCoachingPage:$,isMessagesPage:H,...V}=e;const{t:Y}=(0,h.Bd)(),[G,Z]=(0,i.useState)(!1),[X,K]=(0,i.useState)(!1);return(0,g.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",minHeight:"300px",padding:"20px 0px",flexDirection:"column",boxSizing:"border-box"},children:(0,g.jsxs)(n.Ay,{container:!0,spacing:2,style:{boxSizing:"border-box",backgroundColor:"#FFFFFF",border:"1px solid #E4EBF6",borderRadius:E>600?"8px":"0px",width:"100%",margin:"0px auto 25px",alignItems:"left",position:"relative"},children:[(0,g.jsx)(n.Ay,{xs:12,md:6,order:{xs:"2",md:"1"},sx:{display:"flex",padding:"20px 0px"},children:(0,g.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"90%",margin:E>900?"20px 0px 20px 50px":"auto auto auto auto",textAlign:"left"},children:[(0,g.jsxs)("h2",{style:{fontSize:"22px",fontWeight:"bold",color:"black",margin:"0px 0px 30px 0px",textAlign:"left"},children:[a,null!==d?(0,g.jsx)(f,{title:l,children:(0,g.jsx)("span",{style:{marginLeft:"4px"},children:(0,g.jsx)(u.wfp,{style:{color:"#222222",verticalAlign:"middle",marginTop:"-2px",cursor:"pointer"}})})}):null]}),(0,g.jsx)(n.Ay,{container:!0,sx:{marginBottom:"15px"},children:(0,g.jsxs)(n.Ay,{xs:12,sx:{backgroundColor:""},children:[(0,g.jsx)("div",{style:{display:"flex",alignItems:"center",marginBottom:"5px"},children:(0,g.jsxs)("p",{style:y,children:[k," ",R]})}),(0,g.jsx)("div",{style:{display:"flex",alignItems:"center",marginBottom:"5px",fontSize:($||H)&&E<600?"7.5px":"13px",fontWeight:"400"},children:(0,g.jsx)("p",{style:{fontSize:($||H)&&E<600?"7.5px":"13px",fontWeight:"400",color:"#6E89AF",margin:"0px"},children:D})})]})}),(0,g.jsx)(n.Ay,{container:!0,sx:{marginBottom:"15px"},children:(0,g.jsxs)(n.Ay,{xs:12,sx:{backgroundColor:""},children:[(0,g.jsx)("div",{style:{display:"flex",alignItems:"center",marginBottom:"5px"},children:(0,g.jsxs)("p",{style:y,children:[A," ",M]})}),(0,g.jsx)("div",{style:{display:"flex",alignItems:"center",marginBottom:"5px",fontSize:"13px",fontWeight:"400"},children:(0,g.jsx)("p",{style:{fontSize:"13px",fontWeight:"400",color:"#6E89AF",margin:"0px"},children:z})})]})}),(0,g.jsx)(n.Ay,{container:!0,children:(0,g.jsxs)(n.Ay,{xs:12,sx:{backgroundColor:""},children:[(0,g.jsx)("div",{style:{display:"flex",alignItems:"center",marginBottom:"5px"},children:(0,g.jsxs)("p",{style:y,children:[F," ",I]})}),(0,g.jsx)("div",{style:{display:"flex",alignItems:"center",marginBottom:"5px",fontSize:($||H)&&E<600?"7.5px":"13px",fontWeight:"400"},children:(0,g.jsx)("p",{style:{fontSize:($||H)&&E<600?"7.5px":"13px",fontWeight:"400",color:"#6E89AF",margin:"0px"},children:W})})]})}),(0,g.jsxs)(r.A,{sx:{width:"100%",height:"auto",display:"flex",marginTop:"20px",flexDirection:{xs:"column",md:"row"}},children:[""!==b?(0,g.jsx)(s.A,{variant:"contained",disabled:!!V.noMembersYet,disableElevation:!0,sx:{padding:"7px 20px",margin:"15px 0px 0px 0px",textAlign:"left",borderRadius:"10px",textTransform:"none",backgroundColor:"var(--brand-color)","&:hover":{backgroundColor:"var(--brand-color-hover)"}},onClick:_,children:(0,g.jsx)("span",{className:"fa fa-search",style:{fontWeight:"600",fontSize:"13px"},children:b})}):null,""!==j?(0,g.jsx)(s.A,{variant:"contained",disableElevation:!0,sx:{padding:"9px 20px",margin:"15px 0px 0px 10px",textAlign:"left",borderRadius:"10px",textTransform:"none",color:"var(--brand-color)",backgroundColor:"#fff","&:hover":{backgroundColor:"transparent",color:"var(--brand-color-hover)"}},onClick:C,children:(0,g.jsx)("span",{className:"fa fa-search",style:{fontWeight:"600",fontSize:"13px"},children:j})}):null]}),P&&(0,g.jsxs)("div",{style:{margin:"15px 0px 0px 0px"},children:[(0,g.jsx)("p",{style:{color:"#6E89AF",fontSize:"14px",margin:"0px"},children:Y("dashboard.sections.noCoachingMembers")}),(0,g.jsxs)("p",{style:{color:"#6E89AF",fontSize:"14px",margin:"0px"},children:[Y("dashboard.sections.coachingGuidesLink")," ",(0,g.jsx)("a",{style:{color:"#6E89AF"},href:"https://help.withme.so/en/collections/7533680-1-1-a-synchronous-coaching",target:"_blank",children:Y("dashboard.sections.coachingGuides")})]})]}),U&&(0,g.jsx)(g.Fragment,{children:!0===O?(0,g.jsx)("div",{style:{margin:"15px 0px 0px 0px"},children:(0,g.jsx)("p",{style:{color:"#6E89AF",fontSize:"14px",margin:"0px"},children:Y("dashboard.sections.messagesActive")}
1)}):(0,g.jsx)("div",{style:{margin:"15px 0px 0px 0px"},children:(0,g.jsx)("p",{style:{color:"#6E89AF",fontSize:"14px",margin:"0px"},children:Y("dashboard.sections.messagesInactive")})})}),null!==v?(0,g.jsx)(g.Fragment,{children:v}):null]})}),(0,g.jsxs)(n.Ay,{xs:12,md:6,order:{xs:"1",md:"2"},sx:{display:"flex",padding:"20px 0px",backgroundImage:`url(${m})`,backgroundPosition:"left",borderTopRightRadius:E>900?"8px":"0px",borderBottomRightRadius:E>900?"8px":"0px",backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:[w?(0,g.jsx)("div",{style:{position:"absolute",top:"10px",right:"10px",fontSize:"20px",padding:"5px"},children:(0,g.jsx)(x.$8F,{style:{color:"#AFBED3",cursor:"default",backgroundColor:"transparent"}})}):null,(0,g.jsx)(p(),{style:{width:"100%",height:"100%",display:"flex"},children:T?(0,g.jsx)("img",{src:S,style:{width:"90%",margin:"auto",height:"auto",objectFit:"cover",borderRadius:"8px"}}):(0,g.jsxs)("video",{style:{width:"auto",margin:"auto",height:"380px",objectFit:"cover",borderRadius:"8px",boxShadow:X?"0px 0px 10px 0px rgba(0,0,0,0.1)":""},controls:!1,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,onLoadedData:()=>{K(!0)},children:[(0,g.jsx)("source",{src:S,type:"video/mp4"}),Y("common.browserNoVideo")]})})]})]})})},_=e=>(0,g.jsx)("div",{style:{width:"100%"},children:(0,g.jsx)(b,{icon:"\ud83d\udc65\ufe0f",checked:e.customChecked,title:e.title,tooltipLink:e.tooltipLink,description:e.description,buttonText:e.buttonText,buttonAction:e.buttonAction,buttonTextSecondary:e.buttonTextSecondary,titleicon1:e.titleicon1,titleicon2:e.titleicon2,titleicon3:e.titleicon3,title1:e.title1,title2:e.title2,title3:e.title3,description1:e.description1,description2:e.description2,description3:e.description3,buttonActionSecondary:e.buttonActionSecondary,showExitMark:!1,videoSrc:e.videoSrc,noMembers:e.noMembers,noPaidDMMembers:e.noPaidDMMembers,paidDMsActiveSettings:e.paidDMsActiveSettings,paidDMsModal:e.paidDMsModal,paidDMs_show:e.paidDMs_show,messagePage:e.messagePage,asyncPage:e.asyncPage,windowWidth:e.windowWidth})})},6868(e,t,o){"use strict";o.d(t,{A:()=>c});var i=o(52891),n=o(25982),r=o(28896),s=o(45745),a=o(51127),l=o(97756),d=o(56723);const c=e=>{(0,r.A)();const{t:t}=(0,l.Bd)(),o={hidden:{opacity:0,y:10},visible:{opacity:1,y:0}};return(0,d.jsx)(a.P.div,{initial:"hidden",animate:"visible",variants:{hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.6,staggerChildren:.2}}},style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"16px",padding:e.windowWidth>900?"40px 0px":"20px 0px",margin:e.windowWidth>900?"0px 0px":"20px",overflow:"hidden"},children:(0,d.jsx)(i.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:(e.windowWidth,"40px 20px"),textAlign:"center",background:"linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(247,249,252,0.4) 100%)"},children:(0,d.jsxs)(a.P.div,{variants:o,style:{padding:"24px 24px",textAlign:"center",borderRadius:"12px",maxWidth:"600px"},children:[(0,d.jsx)(a.P.div,{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.5},style:{fontSize:"56px",marginBottom:"16px",filter:"drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1))"},children:"\ud83d\udcda"}),(0,d.jsx)(a.P.h2,{variants:o,style:{margin:"0",fontSize:"24px",fontWeight:"700",color:"#1D1D1D",fontFamily:"Roboto, sans-serif",marginBottom:"12px",letterSpacing:"-0.5px"},children:t("dashboard.subscriptions.createFirstCollection")}),(0,d.jsx)(a.P.p,{variants:o,style:{fontSize:"16px",color:"#6E7787",fontWeight:"400",textAlign:"center",margin:"0 auto 40px",maxWidth:"500px",fontFamily:"Roboto, sans-serif",lineHeight:"1.6"},children:t("dashboard.subscriptions.organizeCollectionsDesc")}),(0,d.jsx)(a.P.div,{variants:o,children:(0,d.jsxs)(n.A,{disableElevation:!0,disabled:e.disabled,sx:{backgroundColor:e.disabled?"#E0E0E0":"var(--brand-color)",color:e.disabled?"#9E9E9E":"white",fontSize:"16px",fontWeight:"600",width:"100%",maxWidth:"300px",height:"60px",margin:"0 auto 40px auto",borderRadius:"100px",textTransform:"none",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.3s ease",":hover":{backgroundColor:e.disabled?"#E0E0E0":"var(--brand-color)",transform:e.disabled?"none":"translateY(-1px)"}},onClick:()=>{e.disabled||e.buttonAction()},variant:"contained",children:[(0,d.jsx)(s.GGD,{style:{marginRight:"8px",color:e.disabled?"#9E9E9E":"#fff",strokeWidth:"2.5",fontSize:"20px"}}),e.disabled?t("checkout.subscriptionRequired"):t("content.edit.createCollection")]})})]})})})}},90050(e,t,o){"use strict";o.d(t,{A:()=>c});var i=o(52891),n=o(25982),r=o(28896),s=o(45745),a=o(51127),l=o(97756),d=o(56723);const c=e=>{(0,r.A)();const{t:t}=(0,l.Bd)(),o={hidden:{opacity:0,y:10},visible:{opacity:1,y:0}},c=[{icon:"\ud83d\udcb0",text:t("dashboard.subscriptions.featureRecurringRevenue"),description:t("dashboard.subscriptions.featureRecurringRevenueDesc")},{icon:"\ud83d\udcc5",text:t("dashboard.subscriptions.featureScheduleContent"),description:t("dashboard.subscriptions.featureScheduleContentDesc")},{icon:"\ud83c\udfaf",text:t("dashboard.subscriptions.featureTierAccess"),description:t("dashboard.subscriptions.featureTierAccessDesc")},{icon:"\ud83c\udfa5",text:t("dashboard.subscriptions.featureMultipleFormats"),description:t("dashboard.subscriptions.featureMultipleFormatsDesc")},{icon:"\ud83d\udc8e",text:t("dashboard.subscriptions.featureOneTimePurchase"),description:t("dashboard.subscriptions.featureOneTimePurchase")},{icon:"\ud83d\udd12",text:t("dashboard.subscriptions.featurePrivateContent"),description:t("dashboard.subscriptions.featurePrivateContentDesc")},{icon:"\ud83d\udcca",text:t("dashboard.subscriptions.featureContentAnalytics"),description:t("dashboard.subscriptions.featureContentAnalyticsDesc")}];return(0,d.jsx)(a.P.div,{initial:"hidden",animate:"visible",variants:{hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.6,staggerChildren:.2}}},style:{backgroundColor:"#fff",border:"1px solid #E4EBF6",borderRadius:"16px",padding:e.windowWidth>900?"40px 0px":"20px 0px",margin:e.windowWidth>900?"0px 0":"20px",overflow:"hidden"},children:(0,d.jsx)(i.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:(e.windowWidth,"40px 20px"),textAlign:"center",background:"linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(247,249,252,0.4) 100%)"},children:(0,d.jsxs)(a.P.div,{variants:o,style:{padding:e.windowWidth>900?"24px 24px":"0px 0px",textAlign:"center",borderRadius:"12px",maxWidth:"650px"}
1,children:[(0,d.jsx)(a.P.div,{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.5},style:{fontSize:"56px",marginBottom:"16px",filter:"drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1))"},children:"\ud83d\udcc2"}),(0,d.jsx)(a.P.h2,{variants:o,style:{margin:"0",fontSize:"24px",fontWeight:"700",color:"#1D1D1D",fontFamily:"Roboto, sans-serif",marginBottom:"12px",letterSpacing:"-0.5px"},children:t("dashboard.subscriptions.readyToSharePost")}),(0,d.jsx)(a.P.p,{variants:o,style:{fontSize:"16px",color:"#6E7787",fontWeight:"400",textAlign:"center",margin:"0 auto 20px",maxWidth:"500px",fontFamily:"Roboto, sans-serif",lineHeight:"1.6"},children:t("dashboard.subscriptions.startBuildingDesc")}),(0,d.jsx)(a.P.div,{variants:o,style:{display:"flex",flexWrap:"wrap",gap:"10px",justifyContent:"center",marginBottom:"40px"},children:c.map((t,o)=>(0,d.jsxs)(a.P.div,{style:{display:"flex",alignItems:"center",padding:"6px 14px",backgroundColor:"#F5F9FF",borderRadius:"100px",border:"1px solid #E4EBF6",transition:"all 0.2s ease"},children:[(0,d.jsx)("div",{style:{fontSize:e.windowWidth>900?"14px":"12px",marginRight:"8px",color:"var(--brand-color)"},children:t.icon}),(0,d.jsx)("span",{style:{fontSize:e.windowWidth>900?"12px":"10px",fontWeight:"500",color:"#1D1D1D"},children:t.text})]},o))}),(0,d.jsx)(a.P.div,{variants:o,children:(0,d.jsxs)(n.A,{disableElevation:!0,disabled:e.disabled,sx:{backgroundColor:e.disabled?"#E0E0E0":"var(--brand-color)",color:e.disabled?"#9E9E9E":"white",fontSize:"16px",fontWeight:"600",width:"100%",maxWidth:"300px",height:"60px",margin:"0 auto 60px auto",borderRadius:"100px",textTransform:"none",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.3s ease",":hover":{backgroundColor:e.disabled?"#E0E0E0":"var(--brand-color)",transform:e.disabled?"none":"translateY(-1px)"}},onClick:()=>{e.disabled||e.buttonAction()},variant:"contained",children:[(0,d.jsx)(s.GGD,{style:{marginRight:"8px",color:e.disabled?"#9E9E9E":"#fff",strokeWidth:"2.5",fontSize:"20px"}}),e.disabled?t("checkout.subscriptionRequired"):t("dashboard.subscriptions.createFirstPost")]})}),(0,d.jsxs)(a.P.p,{variants:o,style:{fontSize:"14px",color:"#6E7787",fontWeight:"400",textAlign:"center",margin:"0",fontFamily:"Roboto, sans-serif"},children:[t("dashboard.subscriptions.needInspiration")," ",(0,d.jsx)("a",{href:"https://help.withme.so/en/articles/6988667-decide-on-the-content-for-your-membership",target:"_blank",rel:"noopener noreferrer",style:{color:"#3B55F3",textDecoration:"none",fontWeight:"500",transition:"all 0.2s ease",":hover":{textDecoration:"underline"}},children:t("dashboard.subscriptions.contentCreationGuide")})]})]})})})}},34276(e,t,o){"use strict";o(82483),o(97756),o(82350),o(99379),o(45227),o(46290),o(81997),o(12008),o(65941),o(56723)},50114(e,t,o){"use strict";o.d(t,{A:()=>l});o(82483);var i=o(97756),n=o(27595),r=o(51467),s=(o(31804),o(73029),o(56723));const a=(0,r.a)({components:{Select:{defaultProps:{comboboxProps:{zIndex:1e4}}}}});const l=function(e){let{children:t}=e;const{t:o}=(0,i.Bd)();return(0,s.jsx)(n.y,{theme:a,children:t})}},47977(e,t,o){"use strict";o.d(t,{A:()=>H});var i=o(82483),n=o(97756),r=o(68123),s=o(8513),a=o(43316),l=o(9641),d=o(4258),c=o(28191),p=o(47108),u=o(87628),x=o(93465),m=o(93232),h=o(51338),g=o(87452),f=o(62469),y=o(8578),b=o(38884),_=o(23387),v=o(40990),w=o(75727),j=o(1548),C=o(71638),S=o(14890),k=o(29950),A=o(7045),F=o(95042),D=o(57655),z=o(23017),T=o(93813),E=o(56723);const W=function(e){let{onSelect:t,onClose:o}=e;const{t:s}=(0,n.Bd)(),[a,d]=(0,i.useState)(0),[c,p]=(0,i.useState)(0);return(0,E.jsxs)(T.t,{shadow:"md",p:"md",style:{position:"absolute",top:"calc(100% + 4px)",left:0,zIndex:1300,minWidth:280},onMouseLeave:()=>{d(0),p(0)},children:[(0,E.jsx)(r.a,{style:{display:"grid",gridTemplateColumns:"repeat(10, 1fr)",gap:2,marginBottom:8},children:Array.from({length:10}).map((e,i)=>Array.from({length:10}).map((e,n)=>{const s=i<a&&n<c;return(0,E.jsx)(r.a,{onMouseEnter:()=>{return e=n,d(i+1),void p(e+1);var e},onClick:()=>(t(i+1,n+1),void o()),style:{width:20,height:20,border:"1px solid #e0e0e0",backgroundColor:s?"var(--mantine-color-blue-6)":"#f5f5f5",cursor:"pointer",transition:"background-color 0.1s"}},`${i}-${n}`)}))}),(0,E.jsx)(l.E,{size:"xs",c:"dimmed",children:a>0&&c>0?`${a} x ${c}`:"Select table size"})]})};var R=o(63498),M=o(73915),I=o(12105),P=o(64230),B=o(69638),L=o(58601),N=o(65066),O=o(54572);const U=function(e){let{editor:t}=e;const{t:o}=(0,n.Bd)();return null!==t&&void 0!==t&&t.can().deleteTable()?(0,E.jsxs)(T.t,{shadow:"md",p:"xs",style:{position:"absolute",zIndex:1400,display:"flex",gap:4,border:"1px solid #e0e0e0"},children:[(0,E.jsxs)(R.Y,{gap:4,children:[(0,E.jsx)(a.m,{label:o("editor.table.insertRowBelow"),children:(0,E.jsx)(M.M,{size:"sm",variant:"subtle",onClick:()=>t.chain().focus().addRowAfter().run(),children:(0,E.jsx)(I.A,{size:14})})}),(0,E.jsx)(a.m,{label:o("editor.table.insertRowAbove"),children:(0,E.jsx)(M.M,{size:"sm",variant:"subtle",onClick:()=>t.chain().focus().addRowBefore().run(),children:(0,E.jsx)(P.A,{size:14})})}),(0,E.jsx)(a.m,{label:o("editor.table.insertColumnLeft"),children:(0,E.jsx)(M.M,{size:"sm",variant:"subtle",onClick:()=>t.chain().focus().addColumnBefore().run(),children:(0,E.jsx)(B.A,{size:14})})}),(0,E.jsx)(a.m,{label:o("editor.table.insertColumnRight"),children:(0,E.jsx)(M.M,{size:"sm",variant:"subtle",onClick:()=>t.chain().focus().addColumnAfter().run(),children:(0,E.jsx)(L.A,{size:14})})})]}),(0,E.jsx)(r.a,{style:{width:1,backgroundColor:"#e0e0e0",alignSelf:"stretch"}}),(0,E.jsxs)(R.Y,{gap:4,children:[(0,E.jsx)(a.m,{label:o("editor.table.deleteRow"),children:(0,E.jsx)(M.M,{size:"sm",variant:"subtle",color:"red",onClick:()=>t.chain().focus().deleteRow().run(),children:(0,E.jsx)(N.A,{size:14})})}),(0,E.jsx)(a.m,{label:o("editor.table.deleteColumn"),children:(0,E.jsx)(M.M,{size:"sm",variant:"subtle",color:"red",onClick:()=>t.chain().focus().deleteColumn().run(),children:(0,E.jsx)(N.A,{size:14})})}),(0,E.jsx)(a.m,{label:o("editor.table.deleteTable"),children:(0,E.jsx)(M.M,{size:"sm",variant:"subtle",color:"red",onClick:()=>t.chain().focus().deleteTable().run(),children:(0,E.jsx)(O.A,{size:14})})})]})]}):null};const $=o(53310).YY.create({name:"fontFamily",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:e=>{var t;return null===(t=e.style.fontFamily)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>{if(!e.fontFamily)return{};return{style:`font-family: ${e.fontFamily.includes(" ")?`"${e.fontFamily}"`:e.fontFamily}`}}}}}]},addCommands:()=>({setFontFamily:e=>t=>{let{chain:o}=t;return o().setMark("textStyle",{fontFamily:e}).run()},unsetFontFamily:()=>e=>{let{chain:t}=e;return t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}})});const H=function(e){let{value:t,onChange:o,placeholder:T,minHeight:R=300,maxHeight:M=600,maxLength:I=null,isMinimumOptions:P=!1}=e;const{t:B}=(0,n.Bd)(),[L,N]=(0,i.useState)(!1),[O,H]=(0,i.useState)(!1),[V,Y]=(0,i.useState)("system-ui"),[G,Z]=(0,i.useState)("16"),[X,K]=(0,i.useState)("#000000"),[J,q]=(0,i.useState)("#fef08a"),[Q,ee]=(0,i.useState)(!1),[te,oe]=(0,i.useState)(!1),[ie,ne]=(0,i.useState)(null),re=(0,i.useRef)(null),se=(0,i.useRef)(null),ae=(0,p.hG)({shouldRerenderOnTransaction:!0,extensions:[u.A.configure({heading:{levels:[1,2,3,4,5,6]},codeBlock:!1,link:!1}),d.N.configure({openOnClick:!1,HTMLAttributes:{class:"text-blue-500 underline"}}),x.A,m.xJ,h.Z,$,g.Q,f.Ay.configure({multicolor:!0}),y.Ay.configure({inline:!0,allowBase64:!0}),b.A.configure({types:["heading","paragraph"]}),_.XI.configure({resizable:!0,HTMLAttributes:{class:"border-collapse",style:"border: 1px solid #d1d5db"}}),v.A,w.h.configure({HTMLAttributes:{style:"border: 1px solid #d1d5db; padding: 6px 8px;"}}),j.A.configure({HTMLAttributes:{style:"border: 1px solid #d1d5db; padding: 6px 8px;"}}
1),C.Ay.configure({HTMLAttributes:{style:"white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; max-width: 100%;"}}),S.A.configure({placeholder:T||B("editor.placeholder")})],content:t||"",onUpdate:e=>{let{editor:t}=e;o(t.getHTML())},editorProps:{attributes:{class:"prose prose-sm sm:prose lg:prose-lg xl:prose-2xl mx-auto focus:outline-none min-h-[200px] p-4"}}});if((0,i.useEffect)(()=>{if(!ae||void 0===t)return;if(ae.isFocused)return;const e=ae.getHTML();t!==e&&ae.commands.setContent(t)},[t,ae]),(0,i.useEffect)(()=>{if(!ae)return;const e=()=>{if(ae.can().deleteTable())try{const{state:o}=ae,{selection:i}=o,{$anchor:n}=i;let r=n.depth,s=null;for(;r>0;){const e=n.node(r);if("tableCell"===e.type.name||"tableHeader"===e.type.name){s=e;break}r--}if(s){const o=n.before(r),i=ae.view.nodeDOM(o);if(i&&i instanceof HTMLElement){const o=i.closest("td, th")||i;if(o instanceof HTMLElement){var e;const i=o.getBoundingClientRect(),n=null===(e=re.current)||void 0===e?void 0:e.getBoundingClientRect();if(n){var t;const e=(null===(t=re.current)||void 0===t?void 0:t.scrollTop)||0;ne({top:i.bottom-n.top+e+8,left:i.left-n.left})}}}}else ne(null)}catch{ne(null)}else ne(null)};return ae.on("selectionUpdate",e),ae.on("focus",e),()=>{ae.off("selectionUpdate",e),ae.off("focus",e)}},[ae]),!ae)return null;const le=ae.getText().length,de=null!=I&&""!==I?Number(I):NaN,ce=Number.isFinite(de)&&de>0,pe=[{value:"system-ui",label:B("editor.fonts.systemUI")},{value:"Arial",label:"Arial"},{value:"Helvetica",label:"Helvetica"},{value:"Times New Roman",label:"Times New Roman"},{value:"Courier New",label:"Courier New"},{value:"Georgia",label:"Georgia"},{value:"Verdana",label:"Verdana"}],ue=[{value:"paragraph",label:B("editor.blocks.normal")},{value:"blockquote",label:B("editor.blocks.blockquote")},{value:"code",label:B("editor.blocks.code")},{value:"heading1",label:B("editor.blocks.header1")},{value:"heading2",label:B("editor.blocks.header2")},{value:"heading3",label:B("editor.blocks.header3")},{value:"heading4",label:B("editor.blocks.header4")},{value:"heading5",label:B("editor.blocks.header5")},{value:"heading6",label:B("editor.blocks.header6")}];return(0,E.jsxs)(r.a,{ref:se,className:"mantine-rte-container",style:{borderRadius:8,overflow:"hidden",...L&&{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:"white"}},children:[(0,E.jsxs)(c.d,{editor:ae,onSourceCodeTextSwitch:H,children:[(0,E.jsxs)(c.d.Toolbar,{children:[!P&&(0,E.jsx)(s.l,{value:ae.isActive("heading",{level:1})?"heading1":ae.isActive("heading",{level:2})?"heading2":ae.isActive("heading",{level:3})?"heading3":ae.isActive("heading",{level:4})?"heading4":ae.isActive("heading",{level:5})?"heading5":ae.isActive("heading",{level:6})?"heading6":ae.isActive("blockquote")?"blockquote":ae.isActive("code")?"code":"paragraph",onChange:e=>{if("paragraph"===e)ae.chain().focus().setParagraph().run();else if(null!==e&&void 0!==e&&e.startsWith("heading")){const t=parseInt(e.replace("heading",""),10);ae.chain().focus().toggleHeading({level:t}).run()}else"blockquote"===e?ae.chain().focus().toggleBlockquote().run():"code"===e&&ae.chain().focus().setCode().run()},data:ue,size:"xs",w:140,styles:{input:{border:"none",minHeight:32,fontWeight:500}}}),!P&&(0,E.jsx)(s.l,{value:G,onChange:e=>{Z(e),e?ae.chain().focus().setFontSize(`${e}px`).run():ae.chain().focus().unsetFontSize().run()},data:[{value:"8",label:"8"},{value:"9",label:"9"},{value:"10",label:"10"},{value:"11",label:"11"},{value:"12",label:"12"},{value:"14",label:"14"},{value:"16",label:"16"},{value:"18",label:"18"},{value:"24",label:"24"},{value:"30",label:"30"},{value:"36",label:"36"},{value:"48",label:"48"},{value:"60",label:"60"},{value:"72",label:"72"},{value:"96",label:"96"}],size:"xs",w:70,styles:{input:{border:"none",minHeight:32}}}),(0,E.jsxs)(c.d.ControlsGroup,{children:[(0,E.jsx)(c.d.Bold,{}),(0,E.jsx)(c.d.Italic,{}),(0,E.jsx)(c.d.Underline,{}),(0,E.jsx)(c.d.Strikethrough,{}),(0,E.jsx)(c.d.ClearFormatting,{}),(0,E.jsx)(a.m,{label:B("editor.tooltips.highlightColor"),children:(0,E.jsx)(c.d.Control,{"aria-label":B("editor.tooltips.highlightColor"),children:(0,E.jsx)("input",{type:"color",value:J,onChange:e=>{return t=e.target.value,q(t),void ae.chain().focus().toggleHighlight({color:t}).run();var t},style:{width:32,height:32,border:"none",borderRadius:2,cursor:"pointer",padding:0,backgroundColor:"transparent"}})})}),(0,E.jsx)(c.d.Highlight,{})]}),!P&&(0,E.jsx)(s.l,{value:V,onChange:e=>{Y(e),ae.chain().focus().setFontFamily(e).run()},data:pe,size:"xs",w:140,styles:{input:{border:"none",minHeight:32}}}),(0,E.jsx)(a.m,{label:B("editor.tooltips.textColor"),children:(0,E.jsx)(c.d.Control,{"aria-label":B("editor.tooltips.textColor"),children:(0,E.jsx)("input",{type:"color",value:X,onChange:e=>{return t=e.target.value,K(t),void ae.chain().focus().setColor(t).run();var t},style:{width:32,height:32,border:"none",borderRadius:2,cursor:"pointer",padding:0,backgroundColor:"transparent"}})})}),(0,E.jsxs)(c.d.ControlsGroup,{children:[(0,E.jsx)(c.d.BulletList,{}),(0,E.jsx)(c.d.OrderedList,{})]}),(0,E.jsxs)(c.d.ControlsGroup,{children:[(0,E.jsx)(c.d.AlignLeft,{}),(0,E.jsx)(c.d.AlignCenter,{}),(0,E.jsx)(c.d.AlignRight,{}),(0,E.jsx)(c.d.AlignJustify,{})]}),!P&&(0,E.jsxs)(r.a,{style:{position:"relative"},children:[(0,E.jsx)(a.m,{label:B("editor.tooltips.insertTable"),children:(0,E.jsx)(c.d.Control,{onClick:()=>ee(e=>!e),"aria-label":B("editor.tooltips.insertTable"),active:Q,children:(0,E.jsx)(k.A,{size:16,stroke:1.5})})}),Q&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r.a,{onClick:()=>ee(!1),style:{position:"fixed",inset:0,zIndex:1299},"aria-hidden":!0}),(0,E.jsx)(W,{onSelect:(e,t)=>
1{ae.chain().focus().insertTable({rows:e,cols:t,withHeaderRow:!1}).run(),ee(!1)},onClose:()=>ee(!1)})]})]}),(0,E.jsxs)(c.d.ControlsGroup,{children:[(0,E.jsx)(c.d.Link,{}),(0,E.jsx)(c.d.Unlink,{})]}),(0,E.jsxs)(r.a,{style:{position:"relative"},children:[(0,E.jsx)(a.m,{label:B("editor.tooltips.insertEmoji"),children:(0,E.jsx)(c.d.Control,{onClick:()=>oe(e=>!e),"aria-label":B("editor.tooltips.insertEmoji"),active:te,children:(0,E.jsx)(A.A,{size:16,stroke:1.5})})}),te&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r.a,{onClick:()=>oe(!1),style:{position:"fixed",inset:0,zIndex:1299},"aria-hidden":!0}),(0,E.jsx)(r.a,{style:{position:"absolute",top:"calc(100% + 4px)",left:0,zIndex:1300},children:(0,E.jsx)(z.Ay,{onEmojiClick:e=>{null===ae||void 0===ae||ae.chain().focus().insertContent(e.emoji).run(),oe(!1)},width:320,height:400})})]})]}),(0,E.jsx)(c.d.ControlsGroup,{children:(0,E.jsx)(c.d.CodeBlock,{})}),(0,E.jsx)(a.m,{label:B(L?"editor.tooltips.exitFullscreen":"editor.tooltips.fullscreen"),children:(0,E.jsx)(c.d.Control,{onClick:()=>{var e,t,o,i;(N(e=>!e),L)?null===(e=(t=document).exitFullscreen)||void 0===e||e.call(t):null===(o=se.current)||void 0===o||null===(i=o.requestFullscreen)||void 0===i||i.call(o)},"aria-label":B("editor.tooltips.fullscreen"),children:L?(0,E.jsx)(F.A,{size:16,stroke:1.5}):(0,E.jsx)(D.A,{size:16,stroke:1.5})})})]}),(0,E.jsxs)(r.a,{ref:re,style:{position:"relative",minHeight:R,maxHeight:L?"calc(100vh - 64px)":M,overflowY:"auto",backgroundColor:"white"},children:[(0,E.jsx)(c.d.Content,{}),ie&&ae.can().deleteTable()&&(0,E.jsx)(r.a,{style:{position:"absolute",top:ie.top,left:ie.left,zIndex:1400},children:(0,E.jsx)(U,{editor:ae})})]})]}),ce&&(0,E.jsxs)(l.E,{size:"sm",fw:600,ta:"right",style:{margin:0,padding:"4px 8px 8px",color:le<=de?"#AFBED3":"var(--danger-color)"},children:[le," / ",de]})]})}},70635(e,t,o){"use strict";o.d(t,{A:()=>s});o(82483);var i=o(52891),n=o(22744),r=o(56723);const s=e=>{let{children:t,width:o="340px",height:s="720px",scale:a=!1,style:l={},showBackButton:d=!1,onBackClick:c=()=>{},backgroundColor:p="#ffffff"}=e;return(0,r.jsx)(i.A,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",transformOrigin:"center center",transform:a?"scale(0.7)":"none"},children:(0,r.jsxs)(i.A,{sx:{width:o,minWidth:o,maxWidth:o,height:s,boxSizing:"border-box",minHeight:s,border:"10px solid #1a1a1a",overflow:"hidden",borderRadius:"40px",display:"flex",justifyContent:"center",alignItems:"center",position:"relative",backgroundColor:"#ffffff",backgroundSize:"cover",backgroundPosition:"center"},children:[(0,r.jsx)(i.A,{sx:{position:"absolute",top:0,width:"130px",height:"20px",backgroundColor:"#1a1a1a",borderBottomLeftRadius:"16px",borderBottomRightRadius:"16px",zIndex:4e3}}),(0,r.jsx)(i.A,{sx:{width:"100%",height:"100%",position:"relative",overflow:"hidden"},children:(0,r.jsxs)(i.A,{id:"mobile-frame-scroll-container",sx:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowY:"scroll",overflowX:"hidden","&::-webkit-scrollbar":{display:"none"},msOverflowStyle:"none",scrollbarWidth:"none",boxSizing:"border-box",width:"100%",padding:"20px",paddingTop:d?"0px":"40px",...l},children:[d&&(()=>{const e=function(e){if(!e)return!0;let t,o,i;if(e.startsWith("#")){const n=e.replace("#","");if(3===n.length)t=parseInt(n[0]+n[0],16),o=parseInt(n[1]+n[1],16),i=parseInt(n[2]+n[2],16);else{if(6!==n.length)return!0;t=parseInt(n.substring(0,2),16),o=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16)}}else{const n=e.match(/\d+/g);if(!n||n.length<3)return!0;t=parseInt(n[0]),o=parseInt(n[1]),i=parseInt(n[2])}return(.299*t+.587*o+.114*i)/255>.5}(p),t=e?"rgba(255, 255, 255, 0.4)":"rgba(0, 0, 0, 0.5)",o=e?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.6)",s=e?"#000000":"#ffffff";return(0,r.jsx)(i.A,{sx:{display:"flex",alignItems:"center",padding:"12px 16px",paddingTop:"20px",flexShrink:0,position:"sticky",top:0,backgroundColor:"transparent",zIndex:1001,marginBottom:"0px",width:"100%",pointerEvents:"auto"},children:(0,r.jsx)(i.A,{onClick:e=>{e.preventDefault(),e.stopPropagation(),c&&c()}
1,className:"logo_container",sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"40px",height:"40px",borderRadius:"50%",backgroundColor:t||"rgba(0, 0, 0, 0.5)",cursor:"pointer",transition:"background-color 0.2s","&:hover":{backgroundColor:o||"rgba(0, 0, 0, 0.6)"},boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",flexShrink:0},children:(0,r.jsx)(n.A,{style:{fontSize:"26px",color:s||"#ffffff",cursor:"pointer",pointerEvents:"none"}})})})})(),(0,r.jsx)("div",{style:{marginTop:d?"0px":"-50px"},children:t})]})})]})})}},48578(e,t,o){"use strict";o.d(t,{A:()=>m});var i=o(82483),n=o(62427),r=o(71018),s=o(57513),a=o(71481),l=(o(90425),o(68351),o(87060)),d=o.n(l),c=o(68893),p=o.n(c),u=o(43081),x=o(56723);function m(e){const t=(0,i.useRef)(),[o,l]=(0,i.useState)(!1),[c,m]=(0,i.useState)(!1);let h=e.textEditorTextLength;const[g,f]=(0,i.useState)(()=>r.EditorState.createEmpty()),y=g.getCurrentContent().getPlainText("").length;(0,i.useEffect)(()=>{var t,o;if(!("string"===typeof e.currentText?e.currentText.trim():e.currentText))return f(r.EditorState.createEmpty()),void m(!1);const i=!g.getCurrentContent().hasText();if(e.currentText&&i&&!c){const t=p()(e.currentText),{contentBlocks:o,entityMap:i}=t,n=r.ContentState.createFromBlockArray(o,i),s=r.EditorState.createWithContent(n);f(r.EditorState.moveFocusToEnd(s)),m(!0)}else if(e.currentText===(0,u.D4)((null===e||void 0===e||null===(t=e.influencer_info)||void 0===t?void 0:t.description)||"")&&null===(null===e||void 0===e?void 0:e.influencerDescriptionUpdated)&&null!==e&&void 0!==e&&null!==(o=e.influencer_info)&&void 0!==o&&o.description){var n;const t=d()((0,r.convertToRaw)(g.getCurrentContent())),o=(0,u.D4)((null===e||void 0===e||null===(n=e.influencer_info)||void 0===n?void 0:n.description)||"");if(String(t).trim()!==String(o).trim()){const e=p()(o),{contentBlocks:t,entityMap:i}=e,n=r.ContentState.createFromBlockArray(t,i),s=r.EditorState.createWithContent(n);f(r.EditorState.moveFocusToEnd(s)),m(!0)}}},[e.currentText]),(0,i.useEffect)(()=>{if(!0===e.modalPopupEditor){t.current.focusEditor();const e=r.EditorState.moveFocusToEnd(g);f(e)}},[]),(0,i.useEffect)(()=>{e.editedBio||l(!1)},[e.editedBio]),(0,i.useEffect)(()=>{e.parentCallback(d()((0,r.convertToRaw)(g.getCurrentContent()))),e.lengthCallback(y),y<=h?(e.parentCallback(d()((0,r.convertToRaw)(g.getCurrentContent()))),e.lengthCallback(y)):e.lengthCallback(y)},[g]);let b="",_="",v="",w="";"bio"===e.page?(_="editorClassNameShort",0===y&!1===e.editedBio?(b="wrapperClassName",v="toolbarClassName",w=""):y<=h&y>=4?(b="wrapperClassNameGreen",v="toolbarClassNameGreen",w=""):(b="wrapperClassNameError",v="toolbarClassNameError",w="")):(b="wrapperClassName",v="toolbarClassName",_=void 0===e.editorClassName?"editorClassName":e.editorClassName);return(0,x.jsx)("div",{children:(0,x.jsxs)("div",{style:{backgroundColor:"white",borderRadius:"8px",wordWrap:"break-word",overflowWrap:"break-word"},children:[(0,x.jsx)(n.Editor,{ref:t,editorState:g,onEditorStateChange:f,onFocus:()=>{"bio"===e.page&&e.onFocus&&!o&&(l(!0),e.onFocus())},toolbarClassName:v,wrapperClassName:b,editorClassName:_,toolbar:{options:(()=>{if(e.toolbarOptions&&Array.isArray(e.toolbarOptions)){const t=[];return e.toolbarOptions.includes("inline")||t.push("inline"),e.toolbarOptions.includes("list")||t.push("list"),e.toolbarOptions.includes("textAlign")||t.push("textAlign"),t.length>0?[...t,...e.toolbarOptions]:e.toolbarOptions}return["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","history"]})(),inline:{inDropdown:!1,options:["bold","italic","underline","strikethrough","monospace"],bold:{className:"toolbar-button"},italic:{className:"toolbar-button"},underline:{className:"toolbar-button"},strikethrough:{className:"toolbar-button"},monospace:{className:"toolbar-button"}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:"toolbar-dropdown"},fontSize:{options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:"toolbar-dropdown"},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana","Courier New","Helvetica"],className:"toolbar-dropdown"},list:{inDropdown:!1,options:["unordered","ordered","indent","outdent"],unordered:{className:"toolbar-button"},ordered:{className:"toolbar-button"},indent:{className:"toolbar-button"},outdent:{className:"toolbar-button"}},textAlign:{inDropdown:!0,options:["left","center","right","justify"]},link:{inDropdown:!0,defaultTargetOption:"_blank",options:["link","unlink"]},emoji:{className:"toolbar-button"}},placeholder:e.placeholder}),w,"bio"===e.page?(0,x.jsxs)("span",{style:{width:"100px",margin:"0px 0px 0px auto"},children:[" ",(0,x.jsxs)("p",{style:{textAlign:"right",marginTop:"5px",paddingBottom:"0px",marginBottom:"0px",fontWeight:"600",fontSize:"12px",color:y<=h?"#AFBED3":"var(--danger-color)"},children:[y," / ",h]})]}):(0,x.jsx)(x.Fragment,{children:void 0!==e.expandTextEditor?(0,x.jsxs)(s.Ay,{container:!0,sx:{margin:"5px 0px 20px 0px"},children:[(0,x.jsx)(s.Ay,{item:!0,xs:6,children:!0===e.expandTextEditor?(0,x.jsxs)("span",{onClick:e.toggleExpandTextEditor,style:{textAlign:"left",color:"#AFBED3",fontWeight:"500",fontSize:"14px",cursor:"pointer"},children:["Collapse ",(0,x.jsx)(a.Ucs,{style:{marginLeft:"2px",fontSize:"10px"}})]}):(0,x.jsxs)("span",{onClick:e.toggleExpandTextEditor,style:{textAlign:"left",color:"#AFBED3",fontWeight:"500",fontSize:"14px",cursor:"pointer"},children:["Expand ",(0,x.jsx)(a.Vr3,{style:{marginLeft:"2px",fontSize:"10px"}})]})}),(0,x.jsx)(s.Ay,{item:!0,xs:6,children:(0,x.jsxs)("p",{style:{textAlign:"right",color:y<=h?"#AFBED3":"var(--danger-color)",padding:"0px 0px 0px 0px",fontWeight:"600",fontSize:"14px",margin:"0px 0px 0px 0px"},children:[y," / ",h]})})]}):(0,x.jsxs)("p",{style:{textAlign:"right",color:y<=h?"#AFBED3":"var(--danger-color)",padding:"0px 0px 0px 0px",fontWeight:"600",fontSize:"14px",margin:"px 0px 0px 0px"},children:[y," / ",h]})})]})})}},52646(e,t,o){"use strict";o.d(t,{A:()=>i});o(82483);function i(e){return e&&"string"===typeof e?e.charAt(0).toUpperCase()+e.slice(1):""}},54024(e,t,o){"use strict";o.d(t,{A:()=>i});const i=(e,t)=>e?e.length>t?e.slice(0,t)+"...":e:""},81997(e,t,o){"use strict";o.d(t,{A:()=>r});var i=o(82483);
1function n(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}function r(){const[e,t]=(0,i.useState)(n());return(0,i.useEffect)(()=>{function e(){t(n())}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}},91400(e,t,o){"use strict";function i(e){if(null==e||""===e)return"";let t=String(e).replace(/<[^>]*>/g,"");const o=t.indexOf("<");return-1!==o&&(t=t.slice(0,o)),t.replace(/\s+/g," ").trim()}o.d(t,{$:()=>i})},33906(e,t,o){"use strict";o.d(t,{Of:()=>n,f6:()=>i});const i=e=>{const{id:t,hash:o}=(e=>{if(!e)return{id:"",hash:""};const t=String(e).match(/vimeo\.com\/(?:video\/)?(\d+)(?:\/([a-zA-Z0-9]+))?/);if(!t||!t[1])return{id:"",hash:""};const o=String(e).match(/[?&]h=([a-zA-Z0-9]+)/);return{id:t[1],hash:t[2]||(o?o[1]:"")}})(e);return t?o?`${t}?h=${o}`:t:""},n=e=>`https://vumbnail.com/${(e=>String(e||"").split("?")[0])(e)}.jpg`},15269(e,t,o){"use strict";o.d(t,{A:()=>v});var i=o(98587),n=o(58168),r=o(82483),s=o(29765),a=o(18873),l=o(26855),d=o(33790),c=o(34414),p=o(56723);const u=(0,c.A)((0,p.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");var x=o(76363),m=o(89647);function h(e){return(0,m.Ay)("MuiAvatar",e)}(0,x.A)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);var g=o(25090);const f=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],y=(0,l.Ay)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],o.colorDefault&&t.colorDefault]}})(e=>{let{theme:t}=e;return{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(t.vars||t).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,n.A)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:(0,n.A)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}}),b=(0,l.Ay)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),_=(0,l.Ay)(u,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});const v=r.forwardRef(function(e,t){const o=(0,d.b)({props:e,name:"MuiAvatar"}),{alt:l,children:c,className:u,component:x="div",slots:m={},slotProps:v={},imgProps:w,sizes:j,src:C,srcSet:S,variant:k="circular"}=o,A=(0,i.A)(o,f);let F=null;const D=function(e){let{crossOrigin:t,referrerPolicy:o,src:i,srcSet:n}=e;const[s,a]=r.useState(!1);return r.useEffect(()=>{if(!i&&!n)return;a(!1);let e=!0;const r=new Image;return r.onload=()=>{e&&a("loaded")},r.onerror=()=>{e&&a("error")},r.crossOrigin=t,r.referrerPolicy=o,r.src=i,n&&(r.srcset=n),()=>{e=!1}},[t,o,i,n]),s}((0,n.A)({},w,{src:C,srcSet:S})),z=C||S,T=z&&"error"!==D,E=(0,n.A)({},o,{colorDefault:!T,component:x,variant:k}),W=(e=>{const{classes:t,variant:o,colorDefault:i}=e,n={root:["root",o,i&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,a.A)(n,h,t)})(E),[R,M]=(0,g.A)("img",{className:W.img,elementType:b,externalForwardedProps:{slots:m,slotProps:{img:(0,n.A)({},w,v.img)}},additionalProps:{alt:l,src:C,srcSet:S,sizes:j},ownerState:E});return F=T?(0,p.jsx)(R,(0,n.A)({},M)):c||0===c?c:z&&l?l[0]:(0,p.jsx)(_,{ownerState:E,className:W.fallback}),(0,p.jsx)(y,(0,n.A)({as:x,ownerState:E,className:(0,s.A)(W.root,u),ref:t},A,{children:F}))})},61982(e,t,o){"use strict";o.d(t,{A:()=>f});var i=o(58168),n=o(98587),r=o(82483),s=o(29765),a=o(18873),l=o(26855),d=o(33790),c=o(77924),p=o(76363),u=o(89647);function x(e){return(0,u.Ay)("MuiCard",e)}(0,p.A)("MuiCard",["root"]);var m=o(56723);const h=["className","raised"],g=(0,l.Ay)(c.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),f=r.forwardRef(function(e,t){const o=(0,d.b)({props:e,name:"MuiCard"}),{className:r,raised:l=!1}=o,c=(0,n.A)(o,h),p=(0,i.A)({},o,{raised:l}),u=(e=>{const{classes:t}=e;return(0,a.A)({root:["root"]},x,t)})(p);return(0,m.jsx)(g,(0,i.A)({className:(0,s.A)(u.root,r),elevation:l?8:void 0,ref:t,ownerState:p},c))})},83280(e,t,o){"use strict";o.d(t,{A:()=>g});var i=o(98587),n=o(58168),r=o(82483),s=o(29765),a=o(18873),l=o(26855),d=o(33790),c=o(76363),p=o(89647);function u(e){return(0,p.Ay)("MuiCardActions",e)}(0,c.A)("MuiCardActions",["root","spacing"]);var x=o(56723);const m=["disableSpacing","className"],h=(0,l.Ay)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,!o.disableSpacing&&t.spacing]}})(e=>{let{ownerState:t}=e;
1return(0,n.A)({display:"flex",alignItems:"center",padding:8},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})}),g=r.forwardRef(function(e,t){const o=(0,d.b)({props:e,name:"MuiCardActions"}),{disableSpacing:r=!1,className:l}=o,c=(0,i.A)(o,m),p=(0,n.A)({},o,{disableSpacing:r}),g=(e=>{const{classes:t,disableSpacing:o}=e,i={root:["root",!o&&"spacing"]};return(0,a.A)(i,u,t)})(p);return(0,x.jsx)(h,(0,n.A)({className:(0,s.A)(g.root,l),ownerState:p,ref:t},c))})},10629(e,t,o){"use strict";o.d(t,{A:()=>f});var i=o(98587),n=o(58168),r=o(82483),s=o(29765),a=o(18873),l=o(80435),d=o(26855),c=o(33790),p=o(76363),u=o(89647);function x(e){return(0,u.Ay)("MuiListItemAvatar",e)}(0,p.A)("MuiListItemAvatar",["root","alignItemsFlexStart"]);var m=o(56723);const h=["className"],g=(0,d.Ay)("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,"flex-start"===o.alignItems&&t.alignItemsFlexStart]}})(e=>{let{ownerState:t}=e;return(0,n.A)({minWidth:56,flexShrink:0},"flex-start"===t.alignItems&&{marginTop:8})}),f=r.forwardRef(function(e,t){const o=(0,c.b)({props:e,name:"MuiListItemAvatar"}),{className:d}=o,p=(0,i.A)(o,h),u=r.useContext(l.A),f=(0,n.A)({},o,{alignItems:u.alignItems}),y=(e=>{const{alignItems:t,classes:o}=e,i={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,a.A)(i,x,o)})(f);return(0,m.jsx)(g,(0,n.A)({className:(0,s.A)(y.root,d),ownerState:f,ref:t},p))})},59909(e,t,o){"use strict";o.d(t,{A:()=>j});var i=o(98587),n=o(58168),r=o(82483),s=o(29765),a=o(18873),l=o(32610),d=o(15662),c=o(12319),p=o(26855),u=o(33790),x=o(76363),m=o(89647);function h(e){return(0,m.Ay)("MuiSwitch",e)}const g=(0,x.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);var f=o(56723);const y=["className","color","edge","size","sx"],b=(0,p.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.edge&&t[`edge${(0,d.A)(o.edge)}`],t[`size${(0,d.A)(o.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${g.thumb}`]:{width:16,height:16},[`& .${g.switchBase}`]:{padding:4,[`&.${g.checked}`]:{transform:"translateX(16px)"}}}}]}),_=(0,p.Ay)(c.A,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.switchBase,{[`& .${g.input}`]:t.input},"default"!==o.color&&t[`color${(0,d.A)(o.color)}`]]}})(e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${"light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${g.checked}`]:{transform:"translateX(20px)"},[`&.${g.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${"light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${g.checked} + .${g.track}`]:{opacity:.5},[`&.${g.disabled} + .${g.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:""+("light"===t.palette.mode?.12:.2)},[`& .${g.input}`]:{left:"-100%",width:"300%"}}},e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,l.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[o]=e;return{props:{color:o},style:{[`&.${g.checked}`]:{color:(t.vars||t).palette[o].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[o].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,l.X4)(t.palette[o].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${g.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${o}DisabledColor`]:`${"light"===t.palette.mode?(0,l.a)(t.palette[o].main,.62):(0,l.e$)(t.palette[o].main,.55)}`}},[`&.${g.checked} + .${g.track}`]:{backgroundColor:(t.vars||t).palette[o].main}}}})]}}),v=(0,p.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}
1),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${"light"===t.palette.mode?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:""+("light"===t.palette.mode?.38:.3)}}),w=(0,p.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}}),j=r.forwardRef(function(e,t){const o=(0,u.b)({props:e,name:"MuiSwitch"}),{className:r,color:l="primary",edge:c=!1,size:p="medium",sx:x}=o,m=(0,i.A)(o,y),g=(0,n.A)({},o,{color:l,edge:c,size:p}),j=(e=>{const{classes:t,edge:o,size:i,color:r,checked:s,disabled:l}=e,c={root:["root",o&&`edge${(0,d.A)(o)}`,`size${(0,d.A)(i)}`],switchBase:["switchBase",`color${(0,d.A)(r)}`,s&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},p=(0,a.A)(c,h,t);return(0,n.A)({},t,p)})(g),C=(0,f.jsx)(w,{className:j.thumb,ownerState:g});return(0,f.jsxs)(b,{className:(0,s.A)(j.root,r),sx:x,ownerState:g,children:[(0,f.jsx)(_,(0,n.A)({type:"checkbox",icon:C,checkedIcon:C,ref:t,ownerState:g},m,{classes:(0,n.A)({},j,{root:j.switchBase})})),(0,f.jsx)(v,{className:j.track,ownerState:g})]})})},4904(e,t,o){"use strict";e.exports=o.p+"static/media/hero_graphic1.f40c20f59c61a5942a05.webp"},60281(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAgCAMAAAAynjhNAAAAAXNSR0IArs4c6QAAAb9QTFRF/////v7+7Ozs4ODg9fX10dHRh4eHQUFBISEhHR0dKioqXl5epqam7u7u19fXW1tbKCgokZGR9/f3lJSUHx8fJCQkYWFhl5eXr6+vu7u7paWlhoaGQkJCOjo62dnZ/Pz8cXFxkpKS9PT01NTUXFxcKSkpwsLCgYGBTExM6Ojorq6uJycn2NjY/f39zMzMPDw88vLyMDAwQEBA3NzcZmZmKysrRkZGp6ens7Ozj4+P0NDQxMTEdnZ2b29vJSUl6enpZ2dn+fn5Ozs7mpqaPT09tra24uLiIiIikJCQzc3NxcXFwcHBxsbGWVlZY2NjjY2N+/v78fHxaWlpmJiYhYWFNDQ0Hh4e7e3tV1dXX19fPz8/WFhYbW1t8/PzdHR0iIiIurq6T09Pd3d3qKioLS0t+Pj4sLCwYmJiMTEx5OTkeXl5rKyscHBwysrKx8fH29vbqampn5+fbGxsVlZWNjY2o6Ojt7e3yMjIjo6OSEhIvb29zs7OlZWVYGBgwMDA6urqNTU1a2trz8/PJiYmiYmJ09PTWlpa0tLSMzMzMjIyvLy8bm5u5ubmLi4uUVFRIyMjnJycICAggICAcnJyfHx8S0MPxQAAAa9JREFUKJGtkldbE1EQhndBwBdEURIBI0aKEA0liRLsJkgHkWYSFJUWiiCCYBcUxYLSRH+wnJLNauTGh7n5vpn37M4584xh7FuYaekH9mIZmVkHgeycQ7mp8PARrMg7euwvmu8A5/GCwqITrpO7B4pP2aH79O4nJaU6KyuHMxU2XAmes7b8nBNvlZUVQrnqVm2qSo2XWp+mpX4C0p+/UOcM1lcLexFcGl+Cy0Kv5Ml7X5XFa1y/oX7oJyQ03IDXdbMRmkTW3EKrxG3QLrQDOg3DV8stWe7CI/U22d1Ce3r7hPRzR5briURVl5h9BgPclVoFGULvMZiE9x/AQ+lyYUjoMCMWHR2DWFzaMIyrO0xYeBIG9Wyn9I0fEbTw9MzjhJ2FJ0LniNjnnYhM6uSD0hzMp1IzwFPlFliM6+KzgXTtxuG5ci/gpS4GGFXGV8wr05qE47Vyb96qVTSXYDnR5917vEP2xvEVqEymHz7iWE2u8CcPfHbbjn/5Cmsl8p3hbysR+B7+4x3rS2ITNoKbDVti17dTHtoe+6HX3L8TTZ2DYUSnV3+GfuXPuv8F/yt+A4i6P6rDtI6JAAAAAElFTkSuQmCC"},80336(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAMAAAC7m5rvAAAAAXNSR0IArs4c6QAAAjpQTFRFAAAAbNiAcdV9b9eAcNd+cdh9cdiAcdmAcM+Ab9N6b9d+cNd+cNd+cNd+b9d+cdZ/cdZ+ZsyAcdh+cNZ+cNd+cNd+b9d+cNeAgP+AcNd9cNd+cNd+cNh9btV+cNh+cdd+bdt8AP8AcNd+cNd+cdh+cNh/b9h+cdd9cNeAb9d+cdh+b9h9b9Z/cNd+cNd+b9iAceNxcNd9cNd9cdd+cdWAcNZ+cdd+cNZ6cNd+cNd+c9mActaAcdd+cdd+Zsxmdth2cNZ+cNd+cth+Vf9Vcdd+cNd+cNZ+dNF0btZ8cNd+b9h9cNd+cdZ+adJ4cNd9cNd+cdd9b9d9cNd+ctN7bdttcNd+cNd+cNd+bdWAcdd9cNd+cNd+cdqAc9Z7b9d/cNZ+cdd9cNd+cNZ+cNd+cNd9cNd+cNd+cNd+bdt5cdh+atWAcdd+b9d/cNd9cNh+cNh+cNd+cNd+b9d/bNh8cdZ9b9aAb9d+cNd+b9d+bteAd913cNd+b9l9cNd+cNd+bduAcNiAcNd+cNZ/b9h8b9Z9dNyAcNd/ctl9cNZ+b9d9cNh9cdeAcNZ+cNd+cNd+cNd+cNd+ctV9cNZ9cNd+cNd+b9d+cdaAgNWAcdd9cNh/cNd9ddWAcNiAb9V9cNd+b9WAcNp8cNd+cNd+gL+Ab9Z+cNd+ctaAcdh9cNd+cNaAcNd/cNWAcdZ9cNd+cNeAcNd/b9d+cNd+b9Z+c9mAcNd+btaAcdh+cNd+cdd+cNh+cdd+cdd+cdd/gN+AUgeqCAAAAL50Uk5TABo9TFlWSDYQF2e48v/no1EKb8P99a5SAmDkyDtDz6wjAYb7vI91WkBHYXyX0fROCauxXxLJcxnKsihK1ZoFDdbTQQPuoLALJdlugIoRv/54t+sdB+Gm2iot6vkiH4V9s3+Q7LvS6fMVTwxNpzmC4sbwhyFqPmXdUzoPeTWY+g5U2J0nXhahL11sYkaW/OPEujF2bdvORAZ6ib0YQjf4HinlwARF6Dho9jKZMFjxIJ/3tGMU4Cycwd7vqsWRCIOT/woAAAMPSURBVEiJzZbpP1RRGMev7HQwGhoVEWkiUVlLpDSJakgkRUUaUkm0WiOtQyqlVaEk0SLt9b91nnPvnTtnmWt61/PqeX7P73s+95w595krSf9DeCzw9PL28fX7B8Q/IHAhUiIoOMTgDmMIXWREVISFL54PMkUsQYJYukyXiowSQRDLo11CMStUU2zcyvhV5tUJiWuSVGltsgsqZZ3CrN+QqqnR8WmybEwXUhmZcjtrI9vZlC13NufwVO4W0srbKlhxW0A+aW7n92UhDcsO8QYKdpJ2IasXEXmXSUxJ0u49ZNtmWk22glrsCsKRUwKOvaXO2r4y0Mp1KEny2w+eYGcpFJSoeS5fBVxU4wFNyK3EwsFDtKuq+jBz/yNg8SNafRTqGtqTWovQMVoy1YHPcT1Nx3Flq6c9DWA5QWuNoJ1Uq1NQnWZ3g
1s+2id3eGWxsVu/KWcBaWEtrU/Y5VjsPzkilgCuXxzqEkWHVDqEFlqh2C5Pgul+Q04uAXXIPI2d+maRtkNbP41fCC7ztJO3AWWcM5+iKaOBFM2DdJC1HgqOWDFcQ6uHUXsASSJqFs0zO4AkXkHv7urS3LhxndRx2FQwerNoHaitJr8F75CZ2HdQbJK3BmZWbLmLMB1RPkt6EtNQ97Bao8mi7DSk35sWYHYv98pN1dYpmmRgbwOIdJR/EeSU7s4TYXRDvKcV96qXVw4q0reGpAUW4CMugNUMQ1oYc5QOw+NKWhzCVhmntEfgeO8oQKJ/QFlMgN25Tm7Et7KkmpGkXW+PaC5jn7mDf52cg2Cok3SA/dT41O+E3QEO6nxPPR5xPX44XlWR7ua6pl6PgGBunVXMsqHVVrqhXcByojJsd5DdHryfE1Buy6uRbvjNFuFh7H996F0d6/dOiFckwQ2imjdnh+w/yZ9GMj/hJpj/K4Min2c+q1lusfECguS9iSpImBhQLMo5mWuxfS5JqVQF9Ezy8GimJNiSM796uIQj/qX4e+pE+rE/hKC0co0jbz2mdW+Ac9bM9v4ImkdU2N/i78Y97jCPG+b8AR/wFj3WYZqnidhgAAAAASUVORK5CYII="},90854(){},83251(){},58434(){},80941(){},10717(){},54129(){},50044(e,t,o){"use strict";o.d(t,{N:()=>y});var i=o(82483),n=o(53077),r=o(26427),s=o(55655);function a(){const e=(0,i.useRef)(!1);return(0,s.E)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var l=o(45652),d=o(27516);class c extends i.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function p(e){let{children:t,isPresent:o}=e;const n=(0,i.useId)(),r=(0,i.useRef)(null),s=(0,i.useRef)({width:0,height:0,top:0,left:0});return(0,i.useInsertionEffect)(()=>{const{width:e,height:t,top:i,left:a}=s.current;if(o||!r.current||!e||!t)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n          [data-motion-pop-id="${n}"] {\n            position: absolute !important;\n            width: ${e}px !important;\n            height: ${t}px !important;\n            top: ${i}px !important;\n            left: ${a}px !important;\n          }\n        `),()=>{document.head.removeChild(l)}},[o]),i.createElement(c,{isPresent:o,childRef:r,sizeRef:s},i.cloneElement(t,{ref:r}))}const u=e=>{let{children:t,initial:o,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:a,mode:c}=e;const u=(0,d.M)(x),m=(0,i.useId)(),h=(0,i.useMemo)(()=>({id:m,initial:o,isPresent:n,custom:s,onExitComplete:e=>{u.set(e,!0);for(const t of u.values())if(!t)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),a?void 0:[n]);return(0,i.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),i.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),"popLayout"===c&&(t=i.createElement(p,{isPresent:n},t)),i.createElement(l.t.Provider,{value:h},t)};function x(){return new Map}var m=o(40844),h=o(75538),g=o(85992);const f=e=>e.key||"";const y=e=>{let{children:t,custom:o,initial:l=!0,onExitComplete:d,exitBeforeEnter:c,presenceAffectsLayout:p=!0,mode:x="sync"}=e;c&&(x="wait",(0,g.m)(!1,"Replace exitBeforeEnter with mode='wait'"));let[y]=function(){const e=a(),[t,o]=(0,i.useState)(0),n=(0,i.useCallback)(()=>{e.current&&o(t+1)},[t]);return[(0,i.useCallback)(()=>r.OH.postRender(n),[n]),t]}();const b=(0,i.useContext)(m.L).forceRender;b&&(y=b);const _=a(),v=function(e){const t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}(t);let w=v;const j=new Set,C=(0,i.useRef)(w),S=(0,i.useRef)(new Map).current,k=(0,i.useRef)(!0);if((0,s.E)(()=>{k.current=!1,function(e,t){e.forEach(e=>{const o=f(e);t.set(o,e)})}(v,S),C.current=w}),(0,h.l)(()=>{k.current=!0,S.clear(),j.clear()}),k.current)return i.createElement(i.Fragment,null,w.map(e=>i.createElement(u,{key:f(e),isPresent:!0,initial:!!l&&void 0,presenceAffectsLayout:p,mode:x},e)));w=[...w];const A=C.current.map(f),F=v.map(f),D=A.length;for(let i=0;i<D;i++){const e=A[i];-1===F.indexOf(e)&&j.add(e)}
1return"wait"===x&&j.size&&(w=[]),j.forEach(e=>{if(-1!==F.indexOf(e))return;const t=S.get(e);if(!t)return;const n=A.indexOf(e);w.splice(n,0,i.createElement(u,{key:f(t),isPresent:!1,onExitComplete:()=>{S.delete(e),j.delete(e);const t=C.current.findIndex(t=>t.key===e);if(C.current.splice(t,1),!j.size){if(C.current=v,!1===_.current)return;y(),d&&d()}},custom:o,presenceAffectsLayout:p,mode:x},t))}),w=w.map(e=>{const t=e.key;return j.has(t)?e:i.createElement(u,{key:f(e),isPresent:!0,presenceAffectsLayout:p,mode:x},e)}),"production"!==n._&&"wait"===x&&w.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.'),i.createElement(i.Fragment,null,j.size?w:w.map(e=>(0,i.cloneElement)(e)))}}}]);
2//# sourceMappingURL=5623.5e2c12c6.chunk.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.