(()=>{"use strict";var __webpack_modules__={67787(e,t,n){n(20975);const r=n.p+"static/media/behance.1a39d1b87cbcffc24495310a1d5a4770.svg";n.d(t,["A",0,r])},55227(e,t,n){n(20975);const r=n.p+"static/media/dribbble.96aa35fe9d561f658e438e47c1b2c5c2.svg";n.d(t,["A",0,r])},64125(e,t,n){n(20975);const r=n.p+"static/media/facebook.2728600b3606fd416738af6ab6d25d6e.svg";n.d(t,["A",0,r])},16442(e,t,n){n(20975);const r=n.p+"static/media/globe-icon.13641ca0d1bfe06b5f4b73accac86430.svg";n.d(t,["A",0,r])},71703(e,t,n){n(20975);const r=n.p+"static/media/instagram.c4874259f6de104db298e0d1ee63b0d1.svg";n.d(t,["A",0,r])},89859(e,t,n){n(20975);const r=n.p+"static/media/linkedin.e7fb297d7eb0cb628f5dbdbdf9aa5f7b.svg";n.d(t,["A",0,r])},86285(e,t,n){n(20975);const r=n.p+"static/media/pinterest.be98129b3866c0a1dd38bef2f39c62e0.svg";n.d(t,["A",0,r])},38298(e,t,n){n(20975);const r=n.p+"static/media/twitter.c5f280fa97bc754c8fcff3001370baee.svg";n.d(t,["A",0,r])},92704(e,t,n){n(20975);const r=n.p+"static/media/youtube.6d684aa9d70ab53db76700a0a6e13cb8.svg";n.d(t,["A",0,r])},91965(){},28836(e,t,n){n.d(t,{B:()=>D,A:()=>w});var r=n(20975),i=n(31305),a=n(82993),s=n(47760),o=n(89449),c=n(16478),u=n(65186);function d(e){const[t,n]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e&&"admin"===e.myRole&&!t&&(setTimeout(()=>{(function(e,t,n){function r(){let e=t.getElementsByTagName("script")[0],n=t.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://beacon-v2.helpscout.net",e.parentNode.insertBefore(n,e)}if(e.Beacon=n=function(t,n,r){e.Beacon.readyQueue.push({method:t,options:n,data:r})},n.readyQueue=[],"complete"===t.readyState)return r();e.attachEvent?e.attachEvent("onload",r):e.addEventListener("load",r,!1)})(window,document,window.Beacon||function(){}),window.Beacon("init","c8430dd6-2a64-4b61-962f-ed18a2da7ea4"),window.Beacon("config",{display:{style:"manual"}})},8e3),n(!0))},[e,t])}var l=n(19328),m=n(24968),_=n(42414),p=n(31696),h=n(82256),g=n(62391);const y=(0,o.wj)((0,i.Ng)(e=>({user:e.auth,community:e.community}),e=>(0,a.zH)({updateCommunity:_.Km},e))(function({user:e,community:t,updateCommunity:n,addToast:i,web3Logout:a}){const[s,c]=(0,r.useState)(!1),d=null==t?void 0:t.id,{analyticsService:l}=(0,u.W)();return(0,r.useEffect)(()=>{t&&!("joined"in t)&&e&&"New User"!==e.name&&(c(!0),m.BE.getCommunityById(e,t.id).then(({community:t})=>{t.joined?(c(!1),n(t)):m.BE.joinCommunity(e,t.id).then(({community:e})=>{c(!1),l.track("subscribe-community",{communityPlan:e.plan?e.plan.planType:"free"}),n(e),i("Subscribed to "+e.name)}).catch(e=>{c(!1),i("Could not subscribe to "+t.name,"",o.lm.danger)})}).catch(e=>{c(!1),i("Could not load community by id "+t.name,"",o.lm.danger)}))},[d,e]),(0,g.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center bg-background",children:[(0,g.jsx)(h.R,{}),t.joined?(0,g.jsxs)("div",{className:"flex flex-col items-center rounded bg-card p-12 pb-8",children:[(0,g.jsx)("img",{loading:"lazy",src:t.logo,alt:"",className:"w-72 rounded"}),(0,g.jsx)("div",{className:"my-4 text-center text-lg font-bold text-secondary-foreground/85",children:"Your membership is pending"}),(0,g.jsx)("div",{className:"w-72 text-center text-secondary-foreground/80",children:"You'll be notified if your request to join has been approved."}),(0,g.jsx)("div",{className:"my-8 h-0.5 w-full border-b border-border"}),(0,g.jsx)("div",{className:"theme-border-danger mt-4 flex w-64 cursor-pointer place-content-center border",children:(0,g.jsx)("button",{className:"w-full rounded-full px-4 py-2 text-alert",onClick:()=>{p.A.logout(t,a)},children:"Logout"})})]}):"Joining Community..."]})}));var f=n(55854);n(93591),n(64373),n(23277);var b=n(6292),v=n(96621),A=n(26914),E=n(25655),k=n(38733),P=n(77255),C=n(41153),M=n(93668);function x(e){if(!/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e))throw new Error("Could not parse Hex Color");e.startsWith("#")&&(e=e.slice(1));const t=parseInt(e.slice(0,2),16)/255,n=parseInt(e.slice(2,4),16)/255,r=parseInt(e.slice(4,6),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),s=(i+a)/2;let o=0,c=0;if(i!==a){const e=i-a;switch(c=s>.5?e/(2-i-a):e/(i+a),i){case t:o=(n-r)/e+(nPromise.all([n.e(2978),n.e(275),n.e(8020),n.e(7365),n.e(8760),n.e(1066)]).then(n.bind(n,99120))),O=r.lazy(()=>Promise.all([n.e(3120),n.e(2978),n.e(275),n.e(2087),n.e(670),n.e(7519)]).then(n.bind(n,11534))),T=r.lazy(()=>Promise.all([n.e(3120),n.e(2978),n.e(275),n.e(8020),n.e(7365),n.e(2087),n.e(7247),n.e(7867),n.e(6128),n.e(8760),n.e(5049),n.e(670),n.e(6803)]).then(n.bind(n,62832))),L=r.lazy(()=>Promise.all([n.e(2978),n.e(8020),n.e(8520)]).then(n.bind(n,78520)));function D({community:e}){var t,n;const i=(0,c.G)(e=>e.auth),a=(r.useRef(!1),r.useRef("")),s=`${null==e?void 0:e.id}-${null==i||null===(t=i.preferences)||void 0===t?void 0:t.themeChoice}`;if(e&&i){getComputedStyle(document.body).getPropertyValue("--theme-dark-primary-color")&&s!==a.current&&(a.current=s,B(i))}if(!e)return(0,g.jsx)(g.Fragment,{});const o=v.C.replace(/\/socket\.io\/?$/,"")+"/theme/"+e.id+"/style.css",u=`${e.id}-${null!==(n=e.updatedAt)&&void 0!==n?n:""}`;return(0,g.jsx)("link",{rel:"stylesheet",href:o,onLoad:e=>{B(i);try{const t=JSON.parse(localStorage.getItem("pensil.theme.cache"));(null==t?void 0:t.cacheKey)!==u&&fetch(e.target.href).then(e=>e.text()).then(e=>{localStorage.setItem("pensil.theme.cache",JSON.stringify({cacheKey:u,css:e}))}).catch(()=>{})}catch(e){}}})}function B(e){var t,n,r,i=getComputedStyle(document.body);const a=i.getPropertyValue("--theme-background-color"),s="dark"===(null==e||null===(t=e.preferences)||void 0===t?void 0:t.themeChoice)?i.getPropertyValue("--theme-dark-primary-color"):i.getPropertyValue("--theme-primary-color"),o="dark"===(null==e||null===(n=e.preferences)||void 0===n?void 0:n.themeChoice)?i.getPropertyValue("--theme-dark-on-primary-color"):i.getPropertyValue("--theme-on-primary-color");let c;var u;["dark","light"].includes(null==e||null===(r=e.preferences)||void 0===r?void 0:r.themeChoice)?c="dark"===(null==e||null===(u=e.preferences)||void 0===u?void 0:u.themeChoice):c="#141519"===a;const d=x(s),l=x(o),m=d.l,_=d.h,p=d.s,h=m+50>=100?m+40>=100?m+30>=100?m+20>=100?m+10>=100?m:m+5:m+10:m+20:m+30:m+40,g=`\n :root {\n --primary: ${d.h+"deg,"+d.s+"%,"+d.l+"%, 100%"};\n --primary-light: ${_+"deg ,"+p+"%,"+h+"%, 100%"};\n --primary-foreground: ${l.h+"deg,"+l.s+"%,"+l.l+"%, 100%"};\n }\n `;let y=document.getElementById("stocomo-dynamic-theme");y||(y=document.createElement("style"),y.id="stocomo-dynamic-theme",document.head.appendChild(y)),y.textContent=g,localStorage.setItem("pensil.theme",c?"dark":"light"),document.documentElement.classList.toggle("dark",c)}const w=(0,i.Ng)(e=>({user:e.auth,community:e.community}),e=>(0,a.zH)({setCommunity:_.Km,setCommunityPac:C.c,setUser:P.jw,updateGroupsByIds:M.tg},e))(function({user:e,community:t,setUser:i,setCommunity:a,setCommunityPac:m,updateGroupsByIds:_}){const[h,v]=(0,r.useState)(!1),[P,C]=(0,r.useState)(!1),[M,x]=(0,r.useState)(!1),B=(0,r.useRef)(!1),{analyticsService:w}=(0,u.W)(),[S,j]=((0,c.G)(e=>e.groups),(0,r.useState)(!1)),[U,N]=(0,r.useState)(!1),[R,z]=(0,r.useState)(!1),$=window.location.hostname.split(".")[0],W=window.location.port,Z=new URLSearchParams(window.location.search),K=Z.get("redirect"),F=Z.get("token"),q=Z.get("auth_token"),G=Z.get("access_token"),V=Z.get("action"),[H,Y]=(0,r.useState)(!1),[J,Q]=(0,r.useState)(window.location.pathname);d(t);const X="stocomo-community",ee="pensil.community.cache";(0,r.useEffect)(()=>{if(X&&!B.current){B.current=!0;try{const e=JSON.parse(localStorage.getItem(ee));if(e&&e.domain===X&&e.community&&Date.now()-e.cachedAt<3e5)return a(e.community),e.community.pac&&m(e.community.pac),C(!0),void v(!1)}catch(e){}v(!0),E.B.getCommunity(X).then(t=>{a(t.community),t.community.pac&&m(t.community.pac);try{localStorage.setItem(ee,JSON.stringify({domain:X,community:t.community,cachedAt:Date.now()}))}catch(e){}w.track("load-community",{userType:null==e?void 0:e.role,communityPlan:t.community.plan?t.community.plan.planType:"free"})}).then(()=>{C(!0),v(!1)}).catch(e=>{setTimeout(()=>{E.B.getCommunity(X).then(e=>{a(e.community),e.community.pac&&m(e.community.pac);try{localStorage.setItem(ee,JSON.stringify({domain:X,community:e.community,cachedAt:Date.now()}))}catch(e){}C(!0),v(!1)}).catch(e=>{C(!0),v(!1),x(!0)})},2e3)})}},[X]),(0,r.useEffect)(()=>{t&&t.needsAdminVerification&&(!e||S||R||U||(N(!0),k.D.getUserProfile({token:e.token}).then(({user:n})=>{localStorage.setItem("pensil.user",JSON.stringify({...n,token:e.token,email:e.email?e.email:n.email,mobile:e.mobile?e.mobile:n.mobile})),Array.isArray(n.adminVerifiedCommunities)&&n.adminVerifiedCommunities.includes(t.id)&&j(!0),z(!0),N(!1),i({...n,token:e.token,email:e.email?e.email:n.email,mobile:e.mobile?e.mobile:n.mobile})}).catch(e=>{z(!0),N(!1),p.A.checkIfBlocked(e)})))},[t,e,S,R,U]),(0,r.useEffect)(()=>{const e=b.b.listen((e,t)=>{Q(window.location.pathname)});return()=>{e()}},[]);const te=null==t?void 0:t.authRedirectUrl,ne=null==t?void 0:t.id;(0,r.useEffect)(()=>{te&&(q||G)&&!F&&(Y(!0),E.B.verifyThirdPartyToken(ne,null!=q?q:G).then(({user:e})=>{localStorage.setItem("pensil.user",JSON.stringify(e)),i(e);const t=window.location.origin+window.location.pathname+(V?"?action="+V:"");window.history.replaceState({},"",t)}).catch(e=>{Y(!1)}))},[te,ne,q,G,V,F]),(0,r.useEffect)(()=>{F&&ae()},[F]);const re=null==e?void 0:e.id,ie=null==e?void 0:e.walletAddress;(0,r.useEffect)(()=>{re&&ne&&ie&&async function(e){try{const{NFTService:t}=await Promise.resolve().then(n.bind(n,24968)),{accessibleGroupIds:r}=await t.checkForGatedGroupAccess(e);await _(r,{myRole:"user",joinStatus:"joined"},e=>"admin"!==(null==e?void 0:e.myRole))}catch(e){}}(ne)},[re,ne,ie]);const ae=()=>{k.D.getUserProfile({token:F}).then(({user:e})=>{localStorage.setItem("pensil.user",JSON.stringify({...e,token:F})),i({...e,token:F});const t=window.location.origin+window.location.pathname+(V?"?action="+V:"");window.history.replaceState({},"",t)}).catch(e=>{p.A.checkIfBlocked(e)})};if(K&&e)return["google-login","facebook-login"].includes(V)?(localStorage.clear("pensil.user"),A.r.reset(),window.location.reload(),(0,g.jsx)("div",{children:"Redirecting..."})):(window.location.href=K+"?token="+e.token+"&action=autosub",(0,g.jsx)("div",{children:"Redirecting..."}));if("embed"===$)return(0,g.jsx)(r.Suspense,{fallback:(0,g.jsx)(f.A,{}),children:(0,g.jsx)(I,{})});if("localhost"===window.location.hostname||"app"===$&&"app.pensil.com"===window.location.hostname)return K&&"logout"===V?(localStorage.clear("pensil.user"),A.r.reset(),window.location.href=K,(0,g.jsx)("div",{children:"Redirecting..."})):h||!P||H||M?(0,g.jsxs)("div",{className:"flex h-screen flex-col bg-background text-secondary-foreground/90",children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)("div",{className:"flex h-12 w-full items-center border-b border-border bg-card px-4",children:(0,g.jsx)("span",{className:"text-lg font-semibold text-secondary-foreground",children:"StoCoMo"})}),(0,g.jsx)("div",{className:"flex flex-1 flex-col items-center justify-center",children:M?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("span",{className:"mb-3 text-gray-500",children:"Something went wrong. Please try again in a moment."}),(0,g.jsx)("button",{className:"rounded bg-primary px-4 py-2 text-sm text-primary-foreground",onClick:()=>window.location.reload(),children:"Reload"})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(f.A,{}),(0,g.jsx)("span",{className:"text-gray-500",children:"Please wait while we are loading data..."})]})})]}):(0,g.jsxs)("div",{className:"App",children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)(r.Suspense,{fallback:(0,g.jsx)(f.A,{}),children:!J.startsWith("/login")&&!J.startsWith("/register")||e?(0,g.jsx)(s.$M,{children:(0,g.jsx)(T,{user:e,community:t})}):(0,g.jsx)(L,{})}),(0,g.jsx)(o.q5,{})]});if("logout"===V)return localStorage.clear("pensil.user"),A.r.reset(),window.location.href=window.location.origin,(0,g.jsx)("div",{children:"Logging out..."});if(h||!P||H||M)return(0,g.jsxs)("div",{className:"flex h-screen flex-col bg-background text-secondary-foreground/90",children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)("div",{className:"flex h-12 w-full items-center border-b border-border bg-card px-4",children:(0,g.jsx)("span",{className:"text-lg font-semibold text-secondary-foreground",children:"StoCoMo"})}),(0,g.jsx)("div",{className:"flex flex-1 flex-col items-center justify-center",children:M?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("span",{className:"mb-3 text-gray-500",children:"Something went wrong. Please try again in a moment."}),(0,g.jsx)("button",{className:"rounded bg-primary px-4 py-2 text-sm text-primary-foreground",onClick:()=>window.location.reload(),children:"Reload"})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(f.A,{}),(0,g.jsx)("span",{className:"text-gray-500",children:"Please wait while we are loading data..."})]})})]});if(!t)return(0,g.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center bg-background text-secondary-foreground/90",children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)("span",{className:"mb-2 text-gray-500",children:"It seems like this community is not available."}),(0,g.jsx)("a",{className:"text-primary",target:"_blank",rel:"noopener noreferrer",href:"http://app.pensil.com"+(W?":"+W:"")+"/create-community",children:"Create your own"})]});if(F)return(0,g.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center bg-background text-secondary-foreground/90",children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)("div",{className:"my-2",children:(0,g.jsx)(f.A,{})}),(0,g.jsx)("span",{className:"text-gray-500",children:"Please wait while we are loading data..."})]});if(e)F&&(window.location.href=window.location.origin+"?action="+V);else{if(t&&t.authRedirectUrl&&(q||G))return(0,g.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center bg-background text-secondary-foreground/90",children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)("div",{className:"my-2",children:(0,g.jsx)(f.A,{})}),(0,g.jsx)("span",{className:"text-gray-500",children:"Please wait while we are loading data..."})]});if(F)return(0,g.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center bg-background text-secondary-foreground/90",children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)("div",{className:"my-2",children:(0,g.jsx)(f.A,{})}),(0,g.jsx)("span",{className:"text-gray-500",children:"Please wait while we are loading data..."})]})}return!t.needsAdminVerification||!U&&R?t.needsAdminVerification&&!t.joinVerifiedByAdmin&&"admin"!==t.myRole?e?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)(y,{})]}):(0,g.jsxs)(r.Suspense,{fallback:(0,g.jsx)(f.A,{}),children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)(L,{})]}):t.isLoginRequired&&!e?(0,g.jsxs)(r.Suspense,{fallback:(0,g.jsx)(f.A,{}),children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)(L,{})]}):!e||!t.isMobileAndEmailVerificationRequired||e.email&&e.mobile||"admin"===t.myRole?(0,g.jsxs)("div",{className:"App bg-background text-secondary-foreground/80",children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)(r.Suspense,{fallback:(0,g.jsx)(f.A,{}),children:!J.startsWith("/login")&&!J.startsWith("/register")||e?(0,g.jsxs)(s.$M,{children:[" ",(0,g.jsx)(T,{user:e,community:t})]}):(0,g.jsx)(L,{})}),(0,g.jsx)(o.q5,{})]}):(0,g.jsxs)(r.Suspense,{fallback:(0,g.jsx)(l.a,{}),children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)(O,{user:e,community:t})]}):e?(0,g.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center bg-background text-secondary-foreground/90",children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)("div",{className:"my-2",children:(0,g.jsx)(f.A,{})}),(0,g.jsx)("span",{className:"text-gray-500",children:"Please wait while we are checking for admin verification..."})]}):(0,g.jsxs)(r.Suspense,{fallback:(0,g.jsx)(f.A,{}),children:[(0,g.jsx)(D,{community:t}),(0,g.jsx)(L,{})]})})},53871(e,t,n){var r=n(62391);const i=function({children:e}){return e&&null!==e||null!=e?e:(0,r.jsx)(r.Fragment,{})};n.d(t,["A",0,i])},4201(e,t,n){n.d(t,{Z:()=>s});var r=n(72783),i=n.n(r),a=n(62391);function s({children:e,padding:t=!0,className:n="",style:r={},onClick:s=e=>{}}){return(0,a.jsx)("div",{onClick:s,style:r,className:i()("Card rounded bg-background shadow "+n,{"p-4":t}),children:e})}},54479(e,t,n){n.d(t,{A:()=>a});var r=n(20975),i=n(62391);class a extends r.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100vh",backgroundColor:"var(--background, #fff)",color:"var(--secondary-foreground, #374151)"},children:[(0,i.jsx)("div",{style:{display:"flex",alignItems:"center",height:"48px",padding:"0 16px",borderBottom:"1px solid var(--border, #e5e7eb)",backgroundColor:"var(--card, #fff)"},children:(0,i.jsx)("span",{style:{fontSize:"18px",fontWeight:"600"},children:"StoCoMo"})}),(0,i.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"12px"},children:[(0,i.jsx)("span",{style:{color:"#6b7280"},children:"Something went wrong. Please try again in a moment."}),(0,i.jsx)("button",{onClick:()=>window.location.reload(),style:{padding:"8px 16px",borderRadius:"6px",border:"none",backgroundColor:"#2563eb",color:"#ffffff",fontSize:"14px",fontWeight:"500",cursor:"pointer"},children:"Reload"})]})]}):this.props.children}}},32679(e,t,n){n.d(t,{S:()=>i});var r=n(62391);function i({error:e="",textCenter:t=!1}){return(0,r.jsx)("div",{className:"text-sm text-alert "+(t?"text-center":""),children:e})}},5673(e,t,n){n.d(t,{g:()=>i});var r=n(62391);function i({success:e=!1,minimal:t=!1}){return(0,r.jsx)("div",{className:"Tick "+(e?"success":"")+(t?"minimal":"")})}},71986(e,t,n){n.d(t,{j:()=>o});var r=n(72783),i=n.n(r),a=n(53871),s=n(62391);function o({error:e,padding0:t=!1}){return e?(0,s.jsx)("span",{className:i()("FormError text-xs text-alert",{"px-2":!t&&e}),children:(0,s.jsx)(a.A,{children:e})}):null}},19328(e,t,n){n.d(t,{a:()=>s});var r=n(62391);const i={padding:"2px"},a=(e,t,n,r)=>({content:" ",display:"block",background:0,borderRadius:"50%",width:`${n}px`,height:`${n}px`,margin:0,boxSizing:"border-box",border:`${r}px solid #fff`,borderColor:e?"white transparent white transparent":`${t} transparent ${t} transparent`});function s({white:e=!1,spinnerColor:t="var(--theme-primary-color)",size:n=24,stroke:s=2}){return(0,r.jsx)("div",{className:"Loader flex justify-center",style:i,children:(0,r.jsx)("div",{className:"spinner",style:a(e,t,n,s)})})}},55854(e,t,n){n.d(t,{A:()=>i});var r=n(62391);function i(){return(0,r.jsx)("div",{id:"loader",className:"firstLoader",children:(0,r.jsx)("div",{className:"preloader",children:(0,r.jsx)("div",{className:"preloader-spin"})})})}},91900(e,t,n){n.d(t,{a:()=>o});var r=n(72783),i=n.n(r),a=n(4201),s=n(62391);function o({children:e,className:t="",isModalFullScreen:n=!1,width:r="540px",height:o="",padding:c=!0,active:u=!1,isDismissible:d=!0,overflow:l="overflow-hidden",setActive:m=e=>{},..._}){return(0,s.jsx)("div",{onClick:e=>{m(!u||!d)},onKeyUp:e=>{"Escape"===e.key&&m(!1)},className:i()("Modal backdrop-blur-sm"+t,{active:u}),..._,children:(0,s.jsx)(a.Z,{onClick:e=>{u&&e.stopPropagation()},padding:c,className:t,style:{maxWidth:r,margin:n&&"0px"},children:e})})}},82256(__unused_webpack_module,__webpack_exports__,__webpack_require__){var classnames__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(72783),classnames__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__),lodash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(31012),lodash__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(20975),react_redux__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(31305),redux__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(82993),remarkable__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(34067),turndown__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(71214),_contexts_toastr_context__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(89449),_hooks_use_app_service__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(65186),_assets_vectors_behance_svg__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(67787),_assets_vectors_dribbble_svg__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(55227),_assets_vectors_facebook_svg__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(64125),_assets_vectors_globe_icon_svg__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(16442),_assets_vectors_instagram_svg__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(71703),_assets_vectors_linkedin_svg__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(89859),_assets_vectors_pinterest_svg__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(86285),_assets_vectors_twitter_svg__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(38298),_assets_vectors_youtube_svg__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(92704),_config_constants_config__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(50963),_constants_mediaType__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(83789),_service__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(24968),_service_analytics_service__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(87573),_store_actions_auth_actions__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(77255),_utils_main_util__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(31696),_activity_close_button_component__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(63360),_atoms_i18__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(53871),_button_component__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(3005),_error_component__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(32679),_form_controls_file_input__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(69302),_form_controls_tick_component__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(5673),_icon_button_2_component__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(90559),_image_crop_image_crop_modal__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(32845),_loader_component__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(19328),_molecule_listview_component__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(84003),_text_input_component__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(54617),_uicon_component__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(62144),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(62391);const RichTextEditor=react__WEBPACK_IMPORTED_MODULE_2__.lazy(()=>Promise.all([__webpack_require__.e(3120),__webpack_require__.e(2978),__webpack_require__.e(275),__webpack_require__.e(8020),__webpack_require__.e(7365),__webpack_require__.e(2087),__webpack_require__.e(7247),__webpack_require__.e(8760),__webpack_require__.e(5049),__webpack_require__.e(4359)]).then(__webpack_require__.bind(__webpack_require__,94503))),tds=new turndown__WEBPACK_IMPORTED_MODULE_6__.A;function ProfileUpdateComponent({user,community,setUser,visible=!1,isFullScreen=!0,setVisible=e=>{},addToast=e=>{}}){const isUserNotNew="New User"!==(null==user?void 0:user.name),{analyticsService}=(0,_hooks_use_app_service__WEBPACK_IMPORTED_MODULE_8__.W)(),[isFormSubmittable,setIsFormSubmittable]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(!!isUserNotNew),[name,setName]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[shortBio,setShortBio]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[userId,setUserId]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[bio,setBio]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[instagramLink,setInstagramLink]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[linkedinLink,setLinkedinLink]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[youtubeLink,setYoutubeLink]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[twitterLink,setTwitterLink]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[facebookLink,setFacebookLink]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[pintrestLink,setPintrestLink]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[dribbbleLink,setDribbbleLink]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[behanceLink,setBehanceLink]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[webLink,setWebsiteLink]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[picture,setPicture]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[errorMessage,setErrorMessage]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(""),[isLoading,setIsLoading]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(!1),[isCheckingForAvailability,setIsCheckingForAvailability]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(!1),[userIdAvailable,setUserIdAvailable]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(!0),[fetchingUserProfile,setFetchingUserProfile]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(!1),[isSocialDropdownVisible,setIsSocialDropdownVisible]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(!1),[defaultSocialMedia,setDefaultSocialMedia]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)([]),[isUpdateProfileDisabled,setIsUpdateProfileDisabled]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(!1),md=new remarkable__WEBPACK_IMPORTED_MODULE_5__.F,[customSocialMedia,setCustomSocialMedia]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)([{name:"Instagram",icon:_assets_vectors_instagram_svg__WEBPACK_IMPORTED_MODULE_13__.A,isAvailable:!1,setValue:"instagramLink"},{name:"Linkedin",icon:_assets_vectors_linkedin_svg__WEBPACK_IMPORTED_MODULE_14__.A,isAvailable:!1,setValue:"linkedinLink"},{name:"Youtube",icon:_assets_vectors_youtube_svg__WEBPACK_IMPORTED_MODULE_17__.A,isAvailable:!1,setValue:"youtubeLink"},{name:"Twitter",icon:_assets_vectors_twitter_svg__WEBPACK_IMPORTED_MODULE_16__.A,isAvailable:!1,setValue:"twitterLink"},{name:"Facebook",icon:_assets_vectors_facebook_svg__WEBPACK_IMPORTED_MODULE_11__.A,isAvailable:!1,setValue:"facebookLink"},{name:"Pintrest",icon:_assets_vectors_pinterest_svg__WEBPACK_IMPORTED_MODULE_15__.A,isAvailable:!1,setValue:"pintrestLink"},{name:"Dribbble",icon:_assets_vectors_dribbble_svg__WEBPACK_IMPORTED_MODULE_10__.A,isAvailable:!1,setValue:"dribbbleLink"},{name:"Behance",icon:_assets_vectors_behance_svg__WEBPACK_IMPORTED_MODULE_9__.A,isAvailable:!1,setValue:"behanceLink"},{name:"Website",icon:_assets_vectors_globe_icon_svg__WEBPACK_IMPORTED_MODULE_12__.A,isAvailable:!1,setValue:"webLink"}]),setIsProfileUpdateDisabledForUsers=async()=>{var e;if(null==community||!community.id)return;const t=await _service__WEBPACK_IMPORTED_MODULE_20__.BE.getConfigurable(community.id,_config_constants_config__WEBPACK_IMPORTED_MODULE_18__.A.COMMUNITY_PREVENT_USER_PROFILE_UPDATE);setIsUpdateProfileDisabled("true"===(null==t||null===(e=t.configurable)||void 0===e?void 0:e.configurableValue))};(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(()=>{if(!isSocialDropdownVisible)return;const e=e=>{setIsSocialDropdownVisible(!0)};return window.document.body.addEventListener("click",e),()=>{window.document.body.removeEventListener("click",e)}},[isSocialDropdownVisible]),(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(()=>{(isUserNotNew||visible)&&(setFetchingUserProfile(!0),_service__WEBPACK_IMPORTED_MODULE_20__.DL.getUserProfile(user).then(({user:e})=>{const t={...e,token:user.token,email:e.email,mobile:e.mobile};setUser(t),localStorage.setItem("pensil.user",JSON.stringify(t)),setFetchingUserProfile(!1)}).catch(e=>{setFetchingUserProfile(!1),setErrorMessage(e.message),_utils_main_util__WEBPACK_IMPORTED_MODULE_23__.A.checkIfBlocked(e)}),setIsProfileUpdateDisabledForUsers())},[isUserNotNew,visible,null==community?void 0:community.id]),(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(()=>{setName(isUserNotNew?user.name:""),setShortBio(isUserNotNew?user.shortBio:""),setUserId(user.userId?user.userId:""),setUserIdAvailable(user.userId),setBio(user.bio?md.render(user.bio):""),setPicture(user.picture),setInstagramLink(user.instagramLink?user.instagramLink:""),setLinkedinLink(user.linkedinLink?user.linkedinLink:""),setYoutubeLink(user.youtubeLink?user.youtubeLink:""),setTwitterLink(user.twitterLink?user.twitterLink:""),setFacebookLink(user.facebookLink?user.facebookLink:""),setPintrestLink(user.pintrestLink?user.pintrestLink:""),setDribbbleLink(user.dribbbleLink?user.dribbbleLink:""),setBehanceLink(user.behanceLink?user.behanceLink:""),setWebsiteLink(user.webLink?user.webLink:""),updateSocial()},[user,isUserNotNew,visible]);const updateSocial=()=>{if(customSocialMedia.forEach(element=>{eval(element.setValue).length>=1&&!element.isAvailable?(element.isAvailable=!0,setDefaultSocialMedia([...defaultSocialMedia,element])):eval(element.setValue).length<=0&&element.isAvailable&&(element.isAvailable=!1,setDefaultSocialMedia([...defaultSocialMedia,element]))}),customSocialMedia.length>0){let e=customSocialMedia.filter(e=>e.isAvailable);setDefaultSocialMedia(e)}},checkForAddressAvailability=(0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)((0,lodash__WEBPACK_IMPORTED_MODULE_1__.debounce)(e=>{/^[A-Za-z0-9_.]{3,63}$/.test(e)&&(setIsCheckingForAvailability(!0),_service__WEBPACK_IMPORTED_MODULE_20__.DL.checkForUserIdAvailability(e,user).then(({userIdAvailable:e})=>{setUserIdAvailable(e),setIsCheckingForAvailability(!1)}).catch(e=>{setUserIdAvailable(!1),setIsCheckingForAvailability(!1)}))},1e3),[]);return isUserNotNew&&!visible?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.Fragment,{}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:classnames__WEBPACK_IMPORTED_MODULE_0___default()("ProfileUpdate bg-card",{"flex items-center justify-center overflow-scroll":isFullScreen}),style:{position:isFullScreen?"fixed":"",top:0,bottom:0,left:0,right:0,zIndex:900},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"flex items-center justify-center",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"w-96 p-4 sm:p-0",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsxs)("div",{className:"py-6",children:[isUserNotNew?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.Fragment,{children:isFullScreen&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"flex justify-end",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_icon_button_2_component__WEBPACK_IMPORTED_MODULE_30__.A,{hoverable:!0,icon:"cross",size:"md",onClick:()=>{setVisible(!1)}})})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"flex justify-center text-lg font-semibold text-secondary-foreground/85",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_atoms_i18__WEBPACK_IMPORTED_MODULE_25__.A,{children:"Hi, tell us a little bit about yourself?"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(PictureUpdate,{picture,setPicture,isUserNotNew,name}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"mt-4 font-semibold text-secondary-foreground/85",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("span",{children:"Your name"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_text_input_component__WEBPACK_IMPORTED_MODULE_34__.k,{placeholder:"Name",validator:e=>e.length<2?(setIsFormSubmittable(!1),"Name invalid!"):e.length>50?(setIsFormSubmittable(!1),"Name should be less than 50 characters"):void setIsFormSubmittable(!0),defaultValue:name,noBorder:!0,className:"mb-1 border border-border bg-background py-2 focus:outline-none",onChange:e=>{setName(e)},disabled:isUserNotNew&&isUpdateProfileDisabled&&!("admin"===community.myRole)}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsxs)("div",{className:"mt-4 flex items-end gap-2",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("span",{className:"font-semibold text-secondary-foreground/85",children:"Subtitle"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("span",{className:"text-xxs font-normal text-secondary-foreground/80",children:"(Max char 60)"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_text_input_component__WEBPACK_IMPORTED_MODULE_34__.k,{placeholder:"Subtitle",validator:e=>e.length<2?(setIsFormSubmittable(!1),"Subtitle should be more than 2 characters"):e.length>60?(setIsFormSubmittable(!1),"Subtitle should be less than 60 characters"):void setIsFormSubmittable(!0),defaultValue:shortBio,noBorder:!0,className:"mb-1 border border-border bg-background py-2 focus:outline-none",onChange:e=>{setShortBio(e)}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsxs)("div",{className:"mt-4 flex items-center font-semibold text-secondary-foreground/85",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("span",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_atoms_i18__WEBPACK_IMPORTED_MODULE_25__.A,{children:"User Id"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"ml-4 flex items-center",children:isCheckingForAvailability?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_loader_component__WEBPACK_IMPORTED_MODULE_32__.a,{}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("span",{className:"py-1",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_form_controls_tick_component__WEBPACK_IMPORTED_MODULE_29__.g,{success:userIdAvailable})})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_text_input_component__WEBPACK_IMPORTED_MODULE_34__.k,{placeholder:"User Id (Username)",validator:e=>{if(e.length<5)return setIsFormSubmittable(!1),"User id invalid!";setIsFormSubmittable(!0)},noBorder:!0,defaultValue:userId,className:"border border-border bg-background py-2 focus:outline-none",inputHolderClassName:classnames__WEBPACK_IMPORTED_MODULE_0___default()({" border-red-500":!userIdAvailable," border-green-500":userIdAvailable}),onChange:e=>{setUserId(e),e.length>2?isCheckingForAvailability||setIsCheckingForAvailability(!0):setIsCheckingForAvailability(!1),checkForAddressAvailability(e)},disabled:isUserNotNew&&isUpdateProfileDisabled&&!("admin"===community.myRole)}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"mt-4 font-semibold text-secondary-foreground/85",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_atoms_i18__WEBPACK_IMPORTED_MODULE_25__.A,{children:"Short Bio"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(react__WEBPACK_IMPORTED_MODULE_2__.Suspense,{fallback:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.Fragment,{}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(RichTextEditor,{text:bio,setText:setBio,uploadImage:!1,insertTable:!1,className:"bg-background"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsxs)("div",{className:"mb-1 mt-4 font-semibold text-secondary-foreground/85",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_atoms_i18__WEBPACK_IMPORTED_MODULE_25__.A,{children:"Link your social account"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"text-xs text-secondary-foreground/70",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_atoms_i18__WEBPACK_IMPORTED_MODULE_25__.A,{children:"This will be displayed on your profile"})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsxs)("div",{style:{position:"relative"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"text-primary",onClick:()=>{defaultSocialMedia.length<9&&setIsSocialDropdownVisible(!isSocialDropdownVisible)},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("span",{className:"cursor-pointer",children:"+ Add social handles"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:isSocialDropdownVisible?"dropdown visible relative left-0 my-2 w-1/2 border border-border bg-card py-2 shadow":"dropdown my-2 hidden w-1/2 bg-background py-2 shadow-lg",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_molecule_listview_component__WEBPACK_IMPORTED_MODULE_33__.u,{items:customSocialMedia,renderItem:(e,t)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsxs)("div",{className:classnames__WEBPACK_IMPORTED_MODULE_0___default()("dropdown-button flex cursor-pointer items-center p-1 text-secondary-foreground/90 hover:bg-background transition-transform duration-300 ease-in-out hover:scale-105"),onClick:()=>{e.isAvailable=!e.isAvailable,setDefaultSocialMedia([...defaultSocialMedia,e]),setIsSocialDropdownVisible(!isSocialDropdownVisible)},style:{display:e.isAvailable?"none":"flex"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"flex-shrink-0",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("img",{loading:"lazy",src:e.icon,className:"ml-2",width:"25",alt:""})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"px-2",children:e.name})]},t)})})]}),defaultSocialMedia.map((dfs,index)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_text_input_component__WEBPACK_IMPORTED_MODULE_34__.k,{prefix:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("img",{loading:"lazy",src:dfs.icon,className:"ml-2",width:"25",alt:""}),noPrefixSeparator:!0,postfix:eval(`${dfs.setValue}`)&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_activity_close_button_component__WEBPACK_IMPORTED_MODULE_24__.J,{size:"sm",className:"mr-1",onClick:()=>{eval(`set${dfs.name}Link("")`)}}),placeholder:`${dfs.name} Url`,noBorder:!0,validator:e=>{if(!e.startsWith("http://")&&!e.startsWith("https://")&&0!==e.length)return setIsFormSubmittable(!1),`${dfs.name} Url invalid!`;setIsFormSubmittable(!0)},validationOutsideBox:!0,noMargin:!0,defaultValue:eval(`${dfs.setValue}`),containerClassName:"py-2 focus:outline-none border border-border bg-background rounded mt-4",onChange:value=>{let functionName=`set${dfs.name}Link("${value}")`;0==value.length&&(dfs.isAvailable=!1),eval(functionName)}},index)})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"mt-4",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_button_component__WEBPACK_IMPORTED_MODULE_26__.$,{disabled:!isFormSubmittable,className:"w-full items-center py-2",onClick:async()=>{setIsLoading(!0);const e=await bio.replace(/(?:
^\[^\]]+)(?:"><\/oembed><\/figure>)/g," $1 ");let t=await tds.turndown(e);_service__WEBPACK_IMPORTED_MODULE_20__.DL.updateProfile(user,{name,shortBio,userId,bio:t,instagramLink,linkedinLink,youtubeLink,twitterLink,facebookLink,pintrestLink,dribbbleLink,behanceLink,webLink}).then(e=>{picture&&"string"==typeof picture&&picture.startsWith("http")?(setIsLoading(!1),setUser({...user,name,bio,shortBio,instagramLink,linkedinLink,youtubeLink,twitterLink,facebookLink,pintrestLink,dribbbleLink,behanceLink,webLink}),localStorage.setItem("pensil.user",JSON.stringify({...user,name})),isUserNotNew&&setVisible(!1),addToast("Profile Updated!"),isUserNotNew||_service_analytics_service__WEBPACK_IMPORTED_MODULE_21__.A.logEvent(_service_analytics_service__WEBPACK_IMPORTED_MODULE_21__.B.User.name,_service_analytics_service__WEBPACK_IMPORTED_MODULE_21__.B.User.create)):picture?_service__WEBPACK_IMPORTED_MODULE_20__.DL.updatePicture(user,picture).then(e=>{setIsLoading(!1),setUser({...user,name,bio,shortBio}),localStorage.setItem("pensil.user",JSON.stringify({...user,name,picture:e.user.picture})),isUserNotNew&&setVisible(!1),analyticsService.track("profile-details",{profilePic:picture,bio,name,socialhandles:JSON.stringify({instagramLink,linkedinLink,youtubeLink,twitterLink,facebookLink,pintrestLink,dribbbleLink,behanceLink})})}).catch(e=>{e&&e.response&&e.response.data.message&&setErrorMessage(e.response.data.errors.file[0]),setIsLoading(!1),analyticsService.track("profile-details",{profilePic:picture,bio,socialhandles:JSON.stringify({instagramLink,linkedinLink,youtubeLink,twitterLink,facebookLink,pintrestLink,dribbbleLink,behanceLink})})}):_service__WEBPACK_IMPORTED_MODULE_20__.DL.deleteProfilePicture(user).then(e=>{setIsLoading(!1),setUser({...user,name,bio,shortBio}),setPicture(e.user.picture),localStorage.setItem("pensil.user",JSON.stringify({...user,name,picture:e.user.picture})),window.location.reload()}).catch(e=>{})}).catch(e=>{e&&e.response&&e.response.data.message&&(e.response.data.errors.name&&setErrorMessage(e.response.data.errors.name[0]),e.response.data.errors.userId&&(setErrorMessage(e.response.data.errors.userId[0]),setUserIdAvailable(!1))),setIsLoading(!1)})},isLoading,label:isUserNotNew?"Update":"Proceed"})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_error_component__WEBPACK_IMPORTED_MODULE_27__.S,{error:errorMessage})]})})})})})}const ProfileUpdate=(0,_contexts_toastr_context__WEBPACK_IMPORTED_MODULE_7__.wj)((0,react_redux__WEBPACK_IMPORTED_MODULE_3__.Ng)(e=>({user:e.auth,community:e.community}),e=>(0,redux__WEBPACK_IMPORTED_MODULE_4__.zH)({setUser:_store_actions_auth_actions__WEBPACK_IMPORTED_MODULE_22__.jw},e))(ProfileUpdateComponent));function PictureUpdate({picture:e=null,setPicture:t=()=>{},name:n,isUserNotNew:r}){const[i,a]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(!1),[s,o]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(null);let c="";try{c=e&&"string"==typeof e&&e.startsWith("http")?e:URL.createObjectURL(e)}catch(t){c=e}const u=async e=>{if(e){let t=await URL.createObjectURL(e);o(t)}else o(null);a(!0)};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsxs)("div",{className:"PictureUpdate",children:[s&&i&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_image_crop_image_crop_modal__WEBPACK_IMPORTED_MODULE_31__.A,{src:s,setPicture:e=>{t(e)},activeCrop:i,setActiveCrop:a,aspectRatio:1,cropRatioMessage:"Picture ratio - 1:1"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsxs)("div",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{onClick:()=>t(_constants_mediaType__WEBPACK_IMPORTED_MODULE_19__.G+n),children:r&&!("string"==typeof e&&"string"==typeof c)&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"flex flex-col items-end",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_uicon_component__WEBPACK_IMPORTED_MODULE_35__.A,{icon:"cross",size:"xs",className:"text-secondary-foreground"})})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_form_controls_file_input__WEBPACK_IMPORTED_MODULE_28__.z,{accept:"image/*",onChange:u,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"preview-control "+(r?"":"flex place-content-center items-center border border-border"),children:!r&&c.includes("seed")?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_uicon_component__WEBPACK_IMPORTED_MODULE_35__.A,{icon:"user",size:"3xl",className:"text-secondary-foreground"}):r&&"string"==typeof e&&"string"==typeof c?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("img",{loading:"lazy",className:"h-full w-full",src:e,alt:""}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("img",{loading:"lazy",src:c,alt:""})})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)(_form_controls_file_input__WEBPACK_IMPORTED_MODULE_28__.z,{accept:"image/*",onChange:u,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_36__.jsx)("div",{className:"pt-2 text-center text-sm font-semibold text-primary",children:"Set Profile Picture"})})]})]})}__webpack_require__.d(__webpack_exports__,["R",0,ProfileUpdate])},64373(e,t,n){var r=n(62391);const i=function(){return(0,r.jsx)("div",{className:"Header h-12 w-screen animate-pulse border-b border-border bg-card md:w-auto",children:(0,r.jsxs)("div",{className:"header-container h-12 px-3 md:px-6",children:[(0,r.jsxs)("div",{className:"flex h-12 items-center space-x-2",children:[(0,r.jsx)("p",{className:"h-10 w-10 flex-shrink-0 rounded bg-gray-300"}),(0,r.jsx)("p",{className:"h-4 w-12 rounded bg-gray-300"})]}),(0,r.jsxs)("div",{className:"OtherOptions flex place-content-end items-center space-x-2",children:[(0,r.jsx)("p",{className:"h-6 w-6 rounded bg-gray-300"}),(0,r.jsx)("p",{className:"h-6 w-6 rounded bg-gray-300"}),(0,r.jsx)("p",{className:"h-6 w-6 rounded bg-gray-300"}),(0,r.jsx)("p",{className:"h-10 w-10 rounded-full bg-gray-300"})]})]})})};n.d(t,["A",0,i])},23277(e,t,n){n.d(t,{A:()=>i});var r=n(62391);function i(){return(0,r.jsx)("div",{className:"h-screen w-full animate-pulse rounded",children:(0,r.jsx)("div",{className:"flex h-screen w-full flex-col space-y-6 bg-card p-8"})})}},54617(e,t,n){n.d(t,{k:()=>d});var r=n(72783),i=n.n(r),a=n(20975),s=n(62270),o=n(3005),c=n(71986),u=n(62391);function d({name:e="",placeholder:t="",readOnly:n=!1,disabled:r=!1,noBorder:d=!1,inputPattern:l=RegExp(""),prefix:m=null,noPrefixSeparator:_=!1,postfix:p=null,defaultValue:h="",noMargin:g=!1,large:y=!1,type:f="text",minLength:b=0,required:v=!1,inputHolderClassName:A="",containerClassName:E="",className:k="",errors:P=[],validator:C=e=>{},validationOutsideBox:M=!1,onChange:x=e=>{},onFocus:I=e=>{}}){const[O,T]=(0,a.useState)(h),[L,D]=(0,a.useState)(null),B=(0,s.A)();return(0,a.useEffect)(()=>{T(h)},[h]),(0,a.useEffect)(()=>{P&&P.length>0&&D(P[0])},[P]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:(0,o.cn)(i()("TextInput",{"my-3":!g,"w-full":d},E)),children:[(0,u.jsxs)("div",{className:(0,o.cn)(i()("",{"flex items-center rounded border border-border":!d,"flex items-center":d},A)),children:[m?(0,u.jsxs)(u.Fragment,{children:[m," ",_?"":"|"]}):(0,u.jsx)(u.Fragment,{}),(0,u.jsx)("input",{name:e,type:f,disabled:r,minLength:b,onChange:e=>{D(B.trans(C(e.target.value))),l&&!l.test(e.target.value)||T(e.target.value),x(e.target.value)},onFocus:e=>{I(e.target.value)},placeholder:B.trans(t),value:O,readOnly:n,required:v,className:(0,o.cn)(i()("w-full rounded bg-transparent focus:outline-none",{"px-2 py-2":y,"px-2 py-1":!y},k))}),p||(0,u.jsx)(u.Fragment,{})]}),M?(0,u.jsx)(u.Fragment,{}):(0,u.jsx)(c.j,{error:L})]}),M?(0,u.jsx)(c.j,{error:L}):(0,u.jsx)(u.Fragment,{})]})}},50963(e,t,n){const r={COMMUNITY_DEFAULT_COUNTRY_CODE:"COMMUNITY_DEFAULT_COUNTRY_CODE",COMMUNITY_DEFAULT_LANGUAGE:"COMMUNITY_DEFAULT_LANGUAGE",COMMUNITY_DEFAULT_FONT_LINK:"COMMUNITY_DEFAULT_FONT_LINK",COMMUNITY_DEFAULT_FONT_NAME:"COMMUNITY_DEFAULT_FONT_NAME",COMMUNITY_PREVENT_USER_PROFILE_UPDATE:"COMMUNITY_PREVENT_USER_PROFILE_UPDATE",COMMUNITY_POST_TIMER_LIMIT:"COMMUNITY_POST_TIMER_LIMIT",COMMUNITY_REPORT_EMAIL:"COMMUNITY_REPORT_EMAIL",COMMUNITY_SHOW_ONBOARDING_LIST:"COMMUNITY_SHOW_ONBOARDING_LIST"};n.d(t,["A",0,r])},96621(e,t,n){n.d(t,{C:()=>i,P:()=>r});let r="https://stocomoapi.motilaloswal.com/api/",i="https://stocomosocket.motilaloswal.com/socket.io/";["tech.pensil.in","newstudy.pensil.in","aol.pensil.in"].includes(window.location.hostname)&&(r="https://api-server.pensil.in/api/",i="https://socket-server.pensil.in")},16118(e,t,n){n.d(t,{D4:()=>d,IT:()=>i,OT:()=>u,k0:()=>a,m$:()=>c,mZ:()=>o,ut:()=>s});const r=".pensil.com";function i(e){return e.address+r}async function a(e,t,n,r=!0){if(!t||!document.getElementById(t))return new Promise(n=>{const i=document.createElement("script");i.id=t,r?i.src=e:i.innerHTML=e,i.onload=()=>{n(i)},i.onerror=()=>{n(!1)},document.body.appendChild(i)})}function s(){var e;const t=JSON.parse(localStorage.getItem("pensil.user"));return null!==(e=null==t?void 0:t.token)&&void 0!==e?e:null}function o(){var e;const t=JSON.parse(localStorage.getItem("pensil.user"));return null!==(e=null==t?void 0:t.id)&&void 0!==e?e:null}function c(e){return!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}function u(e){let t="/login";if(e&&e.authRedirectUrl){t=e.authRedirectUrl;let n="communityId="+e.id;t=t.includes("?")?t+"&"+n:t+"?"+n}return t}function d(e){window.location.href=u(e)}n.d(t,["pD",0,r])},6292(e,t,n){const r=(0,n(25943).zR)();n.d(t,["b",0,r])},78220(e,t,n){n.d(t,{vZ:()=>X,V2:()=>ne,q7:()=>te,b6:()=>ee.b});var r=n(96621);const i=r.P,a={loginWithOTP:i+"login/otp",loginWithEmailOTP:i+"auth/email/otp",verifyOTP:i+"verify-otp",googleLoginV2:i+"auth/google/v2",facebookLogin:i+"auth/facebook",web3Login:i+"auth/web3"},s=r.P,o={getRemainingMailCount:e=>`${s}/community/${e}/get-remaining-mail-count`},c=r.P,u={create:c+"community",getSubscribedCommunities:c+"community/joined",updateCommunity:e=>c+"community/"+e,updateCommunityWelcomeMessages:e=>c+"community/"+e+"/welcome-messages",updateCommunityBannerDetails:e=>c+"community/"+e+"/banner-details",updateCommunityBanner:e=>c+"community/"+e+"/update-banner",removeCommunityBanner:e=>c+"community/"+e+"/remove-banner",addressAvailability:e=>c+"community/address-availability/"+e,updateLogo:(e,t)=>c+"community/"+e+"/update-logo/"+t,updateFavicon:e=>c+"community/"+e+"/update-favicon",getCommunity:e=>c+"community/"+e,getCommunityById:e=>c+"community-by-id/"+e,verifyThirdPartyToken:e=>c+"community/"+e+"/verify-user-token",verifyUserByAdmin:(e,t)=>c+"community/"+e+"/user/"+t+"/verify",joinCommunity:e=>c+"community/join/"+e,leaveCommunity:e=>c+"community/leave/"+e,getUserPosts:(e,t,n)=>c+`community/${e}/user/${t}/posts?page=${n}`,getCommunityPostDirectory:(e,t,n)=>c+`post/directory/${e}?sort=${t}&page=${n}`,getUserActivities:(e,t,n)=>c+`community/${e}/user/${t}/activities?page=${n}`,groups:e=>c+"community/"+e+"/groups",groupsAndCounters:e=>c+"community/"+e+"/groups-and-counters",sortGroups:e=>c+"community/"+e+"/groups/sort",sortGroupTabs:(e,t)=>c+"community/"+e+"/group/"+t+"/sort",subscribers:(e,t)=>c+"community/"+e+"/subscribers?group="+t,subscribersPaginated:(e,t,n,r,i)=>c+"community/"+e+"/subscribers/paginated?limit="+t+"&page="+n+"&search="+r+"&group="+i,markSubscribersAsViewed:e=>c+`community/${e}/subscribers/mark-viewed`,makeUserModeratorInAllGroup:(e,t,n)=>c+"community/"+e+"/group/"+t+"/user/"+n+"/make-moderator",links:e=>c+"community/"+e+"/links",addNewLink:e=>c+"community/"+e+"/links",editLink:(e,t)=>c+"community/"+e+"/links/"+t,deleteLink:(e,t)=>c+"community/"+e+"/links/"+t,getMyLeaderboardScore:e=>c+"leaderboard/community/"+e+"/my",getLeaderboard:(e,t,n,r)=>c+"leaderboard/community/"+e+"/paginated?groupId="+t+`&page=${n}&limit=${r}`,getLeaderboardV2Paginated:(e,t,n,r)=>c+"leaderboard/community/"+e+`/paginated/v2?page=${t}`+`&limit=${n}`+`&search=${r}`,getMyKarmaPoints:e=>c+"leaderboard/community/"+e+"/my/v2",getCommunityKarmaPoints:e=>c+"community/"+e+"/karma-points",sectionMessageNotificationBadges:e=>c+"community/"+e+"/section-message-badges",sectionMessageNotificationMarkAsRead:(e,t)=>c+"community/"+e+"/section-message-mark-read/"+t,notificationPreference:e=>c+"community/"+e+"/notification-preferences",updateTabNotificationPreference:e=>c+"community/"+e+"/notification-preferences/tab",updateNotificationPreference:e=>c+"community/"+e+"/notification-preferences",getLastPostCreatedTimeInCommunity:e=>c+"community/"+e+"/last-post-time",roles:{makeAdminOfWholeCommunity:(e,t)=>c+"community/"+e+"/user/"+t+"/make-admin",removeUserAsAdminOfWholeCommunity:(e,t)=>c+"community/"+e+"/user/"+t+"/remove-as-admin",removeUserFromCommunity:(e,t)=>c+"community/"+e+"/user/"+t+"/remove-from-community",makeAdminOfSelectedGroups:(e,t,n=[])=>c+"community/"+e+"/user/"+t+"/update-role/groups",updateRole:e=>c+"community/"+e+"/update-role",getRole:(e,t)=>c+"community/"+e+"/get-role/"+t},subscription:{getPlansList:e=>c+"checkout/community/"+e+"/plans",getCheckoutURLForCommunityPlan:(e,t,n=window.location.origin)=>c+"checkout/community/"+e+"/"+t+"?communityURL="+n,cancelCommunitySubscription:e=>c+"cancel-plan/community/"+e},theme:{communityThemeData:e=>c+"community-theme-data/"+e,communityThemeDataToggle:e=>c+"community-theme-data/"+e+"/toggle",communityThemeDataToggleForUser:(e,t)=>c+"community-theme-data/"+e+"/"+t+"/toggle"},deals:{getDeals:c+"community-deals",redeemDeal:e=>c+"community-deals/"+e+"/redeem"},settings:{toggleCommunityLoginRequirement:e=>c+"community/"+e+"/toggle-login-requirement",updateConfig:e=>c+"community/"+e+"/update-config",updateConfigV2:e=>c+"community/"+e+"/update-config/v2"},configurable:(e,t)=>c+`community/${e}/configurable/${t}`,analytics:{getAnalyticsLink:e=>c+"community/"+e+"/analytics"},invite:{inviteViaEmail:e=>c+"community/"+e+"/invite",inviteViaCsv:e=>c+"community/"+e+"/invite/csv",getInvitesList:(e,t,n)=>c+"community/"+e+"/invites/paginated?search="+t+"&page="+n,configureMailTemplates:e=>c+"community/"+e+"/configurable/COMMUNITY_INVITE_MAIL_BODY_KEY",batchReInvite:e=>c+"community/"+e+"/invite/batch-reinvite",cancelBatchInvite:e=>c+"community/"+e+"/invite/batch-cancel"},bulkEmail:{send:e=>c+"community/"+e+"/bulk-email",getBulkEmailLogList:(e,t,n)=>c+`community/${e}/bulk-email/log?search=${t}&page=${n}`},additionalConfiguration:{getConfiguration:e=>c+"community/"+e+"/additional-configuration",saveDefaultJoinGroups:e=>c+"community/"+e+"/additional-configuration/default-join-groups"},reportPeer:e=>c+"community/"+e+"/report-peer",block:{blockUser:(e,t)=>c+"community/"+e+"/blocked-users/"+t,listBlockedUsers:e=>c+"community/"+e+"/blocked-users",unBlockUser:(e,t)=>c+"community/"+e+"/blocked-users/"+t},topics:{createTopic:e=>c+"community/"+e+"/topic",getAllTopics:e=>c+"community/"+e+"/topics",editTopic:(e,t)=>c+"community/"+e+"/topic/"+t+"/edit",archiveTopic:(e,t)=>c+"community/"+e+"/topic/"+t+"/archive",deleteTopic:(e,t)=>c+"community/"+e+"/topic/"+t+"/delete"},onboardingChecklist:{setOnboardingChecklist:e=>c+"community/"+e+"/onboarding-list-config",getOnboardingChecklist:e=>c+"community/"+e+"/onboarding-list-config"},exportMembersCSV:{requestExport:e=>c+"community/"+e+"/subscribers/request-export",getExportStatus:e=>c+"export-job/"+e+"/status"}},d=r.P,l={createCourse:(e,t)=>d+(t?`community/${e}/courses/${t}`:`community/${e}/courses`),uploadCourseBanner:(e,t)=>d+`community/${e}/courses/${t}/banner`,getAll:e=>d+`community/${e}/courses`,getCourseDetails:(e,t)=>d+`community/${e}/courses/${t}`,deleteCourse:(e,t)=>d+`community/${e}/courses/${t}`,paginatedMembers:(e,t,n=1,r=10)=>d+`community/${e}/courses/${t}/members/paginated?`+`page=${n}&limit=${r}`,addMember:(e,t,n)=>d+`community/${e}/courses/${t}/accept/${n}`,removeMember:(e,t,n)=>d+`community/${e}/courses/${t}/reject/${n}`,joinCourse:(e,t)=>d+`community/${e}/courses/${t}/join`,sections:{createSection:(e,t,n)=>d+(n?`community/${e}/courses/${t}/section/${n}`:`community/${e}/courses/${t}/section`),getAll:(e,t)=>d+`community/${e}/courses/${t}/sections`,deleteSection:(e,t,n)=>d+`community/${e}/courses/${t}/section/${n}`,getSectionDetails:(e,t,n)=>d+`community/${e}/courses/${t}/sections/${n}`,lesson:{createLesson:(e,t,n,r)=>d+(r?`community/${e}/courses/${t}/section/${n}/lessons/${r}`:`community/${e}/courses/${t}/section/${n}/lessons`),getLessonDetails:(e,t,n,r)=>d+`community/${e}/courses/${t}/section/${n}/lessons/${r}`,deleteLesson:(e,t,n,r)=>d+`community/${e}/courses/${t}/section/${n}/lessons/${r}`,updateLessonCover:(e,t,n,r)=>d+`community/${e}/courses/${t}/section/${n}/lessons/${r}/cover`,markLessonComplete:(e,t,n,r)=>d+`community/${e}/courses/${t}/section/${n}/lessons/${r}/mark-complete`,markIncomplete:(e,t,n,r)=>d+`community/${e}/courses/${t}/section/${n}/lessons/${r}/mark-incomplete`}}},m=r.P,_={sendCustomPush:e=>m+`community/${e}/custom-push`,getCustomPushLog:(e,t=1)=>m+`community/${e}/custom-push/log?page=`+t},p=r.P,h={getAllRequests:e=>`${p}community/${e}/custom-domain`,createRequest:e=>`${p}community/${e}/custom-domain`,deleteRequest:(e,t)=>`${p}community/${e}/custom-domain/${t}`},g=r.P,y={sendDirectMessage:e=>g+"chats/direct/"+e+"/send-message",editDirectMessage:e=>g+"chats/direct/edit-message/"+e,deleteDirectMessage:e=>g+"chats/direct/delete-message/"+e,uploadAttachments:e=>g+"chats/direct/"+e+"/upload-attachment",markAllMessageAsRead:e=>g+"chats/direct/"+e+"/mark-all-read",chats:g+"chats/direct",userChat:(e,t=null)=>g+"chats/direct/"+e+"?lastId="+t},f={unsubscribe:r.P+"unsubscribe"},b=r.P,v={getAllEmbeddedSections:(e,t=!1)=>b+`community/${e}/embedded-sections?showAll=${t}`,getEmbeddedSectionDetailBySlug:(e,t)=>b+`community/${e}/embedded-sections/${t}`,changeVisibilityEmbeddedSectionInCommunity:(e,t)=>b+`community/${e}/embedded-sections/${t}/change-visibility`,createEmbeddedSection:e=>b+`community/${e}/embedded-sections`,updateEmbeddedSection:(e,t)=>b+`community/${e}/embedded-sections/${t}`,updateEmbeddedSectionSortOrder:e=>b+`community/${e}/embedded-sections/update-sort`,getEMbeddedSectionDetailByIdForAdmin:(e,t)=>b+`community/${e}/embedded-sections/${t}/admin`},A=r.P,E={getAllEvents:(e,t)=>A+`community/${e}/events/${t}`,getEventDetail:(e,t)=>A+`community/${e}/event/${t}`,getEventDetailBySlug:(e,t)=>A+`community/${e}/event/slug/${t}`,updateEvent:(e,t,n,r)=>A+`community/${e}/event/${t}?notifyUser=${n}&deleteAll=${r}`,acceptInvitation:(e,t)=>A+`community/${e}/event/${t}/accept-invitation`,updateEventBanner:(e,t)=>A+`community/${e}/event/${t}/banner`,createEvent:e=>A+`community/${e}/event`,createRecurringEvent:(e,t=null,n=null,r=null)=>A+`community/${e}/event/recurring?recurringType=${t}&recurringCount=${n}&recurringEndDate=${r}`,updateRSVP:(e,t)=>A+`community/${e}/event/${t}/update-rsvp`,inviteSections:(e,t)=>A+`community/${e}/event/${t}/invite`,upcomingEvents:(e,t)=>A+`community/${e}/upcoming-events${t?`?timestamp=${t}`:""}`,latestGroupEvents:(e,t)=>A+`community/${e}/latest-events/${t}`,previousEvents:(e,t)=>A+`community/${e}/previous-events${t?`?timestamp=${t}`:""}`,getMeetingAttendance:(e,t)=>A+`meeting/${e}/attendance?communityId=${t}`,exportAttendanceCSV:(e,t)=>A+`meeting/${e}/attendance/export?communityId=${t}`},k=r.P,P={all:k+"group",my:k+"group/my",byMe:k+"group/by-me",getGroupFromSlug:(e,t)=>k+"community/"+e+"/groups/"+t,updateGroup:e=>k+"group/"+e,deleteGroup:e=>k+"group/"+e,uploadBanner:e=>k+"group/"+e+"/banner",addTab:e=>k+"group/"+e+"/tab",editTab:(e,t)=>k+"group/"+e+"/tab/"+t,deleteTab:(e,t)=>k+"group/"+e+"/tab/"+t,goLive:e=>k+"dyte/start-meeting/"+e,members:(e,t=null)=>k+"group/"+e+"/members"+(t?"?tabId="+t:""),membersPaginated:(e,t=null,n=1,r=20,i="")=>k+"group/"+e+"/members/paginated"+(t?"?tabId="+t+"&":"?")+"page="+n+"&limit="+r+"&query="+i,closedSectionMembers:(e,t=null)=>k+"group/"+e+"/closed-tab/"+t+"/members",closedSectionMembersPaginated:(e,t=null,n=1,r=20,i="")=>k+"group/"+e+"/closed-tab/"+t+"/members/paginated?page="+n+"&limit="+r+"&query="+i,personalGroup:k+"group/personal",getLeaderboardV2Paginated:(e,t,n)=>k+"leaderboard/group/"+e+`/paginated/v2?page=${t}`+`&limit=${n}`,updateRole:(e,t)=>k+"group/"+e+"/members/"+t+"/update-role",removeUser:(e,t)=>k+"group/"+e+"/remove-user/"+t,posts:e=>k+"group/"+e+"/posts",sectionPostsPaginated:(e,t,n=1,r)=>k+"group/"+e+"/section/"+t+"/posts?page="+n+"&sort="+r,sectionPostsPinned:(e,t)=>k+"group/"+e+"/section/"+t+"/posts/pinned",sectionMessagesPaginated:(e,t,n=1)=>k+"group/"+e+"/section/"+t+"/messages?page="+n,sectionMessagesTimestampPaginated:(e,t,n)=>k+"group/"+e+"/section/"+t+"/messages/timestamped?lastId="+n,trendingPosts:e=>k+"group/"+e+"/trending-posts",acceptInvitation:e=>k+"group/"+e+"/accept-invite",join:e=>k+"group/"+e+"/join",leave:e=>k+"group/"+e+"/leave",acceptJoinRequest:(e,t)=>k+"group/"+e+"/join-request/"+t+"/accept",rejectJoinRequest:(e,t)=>k+"group/"+e+"/join-request/"+t+"/reject",verifyCouponCode:(e,t)=>k+"payment/group/"+e+"/verify-coupon/"+t,createOrder:e=>k+"payment/group/"+e+"/create-order",verifyPayment:(e,t)=>k+"payment/group/"+e+"/verify-payment/"+t,joinClosedSection:(e,t)=>k+"group/"+e+"/section/"+t+"/join",acceptJoinClosedSectionRequest:(e,t,n)=>k+"group/"+e+"/section/"+t+"/join-request/"+n+"/accept",rejectJoinClosedSectionRequest:(e,t,n)=>k+"group/"+e+"/section/"+t+"/join-request/"+n+"/reject"},C=r.P,M={addCustomPoints:(e,t)=>`${C}leaderboard/community/${e}/user/${t}/add-custom-point`},x=r.P,I={getAllByCommunity:e=>x+`community/${e}/live-call`,createLiveCall:e=>x+`community/${e}/live-call`},O=r.P,T={uploadMedia:(e,t)=>O+`community/${e}/`+`media/upload?attachmentType=${t}`},L=r.P,D={searchInCommunity:(e,t="")=>L+`mentions/search-community/${e}?query=${t}`},B=r.P,w={create:B+"message",delete:e=>B+"message/"+e,getPinnedMessage:(e,t)=>B+"group/"+e+"/section/"+t+"/messages/pinned",pinned:e=>B+"message/"+e+"/pin",unpinned:e=>B+"message/"+e+"/pin",edit:e=>B+"message/"+e,react:e=>B+"message/"+e+"/react",unreact:e=>B+"message/"+e+"/unreact",uploadAttachment:B+"message/upload-attachment"},S=r.P,j={uploadImage:S+"upload-image",search:e=>S+"community/"+e+"/search",defaultImageFromBackendUrl:S.split("/api/")[0]+"/default_pictures/user_0.jpg"},U=r.P,N={getMyNFTs:U+"profile/nfts",getUserNFTs:e=>U+`user/${e}/nfts`,checkForGatedGroupAccess:e=>U+`community/${e}/check-for-gated-group-access`},R=r.P,z={getPost:e=>R+"open/post/"+e,getPostList:(e,t)=>R+"open/group/"+e+"/feed/"+t+"/posts",getFontData:R+"/font-data"},$=r.P,W={getPaymentPreference:e=>`${$}community/${e}/payment-preference`,updatePaymentPreference:e=>`${$}community/${e}/payment-preference`,getInvoicePreference:e=>`${$}community/${e}/invoice-preference`,updateInvoicePreference:e=>`${$}community/${e}/invoice-preference`},Z=r.P,K={getHighlightedPosts:e=>Z+`community/${e}/highlighted-posts`,highlightPost:(e,t)=>Z+`community/${e}/highlighted-posts/${t}`,updateHighlightedPostsSortOrder:e=>Z+`community/${e}/highlighted-posts/sort`},F=r.P,q={create:F+"post",searchTag:(e,t)=>F+"tag/search?query="+e+"&community="+t,getPostByTag:(e,t,n,r,i)=>F+`/post/explore-by-tag-paginated/community/${e}?page=${t}&tags[]=${n}&groupId=${i}&tabId=${r}`,update:e=>F+"post/"+e,uploadImage:e=>F+"post/"+e+"/images",uploadVideo:e=>F+"post/"+e+"/videos",uploadDocument:e=>F+"post/"+e+"/document",uploadBanner:e=>F+"post/"+e+"/banner",paginated:e=>F+"post-paginated?page="+e,popularPaginated:e=>F+"post/explore-paginated?page="+e,detail:e=>F+"post/"+e,detailFromSlug:(e,t)=>F+"community/"+e+"/post/"+t,likes:e=>F+"post/"+e+"/likes",pin:e=>F+"post/"+e+"/pin",unpin:e=>F+"post/"+e+"/unpin",getBookmarks:F+"bookmark",bookmark:e=>F+"post/"+e+"/bookmark",removeBookmark:e=>F+"post/"+e+"/bookmark",addComment:e=>F+"post/"+e+"/comment",addCommentReply:(e,t)=>F+"post/"+e+"/comment/"+t+"/reply",addCommentReaction:(e,t)=>F+"post/"+e+"/comment/"+t+"/like",removeCommentReaction:(e,t)=>F+"post/"+e+"/comment/"+t+"/dislike",addCommentReplyReaction:(e,t,n)=>F+"post/"+e+"/comment/"+t+"/reply/"+n+"/like",removeCommentReplyReaction:(e,t,n)=>F+"post/"+e+"/comment/"+t+"/reply/"+n+"/dislike",uploadImagesToComment:(e,t)=>F+"post/"+e+"/comment/"+t+"/images",uploadDocumentToComment:(e,t)=>F+"post/"+e+"/comment/"+t+"/document",uploadDocumentToCommentReply:(e,t,n)=>F+"post/"+e+"/comment/"+t+"/reply/"+n+"/documents?documents[]",deleteComment:(e,t)=>F+"post/"+e+"/comment/"+t,deleteSubComment:(e,t,n)=>F+"post/"+e+"/comment/"+t+"/reply/"+n,like:e=>F+"post/"+e+"/like",vote:e=>F+"post/"+e+"/vote",dislike:e=>F+"post/"+e+"/dislike",delete:e=>F+"post/"+e,getMeetingData:e=>F+"dyte/join-meeting/"+e+"/json",toggleMeetingRecording:(e,t)=>F+"dyte/meeting/"+e+"/toggle-recording/"+t,endMeeting:(e,t)=>F+"dyte/meeting/"+e+"/end/"+t},G=r.P,V={createSubscription:e=>`${G}community/${e}/subscription`,updateSubscription:(e,t)=>`${G}community/${e}/subscription/${t}`,deleteSubscription:(e,t)=>`${G}community/${e}/subscription/${t}`,cancelSubscription:e=>`${G}community/${e}/subscription/my`,getAllSubscriptions:e=>`${G}community/${e}/subscriptions`,getSubscriptionDetails:(e,t)=>`${G}community/${e}/subscription/${t}`,getAllSubscriptionMembers:(e,t)=>`${G}community/${e}/subscription/${t}/members`,getMySubscription:e=>`${G}community/${e}/subscription/my`,getAllSubscriptionsAdmin:e=>`${G}community/${e}/subscriptions/admin`,getAllMembershipSubscription:(e,t)=>`${G}community/${e}/subscription/${t}/members`,getActiveSubscriptionsForSubscription:(e,t)=>`${G}community/${e}/subscription/${t}/active-subscriptions`,getPreviousSubscriptionsForSubscription:(e,t)=>`${G}community/${e}/subscription/${t}/previous-subscriptions`,initiateSubscription:(e,t)=>`${G}community/${e}/subscription/${t}/initiate-subscription`,freeSubscribe:(e,t)=>`${G}community/${e}/subscription/${t}/free-subscribe`,resendInvoice:(e,t)=>`${G}community/${e}/invoice-resend/${t}`,editInvoice:(e,t)=>`${G}community/${e}/invoice-edit/${t}`},H=r.P,Y={syncOneSignalWebUserId:H+"user/save-one-signal-web-user-id",profile:H+"profile",checkProfileAvailability:e=>H+"profile/username-availability/"+e,profileById:e=>H+"user/"+e,updateProfile:H+"profile",updateWalletAddress:H+"profile/wallet-address",updatePicture:H+"profile/picture",deleteProfilePicture:H+"profile/picture",getAllUsers:H+"user",followUser:(e,t)=>H+"community/"+t+"/user/"+e+"/follow",unfollowUser:(e,t)=>H+"community/"+t+"/user/"+e+"/unfollow",followFollowingCount:(e,t)=>H+"community/"+t+"/user/"+e+"/follow-following-count",followersList:(e,t)=>H+"community/"+t+"/user/"+e+"/followers",followedList:(e,t)=>H+"community/"+t+"/user/"+e+"/followeds",notifications:H+"user/notifications",markNotificationAsViewed:e=>H+"user/notifications/"+e+"/mark-as-read",markNotificationsAsReceived:H+"user/notifications/mark-as-received",markSelectedNotificationsAsReceived:(e,t)=>H+`user/notifications/mark-selected-as-received?group=${e}&tab=${t}`,markNotificationsAsViewed:H+"user/notifications/mark-as-read",counters:H+"user/counters",apiKeys:{get:H+"user/api-key",delete:e=>H+"user/api-key/"+e},verify:{emailSendOtp:H+"verify/email/send-otp",emailVerifyOtp:H+"verify/email/verify-otp",mobileSendOtp:H+"verify/mobile/send-otp",mobileVerifyOtp:H+"verify/mobile/verify-otp",checkExistingMobile:H+"verify/mobile/already-existing",checkExistingEmail:H+"verify/email/already-existing"},account:{unlinkMobileOrEmail:H+"account/unlink-mobile-or-email"},block:{blockPeer:(e,t)=>H+"community/"+t+"/block-peer/"+e,unblockPeer:(e,t)=>H+"community/"+t+"/unblock-peer/"+e,listBlockedPeers:e=>H+"community/"+e+"/blocked-peers"}},J=r.P,Q={getGroupWidget:(e,t)=>J+`community/${e}/widgets?groupId=${t}`,createCustomWidget:e=>J+`community/${e}/widgets`,uploadCustomCustomWidgetPicture:(e,t)=>J+`community/${e}/widgets/${t}/upload-picture`,updateSortOrder:e=>J+`community/${e}/widgets/sort`,updateWidget:(e,t)=>J+`community/${e}/widgets/${t}`,deleteCustomWidget:(e,t)=>J+`community/${e}/widgets/${t}`},X={auth:a,goLive:r.P+"dyte/go-live",community:u,group:P,directMessages:y,post:q,message:w,user:Y,misc:j,open:z,mentions:D,media:T,event:E,emailSubscription:f,embeddedSections:v,widget:Q,customSubdomain:h,leaderboard:M,communityPlanAccess:o,course:l,customPush:_,postHighlight:K,nft:N,subscription:V,paymentPreference:W,liveCall:I};var ee=n(6292);const te={clientId:"91297253397-0eu6455cgepsl04vdpj0ggpj5ddoiph3.apps.googleusercontent.com"},ne={appId:"583284253212809"}},26914(e,t,n){n.d(t,{r:()=>c});let r=null,i=!1;var a={"hopes.pensil.so":"1e931974dd683091fe7762831cbbf918","webveda.pensil.in":"48a22588b57fa763c042e8c79f37c6dc","epicrew.pensil.in":"6b7a489a26de8e5cf0fa41ff9e15e448","community.webveda.com":"48a22588b57fa763c042e8c79f37c6dc","theundivided.pensil.in":"7b3322b847fa7aed8f50d95bd82fca3d","design.toprankers.com":"52c2a4036b0163d2e15df1be334eb65f","management.toprankers.com":"52c2a4036b0163d2e15df1be334eb65f","cuet.toprankers.com":"52c2a4036b0163d2e15df1be334eb65f","udaan.toprankers.com":"52c2a4036b0163d2e15df1be334eb65f","law.toprankers.com":"52c2a4036b0163d2e15df1be334eb65f","www.cuet.com":"52c2a4036b0163d2e15df1be334eb65f","fyndacademy.pensil.in":"d76a235fae6cbe13a8691df369ba67b7","theforexfunda.pensil.in":"efb89ec238d18ec50bdfb9eae1c85646"}[window.location.hostname];a||(a="139968c47b75a54e4e33df5563ea588d");function s(){i||(i=!0,n.e(7532).then(n.bind(n,17532)).then(e=>{r=e.default,r.init(a)}))}function o(e){r&&i&&e()}window.addEventListener("click",s,{once:!0}),window.addEventListener("keydown",s,{once:!0}),window.addEventListener("touchstart",s,{once:!0});let c={identify:e=>{o(()=>r.identify(e))},alias:e=>{o(()=>r.alias(e))},track:(e,t,n={},a=()=>{})=>{if(r&&i)return r.track("WEBAPP."+e,t,n,a)},people:{set:e=>{o(()=>r.people.set(e))}},reset:()=>{o(()=>r.reset())}}},83789(e,t,n){const r={IMAGE:"image",VIDEO:"video",DOCUMENT:"document",BANNER:"banner"};n.d(t,["A",0,r,"G",0,"https://api.dicebear.com/8.x/initials/svg?fontSize=40&size=40&seed="])},87573(e,t,n){n.d(t,{A:()=>i});const r=Object.freeze({Post:{name:"Post",create:"Create",update:"Update",delete:"Delete",like:"Like",unlike:"Unlike",share:"Share",comment:{name:"Comment",create:"Create",update:"Update",delete:"Delete",reply:{name:"Reply",create:"Create",update:"Update",delete:"Delete"}}},User:{name:"User",create:"Create",update:"Update",login:"Login",logout:"Logout"},Group:{name:"Group",join:"Join",leave:"Leave"}});class i{static logEvent(e,t){if(window.umami&&null!==window.umami)try{window.umami.trackEvent(t,e)}catch(e){}}static logPageView(e){if(window.umami&&null!==window.umami)try{window.umami.trackView(e)}catch(e){}}}n.d(t,["B",0,r])},68536(e,t,n){n.d(t,{u:()=>a});var r=n(54295),i=n(78220);class a{static async requestOTP(e,t,n=null,a){return r.A.post(i.vZ.auth.loginWithOTP,{countryCode:e,mobile:t,communityId:n,captchaToken:a}).then(e=>e.data)}static async requestEmailOTP(e,t=null){return r.A.post(i.vZ.auth.loginWithEmailOTP,{email:e,communityId:t}).then(e=>e.data)}static async verifyOTP(e,t,n){return r.A.post(i.vZ.auth.verifyOTP,{countryCode:e,mobile:t,otp:n}).then(e=>e.data)}static async verifyEmailOTP(e,t,n){return r.A.post(i.vZ.auth.verifyOTP,{countryCode:e,email:t,otp:n}).then(e=>e.data)}static async googleLoginV2(e){return r.A.post(i.vZ.auth.googleLoginV2,{},{headers:{Authorization:"Bearer "+e}}).then(e=>e.data)}static async facebookLogin(e){return r.A.post(i.vZ.auth.facebookLogin,{},{headers:{Authorization:"Bearer "+e}}).then(e=>e.data)}static async web3Login(e){return r.A.post(i.vZ.auth.web3Login,{},{headers:{Authorization:"Bearer "+e}}).then(e=>e.data)}}},25655(e,t,n){n.d(t,{B:()=>o});var r=n(54295),i=n(78220),a=n(16118),s=n(26914);class o{static async checkForAddressAvailability(e,t){return r.A.get(i.vZ.community.addressAvailability(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async createCommunity(e,t){return r.A.post(i.vZ.community.create,{name:e,address:t,selectedType:"paid"},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>(s.r.track("create-community",{communityname:e.data.community.name,communityurl:(0,a.IT)(e.data.community),logo:!!e.data.community.logo,typeSelection:e.data.community.typeSelection}),e.data))}static async updateCommunity(e,t,n,a="",s,o="Asia/Kolkata",c="",u="",d){return r.A.post(i.vZ.community.updateCommunity(e),{name:t,address:n,timezone:o,privacyPolicyLink:c,termsAndConditionsLink:u,meta:d},{headers:{Authorization:"Bearer "+s.token}}).then(e=>e.data)}static async updateCommunityWelcomeMessages(e,t=[],n){return r.A.put(i.vZ.community.updateCommunityWelcomeMessages(e),{welcomeMessages:t},{headers:{Authorization:"Bearer "+n.token}}).then(e=>e.data)}static async updateCommunityBannerDetails(e,t,n,a){return r.A.post(i.vZ.community.updateCommunityBannerDetails(e),{bannerTitle:t,bannerDescription:n},{headers:{Authorization:"Bearer "+a.token}}).then(e=>e.data)}static async updateLogo(e,t,n="light"){const s=new FormData;return s.append("logo",t,t.fileName),r.A.post(i.vZ.community.updateLogo(e,n),s,{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async updateCommunityBanner(e,t,n){const a=new FormData;return a.append("banner",n,n.fileName),r.A.post(i.vZ.community.updateCommunityBanner(e),a,{headers:{Authorization:"Bearer "+t.token}}).then(e=>e.data)}static async removeCommunityBanner(e,t){return r.A.delete(i.vZ.community.removeCommunityBanner(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async updateFavicon(e,t,n){const a=new FormData;return a.append("favicon",n,n.fileName),r.A.post(i.vZ.community.updateFavicon(e),a,{headers:{Authorization:"Bearer "+t.token}}).then(e=>e.data)}static async getCommunityGroups(e,t=null){return r.A.get(i.vZ.community.groups(e),{headers:{Authorization:"Bearer "+(t?t.token:(0,a.ut)())}}).then(e=>e.data)}static async getCommunityGroupsAndCounters(e){return r.A.get(i.vZ.community.groupsAndCounters(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getMyLeaderboardScore(e){return r.A.get(i.vZ.community.getMyLeaderboardScore(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getLeaderboard(e,t,n="",s=1,o=10){return r.A.get(i.vZ.community.getLeaderboard(t,n,s,o),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getLeaderboardV2Paginated(e,t,n,s=""){return r.A.get(i.vZ.community.getLeaderboardV2Paginated(e,t,n,s),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getMyKarmaPoints(e){return r.A.get(i.vZ.community.getMyKarmaPoints(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data).catch(e=>e.response.data)}static async getCommunityKarmaPoints(e){return r.A.get(i.vZ.community.getCommunityKarmaPoints(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async updateCommunityKarmaPoints(e,t){return r.A.post(i.vZ.community.getCommunityKarmaPoints(e),{karmaPoints:t},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getSubscribedCommunity(e){return r.A.get(i.vZ.community.getSubscribedCommunities,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async sortCommunityGroups(e,t,n){return r.A.post(i.vZ.community.sortGroups(t),{sortOrder:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async sortCommunityGroupTabs(e,t,n,a){return r.A.post(i.vZ.community.sortGroupTabs(t,n),{sortOrder:a},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getCommunitySubscribers(e,t,n=""){return r.A.get(i.vZ.community.subscribers(t,n),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getCommunitySubscribersPaginated(e,t,n,a,s="",o=""){return r.A.get(i.vZ.community.subscribersPaginated(t,n,a,s,o),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async markSubscribersAsViewed(e,t=[]){return r.A.post(i.vZ.community.markSubscribersAsViewed(e),{userIds:t},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async makeUserModeratorInAllGroups(e,t,n,a){return r.A.post(i.vZ.community.makeUserModeratorInAllGroup(t,n,a),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getCommunity(e=""){return r.A.get(i.vZ.community.getCommunity(e),{}).then(e=>e.data)}static async getCommunityById(e,t){return r.A.get(i.vZ.community.getCommunityById(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getUserPostsInCommunityById(e,t,n=1){return r.A.get(i.vZ.community.getUserPosts(e,t,n),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getCommunityPostDirectoryById(e,t,n=null,a=1){return r.A.get(i.vZ.community.getCommunityPostDirectory(t,n,a),{headers:{Authorization:"Bearer "+(e?e.token:null)}}).then(e=>e.data)}static async getUserActivitiesInCommunityById(e,t,n=1){return r.A.get(i.vZ.community.getUserActivities(e,t,n),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async joinCommunity(e,t){return r.A.post(i.vZ.community.joinCommunity(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(t=>(s.r.track("subscribe-community",{communityname:t.data.community.name,communityurl:(0,a.IT)(t.data.community),communityPlan:t.data.community.plan?t.data.community.plan.planType:"free",user:e.name,mobile:e.mobile,email:e.email}),t.data))}static async verifyUserByAdmin(e,t,n){return r.A.post(i.vZ.community.verifyUserByAdmin(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async leaveCommunity(e,t){return r.A.post(i.vZ.community.leaveCommunity(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getCommunityLinks(e){return r.A.get(i.vZ.community.addNewLink(e),{}).then(e=>e.data)}static async addCommunityLink(e,t,n){return r.A.post(i.vZ.community.addNewLink(t),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async editCommunityLink(e,t,n){return r.A.post(i.vZ.community.editLink(t,n.id),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async deleteCommunityLink(e,t,n){return r.A.delete(i.vZ.community.editLink(t,n.id),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async verifyThirdPartyToken(e,t){return r.A.post(i.vZ.community.verifyThirdPartyToken(e),{token:t}).then(e=>e.data)}static async makeAdminOfWholeCommunity(e,t,n){return r.A.post(i.vZ.community.roles.makeAdminOfWholeCommunity(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async removeUserAsAdminOfWholeCommunity(e,t,n){return r.A.post(i.vZ.community.roles.removeUserAsAdminOfWholeCommunity(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async removeUserFromCommunity(e,t,n){return r.A.post(i.vZ.community.roles.removeUserFromCommunity(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async blockUser(e,t){return r.A.post(i.vZ.community.block.blockUser(e,t),{},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async listBlockedUsers(e,t=1,n=10){return r.A.get(i.vZ.community.block.listBlockedUsers(e,t,n),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async unBlockUser(e,t){return r.A.delete(i.vZ.community.block.unBlockUser(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async createCommunityTopic(e,t,n,a,s){return r.A.post(i.vZ.community.topics.createTopic(t),{name:n,bgColor:a,textColor:s},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getAllCommunityTopics(e){return r.A.get(i.vZ.community.topics.getAllTopics(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async editCommunityTopic(e,t,n,a,s,o){return r.A.patch(i.vZ.community.topics.editTopic(t,n),{name:a,bgColor:s,textColor:o},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async handleCommunityTopicArchive(e,t,n){return r.A.patch(i.vZ.community.topics.archiveTopic(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async deleteCommunityTopic(e,t,n){return r.A.patch(i.vZ.community.topics.deleteTopic(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async makeAdminOfSelectedGroups(e,t,n,a=[],s="admin"){return r.A.post(i.vZ.community.roles.makeAdminOfSelectedGroups(t,n),{groupIds:a,role:s},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getPlansList(e){return r.A.get(i.vZ.community.subscription.getPlansList(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getCheckoutURLForCommunityPlan(e,t,n="advance",a=window.location.origin){return r.A.get(i.vZ.community.subscription.getCheckoutURLForCommunityPlan(t,n,a),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static checkIfCommunityActionShouldBeDisabled(e,t=!1){return t?!(!e||"paid"!==e.selectedType||!e.isPlanExpired):!(!e||"admin"!==e.myRole||"paid"!==e.selectedType||!e.isPlanExpired)}static async cancelCommunitySubscription(e,t){return r.A.post(i.vZ.community.subscription.cancelCommunitySubscription(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getCommunityThemeData(e){return r.A.get(i.vZ.community.theme.communityThemeData(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async updateCommunityThemeData(e,t,n){return r.A.post(i.vZ.community.theme.communityThemeData(t),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async toggleCommunityThemeData(e,t){return r.A.post(i.vZ.community.theme.communityThemeDataToggle(e),t,{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async toggleCommunityThemeDataForUser(e,t,n){return r.A.post(i.vZ.community.theme.communityThemeDataToggleForUser(t,e.id),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getDeals(){return r.A.get(i.vZ.community.deals.getDeals,{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async redeemDeal(e,t,n){return r.A.post(i.vZ.community.deals.redeemDeal(t.id),{communityPlanType:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async toggleCommunityLoginRequirement(e,t,n){return r.A.put(i.vZ.community.settings.toggleCommunityLoginRequirement(t),{loginRequired:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async updateConfig(e,t,n,a){return r.A.put(i.vZ.community.settings.updateConfig(t),{configKey:n,configValue:a},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async updateConfigV2(e,t,n,a){return r.A.put(i.vZ.community.settings.updateConfigV2(t),{configKey:n,configValue:a},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getConfigurable(e,t){return r.A.get(i.vZ.community.configurable(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async updateConfigurable(e,t,n){return r.A.post(i.vZ.community.configurable(e,t),{configurableValue:n},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getLastPostCreatedTimeInCommunity(e){return r.A.get(i.vZ.community.getLastPostCreatedTimeInCommunity(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getAnalyticsLink(e){return r.A.get(i.vZ.community.analytics.getAnalyticsLink(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getAdditionalConfiguration(e){return r.A.get(i.vZ.community.additionalConfiguration.getConfiguration(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async saveAdditionalConfigurationDefaultJoinGroups(e,t=[]){return r.A.post(i.vZ.community.additionalConfiguration.saveDefaultJoinGroups(e),{groupIds:t},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async reportPost({communityId:e,reportType:t,reasonOfReporting:n,contentLink:s,content:o}){return r.A.post(i.vZ.community.reportPeer(e.toString()),{reasonOfReporting:n,reportType:t,contentLink:s||"",content:s?o:"Invalid content link"},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data).catch(()=>null)}static async setCommunityOnboardingChecklistDetails(e,t){return r.A.post(i.vZ.community.onboardingChecklist.setOnboardingChecklist(e),{onboardingChecklist:t},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getCommunityOnboardingListData(e){return r.A.get(i.vZ.community.onboardingChecklist.getOnboardingChecklist(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async requestMembersExport(e,t){return r.A.post(i.vZ.community.exportMembersCSV.requestExport(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getMembersExportStatus(e,t){return r.A.get(i.vZ.community.exportMembersCSV.getExportStatus(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}}},17917(e,t,n){n.d(t,{B:()=>s});var r=n(54295),i=n(78220),a=n(16118);class s{static async createGroup(e,t){return r.A.post(i.vZ.group.all,t,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async updateGroup(e,t,n){return r.A.post(i.vZ.group.updateGroup(t),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async deleteGroup(e,t){return r.A.delete(i.vZ.group.deleteGroup(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async uploadBanner(e,t="",n){const a=new FormData;return a.append("banner",n),r.A.post(i.vZ.group.uploadBanner(t),a,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async createGroupTab(e,t,n){return r.A.post(i.vZ.group.addTab(t),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async editGroupTab(e,t,n,a){return r.A.post(i.vZ.group.editTab(t,n),a,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async deleteGroupTab(e,t,n){return r.A.delete(i.vZ.group.deleteTab(t,n),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getAllGroups(e){return r.A.get(i.vZ.group.all,{headers:{Authorization:"Bearer "+(e?e.token:null)}}).then(e=>e.data)}static async groupsByMe(e){return r.A.get(i.vZ.group.byMe,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getPersonalGroup(e){return r.A.get(i.vZ.group.personalGroup,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async groupDetail(e){return r.A.get(i.vZ.group.all+"/"+e,{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async groupDetailFromSlug(e,t){return r.A.get(i.vZ.group.getGroupFromSlug(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async groupMembers(e,t,n){return r.A.get(i.vZ.group.members(t,n),{headers:{Authorization:"Bearer "+(0,a.ut)()},signal:e.signal}).then(e=>e.data)}static async groupMembersPaginated(e,t,n=1,s=20,o=""){return r.A.get(i.vZ.group.membersPaginated(e,t,n,s,o),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async groupClosedSectionMembers(e,t,n){return r.A.get(i.vZ.group.closedSectionMembers(t,n),{headers:{Authorization:"Bearer "+(0,a.ut)()},signal:e.signal}).then(e=>e.data)}static async groupClosedSectionMembersPaginated(e,t,n=1,s=20,o=""){return r.A.get(i.vZ.group.closedSectionMembersPaginated(e,t,n,s,o),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getLeaderboardV2Paginated(e,t,n){return r.A.get(i.vZ.group.getLeaderboardV2Paginated(e,t,n),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async updateUserRole(e,t,n,a="user"){return r.A.post(i.vZ.group.updateRole(t,n),{role:a},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async removeUser(e,t,n){return r.A.post(i.vZ.group.removeUser(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async groupPosts(e,t){return r.A.get(i.vZ.group.posts(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async sectionPostsPaginated(e,t,n=1,s){return r.A.get(i.vZ.group.sectionPostsPaginated(e,t,n,s),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async sectionPostsPinned(e,t){return r.A.get(i.vZ.group.sectionPostsPinned(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async sectionMessagesPaginated(e,t,n,a=1){return r.A.get(i.vZ.group.sectionMessagesPaginated(t,n,a),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async sectionMessagesTimestampPaginated(e,t,n,a=null){return r.A.get(i.vZ.group.sectionMessagesTimestampPaginated(t,n,a),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async acceptInvitation(e,t){return r.A.post(i.vZ.group.acceptInvitation(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async acceptUserRequest(e,t,n){return r.A.post(i.vZ.group.acceptJoinRequest(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async rejectJoinRequest(e,t,n){return r.A.post(i.vZ.group.rejectJoinRequest(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async joinGroup(e,t){return r.A.post(i.vZ.group.join(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async leaveGroup(e,t){return r.A.post(i.vZ.group.leave(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async verifyToken(e,t,n){return r.A.get(i.vZ.group.verifyCouponCode(t,n),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async createOrder(e,t,n){return r.A.post(i.vZ.group.createOrder(t),{code:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async verifyPayment(e,t,n){return r.A.post(i.vZ.group.verifyPayment(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async joinClosedSection(e,t,n){return r.A.post(i.vZ.group.joinClosedSection(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async acceptJoinClosedSectionRequest(e,t,n,a){return r.A.post(i.vZ.group.acceptJoinClosedSectionRequest(t,n,a),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async rejectJoinClosedSectionRequest(e,t,n,a){return r.A.post(i.vZ.group.rejectJoinClosedSectionRequest(t,n,a),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static getTrendingPosts(e){return r.A.get(i.vZ.group.trendingPosts(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}}},24968(e,t,n){n.d(t,{cu:()=>s,uR:()=>o.u,BE:()=>c.B,fk:()=>m,_N:()=>_,Bd:()=>p.B,u1:()=>h.u,NFTService:()=>g,To:()=>y,K$:()=>f.K,d4:()=>b,nC:()=>v.n,DL:()=>A.D,Cq:()=>E});var r=n(26914),i=n(36357);const a={"menu-click":"menu_click","destination-click":"destination_click","name-pop-up-shown":"name_pop_up_shown","name-submitted":"name_submitted",template:"template","widget-groupmember":"widget-groupmember","widget-leaderboard":"widget-leaderboard",search:"search","searched-result-clicked":"searched-result-clicked","quick-links-clicked":"quick-links-clicked","home-pressed":"home-pressed","embedded-channel-clicked":"embedded-channel-clicked","dm-clicked":"dm-clicked","calendar-clicked":"calendar-clicked","course-clicked":"course-clicked","see-notification":"see-notification","notification-clicked":"notification-clicked","create-post":"create-post","like-post":"like-post","like-clicked":"like-clicked","share-clicked":"share-clicked","post-clicked":"post-clicked","image-clicked":"image-clicked","post-comment":"post-comment","comment-clicked":"comment-clicked","post-reply":"post-reply","edit-post":"edit-post","delete-post":"delete-post","post-filter":"post-filter","featured-post-clicked":"featured-post-clicked","user-profile-clicked":"user-profile-clicked","user-profile-edit":"user-profile-edit","notification-clicked":"notification-clicked","edit-profile":"edit-profile","edit-profile-clicked-on-profile":"edit-profile-clicked-on-profile","dm-icon-clicked-on-profile":"dm-icon-clicked-on-profile",login:"login",signup:"signup",logout:"logout","profile-details":"profile-details","mobile-register-attempt":"mobile-register-attempt","mobile-register-attempt-redirect-email":"mobile-register-attempt-redirect-email","create-group":"create-group","join-group":"join-group","create-section":"create-section","join-section":"join-section","group-message":"group-message","explore-group-clicked":"explore-group-clicked","group-clicked-in-explore-groups":"group-clicked-in-explore-groups","click-select-widget":"click-select-widget","join-community":"join-community","subscribe-community":"subscribe-community","create-community":"create-community","select-community":"select-community","load-community":"load-community","community-banner-update":"community-banner-update","onboarding-message-update":"onboarding-message-update","onboard-add-new-message":"onboard-add-new-message","currency-updated":"currency-updated","bank-account-connect-request":"bank-account-connect-request","bank-account-disconnect-request":"bank-account-disconnect-request","invoice-details-updated":"invoice-details-updated","update-base-points":"update-base-points","create-new-embed-channel-button-clicked":"create-new-embed-channel-button-clicked","theme-updated":"theme-updated","notification-preference-updated":"notification-preference-updated","course-published":"course-published","make-community-private":"make-community-private","custom-domain-updated":"custom-domain-updated","custom-domain-removed":"custom-domain-removed","compare-plans-clicked":"compare-plans-clicked","cancel-plan":"cancel-plan","post-selected-from-widgets":"post-selected-from-widgets","event-selected-from-widget":"event-selected-from-widget","custom-widget-button-clicked":"custom-widget-button-clicked","country-code":"country-code","support-icon-clicked":"support-icon-clicked","create-new-chat":"create-new-chat"};class s{constructor({communityId:e,communityName:t,user:n,communityUrl:r}){this.communityId=void 0,this.sessionid=void 0,this.user=void 0,this.communityName=void 0,this.communityUrl=void 0,this.communityId=null!=e?e:"",this.communityName=null!=t?t:"",this.user=n,this.sessionid=(0,i.gZ)(),this.communityUrl=null!=r?r:window.location.href}updateValues({communityId:e,communityName:t,user:n,communityUrl:r}){e&&(this.communityId=e),t&&(this.communityName=t),n&&(this.user=n),r&&(this.communityUrl=r)}static Instance({communityId:e,communityName:t,user:n,communityUrl:r}){return s.instance||(s.instance=new s({communityId:e,communityName:t,user:n,communityUrl:null!=r?r:window.location.href})),s.instance.updateValues({communityId:e,communityName:t,user:n,communityUrl:null!=r?r:window.location.href}),s.instance}track(e,t={},n){const s=window.gtag||(()=>{});t.impressionId||(t.impressionId=(0,i.gZ)()),t.date=(new Date).toISOString().split("T")[0],t.communityId=this.communityId,t.communityName=this.communityName,this.user&&(t.user=this.user),t.sessionid=this.sessionid,t.communityUrl=this.communityUrl,n&&(t={...t,...n}),s("event",e,t={...t,event:a[e]}),r.r.track(e,t),window.umami&&window.umami.trackEvent(t,e)}}s.instance=void 0;var o=n(68536),c=n(25655),u=n(54295),d=n(78220),l=n(16118);class m{static async getAllCourses(e){return u.A.get(d.vZ.course.getAll(e),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async createCourse(e,t,n){return u.A.post(d.vZ.course.createCourse(e,n),t,{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async uploadCourseBanner(e,t,n,r=e=>{}){const i=new FormData;return i.append("banner",n),u.A.post(d.vZ.course.uploadCourseBanner(e,t),i,{headers:{Authorization:"Bearer "+(0,l.ut)()},onUploadProgress:function(e){const t=Math.round(100*e.loaded/e.total);r(t)}}).then(e=>e.data)}static async getCourseDetails(e,t){return u.A.get(d.vZ.course.getCourseDetails(e,t),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async deleteCourse(e,t){return u.A.delete(d.vZ.course.deleteCourse(e,t),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async getCourseMembers(e,t,n=1,r=10){return u.A.get(d.vZ.course.paginatedMembers(e,t,n,r),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async addMember(e,t,n){return u.A.post(d.vZ.course.addMember(e,t,n),{},{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async joinCourse(e,t){return u.A.post(d.vZ.course.joinCourse(e,t),{},{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async removeMember(e,t,n){return u.A.post(d.vZ.course.removeMember(e,t,n),{},{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async createSection(e,t,n,r){return u.A.post(d.vZ.course.sections.createSection(e,t,r),n,{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async deleteSection(e,t,n){return u.A.delete(d.vZ.course.sections.deleteSection(e,t,n),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async createLesson(e,t,n,r,i){return u.A.post(d.vZ.course.sections.lesson.createLesson(e,t,n,i),r,{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async getLesson(e,t,n,r){return u.A.get(d.vZ.course.sections.lesson.getLessonDetails(e,t,n,r),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async deleteLesson(e,t,n,r){return u.A.delete(d.vZ.course.sections.lesson.deleteLesson(e,t,n,r),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async uploadLessonCoverMedia(e,t,n,r,i,a=e=>{}){const s=new FormData;return s.append("coverMedia",i),u.A.post(d.vZ.course.sections.lesson.updateLessonCover(e,t,n,r),s,{headers:{Authorization:"Bearer "+(0,l.ut)()},onUploadProgress:function(e){const t=Math.round(100*e.loaded/e.total);a(t)}}).then(e=>e.data)}static async markLessonComplete(e,t,n,r,i){return u.A.post(d.vZ.course.sections.lesson.markLessonComplete(e,t,n,r,i),{},{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async markLessonInComplete(e,t,n,r,i){return u.A.post(d.vZ.course.sections.lesson.markIncomplete(e,t,n,r,i),{},{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}}class _{static async inviteByEmail(e,t,n){return u.A.post(d.vZ.community.invite.inviteViaEmail(t),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async inviteByCSV(e,t,n,r,i=e=>{}){const a=new FormData;return a.append("groupId",n.groupId),a.append("additionalMessage",n.additionalMessage),a.append("memberDataCSV",r),u.A.post(d.vZ.community.invite.inviteViaCsv(t),a,{headers:{Authorization:"Bearer "+e.token,"Content-Type":"multipart/form-data"},onUploadProgress:function(e){const t=Math.round(100*e.loaded/e.total);i(t)}}).then(e=>e.data)}static async getInvitesList(e,t,n,r){return u.A.get(d.vZ.community.invite.getInvitesList(t,n,r),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async saveMailTemplate(e,t,n){return u.A.post(d.vZ.community.invite.configureMailTemplates(t),{configurableValue:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getMailTemplate(e,t){return u.A.get(d.vZ.community.invite.configureMailTemplates(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async sendBulkMail(e,t,n){return u.A.post(d.vZ.community.bulkEmail.send(t),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getBulkMailList(e,t,n,r){return u.A.get(d.vZ.community.bulkEmail.getBulkEmailLogList(t,n,r),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async resendBulkMail(e,t,n){return u.A.post(d.vZ.community.invite.batchReInvite(t),{inviteIds:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async cancelBulkMail(e,t,n){return u.A.post(d.vZ.community.invite.cancelBatchInvite(t),{inviteIds:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}}var p=n(17917),h=n(53322);class g{static async getMyNFTs(){return u.A.get(d.vZ.nft.getMyNFTs,{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async getUserNFTs(e){return u.A.get(d.vZ.nft.getUserNFTs(e),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async checkForGatedGroupAccess(e){return u.A.post(d.vZ.nft.checkForGatedGroupAccess(e),{},{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}}class y{static async updatePreference(e,t){return u.A.post(d.vZ.paymentPreference.updatePaymentPreference(e),t,{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async getPreference(e){return u.A.get(d.vZ.paymentPreference.getPaymentPreference(e),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async updateInvoicePreference(e,t){return u.A.post(d.vZ.paymentPreference.updateInvoicePreference(e),t,{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async getInvoicePreference(e){return u.A.get(d.vZ.paymentPreference.getInvoicePreference(e),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}}var f=n(70924);class b{static async getSectionMessageNotificationBadge(e){return u.A.get(d.vZ.community.sectionMessageNotificationBadges(e),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}static async getSectionMessageNotificationMarkAsRead(e,t){return u.A.get(d.vZ.community.sectionMessageNotificationMarkAsRead(e,t),{headers:{Authorization:"Bearer "+(0,l.ut)()}}).then(e=>e.data)}}var v=n(81475),A=n(38733);class E{static async getWidgets(e,t){return u.A.get(d.vZ.widget.getGroupWidget(e,t)).then(e=>e.data)}static async createCustomWidget(e,t,n){return u.A.post(d.vZ.widget.createCustomWidget(t),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async uploadCustomCustomWidgetPicture(e,t,n,r){const i=new FormData;return i.append("picture",r),u.A.post(d.vZ.widget.uploadCustomCustomWidgetPicture(t,n),i,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async updateSortOrder(e,t,n){return u.A.post(d.vZ.widget.updateSortOrder(t),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async updateWidget(e,t,n,r){return u.A.post(d.vZ.widget.updateWidget(t,n),r,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async deleteWidget(e,t,n){return u.A.delete(d.vZ.widget.updateWidget(t,n),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}}},73248(e,t,n){n.d(t,{W:()=>a});var r=n(54295),i=n(78220);class a{static async getNotificationPreference(e,t){return r.A.get(i.vZ.community.notificationPreference(e),{headers:{Authorization:"Bearer "+t.token}}).then(e=>e.data)}static async updateNotificationPreference(e,t,n){return r.A.post(i.vZ.community.updateNotificationPreference(e),n,{headers:{Authorization:"Bearer "+t.token}}).then(e=>e.data)}}},90945(e,t,n){n.d(t,{g:()=>s});var r=n(54295),i=n(78220),a=n(16118);class s{static async getHighlightedPostsInCommunity(e){return r.A.get(i.vZ.postHighlight.getHighlightedPosts(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async highlightCommunityPost(e,t){return r.A.post(i.vZ.postHighlight.highlightPost(e,t),{},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async unHighlightCommunityPost(e,t){return r.A.delete(i.vZ.postHighlight.highlightPost(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async updateHighlightedPostsSortOrder(e,t){return r.A.post(i.vZ.postHighlight.updateHighlightedPostsSortOrder(e),t,{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}}},70924(e,t,n){n.d(t,{K:()=>s});var r=n(54295),i=n(78220),a=n(16118);class s{static async getPostsPaginated(e,t=1){return r.A.get(i.vZ.post.paginated(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getPostsToExplorePaginated(e,t=1){return r.A.get(i.vZ.post.popularPaginated(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getPostDetail(e,t){return r.A.get(i.vZ.post.detail(t),{headers:{Authorization:"Bearer "+(e?e.token:null)}}).then(e=>e.data)}static async getPostDetailFromSlug(e,t,n){return r.A.get(i.vZ.post.detailFromSlug(t,n),{headers:{Authorization:"Bearer "+(e?e.token:null)}}).then(e=>e.data)}static async getPostLikes(e,t){return r.A.get(i.vZ.post.likes(t),{headers:{Authorization:"Bearer "+(e?e.token:null)}}).then(e=>e.data)}static async createPost(e,t){return r.A.post(i.vZ.post.create,t,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getTagsBySearch(e,t,n){return r.A.get(i.vZ.post.searchTag(t,n),{headers:{Authorization:"Bearer "+(e?e.token:null)}}).then(e=>e.data)}static async getPostByTagSearch(e,t,n,a,s,o){return r.A.get(i.vZ.post.getPostByTag(t,n,a,s,o),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async updatePost(e,t,n,a){return t.removedMediaUploadsOnEdit=n,r.A.post(i.vZ.post.update(a),t,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async uploadImages(e,t="",n=[],a=e=>{}){const s=new FormData;return n.forEach(e=>{s.append("images[]",e,e.fileName)}),r.A.post(i.vZ.post.uploadImage(t),s,{headers:{Authorization:"Bearer "+e.token},onUploadProgress:function(e){const t=Math.round(100*e.loaded/e.total);a(t)}}).then(e=>e.data)}static async deleteImages(e,t=""){return r.A.delete(i.vZ.post.uploadImage(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async uploadVideos(e,t="",n=[],a=e=>{}){const s=new FormData;return n.forEach(e=>{s.append("videos[]",e,e.fileName)}),r.A.post(i.vZ.post.uploadVideo(t),s,{headers:{Authorization:"Bearer "+e.token},onUploadProgress:function(e){const t=Math.round(100*e.loaded/e.total);a(t)}}).then(e=>e.data)}static async deleteVideos(e,t=""){const n=new FormData;return n.append("videos[]",[]),r.A.post(i.vZ.post.uploadVideo(t),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async uploadDocument(e,t="",n,a=e=>{}){const s=new FormData;return s.append("document",n,n.fileName),r.A.post(i.vZ.post.uploadDocument(t),s,{headers:{Authorization:"Bearer "+e.token},onUploadProgress:function(e){const t=Math.round(100*e.loaded/e.total);a(t)}}).then(e=>e.data)}static async uploadCoverPicture(e,t="",n,a=e=>{}){const s=new FormData;return s.append("banner",n,n.fileName),r.A.post(i.vZ.post.uploadBanner(t),s,{headers:{Authorization:"Bearer "+e.token},onUploadProgress:function(e){const t=Math.round(100*e.loaded/e.total);a(t)}}).then(e=>e.data)}static async pinPost(e,t=""){return r.A.post(i.vZ.post.pin(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async unpinPost(e,t=""){return r.A.post(i.vZ.post.unpin(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async bookmarkPost(e,t=""){return r.A.post(i.vZ.post.bookmark(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async removeBookmark(e,t=""){return r.A.delete(i.vZ.post.removeBookmark(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getBookmarks(){return r.A.get(i.vZ.post.getBookmarks,{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async voteOnPoll(e,t="",n){return r.A.post(i.vZ.post.vote(t),{option:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async likePost(e,t){return r.A.post(i.vZ.post.like(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async dislikePost(e,t){return r.A.post(i.vZ.post.dislike(t),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async addComment(e,t,n={description:""}){return r.A.post(i.vZ.post.addComment(t),n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async uploadImagesToComment(e,t,n,a){const s=new FormData;return a.forEach(e=>{s.append("images[]",e,e.fileName)}),r.A.post(i.vZ.post.uploadImagesToComment(t,n),s,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async uploadDocumentToComment(e,t,n,a){const s=new FormData;return s.append("document",a,a.fileName),r.A.post(i.vZ.post.uploadDocumentToComment(t,n),s,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async uploadDocumentToCommentReply(e,t,n,a,s){const o=new FormData;return s.forEach(e=>{o.append("documents[]",e,e.fileName)}),r.A.post(i.vZ.post.uploadDocumentToCommentReply(t,n,a),o,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async deleteComment(e,t,n){return r.A.delete(i.vZ.post.deleteComment(t,n),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async deleteSubComment(e,t,n,a){return r.A.delete(i.vZ.post.deleteSubComment(t,n,a),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async deletePost(e,t){return r.A.delete(i.vZ.post.delete(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async addCommentReply(e,t,n,a){return r.A.post(i.vZ.post.addCommentReply(t,n),a,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async addCommentReaction(e,t,n,a){return r.A.post(i.vZ.post.addCommentReaction(t,n),{emoji:a},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async removeCommentReaction(e,t,n){return r.A.post(i.vZ.post.removeCommentReaction(t,n),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async addCommentReplyReaction(e,t,n,a,s){return r.A.post(i.vZ.post.addCommentReplyReaction(t,n,a),{emoji:s},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async removeCommentReplyReaction(e,t,n,a){return r.A.post(i.vZ.post.removeCommentReplyReaction(t,n,a),{},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}}},38733(e,t,n){n.d(t,{D:()=>s});var r=n(54295),i=n(78220),a=n(16118);class s{static async updateProfile(e,t){return r.A.post(i.vZ.user.updateProfile,t,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async updateWalletAddress(e){return r.A.post(i.vZ.user.updateWalletAddress,{walletAddress:e},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async updatePicture(e,t){const n=new FormData;return n.append("picture",t,t.fileName),r.A.post(i.vZ.user.updatePicture,n,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async deleteProfilePicture(e){return r.A.delete(i.vZ.user.updatePicture,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async syncOneSignalWebUserId(e,t){return r.A.post(i.vZ.user.syncOneSignalWebUserId,{userId:t},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async getUserProfile(e){return r.A.get(i.vZ.user.profile,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async checkForUserIdAvailability(e,t){return r.A.get(i.vZ.user.checkProfileAvailability(e),{headers:{Authorization:"Bearer "+t.token}}).then(e=>e.data)}static async getUserProfileById(e){return r.A.get(i.vZ.user.profileById(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getAllUsers(e){return r.A.get(i.vZ.user.getAllUsers,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async followUser(e,t){return r.A.get(i.vZ.user.followUser(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async unfollowUser(e,t){return r.A.get(i.vZ.user.unfollowUser(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getFollowFollowingCount(e,t){return r.A.get(i.vZ.user.followFollowingCount(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getFollowersList(e,t){return r.A.get(i.vZ.user.followersList(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getFollowedList(e,t){return r.A.get(i.vZ.user.followedList(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async verifyMobileSendOTP(e,t,n){return r.A.post(i.vZ.user.verify.mobileSendOtp,{countryCode:t,mobile:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async verifyMobileVerifyOTP(e,t,n){return r.A.post(i.vZ.user.verify.mobileVerifyOtp,{mobile:t,otp:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async verifyEmailSendOTP(e,t){return r.A.post(i.vZ.user.verify.emailSendOtp,{email:t},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async verifyEmailVerifyOTP(e,t,n){return r.A.post(i.vZ.user.verify.emailVerifyOtp,{email:t,otp:n},{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async unlinkEmailOrMobile(e){return r.A.post(i.vZ.user.account.unlinkMobileOrEmail,{unlinkType:e},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getUserCounters(){return r.A.get(i.vZ.user.counters,{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async blockPeer(e,t){return r.A.post(i.vZ.user.block.blockPeer(t,e),{},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static unblockPeer(e,t){return r.A.delete(i.vZ.user.block.unblockPeer(t,e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getBlockedUsersList(e){return r.A.get(i.vZ.user.block.listBlockedPeers(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}}},77255(e,t,n){n.d(t,{jw:()=>a});const r="CREATE_SESSION",i="DESTROY_SESSION";function a(e){return{type:r,user:e}}n.d(t,["A2",0,r,"qj",0,i])},42414(e,t,n){n.d(t,{Km:()=>i});n(26914),n(24968),n(93668);const r="SET_COMMUNITY";function i(e=null){return{type:r,community:e}}n.d(t,["hQ",0,r])},41153(e,t,n){n.d(t,{c:()=>i});const r="SET_COMMUNITY_PAC";function i(e=null){return{type:r,pac:e}}n.d(t,["u",0,r])},41374(e,t,n){n.d(t,{Mj:()=>u,OX:()=>l,RN:()=>c,uF:()=>d});const r="GET_ALL_DIRECT_CHATS",i="GET_ALL_DIRECT_CHATS_SUCCESS",a="GET_ALL_DIRECT_CHATS_FAILURE",s="ADD_CHAT_IF_NEEDED",o="MARK_CHAT_AS_READ";function c(e){return{type:i,users:e}}function u(e){return{type:s,user:e}}function d(e){return{type:o,chat:e}}function l(){return(e,t)=>{e({type:r});const{auth:n}=t()}}n.d(t,["Bs",0,s,"Fy",0,i,"J0",0,r,"TP",0,o,"u6",0,a])},93668(e,t,n){n.d(t,{$Y:()=>s,JK:()=>l,Wk:()=>o,eP:()=>u,tg:()=>c});n(24968);const r="SET_GROUPS",i="SET_ACTIVE_GROUP",a="SET_IS_LOADING_GROUPS";function s(e=[]){return{type:r,groups:e}}function o(e=null){return(t,n)=>{if(e){const{groups:r}=n(),i=[...r],a=i.findIndex(t=>t.id===e.id);i.splice(a,1,e),t(s(i))}t(d(e))}}function c(e,t={},n=e=>!0){return(r,i)=>{if(null!=e&&e.length){const{groups:a,activeGroup:o}=i();r(s([...a].map(e=>n(e)?{...e,...t}:e))),e.includes(null==o?void 0:o.id)&&n(o)&&r(d({...o,...t}))}}}function u(e=null){return(t,n)=>{let r;if(e){const{groups:i}=n();r=[...i];const a=r.findIndex(t=>t.id===e.id);r.splice(a,1),t(s(r))}}}function d(e=null){return{type:i,group:e}}function l(e=!0){return{type:a,loading:e}}n.d(t,["qj",0,i,"qk",0,a,"yI",0,r])},92082(e,t,n){n.d(t,{Mn:()=>d,vx:()=>u,zo:()=>c});var r=n(89449),i=n(73248);const a="SET_NOTIFICATION_CENTRE",s="SAVING_NOTIFICATION_CENTRE",o="SET_NOTIFICATION_CENTRE_ERROR";function c(e){return{type:a,preferences:e}}function u(){return(e,t)=>{const{auth:n,community:r}=t();n&&r&&i.W.getNotificationPreference(r.id,n).then(({preferences:t})=>{e(c(t))}).catch(e=>{})}}function d(e,t){return(n,a)=>{var u;const{notificationCentre:d}=a();let l=d.preferences;l||(l={tabs:[]});let m=null!==(u=l.tabs)&&void 0!==u?u:[],_=m.findIndex(t=>t.id===e.id);-1===_?m.push(e):m[_]=e,l.tabs=m,n(function(e,t){return(n,a)=>{const{auth:u,community:d}=a();n({type:s}),i.W.updateNotificationPreference(d.id,u,e).then(({preferences:e})=>{n(c(e)),t("Notification preferences updated successfully")}).catch(e=>{t("Error updating notification preferences","",r.lm.danger),n({type:o,error:e})})}}(l,t))}}n.d(t,["J$",0,a,"T",0,s,"wA",0,o])},88614(e,t,n){n.d(t,{dA:()=>i});n(24968);const r="SET_USER_COUNTERS";function i(e=0,t=0,n={}){return{type:r,unreadNotificationsCount:e,unreadMessagesCount:t,unreadSectionNotificationsCount:n}}n.d(t,["nh",0,r])},5607(e,t,n){n.d(t,{I8:()=>s,iz:()=>a});var r=n(24968);const i="SET_PERSONAL_GROUP";function a(e={}){return{type:i,group:e}}function s(){return(e,t)=>{const{auth:n}=t();r.Bd.getPersonalGroup(n).then(({group:t})=>{e(a(t))}).catch(e=>{})}}n.d(t,["Yj",0,i])},83380(e,t,n){n.d(t,{q:()=>i});const r="SET_SOCKET";function i(e=null){return{type:r,socket:e}}n.d(t,["P",0,r])},62856(e,t,n){n.d(t,{Di:()=>a,Vs:()=>o});const r="GET_COMMUNITY_LINKS",i="SET_COMMUNITY_LINKS";function a(e){return{type:i,links:e}}const s={isLoadingList:!1,links:[],errorMessage:null,updatingLinkId:null};function o(e=s,t){switch(t.type){case r:return{...e,isLoadingList:!0,links:[],errorMessage:null,updatingLinkId:null};case i:return{...e,isLoadingList:!0,links:t.links,errorMessage:null,updatingLinkId:null};default:return e}}},3766(e,t,n){n.d(t,{H0:()=>m,Ls:()=>c,rp:()=>u,uE:()=>d});var r=n(90945);const i="GET_HIGHLIGHTED_POSTS",a="SET_HIGHLIGHTED_POSTS",s="ADD_HIGHLIGHTED_POST",o="ADD_HIGHLIGHTED_POST_SUCCESS";function c(e){return{type:a,posts:e}}function u(e,t){return(n,i)=>{const{community:a}=i();n(function(e){return{type:s,postId:e}}(e)),r.g.highlightCommunityPost(null==a?void 0:a.id,e).then(r=>{const{highlightedPosts:i}=r,{posts:a}=i;n(c(a)),n(function(e){return{type:o,postId:e}}(e)),t()})}}function d(e,t){return(n,i)=>{const{community:a}=i();n(function(e){return{type:"REMOVE_HIGHLIGHTED_POST",postId:e}}(e)),r.g.unHighlightCommunityPost(null==a?void 0:a.id,e).then(e=>{const{highlightedPosts:r}=e,{posts:i}=r;n(c(i)),t()})}}const l={isLoadingList:!1,posts:[],postIds:[],errorMessage:null,updatingPostId:null};function m(e=l,t){var n;switch(t.type){case i:return{...e,isLoadingList:!0,posts:[],postIds:[],errorMessage:null};case a:return{...e,isLoadingList:!1,posts:t.posts,postIds:null===(n=t.posts)||void 0===n?void 0:n.map(e=>{var t;return null===(t=e.postData)||void 0===t?void 0:t.id}),errorMessage:null};case s:return{...e,updatingPostId:t.postId};case o:return{...e,updatingPostId:null};default:return e}}},47669(e,t,n){n.d(t,{B1:()=>m,Cv:()=>p,Ll:()=>_,P_:()=>g,Ys:()=>d,sc:()=>l});var r=n(24968);const i="ADD_SECTION_MESSAGE",a="UPDATE_SECTION_MESSAGE",s="REMOVE_SECTION_MESSAGE",o="UPDATE_SECTION_MESSAGE_REACTION",c="SET_SECTION_MESSAGES_SUCCESS",u="SET_SECTION_MESSAGES_LOADING";function d(e){return{type:i,message:e}}function l(e){return{type:a,message:e}}function m(e){return{type:s,messageId:e}}function _({messageId:e,emoji:t,status:n,user:r},i){return{type:o,messageId:e,emoji:t,status:n,user:r,authUser:i}}function p(e,t,n=!1){return(i,a)=>{const{sectionMessages:s,auth:o}=a(),{messages:d}=s,l=!n&&d.length>0?d[0].id:null;i(function(e=!0,t=!1){return{type:u,isLoading:e,clear:t}}(!0,n)),r.Bd.sectionMessagesTimestampPaginated(o,e,t,l).then(e=>{i(function(e,t){return{type:c,messages:e,clear:t}}(e.messages,n))})}}const h={messages:[],noMoreMessages:!1,isLoading:!1,isFirstLoading:!1};function g(e=h,t){switch(t.type){case u:return{...e,isLoading:t.isLoading,messages:t.clear?[]:e.messages,isFirstLoading:!!t.clear||e.isFirstLoading,...t.clear?{noMoreMessages:!1}:{},error:null};case c:{let n=!1;return(0===t.messages.length||t.messages.length<10)&&(n=!0),{...e,messages:[...t.messages.reverse(),...t.clear?[]:e.messages],noMoreMessages:n,isFirstLoading:!1,error:null,isLoading:!1}}case i:{const{message:n}=t,{messages:r}=e;let i=[...r];if(n.parent){d(n);const e=r.findIndex(e=>e.id===n.parent);e>-1&&(i=[...r],i[e].replies?i[e].replies.push(n):i[e].replies=[n])}else i=[...r,n];return{...e,messages:i}}case a:{const{message:n}=t,{messages:r}=e;let i=[...r];const a=r.findIndex(e=>e.id===n.id);return a>-1?i[a]={...n,reactions:i[a].reactions}:i=i.map(e=>(e.replies&&(e.replies=e.replies.map(t=>t.id===e.id?{...e,reactions:t.reactions}:t)),e)),{...e,messages:i}}case s:{const{messageId:n}=t,{messages:r}=e;let i=[...r];return i=-1===r.findIndex(e=>e.id===n)?i.map(e=>(e.replies&&(e.replies=e.replies.filter(e=>e.id!==n)),e)):r.filter(e=>e.id!==n),{...e,messages:i}}case o:{const{messageId:n,emoji:r,status:i,user:a,authUser:s}=t,{messages:o}=e,c=function(e,t,n=e=>e){let r=[...e];const i=e.findIndex(e=>e.id===t);r=-1===i?r.map(e=>(e.replies&&(e.replies=e.replies.map(e=>e.id===t?n(e):e)),e)):e.map(e=>e.id===t?n(e):e);return r}(o,n,e=>{const{total:t,details:n}=e.reactions;let o=!1,c=!1;const u=[...n],d=n.findIndex(e=>e.emoji===r);if(d<0)"updated"===i&&(u.push({emoji:r,count:1,users:[a],isByMe:s.id===a.id}),o=!0);else if("updated"===i){u[d].users.findIndex(e=>e.id===a.id)<0&&(u[d].users.push(a),u[d].count=u[d].count+1,u[d].isByMe=a.id===s.id,o=!0)}const l=u.findIndex(e=>e.emoji===r);let m=!1;for(let e=0;ee.id===a.id);t>-1&&(u[e].users.splice(t,1),u[e].count=u[e].count-1,u[e].false=a.id===s.id,u[e].isByMe=!1,o||(c=!0),o=!1,m=!u[e].users.length&&e)}return!1!==m&&u.splice(m,1),e.reactions={total:o?t+1:c?t-1:t,details:u},e});return{...e,messages:c}}default:return e}}},37081(e,t,n){n.d(t,{Ei:()=>h,UJ:()=>m,gg:()=>_});var r=n(16118),i=n(24968);const a="GET_POST_DETAIL_ACTION",s="GET_POST_DETAIL_SUCCESS",o="GET_POST_DETAIL_ERROR",c="UPDATE_POST_DETAIL";function u(){return{type:a}}const d=e=>({type:s,post:e}),l=(e,t)=>({type:o,error:e,statusCode:t});function m(e){return async t=>{t(u());const n=(0,r.ut)();try{const{post:r}=await i.K$.getPostDetail({token:n},e);t(d(r))}catch(e){t(l("Post could not be fetched!",e.response.status))}}}function _(e){return async(t,n)=>{const{community:a}=n();t(u());const s=(0,r.ut)();try{const{post:n}=await i.K$.getPostDetailFromSlug({token:s},a.id,e);t(d(n))}catch(e){t(l("Post could not be fetched!",e.response.status))}}}const p={post:null,isLoading:!1,error:null};function h(e=p,t){switch(t.type){case a:return{...e,isLoading:!0,post:null,error:null};case s:return{...e,isLoading:!1,post:t.post,error:null};case o:return{...e,isLoading:!1,post:null,error:t.error,statusCode:t.statusCode};case c:return{...e,isLoading:!1,post:t.post,error:null};default:return e}}n.d(t,["zM",0,e=>({type:c,post:e})])},34944(e,t,n){n.d(t,{p5:()=>d,JT:()=>m});var r=n(54295),i=n(78220),a=n(16118);class s{static async search(e,t=""){const n=encodeURIComponent(t);return r.A.get(i.vZ.misc.search(e)+"?search="+n,{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getMeetingData(e,t){return r.A.get(i.vZ.post.getMeetingData(t),{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}static async toggleMeetingRecording(e,t){return r.A.post(i.vZ.post.toggleMeetingRecording(e,t),{},{}).then(e=>e.data)}static async endTheMeeting(e,t){return r.A.get(i.vZ.post.endMeeting(e,t),{}).then(e=>e.data)}}const o="SET_SEARCH_REQUEST_LOADING",c="SEARCH_REQUEST_SUCCESS";function u(e){return{type:c,results:e}}function d(e=""){return(t,n)=>{if(!e)return t(u({}));const{community:r}=n();t({type:o,isLoading:!0}),s.search(null==r?void 0:r.id,e).then(e=>{t(u(e))})}}const l={results:null,isLoading:!1};function m(e=l,t){switch(t.type){case o:return{...e,isLoading:!0,results:null};case c:return{...e,isLoading:!1,results:t.results};default:return e}}},52041(e,t,n){n.d(t,{$8:()=>A,DG:()=>b,F9:()=>f,IY:()=>y,Q2:()=>k,ZA:()=>C,f8:()=>P,ty:()=>v,vq:()=>I,x:()=>g});var r=n(24968),i=n(51822);const a="ACTIVATE_SECTION",s="INCREASE_NEW_POST_COUNT",o="RESET_NEW_POST_COUNT",c="GET_SECTION_PINNED_POSTS",u="SET_SECTION_PINNED_POSTS",d="ADD_SECTION_PINNED_POST",l="REMOVE_SECTION_PINNED_POST",m="UPDATE_SECTION_PINNED_POST",_="GET_SECTION_POSTS",p="SET_SECTION_POSTS",h="SET_CURRENT_SECTION_POSTS";function g(e){return{type:a,section:e}}function y(e,t){return{type:s,sectionId:e,postId:t}}function f(e){return{type:o,sectionId:e}}function b(e){return{type:d,post:e}}function v(e){return{type:l,post:e}}function A(e){return{type:m,post:e}}function E(e,t,n){return t&&(t=t.map(e=>{var t;return{...e,comments:null!==(t=e.comments)&&void 0!==t?t:[]}})),{type:p,posts:t,sectionId:e,pageNo:n}}function k(e){return{type:h,posts:e}}function P(e,t){return async n=>{n(function(e){return{type:c,sectionId:e}}(t));const{posts:i}=await r.Bd.sectionPostsPinned(e,t);n(function(e,t){return{type:u,posts:t,sectionId:e}}(t,i))}}function C(e,t,n,i=1){return async(a,s)=>{const{sections:o}=s();if(!o.sections[t].isLoadingMorePosts){a(function(e,t){return{type:_,sectionId:e,pageNo:t}}(t,i));try{const{posts:s,page:o}=await r.Bd.sectionPostsPaginated(e,t,i,n);a(E(t,s,o))}catch(e){a(E(t,[],i))}}}}const M={activeSectionId:null,sections:{}},x={isLoadingPinnedList:!1,pinnedPosts:[],pinnedErrorMessage:null,isLoadingPosts:!1,posts:[],currentPage:1,newPostCount:0,errorMessage:null,isLoadingMorePosts:!1,noMorePosts:!1};function I(e=M,t){switch(t.type){case a:{const{section:n}=t;if(n){const t={...e};return n.id in e.sections?t.sections[n.id]={...t.sections[n.id],...n}:t.sections[n.id]={...x,...n},t.activeSectionId=n.id,t}return{...e,activeSectionId:null}}case s:{const{sectionId:n,postId:r}=t,i={...e};return i.sections[n].posts.find(e=>e.id===r)||i.sections[n].pinnedPosts.find(e=>e.id===r)||(i.sections[n]={...x,...i.sections[n],newPostCount:i.sections[n].newPostCount+1}),i}case o:{const{sectionId:n}=t,r={...e};return r.sections[n]={...x,...r.sections[n],newPostCount:0},r}case c:{const{sectionId:n}=t,r={...e};return r.sections[n]={...x,...r.sections[n],isLoadingPinnedList:!0,pinnedPosts:[],pinnedErrorMessage:null},r}case u:{const{posts:n,sectionId:r}=t,i={...e};return i.sections[r]={...x,...i.sections[r],isLoadingPinnedList:!1,pinnedPosts:n,pinnedErrorMessage:null},i}case d:{const{post:n}=t,r={...e},{id:i,tabId:a}=n,s=[...r.sections[a].pinnedPosts];return s.find(e=>e.id===i)?e:(r.sections[a]={...x,...r.sections[a],pinnedPosts:[...s,n]},r)}case l:{const{post:n}=t,r={...e},{id:i,tabId:a}=n,s=[...r.sections[a].pinnedPosts],o=s.findIndex(e=>e.id===i);return-1===o?e:(s.splice(o,1),r.sections[a]={...x,...r.sections[a],pinnedPosts:s},r)}case m:{const{post:n}=t,r={...e},{id:i,tabId:a}=n,s=[...r.sections[a].pinnedPosts],o=s.findIndex(e=>e.id===i);return-1===o?e:(s.splice(o,1,n),r.sections[a]={...x,...r.sections[a],pinnedPosts:s},r)}case _:{const{sectionId:n,pageNo:r}=t,i={...e};return i.sections[n]={...x,...i.sections[n],isLoadingPosts:1===r,postsLoadingState:1===r?"":null,posts:r&&1!==r?i.sections[n].posts:[],noMorePosts:!1,errorMessage:null,isLoadingMorePosts:!(!r||1===r)},i}case p:{const{posts:n,sectionId:r,pageNo:i}=t,a={...e};return a.sections[r]={...x,...a.sections[r],isLoadingPosts:!1,currentPage:i,posts:i&&1!==i?[...a.sections[r].posts,...n]:n,errorMessage:null,noMorePosts:!(null!=n&&n.length)||(null==n?void 0:n.length)<10,isLoadingMorePosts:!1},a}case h:{const{posts:n}=t,{activeSectionId:r}=e,i={...e};return i.sections[r]={...x,...i.sections[r],posts:n},i}case i.bo:return(0,i.b)(e,t);case i.xr:return(0,i.Q6)(e,t);case i.yg:return(0,i.BS)(e,t);case i.z3:return(0,i.fs)(e,t);default:return e}}},51822(e,t,n){n.d(t,{F9:()=>u,Im:()=>o,Lj:()=>l,cG:()=>m,qH:()=>a});var r=n(16118);const i="SECTION_POST_LIKE_REALTIME_INCREMENT";function a(e){return{type:i,socketPayload:e}}const s="SECTION_POST_COMMENT_REALTIME_ADD";function o(e){return{type:s,socketPayload:e}}const c="SECTION_POST_COMMENT_REALTIME_REMOVE";function u(e){return{type:c,socketPayload:e}}const d="SECTION_POST_COMMENT_REALTIME_REACTION_UPDATE";function l(e){return{type:d,socketPayload:e}}function m(e,t,n){for(let t=0;te.id===n.id)>-1&&(e.reactions.details[t].users=e.reactions.details[t].users.filter(e=>e.id!==n.id),e.reactions.details[t].count-=1,e.reactions.details[t].count<1&&e.reactions.details.splice(t,1),e.reactions.total-=1)}if(t){const r=e.reactions.details.findIndex(e=>e.emoji===t);-1===r?e.reactions.details.push({count:1,isByMe:!1,emoji:t,users:[n]}):(e.reactions.details[r].count+=1,e.reactions.details[r].users.push(n)),e.reactions.total+=1}return e}function _(e,t,n=e=>{}){const r=t.tab,i=t.id,a=structuredClone(e);return a.sections[r]?(a.sections[r].posts=a.sections[r].posts.map(e=>e.id===i?n(e):e),a.sections[r].pinnedPosts=a.sections[r].pinnedPosts.map(e=>e.id===i?n(e):e),a):e}n.d(t,["BS",0,(e,t)=>function(e,t){const{postId:n,sectionId:r,groupId:i,postCommentId:a}=t;return _(e,{id:n,tab:r},e=>{var t,n;const r={...e};(null===(t=r.latestComment)||void 0===t?void 0:t.id)===a&&(r.latestComment=null);return(null===(n=r.comments)||void 0===n?void 0:n.find(e=>e.id===a))&&(r.commentCount=e.commentCount-1,r.comments=r.comments.filter(e=>e.id!==a)),r})}(Object.assign({},e),t.socketPayload),"Q6",0,(e,t)=>function(e,t){const{postId:n,sectionId:i,groupId:a,postCommentId:s,comment:o}=t,{createdBy:c}=o;if((0,r.mZ)()===(null==c?void 0:c.id))return e;return _(e,{id:n,tab:i},e=>{const t={...e};return t.commentCount=e.commentCount+1,t.latestComment=o,Array.isArray(t.comments)&&t.comments.unshift(o),t})}(Object.assign({},e),t.socketPayload),"b",0,(e,t)=>function(e,t){const{user:n,increment:i,postId:a,sectionId:s,groupId:o}=t;if((0,r.mZ)()===(null==n?void 0:n.id))return e;return _(e,{id:a,tab:s},e=>{const t={...e};return t.likes+=i,t.likeCount+=i,t})}(Object.assign({},e),t.socketPayload),"bo",0,i,"fs",0,(e,t)=>function(e,t){const{postId:n,sectionId:i,groupId:a,postCommentId:s,reaction:o,user:c}=t;if((0,r.mZ)()===(null==c?void 0:c.id))return e;return _(e,{id:n,tab:i},e=>{var t,n;const r={...e};(null===(t=r.latestComment)||void 0===t?void 0:t.id)===s&&(r.latestComment=m(r.latestComment,o,c));const i=null===(n=r.comments)||void 0===n?void 0:n.findIndex(e=>e.id===s);return i>-1&&(r.comments[i]=m(r.comments[i],o,c)),r})}(Object.assign({},e),t.socketPayload),"xr",0,s,"yg",0,c,"z3",0,d])},52853(e,t,n){var r=n(20975);n(62391);const i=r.createContext(null);n.d(t,["B",0,i])},89449(e,t,n){var r=n(72783),i=n.n(r),a=n(20975),s=n(62270),o=n(62391);const c=a.createContext(null),u=e=>t=>(0,o.jsx)(c.Consumer,{children:n=>(0,o.jsx)(e,{...n,...t})}),d=u(({toasts:e,removeToast:t})=>{const n=e=>{switch(e){case"danger":return"bg-red-300 text-white";case"success":default:return"bg-green-300 text-green-900";case"info":return"bg-blue-300 text-blue-900";case"warning":return"bg-orange-300 text-orange-900"}};return(0,o.jsx)("div",{className:"ToastNotifier",children:e.map(e=>(0,o.jsxs)("div",{className:i()("toast mt-2 flex rounded px-4 py-2",n(e.type),{"cursor-pointer":e.onClick}),onClick:n=>{e.onClick&&e.onClick(n=>{t(e)})},children:[(0,o.jsxs)("div",{className:"toast-body flex-grow",children:[(0,o.jsx)("div",{className:"toast-title",children:e.title}),(0,o.jsx)("div",{className:"toast-message",children:e.message})]}),(0,o.jsx)("div",{className:"toast-delete flex-shrink-0",onClick:()=>{t(e)},children:"×"})]},e.timestamp))})});n.d(t,["$o",0,c,"lm",0,{danger:"danger",success:"success",warning:"warning",info:"info"},"q5",0,d,"tE",0,e=>{const[t,n]=(0,a.useState)([]),r=(0,s.A)(),i=e=>{const r=[...t];r.splice(r.find(t=>t.timestamp===e.timestamp),1),n(r)};return(0,o.jsx)(c.Provider,{value:{toasts:t,addToast:(e="",a="",s="",o=3e3)=>{const c={title:e=r.trans(e),message:a=r.trans(a),type:s,timestamp:(new Date).getTime()};n([...t,c]),setTimeout(()=>{t.findIndex(e=>e.timestamp===c.timestamp)&&i(c)},o)},addToastWithAction:({title:e="",message:r="",type:a="",time:s=3e3,onClick:o=()=>{}})=>{const c={title:e,message:r,type:a,timestamp:(new Date).getTime(),onClick:o};n([...t,c]),setTimeout(()=>{t.findIndex(e=>e.timestamp===c.timestamp)&&i(c)},s)},removeToast:i},children:e.children})},"wj",0,u])},62270(e,t,n){n.d(t,{A:()=>a});var r=n(20975),i=n(52853);function a(){const{lang:e}=(0,r.useContext)(i.B);return e}},83873(e,t,n){var r=n(20975),i=n(81539),a=n(31305),s=n(3656),o=n(28836),c=n(49852),u=n(52853),d=n(89449);const l=e=>{e&&e instanceof Function&&n.e(4124).then(n.bind(n,34124)).then(({getCLS:t,getFID:n,getFCP:r,getLCP:i,getTTFB:a})=>{t(e),n(e),r(e),i(e),a(e)})};var m=n(54295);n(26914);const _=Object.freeze({HIGH:0,NORMAL:1,LOW:2}),p=["/community/","/auth/","/groups-and-counters","/user/profile","/groups"];let h=0;const g=[[],[],[]],y=new Map;function f(){h--,function(){for(;h<6;){const e=g.find(e=>e.length>0);if(!e)break;const{resolve:t}=e.shift();h++,t()}}()}function b(e){return e.method&&"get"!==e.method.toLowerCase()?null:e.url||null}function v(e){e.interceptors.request.use(async e=>{var t;const n=null!==(t=e.priority)&&void 0!==t?t:(r=e.url)&&p.some(e=>r.includes(e))?_.HIGH:_.NORMAL;var r;const i=b(e);if(i&&y.has(i)){const t=await y.get(i);return e._dedupedResponse=t,e}return await function(e=_.NORMAL){return h<6?(h++,Promise.resolve()):new Promise(t=>{g[e].push({resolve:t})})}(n),e}),e.interceptors.response.use(e=>{if(e.config._dedupedResponse)return{...e,data:e.config._dedupedResponse.data};const t=b(e.config);return t&&y.delete(t),f(),e},e=>{if(e.config&&!e.config._dedupedResponse){const t=b(e.config);t&&y.delete(t),f()}return Promise.reject(e)})}var A=n(16118);const E={fetcher:e=>m.A.get(e,{headers:{Authorization:"Bearer "+(0,A.ut)()}}).then(e=>e.data),dedupingInterval:2e3,revalidateOnFocus:!1,shouldRetryOnError:!0,errorRetryCount:3};var k=n(68197);n(91965);class P{constructor(e="EN"){this.languageCode="EN"}trans(e){return e}}var C=n(54479),M=n(62391);v(m.A),m.A.interceptors.response.use(void 0,function(e){return e.response&&e.response.status,e.response&&503===e.response.status&&(window.location.pathname.includes("/service-unavailable")||(window.location.href="/service-unavailable")),Promise.reject(e)});const x=(0,a.Ng)(e=>({community:e.community}))(({community:e})=>{const t=new P;return(0,M.jsx)(u.B.Provider,{value:{lang:t},children:(0,M.jsx)(c.A,{children:(0,M.jsx)(d.tE,{children:(0,M.jsx)(o.A,{})})})})}),I=document.getElementById("root");(0,i.H)(I).render((0,M.jsx)(a.Kq,{store:k.M,children:(0,M.jsx)(s.BE,{value:E,children:(0,M.jsx)(r.StrictMode,{children:(0,M.jsx)(C.A,{children:(0,M.jsx)(x,{})})})})}));const O=document.getElementById("root"),T=document.getElementById("loader"),L=document.getElementById("lcp-placeholder");requestAnimationFrame(()=>{O&&O.classList.add("ready"),T&&(T.style.display="none"),L&&(L.style.display="none")});try{const e=JSON.parse(localStorage.getItem("pensil.theme.cache"));if(null!=e&&e.css){const t=document.createElement("style");t.id="cached-theme-style",t.textContent=e.css,document.head.appendChild(t)}}catch(e){}l()},63360(e,t,n){n.d(t,{J:()=>o});var r=n(72783),i=n.n(r),a=n(3005),s=n(62391);function o({onClick:e=e=>{},className:t,size:n="md",type:r="general"}){return(0,s.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),e&&e(t)},className:(0,a.cn)(i()("group inline-flex items-center justify-center gap-2 justify-self-center rounded-full","transition duration-300 focus-visible:outline-none active:scale-95",{"h-4 w-4":"xs"===n,"h-6 w-6":"sm"===n,"h-10 w-10":"md"===n,"h-14 w-14":"lg"===n},{"text-primary hover:bg-primary-light":"primary"===r,"text-secondary-foreground/85 hover:bg-background":"general"===r},t)),"aria-label":"close dialog",children:(0,s.jsx)("span",{className:"relative only:-mx-5",children:(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:i()("",{"h-3 w-3":"xs"===n,"h-4 w-4":"sm"===n,"h-5 w-5":"md"===n,"h-7 w-7":"lg"===n}),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",role:"img","aria-labelledby":"title-79 desc-79",children:[(0,s.jsx)("title",{id:"title-79",children:"Icon title"}),(0,s.jsx)("desc",{id:"desc-79",children:"A more detailed description of the icon"}),(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})]})})})}},3005(e,t,n){n.d(t,{$:()=>d,cn:()=>u});var r=n(72783),i=n.n(r),a=n(98860),s=n(53871),o=n(19328),c=n(62391);function u(...e){return(0,a.Q)(i()(e))}function d({icon:e=null,label:t="Button",disabled:n=!1,isLoading:r=!1,outlined:a=!1,large:d=!1,className:l="",isCancelType:m=!1,flat:_=!1,btnColor:p="",type:h,onClick:g=e=>{}}){let y="bg-primary border border-primary text-primary-foreground";return _&&(y="border border-border text-primary hover:border-primary"),"red"===p&&(y="bg-alert border-alert text-alert-foreground hover:bg-alert-hover"),m&&(y="bg-card border-border border"),(0,c.jsx)("button",{type:h,disabled:n,className:u(i()("word-breaker select-none border border-border font-semibold hover:shadow focus:outline-none",{"cursor-not-allowed border-primary text-primary hover:shadow-none":n&&a,"border-primary text-primary":!n&&a,"theme-bg-disable cursor-not-allowed text-secondary-foreground/70 hover:shadow-none":n&&!a,[y]:!n&&!a,"rounded px-3 py-1":!d,"rounded px-6 py-2":d,"px-4 py-2":m,"cursor-progress":r&&!n}),l),onClick:e=>{if(r||n)return null;g(e)},children:(0,c.jsxs)("span",{className:"flex place-content-center items-center whitespace-normal",children:[r?(0,c.jsx)("span",{className:"mr-1",children:(0,c.jsx)(o.a,{spinnerColor:"var(--theme-on-primary-color)",size:20})}):null,e&&(0,c.jsx)("span",{className:"mr-2",children:e}),(0,c.jsx)("span",{children:(0,c.jsx)(s.A,{children:t})})]})})}},69302(e,t,n){n.d(t,{z:()=>o});var r=n(20975);class i{static getFileSizeInMB(e){return e&&e.size?e.size/1048576:null}static sizeGreaterThan(e,t){const n=this.getFileSizeInMB(e);return null!==n&&n>t}static sizeLessThan(e,t){const n=this.getFileSizeInMB(e);return null!==n&&n{},children:n,className:o="",disabled:c=!1,multiple:u=!1,maxFiles:d,maxFileSize:l}){const m=r.useRef(null),_=async e=>{if(e&&null!==e&&e.target&&e.target.files)if(e.stopPropagation(),e.preventDefault(),e.target.files.length>0){if(!function(){var e;if(!d)return!0;const t=null===(e=m.current)||void 0===e?void 0:e.files;if(a.A.hasValue(t)&&t.length>d)return alert(`You can only select ${d} files`),!1;return!0}())return;if(!function(){var e;if(!l)return!0;const t=null===(e=m.current)||void 0===e?void 0:e.files;if(a.A.hasValue(t))for(let e=0;e{var e;c||(null===(e=m.current)||void 0===e||e.click())},children:[(0,s.jsx)("input",{className:"hidden",accept:e,disabled:c,type:"file",ref:m,multiple:u,onChange:e=>{_(e)}}),n]})}},90559(e,t,n){var r=n(72783),i=n.n(r),a=n(62144),s=n(62391);const o=function({icon:e,onClick:t,className:n,iconClass:r="",label:o,solid:c=!1,hoverable:u,size:d="xl",unreadCount:l=0}){return(0,s.jsxs)("div",{onClick:e=>{null!=t&&t(e)},className:i()(`relative flex h-4 cursor-pointer place-content-center items-center rounded-full ${n}`,{"hover:shadow":u}),children:[(0,s.jsx)(a.A,{icon:e,className:` ${r} `,solid:c,size:d}),o&&(0,s.jsx)("span",{className:"ml-1 text-xs",children:o}),l>0&&(0,s.jsx)("span",{className:"absolute -top-[10px] left-[9px] flex h-[15px] w-[15px] place-content-center items-center rounded-full bg-primary p-[3px] text-[10px] text-primary-foreground",children:l})]})};n.d(t,["A",0,o])},32845(e,t,n){n.d(t,{A:()=>m});var r=n(20975),i=(n(32493),n(53871)),a=n(3005),s=n(90559),o=n(91900),c=n(32166);const u=Math.PI/180;n(50360);var d=n(62391);function l({imgSrc:e,previewCanvasRef:t,aspectRatio:n=16/9}){const i=(0,r.useRef)(null),[a,s]=(0,r.useState)(),[o,l]=(0,r.useState)();var m,_,p;return m=async()=>{null!=o&&o.width&&null!=o&&o.height&&i.current&&t.current&&async function(e,t,n,r=1,i=0){const a=t.getContext("2d");if(!a)throw new Error("No 2d context");const s=e.naturalWidth/e.width,o=e.naturalHeight/e.height,c=window.devicePixelRatio;t.width=Math.floor(n.width*s*c),t.height=Math.floor(n.height*o*c),a.scale(c,c),a.imageSmoothingQuality="high";const d=n.x*s,l=n.y*o,m=i*u,_=e.naturalWidth/2,p=e.naturalHeight/2;a.save(),a.translate(-d,-l),a.translate(_,p),a.rotate(m),a.scale(r,r),a.translate(-_,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore()}(i.current,t.current,o,1,0)},_=100,p=[o,1,0],(0,r.useEffect)(()=>{const e=setTimeout(()=>{m.apply(void 0,p)},_);return()=>{clearTimeout(e)}},p),(0,d.jsxs)("div",{children:[!!e&&(0,d.jsx)(c.Ay,{crop:a,onChange:(e,t)=>s(t),onComplete:e=>l(e),aspect:n,children:(0,d.jsx)("img",{loading:"lazy",ref:i,alt:"Crop me",src:e,style:{transform:"scale(1) rotate(0deg)"},onLoad:function(e){if(n){const{width:a,height:o}=e.currentTarget;s((t=a,r=o,i=n,(0,c.ge)((0,c.dS)({unit:"%",width:90},i,t,r),t,r)))}var t,r,i}})}),!!o&&(0,d.jsx)("div",{className:"hidden",children:(0,d.jsx)("canvas",{ref:t,style:{objectFit:"contain",width:o.width,height:o.height}})})]})}const m=function({src:e,setPicture:t=()=>{},aspectRatio:n=16/9,setPictureSelected:c=()=>{},cropRatioMessage:u,activeCrop:m=!1,setActiveCrop:_=()=>{}}){const[p,h]=(0,r.useState)(null),[g,y]=r.useState({aspect:n,unit:"%",width:100,height:100}),[f,b]=r.useState(1),v=(0,r.useRef)(null),[A,E]=(0,r.useState)();function k(e){let t=atob(e.split(",")[1]),n=(e.split(",")[0].split(":")[1].split(";")[0],new ArrayBuffer(t.length)),r=new Uint8Array(n);for(let e=0;e{_(!1),h(null)}})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"flex max-h-[calc(80vh)] justify-center overflow-y-auto border-y border-border bg-background px-5 py-5 sm:max-h-max",children:(0,d.jsx)(l,{imgSrc:e,previewCanvasRef:v,aspectRatio:n})}),(0,d.jsxs)("div",{className:"flex items-center justify-between px-5 py-3",children:[u?(0,d.jsx)("p",{className:"theme-heading-2 font-semibold",children:(0,d.jsx)(i.A,{children:u})}):(0,d.jsx)("div",{}),(0,d.jsx)(a.$,{type:"button",onClick:e=>{!function(){if(v.current)try{const e=k(v.current.toDataURL("image/jpeg"));t(e),c(!0),_(!1),h(null)}catch(e){v.current.toBlob(e=>{e&&(t(e),c(!0),_(!1),h(null))})}}()},label:"Crop Image"})]})]})]})})})}},93591(e,t,n){n.d(t,{g:()=>a});var r=n(3005),i=n(62391);function a({children:e,className:t}){return(0,i.jsx)("div",{className:(0,r.cn)("MaxWrapper mx-auto flex w-full max-w-[1920px] flex-col px-0",t),children:e})}},84003(e,t,n){var r=n(72783),i=n.n(r),a=(n(20975),n(62391));n.d(t,["B",0,({items:e,renderItem:t,noItemsElement:n,footerElement:r,placeholder:i,className:s,loading:o=!1})=>o?i&&(0,a.jsx)(a.Fragment,{children:i}):e&&null!==e&&0!==e.length&&null!==e&&Array.isArray(e)&&0!==e.length?e.map((e,n)=>t(e,n)):(0,a.jsx)(a.Fragment,{children:n&&n}),"u",0,({items:e,reversedOrder:t=!1,renderItem:n,noItemsElement:r,footerElement:s,placeholder:o,className:c,loading:u=!1,sortBy:d,onScroll:l,ref:m,style:_={}})=>u?o?(0,a.jsx)(a.Fragment,{children:o}):null:e&&null!==e&&0!==e.length?(d&&e&&e.length>0&&e.sort(d),(0,a.jsxs)("div",{ref:m,style:_,className:i()("ListView",(null==e?void 0:e.length)>0?c:""),onScroll:l,children:[(t?[...e].reverse():e).map((e,t)=>(0,a.jsx)("div",{children:n(e,t)},t)),s&&s]})):r?(0,a.jsxs)(a.Fragment,{children:[r,s&&s]}):null])},62144(e,t,n){var r=n(72783),i=n.n(r),a=(n(20975),n(3005)),s=n(62391);const o=function({icon:e,className:t="",solid:n=!1,size:r="md"}){return(0,s.jsx)("i",{className:(0,a.cn)(i()("",{[`fi-rr-${e}`]:!n,[`fi-sr-${e}`]:n,[`text-${r}`]:r}),t)})};n.d(t,["A",0,o])},50520(e,t,n){var r=n(54295),i=n(78220),a=n(16118);const s={getLiveCallsByCommunity:async e=>(await r.A.get(i.vZ.liveCall.getAllByCommunity(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}})).data,createLiveCall:async(e,t,n,s,o,c,u)=>{const d=new FormData;d.append("name",t),d.append("type",n),d.append("description",s),d.append("invitedSections",JSON.stringify(o)),d.append("scheduledTime",c),u&&d.append("banner",u);return(await r.A.post(i.vZ.liveCall.createLiveCall(e),d,{headers:{Authorization:"Bearer "+(0,a.ut)(),"Content-Type":"multipart/form-data"}})).data}};n.d(t,["c",0,s])},53322(e,t,n){n.d(t,{u:()=>a});var r=n(54295),i=n(78220);class a{static async uploadMedia(e,t,n,a){const s=new FormData;return null==n||n.forEach(e=>{s.append(`${a}s[]`,e,e.fileName)}),r.A.post(i.vZ.media.uploadMedia(t,a),s,{headers:{Authorization:"Bearer "+e.token}}).then(e=>e.data)}}},81475(e,t,n){n.d(t,{n:()=>s});var r=n(54295),i=n(78220),a=n(16118);class s{static async createSubscription(e,t){return r.A.post(i.vZ.subscription.createSubscription(e),t,{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async updateSubscription(e,t,n){return r.A.post(i.vZ.subscription.updateSubscription(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async cancelSubscription(e){return r.A.delete(i.vZ.subscription.cancelSubscription(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async deleteSubscription(e,t){return r.A.delete(i.vZ.subscription.deleteSubscription(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getAllSubscriptions(e){return r.A.get(i.vZ.subscription.getAllSubscriptions(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getMySubscription(e){return r.A.get(i.vZ.subscription.getMySubscription(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getAllSubscriptionsAdmin(e){return r.A.get(i.vZ.subscription.getAllSubscriptionsAdmin(e),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getActiveSubscriptionsForSubscription(e,t){return r.A.get(i.vZ.subscription.getActiveSubscriptionsForSubscription(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getPreviousSubscriptionsForSubscription(e,t){return r.A.get(i.vZ.subscription.getPreviousSubscriptionsForSubscription(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getSubscriptionDetails(e,t){return r.A.get(i.vZ.subscription.getSubscriptionDetails(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getAllSubscriptionMembers(e,t){return r.A.get(i.vZ.subscription.getAllSubscriptionMembers(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async getAllMembershipSubscription(e,t){return r.A.get(i.vZ.subscription.getAllMembershipSubscription(e,t),{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async subscribeToFreePlan(e,t){return r.A.post(i.vZ.subscription.freeSubscribe(e,t),{},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async initiateSubscription(e,t,n){return r.A.post(i.vZ.subscription.initiateSubscription(e,t),{billingDetails:n},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async resendInvoice(e,t){return r.A.post(i.vZ.subscription.resendInvoice(e,t),{},{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}static async editInvoice(e,t,n){return r.A.post(i.vZ.subscription.editInvoice(e,t),n,{headers:{Authorization:"Bearer "+(0,a.ut)()}}).then(e=>e.data)}}},2155(e,t,n){n.d(t,{Em:()=>o,m5:()=>c});var r=n(50963),i=n(24968);const a="SET_COMMUNITY_POST_TIMER_LIMIT",s="SET_LAST_POST_CREATED_TIME";function o(e){return{type:s,lastPostCreatedTime:e}}function c(){return async(e,t)=>{try{var n;const{auth:s,community:o,post:c}=t();if(!s||!o)return;const u=await i.BE.getConfigurable(o.id,r.A.COMMUNITY_POST_TIMER_LIMIT),d=Number(null==u||null===(n=u.configurable)||void 0===n?void 0:n.configurableValue)||0;e({type:a,postTimerLimit:d})}catch(e){}}}n.d(t,["Ks",0,s,"_n",0,a])},30493(e,t,n){n.d(t,{_K:()=>s});var r=n(24968);const i="SET_KARMA_POINT",a="ADD_KARMA_POINT";function s(){return async(e,t)=>{try{const{auth:n,community:a,karmaPoints:s}=t();if(!n||!a)return;if(s&&s.communityId===a.id)return;r.BE.getMyLeaderboardScore(a.id).then(t=>{var n;e((n={...t,communityId:a.id},{type:i,obj:n}))}).catch(e=>{})}catch(e){}}}n.d(t,["AL",0,(e,t)=>({type:a,points:e,activityType:t}),"E",0,i,"Jv",0,a])},57405(e,t,n){n.d(t,{OE:()=>u});var r=n(24968);const i="SET_TOPICS",a="ADD_TOPIC",s="EDIT_TOPIC",o="ARCHIVE_TOPIC",c="DELETE_TOPIC";function u(){return async(e,t)=>{try{const{auth:n,community:a}=t();if(!n||!a)return;r.BE.getAllCommunityTopics(a.id).then(t=>{var n;e((n=t.topics,{type:i,obj:n}))}).catch(e=>{})}catch(e){}}}n.d(t,["A8",0,e=>({type:o,topicId:e}),"AA",0,e=>({type:s,topic:e}),"I2",0,c,"L4",0,e=>({type:c,topicId:e}),"Ll",0,s,"Ml",0,a,"R4",0,o,"Up",0,i,"x_",0,e=>({type:a,topic:e})])},1071(e,t,n){n.d(t,{F:()=>a});var r=n(24452);const i={list:[],status:"idle"};function a(e=i,t){var n;switch(t.type){case r.at:return{list:t.courses,status:null!==(n=t.status)&&void 0!==n?n:e.status};case r.pG:return{...e,status:t.status};default:return e}}},24452(e,t,n){n.d(t,{OM:()=>o});var r=n(24968);const i="SET_COURSES",a="SET_COURSE_LOADING_STATUS";function s(e){return{type:a,status:e}}function o(){return async(e,t)=>{try{const{community:n}=t();if(!n)return;e(s("loading")),r.fk.getAllCourses(n.id).then(({courses:t})=>{e(function(e,t){return{type:i,courses:e,status:t}}(t,"success"))}).catch(t=>{e(s("error"))})}catch(e){}}}n.d(t,["at",0,i,"pG",0,a])},68197(e,t,n){n.d(t,{M:()=>F});var r=n(82993),i=n(14120),a=n(30493);const s={breakdown:null,communityBasePoints:0,addedPoints:0};var o=n(62856),c=n(1071),u=n(3766),d=n(16653);const l={liveCalls:null};var m=n(47669),_=n(37081),p=n(9888);const h={paymentPreference:{preference:{integrationStatus:"not-set",bankAccount:{bankAccountNumber:void 0,beneficiaryName:void 0,ifscCode:void 0,businessName:void 0,businessType:void 0},paymentMethod:"not-set",razorpay:{razorpayId:void 0}},status:"idle"},invoicePreference:{preference:{integrationStatus:"not-set"},status:"idle"}};var g=n(46997);const y={count:{}};var f=n(34944),b=n(52041),v=n(98130);const A={};var E=n(94714);const k={subscriptions:[]};var P=n(77255);var C=n(42414);var M=n(41153);const x={liveSession:!0,paidGroup:!0,sso:!0,analytics:!0,customDomain:!0,embedSection:!0,welcomeMessage:!0,leaderboard:!0,communityCustomization:!0,zapierIntegration:!0,hidePoweredByPensil:!0,favicon:!0,whiteLabelMobileApp:!0,linkPaymentGateway:!0,moderation:!0,bulkEmailing:!0,bulkImport:!0,bulkExport:!0,apiKeysAccess:!0,customCodeSnippets:!0};var I=n(41374);const O={isLoading:!1,isInitialLoadComplete:!1,error:null,users:[]};var T=n(93668);var L=n(92082);const D={isLoading:!0,isUpdating:!1,preferences:void 0,error:void 0};var B=n(88614);var w=n(5607);var S=n(83380);var j=n(2155);const U={postTimerLimit:null,lastPostCreatedTime:null};var N=n(57405);const R={topics:[]};var z=n(21419);const $=(0,r.HY)({auth:function(e=null,t){switch(t.type){case P.A2:return t.user;case P.qj:return null;default:return e}},groups:function(e=[],t){return t.type===T.yI?t.groups:e},isLoadingGroups:function(e=!0,t){return t.type===T.qk?t.loading:e},activeGroup:function(e=null,t){return t.type===T.qj?t.group:e},community:function(e=null,t){return t.type===C.hQ?t.community:e},notifications:function(e=[],t){if(t.type===B.nh){const n=t.unreadMessagesCount,r=t.unreadNotificationsCount,i=t.unreadSectionNotificationsCount;return{...e,unreadMessagesCount:n,unreadNotificationsCount:r,unreadSectionNotificationsCount:i}}return e},personalGroup:function(e={},t){return t.type===w.Yj?t.group:e},post:function(e=U,t){switch(t.type){case j._n:return{...e,postTimerLimit:t.postTimerLimit};case j.Ks:return{...e,lastPostCreatedTime:t.lastPostCreatedTime};default:return e}},socket:function(e=null,t){return t.type===S.P?t.socket:e},directMessages:function(e=O,t){switch(t.type){case I.J0:return{...e,isLoading:!0,isInitialLoadComplete:!0,error:null,users:[]};case I.Fy:return{...e,isLoading:!1,error:null,users:t.users};case I.u6:return{...e,isLoading:!1,error:t.error,users:[]};case I.Bs:{let n=e.users.find(e=>void 0!==e&&e.id===t.user.id);return{...e,users:void 0!==n?e.users:[...e.users,t.user]}}case I.TP:return{...e,users:e.users.map(e=>e.id===t.chat.id?{...e,unreadMessageCount:0}:e)};default:return e}},notificationCentre:function(e=D,t){switch(t.type){case L.J$:return{isLoading:!1,isUpdating:!1,error:void 0,preferences:t.preferences};case L.T:return{...e,error:void 0,isUpdating:!0};case L.wA:return{...e,error:t.error,isUpdating:!1};default:return e}},communityPac:function(e=x,t){return t.type===M.u?t.pac:e},sectionMessages:m.P_,search:f.JT,highlightedPosts:u.H0,liveCall:function(e=l,t){var n;switch(t.type){case d.kz:return{liveCalls:t.payload};case d.Yh:return(null===(n=e.liveCalls)||void 0===n?void 0:n.some(e=>e.id===t.payload.id))?{...e}:{...e,liveCalls:e.liveCalls?[...e.liveCalls,t.payload]:[t.payload]};case d.IU:return{...e,liveCalls:e.liveCalls?e.liveCalls.filter(e=>e.id!==t.payload.id):e.liveCalls};default:return e}},sections:b.vq,postDetail:_.Ei,communityKarmaPoints:function(e=s,t){switch(t.type){case a.E:return t.obj;case a.Jv:return{...e,addedPoints:t.points,activityType:t.activityType};default:return e}},onboardingChecklist:z.st,communityTopics:function(e=R,t){switch(t.type){case N.Up:return{...e,topics:t.obj};case N.Ml:return{...e,topics:[...e.topics,t.topic]};case N.Ll:return{topics:e.topics.map(e=>e.id===t.topic.id?{...e,...t.topic}:e)};case N.R4:case N.R4:const n=e.topics.find(e=>e.id.toString()===t.topicId.toString());if(n){n.status="ARCHIVED"===n.status?"ACTIVE":"ARCHIVED";const r=e.topics.filter(e=>e.id.toString()!==t.topicId.toString()).concat(n).sort((e,t)=>"ACTIVE"===e.status&&"ARCHIVED"===t.status?-1:"ARCHIVED"===e.status&&"ACTIVE"===t.status?1:t.postCount-e.postCount);return{...e,topics:r}}return e;case N.I2:return{topics:e.topics?e.topics.filter(e=>{var n,r;return(null===(n=e.id)||void 0===n?void 0:n.toString())!==(null===(r=t.topicId)||void 0===r?void 0:r.toString())}):e.topics};default:return e}},subscriptionsPlan:function(e=k,t){return t.type===E.jn?t.subscriptions:e},mySubscription:function(e=A,t){return t.type===v.UP?t.mySubscription:e},realTimeSectionCountReducer:(e=y,t)=>t.type===g.t6?{...e,realtimeSectionNotificationCount:t.payload}:e,courses:c.F,preferenceReducer:function(e=h,t){var n,r;switch(t.type){case p.Kt:return{...e,paymentPreference:{preference:t.paymentPreference,status:null!==(n=t.status)&&void 0!==n?n:e.paymentPreference.status}};case p.Ax:return{...e,paymentPreference:{preference:e.paymentPreference.preference,status:t.status}};case p.$7:return{...e,invoicePreference:{preference:t.invoicePreference,status:null!==(r=t.status)&&void 0!==r?r:e.invoicePreference.status}};case p.li:return{...e,invoicePreference:{preference:e.invoicePreference.preference,status:t.status}};default:return e}},communityLinks:o.Vs}),W={auth:JSON.parse(localStorage.getItem("pensil.user"))};let Z;const K=[i.A];Z=r.Zz;const F=(0,r.y$)($,W,Z((0,r.Tw)(...K)))},16653(e,t,n){var r=n(50520);const i="ADD_LIVE_CALL",a="END_LIVE_CALL",s="SET_LIVE_CALLS";n.d(t,["F_",0,()=>async(e,t)=>{try{const{auth:i,community:a}=t();if(!i||!a)return;const o=await r.c.getLiveCallsByCommunity(a.id);o&&e((n=o.liveCalls,{type:s,payload:n}))}catch(e){}var n},"IU",0,a,"Yf",0,e=>({type:a,payload:e}),"Yh",0,i,"c2",0,e=>({type:i,payload:e}),"kz",0,s])},68709(e,t,n){n.d(t,{GT:()=>m,_O:()=>l});var r=n(50963),i=n(24968);const a="SET_ONBOARDING_CHECKLIST_DISMISS",s="SET_SELECTED_PARENT_ONBOARDING_SECTION",o="SET_ONBOARDING_CHECKLIST_DETAILS",c=e=>({type:a,isDismiss:e}),u=e=>{for(const t in e)if("object"==typeof e[t]){if(!u(e[t]))return!1}else if(!0!==e[t])return!1;return!0},d=e=>{const t=u(e);return{type:o,details:e,allTrue:t}};function l(){return async(e,t)=>{try{const{auth:n,community:a}=t();if(!n||!a)return;const s=await i.BE.getConfigurable(a.id,r.A.COMMUNITY_SHOW_ONBOARDING_LIST),o="true"===s.configurable.configurableValue||!0===s.configurable.configurableValue;e(c(o))}catch(e){}}}function m(){return async(e,t)=>{try{const{auth:n,community:r}=t();if(!n||!r)return;const a=await i.BE.getCommunityOnboardingListData(r.id);e(d(a.onboardingChecklist))}catch(e){}}}n.d(t,["Pq",0,c,"UH",0,d,"kI",0,e=>({type:s,sectionKey:e}),"n0",0,o,"wG",0,s,"xW",0,a])},21419(e,t,n){n.d(t,{st:()=>o});var r=n(68709);const i=[{key:"customiseCommunity",label:"Customise Community"},{key:"setGroupsAndChannels",label:"Set Up Groups & Channels"},{key:"inviteUsers",label:"Invite Users"}],a={[i[0].key]:[{communityLogo:!1},{communityTheme:!1},{communityFont:!1},{communityBanner:!1}],[i[1].key]:[{createGroup:!1},{createChannel:!1},{createQuickLinks:!1}],[i[2].key]:[{inviteUsersWithCustomMail:!1}]},s={showOnboardingList:null,selectedOnboardingSection:i[0].key,onboardingChecklistDetails:a,showAllDonePopup:!1};function o(e=s,t){switch(t.type){case r.xW:return{...e,showOnboardingList:t.isDismiss};case r.wG:return{...e,selectedOnboardingSection:t.sectionKey};case r.n0:return{...e,onboardingChecklistDetails:t.details,showAllDonePopup:t.allTrue};default:return e}}n.d(t,["Qz",0,i])},9888(e,t,n){n.d(t,{Cb:()=>m,fQ:()=>p,jk:()=>_,sE:()=>h});var r=n(24968);const i="SET_PAYMENT_PREFERENCE",a="SET_PAYMENT_PREFERENCE_LOADING_STATUS",s="SET_INVOICE_PREFERENCE",o="SET_INVOICE_PREFERENCE_LOADING_STATUS";function c(e,t){return{type:i,paymentPreference:e,status:t}}function u(e,t){return{type:s,invoicePreference:e,status:t}}function d(e){return{type:a,status:e}}function l(e){return{type:o,status:e}}function m(){return async(e,t)=>{try{const{community:n}=t();if(!n)return;e(d("loading")),r.To.getPreference(n.id).then(({paymentPreference:t})=>{e(t?c(t,"success"):d("success"))}).catch(t=>{e(d("error"))})}catch(t){e(d("error"))}}}function _(){return async(e,t)=>{try{const{community:n}=t();if(!n)return;e(l("loading")),r.To.getInvoicePreference(n.id).then(({invoicePreference:t})=>{e(t?u(t,"success"):l("success"))}).catch(t=>{e(l("error"))})}catch(t){e(l("error"))}}}function p(e,t=e=>{},n=e=>{}){return async(i,a)=>{const{community:s}=a();s&&(i(d("loading")),r.To.updatePreference(s.id,e).then(({paymentPreference:e})=>{t(e),i(c(e,"success"))}).catch(e=>{n(e),i(d("error"))}))}}function h(e,t=e=>{},n=e=>{}){return async(i,a)=>{try{const{community:s}=a();if(!s)return;i(l("loading")),r.To.updateInvoicePreference(s.id,e).then(({invoicePreference:e})=>{t(e),i(u(e,"success"))}).catch(e=>{i(l("error")),n(e)})}catch(e){i(l("error"))}}}n.d(t,["$7",0,s,"Ax",0,a,"Kt",0,i,"li",0,o])},46997(e,t,n){n.d(t,{$G:()=>o,BU:()=>s,sn:()=>c});var r=n(24968);const i="SET_REALTIME_SECTION_NOTIFICATION_COUNT",a=e=>({type:i,payload:e});function s(){return async(e,t)=>{try{const{auth:n,community:i}=t();if(!n||!i)return;const s=await r.d4.getSectionMessageNotificationBadge(i.id);e(a(s))}catch(e){}}}function o(e){return async(t,n)=>{try{const{auth:i,community:s,realTimeSectionCountReducer:o}=n();if(!i||!s)return;const{realtimeSectionNotificationCount:c}=o;if(!Object.keys(c.count).includes(e))return;await r.d4.getSectionMessageNotificationMarkAsRead(s.id,e).then(n=>{const r=c.count;delete r[e],t(a({count:r}))})}catch(e){}}}function c(e){return(t,n)=>{try{const{auth:r,community:i,realTimeSectionCountReducer:s}=n();if(!r||!i)return;const{realtimeSectionNotificationCount:o}=s;if(!Object.keys(o.count).includes(e))return void t(a({count:{...o.count,[e]:1}}));const c=o.count;c[e]+=1,t(a({count:c}))}catch(e){}}}n.d(t,["t6",0,i])},98130(e,t,n){n.d(t,{Ke:()=>s,mU:()=>o});var r=n(81475);const i="SET_MY_SUBSCRIPTION_PLAN";function a(e){return{type:i,mySubscription:e}}function s(){return async(e,t)=>{try{const{auth:n,community:i}=t();if(!n||!i)return;r.n.getMySubscription(i.id).then(({subscription:t})=>{e(a(t))}).catch(e=>{})}catch(e){}}}function o({onSuccess:e=()=>{},onError:t=()=>{}}){return async(n,i)=>{try{const{auth:s,community:o}=i();if(!s||!o)return;r.n.cancelSubscription(o.id).then(({subscription:t})=>{e(t),n(a({}))}).catch(({err:e})=>{t(e)})}catch(e){t(e)}}}n.d(t,["UP",0,i])},94714(e,t,n){n.d(t,{X4:()=>a});var r=n(24968);const i="SET_SUBSCRIPTION_PLAN";function a(){return async(e,t)=>{try{const{auth:n,community:a}=t();if(!n||!a)return;r.nC.getAllSubscriptions(a.id).then(({subscriptions:t})=>{e(function(e){return{type:i,subscriptions:e}}(t))}).catch(e=>{})}catch(e){}}}n.d(t,["jn",0,i])},36357(e,t,n){n.d(t,{Bu:()=>o,E6:()=>a,I1:()=>s,gZ:()=>i});const r=({value:e,ifPresent:t,ifAbsent:n})=>{var r;return e&&null!=e?t(e):null!==(r=null==n?void 0:n())&&void 0!==r?r:null};function i(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:n?3:8).toString(16)})}function a(e,t,n){if(!e||null===e)return e;return e.filter(e=>e[t]!==n)}function s(e,t,n,r){if(!e||null===e)return e;return e.map(e=>e[t]===n?r:e)}function o(e,t,n=!0){if(!e)return e;if(!t)return e;if(e.length<=t)return e;if(n)return e.slice(0,t)+"...";return e.slice(0,t/2-1)+"[...]"+e.slice(e.length-t/2+2)}n.d(t,["ZV",0,e=>e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e,"av",0,r])},31696(e,t,n){var r=n(78220),i=n(26914);const a={logout:async(e,t)=>{i.r.reset(),localStorage.removeItem("pensil.user"),i.r.reset(),t&&await t(),window.location.reload()},checkIfBlocked:e=>{var t,n,a;if(401===(null==e||null===(t=e.response)||void 0===t?void 0:t.status)&&"User blocked!"===(null===(n=e.response)||void 0===n||null===(a=n.data)||void 0===a?void 0:a.message))return i.r.reset(),localStorage.removeItem("pensil.user"),r.b6.push("/login"),window.location.reload(),!0}};n.d(t,["A",0,a])},97843(e,t,n){n.d(t,{A:()=>r});class r{static hasValue(e){return null!=e&&("object"==typeof e?Array.isArray(e)?e.length>0:Object.keys(e).length>0:Array.isArray(e)?e.length>0:"string"!=typeof e||e.length>0)}}},49852(e,t,n){var r=n(20975),i=n(16478),a=n(16118),s=n(24968),o=n(62391);const c=(0,r.createContext)(null);c.displayName="AppServiceContext";const u=({children:e})=>{const{user:t,community:n}=(0,i.G)(e=>({user:e.auth,community:e.community})),r=s.cu.Instance({communityId:null==n?void 0:n.id,communityName:null==n?void 0:n.name,user:{name:null==t?void 0:t.name,email:null==t?void 0:t.email,mobile:null==t?void 0:t.mobile},communityUrl:n&&(0,a.IT)(n)});return(0,o.jsx)(c.Provider,{value:{analyticsService:r},children:e})};n.d(t,["A",0,u,"G",0,c])},47760(e,t,n){var r=n(20975),i=n(16478),a=n(62391);const s=(0,r.createContext)(null),o=Object.freeze({ONE_COLUMN:"one-column",TWO_COLUMN:"two-column",NO_TOP_PADDING:"noTopPadding",THREE_COLUMN_WITH_COMMUNITY_SWITCHER:"three-column-with-community-switcher"});n.d(t,["$M",0,({children:e})=>{const[t,n]=(0,r.useState)(""),c=(0,i.G)(e=>e.community),u=c?c.isCommunitySwitcherDisabled:void 0,d=(0,i.G)(e=>e.auth);return(0,a.jsx)(s.Provider,{value:{baseColumnClass:t,setAppLayout:e=>{let t=e;d&&!u&&(t+=" "+o.THREE_COLUMN_WITH_COMMUNITY_SWITCHER),n(t)},setBaseLayout:()=>{n(d&&!u?o.THREE_COLUMN_WITH_COMMUNITY_SWITCHER:"")}},children:e})},"DQ",0,o,"h6",0,s])},16478(e,t,n){var r=n(31305);const i=r.wA,a=r.d4;n.d(t,["G",0,a,"j",0,i])},65186(e,t,n){n.d(t,{W:()=>a});var r=n(20975),i=n(49852);function a(){return{analyticsService:(0,r.useContext)(i.G).analyticsService}}}};const __webpack_module_cache__={};function __webpack_require__(e){const t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;const n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdD=function(){throw new Error("define cannot be used indirect")},(()=>{const e=[];__webpack_require__.O=(t,n,r,i)=>{if(n){i=i||0;for(var a=e.length;a>0&&e[a-1][2]>i;a--)e[a]=e[a-1];return void(e[a]=[n,r,i])}let s=1/0;for(a=0;a=i)&&Object.keys(__webpack_require__.O).every(e=>__webpack_require__.O[e](n[o]))?n.splice(o--,1):(c=!1,i{const t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},(()=>{const e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;let t;__webpack_require__.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}const i=Object.create(null);__webpack_require__.r(i);const a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>n[e]);return a.default=()=>n,__webpack_require__.d(i,a),i}})(),__webpack_require__.d=(e,t)=>{if(Array.isArray(t))for(var n=0;nPromise.all(Object.keys(__webpack_require__.f).reduce((t,n)=>(__webpack_require__.f[n](e,t),t),[])),__webpack_require__.u=e=>"static/js/"+e+"."+{58:"aad087ef",209:"fcc6802c",275:"de82bb16",568:"db12c894",670:"49d121b2",877:"69fa1ce0",960:"b7375e49",1048:"c2f72176",1066:"f9335e0f",1122:"37fb20f6",1226:"ebf68b1b",1439:"31348a59",1677:"9ea02e47",1806:"e0dc3ce0",1923:"624b49d0",2030:"2147c66c",2086:"40ab8e0f",2087:"241891a5",2934:"337912e9",2972:"1c59d671",2978:"941d619c",3026:"8ac65326",3061:"ed6a3815",3120:"a6665047",3630:"3ea7a47d",4124:"9314d562",4359:"df6d19bd",4630:"95557b46",4817:"e0b354bb",5049:"89167a68",5071:"8fb6ab86",5246:"9a7aadc7",5309:"e32e9360",5350:"f66bb8be",5446:"c81ead67",5561:"54f27aed",5636:"2bc14ee3",6128:"a5bffd4e",6218:"54b93459",6373:"587fff7a",6561:"41b07415",6803:"893cb3e0",6813:"4f38feef",7062:"6f1314cf",7066:"91508733",7247:"3588aa17",7365:"89af6794",7519:"44b3877a",7532:"be11b09b",7554:"1b90470c",7807:"3fbfb09a",7867:"25c36f20",8020:"6d1dc845",8163:"822f37b0",8462:"87d3c428",8520:"85140293",8535:"9a96ab3c",8662:"15afb793",8723:"1ba7894b",8760:"83261160",8881:"31058e44",8952:"e3d7461d",9030:"d91be515",9110:"4894938c"}[e]+".chunk.js",__webpack_require__.miniCssF=e=>"static/css/"+e+"."+{4359:"739dc528",5309:"739dc528",6803:"739dc528",7247:"49814e4c"}[e]+".chunk.css",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="pensil-client:";__webpack_require__.l=(n,r,i,a)=>{if(e[n])return void e[n].push(r);let s,o;if(void 0!==i){const e=document.getElementsByTagName("script");for(var c=0;c{s.onerror=s.onload=null,clearTimeout(d);const i=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach(e=>e(r)),t)return t(r)},d=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),o&&document.head.appendChild(s)}})(),__webpack_require__.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},__webpack_require__.p="/",(()=>{if("undefined"!=typeof document){var e=e=>new Promise((t,n)=>{var r=__webpack_require__.miniCssF(e),i=__webpack_require__.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",__webpack_require__.nc&&(a.nonce=__webpack_require__.nc),a.onerror=a.onload=n=>{if(a.onerror=a.onload=null,"load"===n.type)r();else{var s=n&&n.type,o=n&&n.target&&n.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+o+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=s,c.request=o,a.parentNode&&a.parentNode.removeChild(a),i(c)}},a.href=t,n?n.parentNode.insertBefore(a,n.nextSibling):document.head.appendChild(a)})(e,i,null,t,n)}),t={8792:0};__webpack_require__.f.miniCss=(n,r)=>{t[n]?r.push(t[n]):0!==t[n]&&{4359:1,5309:1,6803:1,7247:1}[n]&&r.push(t[n]=e(n).then(()=>{t[n]=0},e=>{throw delete t[n],e}))}}})(),(()=>{__webpack_require__.b="undefined"!=typeof document&&document.baseURI||self.location.href;const e={8792:0};__webpack_require__.f.j=(t,n)=>{let r=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{const i=new Promise((n,i)=>r=e[t]=[n,i]);n.push(r[2]=i);const a=__webpack_require__.p+__webpack_require__.u(t),s=new Error,o=n=>{if(__webpack_require__.o(e,t)&&(r=e[t],0!==r&&(e[t]=void 0),r)){const e=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+e+": "+i+")",s.name="ChunkLoadError",s.type=e,s.request=i,r[1](s)}};__webpack_require__.l(a,o,"chunk-"+t,t)}},__webpack_require__.O.j=t=>0===e[t];const t=(t,n)=>{let[r,i,a]=n;var s,o,c=0;if(r.some(t=>0!==e[t])){for(s in i)__webpack_require__.o(i,s)&&(__webpack_require__.m[s]=i[s]);if(a)var u=a(__webpack_require__)}for(t&&t(n);c__webpack_require__(83873));__webpack_exports__=__webpack_require__.O(__webpack_exports__)})(); //# sourceMappingURL=main.7cdcccf0.js.map