PageSourceSearch

https://cessna-front.web.app/_next/static/chunks/pages/profile/timeline-615fe192365c4a99.js

js cessna-front.web.app collected 2026-10-03 12:21:20 UTC 41,739 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7519],{4948:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/timeline",function(){return l(97582)}])},11917:e=>{e.exports={wrapper:"Time_wrapper__Gm8qw",card:"Time_card__djeYB",descriptionBox:"Time_descriptionBox__ONYtJ",headerRow:"Time_headerRow__244Na",identity:"Time_identity__yyjdF",avatar:"Time_avatar__cUWXe",name:"Time_name__MZEik",meta:"Time_meta__GIdRQ",time:"Time_time__KVxW4",link:"Time_link__aSJhT",menuBtn:"Time_menuBtn__MYRuT",content:"Time_content__9CyqY",readMore:"Time_readMore__Wdf2d",joinBtn:"Time_joinBtn__w4W6w",likeRow:"Time_likeRow__q7j0B",like:"Time_like__5d6c0",commentCount:"Time_commentCount__fXLtB",actionButton:"Time_actionButton__SMYVY",container:"Time_container__Mb_YB",moreIcon:"Time_moreIcon__IcgLh",menuBox:"Time_menuBox__QUwXS",fadeIn:"Time_fadeIn__PjKqa",menuItem:"Time_menuItem__6ntqI",icon:"Time_icon__oRHlY",postBtn:"Time_postBtn__NDhhB",placeholderOpacity:"Time_placeholderOpacity__fPC8Y"}},18847:(e,t,l)=>{e.exports=l(52496)},38651:(e,t,l)=>{"use strict";l.d(t,{A:()=>o});var i=l(37876);l(14232);var n=l(47807),s=l(64514),a=l.n(s);let o=e=>{let{show:t,handleClose:l,title:s,children:o,onPrimary:r,onSecondary:d,primaryText:c="Save",secondaryText:u="Cancel",hideFooter:p=!1,size:m="lg",centered:h=!0,showCloseIcon:x=!0,padding:f="24px",className:v}=e;return(0,i.jsx)(n.A,{show:t,onHide:l,centered:h,size:m,dialogClassName:v,children:(0,i.jsx)("div",{className:a().modalWrapper,children:(0,i.jsx)("div",{className:a().modalContent,style:{padding:f},children:o})})})}},52496:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var l in t)Object.defineProperty(e,l,{enumerable:!0,get:t[l]})}(t,{default:function(){return o},noSSR:function(){return a}});let i=l(64252);l(37876),l(14232);let n=i._(l(90295));function s(e){return{default:(null==e?void 0:e.default)||e}}function a(e,t){return delete t.webpack,delete t.modules,e(t)}function o(e,t){let l=n.default,i={loading:e=>{let{error:t,isLoading:l,pastDelay:i}=e;return null}};e instanceof Promise?i.loader=()=>e:"function"==typeof e?i.loader=e:"object"==typeof e&&(i={...i,...e});let o=(i={...i,...t}).loader;return(i.loadableGenerated&&(i={...i,...i.loadableGenerated},delete i.loadableGenerated),"boolean"!=typeof i.ssr||i.ssr)?l({...i,loader:()=>null!=o?o().then(s):Promise.resolve(s(()=>null))}):(delete i.webpack,delete i.modules,a(l,i))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},64514:e=>{e.exports={modalBody:"ReusableModal_modalBody__G2B_h",modalHeader:"ReusableModal_modalHeader__8eBhp",modalTitle:"ReusableModal_modalTitle__rLNPP",closeIcon:"ReusableModal_closeIcon__K9h2c",modalFooter:"ReusableModal_modalFooter__2nETV",primaryBtn:"ReusableModal_primaryBtn__hcmQV",secondaryBtn:"ReusableModal_secondaryBtn__439jO"}},64838:(e,t,l)=>{"use strict";l.d(t,{A:()=>d});var i=l(15039),n=l.n(i),s=l(14232),a=l(44935),o=l(37876);let r=s.forwardRef((e,t)=>{let{bsPrefix:l,variant:i,animation:s="border",size:r,as:d="div",className:c,...u}=e;l=(0,a.oU)(l,"spinner");let p="".concat(l,"-").concat(s);return(0,o.jsx)(d,{ref:t,...u,className:n()(c,p,r&&"".concat(p,"-").concat(r),i&&"text-".concat(i))})});r.displayName="Spinner";let d=r},86581:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return i}});let i=l(64252)._(l(14232)).default.createContext(null)},89888:()=>{},90295:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let i=l(64252)._(l(14232)),n=l(86581),s=[],a=[],o=!1;function r(e){let t=e(),l={loading:!0,loaded:null,error:null};return l.promise=t.then(e=>(l.loading=!1,l.loaded=e,e)).catch(e=>{throw l.loading=!1,l.error=e,e}),l}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e}
1,this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function c(e){return function(e,t){let l=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),s=null;function r(){if(!s){let t=new d(e,l);s={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return s.promise()}if(!o){let e=l.webpack&&1?l.webpack():l.modules;e&&a.push(t=>{for(let l of e)if(t.includes(l))return r()})}function c(e,t){r();let a=i.default.useContext(n.LoadableContext);a&&Array.isArray(l.modules)&&l.modules.forEach(e=>{a(e)});let o=i.default.useSyncExternalStore(s.subscribe,s.getCurrentValue,s.getCurrentValue);return i.default.useImperativeHandle(t,()=>({retry:s.retry}),[]),i.default.useMemo(()=>{var t;return o.loading||o.error?i.default.createElement(l.loading,{isLoading:o.loading,pastDelay:o.pastDelay,timedOut:o.timedOut,error:o.error,retry:s.retry}):o.loaded?i.default.createElement((t=o.loaded)&&t.default?t.default:t,e):null},[e,o])}return c.preload=()=>r(),c.displayName="LoadableComponent",i.default.forwardRef(c)}(r,e)}function u(e,t){let l=[];for(;e.length;){let i=e.pop();l.push(i(t))}return Promise.all(l).then(()=>{if(e.length)return u(e,t)})}c.preloadAll=()=>new Promise((e,t)=>{u(s).then(e,t)}),c.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let l=()=>(o=!0,t());u(a,e).then(l,l)})),window.__NEXT_PRELOADREADY=c.preloadReady;let p=c},90448:(e,t,l)=>{"use strict";l.d(t,{A:()=>d});var i=l(15039),n=l.n(i),s=l(14232),a=l(44935),o=l(37876);let r=s.forwardRef((e,t)=>{let{bsPrefix:l,bg:i="primary",pill:s=!1,text:r,className:d,as:c="span",...u}=e,p=(0,a.oU)(l,"badge");return(0,o.jsx)(c,{ref:t,...u,className:n()(d,p,s&&"rounded-pill",r&&"text-".concat(r),i&&"bg-".concat(i))})});r.displayName="Badge";let d=r},97582:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>U});var i=l(37876),n=l(14232),s=l(7001),a=l(13029),o=l(56720),r=l(41321),d=l(90448),c=l(97719),u=l(60929),p=l(47191),m=l(64838),h=l(72119),x=l(54587),f=l.n(x),v=l(11917),y=l.n(v),g=l(6226),j=l(96356),b=l(40525),w=l(10841),_=l.n(w),N=l(1412),k=l(97388),C=l(31777),R=l(70294),T=l(38651),A=l(49038),B=l(24146),S=l(43986),z=l(75501),F=l(89099),I=l(2491),P=l.n(I),L=l(4301);l(93754);var M=l(3751),D=l(18847),E=l.n(D);l(89888);let O=E()(()=>Promise.all([l.e(2831),l.e(1652)]).then(l.t.bind(l,11652,23)),{loadableGenerated:{webpack:()=>[11652]},ssr:!1}),W=[{title:"Public",icon:(0,i.jsx)(S.TgA,{size:20}),desc:"Visible to anyone, on or off this site"},{title:"All Members",icon:(0,i.jsx)(z.Ph9,{size:20}),desc:"Visible to all members on this site"},{title:"My Connections",icon:(0,i.jsx)(z.h7B,{size:20}),desc:"Visible only to your connections"},{title:"Only Me",icon:(0,i.jsx)(A.JhU,{size:20}),desc:"Visible only to you"}];function U(){var e,t,l,x,v,w,z,I,D,E,U;let{user:Y,token:V}=(0,C.d4)(e=>e.auth),{user:q}=(0,C.d4)(e=>e.profile),[H,Q]=(0,n.useState)({}),[K,X]=(0,n.useState)([]),[G,J]=(0,n.useState)(null),[$,Z]=(0,n.useState)(null),[ee,et]=(0,n.useState)(null),[el,ei]=(0,n.useState)(""),[en,es]=(0,n.useState)(""),[ea,eo]=(0,n.useState)(null),[er,ed]=(0,n.useState)(null),[ec,eu]=(0,n.use
1State)(null),ep=(0,n.useRef)(null),em=(0,n.useRef)(null),[eh,ex]=(0,n.useState)(1),[ef,ev]=(0,n.useState)(1),[ey,eg]=(0,n.useState)(!1),[ej,eb]=(0,n.useState)({});(0,n.useRef)(null);let ew=(0,n.useRef)({}),e_=(0,n.useRef)({}),eN=(0,F.useRouter)(),ek=(0,C.wA)(),[eC,eR]=(0,n.useState)(!1),[eT,eA]=(0,n.useState)(""),[eB,eS]=(0,n.useState)(""),[ez,eF]=(0,n.useState)(null),[eI,eP]=(0,n.useState)(!1),[eL,eM]=(0,n.useState)(null),[eD,eE]=(0,n.useState)((null==W||null==(e=W[0])?void 0:e.title)||"Public"),[eO,eW]=(0,n.useState)(!1),[eU,eY]=(0,n.useState)(!1),[eV,eq]=(0,n.useState)(""),[eH,eQ]=(0,n.useState)(!1),[eK,eX]=(0,n.useState)([]),[eG,eJ]=(0,n.useState)([]),[e$,eZ]=(0,n.useState)([]),[e0,e1]=(0,n.useState)([]),[e2,e4]=(0,n.useState)(""),[e3,e5]=(0,n.useState)([]),[e6,e8]=(0,n.useState)(!1),[e9,e7]=(0,n.useState)(null),te=(0,n.useRef)(null);async function tt(){try{var e,t;let l=null==q||null==(e=q.user)?void 0:e.id;if(!l)return;let i=await b.A.post("/user/profile-data",{userId:l});(null==i||null==(t=i.data)?void 0:t.data)&&ek((0,M.cp)(i.data.data))}catch(e){console.error("Profile fetch error during like:",e)}}let tl=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!ey&&!(eh>ef)||e){eg(!0);try{var t;let l=null==q||null==(t=q.user)?void 0:t.id,i=e?1:eh,n="/user/comment?page=".concat(i,"&limit=").concat(10).concat(l?"&userId=".concat(l):""),{data:s,totalPages:a}=(await b.A.get(n,{headers:{Authorization:"Bearer ".concat(V)}})).data;if(e){let e=[...(null==q?void 0:q.posts)||[],...s],t=Array.from(new Map(e.filter(e=>null==e?void 0:e.id).map(e=>[e.id,e])).values());t.sort((e,t)=>new Date(t.created_at)-new Date(e.created_at)),X(t),ex(1)}else X(e=>{let t=[...e,...s],l=Array.from(new Map(t.filter(e=>null==e?void 0:e.id).map(e=>[e.id,e])).values());return l.sort((e,t)=>new Date(t.created_at)-new Date(e.created_at)),l});s&&s.length>0&&s.forEach(e=>{var t;(null==e||null==(t=e.topic)?void 0:t.id)&&tn(e.topic.id)}),ev(a)}catch(e){console.log("Fetch error:",e)}finally{eg(!1)}}},ti=async e=>{var t;let l=null==(t=e.topic)?void 0:t.id;eb(e=>{var t;return{...e,[l]:{...e[l],isFavorite:!(null==(t=e[l])?void 0:t.isFavorite)}}});try{await b.A.post("topic/".concat(l,"/favorite"),{},{headers:{Authorization:"Bearer ".concat(V)}}),tn(l),tt()}catch(e){console.error("Favorite toggle error:",e)}};async function tn(e){try{let t=await b.A.get("/topic/".concat(e,"/preference"),{headers:{Authorization:"Bearer ".concat(V)}});eb(l=>{var i;return{...l,[e]:null==t||null==(i=t.data)?void 0:i.data}})}catch(e){console.log("Preference fetch error",e)}}let ts=async e=>{P().fire({title:"Are you sure?",text:"You won't be able to revert this!",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, delete it!"}).then(async t=>{if(t.isConfirmed)try{var l;let t;eg(!0),t=e.title?await b.A.delete("/post/".concat(e.id),{headers:{Authorization:"Bearer ".concat(V)}}):await b.A.delete("/topic-comment/".concat(e.id),{headers:{Authorization:"Bearer ".concat(V)}}),X(t=>t.filter(t=>t.id!==e.id)),tt(),P().fire("Deleted!",(null==t||null==(l=t.data)?void 0:l.msg)||"Deleted successfully","success")}catch(e){console.error("Delete failed:",e),P().fire("Error!","Failed to delete","error")}finally{eg(!1)}})},ta=async e=>{eo(null),P().fire({title:"Delete Comment?",text:"Are you sure you want to delete this comment?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, delete it!"}).then(async t=>{if(t.isConfirmed)try{await b.A.delete("/interaction/".concat(e.id),{headers:{Authorization:"Bearer ".concat(V)}}),L.oR.success("Comment deleted successfully"),tl(!1),tt()}catch(e){console.error("Failed to delete comment:",e),L.oR.error("Failed to delete comment")}})},to=async e=>{J(null);try{var t,l;let i;(i=e.title?await b.A.post("/interaction",{targetId:e.id,targetType:"post",actionType:"pin",isNotify:!1},{headers:{Authorization:"Bearer ".concat(V)}}):await b.A.patch("/topic-comment/".concat(e.id,"/toggle-pin"),{},{headers:{Authorization:"Bearer ".concat(V)}}))&&(200===i.status||201===i.status)?(L.oR.success((null==i||null==(t=i.data)?void 0:t.msg)||(null==i?void 0:i.msg)||"Timeline updated successfully"),tl(!1)):(console.error("Pin failed with status:",null==i?void 0:i.status,null==i?void 0:i.data),L.oR.error((null==i||null==(l=i.data)?void 0:l.message)||"Failed to update pin status"))}catch(e){console.error("Pin toggle exception:",e),L.oR.error("An error occurred while pinning")}};(0,n.useEffect)(()=>{function e(e){if(G){let t=ew.current[G];t&&!t.contains(e.target)&&J(null)}if(ea){let t=e_.current[ea];t&&!t.contains(e.target)&&eo(null)}}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[G,ea]),(0,n.useEffect)(()=>
1{if(1==eh){let e=setTimeout(()=>{tl()},1e3);return()=>clearTimeout(e)}tl()},[eh]),(0,n.useEffect)(()=>{var e;1===eh&&(null==q||null==(e=q.posts)?void 0:e.length)>0&&X(e=>{let t=Array.from(new Map([...e,...q.posts].filter(e=>null==e?void 0:e.id).map(e=>[e.id,e])).values());return t.sort((e,t)=>new Date(t.created_at)-new Date(e.created_at)),t})},[null==q?void 0:q.posts,eh]),(0,n.useEffect)(()=>{if(!eC)return;let e="react-quill-custom-styles-timeline",t=document.getElementById(e);return t||((t=document.createElement("style")).id=e,document.head.appendChild(t)),t.textContent="\n            .ql-container {\n                border: none !important;\n            }\n            .ql-editor {\n                border: none !important;\n                border-radius: 4px;\n            }\n            .ql-toolbar {\n                display: ".concat(eO?"block":"none"," !important;\n                border: none !important;\n                border-bottom: none !important;\n            }\n        "),()=>{}},[eO,eC]);let tr=async()=>{try{eg(!0);let e=new FormData;e.append("title",eT),e.append("description",eB),e.append("status","active"),e.append("privacy",eD),e.append("imagePlacement","left"),ez&&e.append("image",ez),e.append("link",""),e.append("labels",""),await b.A.post("/post",e,{headers:{"Content-Type":"multipart/form-data"}}),eA(""),eS(""),eF(null),eM(null),eW(!1),eR(!1),tt()}catch(e){console.error("Post creation failed:",e)}finally{eg(!1)}};(0,n.useEffect)(()=>{(async()=>{try{var e;let t=await b.A.get("tag/?page=1&limit=100");eZ((null==(e=t.data)?void 0:e.data)||[])}catch(e){console.error("Error fetching tags:",e)}})()},[]);let td=e=>{let t;(t="string"==typeof e?{id:null,name:e.trim()}:e).name&&(e1(e=>e.some(e=>e.name.toLowerCase()===t.name.toLowerCase())?e:[...e,t]),e4(""),e5([]))},tc=()=>{eY(!1),eq(""),eQ(!1),eX([]),eJ([]),e1([]),e4(""),e5([]),e7(null)},tu=async()=>{var e,t,l;if(!eV)return void L.oR.error("Please enter a reply");if(!(null==e9||null==(e=e9.topic)?void 0:e.id))return void L.oR.error("Topic ID is missing!");let i=new FormData;i.append("comment",eV),i.append("topicId",e9.topic.id),i.append("subForumId",null==(t=e9.topic.subForum)?void 0:t.id),i.append("isNotify",eH),i.append("tags",JSON.stringify(e0.map(e=>e.name))),eK[0]&&i.append("image",eK[0]);try{e8(!0);let e=await b.A.post("topic-comment",i,{headers:{"Content-Type":"multipart/form-data"}});L.oR.success((null==e||null==(l=e.data)?void 0:l.msg)||"Reply posted successfully!"),tc(),tl(!0)}catch(e){console.error("Error:",e),L.oR.error("Failed to post reply")}finally{e8(!1)}},tp=async e=>{try{X(t=>t.map(t=>{if(t.id===e.id){var l,i;let e=(null==(l=t.likes)?void 0:l.some(e=>{var t,l;return(null==(t=e.user)?void 0:t.id)===(null==Y||null==(l=Y.data)?void 0:l.id)}))?t.likes.filter(e=>{var t,l;return(null==(t=e.user)?void 0:t.id)!==(null==Y||null==(l=Y.data)?void 0:l.id)}):[...t.likes||[],{user:{id:null==Y||null==(i=Y.data)?void 0:i.id}}];return{...t,likes:e}}return t})),await b.A.post("interaction",{targetId:e.id,targetType:"post",actionType:"like",isNotify:!1}),tl(!1)}catch(e){console.error("Like post error:",e),L.oR.error("Failed to like post")}},tm=async e=>{if(!el.trim()&&!er)return;let t=new FormData;t.append("targetId",e),t.append("targetType","post"),t.append("actionType","comment"),t.append("isNotify","false"),el.trim()&&t.append("content",el),er&&t.append("image",er);try{await b.A.post("interaction",t,{headers:{"Content-Type":"multipart/form-data"}}),L.oR.success("Comment posted!"),ei(""),ed(null),tl(!1),tt()}catch(e){var l,i;console.error("Failed to comment",e),L.oR.error((null==(i=e.response)||null==(l=i.data)?void 0:l.msg)||"Failed to post comment")}},th=async(e,t)=>{var l,i,n,s;if(!en.trim()&&!ec)return;let a=new FormData;a.append("targetId",t),a.append("targetType","post"),a.append("actionType","comment"),a.append("isNotify","false"),a.append("parentCommentId",e),en.trim()&&a.append("content",en),ec&&a.append("image",ec);try{let e=await b.A.post("interaction",a,{headers:{"Content-Type":"multipart/form-data"}});(null==e?void 0:e.status)==400?L.oR.error(null==e||null==(l=e.data)?void 0:l.msg):L.oR.success(null==e||null==(i=e.data)?void 0:i.msg),es(""),eu(null),tl(!1),tt()}catch(e){console.error("Failed to post reply",e),L.oR.error((null==(s=e.response)||null==(n=s.data)?void 0:n.msg)||"Failed to post reply")}},tx=(e,t)=>{var l,n,s,a,o;return(0,i.jsxs)("div",{className:"d-flex gap-2 mb-3",children:[(0,i.jsx)(f(),{src:(null==(l=e.user)?void 0:l.image)?"".concat("https://cessna.sandboxdevenv.com","/").concat(e.user.image):"/images/avatar_placeholder.png",alt:"user",width:32,height:32,className:"rounded-circle bg-secondary",style:{objectFit:"cover"}}),(0,i.jsxs)("div",{className:"flex-grow-1 position-relative",children:[(0,i.jsxs)("div",{style:{backgroundColor:"#f0f2f5",borderRadius:"18px",padding:"8px 12px",display:"inline-block"},children:[(0,i.jsxs)("div",{style:{fontWeight:"600",fontSize:"13px"},children:[null==(n=e.user)?void 0:n.firstName," ",null==(s=e.user)?void 0:s.lastName]}),(0,i.jsx)("div",{style:{fontSize:"14px"},children:e.comment||e.content||e.text}),e.image&&(0,i.jsx)("div",{className:"mt-2",children:(0,i.jsx)(f(),{src:"".concat("https://cessna.sandboxdevenv.com","/").concat(e.image),alt:"comment attachment",width:200,height:150,style:{borderRadius:"8px",objectFit:"cover"}})})]}),(0,i.jsxs)("div",{className:"d-flex align-items-center gap-3 mt-1 ms-2",style:{fontSize:"12px",color:"#65676b"},children:[(0,i.jsx)("span",{style:{cursor:"pointer",fontWeight:"600"},onClick:()=>{let t=e.id;et(ee===t?null:t)},children:"Reply"}),(0,i.jsx)("span",{children:_()(e.created_at).fromNow()})]}),(null==Y||null==(a=Y.data)?void 0:a.id)===(null==(o=e.user)?void 0:o.id)&&(0,i.jsxs)("div",{className:"position-absolute",style:{to
1p:0,right:0},ref:t=>e_.current[e.id]=t,children:[(0,i.jsx)("span",{onClick:()=>eo(ea===e.id?null:e.id),style:{cursor:"pointer",padding:"5px",display:"inline-block"},children:(0,i.jsx)(k.Ym0,{size:16,color:"#65676b"})}),ea===e.id&&(0,i.jsx)("div",{className:"bg-white shadow rounded",style:{position:"absolute",top:"25px",right:"0",zIndex:10,minWidth:"120px",overflow:"hidden",border:"1px solid #ddd"},children:(0,i.jsxs)("div",{onClick:()=>ta(e),className:"px-3 py-2 d-flex align-items-center gap-2",style:{cursor:"pointer",fontSize:"14px",color:"#dc3545"},onMouseEnter:e=>e.currentTarget.style.background="#f8f9fa",onMouseLeave:e=>e.currentTarget.style.background="white",children:[(0,i.jsx)(R.IXo,{size:14}),"Delete"]})})]})]})]},e.id)};return(0,i.jsx)(h.default,{children:(0,i.jsxs)("div",{className:y().wrapper,children:[(0,i.jsx)(L.N9,{}),(0,i.jsx)(T.A,{show:eC,handleClose:()=>{eR(!1),eS(""),eW(!1)},title:"Create New Discussion",onPrimary:"",primaryText:"Post",secondaryText:"",padding:"0",children:(0,i.jsxs)("div",{style:{position:"relative",minHeight:"300px"},children:[eI&&(0,i.jsxs)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"white",zIndex:20,display:"flex",flexDirection:"column",borderRadius:"8px"},children:[(0,i.jsxs)("div",{className:"px-4 py-3 d-flex justify-content-between align-items-center",children:[(0,i.jsx)("h5",{className:"m-0",children:"Who can see your post?"}),(0,i.jsx)("span",{onClick:()=>eP(!1),style:{cursor:"pointer",padding:"4px"},children:(0,i.jsx)(B.$8F,{size:22})})]}),(0,i.jsx)("hr",{className:"my-0"}),(0,i.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"0"},children:W.map(e=>(0,i.jsxs)("div",{onClick:()=>{eE(e.title),eP(!1)},className:"d-flex align-items-center px-4 py-3",style:{cursor:"pointer",borderBottom:"1px solid #f5f5f5",transition:"background 0.2s"},onMouseEnter:e=>e.currentTarget.style.background="#f9f9f9",onMouseLeave:e=>e.currentTarget.style.background="white",children:[(0,i.jsx)("div",{className:"d-flex align-items-center justify-content-center me-3",style:{width:"40px",height:"40px",borderRadius:"50%",background:"#f0f2f5",color:"#333"},children:e.icon}),(0,i.jsxs)("div",{className:"flex-grow-1",children:[(0,i.jsx)("div",{style:{fontSize:"15px",fontWeight:"600",color:"#050505",marginBottom:"2px"},children:e.title}),(0,i.jsx)("div",{style:{fontSize:"13px",color:"#65676b"},children:e.desc})]}),(0,i.jsx)("input",{type:"radio",checked:eD===e.title,readOnly:!0,style:{width:"20px",height:"20px",cursor:"pointer"}})]},e.title))})]}),(0,i.jsxs)("div",{className:"px-4 py-3 d-flex justify-content-between",children:[(0,i.jsx)("h5",{children:"Create a Post"}),(0,i.jsx)("span",{children:(0,i.jsx)(B.$8F,{onClick:()=>eR(!1),style:{cursor:"pointer"}})})]}),(0,i.jsx)("hr",{className:"my-0"}),(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"1.5em"},children:[(null==q||null==(t=q.user)?void 0:t.image)?(0,i.jsx)(f(),{src:"".concat("https://cessna.sandboxdevenv.com","/").concat(q.user.image),alt:"avatar",width:45,height:45,className:y().avatar}):(0,i.jsx)("div",{style:{position:"relative",width:"45px",height:"45px",overflow:"hidden",backgroundColor:"#e7e9ec",borderRadius:"50%"},children:(0,i.jsx)("svg",{style:{position:"absolute",width:"54px",height:"54px",color:"#9ca3af",left:"-4.5px"},fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})}),(0,i.jsxs)("div",{style:{marginLeft:"10px"},children:[(0,i.jsx)("strong",{children:null==Y||null==(l=Y.data)?void 0:l.name}),(0,i.jsxs)("div",{style:{fontSize:"14px",color:"#333",cursor:"pointer",border:"1px solid #ddd",backgroundColor:"#f9f9f9",maxWidth:"fit-content",display:"flex",alignItems:"center",gap:"6px",padding:"4px 10px",marginTop:"4px",fontWeight:"600",fontSize:"13px"},onClick:()=>eP(!0),children:[(0,i.jsx)("span",{className:"d-flex align-items-center",children:(()=>{let e=W.find(e=>e.title===eD);return null==e?void 0:e.icon})()}),(0,i.jsx)("span",{children:eD}),(0,i.jsx)(S.q0c,{size:20})]})]})]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{style:{padding:"1.5em"},children:[(0,i.jsx)(s.A.Control,{type:"text",placeholder:"Title",value:eT,onChange:e=>eA(e.target.value),className:y().placeholderOpacity,style:{marginBottom:"10px",border:"1px solid #ccc",borderRadius:"4px",padding:"6px 10px"}}),(0,i.jsx)("div",{style:{marginBottom:"10px",border:"1px solid #ccc"},children:(0,i.jsx)(O,{placeholder:" Share what's on your mind, ".concat(null==Y||null==(x=Y.data)?void 0:x.name,"..."),theme:"snow",value:eB,onChange:e=>eS(e),modules:{toolbar:!!eO&&[["bold","italic"],[{list:"ordered"},{list:"bullet"}],["link","blockquote"]]},style:{height:"200px"}},eO?"with-toolbar":"without-toolbar")}),eL&&(0,i.jsxs)("div",{style:{marginTop:"10px",position:"relative",display:"inline-block"},children:[(0,i.jsx)(f(),{src:eL,alt:"preview",style:{borderRadius:"8px",objectFit:"cover"},width:100,height:100}),(0,i.jsx)("div",{onClick:()=>{eM(null),eF(null)},style:{position:"absolute",top:"-8px",right:"-8px",background:"white",borderRadius:"50%",padding:"2px",boxShadow:"0 2px 4px rgba(0,0,0,0.2)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)(B.$8F,{size:16})})]})]}),(0,i.jsx)("hr",{className:"my-0 mx-0"}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBlock:"10px",alignItems:"center",paddingInline:"1.5em"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,i.jsx)(a.A,{placement:"top",overlay:(0,i.jsx)(o.A,{id:"tooltip-upload",children:"Attach Photo"}),children:(0,i.jsxs)("label",{style:{cursor:"pointer",display:"inline-block",opacity:.6},children:[(0,i.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{let t=e.target.files[0];t&&(eF(t),eM(URL.createObjectURL(t)))},style:{display:"none"}}),(0,i.jsx)(A.p5B,{size:20})]})}),(0,i.jsx)("button",{type:"button",onClick:()=>eW(!eO),style:{border:"none",background:eO?"#e7e9ec":"transparent",curs
1or:"pointer",padding:"6px 10px",fontSize:"14px",borderRadius:"6px",color:eO?"#1e2132":"#9ca3af",transition:"all 0.2s"},title:"Formatting Options",children:"Aa"})]}),(0,i.jsx)(r.A,{className:"".concat(y().postBtn),onClick:tr,disabled:ey,children:ey?"Uploading...":"Post"})]})]})]})}),(0,i.jsxs)(T.A,{show:eU,handleClose:tc,title:"Create New Discussion",onPrimary:tu,primaryText:"Post",secondaryText:"",padding:"0",children:[(0,i.jsxs)("div",{className:"d-flex align-items-center justify-content-between p-3",children:[(0,i.jsx)("div",{className:"d-flex flex-column align-items-start w-100",children:(0,i.jsxs)("p",{className:"m-0",style:{fontSize:"14px",color:"#666"},children:["Reply to:"," ",(0,i.jsxs)("span",{className:"fw-bold",style:{color:"#122b46"},children:[(null==e9||null==(v=e9.user)?void 0:v.firstName)||""," ",(null==e9||null==(w=e9.user)?void 0:w.lastName)||""]})]})}),(0,i.jsx)(r.A,{variant:"link",onClick:tc,style:{padding:0,minWidth:"auto"},children:(0,i.jsx)(A.QCr,{color:"#000",fontWeight:400,size:18})})]}),(0,i.jsx)("div",{className:"d-flex align-items-center gap-3 mb-2",children:(0,i.jsxs)("label",{style:{cursor:"pointer",paddingLeft:"12px"},children:[(0,i.jsx)("input",{type:"file",accept:"image/*",style:{display:"none"},ref:em,onChange:e=>(e=>{let t=Array.from(e),l=t.map(e=>({url:URL.createObjectURL(e),name:e.name}));eX(e=>[...e,...t]),eJ(e=>[...e,...l])})(e.target.files),multiple:!0}),(0,i.jsx)(a.A,{placement:"top",overlay:(0,i.jsx)(o.A,{id:"tooltip-reply-upload",children:"Attach Photo"}),children:(0,i.jsx)("span",{style:{display:"inline-block",cursor:"pointer"},children:(0,i.jsx)(A.p5B,{})})})]})}),(0,i.jsx)(s.A.Control,{as:"textarea",rows:6,placeholder:"Type your reply here",value:eV,onChange:e=>eq(e.target.value),ref:te,name:"replyContent",className:"shadow-none rounded-0",style:{border:"none",outline:"none",boxShadow:"none"}}),eG.length>0&&(0,i.jsx)("div",{className:"d-flex flex-wrap gap-2 mt-3 px-3",children:eG.map((e,t)=>(0,i.jsxs)("div",{style:{position:"relative",display:"inline-block"},children:[(0,i.jsx)(f(),{src:e.url,alt:e.name,width:100,height:100,style:{borderRadius:"50%",objectFit:"cover"}}),(0,i.jsx)("button",{onClick:()=>{URL.revokeObjectURL(eG[t].url),eJ(e=>e.filter((e,l)=>l!==t)),eX(e=>e.filter((e,l)=>l!==t))},style:{position:"absolute",top:"-8px",right:"-8px",backgroundColor:"transparent",border:"none",color:"#000",cursor:"pointer",padding:"2px"},children:(0,i.jsx)(A.QCr,{})})]},t))}),(0,i.jsxs)("div",{children:[(0,i.jsx)(s.A.Control,{type:"text",placeholder:"Type one or more tags, comma separated",value:e2,onChange:e=>{let t=e.target.value;if(e4(t),""===t.trim())return void e5([]);e5(e$.filter(e=>e.name.toLowerCase().includes(t.toLowerCase())))},className:"py-3 shadow-none rounded-0",onKeyDown:e=>{"Enter"===e.key&&""!==e2.trim()&&(e.preventDefault(),td(e2.trim()))}}),(null==e3?void 0:e3.length)>0&&(0,i.jsx)("div",{className:"border rounded mt-1 mx-3",style:{maxHeight:"120px",overflowY:"auto"},children:null==e3?void 0:e3.map(e=>(0,i.jsx)("div",{className:"p-2",style:{cursor:"pointer",transition:"background 0.2s"},onMouseEnter:e=>e.currentTarget.style.background="#f9f9f9",onMouseLeave:e=>e.currentTarget.style.background="white",onClick:()=>td(e),children:null==e?void 0:e.name},e.id))}),(0,i.jsx)("div",{className:"ps-3 d-flex flex-wrap gap-2",children:e0.map((e,t)=>(0,i.jsxs)(d.A,{bg:"secondary",pill:!0,style:{cursor:"pointer"},onClick:()=>{var t;return t=e.name,void e1(e=>e.filter(e=>e.name!==t))},className:"mt-2",children:[e.name," ✕"]},t))})]}),(0,i.jsxs)(c.A,{className:"align-items-center justify-content-between px-3 w-100 m-auto",style:{backgroundColor:"#FBFBFC"},children:[(0,i.jsx)(u.A,{xs:8,md:4,children:(0,i.jsx)(s.A.Check,{type:"checkbox",id:"notifyReplyCheckbox",label:"Notify me of new replies",checked:eH,onChange:e=>eQ(e.target.checked)})}),(0,i.jsx)(u.A,{xs:4,md:8,className:"d-flex align-items-center justify-content-end p-3 gap-3",children:(0,i.jsx)(r.A,{variant:"primary",onClick:tu,disabled:e6,children:e6?"Posting...":"Post"})})]})]}),(null==Y||null==(z=Y.data)?void 0:z.id)===(null==q||null==(I=q.user)?void 0:I.id)&&(0,i.jsxs)(p.A,{children:[(0,i.jsxs)("div",{className:"p-3 d-flex align-items-center",onClick:()=>eR(!0),children:[(null==q||null==(D=q.user)?void 0:D.image)?(0,i.jsx)(f(),{src:"".concat("https://cessna.sandboxdevenv.com","/").concat(null==q||null==(E=q.user)?void 0:E.image),alt:"avatar",width:45,height:45,className:y().avatar}):(0,i.jsx)("div",{style:{position:"relative",width:"45px",height:"45px",overflow:"hidden",backgroundColor:"#e7e9ec",borderRadius:"50%"},children:(0,i.jsx)("svg",{style:{position:"absolute",width:"54px",height:"54px",color:"#9ca3af",left:"-4.5px"},fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})}),(0,i.jsxs)("span",{style:{color:"#888"},className:"ms-3",children:["Share what's on your mind, ",null==Y||null==(U=Y.data)?void 0:U.name,"..."]})]}),(0,i.jsx)("hr",{className:"my-0"}),(0,i.jsx)("div",{className:"p-3 d-flex align-items-center",style:{opacity:"0.2"},children:(0,i.jsx)(A.p5B,{})})]}),K.map((e,t)=>{var l,n,s,d,c,u,m,h,x,v,b,w,C,T,S,z,F,I,P,L,M,D;return(0,i.jsxs)(p.A,{className:y().card,children:[(0,i.jsxs)("div",{className:y().headerRow,children:[(0,i.jsxs)("div",{className:y().identity,children:[(null==e||null==(l=e.user)?void 0:l.image)?(0,i.jsx)(f(),{src:"".concat("https://cessna.sandboxdevenv.com","/").concat(null==e||null==(n=e.user)?void 0:n.image),alt:"avatar",width:45,height:45,className:y().avatar}):(0,i.jsx)("div",{style:{position:"relative",width:"45px",height:"45px",overflow:"hidden",backgroundColor:"#e7e9ec",borderRadius:"50%"},children:(0,i.jsx)("svg",{style:{position:"absolute",width:"54px",height:"54px",color:"#9ca3af",left:"-4.5px"},fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"d-flex gap-1 align-items-center flex-wrap",children:[(0,i.jsxs)("p",{className:y().name,children:[null==e||null==(s=e.user)?void 0:s.firstName," ",null==e||null==(d=e.user)?void 0:d.lastName]}),e.title?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:y().meta,children:"posted:"}),(0,i.jsx)("h6",{className:"m-0",children:e.title})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:y().meta,children:"replied to the discussion"}),(0,i.jsx)("span",{className:y().meta,children:"in the forum"}
1),(0,i.jsx)("span",{className:y().link,children:null==e||null==(u=e.topic)||null==(c=u.subForum)?void 0:c.title})]})]}),(0,i.jsx)("p",{className:y().time,children:_()(null==e?void 0:e.created_at).fromNow()})]})]}),(0,i.jsx)("div",{className:y().container,ref:t=>ew.current[e.id]=t,children:(null==Y||null==(m=Y.data)?void 0:m.id)===(null==q||null==(h=q.user)?void 0:h.id)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{placement:"top",overlay:(0,i.jsx)(o.A,{id:"tip-".concat(e.id),children:"More Options"}),children:(0,i.jsx)("span",{children:(0,i.jsx)(k.Ym0,{size:20,className:y().moreIcon,onClick:()=>J(G===e.id?null:e.id),style:{cursor:"pointer"}})})}),G===e.id&&(0,i.jsxs)("div",{className:y().menuBox,children:[(0,i.jsxs)("div",{className:y().menuItem,onClick:()=>ts(e),children:[(0,i.jsx)(R.IXo,{className:y().icon}),"Delete"]}),(0,i.jsxs)("div",{className:y().menuItem,onClick:t=>{t.stopPropagation(),to(e)},children:[(0,i.jsx)(k.K8u,{className:y().icon}),(null==e?void 0:e.isPinned)?"Unpin  Feed":"Pin to Feed"]})]})]})})]}),(0,i.jsxs)(p.A,{className:"".concat(y().descriptionBox," mt-4"),children:[(0,i.jsxs)("div",{className:"p-3",children:[(0,i.jsx)("h6",{children:e.title||(null==e||null==(x=e.topic)?void 0:x.title)}),(()=>{var t;let l=e.description||(null==e||null==(t=e.topic)?void 0:t.description)||"",n=e.title?l.replace(/<[^>]+>/g,""):l,s=n.length>300,a=H[e.id],o=a?n:n.slice(0,300)+(s?"...":"");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:y().content,children:o}),s&&(0,i.jsx)("p",{className:y().readMore,onClick:()=>{var t;return t=e.id,void Q(e=>({...e,[t]:!e[t]}))},style:{cursor:"pointer"},children:a?"Read Less":"Read More"})]})})(),e.image&&(0,i.jsx)("div",{className:"mt-3",children:(0,i.jsx)(f(),{src:"".concat("https://cessna.sandboxdevenv.com","/").concat(e.image),alt:"post content",width:600,height:400,className:"rounded",style:{width:"auto",height:"auto",maxHeight:"300px",maxWidth:"100%",objectFit:"contain"}})})]}),(0,i.jsx)("hr",{className:"my-0"}),e.title?(0,i.jsxs)("div",{className:"px-3 py-2",children:[(0,i.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,i.jsxs)("div",{className:"d-flex align-items-center gap-3",children:[(0,i.jsxs)(r.A,{variant:"link",className:"text-decoration-none p-0 d-flex align-items-center gap-1",style:{color:"#65676b",fontSize:"14px",fontWeight:"600"},onClick:()=>tp(e),children:[(null==(v=e.likes)?void 0:v.some(e=>{var t,l;return(null==(t=e.user)?void 0:t.id)===(null==Y||null==(l=Y.data)?void 0:l.id)}))?(0,i.jsx)(N.jc6,{size:18,color:"#00447C"}):(0,i.jsx)(j.QiF,{size:18}),(0,i.jsx)("span",{style:{color:(null==(b=e.likes)?void 0:b.some(e=>{var t,l;return(null==(t=e.user)?void 0:t.id)===(null==Y||null==(l=Y.data)?void 0:l.id)}))?"#00447C":"#65676b"},children:"Like"})]}),(0,i.jsxs)(r.A,{variant:"link",className:"text-decoration-none p-0 d-flex align-items-center gap-1",style:{color:"#65676b",fontSize:"14px",fontWeight:"600"},onClick:()=>{$===e.id?Z(null):Z(e.id)},children:[(0,i.jsx)(g.VQk,{size:18})," Comment"]})]}),(0,i.jsxs)("div",{style:{fontSize:"13px",color:"#65676b"},children:[(null==(w=e.likes)?void 0:w.length)>0&&(0,i.jsxs)("span",{children:[e.likes.length," Likes \xa0"]}),(null==(C=e.comments)?void 0:C.length)>0&&(0,i.jsxs)("span",{children:[e.comments.length," Comments"]})]})]}),($===e.id||(null==(T=e.comments)?void 0:T.length)>0)&&(0,i.jsxs)("div",{className:"mt-3 pt-3 border-top",children:[null==(S=e.comments)?void 0:S.map(t=>{var l,n,s,a,o;let r=t.replies||[];return(0,i.jsxs)("div",{className:"position-relative",children:[(0,i.jsxs)("div",{className:"position-relative",children:[((null==(l=t.replies)?void 0:l.length)>0||ee===t.id||(null==(n=t.replies)?void 0:n.some(e=>e.id===ee)))&&(0,i.jsx)("div",{style:{position:"absolute",left:"16px",top:"32px",bottom:"0px",width:"2px",backgroundColor:"#e4e6eb",zIndex:0}}),tx(t,e)]}),(null==r?void 0:r.length)>0&&(0,i.jsx)("div",{className:"position-relative",children:r.map((l,n)=>{let s=n===r.length-1;return(0,i.jsxs)("div",{className:"position-relative",style:{paddingLeft:"45px"},children:[(0,i.jsx)("div",{style:{position:"absolute",left:"16px",top:"-20px",width:"25px",height:"42px",borderLeft:"2px s
1olid #e4e6eb",borderBottom:"2px solid #e4e6eb",borderBottomLeftRadius:"15px",zIndex:0}}),(!s||ee===t.id)&&(0,i.jsx)("div",{style:{position:"absolute",left:"16px",top:"9px",bottom:"-20px",width:"2px",backgroundColor:"#e4e6eb",zIndex:0}}),tx(l,e)]},l.id)})}),(ee===t.id||(null==(s=t.replies)?void 0:s.some(e=>e.id===ee)))&&(0,i.jsxs)("div",{className:"position-relative mt-2",style:{paddingLeft:"45px"},children:[ee===t.id&&(0,i.jsx)("div",{style:{position:"absolute",left:"16px",top:"-20px",width:"25px",height:"42px",borderLeft:"2px solid #e4e6eb",borderBottom:"2px solid #e4e6eb",borderBottomLeftRadius:"15px",zIndex:0}}),(0,i.jsxs)("div",{className:"d-flex gap-2",children:[(null==e||null==(a=e.user)?void 0:a.image)?(0,i.jsx)(f(),{src:null==e||null==(o=e.user)?void 0:o.image,alt:"me",width:24,height:24,className:"rounded-circle",style:{zIndex:1}}):(0,i.jsx)("div",{className:"rounded-circle",style:{width:32,height:32,backgroundColor:"#6c757d66"}}),(0,i.jsxs)("div",{className:"flex-grow-1 mb-4",children:[(0,i.jsxs)("div",{className:"d-flex flex-column px-3 py-2 bg-light rounded-4 border",children:[(0,i.jsx)("input",{type:"text",placeholder:"Write a reply...",className:"border-0 bg-transparent w-100 mb-2",style:{outline:"none",fontSize:"13px"},value:en,autoFocus:!0,onChange:e=>es(e.target.value),onKeyDown:l=>{"Enter"!==l.key||l.shiftKey||(l.preventDefault(),th(t.id,e.id))}}),(0,i.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,i.jsxs)("div",{onClick:()=>em.current.click(),style:{cursor:"pointer"},children:[(0,i.jsx)(A.p5B,{size:16,color:"#65676b"}),(0,i.jsx)("input",{type:"file",ref:em,className:"d-none",accept:"image/*",onChange:e=>eu(e.target.files[0])})]}),(0,i.jsx)(B.$_z,{size:16,color:"#00447C",style:{cursor:"pointer"},onClick:()=>th(t.id,e.id)})]})]}),ec&&(0,i.jsxs)("div",{className:"mt-2 position-relative d-inline-block",children:[(0,i.jsx)(f(),{src:URL.createObjectURL(ec),alt:"preview",width:100,height:100,style:{borderRadius:"8px",objectFit:"cover"}}),(0,i.jsx)("div",{className:"position-absolute bg-white rounded-circle shadow d-flex align-items-center justify-content-center",style:{top:-5,right:-5,width:20,height:20,cursor:"pointer"},onClick:()=>eu(null),children:"\xd7"})]})]})]})]})]},t.id)}),!(null==e||null==(z=e.comments)?void 0:z.some(e=>{var t;return e.id===ee||(null==(t=e.replies)?void 0:t.some(e=>e.id===ee))}))&&(0,i.jsxs)("div",{className:"d-flex gap-2 mt-2 align-items-start",children:[e.title&&(null==e||null==(F=e.user)?void 0:F.image)?(0,i.jsx)(f(),{src:"".concat("https://cessna.sandboxdevenv.com","/").concat(null==e||null==(I=e.user)?void 0:I.image),alt:"me",width:32,height:32,className:"rounded-circle"}):(0,i.jsx)("div",{className:"rounded-circle",style:{width:32,height:32,backgroundColor:"#6c757d66"}}),(0,i.jsxs)("div",{className:"flex-grow-1",children:[(0,i.jsxs)("div",{className:"d-flex flex-column px-3 py-2 bg-light rounded-4 border",children:[(0,i.jsx)("input",{type:"text",placeholder:"Write a comment...",className:"border-0 bg-transparent w-100 mb-2",style:{outline:"none",fontSize:"14px"},value:$===e.id?el:"",onChange:t=>{$!==e.id&&Z(e.id),ei(t.target.value)},onKeyDown:t=>{"Enter"!==t.key||t.shiftKey||(t.preventDefault(),tm(e.id))}}),(0,i.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,i.jsxs)("div",{onClick:()=>ep.current.click(),style:{cursor:"pointer"},children:[(0,i.jsx)(A.p5B,{size:18,color:"#65676b"}),(0,i.jsx)("input",{type:"file",ref:ep,className:"d-none",accept:"image/*",onChange:t=>{$!==e.id&&Z(e.id),ed(t.target.files[0])}})]}),(0,i.jsx)(B.$_z,{size:18,color:"#00447C",style:{cursor:"pointer"},onClick:()=>tm(e.id)})]})]}),$===e.id&&er&&(0,i.jsxs)("div",{className:"mt-2 position-relative d-inline-block",children:[(0,i.jsx)(f(),{src:URL.createObjectURL(er),alt:"preview",width:100,height:100,style:{borderRadius:"8px",objectFit:"cover"}}),(0,i.jsx)("div",{className:"position-absolute bg-white rounded-circle shadow d-flex align-items-center justify-content-center",style:{top:-5,right:-5,width:20,height:20,cursor:"pointer"},onClick:()=>ed(null),children:"\xd7"})]})]})]})]})]}):(0,i.jsxs)("div",{className:"p-3 d-flex align-items-center gap-3",children:[(0,i.jsxs)("div",{style:{cursor:"pointer",display:"flex",alignItems:"center"},onClick:()=>(e=>{var t,l,i,n;
1let s=encodeURIComponent(null==e||null==(t=e.topic)?void 0:t.title);eN.push({pathname:"/forums/".concat(s,"/topic/").concat(null==(l=e.topic)?void 0:l.id),query:{subForumId:null==(n=e.topic)||null==(i=n.subForum)?void 0:i.id}})})(e),children:[(0,i.jsx)(g.VQk,{className:"me-1"})," Join Discussion"]}),(0,i.jsxs)("div",{style:{cursor:"pointer",display:"flex",alignItems:"center"},onClick:()=>{e7(e),eY(!0)},children:[(0,i.jsx)(g.VQk,{className:"me-1"})," Quick Reply"]})]})]}),!e.title&&(null==q||null==(P=q.user)?void 0:P.id)==(null==Y||null==(L=Y.data)?void 0:L.id)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("hr",{}),(0,i.jsx)("div",{className:y().likeRow,children:(0,i.jsxs)(r.A,{className:"".concat(y().likeBtn," d-flex align-items-center gap-1"),onClick:()=>ti(e),variant:"",children:[(null==(M=ej[null==(D=e.topic)?void 0:D.id])?void 0:M.isFavorite)?(0,i.jsx)(N.jc6,{style:{color:"#00447C"}}):(0,i.jsx)(j.QiF,{}),(0,i.jsx)("span",{style:{color:"#00447C"},children:"Like"})]})})]})]},t)}),(0,i.jsxs)("div",{className:"text-center py-4",children:[ey?(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"200px"},children:(0,i.jsx)(m.A,{animation:"border",role:"status",variant:"danger"})}):eh<ef&&(0,i.jsx)(r.A,{variant:"outline-primary",onClick:()=>ex(e=>e+1),className:"rounded-pill px-4",children:"Load More"}),!ey&&0===K.length&&(0,i.jsx)("div",{className:"text-center text-muted py-5",children:(0,i.jsx)("h5",{children:"No Timeline Data Available"})}),!ey&&K.length>0&&eh>=ef&&(0,i.jsx)("p",{className:"text-muted",children:"No more posts"})]})]})})}}},e=>{e.O(0,[390,8433,4079,2119,636,6593,8792],()=>e(e.s=4948)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.