1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5610],{95610:function(e,l,i){i.r(l);var n=i(26042),o=i(99534),t=i(85893),r=i(96227),s=i(15861),u=i(58826),c=i(86886),d=i(50594),a=i(11163),p=i(10346),v=i(67294),h=i(93861),f=i(78438),y=i(69858),m={"& .MuiOutlinedInput-notchedOutline":{borderRadius:"4px"},"& .MuiSelect-select":{color:"rgba(34, 51, 84, 0.5)",fontSize:14,fontWeight:600,display:"flex",gap:"8px",p:"8px"},"& .MuiSvgIcon-root":{}};l.default=function(e){var l,i=e.drawerOpen,x=e.drawerClose,g=(0,a.useRouter)(),j=(0,y.I)().selectedBusinessInfo,C=(0,p.Np)().data,Z=null!==(l=null===C||void 0===C?void 0:C.data)&&void 0!==l?l:[],q=(0,f.Xe)().data,A=(0,v.useMemo)((function(){var e;return null===q||void 0===q||null===(e=q.data)||void 0===e?void 0:e.rows}),[q]),b=(0,v.useCallback)((function(e){return(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between"},children:(0,t.jsxs)(s.Z,{sx:{fontSize:13},textTransform:"capitalize",children:[null===j||void 0===j?void 0:j.business_unique_name,"-","".concat(e.idea_no)]})})}),[]),w=(0,v.useMemo)((function(){var e=g.query.collections,l=(null===Z||void 0===Z?void 0:Z.length)?null===Z||void 0===Z?void 0:Z.map((function(e){return e._id})):[];if(Array.isArray(e)){var i=e.filter((function(e){return null===l||void 0===l?void 0:l.includes(e)}));if(i.length>0)return i.map((function(e){return e.toString()}))}else if("string"===typeof e&&l.includes(e))return[e.toString()];if("collections"in g.query){var n=g.query,t=(n.collections,(0,o.Z)(n,["collections"]));console.log("reoutes",g.query),g.push({pathname:g.pathname,query:t},void 0,{shallow:!0})}return["All Collections"]}),[Z,g.query.collections]),S=(0,v.useMemo)((function(){var e=g.query.topic,l=(null===A||void 0===A?void 0:A.length)?null===A||void 0===A?void 0:A.map((function(e){return e._id})):[];if(Array.isArray(e)){var i=e.filter((function(e){return null===l||void 0===l?void 0:l.includes(e)}));if(i.length>0)return i.map((function(e){return e.toString()}))}else if("string"===typeof e&&l.includes(e))return[e.toString()];if("topic"in g.query){var n=g.query,t=(n.topic,(0,o.Z)(n,["topic"]));console.log("reoutes",g.query),g.push({pathname:g.pathname,query:t},void 0,{shallow:!0})}return["All Topics"]}),[A,g.query.topic]),_=function(e){var l=e.target,i=l.value,o=l.name,t=(0,n.Z)({},g.query);"collections"===o?i&&i.length>0&&!(null===i||void 0===i?void 0:i.includes(void 0))?1===i.length&&"All Collections"===i[0]||"All Collections"===i[i.length-1]?delete t.collections:("All Collections"===i[0]&&delete i[0],t.collections=i):delete t.collections:"topic"===o&&(i&&i.length>0&&!(null===i||void 0===i?void 0:i.includes(void 0))?1===i.length&&"All Topics"===i[0]||"All Topics"===i[i.length-1]?delete t.topic:("All Topics"===i[0]&&delete i[0],t.topic=i):delete t.topic);g.push({href:"/analytics/overview",query:t},void 0,{shallow:!0})};return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(u.ZP,{anchor:"right",open:i,onClose:x,variant:"temporary",elevation:9,children:(0,t.jsxs)(c.ZP,{sx:{padding:"5px 18px",width:{xs:300,md:320}},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)(s.Z,{variant:"h3",children:"Filter Posts"}),(0,t.jsx)(r.Z,{buttonProps:{onClick:x},title:"Close",children:(0,t.jsx)(d.Z,{fontSize:"medium",color:"secondary"})})]}),(0,t.jsxs)(c.ZP,{mt:1,children:[!!(null===Z||void 0===Z?void 0:Z.length)&&(0,t.jsxs)(c.ZP,{item:!0,mt:1.5,xs:12,children:[(0,t.jsx)(s.Z,{sx:{color:"#000"},mb:1,children:"Collection"}),(0,t.jsx)(h.Z,{label:"",list:null!==Z&&void 0!==Z?Z:[],valueKey:"_id",titleKey:"title",placeholder:"All Collections",value:w,onChange:_,name:"collections",multiple:!0,customStyle:m})]}),!!(null===A||void 0===A?void 0:A.length)&&(0,t.jsxs)(c.ZP,{item:!0,mt:1.5,xs:12,children:[(0,t.jsx)(s.Z,{sx:{color:"#000"},mb:1,children:"Topic"}),(0,t.jsx)(h.Z,{label:"",list:null!==A&&void 0!==A?A:[],valueKey:"_id",titleKey:"topic",render:!0,placeholder:"All Topics",MenuComponent:b,value:S,onChange:_,name:"topic",multiple:!0,customStyle:m})]})]})]})})})}}}]);
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.