PageSourceSearch

https://www.causes.com/_next/static/chunks/pages/feeds-3d3f0b72f5b0def1.js

js causes.com collected 2026-09-24 08:35:03 UTC 29,505 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[327],{1173:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(82893),i=n(37876);let s=(0,r.A)((0,i.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},16361:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r={src:"/_next/static/media/photo-icon.605d4c19.png",height:600,width:1e3,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAJFBMVEUQEREAAAAQEhIQEREQEREPEBAPEBAQEBAQEBAREREPEREQERFbdFKIAAAADHRSTlP+ARjpgfSUU2wsod5Re/NEAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAKUlEQVR4nAXBiQHAMAjEMPuAfN1/30ro62xF9+2KeFaKlhQfVFgMM/QPC8sAf1BaFnoAAAAASUVORK5CYII=",blurWidth:8,blurHeight:5}},30764:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(82893),i=n(37876);let s=(0,r.A)((0,i.jsx)("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}),"EditOutlined")},48227:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(42969),i=n(59860),s=n(14232),a=n(69241),o=n(13323),l=n(36615),c=n(57683),d=n(16542),u=n(14457),p=n(21849);function x(e){return(0,p.Ay)("MuiTableHead",e)}(0,u.A)("MuiTableHead",["root"]);var f=n(37876),h=["className","component"];function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var A=function(e){var t=e.classes;return(0,o.A)({root:["root"]},x,t)},y=(0,c.Ay)("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),j={variant:"head"},b="thead";let v=s.forwardRef(function(e,t){var n=(0,d.b)({props:e,name:"MuiTableHead"}),r=n.className,s=n.component,o=void 0===s?b:s,c=(0,i.A)(n,h),u=m(m({},n),{},{component:o}),p=A(u);return(0,f.jsx)(l.A.Provider,{value:j,children:(0,f.jsx)(y,m({as:o,className:(0,a.A)(p.root,r),ref:t,role:o===b?null:"rowgroup",ownerState:u},c))})})},77662:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(82893),i=n(37876);let s=(0,r.A)((0,i.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit")},78082:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(27925),i=n(59860),s=n(42969),a=n(14232),o=n(69241),l=n(13323),c=n(7604),d=n(65484),u=n(21733),p=n(57683),x=n(16542),f=n(52310),h=n(81778),g=n(37876),m=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps","slots","slotProps"];function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){(0,s.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var j=function(e){var t=e.classes,n=e.inset,r=e.primary,i=e.secondary,s=e.dense;return(0,l.A)({root:["root",n&&"inset",s&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},f.b,t)},b=(0,p.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[(0,s.A)({},"& .".concat(f.A.primary),t.primary),(0,s.A)({},"& .".concat(f.A.secondary),t.secondary),t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((0,s.A)((0,s.A)((0,s.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},".".concat(c.A.root,":where(& .").concat(f.A.primary,")"),{display:"block"}),".".concat(c.A.root,":where(& .").concat(f.A.secondary,")"),{display:"block"}),"variants",[{props:function(e){var t=e.ownerState;return t.primary&&t.secondary},style:{marginTop:6,marginBottom:6}},{props:function(e){return e.ownerState.inset},style:{paddingLeft:56}}]));let v=a.forwardRef(function(e,t){var n=(0,x.b)({props:e,name:"MuiListItemText"}),s=n.children,l=n.className,c=n.disableTypography,p=void 0!==c&&c,f=n.inset,A=n.primary,v=n.primaryTypographyProps,w=n.secondary,S=n.secondaryTypographyProps,T=n.slots,N=n.slotProps,C=(0,i.A)(n,m),P=a.useContext(u.A).dense,O=null!=A?A:s,k=w,E=y(y({},n),{},{disableTypography:p,inset:void 0!==f&&f,primary:!!O,secondary:!!k,dense:P}),D=j(E),F={slots:void 0===T?{}:T,slotProps:y({primary:v,secondary:S},void 0===N?{}:N)},I=(0,h.A)("root",{className:(0,o.A)(D.root,l),elementType:b,externalForwardedProps:y(y({},F),C),ownerState:E,ref:t}),B=(0,r.A)(I,2),L=B[0],R=B[1],M=(0,h.A)("primary",{className:D.primary,elementType:d.A,externalForwardedProps:F,ownerState:E}),z=(0,r.A)(M,2),_=z[0],H=z[1],W=(0,h.A)("secondary",{className:D.secondary,elementType:d.A,externalForwardedProps:F,ownerState:E}),V=(0,r.A)(W,2),U=V[0],G=V[1];return null==O||O.type===d.A||p||(O=(0,g.jsx)(_,y(y({variant:P?"body2":"body1",component:null!=H&&H.variant?void 0:"span"},H),{},{children:O}))),null==k||k.type===d.A||p||(k=(0,g.jsx)(U,y(y({variant:"body2",color:"textSecondary"},G),{},{children:k}))),(0,g.jsxs)(L,y(y({},R),{},{children:[O,k]}))})}
1,86239:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,N:()=>l});var r=n(63857),i=n(43081),s=n.n(i),a=n(84091),o=function(e){return!!e&&""!==e.trim()&&!(/[^a-z0-9-]/i.test(e)||e.includes("--")||e.startsWith("-")||e.endsWith("-"))},l=function(){var e=(0,r.A)(s().mark(function e(t,n){var r,i,o;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.GqN)();case 2:r=e.sent,i=0;case 4:if(!(i<r.length)){e.next=11;break}if(!((o=r[i])&&n===o.slug&&(!t||o.id!==t))){e.next=8;break}return e.abrupt("return",!1);case 8:i++,e.next=4;break;case 11:return e.abrupt("return",!0);case 12:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()},87420:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/feeds",function(){return n(90142)}])},90142:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>eb,default:()=>ev});var r=n(14232),i=n(89099),s=n(63857),a=n(43081),o=n.n(a),l=n(1173),c=n(82893),d=n(37876);let u=(0,c.A)((0,d.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"DeleteForever");var p=n(30764),x=n(39548),f=n(34711),h=n(65484),g=n(96160),m=n(68572),A=n(44254),y=n(81490),j=n(12524),b=n(52189),v=n(30672),w=n(66068),S=n(25456),T=n(57720),N=n(48227),C=n(78666),P=n(48230),O=n.n(P),k=n(46885),E=n(31866),D=n(35602),F=n(84091),I=n(37332),B=n(69592),L=n(86239),R=n(8257),M=n(44128),z=n(94555),_=n(59860),H=n(42969),W=n(71090),V=n(42118),U=n(77662),G=n(29562),Q=n(41842),K=n(97304),X=n(85674),q=n(78082),Y=n(65401),J=n(14780),$=n(21911),Z=n(54587),ee=n.n(Z),et=n(88992),en=n(91408),er=n(40169),ei=n(62796),es=n(16361),ea=n(57683),eo=n(96709),el=n(45793),ec=(0,ea.Ay)(eo.A)({".contentContainer":{padding:"30px 40px 55px 40px !important"},".formContents":{maxWidth:"705px",margin:"auto"},".mappedFieldGrid":{paddingBottom:"24px"},".fieldLabelText":{fontSize:"12px"},".fieldLabelExplanation":{marginTop:"5px",fontSize:"12px"},".iconButton":{position:"absolute",right:8,top:8},".dialogTitle":{padding:"28px 42px 0px 42px"},".titleText":{fontWeight:700,fontSize:"24px"},".disclaimerText":{marginBottom:"20px"},".saveButtonGrid":{paddingRight:"8px"},".postPicContainer":{width:"104px",position:"relative",marginBottom:"20px"},".postPicHeader":{marginBottom:"10px"},".postPic":{height:"200px",margin:"auto"},".editPicButton":{position:"absolute",bottom:"-5px",left:"-15px",width:"33px",height:"33px",backgroundColor:el.uP,color:"#000000"},".removePicButton":{position:"absolute",top:"15px",left:"-15px",width:"33px",height:"33px",backgroundColor:"#ffffff80"},".editPicInput":{display:"none"},".isArticlesContainer":{marginLeft:"-10px",marginBottom:"20px"},".fieldError":{fontSize:"12px",color:"red"},".cancelButton":{marginRight:"20px"}}),ed=n(59565),eu=["onChange"];function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ex(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ep(Object(n),!0).forEach(function(t){(0,H.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ep(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}let ef=function(e){var t,n,i=e.open,a=e.handleOpenClose,l=e.saveFunction,c=e.feed,u=en.Ik().shape(ex({},ei.q1)),p=(0,et.mN)({resolver:(0,W.t)(u)}),g=p.register,m=p.formState.errors,j=p.handleSubmit,v=p.setValue,w=p.trigger,S=(0,r.useRef)(null),T=(0,r.useState)({src:null==c?void 0:c.feedPic}),N=T[0],C=T[1],P=(0,r.useState)(!!c.isArticles),O=P[0],k=P[1],F=function(){v("Title",null==c?void 0:c.title),v("Text",null==c?void 0:c.text),v("Slug",null==c?void 0:c.slug);var e="",t="",n=[];if(void 0!==c.category){var r=c.category.indexOf("+");-1===r?e=c.category:(e=c.category.substring(0,r),t=c.category.substring(r+1));for(var i=0;i<e.length;i++){var s=e[i],a=ed.orgCatGravvy[s];a&&n.push(a)}}Z(n),v("Category",t),k(!!c.isArticles)};(0,r.useEffect)(function(){F()},[null==c?void 0:c.title,null==c?void 0:c.text,null==c?void 0:c.category,null==c?void 0:c.slug,null==c?void 0:c.isArticles]),(0,r.useEffect)(function(){C({src:null==c?void 0:c.feedPic})},[null==c?void 0:c.feedPic]);var B=(0,f.A)("(max-width:769px)"),R=ed.orgCatGravvyNamesArray.sort(),M=(0,r.useState)([]),H=M[0],Z=M[1],ea=(0,r.useState)(""),eo=ea[0],el=ea[1],ep=(t=(0,s.A)(o().mark(function e(t){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((0,L.E)(t)){e.next=3;break}return el("Invalid slug (only letters, digits, and dashes allowed)"),e.abrupt("return",!1);case 3:return e.next=5,(0,L.N)(c.id,t);case 5:if(e.sent){e.next=9;break}return el("Duplicate slug"),e.abrupt("return",!1);case 9:return el(""),e.abrupt("return",!0);case 11:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),ef=function(e){var t=e.target.value;Z("string"==typeof t?t.split(","):t)},eh=function(e){if(e.target.files&&e.target.files[0]){var t=e.target.files[0],n=URL.createObjectURL(t);C({file:t,src:n})}},eg=(n=(0,s.A)(o().mark(function e(t){var n,r,i,s,d;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,I.g7)(t.Title),r=(0,I.g7)(t.Text),i=t.Slug,s="",H.forEach(function(e){var t=ed.
1catOrgGravvy[e];t&&(s+=t)}),0!==(d=(0,I.g7)(t.Category)).length&&(s+="+".concat(d)),!(n.length<D.Vd||n.length>D.fV||r.length<D.YH||r.length>D.SD||s.length>50)){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,ep(i);case 11:if(e.sent){e.next=14;break}return e.abrupt("return");case 14:c.title=n,c.text=t.Text,c.category=s,c.slug=i,c.isArticles=O,c.stgImg=N,0===N.src.length&&(c.feedPic=""),el(""),a(),l();case 24:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),em=function(){el(""),a(),w()},eA=function(e,t){var n=e.split(" ")[0],r=e.split(" ");r[0]=n;var i=r.join(""),s=m[i]?m[i]:{message:""},a=g(i),o=a.onChange,l=(0,_.A)(a,eu);return(0,d.jsxs)(y.A,{size:{xs:12},className:"mappedFieldGrid",children:["Category"===e&&(0,d.jsxs)(y.A,{sx:{marginBottom:"20px"},children:[(0,d.jsx)(h.A,{className:"fieldLabelText",children:"Categories"}),(0,d.jsx)(G.A,{children:0===H.length&&"Select Categories"}),(0,d.jsx)(Q.A,{value:H,sx:{width:B?"100%":"315px",maxWidth:B?"442px":"315px"},className:"categorySelect",multiple:!0,size:"small",inputProps:{shrink:void 0},label:H.length?"":"Select Categories",onChange:function(e){return ef(e)},renderValue:function(e){return e.length?"(".concat(e.length,") selected"):"Select Categories"},children:R.map(function(e){return(0,d.jsxs)(K.A,{value:e,children:[(0,d.jsx)(X.A,{checked:H.indexOf(e)>-1}),(0,d.jsx)(q.A,{primary:"Unknown"===e?"Uncategorized":e})]},e)})})]}),(0,d.jsx)(h.A,{className:"fieldLabelText",children:"Text"===e?"Description":"Category"===e?"Additional Categories":e}),(0,d.jsx)(Y.A,ex({fullWidth:!0,variant:"outlined",multiline:"Text"===e,rows:"Text"===e?7:1,id:i,error:!!(s&&s.message),helperText:s?s.message:null,onChange:o},l)),(0,d.jsx)(h.A,{className:"fieldLabelExplanation",children:"Text"===e?(0,d.jsxs)("span",{children:[I.rs," By posting on this site, you agree to ",E.$i,"'s"," ",(0,d.jsx)(er.A,{href:"/termsofuse",content:(0,d.jsx)("span",{children:"Terms of Use"}),target:"_terms"}),"."]}):null}),"Slug"===e&&eo&&(0,d.jsx)(h.A,{className:"fieldError",children:eo})]},t)},ey=(0,x.A)(),ej=(0,f.A)(ey.breakpoints.down("sm")),eb=(0,z.S)().isMobileApp;return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(ec,{onClose:em,open:i,fullScreen:ej,sx:eb?{marginTop:"50px"}:{},children:[(0,d.jsxs)(J.A,{className:"dialogTitle",children:[(0,d.jsxs)(h.A,{className:"titleText",children:[null!=c&&c.id?"Edit":"Create"," Feed"]}),(0,d.jsx)(A.A,{className:"iconButton","aria-label":"close",onClick:em,children:(0,d.jsx)(V.A,{})})]}),(0,d.jsx)($.A,{className:"contentContainer",children:(0,d.jsxs)("form",{id:"feedEdit".concat((null==c?void 0:c.id)||""),className:"formContents",children:[(0,d.jsx)(y.A,{container:!0,children:["Title","Text","Category","Slug"].map(function(e,t){return eA(e,t)})}),(0,d.jsxs)("div",{className:"isArticlesContainer",children:[(0,d.jsx)(X.A,{checked:O,onChange:function(e){k(!O)}}),"Articles (posts with title and abstract)"]}),(0,d.jsxs)("div",{className:"postPicContainer",children:[(0,d.jsx)(h.A,{className:"postPicHeader fieldLabelText",children:"Attach Image"}),N.src!==E.ez&&N.src?(0,d.jsx)("img",{src:N.src,height:"100",alt:"Feed Picture"}):(0,d.jsx)(ee(),{src:es.A,alt:"Photo",height:60,width:100}),(0,d.jsx)("input",{ref:S,onChange:function(e){return eh(e)},className:"editPicInput",id:"icon-button-file",accept:"image/png, image/jpeg, image/jpg, image/webp",type:"file"}),(0,d.jsx)(A.A,{onClick:function(){S.current.click()},disableRipple:!0,className:"editPicButton",children:(0,d.jsx)(U.A,{})}),N.src&&(0,d.jsx)(A.A,{onClick:function(){C({file:null,src:""})},disableRipple:!0,className:"removePicButton",children:(0,d.jsx)(V.A,{})})]}),(0,d.jsx)(y.A,{container:!0,direction:"row-reverse",children:(0,d.jsxs)(y.A,{className:"saveButtonGrid",children:[(0,d.jsx)(b.A,{variant:"outlined",color:"primary",className:"cancelButton",onClick:em,children:"Cancel"}),(0,d.jsx)(b.A,{variant:"contained",color:"primary",onClick:j(eg),children:null!=c&&c.id?"Save":"Create"})]})})]})})]})})},eh=function(e){var t,n,i=e.feedId,a=e.title,l=e.text,c=e.feedPic,u=e.category,p=(e.isArticles,e.slug),x=e.allTextVisible,f=e.showNumFollowers,g=e.showNumPosts;(0,z.S)().isMobileApp;var m=(0,r.useState)(0),A=(m[0],m[1]),j=(t=(0,s.A)(o().mark(function e(){var t;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.hQ6)(i,"followFeed");case 2:(t=e.sent)&&A(t.length);case 4:case"end":return e.stop()}},e)})),(0,r.useState)(0)),b=(j[0],j[1]),v=(0,r.useState)(null),w=(v[0],v[1]);n=(0,s.A)(o().mark(function e(){var t;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,F.Wzx)(i,null,100);
1case 2:(t=e.sent)&&(b(t.results.length),w(t.nextToken));case 4:case"end":return e.stop()}},e)})),(0,r.useEffect)(function(){},[i]);var S=(0,r.useState)(!1),T=S[0],N=S[1],C=l.substring(0,350),P=C.lastIndexOf(" ");return(0,d.jsxs)(y.A,{className:"feedSummary".concat(["news","advocacy","community","petitions","blog","support","moderation"].includes(p)?" feedSummaryCompany":""),children:[c&&(0,d.jsx)("div",{className:"feedPicContainer",children:(0,d.jsx)("a",{style:{color:"#000",textDecoration:"none"},href:"".concat(M.kW,"/").concat(p),children:(0,d.jsx)("img",{src:c,width:"100%",className:"feedPic",alt:"Feed Picture"})})}),(0,d.jsx)(h.A,{className:"feedTitle",children:(0,d.jsx)("a",{style:{color:"#000",textDecoration:"none"},href:"".concat(M.kW,"/").concat(p),children:a})}),void 0!==x&&x||l.length<350||T?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"feedDescription",dangerouslySetInnerHTML:{__html:l||""}}),T&&(0,d.jsx)("div",{className:"feedDescription feedDescriptionShowMore",onClick:function(){return N(!1)},children:"Show less"})]}):(0,d.jsx)(d.Fragment,{children:-1!==P&&P<l.length?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"feedDescription",dangerouslySetInnerHTML:{__html:"".concat(C.substring(0,P)," …")}}),(0,d.jsx)("div",{className:"feedDescription feedDescriptionShowMore",onClick:function(){return N(!0)},children:"Show more"})]}):(0,d.jsx)("div",{className:"feedDescription",dangerouslySetInnerHTML:{__html:l}})}),(void 0!==f&&f||void 0!==g&&g)&&(0,d.jsxs)("div",{className:"feedStatistics",children:["news"===p||"advocacy"===p?(0,d.jsx)("div",{className:"feedStatistic",children:"1,000+ articles"}):"community"===p?(0,d.jsx)("div",{className:"feedStatistic",children:"10,000+ posts"}):null,"news"!==p&&"advocacy"!==p&&!1,"news"!==p&&"advocacy"!==p&&"community"!==p&&(0,d.jsx)("div",{className:"feedCategory",children:(0,D.Pt)(u||"",!0)})]})]})};var eg=n(12691);let em={src:"/_next/static/media/feeds-background-interwoven.e417d255.png"};var eA=(0,ea.Ay)($.A)(function(e){var t=e.theme;return{width:"unset",maxWidth:"1280px !important",margin:"".concat(eg.Ce,"px auto 0 auto"),padding:"0 !important",".feedsTitleContainer":(0,H.A)((0,H.A)({backgroundImage:"url(".concat(em.src,")"),backgroundRepeat:"no-repeat",backgroundSize:"cover",padding:"35px 150px",height:"174px"},t.breakpoints.down("md"),{padding:"35px 50px 25px"}),t.breakpoints.down("sm"),{padding:"10px 25px 15px",height:"150px"}),".feedsTitle":(0,H.A)({fontSize:"64px",fontWeight:400,lineHeight:"77px",color:"#fff",textShadow:"2px 2px 5px #000"},t.breakpoints.down("sm"),{marginTop:"15px",fontSize:"40px",lineHeight:"50px"}),".feedsSubtitle":(0,H.A)({fontWeight:400,fontSize:"20px",lineHeight:"24px",color:"#fff",textShadow:"2px 2px 5px #000"},t.breakpoints.down("sm"),{fontSize:"16px",lineHeight:"20px"}),".feedsContainer":(0,H.A)((0,H.A)({marginTop:"20px",padding:"0 150px"},t.breakpoints.down("md"),{padding:"0 50px"}),t.breakpoints.down("sm"),{padding:"0 25px",marginTop:"0"}),".feedsSummaryContainer":{padding:"0",alignItems:"stretch"},".feedsButtons":{margin:"20px 0"},".headerContainer":{backgroundColor:"rgba(48, 96, 105, 0.05)",padding:"14px 48px 10px 48px"},".headerTitle":{padding:"14px 20px 10px 20px",fontSize:"1rem",fontWeight:700,color:t.palette.primary.main,textAlign:"center"},".cellID":{maxWidth:"80px"},".feedSummary":{padding:"20px 20px 10px",height:"100%",background:"#fff",border:"1px solid ".concat(el.A2),borderRadius:"10px"},".feedSummaryCompany":{background:"#3534940a"},".feedTitle":(0,H.A)({display:"inline-block",marginTop:"10px",marginBottom:"10px",fontSize:"24px",fontWeight:400,lineHeight:"29px"},t.breakpoints.down("md"),{width:"85%"}),".feedImage":{width:"100%",maxHeight:"50px"},".feedPicContainer":{},".feedPic":{borderRadius:"4px"},".feedDescription":{margin:"-15px 0 0"},".feedDescriptionShowMore":{marginTop:"-5px",marginBottom:"15px",color:"grey",cursor:"pointer"},".feedCategory":{marginTop:"10px",fontStyle:"italic",color:"grey",fontSize:"14px"},".feedStatistics":{margin:"10px auto",fontSize:"16px"},".feedStatistic":{display:"inline",paddingRight:"30px"},".deleted":{textDecoration:"line-through"},".actions":{paddingTop:"5px",minWidth:"120px",textAlign:"center"},".noResultsText":{textAlign:"center",marginTop:"30px"}}}),ey=n(12619);let ej=function(e){var t,n,i,a,c,P=e.userIsAuthorized,_=e.userIsAdmin,H=e.editMode,W=void 0!==H&&H,V=(0,z.S)(),U=V.user,G=V.setLoadingSpinner;V.isMobileApp;var Q=(0,x.A)(),K=(0,f.A)(Q.breakpoints.down("md")),X=null==U||null==(a=U.getUser)?void 0:a.id,q=null==U||null==(c=U.getUser)?void 0:c.userRole,Y=(0,r.useState)(!1),J=Y[0],$=Y[1];(0,r.useEffect)(function(){$(_||(0,R.VT)(q))},[_,q]);var Z=(0,r.useState)(!1),ee=Z[0],et=Z[1],en=(0,r.useState)(!1),er=en[0],ei=en[1],es=(0,r.useState)(!1),ea=es[0],eo=es[1],el=(0,r.useState)([]),ec=el[0],ed=el[1],eu=(0,r.useState)(!1),ep=eu[0],ex=eu[1],eg={id:"",title:"",text:"",category:"",slug:"",isArticles:!0,feedPic:"",stgImg:{src:""},deleted:!1},em=(0,r.useState)(eg),ej=em[0],eb=em[1],ev=function(e){eb({id:e.id,title:e.title||"",text:(0,I.sP)(e.text||""),category:e.category||"",slug:e.slug||"",isArticles:e.isArticles||!1,feedPic:e.feedPic,stgImg:{src:""},deleted:e.deleted||!1})},ew=(t=(0,s.A)(o().mark(function e(){var t,n;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return ex(!0),e.next=3,(0,F.GqN)();case 3:return t=e.sent,e.next=6,(0,D.Tq)(t,!0);case 6:(n=e.sent).sort(function(e,t){return"news"===e.slug?-1:"news"===t.slug?1:"community"===e.slug?-1:"community"===t.slug||"support"===e.slug?1:"support"===t.slug?-1:"moderation"===e.slug?1:"moderation"===t.slug?-1:"blog"===e.slug?1:"blog"===t.slug?-1:"petitions"===e.slug?1:"petitions"===t.slug||(e.title||"")<(t.title||"")?-1:+((e.title||"")>(t.title||""))}),ed(n),ex(!1);case 10:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});(0,r.useEffect)(function(){ew()},[X]);var eS=(n=(0,s.A)(o().mark(function e(t,n){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.file){e.next=3;break}return e.next=3,(0,R.bj)(n.file,(0,B.Gw)(t),t);case 3:ew(),eb(eg);case 5:case"end":return e.stop()}},e)})),function(e,t){return n.apply(this,arguments)}),eT=function(e,t,n,r,i,s){e=(0,I.g7)(e);var a=(0,I.g7)(t);X&&J&&!(e.length<D.Vd)&&!(e.length>D.fV)&&!(a.length<D.YH)&&!(a.length>D.SD)&&(0,L.E)(r)&&(G(!0),t=(0,I._R)(t),(0,F.d_U)(X,e,t,n,r,i).then(function(e){e&&eS(e.id,s),G(!1)}).catch(function(e){console.log("creating feed failed",e),G(!1)}))},eN=(i=(0,s.A)(o().mark(function e(t,n){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.file){e.next=5;break}return e.next=3,(0,R.bj)(n.file,(0,B.Gw)(t),t);case 3:e.next=6;break;case 5:null===n.file&&(0,R.rm)((0,B.Gw)(t),t);case 6:ew(),eb(eg);case 8:case"end":return e.stop()}},e)})),function(e,t){return i.apply(this,arguments)}),eC=function(e,t,n,r,i,s,a){G(!0),n=(0,I._R)(n),(0,F.yus)(e,t,n,r,i,s).then(function(t){t&&eN(e,a),G(!1)}).catch(function(e){console.log("updating feed failed"),console.log(e),G(!1)})},eP=function(e,t){e&&(G(!0),(0,F.ftJ)(e,t).then(function(){ew(),eb(eg),G(!1)}).catch(function(e){console.log("(un)deleting feed failed"),console.log(e),G(!1)}))},eO=(0,r.useState)(""),ek=eO[0],eE=eO[1],eD=function(e,t){if(t.length<100||e===ek)return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{dangerouslySetInnerHTML:{__html:t||""}}),e===ek&&(0,d.jsx)("span",{className:"feedDescriptionShowMore",onClick:function(){return eE("")},children:"Show less"})]});var n=t.substring(0,100),r=n.lastIndexOf(" ");return -1!==r&&r<t.length?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{dangerouslySetInnerHTML:{__html:"".concat(n.substring(0,r)," …")}}),(0,d.jsx)("span",{className:"feedDescriptionShowMore",onClick:function(){return eE(e)},children:"Show more"})]}):(0,d.jsx)("span",{dangerouslySetInnerHTML:{__html:t}})},eF=function(){return(0,d.jsxs)(j.A,{children:[(0,d.jsxs)(y.A,{className:"feedsTitle",children:[E.$i," Feeds"]}),(0,d.jsx)(y.A,{className:"feedsSubtitle",children:J&&W?"Create, modify, and delete feeds":"Browse causes, discussions, and topics you care about"})]})};return P?(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(eA,{children:[(0,d.jsx)(y.A,{className:"feedsTitleContainer",children:eF()}),J&&W&&(0,d.jsx)(y.A,{className:"feedsContainer feedsButtons",children:(0,d.jsx)(b.A,{variant:"contained",color:"primary",onClick:function(){eb(eg),ei(!0)},children:"Create New Feed"})}),ep?(0,d.jsx)(g.A,{open:!0,children:(0,d.jsx)(ey.A,{size:100,withWedge:!1})}):ec.length?J&&W?(0,d.jsx)(T.A,{className:"feedsContainer",children:(0,d.jsxs)(v.A,{sx:{minWidth:400},"aria-label":"simple table",children:[!K&&(0,d.jsx)(N.A,{children:(0,d.jsxs)(C.A,{className:"headerContainer",children:[J&&(0,d.jsx)(S.A,{className:"headerTitle cellID",children:"ID"}),(0,d.jsx)(S.A,{className:"headerTitle",children:"Title"}),(0,d.jsx)(S.A,{className:"headerTitle",children:"Text"}),(0,d.jsx)(S.A,{className:"headerTitle",children:"Category"}),(0,d.jsx)(S.A,{className:"headerTitle",children:"Slug"}),(0,d.jsx)(S.A,{className:"headerTitle",children:"Articles"}),(0,d.jsx)(S.A,{className:"headerTitle",children:"Picture"}),(0,d.jsx)(S.A,{className:"headerTitle",children:"Created"}),J&&(0,d.jsx)(S.A,{className:"headerTitle",children:"Actions"})]})}),(0,d.jsx)(w.A,{children:ec.map(function(e){return(0,d.jsxs)(C.A,{sx:{"&:last-child td, &:last-child th":{border:0},borderTop:"6px solid #F8F8F8",background:"#fff",verticalAlign:"top"}
1,children:[J&&(0,d.jsx)(S.A,{sx:{width:"80px",fontSize:"11px"},children:e.id}),(0,d.jsx)(S.A,{sx:{width:"80px"},children:(0,d.jsx)(m.A,{title:"Click to open the feed.",enterDelay:1e3,enterNextDelay:1e3,enterTouchDelay:0,children:(0,d.jsx)("a",{style:{color:"#000",textDecoration:"none"},href:"".concat(M.kW,"/").concat(e.slug),children:(0,d.jsx)("span",{className:e.deleted?"deleted":"",children:e.title})})})}),(0,d.jsx)(S.A,{sx:{paddingLeft:"5px",minWidth:"200px"},children:eD(e.id,e.text||"")}),(0,d.jsx)(S.A,{sx:{paddingLeft:"5px"},children:e.category}),(0,d.jsx)(S.A,{sx:{paddingLeft:"5px"},children:e.slug}),(0,d.jsx)(S.A,{sx:{paddingLeft:"5px",textAlign:"center"},children:e.isArticles?"yes":"no"}),(0,d.jsx)(S.A,{sx:{paddingLeft:"5px"},children:e.feedPic&&(0,d.jsx)("img",{className:"feedImage",src:e.feedPic,alt:"Feed Picture"})}),(0,d.jsxs)(S.A,{sx:{paddingLeft:"5px",fontSize:"11px",textAlign:"center"},children:[new Date(e.createdAt).toLocaleDateString(),", ",new Date(e.createdAt).toLocaleTimeString()]}),J&&(0,d.jsxs)(S.A,{className:"actions",children:[(0,d.jsx)(A.A,{"aria-label":"edit",onClick:function(){ev(e),ei(!0)},children:(0,d.jsx)(p.A,{})}),(0,d.jsx)(A.A,{"aria-label":"delete",onClick:function(){ev(e),eo(!0)},children:e.deleted?(0,d.jsx)(u,{}):(0,d.jsx)(l.A,{})})]})]},e.id)})})]})}):(0,d.jsx)(y.A,{container:!0,rowSpacing:2,columnSpacing:{md:2},className:"feedsContainer",children:ec.filter(function(e){return e&&("moderation"!==e.slug||(0,R.X1)(q))}).map(function(e){return e.deleted?null:(0,d.jsx)(y.A,{size:{xs:12,md:6},className:"feedsSummaryContainer",children:(0,d.jsx)(eh,{feedId:e.id,title:e.title||"",text:e.text||"",feedPic:e.feedPic,category:e.category||"",isArticles:!!e.isArticles,slug:e.slug||"",showNumFollowers:!0,showNumPosts:!0})},e.id)})}):(0,d.jsx)(h.A,{className:"noResultsText",children:"There are no items to display."}),J&&!W&&(0,d.jsx)(y.A,{className:"feedsContainer feedsButtons",children:(0,d.jsx)(O(),{href:"".concat(M.L2,"?edit=true"),children:(0,d.jsx)(b.A,{variant:"outlined",color:"primary",children:"Edit Feeds"})})}),(0,d.jsx)(k.A,{open:ee,onClose:function(){return et(!1)},leftOptionFunction:function(){et(!1),ei(!0)},rightOptionFunction:function(){et(!1),ej&&eT(ej.title,ej.text,ej.category,ej.slug,ej.isArticles,ej.stgImg)},message:(0,d.jsx)(function(){return(0,d.jsx)(h.A,{align:"center",sx:{marginBottom:"15px"},children:"This feed will be added to the list of feeds."})},{}),dialogTitle:(0,d.jsx)(function(){return(0,d.jsx)(h.A,{gutterBottom:!0,align:"center",variant:"h5",sx:{fontWeight:"bold",margin:"10px"},children:"Are you sure you want to create this feed?"})},{}),leftOptionText:"Cancel",rightOptionText:"Create"}),(0,d.jsx)(ef,{open:er,handleOpenClose:function(){return ei(!er)},saveFunction:function(){ej&&(ej.id?eC(ej.id,ej.title,ej.text,ej.category,ej.slug,ej.isArticles,ej.stgImg):et(!0))},feed:ej}),(0,d.jsx)(k.A,{open:ea,onClose:function(){return eo(!1)},leftOptionFunction:function(){return eo(!1)},rightOptionFunction:(0,s.A)(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:eo(!1),eP(ej.id,!ej.deleted);case 2:case"end":return e.stop()}},e)})),message:(0,d.jsx)(function(){return(0,d.jsxs)(h.A,{align:"center",sx:{marginBottom:"15px"},children:[ej&&ej.deleted?"This feed will again be visible by others.":"This feed will no longer be visible by others.",(0,d.jsx)("br",{}),"This action can be reversed."]})},{}),dialogTitle:(0,d.jsx)(function(){return(0,d.jsxs)(h.A,{gutterBottom:!0,align:"center",variant:"h5",sx:{fontWeight:"bold",margin:"10px"},children:["Are you sure you want to ",ej&&ej.deleted?"undelete":"delete"," this feed?"]})},{}),leftOptionText:"Cancel",rightOptionText:ej&&ej.deleted?"Undelete":"Delete"})]})}):(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(eA,{children:[(0,d.jsx)(y.A,{className:"feedsTitleContainer",children:eF()}),(0,d.jsx)(y.A,{container:!0,justifyContent:"center",children:(0,d.jsx)("h4",{children:"This feature is not yet available. Stay tuned!"})})]})})};var eb=!0;let ev=function(e){var t=e.userIsAuthorized,n=e.userIsAdmin,r=(0,i.useRouter)(),s=!1;return r.isReady&&(s=!!r.query.edit),(0,d.jsx)(ej,{userIsAuthorized:t,userIsAdmin:n,editMode:s})}}},e=>{e.O(0,[2238,636,6593,8792],()=>e(e.s=87420)),_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.