PageSourceSearch

https://commmune.com/_next/static/chunks/pages/view/editcomment-d7117574cea62610.js

js commmune.com collected 2026-09-24 20:06:34 UTC 15,248 bytes, 7 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bd988c3f-a27a-5c07-87fa-6e356efa0676")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7025],{5749:(e,t,r)=>{"use strict";r.d(t,{$:()=>i.$});var i=r(52599)},9106:(e,t,r)=>{"use strict";r.d(t,{E:()=>a});var i=r(45023),o=r(22136),n=r(25391);function a({src:e,disableQualityByDPR:t,disableSrcSet:r,disableLibraryParam:d,imgixParams:l,attributeConfig:c,onMounted:s,...u}){if(/\.gif($|\?)/i.test(e)||0>e.indexOf("storage.googleapis.com/users-cuuf")&&!/^(https?:\/\/[^\/]+\/private-files\/brands\/\d+)\/([\w-]+)\/([\w-]+)\/([\w-]+)\/(.+)/.test(e))return(0,i.Y)("img",{src:e,...u,alt:u.alt});let p=(0,n.p)(e),{sizes:m,width:g,height:b,className:h,...f}=u;return(0,i.Y)(o.Ay,{src:p,className:h,disableQualityByDPR:t,disableSrcSet:r,disableLibraryParam:d,imgixParams:l,attributeConfig:c,onMounted:s,sizes:m,width:g,height:b,htmlAttributes:f})}},9662:(e,t,r)=>{"use strict";var i=r(3396);t.A=void 0;var o=i(r(18969)),n=r(2183);t.A=(0,o.default)((0,n.jsx)("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59zm7 6V3.5L18.5 9H14c-.55 0-1-.45-1-1"}),"InsertDriveFileRounded")},14087:(e,t,r)=>{"use strict";r.d(t,{a:()=>a});var i=r(45023);r(36439);var o=r(30915),n=r(27570);function a({as:e="div",id:t,children:r,"data-cy":o,reverseOrder:n=!1,...l}){return(0,i.Y)(e,{id:t,css:d({reverseOrder:n,...l}),"data-cy":o,children:r})}let d=({gap:e,columnGap:t,rowGap:r,width:i,height:a,alignItems:d,justifyContent:l,flexGrow:c,flexShrink:s,flexBasis:u,reverseOrder:p})=>(0,o.AH)("display:flex;",void 0!==e&&`gap: ${n.Kz[e]};`," ",void 0!==t&&`column-gap: ${n.Kz[t]};`," ",void 0!==r&&`row-gap: ${n.Kz[r]};`," ",void 0!==i&&`width: ${n.Po[i]};`," ",void 0!==a&&`height: ${n.Ch[a]};`,"  align-items:",d,";justify-content:",l,";",void 0!==c&&`flex-grow: ${c};`," ",void 0!==s&&`flex-shrink: ${s};`," ",void 0!==u&&`flex-basis: ${"number"==typeof u?`${u}px`:u};`,"  flex-direction:",p?"column-reverse":"column",";")},25391:(e,t,r)=>{"use strict";r.d(t,{p:()=>o});var i=r(4552);let o=e=>{if(/^(https?:\/\/[^\/]+\/private-files\/brands\/\d+)\/([\w-]+)\/([\w-]+)\/([\w-]+)\/(.+)/.test(e))return e;let t=(0,i.NL)();return e.replace(t?"storage.googleapis.com/users-cuuf-local":"storage.googleapis.com/users-cuuf",t?"commmune-local.imgix.net":"commmune.imgix.net")}},38356:(e,t,r)=>{var i=r(11158),o=0;e.exports=function(e){var t=++o;return i(e)+t}},44103:(e,t,r)=>{"use strict";r.d(t,{k5:()=>l});var i=r(36439),o={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},n=i.createContext&&i.createContext(o),a=function(){return(a=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},d=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,i=Object.getOwnPropertySymbols(e);o<i.length;o++)0>t.indexOf(i[o])&&(r[i[o]]=e[i[o]]);return r};function l(e){return function(t){return i.createElement(c,a({attr:a({},e.attr)},t),function e(t){return t&&t.map(function(t,r){return i.createElement(t.tag,a({key:r},t.attr),e(t.child))})}(e.child))}}function c(e){var t=function(t){var r,o=e.size||t.size||"1em";t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className);var n=e.attr,l=e.title,c=d(e,["attr","title"]);return i.createElement("svg",a({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,c,{className:r,style:a({color:e.color||t.color},t.style,e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),l&&i.createElement("title",null,l),e.children)};return void 0!==n?i.createElement(n.Consumer,null,function(e){return t(e)}):t(o)}},57590:(e,t,r)=>{"use strict";r.d(t,{L:()=>l});
3var i=r(92362),o=r(41471),n=r(14643),a=r(36439);let d=e=>e.app.routeHistory,l=()=>{let e=(0,o.useDispatch)(),t=(0,o.useSelector)(d);return{lastRoute:t[t.length-2]??n.default.VIEW_HOME,handleClick:(0,a.useCallback)(()=>{e((0,i.td)())},[e])}}},60138:e=>{var t=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],r="u">typeof window,i=r&&null!=window.mozInnerScreenX;function o(e,o,n){if(!r)throw Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var a=n&&n.debug||!1;if(a){var d=document.querySelector("#input-textarea-caret-position-mirror-div");d&&d.parentNode.removeChild(d)}var l=document.createElement("div");l.id="input-textarea-caret-position-mirror-div",document.body.appendChild(l);var c=l.style,s=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,u="INPUT"===e.nodeName;c.whiteSpace="pre-wrap",u||(c.wordWrap="break-word"),c.position="absolute",a||(c.visibility="hidden"),t.forEach(function(e){u&&"lineHeight"===e?c.lineHeight=s.height:c[e]=s[e]}),i?e.scrollHeight>parseInt(s.height)&&(c.overflowY="scroll"):c.overflow="hidden",l.textContent=e.value.substring(0,o),u&&(l.textContent=l.textContent.replace(/\s/g,"\xa0"));var p=document.createElement("span");p.textContent=e.value.substring(o)||".",l.appendChild(p);var m={top:p.offsetTop+parseInt(s.borderTopWidth),left:p.offsetLeft+parseInt(s.borderLeftWidth),height:parseInt(s.lineHeight)};return a?p.style.backgroundColor="#aaa":document.body.removeChild(l),m}void 0!==e.exports?e.exports=o:r&&(window.getCaretCoordinates=o)},63888:(e,t,r)=>{"use strict";r.d(t,{a:()=>l});var i=r(45023);r(36439);var o=r(30915),n=r(81411),a=r(27570);let d=(e,t,r,i)=>{if(void 0===t)return"";let o=(t,r)=>{if(void 0===t)return"";let o="number"==typeof t?t.toString():t,n=i&&Object.keys(i).includes(o)?i[o]:o,a=`${e}: ${n};`;return r?`@media (max-width: ${r}) { ${a} }`:a},n="";if("object"!=typeof t)n+=o(t);else for(let[e,i]of("default"in t&&(n+=o(t.default)),Object.entries(r))){let r=t[e];void 0!==r&&(n+=o(r,i))}return n};function l({as:e="div",id:t,children:r,onMouseEnter:o,onMouseLeave:n,onClick:a,"data-cy":d,"data-selected":s,clickable:u,...p}){return(0,i.Y)(e,{css:c(p,u),id:t,onMouseEnter:o,onMouseLeave:n,onClick:a,"data-cy":d,"data-selected":s,children:r})}let c=({display:e,flexDirection:t,flexWrap:r,flexGrow:i,gap:l,columnGap:c,rowGap:s,position:u,top:p,bottom:m,left:g,right:b,alignItems:h,justifyContent:f,insetBlockStart:v,insetBlockEnd:y,insetInlineStart:w,insetInlineEnd:E,width:A,minWidth:x,maxWidth:z,calcWidth:C,height:k,minHeight:$,padding:K,paddingTop:S,paddingRight:Y,paddingBottom:j,paddingLeft:N,paddingBlock:P,paddingBlockStart:O,paddingBlockEnd:_,paddingInline:I,paddingInlineStart:D,paddingInlineEnd:H,margin:L,marginBlock:V,marginBlockStart:F,marginBlockEnd:M,marginInline:T,marginInlineStart:B,marginInlineEnd:R,marginLeft:W,marginRight:Q,marginTop:U,marginBottom:q,background:X,borderPosition:J,borderWidth:G,borderBlockWidth:Z,borderBlockStartWidth:ee,borderBlockEndWidth:et,borderInlineWidth:er,borderInlineStartWidth:ei,borderInlineEndWidth:eo,borderColor:en,borderRadius:ea,borderStartStartRadius:ed,borderStartEndRadius:el,borderEndStartRadius:ec,borderEndEndRadius:es,hover:eu,shadowAlpha:ep,overflowX:em,overflowY:eg,opacity:eb,zIndex:eh,scrollBarWidth:ef,moveToRight:ev,containerType:ey},ew)=>{let eE=J?`border-${J}`:"border";return(0,o.AH)(d("display",e,a.EA)," ",d("flex-direction",t,a.EA)," ",r&&`flex-wrap: ${r};`," ",i&&"flex-grow: 1;"," ",d("gap",l,a.EA,a.Kz)," ",d("column-gap",c,a.EA,a.Kz)," ",d("row-gap",s,a.EA,a.Kz)," ",u&&`position: ${u};`," ",d("top",p,a.EA,a.Kz)," ",d("bottom",m,a.EA,a.Kz)," ",d("left",g,a.EA,a.Kz)," ",d("right",b,a.EA,a.Kz)," ",h&&`align-items: ${h};`," ",f&&`justify-content: ${f};`," ",d("inset-block-start",v,a.EA,a.Kz)," ",d("inset-block-end",y,a.EA,a.Kz)," ",d("inset-inline-start",w,a.EA,a.Kz)," ",d("inset-inline-end",E,a.EA,a.Kz)," ",d("width",A,a.EA,a.Po)," ",d("min-width",x,a.EA,a.Po)," ",d("max-width",z,a.EA,a.Po)," ",d("width",C,a.EA,a.Po)," ",d("height",k,a.EA,a.Ch)," ",d("min-height",$,a.EA,a.Ch)," ",d("padding",K,a.EA,a.Kz)," ",d("padding-top",S,a.EA,a.Kz)," ",d("padding-right",Y,a.EA,a.Kz)," ",d("padding-bottom",j,a.EA,a.Kz)," ",d("padding-left",N,a.EA,a.Kz)," ",d("padding-block",P,a.EA,a.Kz)," ",d("padding-block-start",O,a.EA,a.Kz)," ",d("padding-block-end",_,a.EA,a.Kz)," ",d("padding-inline",I,a.EA,a.Kz)," ",d("padding-inline-start",D,a.EA,a.Kz)," ",d("padding-inline-end",H,a.EA,a.Kz)," ",d("margin",L,a.EA,a.Kz)," ",d("margin-block",V,a.EA,a.Kz)," ",d("margin-block-start",F,a.EA,a.Kz)," ",d("margin-block-end",M,a.EA,a.Kz)," ",d("margin-inline",T,a.EA,a.Kz)," ",d("margin-inline-start",B,a.EA,a.Kz)," ",d("margin-inline-end",R,a.EA,a.Kz)," ",d("margin-top",U,a.EA,a.Kz)," ",d("margin-bottom",q,a.EA,a.Kz)," ",d("margin-left",W,a.EA,a.Kz)," ",d("margin-right",Q,a.EA,a.Kz)," ",X&&`background: ${(0,n.Tt)(X)?a.Q1.user.background[X]:X};`," ",(en||G||ee||et||ei||eo)&&`
4  ${eE}-width: 0;
5  ${eE}-style: solid;`," ",d(`${eE}-width`,G,a.EA,a.V6)," ",d("border-block-width",Z,a.EA,a.V6)," ",d("border-block-start-width",ee,a.EA,a.V6)," ",d("border-block-end-width",et,a.EA,a.V6)," ",d("border-inline-width",er,a.EA,a.V6)," ",d("border-inline-start-width",ei,a.EA,a.V6)," ",d("border-inline-end-width",eo,a.EA,a.V6)," ",en&&(0,n.os)(en)?`${eE}-color: ${a.Q1.user.border[en]}`:`${eE}-color: ${en}`,";",d("border-radius",ea,a.EA,a.wA)," ",d("border-start-start-radius",ed,a.EA,a.wA)," ",d("border-start-end-radius",el,a.EA,a.wA)," ",d("border-end-start-radius",ec,a.EA,a.wA)," ",d("border-end-end-radius",es,a.EA,a.wA)," ",eu?.border&&`&:hover { border-color: ${a.Q1.user.border[eu.border]};}`," ",ep&&`box-shadow: ${(0,a.Vo)({type:"default",alpha:ep})};`," ",em&&`overflow-x: ${em};`," ",eg&&`overflow-y: ${eg};`," ",eb&&`opacity: ${a.ur[eb]};`," ",eh&&`z-index: ${a.Pj[eh]};`," ",ef&&`scrollbar-width: ${ef};`," ",ew&&"cursor: pointer;"," ",ev&&"margin-left: auto;"," ",ey&&`container-type: ${ey};`)}},84354:(e,t,r)=>{"use strict";r.d(t,{o:()=>m});
5var i=r(45023),o=r(30915),n=r(23144),a=r.n(n),d=r(93737),l=r(95550),c=r(57590),s=r(51963),u=r(78201);let p=(0,o.AH)("color:inherit;text-decoration:none;");function m({iconSize:e=26,label:t}){let{lastRoute:r,handleClick:o}=(0,c.L)();return(0,i.Y)(a(),{href:(0,s.Hs)(r),css:p,children:t?(0,i.Y)(u.o5,{onClick:o,"data-cy":"back-button",children:t}):(0,i.Y)(u.K0,{onClick:o,"data-cy":"back-button","aria-label":"Back",children:(0,i.Y)(d._Jj,{size:e,style:{color:`${l.Q}`}})})})}},86489:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>$});var i=r(45023),o=r(51949),n=r.n(o),a=r(36439),d=r(90524),l=r(41471),c=r(816),s=r(14643),u=r(82239),p=r(65893),m=r(19321),g=r(18147),b=r(84354),h=r(78201);function f({isDisabled:e,colors:t,onClickDone:r}){let{t:o}=(0,d.B)(["components/organisms"]);return(0,i.FD)(h.az,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottom:1,padding:2,children:[(0,i.Y)(b.o,{label:o("Cancel")}),(0,i.Y)(h.$n,{type:"submit",onClick:r,style:{color:e?t.tab.color:t.tabActive.color},disabled:e,children:(0,i.Y)(h.o5,{children:o("Save")})})]})}var v=r(43248),y=r(33922),w=r(49151),E=r(40389),A=r(16737),x=r(87512),z=r(88442),C=r(96058);let k=e=>{let t,r,{commentId:o}=e,{t:u}=(0,d.B)(["pages/view"]),b=(0,l.useSelector)(e=>e.app.comment.data),x=(0,l.useSelector)(e=>e.site.common.colors),k=(0,l.useSelector)(e=>e.app.routeHistory),$=(0,l.useSelector)(C.ND),K=(t=(0,w.q)(),r=(0,l.useDispatch)(),(0,a.useCallback)(async e=>{let i=new FormData;i.append("body",e.body),A.BC(i,e.files),await t.put(`/v2/comments/${o}`,i),r((0,y.A)(E.qB.SET_COMMENT)({}))},[t,o,r])),S=a.useMemo(()=>[...(b?.images||[]).map(e=>({[A.tu]:!0,type:"image/png",preview:e})),...(b?.videos||[]).map(e=>({[A.tu]:!0,type:"video/mp4",...e})),...(b?.documents||[]).map(e=>({[A.tu]:!0,type:A._P(e.originalname),...e}))],[b]),[Y,j]=a.useState({bodyRaw:"",body:"",files:S,hasUpdatedFiles:!1,submitting:!1,uploading:!1,isLoading:!0}),{submitting:N,bodyRaw:P,body:O,files:_,hasUpdatedFiles:I,uploading:D,isLoading:H}=Y,L=a.useCallback(e=>{j(t=>({...t,bodyRaw:e,body:e}))},[]),V=a.useCallback((e,t)=>{e&&(e.preventDefault(),e.stopPropagation());let r=_.filter((e,r)=>r!==t);j(e=>({...e,files:r,hasUpdatedFiles:!0}))},[_]),F=a.useCallback(()=>{let e=k.length>=2?k[k.length-2]:s.default.VIEW_HOME;(0,z.R)().pushRoute(e)},[k]),M=a.useCallback(async()=>{if(!N){if(j(e=>({...e,submitting:!0})),Y.body===b?.body&&!I)return void F();K({body:O,files:_}).then(()=>F()).catch(()=>{j(e=>({...e,submitting:!1}))})}},[O,b?.body,_,F,I,Y.body,N,K]);if(a.useEffect(()=>{H&&o===b?.id&&j(e=>({...e,bodyRaw:b.body,body:b.body,files:S,isLoading:!1}))},[b?.body,b?.id,o,S,H]),H)return(0,i.Y)("div",{});let T=O!==b?.body,B=N||!P||!T&&!I||D;return(0,i.FD)(a.Fragment,{children:[Y.submitting&&(0,i.Y)(h.P,{size:20}),(0,i.FD)("div",{"data-cy":"edit-comment",className:"jsx-a58c9e7d466cdcc3 px-3 pb-3 mx-auto mt-3 edit-wrap",children:[(0,i.Y)(f,{onClickDone:M,isDisabled:B,colors:x}),(0,i.Y)("section",{className:"jsx-a58c9e7d466cdcc3 mt-3 mention",children:(0,i.Y)(v.P,{placeholder:u("Body text"),value:Y.bodyRaw,variant:"editpost",onChangeValue:L})}),(0,i.Y)("section",{className:"jsx-a58c9e7d466cdcc3 images mx-auto",children:_.length>0?(0,i.Y)(m.y,{children:(0,i.Y)(m.k,{files:_,onClickDeleteIcon:V,imageStyle:{height:"256px"}})}):null}),(0,i.Y)("section",{className:"jsx-a58c9e7d466cdcc3 dropzone",children:$&&(0,i.Y)(g.Q,{files:_,onChange:e=>{j(t=>({...t,files:e,hasUpdatedFiles:!0}))},onFileUploading:e=>{j(t=>({...t,uploading:e}))},maxUploadFiles:c.default.MAX_UPLOAD_FILES_BY_COMMENT,iconSize:"large"})}),(0,i.Y)("section",{className:"jsx-a58c9e7d466cdcc3 text-center",children:(0,i.Y)(p.a,{className:"btn btn-primary my-2 my-sm-0 w-75",type:"submit",onClick:M,disabled:B,color:B?x.tab.color:x.tabActive.color,children:u("Save")})})]}),(0,i.Y)(n(),{id:"a58c9e7d466cdcc3",children:".edit-wrap.jsx-a58c9e7d466cdcc3{background:#fff;border-radius:4px;max-width:688px}.images.jsx-a58c9e7d466cdcc3{max-width:256px}.images.jsx-a58c9e7d466cdcc3 img.jsx-a58c9e7d466cdcc3{hieght:256px}.dropzone.jsx-a58c9e7d466cdcc3{padding:16px}.mention.jsx-a58c9e7d466cdcc3{position:relative}"})]})};k.getInitialProps=({ctx:e})=>{let{dispatch:t}=e.store,r=+e.query.commentId;return r&&t(x.zf.request({commentId:r})),{commentId:(0,u.CommentId)(r)}};let $=k},95550:(e,t,r)=>{"use strict";r.d(t,{Q:()=>i});let i="rgba(0, 0, 0, 0.87)"},95864:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/view/editcomment",function(){return r(86489)}])}},e=>{e.O(0,[51,2136,6328,9321,8854,636,6593,8792],()=>e(e.s=95864)),_N_E=e.O()}]);
6//# sourceMappingURL=editcomment-d7117574cea62610.js.map
7//# debugId=bd988c3f-a27a-5c07-87fa-6e356efa0676

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.