@amityco/ulta-ui-kit 1.0.0-beta.27 → 1.0.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +103 -103
- package/dist/index.js +103 -103
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -58,10 +58,10 @@ import { useMotionValue, motion } from 'framer-motion';
|
|
|
58
58
|
import { trim } from 'lodash';
|
|
59
59
|
import * as ks from '@radix-ui/react-tabs';
|
|
60
60
|
|
|
61
|
-
var GF=Object.create;var zu=Object.defineProperty,ZF=Object.defineProperties,QF=Object.getOwnPropertyDescriptor,WF=Object.getOwnPropertyDescriptors,qF=Object.getOwnPropertyNames,Ud=Object.getOwnPropertySymbols,KF=Object.getPrototypeOf,Uu=Object.prototype.hasOwnProperty,Q9=Object.prototype.propertyIsEnumerable;var Z9=(e,t,o)=>t in e?zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,c=(e,t)=>{for(var o in t||(t={}))Uu.call(t,o)&&Z9(e,o,t[o]);if(Ud)for(var o of Ud(t))Q9.call(t,o)&&Z9(e,o,t[o]);return e},E=(e,t)=>ZF(e,WF(t));(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,o)=>(typeof require!="undefined"?require:t)[o]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var P=(e,t)=>{var o={};for(var r in e)Uu.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&Ud)for(var r of Ud(e))t.indexOf(r)<0&&Q9.call(e,r)&&(o[r]=e[r]);return o};var XF=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var YF=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of qF(t))!Uu.call(e,n)&&n!==o&&zu(e,n,{get:()=>t[n],enumerable:!(r=QF(t,n))||r.enumerable});return e};var RF=(e,t,o)=>(o=e!=null?GF(KF(e)):{},YF(!e||!e.__esModule?zu(o,"default",{value:e,enumerable:!0}):o,e));var $u=(e,t,o)=>{if(!t.has(e))throw TypeError("Cannot "+o)};var $o=(e,t,o)=>($u(e,t,"read from private field"),o?o.call(e):t.get(e)),wo=(e,t,o)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,o);},
|
|
61
|
+
var GF=Object.create;var zu=Object.defineProperty,ZF=Object.defineProperties,QF=Object.getOwnPropertyDescriptor,WF=Object.getOwnPropertyDescriptors,qF=Object.getOwnPropertyNames,Ud=Object.getOwnPropertySymbols,KF=Object.getPrototypeOf,Uu=Object.prototype.hasOwnProperty,Q9=Object.prototype.propertyIsEnumerable;var Z9=(e,t,o)=>t in e?zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,c=(e,t)=>{for(var o in t||(t={}))Uu.call(t,o)&&Z9(e,o,t[o]);if(Ud)for(var o of Ud(t))Q9.call(t,o)&&Z9(e,o,t[o]);return e},E=(e,t)=>ZF(e,WF(t));(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,o)=>(typeof require!="undefined"?require:t)[o]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var P=(e,t)=>{var o={};for(var r in e)Uu.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&Ud)for(var r of Ud(e))t.indexOf(r)<0&&Q9.call(e,r)&&(o[r]=e[r]);return o};var XF=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var YF=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of qF(t))!Uu.call(e,n)&&n!==o&&zu(e,n,{get:()=>t[n],enumerable:!(r=QF(t,n))||r.enumerable});return e};var RF=(e,t,o)=>(o=e!=null?GF(KF(e)):{},YF(!e||!e.__esModule?zu(o,"default",{value:e,enumerable:!0}):o,e));var $u=(e,t,o)=>{if(!t.has(e))throw TypeError("Cannot "+o)};var $o=(e,t,o)=>($u(e,t,"read from private field"),o?o.call(e):t.get(e)),wo=(e,t,o)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,o);},Pa=(e,t,o,r)=>($u(e,t,"write to private field"),t.set(e,o),o);var Or=(e,t,o)=>($u(e,t,"access private method"),o);var _=(e,t,o)=>new Promise((r,n)=>{var i=l=>{try{s(o.next(l));}catch(d){n(d);}},a=l=>{try{s(o.throw(l));}catch(d){n(d);}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,a);s((o=o.apply(e,t)).next());});var J9=XF((Fue,K9)=>{K9.exports=function(t,o,r,n){var i=r?r.call(n,t,o):void 0;if(i!==void 0)return !!i;if(t===o)return !0;if(typeof t!="object"||!t||typeof o!="object"||!o)return !1;var a=Object.keys(t),s=Object.keys(o);if(a.length!==s.length)return !1;for(var l=Object.prototype.hasOwnProperty.bind(o),d=0;d<a.length;d++){var p=a[d];if(!l(p))return !1;var u=t[p],g=o[p];if(i=r?r.call(n,u,g,p):void 0,i===!1||i===void 0&&u!==g)return !1}return !0};});var ro=function(){return ro=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i]);}return t},ro.apply(this,arguments)};function _a(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,i;r<n;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function W9(e){var t=Object.create(null);return function(o){return t[o]===void 0&&(t[o]=e(o)),t[o]}}var eO=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,q9=W9(function(e){return eO.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});RF(J9());var X9={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var Hi=typeof process!="undefined"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",dy="active",qd="data-styled-version",W1="6.1.11",Ru=`/*!sc*/
|
|
62
62
|
`,Xd=typeof window!="undefined"&&"HTMLElement"in window,aO=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process!="undefined"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process!="undefined"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production");var R9=/invalid hook call/i,$d=new Set,sO=function(e,t){if(process.env.NODE_ENV!=="production"){var o=t?' with the id of "'.concat(t,'"'):"",r="The component ".concat(e).concat(o,` has been created dynamically.
|
|
63
63
|
`)+`You may see this warning because you've called styled inside another component.
|
|
64
|
-
To resolve this only create new StyledComponents outside of any render method and function component.`,n=console.error;try{var i=!0;console.error=function(a){for(var s=[],l=1;l<arguments.length;l++)s[l-1]=arguments[l];R9.test(a)?(i=!1,$d.delete(r)):n.apply(void 0,
|
|
64
|
+
To resolve this only create new StyledComponents outside of any render method and function component.`,n=console.error;try{var i=!0;console.error=function(a){for(var s=[],l=1;l<arguments.length;l++)s[l-1]=arguments[l];R9.test(a)?(i=!1,$d.delete(r)):n.apply(void 0,_a([a],s,!1));},useRef(),i&&!$d.has(r)&&(console.warn(r),$d.add(r));}catch(a){R9.test(a.message)&&$d.delete(r);}finally{console.error=n;}}},Yd=Object.freeze([]),q1=Object.freeze({});function lO(e,t,o){return o===void 0&&(o=q1),e.theme!==o.theme&&e.theme||t||o.theme}var Zu=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),mO=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,cO=/(^-|-$)/g;function ey(e){return e.replace(mO,"-").replace(cO,"")}var dO=/(a)(d)/gi,Vd=52,ty=function(e){return String.fromCharCode(e+(e>25?39:97))};function Qu(e){var t,o="";for(t=Math.abs(e);t>Vd;t=t/Vd|0)o=ty(t%Vd)+o;return (ty(t%Vd)+o).replace(dO,"$1-$2")}var Vu,py=5381,Es=function(e,t){for(var o=t.length;o;)e=33*e^t.charCodeAt(--o);return e},uy=function(e){return Es(py,e)};function gy(e){return Qu(uy(e)>>>0)}function fy(e){return process.env.NODE_ENV!=="production"&&typeof e=="string"&&e||e.displayName||e.name||"Component"}function ju(e){return typeof e=="string"&&(process.env.NODE_ENV==="production"||e.charAt(0)===e.charAt(0).toLowerCase())}var yy=typeof Symbol=="function"&&Symbol.for,hy=yy?Symbol.for("react.memo"):60115,pO=yy?Symbol.for("react.forward_ref"):60112,uO={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Cy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},fO=((Vu={})[pO]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Vu[hy]=Cy,Vu);function oy(e){return ("type"in(t=e)&&t.type.$$typeof)===hy?Cy:"$$typeof"in e?fO[e.$$typeof]:uO;var t;}var yO=Object.defineProperty,hO=Object.getOwnPropertyNames,ry=Object.getOwnPropertySymbols,CO=Object.getOwnPropertyDescriptor,vO=Object.getPrototypeOf,ny=Object.prototype;function vy(e,t,o){if(typeof t!="string"){if(ny){var r=vO(t);r&&r!==ny&&vy(e,r,o);}var n=hO(t);ry&&(n=n.concat(ry(t)));for(var i=oy(e),a=oy(t),s=0;s<n.length;++s){var l=n[s];if(!(l in gO||o&&o[l]||a&&l in a||i&&l in i)){var d=CO(t,l);try{yO(e,l,d);}catch(p){}}}}return e}function Ls(e){return typeof e=="function"}function e4(e){return typeof e=="object"&&"styledComponentId"in e}function Bs(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function y2(e,t){if(e.length===0)return "";for(var o=e[0],r=1;r<e.length;r++)o+=e[r];return o}function K1(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Wu(e,t,o){if(o===void 0&&(o=!1),!o&&!K1(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Wu(e[r],t[r]);else if(K1(t))for(var r in t)e[r]=Wu(e[r],t[r]);return e}function t4(e,t){Object.defineProperty(e,"toString",{value:t});}var xO=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
65
65
|
|
|
66
66
|
`,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
67
67
|
|
|
@@ -102,7 +102,7 @@ as for instance in your render method then you may be running into this limitati
|
|
|
102
102
|
|
|
103
103
|
`,17:`CSSStyleSheet could not be found on HTMLStyleElement.
|
|
104
104
|
Has styled-components' style tag been unmounted or altered by another script?
|
|
105
|
-
`,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function bO(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var o=e[0],r=[],n=1,i=e.length;n<i;n+=1)r.push(e[n]);return r.forEach(function(a){o=o.replace(/%[a-z]/,a);}),o}function sr(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(bO.apply(void 0,Pa([xO[e]],t,!1)).trim())}var IO=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t;}return e.prototype.indexOfGroup=function(t){for(var o=0,r=0;r<t;r++)o+=this.groupSizes[r];return o},e.prototype.insertRules=function(t,o){if(t>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;t>=i;)if((i<<=1)<0)throw sr(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var a=n;a<i;a++)this.groupSizes[a]=0;}for(var s=this.indexOfGroup(t+1),l=(a=0,o.length);a<l;a++)this.tag.insertRule(s,o[a])&&(this.groupSizes[t]++,s++);},e.prototype.clearGroup=function(t){if(t<this.length){var o=this.groupSizes[t],r=this.indexOfGroup(t),n=r+o;this.groupSizes[t]=0;for(var i=r;i<n;i++)this.tag.deleteRule(r);}},e.prototype.getGroup=function(t){var o="";if(t>=this.length||this.groupSizes[t]===0)return o;for(var r=this.groupSizes[t],n=this.indexOfGroup(t),i=n+r,a=n;a<i;a++)o+="".concat(this.tag.getRule(a)).concat(Ru);return o},e}(),wO=1<<30,Qd=new Map,Kd=new Map,Wd=1,jd=function(e){if(Qd.has(e))return Qd.get(e);for(;Kd.has(Wd);)Wd++;var t=Wd++;if(process.env.NODE_ENV!=="production"&&((0|t)<0||t>wO))throw sr(16,"".concat(t));return Qd.set(e,t),Kd.set(t,e),t},MO=function(e,t){Wd=t+1,Qd.set(e,t),Kd.set(t,e);},PO="style[".concat(Di,"][").concat(qd,'="').concat(W1,'"]'),_O=new RegExp("^".concat(Di,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),TO=function(e,t,o){for(var r,n=o.split(","),i=0,a=n.length;i<a;i++)(r=n[i])&&e.registerName(t,r);},kO=function(e,t){for(var o,r=((o=t.textContent)!==null&&o!==void 0?o:"").split(Ru),n=[],i=0,a=r.length;i<a;i++){var s=r[i].trim();if(s){var l=s.match(_O);if(l){var d=0|parseInt(l[1],10),p=l[2];d!==0&&(MO(p,d),TO(e,p,l[3]),e.getTag().insertRules(d,n)),n.length=0;}else n.push(s);}}};function qu(){return typeof __webpack_nonce__!="undefined"?__webpack_nonce__:null}var xy=function(e){var t=document.head,o=e||t,r=document.createElement("style"),n=function(s){var l=Array.from(s.querySelectorAll("style[".concat(Di,"]")));return l[l.length-1]}(o),i=n!==void 0?n.nextSibling:null;r.setAttribute(Di,dy),r.setAttribute(qd,W1);var a=qu();return a&&r.setAttribute("nonce",a),o.insertBefore(r,i),r},SO=function(){function e(t){this.element=xy(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var r=document.styleSheets,n=0,i=r.length;n<i;n++){var a=r[n];if(a.ownerNode===o)return a}throw sr(17)}(this.element),this.length=0;}return e.prototype.insertRule=function(t,o){try{return this.sheet.insertRule(o,t),this.length++,!0}catch(r){return !1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--;},e.prototype.getRule=function(t){var o=this.sheet.cssRules[t];return o&&o.cssText?o.cssText:""},e}(),NO=function(){function e(t){this.element=xy(t),this.nodes=this.element.childNodes,this.length=0;}return e.prototype.insertRule=function(t,o){if(t<=this.length&&t>=0){var r=document.createTextNode(o);return this.element.insertBefore(r,this.nodes[t]||null),this.length++,!0}return !1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--;},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e}(),EO=function(){function e(t){this.rules=[],this.length=0;}return e.prototype.insertRule=function(t,o){return t<=this.length&&(this.rules.splice(t,0,o),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--;},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e}(),iy=Xd,BO={isServer:!Xd,useCSSOMInjection:!aO},h2=function(){function e(t,o,r){t===void 0&&(t=q1),o===void 0&&(o={});var n=this;this.options=ro(ro({},BO),t),this.gs=o,this.names=new Map(r),this.server=!!t.isServer,!this.server&&Xd&&iy&&(iy=!1,function(i){for(var a=document.querySelectorAll(PO),s=0,l=a.length;s<l;s++){var d=a[s];d&&d.getAttribute(Di)!==dy&&(kO(i,d),d.parentNode&&d.parentNode.removeChild(d));}}(this)),t4(this,function(){return function(i){for(var a=i.getTag(),s=a.length,l="",d=function(u){var g=function(h){return Kd.get(h)}(u);if(g===void 0)return "continue";var f=i.names.get(g),y=a.getGroup(u);if(f===void 0||y.length===0)return "continue";var v="".concat(Di,".g").concat(u,'[id="').concat(g,'"]'),C="";f!==void 0&&f.forEach(function(h){h.length>0&&(C+="".concat(h,","));}),l+="".concat(y).concat(v,'{content:"').concat(C,'"}').concat(Ru);},p=0;p<s;p++)d(p);return l}(n)});}return e.registerId=function(t){return jd(t)},e.prototype.reconstructWithOptions=function(t,o){return o===void 0&&(o=!0),new e(ro(ro({},this.options),t),this.gs,o&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=function(o){var r=o.useCSSOMInjection,n=o.target;return o.isServer?new EO(n):r?new SO(n):new NO(n)}(this.options),new IO(t)));var t;},e.prototype.hasNameForId=function(t,o){return this.names.has(t)&&this.names.get(t).has(o)},e.prototype.registerName=function(t,o){if(jd(t),this.names.has(t))this.names.get(t).add(o);else {var r=new Set;r.add(o),this.names.set(t,r);}},e.prototype.insertRules=function(t,o,r){this.registerName(t,o),this.getTag().insertRules(jd(t),r);},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear();},e.prototype.clearRules=function(t){this.getTag().clearGroup(jd(t)),this.clearNames(t);},e.prototype.clearTag=function(){this.tag=void 0;},e}(),LO=/&/g,AO=/^\s*\/\/.*$/gm;function by(e,t){return e.map(function(o){return o.type==="rule"&&(o.value="".concat(t," ").concat(o.value),o.value=o.value.replaceAll(",",",".concat(t," ")),o.props=o.props.map(function(r){return "".concat(t," ").concat(r)})),Array.isArray(o.children)&&o.type!=="@keyframes"&&(o.children=by(o.children,t)),o})}function Iy(e){var t,o,r,n=q1,i=n.options,a=i===void 0?q1:i,s=n.plugins,l=s===void 0?Yd:s,d=function(g,f,y){return y.startsWith(o)&&y.endsWith(o)&&y.replaceAll(o,"").length>0?".".concat(t):g},p=l.slice();p.push(function(g){g.type===lr.RULESET&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(LO,o).replace(r,d));}),a.prefix&&p.push(lr.prefixer),p.push(lr.stringify);var u=function(g,f,y,v){f===void 0&&(f=""),y===void 0&&(y=""),v===void 0&&(v="&"),t=v,o=f,r=new RegExp("\\".concat(o,"\\b"),"g");var C=g.replace(AO,""),h=lr.compile(y||f?"".concat(y," ").concat(f," { ").concat(C," }"):C);a.namespace&&(h=by(h,a.namespace));var x=[];return lr.serialize(h,lr.middleware(p.concat(lr.rulesheet(function(b){return x.push(b)})))),x};return u.hash=l.length?l.reduce(function(g,f){return f.name||sr(15),Es(g,f.name)},py).toString():"",u}var DO=new h2,Ku=Iy(),o4=R.createContext({shouldForwardProp:void 0,styleSheet:DO,stylis:Ku});o4.Consumer;R.createContext(void 0);function Ju(){return useContext(o4)}var Xu=function(){function e(t,o){var r=this;this.inject=function(n,i){i===void 0&&(i=Ku);var a=r.name+i.hash;n.hasNameForId(r.id,a)||n.insertRules(r.id,a,i(r.rules,a,"@keyframes"));},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=o,t4(this,function(){throw sr(12,String(r.name))});}return e.prototype.getName=function(t){return t===void 0&&(t=Ku),this.name+t.hash},e}(),OO=function(e){return e>="A"&&e<="Z"};function ay(e){for(var t="",o=0;o<e.length;o++){var r=e[o];if(o===1&&r==="-"&&e[0]==="-")return e;OO(r)?t+="-"+r.toLowerCase():t+=r;}return t.startsWith("ms-")?"-"+t:t}var wy=function(e){return e==null||e===!1||e===""},My=function(e){var t,o,r=[];for(var n in e){var i=e[n];e.hasOwnProperty(n)&&!wy(i)&&(Array.isArray(i)&&i.isCss||Ls(i)?r.push("".concat(ay(n),":"),i,";"):K1(i)?r.push.apply(r,Pa(Pa(["".concat(n," {")],My(i),!1),["}"],!1)):r.push("".concat(ay(n),": ").concat((t=n,(o=i)==null||typeof o=="boolean"||o===""?"":typeof o!="number"||o===0||t in X9||t.startsWith("--")?String(o).trim():"".concat(o,"px")),";")));}return r};function _a(e,t,o,r){if(wy(e))return [];if(e4(e))return [".".concat(e.styledComponentId)];if(Ls(e)){if(!Ls(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return [e];var n=e(t);return process.env.NODE_ENV==="production"||typeof n!="object"||Array.isArray(n)||n instanceof Xu||K1(n)||n===null||console.error("".concat(fy(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),_a(n,t,o,r)}var i;return e instanceof Xu?o?(e.inject(o,r),[e.getName(r)]):[e]:K1(e)?My(e):Array.isArray(e)?Array.prototype.concat.apply(Yd,e.map(function(a){return _a(a,t,o,r)})):[e.toString()]}function Py(e){for(var t=0;t<e.length;t+=1){var o=e[t];if(Ls(o)&&!e4(o))return !1}return !0}var zO=uy(W1),UO=function(){function e(t,o,r){this.rules=t,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&Py(t),this.componentId=o,this.baseHash=Es(zO,o),this.baseStyle=r,h2.registerId(o);}return e.prototype.generateAndInjectStyles=function(t,o,r){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,o,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&o.hasNameForId(this.componentId,this.staticRulesId))n=Bs(n,this.staticRulesId);else {var i=y2(_a(this.rules,t,o,r)),a=Qu(Es(this.baseHash,i)>>>0);if(!o.hasNameForId(this.componentId,a)){var s=r(i,".".concat(a),void 0,this.componentId);o.insertRules(this.componentId,a,s);}n=Bs(n,a),this.staticRulesId=a;}else {for(var l=Es(this.baseHash,r.hash),d="",p=0;p<this.rules.length;p++){var u=this.rules[p];if(typeof u=="string")d+=u,process.env.NODE_ENV!=="production"&&(l=Es(l,u));else if(u){var g=y2(_a(u,t,o,r));l=Es(l,g+p),d+=g;}}if(d){var f=Qu(l>>>0);o.hasNameForId(this.componentId,f)||o.insertRules(this.componentId,f,r(d,".".concat(f),void 0,this.componentId)),n=Bs(n,f);}}return n},e}(),Jd=R.createContext(void 0);Jd.Consumer;function _y(e){var t=R.useContext(Jd),o=useMemo(function(){return function(r,n){if(!r)throw sr(14);if(Ls(r)){var i=r(n);if(process.env.NODE_ENV!=="production"&&(i===null||Array.isArray(i)||typeof i!="object"))throw sr(7);return i}if(Array.isArray(r)||typeof r!="object")throw sr(8);return n?ro(ro({},n),r):r}(e.theme,t)},[e.theme,t]);return e.children?R.createElement(Jd.Provider,{value:o},e.children):null}var Gu={},sy=new Set;function $O(e,t,o){var r=e4(e),n=e,i=!ju(e),a=t.attrs,s=a===void 0?Yd:a,l=t.componentId,d=l===void 0?function(M,I){var w=typeof M!="string"?"sc":ey(M);Gu[w]=(Gu[w]||0)+1;var N="".concat(w,"-").concat(gy(W1+w+Gu[w]));return I?"".concat(I,"-").concat(N):N}(t.displayName,t.parentComponentId):l,p=t.displayName,u=p===void 0?function(M){return ju(M)?"styled.".concat(M):"Styled(".concat(fy(M),")")}(e):p,g=t.displayName&&t.componentId?"".concat(ey(t.displayName),"-").concat(t.componentId):t.componentId||d,f=r&&n.attrs?n.attrs.concat(s).filter(Boolean):s,y=t.shouldForwardProp;if(r&&n.shouldForwardProp){var v=n.shouldForwardProp;if(t.shouldForwardProp){var C=t.shouldForwardProp;y=function(M,I){return v(M,I)&&C(M,I)};}else y=v;}var h=new UO(o,g,r?n.componentStyle:void 0);function x(M,I){return function(w,N,T){var L=w.attrs,D=w.componentStyle,U=w.defaultProps,Z=w.foldedComponentIds,B=w.styledComponentId,$=w.target,G=R.useContext(Jd),q=Ju(),z=w.shouldForwardProp||q.shouldForwardProp;process.env.NODE_ENV!=="production"&&useDebugValue(B);var H=lO(N,G,U)||q1,F=function(oe,be,pe){for(var We,vt=ro(ro({},be),{className:void 0,theme:pe}),Vt=0;Vt<oe.length;Vt+=1){var jt=Ls(We=oe[Vt])?We(vt):We;for(var De in jt)vt[De]=De==="className"?Bs(vt[De],jt[De]):De==="style"?ro(ro({},vt[De]),jt[De]):jt[De];}return be.className&&(vt.className=Bs(vt.className,be.className)),vt}(L,N,H),j=F.as||$,Q={};for(var k in F)F[k]===void 0||k[0]==="$"||k==="as"||k==="theme"&&F.theme===H||(k==="forwardedAs"?Q.as=F.forwardedAs:z&&!z(k,j)||(Q[k]=F[k],z||process.env.NODE_ENV!=="development"||q9(k)||sy.has(k)||!Zu.has(j)||(sy.add(k),console.warn('styled-components: it looks like an unknown prop "'.concat(k,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var V=function(oe,be){var pe=Ju(),We=oe.generateAndInjectStyles(be,pe.styleSheet,pe.stylis);return process.env.NODE_ENV!=="production"&&useDebugValue(We),We}(D,F);process.env.NODE_ENV!=="production"&&w.warnTooManyClasses&&w.warnTooManyClasses(V);var ae=Bs(Z,B);return V&&(ae+=" "+V),F.className&&(ae+=" "+F.className),Q[ju(j)&&!Zu.has(j)?"class":"className"]=ae,Q.ref=T,createElement(j,Q)}(b,M,I)}x.displayName=u;var b=R.forwardRef(x);return b.attrs=f,b.componentStyle=h,b.displayName=u,b.shouldForwardProp=y,b.foldedComponentIds=r?Bs(n.foldedComponentIds,n.styledComponentId):"",b.styledComponentId=g,b.target=r?n.target:e,Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(M){this._foldedDefaultProps=r?function(I){for(var w=[],N=1;N<arguments.length;N++)w[N-1]=arguments[N];for(var T=0,L=w;T<L.length;T++)Wu(I,L[T],!0);return I}({},n.defaultProps,M):M;}}),process.env.NODE_ENV!=="production"&&(sO(u,g),b.warnTooManyClasses=function(M,I){var w={},N=!1;return function(T){if(!N&&(w[T]=!0,Object.keys(w).length>=200)){var L=I?' with the id of "'.concat(I,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(M).concat(L,`.
|
|
105
|
+
`,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function bO(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var o=e[0],r=[],n=1,i=e.length;n<i;n+=1)r.push(e[n]);return r.forEach(function(a){o=o.replace(/%[a-z]/,a);}),o}function sr(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(bO.apply(void 0,_a([xO[e]],t,!1)).trim())}var IO=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t;}return e.prototype.indexOfGroup=function(t){for(var o=0,r=0;r<t;r++)o+=this.groupSizes[r];return o},e.prototype.insertRules=function(t,o){if(t>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;t>=i;)if((i<<=1)<0)throw sr(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var a=n;a<i;a++)this.groupSizes[a]=0;}for(var s=this.indexOfGroup(t+1),l=(a=0,o.length);a<l;a++)this.tag.insertRule(s,o[a])&&(this.groupSizes[t]++,s++);},e.prototype.clearGroup=function(t){if(t<this.length){var o=this.groupSizes[t],r=this.indexOfGroup(t),n=r+o;this.groupSizes[t]=0;for(var i=r;i<n;i++)this.tag.deleteRule(r);}},e.prototype.getGroup=function(t){var o="";if(t>=this.length||this.groupSizes[t]===0)return o;for(var r=this.groupSizes[t],n=this.indexOfGroup(t),i=n+r,a=n;a<i;a++)o+="".concat(this.tag.getRule(a)).concat(Ru);return o},e}(),wO=1<<30,Qd=new Map,Kd=new Map,Wd=1,jd=function(e){if(Qd.has(e))return Qd.get(e);for(;Kd.has(Wd);)Wd++;var t=Wd++;if(process.env.NODE_ENV!=="production"&&((0|t)<0||t>wO))throw sr(16,"".concat(t));return Qd.set(e,t),Kd.set(t,e),t},MO=function(e,t){Wd=t+1,Qd.set(e,t),Kd.set(t,e);},PO="style[".concat(Hi,"][").concat(qd,'="').concat(W1,'"]'),_O=new RegExp("^".concat(Hi,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),TO=function(e,t,o){for(var r,n=o.split(","),i=0,a=n.length;i<a;i++)(r=n[i])&&e.registerName(t,r);},kO=function(e,t){for(var o,r=((o=t.textContent)!==null&&o!==void 0?o:"").split(Ru),n=[],i=0,a=r.length;i<a;i++){var s=r[i].trim();if(s){var l=s.match(_O);if(l){var d=0|parseInt(l[1],10),p=l[2];d!==0&&(MO(p,d),TO(e,p,l[3]),e.getTag().insertRules(d,n)),n.length=0;}else n.push(s);}}};function qu(){return typeof __webpack_nonce__!="undefined"?__webpack_nonce__:null}var xy=function(e){var t=document.head,o=e||t,r=document.createElement("style"),n=function(s){var l=Array.from(s.querySelectorAll("style[".concat(Hi,"]")));return l[l.length-1]}(o),i=n!==void 0?n.nextSibling:null;r.setAttribute(Hi,dy),r.setAttribute(qd,W1);var a=qu();return a&&r.setAttribute("nonce",a),o.insertBefore(r,i),r},SO=function(){function e(t){this.element=xy(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var r=document.styleSheets,n=0,i=r.length;n<i;n++){var a=r[n];if(a.ownerNode===o)return a}throw sr(17)}(this.element),this.length=0;}return e.prototype.insertRule=function(t,o){try{return this.sheet.insertRule(o,t),this.length++,!0}catch(r){return !1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--;},e.prototype.getRule=function(t){var o=this.sheet.cssRules[t];return o&&o.cssText?o.cssText:""},e}(),NO=function(){function e(t){this.element=xy(t),this.nodes=this.element.childNodes,this.length=0;}return e.prototype.insertRule=function(t,o){if(t<=this.length&&t>=0){var r=document.createTextNode(o);return this.element.insertBefore(r,this.nodes[t]||null),this.length++,!0}return !1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--;},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e}(),EO=function(){function e(t){this.rules=[],this.length=0;}return e.prototype.insertRule=function(t,o){return t<=this.length&&(this.rules.splice(t,0,o),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--;},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e}(),iy=Xd,BO={isServer:!Xd,useCSSOMInjection:!aO},h2=function(){function e(t,o,r){t===void 0&&(t=q1),o===void 0&&(o={});var n=this;this.options=ro(ro({},BO),t),this.gs=o,this.names=new Map(r),this.server=!!t.isServer,!this.server&&Xd&&iy&&(iy=!1,function(i){for(var a=document.querySelectorAll(PO),s=0,l=a.length;s<l;s++){var d=a[s];d&&d.getAttribute(Hi)!==dy&&(kO(i,d),d.parentNode&&d.parentNode.removeChild(d));}}(this)),t4(this,function(){return function(i){for(var a=i.getTag(),s=a.length,l="",d=function(u){var g=function(h){return Kd.get(h)}(u);if(g===void 0)return "continue";var f=i.names.get(g),y=a.getGroup(u);if(f===void 0||y.length===0)return "continue";var v="".concat(Hi,".g").concat(u,'[id="').concat(g,'"]'),C="";f!==void 0&&f.forEach(function(h){h.length>0&&(C+="".concat(h,","));}),l+="".concat(y).concat(v,'{content:"').concat(C,'"}').concat(Ru);},p=0;p<s;p++)d(p);return l}(n)});}return e.registerId=function(t){return jd(t)},e.prototype.reconstructWithOptions=function(t,o){return o===void 0&&(o=!0),new e(ro(ro({},this.options),t),this.gs,o&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=function(o){var r=o.useCSSOMInjection,n=o.target;return o.isServer?new EO(n):r?new SO(n):new NO(n)}(this.options),new IO(t)));var t;},e.prototype.hasNameForId=function(t,o){return this.names.has(t)&&this.names.get(t).has(o)},e.prototype.registerName=function(t,o){if(jd(t),this.names.has(t))this.names.get(t).add(o);else {var r=new Set;r.add(o),this.names.set(t,r);}},e.prototype.insertRules=function(t,o,r){this.registerName(t,o),this.getTag().insertRules(jd(t),r);},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear();},e.prototype.clearRules=function(t){this.getTag().clearGroup(jd(t)),this.clearNames(t);},e.prototype.clearTag=function(){this.tag=void 0;},e}(),LO=/&/g,AO=/^\s*\/\/.*$/gm;function by(e,t){return e.map(function(o){return o.type==="rule"&&(o.value="".concat(t," ").concat(o.value),o.value=o.value.replaceAll(",",",".concat(t," ")),o.props=o.props.map(function(r){return "".concat(t," ").concat(r)})),Array.isArray(o.children)&&o.type!=="@keyframes"&&(o.children=by(o.children,t)),o})}function Iy(e){var t,o,r,n=q1,i=n.options,a=i===void 0?q1:i,s=n.plugins,l=s===void 0?Yd:s,d=function(g,f,y){return y.startsWith(o)&&y.endsWith(o)&&y.replaceAll(o,"").length>0?".".concat(t):g},p=l.slice();p.push(function(g){g.type===lr.RULESET&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(LO,o).replace(r,d));}),a.prefix&&p.push(lr.prefixer),p.push(lr.stringify);var u=function(g,f,y,v){f===void 0&&(f=""),y===void 0&&(y=""),v===void 0&&(v="&"),t=v,o=f,r=new RegExp("\\".concat(o,"\\b"),"g");var C=g.replace(AO,""),h=lr.compile(y||f?"".concat(y," ").concat(f," { ").concat(C," }"):C);a.namespace&&(h=by(h,a.namespace));var x=[];return lr.serialize(h,lr.middleware(p.concat(lr.rulesheet(function(b){return x.push(b)})))),x};return u.hash=l.length?l.reduce(function(g,f){return f.name||sr(15),Es(g,f.name)},py).toString():"",u}var DO=new h2,Ku=Iy(),o4=R.createContext({shouldForwardProp:void 0,styleSheet:DO,stylis:Ku});o4.Consumer;R.createContext(void 0);function Ju(){return useContext(o4)}var Xu=function(){function e(t,o){var r=this;this.inject=function(n,i){i===void 0&&(i=Ku);var a=r.name+i.hash;n.hasNameForId(r.id,a)||n.insertRules(r.id,a,i(r.rules,a,"@keyframes"));},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=o,t4(this,function(){throw sr(12,String(r.name))});}return e.prototype.getName=function(t){return t===void 0&&(t=Ku),this.name+t.hash},e}(),OO=function(e){return e>="A"&&e<="Z"};function ay(e){for(var t="",o=0;o<e.length;o++){var r=e[o];if(o===1&&r==="-"&&e[0]==="-")return e;OO(r)?t+="-"+r.toLowerCase():t+=r;}return t.startsWith("ms-")?"-"+t:t}var wy=function(e){return e==null||e===!1||e===""},My=function(e){var t,o,r=[];for(var n in e){var i=e[n];e.hasOwnProperty(n)&&!wy(i)&&(Array.isArray(i)&&i.isCss||Ls(i)?r.push("".concat(ay(n),":"),i,";"):K1(i)?r.push.apply(r,_a(_a(["".concat(n," {")],My(i),!1),["}"],!1)):r.push("".concat(ay(n),": ").concat((t=n,(o=i)==null||typeof o=="boolean"||o===""?"":typeof o!="number"||o===0||t in X9||t.startsWith("--")?String(o).trim():"".concat(o,"px")),";")));}return r};function Ta(e,t,o,r){if(wy(e))return [];if(e4(e))return [".".concat(e.styledComponentId)];if(Ls(e)){if(!Ls(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return [e];var n=e(t);return process.env.NODE_ENV==="production"||typeof n!="object"||Array.isArray(n)||n instanceof Xu||K1(n)||n===null||console.error("".concat(fy(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Ta(n,t,o,r)}var i;return e instanceof Xu?o?(e.inject(o,r),[e.getName(r)]):[e]:K1(e)?My(e):Array.isArray(e)?Array.prototype.concat.apply(Yd,e.map(function(a){return Ta(a,t,o,r)})):[e.toString()]}function Py(e){for(var t=0;t<e.length;t+=1){var o=e[t];if(Ls(o)&&!e4(o))return !1}return !0}var zO=uy(W1),UO=function(){function e(t,o,r){this.rules=t,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&Py(t),this.componentId=o,this.baseHash=Es(zO,o),this.baseStyle=r,h2.registerId(o);}return e.prototype.generateAndInjectStyles=function(t,o,r){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,o,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&o.hasNameForId(this.componentId,this.staticRulesId))n=Bs(n,this.staticRulesId);else {var i=y2(Ta(this.rules,t,o,r)),a=Qu(Es(this.baseHash,i)>>>0);if(!o.hasNameForId(this.componentId,a)){var s=r(i,".".concat(a),void 0,this.componentId);o.insertRules(this.componentId,a,s);}n=Bs(n,a),this.staticRulesId=a;}else {for(var l=Es(this.baseHash,r.hash),d="",p=0;p<this.rules.length;p++){var u=this.rules[p];if(typeof u=="string")d+=u,process.env.NODE_ENV!=="production"&&(l=Es(l,u));else if(u){var g=y2(Ta(u,t,o,r));l=Es(l,g+p),d+=g;}}if(d){var f=Qu(l>>>0);o.hasNameForId(this.componentId,f)||o.insertRules(this.componentId,f,r(d,".".concat(f),void 0,this.componentId)),n=Bs(n,f);}}return n},e}(),Jd=R.createContext(void 0);Jd.Consumer;function _y(e){var t=R.useContext(Jd),o=useMemo(function(){return function(r,n){if(!r)throw sr(14);if(Ls(r)){var i=r(n);if(process.env.NODE_ENV!=="production"&&(i===null||Array.isArray(i)||typeof i!="object"))throw sr(7);return i}if(Array.isArray(r)||typeof r!="object")throw sr(8);return n?ro(ro({},n),r):r}(e.theme,t)},[e.theme,t]);return e.children?R.createElement(Jd.Provider,{value:o},e.children):null}var Gu={},sy=new Set;function $O(e,t,o){var r=e4(e),n=e,i=!ju(e),a=t.attrs,s=a===void 0?Yd:a,l=t.componentId,d=l===void 0?function(M,I){var w=typeof M!="string"?"sc":ey(M);Gu[w]=(Gu[w]||0)+1;var N="".concat(w,"-").concat(gy(W1+w+Gu[w]));return I?"".concat(I,"-").concat(N):N}(t.displayName,t.parentComponentId):l,p=t.displayName,u=p===void 0?function(M){return ju(M)?"styled.".concat(M):"Styled(".concat(fy(M),")")}(e):p,g=t.displayName&&t.componentId?"".concat(ey(t.displayName),"-").concat(t.componentId):t.componentId||d,f=r&&n.attrs?n.attrs.concat(s).filter(Boolean):s,y=t.shouldForwardProp;if(r&&n.shouldForwardProp){var v=n.shouldForwardProp;if(t.shouldForwardProp){var C=t.shouldForwardProp;y=function(M,I){return v(M,I)&&C(M,I)};}else y=v;}var h=new UO(o,g,r?n.componentStyle:void 0);function x(M,I){return function(w,N,T){var L=w.attrs,D=w.componentStyle,U=w.defaultProps,Z=w.foldedComponentIds,B=w.styledComponentId,$=w.target,G=R.useContext(Jd),q=Ju(),z=w.shouldForwardProp||q.shouldForwardProp;process.env.NODE_ENV!=="production"&&useDebugValue(B);var H=lO(N,G,U)||q1,F=function(oe,be,pe){for(var We,vt=ro(ro({},be),{className:void 0,theme:pe}),Vt=0;Vt<oe.length;Vt+=1){var jt=Ls(We=oe[Vt])?We(vt):We;for(var De in jt)vt[De]=De==="className"?Bs(vt[De],jt[De]):De==="style"?ro(ro({},vt[De]),jt[De]):jt[De];}return be.className&&(vt.className=Bs(vt.className,be.className)),vt}(L,N,H),j=F.as||$,Q={};for(var k in F)F[k]===void 0||k[0]==="$"||k==="as"||k==="theme"&&F.theme===H||(k==="forwardedAs"?Q.as=F.forwardedAs:z&&!z(k,j)||(Q[k]=F[k],z||process.env.NODE_ENV!=="development"||q9(k)||sy.has(k)||!Zu.has(j)||(sy.add(k),console.warn('styled-components: it looks like an unknown prop "'.concat(k,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var V=function(oe,be){var pe=Ju(),We=oe.generateAndInjectStyles(be,pe.styleSheet,pe.stylis);return process.env.NODE_ENV!=="production"&&useDebugValue(We),We}(D,F);process.env.NODE_ENV!=="production"&&w.warnTooManyClasses&&w.warnTooManyClasses(V);var ae=Bs(Z,B);return V&&(ae+=" "+V),F.className&&(ae+=" "+F.className),Q[ju(j)&&!Zu.has(j)?"class":"className"]=ae,Q.ref=T,createElement(j,Q)}(b,M,I)}x.displayName=u;var b=R.forwardRef(x);return b.attrs=f,b.componentStyle=h,b.displayName=u,b.shouldForwardProp=y,b.foldedComponentIds=r?Bs(n.foldedComponentIds,n.styledComponentId):"",b.styledComponentId=g,b.target=r?n.target:e,Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(M){this._foldedDefaultProps=r?function(I){for(var w=[],N=1;N<arguments.length;N++)w[N-1]=arguments[N];for(var T=0,L=w;T<L.length;T++)Wu(I,L[T],!0);return I}({},n.defaultProps,M):M;}}),process.env.NODE_ENV!=="production"&&(sO(u,g),b.warnTooManyClasses=function(M,I){var w={},N=!1;return function(T){if(!N&&(w[T]=!0,Object.keys(w).length>=200)){var L=I?' with the id of "'.concat(I,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(M).concat(L,`.
|
|
106
106
|
`)+`Consider using the attrs method, together with a style object for frequently changed styles.
|
|
107
107
|
Example:
|
|
108
108
|
const Component = styled.div.attrs(props => ({
|
|
@@ -111,9 +111,9 @@ Example:
|
|
|
111
111
|
},
|
|
112
112
|
}))\`width: 100%;\`
|
|
113
113
|
|
|
114
|
-
<Component />`),N=!0,w={};}}}(u,g)),t4(b,function(){return ".".concat(b.styledComponentId)}),i&&vy(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),b}function ly(e,t){for(var o=[e[0]],r=0,n=t.length;r<n;r+=1)o.push(t[r],e[r+1]);return o}var my=function(e){return Object.assign(e,{isCss:!0})};function K(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];if(Ls(e)||K1(e))return my(
|
|
114
|
+
<Component />`),N=!0,w={};}}}(u,g)),t4(b,function(){return ".".concat(b.styledComponentId)}),i&&vy(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),b}function ly(e,t){for(var o=[e[0]],r=0,n=t.length;r<n;r+=1)o.push(t[r],e[r+1]);return o}var my=function(e){return Object.assign(e,{isCss:!0})};function K(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];if(Ls(e)||K1(e))return my(Ta(ly(Yd,_a([e],t,!0))));var r=e;return t.length===0&&r.length===1&&typeof r[0]=="string"?Ta(r):my(Ta(ly(r,t)))}function Yu(e,t,o){if(o===void 0&&(o=q1),!t)throw sr(1,t);var r=function(n){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return e(t,o,K.apply(void 0,_a([n],i,!1)))};return r.attrs=function(n){return Yu(e,t,ro(ro({},o),{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},r.withConfig=function(n){return Yu(e,t,ro(ro({},o),n))},r}var Ty=function(e){return Yu($O,e)},m=Ty;Zu.forEach(function(e){m[e]=Ty(e);});function ka(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];process.env.NODE_ENV!=="production"&&typeof navigator!="undefined"&&navigator.product==="ReactNative"&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var r=y2(K.apply(void 0,_a([e],t,!1))),n=gy(r);return new Xu(n,r)}process.env.NODE_ENV!=="production"&&typeof navigator!="undefined"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
115
115
|
Perhaps you're looking to import 'styled-components/native'?
|
|
116
|
-
Read more about this at https://www.styled-components.com/docs/basics#react-native`);var Gd="__sc-".concat(
|
|
116
|
+
Read more about this at https://www.styled-components.com/docs/basics#react-native`);var Gd="__sc-".concat(Hi,"__");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window!="undefined"&&(window[Gd]||(window[Gd]=0),window[Gd]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
117
117
|
|
|
118
118
|
See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='40' height='40' rx='20' fill='%23D9E5FC'/%3E%3Cpath d='M28 21C28 20.4688 27.5312 20 27 20H22C21.4375 20 21 20.4688 21 21V26C21 26.5625 21.4375 27 22 27H27C27.5312 27 28 26.5625 28 26V21ZM14 19C11.7812 19 10 20.8125 10 23C10 25.2188 11.7812 27 14 27C16.1875 27 18 25.2188 18 23C18 20.8125 16.1875 19 14 19ZM26.9688 17C27.75 17 28.25 16.1875 27.8438 15.5L24.875 10.5C24.4688 9.84375 23.5 9.84375 23.0938 10.5L20.125 15.5C19.7188 16.1875 20.2188 17 21 17H26.9688Z' fill='white'/%3E%3C/svg%3E%0A");`;var mr=`url('data:image/svg+xml;charset=UTF-8,<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="Avatar"><rect id="Rectangle 67" width="32" height="32" rx="16" fill="%23F26B1C"/><g id="Vector"><path d="M18.5004 10.505C17.9079 9.92561 17.1044 9.6001 16.2666 9.6001C15.4288 9.6001 14.6253 9.92561 14.0329 10.505C13.4405 11.0845 13.1077 11.8703 13.1077 12.6898C13.1077 13.5092 13.4405 14.295 14.0329 14.8745C14.6253 15.4539 15.4288 15.7794 16.2666 15.7794C17.1044 15.7794 17.9079 15.4539 18.5004 14.8745C19.0928 14.295 19.4256 13.5092 19.4256 12.6898C19.4256 11.8703 19.0928 11.0845 18.5004 10.505Z" fill="white"/><path d="M16.2666 17.5449C13.0264 17.5449 10.4 19.028 10.4 20.8553V22.4001H22.1333V20.8553C22.1333 19.028 19.5068 17.5449 16.2666 17.5449Z" fill="white"/></g></g></svg>');
|
|
119
119
|
`;var Se=`url('data:image/svg+xml;charset=UTF-8,<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="Avatar"><rect id="Rectangle 67" width="32" height="32" rx="16" fill="%23F26B1C"/><g id="Vector"><path d="M18.5004 10.505C17.9079 9.92561 17.1044 9.6001 16.2666 9.6001C15.4288 9.6001 14.6253 9.92561 14.0329 10.505C13.4405 11.0845 13.1077 11.8703 13.1077 12.6898C13.1077 13.5092 13.4405 14.295 14.0329 14.8745C14.6253 15.4539 15.4288 15.7794 16.2666 15.7794C17.1044 15.7794 17.9079 15.4539 18.5004 14.8745C19.0928 14.295 19.4256 13.5092 19.4256 12.6898C19.4256 11.8703 19.0928 11.0845 18.5004 10.505Z" fill="white"/><path d="M16.2666 17.5449C13.0264 17.5449 10.4 19.028 10.4 20.8553V22.4001H22.1333V20.8553C22.1333 19.028 19.5068 17.5449 16.2666 17.5449Z" fill="white"/></g></g></svg>');
|
|
@@ -165,7 +165,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
165
165
|
16-16 16H288l-12.8 9.6L208 428v-60H64c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16h384c8.8
|
|
166
166
|
0 16 7.2 16 16v288z`})),o0=nz;var iz=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 512 512",fill:"currentColor"},e),R.createElement("path",{d:`M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48
|
|
167
167
|
48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336
|
|
168
|
-
0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z`})),
|
|
168
|
+
0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z`})),Sa=iz;function az(e){return R.createElement("svg",c({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M16.5625 9.96875C16.6875 10.6875 16.5938 11.375 16.2812 11.9375C16.375 12.6875 16.1562 13.4688 15.7188 14.0312C15.6875 15.7812 14.625 17 12.2188 17C12 17 11.75 17 11.5 17C8.3125 17 7.34375 15.8125 5.9375 15.7812C5.84375 16.1875 5.4375 16.5 5 16.5H3C2.4375 16.5 2 16.0625 2 15.5V8C2 7.46875 2.4375 7 3 7H6.0625C6.65625 6.5 7.5 5.125 8.21875 4.40625C8.65625 3.96875 8.53125 1 10.4688 1C12.25 1 13.4375 2 13.4375 4.28125C13.4375 4.875 13.3125 5.34375 13.1562 5.75H14.3125C15.8125 5.75 17 7.03125 17 8.40625C17 9 16.8438 9.5 16.5625 9.96875ZM14.625 11.6562C15.3125 11.0312 15.2188 10.0625 14.7812 9.59375C15.0938 9.59375 15.5 9 15.5 8.4375C15.4688 7.84375 14.9688 7.25 14.3125 7.25H11.0625C11.0625 6.0625 11.9375 5.5 11.9375 4.28125C11.9375 3.53125 11.9375 2.5 10.4688 2.5C9.875 3.09375 10.1562 4.59375 9.28125 5.46875C8.4375 6.3125 7.21875 8.5 6.3125 8.5H6V14.3438C7.65625 14.3438 9.125 15.5 11.3438 15.5H12.5312C13.625 15.5 14.4375 14.9688 14.1875 13.4688C14.6562 13.1875 15.0312 12.3125 14.625 11.6562ZM4.75 14.5C4.75 14.0938 4.40625 13.75 4 13.75C3.5625 13.75 3.25 14.0938 3.25 14.5C3.25 14.9375 3.5625 15.25 4 15.25C4.40625 15.25 4.75 14.9375 4.75 14.5Z",fill:"currentColor"}))}var J1=az;function sz(e){return R.createElement("svg",c({width:"100%",height:"100%",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M5.25 8C5.65625 8 6 8.34375 6 8.75V16.25C6 16.6875 5.65625 17 5.25 17H2.75C2.3125 17 2 16.6875 2 16.25V8.75C2 8.34375 2.3125 8 2.75 8H5.25ZM4 15.75C4.40625 15.75 4.75 15.4375 4.75 15C4.75 14.5938 4.40625 14.25 4 14.25C3.5625 14.25 3.25 14.5938 3.25 15C3.25 15.4375 3.5625 15.75 4 15.75ZM14 3.5625C14 4.875 13.1875 5.625 12.9375 6.5H16.125C17.1562 6.5 17.9688 7.375 17.9688 8.34375C18 8.90625 17.75 9.5 17.375 9.875C17.6875 10.5938 17.625 11.625 17.0938 12.3438C17.3438 13.1562 17.0938 14.1562 16.5625 14.6875C16.7188 15.25 16.6562 15.7188 16.375 16.0938C15.75 17 14.1562 17 12.8125 17H12.7188C11.2188 17 10 16.4688 9 16.0312C8.5 15.8125 7.84375 15.5312 7.34375 15.5312C7.15625 15.5 7 15.3438 7 15.1562V8.46875C7 8.375 7.03125 8.28125 7.09375 8.1875C8.34375 6.96875 8.875 5.6875 9.875 4.65625C10.3438 4.1875 10.5 3.5 10.6875 2.8125C10.8125 2.25 11.0938 1 11.75 1C12.5 1 14 1.25 14 3.5625Z",fill:"#CC0058"}))}var v2=sz;var lz=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 320 512",fill:"currentColor"},e),R.createElement("path",{d:`M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34
|
|
169
169
|
0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4
|
|
170
170
|
52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4
|
|
171
171
|
256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160
|
|
@@ -212,7 +212,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
212
212
|
4.686 16.971-.001z`})),zr=Zz;var Qz=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 256 512",fill:"currentColor"},e),R.createElement("path",{d:`M24.707 38.101L4.908 57.899c-4.686 4.686-4.686 12.284 0 16.971L185.607 256 4.908
|
|
213
213
|
437.13c-4.686 4.686-4.686 12.284 0 16.971L24.707 473.9c4.686 4.686 12.284 4.686 16.971
|
|
214
214
|
0l209.414-209.414c4.686-4.686
|
|
215
|
-
4.686-12.284 0-16.971L41.678 38.101c-4.687-4.687-12.285-4.687-16.971 0z`})),
|
|
215
|
+
4.686-12.284 0-16.971L41.678 38.101c-4.687-4.687-12.285-4.687-16.971 0z`})),Fi=Qz;var Wz=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 512 512",fill:"currentColor"},e),R.createElement("path",{d:`M448 0H64C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h96v84c0 7.1 5.8 12 12 12 2.4 0
|
|
216
216
|
4.9-.7 7.1-2.4L304 416h144c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zm16 352c0 8.8-7.2
|
|
217
217
|
16-16 16H288l-12.8 9.6L208 428v-60H64c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16h384c8.8 0
|
|
218
218
|
16 7.2 16 16v288zM336 184h-56v-56c0-8.8-7.2-16-16-16h-16c-8.8 0-16 7.2-16 16v56h-56c-8.8
|
|
@@ -243,7 +243,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
243
243
|
358.28 456 248 456z`})),U4=Jz;var Xz=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 448 512",fill:"currentColor"},e),R.createElement("path",{d:`M224 412c-15.5 0-28-12.5-28-28v-64c0-15.5 12.5-28 28-28s28 12.5 28 28v64c0
|
|
244
244
|
15.5-12.5 28-28 28zm224-172v224c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V240c0-26.5
|
|
245
245
|
21.5-48 48-48h32v-48C80 64.5 144.8-.2 224.4 0 304 .2 368 65.8 368 145.4V192h32c26.5 0 48
|
|
246
|
-
21.5 48 48zm-320-48h192v-48c0-52.9-43.1-96-96-96s-96 43.1-96 96v48zm272 48H48v224h352V240z`})),
|
|
246
|
+
21.5 48 48zm-320-48h192v-48c0-52.9-43.1-96-96-96s-96 43.1-96 96v48zm272 48H48v224h352V240z`})),Oi=Xz;var Yz=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 512 512",fill:"currentColor"},e),R.createElement("path",{d:`M140 284c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h232c6.6 0 12 5.4 12 12v32c0 6.6-5.4
|
|
247
247
|
12-12 12H140zm364-28c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-48
|
|
248
248
|
0c0-110.5-89.5-200-200-200S56 145.5 56 256s89.5 200 200 200 200-89.5 200-200z`})),_2=Yz;var Rz=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 576 512",fill:"currentColor"},e),R.createElement("path",{d:`M552 64H112c-20.858 0-38.643 13.377-45.248 32H24c-13.255 0-24 10.745-24 24v272c0
|
|
249
249
|
30.928 25.072 56 56 56h496c13.255 0 24-10.745 24-24V88c0-13.255-10.745-24-24-24zM48
|
|
@@ -267,7 +267,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
267
267
|
margin-right: 8px;
|
|
268
268
|
`,lU=m(Gt).attrs({width:18,height:18})`
|
|
269
269
|
margin-right: 8px;
|
|
270
|
-
`,G4=createContext({notifications:[],notificationFunction:{success:()=>{},info:()=>{},error:()=>{},show:()=>{}}}),mU=3e3,Dh=({children:e})=>{let[t,o]=useState([]),r=i=>o&&o(a=>a.filter(s=>s.id!==i)),n=i=>{let a=Date.now();o(s=>[...s,c({id:a},i)]),setTimeout(()=>{r(a);},(i==null?void 0:i.duration)||mU);};return R.createElement(G4.Provider,{value:{notifications:t,notificationFunction:{success:i=>n(E(c({},i),{icon:R.createElement(aU,null)})),info:i=>n(E(c({},i),{icon:R.createElement(sU,null)})),error:i=>n(E(c({},i),{icon:R.createElement(lU,null)})),show:i=>n(i)}}},e)},Hh=()=>{let{notifications:e}=useContext(G4);return e},Ce=()=>{let{notificationFunction:e}=useContext(G4);return e};var
|
|
270
|
+
`,G4=createContext({notifications:[],notificationFunction:{success:()=>{},info:()=>{},error:()=>{},show:()=>{}}}),mU=3e3,Dh=({children:e})=>{let[t,o]=useState([]),r=i=>o&&o(a=>a.filter(s=>s.id!==i)),n=i=>{let a=Date.now();o(s=>[...s,c({id:a},i)]),setTimeout(()=>{r(a);},(i==null?void 0:i.duration)||mU);};return R.createElement(G4.Provider,{value:{notifications:t,notificationFunction:{success:i=>n(E(c({},i),{icon:R.createElement(aU,null)})),info:i=>n(E(c({},i),{icon:R.createElement(sU,null)})),error:i=>n(E(c({},i),{icon:R.createElement(lU,null)})),show:i=>n(i)}}},e)},Hh=()=>{let{notifications:e}=useContext(G4);return e},Ce=()=>{let{notificationFunction:e}=useContext(G4);return e};var Na=({children:e})=>createPortal(e,document.body);m(P2).attrs({width:18,height:18})`
|
|
271
271
|
margin-right: 8px;
|
|
272
272
|
`;m(Zt).attrs({width:18,height:18})`
|
|
273
273
|
margin-right: 8px;
|
|
@@ -316,7 +316,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
316
316
|
justify-content: center;
|
|
317
317
|
text-align: center;
|
|
318
318
|
}
|
|
319
|
-
`;var dU=({className:e,content:t,icon:o})=>R.createElement(Oh,{className:e},o," ",t),zh=()=>{let e=Hh();return R.createElement(
|
|
319
|
+
`;var dU=({className:e,content:t,icon:o})=>R.createElement(Oh,{className:e},o," ",t),zh=()=>{let e=Hh();return R.createElement(Na,null,R.createElement(Fh,null,e.map(t=>R.createElement(dU,E(c({},t),{key:t.id})))))};var Z4=({theme:e})=>K`
|
|
320
320
|
display: inline-flex;
|
|
321
321
|
align-items: center;
|
|
322
322
|
border-radius: 4px;
|
|
@@ -462,7 +462,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
462
462
|
}
|
|
463
463
|
`,oC=m(Y)`
|
|
464
464
|
margin-right: 10px;
|
|
465
|
-
`;var bU=({"data-qa-anchor":e="",className:t,title:o,content:r,okText:n="Ok",onOk:i,OkButton:a=tC,cancelText:s="Cancel",CancelButton:l=oC,onCancel:d,type:p="confirm"})=>R.createElement(Yh,{"data-qa-anchor":`confirm-modal-${e}`,clean:!0,className:t,title:o,footer:R.createElement(eC,null,p==="confirm"&&R.createElement(l,{"data-qa-anchor":"confirm-modal-cancel-button",onClick:d},s),R.createElement(a,{"data-qa-anchor":`confirm-modal-${e}-ok-button`,onClick:i},n)),onCancel:d},R.createElement(Rh,null,r)),rC=()=>{let{confirmData:e,closeConfirm:t}=Pe();if(!e)return null;let o=()=>{t(),e!=null&&e.onCancel&&e.onCancel();},r=()=>{t(),e!=null&&e.onOk&&e.onOk(),e!=null&&e.onSuccess&&(e==null||e.onSuccess());};return R.createElement(
|
|
465
|
+
`;var bU=({"data-qa-anchor":e="",className:t,title:o,content:r,okText:n="Ok",onOk:i,OkButton:a=tC,cancelText:s="Cancel",CancelButton:l=oC,onCancel:d,type:p="confirm"})=>R.createElement(Yh,{"data-qa-anchor":`confirm-modal-${e}`,clean:!0,className:t,title:o,footer:R.createElement(eC,null,p==="confirm"&&R.createElement(l,{"data-qa-anchor":"confirm-modal-cancel-button",onClick:d},s),R.createElement(a,{"data-qa-anchor":`confirm-modal-${e}-ok-button`,onClick:i},n)),onCancel:d},R.createElement(Rh,null,r)),rC=()=>{let{confirmData:e,closeConfirm:t}=Pe();if(!e)return null;let o=()=>{t(),e!=null&&e.onCancel&&e.onCancel();},r=()=>{t(),e!=null&&e.onOk&&e.onOk(),e!=null&&e.onSuccess&&(e==null||e.onSuccess());};return R.createElement(Na,null,R.createElement(bU,E(c({},e),{onCancel:o,onOk:r})))};var p0={icon__container:"Zr",icon:"_r",notifications:"S",notificationContainer:"E",appear:"F"};var wU=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M9 0.0273438C13.7812 0.0273438 17.7188 3.96484 17.7188 8.74609C17.7188 13.5625 13.7812 17.4648 9 17.4648C4.18359 17.4648 0.28125 13.5625 0.28125 8.74609C0.28125 3.96484 4.18359 0.0273438 9 0.0273438ZM9 1.71484C5.09766 1.71484 1.96875 4.87891 1.96875 8.74609C1.96875 12.6484 5.09766 15.7773 9 15.7773C12.8672 15.7773 16.0312 12.6484 16.0312 8.74609C16.0312 4.87891 12.8672 1.71484 9 1.71484ZM13.9219 6.32031C14.0625 6.46094 14.0625 6.74219 13.9219 6.91797L7.83984 12.9297C7.66406 13.1055 7.41797 13.1055 7.24219 12.9297L4.04297 9.69531C3.90234 9.55469 3.90234 9.27344 4.04297 9.09766L4.85156 8.32422C5.02734 8.14844 5.27344 8.14844 5.44922 8.32422L7.55859 10.4336L12.5156 5.51172C12.6914 5.33594 12.9727 5.33594 13.1133 5.51172L13.9219 6.32031Z"}))},u0=wU;var MU=t=>{var e=P(t,[]);return R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 512 512"},e),R.createElement("path",{d:`M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504
|
|
466
466
|
119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200
|
|
467
467
|
110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm42-104c0 23.159-18.841 42-42
|
|
468
468
|
42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42zm-81.37-211.401l6.8 136c.319 6.387
|
|
@@ -554,7 +554,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
554
554
|
--pseudo-element-display: none; /* Disable animation */
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
`;var w0=createContext({client:null,currentUserId:void 0,userRoles:[]});var M0=createContext({client:null,currentUserId:void 0,userRoles:[]});var ol=()=>useContext(w0),J=ol;var QC=createContext({subscribe:({fetcher:e,params:t,callback:o,config:r,refresh:n})=>({unsubscribe:()=>{}})}),Y4=()=>useContext(QC);function R4({children:e}){let t=useRef({}),o=useRef({}),r=useRef({}),{currentUserId:n}=J();function i(s,l){return `${n}.${s}.${JSON.stringify(l)}`}useEffect(()=>()=>{Object.values(o.current).forEach(s=>s());},[]);let a=({fetcher:s,params:l,callback:d,config:p,refresh:u=!1})=>{if(n==null)return {unsubscribe(){}};let g=i(s.name,l);if(u&&(delete t.current[g],delete r.current[g]),t.current[g]&&r.current[g])d==null||d(r.current[g]),t.current[g].push(d);else {t.current[g]=[d];let f=s(l,y=>{r.current[g]=y,(t.current[g]||[]).forEach(C=>C(y));},p);o.current[g]=f;}return {unsubscribe(){let f=t.current[g].find(y=>y===d);f&&(t.current[g]=t.current[g].filter(y=>y!==f));}}};return R.createElement(QC.Provider,{value:{subscribe:a}},e)}var WC=createContext({subscribe:({fetcher:e,params:t,callback:o=()=>{},options:r})=>({unsubscribe:()=>{}})}),t6=()=>useContext(WC);function o6({children:e}){let t=useRef({}),o=useRef({}),r=useRef({}),{currentUserId:n}=J();function i(s,l){return `${n}.${s}.${JSON.stringify(l)}`}useEffect(()=>()=>{Object.values(o.current).forEach(s=>s());},[]);let a=({fetcher:s,params:l,callback:d=()=>{},options:p})=>{if(n==null)return {unsubscribe(){}};let u=i(s.name,l);if(t.current[u])d(r.current[u]),t.current[u].push(d);else {t.current[u]=[d];let g=s(l,f=>{r.current[u]=f,(t.current[u]||[]).forEach(v=>v(f));},p);o.current[u]=g;}return {unsubscribe(){let g=t.current[u].find(f=>f===d);g&&(t.current[u]=t.current[u].filter(f=>f!==g));}}};return R.createElement(WC.Provider,{value:{subscribe:a}},e)}var U$=createContext({fetch:o=>_(void 0,[o],function*({fetchFn:e,params:t}){return yield Promise.resolve({})})});function r6({children:e}){let t=useRef({}),o=useRef({});function r(i,a){return `${i}.${JSON.stringify(a)}`}let n=({fetchFn:i,params:a})=>{var u;let s=r(i.name,a);if(((u=t.current[s])==null?void 0:u.length)>0){if(o.current[s]!=null)return Promise.resolve(o.current[s]);let g=()=>{},f=()=>{},y=new Promise((v,C)=>{g=v,f=C;});return t.current[s].push({resolve:g,reject:f}),y}let l=()=>{},d=()=>{},p=new Promise((g,f)=>{l=g,d=f;});return t.current[s]=[{resolve:l,reject:d}],i(...a).then(g=>{o.current[s]=g,t.current[s].forEach(({resolve:f})=>f(g));}).catch(g=>{t.current[s].forEach(({reject:f})=>f(g));}).finally(()=>{setTimeout(()=>{o.current[s]=null,t.current[s]=[];},500);}),p};return R.createElement(U$.Provider,{value:{fetch:n}},e)}var JC=createContext({subscribe:({topic:e,callback:t})=>({unsubscribe:()=>{}})}),XC=()=>useContext(JC);function n6({children:e}){let t=useRef({}),o=useRef({});useEffect(()=>()=>{Object.values(o.current).forEach(n=>n());},[]);let r=({topic:n,callback:i})=>{if(t.current[n])t.current[n].push(i);else {t.current[n]=[i];let a=subscribeTopic(n,(...s)=>{(t.current[n]||[]).forEach(d=>d(...s));});o.current[n]=a;}return {unsubscribe(){let a=t.current[n].find(s=>s===i);a&&(t.current[n]=t.current[n].filter(s=>s!==a));}}};return R.createElement(JC.Provider,{value:{subscribe:r}},e)}function i6({children:e}){return R.createElement(R4,null,R.createElement(o6,null,R.createElement(n6,null,R.createElement(r6,null,e))))}function J$({fetcher:e,params:t,callback:o=()=>{},options:r,shouldCall:n=!0,getSubscribedTopic:i}){let{subscribe:a}=t6(),[s,l]=useState(null),d=useRef(null),p=useCallback(u=>{n&&t!=null&&(u.data&&l(u.data),o(u));},[n,o]);return useEffect(()=>(i&&(d.current=subscribeTopic(i())),()=>{var u;(u=d.current)==null||u.call(d);}),[i]),useEffect(()=>{if(t==null||!n)return;let{unsubscribe:u}=a({fetcher:e,params:t,callback:p,options:r});return ()=>{u();}},[t,n]),s}var At=J$;function Vs({fetcher:e,params:t,callback:o=()=>{},options:r,shouldSubscribe:n=()=>!0,getSubscribedTopic:i}){let{subscribe:a}=XC(),s=useRef(null);return At({fetcher:e,params:t,callback:l=>{let{error:d,loading:p}=l;if(p)return;if(d)throw d;let{unsubscribe:u}=a({topic:i(l),callback:o});s.current=u;},options:r,shouldCall:n}),useEffect(()=>()=>{var l;(l=s.current)==null||l.call(s);},[s]),{unsubscribe:()=>{var l;return (l=s.current)==null?void 0:l.call(s)}}}function js({userId:e,level:t,shouldSubscribe:o=()=>!0,callback:r}){return Vs({fetcher:UserRepository.getUser,params:e,callback:r,shouldSubscribe:()=>!!e&&o(),getSubscribedTopic:({data:n})=>getUserTopic(n,t)})}var rV=e=>(js({userId:e,level:SubscriptionLevels.USER}),At({fetcher:UserRepository.getUser,params:e,shouldCall:!!e})),re=rV;var Ea=Object.freeze({MEMBER:"member",MODERATOR:"moderator",SUPER_MODERATOR:"super-moderator",COMMUNITY_MODERATOR:"community-moderator",CHANNEL_MODERATOR:"channel-moderator"}),dr=Object.freeze({EditUserPermission:"EDIT_USER",BanUserPermission:"BAN_USER",CreateRolePermission:"CREATE_ROLE",EditRolePermission:"EDIT_ROLE",DeleteRolePermission:"DELETE_ROLE",AssignRolePermission:"ASSIGN_USER_ROLE",EditChannelPermission:"EDIT_CHANNEL",EditChannelRatelimitPermission:"EDIT_CHANNEL_RATELIMIT",MuteChannelPermission:"MUTE_CHANNEL",CloseChannelPermission:"CLOSE_CHANNEL",AddChannelUserPermission:"ADD_CHANNEL_USER",EditChannelUserPermission:"EDIT_CHANNEL_USER",RemoveChannelUserPermission:"REMOVE_CHANNEL_USER",MuteChannelUserPermission:"MUTE_CHANNEL_USER",BanChannelUserPermission:"BAN_CHANNEL_USER",EditMessagePermission:"EDIT_MESSAGE",DeleteMessagePermission:"DELETE_MESSAGE",EditCommunityPermission:"EDIT_COMMUNITY",DeleteCommunityPermission:"DELETE_COMMUNITY",AddCommunityUserPermission:"ADD_COMMUNITY_USER",EditCommunityUserPermission:"EDIT_COMMUNITY_USER",RemoveCommunityUserPermission:"REMOVE_COMMUNITY_USER",MuteCommunityUserPermission:"MUTE_COMMUNITY_USER",BanCommunityUserPermission:"BAN_COMMUNITY_USER",EditUserFeedPostPermission:"EDIT_USER_FEED_POST",DeleteUserFeedPostPermission:"DELETE_USER_FEED_POST",EditUserFeedCommentPermission:"EDIT_USER_FEED_COMMENT",DeleteUserFeedCommentPermission:"DELETE_USER_FEED_COMMENT",EditCommunityFeedPostPermission:"EDIT_COMMUNITY_POST",DeleteCommunityFeedPostPermission:"DELETE_COMMUNITY_POST",EditCommunityFeedCommentPermission:"EDIT_COMMUNITY_COMMENT",DeleteCommunityFeedCommentPermission:"DELETE_COMMUNITY_COMMENT",CreateCommunityCategoryPermission:"CREATE_COMMUNITY_CATEGORY",EditCommunityCategoryPermission:"EDIT_COMMUNITY_CATEGORY",DeleteCommunityCategoryPermission:"DELETE_COMMUNITY_CATEGORY",ManageStoryPermission:"MANAGE_COMMUNITY_STORY",ReviewCommunityPost:"REVIEW_COMMUNITY_POST"}),RC=30,_0=Object.freeze({Uploaded:"uploaded",Transcoding:"transcoding",Transcoded:"transcoded",TranscodeFailed:"transcodeFailed"}),ev="video/mp4",uo=Object.freeze({CONTAIN_BLOCKED_WORD:"Amity SDK (400308): Text contain blocked word",NOT_INCLUDE_WHITELIST_LINK:"Amity SDK (400309): Data contain link that is not in whitelist",CONTAIN_BLOCKLISTED_WORD:"Your text contains a blocklisted word."});var ov={page:{type:"newsfeed",communityId:void 0},onChangePage:e=>{},onClickCategory:e=>{},onClickCommunity:e=>{},onClickUser:e=>{},onClickStory:(e,t,o)=>{},onCommunityCreated:e=>{},onEditCommunity:e=>{},onEditUser:e=>{},onMessageUser:e=>{},setNavigationBlocker:()=>{},onBack:()=>{},goToDraftStoryPage:e=>{},onClickNoti:(e,t)=>{}};process.env.NODE_ENV!=="production"&&(ov={page:{type:"newsfeed",communityId:void 0},onChangePage:e=>console.log(`NavigationContext onChangePage(${e})`),onClickCategory:e=>console.log(`NavigationContext onClickCategory(${e})`),onClickCommunity:e=>console.log(`NavigationContext onClickCommunity(${e})`),onClickUser:e=>console.log(`NavigationContext onClickUser(${e})`),onClickStory:(e,t,o)=>console.log(`NavigationContext onClickStory(${e}, ${t}, ${o})`),onCommunityCreated:e=>console.log(`NavigationContext onCommunityCreated(${e})`),onEditCommunity:e=>console.log(`NavigationContext onEditCommunity({${e})`),onClickNoti:(e,t)=>console.log(`NavigationContext onClickNoti({${e}, ${t})`),onEditUser:e=>console.log(`NavigationContext onEditUser(${e})`),onMessageUser:e=>console.log(`NavigationContext onMessageUser(${e})`),onBack:()=>console.log("NavigationContext onBack()"),goToDraftStoryPage:(e,t,o,r)=>console.log(`NavigationContext goToDraftStoryPage(${e})`)});var a6=createContext(ov),X=()=>useContext(a6);function s6({askForConfirmation:e,children:t,onChangePage:o,onClickCategory:r,onClickCommunity:n,onClickUser:i,onCommunityCreated:a,onEditCommunity:s,onEditUser:l,onMessageUser:d,onBack:p}){let[u,g]=useState([{type:"explore",communityId:void 0}]),f=useMemo(()=>u[u.length-1],[u]),[y,v]=useState(),{confirm:C}=Pe(),h=e!=null?e:C,x=useCallback(()=>_(this,null,function*(){return y?new Promise(H=>{h(E(c({},y),{onSuccess:()=>{v==null||v(void 0),H(!0);},onCancel:()=>H(!1)}));}):!0}),[e,y,v]),b=useCallback(H=>_(this,null,function*(){(yield x())&&g(F=>[...F,H]);}),[x]),M=()=>{g(H=>H.length>1?H.slice(0,-1):H);},I=o?H=>_(this,null,function*(){(yield x())&&o(H);}):null,w=useCallback(H=>{b({type:H});},[b]),N=useCallback(H=>{let F={type:"communityfeed",communityId:H};if(I)return I(F);if(n)return n(H);b(F);},[I,n,b]),T=useCallback(H=>{let F={type:"communityfeed",communityId:H,isNewCommunity:!0};if(I)return I(F);if(a)return a(H);b(F);},[I,a,b]),L=useCallback(H=>{let F={type:"category",categoryId:H};if(I)return I(F);if(r)return r(H);b(F);},[I,r,b]),D=useCallback((H,F)=>{let j={};if(F==="community"?j={type:"communityfeed",communityId:H}:j={type:"postdetail",targetId:H,targetType:F},I)return I(j);b(j);},[I,b]),U=useCallback((H,F)=>{let j={type:F!=null?F:"userfeed",userId:H};if(I)return I(j);if(i)return i(H);b(j);},[I,i,b]),Z=useCallback(H=>{let F={type:"useredit",userId:H};if(I)return I(F);if(l)return l(H);b(F);},[I,l,b]),B=useCallback((H,F)=>{let j={type:"communityedit",communityId:H,tab:F};if(I)return I(j);if(s)return s(H,{tab:F});b(j);},[I,s,b]),$=useCallback(H=>{let F={type:"conversation",userId:H};if(I)return I(F);if(d)return d(H)},[I,d]),G=useCallback(()=>{p&&p(),M();},[I,p,M]),q=useCallback((H,F,j)=>{let Q={type:"viewstory",targetId:H,storyType:F,targetIds:j};if(I)return I(Q);b(Q);},[I,b]),z=useCallback((H,F,j,Q)=>{let k={type:"draftpage",targetId:H,targetType:F,mediaType:j,storyType:Q};if(I)return I(k);b(k);},[I,b]);return R.createElement(a6.Provider,{value:{page:f,onChangePage:w,onClickCategory:L,onClickCommunity:N,onClickUser:U,onClickStory:q,onCommunityCreated:T,onEditCommunity:B,onEditUser:Z,onMessageUser:$,onBack:G,onClickNoti:D,goToDraftStoryPage:z,setNavigationBlocker:v}},t)}var mV=()=>useContext(M0),Ae=mV;var rv=createContext({subscribe:({fetcher:e,params:t,callback:o,config:r,refresh:n=!1})=>({unsubscribe:()=>{}})}),T0=()=>useContext(rv);function m6({children:e}){let t=useRef({}),o=useRef({}),r=useRef({}),{currentUserId:n}=Ae();function i(s,l){return `${n}.${s}.${JSON.stringify(l)}`}useEffect(()=>()=>{Object.values(o.current).forEach(s=>s());},[]);let a=({fetcher:s,params:l,callback:d,config:p,refresh:u=!1})=>{if(n==null)return {unsubscribe(){}};let g=i(s.name,l);if(u&&(delete r.current[g],delete t.current[g]),t.current[g]&&r.current[g])d==null||d(r.current[g]),t.current[g].push(d);else {t.current[g]=[d];let f=s(l,y=>{r.current[g]=y,(t.current[g]||[]).forEach(C=>C(y));},p);o.current[g]=f;}return {unsubscribe(){let f=t.current[g].find(y=>y===d);f&&(t.current[g]=t.current[g].filter(y=>y!==f));}}};return R.createElement(rv.Provider,{value:{subscribe:a}},e)}var nv=createContext({subscribe:({fetcher:e,params:t,callback:o=()=>{},options:r})=>({unsubscribe:()=>{}})}),d6=()=>useContext(nv);function p6({children:e}){let t=useRef({}),o=useRef({}),r=useRef({}),{currentUserId:n}=Ae();function i(s,l){return `${n}.${s}.${JSON.stringify(l)}`}useEffect(()=>()=>{Object.values(o.current).forEach(s=>s());},[]);let a=({fetcher:s,params:l,callback:d=()=>{},options:p})=>{if(n==null)return {unsubscribe(){}};let u=i(s.name,l);if(t.current[u])d(r.current[u]),t.current[u].push(d);else {t.current[u]=[d];let g=s(l,f=>{r.current[u]=f,(t.current[u]||[]).forEach(v=>v(f));},p);o.current[u]=g;}return {unsubscribe(){let g=t.current[u].find(f=>f===d);g&&(t.current[u]=t.current[u].filter(f=>f!==g));}}};return R.createElement(nv.Provider,{value:{subscribe:a}},e)}var xV=createContext({fetch:o=>_(void 0,[o],function*({fetchFn:e,params:t}){return yield Promise.resolve({})})});function u6({children:e}){let t=useRef({}),o=useRef({});function r(i,a){return `${i}.${JSON.stringify(a)}`}let n=({fetchFn:i,params:a})=>{var u;let s=r(i.name,a);if(((u=t.current[s])==null?void 0:u.length)>0){if(o.current[s]!=null)return Promise.resolve(o.current[s]);let g=()=>{},f=()=>{},y=new Promise((v,C)=>{g=v,f=C;});return t.current[s].push({resolve:g,reject:f}),y}let l=()=>{},d=()=>{},p=new Promise((g,f)=>{l=g,d=f;});return t.current[s]=[{resolve:l,reject:d}],i(...a).then(g=>{o.current[s]=g,t.current[s].forEach(({resolve:f})=>f(g));}).catch(g=>{t.current[s].forEach(({reject:f})=>f(g));}).finally(()=>{setTimeout(()=>{o.current[s]=null,t.current[s]=[];},500);}),p};return R.createElement(xV.Provider,{value:{fetch:n}},e)}var sv=createContext({subscribe:({topic:e,callback:t})=>({unsubscribe:()=>{}})}),lv=()=>useContext(sv);function g6({children:e}){let t=useRef({}),o=useRef({});useEffect(()=>()=>{Object.values(o.current).forEach(n=>n());},[]);let r=({topic:n,callback:i})=>{if(t.current[n])t.current[n].push(i);else {t.current[n]=[i];let a=subscribeTopic(n,(...s)=>{(t.current[n]||[]).forEach(d=>d(...s));});o.current[n]=a;}return {unsubscribe(){let a=t.current[n].find(s=>s===i);a&&(t.current[n]=t.current[n].filter(s=>s!==a));}}};return R.createElement(sv.Provider,{value:{subscribe:r}},e)}function f6({children:e}){return R.createElement(m6,null,R.createElement(p6,null,R.createElement(g6,null,R.createElement(u6,null,e))))}var mv=createContext({}),W=e=>useContext(mv)[e]||null;function y6({children:e,config:t}){return R.createElement(mv.Provider,{value:t},e)}var dv=K`
|
|
557
|
+
`;var w0=createContext({client:null,currentUserId:void 0,userRoles:[]});var M0=createContext({client:null,currentUserId:void 0,userRoles:[]});var ol=()=>useContext(w0),J=ol;var QC=createContext({subscribe:({fetcher:e,params:t,callback:o,config:r,refresh:n})=>({unsubscribe:()=>{}})}),Y4=()=>useContext(QC);function R4({children:e}){let t=useRef({}),o=useRef({}),r=useRef({}),{currentUserId:n}=J();function i(s,l){return `${n}.${s}.${JSON.stringify(l)}`}useEffect(()=>()=>{Object.values(o.current).forEach(s=>s());},[]);let a=({fetcher:s,params:l,callback:d,config:p,refresh:u=!1})=>{if(n==null)return {unsubscribe(){}};let g=i(s.name,l);if(u&&(delete t.current[g],delete r.current[g]),t.current[g]&&r.current[g])d==null||d(r.current[g]),t.current[g].push(d);else {t.current[g]=[d];let f=s(l,y=>{r.current[g]=y,(t.current[g]||[]).forEach(C=>C(y));},p);o.current[g]=f;}return {unsubscribe(){let f=t.current[g].find(y=>y===d);f&&(t.current[g]=t.current[g].filter(y=>y!==f));}}};return R.createElement(QC.Provider,{value:{subscribe:a}},e)}var WC=createContext({subscribe:({fetcher:e,params:t,callback:o=()=>{},options:r})=>({unsubscribe:()=>{}})}),t6=()=>useContext(WC);function o6({children:e}){let t=useRef({}),o=useRef({}),r=useRef({}),{currentUserId:n}=J();function i(s,l){return `${n}.${s}.${JSON.stringify(l)}`}useEffect(()=>()=>{Object.values(o.current).forEach(s=>s());},[]);let a=({fetcher:s,params:l,callback:d=()=>{},options:p})=>{if(n==null)return {unsubscribe(){}};let u=i(s.name,l);if(t.current[u])d(r.current[u]),t.current[u].push(d);else {t.current[u]=[d];let g=s(l,f=>{r.current[u]=f,(t.current[u]||[]).forEach(v=>v(f));},p);o.current[u]=g;}return {unsubscribe(){let g=t.current[u].find(f=>f===d);g&&(t.current[u]=t.current[u].filter(f=>f!==g));}}};return R.createElement(WC.Provider,{value:{subscribe:a}},e)}var U$=createContext({fetch:o=>_(void 0,[o],function*({fetchFn:e,params:t}){return yield Promise.resolve({})})});function r6({children:e}){let t=useRef({}),o=useRef({});function r(i,a){return `${i}.${JSON.stringify(a)}`}let n=({fetchFn:i,params:a})=>{var u;let s=r(i.name,a);if(((u=t.current[s])==null?void 0:u.length)>0){if(o.current[s]!=null)return Promise.resolve(o.current[s]);let g=()=>{},f=()=>{},y=new Promise((v,C)=>{g=v,f=C;});return t.current[s].push({resolve:g,reject:f}),y}let l=()=>{},d=()=>{},p=new Promise((g,f)=>{l=g,d=f;});return t.current[s]=[{resolve:l,reject:d}],i(...a).then(g=>{o.current[s]=g,t.current[s].forEach(({resolve:f})=>f(g));}).catch(g=>{t.current[s].forEach(({reject:f})=>f(g));}).finally(()=>{setTimeout(()=>{o.current[s]=null,t.current[s]=[];},500);}),p};return R.createElement(U$.Provider,{value:{fetch:n}},e)}var JC=createContext({subscribe:({topic:e,callback:t})=>({unsubscribe:()=>{}})}),XC=()=>useContext(JC);function n6({children:e}){let t=useRef({}),o=useRef({});useEffect(()=>()=>{Object.values(o.current).forEach(n=>n());},[]);let r=({topic:n,callback:i})=>{if(t.current[n])t.current[n].push(i);else {t.current[n]=[i];let a=subscribeTopic(n,(...s)=>{(t.current[n]||[]).forEach(d=>d(...s));});o.current[n]=a;}return {unsubscribe(){let a=t.current[n].find(s=>s===i);a&&(t.current[n]=t.current[n].filter(s=>s!==a));}}};return R.createElement(JC.Provider,{value:{subscribe:r}},e)}function i6({children:e}){return R.createElement(R4,null,R.createElement(o6,null,R.createElement(n6,null,R.createElement(r6,null,e))))}function J$({fetcher:e,params:t,callback:o=()=>{},options:r,shouldCall:n=!0,getSubscribedTopic:i}){let{subscribe:a}=t6(),[s,l]=useState(null),d=useRef(null),p=useCallback(u=>{n&&t!=null&&(u.data&&l(u.data),o(u));},[n,o]);return useEffect(()=>(i&&(d.current=subscribeTopic(i())),()=>{var u;(u=d.current)==null||u.call(d);}),[i]),useEffect(()=>{if(t==null||!n)return;let{unsubscribe:u}=a({fetcher:e,params:t,callback:p,options:r});return ()=>{u();}},[t,n]),s}var At=J$;function Vs({fetcher:e,params:t,callback:o=()=>{},options:r,shouldSubscribe:n=()=>!0,getSubscribedTopic:i}){let{subscribe:a}=XC(),s=useRef(null);return At({fetcher:e,params:t,callback:l=>{let{error:d,loading:p}=l;if(p)return;if(d)throw d;let{unsubscribe:u}=a({topic:i(l),callback:o});s.current=u;},options:r,shouldCall:n}),useEffect(()=>()=>{var l;(l=s.current)==null||l.call(s);},[s]),{unsubscribe:()=>{var l;return (l=s.current)==null?void 0:l.call(s)}}}function js({userId:e,level:t,shouldSubscribe:o=()=>!0,callback:r}){return Vs({fetcher:UserRepository.getUser,params:e,callback:r,shouldSubscribe:()=>!!e&&o(),getSubscribedTopic:({data:n})=>getUserTopic(n,t)})}var rV=e=>(js({userId:e,level:SubscriptionLevels.USER}),At({fetcher:UserRepository.getUser,params:e,shouldCall:!!e})),re=rV;var Ba=Object.freeze({MEMBER:"member",MODERATOR:"moderator",SUPER_MODERATOR:"super-moderator",COMMUNITY_MODERATOR:"community-moderator",CHANNEL_MODERATOR:"channel-moderator"}),dr=Object.freeze({EditUserPermission:"EDIT_USER",BanUserPermission:"BAN_USER",CreateRolePermission:"CREATE_ROLE",EditRolePermission:"EDIT_ROLE",DeleteRolePermission:"DELETE_ROLE",AssignRolePermission:"ASSIGN_USER_ROLE",EditChannelPermission:"EDIT_CHANNEL",EditChannelRatelimitPermission:"EDIT_CHANNEL_RATELIMIT",MuteChannelPermission:"MUTE_CHANNEL",CloseChannelPermission:"CLOSE_CHANNEL",AddChannelUserPermission:"ADD_CHANNEL_USER",EditChannelUserPermission:"EDIT_CHANNEL_USER",RemoveChannelUserPermission:"REMOVE_CHANNEL_USER",MuteChannelUserPermission:"MUTE_CHANNEL_USER",BanChannelUserPermission:"BAN_CHANNEL_USER",EditMessagePermission:"EDIT_MESSAGE",DeleteMessagePermission:"DELETE_MESSAGE",EditCommunityPermission:"EDIT_COMMUNITY",DeleteCommunityPermission:"DELETE_COMMUNITY",AddCommunityUserPermission:"ADD_COMMUNITY_USER",EditCommunityUserPermission:"EDIT_COMMUNITY_USER",RemoveCommunityUserPermission:"REMOVE_COMMUNITY_USER",MuteCommunityUserPermission:"MUTE_COMMUNITY_USER",BanCommunityUserPermission:"BAN_COMMUNITY_USER",EditUserFeedPostPermission:"EDIT_USER_FEED_POST",DeleteUserFeedPostPermission:"DELETE_USER_FEED_POST",EditUserFeedCommentPermission:"EDIT_USER_FEED_COMMENT",DeleteUserFeedCommentPermission:"DELETE_USER_FEED_COMMENT",EditCommunityFeedPostPermission:"EDIT_COMMUNITY_POST",DeleteCommunityFeedPostPermission:"DELETE_COMMUNITY_POST",EditCommunityFeedCommentPermission:"EDIT_COMMUNITY_COMMENT",DeleteCommunityFeedCommentPermission:"DELETE_COMMUNITY_COMMENT",CreateCommunityCategoryPermission:"CREATE_COMMUNITY_CATEGORY",EditCommunityCategoryPermission:"EDIT_COMMUNITY_CATEGORY",DeleteCommunityCategoryPermission:"DELETE_COMMUNITY_CATEGORY",ManageStoryPermission:"MANAGE_COMMUNITY_STORY",ReviewCommunityPost:"REVIEW_COMMUNITY_POST"}),RC=30,_0=Object.freeze({Uploaded:"uploaded",Transcoding:"transcoding",Transcoded:"transcoded",TranscodeFailed:"transcodeFailed"}),ev="video/mp4",uo=Object.freeze({CONTAIN_BLOCKED_WORD:"Amity SDK (400308): Text contain blocked word",NOT_INCLUDE_WHITELIST_LINK:"Amity SDK (400309): Data contain link that is not in whitelist",CONTAIN_BLOCKLISTED_WORD:"Your text contains a blocklisted word."});var ov={page:{type:"newsfeed",communityId:void 0},onChangePage:e=>{},onClickCategory:e=>{},onClickCommunity:e=>{},onClickUser:e=>{},onClickStory:(e,t,o)=>{},onCommunityCreated:e=>{},onEditCommunity:e=>{},onEditUser:e=>{},onMessageUser:e=>{},setNavigationBlocker:()=>{},onBack:()=>{},goToDraftStoryPage:e=>{},onClickNoti:(e,t)=>{}};process.env.NODE_ENV!=="production"&&(ov={page:{type:"newsfeed",communityId:void 0},onChangePage:e=>console.log(`NavigationContext onChangePage(${e})`),onClickCategory:e=>console.log(`NavigationContext onClickCategory(${e})`),onClickCommunity:e=>console.log(`NavigationContext onClickCommunity(${e})`),onClickUser:e=>console.log(`NavigationContext onClickUser(${e})`),onClickStory:(e,t,o)=>console.log(`NavigationContext onClickStory(${e}, ${t}, ${o})`),onCommunityCreated:e=>console.log(`NavigationContext onCommunityCreated(${e})`),onEditCommunity:e=>console.log(`NavigationContext onEditCommunity({${e})`),onClickNoti:(e,t)=>console.log(`NavigationContext onClickNoti({${e}, ${t})`),onEditUser:e=>console.log(`NavigationContext onEditUser(${e})`),onMessageUser:e=>console.log(`NavigationContext onMessageUser(${e})`),onBack:()=>console.log("NavigationContext onBack()"),goToDraftStoryPage:(e,t,o,r)=>console.log(`NavigationContext goToDraftStoryPage(${e})`)});var a6=createContext(ov),X=()=>useContext(a6);function s6({askForConfirmation:e,children:t,onChangePage:o,onClickCategory:r,onClickCommunity:n,onClickUser:i,onCommunityCreated:a,onEditCommunity:s,onEditUser:l,onMessageUser:d,onBack:p}){let[u,g]=useState([{type:"explore",communityId:void 0}]),f=useMemo(()=>u[u.length-1],[u]),[y,v]=useState(),{confirm:C}=Pe(),h=e!=null?e:C,x=useCallback(()=>_(this,null,function*(){return y?new Promise(H=>{h(E(c({},y),{onSuccess:()=>{v==null||v(void 0),H(!0);},onCancel:()=>H(!1)}));}):!0}),[e,y,v]),b=useCallback(H=>_(this,null,function*(){(yield x())&&g(F=>[...F,H]);}),[x]),M=()=>{g(H=>H.length>1?H.slice(0,-1):H);},I=o?H=>_(this,null,function*(){(yield x())&&o(H);}):null,w=useCallback(H=>{b({type:H});},[b]),N=useCallback(H=>{let F={type:"communityfeed",communityId:H};if(I)return I(F);if(n)return n(H);b(F);},[I,n,b]),T=useCallback(H=>{let F={type:"communityfeed",communityId:H,isNewCommunity:!0};if(I)return I(F);if(a)return a(H);b(F);},[I,a,b]),L=useCallback(H=>{let F={type:"category",categoryId:H};if(I)return I(F);if(r)return r(H);b(F);},[I,r,b]),D=useCallback((H,F)=>{let j={};if(F==="community"?j={type:"communityfeed",communityId:H}:j={type:"postdetail",targetId:H,targetType:F},I)return I(j);b(j);},[I,b]),U=useCallback((H,F)=>{let j={type:F!=null?F:"userfeed",userId:H};if(I)return I(j);if(i)return i(H);b(j);},[I,i,b]),Z=useCallback(H=>{let F={type:"useredit",userId:H};if(I)return I(F);if(l)return l(H);b(F);},[I,l,b]),B=useCallback((H,F)=>{let j={type:"communityedit",communityId:H,tab:F};if(I)return I(j);if(s)return s(H,{tab:F});b(j);},[I,s,b]),$=useCallback(H=>{let F={type:"conversation",userId:H};if(I)return I(F);if(d)return d(H)},[I,d]),G=useCallback(()=>{p&&p(),M();},[I,p,M]),q=useCallback((H,F,j)=>{let Q={type:"viewstory",targetId:H,storyType:F,targetIds:j};if(I)return I(Q);b(Q);},[I,b]),z=useCallback((H,F,j,Q)=>{let k={type:"draftpage",targetId:H,targetType:F,mediaType:j,storyType:Q};if(I)return I(k);b(k);},[I,b]);return R.createElement(a6.Provider,{value:{page:f,onChangePage:w,onClickCategory:L,onClickCommunity:N,onClickUser:U,onClickStory:q,onCommunityCreated:T,onEditCommunity:B,onEditUser:Z,onMessageUser:$,onBack:G,onClickNoti:D,goToDraftStoryPage:z,setNavigationBlocker:v}},t)}var mV=()=>useContext(M0),Ae=mV;var rv=createContext({subscribe:({fetcher:e,params:t,callback:o,config:r,refresh:n=!1})=>({unsubscribe:()=>{}})}),T0=()=>useContext(rv);function m6({children:e}){let t=useRef({}),o=useRef({}),r=useRef({}),{currentUserId:n}=Ae();function i(s,l){return `${n}.${s}.${JSON.stringify(l)}`}useEffect(()=>()=>{Object.values(o.current).forEach(s=>s());},[]);let a=({fetcher:s,params:l,callback:d,config:p,refresh:u=!1})=>{if(n==null)return {unsubscribe(){}};let g=i(s.name,l);if(u&&(delete r.current[g],delete t.current[g]),t.current[g]&&r.current[g])d==null||d(r.current[g]),t.current[g].push(d);else {t.current[g]=[d];let f=s(l,y=>{r.current[g]=y,(t.current[g]||[]).forEach(C=>C(y));},p);o.current[g]=f;}return {unsubscribe(){let f=t.current[g].find(y=>y===d);f&&(t.current[g]=t.current[g].filter(y=>y!==f));}}};return R.createElement(rv.Provider,{value:{subscribe:a}},e)}var nv=createContext({subscribe:({fetcher:e,params:t,callback:o=()=>{},options:r})=>({unsubscribe:()=>{}})}),d6=()=>useContext(nv);function p6({children:e}){let t=useRef({}),o=useRef({}),r=useRef({}),{currentUserId:n}=Ae();function i(s,l){return `${n}.${s}.${JSON.stringify(l)}`}useEffect(()=>()=>{Object.values(o.current).forEach(s=>s());},[]);let a=({fetcher:s,params:l,callback:d=()=>{},options:p})=>{if(n==null)return {unsubscribe(){}};let u=i(s.name,l);if(t.current[u])d(r.current[u]),t.current[u].push(d);else {t.current[u]=[d];let g=s(l,f=>{r.current[u]=f,(t.current[u]||[]).forEach(v=>v(f));},p);o.current[u]=g;}return {unsubscribe(){let g=t.current[u].find(f=>f===d);g&&(t.current[u]=t.current[u].filter(f=>f!==g));}}};return R.createElement(nv.Provider,{value:{subscribe:a}},e)}var xV=createContext({fetch:o=>_(void 0,[o],function*({fetchFn:e,params:t}){return yield Promise.resolve({})})});function u6({children:e}){let t=useRef({}),o=useRef({});function r(i,a){return `${i}.${JSON.stringify(a)}`}let n=({fetchFn:i,params:a})=>{var u;let s=r(i.name,a);if(((u=t.current[s])==null?void 0:u.length)>0){if(o.current[s]!=null)return Promise.resolve(o.current[s]);let g=()=>{},f=()=>{},y=new Promise((v,C)=>{g=v,f=C;});return t.current[s].push({resolve:g,reject:f}),y}let l=()=>{},d=()=>{},p=new Promise((g,f)=>{l=g,d=f;});return t.current[s]=[{resolve:l,reject:d}],i(...a).then(g=>{o.current[s]=g,t.current[s].forEach(({resolve:f})=>f(g));}).catch(g=>{t.current[s].forEach(({reject:f})=>f(g));}).finally(()=>{setTimeout(()=>{o.current[s]=null,t.current[s]=[];},500);}),p};return R.createElement(xV.Provider,{value:{fetch:n}},e)}var sv=createContext({subscribe:({topic:e,callback:t})=>({unsubscribe:()=>{}})}),lv=()=>useContext(sv);function g6({children:e}){let t=useRef({}),o=useRef({});useEffect(()=>()=>{Object.values(o.current).forEach(n=>n());},[]);let r=({topic:n,callback:i})=>{if(t.current[n])t.current[n].push(i);else {t.current[n]=[i];let a=subscribeTopic(n,(...s)=>{(t.current[n]||[]).forEach(d=>d(...s));});o.current[n]=a;}return {unsubscribe(){let a=t.current[n].find(s=>s===i);a&&(t.current[n]=t.current[n].filter(s=>s!==a));}}};return R.createElement(sv.Provider,{value:{subscribe:r}},e)}function f6({children:e}){return R.createElement(m6,null,R.createElement(p6,null,R.createElement(g6,null,R.createElement(u6,null,e))))}var mv=createContext({}),W=e=>useContext(mv)[e]||null;function y6({children:e,config:t}){return R.createElement(mv.Provider,{value:t},e)}var dv=K`
|
|
558
558
|
color: #cc0058;
|
|
559
559
|
fill: #cc0058;
|
|
560
560
|
`,pv=m(He)`
|
|
@@ -570,7 +570,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
570
570
|
height: 20px;
|
|
571
571
|
margin-right: 4px;
|
|
572
572
|
${dv}
|
|
573
|
-
`,uv=({isLiked:e})=>e?R.createElement(NV,null):R.createElement(SV,null);var BV=({onClick:e,isActive:t,isDisabled:o})=>R.createElement(pv,{active:t,disabled:o,"data-qa-anchor":t?"post-liked-button":"post-like-button",onClick:e},R.createElement(uv,{isLiked:t})," ",R.createElement(FormattedMessage,{id:t?"post.liked":"post.like"})),gv=e=>{let t=W("PostLikeButton");return t?t(e):R.createElement(BV,c({},e))};var AV=e=>At({fetcher:PostRepository.getPost,params:e,shouldCall:!!e}),
|
|
573
|
+
`,uv=({isLiked:e})=>e?R.createElement(NV,null):R.createElement(SV,null);var BV=({onClick:e,isActive:t,isDisabled:o})=>R.createElement(pv,{active:t,disabled:o,"data-qa-anchor":t?"post-liked-button":"post-like-button",onClick:e},R.createElement(uv,{isLiked:t})," ",R.createElement(FormattedMessage,{id:t?"post.liked":"post.like"})),gv=e=>{let t=W("PostLikeButton");return t?t(e):R.createElement(BV,c({},e))};var AV=e=>At({fetcher:PostRepository.getPost,params:e,shouldCall:!!e}),qn=AV;var ur="like";var Ee=()=>{let{currentUserId:e}=J(),t=re(e),[o,r]=useState(!0),[n,i]=useState(!1),[a,s]=useState(!1);return useEffect(()=>{var l;t&&(i(!!(e!=null&&e.startsWith("public"))),s(!((l=t==null?void 0:t.metadata)!=null&&l.hasNickname)&&!(e!=null&&e.startsWith("public"))),r(!1));},[t]),{isAnonymousUser:n,isNoNicknameUser:a,isLoading:o}};var fv=createContext({isOpen:!1,openNicknameModal:()=>{},closeNicknameModal:()=>{}});var yv=({children:e})=>{let[t,o]=useState(!1),{isLoading:r,isNoNicknameUser:n}=Ee(),i=J(),a=()=>{o(!1);},s=()=>{window.scrollTo(0,0),window.parent.postMessage("parentNeedsScrollToTop","*"),o(!0);},l=()=>{let d=localStorage.getItem(`lastNicknameDialogShowTime#${i.currentUserId}`),p=new Date().getTime();return d?(p-parseInt(d))/(1e3*60*60)>=24:(localStorage.setItem(`lastNicknameDialogShowTime#${i.currentUserId}`,p.toString()),!0)};return useEffect(()=>{if(!r&&n&&l()){s();let d=new Date().getTime();localStorage.setItem(`lastNicknameDialogShowTime#${i.currentUserId}`,d.toString());}},[r,n]),R.createElement(fv.Provider,{value:{isOpen:t,openNicknameModal:s,closeNicknameModal:a}},e)},To=()=>useContext(fv);var hv=createContext({triggerAnonymousNeedsLogin:()=>{}});var Cv=({children:e})=>{let{isAnonymousUser:t}=Ee(),o=()=>{let n=localStorage.getItem("lastLoginEventTime"),i=new Date().getTime();return n?(i-parseInt(n))/(1e3*60*60)>=24:(localStorage.setItem("lastLoginEventTime",i.toString()),!0)},r=()=>{window.parent.postMessage("anonymousNeedsLogin","*");};return useEffect(()=>{if(t&&o()){r();let n=new Date().getTime();localStorage.setItem("lastLoginEventTime",n.toString());}},[t]),R.createElement(hv.Provider,{value:{triggerAnonymousNeedsLogin:r}},e)},gr=()=>useContext(hv);function xv(e){var t,o;return e==null||((t=e.myReactions)==null?void 0:t.length)===0?!1:(o=e==null?void 0:e.myReactions)==null?void 0:o.includes(ur)}var qV=({postId:e,isNoNicknameUser:t=!1,isAnonymousUser:o=!1,onLikeSuccess:r,onUnlikeSuccess:n})=>{let i=qn(e),{openNicknameModal:a}=To(),{triggerAnonymousNeedsLogin:s}=gr(),[l,d]=useState(xv(i));useEffect(()=>{d(xv(i));},[i==null?void 0:i.myReactions]);let p=()=>_(void 0,null,function*(){i!=null&&(t?a():o?s():l?(yield ReactionRepository.removeReaction("post",i.postId,ur),n==null||n(i),d(!l)):(yield ReactionRepository.addReaction("post",i.postId,ur),r==null||r(i),d(!l)));});return R.createElement(gv,{isActive:l,isDisabled:i==null,onClick:p})},bv=qV;var Gs={BIG:"big",REGULAR:"regular",SMALL:"small",TINY:"tiny"},JV=Gs.REGULAR,rl={[Gs.BIG]:64,[Gs.REGULAR]:40,[Gs.SMALL]:32,[Gs.TINY]:28},XV=e=>useMemo(()=>e&&rl[e]?e:JV,[e]),Iv=XV;var ej=s=>{var l=s,{circle:e,borderRadius:t=12,primaryColor:o="#EBECEF",secondaryColor:r="#f3f3f3",duration:n=2,style:i}=l,a=P(l,["circle","borderRadius","primaryColor","secondaryColor","duration","style"]);return R.createElement(RV,E(c({},a),{duration:n,circle:e,style:E(c({},i),{backgroundColor:o,backgroundImage:`linear-gradient(90deg, ${o}, ${r}, ${o})`,borderRadius:e?void 0:t})}))},we=ej;var tj=i=>{var a=i,{loading:e,size:t,backgroundImage:o,children:r}=a,n=P(a,["loading","size","backgroundImage","children"]);return R.createElement("div",c({},n),e?R.createElement(we,{circle:!0,width:"100%",height:"100%",style:{display:"block"}}):r)},Mv=m(tj)`
|
|
574
574
|
position: relative;
|
|
575
575
|
flex-shrink: 0;
|
|
576
576
|
overflow: hidden;
|
|
@@ -621,7 +621,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
621
621
|
8zm141.421 106.579c73.176 73.175 77.05 187.301 15.964 264.865L132.556 98.615c77.588-61.105
|
|
622
622
|
191.709-57.193 264.865 15.964zM114.579
|
|
623
623
|
397.421c-73.176-73.175-77.05-187.301-15.964-264.865l280.829 280.829c-77.588 61.105-191.709
|
|
624
|
-
57.193-264.865-15.964z`})),
|
|
624
|
+
57.193-264.865-15.964z`})),Kn=m(ij)`
|
|
625
625
|
fill: ${({theme:e})=>e.palette.base.shade3};
|
|
626
626
|
`;var v6={root:null,rootMargin:"0px 0px -15% 0px",threshold:.9},mj=(e,{root:t,rootMargin:o,threshold:r}=v6)=>{let n=useMemo(()=>({root:t,rootMargin:o||v6.rootMargin,threshold:r||v6.threshold}),[t,o,r]),[i,a]=useState(null),s=useRef(new IntersectionObserver(l=>a(l[0]),n));return useEffect(()=>{if(e){let{current:l}=s;return l.observe(e),()=>l.disconnect()}},[e]),useEffect(()=>{if(e){let{current:l}=s;return l.unobserve(e),s.current=new IntersectionObserver(d=>a(d[0]),n),s.current.observe(e),()=>s.current.disconnect()}},[n,o,e]),i},k2=mj;var pj=e=>{let{data:t}=useQuery({queryKey:["asc-uikit","FileRepository","getFile",e],queryFn:()=>FileRepository.getFile(e),enabled:!!e});return t==null?void 0:t.data},Dt=pj;var yj=({fileId:e,imageSize:t="medium"})=>{let o=Dt(e),[r,n]=useState(void 0);return useEffect(()=>{if(o==null||e==null){n(void 0);return}function i(){return _(this,null,function*(){if((o==null?void 0:o.fileUrl)==null)return;let a=FileRepository.fileUrlWithSize(o==null?void 0:o.fileUrl,t);n(a);})}i();},[o,t]),r},se=yj;var xj=m.div`
|
|
627
627
|
display: flex;
|
|
@@ -638,7 +638,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
638
638
|
white-space: nowrap;
|
|
639
639
|
overflow: hidden;
|
|
640
640
|
text-overflow: ellipsis;
|
|
641
|
-
`,Ij=({id:e,focused:t,isLastItem:o,loadMore:r,rootEl:n,containerRef:i})=>{var u,g;let a=useRef(null),s=k2(a==null?void 0:a.current,{root:(u=n==null?void 0:n.current)==null?void 0:u.childNodes[0]}),l=re(e),d=se({fileId:l==null?void 0:l.avatarFileId,imageSize:"small"});useEffect(()=>{a&&(s!=null&&s.isIntersecting)&&(r==null||r());},[a,s==null?void 0:s.isIntersecting,r]);let p=useCallback((f,y)=>{y&&(f.target.parentNode.style.cursor="not-allowed",f.target.parentNode.style["pointer-events"]="none");},[]);return R.createElement(xj,{ref:o?a:null,"data-qa-anchor":"social-mention-item",focused:t,isBanned:l==null?void 0:l.isGlobalBanned,maxWidth:(g=i==null?void 0:i.current)==null?void 0:g.clientWidth,onMouseEnter:f=>p(f,l==null?void 0:l.isGlobalBanned)},R.createElement(ge,{avatar:d,backgroundImage:Se}),R.createElement(bj,null,l==null?void 0:l.displayName),R.createElement("div",{style:{marginLeft:"0.5rem"}},l!=null&&l.isGlobalBanned?R.createElement(
|
|
641
|
+
`,Ij=({id:e,focused:t,isLastItem:o,loadMore:r,rootEl:n,containerRef:i})=>{var u,g;let a=useRef(null),s=k2(a==null?void 0:a.current,{root:(u=n==null?void 0:n.current)==null?void 0:u.childNodes[0]}),l=re(e),d=se({fileId:l==null?void 0:l.avatarFileId,imageSize:"small"});useEffect(()=>{a&&(s!=null&&s.isIntersecting)&&(r==null||r());},[a,s==null?void 0:s.isIntersecting,r]);let p=useCallback((f,y)=>{y&&(f.target.parentNode.style.cursor="not-allowed",f.target.parentNode.style["pointer-events"]="none");},[]);return R.createElement(xj,{ref:o?a:null,"data-qa-anchor":"social-mention-item",focused:t,isBanned:l==null?void 0:l.isGlobalBanned,maxWidth:(g=i==null?void 0:i.current)==null?void 0:g.clientWidth,onMouseEnter:f=>p(f,l==null?void 0:l.isGlobalBanned)},R.createElement(ge,{avatar:d,backgroundImage:Se}),R.createElement(bj,null,l==null?void 0:l.displayName),R.createElement("div",{style:{marginLeft:"0.5rem"}},l!=null&&l.isGlobalBanned?R.createElement(Kn,{style:{width:"16px",height:"16px"}}):null))},Sv=Ij;var Sj=m.div`
|
|
642
642
|
position: relative;
|
|
643
643
|
display: flex;
|
|
644
644
|
flex-wrap: wrap;
|
|
@@ -722,9 +722,9 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
722
722
|
margin-left: 8px;
|
|
723
723
|
background: ${({theme:e})=>e.palette.primary.main};
|
|
724
724
|
border-radius: 100px;
|
|
725
|
-
`;var
|
|
725
|
+
`;var Jn={editorPlaceholder:"wa",editorParagraph:"ya",editorContainer:"D",editorEditableContent:"H",editorLink:"ka",commentInput__mentionInterceptor:"ja",commentInput__mentionMenu:"L",commentInput__mentionMenuItem:"za",commentInput__mentionMenuMobile:"T"};function N2(e){return e.type==="text"}function I6(e){return e.type==="mention"}function w6(e){return e.type==="autolink"}function Fv(e){return e.type==="link"}function Uj(){return {children:[],direction:"ltr",format:"",indent:0,type:"root",version:1}}function $j(){return {textStyle:"",children:[],direction:"ltr",format:"",indent:0,type:"paragraph",version:1,textFormat:0}}function b6(e){return {detail:0,format:0,mode:"normal",style:"",text:e,type:"text",version:1}}function Vj({text:e,mention:t}){return {detail:0,format:0,mode:"normal",style:"",text:e.substring(t.index,t.index+t.length+1),type:"mention",version:1,data:{displayName:t.displayName||t.userId,userId:t.userId}}}function jj({url:e,title:t}){return {children:[b6(t)],format:"",direction:"ltr",indent:0,type:"link",version:1,url:e,rel:null,target:null,title:null}}function Gj(e){return (e==null?void 0:e.type)==="url"}function nl(e){var l,d;let t=Uj(),o=e.data.text.split(`
|
|
726
726
|
`),r=(d=(l=e.metadata)==null?void 0:l.mentioned)!=null?d:[],n=Hv.find(e.data.text).filter(p=>p.type==="url").map(p=>({index:p.start,length:p.end-p.start+1,href:p.href,value:p.value,type:"url"})),i=[...r,...n].sort((p,u)=>p.index-u.index),a=0,s=0;for(let p=0;p<o.length;p+=1){let u=$j(),g=0,f=o[p];for(;g<f.length;){let y=i[a];if(a<i.length&&y.index===s){let v=i[a];Gj(v)?(u.children.push(jj({title:v.value,url:v.href})),g+=v.length,s+=v.length):(u.children.push(Vj({text:e.data.text,mention:v})),g+=v.length+1,s+=v.length+1),a+=1;}else {let v=a<i.length?y.index:s+f.length,C=f.slice(g,v-s+g);C&&u.children.push(b6(C)),g+=C.length,s+=C.length;}}if(g<f.length){let y=f.slice(g);y&&u.children.push(b6(y)),s+=y.length;}s+=1,t.children.push(u);}return {root:t}}function il(e){let t=e.getEditorState().toJSON();return Zj(t)}function Zj(e){let t=[],o=e.root.children,r=[],n=!1,i=[],a=0;o.forEach(l=>{let d=l.children,p=[];d.forEach(u=>{if(N2(u)&&(p.push(u.text),a+=u.text.length),w6(u)&&u.children.forEach(g=>{N2(g)&&(p.push(g.text),a+=g.text.length);}),I6(u)){let g=u.text.charAt(0)==="@";if(u.data.userId==="all")r.push({index:a,length:u.text.length,type:"channel"}),n=!0;else {let f=g?u.text.length-1:u.text.length;r.push({index:a,length:f,type:"user",userId:u.data.userId,displayName:u.data.displayName}),i.push(u.data.userId);}p.push(u.text),a+=u.text.length;}}),a+=1,t.push(p.join(""));});let s=[];return i.length>0&&s.push({type:"user",userIds:i}),n&&s.push({type:"channel"}),{mentioned:r,text:t.join(`
|
|
727
|
-
`),mentionees:s}}var Qj={ltr:"ltr",rtl:"rtl"},al=({namespace:e,theme:t,nodes:o,editorState:r})=>({namespace:e,editable:!0,theme:c(c({},Qj),t),onError(n){throw n},nodes:o,editorState:r});var Ov={mention:"Xa"};function Kj({domNode:e,data:t}){let o=e.textContent;return o!==null?{node:La({text:o,data:t})}:null}var zi=class e extends TextNode{static getType(){return "mention"}static clone(t){return new e({data:t.__data,text:t.__text,key:t.__key})}static importJSON(t){let o=La({text:t.text,data:t.data});return o.setTextContent(t.text),o.setFormat(t.format),o.setDetail(t.detail),o.setMode(t.mode),o.setStyle(t.style),o}constructor({text:t,data:o,key:r}){super(t,r),this.__data=o;}exportJSON(){return E(c({},super.exportJSON()),{data:this.__data,type:"mention",version:1})}createDOM(t){let o=super.createDOM(t);return o.className=Ov.mention,o}exportDOM(){let t=document.createElement("span");return t.setAttribute("data-lexical-mention","true"),t.setAttribute("data-mention-data",JSON.stringify(this.__data)),t.textContent=this.__text,{element:t}}isSegmented(){return !1}static importDOM(){return {span:t=>t.hasAttribute("data-lexical-mention")?{conversion:o=>{var r;return Kj({domNode:o,data:JSON.parse((r=o.getAttribute("data-mention-data"))!=null?r:"{}")})},priority:1}:null}}isTextEntity(){return !0}isToken(){return !0}canInsertTextBefore(){return !1}canInsertTextAfter(){return !1}};function La({text:e,data:t}){return new zi({data:t,text:e}).setMode("segmented").toggleDirectionless()}var Yj=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Rj=[e=>{let t=Yj.exec(e);if(t===null)return null;let o=t[0];return {index:t.index,length:o.length,text:o,url:o.startsWith("http")?o:`https://${o}`}}],sl=()=>R.createElement(AutoLinkPlugin,{matchers:Rj});function on(e){return e!=null}function zv(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function Uv(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}var eG=new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/);function $v(e){return e==="https://"||eG.test(e)}var ll=()=>R.createElement(LinkPlugin,{validateUrl:$v});var jv=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`,cG="\\b[A-Z][^\\s"+jv+"]",dG={NAME:cG,PUNCTUATION:jv},Gv=dG.PUNCTUATION,P6=["@"].join(""),Zv="[^"+P6+Gv+"\\s]",pG="(?:\\.[ |$]| |["+Gv+"]|)",uG=75,gG=new RegExp("(^|\\s|\\()(["+P6+"]((?:"+Zv+pG+"){0,"+uG+"}))$"),fG=50,yG=new RegExp("(^|\\s|\\()(["+P6+"]((?:"+Zv+"){0,"+fG+"}))$");function hG(e,t){let o=gG.exec(e);if(o===null&&(o=yG.exec(e)),o!==null){let r=o[1],n=o[3];if(n.length>=t)return {leadOffset:o.index+r.length,matchingString:n,replaceableString:o[2]}}return null}function CG(e){return hG(e,0)}var M6=class extends MenuOption{constructor({data:t,dataId:o}){super(o),this.data=t;}};function ml({suggestions:e,getSuggestionId:t,onQueryChange:o,$createNode:r,menuRenderFn:n,commandPriority:i,onOpen:a,onClose:s,anchorClassName:l}){let[d]=useLexicalComposerContext(),p=useMemo(()=>e.map(f=>new M6({data:f,dataId:t(f)})),[e]),u=useCallback((f,y,v)=>{d.update(()=>{let C=r(f.data,f.key),h=$createTextNode(" ");y&&($insertNodes([h]),h.insertBefore(y),y.replace(C)),h.select(),v();});},[d]),g=useCallback(f=>CG(f),[d]);return R.createElement(LexicalTypeaheadMenuPlugin,{onQueryChange:o,onSelectOption:u,triggerFn:g,options:p,menuRenderFn:n,commandPriority:i,onOpen:a,onClose:s,anchorClassName:l})}function xG({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0}){let{subscribe:i}=T0(),[a,s]=useState(!1),[l,d]=useState(n||!0),[p,u]=useState([]),[g,f]=useState(null),[y,v]=useState(!1),C=useRef(null),h=useRef(null),x=useCallback(()=>{var I;C.current&&(s(!0),(I=C.current)==null||I.call(C));},[C,a,l,d]),b=useCallback(I=>{n&&(I.data&&u(I.data),d(I.loading),v(I.hasNextPage),f(I.error),C.current=I.onNextPage,o(I));},[n,C]);useEffect(()=>{if(!n)return;let{unsubscribe:I}=i({fetcher:e,params:t,callback:b});return h.current=I,()=>{I();}},[t,n]);let M=useCallback(()=>{h.current&&h.current();let{unsubscribe:I}=i({fetcher:e,params:t,callback:b,refresh:!0});return h.current=I,()=>I()},[]);return {items:p,hasMore:y,isLoading:l,loadMore:x,error:g,loadMoreHasBeenCalled:a,refresh:M}}var dt=xG;var cl=({displayName:e,limit:t,enabled:o=!0})=>{let[r,n]=useState([]),[i,a]=useState(!1),[s,l]=useState(!1),[d,p]=useState(!1),u=useRef(null),g=useRef(null),f=()=>{u.current&&(u.current(),p(!0));};return useEffect(()=>{if(g.current&&(g.current(),g.current=null),!o)return;let y=UserRepository.searchUserByDisplayName({displayName:e,limit:t},v=>{l(v.hasNextPage||!1),a(v.loading),u.current=v.onNextPage||null,n(v.data);});return g.current=y,()=>{var v;(v=g.current)==null||v.call(g),g.current=null;}},[e,t,o]),{users:r,isLoading:i,hasMore:s,loadMore:f,loadMoreHasBeenCalled:d}};var B0=({communityId:e,displayName:t,limit:o,enabled:r=!0})=>{let[n,i]=useState([]),[a,s]=useState(!1),[l,d]=useState(!1),[p,u]=useState(!1),g=useRef(null),f=useRef(null),y=()=>{g.current&&(g.current(),u(!0));};return useEffect(()=>{if(!r)return;f.current&&(f.current(),f.current=null);let v=CommunityRepository.Membership.searchMembers({communityId:e,search:t,limit:o,sortBy:"displayName",includeDeleted:!1},C=>{d(C.hasNextPage||!1),s(C.loading),g.current=C.onNextPage||null,i(C.data);});return f.current=v,()=>{var C;(C=f.current)==null||C.call(f),f.current=null;}},[e,t,r]),{members:n,isLoading:a,hasMore:l,loadMore:y,loadMoreHasBeenCalled:p}};function kG({fetcher:e,params:t,callback:o=()=>{},options:r,shouldCall:n=!0,getSubscribedTopic:i}){let{subscribe:a}=d6(),[s,l]=useState(null),[d,p]=useState(void 0),[u,g]=useState(!1),[f,y]=useState(null),v=useRef(null),C=useCallback(h=>{n&&t!=null&&(g(h.loading),h.data&&l(h.data),p(h.origin),y(h.error),o(h));},[n,o]);return useEffect(()=>(i&&(v.current=subscribeTopic(i())),()=>{var h;(h=v.current)==null||h.call(v);}),[i]),useEffect(()=>{if(t==null||!n)return;let{unsubscribe:h}=a({fetcher:e,params:t,callback:C,options:r});return ()=>{h();}},[t,n]),{item:s,origin:d,isLoading:u||s==null&&f==null,error:f}}var _n=kG;var NG=({communityId:e,shouldCall:t=!0})=>{let n=_n({fetcher:CommunityRepository.getCommunity,params:e,shouldCall:t&&!!e}),{item:o}=n,r=P(n,["item"]);return c({community:o},r)},Pt=NG;var fr=e=>{let r=_n({fetcher:UserRepository.getUser,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return c({user:t},o)};var AG=e=>{let{data:t}=useQuery({queryKey:["asc-uikit","FileRepository","getFile",e],queryFn:()=>FileRepository.getFile(e),enabled:!!e});return t==null?void 0:t.data},Jv=AG;var nt=({fileId:e,imageSize:t="medium"})=>{let o=Jv(e),[r,n]=useState(void 0);return useEffect(()=>{if(o==null||e==null){n(void 0);return}function i(){return _(this,null,function*(){if((o==null?void 0:o.fileUrl)==null)return;let a=FileRepository.fileUrlWithSize(o==null?void 0:o.fileUrl,t);n(a);})}i();},[o,t]),r};var Xv={userAvatar__text:"Ya",userAvatar__placeholder__path:"Ca",userAvatar__placeholder__rect:"Aa",userAvatar__placeholder:"Ma",userAvatar__img:"Sa"};var Yv=o=>{var r=o,{className:e}=r,t=P(r,["className"]);return R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",className:e},t),R.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#F26B1C"}),R.createElement("path",{d:"M23.1255 13.1312C22.385 12.4069 21.3806 12 20.3333 12C19.2861 12 18.2817 12.4069 17.5412 13.1312C16.8006 13.8555 16.3846 14.8378 16.3846 15.8621C16.3846 16.8864 16.8006 17.8687 17.5412 18.593C18.2817 19.3172 19.2861 19.7241 20.3333 19.7241C21.3806 19.7241 22.385 19.3172 23.1255 18.593C23.866 17.8687 24.2821 16.8864 24.2821 15.8621C24.2821 14.8378 23.866 13.8555 23.1255 13.1312Z",fill:"white"}),R.createElement("path",{d:"M20.3333 21.931C16.2831 21.931 13 23.7848 13 26.069V28H27.6667V26.069C27.6667 23.7848 24.3836 21.931 20.3333 21.931Z",fill:"white"}))};function jo({userId:e,className:t}){var n;let{user:o}=fr(e),r=nt({fileId:(n=o==null?void 0:o.avatar)==null?void 0:n.fileId});return o==null||e==null||r==null?R.createElement(Yv,{className:t}):R.createElement("object",{data:r,type:"image/png",className:cr(Xv.userAvatar__img,t)},R.createElement(Yv,{className:t}))}var Aa={userMentionItem__item:"x",allMentionItem__item:"w",userMentionItem__avatar:"Ea",allMentionItem__atSign:"Fa",userMentionItem__displayName:"Ia",allMentionItem__displayName:"Ra"};function Da({option:e,isSelected:t,onClick:o,onMouseEnter:r}){return R.createElement("li",{key:e.key,tabIndex:-1,"data-is-selected":t,className:Aa.userMentionItem__item,ref:e.setRefElement,role:"option","aria-selected":t,onMouseEnter:r,onClick:o},R.createElement(jo,{className:Aa.userMentionItem__avatar,userId:e.data.userId}),R.createElement("p",{className:Aa.userMentionItem__displayName},e.data.displayName))}var VG=({node:e,onIntersect:t,options:o})=>{useEffect(()=>{if(e==null)return;let r=new IntersectionObserver(n=>{var i;return ((i=n[0])==null?void 0:i.isIntersecting)&&t()},o);return r.observe(e),()=>r.disconnect()},[e,t,o]);},So=VG;var mZ=e=>{let[t,o]=useState(null),{community:r,isLoading:n}=Pt({communityId:e}),i=useMemo(()=>!!e&&!n&&!(r!=null&&r.isPublic),[e,n,r]),{members:a,hasMore:s,isLoading:l,loadMore:d}=B0({communityId:e||"",displayName:t||"",limit:10,enabled:i}),{users:p,hasMore:u,loadMore:g,isLoading:f}=cl({displayName:t||"",limit:10,enabled:!i}),y=b=>{o(b);},v=useMemo(()=>e&&n?[]:i?a.map(({user:b,userId:M})=>({userId:(b==null?void 0:b.userId)||M,displayName:b==null?void 0:b.displayName})):p.map(({displayName:b,userId:M})=>({userId:M,displayName:b})),[p,a,i,n]),C=useMemo(()=>i?s:u,[i,s,u]),h=()=>{x||!C||(i?d():g());},x=useMemo(()=>i?l:f,[l,f,i]);return {suggestions:v,queryString:t,onQueryChange:y,loadMore:h,hasMore:C,isLoading:x}},cZ=[AutoLinkNode,LinkNode,zi],Jn=forwardRef(({pageId:e="*",componentId:t="*",elementId:o="*",communityId:r,value:n,onChange:i,maxLines:a=10,placeholder:s,mentionContainer:l,targetId:d,targetType:p},u)=>{var $;let [g,f]=useState(null);A({pageId:e,componentId:t,elementId:o});let {onQueryChange:x,suggestions:b,isLoading:M,loadMore:I,hasMore:w}=mZ(r);So({onIntersect:()=>{M===!1&&I();},node:g,options:{threshold:.5}});let N=R.useRef(null),T=useMedia("(min-width: 768px)"),{refs:L,floatingStyles:D}=useFloating({placement:T?"bottom-start":"bottom",middleware:[offset(({rects:G,placement:q})=>T?q.includes("top")?G.reference.height*1.1:-G.reference.height:q.includes("top")?0:-10),flip(),shift()],whileElementsMounted:autoUpdate}),U=()=>{var G;(G=N.current)==null||G.dispatchCommand(CLEAR_EDITOR_COMMAND,void 0);};useImperativeHandle(u,()=>({clearEditorState:U}));let Z=useMedia("(min-width: 768px)"),B=al({namespace:"CommentInput",theme:{placeholder:Kn.editorPlaceholder,paragraph:Kn.editorParagraph,link:Kn.editorLink},nodes:cZ});return R.createElement(LexicalComposer,{initialConfig:c(c({},B),($=n==null?void 0:n.data)!=null&&$.text?{editorState:JSON.stringify(nl(n))}:{})},R.createElement("div",{className:Kn.editorContainer,style:{"--asc-max-lines":a}},R.createElement(RichTextPlugin,{contentEditable:R.createElement(ContentEditable,{className:Kn.editorEditableContent}),placeholder:s?R.createElement("span",{className:Kn.editorPlaceholder},s):null,ErrorBoundary:LexicalErrorBoundary}),R.createElement(OnChangePlugin,{onChange:(G,q)=>{i(il(q));}}),R.createElement(HistoryPlugin,null),R.createElement(AutoFocusPlugin,null),R.createElement(ll,null),R.createElement(sl,null),R.createElement(EditorRefPlugin,{editorRef:N}),R.createElement(ClearEditorPlugin,null),R.createElement(ml,{suggestions:b,getSuggestionId:G=>G.userId,onQueryChange:x,$createNode:G=>La({text:`@${(G==null?void 0:G.displayName)||""}`,data:G}),onOpen:G=>{L.setReference({getBoundingClientRect:G.getRect});},onClose:()=>{L.setReference(null);},menuRenderFn:(G,{options:q,selectedIndex:z,setHighlightedIndex:H,selectOptionAndCleanUp:F})=>!l||q.length===0?null:Z&&G.current?(L.setReference(G.current),Rv.createPortal(R.createElement("div",{ref:j=>L.setFloating(j),style:c({},D),className:Kn.commentInput__mentionMenu},R.createElement("ul",{className:Kn.commentInput__mentionMenuItem},q.map((j,Q)=>R.createElement(Da,{isSelected:z===Q,onClick:()=>{H(Q),F(j);},onMouseEnter:()=>{H(Q);},key:j.key,option:E(c({},j),{setRefElement:k=>{Q===q.length-1&&f(k),j.setRefElement(k);}})})))),G.current)):(L.setReference(l),Rv.createPortal(R.createElement("div",{ref:j=>L.setFloating(j),className:Kn.commentInput__mentionMenuMobile,style:E(c({},D),{"--asc-mention-width":`${l.offsetWidth}px`})},q.map((j,Q)=>R.createElement(Da,{isSelected:z===Q,onClick:()=>{H(Q),F(j);},onMouseEnter:()=>{H(Q);},key:j.key,option:E(c({},j),{setRefElement:k=>{Q===q.length-1&&f(k),j.setRefElement(k);}})}))),l)),commandPriority:COMMAND_PRIORITY_HIGH})))});var gZ=30,fZ=5e4,yZ=({className:e,userToReply:t,onSubmit:o,postId:r,textValue:n})=>{let i=Ba(r),{currentUserId:a}=J(),{info:s}=Pe(),l=re(a),d=se({fileId:l==null?void 0:l.avatarFileId,imageSize:"small"}),[p,u]=useState(n),{formatMessage:g}=useIntl(),f=useRef(null),y=useRef(null);useEffect(()=>{var b;(b=y.current)==null||b.focus();},[]);let v=()=>{var b,M;if((p==null?void 0:p.text)!==""){if(p!=null&&p.mentioned&&((b=p==null?void 0:p.mentioned)==null?void 0:b.length)>gZ)return s({title:R.createElement(FormattedMessage,{id:"CommentComposeBar.unableToMention"}),content:R.createElement(FormattedMessage,{id:"CommentComposeBar.overMentionees"}),okText:R.createElement(FormattedMessage,{id:"CommentComposeBar.okText"})});if(p!=null&&p.text&&((M=p.text)==null?void 0:M.length)>fZ)return s({title:R.createElement(FormattedMessage,{id:"CommentComposeBar.unableToPost"}),content:R.createElement(FormattedMessage,{id:"CommentComposeBar.overCharacter"}),okText:R.createElement(FormattedMessage,{id:"CommentComposeBar.done"})});o==null||o((p==null?void 0:p.text)||"",p==null?void 0:p.mentionees,{mentioned:p==null?void 0:p.mentioned});}},C=(p==null?void 0:p.text)==="";t?g({id:"CommentComposeBar.replayTo"})+t:g({id:"CommentComposeBar.saySomething"});let x=g(t?{id:"reply"}:{id:"CommentComposeBar.addComment"});return i==null?null:R.createElement(Lv,{className:e,ref:f},R.createElement(Bv,{avatar:d,backgroundImage:Se}),R.createElement(Av,null,R.createElement(Jn,{placeholder:"Say something nice...",mentionContainer:f.current,onChange:({text:b,mentioned:M,mentionees:I})=>{u({text:b,mentioned:M,mentionees:I});}})),R.createElement(Dv,{"data-qa-anchor":t?"comment-compose-bar-reply-button":"comment-compose-bar-add-comment-button",disabled:C,onClick:v},x))},Ha=e=>{let t=W("CommentComposerBar");return t?t(e):R.createElement(yZ,c({},e))};var rx=m.div`
|
|
727
|
+
`),mentionees:s}}var Qj={ltr:"ltr",rtl:"rtl"},al=({namespace:e,theme:t,nodes:o,editorState:r})=>({namespace:e,editable:!0,theme:c(c({},Qj),t),onError(n){throw n},nodes:o,editorState:r});var Ov={mention:"Xa"};function Kj({domNode:e,data:t}){let o=e.textContent;return o!==null?{node:La({text:o,data:t})}:null}var Ui=class e extends TextNode{static getType(){return "mention"}static clone(t){return new e({data:t.__data,text:t.__text,key:t.__key})}static importJSON(t){let o=La({text:t.text,data:t.data});return o.setTextContent(t.text),o.setFormat(t.format),o.setDetail(t.detail),o.setMode(t.mode),o.setStyle(t.style),o}constructor({text:t,data:o,key:r}){super(t,r),this.__data=o;}exportJSON(){return E(c({},super.exportJSON()),{data:this.__data,type:"mention",version:1})}createDOM(t){let o=super.createDOM(t);return o.className=Ov.mention,o}exportDOM(){let t=document.createElement("span");return t.setAttribute("data-lexical-mention","true"),t.setAttribute("data-mention-data",JSON.stringify(this.__data)),t.textContent=this.__text,{element:t}}isSegmented(){return !1}static importDOM(){return {span:t=>t.hasAttribute("data-lexical-mention")?{conversion:o=>{var r;return Kj({domNode:o,data:JSON.parse((r=o.getAttribute("data-mention-data"))!=null?r:"{}")})},priority:1}:null}}isTextEntity(){return !0}isToken(){return !0}canInsertTextBefore(){return !1}canInsertTextAfter(){return !1}};function La({text:e,data:t}){return new Ui({data:t,text:e}).setMode("segmented").toggleDirectionless()}var Yj=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,Rj=[e=>{let t=Yj.exec(e);if(t===null)return null;let o=t[0];return {index:t.index,length:o.length,text:o,url:o.startsWith("http")?o:`https://${o}`}}],sl=()=>R.createElement(AutoLinkPlugin,{matchers:Rj});function on(e){return e!=null}function zv(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function Uv(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}var eG=new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/);function $v(e){return e==="https://"||eG.test(e)}var ll=()=>R.createElement(LinkPlugin,{validateUrl:$v});var jv=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`,cG="\\b[A-Z][^\\s"+jv+"]",dG={NAME:cG,PUNCTUATION:jv},Gv=dG.PUNCTUATION,P6=["@"].join(""),Zv="[^"+P6+Gv+"\\s]",pG="(?:\\.[ |$]| |["+Gv+"]|)",uG=75,gG=new RegExp("(^|\\s|\\()(["+P6+"]((?:"+Zv+pG+"){0,"+uG+"}))$"),fG=50,yG=new RegExp("(^|\\s|\\()(["+P6+"]((?:"+Zv+"){0,"+fG+"}))$");function hG(e,t){let o=gG.exec(e);if(o===null&&(o=yG.exec(e)),o!==null){let r=o[1],n=o[3];if(n.length>=t)return {leadOffset:o.index+r.length,matchingString:n,replaceableString:o[2]}}return null}function CG(e){return hG(e,0)}var M6=class extends MenuOption{constructor({data:t,dataId:o}){super(o),this.data=t;}};function ml({suggestions:e,getSuggestionId:t,onQueryChange:o,$createNode:r,menuRenderFn:n,commandPriority:i,onOpen:a,onClose:s,anchorClassName:l}){let[d]=useLexicalComposerContext(),p=useMemo(()=>e.map(f=>new M6({data:f,dataId:t(f)})),[e]),u=useCallback((f,y,v)=>{d.update(()=>{let C=r(f.data,f.key),h=$createTextNode(" ");y&&($insertNodes([h]),h.insertBefore(y),y.replace(C)),h.select(),v();});},[d]),g=useCallback(f=>CG(f),[d]);return R.createElement(LexicalTypeaheadMenuPlugin,{onQueryChange:o,onSelectOption:u,triggerFn:g,options:p,menuRenderFn:n,commandPriority:i,onOpen:a,onClose:s,anchorClassName:l})}function xG({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0}){let{subscribe:i}=T0(),[a,s]=useState(!1),[l,d]=useState(n||!0),[p,u]=useState([]),[g,f]=useState(null),[y,v]=useState(!1),C=useRef(null),h=useRef(null),x=useCallback(()=>{var I;C.current&&(s(!0),(I=C.current)==null||I.call(C));},[C,a,l,d]),b=useCallback(I=>{n&&(I.data&&u(I.data),d(I.loading),v(I.hasNextPage),f(I.error),C.current=I.onNextPage,o(I));},[n,C]);useEffect(()=>{if(!n)return;let{unsubscribe:I}=i({fetcher:e,params:t,callback:b});return h.current=I,()=>{I();}},[t,n]);let M=useCallback(()=>{h.current&&h.current();let{unsubscribe:I}=i({fetcher:e,params:t,callback:b,refresh:!0});return h.current=I,()=>I()},[]);return {items:p,hasMore:y,isLoading:l,loadMore:x,error:g,loadMoreHasBeenCalled:a,refresh:M}}var dt=xG;var cl=({displayName:e,limit:t,enabled:o=!0})=>{let[r,n]=useState([]),[i,a]=useState(!1),[s,l]=useState(!1),[d,p]=useState(!1),u=useRef(null),g=useRef(null),f=()=>{u.current&&(u.current(),p(!0));};return useEffect(()=>{if(g.current&&(g.current(),g.current=null),!o)return;let y=UserRepository.searchUserByDisplayName({displayName:e,limit:t},v=>{l(v.hasNextPage||!1),a(v.loading),u.current=v.onNextPage||null,n(v.data);});return g.current=y,()=>{var v;(v=g.current)==null||v.call(g),g.current=null;}},[e,t,o]),{users:r,isLoading:i,hasMore:s,loadMore:f,loadMoreHasBeenCalled:d}};var B0=({communityId:e,displayName:t,limit:o,enabled:r=!0})=>{let[n,i]=useState([]),[a,s]=useState(!1),[l,d]=useState(!1),[p,u]=useState(!1),g=useRef(null),f=useRef(null),y=()=>{g.current&&(g.current(),u(!0));};return useEffect(()=>{if(!r)return;f.current&&(f.current(),f.current=null);let v=CommunityRepository.Membership.searchMembers({communityId:e,search:t,limit:o,sortBy:"displayName",includeDeleted:!1},C=>{d(C.hasNextPage||!1),s(C.loading),g.current=C.onNextPage||null,i(C.data);});return f.current=v,()=>{var C;(C=f.current)==null||C.call(f),f.current=null;}},[e,t,r]),{members:n,isLoading:a,hasMore:l,loadMore:y,loadMoreHasBeenCalled:p}};function kG({fetcher:e,params:t,callback:o=()=>{},options:r,shouldCall:n=!0,getSubscribedTopic:i}){let{subscribe:a}=d6(),[s,l]=useState(null),[d,p]=useState(void 0),[u,g]=useState(!1),[f,y]=useState(null),v=useRef(null),C=useCallback(h=>{n&&t!=null&&(g(h.loading),h.data&&l(h.data),p(h.origin),y(h.error),o(h));},[n,o]);return useEffect(()=>(i&&(v.current=subscribeTopic(i())),()=>{var h;(h=v.current)==null||h.call(v);}),[i]),useEffect(()=>{if(t==null||!n)return;let{unsubscribe:h}=a({fetcher:e,params:t,callback:C,options:r});return ()=>{h();}},[t,n]),{item:s,origin:d,isLoading:u||s==null&&f==null,error:f}}var _n=kG;var NG=({communityId:e,shouldCall:t=!0})=>{let n=_n({fetcher:CommunityRepository.getCommunity,params:e,shouldCall:t&&!!e}),{item:o}=n,r=P(n,["item"]);return c({community:o},r)},Pt=NG;var fr=e=>{let r=_n({fetcher:UserRepository.getUser,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return c({user:t},o)};var AG=e=>{let{data:t}=useQuery({queryKey:["asc-uikit","FileRepository","getFile",e],queryFn:()=>FileRepository.getFile(e),enabled:!!e});return t==null?void 0:t.data},Jv=AG;var nt=({fileId:e,imageSize:t="medium"})=>{let o=Jv(e),[r,n]=useState(void 0);return useEffect(()=>{if(o==null||e==null){n(void 0);return}function i(){return _(this,null,function*(){if((o==null?void 0:o.fileUrl)==null)return;let a=FileRepository.fileUrlWithSize(o==null?void 0:o.fileUrl,t);n(a);})}i();},[o,t]),r};var Xv={userAvatar__text:"Ya",userAvatar__placeholder__path:"Ca",userAvatar__placeholder__rect:"Aa",userAvatar__placeholder:"Ma",userAvatar__img:"Sa"};var Yv=o=>{var r=o,{className:e}=r,t=P(r,["className"]);return R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",className:e},t),R.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#F26B1C"}),R.createElement("path",{d:"M23.1255 13.1312C22.385 12.4069 21.3806 12 20.3333 12C19.2861 12 18.2817 12.4069 17.5412 13.1312C16.8006 13.8555 16.3846 14.8378 16.3846 15.8621C16.3846 16.8864 16.8006 17.8687 17.5412 18.593C18.2817 19.3172 19.2861 19.7241 20.3333 19.7241C21.3806 19.7241 22.385 19.3172 23.1255 18.593C23.866 17.8687 24.2821 16.8864 24.2821 15.8621C24.2821 14.8378 23.866 13.8555 23.1255 13.1312Z",fill:"white"}),R.createElement("path",{d:"M20.3333 21.931C16.2831 21.931 13 23.7848 13 26.069V28H27.6667V26.069C27.6667 23.7848 24.3836 21.931 20.3333 21.931Z",fill:"white"}))};function jo({userId:e,className:t}){var n;let{user:o}=fr(e),r=nt({fileId:(n=o==null?void 0:o.avatar)==null?void 0:n.fileId});return o==null||e==null||r==null?R.createElement(Yv,{className:t}):R.createElement("object",{data:r,type:"image/png",className:cr(Xv.userAvatar__img,t)},R.createElement(Yv,{className:t}))}var Aa={userMentionItem__item:"x",allMentionItem__item:"w",userMentionItem__avatar:"Ea",allMentionItem__atSign:"Fa",userMentionItem__displayName:"Ia",allMentionItem__displayName:"Ra"};function Da({option:e,isSelected:t,onClick:o,onMouseEnter:r}){return R.createElement("li",{key:e.key,tabIndex:-1,"data-is-selected":t,className:Aa.userMentionItem__item,ref:e.setRefElement,role:"option","aria-selected":t,onMouseEnter:r,onClick:o},R.createElement(jo,{className:Aa.userMentionItem__avatar,userId:e.data.userId}),R.createElement("p",{className:Aa.userMentionItem__displayName},e.data.displayName))}var VG=({node:e,onIntersect:t,options:o})=>{useEffect(()=>{if(e==null)return;let r=new IntersectionObserver(n=>{var i;return ((i=n[0])==null?void 0:i.isIntersecting)&&t()},o);return r.observe(e),()=>r.disconnect()},[e,t,o]);},So=VG;var mZ=e=>{let[t,o]=useState(null),{community:r,isLoading:n}=Pt({communityId:e}),i=useMemo(()=>!!e&&!n&&!(r!=null&&r.isPublic),[e,n,r]),{members:a,hasMore:s,isLoading:l,loadMore:d}=B0({communityId:e||"",displayName:t||"",limit:10,enabled:i}),{users:p,hasMore:u,loadMore:g,isLoading:f}=cl({displayName:t||"",limit:10,enabled:!i}),y=b=>{o(b);},v=useMemo(()=>e&&n?[]:i?a.map(({user:b,userId:M})=>({userId:(b==null?void 0:b.userId)||M,displayName:b==null?void 0:b.displayName})):p.map(({displayName:b,userId:M})=>({userId:M,displayName:b})),[p,a,i,n]),C=useMemo(()=>i?s:u,[i,s,u]),h=()=>{x||!C||(i?d():g());},x=useMemo(()=>i?l:f,[l,f,i]);return {suggestions:v,queryString:t,onQueryChange:y,loadMore:h,hasMore:C,isLoading:x}},cZ=[AutoLinkNode,LinkNode,Ui],Xn=forwardRef(({pageId:e="*",componentId:t="*",elementId:o="*",communityId:r,value:n,onChange:i,maxLines:a=10,placeholder:s,mentionContainer:l,targetId:d,targetType:p},u)=>{var $;let [g,f]=useState(null);A({pageId:e,componentId:t,elementId:o});let {onQueryChange:x,suggestions:b,isLoading:M,loadMore:I,hasMore:w}=mZ(r);So({onIntersect:()=>{M===!1&&I();},node:g,options:{threshold:.5}});let N=R.useRef(null),T=useMedia("(min-width: 768px)"),{refs:L,floatingStyles:D}=useFloating({placement:T?"bottom-start":"bottom",middleware:[offset(({rects:G,placement:q})=>T?q.includes("top")?G.reference.height*1.1:-G.reference.height:q.includes("top")?0:-10),flip(),shift()],whileElementsMounted:autoUpdate}),U=()=>{var G;(G=N.current)==null||G.dispatchCommand(CLEAR_EDITOR_COMMAND,void 0);};useImperativeHandle(u,()=>({clearEditorState:U}));let Z=useMedia("(min-width: 768px)"),B=al({namespace:"CommentInput",theme:{placeholder:Jn.editorPlaceholder,paragraph:Jn.editorParagraph,link:Jn.editorLink},nodes:cZ});return R.createElement(LexicalComposer,{initialConfig:c(c({},B),($=n==null?void 0:n.data)!=null&&$.text?{editorState:JSON.stringify(nl(n))}:{})},R.createElement("div",{className:Jn.editorContainer,style:{"--asc-max-lines":a}},R.createElement(RichTextPlugin,{contentEditable:R.createElement(ContentEditable,{className:Jn.editorEditableContent}),placeholder:s?R.createElement("span",{className:Jn.editorPlaceholder},s):null,ErrorBoundary:LexicalErrorBoundary}),R.createElement(OnChangePlugin,{onChange:(G,q)=>{i(il(q));}}),R.createElement(HistoryPlugin,null),R.createElement(AutoFocusPlugin,null),R.createElement(ll,null),R.createElement(sl,null),R.createElement(EditorRefPlugin,{editorRef:N}),R.createElement(ClearEditorPlugin,null),R.createElement(ml,{suggestions:b,getSuggestionId:G=>G.userId,onQueryChange:x,$createNode:G=>La({text:`@${(G==null?void 0:G.displayName)||""}`,data:G}),onOpen:G=>{L.setReference({getBoundingClientRect:G.getRect});},onClose:()=>{L.setReference(null);},menuRenderFn:(G,{options:q,selectedIndex:z,setHighlightedIndex:H,selectOptionAndCleanUp:F})=>!l||q.length===0?null:Z&&G.current?(L.setReference(G.current),Rv.createPortal(R.createElement("div",{ref:j=>L.setFloating(j),style:c({},D),className:Jn.commentInput__mentionMenu},R.createElement("ul",{className:Jn.commentInput__mentionMenuItem},q.map((j,Q)=>R.createElement(Da,{isSelected:z===Q,onClick:()=>{H(Q),F(j);},onMouseEnter:()=>{H(Q);},key:j.key,option:E(c({},j),{setRefElement:k=>{Q===q.length-1&&f(k),j.setRefElement(k);}})})))),G.current)):(L.setReference(l),Rv.createPortal(R.createElement("div",{ref:j=>L.setFloating(j),className:Jn.commentInput__mentionMenuMobile,style:E(c({},D),{"--asc-mention-width":`${l.offsetWidth}px`})},q.map((j,Q)=>R.createElement(Da,{isSelected:z===Q,onClick:()=>{H(Q),F(j);},onMouseEnter:()=>{H(Q);},key:j.key,option:E(c({},j),{setRefElement:k=>{Q===q.length-1&&f(k),j.setRefElement(k);}})}))),l)),commandPriority:COMMAND_PRIORITY_HIGH})))});var gZ=30,fZ=5e4,yZ=({className:e,userToReply:t,onSubmit:o,postId:r,textValue:n})=>{let i=qn(r),{currentUserId:a}=J(),{info:s}=Pe(),l=re(a),d=se({fileId:l==null?void 0:l.avatarFileId,imageSize:"small"}),[p,u]=useState(n),{formatMessage:g}=useIntl(),f=useRef(null),y=useRef(null);useEffect(()=>{var b;(b=y.current)==null||b.focus();},[]);let v=()=>{var b,M;if((p==null?void 0:p.text)!==""){if(p!=null&&p.mentioned&&((b=p==null?void 0:p.mentioned)==null?void 0:b.length)>gZ)return s({title:R.createElement(FormattedMessage,{id:"CommentComposeBar.unableToMention"}),content:R.createElement(FormattedMessage,{id:"CommentComposeBar.overMentionees"}),okText:R.createElement(FormattedMessage,{id:"CommentComposeBar.okText"})});if(p!=null&&p.text&&((M=p.text)==null?void 0:M.length)>fZ)return s({title:R.createElement(FormattedMessage,{id:"CommentComposeBar.unableToPost"}),content:R.createElement(FormattedMessage,{id:"CommentComposeBar.overCharacter"}),okText:R.createElement(FormattedMessage,{id:"CommentComposeBar.done"})});o==null||o((p==null?void 0:p.text)||"",p==null?void 0:p.mentionees,{mentioned:p==null?void 0:p.mentioned});}},C=(p==null?void 0:p.text)==="";t?g({id:"CommentComposeBar.replayTo"})+t:g({id:"CommentComposeBar.saySomething"});let x=g(t?{id:"reply"}:{id:"CommentComposeBar.addComment"});return i==null?null:R.createElement(Lv,{className:e,ref:f},R.createElement(Bv,{avatar:d,backgroundImage:Se}),R.createElement(Av,null,R.createElement(Xn,{placeholder:"Say something nice...",mentionContainer:f.current,onChange:({text:b,mentioned:M,mentionees:I})=>{u({text:b,mentioned:M,mentionees:I});}})),R.createElement(Dv,{"data-qa-anchor":t?"comment-compose-bar-reply-button":"comment-compose-bar-add-comment-button",disabled:C,onClick:v},x))},Ha=e=>{let t=W("CommentComposerBar");return t?t(e):R.createElement(yZ,c({},e))};var rx=m.div`
|
|
728
728
|
color: ${({theme:e})=>e.palette.neutral.shade1};
|
|
729
729
|
${({theme:e})=>e.typography.body}
|
|
730
730
|
`,nx=m.div`
|
|
@@ -809,7 +809,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
809
809
|
@media (max-width: 768px) {
|
|
810
810
|
${({fullSized:e})=>e?"width: 100%;":"min-width: 90px;"}
|
|
811
811
|
}
|
|
812
|
-
`;var xx=200,U0=({parentContainer:e,dropdownRef:t,align:o=B2,scrollableHeight:r=xx,position:n=Tn,buttonContainerHeight:i})=>{let[a,s]=useState(n),l=k2(t.current,{root:e,rootMargin:e?`0px 0px -${Math.ceil(r*100/(e.getBoundingClientRect().height-i))}% 0px`:void 0});return useEffect(()=>{var d;(l==null?void 0:l.isIntersecting)===!1?((d=l.boundingClientRect)==null?void 0:d.top)<0?s(Tn):s(F0):s(n);},[l,n]),{align:o,currentPosition:a,scrollableHeight:r}},ZZ=e=>R.createElement(Y,c({},e),R.createElement(Pn,{height:14,width:14})),QZ=({"data-qa-anchor":e="",isOpen:t,renderTrigger:o=ZZ,children:r,position:n=Tn,align:i=B2,handleClose:a,fullSized:s=!1,scrollable:l=!1,scrollableHeight:d=xx,parentContainer:p=null,disabled:u=!1,className:g=""})=>{let[f,y]=useState(t),[v,C]=useState(n),[h,x]=L2(t),[b,M]=fl(),I=useCallback(()=>{a?t&&a():y(!1);},[a,t]),w=k2(h.current,{root:p,rootMargin:p?`0px 0px -${Math.ceil(d*100/(p.getBoundingClientRect().height-M))}% 0px`:void 0}),N={onClick:()=>y(!f),disabled:u};return useEffect(()=>{x||I();},[I,x]),useEffect(()=>{y(t);},[t]),useEffect(()=>{var T;(w==null?void 0:w.isIntersecting)===!1?((T=w.boundingClientRect)==null?void 0:T.top)<0?C(Tn):C(F0):C(n);},[w,n]),R.createElement(vx,{ref:h,className:g},R.createElement(Cx,{ref:b},o(E(c({},N),{"data-qa-anchor":e}))),(t||f)&&R.createElement(yl,null,R.createElement(hl,{position:v,align:i,fullSized:s,scrollable:l,scrollableHeight:d},r)))},$0=QZ;var vl=m(
|
|
812
|
+
`;var xx=200,U0=({parentContainer:e,dropdownRef:t,align:o=B2,scrollableHeight:r=xx,position:n=Tn,buttonContainerHeight:i})=>{let[a,s]=useState(n),l=k2(t.current,{root:e,rootMargin:e?`0px 0px -${Math.ceil(r*100/(e.getBoundingClientRect().height-i))}% 0px`:void 0});return useEffect(()=>{var d;(l==null?void 0:l.isIntersecting)===!1?((d=l.boundingClientRect)==null?void 0:d.top)<0?s(Tn):s(F0):s(n);},[l,n]),{align:o,currentPosition:a,scrollableHeight:r}},ZZ=e=>R.createElement(Y,c({},e),R.createElement(Pn,{height:14,width:14})),QZ=({"data-qa-anchor":e="",isOpen:t,renderTrigger:o=ZZ,children:r,position:n=Tn,align:i=B2,handleClose:a,fullSized:s=!1,scrollable:l=!1,scrollableHeight:d=xx,parentContainer:p=null,disabled:u=!1,className:g=""})=>{let[f,y]=useState(t),[v,C]=useState(n),[h,x]=L2(t),[b,M]=fl(),I=useCallback(()=>{a?t&&a():y(!1);},[a,t]),w=k2(h.current,{root:p,rootMargin:p?`0px 0px -${Math.ceil(d*100/(p.getBoundingClientRect().height-M))}% 0px`:void 0}),N={onClick:()=>y(!f),disabled:u};return useEffect(()=>{x||I();},[I,x]),useEffect(()=>{y(t);},[t]),useEffect(()=>{var T;(w==null?void 0:w.isIntersecting)===!1?((T=w.boundingClientRect)==null?void 0:T.top)<0?C(Tn):C(F0):C(n);},[w,n]),R.createElement(vx,{ref:h,className:g},R.createElement(Cx,{ref:b},o(E(c({},N),{"data-qa-anchor":e}))),(t||f)&&R.createElement(yl,null,R.createElement(hl,{position:v,align:i,fullSized:s,scrollable:l,scrollableHeight:d},r)))},$0=QZ;var vl=m(Sa).attrs({width:16,height:16})`
|
|
813
813
|
cursor: pointer;
|
|
814
814
|
margin-left: auto;
|
|
815
815
|
`,xl=m(He)`
|
|
@@ -1007,7 +1007,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1007
1007
|
background-color: #000;
|
|
1008
1008
|
border: 1px solid #000;
|
|
1009
1009
|
padding: 12px 24px;
|
|
1010
|
-
`,hQ=({commentId:e,canDelete:t=!1,canEdit:o=!1,canReport:r=!0,handleReportComment:n,startEditing:i,handleDelete:a,isReplyComment:s,onClose:l,buttonContainerHeight:d})=>{let{formatMessage:p}=useIntl(),u=Ce(),g=useRef(null),{currentPosition:f,align:y,scrollableHeight:v}=U0({dropdownRef:g,buttonContainerHeight:d}),{isFlaggedByMe:C,toggleFlagComment:h}=Zx(e),x=()=>_(void 0,null,function*(){try{yield h(),n==null||n(),C?u.success({content:p({id:"report.unreportSent"})}):u.success({content:p({id:"report.reportSent"})});}catch(M){M instanceof Error&&u.error({content:M.message});}}),b=[o?{name:s?p({id:"reply.edit"}):Il()?p({id:"comment.editMobile"}):p({id:"comment.edit"}),action:i}:null,r?{name:p(C?{id:"report.undoReport"}:{id:"report.doReport"}),action:x}:null,t?{name:s?p({id:"reply.delete"}):Il()?p({id:"comment.deleteMobile"}):p({id:"comment.delete"}),action:a}:null].filter(Fe);return R.createElement(Mx,{ref:g},R.createElement(yl,null,R.createElement(hl,{position:f,align:y,scrollableHeight:v},b.map(({name:M,action:I})=>R.createElement(bl,{key:M,"data-qa-anchor":`post-options-button-${M}`,onClick:()=>{I==null||I(),l();}},M)))))},CQ=e=>{var $;let {commentId:t,authorName:o,authorAvatar:r,canLike:n=!0,canReply:i=!1,createdAt:a,editedAt:s,text:l,onClickReply:d,handleEdit:p,startEditing:u,cancelEditing:g,isEditing:f,onChange:y,isBanned:v,mentionees:C,metadata:h,onClickUser:x}=e;useIntl();let {isNoNicknameUser:M,isAnonymousUser:I}=Ee(),{openNicknameModal:w}=To(),{triggerAnonymousNeedsLogin:N}=gr(),[T,L]=useState(!1),[D,U]=fl(),Z=useRef(null),B=()=>L(G=>!G);return useEffect(()=>(T?document.addEventListener("click",B):document.removeEventListener("click",B),()=>{document.removeEventListener("click",B);}),[T]),R.createElement(R.Fragment,null,R.createElement(Px,{onClick:x,avatar:r,backgroundImage:Se}),R.createElement(kx,null,R.createElement(pw,{ellipsis:R.createElement("span",null,"...",R.createElement(E6,{date:a==null?void 0:a.getTime()}),((s==null?void 0:s.getTime())||0)-((a==null?void 0:a.getTime())||0)>0&&R.createElement(B6,null,R.createElement(FormattedMessage,{id:"comment.edited"}))),lines:2},R.createElement(Sx,null,R.createElement(Lx,{onClick:x},o),R.createElement(Ax,null,v&&R.createElement(
|
|
1010
|
+
`,hQ=({commentId:e,canDelete:t=!1,canEdit:o=!1,canReport:r=!0,handleReportComment:n,startEditing:i,handleDelete:a,isReplyComment:s,onClose:l,buttonContainerHeight:d})=>{let{formatMessage:p}=useIntl(),u=Ce(),g=useRef(null),{currentPosition:f,align:y,scrollableHeight:v}=U0({dropdownRef:g,buttonContainerHeight:d}),{isFlaggedByMe:C,toggleFlagComment:h}=Zx(e),x=()=>_(void 0,null,function*(){try{yield h(),n==null||n(),C?u.success({content:p({id:"report.unreportSent"})}):u.success({content:p({id:"report.reportSent"})});}catch(M){M instanceof Error&&u.error({content:M.message});}}),b=[o?{name:s?p({id:"reply.edit"}):Il()?p({id:"comment.editMobile"}):p({id:"comment.edit"}),action:i}:null,r?{name:p(C?{id:"report.undoReport"}:{id:"report.doReport"}),action:x}:null,t?{name:s?p({id:"reply.delete"}):Il()?p({id:"comment.deleteMobile"}):p({id:"comment.delete"}),action:a}:null].filter(Fe);return R.createElement(Mx,{ref:g},R.createElement(yl,null,R.createElement(hl,{position:f,align:y,scrollableHeight:v},b.map(({name:M,action:I})=>R.createElement(bl,{key:M,"data-qa-anchor":`post-options-button-${M}`,onClick:()=>{I==null||I(),l();}},M)))))},CQ=e=>{var $;let {commentId:t,authorName:o,authorAvatar:r,canLike:n=!0,canReply:i=!1,createdAt:a,editedAt:s,text:l,onClickReply:d,handleEdit:p,startEditing:u,cancelEditing:g,isEditing:f,onChange:y,isBanned:v,mentionees:C,metadata:h,onClickUser:x}=e;useIntl();let {isNoNicknameUser:M,isAnonymousUser:I}=Ee(),{openNicknameModal:w}=To(),{triggerAnonymousNeedsLogin:N}=gr(),[T,L]=useState(!1),[D,U]=fl(),Z=useRef(null),B=()=>L(G=>!G);return useEffect(()=>(T?document.addEventListener("click",B):document.removeEventListener("click",B),()=>{document.removeEventListener("click",B);}),[T]),R.createElement(R.Fragment,null,R.createElement(Px,{onClick:x,avatar:r,backgroundImage:Se}),R.createElement(kx,null,R.createElement(pw,{ellipsis:R.createElement("span",null,"...",R.createElement(E6,{date:a==null?void 0:a.getTime()}),((s==null?void 0:s.getTime())||0)-((a==null?void 0:a.getTime())||0)>0&&R.createElement(B6,null,R.createElement(FormattedMessage,{id:"comment.edited"}))),lines:2},R.createElement(Sx,null,R.createElement(Lx,{onClick:x},o),R.createElement(Ax,null,v&&R.createElement(Kn,{style:{marginLeft:"0.265rem",marginTop:"1px"}}),R.createElement(E6,{date:a==null?void 0:a.getTime()}),((s==null?void 0:s.getTime())||0)-((a==null?void 0:a.getTime())||0)>0&&R.createElement(B6,null,R.createElement(FormattedMessage,{id:"comment.edited"}))))),f?R.createElement($x,null,R.createElement(jx,{ref:Z},R.createElement(Xn,{placeholder:"Say something nice...",value:{data:{text:l||""},metadata:h||{mentioned:[]},mentionees:($=C||[])==null?void 0:$.map(G=>({type:"user",userIds:G.userId?[G.userId]:[]}))},mentionContainer:Z.current,onChange:({text:G,mentioned:q,mentionees:z})=>{let H=q.map(F=>{var j;return E(c({},F),{userId:(j=F.userId)!=null?j:""})});y==null||y({text:G,mentioned:H,mentionees:z});}})),R.createElement(Vx,null,R.createElement(fQ,{"data-qa-anchor":"comment-cancel-edit-button",onClick:g},R.createElement(FormattedMessage,{id:"cancel"})),R.createElement(yQ,{"data-qa-anchor":"comment-save-edit-button",onClick:()=>p==null?void 0:p(l)},R.createElement(FormattedMessage,{id:"save"})))):R.createElement(F6,{text:l,mentionees:h==null?void 0:h.mentioned}),!f&&(n||i)&&R.createElement(Hx,null,n&&R.createElement(gx,{commentId:t}),i&&R.createElement(Ux,{"data-qa-anchor":"comment-reply-button",onClick:()=>{M?w():I?N():d&&d();}},R.createElement(zx,null)," ",R.createElement(FormattedMessage,{id:"reply"})),R.createElement(wx,null,R.createElement("div",{ref:D},R.createElement(xl,{onClick:G=>{G.stopPropagation(),M?w():I?N():B();}},R.createElement(vl,null))),T&&R.createElement(hQ,E(c({},e),{onClose:B,onEditCommentClick:()=>u(),buttonContainerHeight:U}))))))},qx=CQ;var j0=m.div.attrs(({progress:e})=>({style:{width:`${e||0}%`}}))`
|
|
1011
1011
|
background: ${({lightMode:e,theme:t})=>e?t.palette.primary.main:t.palette.base.shade4};
|
|
1012
1012
|
position: absolute;
|
|
1013
1013
|
left: 0;
|
|
@@ -1026,7 +1026,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1026
1026
|
opacity: 0.75;
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
|
-
`;var xQ="global-admin",{COMMUNITY_MODERATOR:bQ,CHANNEL_MODERATOR:IQ,MODERATOR:wQ,SUPER_MODERATOR:MQ}=
|
|
1029
|
+
`;var xQ="global-admin",{COMMUNITY_MODERATOR:bQ,CHANNEL_MODERATOR:IQ,MODERATOR:wQ,SUPER_MODERATOR:MQ}=Ba,Ws=e=>{if(!(e!=null&&e.length))return !1;let t=[bQ,IQ,wQ,MQ];return e.some(o=>t.includes(o))},Kx=e=>e!=null&&e.length?e.includes(xQ):!1;var PQ=(e,t=!1,o=[])=>{let{currentUserId:r}=J(),n=(e==null?void 0:e.userId)===r,i=!!(e!=null&&e.parentId);return {canDelete:!t&&n||Ws(o),canEdit:!t&&n,canLike:!t,canReply:!t&&!i,canReport:!t&&!n}},G0=PQ;var SQ=5,NQ=()=>R.createElement(Fx,{"data-qa-anchor":"comment-deleted-comment"},R.createElement(A6,null,R.createElement(L6,null)),R.createElement(D6,null,R.createElement(H6,{"data-qa-anchor":"comment-deleted-comment-text"},R.createElement(FormattedMessage,{id:"comment.deleted"})))),EQ=()=>R.createElement("div",null,R.createElement(Ox,{"data-qa-anchor":"reply-deleted-reply"},R.createElement(A6,{className:"reply"},R.createElement(L6,{style:{fill:"#6E6E6E"}})),R.createElement(D6,null,R.createElement(H6,{"data-qa-anchor":"reply-deleted-reply-text",style:{color:"#6E6E6E",borderRadius:"4px"}},R.createElement(FormattedMessage,{id:"reply.deleted"})))));function Jx(e){var t;return e==null?"":typeof e.data=="string"?e.data:((t=e==null?void 0:e.data)==null?void 0:t.text)||""}var BQ=({post:e,comment:t,readonly:o,onInteract:r})=>{var F,j,Q;let{onClickUser:n}=X(),{confirm:i}=Pe(),a=Ce(),s=re(t==null?void 0:t.userId),l=Dt(s==null?void 0:s.avatarFileId),{userRoles:d}=J(),[p,u]=useState(!1),[g,f]=useState(!1),{formatMessage:y}=useIntl(),[v,C]=useState(!1),{canDelete:h,canEdit:x,canLike:b,canReply:M,canReport:I}=G0(t,o,d),[w,N]=useState({text:(j=(F=t==null?void 0:t.data)==null?void 0:F.text)!=null?j:"",mentioned:((Q=t==null?void 0:t.metadata)==null?void 0:Q.mentioned)||[],mentionees:(t==null?void 0:t.mentionees)||[]}),T=k=>{N(V=>E(c({},V),{mentioned:k.mentioned,text:k.text,mentionees:k.mentionees}));};if(useEffect(()=>{var k;t!=null&&N({text:Jx(t),mentioned:((k=t.metadata)==null?void 0:k.mentioned)||[],mentionees:t.mentionees||[]});},[t]),e==null&&t==null)return R.createElement(j0,null);let L=k=>_(void 0,null,function*(){var V;if(!(!(t!=null&&t.referenceType)||!(t!=null&&t.referenceId)))try{let{referenceType:ae,referenceId:oe}=t;yield CommentRepository.createComment({referenceType:ae,referenceId:oe,data:{text:k.text},parentId:t.commentId,metadata:{mentioned:k.mentioned},mentionees:k.mentionees}),u(!1),C(!0);}catch(ae){ae instanceof Error&&(ae.message===uo.CONTAIN_BLOCKED_WORD?a.error({content:R.createElement(FormattedMessage,{id:"notification.error.blockedWord"})}):ae.message===uo.NOT_INCLUDE_WHITELIST_LINK?a.error({content:R.createElement(FormattedMessage,{id:"notification.error.whitelistLink"})}):a.error({content:((V=ae.message.split(":"))==null?void 0:V[1])||ae.message}));}}),D=()=>_(void 0,null,function*(){var k;if(t.commentId)try{yield CommentRepository.updateComment(t.commentId,{data:{text:w.text},metadata:{mentioned:w.mentioned},mentionees:w.mentionees}),f(!1);}catch(V){V instanceof Error&&(V.message===uo.CONTAIN_BLOCKED_WORD?a.error({content:R.createElement(FormattedMessage,{id:"notification.error.blockedWord"})}):V.message===uo.NOT_INCLUDE_WHITELIST_LINK?a.error({content:R.createElement(FormattedMessage,{id:"notification.error.whitelistLink"})}):a.error({content:((k=V.message.split(":"))==null?void 0:k[1])||V.message}));}}),U=()=>_(void 0,null,function*(){return t.commentId&&CommentRepository.deleteComment(t.commentId)}),Z=()=>{u(k=>!k);},B=()=>{f(!0);},$=()=>{var k;N({text:Jx(t),mentioned:((k=t==null?void 0:t.metadata)==null?void 0:k.mentioned)||[],mentionees:(t==null?void 0:t.mentionees)||[]}),f(!1);},G=()=>{r==null||r(t.commentId),D();},q=!!(t!=null&&t.parentId),z=()=>{r==null||r(t.commentId),i({"data-qa-anchor":"delete-comment",title:R.createElement(FormattedMessage,{id:q?"reply.delete":"comment.delete"}),content:R.createElement(FormattedMessage,{id:q?"reply.deleteBody":"comment.deleteBody"}),cancelText:y({id:"comment.deleteConfirmCancelText"}),okText:y({id:"comment.deleteConfirmOkText"}),onOk:U});};if(t==null)return null;if(t!=null&&t.isDeleted)return q?R.createElement(EQ,null):R.createElement(N6,null,R.createElement(NQ,null));let H=()=>{var k;return R.createElement(qx,{commentId:t==null?void 0:t.commentId,authorName:(s==null?void 0:s.displayName)||(s==null?void 0:s.userId)||y({id:"anonymous"}),authorAvatar:l==null?void 0:l.fileUrl,canDelete:h,canEdit:x,canLike:b,canReply:M,canReport:I,isBanned:s==null?void 0:s.isGlobalBanned,createdAt:t!=null&&t.createdAt?new Date(t.createdAt):void 0,editedAt:t!=null&&t.editedAt?new Date(t==null?void 0:t.editedAt):void 0,mentionees:(k=t==null?void 0:t.metadata)==null?void 0:k.mentioned,metadata:t==null?void 0:t.metadata,text:w.text,startEditing:B,cancelEditing:$,handleEdit:G,handleDelete:z,isEditing:g,isReplyComment:q,onClickReply:Z,onChange:T,onClickUser:()=>n(t.userId)})};return q?R.createElement(Tx,{"data-qa-anchor":"reply"},H()):R.createElement(N6,null,R.createElement(_x,{"data-qa-anchor":"comment"},H()),t.children.length>0&&R.createElement(H2,{parentId:t.commentId,referenceType:t.referenceType,referenceId:t.referenceId,readonly:o,isExpanded:v,limit:SQ}),p&&R.createElement(Ha,{postId:e==null?void 0:e.postId,userToReply:s==null?void 0:s.displayName,onSubmit:(k,V,ae)=>{var oe;r==null||r(t.commentId),L({text:k,mentionees:V!=null?V:[],mentioned:(oe=ae.mentioned)!=null?oe:[]});}}))},Xx=memo(e=>{let t=W("Comment");return t?t(e):R.createElement(BQ,c({},e))});var U6=m(a4).attrs({height:"16px",width:"16px"})``,$6=m.div`
|
|
1030
1030
|
display: flex;
|
|
1031
1031
|
margin-right: 4px;
|
|
1032
1032
|
`,Yx=m.div`
|
|
@@ -1310,7 +1310,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1310
1310
|
&:hover {
|
|
1311
1311
|
color: ${({theme:e})=>e.palette.neutral.shade4};
|
|
1312
1312
|
}
|
|
1313
|
-
`,Y6=e=>R.createElement(X6,c({rel:"left"},e),R.createElement(zr,{height:"24px"})),R6=e=>R.createElement(X6,c({rel:"right"},e),R.createElement(
|
|
1313
|
+
`,Y6=e=>R.createElement(X6,c({rel:"left"},e),R.createElement(zr,{height:"24px"})),R6=e=>R.createElement(X6,c({rel:"right"},e),R.createElement(Fi,{height:"24px"})),CW=e=>R.createElement(X6,c({rel:"close"},e),R.createElement(Gt,{height:"20px"})),e7=m(CW)`
|
|
1314
1314
|
background: rgba(0, 0, 0, 0.3);
|
|
1315
1315
|
height: 43px;
|
|
1316
1316
|
width: 43px;
|
|
@@ -1375,7 +1375,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1375
1375
|
background: ${({theme:e})=>e.palette.tertiary.main};
|
|
1376
1376
|
border-radius: 0.25rem;
|
|
1377
1377
|
color: #fff;
|
|
1378
|
-
`;var
|
|
1378
|
+
`;var Vi=m.div`
|
|
1379
1379
|
position: relative;
|
|
1380
1380
|
display: inline-block;
|
|
1381
1381
|
min-width: 2em;
|
|
@@ -1433,7 +1433,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1433
1433
|
position: absolute;
|
|
1434
1434
|
top: 1rem;
|
|
1435
1435
|
left: 1rem;
|
|
1436
|
-
`;var $W=({url:e,progress:t=-1,mediaFit:o,noBorder:r,onRemove:n,isRejected:i,onRetry:a,mimeType:s,autoPlay:l,isLive:d})=>{let p=useCallback(y=>{y.preventDefault(),y.stopPropagation(),n&&n();},[n]),u=useCallback(y=>{y.preventDefault(),y.stopPropagation(),a&&a();},[a]),[g,f]=useState(null);return useEffect(()=>{if(!(!g||!e||!e.includes("m3u8"))&&!(g!=null&&g.canPlayType("application/vnd.apple.mpegurl"))&&$2.isSupported()){let y=new $2;return y.loadSource(e),y.attachMedia(g),y.on($2.Events.ERROR,(v,C)=>{if(C.fatal)switch(C.type){case $2.ErrorTypes.NETWORK_ERROR:y.startLoad();break;case $2.ErrorTypes.MEDIA_ERROR:y.recoverMediaError();break;}}),()=>y.destroy()}},[g,d,e]),R.createElement(
|
|
1436
|
+
`;var $W=({url:e,progress:t=-1,mediaFit:o,noBorder:r,onRemove:n,isRejected:i,onRetry:a,mimeType:s,autoPlay:l,isLive:d})=>{let p=useCallback(y=>{y.preventDefault(),y.stopPropagation(),n&&n();},[n]),u=useCallback(y=>{y.preventDefault(),y.stopPropagation(),a&&a();},[a]),[g,f]=useState(null);return useEffect(()=>{if(!(!g||!e||!e.includes("m3u8"))&&!(g!=null&&g.canPlayType("application/vnd.apple.mpegurl"))&&$2.isSupported()){let y=new $2;return y.loadSource(e),y.attachMedia(g),y.on($2.Events.ERROR,(v,C)=>{if(C.fatal)switch(C.type){case $2.ErrorTypes.NETWORK_ERROR:y.startLoad();break;case $2.ErrorTypes.MEDIA_ERROR:y.recoverMediaError();break;}}),()=>y.destroy()}},[g,d,e]),R.createElement(Vi,{border:!r},R.createElement(_b,null,e?R.createElement(kb,{key:e,ref:y=>f(y),className:i?"darken":void 0,mediaFit:o,mimeType:s,src:e,autoPlay:l}):R.createElement(Sb,null),R.createElement(Bb,null,d&&R.createElement(Lb,null),!!i&&R.createElement(Eb,{onClick:u}),!!n&&R.createElement(Nb,{onClick:p}))),!Number.isNaN(t)&&R.createElement(Pl,{progress:(t||0)*100}))},_l=$W;var jW=o=>{var r=o,{file:e}=r,t=P(r,["file"]);if(e==null)return null;let n=URL.createObjectURL(e);return R.createElement(_l,c({url:n},t))},Db=jW;var ZW=o=>{var r=o,{fileId:e}=r,t=P(r,["fileId"]);let n=Dt(e);if(n==null)return null;let i=(()=>{if(n.status===_0.Transcoded){let{videoUrl:a}=n;return (a==null?void 0:a["1080p"])||(a==null?void 0:a["720p"])||(a==null?void 0:a["480p"])||(a==null?void 0:a["360p"])||(a==null?void 0:a.original)||n.fileUrl}return n.fileUrl})();return R.createElement(_l,c({url:i,mimeType:ev},t))},Hb=ZW;function Gi(e){return "fileId"in e?R.createElement(Hb,c({},e)):"file"in e?R.createElement(Db,c({},e)):null}var Ub=m(Y).attrs({variant:"secondary",children:R.createElement(Gt,null)})`
|
|
1437
1437
|
position: absolute;
|
|
1438
1438
|
top: 0.5em;
|
|
1439
1439
|
right: 0.5em;
|
|
@@ -1492,7 +1492,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1492
1492
|
transform: translateY(-50%);
|
|
1493
1493
|
color: #fff;
|
|
1494
1494
|
}
|
|
1495
|
-
`,$b=({children:e,className:t,onRemove:o})=>R.createElement(
|
|
1495
|
+
`,$b=({children:e,className:t,onRemove:o})=>R.createElement(Vi,{className:t},R.createElement($a,null,e),R.createElement(U2,null,!!o&&R.createElement(Ub,{onClick:r=>{r.preventDefault(),r.stopPropagation(),o();}})));var qs=({item:e,showPlayIcon:t,showVideoDuration:o})=>R.createElement(rp,{fileId:e==null?void 0:e.data.thumbnailFileId,showPlayIcon:t,videoFileId:o&&(e==null?void 0:e.data.videoFileId.original)}),r7=({item:e})=>{let t=(e==null?void 0:e.data.videoFileId.high)||(e==null?void 0:e.data.videoFileId.medium)||(e==null?void 0:e.data.videoFileId.low)||(e==null?void 0:e.data.videoFileId.original);return t?R.createElement(Gi,{fileId:t,mediaFit:"contain",noBorder:!0}):R.createElement(Vi,null,R.createElement(j2,null,R.createElement($a,null,R.createElement(FormattedMessage,{id:"video.notReady"}))))};var oq=e=>{let[t,o]=useState(null);return useEffect(()=>{function r(){return _(this,null,function*(){if(e==null)return;let n=yield StreamRepository.getStream(e);o(n.data);})}r();},[e]),t},G2=oq;var jb=m(Zt)`
|
|
1496
1496
|
&& {
|
|
1497
1497
|
font-size: 24px;
|
|
1498
1498
|
}
|
|
@@ -1533,7 +1533,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1533
1533
|
background: rgba(0, 0, 0, 0.7);
|
|
1534
1534
|
border-radius: 0.25rem;
|
|
1535
1535
|
color: #fff;
|
|
1536
|
-
`,Rb=()=>R.createElement(
|
|
1536
|
+
`,Rb=()=>R.createElement(Vi,null,R.createElement(j2,null,R.createElement($a,null,R.createElement(jb,null),R.createElement(Qb,null,R.createElement(FormattedMessage,{id:"liveStream.idle"}))))),eI=()=>R.createElement(Vi,null,R.createElement(j2,null,R.createElement($a,null,R.createElement(qb,null,R.createElement(FormattedMessage,{id:"liveStream.ended.caption"})),R.createElement(Kb,null,R.createElement(FormattedMessage,{id:"liveStream.ended.message"})))));function aq(e){var t,o,r,n;if(e.status==="live")return (o=(t=e.watcherUrl)==null?void 0:t.hls)==null?void 0:o.url;if(e.status==="recorded")return (n=(r=e==null?void 0:e.recordings)==null?void 0:r.find(i=>i.mp4))==null?void 0:n.mp4.url}var Ks=({item:e,showPlayIcon:t,showLivestreamRecordedBadge:o,showLivestreamTitle:r})=>{var s;let n=G2(e==null?void 0:e.data.streamId),i=Dt(n==null?void 0:n.thumbnailFileId);if(n==null)return null;if(n.status==="idle"||n.isDeleted)return R.createElement(Wb,null);if(n.status==="ended")return R.createElement(Jb,null);let a=(s=n.recordings.find(l=>l.mp4))==null?void 0:s.mp4;return R.createElement(Xb,{duration:a==null?void 0:a.duration,fileId:i==null?void 0:i.fileId,overlayElements:R.createElement(Gb,null,n.status==="live"&&R.createElement(op,null),o&&n.status==="recorded"&&R.createElement(Yb,null),r&&n.title&&R.createElement(Zb,null,n.title)),showPlayIcon:t})},n7=({item:e})=>{var o;let t=G2((o=e==null?void 0:e.data)==null?void 0:o.streamId);return t==null?null:t.status==="idle"||t.isDeleted?R.createElement(Rb,null):t.status==="ended"?R.createElement(eI,null):R.createElement(_l,{isLive:t.status==="live",mediaFit:"contain",noBorder:!0,url:aq(t)})};function Rn(e){return !!e.skeleton}var np=(e,t)=>e&&t?e.hasPermission(dr.ManageStoryPermission).community(t):!1;var oI=e=>e.path.split("/user/")[0];var rI=e=>`${oI(e)}/membership/${e._id}/+/+`,nI=e=>`${oI(e)}/membership/+/${e._id}/+`;var mq=({loading:e,loadingMore:t,items:o})=>{let[r,n]=useState(null);return {newItems:useMemo(()=>e?new Array(6).fill({skeleton:!0}):t?[...o||[],...new Array(6).fill({skeleton:!0})]:o,[o,e,t]),index:r,setIndex:n}},cq=({className:e,items:t=[],loading:o=!1,loadingMore:r=!1,showCounter:n=!1,truncate:i=!1,grid:a=!1,renderVideoItem:s,renderImageItem:l,renderLiveStreamItem:d,renderVideoThumbnail:p,renderImageThumbnail:u,renderLiveStreamThumbnail:g})=>{let{newItems:f,index:y,setIndex:v}=mq({loading:o,loadingMore:r,items:t}),C=x=>{switch(x.dataType){case"image":return u?u(x):R.createElement(t7,{item:x});case"video":return p?p(x):R.createElement(qs,{item:x});case"liveStream":return g?g(x):R.createElement(Ks,{item:x});default:return null}};return R.createElement(R.Fragment,null,R.createElement(Oa,{className:e,items:t,truncate:i,grid:a,onClick:x=>{Rn(t[x])||v(x);},renderItem:x=>x.skeleton?R.createElement(ep,null):C(x)}),y!==null&&R.createElement(fb,{index:y,items:f,showCounter:n,onChange:x=>v(x),renderItem:x=>{switch(x.dataType){case"image":return l?l(x):R.createElement(o7,{item:x});case"video":return s?s(x):R.createElement(r7,{item:x});case"liveStream":return d?d(x):R.createElement(n7,{item:x});default:return null}}}))},Js=cq;var iI={aac:b2,avi:C4,csv:v4,doc:b4,exe:I4,gif:X1,html:w4,jpg:X1,mov:M4,mp3:P4,mp4:_4,mpeg:a0,ogg:b2,pdf:T4,ppt:s0,pptx:s0,ppx:N4,png:X1,rar:E4,txt:B4,xls:l0,xlsx:l0,zip:L4,audio:b2,image:X1,video:a0},pq={pptx:["openxmlformats-officedocument.presentationml"],xlsx:["openxmlformats-officedocument.spreadsheetml.sheet"]},uq=o=>{var r=o,{file:e}=r,t=P(r,["file"]);let{name:n,type:i}=e,a=i.toLowerCase(),s=Object.entries(pq).find(([,p])=>p.find(u=>a.includes(u))),l=s?s[0]:n.slice(n.lastIndexOf(".")+1),d=l in iI?iI[l]:x4;return R.createElement(d,c({},t))},aI=uq;var sI=m.a`
|
|
1537
1537
|
display: block;
|
|
1538
1538
|
position: relative;
|
|
1539
1539
|
border: 1px solid ${({theme:e})=>e.palette.base.shade4};
|
|
@@ -1578,7 +1578,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1578
1578
|
z-index: 2;
|
|
1579
1579
|
`,gI=e=>R.createElement(Y,E(c({},e),{variant:"secondary"}),R.createElement(yq,{width:14,height:14})),fI=m.div`
|
|
1580
1580
|
display: flex;
|
|
1581
|
-
`;var vq=({"data-qa-anchor":e="",name:t,url:o,type:r,size:n,progress:i=-1,onRemove:a,isRejected:s,onRetry:l})=>{useIntl();let p=useCallback(y=>{y.preventDefault(),y.stopPropagation(),a&&a();},[a]),u=useCallback(y=>{y.preventDefault(),y.stopPropagation(),l&&l();},[l]),g=r==null?void 0:r.includes("image"),f=i<100;return R.createElement(sI,{href:o,download:!0,"data-qa-anchor":e},R.createElement(lI,null,g&&o?R.createElement(mI,{src:o}):R.createElement(cI,{file:{name:t,type:r},width:null,height:"100%"}),R.createElement(pI,null,t)," ",R.createElement(uI,null,hq(n||0,{base:2})),R.createElement(fI,null,!!s&&R.createElement(dI,{onClick:u}),!!a&&R.createElement(gI,{"data-qa-anchor":"uploaders-file-remove-button",onClick:p,disabled:i!==-1&&f}))),!Number.isNaN(i)&&R.createElement(Pl,{progress:(i||0)*100}))},ip=vq;var bq=({"data-qa-anchor":e="",file:t,progress:o=-1,onRemove:r,isRejected:n,retry:i=()=>{}})=>{if(t==null)return null;let a=t.type.includes("image")?URL.createObjectURL(t):void 0;return R.createElement(ip,{"data-qa-anchor":e,name:t.name,size:t.size,type:t.type,url:a,progress:o,isRejected:n,onRemove:r,onRetry:()=>i()})},hI=bq;var Mq=({"data-qa-anchor":e="",fileId:t,onRemove:o})=>{let r=Dt(t);if(!r)return null;let n=FileRepository.fileUrlWithSize(r==null?void 0:r.fileUrl,"small");return R.createElement(ip,{"data-qa-anchor":e,name:r.attributes.name,size:isNaN(Number(r.attributes.size))?0:Number(r.attributes.size),type:r.attributes.mimeType,url:n,onRemove:o})},CI=Mq;function
|
|
1581
|
+
`;var vq=({"data-qa-anchor":e="",name:t,url:o,type:r,size:n,progress:i=-1,onRemove:a,isRejected:s,onRetry:l})=>{useIntl();let p=useCallback(y=>{y.preventDefault(),y.stopPropagation(),a&&a();},[a]),u=useCallback(y=>{y.preventDefault(),y.stopPropagation(),l&&l();},[l]),g=r==null?void 0:r.includes("image"),f=i<100;return R.createElement(sI,{href:o,download:!0,"data-qa-anchor":e},R.createElement(lI,null,g&&o?R.createElement(mI,{src:o}):R.createElement(cI,{file:{name:t,type:r},width:null,height:"100%"}),R.createElement(pI,null,t)," ",R.createElement(uI,null,hq(n||0,{base:2})),R.createElement(fI,null,!!s&&R.createElement(dI,{onClick:u}),!!a&&R.createElement(gI,{"data-qa-anchor":"uploaders-file-remove-button",onClick:p,disabled:i!==-1&&f}))),!Number.isNaN(i)&&R.createElement(Pl,{progress:(i||0)*100}))},ip=vq;var bq=({"data-qa-anchor":e="",file:t,progress:o=-1,onRemove:r,isRejected:n,retry:i=()=>{}})=>{if(t==null)return null;let a=t.type.includes("image")?URL.createObjectURL(t):void 0;return R.createElement(ip,{"data-qa-anchor":e,name:t.name,size:t.size,type:t.type,url:a,progress:o,isRejected:n,onRemove:r,onRetry:()=>i()})},hI=bq;var Mq=({"data-qa-anchor":e="",fileId:t,onRemove:o})=>{let r=Dt(t);if(!r)return null;let n=FileRepository.fileUrlWithSize(r==null?void 0:r.fileUrl,"small");return R.createElement(ip,{"data-qa-anchor":e,name:r.attributes.name,size:isNaN(Number(r.attributes.size))?0:Number(r.attributes.size),type:r.attributes.mimeType,url:n,onRemove:o})},CI=Mq;function Zi(e){return "fileId"in e?R.createElement(CI,c({},e)):"file"in e?R.createElement(hI,c({},e)):null}var Tq=5,kq=e=>R.createElement(Y,{onClick:e},R.createElement(FormattedMessage,{id:"collapsible.viewAll"})),Sq=({items:e=[],onExpand:t=()=>{},visibleAmount:o=Tq,renderTrigger:r=kq,renderItem:n})=>{let i=o<e.length?e.slice(0,o):e,[a,s]=useState(o>=e.length),l=()=>{s(!0),t();};return a?R.createElement(R.Fragment,null,e.map(d=>n(d))):R.createElement(R.Fragment,null,i.map(d=>n(d)),r(l))},xI=Sq;var Eq=m.div`
|
|
1582
1582
|
display: grid;
|
|
1583
1583
|
grid-template-columns: 100%;
|
|
1584
1584
|
grid-gap: 0.5rem;
|
|
@@ -1595,7 +1595,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1595
1595
|
cursor: pointer;
|
|
1596
1596
|
color: ${({theme:e})=>e.palette.highlight.main};
|
|
1597
1597
|
}
|
|
1598
|
-
`,Lq=e=>R.createElement(Bq,{onClick:e},R.createElement(FormattedMessage,{id:"collapsible.viewAllFiles"})),Aq=({items:e})=>R.createElement(Eq,{"data-qa-anchor":"post-file-list-content"},R.createElement(xI,{items:e,renderTrigger:Lq,renderItem:t=>R.createElement(
|
|
1598
|
+
`,Lq=e=>R.createElement(Bq,{onClick:e},R.createElement(FormattedMessage,{id:"collapsible.viewAllFiles"})),Aq=({items:e})=>R.createElement(Eq,{"data-qa-anchor":"post-file-list-content"},R.createElement(xI,{items:e,renderTrigger:Lq,renderItem:t=>R.createElement(Zi,{key:t.data.fileId,"item-qa-anchor":"post-file-item",fileId:t.data.fileId})})),bI=Aq;var II=m.div`
|
|
1599
1599
|
padding: 14px 0;
|
|
1600
1600
|
border-radius: 4px;
|
|
1601
1601
|
border: 1px solid
|
|
@@ -1736,11 +1736,11 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1736
1736
|
font: inherit;
|
|
1737
1737
|
`,Jq=({text:e,placeholder:t,onChange:o,queryMentionees:r})=>R.createElement(qq,null,R.createElement(Kq,{"data-qa-anchor":"post-editor-textarea",placeholder:t,value:e,multiline:!0,mentionAllowed:!0,queryMentionees:r,onChange:o})),OI=Jq;var Xq=({items:e,onRemove:t})=>R.createElement(Oa,{items:e,renderItem:o=>{var r;return R.createElement(Ht,{fileId:(r=o==null?void 0:o.data)==null?void 0:r.fileId,onRemove:()=>t(o.postId)})}}),UI=Xq;var eK=m($b)`
|
|
1738
1738
|
background: #ebecef;
|
|
1739
|
-
`,tK=({items:e,onRemove:t})=>{let[o,r]=useState(void 0);return R.createElement(Oa,{itemKey:"postId",items:e,onClick:n=>r(e[n].postId),renderItem:n=>{if(o===n.postId){let i=n.data.videoFileId.high||n.data.videoFileId.medium||n.data.videoFileId.low||n.data.videoFileId.original;return i?R.createElement(
|
|
1739
|
+
`,tK=({items:e,onRemove:t})=>{let[o,r]=useState(void 0);return R.createElement(Oa,{itemKey:"postId",items:e,onClick:n=>r(e[n].postId),renderItem:n=>{if(o===n.postId){let i=n.data.videoFileId.high||n.data.videoFileId.medium||n.data.videoFileId.low||n.data.videoFileId.original;return i?R.createElement(Gi,{key:n.data.videoFileId.original,fileId:i,mediaFit:"cover",noBorder:!0,autoPlay:!0,onRemove:()=>t(n.postId)}):R.createElement(eK,{onRemove:()=>t(n.postId)},R.createElement(FormattedMessage,{id:"video.notReady"}))}return R.createElement(rp,{key:n.data.thumbnailFileId,fileId:n.data.thumbnailFileId,onRemove:()=>t(n.postId)})}})},$I=tK;var oK=m.div`
|
|
1740
1740
|
& > * {
|
|
1741
1741
|
margin-bottom: 12px;
|
|
1742
1742
|
}
|
|
1743
|
-
`,rK=({items:e,onRemove:t})=>R.createElement(oK,null,e.map(o=>{var r;return R.createElement(
|
|
1743
|
+
`,rK=({items:e,onRemove:t})=>R.createElement(oK,null,e.map(o=>{var r;return R.createElement(Zi,{key:o.postId,fileId:(r=o==null?void 0:o.data)==null?void 0:r.fileId,onRemove:()=>t(o.postId)})})),jI=rK;var GI=["text"];function iK(e){return GI.includes(e.dataType)}function aK(e){return Array.isArray(e.data)}var sK=e=>{if(e.data==null)return null;if(aK(e)){let s=e,{onRemoveChild:p,dataType:u,data:g}=s,f=P(s,["onRemoveChild","dataType","data"]);switch(u){case"image":return R.createElement(UI,c({items:g,onRemove:p},f));case"video":return R.createElement($I,c({items:g,onRemove:p},f));case"file":return R.createElement(jI,c({items:g,onRemove:p},f));default:return null}}if(iK(e)){let l=e,{placeholder:p,onChangeText:u,dataType:g,data:f}=l,y=P(l,["placeholder","onChangeText","dataType","data"]);return R.createElement(OI,c({text:f,placeholder:p||void 0,onChange:v=>u==null?void 0:u(v)},y))}let d=e,{placeholder:t,onChangeText:o,dataType:r,onRemoveChild:n,data:i}=d,a=P(d,["placeholder","onChangeText","dataType","onRemoveChild","data"]);switch(r){case"image":return R.createElement(Ht,c({},a));case"video":return R.createElement(Gi,c({},a));case"file":return R.createElement(Zi,c({},a));default:return null}},lp=sK;var ZI=m.div`
|
|
1744
1744
|
padding: 0;
|
|
1745
1745
|
border: none;
|
|
1746
1746
|
display: flex;
|
|
@@ -1772,7 +1772,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1772
1772
|
padding: 12px 24px;
|
|
1773
1773
|
margin-left: auto;
|
|
1774
1774
|
border-radius: 100px;
|
|
1775
|
-
`;var dK=e=>{let[t,o]=useState([]);return useEffect(()=>{function r(){return _(this,null,function*(){if(!e||(e==null?void 0:e.length)===0)o([]);else {let n=yield Promise.all(e.map(i=>new Promise(a=>{PostRepository.getPost(i,s=>{a(s.data);});})));o(n);}})}r();},[e]),t},Va=dK;var JI=({postId:e,onSave:t})=>{var w,N;let o=
|
|
1775
|
+
`;var dK=e=>{let[t,o]=useState([]);return useEffect(()=>{function r(){return _(this,null,function*(){if(!e||(e==null?void 0:e.length)===0)o([]);else {let n=yield Promise.all(e.map(i=>new Promise(a=>{PostRepository.getPost(i,s=>{a(s.data);});})));o(n);}})}r();},[e]),t},Va=dK;var JI=({postId:e,onSave:t})=>{var w,N;let o=qn(e),r=Va(o==null?void 0:o.children),{text:n,markup:i,mentions:a,mentionees:s,metadata:l,clearAll:d,onChange:p,queryMentionees:u}=wl({targetId:o==null?void 0:o.targetId,targetType:o==null?void 0:o.targetType,remoteText:typeof(o==null?void 0:o.data)=="string"?o==null?void 0:o.data:(w=o==null?void 0:o.data)==null?void 0:w.text,remoteMarkup:HC(typeof(o==null?void 0:o.data)=="string"?o==null?void 0:o.data:(N=o==null?void 0:o.data)==null?void 0:N.text,o==null?void 0:o.metadata)}),[g,f]=useState([]),y=useMemo(()=>r.filter(T=>!g.includes(T.postId)),[r,g]),v=T=>{f(L=>[...L,T]);},C=T=>{if(T.dataType==="file"||T.dataType==="image")return {type:T.dataType,fileId:T.data.fileId};if(T.dataType==="video")return {type:T.dataType,fileId:T.data.videoFileId.original}},h=()=>_(void 0,null,function*(){yield PostRepository.updatePost(o.postId,{data:{text:n},mentionees:s,metadata:l,attachments:y.map(C).filter(Fe)}),d(),t();}),x=(n==null?void 0:n.trim())===""&&!y.length,b=useMemo(()=>y.filter(T=>T.dataType==="file"),[y]),M=useMemo(()=>y.filter(T=>T.dataType==="image"),[y]),I=useMemo(()=>y.filter(T=>T.dataType==="video"),[y]);return {text:n,markup:i,mentions:a,post:o,childrenPosts:y,clearAll:d,onChange:p,queryMentionees:u,childVideoPosts:I,childFilePosts:b,childImagePosts:M,handleRemoveChild:v,isEmpty:x,handleSave:h,formattedAttachment:C}};var Qi={editorPlaceholder:"Ua",editorParagraph:"Ba",editorContainer:"V",editorRoot:"Da",editorLink:"q",postTextField__mentionInterceptor:"Ha",postTextField__mentionContainerDesktop:"G",postTextField__mentionMenuItem:"La",postTextField__mentionMenu:"J"};var BK=e=>{let[t,o]=useState(null),{community:r,isLoading:n}=Pt({communityId:e}),i=useMemo(()=>!!e&&!n&&!(r!=null&&r.isPublic),[e,n,r]),{members:a,hasMore:s,isLoading:l,loadMore:d}=B0({communityId:e||"",displayName:t||"",limit:10,enabled:i}),{users:p,hasMore:u,loadMore:g,isLoading:f}=cl({displayName:t||"",limit:10,enabled:!i}),y=b=>{o(b);},v=useMemo(()=>e&&n?[]:i?a.map(({user:b,userId:M})=>({userId:(b==null?void 0:b.userId)||M,displayName:b==null?void 0:b.displayName})):p.map(({displayName:b,userId:M})=>({userId:M,displayName:b})),[p,a,i,n]),C=useMemo(()=>i?s:u,[i,s,u]),h=()=>{x||!C||(i?d():g());},x=useMemo(()=>i?l:f,[l,f,i]);return {suggestions:v,queryString:t,onQueryChange:y,loadMore:h,hasMore:C,isLoading:x}},LK=[AutoLinkNode,LinkNode,Ui],Wi=({editorRef:e,onChange:t,communityId:o,mentionContainer:r,dataValue:n,placeholder:i})=>{let[a,s]=useState(null),l=useMedia("(min-width: 768px)"),d=al({namespace:"PostTextField",theme:{link:Qi.editorLink,placeholder:Qi.editorPlaceholder,paragraph:Qi.editorParagraph},nodes:LK}),{onQueryChange:p,suggestions:u,isLoading:g,loadMore:f}=BK(o);So({onIntersect:()=>{g===!1&&f();},node:a,options:{threshold:.7}});let y=useMedia("(min-width: 768px)"),{refs:v,floatingStyles:C}=useFloating({placement:y?"bottom-start":"bottom",middleware:[offset(({rects:h,placement:x})=>y?x.includes("top")?h.reference.height*1.1:-h.reference.height:0),flip(),shift()],whileElementsMounted:autoUpdate});return R.createElement(R.Fragment,null,R.createElement(LexicalComposer,{initialConfig:c(c({},d),n!=null&&n.data.text?{editorState:JSON.stringify(nl(n))}:{})},R.createElement("div",{className:Qi.editorContainer},R.createElement(RichTextPlugin,{contentEditable:R.createElement(ContentEditable,null),placeholder:i?R.createElement("span",{className:Qi.editorPlaceholder},i):null,ErrorBoundary:LexicalErrorBoundary}),R.createElement(OnChangePlugin,{onChange:(h,x)=>{t(il(x));}}),e?R.createElement(EditorRefPlugin,{editorRef:e}):null,R.createElement(ClearEditorPlugin,null),R.createElement(HistoryPlugin,null),R.createElement(AutoFocusPlugin,null),R.createElement(ll,null),R.createElement(sl,null),R.createElement(ml,{suggestions:u,getSuggestionId:h=>h.userId,onQueryChange:p,$createNode:h=>La({text:`@${(h==null?void 0:h.displayName)||""}`,data:h}),onOpen:h=>{v.setReference({getBoundingClientRect:h.getRect});},onClose:()=>{v.setReference(null);},menuRenderFn:(h,{options:x,selectedIndex:b,setHighlightedIndex:M,selectOptionAndCleanUp:I})=>!r||x.length===0?null:l&&h.current?(v.setReference(h.current),Rv.createPortal(R.createElement("div",{ref:w=>v.setFloating(w),className:Qi.postTextField__mentionContainerDesktop,style:c({},C)},R.createElement("ul",{className:Qi.postTextField__mentionMenuItem},x.map((w,N)=>R.createElement(Da,{isSelected:b===N,onClick:()=>{M(N),I(w);},onMouseEnter:()=>{M(N);},key:w.key,option:E(c({},w),{setRefElement:T=>{N===x.length-1&&s(T),w.setRefElement(T);}})})))),h.current)):(v.setReference(r),Rv.createPortal(R.createElement("div",{ref:w=>v.setFloating(w),className:Qi.postTextField__mentionMenu,style:c({},C)},x.map((w,N)=>R.createElement(Da,{isSelected:b===N,onClick:()=>{M(N),I(w);},onMouseEnter:()=>{M(N);},key:w.key,option:E(c({},w),{setRefElement:T=>{N===x.length-1&&s(T),w.setRefElement(T);}})}))),r)),commandPriority:COMMAND_PRIORITY_HIGH}))))};var OK=({postId:e,placeholder:t="What's going on...",className:o,onSave:r,onChangeText:n,hasChanged:i=!1})=>{var Z,B,$,G,q;let{post:a,markup:s,onChange:l,childVideoPosts:d,childFilePosts:p,childImagePosts:u,childrenPosts:g,handleRemoveChild:f,isEmpty:y,handleSave:v,formattedAttachment:C}=JI({postId:e,onSave:r}),h=useRef(null),[x,b]=useState(null),M=useRef(null),I=Ce(),[w,N]=useState(!1),[T,L]=useState({text:(B=(Z=a==null?void 0:a.data)==null?void 0:Z.text)!=null?B:"",mentioned:(($=a==null?void 0:a.metadata)==null?void 0:$.mentioned)||[],mentionees:a==null?void 0:a.mentionees}),D=useCallback(()=>_(void 0,null,function*(){var z,H,F;N(!0);try{let j={data:{text:T.text},metadata:{mentioned:(z=T.mentioned)!=null?z:[]},mentionees:(H=T.mentionees)!=null?H:[],attachments:g.map(Q=>C(Q)).filter(Fe)};yield PostRepository.updatePost(a.postId,j),r();}catch(j){j instanceof Error&&(j.message===uo.CONTAIN_BLOCKED_WORD?I.error({content:R.createElement(FormattedMessage,{id:"notification.error.blockedWord"})}):j.message===uo.NOT_INCLUDE_WHITELIST_LINK?I.error({content:R.createElement(FormattedMessage,{id:"notification.error.whitelistLink"})}):I.error({content:((F=j.message.split(":"))==null?void 0:F[1])||j.message}));}finally{N(!1);}}),[T,p]),U=z=>{n(),L(H=>E(c({},H),{mentioned:z.mentioned,text:z.text,mentionees:z.mentionees}));};return useEffect(()=>{let z=new ResizeObserver(H=>{for(let F of H)F.target===h.current&&b(F.contentRect.height);});return h.current&&z.observe(h.current),()=>{h.current&&z.unobserve(h.current);}},[u,d,p]),a==null?null:R.createElement(ZI,{className:o},R.createElement(QI,{ref:h},R.createElement(Wi,{communityId:a.targetType==="community"?a.targetId:void 0,onChange:U,mentionContainer:h.current,dataValue:{data:{text:(G=a==null?void 0:a.data)==null?void 0:G.text},metadata:{mentioned:((q=a==null?void 0:a.metadata)==null?void 0:q.mentioned)||[]},mentionees:a==null?void 0:a.mentionees}}),g?R.createElement("div",null,u.length>0&&R.createElement(lp,{data:u,dataType:"image",onRemoveChild:f}),d.length>0&&R.createElement(lp,{data:d,dataType:"video",onRemoveChild:f}),p.length>0&&R.createElement(lp,{data:p,dataType:"file",onRemoveChild:f})):null),R.createElement(WI,{ref:M,contentContainerHeight:x}),R.createElement(qI,null,R.createElement(KI,{"data-qa-anchor":"post-editor-save-button",disabled:y||!i||w,onClick:D},R.createElement(FormattedMessage,{id:"save"}))))},tw=memo(OK);var ow=m.div`
|
|
1776
1776
|
display: flex;
|
|
1777
1777
|
align-items: center;
|
|
1778
1778
|
width: 100%;
|
|
@@ -1838,7 +1838,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1838
1838
|
> :not(:first-child) {
|
|
1839
1839
|
margin-left: 0.25rem;
|
|
1840
1840
|
}
|
|
1841
|
-
`;var zK=({avatarFileUrl:e,postAuthorName:t,postTargetName:o,timeAgo:r,isModerator:n,isEdited:i,onClickCommunity:a,onClickUser:s,hidePostTarget:l,loading:d,isBanned:p})=>{let u=W("UIPostHeader");if(u)return u({avatarFileUrl:e,postAuthorName:t,postTargetName:o,timeAgo:r,isModerator:n,isEdited:i,onClickCommunity:a,onClickUser:s,hidePostTarget:l,loading:d,isBanned:p});let g=()=>R.createElement(mw,{"data-qa-anchor":"post-header-post-names"},R.createElement(pw,{lines:1},R.createElement(l7,{"data-qa-anchor":"post-header-post-name",className:cr({clickable:!!s}),onClick:s,isShowTarget:o&&!l},t)),p&&R.createElement(
|
|
1841
|
+
`;var zK=({avatarFileUrl:e,postAuthorName:t,postTargetName:o,timeAgo:r,isModerator:n,isEdited:i,onClickCommunity:a,onClickUser:s,hidePostTarget:l,loading:d,isBanned:p})=>{let u=W("UIPostHeader");if(u)return u({avatarFileUrl:e,postAuthorName:t,postTargetName:o,timeAgo:r,isModerator:n,isEdited:i,onClickCommunity:a,onClickUser:s,hidePostTarget:l,loading:d,isBanned:p});let g=()=>R.createElement(mw,{"data-qa-anchor":"post-header-post-names"},R.createElement(pw,{lines:1},R.createElement(l7,{"data-qa-anchor":"post-header-post-name",className:cr({clickable:!!s}),onClick:s,isShowTarget:o&&!l},t)),p&&R.createElement(Kn,null),o&&!l&&R.createElement(R.Fragment,null,R.createElement(iw,null),R.createElement(pw,{lines:1},R.createElement(nw,{"data-qa-anchor":"post-header-post-target-name",className:cr({clickable:!!a}),onClick:a||void 0},o)))),f=()=>R.createElement(lw,{"data-qa-anchor":"post-header-additional-info",showTime:!!r},n&&R.createElement(m7,{"data-qa-anchor":"post-header-additional-info-moderator-badge"},R.createElement(aw,null)," ",R.createElement(FormattedMessage,{id:"moderator"})),r&&R.createElement(V0,{"data-qa-anchor":"post-header-additional-info-time-ago",date:r.getTime()}),i&&R.createElement(sw,{"data-qa-anchor":"post-header-additional-info-edited-label"},R.createElement(FormattedMessage,{id:"post.edited"})));return R.createElement(ow,{"data-qa-anchor":"post-header"},R.createElement(ge,{"data-qa-anchor":"post-header-avatar",avatar:e,backgroundImage:Se,loading:d,onClick:s}),R.createElement(rw,{"data-qa-anchor":"post-header-post-info"},d?R.createElement(R.Fragment,null,R.createElement("div",null,R.createElement(we,{width:96,style:{fontSize:8}})),R.createElement(we,{width:189,style:{fontSize:8}})):R.createElement(R.Fragment,null,g(),f())))},uw=zK;var gw=createContext({newsCommunityId:"",faqCommunityId:""}),fw=({newsCommunityId:e,faqCommunityId:t,children:o})=>R.createElement(gw.Provider,{value:{newsCommunityId:e,faqCommunityId:t}},o),Cr=()=>useContext(gw);var{COMMUNITY_MODERATOR:GK}=Ba;function qi(e){let r=Ue({fetcher:CommunityRepository.Membership.getMembers,params:{communityId:e,roles:[GK]},shouldCall:!!e}),{items:t}=r,o=P(r,["items"]);return c({moderators:t},o)}var QK=({post:e,childrenPosts:t=[],community:o})=>{var v,C,h,x;let{currentUserId:r,client:n}=J(),{moderators:i}=qi(o==null?void 0:o.communityId),a=useMemo(()=>!t.find(b=>b.dataType==="liveStream"||b.dataType==="poll"),[t]),s=i.find(b=>b.userId===(e==null?void 0:e.postedUserId)),l=(e==null?void 0:e.postedUserId)===r,d=useMemo(()=>(o==null?void 0:o.postSetting)!=CommunityPostSettings.ANYONE_CAN_POST?(e==null?void 0:e.feedType)==="reviewing":!1,[o,e]),p=s!=null,{newsCommunityId:u,faqCommunityId:g}=Cr(),f=(o==null?void 0:o.communityId)===u||(o==null?void 0:o.communityId)===g,y={canEdit:!1,canReport:!1,canDelete:!1,canReview:!1};if(l)!d&&a&&(y.canEdit=!0),y.canDelete=!0;else {if(o!=null){let b=(v=n==null?void 0:n.hasPermission(dr.EditCommunityFeedPostPermission).community(o.communityId))!=null?v:!1;y.canEdit=b&&a;let M=(C=n==null?void 0:n.hasPermission(dr.DeleteCommunityFeedPostPermission).community(o.communityId))!=null?C:!1;y.canDelete=M;let I=(h=n==null?void 0:n.hasPermission(dr.ReviewCommunityPost).community(o.communityId))!=null?h:!1;y.canReview=I;}else {let b=(x=n==null?void 0:n.hasPermission(dr.EditUserFeedPostPermission).currentUser())!=null?x:!1;y.canDelete=b;}d||(y.canReport=!0),f&&(y.canReport=!1);}return c({isPostUnderReview:d,isModerator:p},y)},Rs=QK;var hw=({post:e,avatarFileUrl:t,loading:o,hidePostTarget:r})=>{let{onClickCommunity:n,onClickUser:i}=X(),{formatMessage:a}=useIntl(),s=re(e==null?void 0:e.postedUserId),{userRoles:l}=J(),d=Tt(e==null?void 0:e.targetId),{isModerator:p}=Rs({community:d,post:e}),u=l.find(C=>C==="global-admin")!=null,g=(e==null?void 0:e.targetType)==="community",f=g?d==null?void 0:d.displayName:null,y=g?()=>e&&n(e==null?void 0:e.targetId):null,v=()=>e&&i(e.postedUserId);return {avatarFileUrl:t,postAuthorName:(s==null?void 0:s.displayName)||a({id:"anonymous"}),postTargetName:f,timeAgo:e!=null&&e.createdAt?new Date(e==null?void 0:e.createdAt):null,isModerator:e!=null&&e.targetId?p:u,isEdited:new Date(e==null?void 0:e.createdAt).getTime()<new Date(e==null?void 0:e.editedAt).getTime(),isBanned:s==null?void 0:s.isGlobalBanned,hidePostTarget:r,loading:o,onClickCommunity:y,onClickUser:v}};var JK=({postId:e,hidePostTarget:t,loading:o})=>{let r=qn(e),n=re(r==null?void 0:r.postedUserId),i=se({fileId:n==null?void 0:n.avatarFileId,imageSize:"small"}),a=hw({post:r,avatarFileUrl:i,user:n,loading:o,hidePostTarget:t});return R.createElement(uw,c({},a))};var Cw=memo(JK);m.div`
|
|
1842
1842
|
overflow-wrap: break-word;
|
|
1843
1843
|
color: ${({theme:e})=>e.palette.neutral.main};
|
|
1844
1844
|
white-space: pre-wrap;
|
|
@@ -1866,7 +1866,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1866
1866
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
1867
1867
|
padding: 4px;
|
|
1868
1868
|
display: inline-block;
|
|
1869
|
-
`,rJ=({text:e,postMaxLines:t=8,mentionees:o})=>{let r=useMemo(()=>H0(e||"",I0(o)),[o,e]),n=useRef(null),[i,a]=useState(!1),[s,l]=useState(!1);useEffect(()=>{if(n.current){let{scrollHeight:u,clientHeight:g}=n.current;l(u>g);}},[e,t]);let d=()=>a(!0),p=e?R.createElement(tJ,{ref:n,isExpanded:i,postMaxLines:t,"data-qa-anchor":"post-text-content"},r.map(u=>{let g=`${e}-${u.start}-${u.end}`,f=e.substring(u.start,u.end);if(u.highlight){let y=o==null?void 0:o.find(v=>v.index===u.start);return y?R.createElement(D0,{key:g,mentionee:y},f):R.createElement("span",{key:g},f)}return R.createElement(ul,{key:g},f)})):null;return p?R.createElement(R.Fragment,null,p,!i&&s&&R.createElement(oJ,{onClick:d},"..."," ",R.createElement(vw,null,R.createElement(FormattedMessage,{id:"post.readMore"})))):null},dp=e=>{let t=W("UITextContent");return t?t(e):R.createElement(rJ,c({},e))};var iJ=({fileId:e})=>R.createElement(Ht,{fileId:e}),bw=iJ;var sJ=({videoFileId:e})=>{let t=e.high||e.medium||e.low;return R.createElement(
|
|
1869
|
+
`,rJ=({text:e,postMaxLines:t=8,mentionees:o})=>{let r=useMemo(()=>H0(e||"",I0(o)),[o,e]),n=useRef(null),[i,a]=useState(!1),[s,l]=useState(!1);useEffect(()=>{if(n.current){let{scrollHeight:u,clientHeight:g}=n.current;l(u>g);}},[e,t]);let d=()=>a(!0),p=e?R.createElement(tJ,{ref:n,isExpanded:i,postMaxLines:t,"data-qa-anchor":"post-text-content"},r.map(u=>{let g=`${e}-${u.start}-${u.end}`,f=e.substring(u.start,u.end);if(u.highlight){let y=o==null?void 0:o.find(v=>v.index===u.start);return y?R.createElement(D0,{key:g,mentionee:y},f):R.createElement("span",{key:g},f)}return R.createElement(ul,{key:g},f)})):null;return p?R.createElement(R.Fragment,null,p,!i&&s&&R.createElement(oJ,{onClick:d},"..."," ",R.createElement(vw,null,R.createElement(FormattedMessage,{id:"post.readMore"})))):null},dp=e=>{let t=W("UITextContent");return t?t(e):R.createElement(rJ,c({},e))};var iJ=({fileId:e})=>R.createElement(Ht,{fileId:e}),bw=iJ;var sJ=({videoFileId:e})=>{let t=e.high||e.medium||e.low;return R.createElement(Gi,{fileId:t})},Iw=sJ;var mJ=({fileId:e})=>R.createElement(Zi,{fileId:e}),ww=mJ;var cJ=m.div`
|
|
1870
1870
|
margin-bottom: 0.75rem;
|
|
1871
1871
|
|
|
1872
1872
|
> :not(:first-child) {
|
|
@@ -1928,7 +1928,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
1928
1928
|
color: #6e6e6e;
|
|
1929
1929
|
`,Aw=m.div`
|
|
1930
1930
|
${({theme:e})=>e.typography.body}
|
|
1931
|
-
`;var NJ=({className:e,icon:t,title:o,description:r,children:n})=>R.createElement(Lw,{className:e},t,R.createElement(pp,null,o),r&&R.createElement(Aw,null,r),n),
|
|
1931
|
+
`;var NJ=({className:e,icon:t,title:o,description:r,children:n})=>R.createElement(Lw,{className:e},t,R.createElement(pp,null,o),r&&R.createElement(Aw,null,r),n),oi=NJ;var EJ=()=>R.createElement(K2,null,R.createElement(oi,{title:R.createElement(FormattedMessage,{id:"post.unknownPost.title"}),icon:R.createElement(l4,null)},R.createElement(FormattedMessage,{id:"post.unknownPost.description"}))),Hw=EJ;var up={[PostContentType.FILE]:e=>R.createElement(vr,c({},e)),[PostContentType.IMAGE]:e=>R.createElement(vr,c({},e)),[PostContentType.LIVESTREAM]:e=>R.createElement(vr,c({},e)),[PostContentType.POLL]:e=>R.createElement(vr,c({},e)),[PostContentType.TEXT]:e=>R.createElement(vr,c({},e)),[PostContentType.VIDEO]:e=>R.createElement(vr,c({},e))},Ow=createContext(up),zw=e=>{let t=useContext(Ow);return useMemo(()=>e==null?o=>null:t[e]||up[e]||(o=>R.createElement(Hw,null)),[e])};function u7({children:e,config:t}){let o=useMemo(()=>t==null?up:c(c({},up),t),[t]);return R.createElement(Ow.Provider,{value:o},e)}var AJ=i=>{var a=i,{"data-qa-anchor":e="",renderer:t,label:o,className:r}=a,n=P(a,["data-qa-anchor","renderer","label","className"]);return R.createElement(EI,{"data-qa-anchor":`${e}-label`},R.createElement(BI,E(c({},n),{"data-qa-anchor":`${e}-radio`})),R.createElement(R.Fragment,null,t?t():R.createElement("span",{className:r},o),R.createElement(ap,{checked:n.value})))},Bl=AJ;var HJ=1073741824,FJ=1,OJ=m.label`
|
|
1932
1932
|
cursor: pointer;
|
|
1933
1933
|
transition: background 0.1s;
|
|
1934
1934
|
border-radius: 50%;
|
|
@@ -2035,7 +2035,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
2035
2035
|
&:hover {
|
|
2036
2036
|
${({theme:e})=>`background: ${e.palette.base.shade4};`}
|
|
2037
2037
|
}
|
|
2038
|
-
`;var
|
|
2038
|
+
`;var ri=Jw;var Xw=m.button.attrs({role:"button"})`
|
|
2039
2039
|
color: ${({theme:e})=>e.palette.base.shade1};
|
|
2040
2040
|
font-size: 14px;
|
|
2041
2041
|
border: 1px solid ${({theme:e})=>e.palette.system.borders};
|
|
@@ -2059,7 +2059,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
2059
2059
|
> * {
|
|
2060
2060
|
margin: 0 3px;
|
|
2061
2061
|
}
|
|
2062
|
-
`;var nX=({value:e})=>R.createElement("div",null,e),iX=r=>{var n=r,{placeholder:e,selected:t}=n,o=P(n,["placeholder","selected"]);return R.createElement(Xw,c({},o),t&&t.length?R.createElement(Yw,null,t.map(({name:i,value:a})=>R.createElement("span",{key:a},i))):R.createElement("div",null,e),R.createElement(Pn,{height:14,width:14}))},aX=({value:e=[],onSelect:t=()=>{},options:o=[],multiple:r,disabled:n,parentContainer:i=null,renderItem:a=nX,renderTrigger:s=iX,isOpen:l,handleClose:d,placeholder:p="Select...",className:u="","data-qa-anchor":g=""})=>{let[f,y]=useState(l),[v,C]=useState(e),h=()=>y(!f),x=()=>d?d():y(!1),b=(w,N)=>{C(T=>{let L=T.filter(D=>D.value!==w.value);return N&&N(L.map(D=>D.value)),L});};hr("Escape",x),useEffect(()=>{y(l);},[l]);let M=w=>{if(t(w),r){let N=v.findIndex(T=>T.value===w.value);N>=0?b(v[N]):C([...v,w]);}else C([w]),x();},I=w=>{w.preventDefault(),h();};return R.createElement($0,{"data-qa-anchor":`${g}-select-dropdown`,isOpen:l||f,renderTrigger:w=>s(E(c({},w),{onClick:I,selected:v,remove:b,placeholder:p})),handleClose:x,fullSized:!0,scrollable:!0,parentContainer:i,disabled:n,className:u},o&&o.length>0&&R.createElement(
|
|
2062
|
+
`;var nX=({value:e})=>R.createElement("div",null,e),iX=r=>{var n=r,{placeholder:e,selected:t}=n,o=P(n,["placeholder","selected"]);return R.createElement(Xw,c({},o),t&&t.length?R.createElement(Yw,null,t.map(({name:i,value:a})=>R.createElement("span",{key:a},i))):R.createElement("div",null,e),R.createElement(Pn,{height:14,width:14}))},aX=({value:e=[],onSelect:t=()=>{},options:o=[],multiple:r,disabled:n,parentContainer:i=null,renderItem:a=nX,renderTrigger:s=iX,isOpen:l,handleClose:d,placeholder:p="Select...",className:u="","data-qa-anchor":g=""})=>{let[f,y]=useState(l),[v,C]=useState(e),h=()=>y(!f),x=()=>d?d():y(!1),b=(w,N)=>{C(T=>{let L=T.filter(D=>D.value!==w.value);return N&&N(L.map(D=>D.value)),L});};hr("Escape",x),useEffect(()=>{y(l);},[l]);let M=w=>{if(t(w),r){let N=v.findIndex(T=>T.value===w.value);N>=0?b(v[N]):C([...v,w]);}else C([w]),x();},I=w=>{w.preventDefault(),h();};return R.createElement($0,{"data-qa-anchor":`${g}-select-dropdown`,isOpen:l||f,renderTrigger:w=>s(E(c({},w),{onClick:I,selected:v,remove:b,placeholder:p})),handleClose:x,fullSized:!0,scrollable:!0,parentContainer:i,disabled:n,className:u},o&&o.length>0&&R.createElement(ri,null,o.map(w=>R.createElement(Go,{key:w.value,"data-qa-anchor":`${g}-select-menu-item`,active:v.find(N=>N.value===w.value)!=null,onClick:()=>M(w)},a(w)))))},ni=memo(aX);var mX=e=>{let[t,o]=useState(null);return useEffect(()=>{function r(){return _(this,null,function*(){if(e==null)return;let n=CategoryRepository.getCategory.locally(e);if(n!=null&&n.data){o(n.data);return}let i=yield CategoryRepository.getCategory(e);o(i.data);})}r();},[e]),t},Hl=mX;var tM=m.div`
|
|
2063
2063
|
display: grid;
|
|
2064
2064
|
grid-template-areas: 'avatar title' 'avatar subtitle';
|
|
2065
2065
|
grid-template-columns: min-content auto;
|
|
@@ -2096,7 +2096,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
2096
2096
|
${({theme:e})=>e.typography.caption}
|
|
2097
2097
|
`,xr=e=>R.createElement(ErrorMessage,c({as:yX},e));m.span`
|
|
2098
2098
|
color: ${({theme:e})=>e.palette.base.shade1};
|
|
2099
|
-
`;var yp=m(U4).attrs({width:20,height:20})``,hp=m(
|
|
2099
|
+
`;var yp=m(U4).attrs({width:20,height:20})``,hp=m(Oi).attrs({width:20,height:20})``;m(Po).attrs({width:12,height:12})`
|
|
2100
2100
|
padding: 5px 12px;
|
|
2101
2101
|
color: ${({theme:e})=>e.palette.base.shade1};
|
|
2102
2102
|
`;var sM=m.div`
|
|
@@ -2141,7 +2141,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
2141
2141
|
}
|
|
2142
2142
|
}
|
|
2143
2143
|
`}
|
|
2144
|
-
`,
|
|
2144
|
+
`,Xi=m.div`
|
|
2145
2145
|
display: flex;
|
|
2146
2146
|
align-items: center;
|
|
2147
2147
|
`;m.input.attrs({type:"radio"})`
|
|
@@ -2303,7 +2303,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
2303
2303
|
`}
|
|
2304
2304
|
`,wp=m(br)`
|
|
2305
2305
|
margin-top: 0;
|
|
2306
|
-
`,
|
|
2306
|
+
`,ii=m.div`
|
|
2307
2307
|
display: flex;
|
|
2308
2308
|
flex-direction: column;
|
|
2309
2309
|
gap: 16px;
|
|
@@ -2343,7 +2343,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
2343
2343
|
`,yM=m(Y)`
|
|
2344
2344
|
border: none;
|
|
2345
2345
|
padding: 0;
|
|
2346
|
-
`;var CX=({categoryId:e,name:t,fileUrl:o,onClick:r,onRemove:n})=>{let i=useCallback(s=>{s.stopPropagation(),e&&(r==null||r(e));},[r,e]),a=useCallback(s=>{s.stopPropagation(),e&&(n==null||n(e));},[n,e]);return R.createElement(uM,{onClick:i},R.createElement(ge,{size:"tiny",avatar:o,backgroundImage:Rd}),R.createElement(gM,null,t),!!n&&R.createElement(yM,{onClick:a},R.createElement(fM,null)))},CM=CX;var xX=({categoryId:e,onClick:t,onRemove:o})=>{let r=Hl(e),n=se({fileId:r==null?void 0:r.avatarFileId,imageSize:"small"});return r==null?null:R.createElement(CM,{categoryId:r.categoryId,name:r.name,fileUrl:n,onClick:i=>t==null?void 0:t(i),onRemove:o})},vM=xX;function y7(e){let r=Ue({fetcher:CategoryRepository.getCategories,params:e}),{items:t}=r,o=P(r,["items"]);return c({categories:t},o)}var MX=({"data-qa-anchor":e="",value:t,onChange:o,parentContainer:r=null})=>{let n=t!=null?t:[],[i,a]=useState(!1),[s,l]=useState(""),d=()=>a(!i);useIntl();let u=useRef(null),g=h=>{var x;l(h),a(!!h),h&&((x=u.current)==null||x.focus());},f=()=>{l(""),a(!1);},{categories:y}=y7({includeDeleted:!1,limit:100}),v=y.filter(h=>s?h.name.includes(s):!0).map(h=>({name:h.name,value:h.categoryId})),C=n.map(h=>{var x;return {name:((x=y.find(b=>b.categoryId===h))==null?void 0:x.name)||"",value:h}});return R.createElement(
|
|
2346
|
+
`;var CX=({categoryId:e,name:t,fileUrl:o,onClick:r,onRemove:n})=>{let i=useCallback(s=>{s.stopPropagation(),e&&(r==null||r(e));},[r,e]),a=useCallback(s=>{s.stopPropagation(),e&&(n==null||n(e));},[n,e]);return R.createElement(uM,{onClick:i},R.createElement(ge,{size:"tiny",avatar:o,backgroundImage:Rd}),R.createElement(gM,null,t),!!n&&R.createElement(yM,{onClick:a},R.createElement(fM,null)))},CM=CX;var xX=({categoryId:e,onClick:t,onRemove:o})=>{let r=Hl(e),n=se({fileId:r==null?void 0:r.avatarFileId,imageSize:"small"});return r==null?null:R.createElement(CM,{categoryId:r.categoryId,name:r.name,fileUrl:n,onClick:i=>t==null?void 0:t(i),onRemove:o})},vM=xX;function y7(e){let r=Ue({fetcher:CategoryRepository.getCategories,params:e}),{items:t}=r,o=P(r,["items"]);return c({categories:t},o)}var MX=({"data-qa-anchor":e="",value:t,onChange:o,parentContainer:r=null})=>{let n=t!=null?t:[],[i,a]=useState(!1),[s,l]=useState(""),d=()=>a(!i);useIntl();let u=useRef(null),g=h=>{var x;l(h),a(!!h),h&&((x=u.current)==null||x.focus());},f=()=>{l(""),a(!1);},{categories:y}=y7({includeDeleted:!1,limit:100}),v=y.filter(h=>s?h.name.includes(s):!0).map(h=>({name:h.name,value:h.categoryId})),C=n.map(h=>{var x;return {name:((x=y.find(b=>b.categoryId===h))==null?void 0:x.name)||"",value:h}});return R.createElement(ni,{"data-qa-anchor":`${e}-category`,value:C,options:v,renderTrigger:M=>{var I=M,{selected:h,remove:x}=I,b=P(I,["selected","remove"]);return R.createElement(sM,E(c({},b),{onClick:d,"data-qa-anchor":`${e}-category-selector`}),h.map(w=>R.createElement(vM,{key:w.value,categoryId:w.value,onRemove:()=>x(w,o)})),R.createElement(cM,{ref:u,"data-qa-anchor":"category-selector-input",type:"text",value:s,onChange:w=>g(w.target.value)}),R.createElement(mM,null))},renderItem:({value:h})=>R.createElement(aM,{categoryId:h}),parentContainer:r,isOpen:i,handleClose:f,multiple:!0,onSelect:({value:h})=>{var x;l(""),(x=u.current)==null||x.focus(),o==null||o([...new Set([...n,h])]);}})},_p=e=>{let t=W("CategorySelector");return t?t(e):R.createElement(MX,c({},e))};var wM=Nn.object({displayName:Nn.string().max(30),description:Nn.string().max(180),categoryIds:Nn.string().array().min(1),avatarFileId:Nn.string().nullable().optional(),tags:Nn.string().array().optional(),isPublic:Nn.boolean()}),PX=wM.extend({userIds:Nn.string().array().optional()}).refine(e=>{var t;return !(!e.isPublic&&((t=e.userIds)==null?void 0:t.length)===0)}),_X=wM.partial(),MM=()=>useForm({defaultValues:{avatarFileId:void 0,description:"",displayName:"",isPublic:!0,tags:[],userIds:[],categoryIds:[]},resolver:zodResolver(PX)}),PM=e=>useForm({defaultValues:{avatarFileId:e.avatarFileId,description:e.description,displayName:e.displayName,isPublic:e.isPublic,tags:e.tags,categoryIds:e.categoryIds},resolver:zodResolver(_X)});var _M=m.div`
|
|
2347
2347
|
background: ${({theme:e})=>e.palette.system.background};
|
|
2348
2348
|
align-self: flex-start;
|
|
2349
2349
|
width: 100%;
|
|
@@ -2412,7 +2412,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
2412
2412
|
box-sizing: border-box;
|
|
2413
2413
|
`,BM=m(Mn).attrs({width:15,height:15})`
|
|
2414
2414
|
margin-right: 8px;
|
|
2415
|
-
`;var LM=({title:e,bodyText:t,actionButton:o})=>R.createElement(_M,null,R.createElement(TM,null,e),R.createElement(kM,null,R.createElement("div",null,t),R.createElement(SM,null,o))),SX=({onClick:e})=>R.createElement(NM,{"data-qa-anchor":"community-edit-add-member-button",onClick:e},R.createElement(BM,null),R.createElement(FormattedMessage,{id:"community.addmembers"})),NX=o=>{var r=o,{onClick:e}=r,t=P(r,["onClick"]);return R.createElement(EM,E(c({},t),{onClick:e,type:"button"}),R.createElement(FormattedMessage,{id:"CloseCommunityAction.title"}))},AM=({action:e})=>R.createElement(LM,{title:R.createElement(FormattedMessage,{id:"AddMemberAction.title"}),bodyText:R.createElement(FormattedMessage,{id:"AddMemberAction.description"}),actionButton:R.createElement(SX,{onClick:e})}),DM=({communityId:e,onCommunityClosed:t})=>{let{formatMessage:o}=useIntl(),{confirm:r}=Pe();return R.createElement(LM,{title:R.createElement(FormattedMessage,{id:"CloseCommunityAction.title"}),bodyText:R.createElement(FormattedMessage,{id:"CloseCommunityAction.description"}),actionButton:R.createElement(NX,{"data-qa-anchor":"community-edit-close-community-button",onClick:()=>r({"data-qa-anchor":"close-community",title:o({id:"CloseCommunityAction.closeConfirm.title"}),content:o({id:"CloseCommunityAction.closeConfirm.description"}),cancelText:o({id:"cancel"}),okText:o({id:"close"}),onOk:()=>_(void 0,null,function*(){e&&(yield CommunityRepository.deleteCommunity(e),t==null||t());})})})})};var HM=({title:e,children:t})=>R.createElement(zl,{edit:!0},e&&R.createElement(vp,null,e),R.createElement(Ul,null,t)),FM=({type:e,description:t,icon:o})=>R.createElement(xp,null,R.createElement(Cp,null,o),R.createElement("div",null,e,R.createElement(bp,null,t))),AX=({community:e,"data-qa-anchor":t="",className:o,onSubmit:r,onCancel:n})=>{let[i,a]=useState(!1),{register:s,handleSubmit:l,setError:d,watch:p,control:u,formState:g}=PM(e),{onChangePage:f}=X(),{errors:y,dirtyFields:v}=g,C=p("displayName"),h=p("description"),x=Ce(),b=useRef(null),M=Object.keys(v).length>0,I=T=>_(void 0,null,function*(){try{a(!0),yield r==null?void 0:r(E(c({},T),{avatarFileId:T.avatarFileId||void 0})),x.success({content:R.createElement(FormattedMessage,{id:"community.updateSuccess"})});}finally{a(!1);}}),w=!g.isValid||i||!M,N=b.current&&b.current.scrollHeight-b.current.clientHeight-b.current.scrollTop;return R.useLayoutEffect(()=>{N!=null&&b.current&&N<10&&b.current.scrollHeight-b.current.clientHeight-b.current.scrollTop>10&&b.current.scrollTo({top:b.current.scrollHeight});},[b.current,N,g]),R.createElement(Qa,{className:o,onSubmit:l(I)},R.createElement(
|
|
2415
|
+
`;var LM=({title:e,bodyText:t,actionButton:o})=>R.createElement(_M,null,R.createElement(TM,null,e),R.createElement(kM,null,R.createElement("div",null,t),R.createElement(SM,null,o))),SX=({onClick:e})=>R.createElement(NM,{"data-qa-anchor":"community-edit-add-member-button",onClick:e},R.createElement(BM,null),R.createElement(FormattedMessage,{id:"community.addmembers"})),NX=o=>{var r=o,{onClick:e}=r,t=P(r,["onClick"]);return R.createElement(EM,E(c({},t),{onClick:e,type:"button"}),R.createElement(FormattedMessage,{id:"CloseCommunityAction.title"}))},AM=({action:e})=>R.createElement(LM,{title:R.createElement(FormattedMessage,{id:"AddMemberAction.title"}),bodyText:R.createElement(FormattedMessage,{id:"AddMemberAction.description"}),actionButton:R.createElement(SX,{onClick:e})}),DM=({communityId:e,onCommunityClosed:t})=>{let{formatMessage:o}=useIntl(),{confirm:r}=Pe();return R.createElement(LM,{title:R.createElement(FormattedMessage,{id:"CloseCommunityAction.title"}),bodyText:R.createElement(FormattedMessage,{id:"CloseCommunityAction.description"}),actionButton:R.createElement(NX,{"data-qa-anchor":"community-edit-close-community-button",onClick:()=>r({"data-qa-anchor":"close-community",title:o({id:"CloseCommunityAction.closeConfirm.title"}),content:o({id:"CloseCommunityAction.closeConfirm.description"}),cancelText:o({id:"cancel"}),okText:o({id:"close"}),onOk:()=>_(void 0,null,function*(){e&&(yield CommunityRepository.deleteCommunity(e),t==null||t());})})})})};var HM=({title:e,children:t})=>R.createElement(zl,{edit:!0},e&&R.createElement(vp,null,e),R.createElement(Ul,null,t)),FM=({type:e,description:t,icon:o})=>R.createElement(xp,null,R.createElement(Cp,null,o),R.createElement("div",null,e,R.createElement(bp,null,t))),AX=({community:e,"data-qa-anchor":t="",className:o,onSubmit:r,onCancel:n})=>{let[i,a]=useState(!1),{register:s,handleSubmit:l,setError:d,watch:p,control:u,formState:g}=PM(e),{onChangePage:f}=X(),{errors:y,dirtyFields:v}=g,C=p("displayName"),h=p("description"),x=Ce(),b=useRef(null),M=Object.keys(v).length>0,I=T=>_(void 0,null,function*(){try{a(!0),yield r==null?void 0:r(E(c({},T),{avatarFileId:T.avatarFileId||void 0})),x.success({content:R.createElement(FormattedMessage,{id:"community.updateSuccess"})});}finally{a(!1);}}),w=!g.isValid||i||!M,N=b.current&&b.current.scrollHeight-b.current.clientHeight-b.current.scrollTop;return R.useLayoutEffect(()=>{N!=null&&b.current&&N<10&&b.current.scrollHeight-b.current.clientHeight-b.current.scrollTop>10&&b.current.scrollTo({top:b.current.scrollHeight});},[b.current,N,g]),R.createElement(Qa,{className:o,onSubmit:l(I)},R.createElement(ii,{ref:b},R.createElement(HM,{title:"General"},R.createElement(br,null,R.createElement(Controller,{name:"avatarFileId",control:u,render:D=>{var {field:U}=D,Z=U,L=P(Z,["ref"]);return R.createElement(Pp,null,R.createElement(Ga,E(c({mimeType:"image/png, image/jpeg"},L),{"data-qa-anchor":t,isShowUploadImagePlaceholder:!0})))}})),R.createElement(br,{error:y.displayName},R.createElement(Xi,null,R.createElement(sn,{htmlFor:"displayName",className:"required"},R.createElement(FormattedMessage,{id:"community.name"})),R.createElement(Za,null,C.length,"/30")),R.createElement(t1,E(c({},s("displayName")),{"data-qa-anchor":`${t}-community-name-input`,placeholder:"Enter community name"})),R.createElement(xr,{errors:y,name:"displayName"})),R.createElement(br,{error:y.description},R.createElement(Xi,null,R.createElement(sn,{htmlFor:"description"},R.createElement(FormattedMessage,{id:"community.about"})),R.createElement(Za,null,(h==null?void 0:h.length)||0,"/180")),R.createElement(e1,E(c({},s("description",{maxLength:{value:180,message:"Description text is too long"}})),{"data-qa-anchor":`${t}-community-description-textarea`,placeholder:"Enter description"})),R.createElement(xr,{errors:y,name:"description"})),R.createElement(br,{error:y.categoryIds},R.createElement(sn,{htmlFor:"categoryIds",className:"required"},R.createElement(FormattedMessage,{id:"community.category"})),R.createElement(Controller,{rules:{required:"Category is required"},name:"categoryIds",render:D=>{var {field:U}=D,Z=U,L=P(Z,["ref"]);return R.createElement(_p,E(c({parentContainer:b.current},L),{"data-qa-anchor":`${t}`}))},control:u}),R.createElement(xr,{errors:y,name:"category"}))),R.createElement(HM,{title:R.createElement(FormattedMessage,{id:"community.categorypermission"})},R.createElement(Controller,{name:"isPublic",render:({field:T})=>R.createElement(Mp,null,R.createElement(Bl,E(c({},T),{value:T.value===!0,onChange:L=>T.onChange(L.target.checked),"data-qa-anchor":"community-form-public-type-community-type",label:"Public",renderer:()=>R.createElement(FM,{type:"Public",description:"Anyone can join, view and search the posts in this group.",icon:R.createElement(yp,null)})})),R.createElement(Bl,E(c({},T),{value:T.value===!1,onChange:L=>T.onChange(!L.target.checked),"data-qa-anchor":"community-form-private-type-community-type",label:"Private",renderer:()=>R.createElement(FM,{type:"Private",description:"Only members invited by the moderators can join, view, and search the posts in this group.",icon:R.createElement(hp,null)})}))),control:u})),R.createElement(DM,{communityId:e.communityId,onCommunityClosed:()=>f("newsfeed")})),R.createElement(Ip,{edit:!0},R.createElement(Ol,{"data-qa-anchor":`${t}-save-button`,disabled:w,edit:!0},R.createElement(FormattedMessage,{id:"save"}))))},OM=memo(AX);var FX=1,kp=(e,t=FX)=>{let[o,r]=useState([]),[n,i]=useState(!1),[a,s]=useState(!1),[l,d]=useState(!1),p=useRef(null),u=useRef(null),g=()=>{p.current&&(p.current(),d(!0));};return useEffect(()=>{if(e.length<t)return;u.current&&(u.current(),u.current=null);let f=UserRepository.searchUserByDisplayName({displayName:e,limit:10},y=>{s(y.hasNextPage||!1),i(y.loading),p.current=y.onNextPage||null,r(y.data);});return u.current=f,()=>{var y;(y=u.current)==null||y.call(u),u.current=null;}},[e,t]),{users:o,isLoading:n,hasMore:a,loadMore:g,loadMoreHasBeenCalled:l}};var UM=m.div`
|
|
2416
2416
|
display: grid;
|
|
2417
2417
|
grid-template-areas: 'avatar title' 'avatar subtitle';
|
|
2418
2418
|
grid-template-columns: min-content auto;
|
|
@@ -2440,7 +2440,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
2440
2440
|
`,jM=m.div`
|
|
2441
2441
|
grid-area: subtitle;
|
|
2442
2442
|
${({theme:e})=>e.typography.body}
|
|
2443
|
-
`;var OX=({userId:e,displayName:t,avatarFileUrl:o,children:r,onClick:n,isBanned:i})=>{let a=()=>e&&(n==null?void 0:n(e));return R.createElement(UM,{noSubtitle:!!r},R.createElement($M,{avatar:o,backgroundImage:Se,onClick:a}),R.createElement(VM,{title:e||void 0,onClick:a},R.createElement("div",null,t)," ",i&&R.createElement(
|
|
2443
|
+
`;var OX=({userId:e,displayName:t,avatarFileUrl:o,children:r,onClick:n,isBanned:i})=>{let a=()=>e&&(n==null?void 0:n(e));return R.createElement(UM,{noSubtitle:!!r},R.createElement($M,{avatar:o,backgroundImage:Se,onClick:a}),R.createElement(VM,{title:e||void 0,onClick:a},R.createElement("div",null,t)," ",i&&R.createElement(Kn,null)),r&&R.createElement(jM,null,r))},Sp=e=>{let t=W("UserHeader");return t?t(e):R.createElement(OX,c({},e))};var UX=({userId:e,children:t,onClick:o,isBanned:r=!1})=>{let n=re(e),i=se({fileId:n==null?void 0:n.avatarFileId,imageSize:"small"});return R.createElement(Sp,{userId:n==null?void 0:n.userId,displayName:n==null?void 0:n.displayName,avatarFileUrl:i,isBanned:r,onClick:o},t)},ai=UX;var GM=m.div`
|
|
2444
2444
|
display: flex;
|
|
2445
2445
|
align-items: center;
|
|
2446
2446
|
padding: 0.25rem;
|
|
@@ -2473,8 +2473,8 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
2473
2473
|
outline: none;
|
|
2474
2474
|
border: none;
|
|
2475
2475
|
width: 100%;
|
|
2476
|
-
`;var WX=({value:e,onChange:t,parentContainer:o=null})=>{let r=e!=null?e:[],{currentUserId:n}=J(),[i,a]=useState(!1),[s,l]=useState(""),{users:d=[]}=kp(s),{formatMessage:p}=useIntl(),u=d.filter(({displayName:C,userId:h})=>(C==null?void 0:C.toLowerCase().includes(s.toLowerCase()))&&h!==n).map(({displayName:C,userId:h})=>({name:C,value:h})),g=r.map(C=>{var h;return {name:((h=d.find(x=>x.userId===C))==null?void 0:h.displayName)||"",value:C}}),f=()=>{a(!1),l("");},y=useRef(null),v=C=>{var h;l(C),a(!!C),C&&((h=y.current)==null||h.focus());};return R.createElement(
|
|
2477
|
-
${
|
|
2476
|
+
`;var WX=({value:e,onChange:t,parentContainer:o=null})=>{let r=e!=null?e:[],{currentUserId:n}=J(),[i,a]=useState(!1),[s,l]=useState(""),{users:d=[]}=kp(s),{formatMessage:p}=useIntl(),u=d.filter(({displayName:C,userId:h})=>(C==null?void 0:C.toLowerCase().includes(s.toLowerCase()))&&h!==n).map(({displayName:C,userId:h})=>({name:C,value:h})),g=r.map(C=>{var h;return {name:((h=d.find(x=>x.userId===C))==null?void 0:h.displayName)||"",value:C}}),f=()=>{a(!1),l("");},y=useRef(null),v=C=>{var h;l(C),a(!!C),C&&((h=y.current)==null||h.focus());};return R.createElement(ni,{"data-qa-anchor":"user",value:g,options:s?u:[],renderTrigger:b=>{var M=b,{selected:C,remove:h}=M,x=P(M,["selected","remove"]);return R.createElement(XM,c({},x),C.map(I=>R.createElement(JM,{key:I.value,userId:I.value,onRemove:()=>h(I,t)})),R.createElement(YM,{ref:y,"data-qa-anchor":"user-selector-input",type:"text",value:s,placeholder:p({id:"UserSelector.placeholder"}),onChange:I=>v(I.target.value)}))},renderItem:({value:C})=>R.createElement(ai,{userId:C}),parentContainer:o,isOpen:i,handleClose:f,multiple:!0,onSelect:({value:C})=>{var h;t==null||t([...new Set([...r,C])]),(h=y.current)==null||h.focus(),l("");}})},Wa=memo(e=>{let t=W("UserSelector");return t?t(e):R.createElement(WX,c({},e))});var C7=({title:e,children:t})=>R.createElement(zl,null,R.createElement(Ul,null,t)),eP=({type:e,description:t,icon:o})=>R.createElement(xp,null,R.createElement(Cp,null,o),R.createElement("div",null,e,R.createElement(bp,null,t))),XX=({"data-qa-anchor":e="",className:t,onSubmit:o,onCancel:r})=>{let[n,i]=useState(!1),{register:a,handleSubmit:s,setError:l,watch:d,control:p,formState:u,setValue:g,getValues:f}=MM(),{errors:y}=u,v=d("displayName"),C=d("description"),h=d("isPublic"),x=useRef(null),b=w=>_(void 0,null,function*(){var N;try{if(i(!0),!w.isPublic&&((N=w.userIds)==null?void 0:N.length)===0){l("userIds",{message:"Please select at least one member"});return}yield o==null?void 0:o(E(c({},w),{displayName:w.displayName||"",avatarFileId:w.avatarFileId||void 0}));}finally{i(!1);}}),M=!u.isValid||n,I=x.current&&x.current.scrollHeight-x.current.clientHeight-x.current.scrollTop;return R.useLayoutEffect(()=>{I!=null&&x.current&&I<10&&x.current.scrollHeight-x.current.clientHeight-x.current.scrollTop>10&&x.current.scrollTo({top:x.current.scrollHeight});},[x.current,I,u]),R.createElement(Qa,{className:t,onSubmit:s(b)},R.createElement(ii,{ref:x},R.createElement(C7,{title:"General"},R.createElement(br,null,R.createElement(Controller,{name:"avatarFileId",control:p,render:T=>{var {field:L}=T,D=L,N=P(D,["ref"]);return R.createElement(Pp,null,R.createElement(Ga,E(c({mimeType:"image/png, image/jpeg"},N),{"data-qa-anchor":e,isShowUploadImagePlaceholder:!0})))}})),R.createElement(br,{error:y.displayName},R.createElement(Xi,null,R.createElement(sn,{htmlFor:"displayName",className:"required"},R.createElement(FormattedMessage,{id:"community.name"})),R.createElement(Za,null,v.length,"/30")),R.createElement(t1,E(c({},a("displayName")),{"data-qa-anchor":`${e}-community-name-input`,placeholder:"Enter community name"})),R.createElement(xr,{errors:y,name:"displayName"})),R.createElement(br,{error:y.description},R.createElement(Xi,null,R.createElement(sn,{htmlFor:"description"},R.createElement(FormattedMessage,{id:"community.about"})),R.createElement(Za,null,(C==null?void 0:C.length)||0,"/180")),R.createElement(e1,E(c({},a("description",{maxLength:{value:180,message:"Description text is too long"}})),{"data-qa-anchor":`${e}-community-description-textarea`,placeholder:"Enter description"})),R.createElement(xr,{errors:y,name:"description"})),R.createElement(br,{error:y.categoryIds},R.createElement(sn,{htmlFor:"categoryIds",className:"required"},R.createElement(FormattedMessage,{id:"community.category"})),R.createElement(Controller,{rules:{required:"Category is required"},name:"categoryIds",render:L=>{var {field:D}=L,U=D,T=P(U,["ref","onChange"]);return R.createElement(_p,E(c({parentContainer:x.current,onChange:Z=>g("categoryIds",Z,{shouldValidate:!0})},T),{"data-qa-anchor":`${e}`}))},control:p}),R.createElement(xr,{errors:y,name:"category"}))),R.createElement(C7,{title:R.createElement(FormattedMessage,{id:"community.categorypermission"})},R.createElement(Controller,{name:"isPublic",render:({field:w})=>R.createElement(Mp,null,R.createElement(Bl,E(c({},w),{value:w.value===!0,onChange:N=>w.onChange(N.target.checked),"data-qa-anchor":"community-form-public-type-community-type",label:"Public",renderer:()=>R.createElement(eP,{type:"Public",description:"Anyone can join, view and search the posts in this group.",icon:R.createElement(yp,null)})})),R.createElement(Bl,E(c({},w),{value:w.value===!1,onChange:N=>w.onChange(!N.target.checked),"data-qa-anchor":"community-form-private-type-community-type",label:"Private",renderer:()=>R.createElement(eP,{type:"Private",description:"Only members invited by the moderators can join, view, and search the posts in this group.",icon:R.createElement(hp,null)})}))),control:p})),!h&&R.createElement(C7,{title:"Community members"},R.createElement(wp,{error:y.userIds},R.createElement(sn,{className:"required"},R.createElement(FormattedMessage,{id:"community.addmembers"})),R.createElement(Controller,{name:"userIds",render:T=>{var {field:L}=T,D=L,N=P(D,["ref"]);return R.createElement(Wa,c({parentContainer:x.current,"data-qa-anchor":e},N))},control:p}),R.createElement(xr,{errors:y,name:"userIds"})))),R.createElement(Ip,null,R.createElement(Y,{onClick:w=>{w.preventDefault(),r==null||r();}},R.createElement(FormattedMessage,{id:"cancel"})),R.createElement(Ol,{"data-qa-anchor":`${e}-save-button`,disabled:M},R.createElement(FormattedMessage,{id:"create"}))))},tP=memo(XX);var RX=r=>{var n=r,{edit:e,community:t}=n,o=P(n,["edit","community"]);return e?t==null?null:R.createElement(OM,E(c({},o),{community:t})):R.createElement(tP,c({},o))},Ep=memo(e=>{let t=W("CommunityForm");return t?t(e):R.createElement(RX,c({},e))});m(Ep)`
|
|
2477
|
+
${ii} {
|
|
2478
2478
|
max-height: 550px;
|
|
2479
2479
|
overflow-y: auto;
|
|
2480
2480
|
}
|
|
@@ -2633,7 +2633,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gd]+=1);var Rd=`url("data:ima
|
|
|
2633
2633
|
`;var eY=e=>R.createElement("svg",c({width:"100%",height:"100%",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"multiply","clip-path":"url(#clip0_5142_12451)"},R.createElement("path",{id:"fill",d:"M13.2488 2.64829C13.0035 2.45402 12.6461 2.47021 12.4194 2.69686L8 7.1158L3.58058 2.69686L3.52547 2.64819C3.26929 2.45274 2.91847 2.47508 2.6967 2.69686L2.64813 2.75137C2.45387 2.99669 2.47006 3.3541 2.6967 3.58074L7.11612 7.99969L2.6967 12.4196L2.64804 12.4747C2.45258 12.7309 2.47492 13.0817 2.6967 13.3035L2.75121 13.352C2.99654 13.5463 3.35394 13.5301 3.58058 13.3035L8 8.88357L12.4194 13.3035L12.4745 13.3521C12.7307 13.5476 13.0815 13.5252 13.3033 13.3035L13.3519 13.2489C13.5461 13.0036 13.5299 12.6462 13.3033 12.4196L8.88388 7.99969L13.3033 3.58074L13.352 3.52563C13.5474 3.26945 13.5251 2.91863 13.3033 2.69686L13.2488 2.64829Z",fill:"black"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_5142_12451"},R.createElement("rect",{width:"16",height:"16",fill:"white"})))),x7=eY;var tY=e=>R.createElement("svg",c({width:"100%",height:"100%",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{"clip-path":"url(#clip0_593_12387)"},R.createElement("path",{d:"M8.00003 0C8.60918 0 9.16863 0.324779 9.47228 0.846019L9.52953 0.952849L15.8447 13.8179C16.0755 14.2874 16.0476 14.8426 15.771 15.2866C15.5156 15.6964 15.0817 15.9577 14.6053 15.9952L14.4854 15.9998H1.51503C0.991951 16.0002 0.505748 15.7305 0.2291 15.2866C-0.0262662 14.8768 -0.0696812 14.3721 0.106551 13.9279L0.15519 13.8182L6.47058 0.952732C6.75705 0.369526 7.35026 0 8.00003 0ZM8.00003 1C7.76141 1 7.54125 1.12063 7.41219 1.31658L7.3682 1.3935L1.05274 14.2591C0.974401 14.4185 0.983873 14.607 1.07779 14.7577C1.1583 14.8869 1.29107 14.9725 1.4394 14.9943L1.5147 14.9998H14.4857C14.6633 14.9998 14.8283 14.9084 14.9223 14.7577C15.0028 14.6285 15.0212 14.4715 14.9754 14.3288L14.9472 14.2588L8.63191 1.39362C8.51356 1.15267 8.26848 1 8.00003 1ZM8.00003 11.9998L8.08175 12.0042C8.45752 12.045 8.75003 12.3632 8.75003 12.7498C8.75003 13.1641 8.41424 13.4998 8.00003 13.4998C7.58581 13.4998 7.25003 13.1641 7.25003 12.7498C7.25003 12.3632 7.54254 12.045 7.91831 12.0042L8.00003 11.9998ZM8.00003 4.99984C8.25316 4.99984 8.46236 5.18794 8.49546 5.43199L8.50003 5.49984V10.4998C8.50003 10.776 8.27617 10.9998 8.00003 10.9998C7.7469 10.9998 7.5377 10.8117 7.50459 10.5677L7.50003 10.4998V5.49984C7.50003 5.2237 7.72389 4.99984 8.00003 4.99984Z",fill:"#B30000"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_593_12387"},R.createElement("rect",{width:"16",height:"16",fill:"white"})))),xP=tY;var nY=({isOpen:e,onClose:t})=>{let{client:o}=J(),[r,n]=useState(""),[i,a]=useState(""),[s,l]=useState(!1);if(!e)return null;let d=f=>{n(f.target.value),a("");},p=()=>{t&&t(),n(""),a("");};return R.createElement(no,{className:"login-wrapper","data-qa-anchor":"nickname-creation-modal"},R.createElement(mP,null,R.createElement(oP,null,R.createElement(cP,null,R.createElement(dP,null,"Join a vibrant community"),R.createElement(aP,{onClick:p},R.createElement(x7,null))),R.createElement(pP,null,`Ready to discover beauty tips and trends while making new connections?
|
|
2634
2634
|
Join below to get started!`),R.createElement("form",{onSubmit:f=>_(void 0,null,function*(){if(f.preventDefault(),l(!0),!r||!(o!=null&&o.userId)){l(!1);return}let y=/[^a-zA-Z0-9]/;if(r.length<3||r.length>26||r.includes(" ")||y.test(r)){a("default"),l(!1);return}try{yield UserRepository.updateUser(o==null?void 0:o.userId,{displayName:r,metadata:{hasNickname:!0}}),window.location.reload();}catch(v){v.message.includes("Deny from prehook: This name has already been taken")?a("This nickname has already been taken. Please try again."):a("default");}finally{l(!1);}})},R.createElement(uP,null,R.createElement(gP,{htmlFor:"input"},"Nickname"),R.createElement(rP,null,R.createElement(fP,{type:"text",id:"input",value:r,onChange:d,hasError:!!i,placeholder:"e.g., MakeupLover"}),r&&R.createElement(sP,{onClick:()=>{n(""),a("");}},R.createElement(x7,null))),i?R.createElement(nP,null,R.createElement(xP,{width:16,height:16}),R.createElement(yP,null,i==="default"?R.createElement(R.Fragment,null,R.createElement("div",null,"Nickname invalid. Please try again."),R.createElement("div",null,"Nickname must:",R.createElement(iP,null,R.createElement("li",null,"Be 3-25 characters in length."),R.createElement("li",null,"Not contain special characters."),R.createElement("li",null,"Not contain spaces."),R.createElement("li",null,"Not contain profanity.")))):i)):R.createElement(lP,null,`Choose how you want your name shown to the rest of the community.
|
|
2635
2635
|
|
|
2636
|
-
Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.createElement(hP,null,"By clicking \u201CJoin\u201D, you agree to our ",R.createElement(Bp,null,"Terms & Conditions")," and have read our ",R.createElement(Bp,null,"Privacy Policy.")),R.createElement(CP,{type:"submit",disabled:!r||s},"JOIN"),R.createElement(vP,null,R.createElement(Bp,{onClick:p},"Maybe later"))))))},Lp=memo(e=>{let t=W("NickNameCreationModal");return t?t(e):R.createElement(nY,c({},e))});var IP=()=>{let{isOpen:e,closeNicknameModal:t}=To();return R.createElement(
|
|
2636
|
+
Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.createElement(hP,null,"By clicking \u201CJoin\u201D, you agree to our ",R.createElement(Bp,null,"Terms & Conditions")," and have read our ",R.createElement(Bp,null,"Privacy Policy.")),R.createElement(CP,{type:"submit",disabled:!r||s},"JOIN"),R.createElement(vP,null,R.createElement(Bp,{onClick:p},"Maybe later"))))))},Lp=memo(e=>{let t=W("NickNameCreationModal");return t?t(e):R.createElement(nY,c({},e))});var IP=()=>{let{isOpen:e,closeNicknameModal:t}=To();return R.createElement(Na,null,R.createElement(Lp,{isOpen:e,onClose:t}))};var mY=({apiKey:e,apiRegion:t,apiEndpoint:o,userId:r,displayName:n,customComponents:i={},postRendererConfig:a,theme:s={},children:l,socialCommunityCreationButtonVisible:d,actionHandlers:p,onConnectionStatusChange:u,onDisconnected:g,getAuthToken:f,ultaConfig:y})=>{let v=new QueryClient,[C,h]=useState(!1),[x,b]=useState(null),M=useRef(null),I=useRef(null),w=re(r),N=useMemo(()=>{var L;return {client:x||null,currentUserId:r||void 0,userRoles:(L=w==null?void 0:w.roles)!=null?L:[]}},[x,r,w==null?void 0:w.roles]);function T(){return _(this,null,function*(){try{let D=Client.getActiveClient();b(D);}catch(D){let U=Client.createClient(e,t,o?{apiEndpoint:o}:{});b(U);}let L={userId:r,displayName:n};if(f){let D=yield f();L=E(c({},L),{authToken:D});}yield Client.login(L,{sessionWillRenewAccessToken(D){f?f().then(U=>{D.renewWithAuthToken(U);}):D.renew();}}),h(!0),M.current==null&&(M.current=Client.onSessionStateChange(D=>{u==null||u(D);})),I.current==null&&(I.current=Client.onClientDisconnected(()=>{g&&g();}));})}return useEffect(()=>{window.parent.postMessage("uikitRendered","*");function L(){return _(this,null,function*(){yield T();})}return L(),()=>{var D,U;(D=M.current)==null||D.call(M),(U=I.current)==null||U.call(I);}},[r]),x==null?R.createElement(R.Fragment,null):C?R.createElement(QueryClientProvider,{client:v},R.createElement(BC,{locale:"en"},R.createElement(_y,{theme:GC(s)},R.createElement(ZC,null,R.createElement(w0.Provider,{value:N},R.createElement(M0.Provider,{value:N},R.createElement(i6,null,R.createElement(f6,null,R.createElement(Cv,null,R.createElement(fw,c({},y),R.createElement(yv,null,R.createElement(Vh,null,R.createElement(PC,null,R.createElement(Dh,null,R.createElement(mC,null,R.createElement(xC,{initialConfig:{preferred_theme:"light"}},R.createElement(y6,{config:i},R.createElement(J4,{config:{socialCommunityCreationButtonVisible:d||!0}},R.createElement(u7,{config:a},R.createElement(s6,c({},p),l))),R.createElement(zh,null),R.createElement(pC,null),R.createElement(rC,null),R.createElement(_C,null),R.createElement(IP,null)))))))))))))))))):R.createElement(R.Fragment,null)},cY=mY;var uY=()=>{let[e,t]=useState(null),o=_o();return useEffect(()=>{e&&(o.error({content:e}),t(null));},[e]),[t]},PP=uY;var yY=m.div`
|
|
2637
2637
|
margin-top: 8px;
|
|
2638
2638
|
color: ${({theme:e})=>e.palette.alert.main};
|
|
2639
2639
|
${({theme:e})=>e.typography.caption}
|
|
@@ -2708,7 +2708,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
2708
2708
|
min-width: 100px;
|
|
2709
2709
|
margin-left: 0;
|
|
2710
2710
|
`};
|
|
2711
|
-
`,zP=m(
|
|
2711
|
+
`,zP=m(ni)`
|
|
2712
2712
|
button {
|
|
2713
2713
|
width: 100%;
|
|
2714
2714
|
}
|
|
@@ -2928,7 +2928,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
2928
2928
|
transform: none !important;
|
|
2929
2929
|
position: absolute !important;
|
|
2930
2930
|
top: 45px !important;
|
|
2931
|
-
`,tR=({user:e,communities:t,hasMoreCommunities:o,loadMoreCommunities:r,currentTargetId:n,onChange:i,children:a})=>{let s=useRef(null),[l,d]=useState(!1),p=()=>d(!0),u=()=>d(!1),g=se({fileId:e.avatarFileId}),f=useCallback(()=>{r==null||r();},[r]),y=R.createElement(
|
|
2931
|
+
`,tR=({user:e,communities:t,hasMoreCommunities:o,loadMoreCommunities:r,currentTargetId:n,onChange:i,children:a})=>{let s=useRef(null),[l,d]=useState(!1),p=()=>d(!0),u=()=>d(!1),g=se({fileId:e.avatarFileId}),f=useCallback(()=>{r==null||r();},[r]),y=R.createElement(ri,null,R.createElement(Go,{active:e.userId===n,onClick:()=>{i({targetId:e.userId,targetType:"user"}),u();}},R.createElement(Op,{size:"tiny",avatar:e.avatarCustomUrl||g,backgroundImage:Se})," ",R.createElement(FormattedMessage,{id:"post.myTimeline"})),R.createElement(XY,null,R.createElement(FormattedMessage,{id:"post.community"})),R.createElement(YY,null,R.createElement(WY,{dataLength:t.length,next:()=>f(),hasMore:o||!1,height:M_,loader:R.createElement(RY,null,R.createElement(FormattedMessage,{id:"loading"})),scrollThreshold:qY},t.map(v=>R.createElement(w_,{key:v.communityId,"data-qa-anchor":"post-creator-post-target-community-item",community:v,currentTargetId:n,onChange:i,onClose:u})))));return R.createElement("div",{ref:s,style:{position:"relative"}},R.createElement(eR,{isOpen:l,positions:["bottom"],align:"start",content:y,parentElement:s.current||void 0,onClickOutside:u},R.createElement(JY,{onClick:p},a," ",R.createElement(KY,{"data-qa-anchor":"post-creator-target-selector"}))))},P_=e=>{let t=W("PostTargetSelector");return t?t(e):R.createElement(tR,c({},e))};var oR=m(gp)`
|
|
2932
2932
|
${({uploadLoading:e})=>e&&"cursor: wait !important;"}
|
|
2933
2933
|
${({disabled:e,theme:t})=>e&&`color: ${t.palette.neutral.shade2};`}
|
|
2934
2934
|
`,rR=({fileUploadDisabled:e,imageUploadDisabled:t,videoUploadDisabled:o,onChangeImages:r,onChangeVideos:n,onChangeFiles:i,uploadLoading:a,onMaxFilesLimit:s,onFileSizeLimit:l,fileLimitRemaining:d,fileInputRef:p})=>R.createElement(R.Fragment,null,R.createElement(oR,{"data-qa-anchor":"post-creator-image-attachment-button",disabled:t,uploadLoading:a,fileLimitRemaining:d,mimeType:"image/*",multiple:!0,onChange:r,onMaxFilesLimit:s,onFileSizeLimit:l,fileInputRef:p},R.createElement(M2,null))),__=rR;var nR=m(Oa)`
|
|
@@ -2992,7 +2992,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
2992
2992
|
background: none;
|
|
2993
2993
|
border: none;
|
|
2994
2994
|
padding: 0;
|
|
2995
|
-
`;m(u4)``;var fR=({targetId:e,targetType:t})=>{let[o,r]=useState(null),[n,i]=useState(null),a=useRef(null);return useEffect(()=>{if(!(e==null||e===""))return a.current&&a.current(),(t==="communityFeed"||t==="community")&&(a.current=CommunityRepository.getCommunity(e,s=>{r(s.data);})),a.current=UserRepository.getUser(e,s=>{i(s.data);}),()=>{var s;(s=a.current)==null||s.call(a);}},[e,t]),{community:o,user:n}},yR=10,hR=({className:e="",targetType:t,targetId:o,enablePostTargetPicker:r,communities:n=[],placeholder:i="What's going on...",hasMoreCommunities:a,loadMoreCommunities:s,onCreateSuccess:l,maxFiles:d=yR})=>{var
|
|
2995
|
+
`;m(u4)``;var fR=({targetId:e,targetType:t})=>{let[o,r]=useState(null),[n,i]=useState(null),a=useRef(null);return useEffect(()=>{if(!(e==null||e===""))return a.current&&a.current(),(t==="communityFeed"||t==="community")&&(a.current=CommunityRepository.getCommunity(e,s=>{r(s.data);})),a.current=UserRepository.getUser(e,s=>{i(s.data);}),()=>{var s;(s=a.current)==null||s.call(a);}},[e,t]),{community:o,user:n}},yR=10,hR=({className:e="",targetType:t,targetId:o,enablePostTargetPicker:r,communities:n=[],placeholder:i="What's going on...",hasMoreCommunities:a,loadMoreCommunities:s,onCreateSuccess:l,maxFiles:d=yR})=>{var Ma,rt,In,Ke,to;let{currentUserId:p,client:u}=J(),{setNavigationBlocker:g}=X(),f=re(p),{info:y}=Pe(),v=Ce(),[C,h]=useState(null);(t==="global"||t==="myFeed")&&(t="user",o=p||"");let [x,b]=useState({targetType:t,targetId:o}),{user:M,community:I}=fR({targetId:x.targetId,targetType:x.targetType});qi(I==null?void 0:I.communityId);Rs({post:C,community:I}),useEffect(()=>{b({targetType:t,targetId:o});},[t,o]);se({fileId:(Ma=f==null?void 0:f.avatar)==null?void 0:Ma.fileUrl});let [L,D]=useState([]),[U,Z]=useState([]),[B,$]=useState([]),[G,q]=useState([]),[z,H]=useState([]),[F,j]=useState([]),[Q,k]=useState(!1),[V]=PP(),ae=useRef(null),[oe,be]=useState(!1),pe=()=>{y({title:R.createElement(FormattedMessage,{id:"postCreator.unableToPost"}),content:R.createElement(FormattedMessage,{id:"postCreator.overCharacter"}),okText:R.createElement(FormattedMessage,{id:"postCreator.done"}),type:"info"});},We=useRef(null),vt=()=>{var Je;(Je=ae.current)==null||Je.dispatchCommand(CLEAR_EDITOR_COMMAND,void 0),ir({text:"",mentioned:[],mentionees:[]});};function Vt(Je){return _(this,null,function*(){var oo,Di;if(x.targetId)try{be(!0);let Ns=(yield PostRepository.createPost(Je)).data;if(l==null||l(Ns),vt(),D([]),Z([]),$([]),q([]),H([]),j([]),I){let jF=(oo=u==null?void 0:u.hasPermission(dr.ReviewCommunityPost).community(I.communityId))!=null?oo:!1;I.postSetting===CommunityPostSettings.ADMIN_REVIEW_POST_REQUIRED&&!jF&&v.success({content:R.createElement(FormattedMessage,{id:"post.success.submittedToReview"})});}}catch(ar){ar instanceof Error&&(ar.message===uo.CONTAIN_BLOCKED_WORD?v.error({content:R.createElement(FormattedMessage,{id:"notification.error.blockedWord"})}):ar.message===uo.NOT_INCLUDE_WHITELIST_LINK?v.error({content:R.createElement(FormattedMessage,{id:"notification.error.whitelistLink"})}):v.error({content:((Di=ar.message.split(":"))==null?void 0:Di[1])||ar.message}));}finally{be(!1);}})}let jt=useRef(null),[De,ir]=useState({text:"",mentioned:[],mentionees:[]});function Dr(){return _(this,null,function*(){var ar;if(!x.targetId)return;let Je={},oo=[];if(De.text&&(Je.text=De.text),L.length&&oo.push(...L.map(Ns=>({fileId:Ns.fileId,type:FileType.IMAGE}))),U.length&&oo.push(...U.map(Ns=>({fileId:Ns.fileId,type:FileType.VIDEO}))),B.length&&oo.push(...B.map(Ns=>({fileId:Ns.fileId,type:FileType.FILE}))),(ar=Je.text)!=null&&ar.length&&Je.text.length>5e4){pe();return}let Di={targetId:x.targetId,targetType:x.targetType,data:Je,dataType:"text",attachments:oo,metadata:{mentioned:De.mentioned},mentionees:De.mentionees};return Vt(Di)})}let qe=()=>{v.info({content:R.createElement(FormattedMessage,{id:"upload.attachmentLimit",values:{maxFiles:d}})});},Rr=()=>{v.info({content:R.createElement(FormattedMessage,{id:"upload.fileSizeLimit"})});},bn=x.targetType==="community"?mr:Se,Hr=R.createElement(T_,{avatar:(In=(rt=f==null?void 0:f.avatar)==null?void 0:rt.fileUrl)!=null?In:void 0,backgroundImage:bn}),en=!De.text&&L.length===0&&U.length===0&&B.length===0||Q||oe,ce=!(!De.text&&L.length===0&&U.length===0&&B.length===0),ue=Je=>{ir(oo=>E(c({},oo),{mentioned:Je.mentioned,text:Je.text,mentionees:Je.mentionees}));};useEffect(()=>{ce?g==null||g({title:R.createElement(FormattedMessage,{id:"post.discard.title"}),content:R.createElement(FormattedMessage,{id:"post.discard.content"}),okText:R.createElement(FormattedMessage,{id:"general.action.discard"}),onOk:()=>{vt(),D([]),Z([]),$([]),q([]),H([]),j([]),g==null||g(null);}}):g==null||g(null);},[ce,g]);let [tn,Uo]=useState(!1),Li=(Ke=x==null?void 0:x.targetType)!=null?Ke:t,Ai=(to=x==null?void 0:x.targetId)!=null?to:o;return R.createElement(k_,{className:cr("postComposeBar",e)},tn&&R.createElement(b_,{targetId:Ai||void 0,targetType:Li,onCreatePoll:(Je,oo,Di,ar)=>_(void 0,null,function*(){Ai&&Vt({targetId:Ai,targetType:Li,data:{pollId:Je,text:oo},dataType:"poll",mentionees:Di,metadata:ar});}),onClose:()=>Uo(!1)}),r&&f?R.createElement(P_,{user:f,communities:n,hasMoreCommunities:a,loadMoreCommunities:s,currentTargetId:x.targetId,onChange:b},Hr):Hr,R.createElement(N_,null,R.createElement(L_,null,R.createElement(A_,{ref:jt},R.createElement(B_,null,R.createElement(Wi,{editorRef:ae,placeholder:"What's going on...",communityId:t==="community"?o:void 0,onChange:ue,mentionContainer:jt.current,dataValue:{data:{text:De.text},metadata:{mentioned:De.mentioned},mentionees:De.mentionees}})),R.createElement(B7,null,R.createElement(E7,{files:G,uploadedFiles:L,uploadLoading:Q,onLoadingChange:k,onChange:({uploaded:Je,uploading:oo})=>{D(Je),q(oo);},onError:V,fileInputRef:We})),R.createElement(__,{imageUploadDisabled:B.length>0||U.length>0||Q,videoUploadDisabled:B.length>0||L.length>0||Q,fileUploadDisabled:L.length>0||U.length>0||Q,fileLimitRemaining:d-B.length-L.length-U.length,uploadLoading:Q,onChangeImages:Je=>q(Je),onChangeVideos:H,onChangeFiles:j,onMaxFilesLimit:qe,onFileSizeLimit:Rr,fileInputRef:We})),G.length>0||L.length>0?R.createElement(B7,null,R.createElement(E7,{files:G,uploadedFiles:L,uploadLoading:Q,onLoadingChange:k,onChange:({uploaded:Je,uploading:oo})=>{D(Je),q(oo);},onError:V,fileInputRef:We})):null),R.createElement(S_,{"data-qa-anchor":"post-creator-footer"},R.createElement(E_,{disabled:en,"data-qa-anchor":"post-creator-post-button",onClick:Dr},R.createElement(FormattedMessage,{id:"post"})))))},ac=memo(hR);var xR=({post:e,className:t,hidePostTarget:o,readonly:r,onDeleted:n})=>{var x;let i=re(e==null?void 0:e.postedUserId),a=se({fileId:i==null?void 0:i.avatarFileId,imageSize:"small"}),s=Va(e==null?void 0:e.children),{userRoles:l}=J(),d=zw(e==null?void 0:e.dataType),{currentUserId:p}=J(),u=(s||[]).find(b=>b.dataType==="poll"),g=sp((x=u==null?void 0:u.data)==null?void 0:x.pollId),f=(g==null?void 0:g.status)==="closed",y=()=>_(void 0,null,function*(){g!=null&&(yield PollRepository.closePoll(g.pollId));}),v=()=>_(void 0,null,function*(){e!=null&&(yield PostRepository.deletePost(e.postId),n==null||n(e.postId));}),C=()=>_(void 0,null,function*(){e!=null&&(yield PostRepository.approvePost(e.postId));}),h=()=>_(void 0,null,function*(){e!=null&&(yield PostRepository.declinePost(e.postId));});return e==null||d==null?R.createElement(vr,{loading:!0}):R.createElement(R.Fragment,null,d({childrenPosts:s||[],handleClosePoll:y,isPollClosed:f,avatarFileUrl:a,user:i,poll:g,className:t,currentUserId:p||void 0,hidePostTarget:o,post:e,userRoles:l,readonly:r,handleApprovePost:C,handleDeclinePost:h,handleDeletePost:v}))},qa=memo(e=>{let t=W("Post");return t?t(e):R.createElement(xR,c({},e))});function bR(e){return R.createElement("svg",c({width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M14.3672 9.66406C17.5312 9.10156 20.8359 10.1562 23.1562 12.4766L23.9297 13.25L24.7734 12.4766C27.0938 10.1562 30.3984 9.10156 33.5625 9.66406C38.4141 10.4375 42 14.6562 42 19.5781V19.9297C42 22.8828 40.7344 25.6953 38.625 27.6641L25.8984 39.5469C25.4062 40.0391 24.7031 40.25 24 40.25C23.2266 40.25 22.5234 40.0391 22.0312 39.5469L9.30469 27.6641C7.19531 25.6953 6 22.8828 6 19.9297V19.5781C6 14.6562 9.51562 10.4375 14.3672 9.66406ZM23.9297 38C24.1406 38 24.2812 38 24.3516 37.8594L37.0781 25.9766C38.7656 24.4297 39.75 22.25 39.75 19.9297V19.5781C39.75 15.7109 36.9375 12.4766 33.2109 11.8438C30.6797 11.4219 28.1484 12.2656 26.3906 14.0234L25.5469 14.8672C25.4766 14.9375 25.4766 14.9375 25.4062 15.0078L28.2188 18.1719C28.4297 18.4531 28.5 18.7344 28.4297 19.0859C28.3594 19.4375 28.2188 19.7188 27.8672 19.8594L21.1875 23.7266L25.9688 29.4219C26.3203 29.9141 26.3203 30.6172 25.8281 31.0391C25.3359 31.3906 24.6328 31.3203 24.2109 30.8984L18.5859 24.1484C18.375 23.8672 18.3047 23.5156 18.375 23.2344C18.4453 22.8828 18.5859 22.6016 18.9375 22.4609L25.6172 18.5938L21.9609 14.5156H22.0312L21.5391 14.0234C19.7812 12.2656 17.25 11.4219 14.7188 11.8438C10.9922 12.4766 8.17969 15.7109 8.17969 19.5781V19.9297C8.17969 22.25 9.16406 24.4297 10.8516 25.9766L23.5781 37.8594C23.6484 38 23.7891 38 23.9297 38Z",fill:"#6E6E6E"}))}var H_=bR;var IR=m(Y)`
|
|
2996
2996
|
font-size: 14px;
|
|
2997
2997
|
margin-top: 24px;
|
|
2998
2998
|
border-radius: 100px;
|
|
@@ -3012,7 +3012,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3012
3012
|
color: #6e6e6e;
|
|
3013
3013
|
font-size: 14px;
|
|
3014
3014
|
font-weight: 500;
|
|
3015
|
-
`,PR=m(H_).attrs({width:48,height:48})``,_R=e=>{switch(e){case"globalFeed":case"global":return ()=>"feed.emptyFeed";case"communityFeed":case"community":return (t,o)=>o==="reviewing"?"feed.emptyCommunityReviewingFeed":t?"feed.emptyJoinedCommunityPublicFeedTitle":"feed.emptyCommunityPublicFeed";case"userFeed":case"user":return ()=>"feed.emptyUserFeed";case"myFeed":return ()=>"feed.emptyJoinedCommunityPublicFeedTitle";case"myCommunities":return ()=>"feed.emptyMyCommunities";default:return ()=>"feed.emptyFeed"}},TR=e=>{switch(e){case"myCommunities":return "feed.emptyMyCommunitiesBody";default:return "feed.emptyJoinedCommunityPublicFeedBody"}},kR=({targetType:e,canPost:t=!1,className:o=void 0,feedType:r=void 0,goToExplore:n})=>{var i;return R.createElement(
|
|
3015
|
+
`,PR=m(H_).attrs({width:48,height:48})``,_R=e=>{switch(e){case"globalFeed":case"global":return ()=>"feed.emptyFeed";case"communityFeed":case"community":return (t,o)=>o==="reviewing"?"feed.emptyCommunityReviewingFeed":t?"feed.emptyJoinedCommunityPublicFeedTitle":"feed.emptyCommunityPublicFeed";case"userFeed":case"user":return ()=>"feed.emptyUserFeed";case"myFeed":return ()=>"feed.emptyJoinedCommunityPublicFeedTitle";case"myCommunities":return ()=>"feed.emptyMyCommunities";default:return ()=>"feed.emptyFeed"}},TR=e=>{switch(e){case"myCommunities":return "feed.emptyMyCommunitiesBody";default:return "feed.emptyJoinedCommunityPublicFeedBody"}},kR=({targetType:e,canPost:t=!1,className:o=void 0,feedType:r=void 0,goToExplore:n})=>{var i;return R.createElement(oi,{className:o,title:R.createElement(wR,null,R.createElement(FormattedMessage,{id:(i=_R(e))==null?void 0:i(t,r)})),description:e==="user"?null:R.createElement(MR,null,R.createElement(FormattedMessage,{id:TR(e)})),icon:R.createElement(PR,null)},n&&R.createElement(IR,{onClick:n},R.createElement(FormattedMessage,{id:"community.exploreCommunities"})))},i1=e=>{let t=W("EmptyFeed");return t?t(e):R.createElement(kR,c({},e))};var ER=K`
|
|
3016
3016
|
border-radius: 8px;
|
|
3017
3017
|
> :not(:first-child) {
|
|
3018
3018
|
margin-top: 20px;
|
|
@@ -3044,7 +3044,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3044
3044
|
display: flex;
|
|
3045
3045
|
flex-direction: column;
|
|
3046
3046
|
align-items: center;
|
|
3047
|
-
`;m(
|
|
3047
|
+
`;m(Oi).attrs({width:40,height:40})`
|
|
3048
3048
|
fill: ${({theme:e})=>e.palette.base.shade2};
|
|
3049
3049
|
`;m.div`
|
|
3050
3050
|
font-weight: 600;
|
|
@@ -3064,7 +3064,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3064
3064
|
${({theme:e})=>e.typography.body};
|
|
3065
3065
|
`,O_=m.div`
|
|
3066
3066
|
margin-bottom: 12px;
|
|
3067
|
-
`,z_=m(
|
|
3067
|
+
`,z_=m(Oi).attrs({width:40,height:40})`
|
|
3068
3068
|
fill: ${({theme:e})=>e.palette.base.shade2};
|
|
3069
3069
|
`,U_=m.div`
|
|
3070
3070
|
font-weight: bold;
|
|
@@ -3194,7 +3194,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3194
3194
|
gap: 16px;
|
|
3195
3195
|
cursor: pointer;
|
|
3196
3196
|
z-index: 1;
|
|
3197
|
-
`,ree=
|
|
3197
|
+
`,ree=ka`
|
|
3198
3198
|
0% {
|
|
3199
3199
|
opacity: 0;
|
|
3200
3200
|
transform: translateY(0px);
|
|
@@ -3402,7 +3402,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3402
3402
|
letter-spacing: 0.03px;
|
|
3403
3403
|
`;var gee=e=>R.createElement("svg",c({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M16.6562 8.5625C16.5391 8.48438 16.4609 8.40625 16.4609 8.28906C16.4609 8.13281 16.5391 8.05469 16.6562 7.97656L19 7L19.9375 4.69531C20.0156 4.57812 20.0938 4.5 20.2109 4.5C20.3672 4.5 20.4453 4.57812 20.5234 4.69531L21.5 7L23.8047 7.97656C23.9219 8.05469 24 8.13281 24 8.25C24 8.40625 23.9219 8.48438 23.8047 8.5625L21.5 9.5L20.5234 11.8438C20.4453 11.9609 20.3672 12.0391 20.25 12.0391C20.0938 12.0391 20.0156 11.9609 19.9375 11.8438L19 9.5L16.6562 8.5625ZM23.8047 20.4766C23.9219 20.5547 24 20.6328 24 20.75C24 20.9062 23.9219 20.9844 23.8047 21.0625L21.5 22L20.5234 24.3438C20.4453 24.4609 20.3672 24.5391 20.25 24.5391C20.0938 24.5391 20.0156 24.4609 19.9375 24.3438L19 22L16.6562 21.0625C16.5391 20.9844 16.4609 20.9062 16.4609 20.7891C16.4609 20.6328 16.5391 20.5547 16.6562 20.4766L19 19.5L19.9375 17.1953C20.0156 17.0781 20.0938 17 20.2109 17C20.3672 17 20.4453 17.0781 20.5234 17.1953L21.5 19.5L23.8047 20.4766ZM19 14.5C18.9609 14.8906 18.7656 15.2031 18.4531 15.3594L14.3516 17.3906L12.3203 21.4922C12.1641 21.8047 11.8516 22.0391 11.5 22.0391C11.1094 22.0391 10.7969 21.8047 10.6406 21.4922L8.60938 17.3906L4.50781 15.3594C4.19531 15.2031 3.96094 14.8906 3.96094 14.5391C3.96094 14.1484 4.19531 13.8359 4.50781 13.6797L8.60938 11.6484L10.6406 7.54688C10.9531 6.92188 12.0078 6.92188 12.3203 7.54688L14.3516 11.6484L18.4531 13.6797C18.7656 13.8359 18.9609 14.1484 19 14.5ZM13.2578 15.8672L15.9531 14.5L13.2578 13.1719C13.0625 13.0938 12.9062 12.9375 12.8281 12.7422L11.5 10.0469L10.1328 12.7422C10.0547 12.9375 9.89844 13.0938 9.70312 13.1719L7.00781 14.5L9.70312 15.8672C9.89844 15.9453 10.0547 16.1016 10.1328 16.2969L11.5 18.9922L12.8281 16.2969C12.9062 16.1016 13.0625 15.9453 13.2578 15.8672Z",fill:"black"})),TT=gee;var fee=m($4).attrs({width:20,height:20})``,yee=m(TT).attrs({width:28,height:28})``,hee=({shouldHideExplore:e,children:t})=>{var p;let{onChangePage:o,page:r}=X(),{onClickUser:n}=X(),{currentUserId:i}=J(),{isLoading:a,isAnonymousUser:s,isNoNicknameUser:l}=Ee(),d=re(i);return a?null:R.createElement(Zp,null,R.createElement(MT,null,R.createElement(PT,null,R.createElement(FormattedMessage,{id:"sidesectioncommunity.community"})),R.createElement(Kp,{isHideUser:!0})),!s&&!l&&R.createElement(Qp,{"data-qa-anchor":"side-section-community-side-menu-action-item-user-feed-button",icon:R.createElement(ge,{size:"small",avatar:(p=d==null?void 0:d.avatar)==null?void 0:p.fileUrl,backgroundImage:Se}),active:r.type==="userfeed",onClick:()=>n(i)},R.createElement(FormattedMessage,{id:"sidesectioncommunity.userProfile"})),!e&&R.createElement(Qp,{"data-qa-anchor":"side-section-community-side-menu-action-item-explore-button",icon:R.createElement(yee,null),active:r.type==="explore",onClick:()=>o("explore")},R.createElement(FormattedMessage,{id:"sidesectioncommunity.explore"})),!s&&!l&&R.createElement(Qp,{"data-qa-anchor":"side-section-community-side-menu-action-item-news-feed-button",icon:R.createElement(fee,null),active:r.type==="newsfeed",onClick:()=>o("newsfeed")},R.createElement(FormattedMessage,{id:"sidesectioncommunity.newfeed"})),t)},kT=hee;var ST=m.span`
|
|
3404
3404
|
${({theme:e,highlight:t})=>t?e.typography.bodyBold:e.typography.body}
|
|
3405
|
-
`,Cee=({query:e,text:t})=>{if(e==null||(e==null?void 0:e.length)===0)return R.createElement(ST,null,t);let o=t.split(new RegExp(`(${e})`,"gi"));return R.createElement("span",null,o.map((r,n)=>R.createElement(ST,{key:`#${r}#${n}`,highlight:r.toLowerCase()===e.toLowerCase()},r)))},V7=Cee;var NT=m(
|
|
3405
|
+
`,Cee=({query:e,text:t})=>{if(e==null||(e==null?void 0:e.length)===0)return R.createElement(ST,null,t);let o=t.split(new RegExp(`(${e})`,"gi"));return R.createElement("span",null,o.map((r,n)=>R.createElement(ST,{key:`#${r}#${n}`,highlight:r.toLowerCase()===e.toLowerCase()},r)))},V7=Cee;var NT=m(Oi).attrs({width:16,height:16})`
|
|
3406
3406
|
margin-right: 8px;
|
|
3407
3407
|
`,ET=m(r0).attrs({width:16,height:16})`
|
|
3408
3408
|
margin-left: 8px;
|
|
@@ -3447,7 +3447,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3447
3447
|
font-size: 12px;
|
|
3448
3448
|
font-weight: 400;
|
|
3449
3449
|
margin-bottom: 4px;
|
|
3450
|
-
`;var Mee=({"data-qa-anchor":e="",isActive:t=!1,isOfficial:o=!1,isPublic:r=!1,isTitle:n=!1,isSearchResult:i=!1,name:a,searchInput:s="",className:l="",loading:d=!1,truncate:p,memberCount:u,categoryIds:g,transparentCategoryTag:f=!1,badgeTheme:y="primary"})=>{if(i)return R.createElement(V7,{text:a||"",query:s});return R.createElement("div",null,R.createElement(BT,{className:l,isActive:t,isTitle:n},d?R.createElement(j7,null,R.createElement(we,{width:120,style:{fontSize:12}})):R.createElement(pw,{lines:p},R.createElement(j7,{"data-qa-anchor":`${e}-community-name`,title:a},R.createElement(R.Fragment,null,!r&&R.createElement(NT,{"data-qa-anchor":`${e}-private-icon`}),a))),!d&&o&&R.createElement(ET,{color:y==="outline"?"#fff":"#f04c24"})))},
|
|
3450
|
+
`;var Mee=({"data-qa-anchor":e="",isActive:t=!1,isOfficial:o=!1,isPublic:r=!1,isTitle:n=!1,isSearchResult:i=!1,name:a,searchInput:s="",className:l="",loading:d=!1,truncate:p,memberCount:u,categoryIds:g,transparentCategoryTag:f=!1,badgeTheme:y="primary"})=>{if(i)return R.createElement(V7,{text:a||"",query:s});return R.createElement("div",null,R.createElement(BT,{className:l,isActive:t,isTitle:n},d?R.createElement(j7,null,R.createElement(we,{width:120,style:{fontSize:12}})):R.createElement(pw,{lines:p},R.createElement(j7,{"data-qa-anchor":`${e}-community-name`,title:a},R.createElement(R.Fragment,null,!r&&R.createElement(NT,{"data-qa-anchor":`${e}-private-icon`}),a))),!d&&o&&R.createElement(ET,{color:y==="outline"?"#fff":"#f04c24"})))},Ri=e=>{let t=W("CommunityName");return t?t(e):R.createElement(Mee,c({},e))},Pee=e=>{let[t,o]=useState(null);return useEffect(()=>{function r(){return _(this,null,function*(){var i;if(e==null)return;let n=yield CategoryRepository.getCategory.locally(e);o((i=n==null?void 0:n.data)!=null?i:null);})}r();},[e]),t};R.memo(({categoryId:e,transparentCategoryTag:t})=>{let o=Pee(e),r=useMemo(()=>o==null?void 0:o.name,[o]);return R.createElement(LT,{transparent:t},R.createElement(AT,{transparent:t},r))});var DT=m.a.attrs(e=>e)`
|
|
3451
3451
|
display: grid;
|
|
3452
3452
|
grid-template-areas: 'avatar title' 'avatar children';
|
|
3453
3453
|
grid-template-columns: min-content auto;
|
|
@@ -3476,11 +3476,11 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3476
3476
|
grid-area: avatar;
|
|
3477
3477
|
`,FT=m.div`
|
|
3478
3478
|
grid-area: children;
|
|
3479
|
-
`;var OT={community__category:"N"};var zT={communityCategoryName:"Va"};function Ka({pageId:e="*",componentId:t="*",categoryName:o}){let r="community_category_name",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:R.createElement("div",{className:zT.communityCategoryName,style:a,"data-qa-anchor":n},o)}var Ln=({pageId:e="*",componentId:t="*",categories:o,maxCategories:r})=>{let n="community_category",{config:i,themeStyles:a,accessibilityId:s,isExcluded:l}=A({pageId:e,componentId:t,elementId:n});if(l)return null;let d=o.slice(0,2),p=Math.max(0,o.length-d.length);return R.createElement("div",{"data-qa-anchor":s,style:a,className:OT.community__category},typeof r=="number"?R.createElement(R.Fragment,null,d.map(u=>R.createElement(Ka,{categoryName:u.name})),p>0&&R.createElement(Ka,{categoryName:`+${p}`})):o.map(u=>R.createElement(Ka,{key:u.categoryId,categoryName:u.name})))};var UT=e=>{let r=dt({fetcher:ReactionRepository.getReactions,params:e,shouldCall:!!e.referenceId&&!!e.referenceType}),{items:t}=r,o=P(r,["items"]);return c({reactions:t},o)};var Yl,Rl,Xp,$T,mc,G7,l1=class l1{constructor(){wo(this,Xp);wo(this,mc);wo(this,Yl,void 0);Ma(this,Yl,new Map);}static get instance(){return $o(l1,Rl)||Ma(l1,Rl,new l1),$o(l1,Rl)}hasReachedLimit(t){let o=Or(this,mc,G7).call(this,t);return $o(this,Yl).get(t)===o}markSeen(t){$o(this,Yl).set(t,Or(this,mc,G7).call(this,t));}};Yl=new WeakMap,Rl=new WeakMap,Xp=new WeakSet,$T=function(t){let o=$r.instance.getAdFrequencyByPlacement(t);return o==null||o.type!=="time-window"?0:o.value},mc=new WeakSet,G7=function(t){let o=dn(),r=o.startOf("day").diff(o,"minute"),n=Math.ceil(r/Or(this,Xp,$T).call(this,t));return `${o.format("DD-MM-YYYY")}-${n}`},wo(l1,Rl,void 0);var em=l1;var tm,cc,dc,Z7,m1=class m1{constructor(){wo(this,dc);wo(this,cc,"amity.seenRecencyCache");}static get instance(){return $o(m1,tm)||Ma(m1,tm,new m1),$o(m1,tm)}getSeenRecencyByAdId(t){return Or(this,dc,Z7).call(this)[t]}setSeenRecencyCache(t,o){let r=Or(this,dc,Z7).call(this);r[t]=o,window.localStorage.setItem($o(this,cc),JSON.stringify(r));}};tm=new WeakMap,cc=new WeakMap,dc=new WeakSet,Z7=function(){return JSON.parse(window.localStorage.getItem($o(this,cc))||"{}")},wo(m1,tm,void 0);var Yp=m1,om,pc,Q7,c1=class c1{constructor(){wo(this,pc);this.isLoading=!0;this.ads=[];this.settings=null;this.subscribers=[];Client.onSessionStateChange(t=>_(this,null,function*(){if(t==="established"){let o=yield AdRepository.getNetworkAds();this.ads=o.ads,this.settings=o.settings,this.subscribers.forEach(r=>r(o)),this.isLoading=!1;}else t==="terminated"&&(this.ads=[],this.settings=null,this.subscribers.forEach(o=>o(null)));}));}static get instance(){return $o(c1,om)||Ma(c1,om,new c1),$o(c1,om)}onNetworkAdsData(t){!this.isLoading&&this.ads.length>0&&this.settings&&t({ads:this.ads,settings:this.settings}),this.subscribers.push(t);}getLastSeen(t){return Yp.instance.getSeenRecencyByAdId(t)}markSeen(t,o){var r;Yp.instance.setSeenRecencyCache(t.adId,Date.now()),((r=Or(this,pc,Q7).call(this,o))==null?void 0:r.type)==="time-window"&&em.instance.markSeen(o),t.analytics.markAsSeen(o);}markClicked(t,o){t.analytics.markLinkAsClicked(o);}getAdFrequencyByPlacement(t){return Or(this,pc,Q7).call(this,t)}};om=new WeakMap,pc=new WeakSet,Q7=function(t){if(!this.settings)return null;switch(t){case"feed":return this.settings.frequency.feed;case"comment":return this.settings.frequency.comment;case"story":return this.settings.frequency.story;default:return null}},wo(c1,om,void 0);var $r=c1;var rm,e3,VT,t3,jT,o3,GT,d1=class d1{constructor(){wo(this,e3);wo(this,t3);wo(this,o3);}static get instance(){return $o(d1,rm)||Ma(d1,rm,new d1),$o(d1,rm)}recommendedAds({ads:t,placement:o,count:r,communityId:n}){let i=Or(this,e3,VT).call(this,t),a=new Map;return t.forEach(s=>{var u;let l=(((u=s.targets)==null?void 0:u.communityIds)||[]).includes(n||"")?1:0,d=i.get(s.adId);if(d==null)return;let p=l+Math.pow(Math.E,2*d);a.set(s.adId,p);}),Or(this,o3,GT).call(this,{ads:t,scores:a,count:r})}};rm=new WeakMap,e3=new WeakSet,VT=function(t){let o=t.sort((a,s)=>$r.instance.getLastSeen(s.adId)-$r.instance.getLastSeen(a.adId)),r=new Map,n=$r.instance.getLastSeen(o[o.length-1].adId);return $r.instance.getLastSeen(o[0].adId)===n?o.forEach(a=>{r.set(a.adId,1);}):o.forEach((a,s)=>{let l=s/o.length;r.set(a.adId,l);}),r},t3=new WeakSet,jT=function(t){let o=0,r=Math.random();for(let n=0;n<t.length;n++)if(o+=t[n],r<o)return n;return t.length-1},o3=new WeakSet,GT=function({ads:t,scores:o,count:r}){let n=[...t],i=[];for(;i.length<r&&n.length>0;){let a=n.reduce((p,u)=>p+(o.get(u.adId)||0),0),s=n.map(p=>(o.get(p.adId)||0)/a),l=s.map(p=>p/s.reduce((u,g)=>u+g,0)),d=Or(this,t3,jT).call(this,l);i.push(n[d]),n.splice(d,1);}return i},wo(d1,rm,void 0);var Rp=d1;var QT=createContext({isLoading:!0,ads:[],settings:null,saveItemsPagination:()=>{},getItemsPaginationCache:()=>{}});var W7=()=>useContext(QT).settings,WT=({count:e,placement:t,communityId:o})=>{let n=useContext(QT).ads,[i,a]=useState([]),s=W7(),l=$r.instance.getAdFrequencyByPlacement(t);return useEffect(()=>{s!=null&&s.enabled&&((l==null?void 0:l.type)==="time-window"&&em.instance.hasReachedLimit(t)||a(Rp.instance.recommendedAds({ads:n,placement:t,count:e,communityId:o})));},[n,e,t,o]),i};var Fee=({placement:e,pageSize:t,communityId:o,getItemId:r})=>{let n=W7(),[i,a]=useState(0),[s,l]=useState([]),[d,p]=useState(0),u=$r.instance.getAdFrequencyByPlacement(e),g=(u==null?void 0:u.type)==="fixed"?t/u.value:1,f=WT({count:g,placement:e,communityId:o});return {combineItemsWithAds:C=>{if(!(n!=null&&n.enabled))return C;if((u==null?void 0:u.type)==="fixed"){let h=new Set(C.map(Z=>r(Z))),x=s.map(Z=>{let B=r(Z[0]);if(!h.has(B))return null;let $=C.find(G=>r(G)===B);return $?Z.length===1?[$]:[$,Z[1]]:Z}).filter(on),b=x[0],M=(()=>{if(b){let Z=C.findIndex(B=>r(B)===r(b[0]));return Z===-1?0:Z}return 0})(),w=[...(C||[]).slice(0,M).map(Z=>[Z]),...x],N=C.slice(M).filter(Z=>{let B=r(Z);return !w.some($=>r($[0])===B)}),T=i,L=d,D=N.map(Z=>{if(L=L+1,!(L%u.value===0))return [Z];let $=f[T];return T=T+1>f.length-1?0:T+1,[Z,$]});a(T),p(L);let U=[...w,...D];return l([...w,...D]),U.length===0&&(a(0),p(0)),[...w,...D].flatMap(Z=>Z)}else if((u==null?void 0:u.type)==="time-window")return C.length===0?C:[...C.slice(0,1),f[0],...C.slice(1)].filter(on);return C},reset:()=>{a(0),l([]),p(0);}}},uc=({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0,placement:i,communityId:a,pageSize:s,getItemId:l})=>{let{combineItemsWithAds:d}=Fee({placement:i,pageSize:s,communityId:a,getItemId:l}),f=dt({fetcher:e,params:t,config:r,shouldCall:n}),{items:p}=f,u=P(f,["items"]),g=useMemo(()=>d(p).flatMap(y=>y),[p]);return E(c({},u),{items:g})};var Ri=e=>{let r=uc({fetcher:StoryRepository.getActiveStoriesByTarget,params:e,shouldCall:!0,pageSize:10,placement:"story",getItemId:n=>(n==null?void 0:n.storyId)||""}),{items:t}=r,o=P(r,["items"]);return c({stories:t.filter(on)},o)};var J7=e=>{let t=_o(),[o,r]=useState(!1),{data:n,isLoading:i,refetch:a}=useQuery({queryKey:["asc-uikit","CommentRepository","isCommentFlaggedByMe",e],queryFn:()=>CommentRepository.isCommentFlaggedByMe(e),enabled:e!=null});useEffect(()=>{n!=null&&r(n);},[n]);let s=()=>_(void 0,null,function*(){if(e!=null)try{r(!0),yield CommentRepository.flagComment(e);}catch(p){r(!1);}finally{a();}}),l=()=>_(void 0,null,function*(){if(e!=null)try{r(!1),yield CommentRepository.unflagComment(e);}catch(p){r(!0);}finally{a();}});return {isLoading:i,isFlaggedByMe:o,flagComment:s,unflagComment:l,toggleFlagComment:p=>_(void 0,null,function*(){if(e!=null)if(o){if(yield l(),p!=null&&p.onUnFlagSuccss)return p.onUnFlagSuccss();t.success({content:"Comment unreported"});}else {if(yield s(),p!=null&&p.onFlagSuccess)return p.onFlagSuccess();t.success({content:"Comment reported"});}})}};var gc=(i=>(i.MEMBER="member",i.MODERATOR="moderator",i.SUPER_MODERATOR="super-moderator",i.COMMUNITY_MODERATOR="community-moderator",i.CHANNEL_MODERATOR="channel-moderator",i))(gc||{});var{COMMUNITY_MODERATOR:jee}=gc;function nm({communityId:e,shouldCall:t=!0}){let n=dt({fetcher:CommunityRepository.Membership.getMembers,params:{communityId:e,roles:[jee]},shouldCall:!!e&&t}),{items:o}=n,r=P(n,["items"]);return c({moderators:o},r)}var Gee=({community:e})=>{var p,u,g,f;let{currentUserId:t}=J(),{moderators:o}=Wi(e==null?void 0:e.communityId),{client:r}=J(),i=o.find(y=>y.userId===t)!=null;if(e==null)return {isModerator:i,canEdit:!1,canEditPost:!1,canReviewPost:!1,canEditUser:!1};let a=(p=r==null?void 0:r.hasPermission(dr.EditCommunityPermission).community(e.communityId))!=null?p:!1,s=(u=r==null?void 0:r.hasPermission(dr.EditCommunityFeedPostPermission).community(e==null?void 0:e.communityId))!=null?u:!1,l=(g=r==null?void 0:r.hasPermission(dr.ReviewCommunityPost).community(e.communityId))!=null?g:!1,d=(f=r==null?void 0:r.hasPermission(dr.EditCommunityUserPermission).community(e.communityId))!=null?f:!1;return {isModerator:i,canEdit:a,canEditPost:s,canReviewPost:l,canEditUser:d}},Ja=Gee;var qee=e=>{let[t,o]=useState([]);return useEffect(()=>{function r(){return _(this,null,function*(){if(e==null||e.length===0)return;let n=yield Promise.all(e.map(i=>_(this,null,function*(){return (yield CategoryRepository.getCategory(i)).data})));o(n);})}r();},[e]),t},fc=qee;var qT={page:{type:"SocialHomePage",context:{communityId:void 0}},onChangePage:e=>{},onClickCategory:e=>{},onClickCommunity:e=>{},onClickUser:e=>{},onCommunityCreated:e=>{},onEditCommunity:e=>{},onEditUser:e=>{},onMessageUser:e=>{},goToUserProfilePage:e=>{},goToPostDetailPage:(e,t,o)=>{},goToViewStoryPage:e=>{},goToDraftStoryPage:(e,t,o,r)=>{},goToCommunityProfilePage:e=>{},goToSocialGlobalSearchPage:e=>{},goToSelectPostTargetPage:()=>{},goToStoryTargetSelectionPage:()=>{},goToPostComposerPage:()=>{},goToStoryCreationPage:()=>{},goToSocialHomePage:()=>{},goToMyCommunitiesSearchPage:()=>{},setNavigationBlocker:()=>{},onBack:()=>{},onClickStory:(e,t,o)=>{}};process.env.NODE_ENV!=="production"&&(qT={page:{type:"SocialHomePage",context:{communityId:void 0}},onChangePage:e=>console.log(`NavigationContext onChangePage(${e})`),onClickCategory:e=>console.log(`NavigationContext onClickCategory(${e})`),onClickCommunity:e=>console.log(`NavigationContext onClickCommunity(${e})`),onClickUser:e=>console.log(`NavigationContext onClickUser(${e})`),goToViewStoryPage:({targetId:e,storyType:t,targetType:o})=>console.log(`NavigationContext goToViewStoryPage(${e}, ${t}, ${o})`),onCommunityCreated:e=>console.log(`NavigationContext onCommunityCreated(${e})`),onEditCommunity:e=>console.log(`NavigationContext onEditCommunity({${e})`),onEditUser:e=>console.log(`NavigationContext onEditUser(${e})`),onMessageUser:e=>console.log(`NavigationContext onMessageUser(${e})`),onBack:()=>console.log("NavigationContext onBack()"),goToUserProfilePage:e=>console.log(`NavigationContext goToUserProfilePage(${e})`),goToPostDetailPage:(e,t,o)=>console.log(`NavigationContext goToPostDetailPage(${e} ${t} ${o})`),goToCommunityProfilePage:e=>console.log(`NavigationContext goToCommunityProfilePage(${e})`),goToSocialGlobalSearchPage:e=>console.log(`NavigationContext goToSocialGlobalSearchPage(${e})`),goToSelectPostTargetPage:()=>console.log("NavigationContext goToTargetPage()"),goToStoryTargetSelectionPage:()=>console.log("NavigationContext goToStoryTargetSelectionPage()"),goToDraftStoryPage:e=>console.log("NavigationContext goToDraftStoryPage()"),goToPostComposerPage:()=>console.log("NavigationContext goToPostComposerPage()"),goToStoryCreationPage:()=>console.log("NavigationContext goToStoryCreationPage()"),goToSocialHomePage:()=>console.log("NavigationContext goToSocialHomePage()"),goToMyCommunitiesSearchPage:()=>console.log("NavigationContext goToMyCommunitiesSearchPage()"),onClickStory:(e,t,o)=>console.log(`NavigationContext onClickStory(${e}, ${t}, ${o})`)});var Xee=createContext(qT),Be=()=>useContext(Xee);var yc=e=>{let{onEditCommunity:t}=Be(),{community:o}=Pt({communityId:e,shouldCall:!!e}),r=nt({fileId:o==null?void 0:o.avatarFileId,imageSize:"medium"}),{posts:n}=Bn({targetType:"community",targetId:e,feedType:"reviewing"}),i=fc(o==null?void 0:o.categoryIds),{canReview:a,canEdit:s}=Ja({community:o}),l=useMemo(()=>(n==null?void 0:n.length)||0,[n]);return {community:o,reviewingPosts:n,avatarFileUrl:r,communityCategories:i,pendingPostsCount:l,canEditCommunity:s,canReviewCommunityPosts:a,onEditCommunity:t,joinCommunity:()=>e&&CommunityRepository.joinCommunity(e),leaveCommunity:()=>e&&CommunityRepository.leaveCommunity(e),updateCommunity:f=>e&&CommunityRepository.updateCommunity(e,f),closeCommunity:()=>e&&CommunityRepository.deleteCommunity(e)}};function ea({fetcher:e,params:t,callback:o=()=>{},options:r,shouldSubscribe:n=!0,getSubscribedTopic:i}){let{subscribe:a}=lv(),s=useRef(null);return _n({fetcher:e,params:t,callback:l=>{let{error:d,loading:p}=l;if(p)return;if(d)throw d;let{unsubscribe:u}=a({topic:i(l),callback:o});s.current=u;},options:r,shouldCall:n}),useEffect(()=>()=>{var l;(l=s.current)==null||l.call(s);},[s]),{unsubscribe:()=>{var l;return (l=s.current)==null?void 0:l.call(s)}}}function Xa({targetId:e,targetType:t,shouldSubscribe:o=!0,callback:r}){return ea({fetcher:StoryRepository.getActiveStoriesByTarget,params:{targetId:e,targetType:t},callback:r,shouldSubscribe:!!e&&o,getSubscribedTopic:()=>getCommunityStoriesTopic({targetId:e,targetType:t})})}var rte=m.div`
|
|
3479
|
+
`;var OT={community__category:"N"};var zT={communityCategoryName:"Va"};function Ka({pageId:e="*",componentId:t="*",categoryName:o}){let r="community_category_name",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:R.createElement("div",{className:zT.communityCategoryName,style:a,"data-qa-anchor":n},o)}var Ln=({pageId:e="*",componentId:t="*",categories:o,maxCategories:r})=>{let n="community_category",{config:i,themeStyles:a,accessibilityId:s,isExcluded:l}=A({pageId:e,componentId:t,elementId:n});if(l)return null;let d=o.slice(0,2),p=Math.max(0,o.length-d.length);return R.createElement("div",{"data-qa-anchor":s,style:a,className:OT.community__category},typeof r=="number"?R.createElement(R.Fragment,null,d.map(u=>R.createElement(Ka,{categoryName:u.name})),p>0&&R.createElement(Ka,{categoryName:`+${p}`})):o.map(u=>R.createElement(Ka,{key:u.categoryId,categoryName:u.name})))};var UT=e=>{let r=dt({fetcher:ReactionRepository.getReactions,params:e,shouldCall:!!e.referenceId&&!!e.referenceType}),{items:t}=r,o=P(r,["items"]);return c({reactions:t},o)};var Yl,Rl,Xp,$T,mc,G7,l1=class l1{constructor(){wo(this,Xp);wo(this,mc);wo(this,Yl,void 0);Pa(this,Yl,new Map);}static get instance(){return $o(l1,Rl)||Pa(l1,Rl,new l1),$o(l1,Rl)}hasReachedLimit(t){let o=Or(this,mc,G7).call(this,t);return $o(this,Yl).get(t)===o}markSeen(t){$o(this,Yl).set(t,Or(this,mc,G7).call(this,t));}};Yl=new WeakMap,Rl=new WeakMap,Xp=new WeakSet,$T=function(t){let o=$r.instance.getAdFrequencyByPlacement(t);return o==null||o.type!=="time-window"?0:o.value},mc=new WeakSet,G7=function(t){let o=dn(),r=o.startOf("day").diff(o,"minute"),n=Math.ceil(r/Or(this,Xp,$T).call(this,t));return `${o.format("DD-MM-YYYY")}-${n}`},wo(l1,Rl,void 0);var em=l1;var tm,cc,dc,Z7,m1=class m1{constructor(){wo(this,dc);wo(this,cc,"amity.seenRecencyCache");}static get instance(){return $o(m1,tm)||Pa(m1,tm,new m1),$o(m1,tm)}getSeenRecencyByAdId(t){return Or(this,dc,Z7).call(this)[t]}setSeenRecencyCache(t,o){let r=Or(this,dc,Z7).call(this);r[t]=o,window.localStorage.setItem($o(this,cc),JSON.stringify(r));}};tm=new WeakMap,cc=new WeakMap,dc=new WeakSet,Z7=function(){return JSON.parse(window.localStorage.getItem($o(this,cc))||"{}")},wo(m1,tm,void 0);var Yp=m1,om,pc,Q7,c1=class c1{constructor(){wo(this,pc);this.isLoading=!0;this.ads=[];this.settings=null;this.subscribers=[];Client.onSessionStateChange(t=>_(this,null,function*(){if(t==="established"){let o=yield AdRepository.getNetworkAds();this.ads=o.ads,this.settings=o.settings,this.subscribers.forEach(r=>r(o)),this.isLoading=!1;}else t==="terminated"&&(this.ads=[],this.settings=null,this.subscribers.forEach(o=>o(null)));}));}static get instance(){return $o(c1,om)||Pa(c1,om,new c1),$o(c1,om)}onNetworkAdsData(t){!this.isLoading&&this.ads.length>0&&this.settings&&t({ads:this.ads,settings:this.settings}),this.subscribers.push(t);}getLastSeen(t){return Yp.instance.getSeenRecencyByAdId(t)}markSeen(t,o){var r;Yp.instance.setSeenRecencyCache(t.adId,Date.now()),((r=Or(this,pc,Q7).call(this,o))==null?void 0:r.type)==="time-window"&&em.instance.markSeen(o),t.analytics.markAsSeen(o);}markClicked(t,o){t.analytics.markLinkAsClicked(o);}getAdFrequencyByPlacement(t){return Or(this,pc,Q7).call(this,t)}};om=new WeakMap,pc=new WeakSet,Q7=function(t){if(!this.settings)return null;switch(t){case"feed":return this.settings.frequency.feed;case"comment":return this.settings.frequency.comment;case"story":return this.settings.frequency.story;default:return null}},wo(c1,om,void 0);var $r=c1;var rm,e3,VT,t3,jT,o3,GT,d1=class d1{constructor(){wo(this,e3);wo(this,t3);wo(this,o3);}static get instance(){return $o(d1,rm)||Pa(d1,rm,new d1),$o(d1,rm)}recommendedAds({ads:t,placement:o,count:r,communityId:n}){let i=Or(this,e3,VT).call(this,t),a=new Map;return t.forEach(s=>{var u;let l=(((u=s.targets)==null?void 0:u.communityIds)||[]).includes(n||"")?1:0,d=i.get(s.adId);if(d==null)return;let p=l+Math.pow(Math.E,2*d);a.set(s.adId,p);}),Or(this,o3,GT).call(this,{ads:t,scores:a,count:r})}};rm=new WeakMap,e3=new WeakSet,VT=function(t){let o=t.sort((a,s)=>$r.instance.getLastSeen(s.adId)-$r.instance.getLastSeen(a.adId)),r=new Map,n=$r.instance.getLastSeen(o[o.length-1].adId);return $r.instance.getLastSeen(o[0].adId)===n?o.forEach(a=>{r.set(a.adId,1);}):o.forEach((a,s)=>{let l=s/o.length;r.set(a.adId,l);}),r},t3=new WeakSet,jT=function(t){let o=0,r=Math.random();for(let n=0;n<t.length;n++)if(o+=t[n],r<o)return n;return t.length-1},o3=new WeakSet,GT=function({ads:t,scores:o,count:r}){let n=[...t],i=[];for(;i.length<r&&n.length>0;){let a=n.reduce((p,u)=>p+(o.get(u.adId)||0),0),s=n.map(p=>(o.get(p.adId)||0)/a),l=s.map(p=>p/s.reduce((u,g)=>u+g,0)),d=Or(this,t3,jT).call(this,l);i.push(n[d]),n.splice(d,1);}return i},wo(d1,rm,void 0);var Rp=d1;var QT=createContext({isLoading:!0,ads:[],settings:null,saveItemsPagination:()=>{},getItemsPaginationCache:()=>{}});var W7=()=>useContext(QT).settings,WT=({count:e,placement:t,communityId:o})=>{let n=useContext(QT).ads,[i,a]=useState([]),s=W7(),l=$r.instance.getAdFrequencyByPlacement(t);return useEffect(()=>{s!=null&&s.enabled&&((l==null?void 0:l.type)==="time-window"&&em.instance.hasReachedLimit(t)||a(Rp.instance.recommendedAds({ads:n,placement:t,count:e,communityId:o})));},[n,e,t,o]),i};var Fee=({placement:e,pageSize:t,communityId:o,getItemId:r})=>{let n=W7(),[i,a]=useState(0),[s,l]=useState([]),[d,p]=useState(0),u=$r.instance.getAdFrequencyByPlacement(e),g=(u==null?void 0:u.type)==="fixed"?t/u.value:1,f=WT({count:g,placement:e,communityId:o});return {combineItemsWithAds:C=>{if(!(n!=null&&n.enabled))return C;if((u==null?void 0:u.type)==="fixed"){let h=new Set(C.map(Z=>r(Z))),x=s.map(Z=>{let B=r(Z[0]);if(!h.has(B))return null;let $=C.find(G=>r(G)===B);return $?Z.length===1?[$]:[$,Z[1]]:Z}).filter(on),b=x[0],M=(()=>{if(b){let Z=C.findIndex(B=>r(B)===r(b[0]));return Z===-1?0:Z}return 0})(),w=[...(C||[]).slice(0,M).map(Z=>[Z]),...x],N=C.slice(M).filter(Z=>{let B=r(Z);return !w.some($=>r($[0])===B)}),T=i,L=d,D=N.map(Z=>{if(L=L+1,!(L%u.value===0))return [Z];let $=f[T];return T=T+1>f.length-1?0:T+1,[Z,$]});a(T),p(L);let U=[...w,...D];return l([...w,...D]),U.length===0&&(a(0),p(0)),[...w,...D].flatMap(Z=>Z)}else if((u==null?void 0:u.type)==="time-window")return C.length===0?C:[...C.slice(0,1),f[0],...C.slice(1)].filter(on);return C},reset:()=>{a(0),l([]),p(0);}}},uc=({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0,placement:i,communityId:a,pageSize:s,getItemId:l})=>{let{combineItemsWithAds:d}=Fee({placement:i,pageSize:s,communityId:a,getItemId:l}),f=dt({fetcher:e,params:t,config:r,shouldCall:n}),{items:p}=f,u=P(f,["items"]),g=useMemo(()=>d(p).flatMap(y=>y),[p]);return E(c({},u),{items:g})};var ea=e=>{let r=uc({fetcher:StoryRepository.getActiveStoriesByTarget,params:e,shouldCall:!0,pageSize:10,placement:"story",getItemId:n=>(n==null?void 0:n.storyId)||""}),{items:t}=r,o=P(r,["items"]);return c({stories:t.filter(on)},o)};var J7=e=>{let t=_o(),[o,r]=useState(!1),{data:n,isLoading:i,refetch:a}=useQuery({queryKey:["asc-uikit","CommentRepository","isCommentFlaggedByMe",e],queryFn:()=>CommentRepository.isCommentFlaggedByMe(e),enabled:e!=null});useEffect(()=>{n!=null&&r(n);},[n]);let s=()=>_(void 0,null,function*(){if(e!=null)try{r(!0),yield CommentRepository.flagComment(e);}catch(p){r(!1);}finally{a();}}),l=()=>_(void 0,null,function*(){if(e!=null)try{r(!1),yield CommentRepository.unflagComment(e);}catch(p){r(!0);}finally{a();}});return {isLoading:i,isFlaggedByMe:o,flagComment:s,unflagComment:l,toggleFlagComment:p=>_(void 0,null,function*(){if(e!=null)if(o){if(yield l(),p!=null&&p.onUnFlagSuccss)return p.onUnFlagSuccss();t.success({content:"Comment unreported"});}else {if(yield s(),p!=null&&p.onFlagSuccess)return p.onFlagSuccess();t.success({content:"Comment reported"});}})}};var gc=(i=>(i.MEMBER="member",i.MODERATOR="moderator",i.SUPER_MODERATOR="super-moderator",i.COMMUNITY_MODERATOR="community-moderator",i.CHANNEL_MODERATOR="channel-moderator",i))(gc||{});var{COMMUNITY_MODERATOR:jee}=gc;function nm({communityId:e,shouldCall:t=!0}){let n=dt({fetcher:CommunityRepository.Membership.getMembers,params:{communityId:e,roles:[jee]},shouldCall:!!e&&t}),{items:o}=n,r=P(n,["items"]);return c({moderators:o},r)}var Gee=({community:e})=>{var p,u,g,f;let{currentUserId:t}=J(),{moderators:o}=qi(e==null?void 0:e.communityId),{client:r}=J(),i=o.find(y=>y.userId===t)!=null;if(e==null)return {isModerator:i,canEdit:!1,canEditPost:!1,canReviewPost:!1,canEditUser:!1};let a=(p=r==null?void 0:r.hasPermission(dr.EditCommunityPermission).community(e.communityId))!=null?p:!1,s=(u=r==null?void 0:r.hasPermission(dr.EditCommunityFeedPostPermission).community(e==null?void 0:e.communityId))!=null?u:!1,l=(g=r==null?void 0:r.hasPermission(dr.ReviewCommunityPost).community(e.communityId))!=null?g:!1,d=(f=r==null?void 0:r.hasPermission(dr.EditCommunityUserPermission).community(e.communityId))!=null?f:!1;return {isModerator:i,canEdit:a,canEditPost:s,canReviewPost:l,canEditUser:d}},Ja=Gee;var qee=e=>{let[t,o]=useState([]);return useEffect(()=>{function r(){return _(this,null,function*(){if(e==null||e.length===0)return;let n=yield Promise.all(e.map(i=>_(this,null,function*(){return (yield CategoryRepository.getCategory(i)).data})));o(n);})}r();},[e]),t},fc=qee;var qT={page:{type:"SocialHomePage",context:{communityId:void 0}},onChangePage:e=>{},onClickCategory:e=>{},onClickCommunity:e=>{},onClickUser:e=>{},onCommunityCreated:e=>{},onEditCommunity:e=>{},onEditUser:e=>{},onMessageUser:e=>{},goToUserProfilePage:e=>{},goToPostDetailPage:(e,t,o)=>{},goToViewStoryPage:e=>{},goToDraftStoryPage:(e,t,o,r)=>{},goToCommunityProfilePage:e=>{},goToSocialGlobalSearchPage:e=>{},goToSelectPostTargetPage:()=>{},goToStoryTargetSelectionPage:()=>{},goToPostComposerPage:()=>{},goToStoryCreationPage:()=>{},goToSocialHomePage:()=>{},goToMyCommunitiesSearchPage:()=>{},setNavigationBlocker:()=>{},onBack:()=>{},onClickStory:(e,t,o)=>{}};process.env.NODE_ENV!=="production"&&(qT={page:{type:"SocialHomePage",context:{communityId:void 0}},onChangePage:e=>console.log(`NavigationContext onChangePage(${e})`),onClickCategory:e=>console.log(`NavigationContext onClickCategory(${e})`),onClickCommunity:e=>console.log(`NavigationContext onClickCommunity(${e})`),onClickUser:e=>console.log(`NavigationContext onClickUser(${e})`),goToViewStoryPage:({targetId:e,storyType:t,targetType:o})=>console.log(`NavigationContext goToViewStoryPage(${e}, ${t}, ${o})`),onCommunityCreated:e=>console.log(`NavigationContext onCommunityCreated(${e})`),onEditCommunity:e=>console.log(`NavigationContext onEditCommunity({${e})`),onEditUser:e=>console.log(`NavigationContext onEditUser(${e})`),onMessageUser:e=>console.log(`NavigationContext onMessageUser(${e})`),onBack:()=>console.log("NavigationContext onBack()"),goToUserProfilePage:e=>console.log(`NavigationContext goToUserProfilePage(${e})`),goToPostDetailPage:(e,t,o)=>console.log(`NavigationContext goToPostDetailPage(${e} ${t} ${o})`),goToCommunityProfilePage:e=>console.log(`NavigationContext goToCommunityProfilePage(${e})`),goToSocialGlobalSearchPage:e=>console.log(`NavigationContext goToSocialGlobalSearchPage(${e})`),goToSelectPostTargetPage:()=>console.log("NavigationContext goToTargetPage()"),goToStoryTargetSelectionPage:()=>console.log("NavigationContext goToStoryTargetSelectionPage()"),goToDraftStoryPage:e=>console.log("NavigationContext goToDraftStoryPage()"),goToPostComposerPage:()=>console.log("NavigationContext goToPostComposerPage()"),goToStoryCreationPage:()=>console.log("NavigationContext goToStoryCreationPage()"),goToSocialHomePage:()=>console.log("NavigationContext goToSocialHomePage()"),goToMyCommunitiesSearchPage:()=>console.log("NavigationContext goToMyCommunitiesSearchPage()"),onClickStory:(e,t,o)=>console.log(`NavigationContext onClickStory(${e}, ${t}, ${o})`)});var Xee=createContext(qT),Be=()=>useContext(Xee);var yc=e=>{let{onEditCommunity:t}=Be(),{community:o}=Pt({communityId:e,shouldCall:!!e}),r=nt({fileId:o==null?void 0:o.avatarFileId,imageSize:"medium"}),{posts:n}=Bn({targetType:"community",targetId:e,feedType:"reviewing"}),i=fc(o==null?void 0:o.categoryIds),{canReview:a,canEdit:s}=Ja({community:o}),l=useMemo(()=>(n==null?void 0:n.length)||0,[n]);return {community:o,reviewingPosts:n,avatarFileUrl:r,communityCategories:i,pendingPostsCount:l,canEditCommunity:s,canReviewCommunityPosts:a,onEditCommunity:t,joinCommunity:()=>e&&CommunityRepository.joinCommunity(e),leaveCommunity:()=>e&&CommunityRepository.leaveCommunity(e),updateCommunity:f=>e&&CommunityRepository.updateCommunity(e,f),closeCommunity:()=>e&&CommunityRepository.deleteCommunity(e)}};function ta({fetcher:e,params:t,callback:o=()=>{},options:r,shouldSubscribe:n=!0,getSubscribedTopic:i}){let{subscribe:a}=lv(),s=useRef(null);return _n({fetcher:e,params:t,callback:l=>{let{error:d,loading:p}=l;if(p)return;if(d)throw d;let{unsubscribe:u}=a({topic:i(l),callback:o});s.current=u;},options:r,shouldCall:n}),useEffect(()=>()=>{var l;(l=s.current)==null||l.call(s);},[s]),{unsubscribe:()=>{var l;return (l=s.current)==null?void 0:l.call(s)}}}function Xa({targetId:e,targetType:t,shouldSubscribe:o=!0,callback:r}){return ta({fetcher:StoryRepository.getActiveStoriesByTarget,params:{targetId:e,targetType:t},callback:r,shouldSubscribe:!!e&&o,getSubscribedTopic:()=>getCommunityStoriesTopic({targetId:e,targetType:t})})}var rte=m.div`
|
|
3480
3480
|
display: flex;
|
|
3481
3481
|
flex-direction: column;
|
|
3482
3482
|
padding-left: 16px;
|
|
3483
|
-
`,nte=({communityId:e,isActive:t,avatarFileUrl:o,onClick:r,isOfficial:n,isPublic:i,isSearchResult:a,name:s,searchInput:l,children:d,loading:p,memberCount:u,categoryIds:g})=>{let f=fc(g||[]);return R.createElement(DT,{"data-qa-anchor":"community-header",isActive:t,loading:p,onClick:()=>r==null?void 0:r(e)},R.createElement(HT,{avatar:o,backgroundImage:mr,loading:p,size:"small"}),p&&d?R.createElement(we,{style:{fontSize:8,maxWidth:120}}):R.createElement(rte,null,R.createElement(
|
|
3483
|
+
`,nte=({communityId:e,isActive:t,avatarFileUrl:o,onClick:r,isOfficial:n,isPublic:i,isSearchResult:a,name:s,searchInput:l,children:d,loading:p,memberCount:u,categoryIds:g})=>{let f=fc(g||[]);return R.createElement(DT,{"data-qa-anchor":"community-header",isActive:t,loading:p,onClick:()=>r==null?void 0:r(e)},R.createElement(HT,{avatar:o,backgroundImage:mr,loading:p,size:"small"}),p&&d?R.createElement(we,{style:{fontSize:8,maxWidth:120}}):R.createElement(rte,null,R.createElement(Ri,{"data-qa-anchor":"community-header",isActive:t,isOfficial:n,isPublic:i,isSearchResult:a,name:s,searchInput:l,loading:p,memberCount:u,categoryIds:g}),R.createElement(Ln,{categories:f,maxCategories:2})),d&&R.createElement(FT,null,d))},KT=e=>{let t=W("UICommunityHeader");return t?t(e):R.createElement(nte,c({},e))};var ste=({communityId:e="",onClick:t=()=>{},isActive:o=!1,isSearchResult:r=!1,searchInput:n="",children:i,loading:a=!1})=>{let s=Tt(e),l=se({fileId:s==null?void 0:s.avatarFileId,imageSize:"small"});return R.createElement(KT,{communityId:e,avatarFileUrl:l,isActive:o,isOfficial:s==null?void 0:s.isOfficial,isPublic:s==null?void 0:s.isPublic,isSearchResult:r,name:s==null?void 0:s.displayName,searchInput:n,loading:a,onClick:t,categoryIds:s==null?void 0:s.categoryIds,memberCount:s==null?void 0:s.membersCount},i)};var hc=memo(ste);var cte=e=>R.createElement(WY,c({},e)),JT=m(cte)`
|
|
3484
3484
|
&.no-scroll {
|
|
3485
3485
|
width: 100%;
|
|
3486
3486
|
}
|
|
@@ -3496,7 +3496,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3496
3496
|
height: 100vh;
|
|
3497
3497
|
overflow-y: auto;
|
|
3498
3498
|
padding-bottom: 50px;
|
|
3499
|
-
`,bte=({className:e,activeCommunity:t})=>{SC();let {onCommunityCreated:r}=X(),[n,i]=useState(!1),s=f=>{i(!1),f&&r(f);},{communities:l,hasMore:d,loadMore:p,isLoading:u,loadMoreHasBeenCalled:g}=Mr({membership:"member",limit:20});return !l||l.length===0?null:R.createElement(Zp,{heading:R.createElement(FormattedMessage,{id:"SideSectionMyCommunity.myCommunity"})},R.createElement(xte,null,R.createElement(YT,{className:e,communitiesQueryParam:{membership:"member",limit:20},activeCommunity:t,communitiesLiveCollection:{communities:l,hasMore:d,loadMore:p,isLoading:u,loadMoreHasBeenCalled:g}})),R.createElement(
|
|
3499
|
+
`,bte=({className:e,activeCommunity:t})=>{SC();let {onCommunityCreated:r}=X(),[n,i]=useState(!1),s=f=>{i(!1),f&&r(f);},{communities:l,hasMore:d,loadMore:p,isLoading:u,loadMoreHasBeenCalled:g}=Mr({membership:"member",limit:20});return !l||l.length===0?null:R.createElement(Zp,{heading:R.createElement(FormattedMessage,{id:"SideSectionMyCommunity.myCommunity"})},R.createElement(xte,null,R.createElement(YT,{className:e,communitiesQueryParam:{membership:"member",limit:20},activeCommunity:t,communitiesLiveCollection:{communities:l,hasMore:d,loadMore:p,isLoading:u,loadMoreHasBeenCalled:g}})),R.createElement(Na,null,R.createElement(Lp,{isOpen:n,onClose:s})))},RT=memo(bte);var Pte=m.div`
|
|
3500
3500
|
flex: 1 1 auto;
|
|
3501
3501
|
z-index: 1;
|
|
3502
3502
|
position: relative;
|
|
@@ -3520,7 +3520,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3520
3520
|
justify-content: center;
|
|
3521
3521
|
`,Tte=({items:e,onPick:t=()=>{},append:o,renderItem:r=n=>R.createElement("span",null,n)})=>{let n=useRef(null),[i,a]=useState(-1),s=g=>()=>a(g),l=()=>a(-1),d=g=>()=>t(g),p=()=>{if(n.current==null)return;let g=i>0?i-1:e.length-1,{scrollTop:f,clientHeight:y}=n.current,v=n.current.children[g],C=(v==null?void 0:v.clientTop)||0,h=(v==null?void 0:v.clientHeight)||0;(C<f||C+h>f+y)&&n.current.scrollTo(0,C),a(g);},u=()=>{if(n.current==null)return;let g=i<e.length-1?i+1:0,{scrollTop:f,clientHeight:y}=n.current,v=n.current.children[g],C=(v==null?void 0:v.clientTop)||0,h=(v==null?void 0:v.clientHeight)||0;(C<f||C+h>f+y)&&n.current.scrollTo(0,C+h-y),a(g);};return hr("ArrowUp",p),hr("ArrowDown",u),hr("Escape",()=>a(-1)),hr("Enter",()=>t==null?void 0:t(i)),e.length?R.createElement(Pte,{ref:n,onMouseLeave:l},e.map((g,f)=>R.createElement(Go,{key:`#${f}`,hover:f===i,onClick:d(f),onMouseEnter:s(f)},r(g))),o&&R.createElement(Go,null,o)):R.createElement(_te,{"data-qa-anchor":"suggestions-placeholder-no-results"},R.createElement(FormattedMessage,{id:"placeholder.noResults"}))},Cc=Tte;var Ste=m.div`
|
|
3522
3522
|
position: relative;
|
|
3523
|
-
`,Nte=m(
|
|
3523
|
+
`,Nte=m(ri)`
|
|
3524
3524
|
z-index: 10;
|
|
3525
3525
|
position: absolute;
|
|
3526
3526
|
top: calc(100% + 0.25rem);
|
|
@@ -3594,13 +3594,13 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3594
3594
|
transition: border-color 0.3s;
|
|
3595
3595
|
`;var Lte=({"data-qa-anchor":e="",className:t="",tabs:o,activeTab:r,onChange:n})=>R.createElement(i3,{className:t},R.createElement(a3,{"data-qa-anchor":`${e}-tabs-list`},o.map(({value:i,label:a})=>R.createElement(s3,{key:i,"data-qa-anchor":`${e}-${i}-tab-item`},R.createElement(l3,{"data-qa-anchor":i===r?`${e}-${i}-tab-button-active`:`${e}-${i}-tab-button`,className:i===r?"active":"",onClick:()=>n(i)},a))))),_r=memo(e=>{let t=W("Tabs");return t?t(e):R.createElement(Lte,c({},e))});var Ate=m.div`
|
|
3596
3596
|
position: relative;
|
|
3597
|
-
`,sk=m(
|
|
3597
|
+
`,sk=m(ri)`
|
|
3598
3598
|
z-index: 10;
|
|
3599
3599
|
position: absolute;
|
|
3600
3600
|
top: calc(100% + 0.25rem);
|
|
3601
3601
|
width: 100%;
|
|
3602
3602
|
color: ${({theme:e})=>e.palette.base.main};
|
|
3603
|
-
`,Dte=({searchValue:e,isOpen:t})=>{let{onClickCommunity:o}=X(),{communities:r,hasMore:n,loadMore:i}=Mr({displayName:e},!!e),a=r.filter(Fe),s=a.map(l=>l.displayName);return t?R.createElement(sk,null,R.createElement(Cc,{items:s,append:n&&i?R.createElement(Y,{fullWidth:!0,onClick:i},R.createElement(FormattedMessage,{id:"loadMore"})):null,onPick:l=>a[l]?o(a[l].communityId):null,renderItem:l=>{let d=r.find(p=>p.displayName===l);return d&&R.createElement(hc,{communityId:d.communityId})}})):null},Hte=({searchValue:e,isOpen:t})=>{let{onClickUser:o}=X(),{users:r,hasMore:n,loadMore:i}=kp(e),a=r.filter(Fe),s=a.map(l=>l.displayName);return t?R.createElement(sk,null,R.createElement(Cc,{items:s,append:n&&i?R.createElement(Y,{fullWidth:!0,onClick:i},R.createElement(FormattedMessage,{id:"loadMore"})):null,onPick:l=>a[l]?o(a[l].userId):null,renderItem:l=>{let d=r.find(p=>p.displayName===l);return d&&R.createElement(
|
|
3603
|
+
`,Dte=({searchValue:e,isOpen:t})=>{let{onClickCommunity:o}=X(),{communities:r,hasMore:n,loadMore:i}=Mr({displayName:e},!!e),a=r.filter(Fe),s=a.map(l=>l.displayName);return t?R.createElement(sk,null,R.createElement(Cc,{items:s,append:n&&i?R.createElement(Y,{fullWidth:!0,onClick:i},R.createElement(FormattedMessage,{id:"loadMore"})):null,onPick:l=>a[l]?o(a[l].communityId):null,renderItem:l=>{let d=r.find(p=>p.displayName===l);return d&&R.createElement(hc,{communityId:d.communityId})}})):null},Hte=({searchValue:e,isOpen:t})=>{let{onClickUser:o}=X(),{users:r,hasMore:n,loadMore:i}=kp(e),a=r.filter(Fe),s=a.map(l=>l.displayName);return t?R.createElement(sk,null,R.createElement(Cc,{items:s,append:n&&i?R.createElement(Y,{fullWidth:!0,onClick:i},R.createElement(FormattedMessage,{id:"loadMore"})):null,onPick:l=>a[l]?o(a[l].userId):null,renderItem:l=>{let d=r.find(p=>p.displayName===l);return d&&R.createElement(ai,{userId:d.userId,isBanned:d==null?void 0:d.isGlobalBanned})}})):null},Fte=({className:e,sticky:t=!1,searchBy:o})=>{let[r,n]=useState(""),[i,a]=useState(o),{open:s,close:l,isOpen:d,containerRef:p}=tk({value:r});function u(){n("");}return R.createElement(ik,{className:e,sticky:t},R.createElement(FormattedMessage,{id:"exploreHeader.searchCommunityPlaceholder"},([g])=>R.createElement(Ate,{ref:p},R.createElement(ko,{"data-qa-anchor":"social-search-input",value:r,prepend:R.createElement(rk,null,R.createElement(nk,null)),placeholder:typeof g=="string"?g:void 0,onClear:u,onChange:f=>n==null?void 0:n(f.plainText),onClick:()=>s()}),d?R.createElement(_r,{tabs:[{value:"communities",label:"Groups"},{value:"accounts",label:"Accounts"}],activeTab:i,onChange:f=>a(f)}):null,i==="communities"?R.createElement(Dte,{searchValue:r,isOpen:d}):null,i==="accounts"?R.createElement(Hte,{searchValue:r,isOpen:d}):null)))},lk=e=>{let t=W("SocialSearch");return t?t(e):R.createElement(Fte,c({},e))};m(lk)`
|
|
3604
3604
|
background: ${({theme:e})=>e.palette.system.background};
|
|
3605
3605
|
padding: 0.5rem;
|
|
3606
3606
|
z-index: 100;
|
|
@@ -3641,7 +3641,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3641
3641
|
(100% / ${r}) - (${e8}px * ${r-1} / ${r})
|
|
3642
3642
|
);
|
|
3643
3643
|
`}}
|
|
3644
|
-
`,Xte=({title:e="",children:t,columns:o=Gte,maxColumns:r=jte,hasMore:n=!1,loadMore:i=()=>{},container:a})=>{var h,x;let s=useRef(null),{x:l}=Vte(s),[d,{width:p}]=$te(),[u,g]=useState(0),f=(x=(h=s.current)==null?void 0:h.scrollWidth)!=null?x:0,y=useMemo(()=>f>p,[f,p]),v=useMemo(()=>l>=f-p,[l,f,p]),C=useMemo(()=>l===0,[l]);return useEffect(()=>{var b;return (b=s.current)==null?void 0:b.scrollTo({left:(p+e8)*u,behavior:"smooth"})},[p,u]),useEffect(()=>{l>=f-p*2&&n&&i();},[l,f,p,n,i]),R.createElement("div",{ref:d},R.createElement(Zte,null,R.createElement(Qte,null,e),y&&R.createElement(Wte,null,R.createElement(ck,{disabled:C,onClick:()=>g(u-1)},R.createElement(zr,{height:"20px",width:"20px"})),R.createElement(ck,{disabled:v,onClick:()=>g(u+1)},R.createElement(
|
|
3644
|
+
`,Xte=({title:e="",children:t,columns:o=Gte,maxColumns:r=jte,hasMore:n=!1,loadMore:i=()=>{},container:a})=>{var h,x;let s=useRef(null),{x:l}=Vte(s),[d,{width:p}]=$te(),[u,g]=useState(0),f=(x=(h=s.current)==null?void 0:h.scrollWidth)!=null?x:0,y=useMemo(()=>f>p,[f,p]),v=useMemo(()=>l>=f-p,[l,f,p]),C=useMemo(()=>l===0,[l]);return useEffect(()=>{var b;return (b=s.current)==null?void 0:b.scrollTo({left:(p+e8)*u,behavior:"smooth"})},[p,u]),useEffect(()=>{l>=f-p*2&&n&&i();},[l,f,p,n,i]),R.createElement("div",{ref:d},R.createElement(Zte,null,R.createElement(Qte,null,e),y&&R.createElement(Wte,null,R.createElement(ck,{disabled:C,onClick:()=>g(u-1)},R.createElement(zr,{height:"20px",width:"20px"})),R.createElement(ck,{disabled:v,onClick:()=>g(u+1)},R.createElement(Fi,{height:"20px",width:"20px"})))),R.createElement(qte,{ref:s,page:u},s.current?R.createElement(Jte,{currentWidth:a?a.clientWidth:s.current.clientWidth,maxColumns:r,columns:o},t):null))},dk=Xte;var pk=m.div`
|
|
3645
3645
|
cursor: pointer;
|
|
3646
3646
|
box-shadow:
|
|
3647
3647
|
0 0 1px rgba(40, 41, 61, 0.08),
|
|
@@ -3665,7 +3665,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3665
3665
|
bottom: 12px;
|
|
3666
3666
|
left: 16px;
|
|
3667
3667
|
right: 16px;
|
|
3668
|
-
`;var gk=m(
|
|
3668
|
+
`;var gk=m(Ri)`
|
|
3669
3669
|
color: #000;
|
|
3670
3670
|
${({theme:e})=>e.typography.headline}
|
|
3671
3671
|
line-height: 30px !important;
|
|
@@ -3752,7 +3752,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3752
3752
|
`;var goe=m.p`
|
|
3753
3753
|
margin: 0.1rem 0 0;
|
|
3754
3754
|
${({theme:e})=>e.typography.caption}
|
|
3755
|
-
`,foe=m(
|
|
3755
|
+
`,foe=m(Ri)`
|
|
3756
3756
|
${({theme:e})=>e.typography.title};
|
|
3757
3757
|
|
|
3758
3758
|
/* &:before {
|
|
@@ -3760,7 +3760,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3760
3760
|
margin-right: 0.375em;
|
|
3761
3761
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
3762
3762
|
} */
|
|
3763
|
-
`,yoe=({avatarFileUrl:e,description:t,categories:o=[],membersCount:r,onClick:n,isOfficial:i,isPublic:a,name:s,loading:l,disabledNumber:d,index:p})=>{let u=useMedia("(min-width: 768px)"),g=Intl.NumberFormat("en-US",{minimumIntegerDigits:2});return R.createElement(doe,{onClick:n},R.createElement(poe,{backgroundImage:e}),R.createElement(uoe,null,l?R.createElement(R.Fragment,null,R.createElement(we,{style:{fontSize:"0.5rem",maxWidth:"7.5rem"}}),R.createElement("div",null,R.createElement(we,{style:{fontSize:"0.5rem",maxWidth:"13.5rem"}})),R.createElement(we,{width:"2.5rem",style:{fontSize:"0.5rem"}}),R.createElement(we,{width:"2.5rem",style:{fontSize:"0.5rem",marginLeft:"0.75rem"}})):R.createElement(R.Fragment,null,d?R.createElement(
|
|
3763
|
+
`,yoe=({avatarFileUrl:e,description:t,categories:o=[],membersCount:r,onClick:n,isOfficial:i,isPublic:a,name:s,loading:l,disabledNumber:d,index:p})=>{let u=useMedia("(min-width: 768px)"),g=Intl.NumberFormat("en-US",{minimumIntegerDigits:2});return R.createElement(doe,{onClick:n},R.createElement(poe,{backgroundImage:e}),R.createElement(uoe,null,l?R.createElement(R.Fragment,null,R.createElement(we,{style:{fontSize:"0.5rem",maxWidth:"7.5rem"}}),R.createElement("div",null,R.createElement(we,{style:{fontSize:"0.5rem",maxWidth:"13.5rem"}})),R.createElement(we,{width:"2.5rem",style:{fontSize:"0.5rem"}}),R.createElement(we,{width:"2.5rem",style:{fontSize:"0.5rem",marginLeft:"0.75rem"}})):R.createElement(R.Fragment,null,d?R.createElement(Ri,{isOfficial:i,isPublic:a,name:s}):R.createElement("div",{style:{display:"flex",gap:"6px",alignItems:"center"}},g.format(p+1),R.createElement(foe,{isOfficial:i,isPublic:a,name:s})),R.createElement(Ln,{categories:o,maxCategories:2}),u&&t&&R.createElement(pw,{lines:2},R.createElement(goe,null,t)))))},d3=e=>{let t=W("UITrendingItem");return t?t(e):R.createElement(yoe,c({},e))};var voe=({communityId:e,onClick:t,loading:o,disabledNumber:r=!1,index:n})=>{let i=Tt(e),a=se({fileId:i==null?void 0:i.avatarFileId}),s=Ra(i==null?void 0:i.categoryIds),l=()=>t(e);if(i==null)return null;let{membersCount:d,description:p}=i;return R.createElement(d3,{avatarFileUrl:a,description:p,categories:s,membersCount:d,isOfficial:i.isOfficial,isPublic:i.isPublic,name:i.displayName,loading:o,onClick:l,disabledNumber:r,index:n})};var cm=memo(voe);var xoe=m.h2`
|
|
3764
3764
|
${({theme:e})=>e.typography.headline};
|
|
3765
3765
|
margin: 0 0 1rem 0;
|
|
3766
3766
|
`,vk=xoe;function r8(e){let r=Ue({fetcher:CommunityRepository.getTrendingCommunities,params:E(c({},e),{limit:(e==null?void 0:e.limit)||10})}),{items:t}=r,o=P(r,["items"]);return c({communities:t},o)}var woe=m.ul`
|
|
@@ -3833,7 +3833,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
3833
3833
|
(100% / ${o}) - (${i8}px * ${o-1} / ${o})
|
|
3834
3834
|
);
|
|
3835
3835
|
`}}
|
|
3836
|
-
`,Hoe=({title:e="",children:t,columns:o=Soe,hasMore:r=!1,loadMore:n=()=>{}})=>{var v,C;let i=useRef(null),{x:a}=Vte(i),[s,{width:l}]=$te(),[d,p]=useState(0),u=(C=(v=i.current)==null?void 0:v.scrollWidth)!=null?C:0,g=useMemo(()=>u>l,[u,l]),f=useMemo(()=>a>=u-l,[a,u,l]),y=useMemo(()=>a===0,[a]);return useEffect(()=>{var h;return (h=i.current)==null?void 0:h.scrollTo({left:(l+i8)*d,behavior:"smooth"})},[l,d]),useEffect(()=>{a>=u-l*2&&r&&n();},[a,u,l,r,n]),R.createElement("div",{ref:s},R.createElement(Noe,null,R.createElement(Eoe,null,e),g&&R.createElement(Boe,null,R.createElement(Mk,{disabled:y,onClick:()=>p(d-1)},R.createElement(zr,{height:"20px",width:"20px"})),R.createElement(Mk,{disabled:f,onClick:()=>p(d+1)},R.createElement(
|
|
3836
|
+
`,Hoe=({title:e="",children:t,columns:o=Soe,hasMore:r=!1,loadMore:n=()=>{}})=>{var v,C;let i=useRef(null),{x:a}=Vte(i),[s,{width:l}]=$te(),[d,p]=useState(0),u=(C=(v=i.current)==null?void 0:v.scrollWidth)!=null?C:0,g=useMemo(()=>u>l,[u,l]),f=useMemo(()=>a>=u-l,[a,u,l]),y=useMemo(()=>a===0,[a]);return useEffect(()=>{var h;return (h=i.current)==null?void 0:h.scrollTo({left:(l+i8)*d,behavior:"smooth"})},[l,d]),useEffect(()=>{a>=u-l*2&&r&&n();},[a,u,l,r,n]),R.createElement("div",{ref:s},R.createElement(Noe,null,R.createElement(Eoe,null,e),g&&R.createElement(Boe,null,R.createElement(Mk,{disabled:y,onClick:()=>p(d-1)},R.createElement(zr,{height:"20px",width:"20px"})),R.createElement(Mk,{disabled:f,onClick:()=>p(d+1)},R.createElement(Fi,{height:"20px",width:"20px"})))),R.createElement(Loe,{ref:i,page:d},i.current?R.createElement(Doe,{currentWidth:i.current.clientWidth,columns:o},t):null))},Pk=Hoe;var Foe=m.ul`
|
|
3837
3837
|
list-style: none;
|
|
3838
3838
|
counter-reset: trending;
|
|
3839
3839
|
padding: 0;
|
|
@@ -4035,7 +4035,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4035
4035
|
border-radius: 8px;
|
|
4036
4036
|
`;m(tS)`
|
|
4037
4037
|
margin-bottom: 1em;
|
|
4038
|
-
`;function p8(r){var n=r,{targetId:e,targetType:t}=n,o=P(n,["targetId","targetType"]);let s=Ue({fetcher:PostRepository.getPosts,params:c({targetId:e,targetType:t},o),shouldCall:!!e&&!!t}),{items:i}=s,a=P(s,["items"]);return c({media:i},a)}var are=({targetId:e,targetType:t,grid:o=!1})=>{let[r,n]=useState("image"),{media:i,isLoading:a,hasMore:s,loadMore:l,loadMoreHasBeenCalled:d}=p8({targetId:e||void 0,targetType:t,dataTypes:[r],limit:Yk,sortBy:"lastCreated"});return R.createElement(oS,null,(a||d||i.length>0)&&R.createElement(Eo,{hasMore:s,loadMore:l,className:"load-more no-border",contentSlot:R.createElement(Js,{items:i,loading:a,loadingMore:d,grid:o,renderVideoThumbnail:p=>R.createElement(qs,{item:p,showPlayIcon:!0,showVideoDuration:!0}),renderLiveStreamThumbnail:p=>R.createElement(Ks,{item:p,showPlayIcon:!0,showLivestreamTitle:!0,showLivestreamRecordedBadge:!0})})}),!a&&!d&&i.length===0&&R.createElement(
|
|
4038
|
+
`;function p8(r){var n=r,{targetId:e,targetType:t}=n,o=P(n,["targetId","targetType"]);let s=Ue({fetcher:PostRepository.getPosts,params:c({targetId:e,targetType:t},o),shouldCall:!!e&&!!t}),{items:i}=s,a=P(s,["items"]);return c({media:i},a)}var are=({targetId:e,targetType:t,grid:o=!1})=>{let[r,n]=useState("image"),{media:i,isLoading:a,hasMore:s,loadMore:l,loadMoreHasBeenCalled:d}=p8({targetId:e||void 0,targetType:t,dataTypes:[r],limit:Yk,sortBy:"lastCreated"});return R.createElement(oS,null,(a||d||i.length>0)&&R.createElement(Eo,{hasMore:s,loadMore:l,className:"load-more no-border",contentSlot:R.createElement(Js,{items:i,loading:a,loadingMore:d,grid:o,renderVideoThumbnail:p=>R.createElement(qs,{item:p,showPlayIcon:!0,showVideoDuration:!0}),renderLiveStreamThumbnail:p=>R.createElement(Ks,{item:p,showPlayIcon:!0,showLivestreamTitle:!0,showLivestreamRecordedBadge:!0})})}),!a&&!d&&i.length===0&&R.createElement(oi,{icon:Rk[r],title:eS[r]}))},u3=memo(e=>{let t=W("MediaGallery");return t?t(e):R.createElement(are,c({},e))});var lre=m(_r)`
|
|
4039
4039
|
background: ${({theme:e})=>e.palette.system.background};
|
|
4040
4040
|
border-radius: 8px;
|
|
4041
4041
|
border: 1px solid #e6e6e6;
|
|
@@ -4078,7 +4078,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4078
4078
|
`,f3=m.div`
|
|
4079
4079
|
display: flex;
|
|
4080
4080
|
align-items: center;
|
|
4081
|
-
`;m(
|
|
4081
|
+
`;m(oi)`
|
|
4082
4082
|
width: 100%;
|
|
4083
4083
|
`;var cre=m.button`
|
|
4084
4084
|
display: block;
|
|
@@ -4092,7 +4092,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4092
4092
|
outline: none;
|
|
4093
4093
|
color: ${({theme:e})=>e.palette.base.shade2};
|
|
4094
4094
|
text-align: center;
|
|
4095
|
-
`;function
|
|
4095
|
+
`;function ra({onClick:e}){return R.createElement(cre,{onClick:t=>{t.preventDefault(),e==null||e();}},R.createElement(FormattedMessage,{id:"loadMore"})," ",R.createElement(Pn,{height:".8em"}))}var gre=e=>{let[t,o]=useState(!1),{data:r,isLoading:n,refetch:i}=useQuery({queryKey:["asc-uikit","UserRepository","isUserFlaggedByMe",e],queryFn:()=>UserRepository.isUserFlaggedByMe(e),enabled:e!=null});useEffect(()=>{r!=null&&o(r);},[r]);let a=()=>_(void 0,null,function*(){if(e!=null)try{yield UserRepository.flagUser(e);}catch(d){o(!1);}finally{i();}}),s=()=>_(void 0,null,function*(){if(e!=null)try{yield UserRepository.unflagUser(e),o(!1);}catch(d){o(!0);}finally{i();}});return {isLoading:n,isFlaggedByMe:t,flagUser:a,unflagUser:s,toggleFlagUser:()=>_(void 0,null,function*(){e!=null&&(t?s():a());})}},os=gre;function f8({userId:e,status:t}){let n=Ue({fetcher:UserRepository.Relationship.getFollowings,params:{userId:e,status:t!=null?t:void 0},shouldCall:!!e}),{items:o}=n,r=P(n,["items"]);return c({followings:o},r)}var yre=m.div`
|
|
4096
4096
|
display: flex;
|
|
4097
4097
|
align-items: center;
|
|
4098
4098
|
flex-direction: column;
|
|
@@ -4100,14 +4100,14 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4100
4100
|
padding: 80px 16px;
|
|
4101
4101
|
color: ${({theme:e})=>e.palette.base.shade3};
|
|
4102
4102
|
width: 100%;
|
|
4103
|
-
`,y3=({message:e})=>R.createElement(yre,null,R.createElement(C2,{width:48,height:48}),R.createElement(pp,null,e));var xre=({profileUserId:e,currentUserId:t,userId:o,onClick:r})=>{let n=re(o),{onClickUser:i}=X(),{confirm:a}=Pe(),{isNoNicknameUser:s,isAnonymousUser:l}=Ee(),d=Ce(),{formatMessage:p}=useIntl(),{isFlaggedByMe:u,toggleFlagUser:g}=os(o),f=()=>_(void 0,null,function*(){yield g(),d.success({content:R.createElement(FormattedMessage,{id:"report.reportSent"})});}),y=()=>UserRepository.Relationship.unfollow(o),v=e===t,C=t===o,h=()=>{let M=n!=null&&n.displayName?p({id:"user.unfollow.confirm.title"},{displayName:n.displayName}):p({id:"user.unfollow.confirm.title.thisUser"}),I=n!=null&&n.displayName?p({id:"user.unfollow.confirm.body"},{displayName:n.displayName}):p({id:"user.unfollow.confirm.body.thisUser"});a({title:M,content:I,cancelText:p({id:"buttonText.cancel"}),okText:p({id:"buttonText.unfollow"}),onOk:y});},x=useCallback(()=>{i(o);},[i,o]),b=useMemo(()=>{let M=[];return C||M.push({name:p(u?{id:"report.unreportUser"}:{id:"report.reportUser"}),action:f}),v&&M.push({name:p({id:"follower.menuItem.unfollow"}),action:h}),M},[u,v,C,h,f]);return R.createElement(pm,{key:o},R.createElement(f3,null,R.createElement(
|
|
4103
|
+
`,y3=({message:e})=>R.createElement(yre,null,R.createElement(C2,{width:48,height:48}),R.createElement(pp,null,e));var xre=({profileUserId:e,currentUserId:t,userId:o,onClick:r})=>{let n=re(o),{onClickUser:i}=X(),{confirm:a}=Pe(),{isNoNicknameUser:s,isAnonymousUser:l}=Ee(),d=Ce(),{formatMessage:p}=useIntl(),{isFlaggedByMe:u,toggleFlagUser:g}=os(o),f=()=>_(void 0,null,function*(){yield g(),d.success({content:R.createElement(FormattedMessage,{id:"report.reportSent"})});}),y=()=>UserRepository.Relationship.unfollow(o),v=e===t,C=t===o,h=()=>{let M=n!=null&&n.displayName?p({id:"user.unfollow.confirm.title"},{displayName:n.displayName}):p({id:"user.unfollow.confirm.title.thisUser"}),I=n!=null&&n.displayName?p({id:"user.unfollow.confirm.body"},{displayName:n.displayName}):p({id:"user.unfollow.confirm.body.thisUser"});a({title:M,content:I,cancelText:p({id:"buttonText.cancel"}),okText:p({id:"buttonText.unfollow"}),onOk:y});},x=useCallback(()=>{i(o);},[i,o]),b=useMemo(()=>{let M=[];return C||M.push({name:p(u?{id:"report.unreportUser"}:{id:"report.reportUser"}),action:f}),v&&M.push({name:p({id:"follower.menuItem.unfollow"}),action:h}),M},[u,v,C,h,f]);return R.createElement(pm,{key:o},R.createElement(f3,null,R.createElement(ai,{userId:o,onClick:x}),!l&&!s&&R.createElement(No,{options:b})))};function bre({userId:e}){let{followings:t,isLoading:o,loadMore:r,hasMore:n,loadMoreHasBeenCalled:i}=f8({userId:e,status:"all"});return {items:useMemo(()=>{function s(){return new Array(5).fill(1).map((l,d)=>({skeleton:!0}))}return o&&!i?s():o&&i?[...t,...s()]:t},[t,o,i]),isLoading:o,hasMore:n,loadMore:r,loadMoreHasBeenCalled:i}}var Ire=({userId:e,onItemClick:t})=>{let{formatMessage:o}=useIntl(),{currentUserId:r}=J(),{items:n,loadMore:i,hasMore:a}=bre({userId:e}),s=()=>a?R.createElement(ra,{onClick:()=>i==null?void 0:i()}):null;return n.length===0?R.createElement(R.Fragment,null,R.createElement(um,null,R.createElement(y3,{message:o({id:"follow.placeholder.noFollowings"})})),s()):R.createElement(R.Fragment,null,R.createElement(um,null,n.map(l=>Rn(l)?R.createElement(we,{style:{fontSize:8}}):R.createElement(xre,{key:`${l.from}-${l.to}`,userId:l.to,profileUserId:e,currentUserId:r,onClick:()=>t(l.to)}))),s())},sS=Ire;function na({userId:e,status:t}){let n=Ue({fetcher:UserRepository.Relationship.getFollowers,params:{userId:e,status:t!=null?t:void 0},shouldCall:!!e}),{items:o}=n,r=P(n,["items"]);return c({followers:o},r)}var _re=({profileUserId:e,currentUserId:t,userId:o,onClick:r})=>{let n=re(o),i=se({fileId:n==null?void 0:n.avatarFileId,imageSize:"small"}),{onClickUser:a}=X(),{confirm:s}=Pe(),l=Ce(),{isNoNicknameUser:d,isAnonymousUser:p}=Ee(),{formatMessage:u}=useIntl(),{isFlaggedByMe:g,toggleFlagUser:f}=os(o||void 0),y=()=>_(void 0,null,function*(){yield f(),l.success({content:R.createElement(FormattedMessage,{id:"report.reportSent"})});}),v=()=>{o&&UserRepository.Relationship.declineMyFollower(o);},C=e===t,h=t===o,x=()=>{s({title:R.createElement(FormattedMessage,{id:"follower.title.removeUser",values:{displayName:n==null?void 0:n.displayName}}),content:R.createElement(FormattedMessage,{id:"follower.body.removeUser",values:{displayName:n==null?void 0:n.displayName}}),cancelText:u({id:"buttonText.cancel"}),okText:u({id:"buttonText.remove"}),onOk:v});},b=useCallback(()=>{o!=null&&a(o);},[a,o]),M=useMemo(()=>{let I=[];return h||I.push({name:u(g?{id:"report.unreportUser"}:{id:"report.reportUser"}),action:y}),C&&I.push({name:u({id:"follower.menuItem.removeUser"}),action:x}),I},[g,C,h,x,y]);return R.createElement(pm,{key:o},R.createElement(f3,null,R.createElement(Sp,{userId:n==null?void 0:n.userId,displayName:n==null?void 0:n.displayName,avatarFileUrl:i,onClick:b}),!p&&!d&&R.createElement(No,{options:M})))};function Tre({userId:e}){let{followers:t,isLoading:o,loadMore:r,hasMore:n,loadMoreHasBeenCalled:i}=na({userId:e,status:"accepted"});return {items:useMemo(()=>{function s(){return new Array(5).fill(1).map((l,d)=>({skeleton:!0}))}return o&&!i?s():o&&i?[...t,...s()]:t},[t,o,i]),isLoading:o,hasMore:n,loadMore:r,loadMoreHasBeenCalled:i}}var kre=({userId:e,onItemClick:t})=>{let{formatMessage:o}=useIntl(),{items:r,loadMore:n,hasMore:i}=Tre({userId:e}),{currentUserId:a}=J(),s=()=>i?R.createElement(ra,{onClick:()=>n==null?void 0:n()}):null;return r.length===0?R.createElement(R.Fragment,null,R.createElement(um,null,R.createElement(y3,{message:o({id:"follow.placeholder.noFollowers"})})),s()):R.createElement(R.Fragment,null,R.createElement(um,null,r.map(l=>Rn(l)?R.createElement(we,{style:{fontSize:8}}):R.createElement(_re,{key:`${l.from}-${l.to}`,userId:l.from,profileUserId:e,currentUserId:a,onClick:()=>t(l.to)}))),s())},cS=kre;var gm=m.div`
|
|
4104
4104
|
display: grid;
|
|
4105
4105
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
4106
4106
|
gap: 1rem;
|
|
4107
|
-
`,dS=m(
|
|
4107
|
+
`,dS=m(oi)`
|
|
4108
4108
|
margin-right: auto;
|
|
4109
4109
|
margin-left: auto;
|
|
4110
|
-
`;var Nre=({userId:e})=>{let t=Ce();return R.createElement(pm,null,R.createElement(
|
|
4110
|
+
`;var Nre=({userId:e})=>{let t=Ce();return R.createElement(pm,null,R.createElement(ai,{userId:e}),R.createElement(nS,null,R.createElement(fe,{fullWidth:!0,onClick:()=>_(void 0,null,function*(){e&&(yield UserRepository.Relationship.acceptMyFollower(e),t.success({content:R.createElement(FormattedMessage,{id:"notification.done"})}));})},R.createElement(FormattedMessage,{id:"request.accept"})),R.createElement(Y,{fullWidth:!0,onClick:()=>_(void 0,null,function*(){e&&(yield UserRepository.Relationship.declineMyFollower(e),t.success({content:R.createElement(FormattedMessage,{id:"notification.done"})}));})},R.createElement(FormattedMessage,{id:"request.decline"}))))},Ere=({userId:e})=>{let{followers:t,hasMore:o,loadMore:r,isLoading:n,loadMoreHasBeenCalled:i}=na({userId:e,status:"pending"}),a=useMemo(()=>{function l(){return new Array(5).fill(1).map((d,p)=>({userId:p,skeleton:!0}))}return n&&!i?l():n&&i?[...t,...l()]:t},[t,n,i]),s=()=>o?R.createElement(ra,{onClick:()=>r()}):null;return a.length===0?R.createElement(R.Fragment,null,R.createElement(gm,null,null),s()):R.createElement(R.Fragment,null,R.createElement(gm,null,a.map(l=>Rn(l)?R.createElement(we,{style:{fontSize:8}}):R.createElement(Nre,{key:`${l.from}-${l.to}`,userId:l.from}))),s())},uS=Ere;var mn={FOLLOWINGS:"Following",FOLLOWERS:"Followers"},fm="Pending";[{value:mn.FOLLOWINGS,label:R.createElement(FormattedMessage,{id:"tabs.followings"})},{value:mn.FOLLOWERS,label:R.createElement(FormattedMessage,{id:"tabs.followers"})},{value:fm,label:R.createElement(FormattedMessage,{id:"tabs.pending"})}];var gS={tabButton:"O",tabButton__text:"qa"};function An(a){var s=a,{pageId:e="*",componentId:t="*",elementId:o="*",children:r,isActive:n=!1}=s,i=P(s,["pageId","componentId","elementId","children","isActive"]);let{accessibilityId:l,config:d,defaultConfig:p,isExcluded:u,uiReference:g,themeStyles:f}=A({pageId:e,componentId:t,elementId:o});return R.createElement(O,c({style:f,className:gS.tabButton,"data-active":n,"data-qa-anchor":l},i),R.createElement(R.Fragment,null,r))}var Hre=m.div`
|
|
4111
4111
|
display: flex;
|
|
4112
4112
|
flex-direction: column;
|
|
4113
4113
|
width: 100%;
|
|
@@ -4116,7 +4116,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4116
4116
|
border-radius: 8px;
|
|
4117
4117
|
border: 1px solid #e6e6e6;
|
|
4118
4118
|
background: #fff;
|
|
4119
|
-
`,Fre=({userId:e,activeTab:t,socialSettings:o,onTabChange:r,onFollowingListClick:n,onFollowerListClick:i})=>{let{currentUserId:a}=J(),s=x0(o),{formatMessage:l}=useIntl(),[d,p]=useState(Object.values(mn).map(f=>({value:f,label:f}))),{followers:u}=
|
|
4119
|
+
`,Fre=({userId:e,activeTab:t,socialSettings:o,onTabChange:r,onFollowingListClick:n,onFollowerListClick:i})=>{let{currentUserId:a}=J(),s=x0(o),{formatMessage:l}=useIntl(),[d,p]=useState(Object.values(mn).map(f=>({value:f,label:f}))),{followers:u}=na({userId:e,status:"pending"}),g=a===e;return useEffect(()=>{u!=null&&u.length&&g&&s?p(Object.values(mn).map(f=>({value:f,label:f})).concat({value:fm,label:l({id:"tabs.pending"})})):p(Object.values(mn).map(f=>({value:f,label:f})));},[l,g,u,r]),R.createElement(Hre,null,R.createElement(rS,null,d.map(f=>R.createElement(An,{key:f.value,onPress:()=>r(f.value),isActive:t===f.value},f.label))),t===mn.FOLLOWINGS&&R.createElement(sS,{userId:e,onItemClick:f=>n(f)}),t===mn.FOLLOWERS&&R.createElement(cS,{userId:e,onItemClick:f=>i(f)}),t.includes(fm)&&g&&R.createElement(uS,{userId:e}))},fS=Fre;var qo={TIMELINE:"TIMELINE",GALLERY:"GALLERY",FOLLOWERS:"FOLLOWERS"},w8=[{value:qo.TIMELINE,label:R.createElement(FormattedMessage,{id:"tabs.timeline"})},{value:qo.GALLERY,label:R.createElement(FormattedMessage,{id:"tabs.gallery"})},{value:qo.FOLLOWERS,label:R.createElement(FormattedMessage,{id:"tabs.followers"})}];var yS=m.div`
|
|
4120
4120
|
height: 100%;
|
|
4121
4121
|
max-width: 546px;
|
|
4122
4122
|
margin: 0 auto;
|
|
@@ -4128,7 +4128,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4128
4128
|
@media (max-width: 768px) {
|
|
4129
4129
|
display: flex;
|
|
4130
4130
|
}
|
|
4131
|
-
`;var zre=e=>{let[t,o]=useState(0),[r,n]=useState(0),[i,a]=useState(0);return At({fetcher:UserRepository.Relationship.getFollowInfo,params:e,callback:s=>{s.data&&(o(s.data.followerCount),n(s.data.followingCount),a(s.data.pendingCount));},shouldCall:!!e}),{followerCount:t,followingCount:r,pendingCount:i}},CS=zre;var $re=e=>{var o;let t=At({fetcher:UserRepository.Relationship.getFollowInfo,params:e});return (o=t==null?void 0:t.status)!=null?o:"none"},C3=$re;var Gre=({userId:e,currentUserId:t,fileUrl:o,displayName:r,description:n,isMyProfile:i,onEditUser:a,onFollowRequest:s,onFollowDecline:l,onUnFollow:d,onPendingNotificationClick:p,onFollowingCountClick:u,onFollowerCountClick:g,onReportClick:f,isFollowPending:y,isFollowNone:v,isFollowAccepted:C,followerCount:h=0,followingCount:x=0,isPrivateNetwork:b})=>{let M=re(e),{formatMessage:I}=useIntl(),{isFlaggedByMe:w}=os(e||void 0),{confirm:N}=Pe(),{isNoNicknameUser:T,isAnonymousUser:L}=Ee(),{openNicknameModal:D}=To(),{triggerAnonymousNeedsLogin:U}=gr(),{followers:Z}=
|
|
4131
|
+
`;var zre=e=>{let[t,o]=useState(0),[r,n]=useState(0),[i,a]=useState(0);return At({fetcher:UserRepository.Relationship.getFollowInfo,params:e,callback:s=>{s.data&&(o(s.data.followerCount),n(s.data.followingCount),a(s.data.pendingCount));},shouldCall:!!e}),{followerCount:t,followingCount:r,pendingCount:i}},CS=zre;var $re=e=>{var o;let t=At({fetcher:UserRepository.Relationship.getFollowInfo,params:e});return (o=t==null?void 0:t.status)!=null?o:"none"},C3=$re;var Gre=({userId:e,currentUserId:t,fileUrl:o,displayName:r,description:n,isMyProfile:i,onEditUser:a,onFollowRequest:s,onFollowDecline:l,onUnFollow:d,onPendingNotificationClick:p,onFollowingCountClick:u,onFollowerCountClick:g,onReportClick:f,isFollowPending:y,isFollowNone:v,isFollowAccepted:C,followerCount:h=0,followingCount:x=0,isPrivateNetwork:b})=>{let M=re(e),{formatMessage:I}=useIntl(),{isFlaggedByMe:w}=os(e||void 0),{confirm:N}=Pe(),{isNoNicknameUser:T,isAnonymousUser:L}=Ee(),{openNicknameModal:D}=To(),{triggerAnonymousNeedsLogin:U}=gr(),{followers:Z}=na({userId:t,status:"pending"}),B=M!=null&&M.displayName?I({id:"user.unfollow.confirm.title"},{displayName:M.displayName}):I({id:"user.unfollow.confirm.title.thisUser"}),$=M!=null&&M.displayName?I({id:"user.unfollow.confirm.body"},{displayName:M.displayName}):I({id:"user.unfollow.confirm.body.thisUser"}),G=[C&&!i?{name:I({id:"user.unfollow"}),action:()=>N({title:B,content:$,cancelText:I({id:"buttonText.cancel"}),okText:I({id:"buttonText.unfollow"}),onOk:()=>_(void 0,null,function*(){yield d==null?void 0:d();})})}:void 0,i?void 0:{name:I(w?{id:"report.unreportUser"}:{id:"report.reportUser"}),action:()=>{f==null||f();}}].filter(Fe);return R.createElement("div",null,R.createElement(ZP,{"data-qa-anchor":"user-info"},R.createElement(QP,null,R.createElement(WP,{"data-qa-anchor":"user-info-profile-image",avatar:o,backgroundImage:Se}),R.createElement(qP,null,i?R.createElement(_7,{"data-qa-anchor":"user-info-edit-profile-button",onClick:()=>(M==null?void 0:M.userId)&&(a==null?void 0:a(M.userId))},R.createElement(GP,null)," ",R.createElement(FormattedMessage,{id:"user.editProfile"})):R.createElement(R.Fragment,null,b&&y&&R.createElement(_7,{onClick:()=>l==null?void 0:l()},R.createElement(VP,null,R.createElement(jP,null)),R.createElement(FormattedMessage,{id:"user.cancel_follow"})),v&&R.createElement(KP,{onClick:()=>{T?D():L?U():s==null||s();}},R.createElement(Ap,null)," ",R.createElement(FormattedMessage,{id:"user.follow"})))),!T&&!L&&R.createElement(RP,{options:G,pullRight:!1})),R.createElement(n_,null,R.createElement(pw,{lines:3},R.createElement(JP,{"data-qa-anchor":"user-info-profile-name"},r)),M!=null&&M.isGlobalBanned?R.createElement(Kn,{style:{marginLeft:"0.265rem",marginTop:"1px"}}):null),R.createElement(XP,null,R.createElement(T7,{onClick:()=>{u==null||u();}},ib(x)),R.createElement(FormattedMessage,{id:"counter.followings"}),R.createElement(T7,{onClick:()=>{g==null||g();}},ib(h)),R.createElement(FormattedMessage,{id:"counter.followers"})),R.createElement(YP,{"data-qa-anchor":"user-info-description"},n),i&&Z.length>0&&b&&R.createElement(e_,{onClick:()=>{p==null||p();}},R.createElement(t_,null,R.createElement(r_,null),R.createElement(FormattedMessage,{id:"follow.pendingNotification.title"})),R.createElement(o_,null,R.createElement(FormattedMessage,{id:"follow.pendingNotification.body"})))))},xS=e=>{let t=W("UIUserInfo");return t?t(e):R.createElement(Gre,c({},e))};function P8({userId:e,callback:t}){let o=re(e),r=useRef(null);useEffect(()=>{if(o!=null)return r.current=subscribeTopic(rI(o),t),()=>{var n;(n=r.current)==null||n.call(r);}},[]);}function _8({userId:e,callback:t}){let o=re(e),r=useRef(null);useEffect(()=>{if(o!=null)return r.current=subscribeTopic(nI(o),t),()=>{var n;(n=r.current)==null||n.call(r);}},[]);}var ene=({userId:e,onUnFollow:t,onFollowingCountClick:o,onFollowerCountClick:r,onPendingNotificationClick:n,isPrivateNetwork:i})=>{let{currentUserId:a}=J(),{formatMessage:s}=useIntl(),{onEditUser:l}=X(),d=Ce(),p=re(e),u=se({fileId:p==null?void 0:p.avatarFileId,imageSize:"small"});js({userId:e,level:SubscriptionLevels.USER}),P8({userId:a}),_8({userId:a});let g=C3(e),f=()=>_(void 0,null,function*(){e&&(yield UserRepository.Relationship.declineMyFollower(e),d.success({content:R.createElement(FormattedMessage,{id:"notification.done"})}));}),y=()=>_(void 0,null,function*(){e&&(yield UserRepository.Relationship.unfollow(e),t==null||t(),d.success({content:R.createElement(FormattedMessage,{id:"notification.done"})}));}),{followerCount:v,followingCount:C}=CS(e),h=()=>_(void 0,null,function*(){e&&(yield UserRepository.Relationship.follow(e));});if(g==null)return null;let x=g==="none",b=g==="accepted",M=g==="pending";return R.createElement(xS,{userId:e,currentUserId:a,fileUrl:(p==null?void 0:p.avatarCustomUrl)||u,displayName:(p==null?void 0:p.displayName)||s({id:"anonymous"}),description:p==null?void 0:p.description,onFollowerCountClick:r,onFollowingCountClick:o,onPendingNotificationClick:n,onFollowDecline:f,onFollowRequest:h,onUnFollow:y,onEditUser:l,isMyProfile:e===a,isFollowPending:M,isPrivateNetwork:i,isFollowNone:x,isFollowAccepted:b,followerCount:v,followingCount:C})},IS=memo(ene);m(Jk)`
|
|
4132
4132
|
background-color: #fff;
|
|
4133
4133
|
`;var one=({userId:e,socialSettings:t,isOpen:o,toggleOpen:r,hideSideMenu:n})=>{let{currentUserId:i}=J(),[a,s]=useState(qo.TIMELINE),[l,d]=useState(mn.FOLLOWINGS),p=C3(e),[u,g]=useState(null),f=e===i,y=()=>_(void 0,null,function*(){s(qo.TIMELINE);});useEffect(()=>{window!=null&&window.parent?window.scrollTo(0,0):u==null||u.scrollTo(0,0);},[e,u]);let v=p==="accepted",C=x0(t)&&!v&&!f,h=C?w8.filter(({value:x})=>x===qo.TIMELINE):w8;return e?R.createElement("div",null,R.createElement(yS,{ref:x=>g(x)},R.createElement(hS,null,R.createElement(es,{isOtherUserProfile:e!==i})),R.createElement(IS,{key:e,userId:e,onUnFollow:y,onPendingNotificationClick:()=>{s(qo.FOLLOWERS),d(fm);},onFollowingCountClick:()=>{s(qo.FOLLOWERS),d(mn.FOLLOWINGS);},onFollowerCountClick:()=>{s(qo.FOLLOWERS),d(mn.FOLLOWERS);}}),R.createElement(g3,{"data-qa-anchor":"user-feed-header",tabs:h,activeTab:a,onChange:s}),a===qo.TIMELINE&&R.createElement(s1,{targetType:f?"myFeed":"user",targetId:e,showPostCreator:f,isHiddenProfile:C}),a===qo.GALLERY&&R.createElement(u3,{targetType:"user",targetId:e,grid:!0}),a===qo.FOLLOWERS&&!C&&R.createElement(fS,{userId:e,activeTab:l,socialSettings:t,onFollowingListClick:x=>s(qo.TIMELINE),onFollowerListClick:x=>s(qo.TIMELINE),onTabChange:x=>d(x)}))):null},wS=one;var MS=m.div`
|
|
4134
4134
|
max-width: 1160px;
|
|
@@ -4148,7 +4148,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4148
4148
|
&:hover {
|
|
4149
4149
|
background-color: transparent;
|
|
4150
4150
|
}
|
|
4151
|
-
`;var rne=({category:e,communities:t,hasMore:o,loadMore:r,isLoading:n,onClickCommunity:i})=>{let a=()=>o?R.createElement(
|
|
4151
|
+
`;var rne=({category:e,communities:t,hasMore:o,loadMore:r,isLoading:n,onClickCommunity:i})=>{let a=()=>o?R.createElement(ra,{onClick:()=>r()}):null;return t.length===0?R.createElement(R.Fragment,null,R.createElement(gm,null,R.createElement(dS,{icon:R.createElement(C2,{width:48,height:48}),title:R.createElement(FormattedMessage,{id:"CategoryCommunitiesList.emptyTitle"}),description:R.createElement(FormattedMessage,{id:"CategoryCommunitiesList.emptyDescription"})})),a()):R.createElement(R.Fragment,null,R.createElement(gm,null,t.map((s,l)=>Rn(s)?R.createElement(lm,{key:l,loading:!0}):R.createElement(c3,{key:s==null?void 0:s.communityId,communityId:s==null?void 0:s.communityId,onClick:i}))),a())},SS=rne;var NS=({categoryId:e})=>{let{onClickCommunity:t}=X(),{communities:o,hasMore:r,loadMore:n,isLoading:i,loadMoreHasBeenCalled:a}=Mr({categoryId:e||void 0,sortBy:"displayName"},!!e);return {communities:useMemo(()=>{let l=new Array(5).fill(1).map(d=>({skeleton:!0}));return i&&!a?l:i?i&&a?[...o,...l]:l:o},[o,i,a]),hasMore:r,loadMore:n,isLoading:i,onClickCommunity:t}};var ine=({categoryId:e})=>{let{onChangePage:t}=X(),o=Hl(e),{communities:r,loadMore:n,isLoading:i,hasMore:a,onClickCommunity:s}=NS({categoryId:e}),l=(o==null?void 0:o.name)||"";return R.createElement(MS,null,R.createElement(PS,null,R.createElement(TS,{onClick:()=>t("explore")},R.createElement(e0,null)),R.createElement(_S,null,l)),o?R.createElement(SS,{category:o,communities:r,loadMore:n,isLoading:i,hasMore:a,onClickCommunity:s}):null)},ES=ine;var BS=m.div`
|
|
4152
4152
|
display: flex;
|
|
4153
4153
|
align-items: center;
|
|
4154
4154
|
gap: 8px;
|
|
@@ -4178,11 +4178,11 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4178
4178
|
display: flex;
|
|
4179
4179
|
align-items: center;
|
|
4180
4180
|
cursor: pointer;
|
|
4181
|
-
`;var{COMMUNITY_MODERATOR:HS,CHANNEL_MODERATOR:FS}=
|
|
4181
|
+
`;var{COMMUNITY_MODERATOR:HS,CHANNEL_MODERATOR:FS}=Ba,lne=({userId:e,currentUserId:t,onClick:o,roles:r=[],assignRolesToUsers:n,hasModeratorPermissions:i,removeRolesFromUsers:a,removeMembers:s,isJoined:l,isBanned:d})=>{let p=re(e),{formatMessage:u}=useIntl(),{isFlaggedByMe:g,toggleFlagUser:f}=os(e),y=p==null?void 0:p.isGlobalBanned,{confirm:v}=Pe(),C=Ce();js({userId:e,level:SubscriptionLevels.USER});let h=()=>_(void 0,null,function*(){return f()}),x=()=>{h(),C.success({content:R.createElement(FormattedMessage,{id:"report.reportSent"})});},b=()=>_(void 0,null,function*(){h(),C.success({content:R.createElement(FormattedMessage,{id:"report.unreportSent"})});}),M=()=>n([HS,FS],[e]),I=()=>a([HS,FS],[e]),w=()=>{v({"data-qa-anchor":"remove-user",title:R.createElement(FormattedMessage,{id:"community.removeUserFromCommunityTitle"}),content:R.createElement(FormattedMessage,{id:"community.removeUserFromCommunityBody"}),cancelText:"Cancel",okText:"Remove",onOk:()=>s([e])});},N=Ws(r);return R.createElement(AS,{"data-qa-anchor":"community-member-item"},R.createElement(DS,null,R.createElement(ai,{userId:e,isBanned:d||y,onClick:o})),!(t===e)&&R.createElement(No,{"data-qa-anchor":"community-members-option-menu",options:[{name:u(g?{id:"report.unreportUser"}:{id:"report.reportUser"}),action:g?b:x},i&&!N&&!y?{name:u({id:"moderatorMenu.promoteToModerator"}),action:M}:null,i&&N?{name:u({id:"moderatorMenu.dismissModerator"}),action:I}:null,i?{name:u({id:"moderatorMenu.removeFromCommunity"}),action:w,className:"danger-zone"}:null].filter(Fe)}))},N8=lne;var Cm={MEMBERS:"MEMBERS",MODERATORS:"MODERATORS"};[{value:Cm.MEMBERS,label:R.createElement(FormattedMessage,{id:"tabs.members"})},{value:Cm.MODERATORS,label:R.createElement(FormattedMessage,{id:"tabs.moderators"})}];function E8(e,t=5){let n=Ue({fetcher:CommunityRepository.Membership.getMembers,params:{communityId:e,limit:t,memberships:["member"],includeDeleted:!1},shouldCall:!!e}),{items:o}=n,r=P(n,["items"]);return c({members:o},r)}var une=({community:e,members:t,loadMore:o,hasMore:r})=>{let n=e==null?void 0:e.communityId,{currentUserId:i}=J(),{canEditUser:a,canEditPost:s,canReviewPost:l}=Ja({community:e});return {community:e,members:t,currentUserId:i,hasMoreMembers:r,canEditPost:s,canReviewPost:l,canEditUser:a,loadMoreMembers:o,assignRolesToUsers:(g,f)=>n&&CommunityRepository.Moderation.addRoles(n,g,f),removeRolesFromUsers:(g,f)=>n&&CommunityRepository.Moderation.removeRoles(n,g,f),removeMembers:g=>n&&CommunityRepository.Membership.removeMembers(n,g)}};m.div`
|
|
4182
4182
|
width: 100%;
|
|
4183
4183
|
height: 1px;
|
|
4184
4184
|
background-color: var(--neutral-200);
|
|
4185
|
-
`;var gne=({community:e,members:t,loadMore:o,hasMore:r})=>{let{onClickUser:n}=X(),{hasMoreMembers:i,loadMoreMembers:a,currentUserId:s,canEditUser:l,assignRolesToUsers:d,removeRolesFromUsers:p,removeMembers:u}=une({community:e,hasMore:r,loadMore:o,members:t});return t.length===0?null:R.createElement(Eo,{hasMore:i,loadMore:a,contentSlot:t.map(({userId:g,roles:f,isBanned:y})=>R.createElement(N8,{key:g,userId:g,currentUserId:s||"",roles:f,assignRolesToUsers:d,removeRolesFromUsers:p,removeMembers:u,hasModeratorPermissions:l,isJoined:e==null?void 0:e.isJoined,isBanned:y,onClick:()=>n(g)}))})},fne=({community:e})=>{let t=e==null?void 0:e.communityId,{currentUserId:o}=J(),{moderators:r,hasMore:n,loadMore:i}=
|
|
4185
|
+
`;var gne=({community:e,members:t,loadMore:o,hasMore:r})=>{let{onClickUser:n}=X(),{hasMoreMembers:i,loadMoreMembers:a,currentUserId:s,canEditUser:l,assignRolesToUsers:d,removeRolesFromUsers:p,removeMembers:u}=une({community:e,hasMore:r,loadMore:o,members:t});return t.length===0?null:R.createElement(Eo,{hasMore:i,loadMore:a,contentSlot:t.map(({userId:g,roles:f,isBanned:y})=>R.createElement(N8,{key:g,userId:g,currentUserId:s||"",roles:f,assignRolesToUsers:d,removeRolesFromUsers:p,removeMembers:u,hasModeratorPermissions:l,isJoined:e==null?void 0:e.isJoined,isBanned:y,onClick:()=>n(g)}))})},fne=({community:e})=>{let t=e==null?void 0:e.communityId,{currentUserId:o}=J(),{moderators:r,hasMore:n,loadMore:i}=qi(t),a=r.find(f=>f.userId===o),s=re(o),l=Ws(a==null?void 0:a.roles),d=v0(a)&&l||Ws(s==null?void 0:s.roles)||Kx(s==null?void 0:s.roles);return {moderators:r,currentUserId:o,hasMoreModerators:n,loadMoreModerators:i,hasModeratorPermissions:d,assignRolesToUsers:(f,y)=>t&&CommunityRepository.Moderation.addRoles(t,f,y),removeRolesFromUsers:(f,y)=>t&&CommunityRepository.Moderation.removeRoles(t,f,y),removeMembers:f=>t&&CommunityRepository.Membership.removeMembers(t,f)}},yne=({community:e})=>{let{onClickUser:t}=X(),{currentUserId:o,moderators:r,hasMoreModerators:n,loadMoreModerators:i,hasModeratorPermissions:a,assignRolesToUsers:s,removeRolesFromUsers:l,removeMembers:d}=fne({community:e});return r.length===0?null:R.createElement(Eo,{hasMore:n,loadMore:i,contentSlot:r.map(({userId:p,roles:u,isBanned:g})=>R.createElement(N8,{key:p,userId:p,currentUserId:o||"",roles:u,assignRolesToUsers:s,removeRolesFromUsers:l,removeMembers:d,hasModeratorPermissions:a,isJoined:e==null?void 0:e.isJoined,isBanned:g,onClick:f=>f&&t(f)}))})},hne=({communityId:e})=>{let{formatMessage:t}=useIntl(),{hasMore:o,loadMore:r,loadMoreHasBeenCalled:n,isLoading:i,members:a}=E8(e),s=Tt(e),l=[{value:"MEMBERS",label:t({id:"CommunityMembers.members"})},{value:"MODERATORS",label:t({id:"CommunityMembers.moderators"})}],[d,p]=useState(Cm.MEMBERS);return R.createElement(LS,null,R.createElement(BS,null,l.map(u=>R.createElement(An,{key:u.value,onPress:()=>p(u.value),isActive:d===u.value},u.label))),d===Cm.MEMBERS&&R.createElement(gne,{community:s,hasMore:o,loadMore:r,members:a}),d===Cm.MODERATORS&&R.createElement(yne,{community:s}))},x3=memo(e=>{let t=W("CommunityMembers");return t?t(e):R.createElement(hne,c({},e))});m.div`
|
|
4186
4186
|
${({breakpoints:e})=>e.map(({breakpoint:t,show:o})=>`
|
|
4187
4187
|
@media (min-width: ${t}px) {
|
|
4188
4188
|
display: ${o?"block":"none"};
|
|
@@ -4264,18 +4264,18 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4264
4264
|
border-radius: 0 0 8px 8px;
|
|
4265
4265
|
border: 1px solid #edeef2;
|
|
4266
4266
|
border-top: none;
|
|
4267
|
-
`,Nne=({avatarFileUrl:e,communityName:t,onReturnToCommunity:o,tabs:r=[],activeTab:n,onTabChange:i})=>R.createElement(R.Fragment,null,R.createElement($S,{title:R.createElement(FormattedMessage,{id:"community.communitySettings"}),avatarFileUrl:e,avatarImage:mr,backLinkText:R.createElement(FormattedMessage,{id:"community.returnTo",values:{communityName:t}}),onBack:o}),r.length>0?R.createElement(Sne,{tabs:r,activeTab:n||r[0].value,onChange:a=>i==null?void 0:i(a)}):null),jS=Nne;var
|
|
4267
|
+
`,Nne=({avatarFileUrl:e,communityName:t,onReturnToCommunity:o,tabs:r=[],activeTab:n,onTabChange:i})=>R.createElement(R.Fragment,null,R.createElement($S,{title:R.createElement(FormattedMessage,{id:"community.communitySettings"}),avatarFileUrl:e,avatarImage:mr,backLinkText:R.createElement(FormattedMessage,{id:"community.returnTo",values:{communityName:t}}),onBack:o}),r.length>0?R.createElement(Sne,{tabs:r,activeTab:n||r[0].value,onChange:a=>i==null?void 0:i(a)}):null),jS=Nne;var aa={EDIT_PROFILE:"EDIT_PROFILE",MEMBERS:"MEMBERS",PERMISSIONS:"PERMISSIONS"},QS=[{value:aa.EDIT_PROFILE,label:R.createElement(FormattedMessage,{id:"tabs.editProfile"})},{value:aa.MEMBERS,label:R.createElement(FormattedMessage,{id:"tabs.members"})}];var WS=m.div``;var Ane=m.div`
|
|
4268
4268
|
padding: 8px 16px;
|
|
4269
4269
|
`,Dne=({children:e})=>R.createElement(Ane,null,e),Hne=m.div`
|
|
4270
4270
|
display: flex;
|
|
4271
4271
|
padding: 16px 24px;
|
|
4272
4272
|
justify-content: flex-end;
|
|
4273
|
-
`,KS=({className:e="",closeConfirm:t,onSubmit:o})=>{let{formatMessage:r}=useIntl(),{formState:{errors:n},control:i,setError:a,handleSubmit:s}=useForm({defaultValues:{members:[]}}),l=d=>_(void 0,null,function*(){if(d.members.length===0){a("members",{message:r({id:"AddMemberModal.membersValidationError"})});return}o(d.members);});return R.createElement(no,{"data-qa-anchor":"add-member-modal",title:r({id:"AddMemberModal.addMembers"}),onCancel:t},R.createElement(WS,null,R.createElement(Qa,{className:e,onSubmit:s(l)},R.createElement(
|
|
4273
|
+
`,KS=({className:e="",closeConfirm:t,onSubmit:o})=>{let{formatMessage:r}=useIntl(),{formState:{errors:n},control:i,setError:a,handleSubmit:s}=useForm({defaultValues:{members:[]}}),l=d=>_(void 0,null,function*(){if(d.members.length===0){a("members",{message:r({id:"AddMemberModal.membersValidationError"})});return}o(d.members);});return R.createElement(no,{"data-qa-anchor":"add-member-modal",title:r({id:"AddMemberModal.addMembers"}),onCancel:t},R.createElement(WS,null,R.createElement(Qa,{className:e,onSubmit:s(l)},R.createElement(ii,null,R.createElement(Dne,null,R.createElement(wp,{error:n.members},R.createElement(Controller,{name:"members",render:({field:d})=>R.createElement(Wa,E(c({},d),{"data-qa-anchor":"add-member-modal"})),control:i}),R.createElement(xr,{errors:n,name:"members"})))),R.createElement(Hne,null,R.createElement(lM,{onClick:t},R.createElement(FormattedMessage,{id:"cancel"})),R.createElement(Ol,null,R.createElement(FormattedMessage,{id:"add"}))))))};var One=m.div`
|
|
4274
4274
|
max-width: 546px;
|
|
4275
4275
|
margin: 0 auto;
|
|
4276
|
-
`,zne=({communityId:e,tab:t=
|
|
4276
|
+
`,zne=({communityId:e,tab:t=aa.EDIT_PROFILE})=>{X();let [r,n]=useState(t),[i,a]=useState(!1),s=()=>a(!0),l=()=>a(!1);useEffect(()=>n(t),[t]);let{onClickCommunity:d}=X(),p=Tt(e),u=se({fileId:p==null?void 0:p.avatarFileId,imageSize:"medium"}),g=()=>e&&d(e),f=C=>_(void 0,null,function*(){e!=null&&(yield CommunityRepository.updateCommunity(e,C),g());}),y=C=>_(void 0,null,function*(){e!=null&&(yield CommunityRepository.Membership.addMembers(e,C),l());});return R.createElement(One,null,R.createElement(US,{aside:(()=>{switch(r){case aa.MEMBERS:return R.createElement(R.Fragment,null,R.createElement(AM,{action:s}),i&&R.createElement(KS,{closeConfirm:l,onSubmit:y}));default:return null}})(),header:R.createElement(jS,{avatarFileUrl:u,communityName:p==null?void 0:p.displayName,tabs:QS,activeTab:r,onTabChange:C=>n(C),onReturnToCommunity:g})},r===aa.EDIT_PROFILE&&!!(p!=null&&p.communityId)&&R.createElement(Ep,{"data-qa-anchor":"community-edit",community:p,edit:!0,onSubmit:C=>f(E(c({},C),{avatarFileId:C.avatarFileId||void 0}))}),r===aa.MEMBERS&&R.createElement(x3,{communityId:e})))},YS=zne;var Gne=m.div`
|
|
4277
4277
|
margin-top: 16px;
|
|
4278
|
-
`,Zne=({title:e,children:t})=>R.createElement(zl,null,R.createElement(vp,null,e),R.createElement(Ul,null,t)),Qne=({user:e,onSubmit:t,className:o})=>{var u,g;let {formatMessage:r}=useIntl(),{register:n,handleSubmit:i,formState:{errors:a},watch:s,control:l}=useForm({defaultValues:{displayName:e.displayName,description:(u=e.description)!=null?u:"",avatarFileId:(g=e.avatarFileId)!=null?g:void 0}}),d=s("description");s("displayName");return R.createElement(Qa,{className:o,onSubmit:i(f=>{e.displayName===f.displayName?t({description:f.description,avatarFileId:f.avatarFileId}):t(f);})},R.createElement(
|
|
4278
|
+
`,Zne=({title:e,children:t})=>R.createElement(zl,null,R.createElement(vp,null,e),R.createElement(Ul,null,t)),Qne=({user:e,onSubmit:t,className:o})=>{var u,g;let {formatMessage:r}=useIntl(),{register:n,handleSubmit:i,formState:{errors:a},watch:s,control:l}=useForm({defaultValues:{displayName:e.displayName,description:(u=e.description)!=null?u:"",avatarFileId:(g=e.avatarFileId)!=null?g:void 0}}),d=s("description");s("displayName");return R.createElement(Qa,{className:o,onSubmit:i(f=>{e.displayName===f.displayName?t({description:f.description,avatarFileId:f.avatarFileId}):t(f);})},R.createElement(ii,null,R.createElement(Zne,{title:R.createElement(FormattedMessage,{id:"UserProfileForm.title"})},R.createElement(Controller,{name:"avatarFileId",render:v=>{var {field:C}=v,h=C,y=P(h,["ref"]);return R.createElement(pM,null,R.createElement(Ga,E(c({},y),{"data-qa-anchor":"user-profile-form-avatar-uploader",mimeType:"image/png, image/jpeg, image/jpg"})))},control:l}),R.createElement(br,{error:a.displayName},R.createElement(Xi,null,R.createElement(sn,{htmlFor:"displayName",className:"required"},R.createElement(FormattedMessage,{id:"UserProfileForm.displayname"}))),R.createElement(t1,E(c({},n("displayName",{required:r({id:"UserProfileForm.requiredDisplayName"})})),{"data-qa-anchor":"user-profile-form-display-name-input",placeholder:r({id:"UserProfileForm.namePlaceholder"}),maxLength:100,disabled:!0})),R.createElement(xr,{errors:a,name:"displayName"})),R.createElement(br,{error:a.description},R.createElement(Xi,null,R.createElement(sn,{htmlFor:"description"},R.createElement(FormattedMessage,{id:"UserProfileForm.about"})),R.createElement(Za,null,(d==null?void 0:d.length)||0,"/177")),R.createElement(e1,E(c({},n("description")),{"data-qa-anchor":"user-profile-form-description-textarea",placeholder:r({id:"UserProfileForm.requiredDescription"}),maxLength:177})),R.createElement(xr,{errors:a,name:"description"})),R.createElement(Gne,null,R.createElement(dM,{"data-qa-anchor":"user-profile-form-save-button",type:"submit"},R.createElement(FormattedMessage,{id:"save"}))))))},RS=memo(Qne);var eN=m.button.attrs({role:"button"})`
|
|
4279
4279
|
color: #636878;
|
|
4280
4280
|
font-size: 14px;
|
|
4281
4281
|
border: none;
|
|
@@ -4352,7 +4352,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4352
4352
|
width: 100%;
|
|
4353
4353
|
`;m(Mn).attrs({width:15,height:15})`
|
|
4354
4354
|
margin-right: 8px;
|
|
4355
|
-
`;var tie=({userId:e})=>{let{formatMessage:t}=useIntl(),{onClickUser:o}=X(),[r,n]=useState(w3.EDIT_PROFILE),i=re(e),a=se({fileId:i==null?void 0:i.avatarFileId,imageSize:"small"}),s=Ce(),l=p=>{if(p.message.includes("Deny from prehook:")){let g=p.message.split("Deny from prehook:")[1];s.error({content:g});return}let u=p.message.replace(/Amity[^:]*: /,"");s.error({content:u});},d=p=>_(void 0,null,function*(){try{if(e==null)return;yield UserRepository.updateUser(e,p),o(e);}catch(u){l(u),console.log(u);}});return i==null?null:R.createElement(aN,null,R.createElement(sN,null,R.createElement(cN,null,R.createElement(mN,{avatar:a,backgroundImage:Se})),R.createElement("div",null,R.createElement(tN,{text:t({id:"ProfileSettings.returnTo"})+((i==null?void 0:i.displayName)||"")}),R.createElement(lN,null,R.createElement(FormattedMessage,{id:"profile.setting"})))),R.createElement("div",null,R.createElement(iN,{tabs:oN,activeTab:r,onChange:n})),R.createElement(pN,null,r===w3.EDIT_PROFILE&&R.createElement(dN,null,i!=null?R.createElement(RS,{user:i,onSubmit:d}):null)))},uN=memo(e=>{let t=W("ProfileSettings");return t?t(e):R.createElement(tie,c({},e))});var gN=createContext({file:null,setFile:()=>{}}),
|
|
4355
|
+
`;var tie=({userId:e})=>{let{formatMessage:t}=useIntl(),{onClickUser:o}=X(),[r,n]=useState(w3.EDIT_PROFILE),i=re(e),a=se({fileId:i==null?void 0:i.avatarFileId,imageSize:"small"}),s=Ce(),l=p=>{if(p.message.includes("Deny from prehook:")){let g=p.message.split("Deny from prehook:")[1];s.error({content:g});return}let u=p.message.replace(/Amity[^:]*: /,"");s.error({content:u});},d=p=>_(void 0,null,function*(){try{if(e==null)return;yield UserRepository.updateUser(e,p),o(e);}catch(u){l(u),console.log(u);}});return i==null?null:R.createElement(aN,null,R.createElement(sN,null,R.createElement(cN,null,R.createElement(mN,{avatar:a,backgroundImage:Se})),R.createElement("div",null,R.createElement(tN,{text:t({id:"ProfileSettings.returnTo"})+((i==null?void 0:i.displayName)||"")}),R.createElement(lN,null,R.createElement(FormattedMessage,{id:"profile.setting"})))),R.createElement("div",null,R.createElement(iN,{tabs:oN,activeTab:r,onChange:n})),R.createElement(pN,null,r===w3.EDIT_PROFILE&&R.createElement(dN,null,i!=null?R.createElement(RS,{user:i,onSubmit:d}):null)))},uN=memo(e=>{let t=W("ProfileSettings");return t?t(e):R.createElement(tie,c({},e))});var gN=createContext({file:null,setFile:()=>{}}),ui=()=>useContext(gN),fN=({children:e})=>{let[t,o]=useState(null),r={file:t,setFile:o};return R.createElement(gN.Provider,{value:r},e)};var yN=m.div`
|
|
4356
4356
|
padding: 70px 30px 30px;
|
|
4357
4357
|
max-width: 360px;
|
|
4358
4358
|
text-align: center;
|
|
@@ -4374,7 +4374,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4374
4374
|
background: none;
|
|
4375
4375
|
text-decoration: underline;
|
|
4376
4376
|
}
|
|
4377
|
-
`;function B8({onClose:e,onGoSettings:t}){return R.createElement(no,{"data-qa-anchor":"community-created-modal"},R.createElement(yN,null,R.createElement(c4,null),R.createElement(hN,{"data-qa-anchor":"community-created-modal-title"},R.createElement(FormattedMessage,{id:"communityCreatedModal.title"})),R.createElement(CN,{"data-qa-anchor":"community-created-modal-message"},R.createElement(FormattedMessage,{id:"communityCreatedModal.message"})),R.createElement(vN,{"data-qa-anchor":"community-created-modal-go-to-settings-button",onClick:t},R.createElement(FormattedMessage,{id:"communityCreatedModal.goToSettings"})),R.createElement(xN,{"data-qa-anchor":"community-created-modal-skip-button",onClick:e},R.createElement(FormattedMessage,{id:"communityCreatedModal.skip"}))))}var sie=({communityId:e,onClose:t})=>{let{onEditCommunity:o}=X();return R.createElement(B8,{onClose:t,onGoSettings:()=>{e!=null&&(o(e,
|
|
4377
|
+
`;function B8({onClose:e,onGoSettings:t}){return R.createElement(no,{"data-qa-anchor":"community-created-modal"},R.createElement(yN,null,R.createElement(c4,null),R.createElement(hN,{"data-qa-anchor":"community-created-modal-title"},R.createElement(FormattedMessage,{id:"communityCreatedModal.title"})),R.createElement(CN,{"data-qa-anchor":"community-created-modal-message"},R.createElement(FormattedMessage,{id:"communityCreatedModal.message"})),R.createElement(vN,{"data-qa-anchor":"community-created-modal-go-to-settings-button",onClick:t},R.createElement(FormattedMessage,{id:"communityCreatedModal.goToSettings"})),R.createElement(xN,{"data-qa-anchor":"community-created-modal-skip-button",onClick:e},R.createElement(FormattedMessage,{id:"communityCreatedModal.skip"}))))}var sie=({communityId:e,onClose:t})=>{let{onEditCommunity:o}=X();return R.createElement(B8,{onClose:t,onGoSettings:()=>{e!=null&&(o(e,aa.PERMISSIONS),t());}})},bN=sie;var IN=m(Mn).attrs({width:15,height:15})`
|
|
4378
4378
|
margin-right: 8px;
|
|
4379
4379
|
`,wN=m(Ds).attrs({width:15,height:15})`
|
|
4380
4380
|
margin-right: 4px;
|
|
@@ -4424,7 +4424,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4424
4424
|
bottom: 16px;
|
|
4425
4425
|
left: 16px;
|
|
4426
4426
|
right: 16px;
|
|
4427
|
-
`;var kN=m(
|
|
4427
|
+
`;var kN=m(Ri)`
|
|
4428
4428
|
color: #000;
|
|
4429
4429
|
|
|
4430
4430
|
> div {
|
|
@@ -4512,7 +4512,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4512
4512
|
`;m.div`
|
|
4513
4513
|
${({theme:e})=>e.typography.caption};
|
|
4514
4514
|
color: ${({theme:e})=>e.palette.base.shade1};
|
|
4515
|
-
`;var die=({communityId:e,communityCategories:t,pendingPostsCount:o,postsCount:r,membersCount:n,description:i,isJoined:a,isOfficial:s,isPublic:l,avatarFileUrl:d,canEditCommunity:p,onEditCommunity:u,joinCommunity:g,onClickLeaveCommunity:f,canLeaveCommunity:y,canReviewPosts:v,name:C,postSetting:h,isClientCommunity:x=!1})=>{let{formatMessage:b}=useIntl(),{isNoNicknameUser:M,isAnonymousUser:I}=Ee(),{openNicknameModal:w}=To(),{triggerAnonymousNeedsLogin:N}=gr();return R.createElement(_N,{"data-qa-anchor":"community-info"},R.createElement(TN,{backgroundImage:d}),R.createElement(SN,null,R.createElement(EN,null,R.createElement(NN,null,R.createElement(kN,{"data-qa-anchor":"community-info",isOfficial:s,isPublic:l,isTitle:!0,name:C,truncate:2}),!x&&a&&R.createElement(MN,null,R.createElement(PN,{"data-qa-anchor":"community-info-options-button",options:[p?{name:b({id:"community.settings"}),action:()=>u(e),dataQaAnchorMenuItem:"settings"}:null,y?{name:b({id:"community.leaveCommunity"}),action:()=>f(e),dataQaAnchorMenuItem:"leave-community"}:null].filter(Fe)}))),R.createElement(BN,null,R.createElement(Ln,{categories:t||[]})),i&&R.createElement(pw,{lines:3},R.createElement(AN,{"data-qa-anchor":"community-info-description"},i)),R.createElement(FN,null,R.createElement(LN,null,R.createElement("div",{className:"countNumber"},ib(r||0)),R.createElement("div",{className:"countType"},R.createElement(FormattedMessage,{id:"community.posts"}))))),!a&&!x&&R.createElement(DN,{"data-qa-anchor":"community-info-join-button",onClick:()=>{M?w():I?N():g(e);}},R.createElement(IN,null)," ",R.createElement(FormattedMessage,{id:"community.join"})),!x&&a&&p&&!I&&!M&&R.createElement(HN,{fullWidth:!0,"data-qa-anchor":"community-info-edit-button",onClick:()=>u(e)},R.createElement(wN,null)," ",R.createElement(FormattedMessage,{id:"community.editProfile"}))))},ON=e=>{let t=W("UICommunityInfo");return t?t(e):R.createElement(die,c({},e))};var _3=e=>{let{onEditCommunity:t}=X(),o=Tt(e),r=se({fileId:o==null?void 0:o.avatarFileId,imageSize:"medium"}),{posts:n}=Bn({targetType:"community",targetId:e,feedType:"reviewing"}),i=Ra(o==null?void 0:o.categoryIds),{canReviewPost:a,canEdit:s,canEditPost:l}=Ja({community:o}),d=useMemo(()=>(n==null?void 0:n.length)||0,[n]);return {community:o,reviewingPosts:n,avatarFileUrl:r,communityCategories:i,pendingPostsCount:d,canEditCommunity:s,canEditCommunityPost:l,canReviewCommunityPosts:a,onEditCommunity:t,joinCommunity:()=>e&&CommunityRepository.joinCommunity(e),leaveCommunity:()=>e&&CommunityRepository.leaveCommunity(e),updateCommunity:y=>e&&CommunityRepository.updateCommunity(e,y),closeCommunity:()=>e&&CommunityRepository.deleteCommunity(e)}};var gie=({communityId:e,stories:t})=>{var M;let{community:o,communityCategories:r,avatarFileUrl:n,canEditCommunity:i,onEditCommunity:a,joinCommunity:s,leaveCommunity:l,pendingPostsCount:d,canReviewCommunityPosts:p}=_3(e),{confirm:u}=Pe();if(o==null)return null;let g=o.isJoined||!1,{membersCount:f,description:y,isJoined:v}=o,C=({onOk:I})=>u({"data-qa-anchor":"leave-community",title:R.createElement(FormattedMessage,{id:"community.leaveCommunityTitle"}),content:R.createElement(FormattedMessage,{id:"community.leaveCommunityBody"}),okText:R.createElement(FormattedMessage,{id:"community.leaveCommunityButtonText"}),onOk:()=>I()}),{newsCommunityId:h,faqCommunityId:x}=Cr(),b=(o==null?void 0:o.communityId)===x||(o==null?void 0:o.communityId)===h;return R.createElement(ON,{communityId:e,communityCategories:r,pendingPostsCount:d,postsCount:(M=o.postsCount)!=null?M:0,membersCount:f,description:y||"",isJoined:v||!1,isOfficial:o.isOfficial||!1,isPublic:o.isPublic||!1,avatarFileUrl:n||null,joinCommunity:s,canEditCommunity:i,canLeaveCommunity:g||!1,canReviewPosts:p,name:o.displayName,postSetting:o.postSetting||CommunityPostSettings.ADMIN_REVIEW_POST_REQUIRED,onEditCommunity:a,onClickLeaveCommunity:()=>C({onOk:()=>l()}),isClientCommunity:b})};var zN=gie;var
|
|
4515
|
+
`;var die=({communityId:e,communityCategories:t,pendingPostsCount:o,postsCount:r,membersCount:n,description:i,isJoined:a,isOfficial:s,isPublic:l,avatarFileUrl:d,canEditCommunity:p,onEditCommunity:u,joinCommunity:g,onClickLeaveCommunity:f,canLeaveCommunity:y,canReviewPosts:v,name:C,postSetting:h,isClientCommunity:x=!1})=>{let{formatMessage:b}=useIntl(),{isNoNicknameUser:M,isAnonymousUser:I}=Ee(),{openNicknameModal:w}=To(),{triggerAnonymousNeedsLogin:N}=gr();return R.createElement(_N,{"data-qa-anchor":"community-info"},R.createElement(TN,{backgroundImage:d}),R.createElement(SN,null,R.createElement(EN,null,R.createElement(NN,null,R.createElement(kN,{"data-qa-anchor":"community-info",isOfficial:s,isPublic:l,isTitle:!0,name:C,truncate:2}),!x&&a&&R.createElement(MN,null,R.createElement(PN,{"data-qa-anchor":"community-info-options-button",options:[p?{name:b({id:"community.settings"}),action:()=>u(e),dataQaAnchorMenuItem:"settings"}:null,y?{name:b({id:"community.leaveCommunity"}),action:()=>f(e),dataQaAnchorMenuItem:"leave-community"}:null].filter(Fe)}))),R.createElement(BN,null,R.createElement(Ln,{categories:t||[]})),i&&R.createElement(pw,{lines:3},R.createElement(AN,{"data-qa-anchor":"community-info-description"},i)),R.createElement(FN,null,R.createElement(LN,null,R.createElement("div",{className:"countNumber"},ib(r||0)),R.createElement("div",{className:"countType"},R.createElement(FormattedMessage,{id:"community.posts"}))))),!a&&!x&&R.createElement(DN,{"data-qa-anchor":"community-info-join-button",onClick:()=>{M?w():I?N():g(e);}},R.createElement(IN,null)," ",R.createElement(FormattedMessage,{id:"community.join"})),!x&&a&&p&&!I&&!M&&R.createElement(HN,{fullWidth:!0,"data-qa-anchor":"community-info-edit-button",onClick:()=>u(e)},R.createElement(wN,null)," ",R.createElement(FormattedMessage,{id:"community.editProfile"}))))},ON=e=>{let t=W("UICommunityInfo");return t?t(e):R.createElement(die,c({},e))};var _3=e=>{let{onEditCommunity:t}=X(),o=Tt(e),r=se({fileId:o==null?void 0:o.avatarFileId,imageSize:"medium"}),{posts:n}=Bn({targetType:"community",targetId:e,feedType:"reviewing"}),i=Ra(o==null?void 0:o.categoryIds),{canReviewPost:a,canEdit:s,canEditPost:l}=Ja({community:o}),d=useMemo(()=>(n==null?void 0:n.length)||0,[n]);return {community:o,reviewingPosts:n,avatarFileUrl:r,communityCategories:i,pendingPostsCount:d,canEditCommunity:s,canEditCommunityPost:l,canReviewCommunityPosts:a,onEditCommunity:t,joinCommunity:()=>e&&CommunityRepository.joinCommunity(e),leaveCommunity:()=>e&&CommunityRepository.leaveCommunity(e),updateCommunity:y=>e&&CommunityRepository.updateCommunity(e,y),closeCommunity:()=>e&&CommunityRepository.deleteCommunity(e)}};var gie=({communityId:e,stories:t})=>{var M;let{community:o,communityCategories:r,avatarFileUrl:n,canEditCommunity:i,onEditCommunity:a,joinCommunity:s,leaveCommunity:l,pendingPostsCount:d,canReviewCommunityPosts:p}=_3(e),{confirm:u}=Pe();if(o==null)return null;let g=o.isJoined||!1,{membersCount:f,description:y,isJoined:v}=o,C=({onOk:I})=>u({"data-qa-anchor":"leave-community",title:R.createElement(FormattedMessage,{id:"community.leaveCommunityTitle"}),content:R.createElement(FormattedMessage,{id:"community.leaveCommunityBody"}),okText:R.createElement(FormattedMessage,{id:"community.leaveCommunityButtonText"}),onOk:()=>I()}),{newsCommunityId:h,faqCommunityId:x}=Cr(),b=(o==null?void 0:o.communityId)===x||(o==null?void 0:o.communityId)===h;return R.createElement(ON,{communityId:e,communityCategories:r,pendingPostsCount:d,postsCount:(M=o.postsCount)!=null?M:0,membersCount:f,description:y||"",isJoined:v||!1,isOfficial:o.isOfficial||!1,isPublic:o.isPublic||!1,avatarFileUrl:n||null,joinCommunity:s,canEditCommunity:i,canLeaveCommunity:g||!1,canReviewPosts:p,name:o.displayName,postSetting:o.postSetting||CommunityPostSettings.ADMIN_REVIEW_POST_REQUIRED,onEditCommunity:a,onClickLeaveCommunity:()=>C({onOk:()=>l()}),isClientCommunity:b})};var zN=gie;var la={TIMELINE:"TIMELINE",GALLERY:"GALLERY",MEMBERS:"MEMBERS",PENDING:"PENDING"};function UN(e,t,o,r=0,n){let i=[{value:la.TIMELINE,label:R.createElement(FormattedMessage,{id:"tabs.timeline"})},{value:la.GALLERY,label:R.createElement(FormattedMessage,{id:"tabs.gallery"})}];return n||i.push({value:la.MEMBERS,label:R.createElement(FormattedMessage,{id:"tabs.members"})}),i}var $N=m.div`
|
|
4516
4516
|
height: 100%;
|
|
4517
4517
|
max-width: 546px;
|
|
4518
4518
|
margin: 0 auto;
|
|
@@ -4540,7 +4540,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4540
4540
|
@media (max-width: 768px) {
|
|
4541
4541
|
display: flex;
|
|
4542
4542
|
}
|
|
4543
|
-
`;var fie=()=>{let{onBack:e}=X();return R.createElement(gT,{onClick:()=>{e&&e();}},R.createElement(zr,{width:24,height:20}),R.createElement(fT,null,"Back"))},k3=fie;var hie=({communityId:e,isNewCommunity:t,isOpen:o,toggleOpen:r})=>{J();let {stories:i}=
|
|
4543
|
+
`;var fie=()=>{let{onBack:e}=X();return R.createElement(gT,{onClick:()=>{e&&e();}},R.createElement(zr,{width:24,height:20}),R.createElement(fT,null,"Back"))},k3=fie;var hie=({communityId:e,isNewCommunity:t,isOpen:o,toggleOpen:r})=>{J();let {stories:i}=ea({targetId:e,targetType:"community",options:{orderBy:"asc",sortBy:"createdAt"}}),[a,s]=useState(null),l=Tt(e),{canReviewPost:d}=Ja({community:l});Bn({targetId:e,targetType:"community",feedType:"reviewing"});useEffect(()=>{window!=null&&window.parent?window.scrollTo(0,0):a==null||a.scrollTo(0,0);},[e,a]);let{newsCommunityId:u,faqCommunityId:g}=Cr(),f=(l==null?void 0:l.communityId)===g||(l==null?void 0:l.communityId)===u,y=useMemo(()=>UN(l==null?void 0:l.postSetting,l==null?void 0:l.isJoined,d,0,f),[l==null?void 0:l.postSetting,l==null?void 0:l.isJoined,d,f]),[v,C]=useState(la.TIMELINE),h=(l==null?void 0:l.isJoined)||!1,[x,b]=useState(t),M=f?!1:h;return useEffect(()=>{y.find(I=>I.value===v)||C(y[0].value);},[v,y]),R.createElement($N,{ref:I=>s(I)},R.createElement(k3,null),R.createElement(zN,{communityId:e,stories:i}),R.createElement(g3,{"data-qa-anchor":"community-feed-header",tabs:y,activeTab:v,onChange:C}),v===la.TIMELINE&&R.createElement(s1,{targetType:"community",targetId:e,readonly:!h,showPostCreator:M,feedType:"published"}),v===la.GALLERY&&R.createElement(u3,{targetType:"community",targetId:e,grid:!0}),v===la.MEMBERS&&R.createElement(x3,{communityId:e}),x&&R.createElement(bN,{communityId:e,onClose:()=>b(!1)}))},jN=hie;var ee=({defaultIcon:e,imgIcon:t,defaultIconName:o,configIconName:r})=>o===r?e():t();var GN={createNewStoryButton:"Ga"};var vie=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),R.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#1054DE",stroke:"#fff",strokeWidth:"1.5"}),R.createElement("path",{fill:"#fff",d:"M11.438 7.625c.156 0 .312.156.312.313v.625a.321.321 0 01-.313.312H8.626v2.813a.321.321 0 01-.313.312h-.624a.308.308 0 01-.313-.313V8.876H4.562a.309.309 0 01-.312-.313v-.624c0-.157.137-.313.313-.313h2.812V4.812c0-.156.137-.312.313-.312h.625c.156 0 .312.156.312.313v2.812h2.813z"})),is=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n=()=>{}})=>{let i="create_new_story_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{style:u,className:cr(GN.createNewStoryButton,o),"data-qa-anchor":a,onPress:n},R.createElement(ee,{defaultIcon:()=>R.createElement(vie,null),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:cr(r)}),defaultIconName:l.icon,configIconName:s.icon}))};m(ge)`
|
|
4544
4544
|
margin-right: 8px;
|
|
4545
4545
|
`;m.div`
|
|
4546
4546
|
color: ${({theme:e})=>e.palette.base.shade2};
|
|
@@ -4730,7 +4730,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4730
4730
|
52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4
|
|
4731
4731
|
256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160
|
|
4732
4732
|
303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34
|
|
4733
|
-
0-22.58L207.6 256z`})),kr=({pageId:e="*",componentId:t="*",onPress:o=()=>{},defaultClassName:r,imgClassName:n})=>{let i="close_button",{isExcluded:a,config:s,uiReference:l,accessibilityId:d}=A({pageId:e,componentId:t,elementId:i});return a?null:R.createElement(O,{className:z8.closeButton,"data-qa-anchor":d,onPress:o},R.createElement(ee,{defaultIcon:()=>R.createElement(Bie,{className:cr(z8.closeButton__icon,r)}),imgIcon:()=>R.createElement("img",{src:s.icon,alt:l,className:n}),configIconName:s.icon}))};var E3={bottomSheet__container:"Wa",bottomSheet__header:"Za",bottomSheet__content:"_a",bottomSheet__backdrop:"eo"};var Sr=r=>{var n=r,{children:e,headerTitle:t}=n,o=P(n,["children","headerTitle"]);return R.createElement(C1,c({},o),R.createElement(C1.Container,{className:E3.bottomSheet__container},R.createElement(C1.Header,null,R.createElement(C1.Header,null),t&&R.createElement(C1.Header,{className:E3.bottomSheet__header},R.createElement(S.Title,null,t))),R.createElement(C1.Content,{className:E3.bottomSheet__content},e)),R.createElement(C1.Backdrop,{onTap:o.onClose}))};var U8={avatarContainer:"P",avatarImage:"ro"};var xt=({avatarUrl:e,defaultImage:t,onClick:o})=>R.createElement("div",{className:U8.avatarContainer,"data-clickable":!!o,onClick:o},e?R.createElement("img",{className:U8.avatarImage,src:e,alt:"Avatar"}):t);var Pc={button:"ao",disabled:"m",primary:"Q",secondary:"W",ghost:"Z",small:"oo",medium:"to",large:"io",icon:"lo"};var Oie=a=>{var s=a,{children:e,variant:t="primary",size:o="medium",icon:r,className:n}=s,i=P(s,["children","variant","size","icon","className"]);let l=cr(Pc.button,Pc[t],Pc[o],n);return R.createElement("button",c({className:l},i),r&&R.createElement("span",{className:Pc.icon},r),e)},B3=Oie;var JN={cancelButton:"so"};var L3=({pageId:e="*",componentId:t="*",onPress:o=()=>{}})=>{let r="cancel_button",{accessibilityId:n,config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:r});return a?null:R.createElement(O,{"data-qa-anchor":n,className:JN.cancelButton,style:s,onPress:o},R.createElement(S.Body,null,i.text))};var A3={createStoryButton:"co",createStoryButton__text:"no",createStoryButton__icon:"do"};var Vie=e=>R.createElement("svg",c({width:"17",height:"18",viewBox:"0 0 17 18",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.771159 12.2248C1.00906 12.7861 1.30474 13.3088 1.65819 13.7927C1.85468 14.0618 2.2428 14.0749 2.47778 13.8387L2.85238 13.4622C3.05585 13.2578 3.07242 12.9352 2.91359 12.6944C2.68511 12.3479 2.4918 11.9785 2.33366 11.5862C2.17162 11.1841 2.04651 10.7654 1.95831 10.33C1.90156 10.0497 1.66209 9.83785 1.37619 9.83785H0.7981C0.460143 9.83785 0.194237 10.1301 0.252477 10.463C0.359316 11.0737 0.53221 11.661 0.771159 12.2248ZM0.791992 5.77587C0.565717 6.33406 0.392758 6.91522 0.273115 7.51935C0.206005 7.85821 0.473794 8.1628 0.819238 8.1628H1.37619C1.66209 8.1628 1.90156 7.95091 1.95831 7.6707C2.04651 7.23526 2.17162 6.81652 2.33366 6.41448C2.4918 6.0221 2.68511 5.6527 2.91359 5.30628C3.07242 5.06546 3.05585 4.7429 2.85238 4.53841L2.47778 4.16192C2.2428 3.92576 1.85456 3.93884 1.65906 4.2086C1.30847 4.69235 1.01944 5.21477 0.791992 5.77587ZM5.26074 16.7265C5.81526 16.966 6.39491 17.1396 6.9997 17.247C7.33267 17.3061 7.62533 17.0401 7.62533 16.7019V16.1571C7.62533 15.8715 7.41372 15.6325 7.13436 15.5731C6.70488 15.4817 6.29562 15.3497 5.90658 15.177C5.52127 15.0061 5.14859 14.8025 4.78852 14.5662C4.5475 14.4081 4.22544 14.4327 4.02574 14.6406L3.64108 15.041C3.40868 15.2829 3.43286 15.6735 3.7084 15.8649C4.19354 16.2017 4.71098 16.4889 5.26074 16.7265ZM3.71752 2.12947C3.43846 2.32272 3.41731 2.71924 3.65673 2.95986L4.05715 3.36229C4.26214 3.56831 4.58771 3.58533 4.82847 3.42255C5.1704 3.19137 5.53324 2.99173 5.91699 2.82361C6.3137 2.64981 6.73277 2.5172 7.17418 2.42577C7.45449 2.3677 7.66699 2.12833 7.66699 1.84207V1.29669C7.66699 0.959243 7.37557 0.693429 7.04294 0.750218C6.41529 0.857371 5.82122 1.03203 5.26074 1.27419C4.71443 1.51024 4.20002 1.79533 3.71752 2.12947ZM9.82271 15.5735C9.54395 15.6315 9.33366 15.8703 9.33366 16.155V16.6953C9.33366 17.0359 9.63023 17.3024 9.96541 17.2422C11.8264 16.908 13.4005 16.0311 14.6878 14.6117C16.1184 13.0344 16.8337 11.1639 16.8337 9.00033C16.8337 6.83673 16.1184 4.96627 14.6878 3.38894C13.4005 1.96952 11.8264 1.09268 9.96541 0.758409C9.63023 0.698204 9.33366 0.964784 9.33366 1.30532V1.84562C9.33366 2.13035 9.54395 2.36916 9.82271 2.42716C11.2862 2.73166 12.5155 3.45008 13.5107 4.5824C14.6149 5.83868 15.167 7.31132 15.167 9.00033C15.167 10.6893 14.6149 12.162 13.5107 13.4182C12.5155 14.5506 11.2862 15.269 9.82271 15.5735Z"}),R.createElement("path",{d:"M12.7189 8.47933C12.9012 8.47933 13.0835 8.66162 13.0835 8.84391V9.57308C13.0835 9.77816 12.9012 9.93766 12.7189 9.93766H9.43766V13.2189C9.43766 13.424 9.25537 13.5835 9.07308 13.5835H8.34391C8.13883 13.5835 7.97933 13.424 7.97933 13.2189V9.93766H4.69808C4.493 9.93766 4.3335 9.77816 4.3335 9.57308V8.84391C4.3335 8.66162 4.493 8.47933 4.69808 8.47933H7.97933V5.19808C7.97933 5.01579 8.13883 4.8335 8.34391 4.8335H9.07308C9.25537 4.8335 9.43766 5.01579 9.43766 5.19808V8.47933H12.7189Z"}));function D3({pageId:e="*",componentId:t="*",onClick:o,defaultClassName:r}){let n="create_story_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:R.createElement(O,{className:A3.createStoryButton,"data-qa-anchor":i,style:p,onPress:()=>o==null?void 0:o()},R.createElement(ee,{defaultIcon:()=>R.createElement(Vie,{className:cr(A3.createStoryButton__icon,r)}),imgIcon:()=>R.createElement("img",{src:a.image,alt:d}),configIconName:a.image,defaultIconName:s.image}),R.createElement(S.Body,{className:A3.createStoryButton__text},a.text))}var $8={hyperLinkButton:"mo"};var Zie=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),R.createElement("path",{fill:"currentColor",d:"M18.04 14.21c1.792 1.794 1.898 4.677.316 6.575-.212.281-.07.14-2.954 3.024-1.933 1.933-5.062 1.933-6.96 0-1.934-1.899-1.934-5.028 0-6.961l2.214-2.215c.246-.246.703-.07.703.281.036.387.106.984.176 1.336.035.14 0 .281-.105.387l-1.617 1.617a2.95 2.95 0 000 4.183 2.95 2.95 0 004.183 0l2.637-2.636a2.95 2.95 0 000-4.184c-.176-.21-.563-.457-.809-.562-.14-.106-.246-.282-.21-.457.034-.387.21-.774.527-1.055l.14-.14a.435.435 0 01.492-.106c.457.246.88.527 1.266.914zm5.483-5.483c1.934 1.898 1.934 5.027 0 6.96l-2.214 2.215c-.247.246-.704.07-.704-.28a15.366 15.366 0 00-.175-1.337.397.397 0 01.105-.387l1.617-1.617a2.95 2.95 0 000-4.183 2.95 2.95 0 00-4.183 0l-2.637 2.636a2.95 2.95 0 000 4.184c.176.21.563.457.809.563.14.105.246.28.21.456a1.607 1.607 0 01-.527 1.055l-.14.14a.435.435 0 01-.493.106 5.265 5.265 0 01-1.265-.914c-1.793-1.793-1.899-4.676-.317-6.574.211-.281.07-.14 2.954-3.023 1.933-1.934 5.062-1.934 6.96 0z"})),H3=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n=()=>{}})=>{let i="story_hyperlink_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{className:$8.hyperLinkButton,onPress:n,"data-qa-anchor":a},R.createElement(ee,{defaultIcon:()=>R.createElement(Zie,{className:cr($8.hyperLinkButton,o)}),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var YN={impressionButton:"po"};var qie=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),R.createElement("path",{fill:"#A5A9B5",d:"M10 6.5c1.938 0 3.5 1.594 3.5 3.5 0 1.938-1.563 3.5-3.5 3.5A3.494 3.494 0 016.5 10c0-.281.063-.688.156-.969.188.125.594.219.844.219.938 0 1.75-.781 1.75-1.75-.031-.219-.125-.625-.25-.844.281-.062.719-.125 1-.156zm8.875 3.063a1.142 1.142 0 010 .906C17.187 13.78 13.812 16 10 16c-3.844 0-7.219-2.219-8.906-5.531a1.142 1.142 0 010-.906C2.78 6.25 6.156 4 10 4c3.813 0 7.188 2.25 8.875 5.563zM10 14.5c3.063 0 5.906-1.719 7.406-4.5-1.5-2.781-4.343-4.5-7.406-4.5-3.094 0-5.938 1.719-7.438 4.5 1.5 2.781 4.344 4.5 7.438 4.5z"}));function F3({pageId:e="*",componentId:t="*",reach:o=0,defaultIconClassName:r,imgIconClassName:n}){let i="story_impression_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(ee,{defaultIcon:()=>R.createElement("div",{className:cr(YN.impressionButton,r),"data-qa-anchor":a},R.createElement(qie,null),R.createElement(S.BodyBold,null,o)),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:n}),defaultIconName:l.icon,configIconName:s.icon})}var RN={overflowMenuButton:"go"};var Jie=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},e),R.createElement("path",{fill:"#fff",d:"M13.688 12.25c0 .95-.774 1.688-1.688 1.688-.95 0-1.688-.739-1.688-1.688 0-.914.739-1.688 1.688-1.688a1.71 1.71 0 011.688 1.688zm4.218-1.688c.914 0 1.688.774 1.688 1.688 0 .95-.774 1.688-1.688 1.688-.949 0-1.687-.739-1.687-1.688 0-.914.738-1.688 1.687-1.688zm-11.812 0c.914 0 1.687.774 1.687 1.688 0 .95-.773 1.688-1.687 1.688-.95 0-1.688-.739-1.688-1.688 0-.914.739-1.688 1.688-1.688z"})),O3=({pageId:e="*",componentId:t="*",onPress:o=()=>{},defaultClassName:r,imgClassName:n})=>{let i="overflow_menu",{config:a,defaultConfig:s,uiReference:l,themeStyles:d,accessibilityId:p}=A({pageId:e,componentId:t,elementId:i});return R.createElement(O,{style:d,"data-qa-anchor":p,className:RN.overflowMenuButton,onPress:o},R.createElement(ee,{defaultIcon:()=>R.createElement(Jie,{className:r}),imgIcon:()=>R.createElement("img",{src:a.icon,alt:l,className:n}),defaultIconName:s.icon,configIconName:a.icon}))};var Xie=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{clipPath:"url(#clip0_1709_7904)"},R.createElement("path",{d:"M16 32.5C24.8366 32.5 32 25.3366 32 16.5C32 7.66344 24.8366 0.5 16 0.5C7.16344 0.5 0 7.66344 0 16.5C0 25.3366 7.16344 32.5 16 32.5Z",fill:"#FFD54F"}),R.createElement("path",{d:"M9.33317 15.1667C10.8059 15.1667 11.9998 13.9728 11.9998 12.5C11.9998 11.0273 10.8059 9.83337 9.33317 9.83337C7.86041 9.83337 6.6665 11.0273 6.6665 12.5C6.6665 13.9728 7.86041 15.1667 9.33317 15.1667Z",fill:"#6D4C41"}),R.createElement("path",{d:"M22.6667 15.1667C24.1394 15.1667 25.3333 13.9728 25.3333 12.5C25.3333 11.0273 24.1394 9.83337 22.6667 9.83337C21.1939 9.83337 20 11.0273 20 12.5C20 13.9728 21.1939 15.1667 22.6667 15.1667Z",fill:"#6D4C41"}),R.createElement("path",{d:"M21.0248 27.3372C20.674 27.3372 20.3232 27.2038 20.0564 26.9352C17.8894 24.7682 14.1108 24.7682 11.9456 26.9352C11.4103 27.4705 10.5423 27.4705 10.007 26.9352C9.47163 26.4016 9.47163 25.5319 10.007 24.9966C11.6076 23.396 13.7362 22.5153 16.0001 22.5153C18.264 22.5153 20.3926 23.396 21.9932 24.9984C22.5286 25.5337 22.5286 26.4016 21.9932 26.937C21.7264 27.2038 21.3756 27.3372 21.0248 27.3372Z",fill:"#6D4C41"}),R.createElement("path",{d:"M24.8228 16.5987C24.4495 16.0587 23.5508 16.0587 23.1775 16.5987C22.6228 17.4014 21.3335 19.3881 21.3335 20.5001C21.3335 21.9707 22.5295 23.1667 24.0002 23.1667C25.4708 23.1667 26.6668 21.9707 26.6668 20.5001C26.6668 19.3881 25.3775 17.4014 24.8228 16.5987Z",fill:"#00BCD4"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_1709_7904"},R.createElement("rect",{width:"32",height:"32",fill:"white",transform:"translate(0 0.5)"}))))},eE=Xie;var Yie=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("circle",{cx:"16",cy:"16.5",r:"16",fill:"url(#paint0_linear_1709_7888)"}),R.createElement("g",{clipPath:"url(#clip0_1709_7888)"},R.createElement("path",{d:"M21.8752 10.2903C21.3417 9.70788 20.5123 8.92173 20.1595 10.6968C20.0395 11.3004 19.7591 11.7656 19.5189 12.1402C19.2599 10.8296 18.4808 9.47308 17.7467 8.55843C17.472 8.21623 16.4973 6.85588 16.3101 4.58008C16.2821 4.24043 15.8787 4.08093 15.6263 4.31003C13.2147 6.49923 11.891 9.51013 11.8419 12.8998C11.8419 12.8998 10.8377 12.0533 10.2921 10.4786C10.1452 10.0546 9.57671 9.97368 9.33006 10.3486C9.28271 10.4206 9.23881 10.4927 9.19921 10.5627C7.33856 13.8527 6.44351 17.848 7.27096 21.565C8.65446 27.7898 17.8062 29.5301 22.6511 25.6177C27.3914 21.7899 25.8846 14.6654 21.8752 10.2903Z",fill:"#ED694A"}),R.createElement("path",{d:"M20.4125 14.8409C20.0185 14.4107 19.4058 13.83 19.1452 15.1411C19.0566 15.5869 18.8495 15.9306 18.6721 16.2073C18.4809 15.2392 17.9054 14.2372 17.3632 13.5617C17.1603 13.3089 16.4404 12.3042 16.302 10.6231C16.2814 10.3722 15.9834 10.2545 15.797 10.4237C14.0158 12.0406 13.038 14.2646 13.0018 16.7682C13.0018 16.7682 12.26 16.143 11.8571 14.9799C11.7486 14.6667 11.3287 14.607 11.1465 14.8839C11.1116 14.9371 11.0791 14.9904 11.0499 15.0421C9.67554 17.4721 9.01444 20.4231 9.62559 23.1686C10.6475 27.7664 17.4071 29.0518 20.9857 26.162C24.4869 23.3347 23.3739 18.0725 20.4125 14.8409Z",fill:"#F4A32C"}),R.createElement("path",{d:"M19.077 18.9949C18.8103 18.7037 18.3955 18.3106 18.2191 19.1982C18.1592 19.5 18.0189 19.7326 17.8988 19.9199C17.7693 19.2645 17.3798 18.5863 17.0127 18.129C16.8754 17.9579 16.3881 17.2777 16.2944 16.1398C16.2804 15.9699 16.0787 15.8902 15.9525 16.0048C14.7467 17.0994 14.0849 18.6049 14.0603 20.2996C14.0603 20.2996 13.5582 19.8764 13.2855 19.0891C13.212 18.8771 12.9278 18.8366 12.8045 19.0241C12.7808 19.06 12.7589 19.0961 12.739 19.1311C11.8087 20.7761 11.3612 22.7737 11.7749 24.6323C12.4666 27.7447 17.0425 28.6149 19.4649 26.6586C20.2945 25.9887 20.8088 25.0448 20.9131 24.0006C21.0706 22.4191 20.4619 20.5062 19.077 18.9949Z",fill:"#F4D44E"}),R.createElement("path",{d:"M17.838 22.85C17.6894 22.6878 17.4583 22.4688 17.36 22.9632C17.3266 23.1314 17.2485 23.261 17.1816 23.3653C17.1094 23.0002 16.8924 22.6223 16.6879 22.3676C16.6114 22.2722 16.3399 21.8933 16.2877 21.2593C16.2799 21.1647 16.1675 21.1203 16.0972 21.1841C15.4255 21.7939 15.0567 22.6327 15.043 23.5769C15.043 23.5769 14.7633 23.3411 14.6113 22.9024C14.5704 22.7843 14.412 22.7617 14.3434 22.8662C14.3302 22.8863 14.318 22.9064 14.307 22.9259C13.7887 23.8424 13.5393 24.9553 13.7698 25.9907C14.2947 28.3523 18.5971 28.2807 18.861 25.6388C18.9486 24.7577 18.6095 23.6919 17.838 22.85Z",fill:"#EAE9E8"}),R.createElement("path",{d:"M14.7688 26.4597C14.5383 25.5334 14.7876 24.5379 15.3059 23.7181C15.3169 23.7006 15.3292 23.6827 15.3423 23.6647C15.411 23.5713 15.5694 23.5914 15.6103 23.6971C15.7622 24.0895 16.042 24.3004 16.042 24.3004C16.0532 23.6064 16.3046 22.9764 16.7664 22.4711C16.6631 22.3281 16.3472 21.9833 16.2877 21.2597C16.2799 21.165 16.1675 21.1207 16.0972 21.1844C15.4255 21.7943 15.0567 22.633 15.043 23.5772C15.043 23.5772 14.7633 23.3414 14.6113 22.9028C14.5704 22.7847 14.412 22.7621 14.3434 22.8666C14.3302 22.8867 14.318 22.9068 14.307 22.9263C13.7887 23.8427 13.5393 24.9557 13.7698 25.9911C13.9831 26.9509 14.8594 27.5277 15.8282 27.6669C15.3056 27.4102 14.904 27.0038 14.7688 26.4597Z",fill:"#F7E7A1"})),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_7888",x1:"7.2",y1:"7.7",x2:"24.8",y2:"29.3",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#FFF09F"}),R.createElement("stop",{offset:"1",stopColor:"#FCCF5A"})),R.createElement("clipPath",{id:"clip0_1709_7888"},R.createElement("rect",{width:"25.6",height:"25.6",fill:"white",transform:"translate(3.2002 2.09998)"}))))},tE=Yie;var Rie=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"Reactions",clipPath:"url(#clip0_1709_1751)"},R.createElement("path",{id:"Vector",d:"M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z",fill:"#FFD54F"}),R.createElement("path",{id:"Vector_2",d:"M27.2933 19.9601C26.9867 20.9334 26.5867 21.8267 26.0667 22.6667H5.93332C5.41332 21.8267 5.01332 20.9334 4.70665 19.9601C4.61332 19.6534 4.66665 19.3334 4.86665 19.0801C5.05332 18.8134 5.34665 18.6667 5.66665 18.6667H26.3333C26.6533 18.6667 26.9467 18.8134 27.1333 19.0801C27.3333 19.3334 27.3867 19.6534 27.2933 19.9601Z",fill:"white"}),R.createElement("path",{id:"Vector_3",d:"M26.0664 22.6667C23.9598 26.1201 20.1864 28.2934 15.9998 28.2934C11.8131 28.2934 8.03977 26.1201 5.93311 22.6667H26.0664Z",fill:"#E53935"}),R.createElement("path",{id:"Vector_4",d:"M12.3332 13.6668C11.7812 13.6668 11.3332 13.2188 11.3332 12.6668C11.3332 11.9322 10.7358 11.3335 9.99984 11.3335C9.26384 11.3335 8.6665 11.9322 8.6665 12.6668C8.6665 13.2188 8.2185 13.6668 7.6665 13.6668C7.1145 13.6668 6.6665 13.2188 6.6665 12.6668C6.6665 10.8295 8.16117 9.3335 9.99984 9.3335C11.8385 9.3335 13.3332 10.8295 13.3332 12.6668C13.3332 13.2188 12.8852 13.6668 12.3332 13.6668Z",fill:"#6D4C41"}),R.createElement("path",{id:"Vector_5",d:"M24.3332 13.6668C23.7812 13.6668 23.3332 13.2188 23.3332 12.6668C23.3332 11.9322 22.7358 11.3335 21.9998 11.3335C21.2638 11.3335 20.6665 11.9322 20.6665 12.6668C20.6665 13.2188 20.2185 13.6668 19.6665 13.6668C19.1145 13.6668 18.6665 13.2188 18.6665 12.6668C18.6665 10.8295 20.1612 9.3335 21.9998 9.3335C23.8385 9.3335 25.3332 10.8295 25.3332 12.6668C25.3332 13.2188 24.8852 13.6668 24.3332 13.6668Z",fill:"#6D4C41"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_1709_1751"},R.createElement("rect",{width:"32",height:"32",fill:"white"}))))},oE=Rie;var eae=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),R.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#63A1FF"}),R.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},z3=eae;var tae=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"Reactions"},R.createElement("circle",{id:"Ellipse 2",cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1738)"}),R.createElement("path",{id:"circle",d:"M22.4466 10.5836C20.7296 9.07415 18.2009 9.36319 16.6088 11.0332L16.0156 11.6755L15.3912 11.0332C13.8303 9.36319 11.2704 9.07415 9.55338 10.5836C7.58661 12.3179 7.49295 15.401 9.24119 17.2637L15.2976 23.687C15.6722 24.1045 16.3278 24.1045 16.7024 23.687L22.7588 17.2637C24.507 15.401 24.4134 12.3179 22.4466 10.5836Z",fill:"white"})),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_1738",x1:"7.2",y1:"7.2",x2:"28",y2:"39.2",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#EE5C91"}),R.createElement("stop",{offset:"0.833333",stopColor:"#E02222"}))))},rE=tae;var la={reactButton:"_",reactButton__icon:"ee",reactButton__reactionsText:"re",reactButton__panel:"ho",reactButton__panel__reaction:"r",reactButton__panel__reaction__text:"y","reaction-scale":"ae","reaction-click":"oe"};var iae=e=>R.createElement("svg",c({width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M15.9727 9.6543C16.1055 10.418 16.0059 11.1484 15.6738 11.7461C15.7734 12.543 15.541 13.373 15.0762 13.9707C15.043 15.8301 13.9141 17.125 11.3574 17.125C11.125 17.125 10.8594 17.125 10.5938 17.125C7.20703 17.125 6.17773 15.8633 4.68359 15.8301C4.58398 16.2617 4.15234 16.5938 3.6875 16.5938H1.5625C0.964844 16.5938 0.5 16.1289 0.5 15.5312V7.5625C0.5 6.99805 0.964844 6.5 1.5625 6.5H4.81641C5.44727 5.96875 6.34375 4.50781 7.10742 3.74414C7.57227 3.2793 7.43945 0.125 9.49805 0.125C11.3906 0.125 12.6523 1.1875 12.6523 3.61133C12.6523 4.24219 12.5195 4.74023 12.3535 5.17188H13.582C15.1758 5.17188 16.4375 6.5332 16.4375 7.99414C16.4375 8.625 16.2715 9.15625 15.9727 9.6543ZM13.9141 11.4473C14.6445 10.7832 14.5449 9.75391 14.0801 9.25586C14.4121 9.25586 14.8438 8.625 14.8438 8.02734C14.8105 7.39648 14.2793 6.76562 13.582 6.76562H10.1289C10.1289 5.50391 11.0586 4.90625 11.0586 3.61133C11.0586 2.81445 11.0586 1.71875 9.49805 1.71875C8.86719 2.34961 9.16602 3.94336 8.23633 4.87305C7.33984 5.76953 6.04492 8.09375 5.08203 8.09375H4.75V14.3027C6.50977 14.3027 8.07031 15.5312 10.4277 15.5312H11.6895C12.8516 15.5312 13.7148 14.9668 13.4492 13.373C13.9473 13.0742 14.3457 12.1445 13.9141 11.4473ZM3.42188 14.4688C3.42188 14.0371 3.05664 13.6719 2.625 13.6719C2.16016 13.6719 1.82812 14.0371 1.82812 14.4688C1.82812 14.9336 2.16016 15.2656 2.625 15.2656C3.05664 15.2656 3.42188 14.9336 3.42188 14.4688Z"}));function U3({pageId:e="*",componentId:t="*",myReaction:o,reactionsCount:r,defaultIconClassName:n,imgIconClassName:i,onReactionClick:a}){let s="reaction_button",{isExcluded:l,accessibilityId:d,config:p,defaultConfig:u,uiReference:g,themeStyles:f}=A({pageId:e,componentId:t,elementId:s}),y=o!=null;if(l)return null;let v=()=>{switch(o){case"like":return R.createElement(z3,{className:la.reactButton__icon});case"love":return R.createElement(rE,{className:la.reactButton__icon});case"fire":return R.createElement(tE,{className:la.reactButton__icon});case"happy":return R.createElement(oE,{className:la.reactButton__icon});case"crying":return R.createElement(eE,{className:la.reactButton__icon});default:return null}};return R.createElement(O,{style:f,"data-qa-anchor":d,className:la.reactButton,onPress:()=>{a("like");}},o?v():R.createElement(ee,{defaultIcon:()=>R.createElement(iae,{className:cr(la.reactButton__icon,n),"data-has-my-reaction":"false"}),imgIcon:()=>R.createElement("img",{src:p.icon,alt:g,className:i}),defaultIconName:u.icon,configIconName:p.icon}),R.createElement(S.BodyBold,{className:la.reactButton__reactionsText,"data-has-my-reaction":y},typeof r=="number"?ib(r):o||p.text))}var nE={saveButton:"te"};function I1({pageId:e="*",componentId:t="*",onPress:o,className:r}){let n="save_button",{accessibilityId:i,config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:n});return s?null:R.createElement(O,{className:cr(nE.saveButton,r),"data-qa-anchor":i,style:E(c({},l),{backgroundColor:a.background_color}),onPress:o},a.save_button_text)}var iE={shareStoryButton:"ie",shareStoryIcon:"fo"};var _c={communityAvatar__text:"bo",communityAvatar__placeholder__path:"uo",communityAvatar__placeholder__rect:"vo",communityAvatar__placeholder:"xo",communityAvatar__image:"wo"};var aE=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",className:_c.communityAvatar__placeholder},e),R.createElement("rect",{width:"64",height:"64",rx:"32",className:_c.communityAvatar__placeholder__rect}),R.createElement("path",{d:"M31.7539 19.2C33.2201 19.2 34.6262 19.7696 35.6629 20.7836C36.6997 21.7976 37.2821 23.1728 37.2821 24.6068C37.2821 26.0408 36.6997 27.4161 35.6629 28.4301C34.6262 29.4441 33.2201 30.0137 31.7539 30.0137C30.2877 30.0137 28.8816 29.4441 27.8449 28.4301C26.8081 27.4161 26.2257 26.0408 26.2257 24.6068C26.2257 23.1728 26.8081 21.7976 27.8449 20.7836C28.8816 19.7696 30.2877 19.2 31.7539 19.2ZM20.6975 23.062C21.582 23.062 22.4033 23.2937 23.1141 23.7108C22.8772 25.92 23.5406 28.1136 24.8989 29.8284C24.1092 31.3114 22.5297 32.331 20.6975 32.331C19.4408 32.331 18.2355 31.8427 17.3469 30.9736C16.4583 30.1044 15.959 28.9256 15.959 27.6965C15.959 26.4674 16.4583 25.2886 17.3469 24.4194C18.2355 23.5503 19.4408 23.062 20.6975 23.062ZM42.8103 23.062C44.067 23.062 45.2723 23.5503 46.1609 24.4194C47.0495 25.2886 47.5488 26.4674 47.5488 27.6965C47.5488 28.9256 47.0495 30.1044 46.1609 30.9736C45.2723 31.8427 44.067 32.331 42.8103 32.331C40.9781 32.331 39.3986 31.3114 38.6089 29.8284C39.9672 28.1136 40.6306 25.92 40.3937 23.7108C41.1045 23.2937 41.9258 23.062 42.8103 23.062ZM21.4872 38.8965C21.4872 35.6987 26.0835 33.1034 31.7539 33.1034C37.4243 33.1034 42.0206 35.6987 42.0206 38.8965V41.5999H21.4872V38.8965ZM12.8 41.5999V39.2827C12.8 37.1354 15.7853 35.3279 19.8288 34.8027C18.8969 35.8532 18.3283 37.3053 18.3283 38.8965V41.5999H12.8ZM50.7077 41.5999H45.1795V38.8965C45.1795 37.3053 44.6109 35.8532 43.679 34.8027C47.7225 35.3279 50.7077 37.1354 50.7077 39.2827V41.5999Z",className:_c.communityAvatar__placeholder__path}));function jr({pageId:e="*",componentId:t="*",community:o}){let r="community_avatar",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r}),s=se({fileId:o==null?void 0:o.avatarFileId});return i?null:s==null?R.createElement(aE,{style:a}):R.createElement("object",{data:s,type:"image/png",className:_c.communityAvatar__image,"data-qa-anchor":n,style:a},R.createElement(aE,null))}var pae=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"14",fill:"none",viewBox:"0 0 15 14"},e),R.createElement("path",{fill:"currentColor",d:"M6.813.219c.125-.157.375-.157.53 0l6.532 6.531a.36.36 0 010 .531l-6.531 6.532c-.157.156-.407.156-.532 0l-.625-.594c-.156-.156-.156-.406 0-.531l4.844-4.876H.375A.361.361 0 010 7.438v-.875a.38.38 0 01.375-.375h10.656L6.187 1.345c-.156-.125-.156-.375 0-.532L6.813.22z"})),$3=({pageId:e="*",componentId:t="*",community:o,onClick:r})=>{let n="share_story_button",{config:i,isExcluded:a}=A({pageId:e,componentId:t,elementId:n});return a?null:R.createElement("button",{role:"button",className:cr(iE.shareStoryButton),"data-qa-anchor":"share_story_button",onClick:r,"data-hideAvatar":i==null?void 0:i.hide_avatar},!(i!=null&&i.hide_avatar)&&R.createElement(jr,{pageId:e,componentId:t,community:o}),R.createElement(S.BodyBold,null,(i==null?void 0:i.text)||"Share story"),R.createElement(pae,null))};var V3={speakerButton:"yo",speakerButton__icon:"ko"};var gae=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),R.createElement("path",{fill:"#fff",d:"M15.121 9.781c.527-.527 1.441-.176 1.441.598v11.777c0 .774-.914 1.125-1.44.598l-3.13-3.129H8.406c-.492 0-.844-.352-.844-.844V13.72c0-.457.352-.844.844-.844h3.586l3.13-3.094zm9.316 6.469c0 2.25-1.16 4.29-3.023 5.52-.422.246-.95.105-1.16-.282a.845.845 0 01.246-1.16 4.807 4.807 0 002.25-4.078 4.792 4.792 0 00-2.25-4.043.845.845 0 01-.246-1.16.824.824 0 011.16-.281c1.863 1.23 3.023 3.27 3.023 5.484zm-4.992-2.672c.985.527 1.617 1.582 1.617 2.672 0 1.125-.632 2.18-1.617 2.707-.422.246-.914.105-1.16-.316a.869.869 0 01.352-1.16c.422-.247.738-.704.738-1.231 0-.492-.316-.95-.738-1.195a.87.87 0 01-.352-1.16c.246-.422.738-.563 1.16-.317z"})),fae=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),R.createElement("path",{fill:"#fff",d:"M25.781 22.344a.467.467 0 01.094.687l-.594.782c-.187.218-.5.28-.718.093L6.188 9.688A.468.468 0 016.093 9l.625-.781a.468.468 0 01.687-.094l4.75 3.656 1.563-1.531c.469-.469 1.281-.156 1.281.531v3.188l2.469 1.937a1.234 1.234 0 00-.625-.969.773.773 0 01-.313-1.03c.219-.376.657-.5 1.032-.282A2.739 2.739 0 0119 16c0 .344-.094.625-.188.938l1.22.937c.28-.563.468-1.188.468-1.875a4.26 4.26 0 00-2-3.594.75.75 0 01-.219-1.031c.219-.344.688-.469 1.032-.25C20.968 12.188 22 14.031 22 16a5.727 5.727 0 01-.75 2.813l1.188.937c.656-1.125 1.03-2.406 1.03-3.719 0-2.468-1.218-4.781-3.312-6.125-.343-.219-.437-.687-.218-1.062A.795.795 0 0121 8.625c2.5 1.656 4 4.406 4 7.375 0 1.688-.5 3.281-1.375 4.656l2.156 1.688zM7 13.75c0-.25.125-.469.344-.625L15 19.031v2.219c0 .688-.813 1-1.281.531L10.938 19H7.75a.722.722 0 01-.75-.75v-4.5z"}));function j3({isMuted:e,pageId:t="*",componentId:o="*",defaultIconClassName:r,imgIconClassName:n,onPress:i}){let a="speaker_button",{accessibilityId:s,config:l,defaultConfig:d,isExcluded:p,uiReference:u}=A({pageId:t,componentId:o,elementId:a});return p?null:R.createElement(O,{className:cr(V3.speakerButton),onPress:i},R.createElement(ee,{"data-qa-anchor":s,defaultIcon:()=>e?R.createElement(fae,{className:V3.speakerButton__icon}):R.createElement(gae,{className:V3.speakerButton__icon}),imgIcon:()=>R.createElement("img",{src:l.icon,alt:u,className:cr(n)}),defaultIconName:d.icon,configIconName:l.icon}))}var Tc={hyperlink:"jo",hyperlinkIcon:"zo",hyperlinkText:"Xo",text:"Yo"};var fi=r=>{var n=r,{href:e,children:t}=n,o=P(n,["href","children"]);return R.createElement("a",c({href:e,className:Tc.hyperlink},o),R.createElement(bc,{className:Tc.hyperlinkIcon}),R.createElement("div",{className:Tc.hyperlinkText},R.createElement("span",{className:Tc.text},t)))};var lE={editCancelButton:"Co"};var ms=({pageId:e="*",componentId:t="*",className:o,onPress:r=()=>{}})=>{let n="edit_cancel_button",{accessibilityId:i,config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:n});return s?null:R.createElement(O,{"data-qa-anchor":i,className:cr(lE.editCancelButton,o),style:E(c({},l),{backgroundColor:a.background_color}),onPress:r},R.createElement(S.Body,null,a.cancel_button_text))};var vae=e=>R.createElement("svg",c({width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#D9E5FC"}),R.createElement("path",{d:"M23.1255 13.1312C22.385 12.4069 21.3806 12 20.3333 12C19.2861 12 18.2817 12.4069 17.5412 13.1312C16.8006 13.8555 16.3846 14.8378 16.3846 15.8621C16.3846 16.8864 16.8006 17.8687 17.5412 18.593C18.2817 19.3172 19.2861 19.7241 20.3333 19.7241C21.3806 19.7241 22.385 19.3172 23.1255 18.593C23.866 17.8687 24.2821 16.8864 24.2821 15.8621C24.2821 14.8378 23.866 13.8555 23.1255 13.1312Z",fill:"white"}),R.createElement("path",{d:"M20.3333 21.931C16.2831 21.931 13 23.7848 13 26.069V28H27.6667V26.069C27.6667 23.7848 24.3836 21.931 20.3333 21.931Z",fill:"white"})),cs=vae;var Gr={commentComposer:"Ao",commentComposer__top:"Mo",commentComposer__mentionContainer:"So",commentComposer__container:"Eo",commentComposer__avatar:"Fo",commentComposer__button:"k",commentComposer__input:"Io",commentComposer__replyContainer:"Ro",commentComposer__replyContainer__text:"Uo",commentComposer__replyContainer__username:"Bo",commentComposer__replyContainer__closeButton:"Do",commentComposer__disableContainer:"Ho"};var wae=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},R.createElement("path",{fill:"currentColor",d:"M15.5 8c.813 0 1.5.688 1.5 1.5v7a1.5 1.5 0 01-1.5 1.5h-11A1.48 1.48 0 013 16.5v-7A1.5 1.5 0 014.5 8h1V6.5C5.5 4.031 7.5 2 10 2c2.5.031 4.5 2.063 4.5 4.563V8h1zM7 6.5V8h6V6.5c0-1.625-1.375-3-3-3-1.656 0-3 1.375-3 3zm8.5 10v-7h-11v7h11z"})),kc=({referenceId:e,referenceType:t,replyTo:o,onCancelReply:r,shouldAllowCreation:n=!0,community:i})=>{var h,x;let a=Ae().currentUserId,{user:s}=fr(a),l=nt({fileId:(h=s==null?void 0:s.avatar)==null?void 0:h.fileId,imageSize:"small"}),d=useRef(null),p=useRef(null),u=useRef(null),[g,f]=useState(0),[y,v]=useState({data:{text:""},mentionees:[{type:"user",userIds:[""]}],metadata:{}}),{mutateAsync:C}=useMutation({mutationFn:M=>_(void 0,[M],function*({params:b}){let I=o?o.commentId:void 0;yield CommentRepository.createComment(E(c({referenceId:o?o.referenceId:e,referenceType:t,parentId:I},b),{mentionees:b.mentionees}));}),onError:b=>{},onSuccess:()=>{var b;v({data:{text:""},mentionees:[],metadata:{}}),(b=d.current)==null||b.clearEditorState(),r();}});return n?R.createElement("div",{className:Gr.commentComposer},R.createElement("div",{className:Gr.commentComposer__top},R.createElement("div",{className:Gr.commentComposer__mentionContainer,ref:u}),o&&R.createElement("div",{className:Gr.commentComposer__replyContainer,style:{"--asc-reply-container-offset-bottom":`${g}px`}},R.createElement("div",{className:Gr.commentComposer__replyContainer__text},R.createElement("span",null,"Replying to "),R.createElement("span",{className:Gr.commentComposer__replyContainer__username},o==null?void 0:o.userId)),R.createElement(R1,{onClick:r,className:Gr.commentComposer__replyContainer__closeButton}))),R.createElement("div",{className:Gr.commentComposer__container},R.createElement("div",{className:Gr.commentComposer__avatar},R.createElement(xt,{avatarUrl:l,defaultImage:R.createElement(cs,null)})),R.createElement("div",{className:Gr.commentComposer__input,ref:p},R.createElement(Jn,{ref:d,mentionContainer:u==null?void 0:u.current,onChange:({text:b,mentioned:M,mentionees:I})=>{v({data:{text:b},mentionees:I,metadata:{mentioned:M}});},targetType:t,targetId:e,value:y,placeholder:"Say something nice...",communityId:i==null?void 0:i.communityId})),R.createElement(O,{isDisabled:!((x=y==null?void 0:y.data)!=null&&x.text),className:Gr.commentComposer__button,onPress:()=>C({params:y})},R.createElement(S.Body,null,"Post")))):R.createElement("div",{className:Gr.commentComposer__disableContainer},R.createElement(wae,null),R.createElement(S.Body,null,"Comments are disabled for this story"))};var Q3={moderatorBadge:"Lo",moderatorBadge__icon:"To",moderatorBadge__text:"Vo"};var Pae=e=>R.createElement("svg",c({width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M7.57031 1.3125C7.85156 1.4375 8.03906 1.70312 8.03906 2C8.03906 5.46875 5.91406 7.39062 4.57031 7.95312C4.38281 8.03125 4.17969 8.03125 3.99219 7.95312C2.32031 7.25 0.539062 5.10938 0.539062 2C0.539062 1.70312 0.710938 1.4375 0.992188 1.3125L3.99219 0.0625C4.07031 0.03125 4.19531 0.015625 4.28906 0.015625C4.36719 0.015625 4.49219 0.03125 4.57031 0.0625L7.57031 1.3125ZM6.83594 3.09375C6.92969 3 6.92969 2.84375 6.83594 2.75L6.47656 2.39062C6.38281 2.29688 6.22656 2.29688 6.13281 2.39062L3.78906 4.73438L2.67969 3.64062C2.58594 3.54688 2.42969 3.54688 2.33594 3.64062L1.97656 4C1.88281 4.09375 1.88281 4.25 1.97656 4.34375L3.60156 5.96875C3.69531 6.07812 3.86719 6.07812 3.96094 5.96875L6.83594 3.09375Z"}));function w1({pageId:e="*",componentId:t="*"}){let o="moderator_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement("div",{className:Q3.moderatorBadge,style:l,"data-qa-anchor":r},R.createElement(Pae,{className:Q3.moderatorBadge__icon}),R.createElement("div",{className:Q3.moderatorBadge__text},n.text))}var dE={timestamp:"qo"};dn.extend(Sae);dn.extend(kae);dn.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"Just now",m:"1m",mm:"%dm",h:"1h",hh:"%dh",d:"1d",dd:"%dd",M:function(e,t,o,r){if(r)return e+"M";let n=dn().subtract(e,"M"),i=dn();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},MM:function(e,t,o,r){if(r)return e+"M";let n=dn().subtract(e,"M"),i=dn();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},y:function(e,t,o,r){if(r)return e+"y";let n=dn().subtract(e,"y"),i=dn();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},yy:function(e,t,o,r){if(r)return e+"y";let n=dn().subtract(e,"y"),i=dn();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")}}});function M1({pageId:e="*",componentId:t="*",timestamp:o}){let r="timestamp",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r}),s=dn(o).fromNow();return i?null:R.createElement(S.Caption,{className:dE.timestamp,style:a,"data-qa-anchor":n},s)}var Xe={postComment:"Go",postComment__deleteComment_container:"Jo",postComment__deleteComment_icon:"Ko",postComment__deleteComment_text:"No",postComment__avatar:"Oo",postComment__details:"Po",postComment__content:"Qo",postComment__content__username:"Wo",postComment__content__text:"Zo",postComment__secondRow:"_o",postComment__secondRow__leftPane:"et",postComment__secondRow__timestamp:"rt",postComment__secondRow__rightPane:"at",postComment__secondRow__rightPane__like:"ot",postComment__secondRow__like:"le",postComment__secondRow__reply:"tt",postComment__secondRow__actionButton:"it",postComment__viewReply_button:"lt",postComment__viewReply_icon:"st",postComment__viewReply_text:"ct",postComment__edit:"nt",postComment__edit__inputWrap:"dt",postComment__edit__mentionContainer:"mt",postComment__edit__input:"pt",postComment__edit__buttonWrap:"gt",postComment__edit__button:"ht",postComment__edit__cancelButton:"ft",postComment__edit__saveButton:"bt",postComment__seeMore:"ut"};var Eae=e=>R.createElement("svg",c({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M13.824 9.72708L10.6334 12.8479C10.3988 13.0544 10.0469 13.0544 9.83578 12.8249L9.31965 12.3201C9.08504 12.1136 9.08504 11.7464 9.31965 11.5399L10.7507 10.2549H2.56305C2.2346 10.2549 2 10.0024 2 9.70413V5.56C2 5.25072 2.25072 5 2.56 5L3.31683 5C3.62611 5.00001 3.87683 5.25073 3.87683 5.56V8.4191H10.7507L9.31965 7.11113C9.08504 6.9046 9.08504 6.53745 9.31965 6.33093L9.83578 5.8261C10.0469 5.59663 10.3988 5.59663 10.6334 5.80315L13.824 8.92393C14.0587 9.1534 14.0587 9.49761 13.824 9.72708Z",fill:"currentColor"})),W3=Eae;var Fn={postCommentSkeleton__container:"vt",postCommentSkeleton:"xt",postCommentSkeleton__avatar:"wt",postCommentSkeleton__details:"yt",postCommentSkeleton__content:"kt",postCommentSkeleton__content__bar:"jt",postCommentSkeleton__animation:"zt","skeleton-pulse":"se"};var K3=({pageId:e="*",componentId:t="*",numberOfSkeletons:o=1})=>{let{accessibilityId:r,isExcluded:n,themeStyles:i}=te({pageId:e,componentId:t});if(n)return null;let a=Array.from({length:o},(s,l)=>R.createElement("div",{key:l,"data-qa-anchor":r,className:cr(Fn.postCommentSkeleton,Fn.postCommentSkeleton__animation),style:i},R.createElement("div",{className:cr(Fn.postCommentSkeleton__avatar,Fn.postCommentSkeleton__animation)}),R.createElement("div",{className:cr(Fn.postCommentSkeleton__details,Fn.postCommentSkeleton__animation)},R.createElement("div",{className:cr(Fn.postCommentSkeleton__content,Fn.postCommentSkeleton__animation)}),R.createElement("div",{className:Fn.postCommentSkeleton__content__bar}))));return R.createElement("div",{className:Fn.postCommentSkeleton__container},a)};function j8({parentId:e,referenceId:t,referenceType:o,limit:r=10,shouldCall:n=!0,includeDeleted:i=!1}){let l=dt({fetcher:CommentRepository.getComments,params:{parentId:e,referenceId:t,referenceType:o,limit:r,includeDeleted:i},shouldCall:!!t&&!!o&&n}),{items:a}=l,s=P(l,["items"]);return c({comments:a},s)}function Nc({commentId:e,shouldSubscribe:t=!0,callback:o}){return ea({fetcher:CommentRepository.getComment,params:e,callback:o,shouldSubscribe:!!e&&t,getSubscribedTopic:({data:r})=>getCommentTopic(r)})}var On="like";var yi={textWithMention__container:"Xt",textWithMention__clamp:"ce",textWithMention__paragraph:"Yt",textWithMention__fullContent:"ne",textWithMention__mention:"Ct",textWithMention__text:"At",textWithMention__link:"Mt",textWithMention__showMoreLess:"St"};var Sm=({maxLines:e=8,data:t,mentionees:o,metadata:r})=>{let[n,i]=useState(!1),[a,s]=useState(!1),[l,d]=useState(!1),p=useRef(null),{goToUserProfilePage:u}=Be(),g=useMemo(()=>nl({data:t,mentionees:o,metadata:r}),[t,o,r]);useEffect(()=>{var h;let y=((h=p.current)==null?void 0:h.clientHeight)||0,v=parseInt(window.getComputedStyle(document.body).getPropertyValue("font-size"),10),C=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--asc-line-height-md"))*v;y>C*e&&s(!0),d(!0);},[]);let f=(y,v)=>y.children.map(C=>{var h;return I6(C)?R.createElement(O,{key:C.data.userId,className:cr(v,yi.textWithMention__mention),onPress:()=>u(C.data.userId)},C.text):w6(C)||Fv(C)?R.createElement("a",{key:C.url,href:C.url,className:cr(v,yi.textWithMention__link)},N2(C.children[0])?(h=C.children[0])==null?void 0:h.text:C.url):N2(C)?R.createElement("span",{className:cr(v,yi.textWithMention__text)},C.text):null});return R.createElement("div",{className:yi.textWithMention__container},R.createElement("div",{ref:p,className:yi.textWithMention__fullContent,"data-hidden":l},g.root.children.map(y=>R.createElement("p",{className:yi.textWithMention__paragraph},y.children.length>0?R.createElement(S.Body,{renderer:({typoClassName:v})=>R.createElement(R.Fragment,null,f(y,v))}):R.createElement("br",null)))),R.createElement("div",{"data-expanded":n,className:yi.textWithMention__clamp,style:{"--asc-text-with-mention-max-lines":e}},a&&!n&&R.createElement("div",{onClick:()=>i(!0),className:yi.textWithMention__showMoreLess},R.createElement(S.Body,null,"...See more")),g.root.children.map((y,v)=>R.createElement("p",{className:yi.textWithMention__paragraph},y.children.length>0?R.createElement(S.Body,{renderer:({typoClassName:C})=>R.createElement(R.Fragment,null,f(y,C))}):R.createElement("br",null)))))};var Nm={commentOptions__actionButton:"Et",commentOptions__actionButton__icon:"Ft",commentOptions__actionButton__text:"It"};var J3=({comment:e,handleEditComment:t,handleDeleteComment:o,onCloseBottomSheet:r})=>{let{userRoles:n}=Ae(),{toggleFlagComment:i,isFlaggedByMe:a}=J7(e.commentId),{canDelete:s,canEdit:l,canReport:d}=G0(e,!1,n),p=_o(),u=()=>_(void 0,null,function*(){try{yield i({onFlagSuccess:()=>p.success({content:"Report sent"}),onUnFlagSuccss:()=>p.success({content:"Unreport sent"})});}catch(f){f instanceof Error&&p.error({content:f.message});}}),g=[l?{name:"Edit comment",action:t,icon:R.createElement(a8,{className:Nm.commentOptions__actionButton__icon})}:null,d?{name:a?"Unreport comment":"Report comment",action:u,icon:R.createElement(s8,{className:Nm.commentOptions__actionButton__icon})}:null,s?{name:"Delete comment",action:o,icon:R.createElement(u1,{className:Nm.commentOptions__actionButton__icon})}:null].filter(on);return R.createElement(R.Fragment,null,g.map((f,y)=>R.createElement("div",{className:Nm.commentOptions__actionButton,key:y,onClick:()=>{r(),f.action();}},f.icon,R.createElement("div",{className:Nm.commentOptions__actionButton__text},R.createElement(S.BodyBold,null,f.name)))))};var pt={postReplyComment:"Rt",postReplyComment__avatar:"Ut",postReplyComment__details:"Bt",postReplyComment__content:"Dt",postReplyComment__content__username:"Ht",postReplyComment__content__text:"Lt",postReplyComment__secondRow:"Tt",postReplyComment__secondRow__leftPane:"Vt",postReplyComment__secondRow__rightPane:"qt",postReplyComment__secondRow__rightPane__like:"Gt",postReplyComment__secondRow__like:"de",postReplyComment__secondRow__reply:"Jt",postReplyComment__secondRow__actionButton:"Kt",postReplyComment__viewReply_button:"Nt",postReplyComment__viewReply_icon:"Ot",postReplyComment__viewReply_text:"Pt",postReplyComment__actionButton:"Qt",postReplyComment__actionButton__icon:"Wt",postReplyComment__actionButton__text:"Zt",postReplyComment__deleteComment_container:"_t",postReplyComment__deleteComment_icon:"ei",postReplyComment__deleteComment_text:"ri",postReplyComment__edit:"ai",postReplyComment__edit__inputWrap:"oi",postReplyComment__edit__input:"ti",postReplyComment__edit__buttonWrap:"ii",postReplyComment__edit__button:"li",postReplyComment__edit__cancelButton:"si",postReplyComment__edit__saveButton:"ci",postReplyComment__secondRow__timestamp:"ni"};var Gae=({pageId:e="*",community:t,comment:o})=>{var T;let r="post_comment",{confirm:n}=Re(),{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=te({pageId:e,componentId:r}),[u,g]=useState(!1),[f,y]=useState(!1),[v,C]=useState(),h=(o.myReactions||[]).some(L=>L==="like"),x=()=>g(L=>!L),b=()=>_(void 0,null,function*(){return o.commentId&&CommentRepository.deleteComment(o.commentId)}),M=()=>{y(!0);},I=()=>{n({pageId:e,componentId:r,title:"Delete reply",content:"This reply will be permanently removed.",cancelText:"Cancel",okText:"Delete",onOk:b});},w=()=>_(void 0,null,function*(){o&&(h?yield ReactionRepository.removeReaction("comment",o==null?void 0:o.commentId,On):yield ReactionRepository.addReaction("comment",o==null?void 0:o.commentId,On));}),N=useCallback(()=>_(void 0,null,function*(){!v||!o.commentId||(yield CommentRepository.updateComment(o.commentId,{data:v.data,mentionees:v.mentionees,metadata:v.metadata}),y(!1));}),[v]);return Nc({commentId:o.commentId}),l?null:R.createElement(R.Fragment,null,o.isDeleted?R.createElement("div",{className:pt.postReplyComment__deleteComment_container,style:p},R.createElement(Ic,{className:pt.postReplyComment__deleteComment_icon}),R.createElement(S.Caption,{className:pt.postReplyComment__deleteComment_text},"This reply has been deleted")):f?R.createElement("div",{className:pt.postReplyComment__edit},R.createElement(jo,{userId:o.userId}),R.createElement("div",{className:pt.postReplyComment__edit__inputWrap},R.createElement("div",{className:pt.postReplyComment__edit__input},R.createElement(Jn,{placeholder:"Say something nice...",communityId:t==null?void 0:t.communityId,value:{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata||{}},onChange:L=>{C({data:{text:L.text},mentionees:L.mentionees,metadata:{mentioned:L.mentioned}});}})),R.createElement("div",{className:pt.postReplyComment__edit__buttonWrap},R.createElement(ms,{componentId:"edit_comment_component",className:cr(pt.postReplyComment__edit__button,pt.postReplyComment__edit__cancelButton),onPress:()=>{y(!1);}}),R.createElement(I1,{className:cr(pt.postReplyComment__edit__button,pt.postReplyComment__edit__saveButton),componentId:"edit_comment_component",onPress:N})))):R.createElement("div",{className:pt.postReplyComment,style:p,"data-qa-anchor":i},R.createElement(jo,{userId:o.userId}),R.createElement("div",{className:pt.postReplyComment__details},R.createElement("div",{className:pt.postReplyComment__content},R.createElement(S.BodyBold,{className:pt.postReplyComment__content__username},(T=o.creator)==null?void 0:T.displayName),R.createElement(w1,{pageId:e,componentId:r}),R.createElement(Sm,{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata})),R.createElement("div",{className:pt.postReplyComment__secondRow},R.createElement("div",{className:pt.postReplyComment__secondRow__leftPane},R.createElement(S.Caption,{className:pt.postReplyComment__secondRow__timestamp},R.createElement(M1,{pageId:e,componentId:r,timestamp:o.createdAt}),o.createdAt!==o.editedAt&&" (edited)"),R.createElement("div",{onClick:w},R.createElement(S.CaptionBold,{className:pt.postReplyComment__secondRow__like,"data-is-liked":h},h?"Liked":"Like")),R.createElement(ka,{className:pt.postReplyComment__secondRow__actionButton,onClick:()=>g(!0)})),o.reactionsCount>0&&R.createElement("div",{className:pt.postReplyComment__secondRow__rightPane},R.createElement(S.Caption,null,ib(o.reactionsCount)),R.createElement(z3,{className:pt.postReplyComment__secondRow__rightPane__like}))))),R.createElement(Sr,{onClose:x,isOpen:u,mountPoint:document.getElementById("asc-uikit-post-comment"),detent:"content-height"},R.createElement(J3,{comment:o,onCloseBottomSheet:x,handleEditComment:M,handleDeleteComment:I})))},yE=Gae;var X3={postReplyCommentList__viewReply_button:"di",postReplyCommentList__viewReply_icon:"mi",postReplyCommentList__viewReply_text:"pi"};var hE=({referenceId:e,referenceType:t,community:o,parentId:r})=>{let{comments:n,hasMore:i,isLoading:a,loadMore:s}=j8({referenceId:e,referenceType:t,parentId:r,limit:10,shouldCall:!0,includeDeleted:!0}),l=()=>{s();};return R.createElement("div",null,a&&R.createElement(K3,{numberOfSkeletons:3}),n.map(d=>R.createElement(yE,{community:o,comment:d})),i&&R.createElement("div",{className:X3.postReplyCommentList__viewReply_button,onClick:l},R.createElement(W3,{className:X3.postReplyCommentList__viewReply_icon}),R.createElement(S.CaptionBold,{className:X3.postReplyCommentList__viewReply_text},"View more replies")))};var Kae=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"16",height:"4",viewBox:"0 0 16 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M9.6875 2.25C9.6875 3.19922 8.91406 3.9375 8 3.9375C7.05078 3.9375 6.3125 3.19922 6.3125 2.25C6.3125 1.33594 7.05078 0.5625 8 0.5625C8.91406 0.5625 9.6875 1.33594 9.6875 2.25ZM13.9062 0.5625C14.8203 0.5625 15.5938 1.33594 15.5938 2.25C15.5938 3.19922 14.8203 3.9375 13.9062 3.9375C12.957 3.9375 12.2188 3.19922 12.2188 2.25C12.2188 1.33594 12.957 0.5625 13.9062 0.5625ZM2.09375 0.5625C3.00781 0.5625 3.78125 1.33594 3.78125 2.25C3.78125 3.19922 3.00781 3.9375 2.09375 3.9375C1.14453 3.9375 0.40625 3.19922 0.40625 2.25C0.40625 1.33594 1.14453 0.5625 2.09375 0.5625Z"}))},Jae=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),R.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#63A1FF"}),R.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},bE=({pageId:e="*",componentId:t="comment_bubble",comment:o,community:r,onClickReply:n,shouldAllowInteraction:i=!0})=>{var q;let {accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=te({pageId:e,componentId:t}),{confirm:g}=Re(),[f,y]=useState(!1),[v,C]=useState(!1),[h,x]=useState(!1),[b,M]=useState(),I=useRef(null);useState(!1);let T=()=>y(z=>!z),L=(o.myReactions||[]).some(z=>z==="like"),D=o.childrenNumber;if(d)return null;let U=()=>_(void 0,null,function*(){return o.commentId&&CommentRepository.deleteComment(o.commentId)}),Z=()=>{x(!0);},B=()=>{g({pageId:e,componentId:t,title:"Delete comment",content:"This comment will be permanently removed.",cancelText:"Cancel",okText:"Delete",onOk:U});},$=()=>_(void 0,null,function*(){o&&(L?yield ReactionRepository.removeReaction("comment",o==null?void 0:o.commentId,On):yield ReactionRepository.addReaction("comment",o==null?void 0:o.commentId,On));}),G=useCallback(()=>_(void 0,null,function*(){!b||!o.commentId||(yield CommentRepository.updateComment(o.commentId,{data:b.data,mentionees:b.mentionees,metadata:b.metadata}),x(!1));}),[b]);return Nc({commentId:o.commentId}),R.createElement("div",{style:u,"data-qa-anchor":a},o.isDeleted?R.createElement("div",{className:Xe.postComment__deleteComment_container},R.createElement(Ic,{className:Xe.postComment__deleteComment_icon}),R.createElement(S.Body,{className:Xe.postComment__deleteComment_text},"This comment has been deleted")):h?R.createElement("div",{className:Xe.postComment__edit},R.createElement(jo,{userId:o.userId}),R.createElement("div",{className:Xe.postComment__edit__inputWrap,ref:I},R.createElement("div",{className:Xe.postComment__edit__input},R.createElement(Jn,{placeholder:"Say something nice...",communityId:r==null?void 0:r.communityId,value:{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata||{}},onChange:z=>{M({data:{text:z.text},mentionees:z.mentionees,metadata:{mentioned:z.mentioned}});},maxLines:5,mentionContainer:I==null?void 0:I.current})),R.createElement("div",{className:Xe.postComment__edit__buttonWrap},R.createElement(ms,{componentId:"edit_comment_component",className:cr(Xe.postComment__edit__button,Xe.postComment__edit__cancelButton),onPress:()=>{x(!1);}}),R.createElement(I1,{className:cr(Xe.postComment__edit__button,Xe.postComment__edit__saveButton),componentId:"edit_comment_component",onPress:G})))):R.createElement("div",{className:Xe.postComment},R.createElement(jo,{userId:o.userId}),R.createElement("div",{className:Xe.postComment__details},R.createElement("div",{className:Xe.postComment__content},R.createElement(S.BodyBold,{className:Xe.postComment__content__username},(q=o.creator)==null?void 0:q.displayName),R.createElement(w1,{pageId:e,componentId:t}),R.createElement(Sm,{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata})),R.createElement("div",{className:Xe.postComment__secondRow},i&&R.createElement("div",{className:Xe.postComment__secondRow__leftPane},R.createElement(S.Caption,{className:Xe.postComment__secondRow__timestamp},R.createElement(M1,{pageId:e,componentId:t,timestamp:o.createdAt}),o.createdAt!==o.editedAt&&" (edited)"),R.createElement("div",{onClick:$},R.createElement(S.CaptionBold,{className:Xe.postComment__secondRow__like,"data-is-liked":L},L?"Liked":"Like")),R.createElement("div",{onClick:()=>n(o)},R.createElement(S.CaptionBold,{className:Xe.postComment__secondRow__reply},"Reply")),R.createElement(Kae,{className:Xe.postComment__secondRow__actionButton,onClick:()=>y(!0)})),o.reactionsCount>0&&R.createElement("div",{className:Xe.postComment__secondRow__rightPane},R.createElement(S.Caption,null,ib(o.reactionsCount)),R.createElement(Jae,{className:Xe.postComment__secondRow__rightPane__like}))),D>0&&!v&&R.createElement("div",{className:Xe.postComment__viewReply_button,onClick:()=>C(!0)},R.createElement(W3,{className:Xe.postComment__viewReply_icon}),R.createElement(S.CaptionBold,{className:Xe.postComment__viewReply_text},"View ",D," ",D>1?"replies":"reply")),v&&R.createElement(hE,{community:r,referenceId:o.referenceId,referenceType:o.referenceType,parentId:o.commentId}))),R.createElement(Sr,{onClose:T,isOpen:f,mountPoint:document.getElementById("asc-uikit-post-comment"),detent:"content-height"},R.createElement(J3,{comment:o,handleEditComment:Z,handleDeleteComment:B,onCloseBottomSheet:T})))};var Ut={commentAd:"gi",commentAd__container:"hi",commentAd__details:"fi",commentAd__avatar:"bi",commentAd__content:"ui",commentAd__content__advertiserName__container:"vi",commentAd__content__advertiserName:"xi",commentAd__content__text:"wi",commentAd__adCard:"yi",commentAd__adCard__imageContainer:"ki",commentAd__adCard__image:"ji",commentAd__adCard__detail:"zi",commentAd__adCard__textContainer:"Xi",commentAd__adCard__description:"Yi",commentAd__adCard__headline:"Ci",commentAd__adCard__button:"Ai",commentAd__adCard__button__text:"Mi",infoIcon__button:"Si",infoIcon:"Ei"};var Yae=o=>{var r=o,{color:e="white"}=r,t=P(r,["color"]);return R.createElement("svg",c({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),R.createElement("path",{d:"M5.54688 1.78125C5.73438 1.40625 6.26562 1.42188 6.4375 1.78125L7.46875 3.85938L9.75 4.1875C10.1562 4.25 10.3125 4.75 10.0156 5.04688L8.375 6.65625L8.76562 8.92188C8.82812 9.32812 8.39062 9.64062 8.03125 9.45312L6 8.375L3.95312 9.45312C3.59375 9.64062 3.15625 9.32812 3.21875 8.92188L3.60938 6.65625L1.96875 5.04688C1.67188 4.75 1.82812 4.25 2.23438 4.1875L4.53125 3.85938L5.54688 1.78125Z",fill:e}))},wE=Yae;var Bc={badge:"me",badge__icon:"Fi",badge__text:"Ii",badge__child:"Ri"};var Bm=()=>R.createElement("div",{className:Bc.badge},R.createElement("div",{className:Bc.badge__child},R.createElement(wE,{className:Bc.badge__icon}),R.createElement("div",{className:Bc.badge__text},"Sponsored")));var ese=e=>R.createElement("svg",c({width:"100%",height:"100%",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("rect",{width:"64",height:"64",rx:"32",fill:"#D9E5FC"}),R.createElement("path",{d:"M20 28.5358C20.5156 28.5358 20.9375 28.8639 21.2188 29.2858L41 23.2858V41.2858L34.8125 39.4576C34.2969 41.3795 32.5625 42.7858 30.5 42.7858C28.0156 42.7858 26 40.7701 26 38.2858C26 37.817 26.0938 37.3014 26.2344 36.8795L21.2188 35.3326C20.9375 35.7545 20.5156 36.0358 20 36.0358C19.1562 36.0358 18.5 35.3795 18.5 34.5358V30.0358C18.5 29.2389 19.1562 28.5358 20 28.5358ZM28.3906 37.4889C28.2969 37.7701 28.25 38.0045 28.25 38.2858C28.25 39.5514 29.2344 40.5358 30.5 40.5358C31.5312 40.5358 32.4219 39.7858 32.6562 38.8014L28.3906 37.4889ZM44.75 21.7858C45.125 21.7858 45.5 22.1608 45.5 22.5358V42.0358C45.5 42.4576 45.125 42.7858 44.75 42.7858H43.25C42.8281 42.7858 42.5 42.4576 42.5 42.0358V22.5358C42.5 22.1608 42.8281 21.7858 43.25 21.7858H44.75Z",fill:"white"})),Lm=ese;var tse=e=>R.createElement("svg",c({width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M8 2.25006C4.25 2.25006 1.25 5.28131 1.25 9.00006C1.25 12.7501 4.25 15.7501 8 15.7501C11.7188 15.7501 14.75 12.7501 14.75 9.00006C14.75 5.28131 11.6875 2.25006 8 2.25006ZM8 1.25006C12.25 1.25006 15.75 4.75006 15.75 9.00006C15.75 13.2813 12.25 16.7501 8 16.7501C3.71875 16.7501 0.25 13.2813 0.25 9.00006C0.25 4.75006 3.71875 1.25006 8 1.25006ZM6.875 12.0001H7.25V8.25006H6.875C6.65625 8.25006 6.5 8.09381 6.5 7.87506V7.62506C6.5 7.43756 6.65625 7.25006 6.875 7.25006H8.375C8.5625 7.25006 8.75 7.43756 8.75 7.62506V12.0001H9.125C9.3125 12.0001 9.5 12.1876 9.5 12.3751V12.6251C9.5 12.8438 9.3125 13.0001 9.125 13.0001H6.875C6.65625 13.0001 6.5 12.8438 6.5 12.6251V12.3751C6.5 12.1876 6.65625 12.0001 6.875 12.0001ZM8 4.50006C8.53125 4.50006 9 4.96881 9 5.50006C9 6.06256 8.53125 6.50006 8 6.50006C7.4375 6.50006 7 6.06256 7 5.50006C7 4.96881 7.4375 4.50006 8 4.50006Z",fill:"#A5A9B5"})),pn=tse;var yo={drawer__content:"pe",drawer__innerContent:"Ui",drawer__placeholder:"Bi",drawer__overlay:"Di",drawer__title:"Hi",drawer__content__data:"Li",drawer__content__data__title:"Ti",drawer__content__data__text:"Vi",drawer__content__data__caption:"qi",drawer__content__data__infoIcon:"Gi",drawer__content__emptySpace:"Ji"};var R3=({isOpen:e,onOpenChange:t,ad:o})=>{var r;return R.createElement(Drawer.Root,{open:e,onOpenChange:t,onDrag:n=>n.stopPropagation()},R.createElement(Drawer.Portal,null,R.createElement(Drawer.Overlay,{className:yo.drawer__overlay}),R.createElement(Drawer.Content,{className:yo.drawer__content,onTouchStart:n=>n.stopPropagation(),onTouchMove:n=>n.stopPropagation(),onTouchEnd:n=>n.stopPropagation()},R.createElement("div",{className:yo.drawer__innerContent},R.createElement("div",{className:yo.drawer__placeholder}),R.createElement(Drawer.Title,{className:yo.drawer__title},R.createElement(S.Title,null,"About this advertisement")),R.createElement("div",{className:yo.drawer__content__data},R.createElement(S.BodyBold,{className:yo.drawer__content__data__title},"Why this advertisement?"),R.createElement("div",{className:yo.drawer__content__data__text},R.createElement(pn,{className:yo.drawer__content__data__infoIcon}),R.createElement(S.Caption,{className:yo.drawer__content__data__caption},"You're seeing this advertisement because it was displayed to all users in the system."))),R.createElement("div",{className:yo.drawer__content__data},R.createElement(S.BodyBold,{className:yo.drawer__content__data__title},"About this advertiser"),R.createElement("div",{className:yo.drawer__content__data__text},R.createElement(pn,{className:yo.drawer__content__data__infoIcon}),R.createElement(S.Caption,{className:yo.drawer__content__data__caption},"Advertiser name: ",(r=o.advertiser)==null?void 0:r.companyName))),R.createElement("div",{className:yo.drawer__content__emptySpace})))))};var PE=({ad:e,themeStyles:t,avatarUrl:o,adImageUrl:r,onCallToActionClick:n})=>{var l;let[i,a]=useState(!1),s=()=>{n==null||n(e.callToActionUrl);};return R.createElement("div",{className:Ut.commentAd,style:t},R.createElement(O,{className:Ut.infoIcon__button,onPress:()=>a(!0)},R.createElement(pn,{className:Ut.infoIcon})),R.createElement("div",{className:Ut.commentAd__container},R.createElement("div",{className:Ut.commentAd__avatar},R.createElement(xt,{avatarUrl:o,defaultImage:R.createElement(Lm,null)})),R.createElement("div",{className:Ut.commentAd__details},R.createElement("div",{className:Ut.commentAd__content},R.createElement(S.BodyBold,{className:Ut.commentAd__content__advertiserName__container},R.createElement("div",{className:Ut.commentAd__content__advertiserName},(l=e.advertiser)==null?void 0:l.name)),R.createElement(Bm,null),R.createElement("div",null,R.createElement(S.Body,{className:Ut.commentAd__content__text},e.body)),R.createElement("div",{className:Ut.commentAd__adCard,onClick:s},R.createElement("div",{className:Ut.commentAd__adCard__imageContainer},R.createElement("img",{className:Ut.commentAd__adCard__image,src:r})),R.createElement("div",{className:Ut.commentAd__adCard__detail},R.createElement("div",{className:Ut.commentAd__adCard__textContainer},R.createElement(S.Caption,{renderer:({typoClassName:d})=>R.createElement("div",{className:cr(d,Ut.commentAd__adCard__description)},e.description)}),R.createElement(S.BodyBold,{className:Ut.commentAd__adCard__headline},e.headline)),e.callToActionUrl?R.createElement(O,{className:Ut.commentAd__adCard__button,onPress:s},R.createElement(S.CaptionBold,{className:Ut.commentAd__adCard__button__text},e.callToAction)):null))))),R.createElement(R3,{ad:e,isOpen:i,onOpenChange:d=>a(d)}))};var _E=({pageId:e="*",ad:t})=>{var d,p,u,g,f,y;let o="comment_tray_component",{themeStyles:r}=te({pageId:e,componentId:o}),i=nt({fileId:(p=(d=t.advertiser)==null?void 0:d.avatar)==null?void 0:p.fileId})||((g=(u=t.advertiser)==null?void 0:u.avatar)==null?void 0:g.fileUrl)||"",s=nt({fileId:(f=t.image1_1)==null?void 0:f.fileId})||((y=t.image1_1)==null?void 0:y.fileUrl)||"";return R.createElement(PE,{themeStyles:r,avatarUrl:i,adImageUrl:s,ad:t,onCallToActionClick:v=>{window==null||window.open(v,"_blank");}})};var e5={commentList__container:"Ki",commentList__viewAllComments__button:"Ni",commentList__container_intersection:"Oi",noCommentsContainer:"Pi"};function Ac({postId:e,level:t,shouldSubscribe:o=!0,callback:r}){return ea({fetcher:PostRepository.getPost,params:e,callback:r,shouldSubscribe:!!e&&o,getSubscribedTopic:({data:n})=>getPostTopic(n,t)})}var use=e=>"adId"in e,Dc=({referenceId:e,referenceType:t,pageId:o="*",onClickReply:r,limit:n=5,includeDeleted:i=!1,community:a,shouldAllowInteraction:s=!0})=>{let l="comment_tray_component",{themeStyles:d,accessibilityId:p}=te({componentId:l,pageId:o}),u=useRef(null),[g,f]=useState(null),{items:y,loadMore:v,hasMore:C,isLoading:h}=uc({fetcher:CommentRepository.getComments,params:{referenceId:e,referenceType:t,limit:n,includeDeleted:i},placement:"comment",pageSize:5,getItemId:x=>x.commentId,shouldCall:!0});return So({node:g,options:{threshold:.8},onIntersect:()=>{C&&h===!1&&v();}}),Ac({postId:e,level:SubscriptionLevels.COMMENT,shouldSubscribe:t==="post"}),Xa({targetId:e,targetType:t,shouldSubscribe:t==="story"&&!!e}),!h&&y.length===0?R.createElement("div",{className:e5.noCommentsContainer},R.createElement(S.Body,null,"No comments yet")):R.createElement("div",{className:e5.commentList__container,style:d,ref:u,"data-qa-anchor":p},y.map(x=>use(x)?R.createElement(_E,{key:x.adId,ad:x}):R.createElement(bE,{key:x.commentId,comment:x,onClickReply:b=>r==null?void 0:r(b),componentId:l,community:a,shouldAllowInteraction:s})),h&&R.createElement(K3,{pageId:o,componentId:l,numberOfSkeletons:3}),R.createElement("div",{ref:x=>f(x),className:e5.commentList__container_intersection}))};var q8={container:"Qi",header:"Wi",roundedHeader:"Zi",content:"_i",scroller:"el",composeBarContainer:"rl",nestedBackdrop:"al",commentTrayContainer:"ol",commentListContainer:"tl",mobileSheetComposeBarContainer:"il"};var Am=({pageId:e="*",referenceType:t,referenceId:o,community:r={},shouldAllowInteraction:n=!0,shouldAllowCreation:i=!0})=>{let a="comment_tray_component",{accessibilityId:s,themeStyles:l}=te({pageId:e,componentId:a}),[d,p]=useState(null),u=f=>{p(f);},g=()=>{p(null);};return R.createElement("div",{style:l,"data-qa-anchor":s,className:q8.commentTrayContainer},R.createElement("div",{className:q8.commentListContainer},R.createElement(Dc,{pageId:e,referenceId:o,referenceType:t,community:r,includeDeleted:!0,onClickReply:u,shouldAllowInteraction:n})),R.createElement(kc,{referenceId:o,referenceType:t,onCancelReply:g,replyTo:d,shouldAllowCreation:i}))};var K8={doneButton:"ll",doneButton_text:"sl"};function J8(n){var i=n,{pageId:e="*",componentId:t="*",className:o}=i,r=P(i,["pageId","componentId","className"]);let a="done_button",{accessibilityId:s,config:l,isExcluded:d}=A({pageId:e,componentId:t,elementId:a});return d?null:R.createElement(O,c({className:`${K8.doneButton} ${o||""}`,"data-qa-anchor":s},r),R.createElement(S.Body,{className:K8.doneButton_text},l.done_button_text))}var ut={hyperlinkFormContainer:"cl",form:"nl",bottomSheet:"a","react-modal-sheet-backdrop":"dl","react-modal-sheet-container":"ml","react-modal-sheet-content":"pl","react-modal-sheet-header":"gl","react-modal-sheet-drag-indicator":"hl",inputContainer:"fl",input:"ge",hasError:"bl",label:"j",required:"ul",description:"vl",errorText:"xl",characterCount:"wl",headerContainer:"yl",labelContainer:"kl",headerTitle:"jl",cancelButton:"zl",doneButton:"he",removeIcon:"Xl",removeLinkButton:"Yl",divider:"Cl",removeLinkContainer:"Al"};var kE=30,Y8=({pageId:e="*",isOpen:t,isHaveHyperLink:o,onClose:r,onSubmit:n,onRemove:i})=>{var $,G,q;let a="hyper_link_config_component",{confirm:s}=Re(),{accessibilityId:l,config:d,isExcluded:p,themeStyles:u}=te({pageId:e,componentId:a});if(p)return null;let{formatMessage:g}=useIntl(),{client:f}=Ae(),[y,v]=useState(!1),C="asc-story-hyperlink-form",h=z.object({url:z.string().refine(z=>{if(!z)return !0;try{let H=new URL(z);return ["http:","https:"].includes(H.protocol)}catch(H){if(z.startsWith("www."))try{let F=new URL(`https://${z}`);return ["http:","https:"].includes(F.protocol)}catch(F){return !1}return !1}},{message:g({id:"storyCreation.hyperlink.validation.error.invalidUrl"})}).refine(z=>_(void 0,null,function*(){if(!z)return !0;let H=z.startsWith("www.")?`https://${z}`:z;return yield f==null?void 0:f.validateUrls([H]).catch(()=>!1)}),{message:g({id:"storyCreation.hyperlink.validation.error.whitelisted"})}),customText:z.string().optional().refine(z=>_(void 0,null,function*(){return z?yield f==null?void 0:f.validateTexts([z]).catch(()=>!1):!0}),g({id:"storyCreation.hyperlink.validation.error.blocked"}))}),{trigger:x,watch:b,register:M,handleSubmit:I,formState:{errors:w},reset:N}=useForm({resolver:zodResolver(h)}),{url:T,customText:L}=b();useEffect(()=>{v(T!==""||L!=="");},[T,L]);let D=z=>{n(z),r();},U=()=>{N(),i(),r();},Z=()=>{s({title:g({id:"storyCreation.hyperlink.removeConfirm.title"}),content:g({id:"storyCreation.hyperlink.removeConfirm.content"}),cancelText:g({id:"storyCreation.hyperlink.removeConfirm.cancel"}),okText:g({id:"storyCreation.hyperlink.removeConfirm.confirm"}),onOk:U});},B=()=>{y?s({title:g({id:"storyCreation.hyperlink.unsavedChanges.title"}),content:g({id:"storyCreation.hyperlink.unsavedChanges.content"}),cancelText:g({id:"storyCreation.hyperlink.unsavedChanges.cancel"}),okText:g({id:"storyCreation.hyperlink.unsavedChanges.confirm"}),onOk:()=>{N(),r();}}):r();};return R.createElement(Sr,{"data-qa-anchor":l,detent:"full-height",mountPoint:document.getElementById("asc-uikit-create-story"),rootId:"asc-uikit-create-story",isOpen:t,onClose:B,className:ut.bottomSheet,style:u},R.createElement("div",{className:ut.headerContainer},R.createElement(ms,{pageId:e,componentId:a,onPress:B}),R.createElement(S.Title,null,g({id:"storyCreation.hyperlink.bottomSheet.title"})),R.createElement(J8,{type:"submit",pageId:e,componentId:a,form:C})),R.createElement("div",{className:ut.divider}),R.createElement("div",{className:ut.hyperlinkFormContainer},R.createElement("form",{onSubmit:I(D),id:C,className:ut.form},R.createElement("div",{className:ut.inputContainer},R.createElement(S.Title,null,R.createElement("label",{htmlFor:"asc-uikit-hyperlink-input-url",className:cr(ut.label,ut.required)},g({id:"storyCreation.hyperlink.form.urlLabel"}))),R.createElement("input",c({id:"asc-uikit-hyperlink-input-url",placeholder:g({id:"storyCreation.hyperlink.form.urlPlaceholder"}),className:cr(ut.input,(w==null?void 0:w.url)&&ut.hasError)},M("url",{onChange:()=>x("url")}))),(w==null?void 0:w.url)&&R.createElement("span",{className:ut.errorText},($=w==null?void 0:w.url)==null?void 0:$.message)),R.createElement("div",{className:ut.inputContainer},R.createElement("div",{className:ut.labelContainer},R.createElement(S.Title,null,R.createElement("label",{htmlFor:"asc-uikit-hyperlink-input-link-text",className:ut.label},g({id:"storyCreation.hyperlink.form.linkTextLabel"}))),R.createElement("div",{className:ut.characterCount},((G=b("customText"))==null?void 0:G.length)||0," / ",kE)),R.createElement("input",E(c({id:"asc-uikit-hyperlink-input-link-text",placeholder:g({id:"storyCreation.hyperlink.form.linkTextPlaceholder"}),className:cr(ut.input,(w==null?void 0:w.customText)&&ut.hasError)},M("customText")),{maxLength:kE})),(w==null?void 0:w.customText)&&R.createElement("span",{className:ut.errorText},(q=w==null?void 0:w.customText)==null?void 0:q.message),R.createElement(S.Caption,null,R.createElement("label",{className:ut.description},g({id:"storyCreation.hyperlink.form.linkTextDescription"}))))),o&&R.createElement("div",{className:ut.removeLinkContainer},R.createElement(B3,{variant:"secondary",onClick:Z,className:cr(ut.removeLinkButton)},R.createElement(u1,{className:ut.removeIcon}),g({id:"storyCreation.hyperlink.form.removeButton"})))))};var Pse=createContext([]),hi=()=>({config:useContext(Pse)});var Dm=e=>e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e;var r5=({reactionConfigItem:e,className:t})=>R.createElement("img",{"data-qa-anchor":"reaction_image_view",key:e.name,src:e.image,alt:e.name,className:t});var Tse=o=>{var r=o,{backgroundColor:e}=r,t=P(r,["backgroundColor"]);return R.createElement("svg",c({width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),R.createElement("path",{d:"M19.6035 10.5C19.6035 15.7467 15.3502 20 10.1035 20C4.85681 20 0.603516 15.7467 0.603516 10.5C0.603516 5.25329 4.85681 1 10.1035 1C15.3502 1 19.6035 5.25329 19.6035 10.5Z",stroke:"currentColor",fill:e}),R.createElement("path",{d:"M10.2723 6.71429C11.6786 6.71429 13.202 7.83595 13.202 9.29242C13.202 11.2344 11.1094 11.2679 11.1094 11.9877V12.0714C11.1094 12.3058 10.9252 12.4732 10.7076 12.4732H9.48549C9.26786 12.4732 9.08371 12.3058 9.08371 12.0714V11.9208C9.08371 10.8828 9.87054 10.4643 10.4732 10.1295C10.9754 9.84487 11.2935 9.66072 11.2935 9.27568C11.2935 8.77345 10.6574 8.45537 10.1384 8.45537C9.48549 8.45537 9.16741 8.75671 8.74888 9.27568C8.61496 9.44309 8.36384 9.47657 8.19643 9.34264L7.47656 8.79019C7.29241 8.673 7.25893 8.42188 7.37612 8.25447C8.0625 7.26675 8.93304 6.71429 10.2723 6.71429ZM10.1049 12.9755C10.7411 12.9755 11.26 13.4944 11.26 14.1306C11.26 14.7667 10.7411 15.2857 10.1049 15.2857C9.45201 15.2857 8.93304 14.7667 8.93304 14.1306C8.93304 13.4944 9.45201 12.9755 10.1049 12.9755Z",fill:"currentColor"}))},Hm=Tse;var ke={reactionListContainer:"Ml",tabListContainer:"fe",tabList:"Sl",tabItem:"be",reactionEmoji:"El",userList:"Fl",userItem:"Il",userDetailsContainer:"Rl",userDetailsProfile:"Ul",userDetailsReaction:"Bl",reactionItem:"Dl",reactionIcon:"Hl",reactionCustomStateContainer:"ue",loadingState:"Ll","skeleton-pulse":"ve",reactionState:"Tl",reactionState2Line:"Vl",removeBtn:"ql",infiniteScrollContainer:"Gl",reactionPanel:"Jl",avatar:"Kl"};var SE=({filteredReactions:e,removeReaction:t,hasMore:o,loadMore:r,isLoading:n,currentRef:i})=>{let{currentUserId:a}=Ae(),{config:s}=hi(),l=useMemo(()=>s.map(({name:d})=>d),[s]);return !i||!e?null:R.createElement("div",{className:ke.infiniteScrollContainer},R.createElement(WY,{scrollableTarget:i,scrollThreshold:.7,hasMore:o,next:r,loader:n?R.createElement("span",{key:0},"Loading..."):null,dataLength:e.length||0,style:{display:"flex",width:"100%"},height:i.clientHeight},R.createElement("div",{className:ke.userList},e.map(d=>{var p,u,g,f;return R.createElement(Fragment,{key:d.reactionId},R.createElement("div",{className:ke.userItem},R.createElement("div",{className:ke.userDetailsContainer},R.createElement("div",{className:ke.userDetailsProfile},R.createElement("div",{className:ke.avatar},R.createElement(xt,{"data-qa-anchor":"user_avatar_view",avatarUrl:(u=(p=d.user)==null?void 0:p.avatar)==null?void 0:u.fileUrl,defaultImage:R.createElement(cs,null)})),R.createElement(S.BodyBold,{"data-qa-anchor":"user_display_name"},(g=d.user)==null?void 0:g.displayName,a===((f=d.user)==null?void 0:f.userId)&&R.createElement(R.Fragment,null,R.createElement("br",null),R.createElement("div",{onClick:()=>t(d.reactionName)},R.createElement(S.Caption,{className:ke.removeBtn},"Click to remove reaction"))))),R.createElement("div",{className:ke.userDetailsReaction},l.includes(d.reactionName)?R.createElement(r5,{reactionConfigItem:s.find(({name:y})=>y===d.reactionName),className:ke.reactionIcon}):R.createElement(Hm,{className:ke.reactionIcon})))))}))))};var Bse=e=>R.createElement("svg",c({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M18.8672 1.63086C19.1797 1.31836 19.6875 1.55273 19.6875 1.94336V7.5293C19.6875 7.80273 19.4531 7.99805 19.2188 7.99805H13.5938C13.2031 7.99805 12.9688 7.5293 13.2812 7.2168L15.3906 5.10742C14.0234 3.70117 12.1094 2.8418 10 2.8418C5.74219 2.8418 2.34375 6.2793 2.34375 10.498C2.34375 14.7559 5.74219 18.1543 10 18.1543C11.9531 18.1543 13.7109 17.4512 15.0781 16.2402C15.2734 16.084 15.5469 16.084 15.7031 16.2402L16.4844 17.0215C16.6797 17.2168 16.6797 17.5293 16.4844 17.7246C14.7656 19.248 12.4609 20.1855 10 20.1855C4.64844 20.1855 0.3125 15.8887 0.3125 10.5371C0.273438 5.18555 4.64844 0.810547 10 0.810547C12.6562 0.810547 15.0781 1.9043 16.8359 3.66211L18.8672 1.63086Z",fill:"#6E7487"})),n5=Bse;var EE=()=>R.createElement("div",{className:ke.reactionCustomStateContainer,"data-qa-anchor":"reaction_list"},R.createElement("div",{className:ke.reactionState},R.createElement(n5,null),R.createElement(S.Body,null,R.createElement(FormattedMessage,{id:"livechat.reaction.errorOnload"}))));var Ase=e=>R.createElement("svg",c({width:"33",height:"33",viewBox:"0 0 33 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M11.25 9.28613C16.5938 9.28613 21 13.6924 21 19.0361C21 24.4268 16.5938 28.7861 11.25 28.7861C5.85938 28.7861 1.5 24.4268 1.5 19.0361C1.5 13.6924 5.85938 9.28613 11.25 9.28613ZM11.25 26.5361C15.375 26.5361 18.75 23.208 18.75 19.0361C18.75 14.9111 15.375 11.5361 11.25 11.5361C7.07812 11.5361 3.75 14.9111 3.75 19.0361C3.75 23.208 7.07812 26.5361 11.25 26.5361ZM14.1094 20.7236C14.5312 20.2549 15.2344 20.208 15.7031 20.6299C16.1719 21.0049 16.2188 21.708 15.8438 22.1768C14.6719 23.5361 13.0312 24.2861 11.25 24.2861C9.46875 24.2861 7.78125 23.5361 6.60938 22.1768C6.23438 21.708 6.28125 21.0049 6.75 20.6299C7.21875 20.208 7.92188 20.2549 8.34375 20.7236C9.75 22.4111 12.7031 22.4111 14.1094 20.7236ZM8.25 18.2861C7.40625 18.2861 6.75 17.6299 6.75 16.7861C6.75 15.9893 7.40625 15.2861 8.25 15.2861C9.04688 15.2861 9.75 15.9893 9.75 16.7861C9.75 17.6299 9.04688 18.2861 8.25 18.2861ZM14.25 18.2861C13.4062 18.2861 12.75 17.6299 12.75 16.7861C12.75 15.9893 13.4062 15.2861 14.25 15.2861C15.0469 15.2861 15.75 15.9893 15.75 16.7861C15.75 17.6299 15.0469 18.2861 14.25 18.2861ZM30.75 8.91113C31.125 8.91113 31.5 9.28613 31.5 9.66113V10.4111C31.5 10.833 31.125 11.1611 30.75 11.1611H27.375V14.5361C27.375 14.958 27 15.2861 26.625 15.2861H25.875C25.4531 15.2861 25.125 14.958 25.125 14.5361V11.1611H21.75C21.3281 11.1611 21 10.833 21 10.4111V9.66113C21 9.28613 21.3281 8.91113 21.75 8.91113H25.125V5.53613C25.125 5.16113 25.4531 4.78613 25.875 4.78613H26.625C27 4.78613 27.375 5.16113 27.375 5.53613V8.91113H30.75Z",fill:"#A5A9B5"})),LE=Ase;var DE=()=>R.createElement("div",{className:ke.reactionCustomStateContainer,"data-qa-anchor":"reaction_list"},R.createElement("div",{className:ke.reactionState},R.createElement(LE,null),R.createElement("div",{className:ke.reactionState2Line},R.createElement(S.Body,null,R.createElement(FormattedMessage,{id:"livechat.reaction.emptyState"})),R.createElement(S.Caption,null,R.createElement(FormattedMessage,{id:"livechat.reaction.emptyState.description"})))));var Dse=e=>R.createElement("svg",c({width:"375",height:"56",viewBox:"0 0 375 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("rect",{x:"16",y:"8",width:"40",height:"40",rx:"20",fill:"#292B32"}),R.createElement("rect",{x:"64",y:"24",width:"140",height:"8",rx:"4",fill:"#292B32"})),HE=Dse;var tg=()=>R.createElement("div",{className:cr(ke.reactionCustomStateContainer,ke.loadingState),"data-qa-anchor":"reaction_list"},Array.from({length:8}).map((e,t)=>R.createElement(HE,{key:`loading_${t}`})));var Fse=(e,t)=>({addReaction:n=>_(void 0,null,function*(){yield ReactionRepository.addReaction(e,t,n);}),removeReaction:n=>_(void 0,null,function*(){yield ReactionRepository.removeReaction(e,t,n);})}),zE=Fse;var jse=(e,t)=>{let[o,r]=useState(0),[n,i]=useState({}),[a,s]=useState(null),l=({data:d,loading:p,error:u})=>{p||u||(r(d.reactionsCount),i(d.reactions),s(d.myReaction));};return useEffect(()=>{if(e==="message")MessageRepository.getMessage(t,l);else if(e==="story")StoryRepository.getStoryByStoryId(t,l);else if(e==="comment")CommentRepository.getComment(t,l);else if(e==="post")PostRepository.getPost(t,l);else throw new Error("Unsupported reference type")},[t,e]),{reactions:n,reactionCount:o,myReaction:a}},UE=jse;var a5="unknown",Qse=(e,t,o)=>t==="All"?e:t===a5?e.filter(r=>!o.includes(r.reactionName)):e.filter(r=>r.reactionName===t.toLowerCase()),Wse=({filteredReactions:e,hasMore:t,loadMore:o,isLoading:r,removeReaction:n,error:i,currentRef:a})=>r?R.createElement(tg,null):i?R.createElement(EE,null):e.length===0?r?R.createElement(tg,null):R.createElement(DE,null):R.createElement(SE,{currentRef:a,hasMore:t,loadMore:o,isLoading:r,filteredReactions:e,removeReaction:n}),Fm=({pageId:e="*",referenceId:t,referenceType:o})=>{let r="reaction_list",{accessibilityId:n}=te({pageId:e,componentId:r}),{reactions:i,error:a,isLoading:s,hasMore:l,loadMore:d}=UT({referenceId:t,referenceType:o,limit:25}),{reactions:p,reactionCount:u}=UE(o,t),[g,f]=useState("All"),y=useRef(null),{config:v}=hi(),{removeReaction:C}=zE(o,t),h=w=>{f(w);};if(i==null||!v)return null;let x=useMemo(()=>v.map(w=>w.name),[v]),b=useMemo(()=>Object.keys(p).filter(w=>!x.includes(w)),[p]),M=useMemo(()=>b.reduce((w,N)=>w+p[N],0),[p]),I=useMemo(()=>Qse(i,g,x),[i,g]);return R.createElement("div",{className:ke.reactionListContainer,"data-qa-anchor":`${n}_header`},R.createElement("div",{className:ke.tabListContainer},R.createElement("div",{className:ke.tabList,"data-qa-anchor":`${n}_tab`},R.createElement("div",{"data-active":g==="All",className:ke.tabItem,onClick:()=>h("All")},R.createElement(S.Body,null,R.createElement("span",{className:ke.reactionEmoji},"All ",Dm(u)))),v.map(w=>{let{name:N,image:T}=w;return p[N]?R.createElement("div",{key:N,"data-active":g===N,className:ke.tabItem,onClick:()=>h(N)},R.createElement(S.Body,null,R.createElement("span",{className:ke.reactionEmoji},R.createElement(r5,{className:ke.reactionItem,reactionConfigItem:w}),Dm(p[N])))):null}),b.length>0&&R.createElement("div",{key:a5,"data-active":g===a5,className:ke.tabItem,onClick:()=>h(a5)},R.createElement(S.Body,null,R.createElement("span",{className:ke.reactionEmoji},R.createElement(Hm,{className:ke.reactionIcon}),Dm(M)))))),R.createElement("div",{ref:y,className:ke.reactionPanel},R.createElement(Wse,{currentRef:y.current,hasMore:l,loadMore:d,error:a,isLoading:s,filteredReactions:I,removeReaction:C})))};var Jse=R.createContext(void 0);var bt=()=>{let e=useContext(Jse);if(!e)throw new Error("usePageBehavior must be used within a PageBehaviorProvider");return e};var rg={emptyStateRing:"Nl",errorRing:"Ol",uploadingProgressRing:"Pl","upload-progress":"xe"};var Yse=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},R.createElement("defs",null,R.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:i[0]}),R.createElement("stop",{offset:1,stopColor:i[1]}))),R.createElement("circle",{cx:r/2,cy:r/2,r:r/2-1,className:rg.emptyStateRing}))},Rse=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},R.createElement("defs",null,R.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:i[0]}),R.createElement("stop",{offset:1,stopColor:i[1]}))),R.createElement("circle",{cx:r/2,cy:r/2,r:r/2-1,strokeWidth:"2",strokeLinecap:"round",stroke:"url(#story-ring-gradient)",fill:"none",strokeDasharray:339,strokeDashoffset:0}))},e1e=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},R.createElement("defs",null,R.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:i[0]}),R.createElement("stop",{offset:1,stopColor:i[1]}))),R.createElement("circle",{className:rg.uploadingProgressRing,cx:r/2,cy:r/2,r:r/2-1,strokeWidth:"2",strokeLinecap:"round",stroke:"url(#story-ring-gradient)",fill:"none"}))},Fc=s=>{var l=s,{pageId:e="*",componentId:t="*",hasUnseen:o=!1,uploading:r=!1,isErrored:n=!1,size:i=64}=l,a=P(l,["pageId","componentId","hasUnseen","uploading","isErrored","size"]);let d="story_ring",{isExcluded:p}=A({pageId:e,componentId:t,elementId:d});return p?null:n?R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:"none",viewBox:`0 0 ${i} ${i}`},a),R.createElement("circle",{cx:i/2,cy:i/2,r:i/2-1,stroke:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-alert-default"),strokeWidth:"2"})):r?R.createElement(e1e,{pageId:e,componentId:t,elementId:d,size:i}):o?R.createElement(Rse,{pageId:e,componentId:t,elementId:d,size:i}):R.createElement(Yse,{pageId:e,componentId:t,elementId:d,size:i})};var t1e="global-admin";var VE=e=>e!=null&&e.length?e.includes(t1e):!1;var o1e="global-admin",{COMMUNITY_MODERATOR:r1e,CHANNEL_MODERATOR:n1e,MODERATOR:i1e,SUPER_MODERATOR:a1e}=gc,s5=e=>{if(!(e!=null&&e.length))return !1;let t=[r1e,n1e,i1e,a1e];return e.some(o=>t.includes(o))},l5=e=>e!=null&&e.length?e.includes(o1e):!1;var us=(e,t)=>e&&t?e.hasPermission("MANAGE_COMMUNITY_STORY").community(t):!1;function m5(e){if(!e)return;let t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/1e3);return r<60?"Just now":r>=60&&r<3600?`${Math.floor(r/60)}m`:`${Math.floor(r/3600)}h`}var Om={errorIcon:"Ql",addStoryButton:"Wl",hiddenInput:"Zl",storyWrapper:"_l",storyTabContainer:"es",storyAvatarContainer:"rs",storyAvatar:"as",storyTitle:"os","animate-ring":"we",progressRing:"ts",progressRingStatic:"is"};var c1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),R.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#FA4D30",stroke:"#fff",strokeWidth:"1.5"}),R.createElement("path",{fill:"#fff",d:"M9.25 10.75C9.25 11.453 8.687 12 8 12c-.703 0-1.25-.547-1.25-1.25 0-.688.547-1.25 1.25-1.25.688 0 1.25.563 1.25 1.25zM6.89 4.406A.378.378 0 017.267 4h1.453c.219 0 .39.188.375.406l-.203 4.25A.387.387 0 018.516 9H7.469a.387.387 0 01-.375-.344l-.203-4.25z"})),jE=({pageId:e="*",componentId:t="*",communityId:o,onFileChange:r,onStoryClick:n})=>{let{isExcluded:i,accessibilityId:a,themeStyles:s}=te({pageId:e,componentId:t}),{stories:l}=Ri({targetId:o,targetType:"community",options:{orderBy:"asc",sortBy:"createdAt"}}),{community:d}=yc(o),{currentUserId:p,client:u}=Ae(),{user:g}=fr(p),y=VE(g==null?void 0:g.roles)||us(u,o),v=(l==null?void 0:l.length)>0,C=l.some(M=>!(M!=null&&M.isSeen)),h=l.some(M=>(M==null?void 0:M.syncState)==="syncing"),x=l.some(M=>(M==null?void 0:M.syncState)==="error"),b=()=>{Array.isArray(l)&&l.length===0||n();};return i||!v&&!y?null:R.createElement("div",{"data-qa-anchor":a,style:s,className:cr(Om.storyTabContainer)},R.createElement("div",{className:cr(Om.storyWrapper)},v&&R.createElement(Fc,{pageId:e,componentId:t,hasUnseen:C,uploading:h,isErrored:x,size:48}),R.createElement("button",{className:cr(Om.storyAvatarContainer),onClick:b},R.createElement(jr,{pageId:e,componentId:t,community:d})),y&&R.createElement(FileTrigger,{onSelect:M=>{let I=Array.from(M);r(I[0]);}},R.createElement(is,{pageId:e,componentId:t})),x&&R.createElement(c1e,{className:cr(Om.errorIcon)})),R.createElement(pw,{lines:1},R.createElement("div",{className:cr(Om.storyTitle)},"Story")))};var zc={storyTabContainer:"ls",storyTab:"ss",storyTabImage:"cs",storyTabContent:"ns",storyTabTitle:"ds",storyTabIcons:"ye",storyTabSkeleton:"ms",storyTabSkeletonAvatar:"ps","skeleton-pulse":"z",storyTabSkeletonUsername:"gs"};var p1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),R.createElement("path",{d:"M20.4187 17.2429V15.4838L21.6578 14.2365C21.6585 14.2358 21.6591 14.2351 21.6598 14.2345C22.3179 13.5807 22.7516 12.8355 22.75 11.9942C22.7484 11.1537 22.3123 10.4094 21.6598 9.75682L20.4187 8.51578V6.7571C20.4187 5.82907 20.1982 4.99346 19.6024 4.39762C19.0065 3.80179 18.1709 3.58128 17.2429 3.58128H15.4842L14.2432 2.34024L13.7265 2.85697L14.2432 2.34024C13.5864 1.68348 12.8389 1.24622 11.9953 1.24784C11.1522 1.24946 10.4079 1.68897 9.75583 2.34991L8.51619 3.58128H6.75709C5.8332 3.58128 4.99652 3.79543 4.39906 4.38966C3.80081 4.98466 3.58127 5.82245 3.58127 6.7571V8.51578L2.34222 9.75484C2.34186 9.75519 2.3415 9.75555 2.34114 9.75591C1.68254 10.4099 1.24839 11.1554 1.25 11.9971C1.25162 12.8372 1.68721 13.5812 2.33924 14.2335C2.33957 14.2338 2.3399 14.2342 2.34023 14.2345L3.58127 15.4838V17.2429C3.58127 18.1709 3.80178 19.0066 4.39761 19.6024C4.99345 20.1982 5.82907 20.4187 6.75709 20.4187H8.51577L9.75483 21.6578C9.75525 21.6582 9.75567 21.6586 9.75609 21.6591C10.4102 22.3177 11.1557 22.7516 11.9982 22.75C12.8389 22.7484 13.5848 22.3133 14.2412 21.6618L14.2432 21.6598L15.4842 20.4187H17.2429C18.1709 20.4187 19.0065 20.1982 19.6024 19.6024C20.1982 19.0066 20.4187 18.1709 20.4187 17.2429ZM11.1362 14.6127L15.3255 8.63293C15.3257 8.63263 15.3259 8.63232 15.3261 8.63202C15.3555 8.59049 15.3769 8.56736 15.3897 8.55517C15.3961 8.54919 15.4003 8.54586 15.4025 8.54426L15.4048 8.54269L15.4054 8.54234L15.4054 8.54232L15.4062 8.542C15.4072 8.54166 15.4101 8.54065 15.4157 8.53942C15.4272 8.53692 15.4517 8.53308 15.4953 8.53308C15.5882 8.53308 15.6273 8.563 15.6388 8.57409C15.649 8.58379 15.6664 8.60504 15.6669 8.65903C15.6668 8.65902 15.6656 8.67471 15.6559 8.70306C15.6448 8.73553 15.6277 8.7697 15.6066 8.79916L15.6062 8.79975L10.738 15.6292C10.7079 15.6666 10.6872 15.6779 10.6764 15.6829C10.6626 15.6894 10.6288 15.7017 10.5567 15.7017C10.4668 15.7017 10.4177 15.6786 10.3664 15.6272L7.5945 12.5262L7.58765 12.5185L7.58058 12.511C7.58023 12.5106 7.57454 12.5043 7.5688 12.489C7.56299 12.4736 7.55926 12.4545 7.55926 12.4347C7.55926 12.3583 7.58347 12.332 7.59029 12.3253C7.59747 12.3182 7.63028 12.2892 7.72221 12.2892C7.78716 12.2892 7.81058 12.2992 7.8149 12.3011L7.81503 12.3012C7.81882 12.3028 7.8367 12.3105 7.87134 12.3478L9.9633 14.6828L10.5939 15.3867L11.1362 14.6127Z",fill:"#1054DE",stroke:"white",strokeWidth:"1.5"})),ZE=p1e;var gs={container:"hs",avatarContainer:"fs",verifiedIcon:"bs",avatarBackground:"us",avatar:"vs",displayName:"xs",errorIcon:"ws"};var g1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),R.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#FA4D30",stroke:"#fff",strokeWidth:"1.5"}),R.createElement("path",{fill:"#fff",d:"M9.25 10.75C9.25 11.453 8.687 12 8 12c-.703 0-1.25-.547-1.25-1.25 0-.688.547-1.25 1.25-1.25.688 0 1.25.563 1.25 1.25zM6.89 4.406A.378.378 0 017.267 4h1.453c.219 0 .39.188.375.406l-.203 4.25A.387.387 0 018.516 9H7.469a.387.387 0 01-.375-.344l-.203-4.25z"})),f1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),R.createElement("path",{fill:"#000",fillOpacity:".2",d:"M8 0c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8z"}),R.createElement("path",{fill:"#000",fillOpacity:".2",d:"M8 2c2.21 0 4 1.79 4 4v1h-1V6c0-1.104-.896-2-2-2s-2 .896-2 2v1H4V6c0-2.21 1.79-4 4-4z"})),WE=({pageId:e,componentId:t,targetId:o,hasUnseen:r,onClick:n,isErrored:i})=>{let{community:a}=Pt({communityId:o}),s=nt({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return R.createElement("div",{className:cr(gs.container),onClick:n},R.createElement("div",{className:gs.avatarContainer},R.createElement(Fc,{pageId:e,componentId:t,hasUnseen:r,isErrored:i}),R.createElement("div",{className:gs.avatarBackground},s&&R.createElement("img",{className:gs.avatar,src:s,alt:a==null?void 0:a.displayName})),i&&R.createElement(g1e,{className:gs.errorIcon}),(a==null?void 0:a.isOfficial)&&!i&&R.createElement(ZE,{className:gs.verifiedIcon})),R.createElement(S.Caption,{className:cr(gs.displayName)},!(a!=null&&a.isPublic)&&R.createElement(f1e,null),a==null?void 0:a.displayName))};var c5=e=>{let s=dt({fetcher:StoryRepository.getGlobalStoryTargets,params:e,shouldCall:!0}),{items:t,hasMore:o,loadMore:r,isLoading:n}=s,i=P(s,["items","hasMore","loadMore","isLoading"]);return c({stories:t,hasMore:o,isLoading:n,loadMoreStories:()=>{o&&!n&&r();}},i)};var C1e=10,KE=({pageId:e="*",componentId:t="*",goToViewStoryPage:o})=>{let{isExcluded:r,accessibilityId:n,themeStyles:i}=te({pageId:e,componentId:t}),{stories:a,isLoading:s,hasMore:l,loadMoreStories:d}=c5({seenState:"smart",limit:C1e}),p=useRef(null),u=useRef(null);return useEffect(()=>{if(!p.current)return;let g=new IntersectionObserver(f=>{f[0].isIntersecting&&l&&d();},{root:p.current,rootMargin:"0px",threshold:.9});return ()=>{g&&g.disconnect();}},[p==null?void 0:p.current]),r||(a==null?void 0:a.length)===0?null:R.createElement("div",{"data-qa-anchor":n,style:i,className:zc.storyTabContainer,ref:p},s?Array.from({length:10}).map((g,f)=>R.createElement("div",{key:f,className:zc.storyTabSkeleton},R.createElement("div",{className:zc.storyTabSkeletonAvatar}),R.createElement("div",{className:zc.storyTabSkeletonUsername}))):a.map(g=>R.createElement(WE,{pageId:e,componentId:t,key:g.targetId,targetId:g.targetId,hasUnseen:g.hasUnseen,isErrored:g.failedStoriesCount>0,onClick:()=>o({storyTargets:a,storyTarget:g}),size:64})),R.createElement("div",{ref:u,style:{height:"1px",width:"1px"}}))};var Um=o=>{var r=o,{pageId:e="*"}=r,t=P(r,["pageId"]);let n="story_tab_component",{AmityGlobalFeedComponentBehavior:i}=bt(),{goToViewStoryPage:a,goToDraftStoryPage:s}=Be(),{setFile:l}=pi();return (()=>{switch(t.type){case"communityFeed":return R.createElement(jE,{pageId:e,componentId:n,communityId:t.communityId||"",onFileChange:p=>{l(p),p&&s(t.communityId||"","community",p.type.includes("image")?{type:"image",url:URL.createObjectURL(p)}:{type:"video",url:URL.createObjectURL(p)},"communityFeed");},onStoryClick:()=>a({targetId:t.communityId||"",targetType:"community",storyType:"communityFeed"})});case"globalFeed":return R.createElement(KE,{pageId:e,componentId:n,goToViewStoryPage:({storyTarget:p,storyTargets:u})=>{var g;(g=i==null?void 0:i.goToViewStoryPage)==null||g.call(i,{targetId:p.targetId,targetType:p.targetType,storyType:"globalFeed",targetIds:u.map(f=>f.targetId)});}});default:return null}})()};var XE={createPostMenu:"ys"};var d5={createPostButton:"ks",createPostButton__text:"js",createPostButton__icon:"zs"};var I1e=e=>R.createElement("svg",c({width:"21",height:"20",viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M14.0625 12.7812L15.0625 11.7812C15.2188 11.625 15.5 11.75 15.5 11.9688V16.5C15.5 17.3438 14.8125 18 14 18H3C2.15625 18 1.5 17.3438 1.5 16.5V5.5C1.5 4.6875 2.15625 4 3 4H11.5312C11.75 4 11.875 4.28125 11.7188 4.4375L10.7188 5.4375C10.6562 5.5 10.5938 5.5 10.5312 5.5H3V16.5H14V12.9688C14 12.9062 14 12.8438 14.0625 12.7812ZM18.9375 6.5L10.75 14.6875L7.90625 15C7.09375 15.0938 6.40625 14.4062 6.5 13.5938L6.8125 10.75L15 2.5625C15.7188 1.84375 16.875 1.84375 17.5938 2.5625L18.9375 3.90625C19.6562 4.625 19.6562 5.78125 18.9375 6.5ZM15.875 7.4375L14.0625 5.625L8.25 11.4375L8 13.5L10.0625 13.25L15.875 7.4375ZM17.875 4.96875L16.5312 3.625C16.4062 3.46875 16.1875 3.46875 16.0625 3.625L15.125 4.5625L16.9375 6.40625L17.9062 5.4375C18.0312 5.28125 18.0312 5.09375 17.875 4.96875Z"}));function ng({pageId:e="*",componentId:t="*",defaultClassName:o,onClick:r}){let n="create_post_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:R.createElement(O,{className:d5.createPostButton,onPress:()=>r==null?void 0:r(),"data-qa-anchor":i,style:p},R.createElement(ee,{defaultIcon:()=>R.createElement(I1e,{className:cr(d5.createPostButton__icon,o)}),imgIcon:()=>R.createElement("img",{src:a.image,alt:d}),configIconName:a.image,defaultIconName:s.image}),R.createElement(S.Body,{className:d5.createPostButton__text},a.text))}function p5({pageId:e}){let t="create_post_menu",{AmityCreatePostMenuComponentBehavior:o}=bt();return R.createElement("div",{className:XE.createPostMenu},R.createElement(ng,{pageId:e,componentId:t,onClick:()=>{var r;return (r=o==null?void 0:o.goToSelectPostTargetPage)==null?void 0:r.call(o)}}),R.createElement(D3,{pageId:e,componentId:t,onClick:()=>{var r;return (r=o==null?void 0:o.goToStoryTargetSelectionPage)==null?void 0:r.call(o)}}))}var Uc={mediaAttachment:"Xs",mediaAttachment__swipeDown:"Ys",mediaAttachment__wrapMedia:"Cs",mediaAttachment__wrapMedia_2items:"As"};var u5={cameraButton:"Ms",cameraButton__icon:"Ss",cameraButton_input:"Es"};var T1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),R.createElement("path",{d:"M19.5 19.5H4.5C4.10218 19.5 3.72064 19.342 3.43934 19.0607C3.15804 18.7794 3 18.3978 3 18V7.5C3 7.10218 3.15804 6.72064 3.43934 6.43934C3.72064 6.15804 4.10218 6 4.5 6H7.49945L8.99945 3.75H14.9995L16.4995 6H19.5C19.8978 6 20.2794 6.15804 20.5607 6.43934C20.842 6.72064 21 7.10218 21 7.5V18C21 18.3978 20.842 18.7794 20.5607 19.0607C20.2794 19.342 19.8978 19.5 19.5 19.5Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),R.createElement("path",{d:"M12 15.75C13.864 15.75 15.375 14.239 15.375 12.375C15.375 10.511 13.864 9 12 9C10.136 9 8.625 10.511 8.625 12.375C8.625 14.239 10.136 15.75 12 15.75Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}));function $c({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,isVisibleImage:n,isVisibleVideo:i,onVideoFileChange:a,onImageFileChange:s}){let l="camera_button",{themeStyles:d,isExcluded:p,config:u,accessibilityId:g,uiReference:f,defaultConfig:y}=A({pageId:e,componentId:t,elementId:l});if(p)return null;let v=()=>{document.getElementById("upload").click();},C=useCallback(h=>{h.preventDefault(),h.stopPropagation();let x=h.target.files?[...h.target.files]:[],b=x.some(I=>I.type.startsWith("image/")),M=x.some(I=>I.type.startsWith("video/"));b?s==null||s(x):M&&(a==null||a(x));},[s,a]);return R.createElement(O,{style:d,"data-qa-anchor":g,className:u5.cameraButton,onPress:v},R.createElement(ee,{defaultIcon:()=>R.createElement(T1e,{className:cr(u5.cameraButton__icon,r)}),imgIcon:()=>R.createElement("img",{src:u.icon,alt:f,className:o}),defaultIconName:y.icon,configIconName:u.icon}),u.text&&R.createElement(S.BodyBold,null,u.text),R.createElement("input",{type:"file",onChange:C,id:"upload",accept:n&&i?"image/*,video/*":n?"image/*":"video/*",className:u5.cameraButton_input}))}var g5={imageButton:"Fs",imageButton__icon:"Is",imageButton_input:"Rs"};var N1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),R.createElement("path",{d:"M20.25 4.5H3.75C3.33579 4.5 3 4.83579 3 5.25V18.75C3 19.1642 3.33579 19.5 3.75 19.5H20.25C20.6642 19.5 21 19.1642 21 18.75V5.25C21 4.83579 20.6642 4.5 20.25 4.5Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),R.createElement("path",{d:"M3 15.7499L7.71966 11.0302C7.7893 10.9606 7.87198 10.9053 7.96297 10.8676C8.05397 10.8299 8.1515 10.8105 8.24999 10.8105C8.34848 10.8105 8.44601 10.8299 8.537 10.8676C8.62799 10.9053 8.71067 10.9606 8.78032 11.0302L12.9697 15.2196C13.0393 15.2892 13.122 15.3444 13.213 15.3821C13.304 15.4198 13.4015 15.4392 13.5 15.4392C13.5985 15.4392 13.696 15.4198 13.787 15.3821C13.878 15.3444 13.9607 15.2892 14.0303 15.2196L15.9697 13.2802C16.0393 13.2106 16.122 13.1553 16.213 13.1176C16.304 13.0799 16.4015 13.0605 16.5 13.0605C16.5985 13.0605 16.696 13.0799 16.787 13.1176C16.878 13.1553 16.9607 13.2106 17.0303 13.2802L21 17.2499",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),R.createElement("path",{d:"M14.625 10.5C15.2463 10.5 15.75 9.99632 15.75 9.375C15.75 8.75368 15.2463 8.25 14.625 8.25C14.0037 8.25 13.5 8.75368 13.5 9.375C13.5 9.99632 14.0037 10.5 14.625 10.5Z"}));function Vc({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,onImageFileChange:n}){let i="image_button",{themeStyles:a,isExcluded:s,config:l,accessibilityId:d,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});if(s)return null;let g=()=>{document.getElementById("image-upload").click();},f=y=>{y.preventDefault(),y.stopPropagation(),n==null||n(y.target.files?[...y.target.files]:[]);};return R.createElement(O,{type:"button",style:a,"data-qa-anchor":d,className:g5.imageButton,onPress:g},R.createElement(ee,{defaultIcon:()=>R.createElement(N1e,{className:cr(g5.imageButton__icon,r)}),imgIcon:()=>R.createElement("img",{src:l.icon,alt:p,className:o}),defaultIconName:u.icon,configIconName:l.icon}),l.text&&R.createElement(S.BodyBold,null,l.text),R.createElement("input",{type:"file",onChange:f,multiple:!0,id:"image-upload",accept:"image/*",className:g5.imageButton_input}))}var f5={videoButton:"Us",videoButton__icon:"Bs",videoButton__input:"Ds"};var L1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),R.createElement("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:e.stroke,strokeWidth:"1.3",strokeMiterlimit:"10"}),R.createElement("path",{d:"M16 12L10 8V16L16 12Z",stroke:e.stroke,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}));function jc({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,onVideoFileChange:n}){let i="video_button",{themeStyles:a,isExcluded:s,config:l,accessibilityId:d,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});if(s)return null;Re();let f=()=>{document.getElementById("video-upload").click();},y=v=>{v.preventDefault(),v.stopPropagation(),n==null||n(v.target.files?[...v.target.files]:[]);};return R.createElement(O,{style:a,"data-qa-anchor":d,className:f5.videoButton,onPress:f},R.createElement(ee,{defaultIcon:()=>R.createElement(L1e,{className:cr(f5.videoButton__icon,r)}),imgIcon:()=>R.createElement("img",{src:l.icon,alt:p,className:o}),defaultIconName:u.icon,configIconName:l.icon}),l.text&&R.createElement(S.BodyBold,null,l.text),R.createElement("input",{type:"file",accept:"video/*",onChange:y,multiple:!0,id:"video-upload",className:f5.videoButton__input}))}function y5({pageId:e,isVisibleCamera:t,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}){let a="media_attachment",{themeStyles:s,accessibilityId:l,isExcluded:d}=te({pageId:e,componentId:a});return d?null:R.createElement("div",{style:s,"data-qa-anchor":l,className:Uc.mediaAttachment},R.createElement("div",{className:Uc.mediaAttachment__swipeDown}),R.createElement("div",{className:cr(!o||!r||!t?Uc.mediaAttachment__wrapMedia_2items:Uc.mediaAttachment__wrapMedia)},t&&R.createElement($c,{pageId:e,componentId:a,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}),o&&R.createElement(Vc,{pageId:e,componentId:a,onImageFileChange:i}),r&&R.createElement(jc,{pageId:e,componentId:a,onVideoFileChange:n})))}var ag={detailedMediaAttachment:"Hs",detailedMediaAttachment__swipeDown:"Ls"};function h5({pageId:e,isVisibleCamera:t,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}){let a="detailed_media_attachment",{themeStyles:s,accessibilityId:l,isExcluded:d}=te({pageId:e,componentId:a});return d?null:R.createElement("div",{style:s,"data-qa-anchor":l,className:ag.detailedMediaAttachment},R.createElement("div",{className:ag.detailedMediaAttachment__swipeDown}),t&&R.createElement($c,{pageId:e,componentId:a,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}),o&&R.createElement(Vc,{pageId:e,componentId:a,onImageFileChange:i}),r&&R.createElement(jc,{pageId:e,componentId:a,onVideoFileChange:n}))}var YE={userSearchResult:"Ts"};var fs={userItem:"Vs",userItem__leftPane:"qs",userItem__rightPane:"Gs",userItem__avatar:"Js",userItem__brandIcon:"Ks",userItem__userName:"Ns",userItem__userName__text:"Os"};var O1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),R.createElement("path",{d:"M13.6435 20.7628C12.5251 21.8728 11.4652 21.8812 10.3552 20.7628L9.10328 19.5109C8.98644 19.394 8.88629 19.3607 8.73606 19.3607H6.9667C5.38931 19.3607 4.63817 18.6095 4.63817 17.0321V15.2628C4.63817 15.1125 4.59644 15.004 4.48794 14.8955L3.23604 13.6353C2.12602 12.5253 2.11767 11.4653 3.23604 10.3553L4.48794 9.10342C4.59644 8.99492 4.63817 8.88642 4.63817 8.73619V6.96684C4.63817 5.37275 5.38931 4.6383 6.9667 4.6383H8.73606C8.88629 4.6383 8.99478 4.59657 9.10328 4.48807L10.3552 3.24452C11.4652 2.11781 12.5251 2.11781 13.6435 3.23617L14.8954 4.48807C15.0039 4.59657 15.1124 4.6383 15.2626 4.6383H17.032C18.6094 4.6383 19.3605 5.38944 19.3605 6.96684V8.73619C19.3605 8.88642 19.4023 8.98657 19.5108 9.10342L20.7627 10.3553C21.8727 11.4653 21.881 12.5253 20.7627 13.6353L19.5108 14.8955C19.4023 15.004 19.3605 15.1125 19.3605 15.2628V17.0321C19.3605 18.6095 18.6094 19.3607 17.032 19.3607H15.2626C15.1124 19.3607 15.0123 19.394 14.8954 19.5109L13.6435 20.7628Z",fill:"url(#paint0_linear_482_20867)"}),R.createElement("path",{d:"M9.90432 15.9736C10.0879 16.1656 10.3216 16.2741 10.6137 16.2741C10.9225 16.2741 11.1729 16.1656 11.3649 15.9152L16.047 9.34691C16.1722 9.17164 16.2389 8.96299 16.2389 8.79607C16.2389 8.312 15.8717 7.95312 15.3543 7.95312C15.0204 7.95312 14.8034 8.06997 14.6031 8.35373L10.5803 14.0958L8.56896 11.8507C8.38535 11.6504 8.1767 11.5586 7.89293 11.5586C7.37548 11.5586 7.0166 11.9175 7.0166 12.4182C7.0166 12.6269 7.09172 12.8355 7.2336 12.9858L9.90432 15.9736Z",fill:"white"}),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_482_20867",x1:"5.40039",y1:"4.79844",x2:"5.40039",y2:"23.3984",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#FFDB7D"}),R.createElement("stop",{offset:"1",stopColor:"#D49900"})))),RE=O1e;var Zc=({className:e})=>R.createElement(RE,{className:e});var eB=({user:e})=>{let{onClickUser:t}=Be();return R.createElement(O,{key:e.userId,className:fs.userItem,onPress:()=>t(e.userId)},R.createElement("div",{className:fs.userItem__leftPane},R.createElement(jo,{userId:e.userId,className:fs.userItem__avatar})),R.createElement("div",{className:fs.userItem__rightPane},R.createElement("div",{className:fs.userItem__userName},R.createElement(S.BodyBold,{className:fs.userItem__userName__text},e.displayName)),e.isBrand?R.createElement(Zc,{className:fs.userItem__brandIcon}):null))};var un={userSearchItemSkeleton:"ke",userSearchItemSkeleton__leftPane:"Ps",userSearchItemSkeleton__information:"Qs",userSearchItemSkeleton__content:"Ws",userSearchItemSkeleton__animation:"Zs","skeleton-pulse":"je",userSearchItemSkeleton__userAvatar:"_s",userSearchItemSkeleton__information__title:"ec",userSearchItemSkeleton__information__subtitle:"rc"};var tB=({pageId:e="*",componentId:t="*"})=>{let{accessibilityId:o}=te({pageId:e,componentId:t});return R.createElement("div",{"data-qa-anchor":o,className:cr(un.userSearchItemSkeleton,un.userSearchItemSkeleton__animation)},R.createElement("div",{className:un.userSearchItemSkeleton__leftPane},R.createElement("div",{className:cr(un.userSearchItemSkeleton__userAvatar,un.userSearchItemSkeleton__animation)})),R.createElement("div",{className:cr(un.userSearchItemSkeleton__information,un.userSearchItemSkeleton__animation)},R.createElement("div",{className:cr(un.userSearchItemSkeleton__information__title,un.userSearchItemSkeleton__animation)}),R.createElement("div",{className:cr(un.userSearchItemSkeleton__information__subtitle,un.userSearchItemSkeleton__animation)})))};var v5=({pageId:e="*",userCollection:t=[],isLoading:o,onLoadMore:r})=>{let n="user_search_result",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=te({pageId:e,componentId:n}),[u,g]=useState(null);return So({onIntersect:()=>r(),node:u}),R.createElement("div",{className:YE.userSearchResult,style:p},t.map(f=>R.createElement(eB,{key:f.userId,user:f})),o?Array.from({length:5}).map((f,y)=>R.createElement(tB,{key:y,pageId:e,componentId:n})):null,R.createElement("div",{ref:f=>g(f)}))};var oB={communitySearchResult:"ac",communitySearchResult__communityItem:"ze",communitySearchResult__communityItem__leftPane:"oc",communitySearchResult__communityItem__rightPane:"tc",communityItem__communityName:"ic",communityItem__communityName__private:"lc",communityItem__communityCategory:"sc",communityItem__communityMemberCount:"cc"};var rB={communityDisplayName:"nc"};function da({pageId:e="*",componentId:t="*",community:o}){var s;let r="community_display_name",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:R.createElement(S.BodyBold,{className:rB.communityDisplayName,style:a,"data-qa-anchor":n},(s=o==null?void 0:o.displayName)!=null?s:"My Timeline")}var x5={communityOfficialBadge:"dc",communityOfficialBadge__iconSvg:"mc"};var W1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},e),R.createElement("path",{d:"M9.58112 15.4777C10.2749 16.1767 10.9373 16.1715 11.6363 15.4777L12.4188 14.6953C12.4918 14.6223 12.5544 14.6014 12.6483 14.6014H13.7541C14.74 14.6014 15.2095 14.1319 15.2095 13.1461V12.0402C15.2095 11.9463 15.2355 11.8785 15.3034 11.8107L16.0858 11.023C16.7848 10.3293 16.7796 9.66681 16.0858 8.97305L15.3034 8.19061C15.2355 8.11758 15.2095 8.05499 15.2095 7.9611V6.85525C15.2095 5.86938 14.74 5.39991 13.7541 5.39991H12.6483C12.5544 5.39991 12.4866 5.37383 12.4188 5.30602L11.6363 4.52358C10.9373 3.82461 10.2749 3.82461 9.58112 4.5288L8.79868 5.30602C8.73087 5.37383 8.66306 5.39991 8.56917 5.39991H7.46332C6.47745 5.39991 6.00799 5.85894 6.00799 6.85525V7.9611C6.00799 8.05499 5.9819 8.1228 5.91409 8.19061L5.13165 8.97305C4.43268 9.66681 4.43789 10.3293 5.13165 11.023L5.91409 11.8107C5.9819 11.8785 6.00799 11.9463 6.00799 12.0402V13.1461C6.00799 14.1319 6.47745 14.6014 7.46332 14.6014H8.56917C8.66306 14.6014 8.72565 14.6223 8.79868 14.6953L9.58112 15.4777ZM9.74282 12.6714C9.56026 12.6714 9.4142 12.6036 9.29944 12.4836L7.63024 10.6162C7.54156 10.5223 7.49462 10.3919 7.49462 10.2615C7.49462 9.94849 7.71892 9.72419 8.04232 9.72419C8.21968 9.72419 8.35008 9.78157 8.46484 9.90676L9.72196 11.3099L12.2362 7.72115C12.3614 7.5438 12.497 7.47077 12.7057 7.47077C13.0291 7.47077 13.2586 7.69507 13.2586 7.99761C13.2586 8.10193 13.2169 8.23234 13.1386 8.34188L10.2123 12.4471C10.0923 12.6036 9.93583 12.6714 9.74282 12.6714Z"}));function S1({pageId:e="*",componentId:t="*"}){let o="community_official_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement(ee,{defaultIcon:()=>R.createElement(W1e,{style:l,className:cr(x5.communityOfficialBadge,x5.communityOfficialBadge__iconSvg),"data-qa-anchor":r}),imgIcon:()=>R.createElement("img",{"data-qa-anchor":r,src:n.icon,alt:s,className:x5.communityOfficialBadge}),configIconName:n.icon,defaultIconName:i.icon})}var b5={communityPrivateBadge:"pc",communityPrivateBadge__iconSvg:"gc"};var J1e=e=>R.createElement("svg",c({width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M5.60938 9.72656C5.26562 9.72656 5.00781 9.46875 5.00781 9.125V7.75C5.00781 7.42773 5.26562 7.14844 5.60938 7.14844C5.93164 7.14844 6.21094 7.42773 6.21094 7.75V9.125C6.21094 9.46875 5.93164 9.72656 5.60938 9.72656ZM10.4219 6.03125V10.8438C10.4219 11.4238 9.94922 11.875 9.39062 11.875H1.82812C1.24805 11.875 0.796875 11.4238 0.796875 10.8438V6.03125C0.796875 5.47266 1.24805 5 1.82812 5H2.51562V3.96875C2.51562 2.27148 3.89062 0.875 5.60938 0.875C7.32812 0.896484 8.70312 2.29297 8.70312 4.01172V5H9.39062C9.94922 5 10.4219 5.47266 10.4219 6.03125ZM3.54688 5H7.67188V3.96875C7.67188 2.85156 6.72656 1.90625 5.60938 1.90625C4.4707 1.90625 3.54688 2.85156 3.54688 3.96875V5ZM9.39062 6.03125H1.82812V10.8438H9.39062V6.03125Z"}));function N1({pageId:e="*",componentId:t="*"}){let o="community_private_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement(ee,{defaultIcon:()=>R.createElement(J1e,{style:l,className:cr(b5.communityPrivateBadge,b5.communityPrivateBadge__iconSvg),"data-qa-anchor":r}),imgIcon:()=>R.createElement("img",{"data-qa-anchor":r,src:n.icon,alt:s,className:b5.communityPrivateBadge}),configIconName:n.icon,defaultIconName:i.icon})}var nB={communityMembersCount:"hc"};function sg({pageId:e="*",componentId:t="*",memberCount:o}){let r="community_members_count",{accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:d}=A({pageId:e,componentId:t,elementId:r});return s?null:R.createElement(S.Caption,{className:nB.communityMembersCount,style:d,"data-qa-anchor":n},`${ib(o)||0} ${o!==1?"members":"member"}`)}var ys={communityItem:"Xe",communityItem__leftPane:"fc",communityItem__rightPane:"bc",communityItem__communityName:"uc",communityItem__communityName__private:"vc",communityItem__communityCategory:"xc",communityItem__communityMemberCount:"wc"};var tle=({community:e,pageId:t,componentId:o})=>{let r=Ra(e.categoryIds),i=r.length-3;return R.createElement(R.Fragment,null,r.slice(0,3).map(a=>R.createElement(Ka,{pageId:t,componentId:o,categoryName:a.name})),i>0&&R.createElement(Ka,{pageId:t,componentId:o,categoryName:`+${i}`}))},iB=({community:e,pageId:t="*",componentId:o="*"})=>{let{onClickCommunity:r}=Be();return R.createElement(O,{key:e.communityId,className:ys.communityItem,onPress:()=>{r(e.communityId);}},R.createElement("div",{className:ys.communityItem__leftPane},R.createElement(jr,{pageId:t,componentId:o,community:e})),R.createElement("div",{className:ys.communityItem__rightPane},R.createElement("div",{className:ys.communityItem__communityName},!e.isPublic&&R.createElement("div",{className:ys.communityItem__communityName__private},R.createElement(N1,{pageId:t,componentId:o})),R.createElement(da,{pageId:t,componentId:o,community:e}),e.isOfficial&&R.createElement(S1,{pageId:t,componentId:o})),R.createElement("div",{className:ys.communityItem__communityCategory},R.createElement(tle,{pageId:t,componentId:o,community:e})),R.createElement("div",{className:ys.communityItem__communityMemberCount},R.createElement(sg,{pageId:t,componentId:o,memberCount:e.membersCount}))))};var gn={communityItemSkeleton:"Ye",communityItemSkeleton__leftPane:"yc",communityItemSkeleton__information:"kc",communityItemSkeleton__content:"jc",communityItemSkeleton__animation:"zc","skeleton-pulse":"Ce",communityItemSkeleton__userAvatar:"Xc",communityItemSkeleton__information__title:"Yc",communityItemSkeleton__information__subtitle:"Cc"};var aB=({pageId:e="*",componentId:t="*"})=>{let{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=te({pageId:e,componentId:t});return R.createElement("div",{"data-qa-anchor":o,style:s,className:cr(gn.communityItemSkeleton,gn.communityItemSkeleton__animation)},R.createElement("div",{className:gn.communityItemSkeleton__leftPane},R.createElement("div",{className:cr(gn.communityItemSkeleton__userAvatar,gn.communityItemSkeleton__animation)})),R.createElement("div",{className:cr(gn.communityItemSkeleton__information,gn.communityItemSkeleton__animation)},R.createElement("div",{className:cr(gn.communityItemSkeleton__information__title,gn.communityItemSkeleton__animation)}),R.createElement("div",{className:cr(gn.communityItemSkeleton__information__subtitle,gn.communityItemSkeleton__animation)})))};var hs=({pageId:e="*",communityCollection:t=[],isLoading:o,onLoadMore:r})=>{let n="community_search_result",{themeStyles:i}=te({pageId:e,componentId:n}),[a,s]=useState(null);return So({onIntersect:()=>r(),node:a}),R.createElement("div",{className:oB.communitySearchResult,style:i},t.map(l=>R.createElement(iB,{key:l.communityId,community:l,pageId:e,componentId:n})),o?Array.from({length:5}).map((l,d)=>R.createElement(aB,{key:d,pageId:e,componentId:n})):null,R.createElement("div",{ref:l=>s(l)}))};var sB={clearButton:"Ac"};function ile(e){return R.createElement("svg",c({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M8.82715 17.3906C13.4238 17.3906 17.2119 13.5938 17.2119 9.00586C17.2119 4.40918 13.415 0.612305 8.82715 0.612305C4.23047 0.612305 0.442383 4.40918 0.442383 9.00586C0.442383 13.5938 4.23926 17.3906 8.82715 17.3906ZM5.88281 12.5479C5.54883 12.5479 5.28516 12.2842 5.28516 11.9502C5.28516 11.792 5.34668 11.6514 5.46973 11.5283L7.9834 9.01465L5.46973 6.49219C5.34668 6.37793 5.28516 6.22852 5.28516 6.07031C5.28516 5.74512 5.54883 5.49023 5.88281 5.49023C6.0498 5.49023 6.19043 5.54297 6.2959 5.66602L8.82715 8.17969L11.3584 5.65723C11.4902 5.52539 11.6221 5.47266 11.7803 5.47266C12.1055 5.47266 12.3691 5.73633 12.3691 6.06152C12.3691 6.22852 12.3164 6.36035 12.1934 6.4834L9.6709 9.01465L12.1846 11.5283C12.3076 11.6514 12.3691 11.7832 12.3691 11.9502C12.3691 12.2842 12.1055 12.5479 11.7627 12.5479C11.5957 12.5479 11.4551 12.4863 11.332 12.3721L8.82715 9.84961L6.32227 12.3721C6.19922 12.4863 6.0498 12.5479 5.88281 12.5479Z"}))}var E1=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n})=>{let i="clear_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{"data-qa-anchor":a,className:sB.clearButton,style:u,onPress:n},R.createElement(ee,{defaultIcon:()=>R.createElement(ile,{className:o}),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var ale=e=>R.createElement("svg",c({width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M16.7109 14.6562C16.8672 14.8125 16.8672 15.0625 16.7109 15.1875L15.9922 15.9062C15.8672 16.0625 15.6172 16.0625 15.4609 15.9062L11.6797 12.125C11.6172 12.0312 11.5859 11.9375 11.5859 11.8438V11.4375C10.4297 12.4062 8.96094 13 7.33594 13C3.74219 13 0.835938 10.0938 0.835938 6.5C0.835938 2.9375 3.74219 0 7.33594 0C10.8984 0 13.8359 2.9375 13.8359 6.5C13.8359 8.125 13.2109 9.625 12.2422 10.75H12.6484C12.7422 10.75 12.8359 10.8125 12.9297 10.875L16.7109 14.6562ZM7.33594 11.5C10.0859 11.5 12.3359 9.28125 12.3359 6.5C12.3359 3.75 10.0859 1.5 7.33594 1.5C4.55469 1.5 2.33594 3.75 2.33594 6.5C2.33594 9.28125 4.55469 11.5 7.33594 11.5Z"}));function lg({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r}){let n="search_icon",{config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:d}=A({pageId:e,componentId:t,elementId:n});return s?null:R.createElement(ee,{defaultIcon:()=>R.createElement(ale,{className:o,style:d}),imgIcon:()=>R.createElement("img",{src:i.icon,alt:l,className:r,style:d}),defaultIconName:a.icon,configIconName:i.icon})}var Cs={topSearchBar:"Mc",topSearchBar__inputBar:"Sc",topSearchBar__textInput:"Ec",topSearchBar__searchIcon:"Fc",topSearchBar__searchIcon_img:"Ic",topSearchBar__clearButton:"Rc",topSearchBar__clearButton__img:"Uc"};function Qm({pageId:e="*",search:t}){let o="top_search_bar",{config:r,isExcluded:n,themeStyles:i}=te({pageId:e,componentId:o}),{onBack:a}=Be(),[s,l]=useState("");return useEffect(()=>{t(s);},[s]),n?null:R.createElement("div",{className:Cs.topSearchBar,style:i},R.createElement("div",{className:Cs.topSearchBar__inputBar},R.createElement(lg,{pageId:e,componentId:o,defaultClassName:Cs.topSearchBar__searchIcon,imgClassName:Cs.topSearchBar__searchIcon_img}),R.createElement("input",{className:Cs.topSearchBar__textInput,type:"text",value:s,placeholder:r.text,onChange:d=>l(d.target.value)}),s!=""?R.createElement(E1,{pageId:e,componentId:o,defaultClassName:Cs.topSearchBar__clearButton,imgClassName:Cs.topSearchBar__clearButton__img,onPress:()=>{l("");}}):null),R.createElement(L3,{pageId:e,componentId:o,onPress:()=>a()}))}var mg={menuButton:"Bc",menuButton__button:"Dc"};var w5=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"16",height:"4",viewBox:"0 0 16 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M9.6875 2.25C9.6875 3.19922 8.91406 3.9375 8 3.9375C7.05078 3.9375 6.3125 3.19922 6.3125 2.25C6.3125 1.33594 7.05078 0.5625 8 0.5625C8.91406 0.5625 9.6875 1.33594 9.6875 2.25ZM13.9062 0.5625C14.8203 0.5625 15.5938 1.33594 15.5938 2.25C15.5938 3.19922 14.8203 3.9375 13.9062 3.9375C12.957 3.9375 12.2188 3.19922 12.2188 2.25C12.2188 1.33594 12.957 0.5625 13.9062 0.5625ZM2.09375 0.5625C3.00781 0.5625 3.78125 1.33594 3.78125 2.25C3.78125 3.19922 3.00781 3.9375 2.09375 3.9375C1.14453 3.9375 0.40625 3.19922 0.40625 2.25C0.40625 1.33594 1.14453 0.5625 2.09375 0.5625Z"}))};function Xc({pageId:e="*",componentId:t="*",onClick:o}){let r="menu_button",{isExcluded:n,accessibilityId:i,themeStyles:a,config:s,defaultConfig:l,uiReference:d}=A({pageId:e,componentId:t,elementId:r});return n?null:R.createElement(O,{onPress:o,"data-qa-anchor":i,className:mg.menuButton__button},R.createElement(ee,{defaultIcon:()=>R.createElement(w5,{className:mg.menuButton,style:a}),imgIcon:()=>R.createElement("img",{src:s.icon,alt:d}),defaultIconName:l.icon,configIconName:s.icon}))}function cg({pageId:e="*",componentId:t="*",defaultIconClassName:o,imgIconClassName:r}){let n="share_button";A({pageId:e,componentId:t,elementId:n});return null}var dle=e=>R.createElement("svg",c({width:"6",height:"9",viewBox:"0 0 6 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M5.13281 4.71094L1.71094 8.17969C1.59375 8.29688 1.40625 8.29688 1.3125 8.17969L0.84375 7.71094C0.726562 7.59375 0.726562 7.42969 0.84375 7.3125L3.60938 4.5L0.84375 1.71094C0.726562 1.59375 0.726562 1.40625 0.84375 1.3125L1.3125 0.84375C1.40625 0.726562 1.59375 0.726562 1.71094 0.84375L5.13281 4.3125C5.25 4.42969 5.25 4.59375 5.13281 4.71094Z"})),Yc=dle;var P5={commentButton:"Hc",commentButton__icon:"Lc",commentButton__text:"Tc"};var ule=e=>R.createElement("svg",c({width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M9 0.1875C13.6816 0.1875 17.4668 3.30859 17.4668 7.09375C17.4668 10.9121 13.6816 14 9 14C7.9043 14 6.8418 13.834 5.91211 13.5352C4.91602 14.2324 3.32227 15.0625 1.29688 15.0625C0.964844 15.0625 0.666016 14.8965 0.533203 14.5977C0.433594 14.2988 0.466797 13.9668 0.699219 13.7344C0.732422 13.7344 1.76172 12.6055 2.22656 11.3105C1.13086 10.1484 0.5 8.6875 0.5 7.09375C0.5 3.30859 4.28516 0.1875 9 0.1875ZM9 12.4062C12.7852 12.4062 15.9062 10.0488 15.9062 7.09375C15.9062 4.17188 12.7852 1.78125 9 1.78125C5.18164 1.78125 2.09375 4.17188 2.09375 7.09375C2.09375 8.52148 2.79102 9.58398 3.38867 10.2148L4.08594 10.9453L3.7207 11.875C3.55469 12.3398 3.32227 12.8047 3.05664 13.2031C3.85352 12.9375 4.51758 12.5723 4.98242 12.2402L5.61328 11.7754L6.37695 12.0078C7.20703 12.2734 8.10352 12.4062 9 12.4062Z"}));function dg({pageId:e="*",componentId:t="*",commentsCount:o,defaultIconClassName:r,imgIconClassName:n,onPress:i=()=>{}}){let a="comment_button",{accessibilityId:s,config:l,defaultConfig:d,isExcluded:p,uiReference:u}=A({pageId:e,componentId:t,elementId:a});return p?null:R.createElement(O,{onPress:i},R.createElement(ee,{"data-qa-anchor":s,defaultIcon:()=>R.createElement("div",{className:cr(P5.commentButton)},R.createElement(ule,{className:cr(P5.commentButton__icon,r)}),R.createElement(S.BodyBold,{className:P5.commentButton__text},typeof o=="number"?o:l.text)),imgIcon:()=>R.createElement("img",{src:l.icon,alt:u,className:n}),defaultIconName:d.icon,configIconName:l.icon}))}var yle=createContext({drawerData:null,setDrawerData:()=>{},removeDrawerData:()=>{}});var Wm=()=>{let{setDrawerData:e,removeDrawerData:t}=useContext(yle);return {setDrawerData:e,removeDrawerData:t}};var ye={postContent:"Vc",postContent__bar:"qc",postContent__bar__userAvatar:"Gc",postContent__bar__detail:"Jc",postContent__bar__information__subtitle:"Kc",postContent__bar__information__subtitle__moderator:"Nc",postContent__bar__information__subtitle__brand:"Oc",postContent__bar__information__subtitle__separator:"Pc",postContent__bar__actionButton:"Qc",postContent__content_and_reactions:"Wc",postContent__content:"Zc",postContent__divider:"_c",postContent__reactionBar:"en",postContent__reactionBar__leftPane:"rn",postContent__reactionBar__rightPane:"an",postContent__reactionBar__leftPane__icon:"on",postContent__reactionBar__leftPane__iconImg:"tn",postTitle:"in",postTitle__text:"ln",postTitle__icon:"sn",postTitle__user__container:"cn",postTitle__brandIcon:"nn",postContent__comment:"dn",postContent__reactions_and_comments:"mn",postContent__reactionsBar:"pn",postContent__commentsCount:"gn",postContent__reactionsBar__reactions:"hn",postContent__reactionsBar__reactions__icon:"e",postContent__reactionsBar__reactions__count:"fn",postContent__bar__information__editedTag:"bn",button:"p",popover:"X","fade-in":"Ae","zoom-in":"Me","fade-out":"Se","zoom-out":"Ee",menu:"un",menuItem:"Fe",separator:"vn",postContent__notMember:"xn",postContent__wrapRightMenu:"wn"};var Cle=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{clipPath:"url(#clip0_1709_7904)"},R.createElement("path",{d:"M16 32.5C24.8366 32.5 32 25.3366 32 16.5C32 7.66344 24.8366 0.5 16 0.5C7.16344 0.5 0 7.66344 0 16.5C0 25.3366 7.16344 32.5 16 32.5Z",fill:"#FFD54F"}),R.createElement("path",{d:"M9.33317 15.1667C10.8059 15.1667 11.9998 13.9728 11.9998 12.5C11.9998 11.0273 10.8059 9.83337 9.33317 9.83337C7.86041 9.83337 6.6665 11.0273 6.6665 12.5C6.6665 13.9728 7.86041 15.1667 9.33317 15.1667Z",fill:"#6D4C41"}),R.createElement("path",{d:"M22.6667 15.1667C24.1394 15.1667 25.3333 13.9728 25.3333 12.5C25.3333 11.0273 24.1394 9.83337 22.6667 9.83337C21.1939 9.83337 20 11.0273 20 12.5C20 13.9728 21.1939 15.1667 22.6667 15.1667Z",fill:"#6D4C41"}),R.createElement("path",{d:"M21.0248 27.3372C20.674 27.3372 20.3232 27.2038 20.0564 26.9352C17.8894 24.7682 14.1108 24.7682 11.9456 26.9352C11.4103 27.4705 10.5423 27.4705 10.007 26.9352C9.47163 26.4016 9.47163 25.5319 10.007 24.9966C11.6076 23.396 13.7362 22.5153 16.0001 22.5153C18.264 22.5153 20.3926 23.396 21.9932 24.9984C22.5286 25.5337 22.5286 26.4016 21.9932 26.937C21.7264 27.2038 21.3756 27.3372 21.0248 27.3372Z",fill:"#6D4C41"}),R.createElement("path",{d:"M24.8228 16.5987C24.4495 16.0587 23.5508 16.0587 23.1775 16.5987C22.6228 17.4014 21.3335 19.3881 21.3335 20.5001C21.3335 21.9707 22.5295 23.1667 24.0002 23.1667C25.4708 23.1667 26.6668 21.9707 26.6668 20.5001C26.6668 19.3881 25.3775 17.4014 24.8228 16.5987Z",fill:"#00BCD4"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_1709_7904"},R.createElement("rect",{width:"32",height:"32",fill:"white",transform:"translate(0 0.5)"}))))},dB=Cle;var vle=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"Reactions",clipPath:"url(#clip0_1709_1751)"},R.createElement("path",{id:"Vector",d:"M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z",fill:"#FFD54F"}),R.createElement("path",{id:"Vector_2",d:"M27.2933 19.9601C26.9867 20.9334 26.5867 21.8267 26.0667 22.6667H5.93332C5.41332 21.8267 5.01332 20.9334 4.70665 19.9601C4.61332 19.6534 4.66665 19.3334 4.86665 19.0801C5.05332 18.8134 5.34665 18.6667 5.66665 18.6667H26.3333C26.6533 18.6667 26.9467 18.8134 27.1333 19.0801C27.3333 19.3334 27.3867 19.6534 27.2933 19.9601Z",fill:"white"}),R.createElement("path",{id:"Vector_3",d:"M26.0664 22.6667C23.9598 26.1201 20.1864 28.2934 15.9998 28.2934C11.8131 28.2934 8.03977 26.1201 5.93311 22.6667H26.0664Z",fill:"#E53935"}),R.createElement("path",{id:"Vector_4",d:"M12.3332 13.6668C11.7812 13.6668 11.3332 13.2188 11.3332 12.6668C11.3332 11.9322 10.7358 11.3335 9.99984 11.3335C9.26384 11.3335 8.6665 11.9322 8.6665 12.6668C8.6665 13.2188 8.2185 13.6668 7.6665 13.6668C7.1145 13.6668 6.6665 13.2188 6.6665 12.6668C6.6665 10.8295 8.16117 9.3335 9.99984 9.3335C11.8385 9.3335 13.3332 10.8295 13.3332 12.6668C13.3332 13.2188 12.8852 13.6668 12.3332 13.6668Z",fill:"#6D4C41"}),R.createElement("path",{id:"Vector_5",d:"M24.3332 13.6668C23.7812 13.6668 23.3332 13.2188 23.3332 12.6668C23.3332 11.9322 22.7358 11.3335 21.9998 11.3335C21.2638 11.3335 20.6665 11.9322 20.6665 12.6668C20.6665 13.2188 20.2185 13.6668 19.6665 13.6668C19.1145 13.6668 18.6665 13.2188 18.6665 12.6668C18.6665 10.8295 20.1612 9.3335 21.9998 9.3335C23.8385 9.3335 25.3332 10.8295 25.3332 12.6668C25.3332 13.2188 24.8852 13.6668 24.3332 13.6668Z",fill:"#6D4C41"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_1709_1751"},R.createElement("rect",{width:"32",height:"32",fill:"white"}))))},pB=vle;var xle=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("circle",{cx:"16",cy:"16.5",r:"16",fill:"url(#paint0_linear_1709_7888)"}),R.createElement("g",{clipPath:"url(#clip0_1709_7888)"},R.createElement("path",{d:"M21.8752 10.2903C21.3417 9.70788 20.5123 8.92173 20.1595 10.6968C20.0395 11.3004 19.7591 11.7656 19.5189 12.1402C19.2599 10.8296 18.4808 9.47308 17.7467 8.55843C17.472 8.21623 16.4973 6.85588 16.3101 4.58008C16.2821 4.24043 15.8787 4.08093 15.6263 4.31003C13.2147 6.49923 11.891 9.51013 11.8419 12.8998C11.8419 12.8998 10.8377 12.0533 10.2921 10.4786C10.1452 10.0546 9.57671 9.97368 9.33006 10.3486C9.28271 10.4206 9.23881 10.4927 9.19921 10.5627C7.33856 13.8527 6.44351 17.848 7.27096 21.565C8.65446 27.7898 17.8062 29.5301 22.6511 25.6177C27.3914 21.7899 25.8846 14.6654 21.8752 10.2903Z",fill:"#ED694A"}),R.createElement("path",{d:"M20.4125 14.8409C20.0185 14.4107 19.4058 13.83 19.1452 15.1411C19.0566 15.5869 18.8495 15.9306 18.6721 16.2073C18.4809 15.2392 17.9054 14.2372 17.3632 13.5617C17.1603 13.3089 16.4404 12.3042 16.302 10.6231C16.2814 10.3722 15.9834 10.2545 15.797 10.4237C14.0158 12.0406 13.038 14.2646 13.0018 16.7682C13.0018 16.7682 12.26 16.143 11.8571 14.9799C11.7486 14.6667 11.3287 14.607 11.1465 14.8839C11.1116 14.9371 11.0791 14.9904 11.0499 15.0421C9.67554 17.4721 9.01444 20.4231 9.62559 23.1686C10.6475 27.7664 17.4071 29.0518 20.9857 26.162C24.4869 23.3347 23.3739 18.0725 20.4125 14.8409Z",fill:"#F4A32C"}),R.createElement("path",{d:"M19.077 18.9949C18.8103 18.7037 18.3955 18.3106 18.2191 19.1982C18.1592 19.5 18.0189 19.7326 17.8988 19.9199C17.7693 19.2645 17.3798 18.5863 17.0127 18.129C16.8754 17.9579 16.3881 17.2777 16.2944 16.1398C16.2804 15.9699 16.0787 15.8902 15.9525 16.0048C14.7467 17.0994 14.0849 18.6049 14.0603 20.2996C14.0603 20.2996 13.5582 19.8764 13.2855 19.0891C13.212 18.8771 12.9278 18.8366 12.8045 19.0241C12.7808 19.06 12.7589 19.0961 12.739 19.1311C11.8087 20.7761 11.3612 22.7737 11.7749 24.6323C12.4666 27.7447 17.0425 28.6149 19.4649 26.6586C20.2945 25.9887 20.8088 25.0448 20.9131 24.0006C21.0706 22.4191 20.4619 20.5062 19.077 18.9949Z",fill:"#F4D44E"}),R.createElement("path",{d:"M17.838 22.85C17.6894 22.6878 17.4583 22.4688 17.36 22.9632C17.3266 23.1314 17.2485 23.261 17.1816 23.3653C17.1094 23.0002 16.8924 22.6223 16.6879 22.3676C16.6114 22.2722 16.3399 21.8933 16.2877 21.2593C16.2799 21.1647 16.1675 21.1203 16.0972 21.1841C15.4255 21.7939 15.0567 22.6327 15.043 23.5769C15.043 23.5769 14.7633 23.3411 14.6113 22.9024C14.5704 22.7843 14.412 22.7617 14.3434 22.8662C14.3302 22.8863 14.318 22.9064 14.307 22.9259C13.7887 23.8424 13.5393 24.9553 13.7698 25.9907C14.2947 28.3523 18.5971 28.2807 18.861 25.6388C18.9486 24.7577 18.6095 23.6919 17.838 22.85Z",fill:"#EAE9E8"}),R.createElement("path",{d:"M14.7688 26.4597C14.5383 25.5334 14.7876 24.5379 15.3059 23.7181C15.3169 23.7006 15.3292 23.6827 15.3423 23.6647C15.411 23.5713 15.5694 23.5914 15.6103 23.6971C15.7622 24.0895 16.042 24.3004 16.042 24.3004C16.0532 23.6064 16.3046 22.9764 16.7664 22.4711C16.6631 22.3281 16.3472 21.9833 16.2877 21.2597C16.2799 21.165 16.1675 21.1207 16.0972 21.1844C15.4255 21.7943 15.0567 22.633 15.043 23.5772C15.043 23.5772 14.7633 23.3414 14.6113 22.9028C14.5704 22.7847 14.412 22.7621 14.3434 22.8666C14.3302 22.8867 14.318 22.9068 14.307 22.9263C13.7887 23.8427 13.5393 24.9557 13.7698 25.9911C13.9831 26.9509 14.8594 27.5277 15.8282 27.6669C15.3056 27.4102 14.904 27.0038 14.7688 26.4597Z",fill:"#F7E7A1"})),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_7888",x1:"7.2",y1:"7.7",x2:"24.8",y2:"29.3",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#FFF09F"}),R.createElement("stop",{offset:"1",stopColor:"#FCCF5A"})),R.createElement("clipPath",{id:"clip0_1709_7888"},R.createElement("rect",{width:"25.6",height:"25.6",fill:"white",transform:"translate(3.2002 2.09998)"}))))},uB=xle;var ble=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"Reactions"},R.createElement("circle",{id:"Ellipse 2",cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1738)"}),R.createElement("path",{id:"circle",d:"M22.4466 10.5836C20.7296 9.07415 18.2009 9.36319 16.6088 11.0332L16.0156 11.6755L15.3912 11.0332C13.8303 9.36319 11.2704 9.07415 9.55338 10.5836C7.58661 12.3179 7.49295 15.401 9.24119 17.2637L15.2976 23.687C15.6722 24.1045 16.3278 24.1045 16.7024 23.687L22.7588 17.2637C24.507 15.401 24.4134 12.3179 22.4466 10.5836Z",fill:"white"})),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_1738",x1:"7.2",y1:"7.2",x2:"28",y2:"39.2",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#EE5C91"}),R.createElement("stop",{offset:"0.833333",stopColor:"#E02222"}))))},gB=ble;var Ile=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),R.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#63A1FF"}),R.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},fB=Ile;var pg=R.forwardRef((i,n)=>{var a=i,{src:e,mimeType:t,mediaFit:o}=a,r=P(a,["src","mimeType","mediaFit"]);return R.createElement("video",E(c({controls:!0,controlsList:"nodownload"},r),{ref:n,"data-qa-anchor":"video-preview"}),R.createElement("source",{src:e,type:t}),R.createElement("p",null,"Your browser does not support this format of video. Please try again later once the server transcodes the video into an playable format(mp4)."))});var pa={linkPreviewSkeleton:"yn",linkPreviewSkeleton__bottom:"kn",linkPreviewSkeleton__bar1:"jn",linkPreviewSkeleton__bar2:"zn",linkPreviewSkeleton__image:"Xn",linkPreviewSkeleton__animation:"Yn","skeleton-pulse":"Ie"};function yB(){return R.createElement("div",{className:pa.linkPreviewSkeleton},R.createElement("div",{className:cr(pa.linkPreviewSkeleton__image,pa.linkPreviewSkeleton__animation)}),R.createElement("div",{className:pa.linkPreviewSkeleton__bottom},R.createElement("div",{className:cr(pa.linkPreviewSkeleton__bar1,pa.linkPreviewSkeleton__animation)}),R.createElement("div",{className:cr(pa.linkPreviewSkeleton__bar2,pa.linkPreviewSkeleton__animation)})))}var bi={linkPreview:"Cn",linkPreview__top:"An",linkPreview__bottom:"Mn",linkPreview__object:"Sn",linkPreview__unableToPreview:"En",linkPreview__unableToPreview__icon:"Fn"};var _le=e=>R.createElement("svg",c({width:"36",height:"27",viewBox:"0 0 36 27",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M32.625 0C34.4531 0 36 1.54688 36 3.375V23.625C36 25.5234 34.4531 27 32.625 27H3.375C1.47656 27 0 25.5234 0 23.625V3.375C0 1.54688 1.47656 0 3.375 0H32.625ZM32.2031 23.625C32.4141 23.625 32.625 23.4844 32.625 23.2031V3.79688C32.625 3.58594 32.4141 3.375 32.2031 3.375H3.79688C3.51562 3.375 3.375 3.58594 3.375 3.79688V23.2031C3.375 23.4844 3.51562 23.625 3.79688 23.625H32.2031ZM9 6.1875C10.5469 6.1875 11.8125 7.45312 11.8125 9C11.8125 10.6172 10.5469 11.8125 9 11.8125C7.38281 11.8125 6.1875 10.6172 6.1875 9C6.1875 7.45312 7.38281 6.1875 9 6.1875ZM6.75 20.25V16.875L9.49219 14.1328C9.84375 13.7812 10.3359 13.7812 10.6875 14.1328L13.5 16.875L21.8672 8.50781C22.2188 8.15625 22.7109 8.15625 23.0625 8.50781L29.25 14.625V20.25H6.75Z"})),gg=()=>R.createElement("div",{className:bi.linkPreview__unableToPreview},R.createElement(_le,{className:bi.linkPreview__unableToPreview__icon})),Tle=({url:e})=>{let{client:t}=Ae();return useQuery({enabled:!!t,queryKey:["asc-uikit","previewLink",e],queryFn:()=>_(void 0,null,function*(){let o=yield t==null?void 0:t.http.get("/api/v1/link-preview",{params:{url:e}});return o==null?void 0:o.data}),retry:!1})};function hB({url:e}){var n,i,a;let t=new URL(e),o=Tle({url:e});if(o.isLoading)return R.createElement(yB,null);let r=()=>{window.open(e,"_blank");};return o.isError?R.createElement(O,{onPress:r,className:bi.linkPreview},R.createElement("div",{className:bi.linkPreview__top},R.createElement(gg,null)),R.createElement("div",{className:bi.linkPreview__bottom},R.createElement(S.Caption,null,t.hostname))):R.createElement(O,{onPress:r,className:bi.linkPreview},R.createElement("div",{className:bi.linkPreview__top},(n=o.data)!=null&&n.image?R.createElement("object",{data:o.data.image,className:bi.linkPreview__object},R.createElement(gg,null)):(i=o.data)!=null&&i.video?R.createElement(pg,{src:o.data.video}):R.createElement(gg,null)),R.createElement("div",{className:bi.linkPreview__bottom},R.createElement(S.Caption,null,t.hostname),R.createElement(S.BodyBold,null,((a=o.data)==null?void 0:a.title)||"")))}var fg=({text:e="",mentionees:t=[],mentioned:o})=>{if(!e)return null;let r=Hv.find(e).filter(n=>n.type==="url");return R.createElement(R.Fragment,null,R.createElement(Sm,{data:{text:e},mentionees:t,metadata:{mentioned:o}}),r&&r.length>0&&R.createElement(hB,{url:r[0].href}))};var ed={imageContent:"o",imageContent__img:"Bn",imageContent__imgContainer:"t",imageContent__imgCover:"Dn"};var Nle=e=>{let r=_n({fetcher:PostRepository.getPost,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return c({post:t},o)},Ii=Nle;var Ele=({fileId:e})=>{let t=nt({fileId:e});return R.createElement("img",{loading:"lazy",className:ed.imageContent__img,src:t,alt:e})},Ble=({postId:e,index:t,imageLeftCount:o,postAmount:r,onImageClick:n})=>{let{post:i,isLoading:a}=Ii(e);return a?null:R.createElement(O,{key:i.postId,className:ed.imageContent__imgContainer,onPress:()=>n()},R.createElement(Ele,{fileId:i.data.fileId}),o>0&&t===r-1&&R.createElement(S.Heading,{className:ed.imageContent__imgCover},"+ ",o))},yg=({pageId:e="*",componentId:t="*",elementId:o="*",post:r,onImageClick:n=()=>{}})=>{var p;let{themeStyles:i}=A({pageId:e,componentId:t,elementId:o}),a=r.children.slice(0,4),s=Math.max(0,r.children.length-4),{post:l,isLoading:d}=Ii((p=r.children)==null?void 0:p[0]);return d||(l==null?void 0:l.dataType)!=="image"?null:R.createElement("div",{className:ed.imageContent,style:i,"data-images-amount":Math.min(r.children.length,4)},a.map((u,g)=>R.createElement(Ble,{key:u,postId:u,index:g,imageLeftCount:s,postAmount:r.children.length,onImageClick:()=>n(g)})))};var ua={videoContent:"i",videoContent__video:"Hn",videoContent__videoContainer:"l",videoContent__videoCover:"Ln",videoContent__playButtonCover:"Tn",videoContent__playButton:"Vn",videoContent__playButton__svg:"qn"};var Ale=e=>R.createElement("svg",c({width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"Icon ",clipPath:"url(#clip0_1936_14348)"},R.createElement("path",{id:"Vector",d:"M8.95117 5V19L19.9512 12L8.95117 5Z"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_1936_14348"},R.createElement("rect",{width:"24",height:"24",transform:"translate(0.951172)"})))),Dle=({fileId:e})=>{let t=nt({fileId:e});return R.createElement("img",{className:ua.videoContent__video,src:t,alt:e})},Hle=({postId:e,postAmount:t,videoLeftCount:o,index:r,onVideoClick:n})=>{let{post:i,isLoading:a}=Ii(e);return a?null:R.createElement(O,{className:ua.videoContent__videoContainer,"data-videos-amount":Math.min(t,4),onPress:()=>n()},R.createElement(Dle,{fileId:i.data.thumbnailFileId}),o>0&&r===t-1&&R.createElement(S.Heading,{className:ua.videoContent__videoCover},"+ ",o),o===0||r<t-1?R.createElement("div",{className:ua.videoContent__playButtonCover},R.createElement("div",{className:ua.videoContent__playButton,onClick:()=>n()},R.createElement(Ale,{className:ua.videoContent__playButton__svg}))):null)},hg=({pageId:e="*",componentId:t="*",elementId:o="*",post:r,onVideoClick:n})=>{let{themeStyles:i}=A({pageId:e,componentId:t,elementId:o}),a=r.children.slice(0,4),{post:s}=Ii(r.children[0]),l=Math.max(0,r.children.length-4);return (s==null?void 0:s.dataType)!=="video"?null:R.createElement("div",{className:ua.videoContent,style:i},R.createElement("div",{className:ua.videoContent,style:i,"data-videos-amount":Math.min(r.children.length,4)},a.map((d,p)=>R.createElement(Hle,{key:d,index:p,postId:d,videoLeftCount:l,postAmount:r.children.length,onVideoClick:()=>n(p)}))))};var Qr={modal:"Gn",modalContent:"Jn",closeButton:"Kn",fullImage:"Nn",nextButton:"On",prevButton:"Pn",overlayPanel:"Qn",overlayPanel__prev:"Re",overlayPanel__next:"Ue",overlayPanel__prevButton:"Be",overlayPanel__nextButton:"Wn",overlayPanel__middle:"Zn",imageViewer__clearButton:"_n",imageViewer__clearButton__img:"ed"};var vB=e=>R.createElement("svg",c({width:"6",height:"9",viewBox:"0 0 6 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M5.13281 4.71094L1.71094 8.17969C1.59375 8.29688 1.40625 8.29688 1.3125 8.17969L0.84375 7.71094C0.726562 7.59375 0.726562 7.42969 0.84375 7.3125L3.60938 4.5L0.84375 1.71094C0.726562 1.59375 0.726562 1.40625 0.84375 1.3125L1.3125 0.84375C1.40625 0.726562 1.59375 0.726562 1.71094 0.84375L5.13281 4.3125C5.25 4.42969 5.25 4.59375 5.13281 4.71094Z"}));function xB({pageId:e="*",componentId:t="*",elementId:o="*",post:r,initialImageIndex:n,onClose:i}){var h,x;let{themeStyles:a}=A({pageId:e,componentId:t,elementId:o}),[s,l]=useState(n),p=Va((r==null?void 0:r.children)||[]).filter(b=>b.dataType==="image"),u=p[s],g=se({fileId:(h=u==null?void 0:u.data)==null?void 0:h.fileId}),f=s<p.length-1,y=s>0,v=()=>{f&&l(b=>b+1);},C=()=>{y&&l(b=>b-1);};return R.createElement("div",{style:a},R.createElement("div",{className:Qr.modal,onClick:i},R.createElement("div",{className:Qr.modalContent,onClick:b=>b.stopPropagation()},R.createElement("img",{src:g,alt:((x=u==null?void 0:u.data)==null?void 0:x.fileId)||"",className:Qr.fullImage}),R.createElement("div",{className:Qr.overlayPanel},y&&R.createElement("div",{className:Qr.overlayPanel__prev,onClick:C},R.createElement(vB,{className:Qr.overlayPanel__prevButton})),R.createElement("div",{className:Qr.overlayPanel__middle}),f&&R.createElement("div",{className:Qr.overlayPanel__next,onClick:v},R.createElement(vB,{className:Qr.overlayPanel__nextButton}))),R.createElement("span",{className:Qr.closeButton},R.createElement(E1,{pageId:e,componentId:t,defaultClassName:Qr.imageViewer__clearButton,imgClassName:Qr.imageViewer__clearButton__img,onPress:i})))))}var Wr={modal:"rd",modalContent:"ad",closeButton:"od",fullImage:"td",nextButton:"id",prevButton:"ld",overlayPanel:"sd",overlayPanel__prev:"De",overlayPanel__next:"He",overlayPanel__prevButton:"Le",overlayPanel__nextButton:"cd",overlayPanel__middle:"nd",videoViewer__clearButton:"dd",videoViewer__clearButton__img:"md"};var Gle=memo(({videoPost:e})=>{let t=useMemo(()=>(e==null?void 0:e.data.videoFileId.high)||(e==null?void 0:e.data.videoFileId.medium)||(e==null?void 0:e.data.videoFileId.low)||(e==null?void 0:e.data.videoFileId.original)||void 0,[e]),o=Dt(t),r=Dt(e==null?void 0:e.data.thumbnailFileId),n=useRef(null),i=useMemo(()=>{if(o==null)return null;if(o.status===_0.Transcoded){let{videoUrl:a}=o;return (a==null?void 0:a["1080p"])||(a==null?void 0:a["720p"])||(a==null?void 0:a["480p"])||(a==null?void 0:a["360p"])||(a==null?void 0:a.original)||o.fileUrl}return o.fileUrl},[o]);return useEffect(()=>{var a;(a=n.current)==null||a.load();},[i]),i==null?R.createElement(R.Fragment,null):R.createElement("video",{controls:!0,controlsList:"nodownload",autoPlay:!0,className:Wr.fullImage,ref:n,poster:r==null?void 0:r.fileUrl},R.createElement("source",{src:i,type:"video/mp4"}),R.createElement("p",null,"Your browser does not support this format of video. Please try again later once the server transcodes the video into an playable format(mp4)."))});function IB({pageId:e="*",componentId:t="*",elementId:o="*",post:r,initialVideoIndex:n,onClose:i}){let{themeStyles:a}=A({pageId:e,componentId:t,elementId:o}),[s,l]=useState(n),p=Va((r==null?void 0:r.children)||[]).filter(C=>C.dataType==="video"),u=p[s],g=s<p.length-1,f=s>0,y=()=>{g&&l(C=>C+1);},v=()=>{f&&l(C=>C-1);};return R.createElement("div",{style:a},R.createElement("div",{className:Wr.modal,onClick:i},R.createElement("div",{className:Wr.modalContent,onClick:C=>C.stopPropagation()},R.createElement(Gle,{videoPost:u}),R.createElement("div",{className:Wr.overlayPanel},f&&R.createElement("div",{className:Wr.overlayPanel__prev,onClick:v},R.createElement(Yc,{className:Wr.overlayPanel__prevButton})),R.createElement("div",{className:Wr.overlayPanel__middle}),g&&R.createElement("div",{className:Wr.overlayPanel__next,onClick:y},R.createElement(Yc,{className:Wr.overlayPanel__nextButton}))),R.createElement("span",{className:Wr.closeButton},R.createElement(E1,{pageId:e,componentId:t,defaultClassName:Wr.videoViewer__clearButton,imgClassName:Wr.videoViewer__clearButton__img,onPress:i})))))}var MB=({post:e,community:t})=>{let{currentUserId:o}=Ae(),r=useMemo(()=>e.targetType==="community"&&e.targetId===(t==null?void 0:t.communityId),[e.targetType,t==null?void 0:t.communityId]),{moderators:n}=nm({communityId:t==null?void 0:t.communityId,shouldCall:r}),i=useMemo(()=>r?n.some(s=>s.userId===o):!1,[n,r,o]),a=e.postedUserId===o;return {isCommunityModerator:i,isOwner:a}};var zn={postMenu:"pd",postMenu__item:"g",postMenu__editPost__text:"gd",postMenu__editPost__icon:"hd",postMenu__reportPost__text:"fd",postMenu__reportPost__icon:"bd",postMenu__deletePost__text:"ud",postMenu__deletePost__icon:"vd"};var _B=({post:e,isFlaggable:t,onReportSuccess:o,onReportError:r,onUnreportSuccess:n,onUnreportError:i})=>{let a=useQueryClient(),s=(e==null?void 0:e.postId)||void 0,{data:l,isLoading:d}=useQuery({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s],queryFn:()=>PostRepository.isPostFlaggedByMe(s),enabled:s!=null&&t}),{mutateAsync:p}=useMutation({mutationFn:()=>_(void 0,null,function*(){return PostRepository.flagPost(e.postId)}),onMutate:()=>_(void 0,null,function*(){yield a.cancelQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),a.setQueryData(["asc-uikit","PostRepository","isPostFlaggedByMe",s],()=>!0);}),onSuccess:()=>{o==null||o();},onError:(g,f,y)=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),r==null||r(g);},onSettled:()=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]});}}),{mutateAsync:u}=useMutation({mutationFn:()=>_(void 0,null,function*(){return PostRepository.unflagPost(e.postId)}),onMutate:()=>_(void 0,null,function*(){yield a.cancelQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),a.setQueryData(["asc-uikit","PostRepository","isPostFlaggedByMe",s],()=>!1);}),onSuccess:()=>{n==null||n();},onError:(g,f,y)=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),i==null||i(g);},onSettled:()=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]});}});return {isLoading:d,isFlaggedByMe:l||!1,mutateReportPost:p,mutateUnReportPost:u}};var Un={createPost:"xd",createPost__topBar:"wd",createPost__status:"yd",createPost_infoIcon:"kd",createPost__notiWrap:"Te",createPost__formMediaAttachment:"Ve",drawer__content:"jd",mentionTextInput_item:"qe",drawerContentContainer:"Y"};var Xle=createContext({itemWithAds:[],isLoading:!1,prependItem:()=>{},removeItem:()=>{},updateItem:()=>{},loadMore:()=>{},hasMore:!1,loadMoreHasBeenCalled:!1,fetch:()=>{},refetch:()=>{},scrollPosition:0,onScroll:()=>{}}),bs=()=>{let e=useContext(Xle);if(!e)throw new Error("useGlobalFeedContext must be used within a GlobalFeedProvider");return e};var TB=()=>/Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);var kB=e=>new Promise((t,o)=>{let r=document.createElement("video"),n=document.createElement("canvas"),i=n.getContext("2d");r.src=URL.createObjectURL(e);let a=()=>{r.currentTime=10;},s=()=>{try{n.width=r.videoWidth,n.height=r.videoHeight,i==null||i.drawImage(r,0,0,n.width,n.height);let d=n.toDataURL("image/png");t(d);}catch(d){o(d);}finally{r.removeEventListener("canplay",a),r.removeEventListener("seeked",s),r.removeEventListener("error",l),URL.revokeObjectURL(r.src);}},l=d=>{o(new Error(`Error loading video: ${d}`));};r.addEventListener("canplay",a),r.addEventListener("seeked",s),r.addEventListener("error",l),r.load();});var SB={createNewPostButton:"Ge"};function vg({pageId:e="*",componentId:t="*",isValid:o,onSubmit:r}){let n="create_new_post_button",{config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:n});return a?null:R.createElement("button",{onSubmit:r,style:s,disabled:!o,className:SB.createNewPostButton,type:"submit"},i.text)}var L1={thumbnail__container:"h",thumbnail__wrapper:"Je",thumbnail:"zd",closeIcon:"Xd",icon__status:"Yd"};var tme=Ta`
|
|
4733
|
+
0-22.58L207.6 256z`})),kr=({pageId:e="*",componentId:t="*",onPress:o=()=>{},defaultClassName:r,imgClassName:n})=>{let i="close_button",{isExcluded:a,config:s,uiReference:l,accessibilityId:d}=A({pageId:e,componentId:t,elementId:i});return a?null:R.createElement(O,{className:z8.closeButton,"data-qa-anchor":d,onPress:o},R.createElement(ee,{defaultIcon:()=>R.createElement(Bie,{className:cr(z8.closeButton__icon,r)}),imgIcon:()=>R.createElement("img",{src:s.icon,alt:l,className:n}),configIconName:s.icon}))};var E3={bottomSheet__container:"Wa",bottomSheet__header:"Za",bottomSheet__content:"_a",bottomSheet__backdrop:"eo"};var Sr=r=>{var n=r,{children:e,headerTitle:t}=n,o=P(n,["children","headerTitle"]);return R.createElement(C1,c({},o),R.createElement(C1.Container,{className:E3.bottomSheet__container},R.createElement(C1.Header,null,R.createElement(C1.Header,null),t&&R.createElement(C1.Header,{className:E3.bottomSheet__header},R.createElement(S.Title,null,t))),R.createElement(C1.Content,{className:E3.bottomSheet__content},e)),R.createElement(C1.Backdrop,{onTap:o.onClose}))};var U8={avatarContainer:"P",avatarImage:"ro"};var xt=({avatarUrl:e,defaultImage:t,onClick:o})=>R.createElement("div",{className:U8.avatarContainer,"data-clickable":!!o,onClick:o},e?R.createElement("img",{className:U8.avatarImage,src:e,alt:"Avatar"}):t);var Pc={button:"ao",disabled:"m",primary:"Q",secondary:"W",ghost:"Z",small:"oo",medium:"to",large:"io",icon:"lo"};var Oie=a=>{var s=a,{children:e,variant:t="primary",size:o="medium",icon:r,className:n}=s,i=P(s,["children","variant","size","icon","className"]);let l=cr(Pc.button,Pc[t],Pc[o],n);return R.createElement("button",c({className:l},i),r&&R.createElement("span",{className:Pc.icon},r),e)},B3=Oie;var JN={cancelButton:"so"};var L3=({pageId:e="*",componentId:t="*",onPress:o=()=>{}})=>{let r="cancel_button",{accessibilityId:n,config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:r});return a?null:R.createElement(O,{"data-qa-anchor":n,className:JN.cancelButton,style:s,onPress:o},R.createElement(S.Body,null,i.text))};var A3={createStoryButton:"co",createStoryButton__text:"no",createStoryButton__icon:"do"};var Vie=e=>R.createElement("svg",c({width:"17",height:"18",viewBox:"0 0 17 18",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.771159 12.2248C1.00906 12.7861 1.30474 13.3088 1.65819 13.7927C1.85468 14.0618 2.2428 14.0749 2.47778 13.8387L2.85238 13.4622C3.05585 13.2578 3.07242 12.9352 2.91359 12.6944C2.68511 12.3479 2.4918 11.9785 2.33366 11.5862C2.17162 11.1841 2.04651 10.7654 1.95831 10.33C1.90156 10.0497 1.66209 9.83785 1.37619 9.83785H0.7981C0.460143 9.83785 0.194237 10.1301 0.252477 10.463C0.359316 11.0737 0.53221 11.661 0.771159 12.2248ZM0.791992 5.77587C0.565717 6.33406 0.392758 6.91522 0.273115 7.51935C0.206005 7.85821 0.473794 8.1628 0.819238 8.1628H1.37619C1.66209 8.1628 1.90156 7.95091 1.95831 7.6707C2.04651 7.23526 2.17162 6.81652 2.33366 6.41448C2.4918 6.0221 2.68511 5.6527 2.91359 5.30628C3.07242 5.06546 3.05585 4.7429 2.85238 4.53841L2.47778 4.16192C2.2428 3.92576 1.85456 3.93884 1.65906 4.2086C1.30847 4.69235 1.01944 5.21477 0.791992 5.77587ZM5.26074 16.7265C5.81526 16.966 6.39491 17.1396 6.9997 17.247C7.33267 17.3061 7.62533 17.0401 7.62533 16.7019V16.1571C7.62533 15.8715 7.41372 15.6325 7.13436 15.5731C6.70488 15.4817 6.29562 15.3497 5.90658 15.177C5.52127 15.0061 5.14859 14.8025 4.78852 14.5662C4.5475 14.4081 4.22544 14.4327 4.02574 14.6406L3.64108 15.041C3.40868 15.2829 3.43286 15.6735 3.7084 15.8649C4.19354 16.2017 4.71098 16.4889 5.26074 16.7265ZM3.71752 2.12947C3.43846 2.32272 3.41731 2.71924 3.65673 2.95986L4.05715 3.36229C4.26214 3.56831 4.58771 3.58533 4.82847 3.42255C5.1704 3.19137 5.53324 2.99173 5.91699 2.82361C6.3137 2.64981 6.73277 2.5172 7.17418 2.42577C7.45449 2.3677 7.66699 2.12833 7.66699 1.84207V1.29669C7.66699 0.959243 7.37557 0.693429 7.04294 0.750218C6.41529 0.857371 5.82122 1.03203 5.26074 1.27419C4.71443 1.51024 4.20002 1.79533 3.71752 2.12947ZM9.82271 15.5735C9.54395 15.6315 9.33366 15.8703 9.33366 16.155V16.6953C9.33366 17.0359 9.63023 17.3024 9.96541 17.2422C11.8264 16.908 13.4005 16.0311 14.6878 14.6117C16.1184 13.0344 16.8337 11.1639 16.8337 9.00033C16.8337 6.83673 16.1184 4.96627 14.6878 3.38894C13.4005 1.96952 11.8264 1.09268 9.96541 0.758409C9.63023 0.698204 9.33366 0.964784 9.33366 1.30532V1.84562C9.33366 2.13035 9.54395 2.36916 9.82271 2.42716C11.2862 2.73166 12.5155 3.45008 13.5107 4.5824C14.6149 5.83868 15.167 7.31132 15.167 9.00033C15.167 10.6893 14.6149 12.162 13.5107 13.4182C12.5155 14.5506 11.2862 15.269 9.82271 15.5735Z"}),R.createElement("path",{d:"M12.7189 8.47933C12.9012 8.47933 13.0835 8.66162 13.0835 8.84391V9.57308C13.0835 9.77816 12.9012 9.93766 12.7189 9.93766H9.43766V13.2189C9.43766 13.424 9.25537 13.5835 9.07308 13.5835H8.34391C8.13883 13.5835 7.97933 13.424 7.97933 13.2189V9.93766H4.69808C4.493 9.93766 4.3335 9.77816 4.3335 9.57308V8.84391C4.3335 8.66162 4.493 8.47933 4.69808 8.47933H7.97933V5.19808C7.97933 5.01579 8.13883 4.8335 8.34391 4.8335H9.07308C9.25537 4.8335 9.43766 5.01579 9.43766 5.19808V8.47933H12.7189Z"}));function D3({pageId:e="*",componentId:t="*",onClick:o,defaultClassName:r}){let n="create_story_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:R.createElement(O,{className:A3.createStoryButton,"data-qa-anchor":i,style:p,onPress:()=>o==null?void 0:o()},R.createElement(ee,{defaultIcon:()=>R.createElement(Vie,{className:cr(A3.createStoryButton__icon,r)}),imgIcon:()=>R.createElement("img",{src:a.image,alt:d}),configIconName:a.image,defaultIconName:s.image}),R.createElement(S.Body,{className:A3.createStoryButton__text},a.text))}var $8={hyperLinkButton:"mo"};var Zie=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),R.createElement("path",{fill:"currentColor",d:"M18.04 14.21c1.792 1.794 1.898 4.677.316 6.575-.212.281-.07.14-2.954 3.024-1.933 1.933-5.062 1.933-6.96 0-1.934-1.899-1.934-5.028 0-6.961l2.214-2.215c.246-.246.703-.07.703.281.036.387.106.984.176 1.336.035.14 0 .281-.105.387l-1.617 1.617a2.95 2.95 0 000 4.183 2.95 2.95 0 004.183 0l2.637-2.636a2.95 2.95 0 000-4.184c-.176-.21-.563-.457-.809-.562-.14-.106-.246-.282-.21-.457.034-.387.21-.774.527-1.055l.14-.14a.435.435 0 01.492-.106c.457.246.88.527 1.266.914zm5.483-5.483c1.934 1.898 1.934 5.027 0 6.96l-2.214 2.215c-.247.246-.704.07-.704-.28a15.366 15.366 0 00-.175-1.337.397.397 0 01.105-.387l1.617-1.617a2.95 2.95 0 000-4.183 2.95 2.95 0 00-4.183 0l-2.637 2.636a2.95 2.95 0 000 4.184c.176.21.563.457.809.563.14.105.246.28.21.456a1.607 1.607 0 01-.527 1.055l-.14.14a.435.435 0 01-.493.106 5.265 5.265 0 01-1.265-.914c-1.793-1.793-1.899-4.676-.317-6.574.211-.281.07-.14 2.954-3.023 1.933-1.934 5.062-1.934 6.96 0z"})),H3=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n=()=>{}})=>{let i="story_hyperlink_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{className:$8.hyperLinkButton,onPress:n,"data-qa-anchor":a},R.createElement(ee,{defaultIcon:()=>R.createElement(Zie,{className:cr($8.hyperLinkButton,o)}),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var YN={impressionButton:"po"};var qie=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),R.createElement("path",{fill:"#A5A9B5",d:"M10 6.5c1.938 0 3.5 1.594 3.5 3.5 0 1.938-1.563 3.5-3.5 3.5A3.494 3.494 0 016.5 10c0-.281.063-.688.156-.969.188.125.594.219.844.219.938 0 1.75-.781 1.75-1.75-.031-.219-.125-.625-.25-.844.281-.062.719-.125 1-.156zm8.875 3.063a1.142 1.142 0 010 .906C17.187 13.78 13.812 16 10 16c-3.844 0-7.219-2.219-8.906-5.531a1.142 1.142 0 010-.906C2.78 6.25 6.156 4 10 4c3.813 0 7.188 2.25 8.875 5.563zM10 14.5c3.063 0 5.906-1.719 7.406-4.5-1.5-2.781-4.343-4.5-7.406-4.5-3.094 0-5.938 1.719-7.438 4.5 1.5 2.781 4.344 4.5 7.438 4.5z"}));function F3({pageId:e="*",componentId:t="*",reach:o=0,defaultIconClassName:r,imgIconClassName:n}){let i="story_impression_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(ee,{defaultIcon:()=>R.createElement("div",{className:cr(YN.impressionButton,r),"data-qa-anchor":a},R.createElement(qie,null),R.createElement(S.BodyBold,null,o)),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:n}),defaultIconName:l.icon,configIconName:s.icon})}var RN={overflowMenuButton:"go"};var Jie=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},e),R.createElement("path",{fill:"#fff",d:"M13.688 12.25c0 .95-.774 1.688-1.688 1.688-.95 0-1.688-.739-1.688-1.688 0-.914.739-1.688 1.688-1.688a1.71 1.71 0 011.688 1.688zm4.218-1.688c.914 0 1.688.774 1.688 1.688 0 .95-.774 1.688-1.688 1.688-.949 0-1.687-.739-1.687-1.688 0-.914.738-1.688 1.687-1.688zm-11.812 0c.914 0 1.687.774 1.687 1.688 0 .95-.773 1.688-1.687 1.688-.95 0-1.688-.739-1.688-1.688 0-.914.739-1.688 1.688-1.688z"})),O3=({pageId:e="*",componentId:t="*",onPress:o=()=>{},defaultClassName:r,imgClassName:n})=>{let i="overflow_menu",{config:a,defaultConfig:s,uiReference:l,themeStyles:d,accessibilityId:p}=A({pageId:e,componentId:t,elementId:i});return R.createElement(O,{style:d,"data-qa-anchor":p,className:RN.overflowMenuButton,onPress:o},R.createElement(ee,{defaultIcon:()=>R.createElement(Jie,{className:r}),imgIcon:()=>R.createElement("img",{src:a.icon,alt:l,className:n}),defaultIconName:s.icon,configIconName:a.icon}))};var Xie=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{clipPath:"url(#clip0_1709_7904)"},R.createElement("path",{d:"M16 32.5C24.8366 32.5 32 25.3366 32 16.5C32 7.66344 24.8366 0.5 16 0.5C7.16344 0.5 0 7.66344 0 16.5C0 25.3366 7.16344 32.5 16 32.5Z",fill:"#FFD54F"}),R.createElement("path",{d:"M9.33317 15.1667C10.8059 15.1667 11.9998 13.9728 11.9998 12.5C11.9998 11.0273 10.8059 9.83337 9.33317 9.83337C7.86041 9.83337 6.6665 11.0273 6.6665 12.5C6.6665 13.9728 7.86041 15.1667 9.33317 15.1667Z",fill:"#6D4C41"}),R.createElement("path",{d:"M22.6667 15.1667C24.1394 15.1667 25.3333 13.9728 25.3333 12.5C25.3333 11.0273 24.1394 9.83337 22.6667 9.83337C21.1939 9.83337 20 11.0273 20 12.5C20 13.9728 21.1939 15.1667 22.6667 15.1667Z",fill:"#6D4C41"}),R.createElement("path",{d:"M21.0248 27.3372C20.674 27.3372 20.3232 27.2038 20.0564 26.9352C17.8894 24.7682 14.1108 24.7682 11.9456 26.9352C11.4103 27.4705 10.5423 27.4705 10.007 26.9352C9.47163 26.4016 9.47163 25.5319 10.007 24.9966C11.6076 23.396 13.7362 22.5153 16.0001 22.5153C18.264 22.5153 20.3926 23.396 21.9932 24.9984C22.5286 25.5337 22.5286 26.4016 21.9932 26.937C21.7264 27.2038 21.3756 27.3372 21.0248 27.3372Z",fill:"#6D4C41"}),R.createElement("path",{d:"M24.8228 16.5987C24.4495 16.0587 23.5508 16.0587 23.1775 16.5987C22.6228 17.4014 21.3335 19.3881 21.3335 20.5001C21.3335 21.9707 22.5295 23.1667 24.0002 23.1667C25.4708 23.1667 26.6668 21.9707 26.6668 20.5001C26.6668 19.3881 25.3775 17.4014 24.8228 16.5987Z",fill:"#00BCD4"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_1709_7904"},R.createElement("rect",{width:"32",height:"32",fill:"white",transform:"translate(0 0.5)"}))))},eE=Xie;var Yie=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("circle",{cx:"16",cy:"16.5",r:"16",fill:"url(#paint0_linear_1709_7888)"}),R.createElement("g",{clipPath:"url(#clip0_1709_7888)"},R.createElement("path",{d:"M21.8752 10.2903C21.3417 9.70788 20.5123 8.92173 20.1595 10.6968C20.0395 11.3004 19.7591 11.7656 19.5189 12.1402C19.2599 10.8296 18.4808 9.47308 17.7467 8.55843C17.472 8.21623 16.4973 6.85588 16.3101 4.58008C16.2821 4.24043 15.8787 4.08093 15.6263 4.31003C13.2147 6.49923 11.891 9.51013 11.8419 12.8998C11.8419 12.8998 10.8377 12.0533 10.2921 10.4786C10.1452 10.0546 9.57671 9.97368 9.33006 10.3486C9.28271 10.4206 9.23881 10.4927 9.19921 10.5627C7.33856 13.8527 6.44351 17.848 7.27096 21.565C8.65446 27.7898 17.8062 29.5301 22.6511 25.6177C27.3914 21.7899 25.8846 14.6654 21.8752 10.2903Z",fill:"#ED694A"}),R.createElement("path",{d:"M20.4125 14.8409C20.0185 14.4107 19.4058 13.83 19.1452 15.1411C19.0566 15.5869 18.8495 15.9306 18.6721 16.2073C18.4809 15.2392 17.9054 14.2372 17.3632 13.5617C17.1603 13.3089 16.4404 12.3042 16.302 10.6231C16.2814 10.3722 15.9834 10.2545 15.797 10.4237C14.0158 12.0406 13.038 14.2646 13.0018 16.7682C13.0018 16.7682 12.26 16.143 11.8571 14.9799C11.7486 14.6667 11.3287 14.607 11.1465 14.8839C11.1116 14.9371 11.0791 14.9904 11.0499 15.0421C9.67554 17.4721 9.01444 20.4231 9.62559 23.1686C10.6475 27.7664 17.4071 29.0518 20.9857 26.162C24.4869 23.3347 23.3739 18.0725 20.4125 14.8409Z",fill:"#F4A32C"}),R.createElement("path",{d:"M19.077 18.9949C18.8103 18.7037 18.3955 18.3106 18.2191 19.1982C18.1592 19.5 18.0189 19.7326 17.8988 19.9199C17.7693 19.2645 17.3798 18.5863 17.0127 18.129C16.8754 17.9579 16.3881 17.2777 16.2944 16.1398C16.2804 15.9699 16.0787 15.8902 15.9525 16.0048C14.7467 17.0994 14.0849 18.6049 14.0603 20.2996C14.0603 20.2996 13.5582 19.8764 13.2855 19.0891C13.212 18.8771 12.9278 18.8366 12.8045 19.0241C12.7808 19.06 12.7589 19.0961 12.739 19.1311C11.8087 20.7761 11.3612 22.7737 11.7749 24.6323C12.4666 27.7447 17.0425 28.6149 19.4649 26.6586C20.2945 25.9887 20.8088 25.0448 20.9131 24.0006C21.0706 22.4191 20.4619 20.5062 19.077 18.9949Z",fill:"#F4D44E"}),R.createElement("path",{d:"M17.838 22.85C17.6894 22.6878 17.4583 22.4688 17.36 22.9632C17.3266 23.1314 17.2485 23.261 17.1816 23.3653C17.1094 23.0002 16.8924 22.6223 16.6879 22.3676C16.6114 22.2722 16.3399 21.8933 16.2877 21.2593C16.2799 21.1647 16.1675 21.1203 16.0972 21.1841C15.4255 21.7939 15.0567 22.6327 15.043 23.5769C15.043 23.5769 14.7633 23.3411 14.6113 22.9024C14.5704 22.7843 14.412 22.7617 14.3434 22.8662C14.3302 22.8863 14.318 22.9064 14.307 22.9259C13.7887 23.8424 13.5393 24.9553 13.7698 25.9907C14.2947 28.3523 18.5971 28.2807 18.861 25.6388C18.9486 24.7577 18.6095 23.6919 17.838 22.85Z",fill:"#EAE9E8"}),R.createElement("path",{d:"M14.7688 26.4597C14.5383 25.5334 14.7876 24.5379 15.3059 23.7181C15.3169 23.7006 15.3292 23.6827 15.3423 23.6647C15.411 23.5713 15.5694 23.5914 15.6103 23.6971C15.7622 24.0895 16.042 24.3004 16.042 24.3004C16.0532 23.6064 16.3046 22.9764 16.7664 22.4711C16.6631 22.3281 16.3472 21.9833 16.2877 21.2597C16.2799 21.165 16.1675 21.1207 16.0972 21.1844C15.4255 21.7943 15.0567 22.633 15.043 23.5772C15.043 23.5772 14.7633 23.3414 14.6113 22.9028C14.5704 22.7847 14.412 22.7621 14.3434 22.8666C14.3302 22.8867 14.318 22.9068 14.307 22.9263C13.7887 23.8427 13.5393 24.9557 13.7698 25.9911C13.9831 26.9509 14.8594 27.5277 15.8282 27.6669C15.3056 27.4102 14.904 27.0038 14.7688 26.4597Z",fill:"#F7E7A1"})),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_7888",x1:"7.2",y1:"7.7",x2:"24.8",y2:"29.3",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#FFF09F"}),R.createElement("stop",{offset:"1",stopColor:"#FCCF5A"})),R.createElement("clipPath",{id:"clip0_1709_7888"},R.createElement("rect",{width:"25.6",height:"25.6",fill:"white",transform:"translate(3.2002 2.09998)"}))))},tE=Yie;var Rie=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"Reactions",clipPath:"url(#clip0_1709_1751)"},R.createElement("path",{id:"Vector",d:"M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z",fill:"#FFD54F"}),R.createElement("path",{id:"Vector_2",d:"M27.2933 19.9601C26.9867 20.9334 26.5867 21.8267 26.0667 22.6667H5.93332C5.41332 21.8267 5.01332 20.9334 4.70665 19.9601C4.61332 19.6534 4.66665 19.3334 4.86665 19.0801C5.05332 18.8134 5.34665 18.6667 5.66665 18.6667H26.3333C26.6533 18.6667 26.9467 18.8134 27.1333 19.0801C27.3333 19.3334 27.3867 19.6534 27.2933 19.9601Z",fill:"white"}),R.createElement("path",{id:"Vector_3",d:"M26.0664 22.6667C23.9598 26.1201 20.1864 28.2934 15.9998 28.2934C11.8131 28.2934 8.03977 26.1201 5.93311 22.6667H26.0664Z",fill:"#E53935"}),R.createElement("path",{id:"Vector_4",d:"M12.3332 13.6668C11.7812 13.6668 11.3332 13.2188 11.3332 12.6668C11.3332 11.9322 10.7358 11.3335 9.99984 11.3335C9.26384 11.3335 8.6665 11.9322 8.6665 12.6668C8.6665 13.2188 8.2185 13.6668 7.6665 13.6668C7.1145 13.6668 6.6665 13.2188 6.6665 12.6668C6.6665 10.8295 8.16117 9.3335 9.99984 9.3335C11.8385 9.3335 13.3332 10.8295 13.3332 12.6668C13.3332 13.2188 12.8852 13.6668 12.3332 13.6668Z",fill:"#6D4C41"}),R.createElement("path",{id:"Vector_5",d:"M24.3332 13.6668C23.7812 13.6668 23.3332 13.2188 23.3332 12.6668C23.3332 11.9322 22.7358 11.3335 21.9998 11.3335C21.2638 11.3335 20.6665 11.9322 20.6665 12.6668C20.6665 13.2188 20.2185 13.6668 19.6665 13.6668C19.1145 13.6668 18.6665 13.2188 18.6665 12.6668C18.6665 10.8295 20.1612 9.3335 21.9998 9.3335C23.8385 9.3335 25.3332 10.8295 25.3332 12.6668C25.3332 13.2188 24.8852 13.6668 24.3332 13.6668Z",fill:"#6D4C41"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_1709_1751"},R.createElement("rect",{width:"32",height:"32",fill:"white"}))))},oE=Rie;var eae=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),R.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#63A1FF"}),R.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},z3=eae;var tae=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"Reactions"},R.createElement("circle",{id:"Ellipse 2",cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1738)"}),R.createElement("path",{id:"circle",d:"M22.4466 10.5836C20.7296 9.07415 18.2009 9.36319 16.6088 11.0332L16.0156 11.6755L15.3912 11.0332C13.8303 9.36319 11.2704 9.07415 9.55338 10.5836C7.58661 12.3179 7.49295 15.401 9.24119 17.2637L15.2976 23.687C15.6722 24.1045 16.3278 24.1045 16.7024 23.687L22.7588 17.2637C24.507 15.401 24.4134 12.3179 22.4466 10.5836Z",fill:"white"})),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_1738",x1:"7.2",y1:"7.2",x2:"28",y2:"39.2",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#EE5C91"}),R.createElement("stop",{offset:"0.833333",stopColor:"#E02222"}))))},rE=tae;var ma={reactButton:"_",reactButton__icon:"ee",reactButton__reactionsText:"re",reactButton__panel:"ho",reactButton__panel__reaction:"r",reactButton__panel__reaction__text:"y","reaction-scale":"ae","reaction-click":"oe"};var iae=e=>R.createElement("svg",c({width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M15.9727 9.6543C16.1055 10.418 16.0059 11.1484 15.6738 11.7461C15.7734 12.543 15.541 13.373 15.0762 13.9707C15.043 15.8301 13.9141 17.125 11.3574 17.125C11.125 17.125 10.8594 17.125 10.5938 17.125C7.20703 17.125 6.17773 15.8633 4.68359 15.8301C4.58398 16.2617 4.15234 16.5938 3.6875 16.5938H1.5625C0.964844 16.5938 0.5 16.1289 0.5 15.5312V7.5625C0.5 6.99805 0.964844 6.5 1.5625 6.5H4.81641C5.44727 5.96875 6.34375 4.50781 7.10742 3.74414C7.57227 3.2793 7.43945 0.125 9.49805 0.125C11.3906 0.125 12.6523 1.1875 12.6523 3.61133C12.6523 4.24219 12.5195 4.74023 12.3535 5.17188H13.582C15.1758 5.17188 16.4375 6.5332 16.4375 7.99414C16.4375 8.625 16.2715 9.15625 15.9727 9.6543ZM13.9141 11.4473C14.6445 10.7832 14.5449 9.75391 14.0801 9.25586C14.4121 9.25586 14.8438 8.625 14.8438 8.02734C14.8105 7.39648 14.2793 6.76562 13.582 6.76562H10.1289C10.1289 5.50391 11.0586 4.90625 11.0586 3.61133C11.0586 2.81445 11.0586 1.71875 9.49805 1.71875C8.86719 2.34961 9.16602 3.94336 8.23633 4.87305C7.33984 5.76953 6.04492 8.09375 5.08203 8.09375H4.75V14.3027C6.50977 14.3027 8.07031 15.5312 10.4277 15.5312H11.6895C12.8516 15.5312 13.7148 14.9668 13.4492 13.373C13.9473 13.0742 14.3457 12.1445 13.9141 11.4473ZM3.42188 14.4688C3.42188 14.0371 3.05664 13.6719 2.625 13.6719C2.16016 13.6719 1.82812 14.0371 1.82812 14.4688C1.82812 14.9336 2.16016 15.2656 2.625 15.2656C3.05664 15.2656 3.42188 14.9336 3.42188 14.4688Z"}));function U3({pageId:e="*",componentId:t="*",myReaction:o,reactionsCount:r,defaultIconClassName:n,imgIconClassName:i,onReactionClick:a}){let s="reaction_button",{isExcluded:l,accessibilityId:d,config:p,defaultConfig:u,uiReference:g,themeStyles:f}=A({pageId:e,componentId:t,elementId:s}),y=o!=null;if(l)return null;let v=()=>{switch(o){case"like":return R.createElement(z3,{className:ma.reactButton__icon});case"love":return R.createElement(rE,{className:ma.reactButton__icon});case"fire":return R.createElement(tE,{className:ma.reactButton__icon});case"happy":return R.createElement(oE,{className:ma.reactButton__icon});case"crying":return R.createElement(eE,{className:ma.reactButton__icon});default:return null}};return R.createElement(O,{style:f,"data-qa-anchor":d,className:ma.reactButton,onPress:()=>{a("like");}},o?v():R.createElement(ee,{defaultIcon:()=>R.createElement(iae,{className:cr(ma.reactButton__icon,n),"data-has-my-reaction":"false"}),imgIcon:()=>R.createElement("img",{src:p.icon,alt:g,className:i}),defaultIconName:u.icon,configIconName:p.icon}),R.createElement(S.BodyBold,{className:ma.reactButton__reactionsText,"data-has-my-reaction":y},typeof r=="number"?ib(r):o||p.text))}var nE={saveButton:"te"};function I1({pageId:e="*",componentId:t="*",onPress:o,className:r}){let n="save_button",{accessibilityId:i,config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:n});return s?null:R.createElement(O,{className:cr(nE.saveButton,r),"data-qa-anchor":i,style:E(c({},l),{backgroundColor:a.background_color}),onPress:o},a.save_button_text)}var iE={shareStoryButton:"ie",shareStoryIcon:"fo"};var _c={communityAvatar__text:"bo",communityAvatar__placeholder__path:"uo",communityAvatar__placeholder__rect:"vo",communityAvatar__placeholder:"xo",communityAvatar__image:"wo"};var aE=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",className:_c.communityAvatar__placeholder},e),R.createElement("rect",{width:"64",height:"64",rx:"32",className:_c.communityAvatar__placeholder__rect}),R.createElement("path",{d:"M31.7539 19.2C33.2201 19.2 34.6262 19.7696 35.6629 20.7836C36.6997 21.7976 37.2821 23.1728 37.2821 24.6068C37.2821 26.0408 36.6997 27.4161 35.6629 28.4301C34.6262 29.4441 33.2201 30.0137 31.7539 30.0137C30.2877 30.0137 28.8816 29.4441 27.8449 28.4301C26.8081 27.4161 26.2257 26.0408 26.2257 24.6068C26.2257 23.1728 26.8081 21.7976 27.8449 20.7836C28.8816 19.7696 30.2877 19.2 31.7539 19.2ZM20.6975 23.062C21.582 23.062 22.4033 23.2937 23.1141 23.7108C22.8772 25.92 23.5406 28.1136 24.8989 29.8284C24.1092 31.3114 22.5297 32.331 20.6975 32.331C19.4408 32.331 18.2355 31.8427 17.3469 30.9736C16.4583 30.1044 15.959 28.9256 15.959 27.6965C15.959 26.4674 16.4583 25.2886 17.3469 24.4194C18.2355 23.5503 19.4408 23.062 20.6975 23.062ZM42.8103 23.062C44.067 23.062 45.2723 23.5503 46.1609 24.4194C47.0495 25.2886 47.5488 26.4674 47.5488 27.6965C47.5488 28.9256 47.0495 30.1044 46.1609 30.9736C45.2723 31.8427 44.067 32.331 42.8103 32.331C40.9781 32.331 39.3986 31.3114 38.6089 29.8284C39.9672 28.1136 40.6306 25.92 40.3937 23.7108C41.1045 23.2937 41.9258 23.062 42.8103 23.062ZM21.4872 38.8965C21.4872 35.6987 26.0835 33.1034 31.7539 33.1034C37.4243 33.1034 42.0206 35.6987 42.0206 38.8965V41.5999H21.4872V38.8965ZM12.8 41.5999V39.2827C12.8 37.1354 15.7853 35.3279 19.8288 34.8027C18.8969 35.8532 18.3283 37.3053 18.3283 38.8965V41.5999H12.8ZM50.7077 41.5999H45.1795V38.8965C45.1795 37.3053 44.6109 35.8532 43.679 34.8027C47.7225 35.3279 50.7077 37.1354 50.7077 39.2827V41.5999Z",className:_c.communityAvatar__placeholder__path}));function jr({pageId:e="*",componentId:t="*",community:o}){let r="community_avatar",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r}),s=se({fileId:o==null?void 0:o.avatarFileId});return i?null:s==null?R.createElement(aE,{style:a}):R.createElement("object",{data:s,type:"image/png",className:_c.communityAvatar__image,"data-qa-anchor":n,style:a},R.createElement(aE,null))}var pae=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"14",fill:"none",viewBox:"0 0 15 14"},e),R.createElement("path",{fill:"currentColor",d:"M6.813.219c.125-.157.375-.157.53 0l6.532 6.531a.36.36 0 010 .531l-6.531 6.532c-.157.156-.407.156-.532 0l-.625-.594c-.156-.156-.156-.406 0-.531l4.844-4.876H.375A.361.361 0 010 7.438v-.875a.38.38 0 01.375-.375h10.656L6.187 1.345c-.156-.125-.156-.375 0-.532L6.813.22z"})),$3=({pageId:e="*",componentId:t="*",community:o,onClick:r})=>{let n="share_story_button",{config:i,isExcluded:a}=A({pageId:e,componentId:t,elementId:n});return a?null:R.createElement("button",{role:"button",className:cr(iE.shareStoryButton),"data-qa-anchor":"share_story_button",onClick:r,"data-hideAvatar":i==null?void 0:i.hide_avatar},!(i!=null&&i.hide_avatar)&&R.createElement(jr,{pageId:e,componentId:t,community:o}),R.createElement(S.BodyBold,null,(i==null?void 0:i.text)||"Share story"),R.createElement(pae,null))};var V3={speakerButton:"yo",speakerButton__icon:"ko"};var gae=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),R.createElement("path",{fill:"#fff",d:"M15.121 9.781c.527-.527 1.441-.176 1.441.598v11.777c0 .774-.914 1.125-1.44.598l-3.13-3.129H8.406c-.492 0-.844-.352-.844-.844V13.72c0-.457.352-.844.844-.844h3.586l3.13-3.094zm9.316 6.469c0 2.25-1.16 4.29-3.023 5.52-.422.246-.95.105-1.16-.282a.845.845 0 01.246-1.16 4.807 4.807 0 002.25-4.078 4.792 4.792 0 00-2.25-4.043.845.845 0 01-.246-1.16.824.824 0 011.16-.281c1.863 1.23 3.023 3.27 3.023 5.484zm-4.992-2.672c.985.527 1.617 1.582 1.617 2.672 0 1.125-.632 2.18-1.617 2.707-.422.246-.914.105-1.16-.316a.869.869 0 01.352-1.16c.422-.247.738-.704.738-1.231 0-.492-.316-.95-.738-1.195a.87.87 0 01-.352-1.16c.246-.422.738-.563 1.16-.317z"})),fae=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),R.createElement("path",{fill:"#fff",d:"M25.781 22.344a.467.467 0 01.094.687l-.594.782c-.187.218-.5.28-.718.093L6.188 9.688A.468.468 0 016.093 9l.625-.781a.468.468 0 01.687-.094l4.75 3.656 1.563-1.531c.469-.469 1.281-.156 1.281.531v3.188l2.469 1.937a1.234 1.234 0 00-.625-.969.773.773 0 01-.313-1.03c.219-.376.657-.5 1.032-.282A2.739 2.739 0 0119 16c0 .344-.094.625-.188.938l1.22.937c.28-.563.468-1.188.468-1.875a4.26 4.26 0 00-2-3.594.75.75 0 01-.219-1.031c.219-.344.688-.469 1.032-.25C20.968 12.188 22 14.031 22 16a5.727 5.727 0 01-.75 2.813l1.188.937c.656-1.125 1.03-2.406 1.03-3.719 0-2.468-1.218-4.781-3.312-6.125-.343-.219-.437-.687-.218-1.062A.795.795 0 0121 8.625c2.5 1.656 4 4.406 4 7.375 0 1.688-.5 3.281-1.375 4.656l2.156 1.688zM7 13.75c0-.25.125-.469.344-.625L15 19.031v2.219c0 .688-.813 1-1.281.531L10.938 19H7.75a.722.722 0 01-.75-.75v-4.5z"}));function j3({isMuted:e,pageId:t="*",componentId:o="*",defaultIconClassName:r,imgIconClassName:n,onPress:i}){let a="speaker_button",{accessibilityId:s,config:l,defaultConfig:d,isExcluded:p,uiReference:u}=A({pageId:t,componentId:o,elementId:a});return p?null:R.createElement(O,{className:cr(V3.speakerButton),onPress:i},R.createElement(ee,{"data-qa-anchor":s,defaultIcon:()=>e?R.createElement(fae,{className:V3.speakerButton__icon}):R.createElement(gae,{className:V3.speakerButton__icon}),imgIcon:()=>R.createElement("img",{src:l.icon,alt:u,className:cr(n)}),defaultIconName:d.icon,configIconName:l.icon}))}var Tc={hyperlink:"jo",hyperlinkIcon:"zo",hyperlinkText:"Xo",text:"Yo"};var yi=r=>{var n=r,{href:e,children:t}=n,o=P(n,["href","children"]);return R.createElement("a",c({href:e,className:Tc.hyperlink},o),R.createElement(bc,{className:Tc.hyperlinkIcon}),R.createElement("div",{className:Tc.hyperlinkText},R.createElement("span",{className:Tc.text},t)))};var lE={editCancelButton:"Co"};var ms=({pageId:e="*",componentId:t="*",className:o,onPress:r=()=>{}})=>{let n="edit_cancel_button",{accessibilityId:i,config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:n});return s?null:R.createElement(O,{"data-qa-anchor":i,className:cr(lE.editCancelButton,o),style:E(c({},l),{backgroundColor:a.background_color}),onPress:r},R.createElement(S.Body,null,a.cancel_button_text))};var vae=e=>R.createElement("svg",c({width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#D9E5FC"}),R.createElement("path",{d:"M23.1255 13.1312C22.385 12.4069 21.3806 12 20.3333 12C19.2861 12 18.2817 12.4069 17.5412 13.1312C16.8006 13.8555 16.3846 14.8378 16.3846 15.8621C16.3846 16.8864 16.8006 17.8687 17.5412 18.593C18.2817 19.3172 19.2861 19.7241 20.3333 19.7241C21.3806 19.7241 22.385 19.3172 23.1255 18.593C23.866 17.8687 24.2821 16.8864 24.2821 15.8621C24.2821 14.8378 23.866 13.8555 23.1255 13.1312Z",fill:"white"}),R.createElement("path",{d:"M20.3333 21.931C16.2831 21.931 13 23.7848 13 26.069V28H27.6667V26.069C27.6667 23.7848 24.3836 21.931 20.3333 21.931Z",fill:"white"})),cs=vae;var Gr={commentComposer:"Ao",commentComposer__top:"Mo",commentComposer__mentionContainer:"So",commentComposer__container:"Eo",commentComposer__avatar:"Fo",commentComposer__button:"k",commentComposer__input:"Io",commentComposer__replyContainer:"Ro",commentComposer__replyContainer__text:"Uo",commentComposer__replyContainer__username:"Bo",commentComposer__replyContainer__closeButton:"Do",commentComposer__disableContainer:"Ho"};var wae=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},R.createElement("path",{fill:"currentColor",d:"M15.5 8c.813 0 1.5.688 1.5 1.5v7a1.5 1.5 0 01-1.5 1.5h-11A1.48 1.48 0 013 16.5v-7A1.5 1.5 0 014.5 8h1V6.5C5.5 4.031 7.5 2 10 2c2.5.031 4.5 2.063 4.5 4.563V8h1zM7 6.5V8h6V6.5c0-1.625-1.375-3-3-3-1.656 0-3 1.375-3 3zm8.5 10v-7h-11v7h11z"})),kc=({referenceId:e,referenceType:t,replyTo:o,onCancelReply:r,shouldAllowCreation:n=!0,community:i})=>{var h,x;let a=Ae().currentUserId,{user:s}=fr(a),l=nt({fileId:(h=s==null?void 0:s.avatar)==null?void 0:h.fileId,imageSize:"small"}),d=useRef(null),p=useRef(null),u=useRef(null),[g,f]=useState(0),[y,v]=useState({data:{text:""},mentionees:[{type:"user",userIds:[""]}],metadata:{}}),{mutateAsync:C}=useMutation({mutationFn:M=>_(void 0,[M],function*({params:b}){let I=o?o.commentId:void 0;yield CommentRepository.createComment(E(c({referenceId:o?o.referenceId:e,referenceType:t,parentId:I},b),{mentionees:b.mentionees}));}),onError:b=>{},onSuccess:()=>{var b;v({data:{text:""},mentionees:[],metadata:{}}),(b=d.current)==null||b.clearEditorState(),r();}});return n?R.createElement("div",{className:Gr.commentComposer},R.createElement("div",{className:Gr.commentComposer__top},R.createElement("div",{className:Gr.commentComposer__mentionContainer,ref:u}),o&&R.createElement("div",{className:Gr.commentComposer__replyContainer,style:{"--asc-reply-container-offset-bottom":`${g}px`}},R.createElement("div",{className:Gr.commentComposer__replyContainer__text},R.createElement("span",null,"Replying to "),R.createElement("span",{className:Gr.commentComposer__replyContainer__username},o==null?void 0:o.userId)),R.createElement(R1,{onClick:r,className:Gr.commentComposer__replyContainer__closeButton}))),R.createElement("div",{className:Gr.commentComposer__container},R.createElement("div",{className:Gr.commentComposer__avatar},R.createElement(xt,{avatarUrl:l,defaultImage:R.createElement(cs,null)})),R.createElement("div",{className:Gr.commentComposer__input,ref:p},R.createElement(Xn,{ref:d,mentionContainer:u==null?void 0:u.current,onChange:({text:b,mentioned:M,mentionees:I})=>{v({data:{text:b},mentionees:I,metadata:{mentioned:M}});},targetType:t,targetId:e,value:y,placeholder:"Say something nice...",communityId:i==null?void 0:i.communityId})),R.createElement(O,{isDisabled:!((x=y==null?void 0:y.data)!=null&&x.text),className:Gr.commentComposer__button,onPress:()=>C({params:y})},R.createElement(S.Body,null,"Post")))):R.createElement("div",{className:Gr.commentComposer__disableContainer},R.createElement(wae,null),R.createElement(S.Body,null,"Comments are disabled for this story"))};var Q3={moderatorBadge:"Lo",moderatorBadge__icon:"To",moderatorBadge__text:"Vo"};var Pae=e=>R.createElement("svg",c({width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M7.57031 1.3125C7.85156 1.4375 8.03906 1.70312 8.03906 2C8.03906 5.46875 5.91406 7.39062 4.57031 7.95312C4.38281 8.03125 4.17969 8.03125 3.99219 7.95312C2.32031 7.25 0.539062 5.10938 0.539062 2C0.539062 1.70312 0.710938 1.4375 0.992188 1.3125L3.99219 0.0625C4.07031 0.03125 4.19531 0.015625 4.28906 0.015625C4.36719 0.015625 4.49219 0.03125 4.57031 0.0625L7.57031 1.3125ZM6.83594 3.09375C6.92969 3 6.92969 2.84375 6.83594 2.75L6.47656 2.39062C6.38281 2.29688 6.22656 2.29688 6.13281 2.39062L3.78906 4.73438L2.67969 3.64062C2.58594 3.54688 2.42969 3.54688 2.33594 3.64062L1.97656 4C1.88281 4.09375 1.88281 4.25 1.97656 4.34375L3.60156 5.96875C3.69531 6.07812 3.86719 6.07812 3.96094 5.96875L6.83594 3.09375Z"}));function w1({pageId:e="*",componentId:t="*"}){let o="moderator_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement("div",{className:Q3.moderatorBadge,style:l,"data-qa-anchor":r},R.createElement(Pae,{className:Q3.moderatorBadge__icon}),R.createElement("div",{className:Q3.moderatorBadge__text},n.text))}var dE={timestamp:"qo"};dn.extend(Sae);dn.extend(kae);dn.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"Just now",m:"1m",mm:"%dm",h:"1h",hh:"%dh",d:"1d",dd:"%dd",M:function(e,t,o,r){if(r)return e+"M";let n=dn().subtract(e,"M"),i=dn();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},MM:function(e,t,o,r){if(r)return e+"M";let n=dn().subtract(e,"M"),i=dn();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},y:function(e,t,o,r){if(r)return e+"y";let n=dn().subtract(e,"y"),i=dn();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},yy:function(e,t,o,r){if(r)return e+"y";let n=dn().subtract(e,"y"),i=dn();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")}}});function M1({pageId:e="*",componentId:t="*",timestamp:o}){let r="timestamp",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r}),s=dn(o).fromNow();return i?null:R.createElement(S.Caption,{className:dE.timestamp,style:a,"data-qa-anchor":n},s)}var Xe={postComment:"Go",postComment__deleteComment_container:"Jo",postComment__deleteComment_icon:"Ko",postComment__deleteComment_text:"No",postComment__avatar:"Oo",postComment__details:"Po",postComment__content:"Qo",postComment__content__username:"Wo",postComment__content__text:"Zo",postComment__secondRow:"_o",postComment__secondRow__leftPane:"et",postComment__secondRow__timestamp:"rt",postComment__secondRow__rightPane:"at",postComment__secondRow__rightPane__like:"ot",postComment__secondRow__like:"le",postComment__secondRow__reply:"tt",postComment__secondRow__actionButton:"it",postComment__viewReply_button:"lt",postComment__viewReply_icon:"st",postComment__viewReply_text:"ct",postComment__edit:"nt",postComment__edit__inputWrap:"dt",postComment__edit__mentionContainer:"mt",postComment__edit__input:"pt",postComment__edit__buttonWrap:"gt",postComment__edit__button:"ht",postComment__edit__cancelButton:"ft",postComment__edit__saveButton:"bt",postComment__seeMore:"ut"};var Eae=e=>R.createElement("svg",c({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M13.824 9.72708L10.6334 12.8479C10.3988 13.0544 10.0469 13.0544 9.83578 12.8249L9.31965 12.3201C9.08504 12.1136 9.08504 11.7464 9.31965 11.5399L10.7507 10.2549H2.56305C2.2346 10.2549 2 10.0024 2 9.70413V5.56C2 5.25072 2.25072 5 2.56 5L3.31683 5C3.62611 5.00001 3.87683 5.25073 3.87683 5.56V8.4191H10.7507L9.31965 7.11113C9.08504 6.9046 9.08504 6.53745 9.31965 6.33093L9.83578 5.8261C10.0469 5.59663 10.3988 5.59663 10.6334 5.80315L13.824 8.92393C14.0587 9.1534 14.0587 9.49761 13.824 9.72708Z",fill:"currentColor"})),W3=Eae;var Fn={postCommentSkeleton__container:"vt",postCommentSkeleton:"xt",postCommentSkeleton__avatar:"wt",postCommentSkeleton__details:"yt",postCommentSkeleton__content:"kt",postCommentSkeleton__content__bar:"jt",postCommentSkeleton__animation:"zt","skeleton-pulse":"se"};var K3=({pageId:e="*",componentId:t="*",numberOfSkeletons:o=1})=>{let{accessibilityId:r,isExcluded:n,themeStyles:i}=te({pageId:e,componentId:t});if(n)return null;let a=Array.from({length:o},(s,l)=>R.createElement("div",{key:l,"data-qa-anchor":r,className:cr(Fn.postCommentSkeleton,Fn.postCommentSkeleton__animation),style:i},R.createElement("div",{className:cr(Fn.postCommentSkeleton__avatar,Fn.postCommentSkeleton__animation)}),R.createElement("div",{className:cr(Fn.postCommentSkeleton__details,Fn.postCommentSkeleton__animation)},R.createElement("div",{className:cr(Fn.postCommentSkeleton__content,Fn.postCommentSkeleton__animation)}),R.createElement("div",{className:Fn.postCommentSkeleton__content__bar}))));return R.createElement("div",{className:Fn.postCommentSkeleton__container},a)};function j8({parentId:e,referenceId:t,referenceType:o,limit:r=10,shouldCall:n=!0,includeDeleted:i=!1}){let l=dt({fetcher:CommentRepository.getComments,params:{parentId:e,referenceId:t,referenceType:o,limit:r,includeDeleted:i},shouldCall:!!t&&!!o&&n}),{items:a}=l,s=P(l,["items"]);return c({comments:a},s)}function Nc({commentId:e,shouldSubscribe:t=!0,callback:o}){return ta({fetcher:CommentRepository.getComment,params:e,callback:o,shouldSubscribe:!!e&&t,getSubscribedTopic:({data:r})=>getCommentTopic(r)})}var On="like";var hi={textWithMention__container:"Xt",textWithMention__clamp:"ce",textWithMention__paragraph:"Yt",textWithMention__fullContent:"ne",textWithMention__mention:"Ct",textWithMention__text:"At",textWithMention__link:"Mt",textWithMention__showMoreLess:"St"};var Sm=({maxLines:e=8,data:t,mentionees:o,metadata:r})=>{let[n,i]=useState(!1),[a,s]=useState(!1),[l,d]=useState(!1),p=useRef(null),{goToUserProfilePage:u}=Be(),g=useMemo(()=>nl({data:t,mentionees:o,metadata:r}),[t,o,r]);useEffect(()=>{var h;let y=((h=p.current)==null?void 0:h.clientHeight)||0,v=parseInt(window.getComputedStyle(document.body).getPropertyValue("font-size"),10),C=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--asc-line-height-md"))*v;y>C*e&&s(!0),d(!0);},[]);let f=(y,v)=>y.children.map(C=>{var h;return I6(C)?R.createElement(O,{key:C.data.userId,className:cr(v,hi.textWithMention__mention),onPress:()=>u(C.data.userId)},C.text):w6(C)||Fv(C)?R.createElement("a",{key:C.url,href:C.url,className:cr(v,hi.textWithMention__link)},N2(C.children[0])?(h=C.children[0])==null?void 0:h.text:C.url):N2(C)?R.createElement("span",{className:cr(v,hi.textWithMention__text)},C.text):null});return R.createElement("div",{className:hi.textWithMention__container},R.createElement("div",{ref:p,className:hi.textWithMention__fullContent,"data-hidden":l},g.root.children.map(y=>R.createElement("p",{className:hi.textWithMention__paragraph},y.children.length>0?R.createElement(S.Body,{renderer:({typoClassName:v})=>R.createElement(R.Fragment,null,f(y,v))}):R.createElement("br",null)))),R.createElement("div",{"data-expanded":n,className:hi.textWithMention__clamp,style:{"--asc-text-with-mention-max-lines":e}},a&&!n&&R.createElement("div",{onClick:()=>i(!0),className:hi.textWithMention__showMoreLess},R.createElement(S.Body,null,"...See more")),g.root.children.map((y,v)=>R.createElement("p",{className:hi.textWithMention__paragraph},y.children.length>0?R.createElement(S.Body,{renderer:({typoClassName:C})=>R.createElement(R.Fragment,null,f(y,C))}):R.createElement("br",null)))))};var Nm={commentOptions__actionButton:"Et",commentOptions__actionButton__icon:"Ft",commentOptions__actionButton__text:"It"};var J3=({comment:e,handleEditComment:t,handleDeleteComment:o,onCloseBottomSheet:r})=>{let{userRoles:n}=Ae(),{toggleFlagComment:i,isFlaggedByMe:a}=J7(e.commentId),{canDelete:s,canEdit:l,canReport:d}=G0(e,!1,n),p=_o(),u=()=>_(void 0,null,function*(){try{yield i({onFlagSuccess:()=>p.success({content:"Report sent"}),onUnFlagSuccss:()=>p.success({content:"Unreport sent"})});}catch(f){f instanceof Error&&p.error({content:f.message});}}),g=[l?{name:"Edit comment",action:t,icon:R.createElement(a8,{className:Nm.commentOptions__actionButton__icon})}:null,d?{name:a?"Unreport comment":"Report comment",action:u,icon:R.createElement(s8,{className:Nm.commentOptions__actionButton__icon})}:null,s?{name:"Delete comment",action:o,icon:R.createElement(u1,{className:Nm.commentOptions__actionButton__icon})}:null].filter(on);return R.createElement(R.Fragment,null,g.map((f,y)=>R.createElement("div",{className:Nm.commentOptions__actionButton,key:y,onClick:()=>{r(),f.action();}},f.icon,R.createElement("div",{className:Nm.commentOptions__actionButton__text},R.createElement(S.BodyBold,null,f.name)))))};var pt={postReplyComment:"Rt",postReplyComment__avatar:"Ut",postReplyComment__details:"Bt",postReplyComment__content:"Dt",postReplyComment__content__username:"Ht",postReplyComment__content__text:"Lt",postReplyComment__secondRow:"Tt",postReplyComment__secondRow__leftPane:"Vt",postReplyComment__secondRow__rightPane:"qt",postReplyComment__secondRow__rightPane__like:"Gt",postReplyComment__secondRow__like:"de",postReplyComment__secondRow__reply:"Jt",postReplyComment__secondRow__actionButton:"Kt",postReplyComment__viewReply_button:"Nt",postReplyComment__viewReply_icon:"Ot",postReplyComment__viewReply_text:"Pt",postReplyComment__actionButton:"Qt",postReplyComment__actionButton__icon:"Wt",postReplyComment__actionButton__text:"Zt",postReplyComment__deleteComment_container:"_t",postReplyComment__deleteComment_icon:"ei",postReplyComment__deleteComment_text:"ri",postReplyComment__edit:"ai",postReplyComment__edit__inputWrap:"oi",postReplyComment__edit__input:"ti",postReplyComment__edit__buttonWrap:"ii",postReplyComment__edit__button:"li",postReplyComment__edit__cancelButton:"si",postReplyComment__edit__saveButton:"ci",postReplyComment__secondRow__timestamp:"ni"};var Gae=({pageId:e="*",community:t,comment:o})=>{var T;let r="post_comment",{confirm:n}=Re(),{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=te({pageId:e,componentId:r}),[u,g]=useState(!1),[f,y]=useState(!1),[v,C]=useState(),h=(o.myReactions||[]).some(L=>L==="like"),x=()=>g(L=>!L),b=()=>_(void 0,null,function*(){return o.commentId&&CommentRepository.deleteComment(o.commentId)}),M=()=>{y(!0);},I=()=>{n({pageId:e,componentId:r,title:"Delete reply",content:"This reply will be permanently removed.",cancelText:"Cancel",okText:"Delete",onOk:b});},w=()=>_(void 0,null,function*(){o&&(h?yield ReactionRepository.removeReaction("comment",o==null?void 0:o.commentId,On):yield ReactionRepository.addReaction("comment",o==null?void 0:o.commentId,On));}),N=useCallback(()=>_(void 0,null,function*(){!v||!o.commentId||(yield CommentRepository.updateComment(o.commentId,{data:v.data,mentionees:v.mentionees,metadata:v.metadata}),y(!1));}),[v]);return Nc({commentId:o.commentId}),l?null:R.createElement(R.Fragment,null,o.isDeleted?R.createElement("div",{className:pt.postReplyComment__deleteComment_container,style:p},R.createElement(Ic,{className:pt.postReplyComment__deleteComment_icon}),R.createElement(S.Caption,{className:pt.postReplyComment__deleteComment_text},"This reply has been deleted")):f?R.createElement("div",{className:pt.postReplyComment__edit},R.createElement(jo,{userId:o.userId}),R.createElement("div",{className:pt.postReplyComment__edit__inputWrap},R.createElement("div",{className:pt.postReplyComment__edit__input},R.createElement(Xn,{placeholder:"Say something nice...",communityId:t==null?void 0:t.communityId,value:{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata||{}},onChange:L=>{C({data:{text:L.text},mentionees:L.mentionees,metadata:{mentioned:L.mentioned}});}})),R.createElement("div",{className:pt.postReplyComment__edit__buttonWrap},R.createElement(ms,{componentId:"edit_comment_component",className:cr(pt.postReplyComment__edit__button,pt.postReplyComment__edit__cancelButton),onPress:()=>{y(!1);}}),R.createElement(I1,{className:cr(pt.postReplyComment__edit__button,pt.postReplyComment__edit__saveButton),componentId:"edit_comment_component",onPress:N})))):R.createElement("div",{className:pt.postReplyComment,style:p,"data-qa-anchor":i},R.createElement(jo,{userId:o.userId}),R.createElement("div",{className:pt.postReplyComment__details},R.createElement("div",{className:pt.postReplyComment__content},R.createElement(S.BodyBold,{className:pt.postReplyComment__content__username},(T=o.creator)==null?void 0:T.displayName),R.createElement(w1,{pageId:e,componentId:r}),R.createElement(Sm,{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata})),R.createElement("div",{className:pt.postReplyComment__secondRow},R.createElement("div",{className:pt.postReplyComment__secondRow__leftPane},R.createElement(S.Caption,{className:pt.postReplyComment__secondRow__timestamp},R.createElement(M1,{pageId:e,componentId:r,timestamp:o.createdAt}),o.createdAt!==o.editedAt&&" (edited)"),R.createElement("div",{onClick:w},R.createElement(S.CaptionBold,{className:pt.postReplyComment__secondRow__like,"data-is-liked":h},h?"Liked":"Like")),R.createElement(Sa,{className:pt.postReplyComment__secondRow__actionButton,onClick:()=>g(!0)})),o.reactionsCount>0&&R.createElement("div",{className:pt.postReplyComment__secondRow__rightPane},R.createElement(S.Caption,null,ib(o.reactionsCount)),R.createElement(z3,{className:pt.postReplyComment__secondRow__rightPane__like}))))),R.createElement(Sr,{onClose:x,isOpen:u,mountPoint:document.getElementById("asc-uikit-post-comment"),detent:"content-height"},R.createElement(J3,{comment:o,onCloseBottomSheet:x,handleEditComment:M,handleDeleteComment:I})))},yE=Gae;var X3={postReplyCommentList__viewReply_button:"di",postReplyCommentList__viewReply_icon:"mi",postReplyCommentList__viewReply_text:"pi"};var hE=({referenceId:e,referenceType:t,community:o,parentId:r})=>{let{comments:n,hasMore:i,isLoading:a,loadMore:s}=j8({referenceId:e,referenceType:t,parentId:r,limit:10,shouldCall:!0,includeDeleted:!0}),l=()=>{s();};return R.createElement("div",null,a&&R.createElement(K3,{numberOfSkeletons:3}),n.map(d=>R.createElement(yE,{community:o,comment:d})),i&&R.createElement("div",{className:X3.postReplyCommentList__viewReply_button,onClick:l},R.createElement(W3,{className:X3.postReplyCommentList__viewReply_icon}),R.createElement(S.CaptionBold,{className:X3.postReplyCommentList__viewReply_text},"View more replies")))};var Kae=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"16",height:"4",viewBox:"0 0 16 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M9.6875 2.25C9.6875 3.19922 8.91406 3.9375 8 3.9375C7.05078 3.9375 6.3125 3.19922 6.3125 2.25C6.3125 1.33594 7.05078 0.5625 8 0.5625C8.91406 0.5625 9.6875 1.33594 9.6875 2.25ZM13.9062 0.5625C14.8203 0.5625 15.5938 1.33594 15.5938 2.25C15.5938 3.19922 14.8203 3.9375 13.9062 3.9375C12.957 3.9375 12.2188 3.19922 12.2188 2.25C12.2188 1.33594 12.957 0.5625 13.9062 0.5625ZM2.09375 0.5625C3.00781 0.5625 3.78125 1.33594 3.78125 2.25C3.78125 3.19922 3.00781 3.9375 2.09375 3.9375C1.14453 3.9375 0.40625 3.19922 0.40625 2.25C0.40625 1.33594 1.14453 0.5625 2.09375 0.5625Z"}))},Jae=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),R.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#63A1FF"}),R.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},bE=({pageId:e="*",componentId:t="comment_bubble",comment:o,community:r,onClickReply:n,shouldAllowInteraction:i=!0})=>{var q;let {accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=te({pageId:e,componentId:t}),{confirm:g}=Re(),[f,y]=useState(!1),[v,C]=useState(!1),[h,x]=useState(!1),[b,M]=useState(),I=useRef(null);useState(!1);let T=()=>y(z=>!z),L=(o.myReactions||[]).some(z=>z==="like"),D=o.childrenNumber;if(d)return null;let U=()=>_(void 0,null,function*(){return o.commentId&&CommentRepository.deleteComment(o.commentId)}),Z=()=>{x(!0);},B=()=>{g({pageId:e,componentId:t,title:"Delete comment",content:"This comment will be permanently removed.",cancelText:"Cancel",okText:"Delete",onOk:U});},$=()=>_(void 0,null,function*(){o&&(L?yield ReactionRepository.removeReaction("comment",o==null?void 0:o.commentId,On):yield ReactionRepository.addReaction("comment",o==null?void 0:o.commentId,On));}),G=useCallback(()=>_(void 0,null,function*(){!b||!o.commentId||(yield CommentRepository.updateComment(o.commentId,{data:b.data,mentionees:b.mentionees,metadata:b.metadata}),x(!1));}),[b]);return Nc({commentId:o.commentId}),R.createElement("div",{style:u,"data-qa-anchor":a},o.isDeleted?R.createElement("div",{className:Xe.postComment__deleteComment_container},R.createElement(Ic,{className:Xe.postComment__deleteComment_icon}),R.createElement(S.Body,{className:Xe.postComment__deleteComment_text},"This comment has been deleted")):h?R.createElement("div",{className:Xe.postComment__edit},R.createElement(jo,{userId:o.userId}),R.createElement("div",{className:Xe.postComment__edit__inputWrap,ref:I},R.createElement("div",{className:Xe.postComment__edit__input},R.createElement(Xn,{placeholder:"Say something nice...",communityId:r==null?void 0:r.communityId,value:{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata||{}},onChange:z=>{M({data:{text:z.text},mentionees:z.mentionees,metadata:{mentioned:z.mentioned}});},maxLines:5,mentionContainer:I==null?void 0:I.current})),R.createElement("div",{className:Xe.postComment__edit__buttonWrap},R.createElement(ms,{componentId:"edit_comment_component",className:cr(Xe.postComment__edit__button,Xe.postComment__edit__cancelButton),onPress:()=>{x(!1);}}),R.createElement(I1,{className:cr(Xe.postComment__edit__button,Xe.postComment__edit__saveButton),componentId:"edit_comment_component",onPress:G})))):R.createElement("div",{className:Xe.postComment},R.createElement(jo,{userId:o.userId}),R.createElement("div",{className:Xe.postComment__details},R.createElement("div",{className:Xe.postComment__content},R.createElement(S.BodyBold,{className:Xe.postComment__content__username},(q=o.creator)==null?void 0:q.displayName),R.createElement(w1,{pageId:e,componentId:t}),R.createElement(Sm,{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata})),R.createElement("div",{className:Xe.postComment__secondRow},i&&R.createElement("div",{className:Xe.postComment__secondRow__leftPane},R.createElement(S.Caption,{className:Xe.postComment__secondRow__timestamp},R.createElement(M1,{pageId:e,componentId:t,timestamp:o.createdAt}),o.createdAt!==o.editedAt&&" (edited)"),R.createElement("div",{onClick:$},R.createElement(S.CaptionBold,{className:Xe.postComment__secondRow__like,"data-is-liked":L},L?"Liked":"Like")),R.createElement("div",{onClick:()=>n(o)},R.createElement(S.CaptionBold,{className:Xe.postComment__secondRow__reply},"Reply")),R.createElement(Kae,{className:Xe.postComment__secondRow__actionButton,onClick:()=>y(!0)})),o.reactionsCount>0&&R.createElement("div",{className:Xe.postComment__secondRow__rightPane},R.createElement(S.Caption,null,ib(o.reactionsCount)),R.createElement(Jae,{className:Xe.postComment__secondRow__rightPane__like}))),D>0&&!v&&R.createElement("div",{className:Xe.postComment__viewReply_button,onClick:()=>C(!0)},R.createElement(W3,{className:Xe.postComment__viewReply_icon}),R.createElement(S.CaptionBold,{className:Xe.postComment__viewReply_text},"View ",D," ",D>1?"replies":"reply")),v&&R.createElement(hE,{community:r,referenceId:o.referenceId,referenceType:o.referenceType,parentId:o.commentId}))),R.createElement(Sr,{onClose:T,isOpen:f,mountPoint:document.getElementById("asc-uikit-post-comment"),detent:"content-height"},R.createElement(J3,{comment:o,handleEditComment:Z,handleDeleteComment:B,onCloseBottomSheet:T})))};var Ut={commentAd:"gi",commentAd__container:"hi",commentAd__details:"fi",commentAd__avatar:"bi",commentAd__content:"ui",commentAd__content__advertiserName__container:"vi",commentAd__content__advertiserName:"xi",commentAd__content__text:"wi",commentAd__adCard:"yi",commentAd__adCard__imageContainer:"ki",commentAd__adCard__image:"ji",commentAd__adCard__detail:"zi",commentAd__adCard__textContainer:"Xi",commentAd__adCard__description:"Yi",commentAd__adCard__headline:"Ci",commentAd__adCard__button:"Ai",commentAd__adCard__button__text:"Mi",infoIcon__button:"Si",infoIcon:"Ei"};var Yae=o=>{var r=o,{color:e="white"}=r,t=P(r,["color"]);return R.createElement("svg",c({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),R.createElement("path",{d:"M5.54688 1.78125C5.73438 1.40625 6.26562 1.42188 6.4375 1.78125L7.46875 3.85938L9.75 4.1875C10.1562 4.25 10.3125 4.75 10.0156 5.04688L8.375 6.65625L8.76562 8.92188C8.82812 9.32812 8.39062 9.64062 8.03125 9.45312L6 8.375L3.95312 9.45312C3.59375 9.64062 3.15625 9.32812 3.21875 8.92188L3.60938 6.65625L1.96875 5.04688C1.67188 4.75 1.82812 4.25 2.23438 4.1875L4.53125 3.85938L5.54688 1.78125Z",fill:e}))},wE=Yae;var Bc={badge:"me",badge__icon:"Fi",badge__text:"Ii",badge__child:"Ri"};var Bm=()=>R.createElement("div",{className:Bc.badge},R.createElement("div",{className:Bc.badge__child},R.createElement(wE,{className:Bc.badge__icon}),R.createElement("div",{className:Bc.badge__text},"Sponsored")));var ese=e=>R.createElement("svg",c({width:"100%",height:"100%",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("rect",{width:"64",height:"64",rx:"32",fill:"#D9E5FC"}),R.createElement("path",{d:"M20 28.5358C20.5156 28.5358 20.9375 28.8639 21.2188 29.2858L41 23.2858V41.2858L34.8125 39.4576C34.2969 41.3795 32.5625 42.7858 30.5 42.7858C28.0156 42.7858 26 40.7701 26 38.2858C26 37.817 26.0938 37.3014 26.2344 36.8795L21.2188 35.3326C20.9375 35.7545 20.5156 36.0358 20 36.0358C19.1562 36.0358 18.5 35.3795 18.5 34.5358V30.0358C18.5 29.2389 19.1562 28.5358 20 28.5358ZM28.3906 37.4889C28.2969 37.7701 28.25 38.0045 28.25 38.2858C28.25 39.5514 29.2344 40.5358 30.5 40.5358C31.5312 40.5358 32.4219 39.7858 32.6562 38.8014L28.3906 37.4889ZM44.75 21.7858C45.125 21.7858 45.5 22.1608 45.5 22.5358V42.0358C45.5 42.4576 45.125 42.7858 44.75 42.7858H43.25C42.8281 42.7858 42.5 42.4576 42.5 42.0358V22.5358C42.5 22.1608 42.8281 21.7858 43.25 21.7858H44.75Z",fill:"white"})),Lm=ese;var tse=e=>R.createElement("svg",c({width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M8 2.25006C4.25 2.25006 1.25 5.28131 1.25 9.00006C1.25 12.7501 4.25 15.7501 8 15.7501C11.7188 15.7501 14.75 12.7501 14.75 9.00006C14.75 5.28131 11.6875 2.25006 8 2.25006ZM8 1.25006C12.25 1.25006 15.75 4.75006 15.75 9.00006C15.75 13.2813 12.25 16.7501 8 16.7501C3.71875 16.7501 0.25 13.2813 0.25 9.00006C0.25 4.75006 3.71875 1.25006 8 1.25006ZM6.875 12.0001H7.25V8.25006H6.875C6.65625 8.25006 6.5 8.09381 6.5 7.87506V7.62506C6.5 7.43756 6.65625 7.25006 6.875 7.25006H8.375C8.5625 7.25006 8.75 7.43756 8.75 7.62506V12.0001H9.125C9.3125 12.0001 9.5 12.1876 9.5 12.3751V12.6251C9.5 12.8438 9.3125 13.0001 9.125 13.0001H6.875C6.65625 13.0001 6.5 12.8438 6.5 12.6251V12.3751C6.5 12.1876 6.65625 12.0001 6.875 12.0001ZM8 4.50006C8.53125 4.50006 9 4.96881 9 5.50006C9 6.06256 8.53125 6.50006 8 6.50006C7.4375 6.50006 7 6.06256 7 5.50006C7 4.96881 7.4375 4.50006 8 4.50006Z",fill:"#A5A9B5"})),pn=tse;var yo={drawer__content:"pe",drawer__innerContent:"Ui",drawer__placeholder:"Bi",drawer__overlay:"Di",drawer__title:"Hi",drawer__content__data:"Li",drawer__content__data__title:"Ti",drawer__content__data__text:"Vi",drawer__content__data__caption:"qi",drawer__content__data__infoIcon:"Gi",drawer__content__emptySpace:"Ji"};var R3=({isOpen:e,onOpenChange:t,ad:o})=>{var r;return R.createElement(Drawer.Root,{open:e,onOpenChange:t,onDrag:n=>n.stopPropagation()},R.createElement(Drawer.Portal,null,R.createElement(Drawer.Overlay,{className:yo.drawer__overlay}),R.createElement(Drawer.Content,{className:yo.drawer__content,onTouchStart:n=>n.stopPropagation(),onTouchMove:n=>n.stopPropagation(),onTouchEnd:n=>n.stopPropagation()},R.createElement("div",{className:yo.drawer__innerContent},R.createElement("div",{className:yo.drawer__placeholder}),R.createElement(Drawer.Title,{className:yo.drawer__title},R.createElement(S.Title,null,"About this advertisement")),R.createElement("div",{className:yo.drawer__content__data},R.createElement(S.BodyBold,{className:yo.drawer__content__data__title},"Why this advertisement?"),R.createElement("div",{className:yo.drawer__content__data__text},R.createElement(pn,{className:yo.drawer__content__data__infoIcon}),R.createElement(S.Caption,{className:yo.drawer__content__data__caption},"You're seeing this advertisement because it was displayed to all users in the system."))),R.createElement("div",{className:yo.drawer__content__data},R.createElement(S.BodyBold,{className:yo.drawer__content__data__title},"About this advertiser"),R.createElement("div",{className:yo.drawer__content__data__text},R.createElement(pn,{className:yo.drawer__content__data__infoIcon}),R.createElement(S.Caption,{className:yo.drawer__content__data__caption},"Advertiser name: ",(r=o.advertiser)==null?void 0:r.companyName))),R.createElement("div",{className:yo.drawer__content__emptySpace})))))};var PE=({ad:e,themeStyles:t,avatarUrl:o,adImageUrl:r,onCallToActionClick:n})=>{var l;let[i,a]=useState(!1),s=()=>{n==null||n(e.callToActionUrl);};return R.createElement("div",{className:Ut.commentAd,style:t},R.createElement(O,{className:Ut.infoIcon__button,onPress:()=>a(!0)},R.createElement(pn,{className:Ut.infoIcon})),R.createElement("div",{className:Ut.commentAd__container},R.createElement("div",{className:Ut.commentAd__avatar},R.createElement(xt,{avatarUrl:o,defaultImage:R.createElement(Lm,null)})),R.createElement("div",{className:Ut.commentAd__details},R.createElement("div",{className:Ut.commentAd__content},R.createElement(S.BodyBold,{className:Ut.commentAd__content__advertiserName__container},R.createElement("div",{className:Ut.commentAd__content__advertiserName},(l=e.advertiser)==null?void 0:l.name)),R.createElement(Bm,null),R.createElement("div",null,R.createElement(S.Body,{className:Ut.commentAd__content__text},e.body)),R.createElement("div",{className:Ut.commentAd__adCard,onClick:s},R.createElement("div",{className:Ut.commentAd__adCard__imageContainer},R.createElement("img",{className:Ut.commentAd__adCard__image,src:r})),R.createElement("div",{className:Ut.commentAd__adCard__detail},R.createElement("div",{className:Ut.commentAd__adCard__textContainer},R.createElement(S.Caption,{renderer:({typoClassName:d})=>R.createElement("div",{className:cr(d,Ut.commentAd__adCard__description)},e.description)}),R.createElement(S.BodyBold,{className:Ut.commentAd__adCard__headline},e.headline)),e.callToActionUrl?R.createElement(O,{className:Ut.commentAd__adCard__button,onPress:s},R.createElement(S.CaptionBold,{className:Ut.commentAd__adCard__button__text},e.callToAction)):null))))),R.createElement(R3,{ad:e,isOpen:i,onOpenChange:d=>a(d)}))};var _E=({pageId:e="*",ad:t})=>{var d,p,u,g,f,y;let o="comment_tray_component",{themeStyles:r}=te({pageId:e,componentId:o}),i=nt({fileId:(p=(d=t.advertiser)==null?void 0:d.avatar)==null?void 0:p.fileId})||((g=(u=t.advertiser)==null?void 0:u.avatar)==null?void 0:g.fileUrl)||"",s=nt({fileId:(f=t.image1_1)==null?void 0:f.fileId})||((y=t.image1_1)==null?void 0:y.fileUrl)||"";return R.createElement(PE,{themeStyles:r,avatarUrl:i,adImageUrl:s,ad:t,onCallToActionClick:v=>{window==null||window.open(v,"_blank");}})};var e5={commentList__container:"Ki",commentList__viewAllComments__button:"Ni",commentList__container_intersection:"Oi",noCommentsContainer:"Pi"};function Ac({postId:e,level:t,shouldSubscribe:o=!0,callback:r}){return ta({fetcher:PostRepository.getPost,params:e,callback:r,shouldSubscribe:!!e&&o,getSubscribedTopic:({data:n})=>getPostTopic(n,t)})}var use=e=>"adId"in e,Dc=({referenceId:e,referenceType:t,pageId:o="*",onClickReply:r,limit:n=5,includeDeleted:i=!1,community:a,shouldAllowInteraction:s=!0})=>{let l="comment_tray_component",{themeStyles:d,accessibilityId:p}=te({componentId:l,pageId:o}),u=useRef(null),[g,f]=useState(null),{items:y,loadMore:v,hasMore:C,isLoading:h}=uc({fetcher:CommentRepository.getComments,params:{referenceId:e,referenceType:t,limit:n,includeDeleted:i},placement:"comment",pageSize:5,getItemId:x=>x.commentId,shouldCall:!0});return So({node:g,options:{threshold:.8},onIntersect:()=>{C&&h===!1&&v();}}),Ac({postId:e,level:SubscriptionLevels.COMMENT,shouldSubscribe:t==="post"}),Xa({targetId:e,targetType:t,shouldSubscribe:t==="story"&&!!e}),!h&&y.length===0?R.createElement("div",{className:e5.noCommentsContainer},R.createElement(S.Body,null,"No comments yet")):R.createElement("div",{className:e5.commentList__container,style:d,ref:u,"data-qa-anchor":p},y.map(x=>use(x)?R.createElement(_E,{key:x.adId,ad:x}):R.createElement(bE,{key:x.commentId,comment:x,onClickReply:b=>r==null?void 0:r(b),componentId:l,community:a,shouldAllowInteraction:s})),h&&R.createElement(K3,{pageId:o,componentId:l,numberOfSkeletons:3}),R.createElement("div",{ref:x=>f(x),className:e5.commentList__container_intersection}))};var q8={container:"Qi",header:"Wi",roundedHeader:"Zi",content:"_i",scroller:"el",composeBarContainer:"rl",nestedBackdrop:"al",commentTrayContainer:"ol",commentListContainer:"tl",mobileSheetComposeBarContainer:"il"};var Am=({pageId:e="*",referenceType:t,referenceId:o,community:r={},shouldAllowInteraction:n=!0,shouldAllowCreation:i=!0})=>{let a="comment_tray_component",{accessibilityId:s,themeStyles:l}=te({pageId:e,componentId:a}),[d,p]=useState(null),u=f=>{p(f);},g=()=>{p(null);};return R.createElement("div",{style:l,"data-qa-anchor":s,className:q8.commentTrayContainer},R.createElement("div",{className:q8.commentListContainer},R.createElement(Dc,{pageId:e,referenceId:o,referenceType:t,community:r,includeDeleted:!0,onClickReply:u,shouldAllowInteraction:n})),R.createElement(kc,{referenceId:o,referenceType:t,onCancelReply:g,replyTo:d,shouldAllowCreation:i}))};var K8={doneButton:"ll",doneButton_text:"sl"};function J8(n){var i=n,{pageId:e="*",componentId:t="*",className:o}=i,r=P(i,["pageId","componentId","className"]);let a="done_button",{accessibilityId:s,config:l,isExcluded:d}=A({pageId:e,componentId:t,elementId:a});return d?null:R.createElement(O,c({className:`${K8.doneButton} ${o||""}`,"data-qa-anchor":s},r),R.createElement(S.Body,{className:K8.doneButton_text},l.done_button_text))}var ut={hyperlinkFormContainer:"cl",form:"nl",bottomSheet:"a","react-modal-sheet-backdrop":"dl","react-modal-sheet-container":"ml","react-modal-sheet-content":"pl","react-modal-sheet-header":"gl","react-modal-sheet-drag-indicator":"hl",inputContainer:"fl",input:"ge",hasError:"bl",label:"j",required:"ul",description:"vl",errorText:"xl",characterCount:"wl",headerContainer:"yl",labelContainer:"kl",headerTitle:"jl",cancelButton:"zl",doneButton:"he",removeIcon:"Xl",removeLinkButton:"Yl",divider:"Cl",removeLinkContainer:"Al"};var kE=30,Y8=({pageId:e="*",isOpen:t,isHaveHyperLink:o,onClose:r,onSubmit:n,onRemove:i})=>{var $,G,q;let a="hyper_link_config_component",{confirm:s}=Re(),{accessibilityId:l,config:d,isExcluded:p,themeStyles:u}=te({pageId:e,componentId:a});if(p)return null;let{formatMessage:g}=useIntl(),{client:f}=Ae(),[y,v]=useState(!1),C="asc-story-hyperlink-form",h=z.object({url:z.string().refine(z=>{if(!z)return !0;try{let H=new URL(z);return ["http:","https:"].includes(H.protocol)}catch(H){if(z.startsWith("www."))try{let F=new URL(`https://${z}`);return ["http:","https:"].includes(F.protocol)}catch(F){return !1}return !1}},{message:g({id:"storyCreation.hyperlink.validation.error.invalidUrl"})}).refine(z=>_(void 0,null,function*(){if(!z)return !0;let H=z.startsWith("www.")?`https://${z}`:z;return yield f==null?void 0:f.validateUrls([H]).catch(()=>!1)}),{message:g({id:"storyCreation.hyperlink.validation.error.whitelisted"})}),customText:z.string().optional().refine(z=>_(void 0,null,function*(){return z?yield f==null?void 0:f.validateTexts([z]).catch(()=>!1):!0}),g({id:"storyCreation.hyperlink.validation.error.blocked"}))}),{trigger:x,watch:b,register:M,handleSubmit:I,formState:{errors:w},reset:N}=useForm({resolver:zodResolver(h)}),{url:T,customText:L}=b();useEffect(()=>{v(T!==""||L!=="");},[T,L]);let D=z=>{n(z),r();},U=()=>{N(),i(),r();},Z=()=>{s({title:g({id:"storyCreation.hyperlink.removeConfirm.title"}),content:g({id:"storyCreation.hyperlink.removeConfirm.content"}),cancelText:g({id:"storyCreation.hyperlink.removeConfirm.cancel"}),okText:g({id:"storyCreation.hyperlink.removeConfirm.confirm"}),onOk:U});},B=()=>{y?s({title:g({id:"storyCreation.hyperlink.unsavedChanges.title"}),content:g({id:"storyCreation.hyperlink.unsavedChanges.content"}),cancelText:g({id:"storyCreation.hyperlink.unsavedChanges.cancel"}),okText:g({id:"storyCreation.hyperlink.unsavedChanges.confirm"}),onOk:()=>{N(),r();}}):r();};return R.createElement(Sr,{"data-qa-anchor":l,detent:"full-height",mountPoint:document.getElementById("asc-uikit-create-story"),rootId:"asc-uikit-create-story",isOpen:t,onClose:B,className:ut.bottomSheet,style:u},R.createElement("div",{className:ut.headerContainer},R.createElement(ms,{pageId:e,componentId:a,onPress:B}),R.createElement(S.Title,null,g({id:"storyCreation.hyperlink.bottomSheet.title"})),R.createElement(J8,{type:"submit",pageId:e,componentId:a,form:C})),R.createElement("div",{className:ut.divider}),R.createElement("div",{className:ut.hyperlinkFormContainer},R.createElement("form",{onSubmit:I(D),id:C,className:ut.form},R.createElement("div",{className:ut.inputContainer},R.createElement(S.Title,null,R.createElement("label",{htmlFor:"asc-uikit-hyperlink-input-url",className:cr(ut.label,ut.required)},g({id:"storyCreation.hyperlink.form.urlLabel"}))),R.createElement("input",c({id:"asc-uikit-hyperlink-input-url",placeholder:g({id:"storyCreation.hyperlink.form.urlPlaceholder"}),className:cr(ut.input,(w==null?void 0:w.url)&&ut.hasError)},M("url",{onChange:()=>x("url")}))),(w==null?void 0:w.url)&&R.createElement("span",{className:ut.errorText},($=w==null?void 0:w.url)==null?void 0:$.message)),R.createElement("div",{className:ut.inputContainer},R.createElement("div",{className:ut.labelContainer},R.createElement(S.Title,null,R.createElement("label",{htmlFor:"asc-uikit-hyperlink-input-link-text",className:ut.label},g({id:"storyCreation.hyperlink.form.linkTextLabel"}))),R.createElement("div",{className:ut.characterCount},((G=b("customText"))==null?void 0:G.length)||0," / ",kE)),R.createElement("input",E(c({id:"asc-uikit-hyperlink-input-link-text",placeholder:g({id:"storyCreation.hyperlink.form.linkTextPlaceholder"}),className:cr(ut.input,(w==null?void 0:w.customText)&&ut.hasError)},M("customText")),{maxLength:kE})),(w==null?void 0:w.customText)&&R.createElement("span",{className:ut.errorText},(q=w==null?void 0:w.customText)==null?void 0:q.message),R.createElement(S.Caption,null,R.createElement("label",{className:ut.description},g({id:"storyCreation.hyperlink.form.linkTextDescription"}))))),o&&R.createElement("div",{className:ut.removeLinkContainer},R.createElement(B3,{variant:"secondary",onClick:Z,className:cr(ut.removeLinkButton)},R.createElement(u1,{className:ut.removeIcon}),g({id:"storyCreation.hyperlink.form.removeButton"})))))};var Pse=createContext([]),Ci=()=>({config:useContext(Pse)});var Dm=e=>e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e;var r5=({reactionConfigItem:e,className:t})=>R.createElement("img",{"data-qa-anchor":"reaction_image_view",key:e.name,src:e.image,alt:e.name,className:t});var Tse=o=>{var r=o,{backgroundColor:e}=r,t=P(r,["backgroundColor"]);return R.createElement("svg",c({width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),R.createElement("path",{d:"M19.6035 10.5C19.6035 15.7467 15.3502 20 10.1035 20C4.85681 20 0.603516 15.7467 0.603516 10.5C0.603516 5.25329 4.85681 1 10.1035 1C15.3502 1 19.6035 5.25329 19.6035 10.5Z",stroke:"currentColor",fill:e}),R.createElement("path",{d:"M10.2723 6.71429C11.6786 6.71429 13.202 7.83595 13.202 9.29242C13.202 11.2344 11.1094 11.2679 11.1094 11.9877V12.0714C11.1094 12.3058 10.9252 12.4732 10.7076 12.4732H9.48549C9.26786 12.4732 9.08371 12.3058 9.08371 12.0714V11.9208C9.08371 10.8828 9.87054 10.4643 10.4732 10.1295C10.9754 9.84487 11.2935 9.66072 11.2935 9.27568C11.2935 8.77345 10.6574 8.45537 10.1384 8.45537C9.48549 8.45537 9.16741 8.75671 8.74888 9.27568C8.61496 9.44309 8.36384 9.47657 8.19643 9.34264L7.47656 8.79019C7.29241 8.673 7.25893 8.42188 7.37612 8.25447C8.0625 7.26675 8.93304 6.71429 10.2723 6.71429ZM10.1049 12.9755C10.7411 12.9755 11.26 13.4944 11.26 14.1306C11.26 14.7667 10.7411 15.2857 10.1049 15.2857C9.45201 15.2857 8.93304 14.7667 8.93304 14.1306C8.93304 13.4944 9.45201 12.9755 10.1049 12.9755Z",fill:"currentColor"}))},Hm=Tse;var ke={reactionListContainer:"Ml",tabListContainer:"fe",tabList:"Sl",tabItem:"be",reactionEmoji:"El",userList:"Fl",userItem:"Il",userDetailsContainer:"Rl",userDetailsProfile:"Ul",userDetailsReaction:"Bl",reactionItem:"Dl",reactionIcon:"Hl",reactionCustomStateContainer:"ue",loadingState:"Ll","skeleton-pulse":"ve",reactionState:"Tl",reactionState2Line:"Vl",removeBtn:"ql",infiniteScrollContainer:"Gl",reactionPanel:"Jl",avatar:"Kl"};var SE=({filteredReactions:e,removeReaction:t,hasMore:o,loadMore:r,isLoading:n,currentRef:i})=>{let{currentUserId:a}=Ae(),{config:s}=Ci(),l=useMemo(()=>s.map(({name:d})=>d),[s]);return !i||!e?null:R.createElement("div",{className:ke.infiniteScrollContainer},R.createElement(WY,{scrollableTarget:i,scrollThreshold:.7,hasMore:o,next:r,loader:n?R.createElement("span",{key:0},"Loading..."):null,dataLength:e.length||0,style:{display:"flex",width:"100%"},height:i.clientHeight},R.createElement("div",{className:ke.userList},e.map(d=>{var p,u,g,f;return R.createElement(Fragment,{key:d.reactionId},R.createElement("div",{className:ke.userItem},R.createElement("div",{className:ke.userDetailsContainer},R.createElement("div",{className:ke.userDetailsProfile},R.createElement("div",{className:ke.avatar},R.createElement(xt,{"data-qa-anchor":"user_avatar_view",avatarUrl:(u=(p=d.user)==null?void 0:p.avatar)==null?void 0:u.fileUrl,defaultImage:R.createElement(cs,null)})),R.createElement(S.BodyBold,{"data-qa-anchor":"user_display_name"},(g=d.user)==null?void 0:g.displayName,a===((f=d.user)==null?void 0:f.userId)&&R.createElement(R.Fragment,null,R.createElement("br",null),R.createElement("div",{onClick:()=>t(d.reactionName)},R.createElement(S.Caption,{className:ke.removeBtn},"Click to remove reaction"))))),R.createElement("div",{className:ke.userDetailsReaction},l.includes(d.reactionName)?R.createElement(r5,{reactionConfigItem:s.find(({name:y})=>y===d.reactionName),className:ke.reactionIcon}):R.createElement(Hm,{className:ke.reactionIcon})))))}))))};var Bse=e=>R.createElement("svg",c({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M18.8672 1.63086C19.1797 1.31836 19.6875 1.55273 19.6875 1.94336V7.5293C19.6875 7.80273 19.4531 7.99805 19.2188 7.99805H13.5938C13.2031 7.99805 12.9688 7.5293 13.2812 7.2168L15.3906 5.10742C14.0234 3.70117 12.1094 2.8418 10 2.8418C5.74219 2.8418 2.34375 6.2793 2.34375 10.498C2.34375 14.7559 5.74219 18.1543 10 18.1543C11.9531 18.1543 13.7109 17.4512 15.0781 16.2402C15.2734 16.084 15.5469 16.084 15.7031 16.2402L16.4844 17.0215C16.6797 17.2168 16.6797 17.5293 16.4844 17.7246C14.7656 19.248 12.4609 20.1855 10 20.1855C4.64844 20.1855 0.3125 15.8887 0.3125 10.5371C0.273438 5.18555 4.64844 0.810547 10 0.810547C12.6562 0.810547 15.0781 1.9043 16.8359 3.66211L18.8672 1.63086Z",fill:"#6E7487"})),n5=Bse;var EE=()=>R.createElement("div",{className:ke.reactionCustomStateContainer,"data-qa-anchor":"reaction_list"},R.createElement("div",{className:ke.reactionState},R.createElement(n5,null),R.createElement(S.Body,null,R.createElement(FormattedMessage,{id:"livechat.reaction.errorOnload"}))));var Ase=e=>R.createElement("svg",c({width:"33",height:"33",viewBox:"0 0 33 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M11.25 9.28613C16.5938 9.28613 21 13.6924 21 19.0361C21 24.4268 16.5938 28.7861 11.25 28.7861C5.85938 28.7861 1.5 24.4268 1.5 19.0361C1.5 13.6924 5.85938 9.28613 11.25 9.28613ZM11.25 26.5361C15.375 26.5361 18.75 23.208 18.75 19.0361C18.75 14.9111 15.375 11.5361 11.25 11.5361C7.07812 11.5361 3.75 14.9111 3.75 19.0361C3.75 23.208 7.07812 26.5361 11.25 26.5361ZM14.1094 20.7236C14.5312 20.2549 15.2344 20.208 15.7031 20.6299C16.1719 21.0049 16.2188 21.708 15.8438 22.1768C14.6719 23.5361 13.0312 24.2861 11.25 24.2861C9.46875 24.2861 7.78125 23.5361 6.60938 22.1768C6.23438 21.708 6.28125 21.0049 6.75 20.6299C7.21875 20.208 7.92188 20.2549 8.34375 20.7236C9.75 22.4111 12.7031 22.4111 14.1094 20.7236ZM8.25 18.2861C7.40625 18.2861 6.75 17.6299 6.75 16.7861C6.75 15.9893 7.40625 15.2861 8.25 15.2861C9.04688 15.2861 9.75 15.9893 9.75 16.7861C9.75 17.6299 9.04688 18.2861 8.25 18.2861ZM14.25 18.2861C13.4062 18.2861 12.75 17.6299 12.75 16.7861C12.75 15.9893 13.4062 15.2861 14.25 15.2861C15.0469 15.2861 15.75 15.9893 15.75 16.7861C15.75 17.6299 15.0469 18.2861 14.25 18.2861ZM30.75 8.91113C31.125 8.91113 31.5 9.28613 31.5 9.66113V10.4111C31.5 10.833 31.125 11.1611 30.75 11.1611H27.375V14.5361C27.375 14.958 27 15.2861 26.625 15.2861H25.875C25.4531 15.2861 25.125 14.958 25.125 14.5361V11.1611H21.75C21.3281 11.1611 21 10.833 21 10.4111V9.66113C21 9.28613 21.3281 8.91113 21.75 8.91113H25.125V5.53613C25.125 5.16113 25.4531 4.78613 25.875 4.78613H26.625C27 4.78613 27.375 5.16113 27.375 5.53613V8.91113H30.75Z",fill:"#A5A9B5"})),LE=Ase;var DE=()=>R.createElement("div",{className:ke.reactionCustomStateContainer,"data-qa-anchor":"reaction_list"},R.createElement("div",{className:ke.reactionState},R.createElement(LE,null),R.createElement("div",{className:ke.reactionState2Line},R.createElement(S.Body,null,R.createElement(FormattedMessage,{id:"livechat.reaction.emptyState"})),R.createElement(S.Caption,null,R.createElement(FormattedMessage,{id:"livechat.reaction.emptyState.description"})))));var Dse=e=>R.createElement("svg",c({width:"375",height:"56",viewBox:"0 0 375 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("rect",{x:"16",y:"8",width:"40",height:"40",rx:"20",fill:"#292B32"}),R.createElement("rect",{x:"64",y:"24",width:"140",height:"8",rx:"4",fill:"#292B32"})),HE=Dse;var tg=()=>R.createElement("div",{className:cr(ke.reactionCustomStateContainer,ke.loadingState),"data-qa-anchor":"reaction_list"},Array.from({length:8}).map((e,t)=>R.createElement(HE,{key:`loading_${t}`})));var Fse=(e,t)=>({addReaction:n=>_(void 0,null,function*(){yield ReactionRepository.addReaction(e,t,n);}),removeReaction:n=>_(void 0,null,function*(){yield ReactionRepository.removeReaction(e,t,n);})}),zE=Fse;var jse=(e,t)=>{let[o,r]=useState(0),[n,i]=useState({}),[a,s]=useState(null),l=({data:d,loading:p,error:u})=>{p||u||(r(d.reactionsCount),i(d.reactions),s(d.myReaction));};return useEffect(()=>{if(e==="message")MessageRepository.getMessage(t,l);else if(e==="story")StoryRepository.getStoryByStoryId(t,l);else if(e==="comment")CommentRepository.getComment(t,l);else if(e==="post")PostRepository.getPost(t,l);else throw new Error("Unsupported reference type")},[t,e]),{reactions:n,reactionCount:o,myReaction:a}},UE=jse;var a5="unknown",Qse=(e,t,o)=>t==="All"?e:t===a5?e.filter(r=>!o.includes(r.reactionName)):e.filter(r=>r.reactionName===t.toLowerCase()),Wse=({filteredReactions:e,hasMore:t,loadMore:o,isLoading:r,removeReaction:n,error:i,currentRef:a})=>r?R.createElement(tg,null):i?R.createElement(EE,null):e.length===0?r?R.createElement(tg,null):R.createElement(DE,null):R.createElement(SE,{currentRef:a,hasMore:t,loadMore:o,isLoading:r,filteredReactions:e,removeReaction:n}),Fm=({pageId:e="*",referenceId:t,referenceType:o})=>{let r="reaction_list",{accessibilityId:n}=te({pageId:e,componentId:r}),{reactions:i,error:a,isLoading:s,hasMore:l,loadMore:d}=UT({referenceId:t,referenceType:o,limit:25}),{reactions:p,reactionCount:u}=UE(o,t),[g,f]=useState("All"),y=useRef(null),{config:v}=Ci(),{removeReaction:C}=zE(o,t),h=w=>{f(w);};if(i==null||!v)return null;let x=useMemo(()=>v.map(w=>w.name),[v]),b=useMemo(()=>Object.keys(p).filter(w=>!x.includes(w)),[p]),M=useMemo(()=>b.reduce((w,N)=>w+p[N],0),[p]),I=useMemo(()=>Qse(i,g,x),[i,g]);return R.createElement("div",{className:ke.reactionListContainer,"data-qa-anchor":`${n}_header`},R.createElement("div",{className:ke.tabListContainer},R.createElement("div",{className:ke.tabList,"data-qa-anchor":`${n}_tab`},R.createElement("div",{"data-active":g==="All",className:ke.tabItem,onClick:()=>h("All")},R.createElement(S.Body,null,R.createElement("span",{className:ke.reactionEmoji},"All ",Dm(u)))),v.map(w=>{let{name:N,image:T}=w;return p[N]?R.createElement("div",{key:N,"data-active":g===N,className:ke.tabItem,onClick:()=>h(N)},R.createElement(S.Body,null,R.createElement("span",{className:ke.reactionEmoji},R.createElement(r5,{className:ke.reactionItem,reactionConfigItem:w}),Dm(p[N])))):null}),b.length>0&&R.createElement("div",{key:a5,"data-active":g===a5,className:ke.tabItem,onClick:()=>h(a5)},R.createElement(S.Body,null,R.createElement("span",{className:ke.reactionEmoji},R.createElement(Hm,{className:ke.reactionIcon}),Dm(M)))))),R.createElement("div",{ref:y,className:ke.reactionPanel},R.createElement(Wse,{currentRef:y.current,hasMore:l,loadMore:d,error:a,isLoading:s,filteredReactions:I,removeReaction:C})))};var Jse=R.createContext(void 0);var bt=()=>{let e=useContext(Jse);if(!e)throw new Error("usePageBehavior must be used within a PageBehaviorProvider");return e};var rg={emptyStateRing:"Nl",errorRing:"Ol",uploadingProgressRing:"Pl","upload-progress":"xe"};var Yse=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},R.createElement("defs",null,R.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:i[0]}),R.createElement("stop",{offset:1,stopColor:i[1]}))),R.createElement("circle",{cx:r/2,cy:r/2,r:r/2-1,className:rg.emptyStateRing}))},Rse=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},R.createElement("defs",null,R.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:i[0]}),R.createElement("stop",{offset:1,stopColor:i[1]}))),R.createElement("circle",{cx:r/2,cy:r/2,r:r/2-1,strokeWidth:"2",strokeLinecap:"round",stroke:"url(#story-ring-gradient)",fill:"none",strokeDasharray:339,strokeDashoffset:0}))},e1e=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},R.createElement("defs",null,R.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:i[0]}),R.createElement("stop",{offset:1,stopColor:i[1]}))),R.createElement("circle",{className:rg.uploadingProgressRing,cx:r/2,cy:r/2,r:r/2-1,strokeWidth:"2",strokeLinecap:"round",stroke:"url(#story-ring-gradient)",fill:"none"}))},Fc=s=>{var l=s,{pageId:e="*",componentId:t="*",hasUnseen:o=!1,uploading:r=!1,isErrored:n=!1,size:i=64}=l,a=P(l,["pageId","componentId","hasUnseen","uploading","isErrored","size"]);let d="story_ring",{isExcluded:p}=A({pageId:e,componentId:t,elementId:d});return p?null:n?R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:"none",viewBox:`0 0 ${i} ${i}`},a),R.createElement("circle",{cx:i/2,cy:i/2,r:i/2-1,stroke:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-alert-default"),strokeWidth:"2"})):r?R.createElement(e1e,{pageId:e,componentId:t,elementId:d,size:i}):o?R.createElement(Rse,{pageId:e,componentId:t,elementId:d,size:i}):R.createElement(Yse,{pageId:e,componentId:t,elementId:d,size:i})};var t1e="global-admin";var VE=e=>e!=null&&e.length?e.includes(t1e):!1;var o1e="global-admin",{COMMUNITY_MODERATOR:r1e,CHANNEL_MODERATOR:n1e,MODERATOR:i1e,SUPER_MODERATOR:a1e}=gc,s5=e=>{if(!(e!=null&&e.length))return !1;let t=[r1e,n1e,i1e,a1e];return e.some(o=>t.includes(o))},l5=e=>e!=null&&e.length?e.includes(o1e):!1;var us=(e,t)=>e&&t?e.hasPermission("MANAGE_COMMUNITY_STORY").community(t):!1;function m5(e){if(!e)return;let t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/1e3);return r<60?"Just now":r>=60&&r<3600?`${Math.floor(r/60)}m`:`${Math.floor(r/3600)}h`}var Om={errorIcon:"Ql",addStoryButton:"Wl",hiddenInput:"Zl",storyWrapper:"_l",storyTabContainer:"es",storyAvatarContainer:"rs",storyAvatar:"as",storyTitle:"os","animate-ring":"we",progressRing:"ts",progressRingStatic:"is"};var c1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),R.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#FA4D30",stroke:"#fff",strokeWidth:"1.5"}),R.createElement("path",{fill:"#fff",d:"M9.25 10.75C9.25 11.453 8.687 12 8 12c-.703 0-1.25-.547-1.25-1.25 0-.688.547-1.25 1.25-1.25.688 0 1.25.563 1.25 1.25zM6.89 4.406A.378.378 0 017.267 4h1.453c.219 0 .39.188.375.406l-.203 4.25A.387.387 0 018.516 9H7.469a.387.387 0 01-.375-.344l-.203-4.25z"})),jE=({pageId:e="*",componentId:t="*",communityId:o,onFileChange:r,onStoryClick:n})=>{let{isExcluded:i,accessibilityId:a,themeStyles:s}=te({pageId:e,componentId:t}),{stories:l}=ea({targetId:o,targetType:"community",options:{orderBy:"asc",sortBy:"createdAt"}}),{community:d}=yc(o),{currentUserId:p,client:u}=Ae(),{user:g}=fr(p),y=VE(g==null?void 0:g.roles)||us(u,o),v=(l==null?void 0:l.length)>0,C=l.some(M=>!(M!=null&&M.isSeen)),h=l.some(M=>(M==null?void 0:M.syncState)==="syncing"),x=l.some(M=>(M==null?void 0:M.syncState)==="error"),b=()=>{Array.isArray(l)&&l.length===0||n();};return i||!v&&!y?null:R.createElement("div",{"data-qa-anchor":a,style:s,className:cr(Om.storyTabContainer)},R.createElement("div",{className:cr(Om.storyWrapper)},v&&R.createElement(Fc,{pageId:e,componentId:t,hasUnseen:C,uploading:h,isErrored:x,size:48}),R.createElement("button",{className:cr(Om.storyAvatarContainer),onClick:b},R.createElement(jr,{pageId:e,componentId:t,community:d})),y&&R.createElement(FileTrigger,{onSelect:M=>{let I=Array.from(M);r(I[0]);}},R.createElement(is,{pageId:e,componentId:t})),x&&R.createElement(c1e,{className:cr(Om.errorIcon)})),R.createElement(pw,{lines:1},R.createElement("div",{className:cr(Om.storyTitle)},"Story")))};var zc={storyTabContainer:"ls",storyTab:"ss",storyTabImage:"cs",storyTabContent:"ns",storyTabTitle:"ds",storyTabIcons:"ye",storyTabSkeleton:"ms",storyTabSkeletonAvatar:"ps","skeleton-pulse":"z",storyTabSkeletonUsername:"gs"};var p1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),R.createElement("path",{d:"M20.4187 17.2429V15.4838L21.6578 14.2365C21.6585 14.2358 21.6591 14.2351 21.6598 14.2345C22.3179 13.5807 22.7516 12.8355 22.75 11.9942C22.7484 11.1537 22.3123 10.4094 21.6598 9.75682L20.4187 8.51578V6.7571C20.4187 5.82907 20.1982 4.99346 19.6024 4.39762C19.0065 3.80179 18.1709 3.58128 17.2429 3.58128H15.4842L14.2432 2.34024L13.7265 2.85697L14.2432 2.34024C13.5864 1.68348 12.8389 1.24622 11.9953 1.24784C11.1522 1.24946 10.4079 1.68897 9.75583 2.34991L8.51619 3.58128H6.75709C5.8332 3.58128 4.99652 3.79543 4.39906 4.38966C3.80081 4.98466 3.58127 5.82245 3.58127 6.7571V8.51578L2.34222 9.75484C2.34186 9.75519 2.3415 9.75555 2.34114 9.75591C1.68254 10.4099 1.24839 11.1554 1.25 11.9971C1.25162 12.8372 1.68721 13.5812 2.33924 14.2335C2.33957 14.2338 2.3399 14.2342 2.34023 14.2345L3.58127 15.4838V17.2429C3.58127 18.1709 3.80178 19.0066 4.39761 19.6024C4.99345 20.1982 5.82907 20.4187 6.75709 20.4187H8.51577L9.75483 21.6578C9.75525 21.6582 9.75567 21.6586 9.75609 21.6591C10.4102 22.3177 11.1557 22.7516 11.9982 22.75C12.8389 22.7484 13.5848 22.3133 14.2412 21.6618L14.2432 21.6598L15.4842 20.4187H17.2429C18.1709 20.4187 19.0065 20.1982 19.6024 19.6024C20.1982 19.0066 20.4187 18.1709 20.4187 17.2429ZM11.1362 14.6127L15.3255 8.63293C15.3257 8.63263 15.3259 8.63232 15.3261 8.63202C15.3555 8.59049 15.3769 8.56736 15.3897 8.55517C15.3961 8.54919 15.4003 8.54586 15.4025 8.54426L15.4048 8.54269L15.4054 8.54234L15.4054 8.54232L15.4062 8.542C15.4072 8.54166 15.4101 8.54065 15.4157 8.53942C15.4272 8.53692 15.4517 8.53308 15.4953 8.53308C15.5882 8.53308 15.6273 8.563 15.6388 8.57409C15.649 8.58379 15.6664 8.60504 15.6669 8.65903C15.6668 8.65902 15.6656 8.67471 15.6559 8.70306C15.6448 8.73553 15.6277 8.7697 15.6066 8.79916L15.6062 8.79975L10.738 15.6292C10.7079 15.6666 10.6872 15.6779 10.6764 15.6829C10.6626 15.6894 10.6288 15.7017 10.5567 15.7017C10.4668 15.7017 10.4177 15.6786 10.3664 15.6272L7.5945 12.5262L7.58765 12.5185L7.58058 12.511C7.58023 12.5106 7.57454 12.5043 7.5688 12.489C7.56299 12.4736 7.55926 12.4545 7.55926 12.4347C7.55926 12.3583 7.58347 12.332 7.59029 12.3253C7.59747 12.3182 7.63028 12.2892 7.72221 12.2892C7.78716 12.2892 7.81058 12.2992 7.8149 12.3011L7.81503 12.3012C7.81882 12.3028 7.8367 12.3105 7.87134 12.3478L9.9633 14.6828L10.5939 15.3867L11.1362 14.6127Z",fill:"#1054DE",stroke:"white",strokeWidth:"1.5"})),ZE=p1e;var gs={container:"hs",avatarContainer:"fs",verifiedIcon:"bs",avatarBackground:"us",avatar:"vs",displayName:"xs",errorIcon:"ws"};var g1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),R.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#FA4D30",stroke:"#fff",strokeWidth:"1.5"}),R.createElement("path",{fill:"#fff",d:"M9.25 10.75C9.25 11.453 8.687 12 8 12c-.703 0-1.25-.547-1.25-1.25 0-.688.547-1.25 1.25-1.25.688 0 1.25.563 1.25 1.25zM6.89 4.406A.378.378 0 017.267 4h1.453c.219 0 .39.188.375.406l-.203 4.25A.387.387 0 018.516 9H7.469a.387.387 0 01-.375-.344l-.203-4.25z"})),f1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),R.createElement("path",{fill:"#000",fillOpacity:".2",d:"M8 0c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8z"}),R.createElement("path",{fill:"#000",fillOpacity:".2",d:"M8 2c2.21 0 4 1.79 4 4v1h-1V6c0-1.104-.896-2-2-2s-2 .896-2 2v1H4V6c0-2.21 1.79-4 4-4z"})),WE=({pageId:e,componentId:t,targetId:o,hasUnseen:r,onClick:n,isErrored:i})=>{let{community:a}=Pt({communityId:o}),s=nt({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return R.createElement("div",{className:cr(gs.container),onClick:n},R.createElement("div",{className:gs.avatarContainer},R.createElement(Fc,{pageId:e,componentId:t,hasUnseen:r,isErrored:i}),R.createElement("div",{className:gs.avatarBackground},s&&R.createElement("img",{className:gs.avatar,src:s,alt:a==null?void 0:a.displayName})),i&&R.createElement(g1e,{className:gs.errorIcon}),(a==null?void 0:a.isOfficial)&&!i&&R.createElement(ZE,{className:gs.verifiedIcon})),R.createElement(S.Caption,{className:cr(gs.displayName)},!(a!=null&&a.isPublic)&&R.createElement(f1e,null),a==null?void 0:a.displayName))};var c5=e=>{let s=dt({fetcher:StoryRepository.getGlobalStoryTargets,params:e,shouldCall:!0}),{items:t,hasMore:o,loadMore:r,isLoading:n}=s,i=P(s,["items","hasMore","loadMore","isLoading"]);return c({stories:t,hasMore:o,isLoading:n,loadMoreStories:()=>{o&&!n&&r();}},i)};var C1e=10,KE=({pageId:e="*",componentId:t="*",goToViewStoryPage:o})=>{let{isExcluded:r,accessibilityId:n,themeStyles:i}=te({pageId:e,componentId:t}),{stories:a,isLoading:s,hasMore:l,loadMoreStories:d}=c5({seenState:"smart",limit:C1e}),p=useRef(null),u=useRef(null);return useEffect(()=>{if(!p.current)return;let g=new IntersectionObserver(f=>{f[0].isIntersecting&&l&&d();},{root:p.current,rootMargin:"0px",threshold:.9});return ()=>{g&&g.disconnect();}},[p==null?void 0:p.current]),r||(a==null?void 0:a.length)===0?null:R.createElement("div",{"data-qa-anchor":n,style:i,className:zc.storyTabContainer,ref:p},s?Array.from({length:10}).map((g,f)=>R.createElement("div",{key:f,className:zc.storyTabSkeleton},R.createElement("div",{className:zc.storyTabSkeletonAvatar}),R.createElement("div",{className:zc.storyTabSkeletonUsername}))):a.map(g=>R.createElement(WE,{pageId:e,componentId:t,key:g.targetId,targetId:g.targetId,hasUnseen:g.hasUnseen,isErrored:g.failedStoriesCount>0,onClick:()=>o({storyTargets:a,storyTarget:g}),size:64})),R.createElement("div",{ref:u,style:{height:"1px",width:"1px"}}))};var Um=o=>{var r=o,{pageId:e="*"}=r,t=P(r,["pageId"]);let n="story_tab_component",{AmityGlobalFeedComponentBehavior:i}=bt(),{goToViewStoryPage:a,goToDraftStoryPage:s}=Be(),{setFile:l}=ui();return (()=>{switch(t.type){case"communityFeed":return R.createElement(jE,{pageId:e,componentId:n,communityId:t.communityId||"",onFileChange:p=>{l(p),p&&s(t.communityId||"","community",p.type.includes("image")?{type:"image",url:URL.createObjectURL(p)}:{type:"video",url:URL.createObjectURL(p)},"communityFeed");},onStoryClick:()=>a({targetId:t.communityId||"",targetType:"community",storyType:"communityFeed"})});case"globalFeed":return R.createElement(KE,{pageId:e,componentId:n,goToViewStoryPage:({storyTarget:p,storyTargets:u})=>{var g;(g=i==null?void 0:i.goToViewStoryPage)==null||g.call(i,{targetId:p.targetId,targetType:p.targetType,storyType:"globalFeed",targetIds:u.map(f=>f.targetId)});}});default:return null}})()};var XE={createPostMenu:"ys"};var d5={createPostButton:"ks",createPostButton__text:"js",createPostButton__icon:"zs"};var I1e=e=>R.createElement("svg",c({width:"21",height:"20",viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M14.0625 12.7812L15.0625 11.7812C15.2188 11.625 15.5 11.75 15.5 11.9688V16.5C15.5 17.3438 14.8125 18 14 18H3C2.15625 18 1.5 17.3438 1.5 16.5V5.5C1.5 4.6875 2.15625 4 3 4H11.5312C11.75 4 11.875 4.28125 11.7188 4.4375L10.7188 5.4375C10.6562 5.5 10.5938 5.5 10.5312 5.5H3V16.5H14V12.9688C14 12.9062 14 12.8438 14.0625 12.7812ZM18.9375 6.5L10.75 14.6875L7.90625 15C7.09375 15.0938 6.40625 14.4062 6.5 13.5938L6.8125 10.75L15 2.5625C15.7188 1.84375 16.875 1.84375 17.5938 2.5625L18.9375 3.90625C19.6562 4.625 19.6562 5.78125 18.9375 6.5ZM15.875 7.4375L14.0625 5.625L8.25 11.4375L8 13.5L10.0625 13.25L15.875 7.4375ZM17.875 4.96875L16.5312 3.625C16.4062 3.46875 16.1875 3.46875 16.0625 3.625L15.125 4.5625L16.9375 6.40625L17.9062 5.4375C18.0312 5.28125 18.0312 5.09375 17.875 4.96875Z"}));function ng({pageId:e="*",componentId:t="*",defaultClassName:o,onClick:r}){let n="create_post_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:R.createElement(O,{className:d5.createPostButton,onPress:()=>r==null?void 0:r(),"data-qa-anchor":i,style:p},R.createElement(ee,{defaultIcon:()=>R.createElement(I1e,{className:cr(d5.createPostButton__icon,o)}),imgIcon:()=>R.createElement("img",{src:a.image,alt:d}),configIconName:a.image,defaultIconName:s.image}),R.createElement(S.Body,{className:d5.createPostButton__text},a.text))}function p5({pageId:e}){let t="create_post_menu",{AmityCreatePostMenuComponentBehavior:o}=bt();return R.createElement("div",{className:XE.createPostMenu},R.createElement(ng,{pageId:e,componentId:t,onClick:()=>{var r;return (r=o==null?void 0:o.goToSelectPostTargetPage)==null?void 0:r.call(o)}}),R.createElement(D3,{pageId:e,componentId:t,onClick:()=>{var r;return (r=o==null?void 0:o.goToStoryTargetSelectionPage)==null?void 0:r.call(o)}}))}var Uc={mediaAttachment:"Xs",mediaAttachment__swipeDown:"Ys",mediaAttachment__wrapMedia:"Cs",mediaAttachment__wrapMedia_2items:"As"};var u5={cameraButton:"Ms",cameraButton__icon:"Ss",cameraButton_input:"Es"};var T1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),R.createElement("path",{d:"M19.5 19.5H4.5C4.10218 19.5 3.72064 19.342 3.43934 19.0607C3.15804 18.7794 3 18.3978 3 18V7.5C3 7.10218 3.15804 6.72064 3.43934 6.43934C3.72064 6.15804 4.10218 6 4.5 6H7.49945L8.99945 3.75H14.9995L16.4995 6H19.5C19.8978 6 20.2794 6.15804 20.5607 6.43934C20.842 6.72064 21 7.10218 21 7.5V18C21 18.3978 20.842 18.7794 20.5607 19.0607C20.2794 19.342 19.8978 19.5 19.5 19.5Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),R.createElement("path",{d:"M12 15.75C13.864 15.75 15.375 14.239 15.375 12.375C15.375 10.511 13.864 9 12 9C10.136 9 8.625 10.511 8.625 12.375C8.625 14.239 10.136 15.75 12 15.75Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}));function $c({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,isVisibleImage:n,isVisibleVideo:i,onVideoFileChange:a,onImageFileChange:s}){let l="camera_button",{themeStyles:d,isExcluded:p,config:u,accessibilityId:g,uiReference:f,defaultConfig:y}=A({pageId:e,componentId:t,elementId:l});if(p)return null;let v=()=>{document.getElementById("upload").click();},C=useCallback(h=>{h.preventDefault(),h.stopPropagation();let x=h.target.files?[...h.target.files]:[],b=x.some(I=>I.type.startsWith("image/")),M=x.some(I=>I.type.startsWith("video/"));b?s==null||s(x):M&&(a==null||a(x));},[s,a]);return R.createElement(O,{style:d,"data-qa-anchor":g,className:u5.cameraButton,onPress:v},R.createElement(ee,{defaultIcon:()=>R.createElement(T1e,{className:cr(u5.cameraButton__icon,r)}),imgIcon:()=>R.createElement("img",{src:u.icon,alt:f,className:o}),defaultIconName:y.icon,configIconName:u.icon}),u.text&&R.createElement(S.BodyBold,null,u.text),R.createElement("input",{type:"file",onChange:C,id:"upload",accept:n&&i?"image/*,video/*":n?"image/*":"video/*",className:u5.cameraButton_input}))}var g5={imageButton:"Fs",imageButton__icon:"Is",imageButton_input:"Rs"};var N1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),R.createElement("path",{d:"M20.25 4.5H3.75C3.33579 4.5 3 4.83579 3 5.25V18.75C3 19.1642 3.33579 19.5 3.75 19.5H20.25C20.6642 19.5 21 19.1642 21 18.75V5.25C21 4.83579 20.6642 4.5 20.25 4.5Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),R.createElement("path",{d:"M3 15.7499L7.71966 11.0302C7.7893 10.9606 7.87198 10.9053 7.96297 10.8676C8.05397 10.8299 8.1515 10.8105 8.24999 10.8105C8.34848 10.8105 8.44601 10.8299 8.537 10.8676C8.62799 10.9053 8.71067 10.9606 8.78032 11.0302L12.9697 15.2196C13.0393 15.2892 13.122 15.3444 13.213 15.3821C13.304 15.4198 13.4015 15.4392 13.5 15.4392C13.5985 15.4392 13.696 15.4198 13.787 15.3821C13.878 15.3444 13.9607 15.2892 14.0303 15.2196L15.9697 13.2802C16.0393 13.2106 16.122 13.1553 16.213 13.1176C16.304 13.0799 16.4015 13.0605 16.5 13.0605C16.5985 13.0605 16.696 13.0799 16.787 13.1176C16.878 13.1553 16.9607 13.2106 17.0303 13.2802L21 17.2499",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),R.createElement("path",{d:"M14.625 10.5C15.2463 10.5 15.75 9.99632 15.75 9.375C15.75 8.75368 15.2463 8.25 14.625 8.25C14.0037 8.25 13.5 8.75368 13.5 9.375C13.5 9.99632 14.0037 10.5 14.625 10.5Z"}));function Vc({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,onImageFileChange:n}){let i="image_button",{themeStyles:a,isExcluded:s,config:l,accessibilityId:d,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});if(s)return null;let g=()=>{document.getElementById("image-upload").click();},f=y=>{y.preventDefault(),y.stopPropagation(),n==null||n(y.target.files?[...y.target.files]:[]);};return R.createElement(O,{type:"button",style:a,"data-qa-anchor":d,className:g5.imageButton,onPress:g},R.createElement(ee,{defaultIcon:()=>R.createElement(N1e,{className:cr(g5.imageButton__icon,r)}),imgIcon:()=>R.createElement("img",{src:l.icon,alt:p,className:o}),defaultIconName:u.icon,configIconName:l.icon}),l.text&&R.createElement(S.BodyBold,null,l.text),R.createElement("input",{type:"file",onChange:f,multiple:!0,id:"image-upload",accept:"image/*",className:g5.imageButton_input}))}var f5={videoButton:"Us",videoButton__icon:"Bs",videoButton__input:"Ds"};var L1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),R.createElement("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:e.stroke,strokeWidth:"1.3",strokeMiterlimit:"10"}),R.createElement("path",{d:"M16 12L10 8V16L16 12Z",stroke:e.stroke,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}));function jc({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,onVideoFileChange:n}){let i="video_button",{themeStyles:a,isExcluded:s,config:l,accessibilityId:d,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});if(s)return null;Re();let f=()=>{document.getElementById("video-upload").click();},y=v=>{v.preventDefault(),v.stopPropagation(),n==null||n(v.target.files?[...v.target.files]:[]);};return R.createElement(O,{style:a,"data-qa-anchor":d,className:f5.videoButton,onPress:f},R.createElement(ee,{defaultIcon:()=>R.createElement(L1e,{className:cr(f5.videoButton__icon,r)}),imgIcon:()=>R.createElement("img",{src:l.icon,alt:p,className:o}),defaultIconName:u.icon,configIconName:l.icon}),l.text&&R.createElement(S.BodyBold,null,l.text),R.createElement("input",{type:"file",accept:"video/*",onChange:y,multiple:!0,id:"video-upload",className:f5.videoButton__input}))}function y5({pageId:e,isVisibleCamera:t,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}){let a="media_attachment",{themeStyles:s,accessibilityId:l,isExcluded:d}=te({pageId:e,componentId:a});return d?null:R.createElement("div",{style:s,"data-qa-anchor":l,className:Uc.mediaAttachment},R.createElement("div",{className:Uc.mediaAttachment__swipeDown}),R.createElement("div",{className:cr(!o||!r||!t?Uc.mediaAttachment__wrapMedia_2items:Uc.mediaAttachment__wrapMedia)},t&&R.createElement($c,{pageId:e,componentId:a,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}),o&&R.createElement(Vc,{pageId:e,componentId:a,onImageFileChange:i}),r&&R.createElement(jc,{pageId:e,componentId:a,onVideoFileChange:n})))}var ag={detailedMediaAttachment:"Hs",detailedMediaAttachment__swipeDown:"Ls"};function h5({pageId:e,isVisibleCamera:t,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}){let a="detailed_media_attachment",{themeStyles:s,accessibilityId:l,isExcluded:d}=te({pageId:e,componentId:a});return d?null:R.createElement("div",{style:s,"data-qa-anchor":l,className:ag.detailedMediaAttachment},R.createElement("div",{className:ag.detailedMediaAttachment__swipeDown}),t&&R.createElement($c,{pageId:e,componentId:a,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}),o&&R.createElement(Vc,{pageId:e,componentId:a,onImageFileChange:i}),r&&R.createElement(jc,{pageId:e,componentId:a,onVideoFileChange:n}))}var YE={userSearchResult:"Ts"};var fs={userItem:"Vs",userItem__leftPane:"qs",userItem__rightPane:"Gs",userItem__avatar:"Js",userItem__brandIcon:"Ks",userItem__userName:"Ns",userItem__userName__text:"Os"};var O1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),R.createElement("path",{d:"M13.6435 20.7628C12.5251 21.8728 11.4652 21.8812 10.3552 20.7628L9.10328 19.5109C8.98644 19.394 8.88629 19.3607 8.73606 19.3607H6.9667C5.38931 19.3607 4.63817 18.6095 4.63817 17.0321V15.2628C4.63817 15.1125 4.59644 15.004 4.48794 14.8955L3.23604 13.6353C2.12602 12.5253 2.11767 11.4653 3.23604 10.3553L4.48794 9.10342C4.59644 8.99492 4.63817 8.88642 4.63817 8.73619V6.96684C4.63817 5.37275 5.38931 4.6383 6.9667 4.6383H8.73606C8.88629 4.6383 8.99478 4.59657 9.10328 4.48807L10.3552 3.24452C11.4652 2.11781 12.5251 2.11781 13.6435 3.23617L14.8954 4.48807C15.0039 4.59657 15.1124 4.6383 15.2626 4.6383H17.032C18.6094 4.6383 19.3605 5.38944 19.3605 6.96684V8.73619C19.3605 8.88642 19.4023 8.98657 19.5108 9.10342L20.7627 10.3553C21.8727 11.4653 21.881 12.5253 20.7627 13.6353L19.5108 14.8955C19.4023 15.004 19.3605 15.1125 19.3605 15.2628V17.0321C19.3605 18.6095 18.6094 19.3607 17.032 19.3607H15.2626C15.1124 19.3607 15.0123 19.394 14.8954 19.5109L13.6435 20.7628Z",fill:"url(#paint0_linear_482_20867)"}),R.createElement("path",{d:"M9.90432 15.9736C10.0879 16.1656 10.3216 16.2741 10.6137 16.2741C10.9225 16.2741 11.1729 16.1656 11.3649 15.9152L16.047 9.34691C16.1722 9.17164 16.2389 8.96299 16.2389 8.79607C16.2389 8.312 15.8717 7.95312 15.3543 7.95312C15.0204 7.95312 14.8034 8.06997 14.6031 8.35373L10.5803 14.0958L8.56896 11.8507C8.38535 11.6504 8.1767 11.5586 7.89293 11.5586C7.37548 11.5586 7.0166 11.9175 7.0166 12.4182C7.0166 12.6269 7.09172 12.8355 7.2336 12.9858L9.90432 15.9736Z",fill:"white"}),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_482_20867",x1:"5.40039",y1:"4.79844",x2:"5.40039",y2:"23.3984",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#FFDB7D"}),R.createElement("stop",{offset:"1",stopColor:"#D49900"})))),RE=O1e;var Zc=({className:e})=>R.createElement(RE,{className:e});var eB=({user:e})=>{let{onClickUser:t}=Be();return R.createElement(O,{key:e.userId,className:fs.userItem,onPress:()=>t(e.userId)},R.createElement("div",{className:fs.userItem__leftPane},R.createElement(jo,{userId:e.userId,className:fs.userItem__avatar})),R.createElement("div",{className:fs.userItem__rightPane},R.createElement("div",{className:fs.userItem__userName},R.createElement(S.BodyBold,{className:fs.userItem__userName__text},e.displayName)),e.isBrand?R.createElement(Zc,{className:fs.userItem__brandIcon}):null))};var un={userSearchItemSkeleton:"ke",userSearchItemSkeleton__leftPane:"Ps",userSearchItemSkeleton__information:"Qs",userSearchItemSkeleton__content:"Ws",userSearchItemSkeleton__animation:"Zs","skeleton-pulse":"je",userSearchItemSkeleton__userAvatar:"_s",userSearchItemSkeleton__information__title:"ec",userSearchItemSkeleton__information__subtitle:"rc"};var tB=({pageId:e="*",componentId:t="*"})=>{let{accessibilityId:o}=te({pageId:e,componentId:t});return R.createElement("div",{"data-qa-anchor":o,className:cr(un.userSearchItemSkeleton,un.userSearchItemSkeleton__animation)},R.createElement("div",{className:un.userSearchItemSkeleton__leftPane},R.createElement("div",{className:cr(un.userSearchItemSkeleton__userAvatar,un.userSearchItemSkeleton__animation)})),R.createElement("div",{className:cr(un.userSearchItemSkeleton__information,un.userSearchItemSkeleton__animation)},R.createElement("div",{className:cr(un.userSearchItemSkeleton__information__title,un.userSearchItemSkeleton__animation)}),R.createElement("div",{className:cr(un.userSearchItemSkeleton__information__subtitle,un.userSearchItemSkeleton__animation)})))};var v5=({pageId:e="*",userCollection:t=[],isLoading:o,onLoadMore:r})=>{let n="user_search_result",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=te({pageId:e,componentId:n}),[u,g]=useState(null);return So({onIntersect:()=>r(),node:u}),R.createElement("div",{className:YE.userSearchResult,style:p},t.map(f=>R.createElement(eB,{key:f.userId,user:f})),o?Array.from({length:5}).map((f,y)=>R.createElement(tB,{key:y,pageId:e,componentId:n})):null,R.createElement("div",{ref:f=>g(f)}))};var oB={communitySearchResult:"ac",communitySearchResult__communityItem:"ze",communitySearchResult__communityItem__leftPane:"oc",communitySearchResult__communityItem__rightPane:"tc",communityItem__communityName:"ic",communityItem__communityName__private:"lc",communityItem__communityCategory:"sc",communityItem__communityMemberCount:"cc"};var rB={communityDisplayName:"nc"};function pa({pageId:e="*",componentId:t="*",community:o}){var s;let r="community_display_name",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:R.createElement(S.BodyBold,{className:rB.communityDisplayName,style:a,"data-qa-anchor":n},(s=o==null?void 0:o.displayName)!=null?s:"My Timeline")}var x5={communityOfficialBadge:"dc",communityOfficialBadge__iconSvg:"mc"};var W1e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},e),R.createElement("path",{d:"M9.58112 15.4777C10.2749 16.1767 10.9373 16.1715 11.6363 15.4777L12.4188 14.6953C12.4918 14.6223 12.5544 14.6014 12.6483 14.6014H13.7541C14.74 14.6014 15.2095 14.1319 15.2095 13.1461V12.0402C15.2095 11.9463 15.2355 11.8785 15.3034 11.8107L16.0858 11.023C16.7848 10.3293 16.7796 9.66681 16.0858 8.97305L15.3034 8.19061C15.2355 8.11758 15.2095 8.05499 15.2095 7.9611V6.85525C15.2095 5.86938 14.74 5.39991 13.7541 5.39991H12.6483C12.5544 5.39991 12.4866 5.37383 12.4188 5.30602L11.6363 4.52358C10.9373 3.82461 10.2749 3.82461 9.58112 4.5288L8.79868 5.30602C8.73087 5.37383 8.66306 5.39991 8.56917 5.39991H7.46332C6.47745 5.39991 6.00799 5.85894 6.00799 6.85525V7.9611C6.00799 8.05499 5.9819 8.1228 5.91409 8.19061L5.13165 8.97305C4.43268 9.66681 4.43789 10.3293 5.13165 11.023L5.91409 11.8107C5.9819 11.8785 6.00799 11.9463 6.00799 12.0402V13.1461C6.00799 14.1319 6.47745 14.6014 7.46332 14.6014H8.56917C8.66306 14.6014 8.72565 14.6223 8.79868 14.6953L9.58112 15.4777ZM9.74282 12.6714C9.56026 12.6714 9.4142 12.6036 9.29944 12.4836L7.63024 10.6162C7.54156 10.5223 7.49462 10.3919 7.49462 10.2615C7.49462 9.94849 7.71892 9.72419 8.04232 9.72419C8.21968 9.72419 8.35008 9.78157 8.46484 9.90676L9.72196 11.3099L12.2362 7.72115C12.3614 7.5438 12.497 7.47077 12.7057 7.47077C13.0291 7.47077 13.2586 7.69507 13.2586 7.99761C13.2586 8.10193 13.2169 8.23234 13.1386 8.34188L10.2123 12.4471C10.0923 12.6036 9.93583 12.6714 9.74282 12.6714Z"}));function S1({pageId:e="*",componentId:t="*"}){let o="community_official_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement(ee,{defaultIcon:()=>R.createElement(W1e,{style:l,className:cr(x5.communityOfficialBadge,x5.communityOfficialBadge__iconSvg),"data-qa-anchor":r}),imgIcon:()=>R.createElement("img",{"data-qa-anchor":r,src:n.icon,alt:s,className:x5.communityOfficialBadge}),configIconName:n.icon,defaultIconName:i.icon})}var b5={communityPrivateBadge:"pc",communityPrivateBadge__iconSvg:"gc"};var J1e=e=>R.createElement("svg",c({width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M5.60938 9.72656C5.26562 9.72656 5.00781 9.46875 5.00781 9.125V7.75C5.00781 7.42773 5.26562 7.14844 5.60938 7.14844C5.93164 7.14844 6.21094 7.42773 6.21094 7.75V9.125C6.21094 9.46875 5.93164 9.72656 5.60938 9.72656ZM10.4219 6.03125V10.8438C10.4219 11.4238 9.94922 11.875 9.39062 11.875H1.82812C1.24805 11.875 0.796875 11.4238 0.796875 10.8438V6.03125C0.796875 5.47266 1.24805 5 1.82812 5H2.51562V3.96875C2.51562 2.27148 3.89062 0.875 5.60938 0.875C7.32812 0.896484 8.70312 2.29297 8.70312 4.01172V5H9.39062C9.94922 5 10.4219 5.47266 10.4219 6.03125ZM3.54688 5H7.67188V3.96875C7.67188 2.85156 6.72656 1.90625 5.60938 1.90625C4.4707 1.90625 3.54688 2.85156 3.54688 3.96875V5ZM9.39062 6.03125H1.82812V10.8438H9.39062V6.03125Z"}));function N1({pageId:e="*",componentId:t="*"}){let o="community_private_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement(ee,{defaultIcon:()=>R.createElement(J1e,{style:l,className:cr(b5.communityPrivateBadge,b5.communityPrivateBadge__iconSvg),"data-qa-anchor":r}),imgIcon:()=>R.createElement("img",{"data-qa-anchor":r,src:n.icon,alt:s,className:b5.communityPrivateBadge}),configIconName:n.icon,defaultIconName:i.icon})}var nB={communityMembersCount:"hc"};function sg({pageId:e="*",componentId:t="*",memberCount:o}){let r="community_members_count",{accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:d}=A({pageId:e,componentId:t,elementId:r});return s?null:R.createElement(S.Caption,{className:nB.communityMembersCount,style:d,"data-qa-anchor":n},`${ib(o)||0} ${o!==1?"members":"member"}`)}var ys={communityItem:"Xe",communityItem__leftPane:"fc",communityItem__rightPane:"bc",communityItem__communityName:"uc",communityItem__communityName__private:"vc",communityItem__communityCategory:"xc",communityItem__communityMemberCount:"wc"};var tle=({community:e,pageId:t,componentId:o})=>{let r=Ra(e.categoryIds),i=r.length-3;return R.createElement(R.Fragment,null,r.slice(0,3).map(a=>R.createElement(Ka,{pageId:t,componentId:o,categoryName:a.name})),i>0&&R.createElement(Ka,{pageId:t,componentId:o,categoryName:`+${i}`}))},iB=({community:e,pageId:t="*",componentId:o="*"})=>{let{onClickCommunity:r}=Be();return R.createElement(O,{key:e.communityId,className:ys.communityItem,onPress:()=>{r(e.communityId);}},R.createElement("div",{className:ys.communityItem__leftPane},R.createElement(jr,{pageId:t,componentId:o,community:e})),R.createElement("div",{className:ys.communityItem__rightPane},R.createElement("div",{className:ys.communityItem__communityName},!e.isPublic&&R.createElement("div",{className:ys.communityItem__communityName__private},R.createElement(N1,{pageId:t,componentId:o})),R.createElement(pa,{pageId:t,componentId:o,community:e}),e.isOfficial&&R.createElement(S1,{pageId:t,componentId:o})),R.createElement("div",{className:ys.communityItem__communityCategory},R.createElement(tle,{pageId:t,componentId:o,community:e})),R.createElement("div",{className:ys.communityItem__communityMemberCount},R.createElement(sg,{pageId:t,componentId:o,memberCount:e.membersCount}))))};var gn={communityItemSkeleton:"Ye",communityItemSkeleton__leftPane:"yc",communityItemSkeleton__information:"kc",communityItemSkeleton__content:"jc",communityItemSkeleton__animation:"zc","skeleton-pulse":"Ce",communityItemSkeleton__userAvatar:"Xc",communityItemSkeleton__information__title:"Yc",communityItemSkeleton__information__subtitle:"Cc"};var aB=({pageId:e="*",componentId:t="*"})=>{let{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=te({pageId:e,componentId:t});return R.createElement("div",{"data-qa-anchor":o,style:s,className:cr(gn.communityItemSkeleton,gn.communityItemSkeleton__animation)},R.createElement("div",{className:gn.communityItemSkeleton__leftPane},R.createElement("div",{className:cr(gn.communityItemSkeleton__userAvatar,gn.communityItemSkeleton__animation)})),R.createElement("div",{className:cr(gn.communityItemSkeleton__information,gn.communityItemSkeleton__animation)},R.createElement("div",{className:cr(gn.communityItemSkeleton__information__title,gn.communityItemSkeleton__animation)}),R.createElement("div",{className:cr(gn.communityItemSkeleton__information__subtitle,gn.communityItemSkeleton__animation)})))};var hs=({pageId:e="*",communityCollection:t=[],isLoading:o,onLoadMore:r})=>{let n="community_search_result",{themeStyles:i}=te({pageId:e,componentId:n}),[a,s]=useState(null);return So({onIntersect:()=>r(),node:a}),R.createElement("div",{className:oB.communitySearchResult,style:i},t.map(l=>R.createElement(iB,{key:l.communityId,community:l,pageId:e,componentId:n})),o?Array.from({length:5}).map((l,d)=>R.createElement(aB,{key:d,pageId:e,componentId:n})):null,R.createElement("div",{ref:l=>s(l)}))};var sB={clearButton:"Ac"};function ile(e){return R.createElement("svg",c({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M8.82715 17.3906C13.4238 17.3906 17.2119 13.5938 17.2119 9.00586C17.2119 4.40918 13.415 0.612305 8.82715 0.612305C4.23047 0.612305 0.442383 4.40918 0.442383 9.00586C0.442383 13.5938 4.23926 17.3906 8.82715 17.3906ZM5.88281 12.5479C5.54883 12.5479 5.28516 12.2842 5.28516 11.9502C5.28516 11.792 5.34668 11.6514 5.46973 11.5283L7.9834 9.01465L5.46973 6.49219C5.34668 6.37793 5.28516 6.22852 5.28516 6.07031C5.28516 5.74512 5.54883 5.49023 5.88281 5.49023C6.0498 5.49023 6.19043 5.54297 6.2959 5.66602L8.82715 8.17969L11.3584 5.65723C11.4902 5.52539 11.6221 5.47266 11.7803 5.47266C12.1055 5.47266 12.3691 5.73633 12.3691 6.06152C12.3691 6.22852 12.3164 6.36035 12.1934 6.4834L9.6709 9.01465L12.1846 11.5283C12.3076 11.6514 12.3691 11.7832 12.3691 11.9502C12.3691 12.2842 12.1055 12.5479 11.7627 12.5479C11.5957 12.5479 11.4551 12.4863 11.332 12.3721L8.82715 9.84961L6.32227 12.3721C6.19922 12.4863 6.0498 12.5479 5.88281 12.5479Z"}))}var E1=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n})=>{let i="clear_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{"data-qa-anchor":a,className:sB.clearButton,style:u,onPress:n},R.createElement(ee,{defaultIcon:()=>R.createElement(ile,{className:o}),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var ale=e=>R.createElement("svg",c({width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M16.7109 14.6562C16.8672 14.8125 16.8672 15.0625 16.7109 15.1875L15.9922 15.9062C15.8672 16.0625 15.6172 16.0625 15.4609 15.9062L11.6797 12.125C11.6172 12.0312 11.5859 11.9375 11.5859 11.8438V11.4375C10.4297 12.4062 8.96094 13 7.33594 13C3.74219 13 0.835938 10.0938 0.835938 6.5C0.835938 2.9375 3.74219 0 7.33594 0C10.8984 0 13.8359 2.9375 13.8359 6.5C13.8359 8.125 13.2109 9.625 12.2422 10.75H12.6484C12.7422 10.75 12.8359 10.8125 12.9297 10.875L16.7109 14.6562ZM7.33594 11.5C10.0859 11.5 12.3359 9.28125 12.3359 6.5C12.3359 3.75 10.0859 1.5 7.33594 1.5C4.55469 1.5 2.33594 3.75 2.33594 6.5C2.33594 9.28125 4.55469 11.5 7.33594 11.5Z"}));function lg({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r}){let n="search_icon",{config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:d}=A({pageId:e,componentId:t,elementId:n});return s?null:R.createElement(ee,{defaultIcon:()=>R.createElement(ale,{className:o,style:d}),imgIcon:()=>R.createElement("img",{src:i.icon,alt:l,className:r,style:d}),defaultIconName:a.icon,configIconName:i.icon})}var Cs={topSearchBar:"Mc",topSearchBar__inputBar:"Sc",topSearchBar__textInput:"Ec",topSearchBar__searchIcon:"Fc",topSearchBar__searchIcon_img:"Ic",topSearchBar__clearButton:"Rc",topSearchBar__clearButton__img:"Uc"};function Qm({pageId:e="*",search:t}){let o="top_search_bar",{config:r,isExcluded:n,themeStyles:i}=te({pageId:e,componentId:o}),{onBack:a}=Be(),[s,l]=useState("");return useEffect(()=>{t(s);},[s]),n?null:R.createElement("div",{className:Cs.topSearchBar,style:i},R.createElement("div",{className:Cs.topSearchBar__inputBar},R.createElement(lg,{pageId:e,componentId:o,defaultClassName:Cs.topSearchBar__searchIcon,imgClassName:Cs.topSearchBar__searchIcon_img}),R.createElement("input",{className:Cs.topSearchBar__textInput,type:"text",value:s,placeholder:r.text,onChange:d=>l(d.target.value)}),s!=""?R.createElement(E1,{pageId:e,componentId:o,defaultClassName:Cs.topSearchBar__clearButton,imgClassName:Cs.topSearchBar__clearButton__img,onPress:()=>{l("");}}):null),R.createElement(L3,{pageId:e,componentId:o,onPress:()=>a()}))}var mg={menuButton:"Bc",menuButton__button:"Dc"};var w5=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"16",height:"4",viewBox:"0 0 16 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M9.6875 2.25C9.6875 3.19922 8.91406 3.9375 8 3.9375C7.05078 3.9375 6.3125 3.19922 6.3125 2.25C6.3125 1.33594 7.05078 0.5625 8 0.5625C8.91406 0.5625 9.6875 1.33594 9.6875 2.25ZM13.9062 0.5625C14.8203 0.5625 15.5938 1.33594 15.5938 2.25C15.5938 3.19922 14.8203 3.9375 13.9062 3.9375C12.957 3.9375 12.2188 3.19922 12.2188 2.25C12.2188 1.33594 12.957 0.5625 13.9062 0.5625ZM2.09375 0.5625C3.00781 0.5625 3.78125 1.33594 3.78125 2.25C3.78125 3.19922 3.00781 3.9375 2.09375 3.9375C1.14453 3.9375 0.40625 3.19922 0.40625 2.25C0.40625 1.33594 1.14453 0.5625 2.09375 0.5625Z"}))};function Xc({pageId:e="*",componentId:t="*",onClick:o}){let r="menu_button",{isExcluded:n,accessibilityId:i,themeStyles:a,config:s,defaultConfig:l,uiReference:d}=A({pageId:e,componentId:t,elementId:r});return n?null:R.createElement(O,{onPress:o,"data-qa-anchor":i,className:mg.menuButton__button},R.createElement(ee,{defaultIcon:()=>R.createElement(w5,{className:mg.menuButton,style:a}),imgIcon:()=>R.createElement("img",{src:s.icon,alt:d}),defaultIconName:l.icon,configIconName:s.icon}))}function cg({pageId:e="*",componentId:t="*",defaultIconClassName:o,imgIconClassName:r}){let n="share_button";A({pageId:e,componentId:t,elementId:n});return null}var dle=e=>R.createElement("svg",c({width:"6",height:"9",viewBox:"0 0 6 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M5.13281 4.71094L1.71094 8.17969C1.59375 8.29688 1.40625 8.29688 1.3125 8.17969L0.84375 7.71094C0.726562 7.59375 0.726562 7.42969 0.84375 7.3125L3.60938 4.5L0.84375 1.71094C0.726562 1.59375 0.726562 1.40625 0.84375 1.3125L1.3125 0.84375C1.40625 0.726562 1.59375 0.726562 1.71094 0.84375L5.13281 4.3125C5.25 4.42969 5.25 4.59375 5.13281 4.71094Z"})),Yc=dle;var P5={commentButton:"Hc",commentButton__icon:"Lc",commentButton__text:"Tc"};var ule=e=>R.createElement("svg",c({width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M9 0.1875C13.6816 0.1875 17.4668 3.30859 17.4668 7.09375C17.4668 10.9121 13.6816 14 9 14C7.9043 14 6.8418 13.834 5.91211 13.5352C4.91602 14.2324 3.32227 15.0625 1.29688 15.0625C0.964844 15.0625 0.666016 14.8965 0.533203 14.5977C0.433594 14.2988 0.466797 13.9668 0.699219 13.7344C0.732422 13.7344 1.76172 12.6055 2.22656 11.3105C1.13086 10.1484 0.5 8.6875 0.5 7.09375C0.5 3.30859 4.28516 0.1875 9 0.1875ZM9 12.4062C12.7852 12.4062 15.9062 10.0488 15.9062 7.09375C15.9062 4.17188 12.7852 1.78125 9 1.78125C5.18164 1.78125 2.09375 4.17188 2.09375 7.09375C2.09375 8.52148 2.79102 9.58398 3.38867 10.2148L4.08594 10.9453L3.7207 11.875C3.55469 12.3398 3.32227 12.8047 3.05664 13.2031C3.85352 12.9375 4.51758 12.5723 4.98242 12.2402L5.61328 11.7754L6.37695 12.0078C7.20703 12.2734 8.10352 12.4062 9 12.4062Z"}));function dg({pageId:e="*",componentId:t="*",commentsCount:o,defaultIconClassName:r,imgIconClassName:n,onPress:i=()=>{}}){let a="comment_button",{accessibilityId:s,config:l,defaultConfig:d,isExcluded:p,uiReference:u}=A({pageId:e,componentId:t,elementId:a});return p?null:R.createElement(O,{onPress:i},R.createElement(ee,{"data-qa-anchor":s,defaultIcon:()=>R.createElement("div",{className:cr(P5.commentButton)},R.createElement(ule,{className:cr(P5.commentButton__icon,r)}),R.createElement(S.BodyBold,{className:P5.commentButton__text},typeof o=="number"?o:l.text)),imgIcon:()=>R.createElement("img",{src:l.icon,alt:u,className:n}),defaultIconName:d.icon,configIconName:l.icon}))}var yle=createContext({drawerData:null,setDrawerData:()=>{},removeDrawerData:()=>{}});var Wm=()=>{let{setDrawerData:e,removeDrawerData:t}=useContext(yle);return {setDrawerData:e,removeDrawerData:t}};var ye={postContent:"Vc",postContent__bar:"qc",postContent__bar__userAvatar:"Gc",postContent__bar__detail:"Jc",postContent__bar__information__subtitle:"Kc",postContent__bar__information__subtitle__moderator:"Nc",postContent__bar__information__subtitle__brand:"Oc",postContent__bar__information__subtitle__separator:"Pc",postContent__bar__actionButton:"Qc",postContent__content_and_reactions:"Wc",postContent__content:"Zc",postContent__divider:"_c",postContent__reactionBar:"en",postContent__reactionBar__leftPane:"rn",postContent__reactionBar__rightPane:"an",postContent__reactionBar__leftPane__icon:"on",postContent__reactionBar__leftPane__iconImg:"tn",postTitle:"in",postTitle__text:"ln",postTitle__icon:"sn",postTitle__user__container:"cn",postTitle__brandIcon:"nn",postContent__comment:"dn",postContent__reactions_and_comments:"mn",postContent__reactionsBar:"pn",postContent__commentsCount:"gn",postContent__reactionsBar__reactions:"hn",postContent__reactionsBar__reactions__icon:"e",postContent__reactionsBar__reactions__count:"fn",postContent__bar__information__editedTag:"bn",button:"p",popover:"X","fade-in":"Ae","zoom-in":"Me","fade-out":"Se","zoom-out":"Ee",menu:"un",menuItem:"Fe",separator:"vn",postContent__notMember:"xn",postContent__wrapRightMenu:"wn"};var Cle=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{clipPath:"url(#clip0_1709_7904)"},R.createElement("path",{d:"M16 32.5C24.8366 32.5 32 25.3366 32 16.5C32 7.66344 24.8366 0.5 16 0.5C7.16344 0.5 0 7.66344 0 16.5C0 25.3366 7.16344 32.5 16 32.5Z",fill:"#FFD54F"}),R.createElement("path",{d:"M9.33317 15.1667C10.8059 15.1667 11.9998 13.9728 11.9998 12.5C11.9998 11.0273 10.8059 9.83337 9.33317 9.83337C7.86041 9.83337 6.6665 11.0273 6.6665 12.5C6.6665 13.9728 7.86041 15.1667 9.33317 15.1667Z",fill:"#6D4C41"}),R.createElement("path",{d:"M22.6667 15.1667C24.1394 15.1667 25.3333 13.9728 25.3333 12.5C25.3333 11.0273 24.1394 9.83337 22.6667 9.83337C21.1939 9.83337 20 11.0273 20 12.5C20 13.9728 21.1939 15.1667 22.6667 15.1667Z",fill:"#6D4C41"}),R.createElement("path",{d:"M21.0248 27.3372C20.674 27.3372 20.3232 27.2038 20.0564 26.9352C17.8894 24.7682 14.1108 24.7682 11.9456 26.9352C11.4103 27.4705 10.5423 27.4705 10.007 26.9352C9.47163 26.4016 9.47163 25.5319 10.007 24.9966C11.6076 23.396 13.7362 22.5153 16.0001 22.5153C18.264 22.5153 20.3926 23.396 21.9932 24.9984C22.5286 25.5337 22.5286 26.4016 21.9932 26.937C21.7264 27.2038 21.3756 27.3372 21.0248 27.3372Z",fill:"#6D4C41"}),R.createElement("path",{d:"M24.8228 16.5987C24.4495 16.0587 23.5508 16.0587 23.1775 16.5987C22.6228 17.4014 21.3335 19.3881 21.3335 20.5001C21.3335 21.9707 22.5295 23.1667 24.0002 23.1667C25.4708 23.1667 26.6668 21.9707 26.6668 20.5001C26.6668 19.3881 25.3775 17.4014 24.8228 16.5987Z",fill:"#00BCD4"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_1709_7904"},R.createElement("rect",{width:"32",height:"32",fill:"white",transform:"translate(0 0.5)"}))))},dB=Cle;var vle=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"Reactions",clipPath:"url(#clip0_1709_1751)"},R.createElement("path",{id:"Vector",d:"M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z",fill:"#FFD54F"}),R.createElement("path",{id:"Vector_2",d:"M27.2933 19.9601C26.9867 20.9334 26.5867 21.8267 26.0667 22.6667H5.93332C5.41332 21.8267 5.01332 20.9334 4.70665 19.9601C4.61332 19.6534 4.66665 19.3334 4.86665 19.0801C5.05332 18.8134 5.34665 18.6667 5.66665 18.6667H26.3333C26.6533 18.6667 26.9467 18.8134 27.1333 19.0801C27.3333 19.3334 27.3867 19.6534 27.2933 19.9601Z",fill:"white"}),R.createElement("path",{id:"Vector_3",d:"M26.0664 22.6667C23.9598 26.1201 20.1864 28.2934 15.9998 28.2934C11.8131 28.2934 8.03977 26.1201 5.93311 22.6667H26.0664Z",fill:"#E53935"}),R.createElement("path",{id:"Vector_4",d:"M12.3332 13.6668C11.7812 13.6668 11.3332 13.2188 11.3332 12.6668C11.3332 11.9322 10.7358 11.3335 9.99984 11.3335C9.26384 11.3335 8.6665 11.9322 8.6665 12.6668C8.6665 13.2188 8.2185 13.6668 7.6665 13.6668C7.1145 13.6668 6.6665 13.2188 6.6665 12.6668C6.6665 10.8295 8.16117 9.3335 9.99984 9.3335C11.8385 9.3335 13.3332 10.8295 13.3332 12.6668C13.3332 13.2188 12.8852 13.6668 12.3332 13.6668Z",fill:"#6D4C41"}),R.createElement("path",{id:"Vector_5",d:"M24.3332 13.6668C23.7812 13.6668 23.3332 13.2188 23.3332 12.6668C23.3332 11.9322 22.7358 11.3335 21.9998 11.3335C21.2638 11.3335 20.6665 11.9322 20.6665 12.6668C20.6665 13.2188 20.2185 13.6668 19.6665 13.6668C19.1145 13.6668 18.6665 13.2188 18.6665 12.6668C18.6665 10.8295 20.1612 9.3335 21.9998 9.3335C23.8385 9.3335 25.3332 10.8295 25.3332 12.6668C25.3332 13.2188 24.8852 13.6668 24.3332 13.6668Z",fill:"#6D4C41"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_1709_1751"},R.createElement("rect",{width:"32",height:"32",fill:"white"}))))},pB=vle;var xle=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("circle",{cx:"16",cy:"16.5",r:"16",fill:"url(#paint0_linear_1709_7888)"}),R.createElement("g",{clipPath:"url(#clip0_1709_7888)"},R.createElement("path",{d:"M21.8752 10.2903C21.3417 9.70788 20.5123 8.92173 20.1595 10.6968C20.0395 11.3004 19.7591 11.7656 19.5189 12.1402C19.2599 10.8296 18.4808 9.47308 17.7467 8.55843C17.472 8.21623 16.4973 6.85588 16.3101 4.58008C16.2821 4.24043 15.8787 4.08093 15.6263 4.31003C13.2147 6.49923 11.891 9.51013 11.8419 12.8998C11.8419 12.8998 10.8377 12.0533 10.2921 10.4786C10.1452 10.0546 9.57671 9.97368 9.33006 10.3486C9.28271 10.4206 9.23881 10.4927 9.19921 10.5627C7.33856 13.8527 6.44351 17.848 7.27096 21.565C8.65446 27.7898 17.8062 29.5301 22.6511 25.6177C27.3914 21.7899 25.8846 14.6654 21.8752 10.2903Z",fill:"#ED694A"}),R.createElement("path",{d:"M20.4125 14.8409C20.0185 14.4107 19.4058 13.83 19.1452 15.1411C19.0566 15.5869 18.8495 15.9306 18.6721 16.2073C18.4809 15.2392 17.9054 14.2372 17.3632 13.5617C17.1603 13.3089 16.4404 12.3042 16.302 10.6231C16.2814 10.3722 15.9834 10.2545 15.797 10.4237C14.0158 12.0406 13.038 14.2646 13.0018 16.7682C13.0018 16.7682 12.26 16.143 11.8571 14.9799C11.7486 14.6667 11.3287 14.607 11.1465 14.8839C11.1116 14.9371 11.0791 14.9904 11.0499 15.0421C9.67554 17.4721 9.01444 20.4231 9.62559 23.1686C10.6475 27.7664 17.4071 29.0518 20.9857 26.162C24.4869 23.3347 23.3739 18.0725 20.4125 14.8409Z",fill:"#F4A32C"}),R.createElement("path",{d:"M19.077 18.9949C18.8103 18.7037 18.3955 18.3106 18.2191 19.1982C18.1592 19.5 18.0189 19.7326 17.8988 19.9199C17.7693 19.2645 17.3798 18.5863 17.0127 18.129C16.8754 17.9579 16.3881 17.2777 16.2944 16.1398C16.2804 15.9699 16.0787 15.8902 15.9525 16.0048C14.7467 17.0994 14.0849 18.6049 14.0603 20.2996C14.0603 20.2996 13.5582 19.8764 13.2855 19.0891C13.212 18.8771 12.9278 18.8366 12.8045 19.0241C12.7808 19.06 12.7589 19.0961 12.739 19.1311C11.8087 20.7761 11.3612 22.7737 11.7749 24.6323C12.4666 27.7447 17.0425 28.6149 19.4649 26.6586C20.2945 25.9887 20.8088 25.0448 20.9131 24.0006C21.0706 22.4191 20.4619 20.5062 19.077 18.9949Z",fill:"#F4D44E"}),R.createElement("path",{d:"M17.838 22.85C17.6894 22.6878 17.4583 22.4688 17.36 22.9632C17.3266 23.1314 17.2485 23.261 17.1816 23.3653C17.1094 23.0002 16.8924 22.6223 16.6879 22.3676C16.6114 22.2722 16.3399 21.8933 16.2877 21.2593C16.2799 21.1647 16.1675 21.1203 16.0972 21.1841C15.4255 21.7939 15.0567 22.6327 15.043 23.5769C15.043 23.5769 14.7633 23.3411 14.6113 22.9024C14.5704 22.7843 14.412 22.7617 14.3434 22.8662C14.3302 22.8863 14.318 22.9064 14.307 22.9259C13.7887 23.8424 13.5393 24.9553 13.7698 25.9907C14.2947 28.3523 18.5971 28.2807 18.861 25.6388C18.9486 24.7577 18.6095 23.6919 17.838 22.85Z",fill:"#EAE9E8"}),R.createElement("path",{d:"M14.7688 26.4597C14.5383 25.5334 14.7876 24.5379 15.3059 23.7181C15.3169 23.7006 15.3292 23.6827 15.3423 23.6647C15.411 23.5713 15.5694 23.5914 15.6103 23.6971C15.7622 24.0895 16.042 24.3004 16.042 24.3004C16.0532 23.6064 16.3046 22.9764 16.7664 22.4711C16.6631 22.3281 16.3472 21.9833 16.2877 21.2597C16.2799 21.165 16.1675 21.1207 16.0972 21.1844C15.4255 21.7943 15.0567 22.633 15.043 23.5772C15.043 23.5772 14.7633 23.3414 14.6113 22.9028C14.5704 22.7847 14.412 22.7621 14.3434 22.8666C14.3302 22.8867 14.318 22.9068 14.307 22.9263C13.7887 23.8427 13.5393 24.9557 13.7698 25.9911C13.9831 26.9509 14.8594 27.5277 15.8282 27.6669C15.3056 27.4102 14.904 27.0038 14.7688 26.4597Z",fill:"#F7E7A1"})),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_7888",x1:"7.2",y1:"7.7",x2:"24.8",y2:"29.3",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#FFF09F"}),R.createElement("stop",{offset:"1",stopColor:"#FCCF5A"})),R.createElement("clipPath",{id:"clip0_1709_7888"},R.createElement("rect",{width:"25.6",height:"25.6",fill:"white",transform:"translate(3.2002 2.09998)"}))))},uB=xle;var ble=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"Reactions"},R.createElement("circle",{id:"Ellipse 2",cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1738)"}),R.createElement("path",{id:"circle",d:"M22.4466 10.5836C20.7296 9.07415 18.2009 9.36319 16.6088 11.0332L16.0156 11.6755L15.3912 11.0332C13.8303 9.36319 11.2704 9.07415 9.55338 10.5836C7.58661 12.3179 7.49295 15.401 9.24119 17.2637L15.2976 23.687C15.6722 24.1045 16.3278 24.1045 16.7024 23.687L22.7588 17.2637C24.507 15.401 24.4134 12.3179 22.4466 10.5836Z",fill:"white"})),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_1738",x1:"7.2",y1:"7.2",x2:"28",y2:"39.2",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#EE5C91"}),R.createElement("stop",{offset:"0.833333",stopColor:"#E02222"}))))},gB=ble;var Ile=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),R.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#63A1FF"}),R.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},fB=Ile;var pg=R.forwardRef((i,n)=>{var a=i,{src:e,mimeType:t,mediaFit:o}=a,r=P(a,["src","mimeType","mediaFit"]);return R.createElement("video",E(c({controls:!0,controlsList:"nodownload"},r),{ref:n,"data-qa-anchor":"video-preview"}),R.createElement("source",{src:e,type:t}),R.createElement("p",null,"Your browser does not support this format of video. Please try again later once the server transcodes the video into an playable format(mp4)."))});var ua={linkPreviewSkeleton:"yn",linkPreviewSkeleton__bottom:"kn",linkPreviewSkeleton__bar1:"jn",linkPreviewSkeleton__bar2:"zn",linkPreviewSkeleton__image:"Xn",linkPreviewSkeleton__animation:"Yn","skeleton-pulse":"Ie"};function yB(){return R.createElement("div",{className:ua.linkPreviewSkeleton},R.createElement("div",{className:cr(ua.linkPreviewSkeleton__image,ua.linkPreviewSkeleton__animation)}),R.createElement("div",{className:ua.linkPreviewSkeleton__bottom},R.createElement("div",{className:cr(ua.linkPreviewSkeleton__bar1,ua.linkPreviewSkeleton__animation)}),R.createElement("div",{className:cr(ua.linkPreviewSkeleton__bar2,ua.linkPreviewSkeleton__animation)})))}var Ii={linkPreview:"Cn",linkPreview__top:"An",linkPreview__bottom:"Mn",linkPreview__object:"Sn",linkPreview__unableToPreview:"En",linkPreview__unableToPreview__icon:"Fn"};var _le=e=>R.createElement("svg",c({width:"36",height:"27",viewBox:"0 0 36 27",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M32.625 0C34.4531 0 36 1.54688 36 3.375V23.625C36 25.5234 34.4531 27 32.625 27H3.375C1.47656 27 0 25.5234 0 23.625V3.375C0 1.54688 1.47656 0 3.375 0H32.625ZM32.2031 23.625C32.4141 23.625 32.625 23.4844 32.625 23.2031V3.79688C32.625 3.58594 32.4141 3.375 32.2031 3.375H3.79688C3.51562 3.375 3.375 3.58594 3.375 3.79688V23.2031C3.375 23.4844 3.51562 23.625 3.79688 23.625H32.2031ZM9 6.1875C10.5469 6.1875 11.8125 7.45312 11.8125 9C11.8125 10.6172 10.5469 11.8125 9 11.8125C7.38281 11.8125 6.1875 10.6172 6.1875 9C6.1875 7.45312 7.38281 6.1875 9 6.1875ZM6.75 20.25V16.875L9.49219 14.1328C9.84375 13.7812 10.3359 13.7812 10.6875 14.1328L13.5 16.875L21.8672 8.50781C22.2188 8.15625 22.7109 8.15625 23.0625 8.50781L29.25 14.625V20.25H6.75Z"})),gg=()=>R.createElement("div",{className:Ii.linkPreview__unableToPreview},R.createElement(_le,{className:Ii.linkPreview__unableToPreview__icon})),Tle=({url:e})=>{let{client:t}=Ae();return useQuery({enabled:!!t,queryKey:["asc-uikit","previewLink",e],queryFn:()=>_(void 0,null,function*(){let o=yield t==null?void 0:t.http.get("/api/v1/link-preview",{params:{url:e}});return o==null?void 0:o.data}),retry:!1})};function hB({url:e}){var n,i,a;let t=new URL(e),o=Tle({url:e});if(o.isLoading)return R.createElement(yB,null);let r=()=>{window.open(e,"_blank");};return o.isError?R.createElement(O,{onPress:r,className:Ii.linkPreview},R.createElement("div",{className:Ii.linkPreview__top},R.createElement(gg,null)),R.createElement("div",{className:Ii.linkPreview__bottom},R.createElement(S.Caption,null,t.hostname))):R.createElement(O,{onPress:r,className:Ii.linkPreview},R.createElement("div",{className:Ii.linkPreview__top},(n=o.data)!=null&&n.image?R.createElement("object",{data:o.data.image,className:Ii.linkPreview__object},R.createElement(gg,null)):(i=o.data)!=null&&i.video?R.createElement(pg,{src:o.data.video}):R.createElement(gg,null)),R.createElement("div",{className:Ii.linkPreview__bottom},R.createElement(S.Caption,null,t.hostname),R.createElement(S.BodyBold,null,((a=o.data)==null?void 0:a.title)||"")))}var fg=({text:e="",mentionees:t=[],mentioned:o})=>{if(!e)return null;let r=Hv.find(e).filter(n=>n.type==="url");return R.createElement(R.Fragment,null,R.createElement(Sm,{data:{text:e},mentionees:t,metadata:{mentioned:o}}),r&&r.length>0&&R.createElement(hB,{url:r[0].href}))};var ed={imageContent:"o",imageContent__img:"Bn",imageContent__imgContainer:"t",imageContent__imgCover:"Dn"};var Nle=e=>{let r=_n({fetcher:PostRepository.getPost,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return c({post:t},o)},wi=Nle;var Ele=({fileId:e})=>{let t=nt({fileId:e});return R.createElement("img",{loading:"lazy",className:ed.imageContent__img,src:t,alt:e})},Ble=({postId:e,index:t,imageLeftCount:o,postAmount:r,onImageClick:n})=>{let{post:i,isLoading:a}=wi(e);return a?null:R.createElement(O,{key:i.postId,className:ed.imageContent__imgContainer,onPress:()=>n()},R.createElement(Ele,{fileId:i.data.fileId}),o>0&&t===r-1&&R.createElement(S.Heading,{className:ed.imageContent__imgCover},"+ ",o))},yg=({pageId:e="*",componentId:t="*",elementId:o="*",post:r,onImageClick:n=()=>{}})=>{var p;let{themeStyles:i}=A({pageId:e,componentId:t,elementId:o}),a=r.children.slice(0,4),s=Math.max(0,r.children.length-4),{post:l,isLoading:d}=wi((p=r.children)==null?void 0:p[0]);return d||(l==null?void 0:l.dataType)!=="image"?null:R.createElement("div",{className:ed.imageContent,style:i,"data-images-amount":Math.min(r.children.length,4)},a.map((u,g)=>R.createElement(Ble,{key:u,postId:u,index:g,imageLeftCount:s,postAmount:r.children.length,onImageClick:()=>n(g)})))};var ga={videoContent:"i",videoContent__video:"Hn",videoContent__videoContainer:"l",videoContent__videoCover:"Ln",videoContent__playButtonCover:"Tn",videoContent__playButton:"Vn",videoContent__playButton__svg:"qn"};var Ale=e=>R.createElement("svg",c({width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("g",{id:"Icon ",clipPath:"url(#clip0_1936_14348)"},R.createElement("path",{id:"Vector",d:"M8.95117 5V19L19.9512 12L8.95117 5Z"})),R.createElement("defs",null,R.createElement("clipPath",{id:"clip0_1936_14348"},R.createElement("rect",{width:"24",height:"24",transform:"translate(0.951172)"})))),Dle=({fileId:e})=>{let t=nt({fileId:e});return R.createElement("img",{className:ga.videoContent__video,src:t,alt:e})},Hle=({postId:e,postAmount:t,videoLeftCount:o,index:r,onVideoClick:n})=>{let{post:i,isLoading:a}=wi(e);return a?null:R.createElement(O,{className:ga.videoContent__videoContainer,"data-videos-amount":Math.min(t,4),onPress:()=>n()},R.createElement(Dle,{fileId:i.data.thumbnailFileId}),o>0&&r===t-1&&R.createElement(S.Heading,{className:ga.videoContent__videoCover},"+ ",o),o===0||r<t-1?R.createElement("div",{className:ga.videoContent__playButtonCover},R.createElement("div",{className:ga.videoContent__playButton,onClick:()=>n()},R.createElement(Ale,{className:ga.videoContent__playButton__svg}))):null)},hg=({pageId:e="*",componentId:t="*",elementId:o="*",post:r,onVideoClick:n})=>{let{themeStyles:i}=A({pageId:e,componentId:t,elementId:o}),a=r.children.slice(0,4),{post:s}=wi(r.children[0]),l=Math.max(0,r.children.length-4);return (s==null?void 0:s.dataType)!=="video"?null:R.createElement("div",{className:ga.videoContent,style:i},R.createElement("div",{className:ga.videoContent,style:i,"data-videos-amount":Math.min(r.children.length,4)},a.map((d,p)=>R.createElement(Hle,{key:d,index:p,postId:d,videoLeftCount:l,postAmount:r.children.length,onVideoClick:()=>n(p)}))))};var Qr={modal:"Gn",modalContent:"Jn",closeButton:"Kn",fullImage:"Nn",nextButton:"On",prevButton:"Pn",overlayPanel:"Qn",overlayPanel__prev:"Re",overlayPanel__next:"Ue",overlayPanel__prevButton:"Be",overlayPanel__nextButton:"Wn",overlayPanel__middle:"Zn",imageViewer__clearButton:"_n",imageViewer__clearButton__img:"ed"};var vB=e=>R.createElement("svg",c({width:"6",height:"9",viewBox:"0 0 6 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M5.13281 4.71094L1.71094 8.17969C1.59375 8.29688 1.40625 8.29688 1.3125 8.17969L0.84375 7.71094C0.726562 7.59375 0.726562 7.42969 0.84375 7.3125L3.60938 4.5L0.84375 1.71094C0.726562 1.59375 0.726562 1.40625 0.84375 1.3125L1.3125 0.84375C1.40625 0.726562 1.59375 0.726562 1.71094 0.84375L5.13281 4.3125C5.25 4.42969 5.25 4.59375 5.13281 4.71094Z"}));function xB({pageId:e="*",componentId:t="*",elementId:o="*",post:r,initialImageIndex:n,onClose:i}){var h,x;let{themeStyles:a}=A({pageId:e,componentId:t,elementId:o}),[s,l]=useState(n),p=Va((r==null?void 0:r.children)||[]).filter(b=>b.dataType==="image"),u=p[s],g=se({fileId:(h=u==null?void 0:u.data)==null?void 0:h.fileId}),f=s<p.length-1,y=s>0,v=()=>{f&&l(b=>b+1);},C=()=>{y&&l(b=>b-1);};return R.createElement("div",{style:a},R.createElement("div",{className:Qr.modal,onClick:i},R.createElement("div",{className:Qr.modalContent,onClick:b=>b.stopPropagation()},R.createElement("img",{src:g,alt:((x=u==null?void 0:u.data)==null?void 0:x.fileId)||"",className:Qr.fullImage}),R.createElement("div",{className:Qr.overlayPanel},y&&R.createElement("div",{className:Qr.overlayPanel__prev,onClick:C},R.createElement(vB,{className:Qr.overlayPanel__prevButton})),R.createElement("div",{className:Qr.overlayPanel__middle}),f&&R.createElement("div",{className:Qr.overlayPanel__next,onClick:v},R.createElement(vB,{className:Qr.overlayPanel__nextButton}))),R.createElement("span",{className:Qr.closeButton},R.createElement(E1,{pageId:e,componentId:t,defaultClassName:Qr.imageViewer__clearButton,imgClassName:Qr.imageViewer__clearButton__img,onPress:i})))))}var Wr={modal:"rd",modalContent:"ad",closeButton:"od",fullImage:"td",nextButton:"id",prevButton:"ld",overlayPanel:"sd",overlayPanel__prev:"De",overlayPanel__next:"He",overlayPanel__prevButton:"Le",overlayPanel__nextButton:"cd",overlayPanel__middle:"nd",videoViewer__clearButton:"dd",videoViewer__clearButton__img:"md"};var Gle=memo(({videoPost:e})=>{let t=useMemo(()=>(e==null?void 0:e.data.videoFileId.high)||(e==null?void 0:e.data.videoFileId.medium)||(e==null?void 0:e.data.videoFileId.low)||(e==null?void 0:e.data.videoFileId.original)||void 0,[e]),o=Dt(t),r=Dt(e==null?void 0:e.data.thumbnailFileId),n=useRef(null),i=useMemo(()=>{if(o==null)return null;if(o.status===_0.Transcoded){let{videoUrl:a}=o;return (a==null?void 0:a["1080p"])||(a==null?void 0:a["720p"])||(a==null?void 0:a["480p"])||(a==null?void 0:a["360p"])||(a==null?void 0:a.original)||o.fileUrl}return o.fileUrl},[o]);return useEffect(()=>{var a;(a=n.current)==null||a.load();},[i]),i==null?R.createElement(R.Fragment,null):R.createElement("video",{controls:!0,controlsList:"nodownload",autoPlay:!0,className:Wr.fullImage,ref:n,poster:r==null?void 0:r.fileUrl},R.createElement("source",{src:i,type:"video/mp4"}),R.createElement("p",null,"Your browser does not support this format of video. Please try again later once the server transcodes the video into an playable format(mp4)."))});function IB({pageId:e="*",componentId:t="*",elementId:o="*",post:r,initialVideoIndex:n,onClose:i}){let{themeStyles:a}=A({pageId:e,componentId:t,elementId:o}),[s,l]=useState(n),p=Va((r==null?void 0:r.children)||[]).filter(C=>C.dataType==="video"),u=p[s],g=s<p.length-1,f=s>0,y=()=>{g&&l(C=>C+1);},v=()=>{f&&l(C=>C-1);};return R.createElement("div",{style:a},R.createElement("div",{className:Wr.modal,onClick:i},R.createElement("div",{className:Wr.modalContent,onClick:C=>C.stopPropagation()},R.createElement(Gle,{videoPost:u}),R.createElement("div",{className:Wr.overlayPanel},f&&R.createElement("div",{className:Wr.overlayPanel__prev,onClick:v},R.createElement(Yc,{className:Wr.overlayPanel__prevButton})),R.createElement("div",{className:Wr.overlayPanel__middle}),g&&R.createElement("div",{className:Wr.overlayPanel__next,onClick:y},R.createElement(Yc,{className:Wr.overlayPanel__nextButton}))),R.createElement("span",{className:Wr.closeButton},R.createElement(E1,{pageId:e,componentId:t,defaultClassName:Wr.videoViewer__clearButton,imgClassName:Wr.videoViewer__clearButton__img,onPress:i})))))}var MB=({post:e,community:t})=>{let{currentUserId:o}=Ae(),r=useMemo(()=>e.targetType==="community"&&e.targetId===(t==null?void 0:t.communityId),[e.targetType,t==null?void 0:t.communityId]),{moderators:n}=nm({communityId:t==null?void 0:t.communityId,shouldCall:r}),i=useMemo(()=>r?n.some(s=>s.userId===o):!1,[n,r,o]),a=e.postedUserId===o;return {isCommunityModerator:i,isOwner:a}};var zn={postMenu:"pd",postMenu__item:"g",postMenu__editPost__text:"gd",postMenu__editPost__icon:"hd",postMenu__reportPost__text:"fd",postMenu__reportPost__icon:"bd",postMenu__deletePost__text:"ud",postMenu__deletePost__icon:"vd"};var _B=({post:e,isFlaggable:t,onReportSuccess:o,onReportError:r,onUnreportSuccess:n,onUnreportError:i})=>{let a=useQueryClient(),s=(e==null?void 0:e.postId)||void 0,{data:l,isLoading:d}=useQuery({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s],queryFn:()=>PostRepository.isPostFlaggedByMe(s),enabled:s!=null&&t}),{mutateAsync:p}=useMutation({mutationFn:()=>_(void 0,null,function*(){return PostRepository.flagPost(e.postId)}),onMutate:()=>_(void 0,null,function*(){yield a.cancelQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),a.setQueryData(["asc-uikit","PostRepository","isPostFlaggedByMe",s],()=>!0);}),onSuccess:()=>{o==null||o();},onError:(g,f,y)=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),r==null||r(g);},onSettled:()=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]});}}),{mutateAsync:u}=useMutation({mutationFn:()=>_(void 0,null,function*(){return PostRepository.unflagPost(e.postId)}),onMutate:()=>_(void 0,null,function*(){yield a.cancelQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),a.setQueryData(["asc-uikit","PostRepository","isPostFlaggedByMe",s],()=>!1);}),onSuccess:()=>{n==null||n();},onError:(g,f,y)=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),i==null||i(g);},onSettled:()=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]});}});return {isLoading:d,isFlaggedByMe:l||!1,mutateReportPost:p,mutateUnReportPost:u}};var Un={createPost:"xd",createPost__topBar:"wd",createPost__status:"yd",createPost_infoIcon:"kd",createPost__notiWrap:"Te",createPost__formMediaAttachment:"Ve",drawer__content:"jd",mentionTextInput_item:"qe",drawerContentContainer:"Y"};var Xle=createContext({itemWithAds:[],isLoading:!1,prependItem:()=>{},removeItem:()=>{},updateItem:()=>{},loadMore:()=>{},hasMore:!1,loadMoreHasBeenCalled:!1,fetch:()=>{},refetch:()=>{},scrollPosition:0,onScroll:()=>{}}),bs=()=>{let e=useContext(Xle);if(!e)throw new Error("useGlobalFeedContext must be used within a GlobalFeedProvider");return e};var TB=()=>/Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);var kB=e=>new Promise((t,o)=>{let r=document.createElement("video"),n=document.createElement("canvas"),i=n.getContext("2d");r.src=URL.createObjectURL(e);let a=()=>{r.currentTime=10;},s=()=>{try{n.width=r.videoWidth,n.height=r.videoHeight,i==null||i.drawImage(r,0,0,n.width,n.height);let d=n.toDataURL("image/png");t(d);}catch(d){o(d);}finally{r.removeEventListener("canplay",a),r.removeEventListener("seeked",s),r.removeEventListener("error",l),URL.revokeObjectURL(r.src);}},l=d=>{o(new Error(`Error loading video: ${d}`));};r.addEventListener("canplay",a),r.addEventListener("seeked",s),r.addEventListener("error",l),r.load();});var SB={createNewPostButton:"Ge"};function vg({pageId:e="*",componentId:t="*",isValid:o,onSubmit:r}){let n="create_new_post_button",{config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:n});return a?null:R.createElement("button",{onSubmit:r,style:s,disabled:!o,className:SB.createNewPostButton,type:"submit"},i.text)}var L1={thumbnail__container:"h",thumbnail__wrapper:"Je",thumbnail:"zd",closeIcon:"Xd",icon__status:"Yd"};var tme=ka`
|
|
4734
4734
|
from {
|
|
4735
4735
|
transform: rotate(0deg);
|
|
4736
4736
|
}
|
|
@@ -4739,9 +4739,9 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4739
4739
|
}
|
|
4740
4740
|
`,NB=m.svg`
|
|
4741
4741
|
animation: ${tme} 2s linear infinite;
|
|
4742
|
-
`;var ga=e=>R.createElement(NB,c({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none"},e),R.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"white",strokeWidth:"2"}),R.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"#1054DE",strokeWidth:"2",strokeDasharray:"46.75",strokeDashoffset:"21",strokeLinecap:"round",strokeLinejoin:"round"}));function ime(e){return e.fileId!==void 0}function td({files:e=[],uploadedFiles:t=[],onChange:o=i=>{},onLoadingChange:r=i=>{},onError:n=i=>{}}){let[i,a]=useState([]),s=useMemo(()=>Array.isArray(e)?e:Array.from(e),[e]),l=useCallback(()=>{o({uploaded:[],uploading:[]});},[o]),d=useCallback(()=>{a([]);},[]),p=useCallback((g,f)=>{if(ime(g)){let y=t.filter(v=>v.fileId!==g.fileId);o({uploaded:y,uploading:s});}else if(f!==void 0){let y=t.filter((v,C)=>C!==f);o({uploaded:y,uploading:s});}else {let y=s.filter(v=>v.name!==g.name);o({uploaded:t,uploading:y});}},[o,t,s]);return useEffect(()=>{if(!s.length)return;function g(){return _(this,null,function*(){r(!0);try{let f=yield Promise.all(s.map(v=>_(this,null,function*(){let C=new FormData;C.append("files",v);let h=yield _(this,null,function*(){if(v.type.includes(FileType.IMAGE))return FileRepository.createImage(C);if(v.type.includes(FileType.VIDEO))return FileRepository.createVideo(C)});return h&&h.data.length>0?h.data[0]:null}))),y=[...t,...f].filter(Fe);o({uploaded:y,uploading:[]}),a([]);}catch(f){a(s.map(y=>y.name)),n(!0);}finally{r(!1);}})}g();},[s]),{allFiles:[...t,...s],uploading:s,uploaded:t,removeFile:p,reset:l,rejected:i,retry:d}}function Ig({files:e,uploadedFiles:t,onChange:o,onLoadingChange:r,uploadLoading:n,onError:i,isErrorUpload:a}){let s=td({files:e,uploadedFiles:t,onChange:o,onLoadingChange:r,onError:i}),{allFiles:l,removeFile:d}=s;return l.length===0?null:l&&R.createElement("div",{"data-images-amount":Math.min(l.length,3),className:L1.thumbnail__container},l==null?void 0:l.map((p,u)=>{var g;return R.createElement("div",{key:u,"data-images-height":l.length>2,className:L1.thumbnail__wrapper},n?R.createElement("div",{className:L1.icon__status},R.createElement(ga,null)):a?R.createElement("div",{className:L1.icon__status},R.createElement(Zt,null)):R.createElement(R.Fragment,null,R.createElement("img",{className:L1.thumbnail,src:FileRepository.fileUrlWithSize(p==null?void 0:p.fileUrl,"medium"),alt:(g=p.attributes)==null?void 0:g.name}),R.createElement("button",{type:"reset",onClick:()=>d(p)},R.createElement(Po,{className:L1.closeIcon}))))}))}var fa={thumbnail__container:"f",thumbnail__wrapper:"Cd",thumbnail__wrapper_item_3:"Ad",thumbnail:"Md",closeIcon:"Sd",icon__status:"Ed",playIcon:"Fd"};var wg=({files:e,uploadedFiles:t,onLoadingChange:o,onChange:r,uploadLoading:n,onError:i,videoThumbnail:a,removeThumbnail:s,isErrorUpload:l})=>{let d=td({files:e,uploadedFiles:t,onChange:r,onLoadingChange:o,onError:i}),{allFiles:p,removeFile:u}=d;if(p.length===0)return null;let g=(f,y)=>{u(f,y),s(y);};return a?R.createElement("div",{"data-images-amount":Math.min(a.length,3),className:fa.thumbnail__container},a==null?void 0:a.map((f,y)=>R.createElement("div",{key:f.videoUrl,className:cr(fa.thumbnail__wrapper,a.length>2&&fa.thumbnail__wrapper_item_3)},n?R.createElement("div",{className:fa.icon__status},R.createElement(ga,null)):l?R.createElement("div",{className:fa.icon__status},R.createElement(Zt,null)):R.createElement(R.Fragment,null,R.createElement("img",{className:fa.thumbnail,src:f.thumbnail}),R.createElement("button",{type:"reset",onClick:()=>{g(f.file,y);}},R.createElement(Po,{className:fa.closeIcon})),R.createElement("div",{className:fa.playIcon},R.createElement(Mo,null)))))):null};var ume=({ref:e})=>{let[t,o]=useState(void 0);return useEffect(()=>{if(e.current==null)return;let r=new ResizeObserver(n=>{for(let i of n)o(i.target.clientHeight);});return e.current&&r.observe(e.current),()=>{r.disconnect();}},[e.current]),t};function _g({community:e,targetType:t,targetId:o}){let r="post_composer_page",{themeStyles:n}=Ye({pageId:r}),i="6.75rem",a="8.5rem",s="11rem",l="14.5rem",{AmityPostComposerPageBehavior:d}=bt(),{confirm:p}=Re(),[u,g]=useState(i),[f]=useState(!0),y=useRef(null),v=useRef(null),{prependItem:C}=bs(),h=ume({ref:v}),{handleSubmit:x}=useForm(),[b,M]=useState({text:"",mentioned:[],mentionees:[{type:"user",userIds:[""]}],attachments:[{fileId:"",type:"image"}]}),[I,w]=useState([]),[N,T]=useState([]),[L,D]=useState([]),[U,Z]=useState([]),[B,$]=useState(!1),[G,q]=useState([]),[z,H]=useState(!1),[F,j]=useState(!0),[Q,k]=useState(!0),[V,ae]=useState(!1),[oe,be]=useState([]),pe=useRef(null),We=()=>useMutation({mutationFn:ce=>_(this,null,function*(){return PostRepository.createPost(ce)}),onSuccess:ce=>{var ue;(ue=d==null?void 0:d.goToSocialHomePage)==null||ue.call(d),C(ce.data);},onError:ce=>{console.error("Failed to create post",ce);}}),{mutateAsync:vt,isPending:Vt,isError:jt}=We(),De=()=>{let ce=I.map(Uo=>({type:"image",fileId:Uo.fileId})),ue=N.map(Uo=>({type:"video",fileId:Uo.fileId})),tn=[...ce,...ue];vt({targetId:o,targetType:t,data:{text:b.text},dataType:"text",metadata:{mentioned:b.mentioned},mentionees:b.mentionees,attachments:tn});},ir=ce=>{M(ue=>E(c({},ue),{mentioned:ce.mentioned,text:ce.text,mentionees:ce.mentionees}));},Dr=ce=>{u===i&&ce==="0px"||g(ce);},qe=()=>{p({pageId:r,type:"confirm",title:"Discard this post?",content:"The post will be permanently deleted. It cannot be undone.",onOk:()=>{var ce;(ce=d==null?void 0:d.goToSocialHomePage)==null||ce.call(d);},okText:"Discard",cancelText:"Keep editing"});};useEffect(()=>{I.length>0?(j(!0),k(!1)):N.length>0&&oe.length>0?(j(!1),k(!0)):(I.length==0||oe.length==0)&&(j(!0),k(!0));},[I,N,F,Q,oe]),useEffect(()=>{TB()?H(!0):H(!1);},[]),useEffect(()=>{g(!z&&F&&Q||z&&F&&!Q||z&&!F&&Q?s:!z&&F&&!Q||!z&&!F&&Q?a:l);},[z,F,Q]);let Rr=ce=>{be(ue=>ue.filter((tn,Uo)=>Uo!==ce));},bn=ce=>{if(ce.length+G.length>10){p({pageId:r,type:"info",title:"Maximum upload limit reached",content:"You\u2019ve reached the upload limit of 10 images. Any additional images will not be saved. ",okText:"Close"});return}ce.length>0&&(q(ue=>[...ue,...ce]),D(ce));},Hr=ce=>_(this,null,function*(){let ue=oe?oe.length:0;if(ce.length+ue>10){p({pageId:r,type:"info",title:"Maximum upload limit reached",content:"You\u2019ve reached the upload limit of 10 videos. Any additional videos will not be saved. ",okText:"Close"});return}if(ce.length>0){Z==null||Z(ce);let tn=ce.map(Fr=>({file:Fr,videoUrl:URL.createObjectURL(Fr),thumbnail:void 0})),Uo=yield Promise.all(tn.map(Fr=>_(this,null,function*(){let Bi=yield kB(Fr.file);return E(c({},Fr),{thumbnail:Bi})})));be(Fr=>[...Fr,...Uo]);}}),en=u==a||u==s||u==l;return R.createElement("div",{className:Un.createPost,style:n},R.createElement("form",{onSubmit:x(De),"data-from-media":u==i,className:Un.createPost__formMediaAttachment},R.createElement("div",{className:Un.createPost__topBar},R.createElement(kr,{pageId:r,onPress:qe}),R.createElement(da,{pageId:r,community:e}),R.createElement(vg,{pageId:r,onSubmit:x(De),isValid:b.text.length>0||I.length>0||N.length>0})),R.createElement(Qi,{onChange:ir,communityId:o,mentionContainer:pe.current,dataValue:{data:{text:b.text}}}),R.createElement(Ig,{files:L,uploadedFiles:I,uploadLoading:B,onLoadingChange:$,onChange:({uploaded:ce,uploading:ue})=>{w(ce),D(ue);},onError:ae,isErrorUpload:V}),R.createElement(wg,{files:U,uploadedFiles:N,uploadLoading:B,onLoadingChange:$,onChange:({uploaded:ce,uploading:ue})=>{T(ce),Z(ue);},onError:ae,isErrorUpload:V,videoThumbnail:oe,removeThumbnail:Rr}),R.createElement("div",{ref:pe,style:{"--asc-mention-bottom":`${h!=null?h:0}px`},className:Un.mentionTextInput_item})),R.createElement("div",{ref:y}),y.current?Rv.createPortal(R.createElement(Drawer.Root,{snapPoints:[i,a,s,l],activeSnapPoint:u,setActiveSnapPoint:ce=>{typeof ce=="string"&&Dr(ce);},open:f,modal:!1},R.createElement(Drawer.Portal,{container:y.current},R.createElement(Drawer.Content,{className:Un.drawer__content},R.createElement("div",{"data-item-position":u===i,className:Un.createPost__notiWrap},Vt&&R.createElement(Os,{content:"Posting...",icon:R.createElement(ga,null),className:Un.createPost__status}),jt&&R.createElement(Os,{content:"Failed to create post",icon:R.createElement(Y1,{className:Un.createPost_infoIcon}),className:Un.createPost__status,duration:3e3})),R.createElement("div",{ref:v,className:Un.drawerContentContainer,"data-show-detail-media-attachment":en},en?R.createElement(h5,{pageId:r,isVisibleCamera:z,isVisibleImage:F,isVisibleVideo:Q,onVideoFileChange:Hr,onImageFileChange:bn}):R.createElement(y5,{pageId:r,isVisibleCamera:z,isVisibleImage:F,isVisibleVideo:Q,onVideoFileChange:Hr,onImageFileChange:bn}))))),y.current):null)}var ya={editPost:"Id",editPost__topBar:"Rd",editPost__status:"Ud",editPost_infoIcon:"Bd",editPost__notiWrap:"Dd",editPost__formMediaAttachment:"Ke",drawer__content:"Hd",mentionTextInput_item:"Ne"};var LB={editPostButton:"Oe"};function Tg(r){var n=r,{pageId:e="*",componentId:t="*"}=n,o=P(n,["pageId","componentId"]);let i="edit_post_button",{config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:i});return s?null:R.createElement(O,c({style:l,className:LB.editPostButton},o),a.text)}var AB={editPostTitle:"Ld"};function kg({pageId:e="*",componentId:t="*"}){let o="edit_post_title",{config:r,isExcluded:n,themeStyles:i}=A({pageId:e,componentId:t,elementId:o});return n?null:R.createElement("div",{style:i,className:AB.editPostTitle},r.text)}var Ime=e=>{let[t,o]=useState([]);return useEffect(()=>{function r(){return _(this,null,function*(){if(!e||(e==null?void 0:e.length)===0)return;let n=yield PostRepository.getPostByIds(e);o(n.data);})}r();},[e]),t},DB=Ime;var A1={thumbnail__container:"b",thumbnail__wrapper:"Pe",thumbnail:"Td",thumbnail__closeButton:"Vd",thumbnail__closeIcon:"qd",icon__status:"Gd",playIcon:"Jd"};var Mme=({fieldId:e,onRemove:t,type:o})=>{let r=nt({fileId:e});return r?R.createElement(R.Fragment,null,R.createElement("img",{className:A1.thumbnail,src:r,alt:"thumbnail"}),R.createElement(O,{type:"reset",onPress:()=>t(),className:A1.thumbnail__closeButton},R.createElement(Po,{className:A1.thumbnail__closeIcon})),o===PostContentType.VIDEO&&R.createElement("div",{className:A1.playIcon,"data-image":"test"},R.createElement(Mo,null))):null},Ng=({postMedia:e,onRemove:t})=>e.length==0?null:R.createElement("div",{"data-images-amount":Math.min(e.length,3),className:A1.thumbnail__container},e==null?void 0:e.map((o,r)=>R.createElement("div",{key:r,"data-images-height":e.length>2,className:A1.thumbnail__wrapper},R.createElement(Mme,{type:o.dataType,key:r,fieldId:o.dataType===PostContentType.IMAGE?o.data.fileId:o.data.thumbnailFileId,onRemove:()=>t(o.dataType===PostContentType.IMAGE?o.data.fileId:o.data.videoFileId.original)}))));var Eg=(e,t)=>{if(e.length!==t.length)return !1;let o=[...e].sort(),r=[...t].sort();for(let n=0;n<o.length;n++)if(o[n]!==r[n])return !1;return !0};function Bg({post:e}){var $,G,q;let t="post_composer_page",{themeStyles:o}=Ye({pageId:t}),{onBack:r}=Be(),{confirm:n}=Re(),{updateItem:i}=bs(),[a,s]=useState({text:($=e.data.text)!=null?$:"",mentioned:((G=e.metadata)==null?void 0:G.mentioned)||[],mentionees:e.mentionees,attachments:[{fileId:"",type:"image"}]}),[l,d]=useState([]),[p,u]=useState([]),[g,f]=useState([]),[y,v]=useState([]),C=useRef(null),h=()=>useMutation({mutationFn:z=>_(this,null,function*(){return yield PostRepository.editPost(e.postId,z)}),onSuccess:z=>{r(),i(z.data);},onError:z=>{console.error("Failed to edit post",z);}}),{mutateAsync:x,isPending:b,isError:M}=h(),{handleSubmit:I}=useForm(),w=DB((e==null?void 0:e.children)||[]);useEffect(()=>{let z=w.filter(F=>F.dataType==="image");f(z),d(z);let H=w.filter(F=>F.dataType==="video");v(H),u(H);},[w]);let N=z=>{d(H=>H.filter(F=>F.data.fileId!==z));},T=z=>{u(H=>H.filter(F=>F.data.videoFileId.original!==z));},L=()=>{var j,Q;let z=l.map(k=>({fileId:k.data.fileId,type:PostContentType.IMAGE})),H=p.map(k=>({fileId:k.data.videoFileId.original,type:"video"})),F=[...z,...H];a&&x({data:{text:a.text},metadata:{mentioned:(j=a.mentioned)!=null?j:[]},mentionees:(Q=a.mentionees)!=null?Q:[],attachments:F});},D=z=>{s(H=>E(c({},H),{mentioned:z.mentioned,text:z.text,mentionees:z.mentionees}));},U=()=>{n({pageId:t,type:"confirm",title:"Discard this post?",content:"The post will be permanently deleted. It cannot be undone.",onOk:()=>{r();},okText:"Discard",cancelText:"Keep editing"});},Z=!Eg(g,l),B=!Eg(y,p);return R.createElement("div",{className:ya.editPost,style:o},R.createElement("form",{onSubmit:I(L),className:ya.editPost__formMediaAttachment},R.createElement("div",{className:ya.editPost__topBar},R.createElement(kr,{pageId:t,onPress:U}),R.createElement(kg,{pageId:t}),R.createElement(Tg,{pageId:t,type:"submit",onPress:()=>I(L),isDisabled:e.data.text==a.text&&!Z&&!B||!(a.text.length>0||l.length>0||p.length>0)})),R.createElement(Qi,{communityId:e.targetType==="community"?e.targetId:void 0,onChange:D,mentionContainer:C.current,dataValue:{data:{text:e.data.text},metadata:{mentioned:((q=e.metadata)==null?void 0:q.mentioned)||[]},mentionees:e.mentionees}}),R.createElement(Ng,{postMedia:l,onRemove:N}),R.createElement(Ng,{postMedia:p,onRemove:T}),R.createElement("div",{ref:C,className:ya.mentionTextInput_item}),R.createElement("div",{className:ya.editPost__notiWrap},b&&R.createElement(Os,{content:"Posting...",icon:R.createElement(ga,null),className:ya.editPost__status}),M&&R.createElement(Os,{content:"Failed to edit post",icon:R.createElement(Zt,{className:ya.editPost_infoIcon}),className:ya.editPost__status,duration:3e3}))))}var Eme=e=>e.mode==="create";function Lg(e){if(Eme(e)){let{targetId:t,targetType:o,community:r}=e;return R.createElement(_g,{mode:"create",targetId:t,targetType:o,community:r})}else {let{post:t}=e;return R.createElement(Bg,{mode:"edit",post:t})}}var Ame=e=>R.createElement("svg",c({width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M18.3804 2.25391C19.2593 3.13281 19.2593 4.53906 18.3804 5.41797L15.7437 8.05469L14.5483 9.25L5.97021 17.8281L1.9624 18.25C1.92725 18.25 1.89209 18.25 1.85693 18.25C1.36475 18.25 0.978027 17.8281 1.04834 17.3359L1.47021 13.3281L10.0483 4.75L11.2437 3.55469L13.8804 0.917969C14.3022 0.496094 14.8999 0.25 15.4624 0.25C16.0249 0.25 16.6226 0.496094 17.0444 0.917969L18.3804 2.25391ZM5.19678 16.2109L13.353 8.08984L14.4429 7L12.2983 4.85547L11.2085 5.94531L3.0874 14.1016L2.84131 16.457L5.19678 16.2109ZM17.1851 4.22266C17.396 4.01172 17.396 3.66016 17.1851 3.44922L15.8491 2.11328C15.7085 1.97266 15.5327 1.9375 15.4624 1.9375C15.3921 1.9375 15.2163 1.97266 15.0757 2.11328L13.4937 3.66016L15.6382 5.80469L17.1851 4.22266Z"})),Dme=e=>R.createElement("svg",c({width:"16",height:"19",viewBox:"0 0 16 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M15.3608 3.0625C15.6421 3.0625 15.9233 3.34375 15.9233 3.625V4.1875C15.9233 4.50391 15.6421 4.75 15.3608 4.75H14.7983L14.0249 16.668C13.9897 17.5469 13.2163 18.25 12.3374 18.25H3.72412C2.84521 18.25 2.07178 17.5469 2.03662 16.668L1.29834 4.75H0.73584C0.419434 4.75 0.17334 4.50391 0.17334 4.1875V3.625C0.17334 3.34375 0.419434 3.0625 0.73584 3.0625H3.61865L4.81396 1.09375C5.09521 0.636719 5.72803 0.25 6.25537 0.25H9.80615C10.3335 0.25 10.9663 0.636719 11.2476 1.09375L12.4429 3.0625H15.3608ZM6.25537 1.9375L5.5874 3.0625H10.4741L9.80615 1.9375H6.25537ZM12.3374 16.5625L13.0757 4.75H2.98584L3.72412 16.5625H12.3374Z"})),Hme=e=>R.createElement("svg",c({width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M12.3125 3.0625C13.543 3.0625 14.8789 2.64062 16.1445 2.07812C17.2344 1.62109 18.5 2.42969 18.5 3.625V12.0625C18.5 12.6602 18.1836 13.1875 17.7266 13.5039C16.7773 14.1016 15.2656 14.875 13.1914 14.875C10.8008 14.875 9.21875 13.75 7.49609 13.75C5.52734 13.75 4.33203 14.1719 3.03125 14.7695V17.6875C3.03125 18.0039 2.75 18.25 2.46875 18.25H1.90625C1.58984 18.25 1.34375 18.0039 1.34375 17.6875V3.41406C0.816406 3.13281 0.5 2.57031 0.5 1.9375C0.5 0.988281 1.30859 0.214844 2.29297 0.285156C3.10156 0.320312 3.76953 0.953125 3.83984 1.76172C3.83984 1.79688 3.875 1.90234 3.875 1.9375C3.875 2.11328 3.80469 2.35938 3.76953 2.5C4.54297 2.18359 5.49219 1.9375 6.61719 1.9375C9.00781 1.9375 10.5898 3.0625 12.3125 3.0625ZM16.8125 12.0625V3.625C15.6875 4.15234 13.8242 4.75 12.3125 4.75C10.2031 4.75 8.72656 3.625 6.61719 3.625C5.14062 3.625 3.76953 4.22266 3.03125 4.75V12.9062C4.12109 12.4141 5.98438 12.0625 7.49609 12.0625C9.60547 12.0625 11.082 13.1875 13.1914 13.1875C14.668 13.1875 16.0391 12.625 16.8125 12.0625Z"})),S5=({post:e,pageId:t="*",componentId:o="*",elementId:r="*",onCloseMenu:n,onPostDeleted:i})=>{let{success:a,error:s}=_o(),l=useMemo(()=>(e==null?void 0:e.targetType)==="community",[e==null?void 0:e.targetType]),{community:d}=Pt({communityId:e==null?void 0:e.targetId,shouldCall:l}),{isCommunityModerator:p,isOwner:u}=MB({post:e,community:d}),{AmityPostContentComponentBehavior:g}=bt(),{removeDrawerData:f}=Wm(),{showEditPostButton:y,showDeletePostButton:v,showReportPostButton:C}=useMemo(()=>p?u?{showEditPostButton:!0,showDeletePostButton:!0,showReportPostButton:!1}:{showEditPostButton:!1,showDeletePostButton:!0,showReportPostButton:!0}:u?{showEditPostButton:!0,showDeletePostButton:!0,showReportPostButton:!1}:{showEditPostButton:!1,showDeletePostButton:!1,showReportPostButton:!0},[p,u]),{isFlaggedByMe:h,isLoading:x,mutateReportPost:b,mutateUnReportPost:M}=_B({post:e,isFlaggable:C,onReportSuccess:()=>{a({content:"Post reported."});},onReportError:()=>{s({content:"Failed to report post."});},onUnreportSuccess:()=>{a({content:"Post unreported."});},onUnreportError:()=>{s({content:"Failed to unreport post."});}}),{confirm:I}=Re(),{mutateAsync:w}=useMutation({mutationFn:()=>_(void 0,null,function*(){return n(),PostRepository.hardDeletePost(e.postId)}),onSuccess:()=>{a({content:"Post deleted."}),i==null||i(e);},onError:()=>{s({content:"Failed to delete post."});}}),N=()=>{n(),I({title:"Delete post",content:"This post will be permanently deleted.",cancelText:"Cancel",okText:"Delete",onOk:()=>w(),pageId:t,componentId:o});};return R.createElement("div",{className:zn.postMenu},C&&!x?R.createElement(O,{className:zn.postMenu__item,onPress:()=>{h?M():b(),f();}},R.createElement(Hme,{className:zn.postMenu__reportPost__icon}),R.createElement(S.Title,{className:zn.postMenu__reportPost__text},h?"Unreport post":"Report post")):null,y?R.createElement(O,{className:zn.postMenu__item,onPress:()=>{var T;f(),(T=g==null?void 0:g.goToPostComposerPage)==null||T.call(g,{mode:"edit",post:e});}},R.createElement(Ame,{className:zn.postMenu__editPost__icon}),R.createElement(S.Title,{className:zn.postMenu__editPost__text},"Edit post")):null,v?R.createElement(O,{className:zn.postMenu__item,onPress:()=>N()},R.createElement(Dme,{className:zn.postMenu__deletePost__icon}),R.createElement(S.Title,{className:zn.postMenu__deletePost__text},"Delete post")):null)};var UB=({post:e,community:t})=>{let{currentUserId:o}=Ae(),r=useMemo(()=>(e==null?void 0:e.targetType)==="community"&&(e==null?void 0:e.targetId)===(t==null?void 0:t.communityId),[e==null?void 0:e.targetType,t==null?void 0:t.communityId]),{moderators:n}=nm({communityId:t==null?void 0:t.communityId,shouldCall:r}),i=useMemo(()=>r?n.some(s=>s.userId===(e==null?void 0:e.postedUserId)):!1,[n,r,e==null?void 0:e.postedUserId]),a=(e==null?void 0:e.postedUserId)===o;return {isCommunityModerator:i,isOwner:a}};var $B=({threshold:e,elementRef:t})=>{let[o,r]=useState(!1);return useEffect(()=>{if(!t.current)return;let n=new IntersectionObserver(i=>{i.forEach(a=>{let s=a.isIntersecting;r(s);});},{threshold:e});return n.observe(t.current),()=>{n.disconnect();}},[e,t]),{isVisible:o}};var VB={announcementBadge:"Kd"};var Ag={featuredIcon__background:"Nd",featuredIcon__textColor:"Od"};var jB=r=>{var n=r,{backgroundColor:e,textColor:t}=n,o=P(n,["backgroundColor","textColor"]);return R.createElement("svg",c({width:"73",height:"26",viewBox:"0 0 73 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),R.createElement("path",{d:"M0 0H69C71.2091 0 73 1.79086 73 4V22C73 24.2091 71.2091 26 69 26H0V0Z",className:Ag.featuredIcon__background,fill:e}),R.createElement("path",{d:"M9.12988 18V8.84033H14.9697V10.2178H10.7676V12.9282H14.6079V14.2612H10.7676V18H9.12988ZM19.5108 18.1396C17.4478 18.1396 16.1973 16.7559 16.1973 14.5469V14.5405C16.1973 12.3569 17.4605 10.9287 19.4346 10.9287C21.4088 10.9287 22.6275 12.3125 22.6275 14.4072V14.9277H17.7779C17.797 16.1719 18.4698 16.8955 19.5426 16.8955C20.3995 16.8955 20.8883 16.4639 21.0406 16.1465L21.0596 16.1021H22.564L22.545 16.1592C22.3228 17.0542 21.3961 18.1396 19.5108 18.1396ZM19.4537 12.1665C18.5714 12.1665 17.9112 12.7632 17.7906 13.8677H21.085C20.9771 12.7314 20.336 12.1665 19.4537 12.1665ZM26.0197 18.1143C24.6994 18.1143 23.7409 17.3018 23.7409 16.0386V16.0259C23.7409 14.7881 24.6867 14.0645 26.3752 13.9629L28.1588 13.855V13.2583C28.1588 12.5664 27.7082 12.1855 26.8576 12.1855C26.1339 12.1855 25.6642 12.4458 25.5055 12.9028L25.4992 12.9282H24.0075L24.0138 12.8711C24.1662 11.7031 25.2834 10.9287 26.9338 10.9287C28.7174 10.9287 29.7204 11.792 29.7204 13.2583V18H28.1588V17.0479H28.0509C27.6701 17.7207 26.9338 18.1143 26.0197 18.1143ZM25.3024 15.9624C25.3024 16.5527 25.8039 16.9019 26.5021 16.9019C27.4543 16.9019 28.1588 16.2798 28.1588 15.4546V14.896L26.5973 14.9976C25.715 15.0547 25.3024 15.3784 25.3024 15.9497V15.9624ZM34.2678 18.0317C32.6746 18.0317 32.0207 17.4985 32.0207 16.1592V12.2871H30.9416V11.062H32.0207V9.36084H33.6267V11.062H35.093V12.2871H33.6267V15.7847C33.6267 16.4766 33.8996 16.7686 34.5598 16.7686C34.782 16.7686 34.9026 16.7622 35.093 16.7432V17.9619C34.8645 18.0063 34.5725 18.0317 34.2678 18.0317ZM38.8851 18.1396C37.3236 18.1396 36.5238 17.2002 36.5238 15.5498V11.062H38.1043V15.188C38.1043 16.2607 38.5042 16.8066 39.4564 16.8066C40.4783 16.8066 41.0242 16.1465 41.0242 15.1055V11.062H42.6048V18H41.0242V16.9463H40.9163C40.5926 17.689 39.888 18.1396 38.8851 18.1396ZM44.4545 18V11.062H46.0351V12.1284H46.143C46.3778 11.3857 47.0126 10.9478 47.9267 10.9478C48.1679 10.9478 48.4154 10.9795 48.5678 11.0239V12.4395C48.3139 12.3887 48.0536 12.3506 47.7807 12.3506C46.727 12.3506 46.0351 12.979 46.0351 13.9692V18H44.4545ZM52.5757 18.1396C50.5127 18.1396 49.2622 16.7559 49.2622 14.5469V14.5405C49.2622 12.3569 50.5254 10.9287 52.4995 10.9287C54.4736 10.9287 55.6924 12.3125 55.6924 14.4072V14.9277H50.8428C50.8618 16.1719 51.5346 16.8955 52.6074 16.8955C53.4643 16.8955 53.9531 16.4639 54.1054 16.1465L54.1245 16.1021H55.6289L55.6098 16.1592C55.3877 17.0542 54.4609 18.1396 52.5757 18.1396ZM52.5185 12.1665C51.6362 12.1665 50.9761 12.7632 50.8554 13.8677H54.1499C54.042 12.7314 53.4009 12.1665 52.5185 12.1665ZM59.6939 18.1143C57.9546 18.1143 56.8502 16.7368 56.8502 14.5405V14.5278C56.8502 12.3188 57.9356 10.9478 59.6939 10.9478C60.6461 10.9478 61.4395 11.4175 61.8013 12.1665H61.9092V8.37695H63.4962V18H61.9092V16.9146H61.8013C61.4205 17.6699 60.6714 18.1143 59.6939 18.1143ZM60.189 16.7812C61.2681 16.7812 61.9346 15.9307 61.9346 14.5405V14.5278C61.9346 13.1377 61.2618 12.2808 60.189 12.2808C59.1163 12.2808 58.4561 13.1313 58.4561 14.5278V14.5405C58.4561 15.937 59.1099 16.7812 60.189 16.7812Z",className:Ag.featuredIcon__textColor,fill:t}))};var Fg=({pageId:e="*",componentId:t="*"})=>{let o="announcement_badge",{config:r,isExcluded:n,accessibilityId:i,uiReference:a,defaultConfig:s}=A({pageId:e,componentId:t,elementId:o});return n?null:R.createElement(ee,{"data-qa-anchor":i,defaultIcon:()=>R.createElement(jB,{className:VB.announcementBadge}),imgIcon:()=>R.createElement("img",{src:r.icon,alt:a}),configIconName:r.icon,defaultIconName:s.icon})};var GB={pinBadge__icon:"Pd"};var QB=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"29",height:"30",fill:"none",viewBox:"0 0 29 30"},e),R.createElement("path",{fill:e.fill,d:"M18.106 16.436c.575 1.547.53 3.27-.596 4.398a.74.74 0 01-1.06 0l-3.006-3.005-2.32 2.32c-.022.022-.067.022-.089.044l-1.59.53c-.2.067-.398-.132-.332-.331l.53-1.591.066-.066 2.32-2.32-3.005-3.006a.722.722 0 010-1.06c1.105-1.105 2.829-1.194 4.376-.62l2.917-2.342-.929-.928a.722.722 0 010-1.06l1.061-1.06a.74.74 0 011.06 0l6.011 6.01a.76.76 0 010 1.06l-1.06 1.06a.74.74 0 01-1.061 0l-.95-.95-2.343 2.917z"}));var zg=({pageId:e,componentId:t})=>{let o="pin_badge",{config:r,isExcluded:n,accessibilityId:i,uiReference:a,defaultConfig:s}=A({pageId:e,componentId:t,elementId:o});return n?null:R.createElement(ee,{"data-qa-anchor":i,defaultIcon:()=>R.createElement(QB,{className:GB.pinBadge__icon}),imgIcon:()=>R.createElement("img",{src:r.icon,alt:a}),defaultIconName:s.icon,configIconName:r.icon})};var Zme=({pageId:e,post:t,hideTarget:o})=>{var s;let r=useMemo(()=>(t==null?void 0:t.targetType)==="community",[t==null?void 0:t.targetType]),{community:n}=Pt({communityId:t==null?void 0:t.targetId,shouldCall:r}),{goToCommunityProfilePage:i,onClickUser:a}=Be();return n?R.createElement("div",{className:ye.postTitle},t.creator&&R.createElement("div",{className:ye.postTitle__user__container},R.createElement(S.BodyBold,{className:ye.postTitle__text},R.createElement(O,{onPress:()=>a(t.creator.userId)},"aensuthasneuthasnetusantheusnatheusnthasenuthasnteuhsanteuhsnatehusntaheusntaheu")),t.creator.isBrand?null:R.createElement(Zc,{className:ye.postTitle__brandIcon}),n?R.createElement(Yc,{className:ye.postTitle__icon}):null),n&&!o&&R.createElement(R.Fragment,null,R.createElement(O,{onPress:()=>{i(n.communityId);}},R.createElement(S.BodyBold,{className:ye.postTitle__text},n.displayName)))):R.createElement("div",{className:ye.postTitle__user__container},R.createElement(O,{onPress:()=>t.creator&&a(t.creator.userId)},R.createElement(S.BodyBold,{className:ye.postTitle__text},(s=t.creator)==null?void 0:s.displayName)),t.creator.isBrand?null:R.createElement(Zc,{className:ye.postTitle__brandIcon}))};var Qme=({post:e,onImageClick:t,onVideoClick:o})=>R.createElement(R.Fragment,null,R.createElement(yg,{post:e,onImageClick:t}),R.createElement(hg,{post:e,onVideoClick:o})),fn=({pageId:e="*",post:t,onClick:o,onPostDeleted:r,category:n,hideMenu:i=!1,hideTarget:a=!1,style:s})=>{var Dr,qe,Rr,bn,Hr,en,ce;let l="post_content",{themeStyles:d}=te({pageId:e,componentId:l}),{post:p}=Ii(t==null?void 0:t.postId),{setDrawerData:u,removeDrawerData:g}=Wm(),[f,y]=useState(!1),[v,C]=useState(!1),[h,x]=useState(!1),[b,M]=useState(null),[I,w]=useState(null),[N,T]=useState(null),[L,D]=useState(0),{page:U}=Be(),Z=useRef(null),B=useMemo(()=>{if(t!=null&&p!=null)return dn(t==null?void 0:t.updatedAt).unix()>dn(p==null?void 0:p.updatedAt).unix()?t:p;if(p!=null)return p;if(t!=null)return t},[t,p]);Ac({postId:B==null?void 0:B.postId,level:SubscriptionLevels.POST,shouldSubscribe:f});let $=useMemo(()=>(B==null?void 0:B.targetType)==="community",[B==null?void 0:B.targetType]),{community:G}=Pt({communityId:B==null?void 0:B.targetId,shouldCall:$}),{isCommunityModerator:q}=UB({post:B,community:G});useEffect(()=>{var ue;B!=null&&T(((ue=B.myReactions)==null?void 0:ue[0])||null);},[B==null?void 0:B.myReactions]),useEffect(()=>{B!=null&&D((B==null?void 0:B.reactionsCount)||0);},[B==null?void 0:B.reactionsCount]);let {mutateAsync:z}=useMutation({mutationFn:ue=>_(void 0,null,function*(){if(N&&N!==ue)try{yield ReactionRepository.removeReaction("post",B==null?void 0:B.postId,N);}catch(tn){console.log();}return ReactionRepository.addReaction("post",B==null?void 0:B.postId,ue)}),onMutate:ue=>{y(!0),D(L+1),T(ue);}}),{mutateAsync:H}=useMutation({mutationFn:ue=>_(void 0,null,function*(){return ReactionRepository.removeReaction("post",B==null?void 0:B.postId,ue)}),onMutate:()=>{y(!0),D(Math.max(0,L-1)),T(null);}}),F=ue=>{N?H(N):z(ue);},j=ue=>{C(!0),M(ue);},Q=()=>{C(!1),M(null);},k=ue=>{x(!0),w(ue);},V=()=>{x(!1),w(null);},pe=((Dr=B==null?void 0:B.reactions)==null?void 0:Dr.like)>0,We=((qe=B==null?void 0:B.reactions)==null?void 0:qe.love)>0,vt=((Rr=B==null?void 0:B.reactions)==null?void 0:Rr.fire)>0,Vt=((bn=B==null?void 0:B.reactions)==null?void 0:bn.happy)>0,jt=((Hr=B==null?void 0:B.reactions)==null?void 0:Hr.crying)>0,De=pe||We||vt||Vt||jt,{isVisible:ir}=$B({threshold:.6,elementRef:Z});return useEffect(()=>{var ue;U.type!=="PostDetailPage"&&ir&&((ue=B.analytics)==null||ue.markAsViewed());},[B,ir,U.type]),R.createElement("div",{ref:Z,className:ye.postContent,style:d},(n==="announcement"||n==="pin_and_announcement")&&R.createElement(Fg,{pageId:e,componentId:l}),R.createElement("div",{className:ye.postContent__bar,"data-type":s},R.createElement("div",{className:ye.postContent__bar__userAvatar},R.createElement(jo,{userId:B==null?void 0:B.postedUserId})),R.createElement("div",{className:ye.postContent__bar__detail},R.createElement("div",null,R.createElement(Zme,{post:B,hideTarget:a})),R.createElement("div",{className:ye.postContent__bar__information__subtitle},q?R.createElement("div",{className:ye.postContent__bar__information__subtitle__moderator},R.createElement(w1,{pageId:e,componentId:l}),R.createElement("span",{className:ye.postContent__bar__information__subtitle__separator},"\u2022")):null,R.createElement(M1,{timestamp:B.createdAt}),B.createdAt!==B.editedAt&&R.createElement(S.Caption,{className:ye.postContent__bar__information__editedTag},"(edited)"))),R.createElement("div",{className:ye.postContent__wrapRightMenu},(n==="pin"||n==="pin_and_announcement")&&R.createElement(zg,{pageId:e,componentId:l}),s==="feed"?R.createElement("div",{className:ye.postContent__bar__actionButton},!i&&R.createElement(Xc,{pageId:e,componentId:l,onClick:()=>u({content:R.createElement(S5,{post:B,onCloseMenu:()=>g(),pageId:e,componentId:l,onPostDeleted:r})})})):null)),R.createElement("div",{className:ye.postContent__content_and_reactions},R.createElement("div",{className:ye.postContent__content},R.createElement(fg,{text:(en=B==null?void 0:B.data)==null?void 0:en.text,mentioned:(ce=B==null?void 0:B.metadata)==null?void 0:ce.mentioned,mentionees:B==null?void 0:B.mentioness}),B.children.length>0?R.createElement(Qme,{post:B,onImageClick:j,onVideoClick:k}):null),s==="detail"?R.createElement("div",{className:ye.postContent__reactions_and_comments},R.createElement("div",{className:ye.postContent__reactionsBar,onClick:()=>u({content:R.createElement(Fm,{pageId:e,referenceId:B.postId,referenceType:"post"})})},De?R.createElement("div",{className:ye.postContent__reactionsBar__reactions},jt&&R.createElement(dB,{className:ye.postContent__reactionsBar__reactions__icon}),Vt&&R.createElement(pB,{className:ye.postContent__reactionsBar__reactions__icon}),vt&&R.createElement(uB,{className:ye.postContent__reactionsBar__reactions__icon}),We&&R.createElement(gB,{className:ye.postContent__reactionsBar__reactions__icon}),pe&&R.createElement(fB,{className:ye.postContent__reactionsBar__reactions__icon})):null,R.createElement(S.Caption,{className:ye.postContent__reactionsBar__reactions__count},`${ib((B==null?void 0:B.reactionsCount)||0)} ${(B==null?void 0:B.reactionsCount)===1?"like":"likes"}`)),R.createElement(S.Caption,{className:ye.postContent__commentsCount},`${(B==null?void 0:B.commentsCount)||0} ${(B==null?void 0:B.commentsCount)===1?"comment":"comments"}`)):null,!(G!=null&&G.isJoined)&&U.type==="CommunityProfilePage"?R.createElement(R.Fragment,null,R.createElement(S.Body,{className:ye.postContent__notMember},"Join community to interact with all posts")):!(G!=null&&G.isJoined)&&U.type==="PostDetailPage"?null:R.createElement(R.Fragment,null,R.createElement("div",{className:ye.postContent__divider}),R.createElement("div",{className:ye.postContent__reactionBar},R.createElement("div",{className:ye.postContent__reactionBar__leftPane},R.createElement(U3,{pageId:e,componentId:l,reactionsCount:s==="feed"?L:void 0,myReaction:N,defaultIconClassName:ye.postContent__reactionBar__leftPane__icon,imgIconClassName:ye.postContent__reactionBar__leftPane__iconImg,onReactionClick:F}),R.createElement(dg,{pageId:e,componentId:l,commentsCount:s==="feed"?B.commentsCount:void 0,defaultIconClassName:ye.postContent__reactionBar__leftPane__icon,imgIconClassName:ye.postContent__reactionBar__leftPane__iconImg,onPress:()=>o==null?void 0:o()})),R.createElement("div",{className:ye.postContent__reactionBar__rightPane},R.createElement(cg,{pageId:e,componentId:l}))))),v&&typeof b=="number"?R.createElement(xB,{post:B,onClose:Q,initialImageIndex:b}):null,h&&typeof I=="number"?R.createElement(IB,{post:B,onClose:V,initialVideoIndex:I}):null)};var Nt={postContentSkeleton:"Qd",postContentSkeleton__bar:"Wd",postContentSkeleton__bar__information:"Zd",postContentSkeleton__content:"_d",postContentSkeleton__animation:"e0","skeleton-pulse":"Qe",postContentSkeleton__bar__userAvatar:"r0",postContentSkeleton__bar__information__title:"a0",postContentSkeleton__bar__information__subtitle:"o0",postContentSkeleton__content__bar1:"t0",postContentSkeleton__content__bar2:"i0",postContentSkeleton__content__bar3:"l0"};var rd=({pageId:e="*"})=>{let t="post_content",{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=te({pageId:e,componentId:t});return R.createElement("div",{"data-qa-anchor":o,style:s,className:cr(Nt.postContentSkeleton,Nt.postContentSkeleton__animation)},R.createElement("div",{className:cr(Nt.postContentSkeleton__bar,Nt.postContentSkeleton__animation)},R.createElement("div",{className:cr(Nt.postContentSkeleton__bar__userAvatar,Nt.postContentSkeleton__animation)}),R.createElement("div",{className:cr(Nt.postContentSkeleton__bar__information,Nt.postContentSkeleton__animation)},R.createElement("div",{className:cr(Nt.postContentSkeleton__bar__information__title,Nt.postContentSkeleton__animation)}),R.createElement("div",{className:cr(Nt.postContentSkeleton__bar__information__subtitle,Nt.postContentSkeleton__animation)}))),R.createElement("div",{className:cr(Nt.postContentSkeleton__content,Nt.postContentSkeleton__animation)},R.createElement("div",{className:cr(Nt.postContentSkeleton__content__bar1,Nt.postContentSkeleton__animation)}),R.createElement("div",{className:cr(Nt.postContentSkeleton__content__bar2,Nt.postContentSkeleton__animation)}),R.createElement("div",{className:cr(Nt.postContentSkeleton__content__bar3,Nt.postContentSkeleton__animation)})))};function H1({queryParams:e,shouldCall:t=!0}){let n=dt({fetcher:CommunityRepository.getCommunities,params:e,shouldCall:t}),{items:o}=n,r=P(n,["items"]);return c({communities:o},r)}var KB={myCommunitiesList:"s0"};var N5=({pageId:e="*"})=>{let t="my_communities",{themeStyles:o}=te({pageId:e,componentId:t}),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}});return R.createElement("div",{style:o,className:KB.myCommunitiesList},R.createElement(hs,{pageId:e,communityCollection:r,isLoading:a,onLoadMore:()=>{n&&a===!1&&i();}}))};var Jme=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"161",height:"161",viewBox:"0 0 161 161",fill:"none"},R.createElement("path",{d:"M130.1 24.5H34.0996C29.6813 24.5 26.0996 28.0817 26.0996 32.5V128.5C26.0996 132.918 29.6813 136.5 34.0996 136.5H130.1C134.518 136.5 138.1 132.918 138.1 128.5V32.5C138.1 28.0817 134.518 24.5 130.1 24.5Z",fill:"#292B32"}),R.createElement("path",{d:"M43.7002 68.2H44.2002H151.7C152.628 68.2 153.519 68.5688 154.175 69.2251C154.831 69.8815 155.2 70.7718 155.2 71.7V91.7C155.2 92.6283 154.831 93.5185 154.175 94.1749C153.519 94.8313 152.628 95.2 151.7 95.2H43.7002C42.7719 95.2 41.8817 94.8313 41.2253 94.1749C40.5689 93.5185 40.2002 92.6283 40.2002 91.7V71.7C40.2002 70.7718 40.5689 69.8815 41.2253 69.2251C41.8817 68.5688 42.7719 68.2 43.7002 68.2Z",fill:"#292B32",stroke:"#40434E"}),R.createElement("path",{opacity:"0.3",d:"M90.9002 74.1H70.1002C68.7747 74.1 67.7002 75.1745 67.7002 76.5C67.7002 77.8255 68.7747 78.9 70.1002 78.9H90.9002C92.2257 78.9 93.3002 77.8255 93.3002 76.5C93.3002 75.1745 92.2257 74.1 90.9002 74.1Z",fill:"#40434E"}),R.createElement("path",{opacity:"0.15",d:"M105.3 84.5H70.1002C68.7747 84.5 67.7002 85.5745 67.7002 86.9C67.7002 88.2255 68.7747 89.3 70.1002 89.3H105.3C106.626 89.3 107.7 88.2255 107.7 86.9C107.7 85.5745 106.626 84.5 105.3 84.5Z",fill:"#40434E"}),R.createElement("path",{d:"M53.6996 89.3C57.897 89.3 61.2996 85.8974 61.2996 81.7C61.2996 77.5027 57.897 74.1 53.6996 74.1C49.5022 74.1 46.0996 77.5027 46.0996 81.7C46.0996 85.8974 49.5022 89.3 53.6996 89.3Z",fill:"#40434E"}),R.createElement("path",{d:"M9.2998 102.6H9.7998H117.3C118.228 102.6 119.118 102.969 119.775 103.625C120.431 104.282 120.8 105.172 120.8 106.1V126.1C120.8 127.028 120.431 127.919 119.775 128.575C119.118 129.231 118.228 129.6 117.3 129.6H9.2998C8.37155 129.6 7.48131 129.231 6.82493 128.575C6.16855 127.919 5.7998 127.028 5.7998 126.1V106.1C5.7998 105.172 6.16855 104.282 6.82493 103.625C7.48131 102.969 8.37155 102.6 9.2998 102.6Z",fill:"#292B32",stroke:"#40434E"}),R.createElement("path",{opacity:"0.3",d:"M56.4998 108.5H35.6998C34.3743 108.5 33.2998 109.575 33.2998 110.9C33.2998 112.225 34.3743 113.3 35.6998 113.3H56.4998C57.8253 113.3 58.8998 112.225 58.8998 110.9C58.8998 109.575 57.8253 108.5 56.4998 108.5Z",fill:"#40434E"}),R.createElement("path",{opacity:"0.15",d:"M70.8998 118.9H35.6998C34.3743 118.9 33.2998 119.975 33.2998 121.3C33.2998 122.626 34.3743 123.7 35.6998 123.7H70.8998C72.2253 123.7 73.2998 122.626 73.2998 121.3C73.2998 119.975 72.2253 118.9 70.8998 118.9Z",fill:"#40434E"}),R.createElement("path",{d:"M19.3002 123.7C23.4976 123.7 26.9002 120.297 26.9002 116.1C26.9002 111.903 23.4976 108.5 19.3002 108.5C15.1028 108.5 11.7002 111.903 11.7002 116.1C11.7002 120.297 15.1028 123.7 19.3002 123.7Z",fill:"#40434E"}),R.createElement("path",{d:"M9.2998 33.8H117.3C119.233 33.8 120.8 35.367 120.8 37.3V57.3C120.8 59.233 119.233 60.8 117.3 60.8H9.2998C7.36681 60.8 5.7998 59.233 5.7998 57.3V37.3C5.7998 35.367 7.36681 33.8 9.2998 33.8Z",fill:"#292B32",stroke:"#40434E"}),R.createElement("path",{opacity:"0.3",d:"M54.8992 39.7H34.0992C32.7737 39.7 31.6992 40.7745 31.6992 42.1C31.6992 43.4255 32.7737 44.5 34.0992 44.5H54.8992C56.2247 44.5 57.2992 43.4255 57.2992 42.1C57.2992 40.7745 56.2247 39.7 54.8992 39.7Z",fill:"#40434E"}),R.createElement("path",{opacity:"0.15",d:"M69.2992 50.1H34.0992C32.7737 50.1 31.6992 51.1745 31.6992 52.5C31.6992 53.8255 32.7737 54.9 34.0992 54.9H69.2992C70.6247 54.9 71.6992 53.8255 71.6992 52.5C71.6992 51.1745 70.6247 50.1 69.2992 50.1Z",fill:"#40434E"}),R.createElement("path",{d:"M19.3002 54.9C23.4976 54.9 26.9002 51.4974 26.9002 47.3C26.9002 43.1026 23.4976 39.7 19.3002 39.7C15.1028 39.7 11.7002 43.1026 11.7002 47.3C11.7002 51.4974 15.1028 54.9 19.3002 54.9Z",fill:"#40434E"})),Xme=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"161",height:"160",viewBox:"0 0 161 160",fill:"none"},R.createElement("path",{d:"M130.452 24H34.4521C30.0339 24 26.4521 27.5817 26.4521 32V128C26.4521 132.418 30.0339 136 34.4521 136H130.452C134.87 136 138.452 132.418 138.452 128V32C138.452 27.5817 134.87 24 130.452 24Z",fill:"#EBECEF"}),R.createElement("path",{d:"M44.0522 67.7H44.5522H152.052C152.981 67.7 153.871 68.0688 154.527 68.7251C155.184 69.3815 155.552 70.2718 155.552 71.2V91.2C155.552 92.1283 155.184 93.0185 154.527 93.6749C153.871 94.3313 152.981 94.7 152.052 94.7H44.0522C43.124 94.7 42.2337 94.3313 41.5774 93.6749C40.921 93.0185 40.5522 92.1283 40.5522 91.2V71.2C40.5522 70.2718 40.921 69.3815 41.5774 68.7251C42.2337 68.0688 43.124 67.7 44.0522 67.7Z",fill:"white",stroke:"#EBECEF"}),R.createElement("path",{opacity:"0.3",d:"M91.2523 73.6H70.4522C69.1268 73.6 68.0522 74.6745 68.0522 76C68.0522 77.3255 69.1268 78.4 70.4522 78.4H91.2523C92.5777 78.4 93.6523 77.3255 93.6523 76C93.6523 74.6745 92.5777 73.6 91.2523 73.6Z",fill:"#A5A9B5"}),R.createElement("path",{opacity:"0.15",d:"M105.652 84H70.4522C69.1268 84 68.0522 85.0745 68.0522 86.4C68.0522 87.7255 69.1268 88.8 70.4522 88.8H105.652C106.978 88.8 108.052 87.7255 108.052 86.4C108.052 85.0745 106.978 84 105.652 84Z",fill:"#A5A9B5"}),R.createElement("path",{d:"M54.0521 88.8C58.2495 88.8 61.6521 85.3974 61.6521 81.2C61.6521 77.0027 58.2495 73.6 54.0521 73.6C49.8548 73.6 46.4521 77.0027 46.4521 81.2C46.4521 85.3974 49.8548 88.8 54.0521 88.8Z",fill:"#A5A9B5"}),R.createElement("path",{d:"M9.65234 102.1H10.1523H117.652C118.581 102.1 119.471 102.469 120.127 103.125C120.784 103.782 121.152 104.672 121.152 105.6V125.6C121.152 126.528 120.784 127.419 120.127 128.075C119.471 128.731 118.581 129.1 117.652 129.1H9.65234C8.72409 129.1 7.83385 128.731 7.17747 128.075C6.52109 127.419 6.15234 126.528 6.15234 125.6V105.6C6.15234 104.672 6.52109 103.782 7.17747 103.125C7.83385 102.469 8.72409 102.1 9.65234 102.1Z",fill:"white",stroke:"#EBECEF"}),R.createElement("path",{opacity:"0.3",d:"M56.8523 108H36.0523C34.7269 108 33.6523 109.075 33.6523 110.4C33.6523 111.725 34.7269 112.8 36.0523 112.8H56.8523C58.1778 112.8 59.2523 111.725 59.2523 110.4C59.2523 109.075 58.1778 108 56.8523 108Z",fill:"#A5A9B5"}),R.createElement("path",{opacity:"0.15",d:"M71.2523 118.4H36.0523C34.7269 118.4 33.6523 119.475 33.6523 120.8C33.6523 122.126 34.7269 123.2 36.0523 123.2H71.2523C72.5778 123.2 73.6523 122.126 73.6523 120.8C73.6523 119.475 72.5778 118.4 71.2523 118.4Z",fill:"#A5A9B5"}),R.createElement("path",{d:"M19.6522 123.2C23.8496 123.2 27.2522 119.797 27.2522 115.6C27.2522 111.403 23.8496 108 19.6522 108C15.4549 108 12.0522 111.403 12.0522 115.6C12.0522 119.797 15.4549 123.2 19.6522 123.2Z",fill:"#A5A9B5"}),R.createElement("path",{d:"M9.65234 33.3H117.652C119.585 33.3 121.152 34.867 121.152 36.8V56.8C121.152 58.733 119.585 60.3 117.652 60.3H9.65234C7.71935 60.3 6.15234 58.733 6.15234 56.8V36.8C6.15234 34.867 7.71935 33.3 9.65234 33.3Z",fill:"white",stroke:"#EBECEF"}),R.createElement("path",{opacity:"0.3",d:"M55.2522 39.2H34.4522C33.1268 39.2 32.0522 40.2745 32.0522 41.6C32.0522 42.9255 33.1268 44 34.4522 44H55.2522C56.5777 44 57.6522 42.9255 57.6522 41.6C57.6522 40.2745 56.5777 39.2 55.2522 39.2Z",fill:"#A5A9B5"}),R.createElement("path",{opacity:"0.15",d:"M69.6522 49.6H34.4522C33.1268 49.6 32.0522 50.6745 32.0522 52C32.0522 53.3255 33.1268 54.4 34.4522 54.4H69.6522C70.9777 54.4 72.0522 53.3255 72.0522 52C72.0522 50.6745 70.9777 49.6 69.6522 49.6Z",fill:"#A5A9B5"}),R.createElement("path",{d:"M19.6522 54.4C23.8496 54.4 27.2522 50.9974 27.2522 46.8C27.2522 42.6026 23.8496 39.2 19.6522 39.2C15.4549 39.2 12.0522 42.6026 12.0522 46.8C12.0522 50.9974 15.4549 54.4 19.6522 54.4Z",fill:"#A5A9B5"})),jg=({pageId:e="*",componentId:t="*"})=>{let o="illustration",{currentTheme:r,accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:d}=A({pageId:e,componentId:t,elementId:o});return s?null:R.createElement(ee,{defaultIconName:a.icon,configIconName:i.icon,imgIcon:()=>R.createElement("img",{src:i.icon,alt:l,"data-qa-anchor":n}),defaultIcon:()=>R.createElement("div",{"data-qa-anchor":n},r==="light"?R.createElement(Xme,null):R.createElement(Jme,null))})};var XB={description:"c0"};function Gg({pageId:e="*",componentId:t="*"}){let o="description",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement(S.Caption,{className:XB.description,style:l,"data-qa-anchor":r},n.text)}var YB={title:"n0"};function F1({pageId:e="*",componentId:t="*",titleClassName:o}){let r="title",{accessibilityId:n,config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:r});return a?null:R.createElement(S.Title,{className:cr(YB.title,o),style:s,"data-qa-anchor":n},i.text)}var E5={exploreCommunitiesButton:"d0",exploreCommunitiesButton__icon:"m0",exploreCommunitiesButton__text:"p0"};var n2e=e=>R.createElement("svg",c({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M7.85254 0.25C12.1338 0.25 15.6025 3.71875 15.6025 8C15.6025 12.2812 12.1338 15.75 7.85254 15.75C3.57129 15.75 0.102539 12.2812 0.102539 8C0.102539 3.71875 3.57129 0.25 7.85254 0.25ZM13.4463 5.25C12.79 3.9375 11.6963 2.90625 10.3525 2.3125C10.79 3.125 11.1338 4.125 11.3525 5.25H13.4463ZM7.85254 1.75C7.25879 1.75 6.32129 3.0625 5.85254 5.25H9.82129C9.35254 3.0625 8.41504 1.75 7.85254 1.75ZM1.60254 8C1.60254 8.4375 1.63379 8.875 1.72754 9.25H4.13379C4.10254 8.84375 4.10254 8.4375 4.10254 8C4.10254 7.59375 4.10254 7.1875 4.13379 6.75H1.72754C1.63379 7.15625 1.60254 7.59375 1.60254 8ZM2.22754 10.75C2.88379 12.0625 3.97754 13.125 5.32129 13.7188C4.88379 12.9062 4.54004 11.9062 4.32129 10.75H2.22754ZM4.32129 5.25C4.54004 4.125 4.88379 3.125 5.32129 2.3125C3.97754 2.90625 2.88379 3.9375 2.22754 5.25H4.32129ZM7.85254 14.25C8.41504 14.25 9.35254 12.9688 9.82129 10.75H5.85254C6.32129 12.9688 7.25879 14.25 7.85254 14.25ZM10.04 9.25C10.0713 8.875 10.1025 8.4375 10.1025 8C10.1025 7.5625 10.0713 7.15625 10.04 6.75H5.63379C5.60254 7.15625 5.60254 7.5625 5.60254 8C5.60254 8.4375 5.60254 8.875 5.63379 9.25H10.04ZM10.3525 13.7188C11.6963 13.125 12.79 12.0625 13.4463 10.75H11.3525C11.1338 11.9062 10.79 12.9062 10.3525 13.7188ZM11.54 9.25H13.9775C14.04 8.875 14.1025 8.4375 14.1025 8C14.1025 7.59375 14.04 7.15625 13.9775 6.75H11.54C11.5713 7.1875 11.6025 7.59375 11.6025 8C11.6025 8.4375 11.5713 8.84375 11.54 9.25Z"}));function Zg({pageId:e="*",componentId:t="*"}){let o="explore_communities_button",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement("div",{className:E5.exploreCommunitiesButton,"data-qa-anchor":r,style:l},R.createElement(n2e,{className:E5.exploreCommunitiesButton__icon}),R.createElement(S.BodyBold,{className:E5.exploreCommunitiesButton__text},n.text))}var RB={createCommunityButton:"g0"};function Qg({pageId:e="*",componentId:t="*",onClick:o}){let r="create_community_button",{accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:d}=A({pageId:e,componentId:t,elementId:r});return s?null:R.createElement("div",{className:RB.createCommunityButton,onClick:()=>o(),"data-qa-anchor":n,style:d},R.createElement(ee,{defaultIcon:()=>R.createElement(R.Fragment,null),imgIcon:()=>R.createElement("img",{src:i.icon,alt:l}),configIconName:i.icon,defaultIconName:a.icon}),R.createElement(S.Body,null,i.text))}var Wg={emptyNewsfeed:"h0",emptyNewsfeed__text:"f0"};function Jm({pageId:e="*"}){let t="empty_newsfeed",{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=te({pageId:e,componentId:t});return i?null:R.createElement("div",{className:Wg.emptyNewsfeed},R.createElement(jg,{pageId:e,componentId:t}),R.createElement("div",{className:Wg.emptyNewsfeed__text},R.createElement(F1,{pageId:e,componentId:t}),R.createElement(Gg,{pageId:e,componentId:t})),R.createElement(Zg,{pageId:e,componentId:t}),R.createElement(Qg,{pageId:e,componentId:t,onClick:()=>{}}))}var z1={global_feed:"b0",global_feed__postContainer:"u0",global_feed__postSkeletonContainer:"v0",global_feed__pullToRefresh:"x0",global_feed__post__reactionBar__leftPane__icon:"w0",global_feed__post__reactionBar__leftPane__iconImg:"y0",global_feed__pullToRefresh__spinner:"k0",spin:"We",global_feed__divider:"j0",global_feed__post__divider:"z0",global_feed__post__reactionBar:"X0",global_feed__post__reactionBar__leftPane:"Y0",global_feed__post__reactionBar__rightPane:"C0",global_feed__intersection:"A0",global_feed__commentContainer:"M0"};var Jt={container:"S0",innerContainer:"E0",header:"F0",header__title:"I0",header__avatar:"R0",header__detail:"U0",content__text:"B0",content__imageContainer:"D0",content__image:"H0",footer:"Ze",footer__content__description:"L0",footer__content__headline:"T0",footer__left:"V0",footer__right:"q0",footer__content__button:"G0",footer__content__button__text:"J0",infoIcon__button:"K0",infoIcon:"N0"};var tL=({ad:e,avatarUrl:t,adImageUrl:o,themeStyles:r,onCallToActionClick:n})=>{var l;let[i,a]=useState(!1),s=()=>{n==null||n(e.callToActionUrl);};return R.createElement("div",{className:Jt.container,style:r},R.createElement("div",{className:Jt.innerContainer},R.createElement("div",{className:Jt.header},R.createElement("div",{className:Jt.header__avatar},R.createElement(xt,{avatarUrl:t,defaultImage:R.createElement(Lm,null)})),R.createElement("div",{className:Jt.header__detail},R.createElement(S.BodyBold,{className:Jt.header__title},(l=e.advertiser)==null?void 0:l.name),R.createElement(Bm,null))),R.createElement("div",null,R.createElement(S.Body,{className:Jt.content__text},e.body),R.createElement("div",{className:Jt.content__imageContainer},R.createElement("img",{className:Jt.content__image,src:o})))),R.createElement(O,{className:Jt.infoIcon__button,onPress:()=>a(!0)},R.createElement(pn,{className:Jt.infoIcon})),R.createElement(O,{className:Jt.footer,"data-has-url":!!e.callToActionUrl,onPress:s},R.createElement("div",{className:Jt.footer__left},R.createElement(S.Body,{renderer:({typoClassName:d})=>R.createElement("div",{className:cr(d,Jt.footer__content__description)},e.description)}),R.createElement(S.BodyBold,{className:Jt.footer__content__headline},e.headline)),e.callToActionUrl?R.createElement("div",{className:Jt.footer__right},R.createElement(O,{className:Jt.footer__content__button,onPress:s},R.createElement(S.CaptionBold,{renderer:({typoClassName:d})=>R.createElement("div",{className:cr(d,Jt.footer__content__button__text)},e.callToAction)}))):null),R.createElement(R3,{ad:e,isOpen:i,onOpenChange:d=>a(d)}))};var oL=({pageId:e="*",ad:t})=>{var d,p,u,g,f,y;let o="post_content",{themeStyles:r}=te({pageId:e,componentId:o}),i=nt({fileId:(p=(d=t.advertiser)==null?void 0:d.avatar)==null?void 0:p.fileId})||((g=(u=t.advertiser)==null?void 0:u.avatar)==null?void 0:g.fileUrl)||"",s=nt({fileId:(f=t.image1_1)==null?void 0:f.fileId})||((y=t.image1_1)==null?void 0:y.fileUrl)||"";return R.createElement(tL,{themeStyles:r,avatarUrl:i,adImageUrl:s,ad:t,onCallToActionClick:v=>{window==null||window.open(v,"_blank");}})};var qg=e=>(e==null?void 0:e.adId)!==void 0,B5=({pageId:e="*",componentId:t="*",items:o,isLoading:r,onFeedReachBottom:n,onPostDeleted:i})=>{let{accessibilityId:a,themeStyles:s}=te({pageId:e,componentId:t}),[l,d]=useState(null),{AmityGlobalFeedComponentBehavior:p}=bt();if(So({node:l,onIntersect:()=>{n();}}),o.length===0&&!r)return R.createElement(Jm,{pageId:e});let u=(g,f)=>qg(g)?f&&qg(f)?`${f.adId}-${g.adId}`:`${f.postId}-${g.adId}`:g.postId;return R.createElement("div",{className:z1.global_feed,style:s,"data-qa-anchor":a},o.map((g,f)=>R.createElement("div",{key:u(g,o[Math.max(0,f-1)])},f!==0?R.createElement("div",{className:z1.global_feed__divider}):null,qg(g)?R.createElement(oL,{ad:g}):R.createElement(O,{className:z1.global_feed__postContainer,onPress:()=>{var y;return (y=p==null?void 0:p.goToPostDetailPage)==null?void 0:y.call(p,{postId:g.postId})}},R.createElement(fn,{pageId:e,post:g,category:"general",style:"feed",onClick:()=>{var y;(y=p==null?void 0:p.goToPostDetailPage)==null||y.call(p,{postId:g.postId});},onPostDeleted:i})))),r?Array.from({length:2}).map((g,f)=>R.createElement("div",{key:f},R.createElement("div",{className:z1.global_feed__divider}),R.createElement("div",{className:z1.global_feed__postSkeletonContainer},R.createElement(rd,null)))):null,!r&&R.createElement("div",{ref:g=>d(g),className:z1.global_feed__intersection}))};var Xm={newsfeed:"O0",newsfeed__postList:"P0",newsfeed__postContainer:"Q0",newsfeed__pullToRefresh:"W0",newsfeed__post__reactionBar__leftPane__icon:"Z0",newsfeed__post__reactionBar__leftPane__iconImg:"_0",newsfeed__pullToRefresh__spinner:"em",spin:"_e",newsfeed__divider:"rm",newsfeed__post__divider:"am",newsfeed__post__reactionBar:"om",newsfeed__post__reactionBar__leftPane:"tm",newsfeed__post__reactionBar__rightPane:"im",newsfeed__intersection:"lm"};var y2e=e=>R.createElement("div",{className:Xm.newsfeed__pullToRefresh__spinner},R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1122 5C11.1122 5.39449 10.7924 5.71429 10.3979 5.71429C10.0035 5.71429 9.68366 5.39449 9.68366 5V0.714286C9.68366 0.319797 10.0035 0 10.3979 0C10.7924 0 11.1122 0.319797 11.1122 0.714286V5ZM8.25509 6.28846C8.59673 6.09122 8.71378 5.65437 8.51654 5.31273L6.37368 1.60119C6.17644 1.25955 5.73959 1.1425 5.39795 1.33975C5.05631 1.53699 4.93926 1.97384 5.1365 2.31548L7.27936 6.02702C7.4766 6.36865 7.91346 6.48571 8.25509 6.28846ZM6.42496 6.88141C6.7666 7.07865 6.88366 7.51551 6.68641 7.85714C6.48917 8.19878 6.05232 8.31583 5.71068 8.11859L1.99914 5.97573C1.6575 5.77849 1.54045 5.34164 1.7377 5C1.93494 4.65836 2.37179 4.54131 2.71343 4.73855L6.42496 6.88141ZM6.11224 10C6.11224 9.60551 5.79244 9.28571 5.39795 9.28571H1.11223C0.717746 9.28571 0.397949 9.60551 0.397949 10C0.397949 10.3945 0.717746 10.7143 1.11224 10.7143H5.39795C5.79244 10.7143 6.11224 10.3945 6.11224 10ZM5.71068 11.8814C6.05232 11.6842 6.48917 11.8012 6.68641 12.1429C6.88366 12.4845 6.7666 12.9213 6.42497 13.1186L2.71343 15.2614C2.37179 15.4587 1.93494 15.3416 1.7377 15C1.54045 14.6584 1.6575 14.2215 1.99914 14.0243L5.71068 11.8814ZM8.25509 13.7115C7.91345 13.5143 7.4766 13.6313 7.27936 13.973L5.1365 17.6845C4.93926 18.0262 5.05631 18.463 5.39795 18.6603C5.73959 18.8575 6.17644 18.7404 6.37368 18.3988L8.51654 14.6873C8.71378 14.3456 8.59673 13.9088 8.25509 13.7115ZM10.3979 14.2857C10.0035 14.2857 9.68366 14.6055 9.68366 15V19.2857C9.68366 19.6802 10.0035 20 10.3979 20C10.7924 20 11.1122 19.6802 11.1122 19.2857V15C11.1122 14.6055 10.7924 14.2857 10.3979 14.2857ZM12.5408 6.28846C12.8824 6.48571 13.3193 6.36865 13.5165 6.02702L15.6594 2.31548C15.8566 1.97384 15.7396 1.53699 15.3979 1.33975C15.0563 1.1425 14.6195 1.25956 14.4222 1.60119L12.2794 5.31273C12.0821 5.65437 12.1992 6.09122 12.5408 6.28846ZM15.0852 8.11859C14.7436 8.31583 14.3067 8.19878 14.1095 7.85714C13.9122 7.51551 14.0293 7.07866 14.3709 6.88141L18.0825 4.73855C18.4241 4.54131 18.861 4.65836 19.0582 5C19.2554 5.34164 19.1384 5.77849 18.7968 5.97573L15.0852 8.11859ZM14.6837 10C14.6837 10.3945 15.0035 10.7143 15.3979 10.7143H19.6837C20.0782 10.7143 20.3979 10.3945 20.3979 10C20.3979 9.60551 20.0782 9.28571 19.6837 9.28571H15.3979C15.0035 9.28571 14.6837 9.60551 14.6837 10ZM14.3709 13.1186C14.0293 12.9213 13.9122 12.4845 14.1095 12.1429C14.3067 11.8012 14.7436 11.6842 15.0852 11.8814L18.7968 14.0243C19.1384 14.2215 19.2554 14.6584 19.0582 15C18.861 15.3416 18.4241 15.4587 18.0825 15.2614L14.3709 13.1186ZM12.5408 13.7115C12.1992 13.9088 12.0821 14.3456 12.2794 14.6873L14.4222 18.3988C14.6195 18.7404 15.0563 18.8575 15.3979 18.6603C15.7396 18.463 15.8566 18.0262 15.6594 17.6845L13.5165 13.973C13.3193 13.6313 12.8824 13.5143 12.5408 13.7115Z",fill:"url(#paint0_angular_1709_10374)"}),R.createElement("defs",null,R.createElement("radialGradient",{id:"paint0_angular_1709_10374",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.3979 10) scale(10)"},R.createElement("stop",{offset:"0.669733",stopColor:"#595F67"}),R.createElement("stop",{offset:"0.716307",stopColor:"#262626",stopOpacity:"0.01"}))))),L5=({pageId:e="*"})=>{let t="newsfeed",{themeStyles:o}=te({pageId:e,componentId:t}),r=useRef(0),[n,i]=useState(0),{itemWithAds:a,hasMore:s,isLoading:l,loadMore:d,fetch:p,refetch:u,removeItem:g}=bs();useEffect(()=>{p();},[]);let f=()=>{s&&!l&&d();};return a.length===0&&!l?R.createElement(Jm,{pageId:e}):R.createElement("div",{className:Xm.newsfeed,style:o,onDrag:y=>y.stopPropagation(),onTouchStart:y=>{r.current=y.touches[0].clientY;},onTouchMove:y=>{let v=y.touches[0].clientY;r.current>v||i(Math.min(v-r.current,100));},onTouchEnd:y=>{r.current=0,n>=75&&u(),i(0);}},R.createElement("div",{style:{"--asc-pull-to-refresh-height":`${n}px`},className:Xm.newsfeed__pullToRefresh},R.createElement(y2e,null)),R.createElement("div",{className:Xm.newsfeed__divider}),R.createElement(Um,{type:"globalFeed",pageId:e}),a.length>0&&R.createElement("div",{className:Xm.newsfeed__divider}),R.createElement(B5,{isLoading:l,items:a,pageId:e,componentId:t,onFeedReachBottom:()=>f(),onPostDeleted:y=>g(y.postId)}))};var A5={postCreationButton:"sm",postCreationButton__icon:"cm"};var C2e=e=>R.createElement("svg",c({style:{pointerEvents:"none"},width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M13.0002 5.96667C13.5314 5.96667 14.0002 6.43542 14.0002 6.96667V7.96667C14.0002 8.52917 13.5314 8.96667 13.0002 8.96667H8.50016V13.4667C8.50016 14.0292 8.03141 14.4667 7.50016 14.4667H6.50016C5.93766 14.4667 5.50016 14.0292 5.50016 13.4667V8.96667H1.00016C0.437662 8.96667 0.000162125 8.52917 0.000162125 7.96667V6.96667C0.000162125 6.43542 0.437662 5.96667 1.00016 5.96667H5.50016V1.46667C5.50016 0.935425 5.93766 0.466675 6.50016 0.466675H7.50016C8.03141 0.466675 8.50016 0.935425 8.50016 1.46667V5.96667H13.0002Z"}));function Xg({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onClick:n}){let i="post_creation_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(ee,{defaultIcon:()=>R.createElement(O,{style:u,className:A5.postCreationButton,onPress:n,"data-qa-anchor":a},R.createElement(C2e,{className:cr(A5.postCreationButton__icon,o)})),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:cr(A5.postCreationButton,r),onClick:n,"data-qa-anchor":a}),defaultIconName:l.icon,configIconName:s.icon})}var id={globalSearchButton:"nm",globalSearchButton__icon:"dm",globalSearchButton__svg:"mm"};var x2e=e=>R.createElement("svg",c({width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M15.7814 14.3104C16.0627 14.6229 16.0627 15.0917 15.7502 15.3729L14.8752 16.2479C14.5939 16.5604 14.1252 16.5604 13.8127 16.2479L10.7189 13.1542C10.5627 12.9979 10.5002 12.8104 10.5002 12.6229V12.0917C9.37516 12.9667 8.00016 13.4667 6.50016 13.4667C2.90641 13.4667 0.000162125 10.5604 0.000162125 6.96667C0.000162125 3.40417 2.90641 0.466675 6.50016 0.466675C10.0627 0.466675 13.0002 3.40417 13.0002 6.96667C13.0002 8.49792 12.4689 9.87292 11.6252 10.9667H12.1252C12.3127 10.9667 12.5002 11.0604 12.6564 11.1854L15.7814 14.3104ZM6.50016 10.9667C8.68766 10.9667 10.5002 9.18542 10.5002 6.96667C10.5002 4.77917 8.68766 2.96667 6.50016 2.96667C4.28141 2.96667 2.50016 4.77917 2.50016 6.96667C2.50016 9.18542 4.28141 10.9667 6.50016 10.9667Z"}));function Yg({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n}){let i="global_search_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{style:u,"data-qa-anchor":a,className:id.globalSearchButton,onPress:n},R.createElement(ee,{defaultIcon:()=>R.createElement("div",{className:id.globalSearchButton__icon},R.createElement(x2e,{className:cr(id.globalSearchButton__svg,o)})),imgIcon:()=>R.createElement("img",{style:u,src:s.icon,alt:p,className:cr(id.globalSearchButton__icon,r),"data-qa-anchor":a}),defaultIconName:l.icon,configIconName:s.icon}))}var iL={headerLabel:"pm"};function Rg({pageId:e="*",componentId:t="*"}){let o="header_label",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement(S.Heading,{className:iL.headerLabel,style:l,"data-qa-anchor":r},n.text)}var D5={topNavigation:"gm",topNavigationLeftPane:"hm",topNavigationRightPane:"fm"};var $1={socialHomePage:"bm",socialHomePage__topBar:"um",socialHomePage__topNavigation:"vm",socialHomePage__tabs:"er",socialHomePage__contents:"rr",socialHomePage__createPostMenu:"xm"};function ef({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="newsfeed_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:R.createElement(An,{"data-qa-anchor":i,pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r()},a.text)}function tf({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="explore_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:R.createElement(An,{pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r(),"data-qa-anchor":i},a.text)}function of({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="my_communities_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:R.createElement(An,{"data-qa-anchor":i,pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r()},a.text)}var H5=(r=>(r.Newsfeed="Newsfeed",r.Explore="Explore",r.MyCommunities="My communities",r))(H5||{});function rf(){let e="social_home_page",{themeStyles:t}=Ye({pageId:e}),{scrollPosition:o,onScroll:r}=bs(),[n,i]=useState("Newsfeed"),[a,s]=useState(!1),l=useRef(null),d=useRef(!0);useEffect(()=>{l.current&&(l.current.scrollTop=o,setTimeout(()=>{d.current=!1;},100));},[l.current]);let p=()=>{s(g=>!g);},u=g=>{d.current||r(g);};return useEffect(()=>{let g=()=>{a&&s(!1);};a?document.addEventListener("mousedown",g):document.removeEventListener("mousedown",g);},[a]),R.createElement("div",{className:$1.socialHomePage,style:t},R.createElement("div",{className:$1.socialHomePage__topBar},R.createElement("div",{className:$1.socialHomePage__topNavigation},R.createElement(F5,{pageId:e,selectedTab:n,onClickPostCreationButton:p})),R.createElement("div",{className:$1.socialHomePage__tabs},R.createElement(ef,{pageId:e,isActive:n==="Newsfeed",onClick:()=>i("Newsfeed")}),R.createElement(tf,{pageId:e,isActive:n==="Explore",onClick:()=>i("Explore")}),R.createElement(of,{pageId:e,isActive:n==="My communities",onClick:()=>i("My communities")}))),R.createElement("div",{className:$1.socialHomePage__contents,ref:l,onScroll:u},n==="Newsfeed"&&R.createElement(L5,{pageId:e}),n==="Explore"&&R.createElement(wc,{isOpen:!1,toggleOpen:()=>{},hideSideMenu:!0}),n==="My communities"&&R.createElement(N5,{pageId:e})),a&&R.createElement("div",{className:$1.socialHomePage__createPostMenu},R.createElement(p5,{pageId:e})))}function F5({pageId:e="*",selectedTab:t,onClickPostCreationButton:o}){let r="top_navigation",{goToSocialGlobalSearchPage:n,goToMyCommunitiesSearchPage:i}=Be(),{isExcluded:a,themeStyles:s}=te({pageId:e,componentId:r}),l=()=>{switch(t){case"Newsfeed":n();break;case"Explore":break;case"My communities":i();break}};return a?null:R.createElement("div",{className:D5.topNavigation,style:s},R.createElement("div",{className:D5.topNavigationLeftPane},R.createElement(Rg,{pageId:e,componentId:r})),R.createElement("div",{className:D5.topNavigationRightPane},R.createElement(Yg,{pageId:e,componentId:r,onPress:l}),t!=="Explore"&&R.createElement(Xg,{pageId:e,componentId:r,onClick:o})))}var ha={container:"wm",headerImageContainer:"ym",headerImage:"km",backButton:"ar",moreButton:"or",content:"jm",name:"zm",description:"Xm",communityProfile__communityInfo__container:"Ym",divider:"Cm",statCount:"Am",statTitle:"Mm",menuButton:"Sm",communityProfile__joinButton__container:"Em",communityProfile__joinButton:"Fm",communityProfile__pendingPost__container:"Im",communityProfile__menuItem:"Rm",communityProfile__privateIcon:"Um",communityProfile__divider:"Bm"};var O5={communityTabs__container:"Dm",communityTabs__tab:"tr"};var cL=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",fill:"none",viewBox:"0 0 25 24"},R.createElement("path",{fill:"currentColor",d:"M9.219 14.5c-.492 0-.844-.352-.844-.844 0-.457.352-.844.844-.844h7.312c.457 0 .844.387.844.844a.833.833 0 01-.844.844H9.22zm0 3.375c-.492 0-.844-.352-.844-.844 0-.457.352-.843.844-.843h3.937c.457 0 .844.386.844.843a.833.833 0 01-.844.844H9.22zm0-6.75c-.492 0-.844-.352-.844-.844 0-.457.352-.844.844-.844h7.312c.457 0 .844.387.844.844a.833.833 0 01-.844.844H9.22zM18.5 3.25c1.23 0 2.25 1.02 2.25 2.25V19c0 1.266-1.02 2.25-2.25 2.25H7.25A2.221 2.221 0 015 19V5.5c0-1.23.984-2.25 2.25-2.25H18.5zM19.063 19V7.75H6.688V19c0 .316.246.563.562.563H18.5a.578.578 0 00.563-.563z"}));var pL=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"35",height:"34",fill:"none",viewBox:"0 0 35 34"},R.createElement("path",{fill:"currentColor",d:"M21.998 18.295c.372 2.014-.15 4.027-1.567 5.444a.833.833 0 01-1.193 0l-3.58-3.58-2.585 2.586c-.025.025-.074.025-.1.05l-1.59.795c-.224.125-.497-.149-.373-.373l.795-1.59.075-.075 2.585-2.585-3.58-3.58c-.348-.348-.348-.845 0-1.194 1.418-1.416 3.406-1.963 5.42-1.59l1.218-.92-.671-.671c-.348-.348-.348-.846 0-1.194l2.386-2.386a.833.833 0 011.194 0l6.761 6.761a.856.856 0 010 1.194l-2.386 2.386a.833.833 0 01-1.194 0l-.696-.696-.92 1.218zm-9.273-3.455l7.035 7.035c.746-1.143.845-2.635.398-3.928l2.61-3.405 1.442 1.441 1.193-1.193-5.568-5.568-1.193 1.193 1.442 1.442-3.406 2.61c-1.318-.472-2.81-.373-3.953.373z"}));var nf=({pageId:e,componentId:t="*",activeTab:o,onTabChange:r})=>{let n="community_profile_tab",{isExcluded:i,accessibilityId:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:n});return i?null:R.createElement("div",{"data-qa-anchor":a,style:s,className:O5.communityTabs__container},R.createElement(O,{"data-is-active":o==="community_feed",onPress:()=>r("community_feed"),className:O5.communityTabs__tab},R.createElement(cL,null)),R.createElement(O,{"data-is-active":o==="community_pin",onPress:()=>r("community_pin"),className:O5.communityTabs__tab},R.createElement(pL,null)))};var sd={communityCover__container:"ir",communityCover__topBar:"Hm",communityCover__backButton:"Lm",communityCover__menuButton:"Tm"};var uL={menuButton:"Vm"};function af({pageId:e="*",componentId:t="*",onClick:o,className:r,defaultClassName:n}){let i="menu_button",{isExcluded:a,accessibilityId:s,themeStyles:l,config:d,defaultConfig:p,uiReference:u}=A({pageId:e,componentId:t,elementId:i});return a?null:R.createElement(O,{className:r,onPress:o,"data-qa-anchor":s},R.createElement(ee,{defaultIcon:()=>R.createElement(w5,{className:cr(uL.menuButton,n),style:l}),imgIcon:()=>R.createElement("img",{src:d.icon,alt:u}),defaultIconName:p.icon,configIconName:d.icon}))}var sf=({pageId:e="*",componentId:t="*",image:o,onBack:r,onClickMenu:n})=>{let i="community_cover",{isExcluded:a,accessibilityId:s,themeStyles:l,config:d}=A({pageId:e,componentId:t,elementId:i}),p=o?{backgroundImage:`url(${o})`}:{background:"linear-gradient(180deg, #a5a9b5 0%, #636878 100%)"};return a?null:R.createElement("div",{className:sd.communityCover__container,"data-qa-anchor":s,style:c(c({},l),p)},R.createElement("div",{style:c({},p)}),R.createElement("div",{className:sd.communityCover__topBar},R.createElement(wm,{defaultClassName:sd.communityCover__backButton,onPress:r}),R.createElement(af,{className:sd.communityCover__menuButton,onClick:n})))};var lf={communityJoinButton:"qm",joinButton:"Gm"};var fL=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 384 512",fill:"currentColor"},e),R.createElement("path",{d:`M368 224H224V80c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v144H16c-8.84 0-16 7.16-16
|
|
4742
|
+
`;var fa=e=>R.createElement(NB,c({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none"},e),R.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"white",strokeWidth:"2"}),R.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"#1054DE",strokeWidth:"2",strokeDasharray:"46.75",strokeDashoffset:"21",strokeLinecap:"round",strokeLinejoin:"round"}));function ime(e){return e.fileId!==void 0}function td({files:e=[],uploadedFiles:t=[],onChange:o=i=>{},onLoadingChange:r=i=>{},onError:n=i=>{}}){let[i,a]=useState([]),s=useMemo(()=>Array.isArray(e)?e:Array.from(e),[e]),l=useCallback(()=>{o({uploaded:[],uploading:[]});},[o]),d=useCallback(()=>{a([]);},[]),p=useCallback((g,f)=>{if(ime(g)){let y=t.filter(v=>v.fileId!==g.fileId);o({uploaded:y,uploading:s});}else if(f!==void 0){let y=t.filter((v,C)=>C!==f);o({uploaded:y,uploading:s});}else {let y=s.filter(v=>v.name!==g.name);o({uploaded:t,uploading:y});}},[o,t,s]);return useEffect(()=>{if(!s.length)return;function g(){return _(this,null,function*(){r(!0);try{let f=yield Promise.all(s.map(v=>_(this,null,function*(){let C=new FormData;C.append("files",v);let h=yield _(this,null,function*(){if(v.type.includes(FileType.IMAGE))return FileRepository.createImage(C);if(v.type.includes(FileType.VIDEO))return FileRepository.createVideo(C)});return h&&h.data.length>0?h.data[0]:null}))),y=[...t,...f].filter(Fe);o({uploaded:y,uploading:[]}),a([]);}catch(f){a(s.map(y=>y.name)),n(!0);}finally{r(!1);}})}g();},[s]),{allFiles:[...t,...s],uploading:s,uploaded:t,removeFile:p,reset:l,rejected:i,retry:d}}function Ig({files:e,uploadedFiles:t,onChange:o,onLoadingChange:r,uploadLoading:n,onError:i,isErrorUpload:a}){let s=td({files:e,uploadedFiles:t,onChange:o,onLoadingChange:r,onError:i}),{allFiles:l,removeFile:d}=s;return l.length===0?null:l&&R.createElement("div",{"data-images-amount":Math.min(l.length,3),className:L1.thumbnail__container},l==null?void 0:l.map((p,u)=>{var g;return R.createElement("div",{key:u,"data-images-height":l.length>2,className:L1.thumbnail__wrapper},n?R.createElement("div",{className:L1.icon__status},R.createElement(fa,null)):a?R.createElement("div",{className:L1.icon__status},R.createElement(Zt,null)):R.createElement(R.Fragment,null,R.createElement("img",{className:L1.thumbnail,src:FileRepository.fileUrlWithSize(p==null?void 0:p.fileUrl,"medium"),alt:(g=p.attributes)==null?void 0:g.name}),R.createElement("button",{type:"reset",onClick:()=>d(p)},R.createElement(Po,{className:L1.closeIcon}))))}))}var ya={thumbnail__container:"f",thumbnail__wrapper:"Cd",thumbnail__wrapper_item_3:"Ad",thumbnail:"Md",closeIcon:"Sd",icon__status:"Ed",playIcon:"Fd"};var wg=({files:e,uploadedFiles:t,onLoadingChange:o,onChange:r,uploadLoading:n,onError:i,videoThumbnail:a,removeThumbnail:s,isErrorUpload:l})=>{let d=td({files:e,uploadedFiles:t,onChange:r,onLoadingChange:o,onError:i}),{allFiles:p,removeFile:u}=d;if(p.length===0)return null;let g=(f,y)=>{u(f,y),s(y);};return a?R.createElement("div",{"data-images-amount":Math.min(a.length,3),className:ya.thumbnail__container},a==null?void 0:a.map((f,y)=>R.createElement("div",{key:f.videoUrl,className:cr(ya.thumbnail__wrapper,a.length>2&&ya.thumbnail__wrapper_item_3)},n?R.createElement("div",{className:ya.icon__status},R.createElement(fa,null)):l?R.createElement("div",{className:ya.icon__status},R.createElement(Zt,null)):R.createElement(R.Fragment,null,R.createElement("img",{className:ya.thumbnail,src:f.thumbnail}),R.createElement("button",{type:"reset",onClick:()=>{g(f.file,y);}},R.createElement(Po,{className:ya.closeIcon})),R.createElement("div",{className:ya.playIcon},R.createElement(Mo,null)))))):null};var ume=({ref:e})=>{let[t,o]=useState(void 0);return useEffect(()=>{if(e.current==null)return;let r=new ResizeObserver(n=>{for(let i of n)o(i.target.clientHeight);});return e.current&&r.observe(e.current),()=>{r.disconnect();}},[e.current]),t};function _g({community:e,targetType:t,targetId:o}){let r="post_composer_page",{themeStyles:n}=Ye({pageId:r}),i="6.75rem",a="8.5rem",s="11rem",l="14.5rem",{AmityPostComposerPageBehavior:d}=bt(),{confirm:p}=Re(),[u,g]=useState(i),[f]=useState(!0),y=useRef(null),v=useRef(null),{prependItem:C}=bs(),h=ume({ref:v}),{handleSubmit:x}=useForm(),[b,M]=useState({text:"",mentioned:[],mentionees:[{type:"user",userIds:[""]}],attachments:[{fileId:"",type:"image"}]}),[I,w]=useState([]),[N,T]=useState([]),[L,D]=useState([]),[U,Z]=useState([]),[B,$]=useState(!1),[G,q]=useState([]),[z,H]=useState(!1),[F,j]=useState(!0),[Q,k]=useState(!0),[V,ae]=useState(!1),[oe,be]=useState([]),pe=useRef(null),We=()=>useMutation({mutationFn:ce=>_(this,null,function*(){return PostRepository.createPost(ce)}),onSuccess:ce=>{var ue;(ue=d==null?void 0:d.goToSocialHomePage)==null||ue.call(d),C(ce.data);},onError:ce=>{console.error("Failed to create post",ce);}}),{mutateAsync:vt,isPending:Vt,isError:jt}=We(),De=()=>{let ce=I.map(Uo=>({type:"image",fileId:Uo.fileId})),ue=N.map(Uo=>({type:"video",fileId:Uo.fileId})),tn=[...ce,...ue];vt({targetId:o,targetType:t,data:{text:b.text},dataType:"text",metadata:{mentioned:b.mentioned},mentionees:b.mentionees,attachments:tn});},ir=ce=>{M(ue=>E(c({},ue),{mentioned:ce.mentioned,text:ce.text,mentionees:ce.mentionees}));},Dr=ce=>{u===i&&ce==="0px"||g(ce);},qe=()=>{p({pageId:r,type:"confirm",title:"Discard this post?",content:"The post will be permanently deleted. It cannot be undone.",onOk:()=>{var ce;(ce=d==null?void 0:d.goToSocialHomePage)==null||ce.call(d);},okText:"Discard",cancelText:"Keep editing"});};useEffect(()=>{I.length>0?(j(!0),k(!1)):N.length>0&&oe.length>0?(j(!1),k(!0)):(I.length==0||oe.length==0)&&(j(!0),k(!0));},[I,N,F,Q,oe]),useEffect(()=>{TB()?H(!0):H(!1);},[]),useEffect(()=>{g(!z&&F&&Q||z&&F&&!Q||z&&!F&&Q?s:!z&&F&&!Q||!z&&!F&&Q?a:l);},[z,F,Q]);let Rr=ce=>{be(ue=>ue.filter((tn,Uo)=>Uo!==ce));},bn=ce=>{if(ce.length+G.length>10){p({pageId:r,type:"info",title:"Maximum upload limit reached",content:"You\u2019ve reached the upload limit of 10 images. Any additional images will not be saved. ",okText:"Close"});return}ce.length>0&&(q(ue=>[...ue,...ce]),D(ce));},Hr=ce=>_(this,null,function*(){let ue=oe?oe.length:0;if(ce.length+ue>10){p({pageId:r,type:"info",title:"Maximum upload limit reached",content:"You\u2019ve reached the upload limit of 10 videos. Any additional videos will not be saved. ",okText:"Close"});return}if(ce.length>0){Z==null||Z(ce);let tn=ce.map(Fr=>({file:Fr,videoUrl:URL.createObjectURL(Fr),thumbnail:void 0})),Uo=yield Promise.all(tn.map(Fr=>_(this,null,function*(){let Li=yield kB(Fr.file);return E(c({},Fr),{thumbnail:Li})})));be(Fr=>[...Fr,...Uo]);}}),en=u==a||u==s||u==l;return R.createElement("div",{className:Un.createPost,style:n},R.createElement("form",{onSubmit:x(De),"data-from-media":u==i,className:Un.createPost__formMediaAttachment},R.createElement("div",{className:Un.createPost__topBar},R.createElement(kr,{pageId:r,onPress:qe}),R.createElement(pa,{pageId:r,community:e}),R.createElement(vg,{pageId:r,onSubmit:x(De),isValid:b.text.length>0||I.length>0||N.length>0})),R.createElement(Wi,{onChange:ir,communityId:o,mentionContainer:pe.current,dataValue:{data:{text:b.text}}}),R.createElement(Ig,{files:L,uploadedFiles:I,uploadLoading:B,onLoadingChange:$,onChange:({uploaded:ce,uploading:ue})=>{w(ce),D(ue);},onError:ae,isErrorUpload:V}),R.createElement(wg,{files:U,uploadedFiles:N,uploadLoading:B,onLoadingChange:$,onChange:({uploaded:ce,uploading:ue})=>{T(ce),Z(ue);},onError:ae,isErrorUpload:V,videoThumbnail:oe,removeThumbnail:Rr}),R.createElement("div",{ref:pe,style:{"--asc-mention-bottom":`${h!=null?h:0}px`},className:Un.mentionTextInput_item})),R.createElement("div",{ref:y}),y.current?Rv.createPortal(R.createElement(Drawer.Root,{snapPoints:[i,a,s,l],activeSnapPoint:u,setActiveSnapPoint:ce=>{typeof ce=="string"&&Dr(ce);},open:f,modal:!1},R.createElement(Drawer.Portal,{container:y.current},R.createElement(Drawer.Content,{className:Un.drawer__content},R.createElement("div",{"data-item-position":u===i,className:Un.createPost__notiWrap},Vt&&R.createElement(Os,{content:"Posting...",icon:R.createElement(fa,null),className:Un.createPost__status}),jt&&R.createElement(Os,{content:"Failed to create post",icon:R.createElement(Y1,{className:Un.createPost_infoIcon}),className:Un.createPost__status,duration:3e3})),R.createElement("div",{ref:v,className:Un.drawerContentContainer,"data-show-detail-media-attachment":en},en?R.createElement(h5,{pageId:r,isVisibleCamera:z,isVisibleImage:F,isVisibleVideo:Q,onVideoFileChange:Hr,onImageFileChange:bn}):R.createElement(y5,{pageId:r,isVisibleCamera:z,isVisibleImage:F,isVisibleVideo:Q,onVideoFileChange:Hr,onImageFileChange:bn}))))),y.current):null)}var ha={editPost:"Id",editPost__topBar:"Rd",editPost__status:"Ud",editPost_infoIcon:"Bd",editPost__notiWrap:"Dd",editPost__formMediaAttachment:"Ke",drawer__content:"Hd",mentionTextInput_item:"Ne"};var LB={editPostButton:"Oe"};function Tg(r){var n=r,{pageId:e="*",componentId:t="*"}=n,o=P(n,["pageId","componentId"]);let i="edit_post_button",{config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:i});return s?null:R.createElement(O,c({style:l,className:LB.editPostButton},o),a.text)}var AB={editPostTitle:"Ld"};function kg({pageId:e="*",componentId:t="*"}){let o="edit_post_title",{config:r,isExcluded:n,themeStyles:i}=A({pageId:e,componentId:t,elementId:o});return n?null:R.createElement("div",{style:i,className:AB.editPostTitle},r.text)}var Ime=e=>{let[t,o]=useState([]);return useEffect(()=>{function r(){return _(this,null,function*(){if(!e||(e==null?void 0:e.length)===0)return;let n=yield PostRepository.getPostByIds(e);o(n.data);})}r();},[e]),t},DB=Ime;var A1={thumbnail__container:"b",thumbnail__wrapper:"Pe",thumbnail:"Td",thumbnail__closeButton:"Vd",thumbnail__closeIcon:"qd",icon__status:"Gd",playIcon:"Jd"};var Mme=({fieldId:e,onRemove:t,type:o})=>{let r=nt({fileId:e});return r?R.createElement(R.Fragment,null,R.createElement("img",{className:A1.thumbnail,src:r,alt:"thumbnail"}),R.createElement(O,{type:"reset",onPress:()=>t(),className:A1.thumbnail__closeButton},R.createElement(Po,{className:A1.thumbnail__closeIcon})),o===PostContentType.VIDEO&&R.createElement("div",{className:A1.playIcon,"data-image":"test"},R.createElement(Mo,null))):null},Ng=({postMedia:e,onRemove:t})=>e.length==0?null:R.createElement("div",{"data-images-amount":Math.min(e.length,3),className:A1.thumbnail__container},e==null?void 0:e.map((o,r)=>R.createElement("div",{key:r,"data-images-height":e.length>2,className:A1.thumbnail__wrapper},R.createElement(Mme,{type:o.dataType,key:r,fieldId:o.dataType===PostContentType.IMAGE?o.data.fileId:o.data.thumbnailFileId,onRemove:()=>t(o.dataType===PostContentType.IMAGE?o.data.fileId:o.data.videoFileId.original)}))));var Eg=(e,t)=>{if(e.length!==t.length)return !1;let o=[...e].sort(),r=[...t].sort();for(let n=0;n<o.length;n++)if(o[n]!==r[n])return !1;return !0};function Bg({post:e}){var $,G,q;let t="post_composer_page",{themeStyles:o}=Ye({pageId:t}),{onBack:r}=Be(),{confirm:n}=Re(),{updateItem:i}=bs(),[a,s]=useState({text:($=e.data.text)!=null?$:"",mentioned:((G=e.metadata)==null?void 0:G.mentioned)||[],mentionees:e.mentionees,attachments:[{fileId:"",type:"image"}]}),[l,d]=useState([]),[p,u]=useState([]),[g,f]=useState([]),[y,v]=useState([]),C=useRef(null),h=()=>useMutation({mutationFn:z=>_(this,null,function*(){return yield PostRepository.editPost(e.postId,z)}),onSuccess:z=>{r(),i(z.data);},onError:z=>{console.error("Failed to edit post",z);}}),{mutateAsync:x,isPending:b,isError:M}=h(),{handleSubmit:I}=useForm(),w=DB((e==null?void 0:e.children)||[]);useEffect(()=>{let z=w.filter(F=>F.dataType==="image");f(z),d(z);let H=w.filter(F=>F.dataType==="video");v(H),u(H);},[w]);let N=z=>{d(H=>H.filter(F=>F.data.fileId!==z));},T=z=>{u(H=>H.filter(F=>F.data.videoFileId.original!==z));},L=()=>{var j,Q;let z=l.map(k=>({fileId:k.data.fileId,type:PostContentType.IMAGE})),H=p.map(k=>({fileId:k.data.videoFileId.original,type:"video"})),F=[...z,...H];a&&x({data:{text:a.text},metadata:{mentioned:(j=a.mentioned)!=null?j:[]},mentionees:(Q=a.mentionees)!=null?Q:[],attachments:F});},D=z=>{s(H=>E(c({},H),{mentioned:z.mentioned,text:z.text,mentionees:z.mentionees}));},U=()=>{n({pageId:t,type:"confirm",title:"Discard this post?",content:"The post will be permanently deleted. It cannot be undone.",onOk:()=>{r();},okText:"Discard",cancelText:"Keep editing"});},Z=!Eg(g,l),B=!Eg(y,p);return R.createElement("div",{className:ha.editPost,style:o},R.createElement("form",{onSubmit:I(L),className:ha.editPost__formMediaAttachment},R.createElement("div",{className:ha.editPost__topBar},R.createElement(kr,{pageId:t,onPress:U}),R.createElement(kg,{pageId:t}),R.createElement(Tg,{pageId:t,type:"submit",onPress:()=>I(L),isDisabled:e.data.text==a.text&&!Z&&!B||!(a.text.length>0||l.length>0||p.length>0)})),R.createElement(Wi,{communityId:e.targetType==="community"?e.targetId:void 0,onChange:D,mentionContainer:C.current,dataValue:{data:{text:e.data.text},metadata:{mentioned:((q=e.metadata)==null?void 0:q.mentioned)||[]},mentionees:e.mentionees}}),R.createElement(Ng,{postMedia:l,onRemove:N}),R.createElement(Ng,{postMedia:p,onRemove:T}),R.createElement("div",{ref:C,className:ha.mentionTextInput_item}),R.createElement("div",{className:ha.editPost__notiWrap},b&&R.createElement(Os,{content:"Posting...",icon:R.createElement(fa,null),className:ha.editPost__status}),M&&R.createElement(Os,{content:"Failed to edit post",icon:R.createElement(Zt,{className:ha.editPost_infoIcon}),className:ha.editPost__status,duration:3e3}))))}var Eme=e=>e.mode==="create";function Lg(e){if(Eme(e)){let{targetId:t,targetType:o,community:r}=e;return R.createElement(_g,{mode:"create",targetId:t,targetType:o,community:r})}else {let{post:t}=e;return R.createElement(Bg,{mode:"edit",post:t})}}var Ame=e=>R.createElement("svg",c({width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M18.3804 2.25391C19.2593 3.13281 19.2593 4.53906 18.3804 5.41797L15.7437 8.05469L14.5483 9.25L5.97021 17.8281L1.9624 18.25C1.92725 18.25 1.89209 18.25 1.85693 18.25C1.36475 18.25 0.978027 17.8281 1.04834 17.3359L1.47021 13.3281L10.0483 4.75L11.2437 3.55469L13.8804 0.917969C14.3022 0.496094 14.8999 0.25 15.4624 0.25C16.0249 0.25 16.6226 0.496094 17.0444 0.917969L18.3804 2.25391ZM5.19678 16.2109L13.353 8.08984L14.4429 7L12.2983 4.85547L11.2085 5.94531L3.0874 14.1016L2.84131 16.457L5.19678 16.2109ZM17.1851 4.22266C17.396 4.01172 17.396 3.66016 17.1851 3.44922L15.8491 2.11328C15.7085 1.97266 15.5327 1.9375 15.4624 1.9375C15.3921 1.9375 15.2163 1.97266 15.0757 2.11328L13.4937 3.66016L15.6382 5.80469L17.1851 4.22266Z"})),Dme=e=>R.createElement("svg",c({width:"16",height:"19",viewBox:"0 0 16 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M15.3608 3.0625C15.6421 3.0625 15.9233 3.34375 15.9233 3.625V4.1875C15.9233 4.50391 15.6421 4.75 15.3608 4.75H14.7983L14.0249 16.668C13.9897 17.5469 13.2163 18.25 12.3374 18.25H3.72412C2.84521 18.25 2.07178 17.5469 2.03662 16.668L1.29834 4.75H0.73584C0.419434 4.75 0.17334 4.50391 0.17334 4.1875V3.625C0.17334 3.34375 0.419434 3.0625 0.73584 3.0625H3.61865L4.81396 1.09375C5.09521 0.636719 5.72803 0.25 6.25537 0.25H9.80615C10.3335 0.25 10.9663 0.636719 11.2476 1.09375L12.4429 3.0625H15.3608ZM6.25537 1.9375L5.5874 3.0625H10.4741L9.80615 1.9375H6.25537ZM12.3374 16.5625L13.0757 4.75H2.98584L3.72412 16.5625H12.3374Z"})),Hme=e=>R.createElement("svg",c({width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M12.3125 3.0625C13.543 3.0625 14.8789 2.64062 16.1445 2.07812C17.2344 1.62109 18.5 2.42969 18.5 3.625V12.0625C18.5 12.6602 18.1836 13.1875 17.7266 13.5039C16.7773 14.1016 15.2656 14.875 13.1914 14.875C10.8008 14.875 9.21875 13.75 7.49609 13.75C5.52734 13.75 4.33203 14.1719 3.03125 14.7695V17.6875C3.03125 18.0039 2.75 18.25 2.46875 18.25H1.90625C1.58984 18.25 1.34375 18.0039 1.34375 17.6875V3.41406C0.816406 3.13281 0.5 2.57031 0.5 1.9375C0.5 0.988281 1.30859 0.214844 2.29297 0.285156C3.10156 0.320312 3.76953 0.953125 3.83984 1.76172C3.83984 1.79688 3.875 1.90234 3.875 1.9375C3.875 2.11328 3.80469 2.35938 3.76953 2.5C4.54297 2.18359 5.49219 1.9375 6.61719 1.9375C9.00781 1.9375 10.5898 3.0625 12.3125 3.0625ZM16.8125 12.0625V3.625C15.6875 4.15234 13.8242 4.75 12.3125 4.75C10.2031 4.75 8.72656 3.625 6.61719 3.625C5.14062 3.625 3.76953 4.22266 3.03125 4.75V12.9062C4.12109 12.4141 5.98438 12.0625 7.49609 12.0625C9.60547 12.0625 11.082 13.1875 13.1914 13.1875C14.668 13.1875 16.0391 12.625 16.8125 12.0625Z"})),S5=({post:e,pageId:t="*",componentId:o="*",elementId:r="*",onCloseMenu:n,onPostDeleted:i})=>{let{success:a,error:s}=_o(),l=useMemo(()=>(e==null?void 0:e.targetType)==="community",[e==null?void 0:e.targetType]),{community:d}=Pt({communityId:e==null?void 0:e.targetId,shouldCall:l}),{isCommunityModerator:p,isOwner:u}=MB({post:e,community:d}),{AmityPostContentComponentBehavior:g}=bt(),{removeDrawerData:f}=Wm(),{showEditPostButton:y,showDeletePostButton:v,showReportPostButton:C}=useMemo(()=>p?u?{showEditPostButton:!0,showDeletePostButton:!0,showReportPostButton:!1}:{showEditPostButton:!1,showDeletePostButton:!0,showReportPostButton:!0}:u?{showEditPostButton:!0,showDeletePostButton:!0,showReportPostButton:!1}:{showEditPostButton:!1,showDeletePostButton:!1,showReportPostButton:!0},[p,u]),{isFlaggedByMe:h,isLoading:x,mutateReportPost:b,mutateUnReportPost:M}=_B({post:e,isFlaggable:C,onReportSuccess:()=>{a({content:"Post reported."});},onReportError:()=>{s({content:"Failed to report post."});},onUnreportSuccess:()=>{a({content:"Post unreported."});},onUnreportError:()=>{s({content:"Failed to unreport post."});}}),{confirm:I}=Re(),{mutateAsync:w}=useMutation({mutationFn:()=>_(void 0,null,function*(){return n(),PostRepository.hardDeletePost(e.postId)}),onSuccess:()=>{a({content:"Post deleted."}),i==null||i(e);},onError:()=>{s({content:"Failed to delete post."});}}),N=()=>{n(),I({title:"Delete post",content:"This post will be permanently deleted.",cancelText:"Cancel",okText:"Delete",onOk:()=>w(),pageId:t,componentId:o});};return R.createElement("div",{className:zn.postMenu},C&&!x?R.createElement(O,{className:zn.postMenu__item,onPress:()=>{h?M():b(),f();}},R.createElement(Hme,{className:zn.postMenu__reportPost__icon}),R.createElement(S.Title,{className:zn.postMenu__reportPost__text},h?"Unreport post":"Report post")):null,y?R.createElement(O,{className:zn.postMenu__item,onPress:()=>{var T;f(),(T=g==null?void 0:g.goToPostComposerPage)==null||T.call(g,{mode:"edit",post:e});}},R.createElement(Ame,{className:zn.postMenu__editPost__icon}),R.createElement(S.Title,{className:zn.postMenu__editPost__text},"Edit post")):null,v?R.createElement(O,{className:zn.postMenu__item,onPress:()=>N()},R.createElement(Dme,{className:zn.postMenu__deletePost__icon}),R.createElement(S.Title,{className:zn.postMenu__deletePost__text},"Delete post")):null)};var UB=({post:e,community:t})=>{let{currentUserId:o}=Ae(),r=useMemo(()=>(e==null?void 0:e.targetType)==="community"&&(e==null?void 0:e.targetId)===(t==null?void 0:t.communityId),[e==null?void 0:e.targetType,t==null?void 0:t.communityId]),{moderators:n}=nm({communityId:t==null?void 0:t.communityId,shouldCall:r}),i=useMemo(()=>r?n.some(s=>s.userId===(e==null?void 0:e.postedUserId)):!1,[n,r,e==null?void 0:e.postedUserId]),a=(e==null?void 0:e.postedUserId)===o;return {isCommunityModerator:i,isOwner:a}};var $B=({threshold:e,elementRef:t})=>{let[o,r]=useState(!1);return useEffect(()=>{if(!t.current)return;let n=new IntersectionObserver(i=>{i.forEach(a=>{let s=a.isIntersecting;r(s);});},{threshold:e});return n.observe(t.current),()=>{n.disconnect();}},[e,t]),{isVisible:o}};var VB={announcementBadge:"Kd"};var Ag={featuredIcon__background:"Nd",featuredIcon__textColor:"Od"};var jB=r=>{var n=r,{backgroundColor:e,textColor:t}=n,o=P(n,["backgroundColor","textColor"]);return R.createElement("svg",c({width:"73",height:"26",viewBox:"0 0 73 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),R.createElement("path",{d:"M0 0H69C71.2091 0 73 1.79086 73 4V22C73 24.2091 71.2091 26 69 26H0V0Z",className:Ag.featuredIcon__background,fill:e}),R.createElement("path",{d:"M9.12988 18V8.84033H14.9697V10.2178H10.7676V12.9282H14.6079V14.2612H10.7676V18H9.12988ZM19.5108 18.1396C17.4478 18.1396 16.1973 16.7559 16.1973 14.5469V14.5405C16.1973 12.3569 17.4605 10.9287 19.4346 10.9287C21.4088 10.9287 22.6275 12.3125 22.6275 14.4072V14.9277H17.7779C17.797 16.1719 18.4698 16.8955 19.5426 16.8955C20.3995 16.8955 20.8883 16.4639 21.0406 16.1465L21.0596 16.1021H22.564L22.545 16.1592C22.3228 17.0542 21.3961 18.1396 19.5108 18.1396ZM19.4537 12.1665C18.5714 12.1665 17.9112 12.7632 17.7906 13.8677H21.085C20.9771 12.7314 20.336 12.1665 19.4537 12.1665ZM26.0197 18.1143C24.6994 18.1143 23.7409 17.3018 23.7409 16.0386V16.0259C23.7409 14.7881 24.6867 14.0645 26.3752 13.9629L28.1588 13.855V13.2583C28.1588 12.5664 27.7082 12.1855 26.8576 12.1855C26.1339 12.1855 25.6642 12.4458 25.5055 12.9028L25.4992 12.9282H24.0075L24.0138 12.8711C24.1662 11.7031 25.2834 10.9287 26.9338 10.9287C28.7174 10.9287 29.7204 11.792 29.7204 13.2583V18H28.1588V17.0479H28.0509C27.6701 17.7207 26.9338 18.1143 26.0197 18.1143ZM25.3024 15.9624C25.3024 16.5527 25.8039 16.9019 26.5021 16.9019C27.4543 16.9019 28.1588 16.2798 28.1588 15.4546V14.896L26.5973 14.9976C25.715 15.0547 25.3024 15.3784 25.3024 15.9497V15.9624ZM34.2678 18.0317C32.6746 18.0317 32.0207 17.4985 32.0207 16.1592V12.2871H30.9416V11.062H32.0207V9.36084H33.6267V11.062H35.093V12.2871H33.6267V15.7847C33.6267 16.4766 33.8996 16.7686 34.5598 16.7686C34.782 16.7686 34.9026 16.7622 35.093 16.7432V17.9619C34.8645 18.0063 34.5725 18.0317 34.2678 18.0317ZM38.8851 18.1396C37.3236 18.1396 36.5238 17.2002 36.5238 15.5498V11.062H38.1043V15.188C38.1043 16.2607 38.5042 16.8066 39.4564 16.8066C40.4783 16.8066 41.0242 16.1465 41.0242 15.1055V11.062H42.6048V18H41.0242V16.9463H40.9163C40.5926 17.689 39.888 18.1396 38.8851 18.1396ZM44.4545 18V11.062H46.0351V12.1284H46.143C46.3778 11.3857 47.0126 10.9478 47.9267 10.9478C48.1679 10.9478 48.4154 10.9795 48.5678 11.0239V12.4395C48.3139 12.3887 48.0536 12.3506 47.7807 12.3506C46.727 12.3506 46.0351 12.979 46.0351 13.9692V18H44.4545ZM52.5757 18.1396C50.5127 18.1396 49.2622 16.7559 49.2622 14.5469V14.5405C49.2622 12.3569 50.5254 10.9287 52.4995 10.9287C54.4736 10.9287 55.6924 12.3125 55.6924 14.4072V14.9277H50.8428C50.8618 16.1719 51.5346 16.8955 52.6074 16.8955C53.4643 16.8955 53.9531 16.4639 54.1054 16.1465L54.1245 16.1021H55.6289L55.6098 16.1592C55.3877 17.0542 54.4609 18.1396 52.5757 18.1396ZM52.5185 12.1665C51.6362 12.1665 50.9761 12.7632 50.8554 13.8677H54.1499C54.042 12.7314 53.4009 12.1665 52.5185 12.1665ZM59.6939 18.1143C57.9546 18.1143 56.8502 16.7368 56.8502 14.5405V14.5278C56.8502 12.3188 57.9356 10.9478 59.6939 10.9478C60.6461 10.9478 61.4395 11.4175 61.8013 12.1665H61.9092V8.37695H63.4962V18H61.9092V16.9146H61.8013C61.4205 17.6699 60.6714 18.1143 59.6939 18.1143ZM60.189 16.7812C61.2681 16.7812 61.9346 15.9307 61.9346 14.5405V14.5278C61.9346 13.1377 61.2618 12.2808 60.189 12.2808C59.1163 12.2808 58.4561 13.1313 58.4561 14.5278V14.5405C58.4561 15.937 59.1099 16.7812 60.189 16.7812Z",className:Ag.featuredIcon__textColor,fill:t}))};var Fg=({pageId:e="*",componentId:t="*"})=>{let o="announcement_badge",{config:r,isExcluded:n,accessibilityId:i,uiReference:a,defaultConfig:s}=A({pageId:e,componentId:t,elementId:o});return n?null:R.createElement(ee,{"data-qa-anchor":i,defaultIcon:()=>R.createElement(jB,{className:VB.announcementBadge}),imgIcon:()=>R.createElement("img",{src:r.icon,alt:a}),configIconName:r.icon,defaultIconName:s.icon})};var GB={pinBadge__icon:"Pd"};var QB=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"29",height:"30",fill:"none",viewBox:"0 0 29 30"},e),R.createElement("path",{fill:e.fill,d:"M18.106 16.436c.575 1.547.53 3.27-.596 4.398a.74.74 0 01-1.06 0l-3.006-3.005-2.32 2.32c-.022.022-.067.022-.089.044l-1.59.53c-.2.067-.398-.132-.332-.331l.53-1.591.066-.066 2.32-2.32-3.005-3.006a.722.722 0 010-1.06c1.105-1.105 2.829-1.194 4.376-.62l2.917-2.342-.929-.928a.722.722 0 010-1.06l1.061-1.06a.74.74 0 011.06 0l6.011 6.01a.76.76 0 010 1.06l-1.06 1.06a.74.74 0 01-1.061 0l-.95-.95-2.343 2.917z"}));var zg=({pageId:e,componentId:t})=>{let o="pin_badge",{config:r,isExcluded:n,accessibilityId:i,uiReference:a,defaultConfig:s}=A({pageId:e,componentId:t,elementId:o});return n?null:R.createElement(ee,{"data-qa-anchor":i,defaultIcon:()=>R.createElement(QB,{className:GB.pinBadge__icon}),imgIcon:()=>R.createElement("img",{src:r.icon,alt:a}),defaultIconName:s.icon,configIconName:r.icon})};var Zme=({pageId:e,post:t,hideTarget:o})=>{var s;let r=useMemo(()=>(t==null?void 0:t.targetType)==="community",[t==null?void 0:t.targetType]),{community:n}=Pt({communityId:t==null?void 0:t.targetId,shouldCall:r}),{goToCommunityProfilePage:i,onClickUser:a}=Be();return n?R.createElement("div",{className:ye.postTitle},t.creator&&R.createElement("div",{className:ye.postTitle__user__container},R.createElement(S.BodyBold,{className:ye.postTitle__text},R.createElement(O,{onPress:()=>a(t.creator.userId)},"aensuthasneuthasnetusantheusnatheusnthasenuthasnteuhsanteuhsnatehusntaheusntaheu")),t.creator.isBrand?null:R.createElement(Zc,{className:ye.postTitle__brandIcon}),n?R.createElement(Yc,{className:ye.postTitle__icon}):null),n&&!o&&R.createElement(R.Fragment,null,R.createElement(O,{onPress:()=>{i(n.communityId);}},R.createElement(S.BodyBold,{className:ye.postTitle__text},n.displayName)))):R.createElement("div",{className:ye.postTitle__user__container},R.createElement(O,{onPress:()=>t.creator&&a(t.creator.userId)},R.createElement(S.BodyBold,{className:ye.postTitle__text},(s=t.creator)==null?void 0:s.displayName)),t.creator.isBrand?null:R.createElement(Zc,{className:ye.postTitle__brandIcon}))};var Qme=({post:e,onImageClick:t,onVideoClick:o})=>R.createElement(R.Fragment,null,R.createElement(yg,{post:e,onImageClick:t}),R.createElement(hg,{post:e,onVideoClick:o})),fn=({pageId:e="*",post:t,onClick:o,onPostDeleted:r,category:n,hideMenu:i=!1,hideTarget:a=!1,style:s})=>{var Dr,qe,Rr,bn,Hr,en,ce;let l="post_content",{themeStyles:d}=te({pageId:e,componentId:l}),{post:p}=wi(t==null?void 0:t.postId),{setDrawerData:u,removeDrawerData:g}=Wm(),[f,y]=useState(!1),[v,C]=useState(!1),[h,x]=useState(!1),[b,M]=useState(null),[I,w]=useState(null),[N,T]=useState(null),[L,D]=useState(0),{page:U}=Be(),Z=useRef(null),B=useMemo(()=>{if(t!=null&&p!=null)return dn(t==null?void 0:t.updatedAt).unix()>dn(p==null?void 0:p.updatedAt).unix()?t:p;if(p!=null)return p;if(t!=null)return t},[t,p]);Ac({postId:B==null?void 0:B.postId,level:SubscriptionLevels.POST,shouldSubscribe:f});let $=useMemo(()=>(B==null?void 0:B.targetType)==="community",[B==null?void 0:B.targetType]),{community:G}=Pt({communityId:B==null?void 0:B.targetId,shouldCall:$}),{isCommunityModerator:q}=UB({post:B,community:G});useEffect(()=>{var ue;B!=null&&T(((ue=B.myReactions)==null?void 0:ue[0])||null);},[B==null?void 0:B.myReactions]),useEffect(()=>{B!=null&&D((B==null?void 0:B.reactionsCount)||0);},[B==null?void 0:B.reactionsCount]);let {mutateAsync:z}=useMutation({mutationFn:ue=>_(void 0,null,function*(){if(N&&N!==ue)try{yield ReactionRepository.removeReaction("post",B==null?void 0:B.postId,N);}catch(tn){console.log();}return ReactionRepository.addReaction("post",B==null?void 0:B.postId,ue)}),onMutate:ue=>{y(!0),D(L+1),T(ue);}}),{mutateAsync:H}=useMutation({mutationFn:ue=>_(void 0,null,function*(){return ReactionRepository.removeReaction("post",B==null?void 0:B.postId,ue)}),onMutate:()=>{y(!0),D(Math.max(0,L-1)),T(null);}}),F=ue=>{N?H(N):z(ue);},j=ue=>{C(!0),M(ue);},Q=()=>{C(!1),M(null);},k=ue=>{x(!0),w(ue);},V=()=>{x(!1),w(null);},pe=((Dr=B==null?void 0:B.reactions)==null?void 0:Dr.like)>0,We=((qe=B==null?void 0:B.reactions)==null?void 0:qe.love)>0,vt=((Rr=B==null?void 0:B.reactions)==null?void 0:Rr.fire)>0,Vt=((bn=B==null?void 0:B.reactions)==null?void 0:bn.happy)>0,jt=((Hr=B==null?void 0:B.reactions)==null?void 0:Hr.crying)>0,De=pe||We||vt||Vt||jt,{isVisible:ir}=$B({threshold:.6,elementRef:Z});return useEffect(()=>{var ue;U.type!=="PostDetailPage"&&ir&&((ue=B.analytics)==null||ue.markAsViewed());},[B,ir,U.type]),R.createElement("div",{ref:Z,className:ye.postContent,style:d},(n==="announcement"||n==="pin_and_announcement")&&R.createElement(Fg,{pageId:e,componentId:l}),R.createElement("div",{className:ye.postContent__bar,"data-type":s},R.createElement("div",{className:ye.postContent__bar__userAvatar},R.createElement(jo,{userId:B==null?void 0:B.postedUserId})),R.createElement("div",{className:ye.postContent__bar__detail},R.createElement("div",null,R.createElement(Zme,{post:B,hideTarget:a})),R.createElement("div",{className:ye.postContent__bar__information__subtitle},q?R.createElement("div",{className:ye.postContent__bar__information__subtitle__moderator},R.createElement(w1,{pageId:e,componentId:l}),R.createElement("span",{className:ye.postContent__bar__information__subtitle__separator},"\u2022")):null,R.createElement(M1,{timestamp:B.createdAt}),B.createdAt!==B.editedAt&&R.createElement(S.Caption,{className:ye.postContent__bar__information__editedTag},"(edited)"))),R.createElement("div",{className:ye.postContent__wrapRightMenu},(n==="pin"||n==="pin_and_announcement")&&R.createElement(zg,{pageId:e,componentId:l}),s==="feed"?R.createElement("div",{className:ye.postContent__bar__actionButton},!i&&R.createElement(Xc,{pageId:e,componentId:l,onClick:()=>u({content:R.createElement(S5,{post:B,onCloseMenu:()=>g(),pageId:e,componentId:l,onPostDeleted:r})})})):null)),R.createElement("div",{className:ye.postContent__content_and_reactions},R.createElement("div",{className:ye.postContent__content},R.createElement(fg,{text:(en=B==null?void 0:B.data)==null?void 0:en.text,mentioned:(ce=B==null?void 0:B.metadata)==null?void 0:ce.mentioned,mentionees:B==null?void 0:B.mentioness}),B.children.length>0?R.createElement(Qme,{post:B,onImageClick:j,onVideoClick:k}):null),s==="detail"?R.createElement("div",{className:ye.postContent__reactions_and_comments},R.createElement("div",{className:ye.postContent__reactionsBar,onClick:()=>u({content:R.createElement(Fm,{pageId:e,referenceId:B.postId,referenceType:"post"})})},De?R.createElement("div",{className:ye.postContent__reactionsBar__reactions},jt&&R.createElement(dB,{className:ye.postContent__reactionsBar__reactions__icon}),Vt&&R.createElement(pB,{className:ye.postContent__reactionsBar__reactions__icon}),vt&&R.createElement(uB,{className:ye.postContent__reactionsBar__reactions__icon}),We&&R.createElement(gB,{className:ye.postContent__reactionsBar__reactions__icon}),pe&&R.createElement(fB,{className:ye.postContent__reactionsBar__reactions__icon})):null,R.createElement(S.Caption,{className:ye.postContent__reactionsBar__reactions__count},`${ib((B==null?void 0:B.reactionsCount)||0)} ${(B==null?void 0:B.reactionsCount)===1?"like":"likes"}`)),R.createElement(S.Caption,{className:ye.postContent__commentsCount},`${(B==null?void 0:B.commentsCount)||0} ${(B==null?void 0:B.commentsCount)===1?"comment":"comments"}`)):null,!(G!=null&&G.isJoined)&&U.type==="CommunityProfilePage"?R.createElement(R.Fragment,null,R.createElement(S.Body,{className:ye.postContent__notMember},"Join community to interact with all posts")):!(G!=null&&G.isJoined)&&U.type==="PostDetailPage"?null:R.createElement(R.Fragment,null,R.createElement("div",{className:ye.postContent__divider}),R.createElement("div",{className:ye.postContent__reactionBar},R.createElement("div",{className:ye.postContent__reactionBar__leftPane},R.createElement(U3,{pageId:e,componentId:l,reactionsCount:s==="feed"?L:void 0,myReaction:N,defaultIconClassName:ye.postContent__reactionBar__leftPane__icon,imgIconClassName:ye.postContent__reactionBar__leftPane__iconImg,onReactionClick:F}),R.createElement(dg,{pageId:e,componentId:l,commentsCount:s==="feed"?B.commentsCount:void 0,defaultIconClassName:ye.postContent__reactionBar__leftPane__icon,imgIconClassName:ye.postContent__reactionBar__leftPane__iconImg,onPress:()=>o==null?void 0:o()})),R.createElement("div",{className:ye.postContent__reactionBar__rightPane},R.createElement(cg,{pageId:e,componentId:l}))))),v&&typeof b=="number"?R.createElement(xB,{post:B,onClose:Q,initialImageIndex:b}):null,h&&typeof I=="number"?R.createElement(IB,{post:B,onClose:V,initialVideoIndex:I}):null)};var Nt={postContentSkeleton:"Qd",postContentSkeleton__bar:"Wd",postContentSkeleton__bar__information:"Zd",postContentSkeleton__content:"_d",postContentSkeleton__animation:"e0","skeleton-pulse":"Qe",postContentSkeleton__bar__userAvatar:"r0",postContentSkeleton__bar__information__title:"a0",postContentSkeleton__bar__information__subtitle:"o0",postContentSkeleton__content__bar1:"t0",postContentSkeleton__content__bar2:"i0",postContentSkeleton__content__bar3:"l0"};var rd=({pageId:e="*"})=>{let t="post_content",{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=te({pageId:e,componentId:t});return R.createElement("div",{"data-qa-anchor":o,style:s,className:cr(Nt.postContentSkeleton,Nt.postContentSkeleton__animation)},R.createElement("div",{className:cr(Nt.postContentSkeleton__bar,Nt.postContentSkeleton__animation)},R.createElement("div",{className:cr(Nt.postContentSkeleton__bar__userAvatar,Nt.postContentSkeleton__animation)}),R.createElement("div",{className:cr(Nt.postContentSkeleton__bar__information,Nt.postContentSkeleton__animation)},R.createElement("div",{className:cr(Nt.postContentSkeleton__bar__information__title,Nt.postContentSkeleton__animation)}),R.createElement("div",{className:cr(Nt.postContentSkeleton__bar__information__subtitle,Nt.postContentSkeleton__animation)}))),R.createElement("div",{className:cr(Nt.postContentSkeleton__content,Nt.postContentSkeleton__animation)},R.createElement("div",{className:cr(Nt.postContentSkeleton__content__bar1,Nt.postContentSkeleton__animation)}),R.createElement("div",{className:cr(Nt.postContentSkeleton__content__bar2,Nt.postContentSkeleton__animation)}),R.createElement("div",{className:cr(Nt.postContentSkeleton__content__bar3,Nt.postContentSkeleton__animation)})))};function H1({queryParams:e,shouldCall:t=!0}){let n=dt({fetcher:CommunityRepository.getCommunities,params:e,shouldCall:t}),{items:o}=n,r=P(n,["items"]);return c({communities:o},r)}var KB={myCommunitiesList:"s0"};var N5=({pageId:e="*"})=>{let t="my_communities",{themeStyles:o}=te({pageId:e,componentId:t}),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}});return R.createElement("div",{style:o,className:KB.myCommunitiesList},R.createElement(hs,{pageId:e,communityCollection:r,isLoading:a,onLoadMore:()=>{n&&a===!1&&i();}}))};var Jme=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"161",height:"161",viewBox:"0 0 161 161",fill:"none"},R.createElement("path",{d:"M130.1 24.5H34.0996C29.6813 24.5 26.0996 28.0817 26.0996 32.5V128.5C26.0996 132.918 29.6813 136.5 34.0996 136.5H130.1C134.518 136.5 138.1 132.918 138.1 128.5V32.5C138.1 28.0817 134.518 24.5 130.1 24.5Z",fill:"#292B32"}),R.createElement("path",{d:"M43.7002 68.2H44.2002H151.7C152.628 68.2 153.519 68.5688 154.175 69.2251C154.831 69.8815 155.2 70.7718 155.2 71.7V91.7C155.2 92.6283 154.831 93.5185 154.175 94.1749C153.519 94.8313 152.628 95.2 151.7 95.2H43.7002C42.7719 95.2 41.8817 94.8313 41.2253 94.1749C40.5689 93.5185 40.2002 92.6283 40.2002 91.7V71.7C40.2002 70.7718 40.5689 69.8815 41.2253 69.2251C41.8817 68.5688 42.7719 68.2 43.7002 68.2Z",fill:"#292B32",stroke:"#40434E"}),R.createElement("path",{opacity:"0.3",d:"M90.9002 74.1H70.1002C68.7747 74.1 67.7002 75.1745 67.7002 76.5C67.7002 77.8255 68.7747 78.9 70.1002 78.9H90.9002C92.2257 78.9 93.3002 77.8255 93.3002 76.5C93.3002 75.1745 92.2257 74.1 90.9002 74.1Z",fill:"#40434E"}),R.createElement("path",{opacity:"0.15",d:"M105.3 84.5H70.1002C68.7747 84.5 67.7002 85.5745 67.7002 86.9C67.7002 88.2255 68.7747 89.3 70.1002 89.3H105.3C106.626 89.3 107.7 88.2255 107.7 86.9C107.7 85.5745 106.626 84.5 105.3 84.5Z",fill:"#40434E"}),R.createElement("path",{d:"M53.6996 89.3C57.897 89.3 61.2996 85.8974 61.2996 81.7C61.2996 77.5027 57.897 74.1 53.6996 74.1C49.5022 74.1 46.0996 77.5027 46.0996 81.7C46.0996 85.8974 49.5022 89.3 53.6996 89.3Z",fill:"#40434E"}),R.createElement("path",{d:"M9.2998 102.6H9.7998H117.3C118.228 102.6 119.118 102.969 119.775 103.625C120.431 104.282 120.8 105.172 120.8 106.1V126.1C120.8 127.028 120.431 127.919 119.775 128.575C119.118 129.231 118.228 129.6 117.3 129.6H9.2998C8.37155 129.6 7.48131 129.231 6.82493 128.575C6.16855 127.919 5.7998 127.028 5.7998 126.1V106.1C5.7998 105.172 6.16855 104.282 6.82493 103.625C7.48131 102.969 8.37155 102.6 9.2998 102.6Z",fill:"#292B32",stroke:"#40434E"}),R.createElement("path",{opacity:"0.3",d:"M56.4998 108.5H35.6998C34.3743 108.5 33.2998 109.575 33.2998 110.9C33.2998 112.225 34.3743 113.3 35.6998 113.3H56.4998C57.8253 113.3 58.8998 112.225 58.8998 110.9C58.8998 109.575 57.8253 108.5 56.4998 108.5Z",fill:"#40434E"}),R.createElement("path",{opacity:"0.15",d:"M70.8998 118.9H35.6998C34.3743 118.9 33.2998 119.975 33.2998 121.3C33.2998 122.626 34.3743 123.7 35.6998 123.7H70.8998C72.2253 123.7 73.2998 122.626 73.2998 121.3C73.2998 119.975 72.2253 118.9 70.8998 118.9Z",fill:"#40434E"}),R.createElement("path",{d:"M19.3002 123.7C23.4976 123.7 26.9002 120.297 26.9002 116.1C26.9002 111.903 23.4976 108.5 19.3002 108.5C15.1028 108.5 11.7002 111.903 11.7002 116.1C11.7002 120.297 15.1028 123.7 19.3002 123.7Z",fill:"#40434E"}),R.createElement("path",{d:"M9.2998 33.8H117.3C119.233 33.8 120.8 35.367 120.8 37.3V57.3C120.8 59.233 119.233 60.8 117.3 60.8H9.2998C7.36681 60.8 5.7998 59.233 5.7998 57.3V37.3C5.7998 35.367 7.36681 33.8 9.2998 33.8Z",fill:"#292B32",stroke:"#40434E"}),R.createElement("path",{opacity:"0.3",d:"M54.8992 39.7H34.0992C32.7737 39.7 31.6992 40.7745 31.6992 42.1C31.6992 43.4255 32.7737 44.5 34.0992 44.5H54.8992C56.2247 44.5 57.2992 43.4255 57.2992 42.1C57.2992 40.7745 56.2247 39.7 54.8992 39.7Z",fill:"#40434E"}),R.createElement("path",{opacity:"0.15",d:"M69.2992 50.1H34.0992C32.7737 50.1 31.6992 51.1745 31.6992 52.5C31.6992 53.8255 32.7737 54.9 34.0992 54.9H69.2992C70.6247 54.9 71.6992 53.8255 71.6992 52.5C71.6992 51.1745 70.6247 50.1 69.2992 50.1Z",fill:"#40434E"}),R.createElement("path",{d:"M19.3002 54.9C23.4976 54.9 26.9002 51.4974 26.9002 47.3C26.9002 43.1026 23.4976 39.7 19.3002 39.7C15.1028 39.7 11.7002 43.1026 11.7002 47.3C11.7002 51.4974 15.1028 54.9 19.3002 54.9Z",fill:"#40434E"})),Xme=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"161",height:"160",viewBox:"0 0 161 160",fill:"none"},R.createElement("path",{d:"M130.452 24H34.4521C30.0339 24 26.4521 27.5817 26.4521 32V128C26.4521 132.418 30.0339 136 34.4521 136H130.452C134.87 136 138.452 132.418 138.452 128V32C138.452 27.5817 134.87 24 130.452 24Z",fill:"#EBECEF"}),R.createElement("path",{d:"M44.0522 67.7H44.5522H152.052C152.981 67.7 153.871 68.0688 154.527 68.7251C155.184 69.3815 155.552 70.2718 155.552 71.2V91.2C155.552 92.1283 155.184 93.0185 154.527 93.6749C153.871 94.3313 152.981 94.7 152.052 94.7H44.0522C43.124 94.7 42.2337 94.3313 41.5774 93.6749C40.921 93.0185 40.5522 92.1283 40.5522 91.2V71.2C40.5522 70.2718 40.921 69.3815 41.5774 68.7251C42.2337 68.0688 43.124 67.7 44.0522 67.7Z",fill:"white",stroke:"#EBECEF"}),R.createElement("path",{opacity:"0.3",d:"M91.2523 73.6H70.4522C69.1268 73.6 68.0522 74.6745 68.0522 76C68.0522 77.3255 69.1268 78.4 70.4522 78.4H91.2523C92.5777 78.4 93.6523 77.3255 93.6523 76C93.6523 74.6745 92.5777 73.6 91.2523 73.6Z",fill:"#A5A9B5"}),R.createElement("path",{opacity:"0.15",d:"M105.652 84H70.4522C69.1268 84 68.0522 85.0745 68.0522 86.4C68.0522 87.7255 69.1268 88.8 70.4522 88.8H105.652C106.978 88.8 108.052 87.7255 108.052 86.4C108.052 85.0745 106.978 84 105.652 84Z",fill:"#A5A9B5"}),R.createElement("path",{d:"M54.0521 88.8C58.2495 88.8 61.6521 85.3974 61.6521 81.2C61.6521 77.0027 58.2495 73.6 54.0521 73.6C49.8548 73.6 46.4521 77.0027 46.4521 81.2C46.4521 85.3974 49.8548 88.8 54.0521 88.8Z",fill:"#A5A9B5"}),R.createElement("path",{d:"M9.65234 102.1H10.1523H117.652C118.581 102.1 119.471 102.469 120.127 103.125C120.784 103.782 121.152 104.672 121.152 105.6V125.6C121.152 126.528 120.784 127.419 120.127 128.075C119.471 128.731 118.581 129.1 117.652 129.1H9.65234C8.72409 129.1 7.83385 128.731 7.17747 128.075C6.52109 127.419 6.15234 126.528 6.15234 125.6V105.6C6.15234 104.672 6.52109 103.782 7.17747 103.125C7.83385 102.469 8.72409 102.1 9.65234 102.1Z",fill:"white",stroke:"#EBECEF"}),R.createElement("path",{opacity:"0.3",d:"M56.8523 108H36.0523C34.7269 108 33.6523 109.075 33.6523 110.4C33.6523 111.725 34.7269 112.8 36.0523 112.8H56.8523C58.1778 112.8 59.2523 111.725 59.2523 110.4C59.2523 109.075 58.1778 108 56.8523 108Z",fill:"#A5A9B5"}),R.createElement("path",{opacity:"0.15",d:"M71.2523 118.4H36.0523C34.7269 118.4 33.6523 119.475 33.6523 120.8C33.6523 122.126 34.7269 123.2 36.0523 123.2H71.2523C72.5778 123.2 73.6523 122.126 73.6523 120.8C73.6523 119.475 72.5778 118.4 71.2523 118.4Z",fill:"#A5A9B5"}),R.createElement("path",{d:"M19.6522 123.2C23.8496 123.2 27.2522 119.797 27.2522 115.6C27.2522 111.403 23.8496 108 19.6522 108C15.4549 108 12.0522 111.403 12.0522 115.6C12.0522 119.797 15.4549 123.2 19.6522 123.2Z",fill:"#A5A9B5"}),R.createElement("path",{d:"M9.65234 33.3H117.652C119.585 33.3 121.152 34.867 121.152 36.8V56.8C121.152 58.733 119.585 60.3 117.652 60.3H9.65234C7.71935 60.3 6.15234 58.733 6.15234 56.8V36.8C6.15234 34.867 7.71935 33.3 9.65234 33.3Z",fill:"white",stroke:"#EBECEF"}),R.createElement("path",{opacity:"0.3",d:"M55.2522 39.2H34.4522C33.1268 39.2 32.0522 40.2745 32.0522 41.6C32.0522 42.9255 33.1268 44 34.4522 44H55.2522C56.5777 44 57.6522 42.9255 57.6522 41.6C57.6522 40.2745 56.5777 39.2 55.2522 39.2Z",fill:"#A5A9B5"}),R.createElement("path",{opacity:"0.15",d:"M69.6522 49.6H34.4522C33.1268 49.6 32.0522 50.6745 32.0522 52C32.0522 53.3255 33.1268 54.4 34.4522 54.4H69.6522C70.9777 54.4 72.0522 53.3255 72.0522 52C72.0522 50.6745 70.9777 49.6 69.6522 49.6Z",fill:"#A5A9B5"}),R.createElement("path",{d:"M19.6522 54.4C23.8496 54.4 27.2522 50.9974 27.2522 46.8C27.2522 42.6026 23.8496 39.2 19.6522 39.2C15.4549 39.2 12.0522 42.6026 12.0522 46.8C12.0522 50.9974 15.4549 54.4 19.6522 54.4Z",fill:"#A5A9B5"})),jg=({pageId:e="*",componentId:t="*"})=>{let o="illustration",{currentTheme:r,accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:d}=A({pageId:e,componentId:t,elementId:o});return s?null:R.createElement(ee,{defaultIconName:a.icon,configIconName:i.icon,imgIcon:()=>R.createElement("img",{src:i.icon,alt:l,"data-qa-anchor":n}),defaultIcon:()=>R.createElement("div",{"data-qa-anchor":n},r==="light"?R.createElement(Xme,null):R.createElement(Jme,null))})};var XB={description:"c0"};function Gg({pageId:e="*",componentId:t="*"}){let o="description",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement(S.Caption,{className:XB.description,style:l,"data-qa-anchor":r},n.text)}var YB={title:"n0"};function F1({pageId:e="*",componentId:t="*",titleClassName:o}){let r="title",{accessibilityId:n,config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:r});return a?null:R.createElement(S.Title,{className:cr(YB.title,o),style:s,"data-qa-anchor":n},i.text)}var E5={exploreCommunitiesButton:"d0",exploreCommunitiesButton__icon:"m0",exploreCommunitiesButton__text:"p0"};var n2e=e=>R.createElement("svg",c({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M7.85254 0.25C12.1338 0.25 15.6025 3.71875 15.6025 8C15.6025 12.2812 12.1338 15.75 7.85254 15.75C3.57129 15.75 0.102539 12.2812 0.102539 8C0.102539 3.71875 3.57129 0.25 7.85254 0.25ZM13.4463 5.25C12.79 3.9375 11.6963 2.90625 10.3525 2.3125C10.79 3.125 11.1338 4.125 11.3525 5.25H13.4463ZM7.85254 1.75C7.25879 1.75 6.32129 3.0625 5.85254 5.25H9.82129C9.35254 3.0625 8.41504 1.75 7.85254 1.75ZM1.60254 8C1.60254 8.4375 1.63379 8.875 1.72754 9.25H4.13379C4.10254 8.84375 4.10254 8.4375 4.10254 8C4.10254 7.59375 4.10254 7.1875 4.13379 6.75H1.72754C1.63379 7.15625 1.60254 7.59375 1.60254 8ZM2.22754 10.75C2.88379 12.0625 3.97754 13.125 5.32129 13.7188C4.88379 12.9062 4.54004 11.9062 4.32129 10.75H2.22754ZM4.32129 5.25C4.54004 4.125 4.88379 3.125 5.32129 2.3125C3.97754 2.90625 2.88379 3.9375 2.22754 5.25H4.32129ZM7.85254 14.25C8.41504 14.25 9.35254 12.9688 9.82129 10.75H5.85254C6.32129 12.9688 7.25879 14.25 7.85254 14.25ZM10.04 9.25C10.0713 8.875 10.1025 8.4375 10.1025 8C10.1025 7.5625 10.0713 7.15625 10.04 6.75H5.63379C5.60254 7.15625 5.60254 7.5625 5.60254 8C5.60254 8.4375 5.60254 8.875 5.63379 9.25H10.04ZM10.3525 13.7188C11.6963 13.125 12.79 12.0625 13.4463 10.75H11.3525C11.1338 11.9062 10.79 12.9062 10.3525 13.7188ZM11.54 9.25H13.9775C14.04 8.875 14.1025 8.4375 14.1025 8C14.1025 7.59375 14.04 7.15625 13.9775 6.75H11.54C11.5713 7.1875 11.6025 7.59375 11.6025 8C11.6025 8.4375 11.5713 8.84375 11.54 9.25Z"}));function Zg({pageId:e="*",componentId:t="*"}){let o="explore_communities_button",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement("div",{className:E5.exploreCommunitiesButton,"data-qa-anchor":r,style:l},R.createElement(n2e,{className:E5.exploreCommunitiesButton__icon}),R.createElement(S.BodyBold,{className:E5.exploreCommunitiesButton__text},n.text))}var RB={createCommunityButton:"g0"};function Qg({pageId:e="*",componentId:t="*",onClick:o}){let r="create_community_button",{accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:d}=A({pageId:e,componentId:t,elementId:r});return s?null:R.createElement("div",{className:RB.createCommunityButton,onClick:()=>o(),"data-qa-anchor":n,style:d},R.createElement(ee,{defaultIcon:()=>R.createElement(R.Fragment,null),imgIcon:()=>R.createElement("img",{src:i.icon,alt:l}),configIconName:i.icon,defaultIconName:a.icon}),R.createElement(S.Body,null,i.text))}var Wg={emptyNewsfeed:"h0",emptyNewsfeed__text:"f0"};function Jm({pageId:e="*"}){let t="empty_newsfeed",{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=te({pageId:e,componentId:t});return i?null:R.createElement("div",{className:Wg.emptyNewsfeed},R.createElement(jg,{pageId:e,componentId:t}),R.createElement("div",{className:Wg.emptyNewsfeed__text},R.createElement(F1,{pageId:e,componentId:t}),R.createElement(Gg,{pageId:e,componentId:t})),R.createElement(Zg,{pageId:e,componentId:t}),R.createElement(Qg,{pageId:e,componentId:t,onClick:()=>{}}))}var z1={global_feed:"b0",global_feed__postContainer:"u0",global_feed__postSkeletonContainer:"v0",global_feed__pullToRefresh:"x0",global_feed__post__reactionBar__leftPane__icon:"w0",global_feed__post__reactionBar__leftPane__iconImg:"y0",global_feed__pullToRefresh__spinner:"k0",spin:"We",global_feed__divider:"j0",global_feed__post__divider:"z0",global_feed__post__reactionBar:"X0",global_feed__post__reactionBar__leftPane:"Y0",global_feed__post__reactionBar__rightPane:"C0",global_feed__intersection:"A0",global_feed__commentContainer:"M0"};var Jt={container:"S0",innerContainer:"E0",header:"F0",header__title:"I0",header__avatar:"R0",header__detail:"U0",content__text:"B0",content__imageContainer:"D0",content__image:"H0",footer:"Ze",footer__content__description:"L0",footer__content__headline:"T0",footer__left:"V0",footer__right:"q0",footer__content__button:"G0",footer__content__button__text:"J0",infoIcon__button:"K0",infoIcon:"N0"};var tL=({ad:e,avatarUrl:t,adImageUrl:o,themeStyles:r,onCallToActionClick:n})=>{var l;let[i,a]=useState(!1),s=()=>{n==null||n(e.callToActionUrl);};return R.createElement("div",{className:Jt.container,style:r},R.createElement("div",{className:Jt.innerContainer},R.createElement("div",{className:Jt.header},R.createElement("div",{className:Jt.header__avatar},R.createElement(xt,{avatarUrl:t,defaultImage:R.createElement(Lm,null)})),R.createElement("div",{className:Jt.header__detail},R.createElement(S.BodyBold,{className:Jt.header__title},(l=e.advertiser)==null?void 0:l.name),R.createElement(Bm,null))),R.createElement("div",null,R.createElement(S.Body,{className:Jt.content__text},e.body),R.createElement("div",{className:Jt.content__imageContainer},R.createElement("img",{className:Jt.content__image,src:o})))),R.createElement(O,{className:Jt.infoIcon__button,onPress:()=>a(!0)},R.createElement(pn,{className:Jt.infoIcon})),R.createElement(O,{className:Jt.footer,"data-has-url":!!e.callToActionUrl,onPress:s},R.createElement("div",{className:Jt.footer__left},R.createElement(S.Body,{renderer:({typoClassName:d})=>R.createElement("div",{className:cr(d,Jt.footer__content__description)},e.description)}),R.createElement(S.BodyBold,{className:Jt.footer__content__headline},e.headline)),e.callToActionUrl?R.createElement("div",{className:Jt.footer__right},R.createElement(O,{className:Jt.footer__content__button,onPress:s},R.createElement(S.CaptionBold,{renderer:({typoClassName:d})=>R.createElement("div",{className:cr(d,Jt.footer__content__button__text)},e.callToAction)}))):null),R.createElement(R3,{ad:e,isOpen:i,onOpenChange:d=>a(d)}))};var oL=({pageId:e="*",ad:t})=>{var d,p,u,g,f,y;let o="post_content",{themeStyles:r}=te({pageId:e,componentId:o}),i=nt({fileId:(p=(d=t.advertiser)==null?void 0:d.avatar)==null?void 0:p.fileId})||((g=(u=t.advertiser)==null?void 0:u.avatar)==null?void 0:g.fileUrl)||"",s=nt({fileId:(f=t.image1_1)==null?void 0:f.fileId})||((y=t.image1_1)==null?void 0:y.fileUrl)||"";return R.createElement(tL,{themeStyles:r,avatarUrl:i,adImageUrl:s,ad:t,onCallToActionClick:v=>{window==null||window.open(v,"_blank");}})};var qg=e=>(e==null?void 0:e.adId)!==void 0,B5=({pageId:e="*",componentId:t="*",items:o,isLoading:r,onFeedReachBottom:n,onPostDeleted:i})=>{let{accessibilityId:a,themeStyles:s}=te({pageId:e,componentId:t}),[l,d]=useState(null),{AmityGlobalFeedComponentBehavior:p}=bt();if(So({node:l,onIntersect:()=>{n();}}),o.length===0&&!r)return R.createElement(Jm,{pageId:e});let u=(g,f)=>qg(g)?f&&qg(f)?`${f.adId}-${g.adId}`:`${f.postId}-${g.adId}`:g.postId;return R.createElement("div",{className:z1.global_feed,style:s,"data-qa-anchor":a},o.map((g,f)=>R.createElement("div",{key:u(g,o[Math.max(0,f-1)])},f!==0?R.createElement("div",{className:z1.global_feed__divider}):null,qg(g)?R.createElement(oL,{ad:g}):R.createElement(O,{className:z1.global_feed__postContainer,onPress:()=>{var y;return (y=p==null?void 0:p.goToPostDetailPage)==null?void 0:y.call(p,{postId:g.postId})}},R.createElement(fn,{pageId:e,post:g,category:"general",style:"feed",onClick:()=>{var y;(y=p==null?void 0:p.goToPostDetailPage)==null||y.call(p,{postId:g.postId});},onPostDeleted:i})))),r?Array.from({length:2}).map((g,f)=>R.createElement("div",{key:f},R.createElement("div",{className:z1.global_feed__divider}),R.createElement("div",{className:z1.global_feed__postSkeletonContainer},R.createElement(rd,null)))):null,!r&&R.createElement("div",{ref:g=>d(g),className:z1.global_feed__intersection}))};var Xm={newsfeed:"O0",newsfeed__postList:"P0",newsfeed__postContainer:"Q0",newsfeed__pullToRefresh:"W0",newsfeed__post__reactionBar__leftPane__icon:"Z0",newsfeed__post__reactionBar__leftPane__iconImg:"_0",newsfeed__pullToRefresh__spinner:"em",spin:"_e",newsfeed__divider:"rm",newsfeed__post__divider:"am",newsfeed__post__reactionBar:"om",newsfeed__post__reactionBar__leftPane:"tm",newsfeed__post__reactionBar__rightPane:"im",newsfeed__intersection:"lm"};var y2e=e=>R.createElement("div",{className:Xm.newsfeed__pullToRefresh__spinner},R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1122 5C11.1122 5.39449 10.7924 5.71429 10.3979 5.71429C10.0035 5.71429 9.68366 5.39449 9.68366 5V0.714286C9.68366 0.319797 10.0035 0 10.3979 0C10.7924 0 11.1122 0.319797 11.1122 0.714286V5ZM8.25509 6.28846C8.59673 6.09122 8.71378 5.65437 8.51654 5.31273L6.37368 1.60119C6.17644 1.25955 5.73959 1.1425 5.39795 1.33975C5.05631 1.53699 4.93926 1.97384 5.1365 2.31548L7.27936 6.02702C7.4766 6.36865 7.91346 6.48571 8.25509 6.28846ZM6.42496 6.88141C6.7666 7.07865 6.88366 7.51551 6.68641 7.85714C6.48917 8.19878 6.05232 8.31583 5.71068 8.11859L1.99914 5.97573C1.6575 5.77849 1.54045 5.34164 1.7377 5C1.93494 4.65836 2.37179 4.54131 2.71343 4.73855L6.42496 6.88141ZM6.11224 10C6.11224 9.60551 5.79244 9.28571 5.39795 9.28571H1.11223C0.717746 9.28571 0.397949 9.60551 0.397949 10C0.397949 10.3945 0.717746 10.7143 1.11224 10.7143H5.39795C5.79244 10.7143 6.11224 10.3945 6.11224 10ZM5.71068 11.8814C6.05232 11.6842 6.48917 11.8012 6.68641 12.1429C6.88366 12.4845 6.7666 12.9213 6.42497 13.1186L2.71343 15.2614C2.37179 15.4587 1.93494 15.3416 1.7377 15C1.54045 14.6584 1.6575 14.2215 1.99914 14.0243L5.71068 11.8814ZM8.25509 13.7115C7.91345 13.5143 7.4766 13.6313 7.27936 13.973L5.1365 17.6845C4.93926 18.0262 5.05631 18.463 5.39795 18.6603C5.73959 18.8575 6.17644 18.7404 6.37368 18.3988L8.51654 14.6873C8.71378 14.3456 8.59673 13.9088 8.25509 13.7115ZM10.3979 14.2857C10.0035 14.2857 9.68366 14.6055 9.68366 15V19.2857C9.68366 19.6802 10.0035 20 10.3979 20C10.7924 20 11.1122 19.6802 11.1122 19.2857V15C11.1122 14.6055 10.7924 14.2857 10.3979 14.2857ZM12.5408 6.28846C12.8824 6.48571 13.3193 6.36865 13.5165 6.02702L15.6594 2.31548C15.8566 1.97384 15.7396 1.53699 15.3979 1.33975C15.0563 1.1425 14.6195 1.25956 14.4222 1.60119L12.2794 5.31273C12.0821 5.65437 12.1992 6.09122 12.5408 6.28846ZM15.0852 8.11859C14.7436 8.31583 14.3067 8.19878 14.1095 7.85714C13.9122 7.51551 14.0293 7.07866 14.3709 6.88141L18.0825 4.73855C18.4241 4.54131 18.861 4.65836 19.0582 5C19.2554 5.34164 19.1384 5.77849 18.7968 5.97573L15.0852 8.11859ZM14.6837 10C14.6837 10.3945 15.0035 10.7143 15.3979 10.7143H19.6837C20.0782 10.7143 20.3979 10.3945 20.3979 10C20.3979 9.60551 20.0782 9.28571 19.6837 9.28571H15.3979C15.0035 9.28571 14.6837 9.60551 14.6837 10ZM14.3709 13.1186C14.0293 12.9213 13.9122 12.4845 14.1095 12.1429C14.3067 11.8012 14.7436 11.6842 15.0852 11.8814L18.7968 14.0243C19.1384 14.2215 19.2554 14.6584 19.0582 15C18.861 15.3416 18.4241 15.4587 18.0825 15.2614L14.3709 13.1186ZM12.5408 13.7115C12.1992 13.9088 12.0821 14.3456 12.2794 14.6873L14.4222 18.3988C14.6195 18.7404 15.0563 18.8575 15.3979 18.6603C15.7396 18.463 15.8566 18.0262 15.6594 17.6845L13.5165 13.973C13.3193 13.6313 12.8824 13.5143 12.5408 13.7115Z",fill:"url(#paint0_angular_1709_10374)"}),R.createElement("defs",null,R.createElement("radialGradient",{id:"paint0_angular_1709_10374",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.3979 10) scale(10)"},R.createElement("stop",{offset:"0.669733",stopColor:"#595F67"}),R.createElement("stop",{offset:"0.716307",stopColor:"#262626",stopOpacity:"0.01"}))))),L5=({pageId:e="*"})=>{let t="newsfeed",{themeStyles:o}=te({pageId:e,componentId:t}),r=useRef(0),[n,i]=useState(0),{itemWithAds:a,hasMore:s,isLoading:l,loadMore:d,fetch:p,refetch:u,removeItem:g}=bs();useEffect(()=>{p();},[]);let f=()=>{s&&!l&&d();};return a.length===0&&!l?R.createElement(Jm,{pageId:e}):R.createElement("div",{className:Xm.newsfeed,style:o,onDrag:y=>y.stopPropagation(),onTouchStart:y=>{r.current=y.touches[0].clientY;},onTouchMove:y=>{let v=y.touches[0].clientY;r.current>v||i(Math.min(v-r.current,100));},onTouchEnd:y=>{r.current=0,n>=75&&u(),i(0);}},R.createElement("div",{style:{"--asc-pull-to-refresh-height":`${n}px`},className:Xm.newsfeed__pullToRefresh},R.createElement(y2e,null)),R.createElement("div",{className:Xm.newsfeed__divider}),R.createElement(Um,{type:"globalFeed",pageId:e}),a.length>0&&R.createElement("div",{className:Xm.newsfeed__divider}),R.createElement(B5,{isLoading:l,items:a,pageId:e,componentId:t,onFeedReachBottom:()=>f(),onPostDeleted:y=>g(y.postId)}))};var A5={postCreationButton:"sm",postCreationButton__icon:"cm"};var C2e=e=>R.createElement("svg",c({style:{pointerEvents:"none"},width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M13.0002 5.96667C13.5314 5.96667 14.0002 6.43542 14.0002 6.96667V7.96667C14.0002 8.52917 13.5314 8.96667 13.0002 8.96667H8.50016V13.4667C8.50016 14.0292 8.03141 14.4667 7.50016 14.4667H6.50016C5.93766 14.4667 5.50016 14.0292 5.50016 13.4667V8.96667H1.00016C0.437662 8.96667 0.000162125 8.52917 0.000162125 7.96667V6.96667C0.000162125 6.43542 0.437662 5.96667 1.00016 5.96667H5.50016V1.46667C5.50016 0.935425 5.93766 0.466675 6.50016 0.466675H7.50016C8.03141 0.466675 8.50016 0.935425 8.50016 1.46667V5.96667H13.0002Z"}));function Xg({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onClick:n}){let i="post_creation_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(ee,{defaultIcon:()=>R.createElement(O,{style:u,className:A5.postCreationButton,onPress:n,"data-qa-anchor":a},R.createElement(C2e,{className:cr(A5.postCreationButton__icon,o)})),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:cr(A5.postCreationButton,r),onClick:n,"data-qa-anchor":a}),defaultIconName:l.icon,configIconName:s.icon})}var id={globalSearchButton:"nm",globalSearchButton__icon:"dm",globalSearchButton__svg:"mm"};var x2e=e=>R.createElement("svg",c({width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M15.7814 14.3104C16.0627 14.6229 16.0627 15.0917 15.7502 15.3729L14.8752 16.2479C14.5939 16.5604 14.1252 16.5604 13.8127 16.2479L10.7189 13.1542C10.5627 12.9979 10.5002 12.8104 10.5002 12.6229V12.0917C9.37516 12.9667 8.00016 13.4667 6.50016 13.4667C2.90641 13.4667 0.000162125 10.5604 0.000162125 6.96667C0.000162125 3.40417 2.90641 0.466675 6.50016 0.466675C10.0627 0.466675 13.0002 3.40417 13.0002 6.96667C13.0002 8.49792 12.4689 9.87292 11.6252 10.9667H12.1252C12.3127 10.9667 12.5002 11.0604 12.6564 11.1854L15.7814 14.3104ZM6.50016 10.9667C8.68766 10.9667 10.5002 9.18542 10.5002 6.96667C10.5002 4.77917 8.68766 2.96667 6.50016 2.96667C4.28141 2.96667 2.50016 4.77917 2.50016 6.96667C2.50016 9.18542 4.28141 10.9667 6.50016 10.9667Z"}));function Yg({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n}){let i="global_search_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{style:u,"data-qa-anchor":a,className:id.globalSearchButton,onPress:n},R.createElement(ee,{defaultIcon:()=>R.createElement("div",{className:id.globalSearchButton__icon},R.createElement(x2e,{className:cr(id.globalSearchButton__svg,o)})),imgIcon:()=>R.createElement("img",{style:u,src:s.icon,alt:p,className:cr(id.globalSearchButton__icon,r),"data-qa-anchor":a}),defaultIconName:l.icon,configIconName:s.icon}))}var iL={headerLabel:"pm"};function Rg({pageId:e="*",componentId:t="*"}){let o="header_label",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement(S.Heading,{className:iL.headerLabel,style:l,"data-qa-anchor":r},n.text)}var D5={topNavigation:"gm",topNavigationLeftPane:"hm",topNavigationRightPane:"fm"};var $1={socialHomePage:"bm",socialHomePage__topBar:"um",socialHomePage__topNavigation:"vm",socialHomePage__tabs:"er",socialHomePage__contents:"rr",socialHomePage__createPostMenu:"xm"};function ef({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="newsfeed_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:R.createElement(An,{"data-qa-anchor":i,pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r()},a.text)}function tf({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="explore_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:R.createElement(An,{pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r(),"data-qa-anchor":i},a.text)}function of({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="my_communities_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:d,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:R.createElement(An,{"data-qa-anchor":i,pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r()},a.text)}var H5=(r=>(r.Newsfeed="Newsfeed",r.Explore="Explore",r.MyCommunities="My communities",r))(H5||{});function rf(){let e="social_home_page",{themeStyles:t}=Ye({pageId:e}),{scrollPosition:o,onScroll:r}=bs(),[n,i]=useState("Newsfeed"),[a,s]=useState(!1),l=useRef(null),d=useRef(!0);useEffect(()=>{l.current&&(l.current.scrollTop=o,setTimeout(()=>{d.current=!1;},100));},[l.current]);let p=()=>{s(g=>!g);},u=g=>{d.current||r(g);};return useEffect(()=>{let g=()=>{a&&s(!1);};a?document.addEventListener("mousedown",g):document.removeEventListener("mousedown",g);},[a]),R.createElement("div",{className:$1.socialHomePage,style:t},R.createElement("div",{className:$1.socialHomePage__topBar},R.createElement("div",{className:$1.socialHomePage__topNavigation},R.createElement(F5,{pageId:e,selectedTab:n,onClickPostCreationButton:p})),R.createElement("div",{className:$1.socialHomePage__tabs},R.createElement(ef,{pageId:e,isActive:n==="Newsfeed",onClick:()=>i("Newsfeed")}),R.createElement(tf,{pageId:e,isActive:n==="Explore",onClick:()=>i("Explore")}),R.createElement(of,{pageId:e,isActive:n==="My communities",onClick:()=>i("My communities")}))),R.createElement("div",{className:$1.socialHomePage__contents,ref:l,onScroll:u},n==="Newsfeed"&&R.createElement(L5,{pageId:e}),n==="Explore"&&R.createElement(wc,{isOpen:!1,toggleOpen:()=>{},hideSideMenu:!0}),n==="My communities"&&R.createElement(N5,{pageId:e})),a&&R.createElement("div",{className:$1.socialHomePage__createPostMenu},R.createElement(p5,{pageId:e})))}function F5({pageId:e="*",selectedTab:t,onClickPostCreationButton:o}){let r="top_navigation",{goToSocialGlobalSearchPage:n,goToMyCommunitiesSearchPage:i}=Be(),{isExcluded:a,themeStyles:s}=te({pageId:e,componentId:r}),l=()=>{switch(t){case"Newsfeed":n();break;case"Explore":break;case"My communities":i();break}};return a?null:R.createElement("div",{className:D5.topNavigation,style:s},R.createElement("div",{className:D5.topNavigationLeftPane},R.createElement(Rg,{pageId:e,componentId:r})),R.createElement("div",{className:D5.topNavigationRightPane},R.createElement(Yg,{pageId:e,componentId:r,onPress:l}),t!=="Explore"&&R.createElement(Xg,{pageId:e,componentId:r,onClick:o})))}var Ca={container:"wm",headerImageContainer:"ym",headerImage:"km",backButton:"ar",moreButton:"or",content:"jm",name:"zm",description:"Xm",communityProfile__communityInfo__container:"Ym",divider:"Cm",statCount:"Am",statTitle:"Mm",menuButton:"Sm",communityProfile__joinButton__container:"Em",communityProfile__joinButton:"Fm",communityProfile__pendingPost__container:"Im",communityProfile__menuItem:"Rm",communityProfile__privateIcon:"Um",communityProfile__divider:"Bm"};var O5={communityTabs__container:"Dm",communityTabs__tab:"tr"};var cL=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",fill:"none",viewBox:"0 0 25 24"},R.createElement("path",{fill:"currentColor",d:"M9.219 14.5c-.492 0-.844-.352-.844-.844 0-.457.352-.844.844-.844h7.312c.457 0 .844.387.844.844a.833.833 0 01-.844.844H9.22zm0 3.375c-.492 0-.844-.352-.844-.844 0-.457.352-.843.844-.843h3.937c.457 0 .844.386.844.843a.833.833 0 01-.844.844H9.22zm0-6.75c-.492 0-.844-.352-.844-.844 0-.457.352-.844.844-.844h7.312c.457 0 .844.387.844.844a.833.833 0 01-.844.844H9.22zM18.5 3.25c1.23 0 2.25 1.02 2.25 2.25V19c0 1.266-1.02 2.25-2.25 2.25H7.25A2.221 2.221 0 015 19V5.5c0-1.23.984-2.25 2.25-2.25H18.5zM19.063 19V7.75H6.688V19c0 .316.246.563.562.563H18.5a.578.578 0 00.563-.563z"}));var pL=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"35",height:"34",fill:"none",viewBox:"0 0 35 34"},R.createElement("path",{fill:"currentColor",d:"M21.998 18.295c.372 2.014-.15 4.027-1.567 5.444a.833.833 0 01-1.193 0l-3.58-3.58-2.585 2.586c-.025.025-.074.025-.1.05l-1.59.795c-.224.125-.497-.149-.373-.373l.795-1.59.075-.075 2.585-2.585-3.58-3.58c-.348-.348-.348-.845 0-1.194 1.418-1.416 3.406-1.963 5.42-1.59l1.218-.92-.671-.671c-.348-.348-.348-.846 0-1.194l2.386-2.386a.833.833 0 011.194 0l6.761 6.761a.856.856 0 010 1.194l-2.386 2.386a.833.833 0 01-1.194 0l-.696-.696-.92 1.218zm-9.273-3.455l7.035 7.035c.746-1.143.845-2.635.398-3.928l2.61-3.405 1.442 1.441 1.193-1.193-5.568-5.568-1.193 1.193 1.442 1.442-3.406 2.61c-1.318-.472-2.81-.373-3.953.373z"}));var nf=({pageId:e,componentId:t="*",activeTab:o,onTabChange:r})=>{let n="community_profile_tab",{isExcluded:i,accessibilityId:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:n});return i?null:R.createElement("div",{"data-qa-anchor":a,style:s,className:O5.communityTabs__container},R.createElement(O,{"data-is-active":o==="community_feed",onPress:()=>r("community_feed"),className:O5.communityTabs__tab},R.createElement(cL,null)),R.createElement(O,{"data-is-active":o==="community_pin",onPress:()=>r("community_pin"),className:O5.communityTabs__tab},R.createElement(pL,null)))};var sd={communityCover__container:"ir",communityCover__topBar:"Hm",communityCover__backButton:"Lm",communityCover__menuButton:"Tm"};var uL={menuButton:"Vm"};function af({pageId:e="*",componentId:t="*",onClick:o,className:r,defaultClassName:n}){let i="menu_button",{isExcluded:a,accessibilityId:s,themeStyles:l,config:d,defaultConfig:p,uiReference:u}=A({pageId:e,componentId:t,elementId:i});return a?null:R.createElement(O,{className:r,onPress:o,"data-qa-anchor":s},R.createElement(ee,{defaultIcon:()=>R.createElement(w5,{className:cr(uL.menuButton,n),style:l}),imgIcon:()=>R.createElement("img",{src:d.icon,alt:u}),defaultIconName:p.icon,configIconName:d.icon}))}var sf=({pageId:e="*",componentId:t="*",image:o,onBack:r,onClickMenu:n})=>{let i="community_cover",{isExcluded:a,accessibilityId:s,themeStyles:l,config:d}=A({pageId:e,componentId:t,elementId:i}),p=o?{backgroundImage:`url(${o})`}:{background:"linear-gradient(180deg, #a5a9b5 0%, #636878 100%)"};return a?null:R.createElement("div",{className:sd.communityCover__container,"data-qa-anchor":s,style:c(c({},l),p)},R.createElement("div",{style:c({},p)}),R.createElement("div",{className:sd.communityCover__topBar},R.createElement(wm,{defaultClassName:sd.communityCover__backButton,onPress:r}),R.createElement(af,{className:sd.communityCover__menuButton,onClick:n})))};var lf={communityJoinButton:"qm",joinButton:"Gm"};var fL=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 384 512",fill:"currentColor"},e),R.createElement("path",{d:`M368 224H224V80c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v144H16c-8.84 0-16 7.16-16
|
|
4743
4743
|
16v32c0 8.84 7.16 16 16 16h144v144c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V288h144c8.84
|
|
4744
|
-
0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z`}));var mf=({pageId:e="*",componentId:t="*",onClick:o,className:r,defaultClassName:n})=>{let i="community_join_button",{config:a,themeStyles:s,accessibilityId:l,isExcluded:d,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{"data-qa-anchor":l,style:s,onPress:o,className:cr(lf.communityJoinButton,r)},R.createElement(ee,{defaultIcon:()=>R.createElement(fL,{className:cr(lf.joinButton,n)}),imgIcon:()=>R.createElement("img",{src:a.icon,alt:p}),defaultIconName:u.icon,configIconName:a.icon}),"Join")};var H2e=createContext({activeTab:"community_feed",setActiveTab:()=>{}}),$5=()=>useContext(H2e);var hL=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},R.createElement("circle",{cx:"9.88525",cy:"10",r:"5.5",fill:"white"}),R.createElement("path",{d:"M8.62899 17.3036C9.55401 18.2356 10.4373 18.2286 11.3693 17.3036L12.4125 16.2604C12.5099 16.163 12.5934 16.1352 12.7185 16.1352H14.193C15.5075 16.1352 16.1334 15.5092 16.1334 14.1947V12.7203C16.1334 12.5951 16.1682 12.5047 16.2586 12.4143L17.3019 11.3641C18.2339 10.439 18.2269 9.55575 17.3019 8.63073L16.2586 7.58748C16.1682 7.49011 16.1334 7.40665 16.1334 7.28146V5.807C16.1334 4.4925 15.5075 3.86655 14.193 3.86655H12.7185C12.5934 3.86655 12.5029 3.83178 12.4125 3.74136L11.3693 2.69811C10.4373 1.76614 9.55401 1.76614 8.62899 2.70507L7.58574 3.74136C7.49533 3.83178 7.40491 3.86655 7.27972 3.86655H5.80526C4.49076 3.86655 3.86481 4.47859 3.86481 5.807V7.28146C3.86481 7.40665 3.83004 7.49707 3.73962 7.58748L2.69637 8.63073C1.7644 9.55575 1.77136 10.439 2.69637 11.3641L3.73962 12.4143C3.83004 12.5047 3.86481 12.5951 3.86481 12.7203V14.1947C3.86481 15.5092 4.49076 16.1352 5.80526 16.1352H7.27972C7.40491 16.1352 7.48837 16.163 7.58574 16.2604L8.62899 17.3036ZM8.8446 13.5618C8.60117 13.5618 8.40643 13.4714 8.25342 13.3115L6.02782 10.8216C5.90959 10.6964 5.84699 10.5225 5.84699 10.3486C5.84699 9.93132 6.14606 9.63225 6.57727 9.63225C6.81374 9.63225 6.98761 9.70876 7.14062 9.87568L8.81678 11.7466L12.1691 6.96153C12.336 6.72506 12.5168 6.62769 12.795 6.62769C13.2263 6.62769 13.5323 6.92676 13.5323 7.33015C13.5323 7.46925 13.4766 7.64312 13.3723 7.78918L9.47055 13.2628C9.31059 13.4714 9.10194 13.5618 8.8446 13.5618Z",fill:"#1054DE"}));var pf=({pageId:e="*",componentId:t="*"})=>{let o="community_verify_badge",{config:r,themeStyles:n,accessibilityId:i,isExcluded:a,uiReference:s,defaultConfig:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement(ee,{"data-qa-anchor":i,defaultIcon:()=>R.createElement(hL,null),imgIcon:()=>R.createElement("img",{src:r.icon,alt:s}),defaultIconName:l.icon,configIconName:r.icon})};var md={descriptionWrapper:"Jm",description:"lr",expanded:"Km",toggleButton:"Nm"};var uf=({pageId:e="*",componentId:t="*",description:o=""})=>{let[r,n]=useState(!1),[i,a]=useState(!1),s=useRef(null),l="community_description",{themeStyles:d,accessibilityId:p,isExcluded:u}=A({pageId:e,componentId:t,elementId:l}),g=180,f=o.length>g?o.slice(0,g):o;if(useEffect(()=>{s.current&&a(o.length>g);},[o]),u)return null;let y=()=>n(!0);return R.createElement("div",{"data-qa-anchor":p,style:d,className:md.descriptionWrapper},R.createElement("div",{ref:s,className:`${md.description} ${r?md.expanded:""}`},R.createElement(S.Body,null,r?o:f," ",i&&!r&&R.createElement(O,{onPress:y,className:md.toggleButton}," ","...See more"))))};var vL={communityName__truncate:"Om"};var gf=({pageId:e="*",componentId:t="*",name:o=""})=>{let r="community_name",{config:n,themeStyles:i,accessibilityId:a,isExcluded:s}=A({pageId:e,componentId:t,elementId:r});return s?null:R.createElement(S.Heading,{"data-qa-anchor":a,className:vL.communityName__truncate},o)};var cd={communityInfo__container:"Pm",communityInfo__wrapper:"Qm",communityInfo__count:"Wm",communityInfo__title:"Zm"};var G5=({pageId:e="*",componentId:t="*",count:o,text:r,onClick:n})=>{let i="community_info",{config:a,accessibilityId:s,themeStyles:l,isExcluded:d}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{onPress:n,className:cd.communityInfo__container},R.createElement("div",{className:cd.communityInfo__wrapper},R.createElement(S.BodyBold,{className:cd.communityInfo__count},ib(o)),R.createElement(S.Caption,{className:cd.communityInfo__title},r)))};var G2e=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"61",height:"61",viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M33.0312 44.25C33.0312 45.7266 31.8711 46.7812 30.5 46.7812C29.0234 46.7812 27.9688 45.7266 27.9688 44.25V37.5C27.9688 36.1289 29.0234 34.9688 30.5 34.9688C31.8711 34.9688 33.0312 36.1289 33.0312 37.5V44.25ZM30.5 3.75C37.8828 3.75 44 9.86719 44 17.25V24H47.375C51.0664 24 54.125 27.0586 54.125 30.75V51C54.125 54.7969 51.0664 57.75 47.375 57.75H13.625C9.82812 57.75 6.875 54.7969 6.875 51V30.75C6.875 27.0586 9.82812 24 13.625 24H17V17.25C17 9.86719 23.0117 3.75 30.5 3.75ZM30.5 8.8125C25.7539 8.8125 22.0625 12.6094 22.0625 17.25V24H38.9375V17.25C38.9375 12.6094 35.1406 8.8125 30.5 8.8125ZM13.625 29.0625C12.6758 29.0625 11.9375 29.9062 11.9375 30.75V51C11.9375 51.9492 12.6758 52.6875 13.625 52.6875H47.375C48.2188 52.6875 49.0625 51.9492 49.0625 51V30.75C49.0625 29.9062 48.2188 29.0625 47.375 29.0625H13.625Z"}))},Z5=G2e;var Q5=({pageId:e="*",community:t})=>{let {onBack:o,onEditCommunity:r}=Be(),{activeTab:n,setActiveTab:i}=$5(),{communityCategories:a,avatarFileUrl:s,joinCommunity:l,pendingPostsCount:d,canReviewCommunityPosts:p}=yc(t.communityId),u=f=>{i(f);};t.isJoined&&t.postSetting&&p&&d>0;return R.createElement("div",{className:ha.container},R.createElement(sf,{pageId:e,image:s,onBack:o,onClickMenu:()=>r(t.communityId)}),R.createElement("div",{className:ha.content},R.createElement("div",{className:ha.name},!t.isPublic&&R.createElement(Z5,{className:ha.communityProfile__privateIcon}),R.createElement(gf,{pageId:e,name:t.displayName}),t.isOfficial&&R.createElement(pf,null)),R.createElement(Ln,{pageId:e,categories:a}),R.createElement(uf,{pageId:e,description:t.description||""}),R.createElement("div",{className:ha.communityProfile__communityInfo__container},R.createElement(G5,{count:t.postsCount,text:"posts"}),R.createElement("div",{className:ha.divider}),R.createElement(G5,{count:t.membersCount,text:"members",onClick:()=>r(t.communityId,"MEMBERS")})),!t.isJoined&&t.isPublic&&R.createElement("div",{className:ha.communityProfile__joinButton__container},R.createElement(mf,{onClick:l})),R.createElement("div",null,R.createElement(Um,{type:"communityFeed",communityId:t.communityId})),R.createElement(nf,{pageId:e,activeTab:n,onTabChange:u})),R.createElement("div",{className:ha.communityProfile__divider}))};var Q2e=10;function ff({targetType:e,targetId:t,feedType:o,limit:r=Q2e}){let a=dt({fetcher:PostRepository.getPosts,params:{targetType:e,targetId:t,feedType:o,limit:r},shouldCall:!!t&&!!e}),{items:n}=a,i=P(a,["items"]);return c({posts:n},i)}var lo={communityFeed__container:"_m",communityFeed__loadingIndicator:"ep",communityFeed__observerTarget:"rp",communityFeed__post:"ap",communityFeed__spinner:"op",spin:"sr",communityFeed__postContent:"tp",communityFeed__postSkeleton:"ip",communityFeed__postSkeletonHeader:"lp",communityFeed__postSkeletonAvatar:"cr",communityFeed__postSkeletonUserInfo:"sp",communityFeed__postSkeletonUsername:"nr",communityFeed__postSkeletonSubtitle:"dr",communityFeed__postSkeletonContent:"cp",communityFeed__postSkeletonLine:"s",pulse:"mr",communityFeed__emptyPost:"np",communityFeed__emptyPostIcon:"dp",communityFeed__emptyPostText:"mp",communityFeed__announcePost:"pp"};var q2e=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"61",height:"41",viewBox:"0 0 61 41",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M58.3438 0.5C59.7148 0.5 60.875 1.66016 60.875 3.03125V38.4688C60.875 39.9453 59.7148 41 58.3438 41H5.1875C2.33984 41 0.125 38.7852 0.125 35.9375V6.40625C0.125 5.03516 1.17969 3.875 2.65625 3.875H6.875V3.03125C6.875 1.66016 7.92969 0.5 9.40625 0.5H58.3438ZM3.5 35.9375C3.5 36.8867 4.23828 37.625 5.1875 37.625C6.03125 37.625 6.875 36.8867 6.875 35.9375V7.25H3.5V35.9375ZM57.5 37.625V3.875H10.25V35.9375V36.043C10.25 36.4648 10.0391 37.2031 9.93359 37.625H57.5ZM14.8906 27.5C14.1523 27.5 13.625 26.9727 13.625 26.2344V8.51562C13.625 7.88281 14.1523 7.25 14.8906 7.25H32.6094C33.2422 7.25 33.875 7.88281 33.875 8.51562V26.2344C33.875 26.9727 33.2422 27.5 32.6094 27.5H14.8906ZM17 10.625V24.125H30.5V10.625H17ZM13.625 32.9844V32.1406C13.625 31.5078 14.1523 30.875 14.8906 30.875H32.6094C33.2422 30.875 33.875 31.5078 33.875 32.1406V32.9844C33.875 33.7227 33.2422 34.25 32.6094 34.25H14.8906C14.1523 34.25 13.625 33.7227 13.625 32.9844ZM37.25 32.9844V32.1406C37.25 31.5078 37.7773 30.875 38.5156 30.875H52.8594C53.4922 30.875 54.125 31.5078 54.125 32.1406V32.9844C54.125 33.7227 53.4922 34.25 52.8594 34.25H38.5156C37.7773 34.25 37.25 33.7227 37.25 32.9844ZM37.25 26.2344V25.3906C37.25 24.7578 37.7773 24.125 38.5156 24.125H52.8594C53.4922 24.125 54.125 24.7578 54.125 25.3906V26.2344C54.125 26.9727 53.4922 27.5 52.8594 27.5H38.5156C37.7773 27.5 37.25 26.9727 37.25 26.2344ZM37.25 12.7344V11.8906C37.25 11.2578 37.7773 10.625 38.5156 10.625H52.8594C53.4922 10.625 54.125 11.2578 54.125 11.8906V12.7344C54.125 13.4727 53.4922 14 52.8594 14H38.5156C37.7773 14 37.25 13.4727 37.25 12.7344ZM37.25 19.4844V18.6406C37.25 18.0078 37.7773 17.375 38.5156 17.375H52.8594C53.4922 17.375 54.125 18.0078 54.125 18.6406V19.4844C54.125 20.2227 53.4922 20.75 52.8594 20.75H38.5156C37.7773 20.75 37.25 20.2227 37.25 19.4844Z"}))},W5=q2e;var dd={lockPrivateContent__wrap:"gp",lockPrivateContent__lockIcon:"hp",lockPrivateContent__title:"fp",lockPrivateContent__body:"bp"};var pd=()=>R.createElement("div",{className:dd.lockPrivateContent__wrap},R.createElement(Z5,{className:dd.lockPrivateContent__lockIcon}),R.createElement(S.Title,{className:dd.lockPrivateContent__title},"This community is private"),R.createElement(S.Body,{className:dd.lockPrivateContent__body},"Only invited members can see the posts."));function ud({communityId:e,level:t,shouldSubscribe:o=!0,callback:r}){return ea({fetcher:CommunityRepository.getCommunity,params:e,callback:r,shouldSubscribe:!!e&&o,getSubscribedTopic:({data:n})=>getCommunityTopic(n,t)})}function gd({communityId:e,placement:t}){let n=dt({fetcher:PostRepository.getPinnedPosts,params:{communityId:e,placement:t,sortBy:"lastPinned"},shouldCall:!!e}),{items:o}=n,r=P(n,["items"]);return c({pinnedPost:o},r)}var fd=()=>R.createElement("div",{className:lo.communityFeed__postSkeleton},R.createElement("div",{className:lo.communityFeed__postSkeletonHeader},R.createElement("div",{className:lo.communityFeed__postSkeletonAvatar}),R.createElement("div",{className:lo.communityFeed__postSkeletonUserInfo},R.createElement("div",{className:lo.communityFeed__postSkeletonUsername}),R.createElement("div",{className:lo.communityFeed__postSkeletonSubtitle}))),R.createElement("div",{className:lo.communityFeed__postSkeletonContent},R.createElement("div",{className:lo.communityFeed__postSkeletonLine}),R.createElement("div",{className:lo.communityFeed__postSkeletonLine}),R.createElement("div",{className:lo.communityFeed__postSkeletonLine}))),K5=({pageId:e="*",communityId:t})=>{let o="community_feed_component",{isExcluded:r,accessibilityId:n,themeStyles:i}=te({pageId:e,componentId:o}),{community:a}=Pt({communityId:t,shouldCall:!!t}),s=(a==null?void 0:a.isJoined)&&!(a!=null&&a.isPublic),{posts:l,hasMore:d,loadMore:p,isLoading:u}=ff({feedType:"published",targetId:t,targetType:"community",limit:10}),{pinnedPost:g,isLoading:f,refresh:y}=gd({communityId:t,placement:"announcement"}),{AmityCommunityProfilePageBehavior:v}=bt();ud({communityId:t,level:SubscriptionLevels.POST});let C=useRef(null);if(useEffect(()=>{let b=new IntersectionObserver(M=>_(void 0,null,function*(){M[0].isIntersecting&&d&&p();}),{threshold:.5});return C.current&&b.observe(C.current),()=>{C.current&&b.unobserve(C.current);}},[d,p]),useEffect(()=>{y();},[]),r)return null;let h=()=>{let b=l.filter(M=>!g.some(I=>I.post.postId===M.postId));return R.createElement(R.Fragment,null,u?Array.from({length:2}).map((M,I)=>R.createElement(fd,{key:I})):b&&b.map(M=>R.createElement(O,{className:lo.communityFeed__postContent,onPress:()=>{var I;return (I=v==null?void 0:v.goToPostDetailPage)==null?void 0:I.call(v,{postId:M.postId,hideTarget:!0})}},R.createElement(fn,{key:M.postId,post:M,category:"general",style:"feed",hideTarget:!0,onClick:()=>{var I;return (I=v==null?void 0:v.goToPostDetailPage)==null?void 0:I.call(v,{postId:M.postId,hideTarget:!0})}}))),(l==null?void 0:l.length)===0&&!u&&R.createElement("div",{className:lo.communityFeed__emptyPost},R.createElement(W5,{className:lo.communityFeed__emptyPostIcon}),R.createElement("p",{className:lo.communityFeed__emptyPostText},"No post yet")),R.createElement("div",{ref:C,className:lo.communityFeed__observerTarget}))},x=()=>f?R.createElement(fd,null):g&&g.map(({post:b})=>R.createElement(O,{onPress:()=>{var M;(M=v==null?void 0:v.goToPostDetailPage)==null||M.call(v,{postId:b.postId,hideTarget:!0,category:"announcement"});},className:lo.communityFeed__announcePost},R.createElement(fn,{key:b.postId,post:b,category:"announcement",style:"feed",hideTarget:!0,onClick:()=>{var M;return (M=v==null?void 0:v.goToPostDetailPage)==null?void 0:M.call(v,{postId:b.postId,hideTarget:!0})},onPostDeleted:()=>y()})));return R.createElement("div",{"data-qa-anchor":n,className:lo.communityFeed__container,style:i},s||a!=null&&a.isPublic?R.createElement(R.Fragment,null,x(),h()):R.createElement(pd,null))};var wL=({communityId:e})=>R.createElement("div",null,"CommunityPinnedPost");var oce=Ta`
|
|
4744
|
+
0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z`}));var mf=({pageId:e="*",componentId:t="*",onClick:o,className:r,defaultClassName:n})=>{let i="community_join_button",{config:a,themeStyles:s,accessibilityId:l,isExcluded:d,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{"data-qa-anchor":l,style:s,onPress:o,className:cr(lf.communityJoinButton,r)},R.createElement(ee,{defaultIcon:()=>R.createElement(fL,{className:cr(lf.joinButton,n)}),imgIcon:()=>R.createElement("img",{src:a.icon,alt:p}),defaultIconName:u.icon,configIconName:a.icon}),"Join")};var H2e=createContext({activeTab:"community_feed",setActiveTab:()=>{}}),$5=()=>useContext(H2e);var hL=()=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},R.createElement("circle",{cx:"9.88525",cy:"10",r:"5.5",fill:"white"}),R.createElement("path",{d:"M8.62899 17.3036C9.55401 18.2356 10.4373 18.2286 11.3693 17.3036L12.4125 16.2604C12.5099 16.163 12.5934 16.1352 12.7185 16.1352H14.193C15.5075 16.1352 16.1334 15.5092 16.1334 14.1947V12.7203C16.1334 12.5951 16.1682 12.5047 16.2586 12.4143L17.3019 11.3641C18.2339 10.439 18.2269 9.55575 17.3019 8.63073L16.2586 7.58748C16.1682 7.49011 16.1334 7.40665 16.1334 7.28146V5.807C16.1334 4.4925 15.5075 3.86655 14.193 3.86655H12.7185C12.5934 3.86655 12.5029 3.83178 12.4125 3.74136L11.3693 2.69811C10.4373 1.76614 9.55401 1.76614 8.62899 2.70507L7.58574 3.74136C7.49533 3.83178 7.40491 3.86655 7.27972 3.86655H5.80526C4.49076 3.86655 3.86481 4.47859 3.86481 5.807V7.28146C3.86481 7.40665 3.83004 7.49707 3.73962 7.58748L2.69637 8.63073C1.7644 9.55575 1.77136 10.439 2.69637 11.3641L3.73962 12.4143C3.83004 12.5047 3.86481 12.5951 3.86481 12.7203V14.1947C3.86481 15.5092 4.49076 16.1352 5.80526 16.1352H7.27972C7.40491 16.1352 7.48837 16.163 7.58574 16.2604L8.62899 17.3036ZM8.8446 13.5618C8.60117 13.5618 8.40643 13.4714 8.25342 13.3115L6.02782 10.8216C5.90959 10.6964 5.84699 10.5225 5.84699 10.3486C5.84699 9.93132 6.14606 9.63225 6.57727 9.63225C6.81374 9.63225 6.98761 9.70876 7.14062 9.87568L8.81678 11.7466L12.1691 6.96153C12.336 6.72506 12.5168 6.62769 12.795 6.62769C13.2263 6.62769 13.5323 6.92676 13.5323 7.33015C13.5323 7.46925 13.4766 7.64312 13.3723 7.78918L9.47055 13.2628C9.31059 13.4714 9.10194 13.5618 8.8446 13.5618Z",fill:"#1054DE"}));var pf=({pageId:e="*",componentId:t="*"})=>{let o="community_verify_badge",{config:r,themeStyles:n,accessibilityId:i,isExcluded:a,uiReference:s,defaultConfig:l}=A({pageId:e,componentId:t,elementId:o});return a?null:R.createElement(ee,{"data-qa-anchor":i,defaultIcon:()=>R.createElement(hL,null),imgIcon:()=>R.createElement("img",{src:r.icon,alt:s}),defaultIconName:l.icon,configIconName:r.icon})};var md={descriptionWrapper:"Jm",description:"lr",expanded:"Km",toggleButton:"Nm"};var uf=({pageId:e="*",componentId:t="*",description:o=""})=>{let[r,n]=useState(!1),[i,a]=useState(!1),s=useRef(null),l="community_description",{themeStyles:d,accessibilityId:p,isExcluded:u}=A({pageId:e,componentId:t,elementId:l}),g=180,f=o.length>g?o.slice(0,g):o;if(useEffect(()=>{s.current&&a(o.length>g);},[o]),u)return null;let y=()=>n(!0);return R.createElement("div",{"data-qa-anchor":p,style:d,className:md.descriptionWrapper},R.createElement("div",{ref:s,className:`${md.description} ${r?md.expanded:""}`},R.createElement(S.Body,null,r?o:f," ",i&&!r&&R.createElement(O,{onPress:y,className:md.toggleButton}," ","...See more"))))};var vL={communityName__truncate:"Om"};var gf=({pageId:e="*",componentId:t="*",name:o=""})=>{let r="community_name",{config:n,themeStyles:i,accessibilityId:a,isExcluded:s}=A({pageId:e,componentId:t,elementId:r});return s?null:R.createElement(S.Heading,{"data-qa-anchor":a,className:vL.communityName__truncate},o)};var cd={communityInfo__container:"Pm",communityInfo__wrapper:"Qm",communityInfo__count:"Wm",communityInfo__title:"Zm"};var G5=({pageId:e="*",componentId:t="*",count:o,text:r,onClick:n})=>{let i="community_info",{config:a,accessibilityId:s,themeStyles:l,isExcluded:d}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{onPress:n,className:cd.communityInfo__container},R.createElement("div",{className:cd.communityInfo__wrapper},R.createElement(S.BodyBold,{className:cd.communityInfo__count},ib(o)),R.createElement(S.Caption,{className:cd.communityInfo__title},r)))};var G2e=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"61",height:"61",viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M33.0312 44.25C33.0312 45.7266 31.8711 46.7812 30.5 46.7812C29.0234 46.7812 27.9688 45.7266 27.9688 44.25V37.5C27.9688 36.1289 29.0234 34.9688 30.5 34.9688C31.8711 34.9688 33.0312 36.1289 33.0312 37.5V44.25ZM30.5 3.75C37.8828 3.75 44 9.86719 44 17.25V24H47.375C51.0664 24 54.125 27.0586 54.125 30.75V51C54.125 54.7969 51.0664 57.75 47.375 57.75H13.625C9.82812 57.75 6.875 54.7969 6.875 51V30.75C6.875 27.0586 9.82812 24 13.625 24H17V17.25C17 9.86719 23.0117 3.75 30.5 3.75ZM30.5 8.8125C25.7539 8.8125 22.0625 12.6094 22.0625 17.25V24H38.9375V17.25C38.9375 12.6094 35.1406 8.8125 30.5 8.8125ZM13.625 29.0625C12.6758 29.0625 11.9375 29.9062 11.9375 30.75V51C11.9375 51.9492 12.6758 52.6875 13.625 52.6875H47.375C48.2188 52.6875 49.0625 51.9492 49.0625 51V30.75C49.0625 29.9062 48.2188 29.0625 47.375 29.0625H13.625Z"}))},Z5=G2e;var Q5=({pageId:e="*",community:t})=>{let {onBack:o,onEditCommunity:r}=Be(),{activeTab:n,setActiveTab:i}=$5(),{communityCategories:a,avatarFileUrl:s,joinCommunity:l,pendingPostsCount:d,canReviewCommunityPosts:p}=yc(t.communityId),u=f=>{i(f);};t.isJoined&&t.postSetting&&p&&d>0;return R.createElement("div",{className:Ca.container},R.createElement(sf,{pageId:e,image:s,onBack:o,onClickMenu:()=>r(t.communityId)}),R.createElement("div",{className:Ca.content},R.createElement("div",{className:Ca.name},!t.isPublic&&R.createElement(Z5,{className:Ca.communityProfile__privateIcon}),R.createElement(gf,{pageId:e,name:t.displayName}),t.isOfficial&&R.createElement(pf,null)),R.createElement(Ln,{pageId:e,categories:a}),R.createElement(uf,{pageId:e,description:t.description||""}),R.createElement("div",{className:Ca.communityProfile__communityInfo__container},R.createElement(G5,{count:t.postsCount,text:"posts"}),R.createElement("div",{className:Ca.divider}),R.createElement(G5,{count:t.membersCount,text:"members",onClick:()=>r(t.communityId,"MEMBERS")})),!t.isJoined&&t.isPublic&&R.createElement("div",{className:Ca.communityProfile__joinButton__container},R.createElement(mf,{onClick:l})),R.createElement("div",null,R.createElement(Um,{type:"communityFeed",communityId:t.communityId})),R.createElement(nf,{pageId:e,activeTab:n,onTabChange:u})),R.createElement("div",{className:Ca.communityProfile__divider}))};var Q2e=10;function ff({targetType:e,targetId:t,feedType:o,limit:r=Q2e}){let a=dt({fetcher:PostRepository.getPosts,params:{targetType:e,targetId:t,feedType:o,limit:r},shouldCall:!!t&&!!e}),{items:n}=a,i=P(a,["items"]);return c({posts:n},i)}var lo={communityFeed__container:"_m",communityFeed__loadingIndicator:"ep",communityFeed__observerTarget:"rp",communityFeed__post:"ap",communityFeed__spinner:"op",spin:"sr",communityFeed__postContent:"tp",communityFeed__postSkeleton:"ip",communityFeed__postSkeletonHeader:"lp",communityFeed__postSkeletonAvatar:"cr",communityFeed__postSkeletonUserInfo:"sp",communityFeed__postSkeletonUsername:"nr",communityFeed__postSkeletonSubtitle:"dr",communityFeed__postSkeletonContent:"cp",communityFeed__postSkeletonLine:"s",pulse:"mr",communityFeed__emptyPost:"np",communityFeed__emptyPostIcon:"dp",communityFeed__emptyPostText:"mp",communityFeed__announcePost:"pp"};var q2e=t=>{var e=P(t,[]);return R.createElement("svg",c({width:"61",height:"41",viewBox:"0 0 61 41",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M58.3438 0.5C59.7148 0.5 60.875 1.66016 60.875 3.03125V38.4688C60.875 39.9453 59.7148 41 58.3438 41H5.1875C2.33984 41 0.125 38.7852 0.125 35.9375V6.40625C0.125 5.03516 1.17969 3.875 2.65625 3.875H6.875V3.03125C6.875 1.66016 7.92969 0.5 9.40625 0.5H58.3438ZM3.5 35.9375C3.5 36.8867 4.23828 37.625 5.1875 37.625C6.03125 37.625 6.875 36.8867 6.875 35.9375V7.25H3.5V35.9375ZM57.5 37.625V3.875H10.25V35.9375V36.043C10.25 36.4648 10.0391 37.2031 9.93359 37.625H57.5ZM14.8906 27.5C14.1523 27.5 13.625 26.9727 13.625 26.2344V8.51562C13.625 7.88281 14.1523 7.25 14.8906 7.25H32.6094C33.2422 7.25 33.875 7.88281 33.875 8.51562V26.2344C33.875 26.9727 33.2422 27.5 32.6094 27.5H14.8906ZM17 10.625V24.125H30.5V10.625H17ZM13.625 32.9844V32.1406C13.625 31.5078 14.1523 30.875 14.8906 30.875H32.6094C33.2422 30.875 33.875 31.5078 33.875 32.1406V32.9844C33.875 33.7227 33.2422 34.25 32.6094 34.25H14.8906C14.1523 34.25 13.625 33.7227 13.625 32.9844ZM37.25 32.9844V32.1406C37.25 31.5078 37.7773 30.875 38.5156 30.875H52.8594C53.4922 30.875 54.125 31.5078 54.125 32.1406V32.9844C54.125 33.7227 53.4922 34.25 52.8594 34.25H38.5156C37.7773 34.25 37.25 33.7227 37.25 32.9844ZM37.25 26.2344V25.3906C37.25 24.7578 37.7773 24.125 38.5156 24.125H52.8594C53.4922 24.125 54.125 24.7578 54.125 25.3906V26.2344C54.125 26.9727 53.4922 27.5 52.8594 27.5H38.5156C37.7773 27.5 37.25 26.9727 37.25 26.2344ZM37.25 12.7344V11.8906C37.25 11.2578 37.7773 10.625 38.5156 10.625H52.8594C53.4922 10.625 54.125 11.2578 54.125 11.8906V12.7344C54.125 13.4727 53.4922 14 52.8594 14H38.5156C37.7773 14 37.25 13.4727 37.25 12.7344ZM37.25 19.4844V18.6406C37.25 18.0078 37.7773 17.375 38.5156 17.375H52.8594C53.4922 17.375 54.125 18.0078 54.125 18.6406V19.4844C54.125 20.2227 53.4922 20.75 52.8594 20.75H38.5156C37.7773 20.75 37.25 20.2227 37.25 19.4844Z"}))},W5=q2e;var dd={lockPrivateContent__wrap:"gp",lockPrivateContent__lockIcon:"hp",lockPrivateContent__title:"fp",lockPrivateContent__body:"bp"};var pd=()=>R.createElement("div",{className:dd.lockPrivateContent__wrap},R.createElement(Z5,{className:dd.lockPrivateContent__lockIcon}),R.createElement(S.Title,{className:dd.lockPrivateContent__title},"This community is private"),R.createElement(S.Body,{className:dd.lockPrivateContent__body},"Only invited members can see the posts."));function ud({communityId:e,level:t,shouldSubscribe:o=!0,callback:r}){return ta({fetcher:CommunityRepository.getCommunity,params:e,callback:r,shouldSubscribe:!!e&&o,getSubscribedTopic:({data:n})=>getCommunityTopic(n,t)})}function gd({communityId:e,placement:t}){let n=dt({fetcher:PostRepository.getPinnedPosts,params:{communityId:e,placement:t,sortBy:"lastPinned"},shouldCall:!!e}),{items:o}=n,r=P(n,["items"]);return c({pinnedPost:o},r)}var fd=()=>R.createElement("div",{className:lo.communityFeed__postSkeleton},R.createElement("div",{className:lo.communityFeed__postSkeletonHeader},R.createElement("div",{className:lo.communityFeed__postSkeletonAvatar}),R.createElement("div",{className:lo.communityFeed__postSkeletonUserInfo},R.createElement("div",{className:lo.communityFeed__postSkeletonUsername}),R.createElement("div",{className:lo.communityFeed__postSkeletonSubtitle}))),R.createElement("div",{className:lo.communityFeed__postSkeletonContent},R.createElement("div",{className:lo.communityFeed__postSkeletonLine}),R.createElement("div",{className:lo.communityFeed__postSkeletonLine}),R.createElement("div",{className:lo.communityFeed__postSkeletonLine}))),K5=({pageId:e="*",communityId:t})=>{let o="community_feed_component",{isExcluded:r,accessibilityId:n,themeStyles:i}=te({pageId:e,componentId:o}),{community:a}=Pt({communityId:t,shouldCall:!!t}),s=(a==null?void 0:a.isJoined)&&!(a!=null&&a.isPublic),{posts:l,hasMore:d,loadMore:p,isLoading:u}=ff({feedType:"published",targetId:t,targetType:"community",limit:10}),{pinnedPost:g,isLoading:f,refresh:y}=gd({communityId:t,placement:"announcement"}),{AmityCommunityProfilePageBehavior:v}=bt();ud({communityId:t,level:SubscriptionLevels.POST});let C=useRef(null);if(useEffect(()=>{let b=new IntersectionObserver(M=>_(void 0,null,function*(){M[0].isIntersecting&&d&&p();}),{threshold:.5});return C.current&&b.observe(C.current),()=>{C.current&&b.unobserve(C.current);}},[d,p]),useEffect(()=>{y();},[]),r)return null;let h=()=>{let b=l.filter(M=>!g.some(I=>I.post.postId===M.postId));return R.createElement(R.Fragment,null,u?Array.from({length:2}).map((M,I)=>R.createElement(fd,{key:I})):b&&b.map(M=>R.createElement(O,{className:lo.communityFeed__postContent,onPress:()=>{var I;return (I=v==null?void 0:v.goToPostDetailPage)==null?void 0:I.call(v,{postId:M.postId,hideTarget:!0})}},R.createElement(fn,{key:M.postId,post:M,category:"general",style:"feed",hideTarget:!0,onClick:()=>{var I;return (I=v==null?void 0:v.goToPostDetailPage)==null?void 0:I.call(v,{postId:M.postId,hideTarget:!0})}}))),(l==null?void 0:l.length)===0&&!u&&R.createElement("div",{className:lo.communityFeed__emptyPost},R.createElement(W5,{className:lo.communityFeed__emptyPostIcon}),R.createElement("p",{className:lo.communityFeed__emptyPostText},"No post yet")),R.createElement("div",{ref:C,className:lo.communityFeed__observerTarget}))},x=()=>f?R.createElement(fd,null):g&&g.map(({post:b})=>R.createElement(O,{onPress:()=>{var M;(M=v==null?void 0:v.goToPostDetailPage)==null||M.call(v,{postId:b.postId,hideTarget:!0,category:"announcement"});},className:lo.communityFeed__announcePost},R.createElement(fn,{key:b.postId,post:b,category:"announcement",style:"feed",hideTarget:!0,onClick:()=>{var M;return (M=v==null?void 0:v.goToPostDetailPage)==null?void 0:M.call(v,{postId:b.postId,hideTarget:!0})},onPostDeleted:()=>y()})));return R.createElement("div",{"data-qa-anchor":n,className:lo.communityFeed__container,style:i},s||a!=null&&a.isPublic?R.createElement(R.Fragment,null,x(),h()):R.createElement(pd,null))};var wL=({communityId:e})=>R.createElement("div",null,"CommunityPinnedPost");var oce=ka`
|
|
4745
4745
|
from {
|
|
4746
4746
|
transform: rotate(0deg);
|
|
4747
4747
|
}
|
|
@@ -4750,11 +4750,11 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4750
4750
|
}
|
|
4751
4751
|
`,rce=m.svg`
|
|
4752
4752
|
animation: ${oce} 2s linear infinite;
|
|
4753
|
-
`,nce=e=>R.createElement(rce,c({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none"},e),R.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"white",strokeWidth:"2"}),R.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"#1054DE",strokeWidth:"2",strokeDasharray:"46.75",strokeDashoffset:"21",strokeLinecap:"round",strokeLinejoin:"round"})),J5=nce;var hf={storyCommentButton:"up",storyCommentIcon:"vp"};var sce=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),R.createElement("path",{fill:"#A5A9B5",d:"M10 2.188c4.682 0 8.5 3.12 8.5 6.906C18.5 12.912 14.682 16 10 16c-1.295 0-2.49-.232-3.586-.63-.797.663-2.457 1.693-4.648 1.693-.133 0-.2-.034-.266-.133-.033-.1 0-.233.066-.3 0-.032 1.395-1.493 1.827-3.187-1.196-1.195-1.893-2.69-1.893-4.35 0-3.784 3.785-6.905 8.5-6.905z"})),ML=({pageId:e="*",componentId:t="*",onPress:o,commentsCount:r,imgClassName:n})=>{let i="story_comment_button",{isExcluded:a,accessibilityId:s,defaultConfig:l,config:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return a?null:R.createElement(O,{"data-qa-anchor":s,onPress:o,style:u,className:cr(hf.storyCommentButton)},R.createElement(ee,{defaultIconName:l.icon,configIconName:d.icon,imgIcon:()=>R.createElement("img",{src:d.icon,alt:p,className:cr(n),style:u}),defaultIcon:()=>R.createElement("div",{className:cr(hf.storyCommentIcon)},R.createElement(sce,null),R.createElement(S.BodyBold,null,ib(r)))}))};var vf={storyReactionButton:"xp",storyReactionIcon:"wp"};var cce=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),R.createElement("path",{fill:"#A5A9B5",d:"M17.793 11.025c.148.854.037 1.67-.334 2.338a3.437 3.437 0 01-.668 2.487c-.037 2.078-1.299 3.525-4.156 3.525h-.854c-3.785 0-4.935-1.41-6.605-1.447-.112.482-.594.853-1.114.853H1.688c-.667 0-1.187-.52-1.187-1.187V8.687c0-.63.52-1.187 1.188-1.187h3.636c.705-.594 1.707-2.227 2.56-3.08.52-.52.372-4.045 2.673-4.045 2.115 0 3.525 1.188 3.525 3.896 0 .706-.148 1.262-.334 1.745h1.373c1.781 0 3.191 1.521 3.191 3.154 0 .705-.185 1.299-.519 1.855zm-2.3 2.004c.816-.742.704-1.892.185-2.449.37 0 .853-.705.853-1.373-.037-.705-.63-1.41-1.41-1.41h-3.86c0-1.41 1.04-2.078 1.04-3.526 0-.89 0-2.115-1.744-2.115-.705.705-.372 2.487-1.41 3.526-1.002 1.002-2.45 3.6-3.526 3.6H5.25v6.939c1.967 0 3.71 1.373 6.346 1.373h1.41c1.299 0 2.264-.631 1.967-2.412.556-.334 1.002-1.373.52-2.153zM3.765 16.406a.903.903 0 00-.891-.89.88.88 0 00-.89.89c0 .52.37.89.89.89a.88.88 0 00.89-.89z"})),dce=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},e),R.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"url(#paint0_linear_7702_34939)"}),R.createElement("path",{fill:"#fff",d:"M7.486 10.575H5.42a.611.611 0 00-.62.619v6.187c0 .361.258.619.62.619h2.066c.336 0 .62-.258.62-.619v-6.187a.628.628 0 00-.62-.62zm-1.033 6.394a.596.596 0 01-.62-.62c0-.334.258-.618.62-.618.336 0 .62.284.62.619 0 .36-.284.619-.62.619zm8.264-10.055c0-1.908-1.24-2.114-1.859-2.114-.542 0-.775 1.031-.878 1.495-.155.567-.284 1.134-.672 1.521-.826.851-1.265 1.908-2.298 2.913a.415.415 0 00-.078.232v5.518c0 .154.13.283.284.31.414 0 .956.231 1.37.412.826.36 1.833.799 3.073.799h.077c1.11 0 2.428 0 2.944-.748.233-.31.285-.696.155-1.16.44-.438.646-1.263.44-1.934.439-.593.49-1.443.232-2.036.31-.31.516-.8.49-1.264 0-.799-.67-1.52-1.523-1.52h-2.635c.207-.723.878-1.341.878-2.424z"}),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_7702_34939",x1:"9",x2:"19.8",y1:"2.4",y2:"29.4",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#5B9DFF"}),R.createElement("stop",{offset:"1",stopColor:"#0041BE"})))),PL=({myReactions:e=[],reactionsCount:t,pageId:o="*",componentId:r="*",defaultIconClassName:n,imgIconClassName:i,onPress:a})=>{let s="story_reaction_button",{isExcluded:l,accessibilityId:d,config:p,uiReference:u,themeStyles:g}=A({pageId:o,componentId:r,elementId:s}),f=e.length>0;return l?null:R.createElement(O,{"data-qa-anchor":d,className:cr(vf.storyReactionButton),onPress:a,style:g},R.createElement(ee,{defaultIcon:()=>R.createElement("div",{className:cr(vf.storyReactionIcon,n)},f?R.createElement(dce,null):R.createElement(cce,null),R.createElement(S.BodyBold,null,ib(t))),imgIcon:()=>R.createElement("img",{src:p.icon,alt:u,className:cr(i)})}))};var ws={viewStoryCompostBarContainer:"yp",viewStoryFailedCompostBarContainer:"kp",viewStoryFailedCompostBarWrapper:"jp",viewStoryUploadingWrapper:"zp",viewStoryCompostBarViewIconContainer:"Xp",viewStoryCompostBarEngagementContainer:"Yp",viewStoryCommentButton:"Cp",viewStoryCommentIcon:"Ap"};var uce=({pageId:e="*",syncState:t,reach:o,commentsCount:r,reactionsCount:n,isLiked:i,storyId:a,onClickComment:s,showImpression:l,isMember:d,myReactions:p})=>{let u=_o(),g=()=>_(void 0,null,function*(){try{if(!d){u.info({content:"Join community to interact with all stories"});return}i?yield ReactionRepository.removeReaction("story",a,ur):yield ReactionRepository.addReaction("story",a,ur);}catch(f){console.error("Can't toggle like",f);}});return t==="syncing"?R.createElement("div",{className:ws.viewStoryCompostBarContainer},R.createElement("div",{className:ws.viewStoryUploadingWrapper},R.createElement(J5,{width:20,height:20}),"Uploading...")):t==="error"?R.createElement("div",{className:ws.viewStoryFailedCompostBarContainer},R.createElement("div",{className:ws.viewStoryFailedCompostBarWrapper},R.createElement(y4,null),R.createElement("span",null,"Failed to upload")),R.createElement(ka,null)):R.createElement("div",{className:ws.viewStoryCompostBarContainer},R.createElement("div",null,l&&R.createElement("div",{className:ws.viewStoryCompostBarViewIconContainer},R.createElement(F3,{reach:o}))),R.createElement("div",{className:ws.viewStoryCompostBarEngagementContainer},R.createElement(ML,{pageId:e,commentsCount:r,onPress:s}),R.createElement(PL,{pageId:e,myReactions:p,reactionsCount:n,onPress:g})))},X5=uce;var Kr={iconButton:"Mp",rendererContainer:"Sp",storyVideo:"Ep",muteCircleIcon:"Fp",unmuteCircleIcon:"Ip",loadingOverlay:"Rp",storyImage:"Up",playStoryButton:"Bp",pauseStoryButton:"Dp",closeButton:"Hp",verifiedBadge:"Lp",dotsButton:"Tp",viewStoryInfoContainer:"Vp",viewStoryCompostBarContainer:"qp",viewStoryCompostBarViewIconContainer:"Gp",viewStoryCompostBarEngagementContainer:"Jp",viewStoryCompostBarEngagementIconContainer:"Kp",storyContent:"Np",header:"Op",viewStoryContainer:"Pp",viewStoryHeaderContainer:"Qp",avatarContainer:"Wp",addStoryButton:"pr",viewStoryHeaderListActionsContainer:"Zp",viewStoryHeadingInfoContainer:"_p",viewStoryHeading:"eg",viewStoryHeadingTitle:"rg",viewStorySubHeading:"ag"};var hce=({community:e,heading:t,subheading:o,isHaveActions:r,isOfficial:n,isPaused:i,onPlay:a,onPause:s,onAction:l,onClose:d,onClickCommunity:p,haveStoryPermission:u,addStoryButton:g})=>R.createElement("div",{className:Kr.viewStoryHeaderContainer},R.createElement("div",{className:Kr.viewStoryHeadingInfoContainer},R.createElement("div",{className:Kr.avatarContainer},R.createElement(jr,{pageId:"story_page",community:e}),u&&g),R.createElement("div",{className:Kr.viewStoryInfoContainer},R.createElement("div",{className:Kr.viewStoryHeading},R.createElement(pw,{lines:1},R.createElement("div",{className:Kr.viewStoryHeadingTitle,"data-qa-anchor":"community_display_name",onClick:p},t)),n&&R.createElement(p1,{className:Kr.verifiedBadge})),R.createElement("span",{className:Kr.viewStorySubHeading},o))),R.createElement("div",{className:Kr.viewStoryHeaderListActionsContainer},i?R.createElement(Mo,{className:Kr.playStoryButton,"data-qa-anchor":"play_button",onClick:a}):R.createElement(As,{className:Kr.pauseStoryButton,"data-qa-anchor":"pause_button",onClick:s}),r&&R.createElement(O3,{pageId:"story_page",onPress:l}),R.createElement(kr,{defaultClassName:cr(Kr.closeButton),pageId:"story_page",onPress:d}))),Y5=hce;function yd({queryParams:e,shouldCall:t=!0}){let n=dt({fetcher:CommunityRepository.Membership.getMembers,params:E(c({},e),{includeDeleted:!1}),shouldCall:!!(e!=null&&e.communityId)&&t}),{items:o}=n,r=P(n,["items"]);return c({members:o},r)}var vo={iconButton:"og",hyperLinkContainer:"gr",rendererContainer:"tg",storyVideo:"ig",muteCircleIcon:"lg",unmuteCircleIcon:"sg",loadingOverlay:"cg",storyImageContainer:"ng",storyImage:"dg",playStoryButton:"mg",pauseStoryButton:"pg",closeButton:"gg",verifiedBadge:"hg",dotsButton:"fg",viewStoryInfoContainer:"bg",viewStoryCompostBarContainer:"ug",viewStoryCompostBarViewIconContainer:"vg",viewStoryCompostBarEngagementContainer:"xg",viewStoryCompostBarEngagementIconContainer:"wg",header:"yg",viewStoryContainer:"kg",viewStoryHeaderContainer:"jg",avatarContainer:"zg",addStoryButton:"hr",viewStoryHeaderListActionsContainer:"Xg",viewStoryHeadingInfoContainer:"Yg",viewStoryHeading:"Cg",viewStoryHeadingTitle:"Ag",viewStorySubHeading:"Mg",story:"Sg",storyContent:"Eg",actionButton:"fr",navigationOverlay:"Fg",leftOverlay:"Ig",rightOverlay:"Rg",imageFit:"Ug",imageFill:"Bg"};var R5={progressBarContainer:"Dg",progressSegment:"Hg",progressBar:"Lg"};var e2=R.memo(({pageId:e="*",componentId:t="*",duration:o,currentIndex:r,storiesCount:n,isPaused:i,onComplete:a})=>{let s="progress_bar",{config:l,isExcluded:d}=A({pageId:e,componentId:t,elementId:s}),[p,u]=useState(new Array(n).fill(0)),[g,f]=useState(r),y=l==null?void 0:l.backgroundColor,v=l==null?void 0:l.progressColor;return useEffect(()=>{r<g&&u(C=>{let h=[...C];return h[r]=0,h}),f(r);},[r,g]),useEffect(()=>{let C;return i||(C=setInterval(()=>{u(h=>{let x=[...h];return x[r]<100&&(x[r]+=100/o*100,x[r]>=100&&(x[r]=100,a())),x});},100)),()=>{C&&clearInterval(C);}},[o,r,i,a]),d?null:R.createElement("div",{className:cr(R5.progressBarContainer),style:{backgroundColor:y}},p.map((C,h)=>R.createElement("div",{key:h,className:cr(R5.progressSegment),style:{width:`calc(${100/n}% - 4px)`}},R.createElement("div",{className:cr(R5.progressBar),style:{width:`${h<r?100:h===r?C:0}%`,backgroundColor:v}}))))});var Pce=({story:{actions:e,fileInputRef:t,addStoryButton:o,currentIndex:r,storiesCount:n,increaseIndex:i,pageId:a,dragEventTarget:s,story:l,url:d},action:p,config:u,onClose:g,onClickCommunity:f})=>{var Li,wa,rt,In;let{formatMessage:y}=useIntl(),[v,C]=useState(!1),[h,x]=useState(!1),[b,M]=useState(!1),[I,w]=useState(!1),{loader:N}=u,{client:T}=Ae(),[L,D]=useState(""),U=useRef(null),Z=!!(l&&l.myReactions&&l.myReactions.includes(On)),B=(l==null?void 0:l.reactionsCount)||0,{storyId:$,syncState:G,reach:q,commentsCount:z,createdAt:H,creator:F,community:j,myReactions:Q,data:k,items:V}=l,{members:ae}=yd({queryParams:{communityId:j==null?void 0:j.communityId},shouldCall:!!(j!=null&&j.communityId)}),be=(ae==null?void 0:ae.find(Ke=>Ke.userId===(T==null?void 0:T.userId)))!=null,{user:pe}=fr(T==null?void 0:T.userId),We=(j==null?void 0:j.isOfficial)||!1,vt=(F==null?void 0:F.userId)===(pe==null?void 0:pe.userId),Vt=l5(pe==null?void 0:pe.roles),jt=s5(pe==null?void 0:pe.roles),De=Vt||jt||us(T,j==null?void 0:j.communityId),ir=useMemo(()=>R.createElement("div",{"data-qa-anchor":"community_display_name"},j==null?void 0:j.displayName),[j==null?void 0:j.displayName]),Dr=useMemo(()=>H&&(F!=null&&F.displayName)?R.createElement("span",null,R.createElement("span",{"data-qa-anchor":"created_at"},m5(H))," \u2022 By"," ",R.createElement("span",{"data-qa-anchor":"creator_display_name"},F==null?void 0:F.displayName)):"",[H,F==null?void 0:F.displayName]),qe="asc-uikit-stories-viewer",Rr=useCallback(()=>{if(U.current&&U.current.complete){let to=new Mce().getPalette(U.current,2);if(to){let Je=`linear-gradient(to top, rgb(${to[0].join(",")}), rgb(${to[1].join(",")})`;D(Je);}}},[]),bn=useCallback(()=>{C(!0),I&&w(!1),p("play",!0),Rr();},[p,I,Rr]),Hr=()=>{p("play",!0),w(!1);},en=()=>{p("pause",!0),w(!0);},ce=()=>{p("pause",!0),x(!0);},ue=()=>{p("play",!0),x(!1);},tn=()=>{p("pause",!0),M(!0);},Uo=()=>{p("play",!0),M(!1);},Fr=()=>{g();},Bi=()=>{i();};return useEffect(()=>{U.current&&U.current.complete&&Rr();},[]),useEffect(()=>{if(t.current){let Ke=()=>{p("pause",!0),w(!0);},to=()=>{p("play",!0),w(!1);};return t.current.addEventListener("click",Ke),t.current.addEventListener("cancel",to),()=>{t.current&&(t.current.removeEventListener("cancel",to),t.current.removeEventListener("click",Ke));}}},[t]),useEffect(()=>{var Ke,to;if(s){let Je=()=>{p("pause",!0),w(!0);},oo=()=>{p("play",!0),w(!1);};return (Ke=s.current)==null||Ke.addEventListener("dragstart",Je),(to=s.current)==null||to.addEventListener("dragend",oo),()=>{var Ai,ar;(Ai=s.current)==null||Ai.removeEventListener("dragstart",Je),(ar=s.current)==null||ar.removeEventListener("dragend",oo);}}},[s]),R.createElement("div",{className:vo.rendererContainer,style:{background:L}},R.createElement(e2,{pageId:a,duration:5e3,currentIndex:r,storiesCount:n,isPaused:I||h||b,onComplete:Bi}),R.createElement(Y5,{community:j,heading:ir,subheading:Dr,isHaveActions:(e==null?void 0:e.length)>0,haveStoryPermission:De,isOfficial:We,isPaused:I,onPlay:Hr,onPause:en,onAction:ce,onClickCommunity:()=>f==null?void 0:f(),onClose:Fr,addStoryButton:o}),R.createElement("div",{className:cr(vo.storyImageContainer,{[vo.imageFit]:k.imageDisplayMode==="fit",[vo.imageFill]:k.imageDisplayMode==="fill"})},R.createElement("img",{ref:U,className:cr(vo.storyImage,{[vo.imageFit]:k.imageDisplayMode==="fit",[vo.imageFill]:k.imageDisplayMode==="fill"}),"data-qa-anchor":"image_view",src:d!=null?d:l==null?void 0:l.data.fileData,onLoad:bn,alt:"Story Image",crossOrigin:"anonymous"})),!v&&R.createElement("div",{className:vo.loadingOverlay},N||R.createElement("div",null,"loading...")),R.createElement(Sr,{rootId:qe,isOpen:h,onClose:ue,mountPoint:document.getElementById(qe),detent:"content-height"},e==null?void 0:e.map(Ke=>R.createElement(O,{key:Ke.name,className:vo.actionButton,onPress:()=>Ke==null?void 0:Ke.action()},(Ke==null?void 0:Ke.icon)&&Ke.icon,R.createElement(S.BodyBold,null,Ke.name)))),R.createElement(Sr,{rootId:qe,isOpen:b,onClose:Uo,mountPoint:document.getElementById(qe),detent:"full-height",headerTitle:y({id:"storyViewer.commentSheet.title"})},R.createElement(Am,{referenceId:$,referenceType:"story",community:j,shouldAllowCreation:j==null?void 0:j.allowCommentInStory,shouldAllowInteraction:be})),((wa=(Li=V==null?void 0:V[0])==null?void 0:Li.data)==null?void 0:wa.url)&&R.createElement("div",{className:vo.hyperLinkContainer},R.createElement(fi,{href:V[0].data.url.startsWith("http")?V[0].data.url:`https://${V[0].data.url}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>l==null?void 0:l.analytics.markLinkAsClicked()},R.createElement(pw,{lines:1},R.createElement("span",null,((In=(rt=V[0])==null?void 0:rt.data)==null?void 0:In.customText)||V[0].data.url.replace(/^https?:\/\//,""))))),R.createElement(X5,{pageId:a,storyId:$,syncState:G,reach:q,commentsCount:z,reactionsCount:B,isLiked:Z,myReactions:Q,onClickComment:tn,showImpression:vt||us(T,j==null?void 0:j.communityId),isMember:be}))},_ce=e=>{var t;return {condition:!!((t=e.story)!=null&&t.storyId)&&(!e.type||e.type==="image"),priority:2}},BL={renderer:Pce,tester:_ce};var Sce=()=>{let[e,t]=useState(!1),o=useCallback(()=>t(!0),[]),r=useCallback(()=>t(!1),[]);return {muted:e,mute:o,unmute:r}},Nce=e=>{let[t,o]=useState(!1),r=useCallback(()=>{e("play",!0),o(!1);},[e]),n=useCallback(()=>{e("pause",!0),o(!0);},[e]);return {isPaused:t,play:r,pause:n}},Ece=e=>{let[t,o]=useState(!1),[r,n]=useState(!1),i=useCallback(()=>{e("pause",!0),o(!0);},[e]),a=useCallback(()=>{e("play",!0),o(!1);},[e]),s=useCallback(()=>{e("pause",!0),n(!0);},[e]),l=useCallback(()=>{e("play",!0),n(!1);},[e]);return {isBottomSheetOpen:t,isOpenCommentSheet:r,openBottomSheet:i,closeBottomSheet:a,openCommentSheet:s,closeCommentSheet:l}},Bce=({story:{actions:e,addStoryButton:t,fileInputRef:o,currentIndex:r,storiesCount:n,increaseIndex:i,pageId:a,dragEventTarget:s,story:l},action:d,config:p,messageHandler:u,onClose:g,onClickCommunity:f})=>{var Hr,en,ce,ue,tn,Uo,Fr,Bi,Li,wa;let[y,v]=useState(!1),{loader:C}=p,{client:h}=Ae(),{user:x}=fr(h==null?void 0:h.userId),b=useRef(null),{muted:M,mute:I,unmute:w}=Sce(),{isPaused:N,play:T,pause:L}=Nce(d),{isBottomSheetOpen:D,isOpenCommentSheet:U,openBottomSheet:Z,closeBottomSheet:B,openCommentSheet:$,closeCommentSheet:G}=Ece(d),{storyId:q,syncState:z,reach:H,commentsCount:F,createdAt:j,creator:Q,community:k,myReactions:V,data:ae,items:oe}=l,be=(Hr=l==null?void 0:l.myReactions)==null?void 0:Hr.includes(On),pe=(l==null?void 0:l.reactions[On])||0,{members:We}=yd({queryParams:{communityId:k==null?void 0:k.communityId},shouldCall:!!(k!=null&&k.communityId)}),vt=We==null?void 0:We.some(rt=>rt.userId===(h==null?void 0:h.userId)),Vt=(k==null?void 0:k.isOfficial)||!1,jt=(Q==null?void 0:Q.userId)===(x==null?void 0:x.userId),De=l5(x==null?void 0:x.roles),ir=s5(x==null?void 0:x.roles),Dr=De||ir||us(h,k==null?void 0:k.communityId),qe=useCallback(()=>{var rt;u("UPDATE_VIDEO_DURATION",{duration:(rt=l==null?void 0:l.videoData)==null?void 0:rt.attributes.metadata.video.duration}),v(!0),d("play",!0);},[u,(en=l==null?void 0:l.videoData)==null?void 0:en.attributes.metadata.video.duration,d]),Rr=useCallback(()=>{r+1<n?i():g();},[r,n,i,g]);useEffect(()=>{b.current&&(N||D||U?(b.current.pause(),d("pause",!0)):(b.current.play(),d("play",!0)));},[N,D,U,d]),useEffect(()=>{if(o.current){let rt=()=>{d("pause",!0),L();},In=()=>{d("play",!0),T();};return o.current.addEventListener("click",rt),o.current.addEventListener("cancel",In),()=>{var Ke,to;(Ke=o.current)==null||Ke.removeEventListener("click",rt),(to=o.current)==null||to.removeEventListener("cancel",In);}}},[d,L,T]),useEffect(()=>{if(s!=null&&s.current){let rt=()=>{d("pause",!0),L();},In=()=>{d("play",!0),T();};return s.current.addEventListener("dragstart",rt),s.current.addEventListener("dragend",In),()=>{var Ke,to;(Ke=s.current)==null||Ke.removeEventListener("dragstart",rt),(to=s.current)==null||to.removeEventListener("dragend",In);}}},[d,L,T,s]);let bn=Math.round(((ce=l==null?void 0:l.videoData)==null?void 0:ce.attributes.metadata.video.duration)*1e3);return R.createElement("div",{className:cr(vo.rendererContainer)},R.createElement(e2,{pageId:a,duration:bn,currentIndex:r,storiesCount:n,isPaused:N||D||U,onComplete:Rr}),R.createElement(j3,{pageId:"story_page",componentId:"*",isMuted:M,onPress:M?w:I}),R.createElement(Y5,{community:k,heading:R.createElement("div",{"data-qa-anchor":"community_display_name"},k==null?void 0:k.displayName),subheading:j&&(Q!=null&&Q.displayName)?R.createElement("span",null,R.createElement("span",{"data-qa-anchor":"created_at"},m5(j))," \u2022 By"," ",R.createElement("span",{"data-qa-anchor":"creator_display_name"},Q==null?void 0:Q.displayName)):"",isHaveActions:(e==null?void 0:e.length)>0,haveStoryPermission:Dr,isOfficial:Vt,isPaused:N,onPlay:T,onPause:L,onMute:I,onUnmute:w,onAction:Z,onClickCommunity:()=>f==null?void 0:f(),onClose:g,addStoryButton:t}),R.createElement("video",{"data-qa-anchor":"video_view",ref:b,className:cr(vo.storyVideo),src:((ue=l==null?void 0:l.videoData)==null?void 0:ue.fileUrl)||((Uo=(tn=l==null?void 0:l.videoData)==null?void 0:tn.videoUrl)==null?void 0:Uo.original),controls:!1,onLoadedData:qe,playsInline:!0,onWaiting:()=>d("pause",!0),onPlaying:()=>d("play",!0),muted:M,autoPlay:!0}),!y&&R.createElement("div",{className:cr(vo.loadingOverlay)},C||R.createElement("div",null,"loading...")),R.createElement(Sr,{rootId:"asc-uikit-stories-viewer",isOpen:D,onClose:B,mountPoint:document.getElementById("asc-uikit-stories-viewer"),detent:"content-height"},e==null?void 0:e.map(rt=>R.createElement(O,{key:rt.name,className:cr(vo.actionButton),onPress:rt==null?void 0:rt.action},rt==null?void 0:rt.icon,R.createElement(S.BodyBold,null,rt.name)))),R.createElement(Sr,{rootId:"asc-uikit-stories-viewer",isOpen:U,onClose:G,mountPoint:document.getElementById("asc-uikit-stories-viewer"),detent:"full-height"},R.createElement(Am,{referenceId:q,referenceType:"story",community:k,shouldAllowCreation:k==null?void 0:k.allowCommentInStory,shouldAllowInteraction:vt})),((Bi=(Fr=oe==null?void 0:oe[0])==null?void 0:Fr.data)==null?void 0:Bi.url)&&R.createElement("div",{className:cr(vo.hyperLinkContainer)},R.createElement(fi,{href:oe[0].data.url.startsWith("http")?oe[0].data.url:`https://${oe[0].data.url}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>l==null?void 0:l.analytics.markLinkAsClicked()},R.createElement(pw,{lines:1},R.createElement("span",null,((wa=(Li=oe[0])==null?void 0:Li.data)==null?void 0:wa.customText)||oe[0].data.url.replace(/^https?:\/\//,""))))),R.createElement(X5,{pageId:a,storyId:q,syncState:z,reach:H,commentsCount:F,reactionsCount:pe,isLiked:be,onClickComment:$,myReactions:V,showImpression:jt||us(h,k==null?void 0:k.communityId),isMember:vt}))},Lce=e=>{var t;return {condition:!!((t=e.story)!=null&&t.storyId)&&e.type==="video",priority:2}},LL={renderer:Bce,tester:Lce};var Dce=({story:e,action:t})=>(useEffect(()=>{t("play");},[e]),R.createElement("div",{style:DL.storyContent},R.createElement("p",{style:DL.text},"This story could not be loaded."))),DL={storyContent:{width:"100%",maxHeight:"100%",margin:"auto"},text:{textAlign:"center",color:"white",width:"90%",margin:"auto"}},Hce=()=>({condition:!0,priority:1}),HL={renderer:Dce,tester:Hce};var zce=e=>{useEffect(()=>{e.action("play");},[e.story]);let t=e.story.originalContent;return R.createElement(t,c({},e))},Uce=e=>({condition:!!e.content,priority:2}),FL={renderer:zce,tester:Uce};var Yt={drawer__content:"br",drawer__innerContent:"Tg",drawer__placeholder:"Vg",drawer__overlay:"qg",drawer__title:"Gg",drawer__content__data:"Jg",drawer__content__data__title:"Kg",drawer__content__data__text:"Ng",drawer__content__data__caption:"Og",drawer__content__data__infoIcon:"Pg",drawer__content__emptySpace:"Qg",drawer__container:"Wg",drawer__innerContainer:"Zg"};var OL=({isOpen:e,onOpenChange:t,ad:o,targetRef:r})=>{var n;return R.createElement(Drawer.Root,{open:e,onOpenChange:t,onDrag:i=>{i.preventDefault(),i.stopPropagation();}},R.createElement(Drawer.Portal,{container:r==null?void 0:r.current},R.createElement("div",{className:Yt.drawer__container},R.createElement("div",{className:Yt.drawer__innerContainer},R.createElement(Drawer.Overlay,{className:Yt.drawer__overlay}),R.createElement(Drawer.Content,{className:Yt.drawer__content},R.createElement("div",{className:Yt.drawer__innerContent},R.createElement("div",{className:Yt.drawer__placeholder}),R.createElement(Drawer.Title,{className:Yt.drawer__title},R.createElement(S.Title,null,"About this advertisement")),R.createElement("div",{className:Yt.drawer__content__data},R.createElement(S.BodyBold,{className:Yt.drawer__content__data__title},"Why this advertisement?"),R.createElement("div",{className:Yt.drawer__content__data__text},R.createElement(pn,{className:Yt.drawer__content__data__infoIcon}),R.createElement(S.Caption,{className:Yt.drawer__content__data__caption},"You're seeing this advertisement because it was displayed to all users in the system."))),R.createElement("div",{className:Yt.drawer__content__data},R.createElement(S.BodyBold,{className:Yt.drawer__content__data__title},"About this advertiser"),R.createElement("div",{className:Yt.drawer__content__data__text},R.createElement(pn,{className:Yt.drawer__content__data__infoIcon}),R.createElement(S.Caption,{className:Yt.drawer__content__data__caption},"Advertiser name: ",(n=o.advertiser)==null?void 0:n.companyName)))),R.createElement("div",{className:Yt.drawer__content__emptySpace}))))))};var Rt={iconButton:"_g",hyperLinkContainer:"eh",hyperLink__text:"rh",rendererContainer:"ah",storyVideo:"oh",muteCircleIcon:"th",unmuteCircleIcon:"ih",loadingOverlay:"lh",storyImageContainer:"sh",storyImage:"ch",playStoryButton:"nh",pauseStoryButton:"dh",closeButton:"mh",verifiedBadge:"ph",dotsButton:"gh",viewStoryInfoContainer:"hh",viewStoryCompostBarContainer:"fh",viewStoryCompostBarViewIconContainer:"bh",viewStoryCompostBarEngagementContainer:"uh",viewStoryCompostBarEngagementIconContainer:"vh",header:"xh",viewStoryContainer:"wh",viewStoryHeaderContainer:"yh",avatarContainer:"kh",addStoryButton:"ur",viewStoryHeaderListActionsContainer:"jh",viewStoryHeadingInfoContainer:"zh",viewStoryHeading:"Xh",viewStoryHeadingTitle:"Yh",viewStorySubHeading:"Ch",story:"Ah",storyContent:"Mh",actionButton:"vr",navigationOverlay:"Sh",leftOverlay:"Eh",rightOverlay:"Fh",imageFit:"Ih",imageFill:"Rh",infoIcon__button:"Uh",infoIcon:"Bh",storyAd__main:"Dh",storyAd__topBar:"Hh",storyAd__topBar__left:"Lh",storyAd__topBar__avatar:"Th",storyAd__topBar__text:"Vh",storyAd__topBar__advertiserName:"qh",storyAd__topBar__right:"Gh",storyAd__closeButton:"Jh"};var $L=({pageId:e="*",ad:t,avatarUrl:o,adImageUrl:r,currentIndex:n,isPaused:i,storiesCount:a,renderLoader:s=()=>R.createElement("div",null,"loading..."),onComplete:l=()=>{},onPauseClick:d,onPlayClick:p,onClose:u,onImageLoaded:g,onAdvertisementInfoOpen:f,onAdvertisementInfoClose:y})=>{var T;let[v,C]=useState(!1),[h,x]=useState(!1),b=()=>{x(!0),f==null||f();},M=()=>{x(!1),y==null||y();},I=useRef(null),w=useRef(null),N=()=>{C(!0),g==null||g();};return R.createElement("div",{className:Rt.rendererContainer,ref:w},R.createElement("div",{className:Rt.storyAd__main},R.createElement(e2,{pageId:e,duration:5e3,currentIndex:n,storiesCount:a,isPaused:i,onComplete:l}),R.createElement("div",{className:Rt.storyAd__topBar},R.createElement("div",{className:Rt.storyAd__topBar__left},R.createElement("div",{className:Rt.storyAd__topBar__avatar},R.createElement(xt,{defaultImage:R.createElement(Lm,null),avatarUrl:o})),R.createElement("div",{className:Rt.storyAd__topBar__text},R.createElement(S.BodyBold,{className:Rt.storyAd__topBar__advertiserName},(T=t.advertiser)==null?void 0:T.name),R.createElement(Bm,null))),R.createElement("div",{className:Rt.storyAd__topBar__right},i?R.createElement(Mo,{className:Rt.playStoryButton,"data-qa-anchor":"play_button",onClick:()=>p==null?void 0:p()}):R.createElement(As,{className:Rt.pauseStoryButton,"data-qa-anchor":"pause_button",onClick:()=>d==null?void 0:d()}),R.createElement(kr,{defaultClassName:cr(Rt.storyAd__closeButton),pageId:e,onPress:u}))),R.createElement("div",{className:cr(Rt.storyImageContainer)},R.createElement("img",{ref:I,className:cr(Rt.storyImage),"data-qa-anchor":"image_view",src:r,onLoad:N,alt:"Story Image",crossOrigin:"anonymous"})),!v&&R.createElement("div",{className:Rt.loadingOverlay},s()),t.callToActionUrl&&R.createElement("div",{className:Rt.hyperLinkContainer},R.createElement("a",{className:Rt.hyperLink__text,href:t.callToActionUrl,target:"_blank",rel:"noreferrer"},t.callToAction)),R.createElement(O,{className:Rt.infoIcon__button,onPress:()=>{b();}},R.createElement(pn,{className:Rt.infoIcon}))),R.createElement(OL,{ad:t,isOpen:h,targetRef:w,onOpenChange:L=>!L&&M()}))};var Wce=({story:e,action:t,config:o,onClose:r})=>{var N,T,L,D,U,Z;let[n,i]=useState(!1),{loader:a}=o,{ad:s,currentIndex:l,storiesCount:d,increaseIndex:p,pageId:u,dragEventTarget:g}=e,f=()=>{t("play",!0),i(!1);},y=()=>{t("pause",!0),i(!0);},C=nt({fileId:(T=(N=s==null?void 0:s.advertiser)==null?void 0:N.avatar)==null?void 0:T.fileId})||((D=(L=s==null?void 0:s.advertiser)==null?void 0:L.avatar)==null?void 0:D.fileUrl)||"",x=nt({fileId:(U=s==null?void 0:s.image9_16)==null?void 0:U.fileId})||((Z=s==null?void 0:s.image9_16)==null?void 0:Z.fileUrl)||"",b=useCallback(()=>{n&&i(!1),t("play",!0);},[t,n]),M=()=>{t("pause",!0);},I=()=>{t("play",!0);},w=()=>{p();};return useEffect(()=>{var B,$;if(g){let G=()=>{t("pause",!0),i(!0);},q=()=>{t("play",!0),i(!1);};return (B=g.current)==null||B.addEventListener("dragstart",G),($=g.current)==null||$.addEventListener("dragend",q),()=>{var z,H;(z=g.current)==null||z.removeEventListener("dragstart",G),(H=g.current)==null||H.removeEventListener("dragend",q);}}},[g]),s?R.createElement($L,{pageId:u,ad:s,adImageUrl:x,avatarUrl:C,currentIndex:l,isPaused:n,storiesCount:d,renderLoader:()=>a,onComplete:w,onPauseClick:y,onPlayClick:f,onClose:r,onImageLoaded:b,onAdvertisementInfoOpen:M,onAdvertisementInfoClose:I}):null},qce=e=>({condition:!!e.ad,priority:2}),VL={renderer:Wce,tester:qce};var t2=[BL,LL,VL,FL,HL];var Pf={storyButton:"xr",desktopOnly:"wr"};var Xce=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),R.createElement("path",{d:"M12 23.91C5.578 23.91.375 18.709.375 12.287.375 5.864 5.578.66 12 .66s11.625 5.203 11.625 11.625S18.422 23.91 12 23.91zM6.656 13.084l6.328 6.375c.47.422 1.172.422 1.594 0l.797-.797c.422-.422.422-1.172 0-1.594l-4.781-4.781 4.781-4.735c.422-.468.422-1.171 0-1.593l-.797-.797c-.422-.422-1.172-.422-1.594 0l-6.328 6.328c-.468.469-.468 1.172 0 1.594z"})),bd=({pageId:e="*",componentId:t="*",onClick:o})=>{let r="arrow_left_button",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:R.createElement("button",{"data-qa-anchor":n,className:cr(Pf.storyButton,Pf.desktopOnly),onClick:o,style:a},R.createElement(Xce,null))};var _f={storyButton:"yr",desktopOnly:"kr"};var ede=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),R.createElement("path",{d:"M12 .66c6.422 0 11.625 5.204 11.625 11.626S18.422 23.91 12 23.91.375 18.708.375 12.286 5.578.66 12 .66zm5.297 10.829L10.969 5.16c-.422-.422-1.172-.422-1.594 0l-.797.797c-.422.422-.422 1.172 0 1.593l4.781 4.735-4.78 4.781c-.423.422-.423 1.172 0 1.594l.796.797c.422.422 1.172.422 1.594 0l6.328-6.375c.469-.422.469-1.125 0-1.594z"})),Id=({pageId:e="*",componentId:t="*",onClick:o})=>{let r="arrow_right_button",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:R.createElement("button",{"data-qa-anchor":n,className:cr(_f.storyButton,_f.desktopOnly),onClick:o,style:a},R.createElement(ede,null))};var or={overlayLeft:"jr",overlayRight:"zr",viewStoryContent:"Kh",viewStoryOverlay:"Nh",hiddenInput:"Oh",viewStoryContainer:"Ph",storyWrapper:"Qh",deleteIcon:"Wh",arrowButton:"Zh"};var lde=7e3,Ms=e=>!!(e!=null&&e.storyId),ru=({pageId:e="*",communityId:t,onBack:o,onClose:r,onSwipeDown:n,onClickCommunity:i,goToDraftStoryPage:a})=>{var Q;let{accessibilityId:s}=Ye({pageId:e}),{confirm:l}=Re(),d=_o(),p=useMotionValue(0),u=useRef(null),g=useRef(new EventTarget),[f,y]=useState(!1),{stories:v}=Ri({targetId:t,targetType:"community",options:{orderBy:"asc",sortBy:"createdAt"}}),C=useMemo(()=>t2.map(({renderer:k,tester:V})=>({renderer:oe=>k(E(c({},oe),{onClose:()=>r(t),onClickCommunity:()=>i(t)})),tester:V})),[t2,r,i,t]),h=useRef(null),{client:x,currentUserId:b}=Ae(),[M,I]=useState(0),{file:w,setFile:N}=pi(),T=v[M],L=Ms(T)?((Q=T==null?void 0:T.creator)==null?void 0:Q.userId)===b:!1,D=Ms(T)?np(x,T==null?void 0:T.targetId):!1,U=()=>{if(M===v.length-1){o();return}I(M+1);},Z=()=>{M!==0&&I(M-1);},B=k=>{l({pageId:e,title:"Delete this story?",content:"This story will be permanently deleted. You'll no longer to see and find this story.",okText:"Delete",onOk:()=>_(void 0,null,function*(){y(!1),yield StoryRepository.softDeleteStory(k),M===0?r(t):I(M-1),d.success({content:"Story deleted"});})});},$=k=>{B(k);},G=useCallback((k,V,ae,oe)=>_(void 0,null,function*(){var be;try{let pe=new FormData;pe.append("files",k),N(null),k!=null&&k.type.includes("image")&&b?yield StoryRepository.createImageStory("user",b,pe,ae,V,oe):b&&(yield StoryRepository.createVideoStory("user",b,pe,ae,oe)),d.success({content:"Successfully shared story"});}catch(pe){pe instanceof Error&&d.info({content:(be=pe.message)!=null?be:"Failed to share story"});}}),[b,d,N]),q=()=>{N(null);},z=R.createElement(FileTrigger,{ref:h,onSelect:k=>{let V=Array.from(k);N(V[0]);}},R.createElement(is,{pageId:e})),H=()=>{if(M===v.length-1){o();return}I(k=>k+1);},F=v==null?void 0:v.map(k=>{var V,ae,oe;if(Ms(k)){let be=(k==null?void 0:k.dataType)==="image",pe=be?(V=k==null?void 0:k.imageData)==null?void 0:V.fileUrl:(oe=(ae=k==null?void 0:k.videoData)==null?void 0:ae.videoUrl)==null?void 0:oe["720p"];return {story:k,url:pe,type:be?"image":"video",actions:[L||D?{name:"Delete",action:()=>$(k==null?void 0:k.storyId),icon:R.createElement(h4,{fill:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-base-default")})}:null].filter(on),onCreateStory:G,discardStory:q,addStoryButton:z,fileInputRef:h,currentIndex:M,storiesCount:v==null?void 0:v.length,increaseIndex:H,pageId:e,dragEventTarget:g.current,setIsBottomSheetOpen:y,isBottomSheetOpen:f}}else return {ad:k,actions:[],pageId:e,currentIndex:M,storiesCount:v==null?void 0:v.length,increaseIndex:H}}),j="asc-uikit-stories-viewer";return useEffect(()=>{let k=v[v.length-1];Ms(k)&&(k==null?void 0:k.syncState)==="syncing"&&I(v.length-1),T&&Ms(T)&&(T==null||T.analytics.markAsSeen());},[M,v]),useEffect(()=>{if(v.filter(Ms).every(V=>V==null?void 0:V.isSeen))return;let k=v.findIndex(V=>Ms(V)?!(V!=null&&V.isSeen):!1);k!==-1&&I(k);},[]),Xa({targetId:t,targetType:"community"}),w&&a(t,"community",w.type.includes("image")?{type:"image",url:URL.createObjectURL(w)}:{type:"video",url:URL.createObjectURL(w)},"communityFeed"),!v||v.length===0?null:R.createElement("div",{className:cr(or.storyWrapper)},R.createElement(bd,{onClick:Z}),R.createElement(motion.div,{id:j,ref:u,"data-qa-anchor":s,initial:{y:0},drag:"y",whileDrag:{scale:.95,borderRadius:"8px",cursor:"grabbing"},dragConstraints:{top:0,bottom:200},dragElastic:{top:0,bottom:.5},onDragStart:()=>{g.current.dispatchEvent(new Event("dragstart"));},onDrag:(k,V)=>{V.point.y<V.point.y-V.offset.y&&p.set(0);},onDragEnd:(k,V)=>{g.current.dispatchEvent(new Event("dragend")),V.offset.y>100?n(t):p.set(0);},className:cr(or.viewStoryContainer)},R.createElement("div",{className:cr(or.viewStoryContent)},R.createElement("div",{className:cr(or.overlayLeft),onClick:Z}),R.createElement("div",{className:cr(or.overlayRight),onClick:U}),R.createElement("div",{className:cr(or.viewStoryOverlay)}),R.createElement(nde,{key:v==null?void 0:v.length,progressWrapperStyles:{display:"none"},preventDefault:!0,currentIndex:M,stories:F,renderers:C,defaultInterval:lde,onStoryStart:()=>Ms(T)&&(T==null?void 0:T.analytics.markAsSeen()),onStoryEnd:U,onNext:U,onPrevious:Z,onAllStoriesEnd:U}))),R.createElement(Id,{onClick:U}))};var fde=7e3,Ps=e=>!!(e!=null&&e.storyId),ZL=({pageId:e="*",targetId:t,targetIds:o,onChangePage:r,onClickStory:n,goToDraftStoryPage:i,onClose:a,onSwipeDown:s,onClickCommunity:l})=>{var Q;let{accessibilityId:d}=Ye({pageId:e}),{confirm:p}=Re(),u=_o(),{client:g,currentUserId:f}=Ae(),{file:y,setFile:v}=pi(),C=useMotionValue(0),h=useRef(null),x=useRef(new EventTarget),[b,M]=useState(0),I=useRef(null),{stories:w}=Ri({targetType:"community",targetId:t,options:{orderBy:"asc",sortBy:"createdAt"}}),N=useMemo(()=>t2.map(({renderer:k,tester:V})=>({renderer:oe=>k(E(c({},oe),{onClose:()=>a(t),onClickCommunity:()=>l(t)})),tester:V})),[t2,a,s,l,t]),T=w[b],L=Ps(T)?((Q=T==null?void 0:T.creator)==null?void 0:Q.userId)===f:!1,D=Ps(T)?np(g,T==null?void 0:T.targetId):!1,U=()=>{if(b===0){let V=o.indexOf(t)-1;if(V>=0){let ae=o[V];n(ae);}else r==null||r();M(0);return}M(k=>k-1);},Z=k=>{let V=b===w.length-1;p({pageId:e,title:"Delete this story?",content:"This story will be permanently deleted. You\u2019ll no longer to see and find this story.",okText:"Delete",onOk:()=>_(void 0,null,function*(){yield StoryRepository.softDeleteStory(k),u.success({content:"Story deleted"}),w.length===1?r==null||r():V?U():M(ae=>ae);})});},B=k=>{Z(k);},$=(k,V,ae,oe)=>_(void 0,null,function*(){var be;try{let pe=new FormData;if(pe.append("files",k),v(null),k!=null&&k.type.includes("image")&&f){let{data:We}=yield StoryRepository.createImageStory("user",f,pe,ae,V,oe);We&&u.success({content:"Successfully shared story"});}else if(f){let{data:We}=yield StoryRepository.createVideoStory("user",f,pe,ae,oe);We&&u.success({content:"Successfully shared story"});}}catch(pe){pe instanceof Error&&u.info({content:(be=pe.message)!=null?be:"Failed to share story"});}}),G=()=>{v(null);},q=R.createElement(FileTrigger,{ref:I,onSelect:k=>{let V=Array.from(k);v(V[0]);}},R.createElement(is,{pageId:e})),z=()=>{b!==w.length-1&&M(k=>k+1);},H=w==null?void 0:w.map(k=>{var V,ae,oe;if(Ps(k)){let be=(k==null?void 0:k.dataType)==="image",pe=be?(V=k==null?void 0:k.imageData)==null?void 0:V.fileUrl:(oe=(ae=k==null?void 0:k.videoData)==null?void 0:ae.videoUrl)==null?void 0:oe["720p"];return {story:k,url:pe,type:be?"image":"video",actions:[L||D?{name:"Delete",action:()=>B(k==null?void 0:k.storyId),icon:R.createElement(u1,{className:or.deleteIcon})}:null].filter(on),onCreateStory:$,discardStory:G,addStoryButton:q,fileInputRef:I,currentIndex:b,storiesCount:w==null?void 0:w.length,increaseIndex:z,pageId:e}}else return {ad:k,actions:[],pageId:e,currentIndex:b,storiesCount:w==null?void 0:w.length,increaseIndex:z}}),F=()=>{if(b===(H==null?void 0:H.length)-1){let V=o.indexOf(t)+1;if(V<o.length){let ae=o[V];n(ae);}else r==null||r();M(0);return}M(k=>k+1);},j="asc-uikit-stories-viewer";return useEffect(()=>{let k=w[w.length-1];Ps(k)&&(k==null?void 0:k.syncState)==="syncing"&&M(w.length-1),T&&Ps(T)&&(T==null||T.analytics.markAsSeen());},[T,w]),useEffect(()=>{if(w.filter(Ps).every(V=>V==null?void 0:V.isSeen))return;let k=w.findIndex(V=>Ps(V)?!(V!=null&&V.isSeen):!1);k!==-1&&M(k);},[]),useEffect(()=>{y&&i(t,"community",y.type.includes("image")?{type:"image",url:URL.createObjectURL(y)}:{type:"video",url:URL.createObjectURL(y)},"globalFeed");},[y,i,t]),Xa({targetId:t,targetType:"community"}),!w||w.length===0?null:R.createElement("div",{className:cr(or.storyWrapper),"data-qa-anchor":d},R.createElement(bd,{onClick:U}),R.createElement(motion.div,{id:j,ref:h,"data-qa-anchor":d,initial:{y:0},drag:"y",whileDrag:{scale:.95,borderRadius:"8px",cursor:"grabbing"},dragConstraints:{top:0,bottom:200},dragElastic:{top:0,bottom:.5},onDragStart:()=>{x.current.dispatchEvent(new Event("dragstart"));},onDrag:(k,V)=>{V.point.y<V.point.y-V.offset.y&&C.set(0);},onDragEnd:(k,V)=>{x.current.dispatchEvent(new Event("dragend")),V.offset.y>100?s(t):C.set(0);},className:cr(or.viewStoryContainer)},R.createElement("div",{className:cr(or.viewStoryContent)},R.createElement("div",{className:cr(or.overlayLeft),onClick:U}),R.createElement("div",{className:cr(or.overlayRight),onClick:F}),R.createElement("div",{className:cr(or.viewStoryOverlay)}),R.createElement(nde,{progressWrapperStyles:{display:"none"},preventDefault:!0,currentIndex:b,stories:H,renderers:N,defaultInterval:fde,onStoryStart:()=>Ps(T)&&(T==null?void 0:T.analytics.markAsSeen()),onStoryEnd:z,onNext:F,onPrevious:U,onAllStoriesEnd:F}))),R.createElement(Id,{onClick:F}))};var nu=({pageId:e="*",targetId:t,onChangePage:o,onClickStory:r,goToDraftStoryPage:n,onClose:i,onSwipeDown:a,onClickCommunity:s})=>{let{stories:l}=c5({seenState:"smart",limit:10});return R.createElement(ZL,{pageId:e,targetId:t,targetIds:l.map(d=>d.targetId),onChangePage:o,onClickStory:r,goToDraftStoryPage:n,onClose:i,onSwipeDown:a,onClickCommunity:s})};var hde=({type:e,targetId:t})=>{let o="view_story_page",{onBack:r,goToDraftStoryPage:n,onClickCommunity:i,onChangePage:a,onClickStory:s}=X(),l=()=>{a("newsfeed");},d=p=>{i(p);};return e==="communityFeed"?R.createElement(ru,{pageId:o,communityId:t,onBack:r,onClose:d,onSwipeDown:d,onClickCommunity:d,goToDraftStoryPage:({targetId:p,targetType:u,mediaType:g,storyType:f})=>n(p,u,g,f)}):e==="globalFeed"?R.createElement(nu,{pageId:o,targetId:t,onChangePage:l,onClose:l,onSwipeDown:l,onClickStory:p=>s(p,"globalFeed"),goToDraftStoryPage:({targetId:p,targetType:u,mediaType:g,storyType:f})=>n(p,u,g,f),onClickCommunity:p=>i(p)}):null},WL=hde;var qL={roundedBackButton:"_h"};var vde=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),R.createElement("path",{fill:"currentColor",d:"M16.176 23.914c-.14.176-.422.176-.598 0L8.23 16.566a.405.405 0 010-.597l7.348-7.348c.176-.176.457-.176.598 0l.703.668c.176.176.176.457 0 .598l-5.45 5.449h12.024c.211 0 .422.21.422.422v.984c0 .246-.21.422-.422.422H11.43l5.449 5.484c.176.141.176.422 0 .598l-.703.668z"})),Bf=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n})=>{let i="back_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{style:u,className:qL.roundedBackButton,onPress:n},R.createElement(ee,{"data-qa-anchor":a,defaultIcon:()=>R.createElement(vde,{className:o}),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var Vn={draftPageContainer:"Xr",headerContainer:"ef",storyWrapper:"rf",header:"af",topRightButtons:"of",mainContainer:"tf",previewImage:"if",footer:"lf",videoPreview:"sf",hyperLinkContainer:"cf",playPauseButton:"nf",progressBar:"df",progressFill:"mf",userInfo:"pf",name:"gf",description:"hf",storyPreview:"ff"};var Lf=({targetId:e,targetType:t,mediaType:o,goToCommunityPage:r,goToGlobalFeedPage:n,onDiscardCreateStory:i})=>{var G,q,z,H,F,j;let{page:a}=Be(),s="create_story_page",{accessibilityId:l,themeStyles:d}=Ye({pageId:s}),{file:p,setFile:u}=pi(),{community:g}=_3(e),[f,y]=useState(!1),{confirm:v}=Re(),C=_o(),[h,x]=useState([{data:{url:"",customText:""},type:"hyperlink"}]),b=()=>{y(!1);},[M,I]=useState("fit"),[w,N]=useState([]),T=()=>{I(M==="fit"?"fill":"fit"),M==="fill"&&N([]);},L=(Q,k,V,ae)=>_(void 0,null,function*(){var oe;if(Q)try{let be=new FormData;be.append("files",Q),u(null),a.type==="DraftPage"&&a.context.storyType==="globalFeed"?n():r(e),(o==null?void 0:o.type)==="image"&&e?yield StoryRepository.createImageStory(t,e,be,V,k,ae):(o==null?void 0:o.type)==="video"&&e&&(yield StoryRepository.createVideoStory(t,e,be,V,ae)),C.success({content:"Successfully shared story"});}catch(be){be instanceof Error&&C.info({content:(oe=be.message)!=null?oe:"Failed to share story"});}}),D=()=>{v({pageId:s,title:"Delete this story?",content:"This story will be permanently deleted. You\u2019ll no longer to see and find this story.",cancelText:"Cancel",okText:"Delete",onOk:()=>{u(null),i();}});},U=({url:Q,customText:k})=>{x([{data:{url:Q,customText:k||""},type:"hyperlink"}]),y(!1);},Z=()=>{x([{data:{url:"",customText:""},type:"hyperlink"}]);},B=()=>{var Q,k;if((k=(Q=h[0])==null?void 0:Q.data)!=null&&k.url){C.info({content:"Can\u2019t add more than one link to your story."});return}y(!0);},$=useCallback(Q=>_(void 0,null,function*(){let k=new Image;k.crossOrigin="Anonymous",k.src=Q,k.onload=()=>{let ae=new Mce().getPalette(k,2);ae&&N(ae.map(oe=>`rgb(${oe.join(",")})`));};}),[]);return useEffect(()=>{_(void 0,null,function*(){if((o==null?void 0:o.type)==="image")if(p){let k=URL.createObjectURL(p);yield $(k);}else o.url&&(yield $(o.url));});},[p,o,$]),R.createElement("div",{"data-qa-anchor":l,style:d,className:Vn.storyWrapper},R.createElement("div",{id:"asc-uikit-create-story",className:Vn.draftPageContainer},R.createElement("div",{className:Vn.headerContainer},R.createElement("div",{className:Vn.header},R.createElement(Bf,{pageId:s,onPress:D}),R.createElement("div",{className:Vn.topRightButtons},(o==null?void 0:o.type)==="image"&&R.createElement(N3,{pageId:s,onPress:T}),R.createElement(H3,{pageId:s,onPress:B})))),(o==null?void 0:o.type)==="image"?R.createElement("div",{className:Vn.mainContainer,style:{background:`linear-gradient(
|
|
4753
|
+
`,nce=e=>R.createElement(rce,c({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none"},e),R.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"white",strokeWidth:"2"}),R.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"#1054DE",strokeWidth:"2",strokeDasharray:"46.75",strokeDashoffset:"21",strokeLinecap:"round",strokeLinejoin:"round"})),J5=nce;var hf={storyCommentButton:"up",storyCommentIcon:"vp"};var sce=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),R.createElement("path",{fill:"#A5A9B5",d:"M10 2.188c4.682 0 8.5 3.12 8.5 6.906C18.5 12.912 14.682 16 10 16c-1.295 0-2.49-.232-3.586-.63-.797.663-2.457 1.693-4.648 1.693-.133 0-.2-.034-.266-.133-.033-.1 0-.233.066-.3 0-.032 1.395-1.493 1.827-3.187-1.196-1.195-1.893-2.69-1.893-4.35 0-3.784 3.785-6.905 8.5-6.905z"})),ML=({pageId:e="*",componentId:t="*",onPress:o,commentsCount:r,imgClassName:n})=>{let i="story_comment_button",{isExcluded:a,accessibilityId:s,defaultConfig:l,config:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return a?null:R.createElement(O,{"data-qa-anchor":s,onPress:o,style:u,className:cr(hf.storyCommentButton)},R.createElement(ee,{defaultIconName:l.icon,configIconName:d.icon,imgIcon:()=>R.createElement("img",{src:d.icon,alt:p,className:cr(n),style:u}),defaultIcon:()=>R.createElement("div",{className:cr(hf.storyCommentIcon)},R.createElement(sce,null),R.createElement(S.BodyBold,null,ib(r)))}))};var vf={storyReactionButton:"xp",storyReactionIcon:"wp"};var cce=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),R.createElement("path",{fill:"#A5A9B5",d:"M17.793 11.025c.148.854.037 1.67-.334 2.338a3.437 3.437 0 01-.668 2.487c-.037 2.078-1.299 3.525-4.156 3.525h-.854c-3.785 0-4.935-1.41-6.605-1.447-.112.482-.594.853-1.114.853H1.688c-.667 0-1.187-.52-1.187-1.187V8.687c0-.63.52-1.187 1.188-1.187h3.636c.705-.594 1.707-2.227 2.56-3.08.52-.52.372-4.045 2.673-4.045 2.115 0 3.525 1.188 3.525 3.896 0 .706-.148 1.262-.334 1.745h1.373c1.781 0 3.191 1.521 3.191 3.154 0 .705-.185 1.299-.519 1.855zm-2.3 2.004c.816-.742.704-1.892.185-2.449.37 0 .853-.705.853-1.373-.037-.705-.63-1.41-1.41-1.41h-3.86c0-1.41 1.04-2.078 1.04-3.526 0-.89 0-2.115-1.744-2.115-.705.705-.372 2.487-1.41 3.526-1.002 1.002-2.45 3.6-3.526 3.6H5.25v6.939c1.967 0 3.71 1.373 6.346 1.373h1.41c1.299 0 2.264-.631 1.967-2.412.556-.334 1.002-1.373.52-2.153zM3.765 16.406a.903.903 0 00-.891-.89.88.88 0 00-.89.89c0 .52.37.89.89.89a.88.88 0 00.89-.89z"})),dce=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},e),R.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"url(#paint0_linear_7702_34939)"}),R.createElement("path",{fill:"#fff",d:"M7.486 10.575H5.42a.611.611 0 00-.62.619v6.187c0 .361.258.619.62.619h2.066c.336 0 .62-.258.62-.619v-6.187a.628.628 0 00-.62-.62zm-1.033 6.394a.596.596 0 01-.62-.62c0-.334.258-.618.62-.618.336 0 .62.284.62.619 0 .36-.284.619-.62.619zm8.264-10.055c0-1.908-1.24-2.114-1.859-2.114-.542 0-.775 1.031-.878 1.495-.155.567-.284 1.134-.672 1.521-.826.851-1.265 1.908-2.298 2.913a.415.415 0 00-.078.232v5.518c0 .154.13.283.284.31.414 0 .956.231 1.37.412.826.36 1.833.799 3.073.799h.077c1.11 0 2.428 0 2.944-.748.233-.31.285-.696.155-1.16.44-.438.646-1.263.44-1.934.439-.593.49-1.443.232-2.036.31-.31.516-.8.49-1.264 0-.799-.67-1.52-1.523-1.52h-2.635c.207-.723.878-1.341.878-2.424z"}),R.createElement("defs",null,R.createElement("linearGradient",{id:"paint0_linear_7702_34939",x1:"9",x2:"19.8",y1:"2.4",y2:"29.4",gradientUnits:"userSpaceOnUse"},R.createElement("stop",{stopColor:"#5B9DFF"}),R.createElement("stop",{offset:"1",stopColor:"#0041BE"})))),PL=({myReactions:e=[],reactionsCount:t,pageId:o="*",componentId:r="*",defaultIconClassName:n,imgIconClassName:i,onPress:a})=>{let s="story_reaction_button",{isExcluded:l,accessibilityId:d,config:p,uiReference:u,themeStyles:g}=A({pageId:o,componentId:r,elementId:s}),f=e.length>0;return l?null:R.createElement(O,{"data-qa-anchor":d,className:cr(vf.storyReactionButton),onPress:a,style:g},R.createElement(ee,{defaultIcon:()=>R.createElement("div",{className:cr(vf.storyReactionIcon,n)},f?R.createElement(dce,null):R.createElement(cce,null),R.createElement(S.BodyBold,null,ib(t))),imgIcon:()=>R.createElement("img",{src:p.icon,alt:u,className:cr(i)})}))};var ws={viewStoryCompostBarContainer:"yp",viewStoryFailedCompostBarContainer:"kp",viewStoryFailedCompostBarWrapper:"jp",viewStoryUploadingWrapper:"zp",viewStoryCompostBarViewIconContainer:"Xp",viewStoryCompostBarEngagementContainer:"Yp",viewStoryCommentButton:"Cp",viewStoryCommentIcon:"Ap"};var uce=({pageId:e="*",syncState:t,reach:o,commentsCount:r,reactionsCount:n,isLiked:i,storyId:a,onClickComment:s,showImpression:l,isMember:d,myReactions:p})=>{let u=_o(),g=()=>_(void 0,null,function*(){try{if(!d){u.info({content:"Join community to interact with all stories"});return}i?yield ReactionRepository.removeReaction("story",a,ur):yield ReactionRepository.addReaction("story",a,ur);}catch(f){console.error("Can't toggle like",f);}});return t==="syncing"?R.createElement("div",{className:ws.viewStoryCompostBarContainer},R.createElement("div",{className:ws.viewStoryUploadingWrapper},R.createElement(J5,{width:20,height:20}),"Uploading...")):t==="error"?R.createElement("div",{className:ws.viewStoryFailedCompostBarContainer},R.createElement("div",{className:ws.viewStoryFailedCompostBarWrapper},R.createElement(y4,null),R.createElement("span",null,"Failed to upload")),R.createElement(Sa,null)):R.createElement("div",{className:ws.viewStoryCompostBarContainer},R.createElement("div",null,l&&R.createElement("div",{className:ws.viewStoryCompostBarViewIconContainer},R.createElement(F3,{reach:o}))),R.createElement("div",{className:ws.viewStoryCompostBarEngagementContainer},R.createElement(ML,{pageId:e,commentsCount:r,onPress:s}),R.createElement(PL,{pageId:e,myReactions:p,reactionsCount:n,onPress:g})))},X5=uce;var Kr={iconButton:"Mp",rendererContainer:"Sp",storyVideo:"Ep",muteCircleIcon:"Fp",unmuteCircleIcon:"Ip",loadingOverlay:"Rp",storyImage:"Up",playStoryButton:"Bp",pauseStoryButton:"Dp",closeButton:"Hp",verifiedBadge:"Lp",dotsButton:"Tp",viewStoryInfoContainer:"Vp",viewStoryCompostBarContainer:"qp",viewStoryCompostBarViewIconContainer:"Gp",viewStoryCompostBarEngagementContainer:"Jp",viewStoryCompostBarEngagementIconContainer:"Kp",storyContent:"Np",header:"Op",viewStoryContainer:"Pp",viewStoryHeaderContainer:"Qp",avatarContainer:"Wp",addStoryButton:"pr",viewStoryHeaderListActionsContainer:"Zp",viewStoryHeadingInfoContainer:"_p",viewStoryHeading:"eg",viewStoryHeadingTitle:"rg",viewStorySubHeading:"ag"};var hce=({community:e,heading:t,subheading:o,isHaveActions:r,isOfficial:n,isPaused:i,onPlay:a,onPause:s,onAction:l,onClose:d,onClickCommunity:p,haveStoryPermission:u,addStoryButton:g})=>R.createElement("div",{className:Kr.viewStoryHeaderContainer},R.createElement("div",{className:Kr.viewStoryHeadingInfoContainer},R.createElement("div",{className:Kr.avatarContainer},R.createElement(jr,{pageId:"story_page",community:e}),u&&g),R.createElement("div",{className:Kr.viewStoryInfoContainer},R.createElement("div",{className:Kr.viewStoryHeading},R.createElement(pw,{lines:1},R.createElement("div",{className:Kr.viewStoryHeadingTitle,"data-qa-anchor":"community_display_name",onClick:p},t)),n&&R.createElement(p1,{className:Kr.verifiedBadge})),R.createElement("span",{className:Kr.viewStorySubHeading},o))),R.createElement("div",{className:Kr.viewStoryHeaderListActionsContainer},i?R.createElement(Mo,{className:Kr.playStoryButton,"data-qa-anchor":"play_button",onClick:a}):R.createElement(As,{className:Kr.pauseStoryButton,"data-qa-anchor":"pause_button",onClick:s}),r&&R.createElement(O3,{pageId:"story_page",onPress:l}),R.createElement(kr,{defaultClassName:cr(Kr.closeButton),pageId:"story_page",onPress:d}))),Y5=hce;function yd({queryParams:e,shouldCall:t=!0}){let n=dt({fetcher:CommunityRepository.Membership.getMembers,params:E(c({},e),{includeDeleted:!1}),shouldCall:!!(e!=null&&e.communityId)&&t}),{items:o}=n,r=P(n,["items"]);return c({members:o},r)}var vo={iconButton:"og",hyperLinkContainer:"gr",rendererContainer:"tg",storyVideo:"ig",muteCircleIcon:"lg",unmuteCircleIcon:"sg",loadingOverlay:"cg",storyImageContainer:"ng",storyImage:"dg",playStoryButton:"mg",pauseStoryButton:"pg",closeButton:"gg",verifiedBadge:"hg",dotsButton:"fg",viewStoryInfoContainer:"bg",viewStoryCompostBarContainer:"ug",viewStoryCompostBarViewIconContainer:"vg",viewStoryCompostBarEngagementContainer:"xg",viewStoryCompostBarEngagementIconContainer:"wg",header:"yg",viewStoryContainer:"kg",viewStoryHeaderContainer:"jg",avatarContainer:"zg",addStoryButton:"hr",viewStoryHeaderListActionsContainer:"Xg",viewStoryHeadingInfoContainer:"Yg",viewStoryHeading:"Cg",viewStoryHeadingTitle:"Ag",viewStorySubHeading:"Mg",story:"Sg",storyContent:"Eg",actionButton:"fr",navigationOverlay:"Fg",leftOverlay:"Ig",rightOverlay:"Rg",imageFit:"Ug",imageFill:"Bg"};var R5={progressBarContainer:"Dg",progressSegment:"Hg",progressBar:"Lg"};var e2=R.memo(({pageId:e="*",componentId:t="*",duration:o,currentIndex:r,storiesCount:n,isPaused:i,onComplete:a})=>{let s="progress_bar",{config:l,isExcluded:d}=A({pageId:e,componentId:t,elementId:s}),[p,u]=useState(new Array(n).fill(0)),[g,f]=useState(r),y=l==null?void 0:l.backgroundColor,v=l==null?void 0:l.progressColor;return useEffect(()=>{r<g&&u(C=>{let h=[...C];return h[r]=0,h}),f(r);},[r,g]),useEffect(()=>{let C;return i||(C=setInterval(()=>{u(h=>{let x=[...h];return x[r]<100&&(x[r]+=100/o*100,x[r]>=100&&(x[r]=100,a())),x});},100)),()=>{C&&clearInterval(C);}},[o,r,i,a]),d?null:R.createElement("div",{className:cr(R5.progressBarContainer),style:{backgroundColor:y}},p.map((C,h)=>R.createElement("div",{key:h,className:cr(R5.progressSegment),style:{width:`calc(${100/n}% - 4px)`}},R.createElement("div",{className:cr(R5.progressBar),style:{width:`${h<r?100:h===r?C:0}%`,backgroundColor:v}}))))});var Pce=({story:{actions:e,fileInputRef:t,addStoryButton:o,currentIndex:r,storiesCount:n,increaseIndex:i,pageId:a,dragEventTarget:s,story:l,url:d},action:p,config:u,onClose:g,onClickCommunity:f})=>{var Ai,Ma,rt,In;let{formatMessage:y}=useIntl(),[v,C]=useState(!1),[h,x]=useState(!1),[b,M]=useState(!1),[I,w]=useState(!1),{loader:N}=u,{client:T}=Ae(),[L,D]=useState(""),U=useRef(null),Z=!!(l&&l.myReactions&&l.myReactions.includes(On)),B=(l==null?void 0:l.reactionsCount)||0,{storyId:$,syncState:G,reach:q,commentsCount:z,createdAt:H,creator:F,community:j,myReactions:Q,data:k,items:V}=l,{members:ae}=yd({queryParams:{communityId:j==null?void 0:j.communityId},shouldCall:!!(j!=null&&j.communityId)}),be=(ae==null?void 0:ae.find(Ke=>Ke.userId===(T==null?void 0:T.userId)))!=null,{user:pe}=fr(T==null?void 0:T.userId),We=(j==null?void 0:j.isOfficial)||!1,vt=(F==null?void 0:F.userId)===(pe==null?void 0:pe.userId),Vt=l5(pe==null?void 0:pe.roles),jt=s5(pe==null?void 0:pe.roles),De=Vt||jt||us(T,j==null?void 0:j.communityId),ir=useMemo(()=>R.createElement("div",{"data-qa-anchor":"community_display_name"},j==null?void 0:j.displayName),[j==null?void 0:j.displayName]),Dr=useMemo(()=>H&&(F!=null&&F.displayName)?R.createElement("span",null,R.createElement("span",{"data-qa-anchor":"created_at"},m5(H))," \u2022 By"," ",R.createElement("span",{"data-qa-anchor":"creator_display_name"},F==null?void 0:F.displayName)):"",[H,F==null?void 0:F.displayName]),qe="asc-uikit-stories-viewer",Rr=useCallback(()=>{if(U.current&&U.current.complete){let to=new Mce().getPalette(U.current,2);if(to){let Je=`linear-gradient(to top, rgb(${to[0].join(",")}), rgb(${to[1].join(",")})`;D(Je);}}},[]),bn=useCallback(()=>{C(!0),I&&w(!1),p("play",!0),Rr();},[p,I,Rr]),Hr=()=>{p("play",!0),w(!1);},en=()=>{p("pause",!0),w(!0);},ce=()=>{p("pause",!0),x(!0);},ue=()=>{p("play",!0),x(!1);},tn=()=>{p("pause",!0),M(!0);},Uo=()=>{p("play",!0),M(!1);},Fr=()=>{g();},Li=()=>{i();};return useEffect(()=>{U.current&&U.current.complete&&Rr();},[]),useEffect(()=>{if(t.current){let Ke=()=>{p("pause",!0),w(!0);},to=()=>{p("play",!0),w(!1);};return t.current.addEventListener("click",Ke),t.current.addEventListener("cancel",to),()=>{t.current&&(t.current.removeEventListener("cancel",to),t.current.removeEventListener("click",Ke));}}},[t]),useEffect(()=>{var Ke,to;if(s){let Je=()=>{p("pause",!0),w(!0);},oo=()=>{p("play",!0),w(!1);};return (Ke=s.current)==null||Ke.addEventListener("dragstart",Je),(to=s.current)==null||to.addEventListener("dragend",oo),()=>{var Di,ar;(Di=s.current)==null||Di.removeEventListener("dragstart",Je),(ar=s.current)==null||ar.removeEventListener("dragend",oo);}}},[s]),R.createElement("div",{className:vo.rendererContainer,style:{background:L}},R.createElement(e2,{pageId:a,duration:5e3,currentIndex:r,storiesCount:n,isPaused:I||h||b,onComplete:Li}),R.createElement(Y5,{community:j,heading:ir,subheading:Dr,isHaveActions:(e==null?void 0:e.length)>0,haveStoryPermission:De,isOfficial:We,isPaused:I,onPlay:Hr,onPause:en,onAction:ce,onClickCommunity:()=>f==null?void 0:f(),onClose:Fr,addStoryButton:o}),R.createElement("div",{className:cr(vo.storyImageContainer,{[vo.imageFit]:k.imageDisplayMode==="fit",[vo.imageFill]:k.imageDisplayMode==="fill"})},R.createElement("img",{ref:U,className:cr(vo.storyImage,{[vo.imageFit]:k.imageDisplayMode==="fit",[vo.imageFill]:k.imageDisplayMode==="fill"}),"data-qa-anchor":"image_view",src:d!=null?d:l==null?void 0:l.data.fileData,onLoad:bn,alt:"Story Image",crossOrigin:"anonymous"})),!v&&R.createElement("div",{className:vo.loadingOverlay},N||R.createElement("div",null,"loading...")),R.createElement(Sr,{rootId:qe,isOpen:h,onClose:ue,mountPoint:document.getElementById(qe),detent:"content-height"},e==null?void 0:e.map(Ke=>R.createElement(O,{key:Ke.name,className:vo.actionButton,onPress:()=>Ke==null?void 0:Ke.action()},(Ke==null?void 0:Ke.icon)&&Ke.icon,R.createElement(S.BodyBold,null,Ke.name)))),R.createElement(Sr,{rootId:qe,isOpen:b,onClose:Uo,mountPoint:document.getElementById(qe),detent:"full-height",headerTitle:y({id:"storyViewer.commentSheet.title"})},R.createElement(Am,{referenceId:$,referenceType:"story",community:j,shouldAllowCreation:j==null?void 0:j.allowCommentInStory,shouldAllowInteraction:be})),((Ma=(Ai=V==null?void 0:V[0])==null?void 0:Ai.data)==null?void 0:Ma.url)&&R.createElement("div",{className:vo.hyperLinkContainer},R.createElement(yi,{href:V[0].data.url.startsWith("http")?V[0].data.url:`https://${V[0].data.url}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>l==null?void 0:l.analytics.markLinkAsClicked()},R.createElement(pw,{lines:1},R.createElement("span",null,((In=(rt=V[0])==null?void 0:rt.data)==null?void 0:In.customText)||V[0].data.url.replace(/^https?:\/\//,""))))),R.createElement(X5,{pageId:a,storyId:$,syncState:G,reach:q,commentsCount:z,reactionsCount:B,isLiked:Z,myReactions:Q,onClickComment:tn,showImpression:vt||us(T,j==null?void 0:j.communityId),isMember:be}))},_ce=e=>{var t;return {condition:!!((t=e.story)!=null&&t.storyId)&&(!e.type||e.type==="image"),priority:2}},BL={renderer:Pce,tester:_ce};var Sce=()=>{let[e,t]=useState(!1),o=useCallback(()=>t(!0),[]),r=useCallback(()=>t(!1),[]);return {muted:e,mute:o,unmute:r}},Nce=e=>{let[t,o]=useState(!1),r=useCallback(()=>{e("play",!0),o(!1);},[e]),n=useCallback(()=>{e("pause",!0),o(!0);},[e]);return {isPaused:t,play:r,pause:n}},Ece=e=>{let[t,o]=useState(!1),[r,n]=useState(!1),i=useCallback(()=>{e("pause",!0),o(!0);},[e]),a=useCallback(()=>{e("play",!0),o(!1);},[e]),s=useCallback(()=>{e("pause",!0),n(!0);},[e]),l=useCallback(()=>{e("play",!0),n(!1);},[e]);return {isBottomSheetOpen:t,isOpenCommentSheet:r,openBottomSheet:i,closeBottomSheet:a,openCommentSheet:s,closeCommentSheet:l}},Bce=({story:{actions:e,addStoryButton:t,fileInputRef:o,currentIndex:r,storiesCount:n,increaseIndex:i,pageId:a,dragEventTarget:s,story:l},action:d,config:p,messageHandler:u,onClose:g,onClickCommunity:f})=>{var Hr,en,ce,ue,tn,Uo,Fr,Li,Ai,Ma;let[y,v]=useState(!1),{loader:C}=p,{client:h}=Ae(),{user:x}=fr(h==null?void 0:h.userId),b=useRef(null),{muted:M,mute:I,unmute:w}=Sce(),{isPaused:N,play:T,pause:L}=Nce(d),{isBottomSheetOpen:D,isOpenCommentSheet:U,openBottomSheet:Z,closeBottomSheet:B,openCommentSheet:$,closeCommentSheet:G}=Ece(d),{storyId:q,syncState:z,reach:H,commentsCount:F,createdAt:j,creator:Q,community:k,myReactions:V,data:ae,items:oe}=l,be=(Hr=l==null?void 0:l.myReactions)==null?void 0:Hr.includes(On),pe=(l==null?void 0:l.reactions[On])||0,{members:We}=yd({queryParams:{communityId:k==null?void 0:k.communityId},shouldCall:!!(k!=null&&k.communityId)}),vt=We==null?void 0:We.some(rt=>rt.userId===(h==null?void 0:h.userId)),Vt=(k==null?void 0:k.isOfficial)||!1,jt=(Q==null?void 0:Q.userId)===(x==null?void 0:x.userId),De=l5(x==null?void 0:x.roles),ir=s5(x==null?void 0:x.roles),Dr=De||ir||us(h,k==null?void 0:k.communityId),qe=useCallback(()=>{var rt;u("UPDATE_VIDEO_DURATION",{duration:(rt=l==null?void 0:l.videoData)==null?void 0:rt.attributes.metadata.video.duration}),v(!0),d("play",!0);},[u,(en=l==null?void 0:l.videoData)==null?void 0:en.attributes.metadata.video.duration,d]),Rr=useCallback(()=>{r+1<n?i():g();},[r,n,i,g]);useEffect(()=>{b.current&&(N||D||U?(b.current.pause(),d("pause",!0)):(b.current.play(),d("play",!0)));},[N,D,U,d]),useEffect(()=>{if(o.current){let rt=()=>{d("pause",!0),L();},In=()=>{d("play",!0),T();};return o.current.addEventListener("click",rt),o.current.addEventListener("cancel",In),()=>{var Ke,to;(Ke=o.current)==null||Ke.removeEventListener("click",rt),(to=o.current)==null||to.removeEventListener("cancel",In);}}},[d,L,T]),useEffect(()=>{if(s!=null&&s.current){let rt=()=>{d("pause",!0),L();},In=()=>{d("play",!0),T();};return s.current.addEventListener("dragstart",rt),s.current.addEventListener("dragend",In),()=>{var Ke,to;(Ke=s.current)==null||Ke.removeEventListener("dragstart",rt),(to=s.current)==null||to.removeEventListener("dragend",In);}}},[d,L,T,s]);let bn=Math.round(((ce=l==null?void 0:l.videoData)==null?void 0:ce.attributes.metadata.video.duration)*1e3);return R.createElement("div",{className:cr(vo.rendererContainer)},R.createElement(e2,{pageId:a,duration:bn,currentIndex:r,storiesCount:n,isPaused:N||D||U,onComplete:Rr}),R.createElement(j3,{pageId:"story_page",componentId:"*",isMuted:M,onPress:M?w:I}),R.createElement(Y5,{community:k,heading:R.createElement("div",{"data-qa-anchor":"community_display_name"},k==null?void 0:k.displayName),subheading:j&&(Q!=null&&Q.displayName)?R.createElement("span",null,R.createElement("span",{"data-qa-anchor":"created_at"},m5(j))," \u2022 By"," ",R.createElement("span",{"data-qa-anchor":"creator_display_name"},Q==null?void 0:Q.displayName)):"",isHaveActions:(e==null?void 0:e.length)>0,haveStoryPermission:Dr,isOfficial:Vt,isPaused:N,onPlay:T,onPause:L,onMute:I,onUnmute:w,onAction:Z,onClickCommunity:()=>f==null?void 0:f(),onClose:g,addStoryButton:t}),R.createElement("video",{"data-qa-anchor":"video_view",ref:b,className:cr(vo.storyVideo),src:((ue=l==null?void 0:l.videoData)==null?void 0:ue.fileUrl)||((Uo=(tn=l==null?void 0:l.videoData)==null?void 0:tn.videoUrl)==null?void 0:Uo.original),controls:!1,onLoadedData:qe,playsInline:!0,onWaiting:()=>d("pause",!0),onPlaying:()=>d("play",!0),muted:M,autoPlay:!0}),!y&&R.createElement("div",{className:cr(vo.loadingOverlay)},C||R.createElement("div",null,"loading...")),R.createElement(Sr,{rootId:"asc-uikit-stories-viewer",isOpen:D,onClose:B,mountPoint:document.getElementById("asc-uikit-stories-viewer"),detent:"content-height"},e==null?void 0:e.map(rt=>R.createElement(O,{key:rt.name,className:cr(vo.actionButton),onPress:rt==null?void 0:rt.action},rt==null?void 0:rt.icon,R.createElement(S.BodyBold,null,rt.name)))),R.createElement(Sr,{rootId:"asc-uikit-stories-viewer",isOpen:U,onClose:G,mountPoint:document.getElementById("asc-uikit-stories-viewer"),detent:"full-height"},R.createElement(Am,{referenceId:q,referenceType:"story",community:k,shouldAllowCreation:k==null?void 0:k.allowCommentInStory,shouldAllowInteraction:vt})),((Li=(Fr=oe==null?void 0:oe[0])==null?void 0:Fr.data)==null?void 0:Li.url)&&R.createElement("div",{className:cr(vo.hyperLinkContainer)},R.createElement(yi,{href:oe[0].data.url.startsWith("http")?oe[0].data.url:`https://${oe[0].data.url}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>l==null?void 0:l.analytics.markLinkAsClicked()},R.createElement(pw,{lines:1},R.createElement("span",null,((Ma=(Ai=oe[0])==null?void 0:Ai.data)==null?void 0:Ma.customText)||oe[0].data.url.replace(/^https?:\/\//,""))))),R.createElement(X5,{pageId:a,storyId:q,syncState:z,reach:H,commentsCount:F,reactionsCount:pe,isLiked:be,onClickComment:$,myReactions:V,showImpression:jt||us(h,k==null?void 0:k.communityId),isMember:vt}))},Lce=e=>{var t;return {condition:!!((t=e.story)!=null&&t.storyId)&&e.type==="video",priority:2}},LL={renderer:Bce,tester:Lce};var Dce=({story:e,action:t})=>(useEffect(()=>{t("play");},[e]),R.createElement("div",{style:DL.storyContent},R.createElement("p",{style:DL.text},"This story could not be loaded."))),DL={storyContent:{width:"100%",maxHeight:"100%",margin:"auto"},text:{textAlign:"center",color:"white",width:"90%",margin:"auto"}},Hce=()=>({condition:!0,priority:1}),HL={renderer:Dce,tester:Hce};var zce=e=>{useEffect(()=>{e.action("play");},[e.story]);let t=e.story.originalContent;return R.createElement(t,c({},e))},Uce=e=>({condition:!!e.content,priority:2}),FL={renderer:zce,tester:Uce};var Yt={drawer__content:"br",drawer__innerContent:"Tg",drawer__placeholder:"Vg",drawer__overlay:"qg",drawer__title:"Gg",drawer__content__data:"Jg",drawer__content__data__title:"Kg",drawer__content__data__text:"Ng",drawer__content__data__caption:"Og",drawer__content__data__infoIcon:"Pg",drawer__content__emptySpace:"Qg",drawer__container:"Wg",drawer__innerContainer:"Zg"};var OL=({isOpen:e,onOpenChange:t,ad:o,targetRef:r})=>{var n;return R.createElement(Drawer.Root,{open:e,onOpenChange:t,onDrag:i=>{i.preventDefault(),i.stopPropagation();}},R.createElement(Drawer.Portal,{container:r==null?void 0:r.current},R.createElement("div",{className:Yt.drawer__container},R.createElement("div",{className:Yt.drawer__innerContainer},R.createElement(Drawer.Overlay,{className:Yt.drawer__overlay}),R.createElement(Drawer.Content,{className:Yt.drawer__content},R.createElement("div",{className:Yt.drawer__innerContent},R.createElement("div",{className:Yt.drawer__placeholder}),R.createElement(Drawer.Title,{className:Yt.drawer__title},R.createElement(S.Title,null,"About this advertisement")),R.createElement("div",{className:Yt.drawer__content__data},R.createElement(S.BodyBold,{className:Yt.drawer__content__data__title},"Why this advertisement?"),R.createElement("div",{className:Yt.drawer__content__data__text},R.createElement(pn,{className:Yt.drawer__content__data__infoIcon}),R.createElement(S.Caption,{className:Yt.drawer__content__data__caption},"You're seeing this advertisement because it was displayed to all users in the system."))),R.createElement("div",{className:Yt.drawer__content__data},R.createElement(S.BodyBold,{className:Yt.drawer__content__data__title},"About this advertiser"),R.createElement("div",{className:Yt.drawer__content__data__text},R.createElement(pn,{className:Yt.drawer__content__data__infoIcon}),R.createElement(S.Caption,{className:Yt.drawer__content__data__caption},"Advertiser name: ",(n=o.advertiser)==null?void 0:n.companyName)))),R.createElement("div",{className:Yt.drawer__content__emptySpace}))))))};var Rt={iconButton:"_g",hyperLinkContainer:"eh",hyperLink__text:"rh",rendererContainer:"ah",storyVideo:"oh",muteCircleIcon:"th",unmuteCircleIcon:"ih",loadingOverlay:"lh",storyImageContainer:"sh",storyImage:"ch",playStoryButton:"nh",pauseStoryButton:"dh",closeButton:"mh",verifiedBadge:"ph",dotsButton:"gh",viewStoryInfoContainer:"hh",viewStoryCompostBarContainer:"fh",viewStoryCompostBarViewIconContainer:"bh",viewStoryCompostBarEngagementContainer:"uh",viewStoryCompostBarEngagementIconContainer:"vh",header:"xh",viewStoryContainer:"wh",viewStoryHeaderContainer:"yh",avatarContainer:"kh",addStoryButton:"ur",viewStoryHeaderListActionsContainer:"jh",viewStoryHeadingInfoContainer:"zh",viewStoryHeading:"Xh",viewStoryHeadingTitle:"Yh",viewStorySubHeading:"Ch",story:"Ah",storyContent:"Mh",actionButton:"vr",navigationOverlay:"Sh",leftOverlay:"Eh",rightOverlay:"Fh",imageFit:"Ih",imageFill:"Rh",infoIcon__button:"Uh",infoIcon:"Bh",storyAd__main:"Dh",storyAd__topBar:"Hh",storyAd__topBar__left:"Lh",storyAd__topBar__avatar:"Th",storyAd__topBar__text:"Vh",storyAd__topBar__advertiserName:"qh",storyAd__topBar__right:"Gh",storyAd__closeButton:"Jh"};var $L=({pageId:e="*",ad:t,avatarUrl:o,adImageUrl:r,currentIndex:n,isPaused:i,storiesCount:a,renderLoader:s=()=>R.createElement("div",null,"loading..."),onComplete:l=()=>{},onPauseClick:d,onPlayClick:p,onClose:u,onImageLoaded:g,onAdvertisementInfoOpen:f,onAdvertisementInfoClose:y})=>{var T;let[v,C]=useState(!1),[h,x]=useState(!1),b=()=>{x(!0),f==null||f();},M=()=>{x(!1),y==null||y();},I=useRef(null),w=useRef(null),N=()=>{C(!0),g==null||g();};return R.createElement("div",{className:Rt.rendererContainer,ref:w},R.createElement("div",{className:Rt.storyAd__main},R.createElement(e2,{pageId:e,duration:5e3,currentIndex:n,storiesCount:a,isPaused:i,onComplete:l}),R.createElement("div",{className:Rt.storyAd__topBar},R.createElement("div",{className:Rt.storyAd__topBar__left},R.createElement("div",{className:Rt.storyAd__topBar__avatar},R.createElement(xt,{defaultImage:R.createElement(Lm,null),avatarUrl:o})),R.createElement("div",{className:Rt.storyAd__topBar__text},R.createElement(S.BodyBold,{className:Rt.storyAd__topBar__advertiserName},(T=t.advertiser)==null?void 0:T.name),R.createElement(Bm,null))),R.createElement("div",{className:Rt.storyAd__topBar__right},i?R.createElement(Mo,{className:Rt.playStoryButton,"data-qa-anchor":"play_button",onClick:()=>p==null?void 0:p()}):R.createElement(As,{className:Rt.pauseStoryButton,"data-qa-anchor":"pause_button",onClick:()=>d==null?void 0:d()}),R.createElement(kr,{defaultClassName:cr(Rt.storyAd__closeButton),pageId:e,onPress:u}))),R.createElement("div",{className:cr(Rt.storyImageContainer)},R.createElement("img",{ref:I,className:cr(Rt.storyImage),"data-qa-anchor":"image_view",src:r,onLoad:N,alt:"Story Image",crossOrigin:"anonymous"})),!v&&R.createElement("div",{className:Rt.loadingOverlay},s()),t.callToActionUrl&&R.createElement("div",{className:Rt.hyperLinkContainer},R.createElement("a",{className:Rt.hyperLink__text,href:t.callToActionUrl,target:"_blank",rel:"noreferrer"},t.callToAction)),R.createElement(O,{className:Rt.infoIcon__button,onPress:()=>{b();}},R.createElement(pn,{className:Rt.infoIcon}))),R.createElement(OL,{ad:t,isOpen:h,targetRef:w,onOpenChange:L=>!L&&M()}))};var Wce=({story:e,action:t,config:o,onClose:r})=>{var N,T,L,D,U,Z;let[n,i]=useState(!1),{loader:a}=o,{ad:s,currentIndex:l,storiesCount:d,increaseIndex:p,pageId:u,dragEventTarget:g}=e,f=()=>{t("play",!0),i(!1);},y=()=>{t("pause",!0),i(!0);},C=nt({fileId:(T=(N=s==null?void 0:s.advertiser)==null?void 0:N.avatar)==null?void 0:T.fileId})||((D=(L=s==null?void 0:s.advertiser)==null?void 0:L.avatar)==null?void 0:D.fileUrl)||"",x=nt({fileId:(U=s==null?void 0:s.image9_16)==null?void 0:U.fileId})||((Z=s==null?void 0:s.image9_16)==null?void 0:Z.fileUrl)||"",b=useCallback(()=>{n&&i(!1),t("play",!0);},[t,n]),M=()=>{t("pause",!0);},I=()=>{t("play",!0);},w=()=>{p();};return useEffect(()=>{var B,$;if(g){let G=()=>{t("pause",!0),i(!0);},q=()=>{t("play",!0),i(!1);};return (B=g.current)==null||B.addEventListener("dragstart",G),($=g.current)==null||$.addEventListener("dragend",q),()=>{var z,H;(z=g.current)==null||z.removeEventListener("dragstart",G),(H=g.current)==null||H.removeEventListener("dragend",q);}}},[g]),s?R.createElement($L,{pageId:u,ad:s,adImageUrl:x,avatarUrl:C,currentIndex:l,isPaused:n,storiesCount:d,renderLoader:()=>a,onComplete:w,onPauseClick:y,onPlayClick:f,onClose:r,onImageLoaded:b,onAdvertisementInfoOpen:M,onAdvertisementInfoClose:I}):null},qce=e=>({condition:!!e.ad,priority:2}),VL={renderer:Wce,tester:qce};var t2=[BL,LL,VL,FL,HL];var Pf={storyButton:"xr",desktopOnly:"wr"};var Xce=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),R.createElement("path",{d:"M12 23.91C5.578 23.91.375 18.709.375 12.287.375 5.864 5.578.66 12 .66s11.625 5.203 11.625 11.625S18.422 23.91 12 23.91zM6.656 13.084l6.328 6.375c.47.422 1.172.422 1.594 0l.797-.797c.422-.422.422-1.172 0-1.594l-4.781-4.781 4.781-4.735c.422-.468.422-1.171 0-1.593l-.797-.797c-.422-.422-1.172-.422-1.594 0l-6.328 6.328c-.468.469-.468 1.172 0 1.594z"})),bd=({pageId:e="*",componentId:t="*",onClick:o})=>{let r="arrow_left_button",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:R.createElement("button",{"data-qa-anchor":n,className:cr(Pf.storyButton,Pf.desktopOnly),onClick:o,style:a},R.createElement(Xce,null))};var _f={storyButton:"yr",desktopOnly:"kr"};var ede=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),R.createElement("path",{d:"M12 .66c6.422 0 11.625 5.204 11.625 11.626S18.422 23.91 12 23.91.375 18.708.375 12.286 5.578.66 12 .66zm5.297 10.829L10.969 5.16c-.422-.422-1.172-.422-1.594 0l-.797.797c-.422.422-.422 1.172 0 1.593l4.781 4.735-4.78 4.781c-.423.422-.423 1.172 0 1.594l.796.797c.422.422 1.172.422 1.594 0l6.328-6.375c.469-.422.469-1.125 0-1.594z"})),Id=({pageId:e="*",componentId:t="*",onClick:o})=>{let r="arrow_right_button",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:R.createElement("button",{"data-qa-anchor":n,className:cr(_f.storyButton,_f.desktopOnly),onClick:o,style:a},R.createElement(ede,null))};var or={overlayLeft:"jr",overlayRight:"zr",viewStoryContent:"Kh",viewStoryOverlay:"Nh",hiddenInput:"Oh",viewStoryContainer:"Ph",storyWrapper:"Qh",deleteIcon:"Wh",arrowButton:"Zh"};var lde=7e3,Ms=e=>!!(e!=null&&e.storyId),ru=({pageId:e="*",communityId:t,onBack:o,onClose:r,onSwipeDown:n,onClickCommunity:i,goToDraftStoryPage:a})=>{var Q;let{accessibilityId:s}=Ye({pageId:e}),{confirm:l}=Re(),d=_o(),p=useMotionValue(0),u=useRef(null),g=useRef(new EventTarget),[f,y]=useState(!1),{stories:v}=ea({targetId:t,targetType:"community",options:{orderBy:"asc",sortBy:"createdAt"}}),C=useMemo(()=>t2.map(({renderer:k,tester:V})=>({renderer:oe=>k(E(c({},oe),{onClose:()=>r(t),onClickCommunity:()=>i(t)})),tester:V})),[t2,r,i,t]),h=useRef(null),{client:x,currentUserId:b}=Ae(),[M,I]=useState(0),{file:w,setFile:N}=ui(),T=v[M],L=Ms(T)?((Q=T==null?void 0:T.creator)==null?void 0:Q.userId)===b:!1,D=Ms(T)?np(x,T==null?void 0:T.targetId):!1,U=()=>{if(M===v.length-1){o();return}I(M+1);},Z=()=>{M!==0&&I(M-1);},B=k=>{l({pageId:e,title:"Delete this story?",content:"This story will be permanently deleted. You'll no longer to see and find this story.",okText:"Delete",onOk:()=>_(void 0,null,function*(){y(!1),yield StoryRepository.softDeleteStory(k),M===0?r(t):I(M-1),d.success({content:"Story deleted"});})});},$=k=>{B(k);},G=useCallback((k,V,ae,oe)=>_(void 0,null,function*(){var be;try{let pe=new FormData;pe.append("files",k),N(null),k!=null&&k.type.includes("image")&&b?yield StoryRepository.createImageStory("user",b,pe,ae,V,oe):b&&(yield StoryRepository.createVideoStory("user",b,pe,ae,oe)),d.success({content:"Successfully shared story"});}catch(pe){pe instanceof Error&&d.info({content:(be=pe.message)!=null?be:"Failed to share story"});}}),[b,d,N]),q=()=>{N(null);},z=R.createElement(FileTrigger,{ref:h,onSelect:k=>{let V=Array.from(k);N(V[0]);}},R.createElement(is,{pageId:e})),H=()=>{if(M===v.length-1){o();return}I(k=>k+1);},F=v==null?void 0:v.map(k=>{var V,ae,oe;if(Ms(k)){let be=(k==null?void 0:k.dataType)==="image",pe=be?(V=k==null?void 0:k.imageData)==null?void 0:V.fileUrl:(oe=(ae=k==null?void 0:k.videoData)==null?void 0:ae.videoUrl)==null?void 0:oe["720p"];return {story:k,url:pe,type:be?"image":"video",actions:[L||D?{name:"Delete",action:()=>$(k==null?void 0:k.storyId),icon:R.createElement(h4,{fill:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-base-default")})}:null].filter(on),onCreateStory:G,discardStory:q,addStoryButton:z,fileInputRef:h,currentIndex:M,storiesCount:v==null?void 0:v.length,increaseIndex:H,pageId:e,dragEventTarget:g.current,setIsBottomSheetOpen:y,isBottomSheetOpen:f}}else return {ad:k,actions:[],pageId:e,currentIndex:M,storiesCount:v==null?void 0:v.length,increaseIndex:H}}),j="asc-uikit-stories-viewer";return useEffect(()=>{let k=v[v.length-1];Ms(k)&&(k==null?void 0:k.syncState)==="syncing"&&I(v.length-1),T&&Ms(T)&&(T==null||T.analytics.markAsSeen());},[M,v]),useEffect(()=>{if(v.filter(Ms).every(V=>V==null?void 0:V.isSeen))return;let k=v.findIndex(V=>Ms(V)?!(V!=null&&V.isSeen):!1);k!==-1&&I(k);},[]),Xa({targetId:t,targetType:"community"}),w&&a(t,"community",w.type.includes("image")?{type:"image",url:URL.createObjectURL(w)}:{type:"video",url:URL.createObjectURL(w)},"communityFeed"),!v||v.length===0?null:R.createElement("div",{className:cr(or.storyWrapper)},R.createElement(bd,{onClick:Z}),R.createElement(motion.div,{id:j,ref:u,"data-qa-anchor":s,initial:{y:0},drag:"y",whileDrag:{scale:.95,borderRadius:"8px",cursor:"grabbing"},dragConstraints:{top:0,bottom:200},dragElastic:{top:0,bottom:.5},onDragStart:()=>{g.current.dispatchEvent(new Event("dragstart"));},onDrag:(k,V)=>{V.point.y<V.point.y-V.offset.y&&p.set(0);},onDragEnd:(k,V)=>{g.current.dispatchEvent(new Event("dragend")),V.offset.y>100?n(t):p.set(0);},className:cr(or.viewStoryContainer)},R.createElement("div",{className:cr(or.viewStoryContent)},R.createElement("div",{className:cr(or.overlayLeft),onClick:Z}),R.createElement("div",{className:cr(or.overlayRight),onClick:U}),R.createElement("div",{className:cr(or.viewStoryOverlay)}),R.createElement(nde,{key:v==null?void 0:v.length,progressWrapperStyles:{display:"none"},preventDefault:!0,currentIndex:M,stories:F,renderers:C,defaultInterval:lde,onStoryStart:()=>Ms(T)&&(T==null?void 0:T.analytics.markAsSeen()),onStoryEnd:U,onNext:U,onPrevious:Z,onAllStoriesEnd:U}))),R.createElement(Id,{onClick:U}))};var fde=7e3,Ps=e=>!!(e!=null&&e.storyId),ZL=({pageId:e="*",targetId:t,targetIds:o,onChangePage:r,onClickStory:n,goToDraftStoryPage:i,onClose:a,onSwipeDown:s,onClickCommunity:l})=>{var Q;let{accessibilityId:d}=Ye({pageId:e}),{confirm:p}=Re(),u=_o(),{client:g,currentUserId:f}=Ae(),{file:y,setFile:v}=ui(),C=useMotionValue(0),h=useRef(null),x=useRef(new EventTarget),[b,M]=useState(0),I=useRef(null),{stories:w}=ea({targetType:"community",targetId:t,options:{orderBy:"asc",sortBy:"createdAt"}}),N=useMemo(()=>t2.map(({renderer:k,tester:V})=>({renderer:oe=>k(E(c({},oe),{onClose:()=>a(t),onClickCommunity:()=>l(t)})),tester:V})),[t2,a,s,l,t]),T=w[b],L=Ps(T)?((Q=T==null?void 0:T.creator)==null?void 0:Q.userId)===f:!1,D=Ps(T)?np(g,T==null?void 0:T.targetId):!1,U=()=>{if(b===0){let V=o.indexOf(t)-1;if(V>=0){let ae=o[V];n(ae);}else r==null||r();M(0);return}M(k=>k-1);},Z=k=>{let V=b===w.length-1;p({pageId:e,title:"Delete this story?",content:"This story will be permanently deleted. You\u2019ll no longer to see and find this story.",okText:"Delete",onOk:()=>_(void 0,null,function*(){yield StoryRepository.softDeleteStory(k),u.success({content:"Story deleted"}),w.length===1?r==null||r():V?U():M(ae=>ae);})});},B=k=>{Z(k);},$=(k,V,ae,oe)=>_(void 0,null,function*(){var be;try{let pe=new FormData;if(pe.append("files",k),v(null),k!=null&&k.type.includes("image")&&f){let{data:We}=yield StoryRepository.createImageStory("user",f,pe,ae,V,oe);We&&u.success({content:"Successfully shared story"});}else if(f){let{data:We}=yield StoryRepository.createVideoStory("user",f,pe,ae,oe);We&&u.success({content:"Successfully shared story"});}}catch(pe){pe instanceof Error&&u.info({content:(be=pe.message)!=null?be:"Failed to share story"});}}),G=()=>{v(null);},q=R.createElement(FileTrigger,{ref:I,onSelect:k=>{let V=Array.from(k);v(V[0]);}},R.createElement(is,{pageId:e})),z=()=>{b!==w.length-1&&M(k=>k+1);},H=w==null?void 0:w.map(k=>{var V,ae,oe;if(Ps(k)){let be=(k==null?void 0:k.dataType)==="image",pe=be?(V=k==null?void 0:k.imageData)==null?void 0:V.fileUrl:(oe=(ae=k==null?void 0:k.videoData)==null?void 0:ae.videoUrl)==null?void 0:oe["720p"];return {story:k,url:pe,type:be?"image":"video",actions:[L||D?{name:"Delete",action:()=>B(k==null?void 0:k.storyId),icon:R.createElement(u1,{className:or.deleteIcon})}:null].filter(on),onCreateStory:$,discardStory:G,addStoryButton:q,fileInputRef:I,currentIndex:b,storiesCount:w==null?void 0:w.length,increaseIndex:z,pageId:e}}else return {ad:k,actions:[],pageId:e,currentIndex:b,storiesCount:w==null?void 0:w.length,increaseIndex:z}}),F=()=>{if(b===(H==null?void 0:H.length)-1){let V=o.indexOf(t)+1;if(V<o.length){let ae=o[V];n(ae);}else r==null||r();M(0);return}M(k=>k+1);},j="asc-uikit-stories-viewer";return useEffect(()=>{let k=w[w.length-1];Ps(k)&&(k==null?void 0:k.syncState)==="syncing"&&M(w.length-1),T&&Ps(T)&&(T==null||T.analytics.markAsSeen());},[T,w]),useEffect(()=>{if(w.filter(Ps).every(V=>V==null?void 0:V.isSeen))return;let k=w.findIndex(V=>Ps(V)?!(V!=null&&V.isSeen):!1);k!==-1&&M(k);},[]),useEffect(()=>{y&&i(t,"community",y.type.includes("image")?{type:"image",url:URL.createObjectURL(y)}:{type:"video",url:URL.createObjectURL(y)},"globalFeed");},[y,i,t]),Xa({targetId:t,targetType:"community"}),!w||w.length===0?null:R.createElement("div",{className:cr(or.storyWrapper),"data-qa-anchor":d},R.createElement(bd,{onClick:U}),R.createElement(motion.div,{id:j,ref:h,"data-qa-anchor":d,initial:{y:0},drag:"y",whileDrag:{scale:.95,borderRadius:"8px",cursor:"grabbing"},dragConstraints:{top:0,bottom:200},dragElastic:{top:0,bottom:.5},onDragStart:()=>{x.current.dispatchEvent(new Event("dragstart"));},onDrag:(k,V)=>{V.point.y<V.point.y-V.offset.y&&C.set(0);},onDragEnd:(k,V)=>{x.current.dispatchEvent(new Event("dragend")),V.offset.y>100?s(t):C.set(0);},className:cr(or.viewStoryContainer)},R.createElement("div",{className:cr(or.viewStoryContent)},R.createElement("div",{className:cr(or.overlayLeft),onClick:U}),R.createElement("div",{className:cr(or.overlayRight),onClick:F}),R.createElement("div",{className:cr(or.viewStoryOverlay)}),R.createElement(nde,{progressWrapperStyles:{display:"none"},preventDefault:!0,currentIndex:b,stories:H,renderers:N,defaultInterval:fde,onStoryStart:()=>Ps(T)&&(T==null?void 0:T.analytics.markAsSeen()),onStoryEnd:z,onNext:F,onPrevious:U,onAllStoriesEnd:F}))),R.createElement(Id,{onClick:F}))};var nu=({pageId:e="*",targetId:t,onChangePage:o,onClickStory:r,goToDraftStoryPage:n,onClose:i,onSwipeDown:a,onClickCommunity:s})=>{let{stories:l}=c5({seenState:"smart",limit:10});return R.createElement(ZL,{pageId:e,targetId:t,targetIds:l.map(d=>d.targetId),onChangePage:o,onClickStory:r,goToDraftStoryPage:n,onClose:i,onSwipeDown:a,onClickCommunity:s})};var hde=({type:e,targetId:t})=>{let o="view_story_page",{onBack:r,goToDraftStoryPage:n,onClickCommunity:i,onChangePage:a,onClickStory:s}=X(),l=()=>{a("newsfeed");},d=p=>{i(p);};return e==="communityFeed"?R.createElement(ru,{pageId:o,communityId:t,onBack:r,onClose:d,onSwipeDown:d,onClickCommunity:d,goToDraftStoryPage:({targetId:p,targetType:u,mediaType:g,storyType:f})=>n(p,u,g,f)}):e==="globalFeed"?R.createElement(nu,{pageId:o,targetId:t,onChangePage:l,onClose:l,onSwipeDown:l,onClickStory:p=>s(p,"globalFeed"),goToDraftStoryPage:({targetId:p,targetType:u,mediaType:g,storyType:f})=>n(p,u,g,f),onClickCommunity:p=>i(p)}):null},WL=hde;var qL={roundedBackButton:"_h"};var vde=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),R.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),R.createElement("path",{fill:"currentColor",d:"M16.176 23.914c-.14.176-.422.176-.598 0L8.23 16.566a.405.405 0 010-.597l7.348-7.348c.176-.176.457-.176.598 0l.703.668c.176.176.176.457 0 .598l-5.45 5.449h12.024c.211 0 .422.21.422.422v.984c0 .246-.21.422-.422.422H11.43l5.449 5.484c.176.141.176.422 0 .598l-.703.668z"})),Bf=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n})=>{let i="back_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return d?null:R.createElement(O,{style:u,className:qL.roundedBackButton,onPress:n},R.createElement(ee,{"data-qa-anchor":a,defaultIcon:()=>R.createElement(vde,{className:o}),imgIcon:()=>R.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var Vn={draftPageContainer:"Xr",headerContainer:"ef",storyWrapper:"rf",header:"af",topRightButtons:"of",mainContainer:"tf",previewImage:"if",footer:"lf",videoPreview:"sf",hyperLinkContainer:"cf",playPauseButton:"nf",progressBar:"df",progressFill:"mf",userInfo:"pf",name:"gf",description:"hf",storyPreview:"ff"};var Lf=({targetId:e,targetType:t,mediaType:o,goToCommunityPage:r,goToGlobalFeedPage:n,onDiscardCreateStory:i})=>{var G,q,z,H,F,j;let{page:a}=Be(),s="create_story_page",{accessibilityId:l,themeStyles:d}=Ye({pageId:s}),{file:p,setFile:u}=ui(),{community:g}=_3(e),[f,y]=useState(!1),{confirm:v}=Re(),C=_o(),[h,x]=useState([{data:{url:"",customText:""},type:"hyperlink"}]),b=()=>{y(!1);},[M,I]=useState("fit"),[w,N]=useState([]),T=()=>{I(M==="fit"?"fill":"fit"),M==="fill"&&N([]);},L=(Q,k,V,ae)=>_(void 0,null,function*(){var oe;if(Q)try{let be=new FormData;be.append("files",Q),u(null),a.type==="DraftPage"&&a.context.storyType==="globalFeed"?n():r(e),(o==null?void 0:o.type)==="image"&&e?yield StoryRepository.createImageStory(t,e,be,V,k,ae):(o==null?void 0:o.type)==="video"&&e&&(yield StoryRepository.createVideoStory(t,e,be,V,ae)),C.success({content:"Successfully shared story"});}catch(be){be instanceof Error&&C.info({content:(oe=be.message)!=null?oe:"Failed to share story"});}}),D=()=>{v({pageId:s,title:"Delete this story?",content:"This story will be permanently deleted. You\u2019ll no longer to see and find this story.",cancelText:"Cancel",okText:"Delete",onOk:()=>{u(null),i();}});},U=({url:Q,customText:k})=>{x([{data:{url:Q,customText:k||""},type:"hyperlink"}]),y(!1);},Z=()=>{x([{data:{url:"",customText:""},type:"hyperlink"}]);},B=()=>{var Q,k;if((k=(Q=h[0])==null?void 0:Q.data)!=null&&k.url){C.info({content:"Can\u2019t add more than one link to your story."});return}y(!0);},$=useCallback(Q=>_(void 0,null,function*(){let k=new Image;k.crossOrigin="Anonymous",k.src=Q,k.onload=()=>{let ae=new Mce().getPalette(k,2);ae&&N(ae.map(oe=>`rgb(${oe.join(",")})`));};}),[]);return useEffect(()=>{_(void 0,null,function*(){if((o==null?void 0:o.type)==="image")if(p){let k=URL.createObjectURL(p);yield $(k);}else o.url&&(yield $(o.url));});},[p,o,$]),R.createElement("div",{"data-qa-anchor":l,style:d,className:Vn.storyWrapper},R.createElement("div",{id:"asc-uikit-create-story",className:Vn.draftPageContainer},R.createElement("div",{className:Vn.headerContainer},R.createElement("div",{className:Vn.header},R.createElement(Bf,{pageId:s,onPress:D}),R.createElement("div",{className:Vn.topRightButtons},(o==null?void 0:o.type)==="image"&&R.createElement(N3,{pageId:s,onPress:T}),R.createElement(H3,{pageId:s,onPress:B})))),(o==null?void 0:o.type)==="image"?R.createElement("div",{className:Vn.mainContainer,style:{background:`linear-gradient(
|
|
4754
4754
|
180deg,
|
|
4755
4755
|
${w[0]||"var(--asc-color-black)"} 0%,
|
|
4756
4756
|
${w[1]||"var(--asc-color-black)"} 100%
|
|
4757
|
-
)`}},R.createElement("img",{className:Vn.previewImage,src:p?URL.createObjectURL(p):o.url,style:{width:"100%",height:"100%",objectFit:M==="fit"?"contain":"cover"},alt:"Draft",onLoad:Q=>{M==="fill"&&$(Q.target.src);}})):(o==null?void 0:o.type)==="video"?R.createElement("video",{className:Vn.videoPreview,src:p?URL.createObjectURL(p):o.url,autoPlay:!0,loop:!0,muted:!0,controls:!1,playsInline:!0}):null,((q=(G=h[0])==null?void 0:G.data)==null?void 0:q.url)&&R.createElement("div",{className:Vn.hyperLinkContainer},R.createElement(
|
|
4757
|
+
)`}},R.createElement("img",{className:Vn.previewImage,src:p?URL.createObjectURL(p):o.url,style:{width:"100%",height:"100%",objectFit:M==="fit"?"contain":"cover"},alt:"Draft",onLoad:Q=>{M==="fill"&&$(Q.target.src);}})):(o==null?void 0:o.type)==="video"?R.createElement("video",{className:Vn.videoPreview,src:p?URL.createObjectURL(p):o.url,autoPlay:!0,loop:!0,muted:!0,controls:!1,playsInline:!0}):null,((q=(G=h[0])==null?void 0:G.data)==null?void 0:q.url)&&R.createElement("div",{className:Vn.hyperLinkContainer},R.createElement(yi,{onClick:()=>y(!0)},((H=(z=h[0])==null?void 0:z.data)==null?void 0:H.customText)||h[0].data.url.replace(/^https?:\/\//,""))),R.createElement(Y8,{pageId:s,isOpen:f,onClose:b,onSubmit:U,onRemove:Z,isHaveHyperLink:((j=(F=h==null?void 0:h[0])==null?void 0:F.data)==null?void 0:j.url)!==""}),R.createElement("div",{className:Vn.footer},R.createElement($3,{community:g,pageId:s,onClick:()=>{var Q,k;return L(p,M,{},(k=(Q=h[0])==null?void 0:Q.data)!=null&&k.url?h:[])}}))))},Mde=e=>{let{AmityDraftStoryPageBehavior:t}=bt();return R.createElement(Lf,E(c({},e),{onDiscardCreateStory:()=>{var o;return (o=t==null?void 0:t.onCloseAction)==null?void 0:o.call(t)},goToCommunityPage:o=>{var r;return (r=t==null?void 0:t.onCloseAction)==null?void 0:r.call(t)},goToGlobalFeedPage:()=>{var o;return (o=t==null?void 0:t.onCloseAction)==null?void 0:o.call(t)}}))},Af=Mde;var _de=e=>{let{page:t,onChangePage:o,onClickCommunity:r}=X();return R.createElement(Lf,E(c({},e),{onDiscardCreateStory:()=>{t.type==="draftpage"&&t.storyType==="communityFeed"?r(e.targetId):o("newsfeed");},goToCommunityPage:n=>r(n),goToGlobalFeedPage:()=>o("newsfeed")}))},JL=_de;var XL=m.div`
|
|
4758
4758
|
display: grid;
|
|
4759
4759
|
gap: 12px;
|
|
4760
4760
|
list-style: none;
|
|
@@ -4783,7 +4783,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4783
4783
|
margin: 0 auto;
|
|
4784
4784
|
overflow-y: auto;
|
|
4785
4785
|
max-width: 640px;
|
|
4786
|
-
`,Ede=({targetId:e})=>R.createElement(Nde,null,R.createElement(k3,null),R.createElement(qa,{
|
|
4786
|
+
`,Ede=({targetId:e})=>{let t=qn(e);return R.createElement(Nde,null,R.createElement(k3,null),R.createElement(qa,{post:t}))},tA=Ede;var Bde=m.div`
|
|
4787
4787
|
height: 100%;
|
|
4788
4788
|
width: 100%;
|
|
4789
4789
|
`,Lde=m(m3)`
|
|
@@ -4869,7 +4869,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4869
4869
|
color: #fff;
|
|
4870
4870
|
background: #f9563a;
|
|
4871
4871
|
border-radius: 20px;
|
|
4872
|
-
`;function Md({channelId:e,shouldSubscribe:t=()=>!0,callback:o}){return Vs({fetcher:ChannelRepository.getChannel,params:e,callback:o,shouldSubscribe:()=>!!e&&t(),getSubscribedTopic:({data:r})=>getChannelTopic(r)})}var Yde=e=>At({fetcher:ChannelRepository.getChannel,params:e,shouldCall:!!e}),
|
|
4872
|
+
`;function Md({channelId:e,shouldSubscribe:t=()=>!0,callback:o}){return Vs({fetcher:ChannelRepository.getChannel,params:e,callback:o,shouldSubscribe:()=>!!e&&t(),getSubscribedTopic:({data:r})=>getChannelTopic(r)})}var Yde=e=>At({fetcher:ChannelRepository.getChannel,params:e,shouldCall:!!e}),ki=Yde;function Rde(e){let t={BOTTOM:1,TOP:99};return !e||e<t.BOTTOM?"":e<=t.TOP?e:`${t.TOP}+`}var e0e=({channelId:e,isSelected:t,onSelect:o})=>{let r=ki(e),{chatName:n,chatAvatar:i}=n2({channel:r}),a=Rde((r==null?void 0:r.unreadCount)||0);return Md({channelId:r==null?void 0:r.channelId,shouldSubscribe:()=>!!(r!=null&&r.channelId)}),R.createElement(dA,{"data-qa-anchor":"chat-item",active:t,onClick:s=>{s.stopPropagation(),r&&o({channelId:r.channelId,type:r.type});}},R.createElement(pA,null,R.createElement(uA,{avatarUrl:i,defaultImage:((r==null?void 0:r.memberCount)||0)>2?mr:Se}),R.createElement(gA,null,n)),a&&R.createElement(fA,{"data-qa-anchor":"chat-item-unread-count"},a))},yA=e=>{let t=W("ChatItem");return t?t(e):R.createElement(e0e,c({},e))};var hA=m(O4).attrs({width:24,height:18})`
|
|
4873
4873
|
width: 24px !important;
|
|
4874
4874
|
cursor: pointer;
|
|
4875
4875
|
`,CA=m.div`
|
|
@@ -4975,7 +4975,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
4975
4975
|
align-items: center;
|
|
4976
4976
|
`;var d0e=e=>{let[t,o]=useState(!1),{data:r,isLoading:n,refetch:i}=useQuery({queryKey:["asc-uikit","MessageRepository","isMessageFlaggedByMe",e],queryFn:()=>MessageRepository.isMessageFlaggedByMe(e),enabled:e!=null});useEffect(()=>{r!=null&&o(r);},[r]);let a=()=>_(void 0,null,function*(){if(e!=null)try{o(!0),yield MessageRepository.flagMessage(e);}catch(d){o(!1);}finally{i();}}),s=()=>_(void 0,null,function*(){if(e!=null)try{o(!1),yield MessageRepository.unflagMessage(e);}catch(d){o(!0);}finally{i();}});return {isLoading:n,isFlaggedByMe:t,flagMessage:a,unflagMessage:s,toggleFlagMessage:()=>_(void 0,null,function*(){e!=null&&(t?s():a());})}},OA=d0e;function Vf({messageId:e,shouldSubscribe:t=()=>!0,callback:o}){return Vs({fetcher:MessageRepository.getMessage,params:e,callback:o,shouldSubscribe:()=>!!e&&t(),getSubscribedTopic:({data:r})=>getMessageTopic(r)})}var f0e=m(Fp)`
|
|
4977
4977
|
${({align:e,theme:t})=>e==="end"&&`color: ${t.palette.neutral.main};`}
|
|
4978
|
-
`,y0e=({messageId:e})=>{let{isFlaggedByMe:t,flagMessage:o,unflagMessage:r}=OA(e);return Vf({messageId:e}),t?R.createElement(Go,{onClick:r},R.createElement(FormattedMessage,{id:"message.unflag"})):R.createElement(Go,{onClick:o},R.createElement(FormattedMessage,{id:"message.flag"}))},h0e=({isIncoming:e,messageId:t,data:o,isSupportedMessageType:r,popupContainerRef:n})=>{let[i,a]=useState(""),[s,l]=useState(!1),d=Ce(),p=M=>{M.stopPropagation(),l(!0);},[u,g]=useState(!1),{formatMessage:f}=useIntl(),y=()=>{a(typeof o=="object"?o.text:o),g(!0),l(!1);},v=()=>{g(!1);},C=()=>{MessageRepository.updateMessage(t,{data:{text:i}}).then(v).catch(()=>{d.error({content:f({id:"message.saveOptionsError"})});});};return R.createElement(f0e,{isOpen:u,positions:["bottom","top"],align:e?"start":"end",content:s?R.createElement(wA,null,R.createElement(MA,{"data-qa-anchor":"message-edit-input",autoFocus:!0,value:i,onChange:M=>a(M.target.value),onKeyDown:M=>{M.key==="Enter"&&C(),M.key==="Escape"&&v();}}),R.createElement(PA,{"data-qa-anchor":"message-save-button",onClick:C}),R.createElement(_A,{onClick:v})):R.createElement(
|
|
4978
|
+
`,y0e=({messageId:e})=>{let{isFlaggedByMe:t,flagMessage:o,unflagMessage:r}=OA(e);return Vf({messageId:e}),t?R.createElement(Go,{onClick:r},R.createElement(FormattedMessage,{id:"message.unflag"})):R.createElement(Go,{onClick:o},R.createElement(FormattedMessage,{id:"message.flag"}))},h0e=({isIncoming:e,messageId:t,data:o,isSupportedMessageType:r,popupContainerRef:n})=>{let[i,a]=useState(""),[s,l]=useState(!1),d=Ce(),p=M=>{M.stopPropagation(),l(!0);},[u,g]=useState(!1),{formatMessage:f}=useIntl(),y=()=>{a(typeof o=="object"?o.text:o),g(!0),l(!1);},v=()=>{g(!1);},C=()=>{MessageRepository.updateMessage(t,{data:{text:i}}).then(v).catch(()=>{d.error({content:f({id:"message.saveOptionsError"})});});};return R.createElement(f0e,{isOpen:u,positions:["bottom","top"],align:e?"start":"end",content:s?R.createElement(wA,null,R.createElement(MA,{"data-qa-anchor":"message-edit-input",autoFocus:!0,value:i,onChange:M=>a(M.target.value),onKeyDown:M=>{M.key==="Enter"&&C(),M.key==="Escape"&&v();}}),R.createElement(PA,{"data-qa-anchor":"message-save-button",onClick:C}),R.createElement(_A,{onClick:v})):R.createElement(ri,null,!e&&r&&R.createElement(Go,{"data-qa-anchor":"message-menu-item-edit",onClick:p},R.createElement(FormattedMessage,{id:"message.edit"})),e&&R.createElement(y0e,{messageId:t}),!e&&R.createElement(Go,{"data-qa-anchor":"message-menu-item-delete",onClick:()=>{MessageRepository.deleteMessage(t).then(v);}},R.createElement(FormattedMessage,{id:"message.delete"}))),parentElement:(n==null?void 0:n.current)||void 0,onClickOutside:v},R.createElement("div",{"data-qa-anchor":"message-options-button",role:"button",tabIndex:0,onClick:y,onKeyDown:y},R.createElement(TA,null)))},UA=h0e;var x0e=()=>R.createElement(FormattedMessage,{id:"chat.message.deleted"}),$A=x0e;var I0e=({data:e})=>R.createElement(ul,null,e.text),VA=I0e;var M0e=({data:e})=>R.createElement("pre",null,JSON.stringify(e)),jA=M0e;var T0e=()=>R.createElement(FormattedMessage,{id:"chat.message.unsupported"}),GA=T0e;function k0e(e){return e.type==="text"}function S0e(e){return e.type==="custom"}var N0e=e=>{let{isDeleted:t}=e;return t?R.createElement($A,null):k0e(e)?R.createElement(VA,{data:e.data}):S0e(e)?R.createElement(jA,{data:e.data}):R.createElement(GA,null)},ZA=N0e;var B0e=n=>{var i=n,{isDeleted:e,type:t,isSupportedMessageType:o}=i,r=P(i,["isDeleted","type","isSupportedMessageType"]);return e?R.createElement(AA,E(c({},r),{"data-qa-anchor":"message-body-deleted"})):o?R.createElement(LA,E(c({},r),{"data-qa-anchor":"message-body-general"})):R.createElement(DA,E(c({},r),{"data-qa-anchor":"message-body-unsupported"}))},L0e=({messageId:e,avatar:t,type:o,data:r,createdAt:n,isDeleted:i,isIncoming:a,isConsequent:s,userDisplayName:l,containerRef:d})=>{let p=a&&!s&&l,u=["text","custom"].includes(o);return R.createElement(kA,{isIncoming:a},R.createElement(SA,null,a&&R.createElement(EA,null,!s&&(t?R.createElement(zf,{avatar:t}):R.createElement(zf,{backgroundImage:Se}))),R.createElement(NA,{"data-qa-anchor":"message"},p&&R.createElement(BA,null,l),R.createElement(B0e,{type:o,isIncoming:a,isDeleted:i||!1,isSupportedMessageType:u},R.createElement(ZA,{data:r,type:o,isDeleted:i}),!i&&R.createElement(FA,null,R.createElement(HA,null,R.createElement(FormattedTime,{value:n})),R.createElement(UA,{messageId:e,data:r,isIncoming:a,isSupportedMessageType:u,popupContainerRef:d}))))))},QA=e=>{let t=W("Message");return t?t(e):R.createElement(L0e,c({},e))};var WA=m.div`
|
|
4979
4979
|
display: flex;
|
|
4980
4980
|
flex-direction: column-reverse;
|
|
4981
4981
|
flex-grow: 1;
|
|
@@ -5036,13 +5036,13 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
5036
5036
|
`,iD=m.div`
|
|
5037
5037
|
font-size: 12px;
|
|
5038
5038
|
color: #999999;
|
|
5039
|
-
`;var j0e=({channelId:e,onChatDetailsClick:t,shouldShowChatDetails:o})=>{let r=
|
|
5039
|
+
`;var j0e=({channelId:e,onChatDetailsClick:t,shouldShowChatDetails:o})=>{let r=ki(e),{chatName:n,chatAvatar:i}=n2({channel:r});return R.createElement(tD,{"data-qa-anchor":"chat-header"},R.createElement(oD,null,R.createElement(_s,{avatarUrl:i||void 0,defaultImage:r!=null&&r.memberCount&&r.memberCount>2?mr:Se}),R.createElement(rD,{"data-qa-anchor":"chat-header-channel-info"},R.createElement(nD,{"data-qa-anchor":"chat-header-channel-info-channel-name"},n),R.createElement(iD,{"data-qa-anchor":"chat-header-channel-info-member-count"},R.createElement(FormattedMessage,{id:"chat.members.count",values:{count:r==null?void 0:r.memberCount}})))),!o&&R.createElement(eD,{onClick:t}))},aD=e=>{let t=W("ChatHeader");return t?t(e):R.createElement(j0e,c({},e))};var sD=m.div`
|
|
5040
5040
|
display: flex;
|
|
5041
5041
|
flex-direction: column;
|
|
5042
5042
|
flex-grow: 1;
|
|
5043
5043
|
`,lD=m.div`
|
|
5044
5044
|
padding: 20px 16px 16px;
|
|
5045
|
-
`,mD=m.div``,cD=m(
|
|
5045
|
+
`,mD=m.div``,cD=m(ni)`
|
|
5046
5046
|
button {
|
|
5047
5047
|
width: 100%;
|
|
5048
5048
|
}
|
|
@@ -5099,7 +5099,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
5099
5099
|
min-width: 100px;
|
|
5100
5100
|
margin-left: 0;
|
|
5101
5101
|
`};
|
|
5102
|
-
`;var CD=e=>{let{client:t}=J();return {isModerator:useMemo(()=>{if(!e)return !1;let r=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").currentUser())||!1,n=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").channel(e))||!1;return r||n},[e])}};var X0e=({channelId:e,onChatDetailsClick:t,shouldShowChatDetails:o})=>{useEffect(()=>()=>{SubChannelRepository.stopReading(e);},[e]);let{isModerator:r}=CD(e),n=
|
|
5102
|
+
`;var CD=e=>{let{client:t}=J();return {isModerator:useMemo(()=>{if(!e)return !1;let r=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").currentUser())||!1,n=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").channel(e))||!1;return r||n},[e])}};var X0e=({channelId:e,onChatDetailsClick:t,shouldShowChatDetails:o})=>{useEffect(()=>()=>{SubChannelRepository.stopReading(e);},[e]);let{isModerator:r}=CD(e),n=ki(e),i=s=>_(void 0,null,function*(){return MessageRepository.createMessage({subChannelId:e,data:{text:s},dataType:"text"})});return R.createElement(sD,null,R.createElement(aD,{channelId:e,shouldShowChatDetails:o,onChatDetailsClick:t}),R.createElement(KA,{channelId:e}),(n==null?void 0:n.type)!=="broadcast"||(n==null?void 0:n.type)==="broadcast"&&r?R.createElement(RA,{onSubmit:i}):null)},vD=e=>{let t=W("Chat");return t?t(e):R.createElement(X0e,c({},e))};var xD=m.div`
|
|
5103
5103
|
display: flex;
|
|
5104
5104
|
padding: 0px 15px 10px;
|
|
5105
5105
|
`,bD=m.div`
|
|
@@ -5142,7 +5142,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
5142
5142
|
`,ND=m.span`
|
|
5143
5143
|
${({theme:e})=>e.typography.body};
|
|
5144
5144
|
color: ${({theme:e})=>e.palette.neutral.shade3};
|
|
5145
|
-
`,ED=m(
|
|
5145
|
+
`,ED=m(Fi).attrs({width:16,height:12})`
|
|
5146
5146
|
width: 16px !important;
|
|
5147
5147
|
padding-left: 8px;
|
|
5148
5148
|
fill: ${({theme:e})=>e.palette.neutral.shade3};
|
|
@@ -5209,7 +5209,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
5209
5209
|
svg {
|
|
5210
5210
|
font-size: 20px;
|
|
5211
5211
|
}
|
|
5212
|
-
`;var cpe=({onClick:e})=>R.createElement(ZD,{onClick:e},R.createElement(QD,null,R.createElement(UD,null)),R.createElement(du,null,R.createElement(FormattedMessage,{id:"chat.member.addMore"}))),WD=cpe;function Bd(e){let r=Ue({fetcher:ChannelRepository.Membership.getMembers,params:{channelId:e,includeDeleted:!1},shouldCall:!!e}),{items:t}=r,o=P(r,["items"]);return c({channelMembers:t},o)}var upe="Anonymous",gpe=({channelId:e,hideMembers:t,onEditChatMemberClick:o,onMemberSelect:r})=>{let n=
|
|
5212
|
+
`;var cpe=({onClick:e})=>R.createElement(ZD,{onClick:e},R.createElement(QD,null,R.createElement(UD,null)),R.createElement(du,null,R.createElement(FormattedMessage,{id:"chat.member.addMore"}))),WD=cpe;function Bd(e){let r=Ue({fetcher:ChannelRepository.Membership.getMembers,params:{channelId:e,includeDeleted:!1},shouldCall:!!e}),{items:t}=r,o=P(r,["items"]);return c({channelMembers:t},o)}var upe="Anonymous",gpe=({channelId:e,hideMembers:t,onEditChatMemberClick:o,onMemberSelect:r})=>{let n=ki(e),{channelMembers:i,hasMore:a,loadMore:s}=Bd(e),l=u=>{u.stopPropagation(),t==null||t();},d=u=>{var h;let{displayName:g,metadata:f}=(h=u==null?void 0:u.user)!=null?h:{};if(g)return g;let{firstname:y="",lastname:v=""}=f!=null?f:{};return [y,v].filter(Boolean).join(" ").trim()},p=(n==null?void 0:n.type)==="live"||(n==null?void 0:n.type)==="community";return R.createElement($D,null,R.createElement(VD,{onClick:l},R.createElement(jD,null),R.createElement(GD,null,R.createElement(FormattedMessage,{id:"chat.members.return"}))),(i==null?void 0:i.length)>0?R.createElement(Eo,{hasMore:a,loadMore:s,contentSlot:R.createElement(R.Fragment,null,i.map(u=>R.createElement(qf,{key:u.userId,onClick:()=>r==null?void 0:r(u)},R.createElement(_s,c({size:Gs.SMALL,defaultImage:Se},u==null?void 0:u.user)),R.createElement(du,null,d(u)||upe))),p?R.createElement(WD,{onClick:()=>o==null?void 0:o({channelId:e,members:i})}):null)}):null)},qD=gpe;var KD=m.div`
|
|
5213
5213
|
display: flex;
|
|
5214
5214
|
flex-direction: column;
|
|
5215
5215
|
flex-shrink: 0;
|
|
@@ -5243,7 +5243,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
5243
5243
|
${({theme:e})=>e.typography.bodyBold};
|
|
5244
5244
|
line-height: 24px;
|
|
5245
5245
|
color: #000000;
|
|
5246
|
-
`;var ype=({channelId:e,onClose:t,leaveChat:o,onEditChatMemberClick:r,onMemberSelect:n})=>{let i=
|
|
5246
|
+
`;var ype=({channelId:e,onClose:t,leaveChat:o,onEditChatMemberClick:r,onMemberSelect:n})=>{let i=ki(e),{chatName:a,chatAvatar:s,type:l}=n2({channel:i}),[d,p]=useState(!1);return R.createElement(KD,null,R.createElement(JD,null,R.createElement(FormattedMessage,{id:"chat.details.header"}),R.createElement(XD,{onClick:t})),R.createElement(YD,null,R.createElement(_s,{avatarUrl:s,defaultImage:mr}),R.createElement(RD,null,R.createElement(eH,null,R.createElement(FormattedMessage,{id:"chat.details.chatName"})),R.createElement(tH,null,a))),d?R.createElement(qD,{channelId:e,hideMembers:()=>p(!1),onMemberSelect:n,onEditChatMemberClick:({members:u})=>i&&(r==null?void 0:r({channel:i,members:u}))}):R.createElement(OD,{chatType:l,channelId:e,chatName:a,leaveChat:o,memberCount:i==null?void 0:i.memberCount,showMembers:()=>p(!0)}))},rH=e=>{let t=W("ChatDetails");return t?t(e):R.createElement(ype,c({},e))};var nH=m.div`
|
|
5247
5247
|
display: flex;
|
|
5248
5248
|
height: 100%;
|
|
5249
5249
|
width: 100%;
|
|
@@ -5253,7 +5253,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
5253
5253
|
flex-grow: 1;
|
|
5254
5254
|
`;var cH=m.div`
|
|
5255
5255
|
padding: 20px 16px 16px;
|
|
5256
|
-
`,dH=m.div``;m(
|
|
5256
|
+
`,dH=m.div``;m(ni)`
|
|
5257
5257
|
button {
|
|
5258
5258
|
width: 100%;
|
|
5259
5259
|
}
|
|
@@ -5315,7 +5315,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
5315
5315
|
48-21.5 48-48v-25.6c0-74.2-60.2-134.4-134.4-134.4zM400 464H48v-25.6c0-47.6 38.8-86.4
|
|
5316
5316
|
86.4-86.4 14.6 0 38.3 16 89.6 16 51.7 0 74.9-16 89.6-16 47.6 0 86.4 38.8 86.4 86.4V464zM224
|
|
5317
5317
|
288c79.5 0 144-64.5 144-144S303.5 0 224 0 80 64.5 80 144s64.5 144 144 144zm0-240c52.9 0 96
|
|
5318
|
-
43.1 96 96s-43.1 96-96 96-96-43.1-96-96 43.1-96 96-96z`})),SH=Zpe;var Wpe=(e=void 0)=>{var r;let[t,o]=useState(e===void 0?(r=window.navigator.onLine)!=null?r:Client.isConnected:e);return useEffect(()=>(window.addEventListener("online",()=>o(!0)),window.removeEventListener("online",()=>o(!0))),[]),useEffect(()=>(window.addEventListener("offline",()=>o(!1)),window.removeEventListener("offline",()=>o(!1))),[]),useEffect(()=>Client.onSessionStateChange(()=>{o(Client.isConnected());}),[]),t},fu=Wpe;var Kpe=
|
|
5318
|
+
43.1 96 96s-43.1 96-96 96-96-43.1-96-96 43.1-96 96-96z`})),SH=Zpe;var Wpe=(e=void 0)=>{var r;let[t,o]=useState(e===void 0?(r=window.navigator.onLine)!=null?r:Client.isConnected:e);return useEffect(()=>(window.addEventListener("online",()=>o(!0)),window.removeEventListener("online",()=>o(!0))),[]),useEffect(()=>(window.addEventListener("offline",()=>o(!1)),window.removeEventListener("offline",()=>o(!1))),[]),useEffect(()=>Client.onSessionStateChange(()=>{o(Client.isConnected());}),[]),t},fu=Wpe;var Kpe=ka`
|
|
5319
5319
|
from {
|
|
5320
5320
|
transform: rotate(0deg);
|
|
5321
5321
|
}
|
|
@@ -5324,14 +5324,14 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),R.cre
|
|
|
5324
5324
|
}
|
|
5325
5325
|
`,Jpe=m.svg`
|
|
5326
5326
|
animation: ${Kpe} 2s linear infinite;
|
|
5327
|
-
`,Xpe=e=>{let t=v4$1();return R.createElement(Jpe,c({xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},e),R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.52453 4C9.52453 4.31559 9.26869 4.57143 8.9531 4.57143C8.63751 4.57143 8.38167 4.31559 8.38167 4V0.571429C8.38167 0.255837 8.63751 0 8.9531 0C9.26869 0 9.52453 0.255837 9.52453 0.571428V4ZM7.23891 5.03082C7.51222 4.87303 7.60586 4.52355 7.44807 4.25024L5.73378 1.28101C5.57599 1.0077 5.22651 0.914056 4.9532 1.07185C4.67989 1.22965 4.58624 1.57913 4.74404 1.85244L6.45832 4.82167C6.61612 5.09498 6.9656 5.18862 7.23891 5.03082ZM5.77458 5.50525C6.04789 5.66304 6.14153 6.01252 5.98374 6.28583C5.82594 6.55914 5.47646 6.65278 5.20315 6.49499L2.23392 4.7807C1.96061 4.62291 1.86697 4.27343 2.02476 4.00012C2.18256 3.72681 2.53204 3.63316 2.80535 3.79096L5.77458 5.50525ZM5.52455 8.00013C5.52455 7.68454 5.26872 7.4287 4.95312 7.4287H1.52455C1.20896 7.4287 0.953125 7.68454 0.953125 8.00013C0.953125 8.31572 1.20896 8.57156 1.52455 8.57156H4.95313C5.26872 8.57156 5.52455 8.31572 5.52455 8.00013ZM5.20327 9.50543C5.47658 9.34764 5.82606 9.44128 5.98385 9.71459C6.14165 9.9879 6.048 10.3374 5.77469 10.4952L2.80546 12.2095C2.53215 12.3673 2.18267 12.2736 2.02488 12.0003C1.86708 11.727 1.96073 11.3775 2.23404 11.2197L5.20327 9.50543ZM7.23874 10.9693C6.96543 10.8115 6.61595 10.9051 6.45815 11.1784L4.74387 14.1476C4.58607 14.4209 4.67971 14.7704 4.95302 14.9282C5.22633 15.086 5.57581 14.9924 5.73361 14.7191L7.44789 11.7498C7.60569 11.4765 7.51205 11.127 7.23874 10.9693ZM8.95292 11.4287C8.63732 11.4287 8.38149 11.6845 8.38149 12.0001V15.4287C8.38149 15.7443 8.63732 16.0001 8.95292 16.0001C9.26851 16.0001 9.52435 15.7443 9.52435 15.4287V12.0001C9.52435 11.6845 9.26851 11.4287 8.95292 11.4287ZM10.6674 5.03064C10.9407 5.18843 11.2901 5.09479 11.4479 4.82148L13.1622 1.85225C13.32 1.57894 13.2264 1.22946 12.9531 1.07166C12.6798 0.913868 12.3303 1.00751 12.1725 1.28082L10.4582 4.25005C10.3004 4.52336 10.394 4.87284 10.6674 5.03064ZM12.7028 6.4947C12.4295 6.65249 12.08 6.55885 11.9222 6.28554C11.7644 6.01223 11.8581 5.66275 12.1314 5.50496L15.1006 3.79067C15.3739 3.63287 15.7234 3.72652 15.8812 3.99983C16.039 4.27314 15.9453 4.62262 15.672 4.78041L12.7028 6.4947ZM12.3816 8C12.3816 8.31559 12.6374 8.57143 12.953 8.57143H16.3816C16.6972 8.57143 16.953 8.31559 16.953 8C16.953 7.68441 16.6972 7.42857 16.3816 7.42857H12.953C12.6374 7.42857 12.3816 7.68441 12.3816 8ZM12.1315 10.4946C11.8582 10.3368 11.7646 9.98737 11.9224 9.71406C12.0801 9.44075 12.4296 9.3471 12.7029 9.5049L15.6722 11.2192C15.9455 11.377 16.0391 11.7265 15.8813 11.9998C15.7235 12.2731 15.3741 12.3667 15.1007 12.2089L12.1315 10.4946ZM10.6673 10.9693C10.3939 11.1271 10.3003 11.4766 10.4581 11.7499L12.1724 14.7191C12.3302 14.9924 12.6797 15.0861 12.953 14.9283C13.2263 14.7705 13.3199 14.421 13.1621 14.1477L11.4478 11.1785C11.29 10.9052 10.9406 10.8115 10.6673 10.9693Z",fill:`url(#paint_${t})`}),R.createElement("defs",null,R.createElement("radialGradient",{id:`paint_${t}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(8.95312 8) scale(8)"},R.createElement("stop",{offset:"0.669733",stopColor:"white"}),R.createElement("stop",{offset:"0.716307",stopColor:"white",stopOpacity:"0.01"}))))},NH=Xpe;var BH={DIRECT_CHAT:2,ONLY_ME_CHAT:1};function o3e(e,t){var i,a,s;if((i=e==null?void 0:e.metadata)!=null&&i.isDirectChat&&(e==null?void 0:e.memberCount)===BH.ONLY_ME_CHAT)return "Me";if(!((a=e==null?void 0:e.metadata)!=null&&a.isDirectChat)&&(e!=null&&e.displayName))return e==null?void 0:e.displayName;let{firstname:o="",lastname:r=""}=(s=t==null?void 0:t.metadata)!=null?s:{},n=trim(`${o}${r}`);return (t==null?void 0:t.displayName)||n||(t==null?void 0:t.userId)||e.channelId}function t9(o){return _(this,arguments,function*({avatarFileId:e,avatarCustomUrl:t}){if(t)return t;if(e){let r=yield FileRepository.getFile(e);return FileRepository.fileUrlWithSize(r.data.fileUrl,"small")}return null})}function r3e(e,t,o){return _(this,null,function*(){var r,n;return (e==null?void 0:e.memberCount)===BH.ONLY_ME_CHAT?t9({avatarCustomUrl:o==null?void 0:o.avatarUrl}):(r=e==null?void 0:e.metadata)!=null&&r.isDirectChat&&(t!=null&&t.avatarUrl)?t9({avatarCustomUrl:t.avatarUrl}):t9({avatarFileId:e==null?void 0:e.avatarFileId,avatarCustomUrl:(n=e==null?void 0:e.metadata)==null?void 0:n.avatarCustomUrl})})}function n3e({channel:e}){var p,u,g;let{currentUserId:t}=ol(),[o,r]=useState(null),n=(p=e==null?void 0:e.metadata)!=null&&p.isDirectChat?((g=(u=e==null?void 0:e.metadata)==null?void 0:u.userIds)!=null?g:[]).find(f=>f!==t):null,i=re(t),a=re(n),s=se({fileId:i==null?void 0:i.avatarFileId}),l=se({fileId:a==null?void 0:a.avatarFileId});return useEffect(()=>{function f(){return _(this,null,function*(){r(null);let y=yield r3e(e,{avatarUrl:(a==null?void 0:a.avatarCustomUrl)||l},{avatarUrl:(i==null?void 0:i.avatarCustomUrl)||s});r(y);})}f();},[a==null?void 0:a.avatarCustomUrl,e,s,i==null?void 0:i.avatarCustomUrl]),{chatName:useMemo(()=>e==null?void 0:o3e(e,a),[e,a]),chatAvatar:o,type:e==null?void 0:e.type}}var LH=n3e;var m2={messageListHeader:"bf",displayName:"uf",memberCount:"vf",memberIcon:"xf",avatar:"wf"};var yu=({channel:e,pageId:t="*"})=>{let o="chat_header",{themeStyles:r}=te({pageId:t,componentId:o}),{chatName:n,chatAvatar:i}=LH({channel:e}),a=fu();return R.createElement("div",{className:m2.messageListHeader,style:r},R.createElement("div",{className:m2.avatar},R.createElement(xt,{avatarUrl:i,defaultImage:R.createElement(TH,null)})),R.createElement("div",null,R.createElement("div",{className:m2.displayName},R.createElement(S.Title,null,n||"Loading...")),R.createElement("div",{className:m2.memberCount},a?R.createElement(R.Fragment,null,R.createElement(SH,{className:m2.memberIcon}),R.createElement(S.Caption,null,ib((e==null?void 0:e.memberCount)||0)," ",`${(e==null?void 0:e.memberCount)||0} ${(e==null?void 0:e.memberCount)===1?"member":"members"}`)):R.createElement(R.Fragment,null,R.createElement(NH,{width:20,height:20}),R.createElement(S.Caption,null,"Waiting for connection...")))))};var AH={spinner:"yf",rotate:"Yr"};var DH=o=>{var r=o,{className:e}=r,t=P(r,["className"]);return R.createElement("svg",c({width:"25",height:"25",xmlns:"http://www.w3.org/2000/svg","aria-label":"Loading...",viewBox:"0 0 100 100",version:"1.1",className:cr(AH.spinner,e)},t),R.createElement("defs",{id:"defs3821"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0",rx:"3",ry:"3",transform:"rotate(-90 50 50)",width:"25",x:"72",y:"47",id:"rect3793"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.08333333333333333",rx:"3",ry:"3",transform:"rotate(-60 50 50)",width:"25",x:"72",y:"47",id:"rect3795"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.16666666666666666",rx:"3",ry:"3",transform:"rotate(-30 50 50)",width:"25",x:"72",y:"47",id:"rect3797"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.25",rx:"3",ry:"3",transform:"rotate(0 50 50)",width:"25",x:"72",y:"47",id:"rect3799"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.3333333333333333",rx:"3",ry:"3",transform:"rotate(30 50 50)",width:"25",x:"72",y:"47",id:"rect3801"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.4166666666666667",rx:"3",ry:"3",transform:"rotate(60 50 50)",width:"25",x:"72",y:"47",id:"rect3803"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.5",rx:"3",ry:"3",transform:"rotate(90 50 50)",width:"25",x:"72",y:"47",id:"rect3805"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.5833333333333334",rx:"3",ry:"3",transform:"rotate(120 50 50)",width:"25",x:"72",y:"47",id:"rect3807"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.6666666666666666",rx:"3",ry:"3",transform:"rotate(150 50 50)",width:"25",x:"72",y:"47",id:"rect3809"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.75",rx:"3",ry:"3",transform:"rotate(180 50 50)",width:"25",x:"72",y:"47",id:"rect3811"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.8333333333333334",rx:"3",ry:"3",transform:"rotate(210 50 50)",width:"25",x:"72",y:"47",id:"rect3813"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.9166666666666666",rx:"3",ry:"3",transform:"rotate(240 50 50)",width:"25",x:"72",y:"47",id:"rect3815"}))};var rr={optionButton:"kf",optionIcon:"jf",reactionIcon:"zf",timestamp:"Xf",messageActionButton:"Yf",messageActionButtonText:"Cf",messageDangerActionButtonText:"Af",copyIcon:"Mf",replyIcon:"Sf",binIcon:"Ef",mentionIcon:"Ff",flagIcon:"If"};var c3e=t=>{var e=P(t,[]);return R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"21",viewBox:"0 0 20 21"},e),R.createElement("path",{d:"M10 8.78369C10.8125 8.78369 11.5 9.47119 11.5 10.2837C11.5 11.1274 10.8125 11.7837 10 11.7837C9.15625 11.7837 8.5 11.1274 8.5 10.2837C8.5 9.47119 9.15625 8.78369 10 8.78369ZM8.5 5.53369C8.5 4.72119 9.15625 4.03369 10 4.03369C10.8125 4.03369 11.5 4.72119 11.5 5.53369C11.5 6.37744 10.8125 7.03369 10 7.03369C9.15625 7.03369 8.5 6.37744 8.5 5.53369ZM8.5 15.0337C8.5 14.2212 9.15625 13.5337 10 13.5337C10.8125 13.5337 11.5 14.2212 11.5 15.0337C11.5 15.8774 10.8125 16.5337 10 16.5337C9.15625 16.5337 8.5 15.8774 8.5 15.0337Z"}))},FH=c3e;var OH={popover:"Rf",fixed:"Uf"};var f3e=i=>{var a=i,{isOpen:e,content:t,fixed:o=!1,children:r}=a,n=P(a,["isOpen","content","fixed","children"]);return R.createElement(Popover,c({containerClassName:cr(OH.popover,{fixed:!1}),isOpen:e,content:t},n),r)},zH=f3e;var y3e=e=>R.createElement("svg",c({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M1.4375 10.5586C0.84375 9.99609 0.84375 9.02734 1.4375 8.46484L6.9375 2.96484C7.875 1.99609 9.5 2.68359 9.5 4.02734V6.52734C13.7812 6.65234 19 7.49609 19 12.8398C19 15.1211 17.7812 17.0273 15.9375 18.2461C14.7812 19.0273 13.25 17.9336 13.6875 16.5586C14.4375 14.1211 14.0625 12.8398 9.5 12.5586V14.9961C9.5 16.3398 7.875 17.0273 6.9375 16.0586L1.4375 10.5586ZM2.5 9.49609L8 14.9961V11.0273C13.125 11.0586 16.6562 12.0586 15.0938 16.9961C16.25 16.2461 17.5 14.9336 17.5 12.8398C17.5 8.37109 12.4688 8.02734 8 8.02734V3.99609L2.5 9.49609Z",fill:"currenColor"})),$H=y3e;var h3e=e=>R.createElement("svg",c({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M16.5312 5.03992C16.7812 5.28992 17 5.75867 17 6.10242V14.4774C17 15.3212 16.3125 15.9774 15.5 15.9774H13V17.4774C13 18.3212 12.3125 18.9774 11.5 18.9774H4.5C3.65625 18.9774 3 18.3212 3 17.4774V7.47742C3 6.66492 3.65625 5.97742 4.5 5.97742H7V4.47742C7 3.66492 7.65625 2.97742 8.5 2.97742H13.875C14.2188 2.97742 14.6875 3.19617 14.9375 3.44617L16.5312 5.03992ZM11.3125 17.4774C11.4062 17.4774 11.5 17.4149 11.5 17.2899V15.9774H8.5C7.65625 15.9774 7 15.3212 7 14.4774V7.47742H4.6875C4.5625 7.47742 4.5 7.57117 4.5 7.66492V17.2899C4.5 17.4149 4.5625 17.4774 4.6875 17.4774H11.3125ZM15.3125 14.4774C15.4062 14.4774 15.5 14.4149 15.5 14.2899V7.97742H12.75C12.3125 7.97742 12 7.66492 12 7.22742V4.47742H8.6875C8.5625 4.47742 8.5 4.57117 8.5 4.66492V14.2899C8.5 14.4149 8.5625 14.4774 8.6875 14.4774H15.3125ZM15.5 6.47742V6.19617C15.5 6.13367 15.4688 6.10242 15.4375 6.07117L13.9062 4.53992C13.875 4.50867 13.8438 4.47742 13.7812 4.47742H13.5V6.47742H15.5Z",fill:"currenColor"})),jH=h3e;var C3e=e=>R.createElement("svg",c({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M12.875 4.375C13.0625 4.375 13.25 4.5625 13.25 4.75V5.125C13.25 5.33594 13.0625 5.5 12.875 5.5H12.5L11.9844 13.4453C11.9609 14.0312 11.4453 14.5 10.8594 14.5H5.11719C4.53125 14.5 4.01562 14.0312 3.99219 13.4453L3.5 5.5H3.125C2.91406 5.5 2.75 5.33594 2.75 5.125V4.75C2.75 4.5625 2.91406 4.375 3.125 4.375H5.04688L5.84375 3.0625C6.03125 2.75781 6.45312 2.5 6.80469 2.5H9.17188C9.52344 2.5 9.94531 2.75781 10.1328 3.0625L10.9297 4.375H12.875ZM6.80469 3.625L6.35938 4.375H9.61719L9.17188 3.625H6.80469ZM10.8594 13.375L11.3516 5.5H4.625L5.11719 13.375H10.8594Z"})),hu=C3e;var v3e=o=>{var r=o,{color:e="#FA4D30"}=r,t=P(r,["color"]);return R.createElement("svg",c({width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),R.createElement("path",{d:"M10.5 2.99609C11.5938 2.99609 12.7812 2.62109 13.9062 2.12109C14.875 1.71484 16 2.43359 16 3.49609V10.9961C16 11.5273 15.7188 11.9961 15.3125 12.2773C14.4688 12.8086 13.125 13.4961 11.2812 13.4961C9.15625 13.4961 7.75 12.4961 6.21875 12.4961C4.46875 12.4961 3.40625 12.8711 2.25 13.4023V15.9961C2.25 16.2773 2 16.4961 1.75 16.4961H1.25C0.96875 16.4961 0.75 16.2773 0.75 15.9961V3.30859C0.28125 3.05859 0 2.55859 0 1.99609C0 1.15234 0.71875 0.464844 1.59375 0.527344C2.3125 0.558594 2.90625 1.12109 2.96875 1.83984C2.96875 1.87109 3 1.96484 3 1.99609C3 2.15234 2.9375 2.37109 2.90625 2.49609C3.59375 2.21484 4.4375 1.99609 5.4375 1.99609C7.5625 1.99609 8.96875 2.99609 10.5 2.99609ZM14.5 10.9961V3.49609C13.5 3.96484 11.8438 4.49609 10.5 4.49609C8.625 4.49609 7.3125 3.49609 5.4375 3.49609C4.125 3.49609 2.90625 4.02734 2.25 4.49609V11.7461C3.21875 11.3086 4.875 10.9961 6.21875 10.9961C8.09375 10.9961 9.40625 11.9961 11.2812 11.9961C12.5938 11.9961 13.8125 11.4961 14.5 10.9961Z",fill:e}))},Cu=v3e;var QH=({isOwner:e,isModerator:t,isFlagged:o,action:r,containerRef:n})=>{let[i,a]=useState(!1),s=useRef(null),l=()=>{r.onCopy&&r.onCopy(),a(!1);},d=()=>{r.onReply&&r.onReply(),a(!1);},p=()=>{r.onDelete&&r.onDelete(),a(!1);},u=()=>{r.onFlag&&r.onFlag(),a(!1);},g=()=>{r.onUnflag&&r.onUnflag(),a(!1);};return R.createElement(R.Fragment,null,R.createElement(zH,{positions:["bottom","top"],onClickOutside:()=>a(!1),isOpen:i,align:"start",parentElement:(n==null?void 0:n.current)||void 0,content:R.createElement(R.Fragment,null,R.createElement("div",{className:rr.messageActionButton,onClick:d},R.createElement("div",{className:rr.messageActionButtonText},R.createElement(S.Body,null,"Reply")),R.createElement($H,{className:rr.replyIcon})),R.createElement("div",{className:rr.messageActionButton,onClick:l},R.createElement("div",{className:rr.messageActionButtonText},R.createElement(S.Body,null,"Copy")),R.createElement(jH,{className:rr.copyIcon})),(t||!e)&&R.createElement("div",{className:rr.messageActionButton,onClick:o?g:u},R.createElement("div",{className:rr.messageDangerActionButtonText},R.createElement(S.Body,null,o?"Unreport":"Report")),R.createElement(Cu,{className:rr.flagIcon})),(e||t)&&R.createElement("div",{className:rr.messageActionButton,onClick:p},R.createElement("div",{className:rr.messageDangerActionButtonText},R.createElement(S.Body,null,"Delete")),R.createElement(hu,{className:rr.binIcon})))},R.createElement("div",{className:rr.optionButton,ref:s,onClick:()=>{a(!i);}},R.createElement(FH,{className:rr.optionIcon}))))};var vu={messageItemContainer:"Bf",userDisplayName:"Df",avatar:"Hf",moderatorBadge:"Lf"};var w3e=({avatarUrl:e,displayName:t,children:o})=>R.createElement("div",{className:vu.messageItemContainer},R.createElement("div",{className:vu.avatar},R.createElement(xt,{avatarUrl:e,defaultImage:R.createElement(cs,null)})),R.createElement("div",null,R.createElement("div",{className:vu.userDisplayName},R.createElement(S.CaptionBold,null,t)),o)),WH=w3e;var Ts={messageBubble:"Cr",messageRepliedBubble:"Tf",messageParentContainer:"Vf",messageParentDisplayName:"qf",messageParentText:"Gf",messageChildContainer:"Jf",messageChildText:"Kf"};var _3e=e=>At({fetcher:MessageRepository.getMessage,params:e,shouldCall:!!e}),qH=_3e;var xu={mentionText:"Nf",hyperlink:"Of"};var KH={hyperlink:"Pf"};var N3e=({linkClassName:e,children:t})=>R.createElement(EZ,{options:{target:"_blank",render:({attributes:o,content:r})=>R.createElement("a",c({className:e||KH.hyperlink},o),r)}},t),o9=N3e;var E3e=({message:e,className:t})=>{var n,i,a;let o=(n=e.metadata)==null?void 0:n.mentioned,r=o==null?void 0:o.sort((s,l)=>s.index-l.index);if(r!=null&&r.length){let s=((i=e.data)==null?void 0:i.text)||"",l=[],d=0;r.forEach(u=>{let g=u.index,f=u.index+u.length+1,y=s.slice(d,g),v=s.slice(g,f);y&&l.push({text:y,isMention:!1}),l.push({text:v,isMention:!0}),d=f;});let p=s.slice(d);return p&&l.push({text:p,isMention:!1}),R.createElement(S.Body,{className:t},l.map((u,g)=>u.isMention?R.createElement("span",{key:g,className:xu.mentionText},u.text):R.createElement("span",{key:g},R.createElement(o9,{linkClassName:xu.hyperlink},u.text))))}return R.createElement(S.Body,{className:t},R.createElement(o9,{linkClassName:xu.hyperlink},(a=e.data)==null?void 0:a.text))},r9=E3e;var B3e=({message:e})=>{var r,n,i;let{currentUserId:t}=J(),o=(n=(r=e.metadata)==null?void 0:r.mentioned)==null?void 0:n.some(a=>a.userId===t||a.type==="channel");if(e&&e.parentId){let a=qH(e.parentId),s=re(a==null?void 0:a.creatorId);return !a||!s?null:R.createElement("div",{className:Ts.messageRepliedBubble},R.createElement("div",{className:Ts.messageParentContainer},R.createElement("div",{className:Ts.messageParentDisplayName},R.createElement(S.BodyBold,null,s.displayName)),R.createElement(S.Body,{className:Ts.messageParentText},(i=a.data)==null?void 0:i.text)),R.createElement("div",{className:Ts.messageChildContainer},R.createElement(r9,{className:Ts.messageChildText,message:e})))}return R.createElement("div",{"data-mentioned":o,className:Ts.messageBubble},R.createElement(r9,{message:e}))},XH=B3e;var d2=e=>{let{client:t}=J();return {isModerator:useMemo(()=>{if(!e)return !1;let r=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").currentUser())||!1,n=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").channel(e))||!1;return r||n},[e])}};var YH=e=>R.createElement("svg",c({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0766 3.686C11.6827 3.45305 12.3021 3.33948 12.9061 3.3335C14.7179 3.31558 16.3937 4.2689 17.1729 5.89093L17.1895 5.92546L17.202 5.9624C17.6819 7.39004 17.5517 8.83248 17.0292 10.1008C16.7326 9.72289 16.3721 9.39755 15.964 9.14106C16.2254 8.26924 16.2483 7.32915 15.9455 6.39919C15.3774 5.24797 14.2332 4.57487 12.9278 4.60378C12.4981 4.61329 12.0515 4.70045 11.6019 4.86956C11.1731 5.08422 10.8198 5.36694 10.5238 5.73675L10.0093 6.37992L9.47729 5.74959C8.38507 4.45434 6.19511 4.17996 4.72103 5.44206C3.63692 6.5523 3.60343 8.44184 4.37082 10.0205C5.31606 11.6937 7.28176 13.3534 9.14794 14.7202L9.15794 14.7275C9.27155 14.8082 9.38012 14.8942 9.48451 14.9769C9.57334 15.0473 9.65915 15.1152 9.74247 15.1755C9.83249 15.2407 9.91925 15.2913 9.98761 15.3273C10.0527 15.3006 10.1319 15.2662 10.2153 15.2157C10.2662 15.1848 10.3205 15.1506 10.3776 15.1136C10.6388 15.4735 10.9562 15.7901 11.3169 16.0503C11.1818 16.1421 11.0508 16.227 10.9257 16.3029C10.8808 16.33 10.8388 16.3568 10.7982 16.3826C10.5856 16.5181 10.4104 16.6296 10.0526 16.6594L9.96091 16.6666L9.87002 16.6497C9.46411 16.575 9.1867 16.3802 8.94112 16.2025C8.80472 16.1038 8.67845 16.0042 8.57194 15.9202C8.48669 15.8529 8.4141 15.7957 8.3591 15.7569L8.35494 15.7536L8.34994 15.7496C6.42696 14.342 4.31681 12.6298 3.18676 10.6147L3.17842 10.5987L3.17008 10.5834C2.21058 8.62424 2.1731 6.14474 3.7738 4.53473L3.79047 4.51786L3.80882 4.50181C5.63352 2.91773 8.30066 3.019 9.97595 4.41428C10.2872 4.13498 10.6374 3.8993 11.0216 3.71089L11.0491 3.69724L11.0766 3.686Z",fill:"currentColor"}),R.createElement("path",{d:"M13.6839 10.0507L13.6839 10.0501L13.6725 10.0522C13.5717 10.0706 13.4807 10.1238 13.4151 10.2025C13.3496 10.2811 13.3137 10.3803 13.3137 10.4827C13.3137 10.4827 13.3137 10.4827 13.3137 10.4827V12.2327H11.5637V12.2322L11.5527 12.2332L11.4964 12.2382L11.4964 12.2376L11.485 12.2397C11.3842 12.2581 11.2932 12.3113 11.2276 12.39C11.1621 12.4686 11.1262 12.5678 11.1262 12.6702H11.1257L11.1267 12.6812L11.1317 12.7375L11.1312 12.7375L11.1333 12.7489C11.1517 12.8496 11.2049 12.9407 11.2835 13.0063C11.3622 13.0718 11.4613 13.1077 11.5637 13.1077C11.5637 13.1077 11.5637 13.1077 11.5638 13.1077H13.3137V14.8577H13.3132L13.3142 14.8687L13.3192 14.925L13.3187 14.925L13.3208 14.9364C13.3392 15.0371 13.3924 15.1282 13.471 15.1938L13.5511 15.0977L13.471 15.1938C13.5497 15.2593 13.6489 15.2952 13.7513 15.2952L13.7513 15.2957L13.7623 15.2947L13.8185 15.2897L13.8186 15.2902L13.83 15.2881C13.9307 15.2697 14.0218 15.2165 14.0873 15.1379C14.1529 15.0592 14.1887 14.96 14.1887 14.8577C14.1887 14.8577 14.1887 14.8576 14.1887 14.8576V13.1077H15.9387V13.1082L15.9498 13.1072L16.006 13.1022L16.0061 13.1027L16.0175 13.1006C16.1182 13.0822 16.2093 13.029 16.2748 12.9504C16.3404 12.8717 16.3763 12.7725 16.3762 12.6701L16.3767 12.6701L16.3757 12.6591L16.3707 12.6028L16.3713 12.6028L16.3692 12.5914C16.3507 12.4907 16.2976 12.3996 16.2189 12.3341C16.1403 12.2685 16.0411 12.2326 15.9387 12.2327C15.9387 12.2327 15.9387 12.2327 15.9387 12.2327H14.1887V10.4827H14.1892L14.1882 10.4716L14.1832 10.4153L14.1838 10.4153L14.1817 10.4039C14.1632 10.3032 14.1101 10.2121 14.0314 10.1466C13.9527 10.081 13.8536 10.0451 13.7512 10.0452V10.0447L13.7402 10.0457L13.6839 10.0507Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.25"}));var bu=o=>_(void 0,[o],function*({reactionName:e,message:t}){let r=t.myReactions||[];if(r.includes(e)){yield ReactionRepository.removeReaction("message",t.messageId,e);return}r.length>0&&(yield ReactionRepository.removeReaction("message",t.messageId,r[0])),yield ReactionRepository.addReaction("message",t.messageId,e);});var a9={quickReactionIcon:"Qf",quickReactionIconContainer:"Ar"};var Iu=({pageId:e="*",componentId:t="*",message:o,onSelectReaction:r})=>{let n="message_quick_reaction",{config:i}=A({pageId:e,componentId:t,elementId:n}),{config:a}=hi(),s=useCallback(()=>{a&&i.reaction&&a.find(l=>l.name===i.reaction)&&bu({reactionName:i.reaction,message:o}),r&&r();},[a,i,o]);return R.createElement("div",{className:a9.quickReactionIconContainer},R.createElement(YH,{className:a9.quickReactionIcon,onClick:s}))};var s9={reactionPickerContainer:"Wf",reactionButton:"u"};var l9=({message:e,onSelectReaction:t})=>{let{config:o}=hi(),r=n=>{bu({reactionName:n,message:e});};return o?R.createElement("div",{className:s9.reactionPickerContainer},o.map(n=>{var i;return R.createElement("img",{"data-active":(i=e.myReactions)==null?void 0:i.includes(n.name),key:n.name,src:n.image,alt:n.name,className:s9.reactionButton,onClick:()=>{r(n.name),t&&t(n.name);}})})):null};var wu={reactionContainer:"Zf",reactionPickerWrap:"_f",reactionButton:"eb"};var tF=({pageId:e="*",componentId:t="*",message:o,containerRef:r})=>{let [n,i]=useState(!1),[a,s]=useState(!1),[l,d]=useState(!1);R.useState();let g=useRef(null),f=useRef(a);useEffect(()=>{f.current=a;},[a]);let y=useCallback(()=>{if(!f.current)return;let I=setTimeout(()=>{f.current&&i(!0);},500);return ()=>clearTimeout(I)},[]),v=useRef(l);useEffect(()=>{v.current=l;},[l]);let C=useCallback(()=>{setTimeout(()=>{v.current||i(!1);},1e3);},[]),h=useCallback(I=>{g.current&&!g.current.contains(I.target)&&i(!1);},[]),x=()=>{if(!g.current||!(r!=null&&r.current))return "translate(-50%, 0px)";let I=r.current.getBoundingClientRect(),w=g.current.getBoundingClientRect();if(!I||!w)return "translate(-50%, 0px)";Uv(Number(zv("--asc-spacing-s1").replace("rem","")));let T=w.right-I.right,L=I.left-w.left;return T>0?`translate(calc(-50% - ${T}px), 0px)`:L>0?`translate(calc(-50% + ${L}px), 0px)`:"translate(-50%, 0px)"},b=I=>{h(I);},M=()=>{s(!1),d(!1),i(!1);};return useEffect(()=>(document.addEventListener("mousedown",b),document.addEventListener("touchstart",h),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("touchstart",h);}),[]),useEffect(()=>{a?!n&&y():n&&C();},[a,n]),R.createElement("div",{className:wu.reactionContainer},n&&R.createElement("div",{className:wu.reactionPickerWrap,style:{transform:x()},ref:g,onMouseEnter:()=>d(!0),onMouseLeave:()=>{d(!1);}},R.createElement(l9,{message:o,onSelectReaction:M})),R.createElement("div",{className:wu.reactionButton,onMouseEnter:()=>{s(!0);},onMouseLeave:()=>{s(!1);}},R.createElement(Iu,{message:o,onSelectReaction:M,pageId:e,componentId:t})))};var u2={reactionPreviewContainer:"Mr",reactionIconContainer:"c",reactionIcon:"rb",reactionCount:"ab",fallbackIcon:"ob"};var p9=({message:e,onClick:t})=>{let{config:o}=hi(),r=e.reactions?useMemo(()=>Object.entries(e.reactions).sort((n,i)=>i[1]-n[1]).filter(n=>n[1]>0).slice(0,3).sort((n,i)=>n[1]-i[1]),[e==null?void 0:e.reactions]):[];return e!=null&&e.reactionsCount?R.createElement("div",{className:u2.reactionPreviewContainer,"data-myreaction":(e==null?void 0:e.myReactions)&&!!(e!=null&&e.myReactions.length),onClick:t},R.createElement("div",{className:u2.reactionIconContainer},r.map(n=>{let i=o.find(a=>a.name===n[0]);return R.createElement(R.Fragment,null,i?R.createElement("img",{className:u2.reactionIcon,src:i.image,alt:i.name}):R.createElement(Hm,{className:u2.fallbackIcon,backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-base-shade3")}))})),R.createElement("div",{className:u2.reactionCount},Dm(e.reactionsCount))):null};var Gn={messageItemContainer:"tb",messageItemContainerInner:"Sr",messageBubbleWrap:"ib",messageReaction:"lb",messageDeletedBubble:"sb",messageOptionsWrap:"cb",binIcon:"nb",optionIcon:"db",flagIcon:"mb",timestamp:"pb",reactionListSheet:"gb",reactionListContainer:"hb",reactionListBackdrop:"fb"};var j3e=({pageId:e="*",componentId:t="*",elementId:o="*",message:r,avatarUrl:n,userDisplayName:i,containerRef:a,action:s})=>{let l=J(),d=r.creatorId===l.currentUserId,{isModerator:p}=d2(r.channelId),[u,g]=useState(void 0);return R.createElement(R.Fragment,null,R.createElement(WH,{avatarUrl:n,displayName:i},R.createElement("div",{className:Gn.messageItemContainerInner,"data-reactions":!!r.reactionsCount},r.isDeleted?R.createElement("div",{className:Gn.messageDeletedBubble},R.createElement(hu,{className:Gn.binIcon}),R.createElement("div",null,R.createElement(S.Body,null,"This message was deleted"))):R.createElement("div",{className:Gn.messageBubbleWrap},R.createElement(XH,{message:r}),R.createElement("div",{className:Gn.messageReaction},R.createElement(p9,{message:r,onClick:()=>g(r)})),s&&R.createElement(QH,{containerRef:a,isOwner:d,isModerator:p,action:s,isFlagged:r.flagCount>0}),R.createElement(tF,{message:r,containerRef:a,pageId:e,componentId:t}),r.flagCount>0&&R.createElement(Cu,{className:Gn.flagIcon}),R.createElement("div",{className:Gn.timestamp},dn(r.createdAt).format("HH:mm A"))))),u&&R.createElement(C1,{isOpen:!0,onClose:()=>g(void 0),className:Gn.reactionListSheet},R.createElement(C1.Container,{className:Gn.reactionListContainer},R.createElement(C1.Header,null),R.createElement(C1.Content,null,R.createElement(Fm,{pageId:e,referenceId:u.messageId,referenceType:"message"}))),R.createElement(C1.Backdrop,{className:Gn.reactionListBackdrop})))},Pu=j3e;var u9=({pageId:e="*",componentId:t="*",message:o,containerRef:r,action:n})=>{let i="sender_message_bubble",a=re(o.creatorId),s=se({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return R.createElement(Pu,{message:o,userDisplayName:a==null?void 0:a.displayName,avatarUrl:s,containerRef:r,action:n,pageId:e,componentId:t,elementId:i})};var g9=({pageId:e="*",componentId:t="*",message:o,containerRef:r,action:n})=>{let i="receiver_message_bubble",{user:a}=fr(o.creatorId),s=nt({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return R.createElement(Pu,{pageId:e,componentId:t,elementId:i,message:o,userDisplayName:a==null?void 0:a.displayName,avatarUrl:s,containerRef:r,action:n})};var f9=(r,n)=>_(void 0,[r,n],function*(e,{onSuccess:t,onError:o}){try{yield MessageRepository.deleteMessage(e),t&&t();}catch(i){o&&o(i);}});var y9=(e,t,o)=>_(void 0,null,function*(){try{yield MessageRepository.flagMessage(e),t&&t();}catch(r){o&&o(r);}});var oF=(e,t,o)=>_(void 0,null,function*(){try{yield MessageRepository.unflagMessage(e),t&&t();}catch(r){o&&o(r);}});var h9={icon:"bb"};var v9=createContext({liveChatNotifications:[],liveChatNotificationFunction:{success:()=>{},error:()=>{},show:()=>{}}}),Y3e=3e3,nF=({children:e})=>{let[t,o]=useState([]),r=i=>o&&o(a=>a.filter(s=>s.id!==i)),n=i=>{let a=Date.now();o(s=>[...s,c({id:a},i)]),setTimeout(()=>{r(a);},(i==null?void 0:i.duration)||Y3e);};return R.createElement(v9.Provider,{value:{liveChatNotifications:t,liveChatNotificationFunction:{success:i=>n(E(c({},i),{icon:R.createElement(u0,{className:h9.icon})})),error:i=>n(E(c({},i),{icon:R.createElement(Y1,{className:h9.icon})})),show:i=>n(i)}}},e)},iF=()=>{let{liveChatNotifications:e}=useContext(v9);return e},g2=()=>{let{liveChatNotificationFunction:e}=useContext(v9);return e};var aF=()=>{let e=g2(),{formatMessage:t}=useIntl();return r=>_(void 0,null,function*(){yield navigator.clipboard.writeText(r),e.success({content:t({id:"livechat.notification.copy.message"})});})};var Z1={infiniteScrollContainer:"ub",loadingIndicatorWrap:"vb",loadingIndicator:"xb",infiniteScrollInner:"wb",customStatusContainer:"yb",iconContainer:"kb"};var _u=({pageId:e="*",channel:t,replyMessage:o})=>{let r="message_list",n=J(),i=useRef(null),[a,s]=useState(void 0),{confirm:l}=Re(),d=g2(),p=aF(),{themeStyles:u}=te({pageId:e,componentId:r}),{messages:g,hasMore:f,loadMore:y,isLoading:v,error:C}=Pd({subChannelId:t.channelId,sortBy:"segmentDesc",limit:10,includeDeleted:!0}),h=g,x=b=>{l({title:"Delete this message?",content:"This message will also be removed from your friend\u2019s devices.",cancelText:"Cancel",okText:"Delete",onOk:()=>f9(b,{onError:()=>d.error({content:"Unable to delete message. Please try again."})})});};return useEffect(()=>{let b=()=>{i.current&&s(i.current.clientHeight);},M=new ResizeObserver(b);return i.current&&M.observe(i.current),()=>{i.current&&M.unobserve(i.current);}},[]),C?R.createElement("div",{className:Z1.customStatusContainer,ref:i,style:u},R.createElement("div",{className:Z1.iconContainer},R.createElement(n5,null)),R.createElement(S.Caption,null,"Couldn't load chat")):R.createElement("div",{className:Z1.infiniteScrollContainer,ref:i,style:u},i.current&&R.createElement(WY,{className:Z1.infiniteScrollInner,scrollableTarget:i.current,scrollThreshold:.7,hasMore:f,next:y,loader:v?R.createElement("div",{className:Z1.loadingIndicatorWrap},R.createElement(DH,{className:Z1.loadingIndicator})):null,inverse:!0,dataLength:h.length,height:i.current.clientHeight},h.map((b,M)=>b.creatorId===n.currentUserId?R.createElement(u9,{message:b,action:t.isMuted?void 0:{onReply:()=>o(b),onDelete:()=>x(b.messageId),onCopy:()=>{var I,w;return ((I=b.data)==null?void 0:I.text)&&p((w=b.data)==null?void 0:w.text)}},key:b.messageId,containerRef:i,pageId:e,componentId:r}):R.createElement(g9,{message:b,action:{onReply:()=>o(b),onDelete:()=>x(b.messageId),onCopy:()=>{var I,w;return ((I=b.data)==null?void 0:I.text)&&p((w=b.data)==null?void 0:w.text)},onFlag:()=>y9(b.messageId,()=>d.success({content:"Message reported"}),()=>d.error({content:"This message failed to be reported. Please try again."})),onUnflag:()=>oF(b.messageId,()=>d.success({content:"Message unreported"}),()=>d.error({content:"This message failed to be unreported. Please try again."}))},key:b.messageId,containerRef:i,pageId:e,componentId:r}))))};var i5e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},e),R.createElement("path",{d:"M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"})),lF=i5e;var x9={homeIndicatorContainer:"jb",homeIndicator:"zb"};var Tu=()=>R.createElement("div",{className:x9.homeIndicatorContainer},R.createElement("div",{className:x9.homeIndicator}));var xn={sendButton:"Xb",reactionButton:"Yb",sendButtonContainer:"Cb",composeBarContainer:"Ab",optionContainer:"Mb",composeBar:"Sb",composeBarLoading:"Eb",mentionText:"Fb",editorPlaceholder:"Ib",editorContainer:"Er",editorRoot:"Rb",editorParagraph:"Ub",editorContainer__mentionTextInput_item:"Fr",editorLink:"Ir",userMentionItem__item:"C",allMentionItem__item:"A",userMentionItem__avatar:"Bb",allMentionItem__atSign:"Db",userMentionItem__displayName:"Hb",allMentionItem__displayName:"Lb"};var ku=({channelId:e,memberships:t,search:o,limit:r=20,shouldCall:n=!0})=>{let s=dt({fetcher:ChannelRepository.Membership.searchMembers,params:{channelId:e,search:o||"",memberships:t,limit:r,includeDeleted:!1},shouldCall:!!e&&n}),{items:i}=s,a=P(s,["items"]);return c({channelMembers:i},a)};var f5e=e=>{var o,r;let t=(()=>{switch(screen.orientation.type){case"landscape-primary":case"landscape-secondary":return .5;case"portrait-secondary":case"portrait-primary":return .75;default:return .5}})();return e.visualViewport?((o=e.visualViewport)==null?void 0:o.height)*((r=e.visualViewport)==null?void 0:r.scale)/e.screen.height<t:!1},cF=({commandPriority:e,onEnter:t})=>{let[o]=useLexicalComposerContext();return useEffect(()=>{o.registerCommand(KEY_ENTER_COMMAND,r=>{let n=$getSelection();if(!$isRangeSelection(n)||f5e(window))return !1;let i=r;return i.preventDefault(),i.shiftKey?o.dispatchCommand(INSERT_PARAGRAPH_COMMAND,void 0):(t(),!0)},e);},[o,t]),null};function dF({option:e,isSelected:t,onClick:o,onMouseEnter:r}){return R.createElement("li",{key:e.key,tabIndex:-1,"data-is-selected":t,className:Aa.allMentionItem__item,ref:e.setRefElement,role:"option","aria-selected":t,onMouseEnter:r,onClick:o},R.createElement("div",{className:Aa.allMentionItem__atSign},"@"),R.createElement("p",{className:Aa.allMentionItem__displayName},e.data.displayName))}var L5e=200,A5e=e=>{let[t,o]=useState(null),{isModerator:r}=d2(e||void 0),{channelMembers:n}=ku({search:t,channelId:e,memberships:["member"],limit:20}),i=s=>{o(s);};return {suggestions:useMemo(()=>{let s=n.map(({user:l,userId:d})=>({userId:(l==null?void 0:l.userId)||d,displayName:l==null?void 0:l.displayName}));return r&&(t===""||/^al*l*$/i.test(t||""))?[{userId:"all",displayName:"All"},...s]:s},[r,n]),queryString:t,onQueryChange:i}},D5e=[AutoLinkNode,LinkNode,zi],Su=({pageId:e="*",channel:t,composeAction:{replyMessage:o,mentionMessage:r,clearReplyMessage:n,clearMention:i}})=>{var M;let a="message_composer",s=useRef(null),l=useRef(null),{themeStyles:d,uiReference:p,config:u,accessibilityId:g}=te({pageId:e,componentId:a}),{confirm:f}=Re(),y=g2(),{onQueryChange:v,suggestions:C}=A5e(t.channelId),{mutateAsync:h}=useMutation({mutationFn:I=>MessageRepository.createMessage(I),onSuccess:()=>{var I;(I=l.current)==null||I.update(()=>{$getRoot().clear();}),n&&n();},onError:I=>{let w=I.message,N="Your message wasn't sent. Please try again.";w==="Amity SDK (400308): Text contain blocked word"?N="Your message wasn't sent as it contains a blocked word.":w==="Amity SDK (400309): Data contain link that is not in whitelist"?N="Your message wasn\u2019t sent as it contained a link that\u2019s not allowed.":w==="Amity SDK (400302): User is muted"&&(N="User is muted"),y.error({content:N});}}),x=()=>{if(!t||!l.current)return;let{mentioned:I,mentionees:w,text:N}=il(l.current);if((N==null?void 0:N.trim().length)!==0){if(N.trim().length>(typeof(u==null?void 0:u.message_limit)=="number"?u==null?void 0:u.message_limit:L5e)){f({title:"Unable to send message",content:"Your message is too long. Please shorten your message and try again.",okText:"Ok"});return}h({tags:[],subChannelId:t.channelId,data:{text:N.trim()},dataType:"text",mentionees:w,metadata:{mentioned:I},parentId:(o==null?void 0:o.messageId)||void 0});}},b=al({namespace:p,theme:{root:xn.editorRoot,placeholder:xn.editorPlaceholder,paragraph:xn.editorParagraph,link:xn.editorLink},nodes:D5e});return R.createElement("div",{className:xn.composeBarContainer,"data-qa-anchor":g,style:d},R.createElement("div",{className:xn.composeBar},R.createElement("div",{ref:s,className:xn.optionContainer}),R.createElement("div",{className:xn.editorContainer},R.createElement(LexicalComposer,{initialConfig:b},R.createElement(RichTextPlugin,{contentEditable:R.createElement(ContentEditable,null),placeholder:(M=R.createElement("span",{className:xn.editorPlaceholder},u.placeholder_text))!=null?M:null,ErrorBoundary:S5e}),R.createElement(HistoryPlugin,null),R.createElement(AutoFocusPlugin,null),R.createElement(ll,null),R.createElement(sl,null),R.createElement(EditorRefPlugin,{editorRef:l}),R.createElement(cF,{onEnter:x,commandPriority:COMMAND_PRIORITY_LOW}),R.createElement(ml,{suggestions:C,getSuggestionId:I=>I.userId,onQueryChange:v,$createNode:I=>La({text:`@${I.displayName||""}`,data:I}),menuRenderFn:(I,{options:w,selectedIndex:N,setHighlightedIndex:T,selectOptionAndCleanUp:L})=>!s.current||w.length===0?null:Rv.createPortal(R.createElement(R.Fragment,null,w.map((D,U)=>D.data.userId==="all"?R.createElement(dF,{isSelected:N===U,onClick:()=>{T(U),L(D);},onMouseEnter:()=>{T(U);},key:D.key,option:D}):R.createElement(Da,{isSelected:N===U,onClick:()=>{T(U),L(D);},onMouseEnter:()=>{T(U);},key:D.key,option:D}))),s.current),commandPriority:COMMAND_PRIORITY_HIGH}))),R.createElement("div",{className:xn.sendButtonContainer},R.createElement(lF,{className:xn.sendButton,onClick:()=>x()}))),R.createElement(Tu,null))};var uF=({channelId:e})=>{let r=_n({fetcher:ChannelRepository.getChannel,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return c({channel:t},o)};var yt={composeBarContainer:"Tb",composeBar:"Vb",textInputContainer:"qb",composeBarLoading:"Gb",replyPlaceholderContainer:"Jb",replyAvatar:"Kb",replyProfile:"Nb",replyProfileName:"Ob",replyProfileMessage:"Pb",replyDismiss:"Qb",notificationPosition:"Wb",messageListPlaceholder:"Zb",mutedChannelContainer:"_b",mutedIcon:"eu",commentAltIcon:"ru",banStatePanel:"au"};var O5e=({children:e})=>R.createElement(R.Fragment,null,R.createElement("div",{className:yt.messageListPlaceholder},e),R.createElement("div",{className:yt.composeBarContainer},R.createElement("div",{className:yt.composeBar},R.createElement("div",{className:yt.textInputContainer},R.createElement("div",{className:yt.composeBarLoading},R.createElement(J5,{width:20,height:20}),R.createElement("span",null,R.createElement(S.Body,null,"Loading chat..."))))),R.createElement(Tu,null))),Nu=O5e;var gF=({replyMessage:e,onDismiss:t})=>{var r,n;let o=re(e.creatorId);return o?R.createElement("div",{className:yt.replyPlaceholderContainer},R.createElement("div",{className:yt.replyAvatar},R.createElement(xt,{avatarUrl:(r=o.avatar)==null?void 0:r.fileUrl,defaultImage:R.createElement(cs,null)})),R.createElement("div",{className:yt.replyProfile},R.createElement("div",{className:yt.replyProfileName},`Replying to ${o.displayName}`),R.createElement("div",{className:yt.replyProfileMessage},(n=e.data)==null?void 0:n.text)),R.createElement("div",{className:yt.replyDismiss},R.createElement(R1,{onClick:t,width:"20",height:"20"}))):null};var U5e=({children:e})=>R.createElement("div",{className:yt.messageListPlaceholder},e),fF=U5e;var I9={notifications:"ou",notificationContainer:"tu",appear:"Rr"};var yF=({className:e,content:t,icon:o})=>R.createElement("div",{className:cr(I9.notificationContainer,e)},o,R.createElement(S.Body,null,t)),w9=()=>{let e=iF();return R.createElement("div",{className:I9.notifications},e.map(t=>R.createElement(yF,E(c({},t),{key:t.id}))))};var j5e=e=>R.createElement("svg",c({width:"23",height:"21",viewBox:"0 0 23 21",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M21.7988 17.7605C22.0449 17.9363 22.1152 18.2878 21.9043 18.5339L21.5527 18.9558C21.3418 19.2019 20.9902 19.2722 20.7793 19.0613L-0.244141 2.60815C-0.490234 2.43237 -0.560547 2.08081 -0.349609 1.83472L0.00195312 1.37769C0.212891 1.16675 0.564453 1.09644 0.810547 1.30737L21.7988 17.7605ZM12.5527 7.49487C13.3262 7.91675 13.8887 8.69019 14.0645 9.53394L11.5684 7.60034C11.8496 7.35425 12.2363 7.31909 12.5527 7.49487ZM13.6074 6.15894C13.2207 5.91284 13.1152 5.3855 13.3613 4.99878C13.6074 4.61206 14.1348 4.47144 14.5215 4.71753C16.3848 5.91284 17.5449 7.9519 17.5449 10.1667C17.5449 10.8347 17.4395 11.4324 17.2637 12.03L15.7871 10.8699C15.8223 10.6589 15.8574 10.4128 15.8574 10.1667C15.8574 8.54956 15.0137 7.03784 13.6074 6.15894ZM15.4707 3.31128C15.084 3.06519 14.9785 2.53784 15.2246 2.11597C15.5059 1.72925 16.0332 1.62378 16.4199 1.86987C19.2324 3.73315 20.9199 6.8269 20.9199 10.1667C20.9199 11.6082 20.6035 12.9441 20.041 14.2097L18.6699 13.1199C19.0215 12.2058 19.1973 11.2214 19.1973 10.1667C19.1973 7.42456 17.8262 4.823 15.4707 3.31128ZM9.66992 4.29565V6.08862L7.49023 4.40112L8.22852 3.698C8.36914 3.52222 8.58008 3.41675 8.79102 3.41675C9.24805 3.41675 9.66992 3.76831 9.66992 4.29565ZM7.98242 14.0691V11.1863L9.66992 12.5222V16.073C9.66992 16.6003 9.24805 16.9167 8.79102 16.9167C8.58008 16.9167 8.36914 16.8464 8.22852 16.6707L5.09961 13.5417H1.51367C1.02148 13.5417 0.669922 13.1902 0.669922 12.698V7.6355C0.669922 7.17847 1.02148 6.79175 1.51367 6.79175H2.35742L4.50195 8.47925H2.35742V11.8542H5.76758L7.98242 14.0691Z"})),M9=j5e;var CF={inputTextContainer:"iu",invalid:"lu",disabled:"su",baseInputStyle:"cu",mentionContainer:"nu","live-chat-mention-input":"Ur","live-chat-mention-input__suggestions__list":"du",mentions_mention:"mu",mentions__highlighter:"pu"};var Z5e=e=>R.createElement("svg",c({width:"49",height:"49",viewBox:"0 0 49 49",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M37.96 7C40.4209 7 42.46 9.03906 42.46 11.5V31.75C42.46 34.2812 40.4209 36.25 37.96 36.25H27.835L19.0459 42.8594C18.835 43 18.6943 43 18.5537 43C18.0615 43 17.71 42.7188 17.71 42.1562V36.25H10.96C8.42871 36.25 6.45996 34.2812 6.45996 31.75V11.5C6.45996 9.03906 8.42871 7 10.96 7H37.96ZM40.21 31.75V11.5C40.21 10.3047 39.1553 9.25 37.96 9.25H10.96C9.69434 9.25 8.70996 10.3047 8.70996 11.5V31.75C8.70996 33.0156 9.69434 34 10.96 34H19.96V39.3438L26.4287 34.4922L27.0615 34H37.96C39.1553 34 40.21 33.0156 40.21 31.75ZM24.46 25.5625C25.374 25.5625 26.1475 26.3359 26.1475 27.25C26.1475 28.2344 25.374 28.9375 24.46 28.9375C23.4756 28.9375 22.7725 28.2344 22.7725 27.25C22.7725 26.3359 23.4756 25.5625 24.46 25.5625ZM23.8271 23.875C23.5459 23.875 23.2646 23.6641 23.2646 23.3828L22.7725 15.5078C22.7725 15.1562 22.9834 14.875 23.335 14.875H25.5146C25.8662 14.875 26.0771 15.1562 26.0771 15.5078L25.585 23.3828C25.585 23.6641 25.3037 23.875 25.0225 23.875H23.8271Z"})),xF=Z5e;var W5e=({pageId:e="*",channel:t})=>{var v;let o=fu(),{isModerator:r}=d2(t.channelId),n=J().currentUserId,{channelMembers:i}=ku({channelId:t.channelId,memberships:["member","banned","muted"]}),a=i.find(C=>C.userId===n),[s,l]=useState(void 0),[d,p]=useState(void 0),[u,g]=useState(0),f=useRef(null),y=useRef(null);return useEffect(()=>{var C,h;(C=y.current)!=null&&C.clientHeight&&((h=y.current)==null?void 0:h.clientHeight)>0&&g(y.current.clientHeight-30);},[(v=y.current)==null?void 0:v.clientHeight]),o?a!=null&&a.isBanned?R.createElement(fF,null,R.createElement("div",{className:yt.banStatePanel},R.createElement(xF,{className:yt.commentAltIcon}),R.createElement(S.Heading,null,"You are banned from chat"),R.createElement(S.Body,null,"You won\u2019t be able to participate in this chat until you\u2019ve been unbanned."))):R.createElement(R.Fragment,null,R.createElement(_u,{channel:t,replyMessage:l,pageId:e}),o&&R.createElement(R.Fragment,null,R.createElement("div",{ref:f,className:CF.mentionContainer}),!r&&t.isMuted?R.createElement("div",{className:yt.mutedChannelContainer},R.createElement(M9,{width:20,height:20,className:yt.mutedIcon}),R.createElement(S.Body,null,"This channel has been set to read-only by the channel moderator")):a!=null&&a.isMuted?R.createElement("div",{className:yt.mutedChannelContainer},R.createElement(M9,{width:20,height:20,className:yt.mutedIcon}),R.createElement(S.Body,null,"You\u2019ve been muted by the channel moderator")):null,s&&R.createElement(gF,{replyMessage:s,onDismiss:()=>l(void 0)}),R.createElement("div",{className:yt.notificationPosition,style:{bottom:u}},R.createElement(w9,null)),R.createElement("div",{ref:y},R.createElement(Su,{pageId:e,disabled:!r&&t.isMuted||(a==null?void 0:a.isMuted),channel:t,suggestionRef:f,composeAction:{replyMessage:s,mentionMessage:d,clearReplyMessage:()=>l(void 0),clearMention:()=>p(void 0)}})))):R.createElement(Nu,null)},IF=W5e;var q5e=({pageId:e="*",channel:t})=>t?R.createElement(IF,{channel:t,pageId:e}):R.createElement(Nu,null),MF=q5e;var _9={messageListHeaderWrap:"gu",liveChat:"hu"};var PF=({channelId:e})=>{let{channel:t}=uF({channelId:e}),o="live_chat",{themeStyles:r}=Ye({pageId:o}),n=useRef(null);return R.createElement(nF,null,R.createElement("div",{className:_9.liveChat,ref:n,style:r},R.createElement("div",{className:_9.messageListHeaderWrap},R.createElement(yu,{channel:t,pageId:o})),R.createElement(MF,{channel:t,pageId:o})))};var Ie={storyPreview_title:"fu",contentWrapper:"bu",storyPreviewWrapper:"uu",storyPreview_description:"vu",storyPreviewContainer:"xu",headerContainer:"wu",progressBar:"Br",progressFill:"yu",userInfo:"ku",storyPreviewTitle:"Dr",nameContainer:"ju",hyperLinkContainer:"zu",mediaContainer:"Hr",media:"Xu",avatarContainer:"Lr",imageFit:"Yu",imageCover:"Cu",headerContent:"Au",userInfoContent:"Mu",shadowOverlay:"Su",pulse:"Tr",skeleton:"n",textSkeleton:"Eu",nameSkeleton:"Fu",timeSkeleton:"Iu"};var Y5e=e=>R.createElement("svg",c({width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#D9E5FC"}),R.createElement("path",{d:"M19.8462 12C20.7625 12 21.6413 12.356 22.2893 12.9898C22.9373 13.6235 23.3013 14.4831 23.3013 15.3793C23.3013 16.2756 22.9373 17.1351 22.2893 17.7688C21.6413 18.4026 20.7625 18.7586 19.8462 18.7586C18.9298 18.7586 18.051 18.4026 17.403 17.7688C16.755 17.1351 16.391 16.2756 16.391 15.3793C16.391 14.4831 16.755 13.6235 17.403 12.9898C18.051 12.356 18.9298 12 19.8462 12ZM12.9359 14.4138C13.4887 14.4138 14.0021 14.5586 14.4463 14.8193C14.2982 16.2 14.7128 17.571 15.5618 18.6428C15.0682 19.5697 14.081 20.2069 12.9359 20.2069C12.1504 20.2069 11.3972 19.9017 10.8418 19.3585C10.2864 18.8153 9.97436 18.0786 9.97436 17.3103C9.97436 16.5421 10.2864 15.8054 10.8418 15.2622C11.3972 14.719 12.1504 14.4138 12.9359 14.4138ZM26.7564 14.4138C27.5419 14.4138 28.2951 14.719 28.8505 15.2622C29.4059 15.8054 29.7179 16.5421 29.7179 17.3103C29.7179 18.0786 29.4059 18.8153 28.8505 19.3585C28.2951 19.9017 27.5419 20.2069 26.7564 20.2069C25.6113 20.2069 24.6241 19.5697 24.1305 18.6428C24.9795 17.571 25.3941 16.2 25.246 14.8193C25.6903 14.5586 26.2036 14.4138 26.7564 14.4138ZM13.4295 24.3103C13.4295 22.3117 16.3022 20.6897 19.8462 20.6897C23.3901 20.6897 26.2628 22.3117 26.2628 24.3103V26H13.4295V24.3103ZM8 26V24.5517C8 23.2097 9.86577 22.08 12.3929 21.7517C11.8105 22.4083 11.4551 23.3159 11.4551 24.3103V26H8ZM31.6923 26H28.2372V24.3103C28.2372 23.3159 27.8818 22.4083 27.2994 21.7517C29.8265 22.08 31.6923 23.2097 31.6923 24.5517V26Z",fill:"white"})),Bu=Y5e;var _F=({width:e="100%",height:t="100%"})=>R.createElement("div",{className:Ie.storyPreviewWrapper,style:{width:e,height:t}},R.createElement("div",{className:Ie.storyPreviewContainer},R.createElement("div",{className:Ie.shadowOverlay}),R.createElement("div",{className:Ie.headerContainer},R.createElement("div",{className:Ie.headerContent},R.createElement("div",{className:Ie.userInfo},R.createElement("div",{className:Ie.userInfoContent},R.createElement("div",{className:cr(Ie.avatarContainer,Ie.skeleton)}),R.createElement("div",{className:Ie.textSkeleton},R.createElement("div",{className:cr(Ie.nameSkeleton,Ie.skeleton)}),R.createElement("div",{className:cr(Ie.timeSkeleton,Ie.skeleton)})))))),R.createElement("div",{className:Ie.contentWrapper},R.createElement("div",{className:cr(Ie.mediaContainer,Ie.skeleton)}))));var SF=({mediaType:e,hyperLink:t,width:o="100%",height:r="100%",onPlay:n,onPause:i,avatar:a,title:s,duration:l=5e3,isOfficial:d=!0,imageMode:p})=>{var B,$,G,q;let[u,g]=useState(!0),[f,y]=useState(0),[v,C]=useState([]),h=useRef(null),x=useRef(null),[b,M]=useState(!0),[I,w]=useState(!1),N,T=()=>{g(!0),n&&n();},L=()=>{g(!1),i&&i();},D=()=>{(e==null?void 0:e.type)==="video"&&h.current?(h.current.currentTime=0,h.current.play()):(e==null?void 0:e.type)==="image"&&g(!1);},U=()=>{(e==null?void 0:e.type)==="video"&&h.current&&(h.current.currentTime=0,h.current.play(),y(0));},Z=()=>{u?(L(),(e==null?void 0:e.type)==="video"&&h.current&&h.current.pause()):(T(),(e==null?void 0:e.type)==="video"&&h.current&&h.current.play());};return useEffect(()=>{let z=H=>_(void 0,null,function*(){let F=new Image;F.crossOrigin="Anonymous",F.src=H,F.onload=()=>{let Q=new Mce().getPalette(F,2);if(Q){let k=Q.map(V=>`rgb(${V[0]}, ${V[1]}, ${V[2]})`);C(k),M(!1);}},F.onerror=()=>{console.error("Error loading image for color extraction"),C([]),M(!1);};});return e!=null&&e.url&&(e==null?void 0:e.type)==="image"?z(e.url):(C([]),M(!1)),()=>{C([]),M(!0);}},[e==null?void 0:e.url]),useEffect(()=>(u?N=setInterval(()=>{if((e==null?void 0:e.type)==="video"&&h.current){let z=h.current.currentTime,H=h.current.duration,F=z/H*100;y(F),F>=100&&(clearInterval(N),D());}else (e==null?void 0:e.type)==="image"&&I&&y(z=>z>=100?(clearInterval(N),D(),100):z+100/(l/100));},100):clearInterval(N),()=>{clearInterval(N);}),[u,e,l,I]),b?R.createElement(_F,null):R.createElement("div",{className:Ie.storyPreviewWrapper,style:{width:o,height:r}},R.createElement("div",{className:Ie.storyPreviewContainer},R.createElement("div",{className:Ie.headerContainer},R.createElement("div",{className:Ie.progressBar},R.createElement("div",{className:Ie.progressFill,style:{width:`${f}%`}})),R.createElement("div",{className:Ie.headerContent},R.createElement("div",{className:Ie.userInfo},R.createElement("div",{className:Ie.userInfoContent},R.createElement("div",{className:Ie.avatarContainer},R.createElement(xt,{avatarUrl:a,defaultImage:R.createElement(Bu,null)})),R.createElement(S.BodyBold,{className:Ie.storyPreviewTitle},R.createElement("span",{className:Ie.nameContainer},s," ",d&&R.createElement(p1,{fill:"white"})))),(e==null?void 0:e.type)==="video"&&R.createElement("div",{onClick:Z},u?R.createElement(As,{width:24,height:24}):R.createElement(Mo,{width:24,height:24}))))),R.createElement("div",{className:Ie.contentWrapper},R.createElement("div",{className:Ie.mediaContainer,style:{background:`linear-gradient(
|
|
5327
|
+
`,Xpe=e=>{let t=v4$1();return R.createElement(Jpe,c({xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},e),R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.52453 4C9.52453 4.31559 9.26869 4.57143 8.9531 4.57143C8.63751 4.57143 8.38167 4.31559 8.38167 4V0.571429C8.38167 0.255837 8.63751 0 8.9531 0C9.26869 0 9.52453 0.255837 9.52453 0.571428V4ZM7.23891 5.03082C7.51222 4.87303 7.60586 4.52355 7.44807 4.25024L5.73378 1.28101C5.57599 1.0077 5.22651 0.914056 4.9532 1.07185C4.67989 1.22965 4.58624 1.57913 4.74404 1.85244L6.45832 4.82167C6.61612 5.09498 6.9656 5.18862 7.23891 5.03082ZM5.77458 5.50525C6.04789 5.66304 6.14153 6.01252 5.98374 6.28583C5.82594 6.55914 5.47646 6.65278 5.20315 6.49499L2.23392 4.7807C1.96061 4.62291 1.86697 4.27343 2.02476 4.00012C2.18256 3.72681 2.53204 3.63316 2.80535 3.79096L5.77458 5.50525ZM5.52455 8.00013C5.52455 7.68454 5.26872 7.4287 4.95312 7.4287H1.52455C1.20896 7.4287 0.953125 7.68454 0.953125 8.00013C0.953125 8.31572 1.20896 8.57156 1.52455 8.57156H4.95313C5.26872 8.57156 5.52455 8.31572 5.52455 8.00013ZM5.20327 9.50543C5.47658 9.34764 5.82606 9.44128 5.98385 9.71459C6.14165 9.9879 6.048 10.3374 5.77469 10.4952L2.80546 12.2095C2.53215 12.3673 2.18267 12.2736 2.02488 12.0003C1.86708 11.727 1.96073 11.3775 2.23404 11.2197L5.20327 9.50543ZM7.23874 10.9693C6.96543 10.8115 6.61595 10.9051 6.45815 11.1784L4.74387 14.1476C4.58607 14.4209 4.67971 14.7704 4.95302 14.9282C5.22633 15.086 5.57581 14.9924 5.73361 14.7191L7.44789 11.7498C7.60569 11.4765 7.51205 11.127 7.23874 10.9693ZM8.95292 11.4287C8.63732 11.4287 8.38149 11.6845 8.38149 12.0001V15.4287C8.38149 15.7443 8.63732 16.0001 8.95292 16.0001C9.26851 16.0001 9.52435 15.7443 9.52435 15.4287V12.0001C9.52435 11.6845 9.26851 11.4287 8.95292 11.4287ZM10.6674 5.03064C10.9407 5.18843 11.2901 5.09479 11.4479 4.82148L13.1622 1.85225C13.32 1.57894 13.2264 1.22946 12.9531 1.07166C12.6798 0.913868 12.3303 1.00751 12.1725 1.28082L10.4582 4.25005C10.3004 4.52336 10.394 4.87284 10.6674 5.03064ZM12.7028 6.4947C12.4295 6.65249 12.08 6.55885 11.9222 6.28554C11.7644 6.01223 11.8581 5.66275 12.1314 5.50496L15.1006 3.79067C15.3739 3.63287 15.7234 3.72652 15.8812 3.99983C16.039 4.27314 15.9453 4.62262 15.672 4.78041L12.7028 6.4947ZM12.3816 8C12.3816 8.31559 12.6374 8.57143 12.953 8.57143H16.3816C16.6972 8.57143 16.953 8.31559 16.953 8C16.953 7.68441 16.6972 7.42857 16.3816 7.42857H12.953C12.6374 7.42857 12.3816 7.68441 12.3816 8ZM12.1315 10.4946C11.8582 10.3368 11.7646 9.98737 11.9224 9.71406C12.0801 9.44075 12.4296 9.3471 12.7029 9.5049L15.6722 11.2192C15.9455 11.377 16.0391 11.7265 15.8813 11.9998C15.7235 12.2731 15.3741 12.3667 15.1007 12.2089L12.1315 10.4946ZM10.6673 10.9693C10.3939 11.1271 10.3003 11.4766 10.4581 11.7499L12.1724 14.7191C12.3302 14.9924 12.6797 15.0861 12.953 14.9283C13.2263 14.7705 13.3199 14.421 13.1621 14.1477L11.4478 11.1785C11.29 10.9052 10.9406 10.8115 10.6673 10.9693Z",fill:`url(#paint_${t})`}),R.createElement("defs",null,R.createElement("radialGradient",{id:`paint_${t}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(8.95312 8) scale(8)"},R.createElement("stop",{offset:"0.669733",stopColor:"white"}),R.createElement("stop",{offset:"0.716307",stopColor:"white",stopOpacity:"0.01"}))))},NH=Xpe;var BH={DIRECT_CHAT:2,ONLY_ME_CHAT:1};function o3e(e,t){var i,a,s;if((i=e==null?void 0:e.metadata)!=null&&i.isDirectChat&&(e==null?void 0:e.memberCount)===BH.ONLY_ME_CHAT)return "Me";if(!((a=e==null?void 0:e.metadata)!=null&&a.isDirectChat)&&(e!=null&&e.displayName))return e==null?void 0:e.displayName;let{firstname:o="",lastname:r=""}=(s=t==null?void 0:t.metadata)!=null?s:{},n=trim(`${o}${r}`);return (t==null?void 0:t.displayName)||n||(t==null?void 0:t.userId)||e.channelId}function t9(o){return _(this,arguments,function*({avatarFileId:e,avatarCustomUrl:t}){if(t)return t;if(e){let r=yield FileRepository.getFile(e);return FileRepository.fileUrlWithSize(r.data.fileUrl,"small")}return null})}function r3e(e,t,o){return _(this,null,function*(){var r,n;return (e==null?void 0:e.memberCount)===BH.ONLY_ME_CHAT?t9({avatarCustomUrl:o==null?void 0:o.avatarUrl}):(r=e==null?void 0:e.metadata)!=null&&r.isDirectChat&&(t!=null&&t.avatarUrl)?t9({avatarCustomUrl:t.avatarUrl}):t9({avatarFileId:e==null?void 0:e.avatarFileId,avatarCustomUrl:(n=e==null?void 0:e.metadata)==null?void 0:n.avatarCustomUrl})})}function n3e({channel:e}){var p,u,g;let{currentUserId:t}=ol(),[o,r]=useState(null),n=(p=e==null?void 0:e.metadata)!=null&&p.isDirectChat?((g=(u=e==null?void 0:e.metadata)==null?void 0:u.userIds)!=null?g:[]).find(f=>f!==t):null,i=re(t),a=re(n),s=se({fileId:i==null?void 0:i.avatarFileId}),l=se({fileId:a==null?void 0:a.avatarFileId});return useEffect(()=>{function f(){return _(this,null,function*(){r(null);let y=yield r3e(e,{avatarUrl:(a==null?void 0:a.avatarCustomUrl)||l},{avatarUrl:(i==null?void 0:i.avatarCustomUrl)||s});r(y);})}f();},[a==null?void 0:a.avatarCustomUrl,e,s,i==null?void 0:i.avatarCustomUrl]),{chatName:useMemo(()=>e==null?void 0:o3e(e,a),[e,a]),chatAvatar:o,type:e==null?void 0:e.type}}var LH=n3e;var m2={messageListHeader:"bf",displayName:"uf",memberCount:"vf",memberIcon:"xf",avatar:"wf"};var yu=({channel:e,pageId:t="*"})=>{let o="chat_header",{themeStyles:r}=te({pageId:t,componentId:o}),{chatName:n,chatAvatar:i}=LH({channel:e}),a=fu();return R.createElement("div",{className:m2.messageListHeader,style:r},R.createElement("div",{className:m2.avatar},R.createElement(xt,{avatarUrl:i,defaultImage:R.createElement(TH,null)})),R.createElement("div",null,R.createElement("div",{className:m2.displayName},R.createElement(S.Title,null,n||"Loading...")),R.createElement("div",{className:m2.memberCount},a?R.createElement(R.Fragment,null,R.createElement(SH,{className:m2.memberIcon}),R.createElement(S.Caption,null,ib((e==null?void 0:e.memberCount)||0)," ",`${(e==null?void 0:e.memberCount)||0} ${(e==null?void 0:e.memberCount)===1?"member":"members"}`)):R.createElement(R.Fragment,null,R.createElement(NH,{width:20,height:20}),R.createElement(S.Caption,null,"Waiting for connection...")))))};var AH={spinner:"yf",rotate:"Yr"};var DH=o=>{var r=o,{className:e}=r,t=P(r,["className"]);return R.createElement("svg",c({width:"25",height:"25",xmlns:"http://www.w3.org/2000/svg","aria-label":"Loading...",viewBox:"0 0 100 100",version:"1.1",className:cr(AH.spinner,e)},t),R.createElement("defs",{id:"defs3821"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0",rx:"3",ry:"3",transform:"rotate(-90 50 50)",width:"25",x:"72",y:"47",id:"rect3793"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.08333333333333333",rx:"3",ry:"3",transform:"rotate(-60 50 50)",width:"25",x:"72",y:"47",id:"rect3795"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.16666666666666666",rx:"3",ry:"3",transform:"rotate(-30 50 50)",width:"25",x:"72",y:"47",id:"rect3797"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.25",rx:"3",ry:"3",transform:"rotate(0 50 50)",width:"25",x:"72",y:"47",id:"rect3799"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.3333333333333333",rx:"3",ry:"3",transform:"rotate(30 50 50)",width:"25",x:"72",y:"47",id:"rect3801"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.4166666666666667",rx:"3",ry:"3",transform:"rotate(60 50 50)",width:"25",x:"72",y:"47",id:"rect3803"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.5",rx:"3",ry:"3",transform:"rotate(90 50 50)",width:"25",x:"72",y:"47",id:"rect3805"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.5833333333333334",rx:"3",ry:"3",transform:"rotate(120 50 50)",width:"25",x:"72",y:"47",id:"rect3807"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.6666666666666666",rx:"3",ry:"3",transform:"rotate(150 50 50)",width:"25",x:"72",y:"47",id:"rect3809"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.75",rx:"3",ry:"3",transform:"rotate(180 50 50)",width:"25",x:"72",y:"47",id:"rect3811"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.8333333333333334",rx:"3",ry:"3",transform:"rotate(210 50 50)",width:"25",x:"72",y:"47",id:"rect3813"}),R.createElement("rect",{fill:"#555555",height:"6",opacity:"0.9166666666666666",rx:"3",ry:"3",transform:"rotate(240 50 50)",width:"25",x:"72",y:"47",id:"rect3815"}))};var rr={optionButton:"kf",optionIcon:"jf",reactionIcon:"zf",timestamp:"Xf",messageActionButton:"Yf",messageActionButtonText:"Cf",messageDangerActionButtonText:"Af",copyIcon:"Mf",replyIcon:"Sf",binIcon:"Ef",mentionIcon:"Ff",flagIcon:"If"};var c3e=t=>{var e=P(t,[]);return R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"21",viewBox:"0 0 20 21"},e),R.createElement("path",{d:"M10 8.78369C10.8125 8.78369 11.5 9.47119 11.5 10.2837C11.5 11.1274 10.8125 11.7837 10 11.7837C9.15625 11.7837 8.5 11.1274 8.5 10.2837C8.5 9.47119 9.15625 8.78369 10 8.78369ZM8.5 5.53369C8.5 4.72119 9.15625 4.03369 10 4.03369C10.8125 4.03369 11.5 4.72119 11.5 5.53369C11.5 6.37744 10.8125 7.03369 10 7.03369C9.15625 7.03369 8.5 6.37744 8.5 5.53369ZM8.5 15.0337C8.5 14.2212 9.15625 13.5337 10 13.5337C10.8125 13.5337 11.5 14.2212 11.5 15.0337C11.5 15.8774 10.8125 16.5337 10 16.5337C9.15625 16.5337 8.5 15.8774 8.5 15.0337Z"}))},FH=c3e;var OH={popover:"Rf",fixed:"Uf"};var f3e=i=>{var a=i,{isOpen:e,content:t,fixed:o=!1,children:r}=a,n=P(a,["isOpen","content","fixed","children"]);return R.createElement(Popover,c({containerClassName:cr(OH.popover,{fixed:!1}),isOpen:e,content:t},n),r)},zH=f3e;var y3e=e=>R.createElement("svg",c({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M1.4375 10.5586C0.84375 9.99609 0.84375 9.02734 1.4375 8.46484L6.9375 2.96484C7.875 1.99609 9.5 2.68359 9.5 4.02734V6.52734C13.7812 6.65234 19 7.49609 19 12.8398C19 15.1211 17.7812 17.0273 15.9375 18.2461C14.7812 19.0273 13.25 17.9336 13.6875 16.5586C14.4375 14.1211 14.0625 12.8398 9.5 12.5586V14.9961C9.5 16.3398 7.875 17.0273 6.9375 16.0586L1.4375 10.5586ZM2.5 9.49609L8 14.9961V11.0273C13.125 11.0586 16.6562 12.0586 15.0938 16.9961C16.25 16.2461 17.5 14.9336 17.5 12.8398C17.5 8.37109 12.4688 8.02734 8 8.02734V3.99609L2.5 9.49609Z",fill:"currenColor"})),$H=y3e;var h3e=e=>R.createElement("svg",c({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M16.5312 5.03992C16.7812 5.28992 17 5.75867 17 6.10242V14.4774C17 15.3212 16.3125 15.9774 15.5 15.9774H13V17.4774C13 18.3212 12.3125 18.9774 11.5 18.9774H4.5C3.65625 18.9774 3 18.3212 3 17.4774V7.47742C3 6.66492 3.65625 5.97742 4.5 5.97742H7V4.47742C7 3.66492 7.65625 2.97742 8.5 2.97742H13.875C14.2188 2.97742 14.6875 3.19617 14.9375 3.44617L16.5312 5.03992ZM11.3125 17.4774C11.4062 17.4774 11.5 17.4149 11.5 17.2899V15.9774H8.5C7.65625 15.9774 7 15.3212 7 14.4774V7.47742H4.6875C4.5625 7.47742 4.5 7.57117 4.5 7.66492V17.2899C4.5 17.4149 4.5625 17.4774 4.6875 17.4774H11.3125ZM15.3125 14.4774C15.4062 14.4774 15.5 14.4149 15.5 14.2899V7.97742H12.75C12.3125 7.97742 12 7.66492 12 7.22742V4.47742H8.6875C8.5625 4.47742 8.5 4.57117 8.5 4.66492V14.2899C8.5 14.4149 8.5625 14.4774 8.6875 14.4774H15.3125ZM15.5 6.47742V6.19617C15.5 6.13367 15.4688 6.10242 15.4375 6.07117L13.9062 4.53992C13.875 4.50867 13.8438 4.47742 13.7812 4.47742H13.5V6.47742H15.5Z",fill:"currenColor"})),jH=h3e;var C3e=e=>R.createElement("svg",c({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M12.875 4.375C13.0625 4.375 13.25 4.5625 13.25 4.75V5.125C13.25 5.33594 13.0625 5.5 12.875 5.5H12.5L11.9844 13.4453C11.9609 14.0312 11.4453 14.5 10.8594 14.5H5.11719C4.53125 14.5 4.01562 14.0312 3.99219 13.4453L3.5 5.5H3.125C2.91406 5.5 2.75 5.33594 2.75 5.125V4.75C2.75 4.5625 2.91406 4.375 3.125 4.375H5.04688L5.84375 3.0625C6.03125 2.75781 6.45312 2.5 6.80469 2.5H9.17188C9.52344 2.5 9.94531 2.75781 10.1328 3.0625L10.9297 4.375H12.875ZM6.80469 3.625L6.35938 4.375H9.61719L9.17188 3.625H6.80469ZM10.8594 13.375L11.3516 5.5H4.625L5.11719 13.375H10.8594Z"})),hu=C3e;var v3e=o=>{var r=o,{color:e="#FA4D30"}=r,t=P(r,["color"]);return R.createElement("svg",c({width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),R.createElement("path",{d:"M10.5 2.99609C11.5938 2.99609 12.7812 2.62109 13.9062 2.12109C14.875 1.71484 16 2.43359 16 3.49609V10.9961C16 11.5273 15.7188 11.9961 15.3125 12.2773C14.4688 12.8086 13.125 13.4961 11.2812 13.4961C9.15625 13.4961 7.75 12.4961 6.21875 12.4961C4.46875 12.4961 3.40625 12.8711 2.25 13.4023V15.9961C2.25 16.2773 2 16.4961 1.75 16.4961H1.25C0.96875 16.4961 0.75 16.2773 0.75 15.9961V3.30859C0.28125 3.05859 0 2.55859 0 1.99609C0 1.15234 0.71875 0.464844 1.59375 0.527344C2.3125 0.558594 2.90625 1.12109 2.96875 1.83984C2.96875 1.87109 3 1.96484 3 1.99609C3 2.15234 2.9375 2.37109 2.90625 2.49609C3.59375 2.21484 4.4375 1.99609 5.4375 1.99609C7.5625 1.99609 8.96875 2.99609 10.5 2.99609ZM14.5 10.9961V3.49609C13.5 3.96484 11.8438 4.49609 10.5 4.49609C8.625 4.49609 7.3125 3.49609 5.4375 3.49609C4.125 3.49609 2.90625 4.02734 2.25 4.49609V11.7461C3.21875 11.3086 4.875 10.9961 6.21875 10.9961C8.09375 10.9961 9.40625 11.9961 11.2812 11.9961C12.5938 11.9961 13.8125 11.4961 14.5 10.9961Z",fill:e}))},Cu=v3e;var QH=({isOwner:e,isModerator:t,isFlagged:o,action:r,containerRef:n})=>{let[i,a]=useState(!1),s=useRef(null),l=()=>{r.onCopy&&r.onCopy(),a(!1);},d=()=>{r.onReply&&r.onReply(),a(!1);},p=()=>{r.onDelete&&r.onDelete(),a(!1);},u=()=>{r.onFlag&&r.onFlag(),a(!1);},g=()=>{r.onUnflag&&r.onUnflag(),a(!1);};return R.createElement(R.Fragment,null,R.createElement(zH,{positions:["bottom","top"],onClickOutside:()=>a(!1),isOpen:i,align:"start",parentElement:(n==null?void 0:n.current)||void 0,content:R.createElement(R.Fragment,null,R.createElement("div",{className:rr.messageActionButton,onClick:d},R.createElement("div",{className:rr.messageActionButtonText},R.createElement(S.Body,null,"Reply")),R.createElement($H,{className:rr.replyIcon})),R.createElement("div",{className:rr.messageActionButton,onClick:l},R.createElement("div",{className:rr.messageActionButtonText},R.createElement(S.Body,null,"Copy")),R.createElement(jH,{className:rr.copyIcon})),(t||!e)&&R.createElement("div",{className:rr.messageActionButton,onClick:o?g:u},R.createElement("div",{className:rr.messageDangerActionButtonText},R.createElement(S.Body,null,o?"Unreport":"Report")),R.createElement(Cu,{className:rr.flagIcon})),(e||t)&&R.createElement("div",{className:rr.messageActionButton,onClick:p},R.createElement("div",{className:rr.messageDangerActionButtonText},R.createElement(S.Body,null,"Delete")),R.createElement(hu,{className:rr.binIcon})))},R.createElement("div",{className:rr.optionButton,ref:s,onClick:()=>{a(!i);}},R.createElement(FH,{className:rr.optionIcon}))))};var vu={messageItemContainer:"Bf",userDisplayName:"Df",avatar:"Hf",moderatorBadge:"Lf"};var w3e=({avatarUrl:e,displayName:t,children:o})=>R.createElement("div",{className:vu.messageItemContainer},R.createElement("div",{className:vu.avatar},R.createElement(xt,{avatarUrl:e,defaultImage:R.createElement(cs,null)})),R.createElement("div",null,R.createElement("div",{className:vu.userDisplayName},R.createElement(S.CaptionBold,null,t)),o)),WH=w3e;var Ts={messageBubble:"Cr",messageRepliedBubble:"Tf",messageParentContainer:"Vf",messageParentDisplayName:"qf",messageParentText:"Gf",messageChildContainer:"Jf",messageChildText:"Kf"};var _3e=e=>At({fetcher:MessageRepository.getMessage,params:e,shouldCall:!!e}),qH=_3e;var xu={mentionText:"Nf",hyperlink:"Of"};var KH={hyperlink:"Pf"};var N3e=({linkClassName:e,children:t})=>R.createElement(EZ,{options:{target:"_blank",render:({attributes:o,content:r})=>R.createElement("a",c({className:e||KH.hyperlink},o),r)}},t),o9=N3e;var E3e=({message:e,className:t})=>{var n,i,a;let o=(n=e.metadata)==null?void 0:n.mentioned,r=o==null?void 0:o.sort((s,l)=>s.index-l.index);if(r!=null&&r.length){let s=((i=e.data)==null?void 0:i.text)||"",l=[],d=0;r.forEach(u=>{let g=u.index,f=u.index+u.length+1,y=s.slice(d,g),v=s.slice(g,f);y&&l.push({text:y,isMention:!1}),l.push({text:v,isMention:!0}),d=f;});let p=s.slice(d);return p&&l.push({text:p,isMention:!1}),R.createElement(S.Body,{className:t},l.map((u,g)=>u.isMention?R.createElement("span",{key:g,className:xu.mentionText},u.text):R.createElement("span",{key:g},R.createElement(o9,{linkClassName:xu.hyperlink},u.text))))}return R.createElement(S.Body,{className:t},R.createElement(o9,{linkClassName:xu.hyperlink},(a=e.data)==null?void 0:a.text))},r9=E3e;var B3e=({message:e})=>{var r,n,i;let{currentUserId:t}=J(),o=(n=(r=e.metadata)==null?void 0:r.mentioned)==null?void 0:n.some(a=>a.userId===t||a.type==="channel");if(e&&e.parentId){let a=qH(e.parentId),s=re(a==null?void 0:a.creatorId);return !a||!s?null:R.createElement("div",{className:Ts.messageRepliedBubble},R.createElement("div",{className:Ts.messageParentContainer},R.createElement("div",{className:Ts.messageParentDisplayName},R.createElement(S.BodyBold,null,s.displayName)),R.createElement(S.Body,{className:Ts.messageParentText},(i=a.data)==null?void 0:i.text)),R.createElement("div",{className:Ts.messageChildContainer},R.createElement(r9,{className:Ts.messageChildText,message:e})))}return R.createElement("div",{"data-mentioned":o,className:Ts.messageBubble},R.createElement(r9,{message:e}))},XH=B3e;var d2=e=>{let{client:t}=J();return {isModerator:useMemo(()=>{if(!e)return !1;let r=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").currentUser())||!1,n=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").channel(e))||!1;return r||n},[e])}};var YH=e=>R.createElement("svg",c({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0766 3.686C11.6827 3.45305 12.3021 3.33948 12.9061 3.3335C14.7179 3.31558 16.3937 4.2689 17.1729 5.89093L17.1895 5.92546L17.202 5.9624C17.6819 7.39004 17.5517 8.83248 17.0292 10.1008C16.7326 9.72289 16.3721 9.39755 15.964 9.14106C16.2254 8.26924 16.2483 7.32915 15.9455 6.39919C15.3774 5.24797 14.2332 4.57487 12.9278 4.60378C12.4981 4.61329 12.0515 4.70045 11.6019 4.86956C11.1731 5.08422 10.8198 5.36694 10.5238 5.73675L10.0093 6.37992L9.47729 5.74959C8.38507 4.45434 6.19511 4.17996 4.72103 5.44206C3.63692 6.5523 3.60343 8.44184 4.37082 10.0205C5.31606 11.6937 7.28176 13.3534 9.14794 14.7202L9.15794 14.7275C9.27155 14.8082 9.38012 14.8942 9.48451 14.9769C9.57334 15.0473 9.65915 15.1152 9.74247 15.1755C9.83249 15.2407 9.91925 15.2913 9.98761 15.3273C10.0527 15.3006 10.1319 15.2662 10.2153 15.2157C10.2662 15.1848 10.3205 15.1506 10.3776 15.1136C10.6388 15.4735 10.9562 15.7901 11.3169 16.0503C11.1818 16.1421 11.0508 16.227 10.9257 16.3029C10.8808 16.33 10.8388 16.3568 10.7982 16.3826C10.5856 16.5181 10.4104 16.6296 10.0526 16.6594L9.96091 16.6666L9.87002 16.6497C9.46411 16.575 9.1867 16.3802 8.94112 16.2025C8.80472 16.1038 8.67845 16.0042 8.57194 15.9202C8.48669 15.8529 8.4141 15.7957 8.3591 15.7569L8.35494 15.7536L8.34994 15.7496C6.42696 14.342 4.31681 12.6298 3.18676 10.6147L3.17842 10.5987L3.17008 10.5834C2.21058 8.62424 2.1731 6.14474 3.7738 4.53473L3.79047 4.51786L3.80882 4.50181C5.63352 2.91773 8.30066 3.019 9.97595 4.41428C10.2872 4.13498 10.6374 3.8993 11.0216 3.71089L11.0491 3.69724L11.0766 3.686Z",fill:"currentColor"}),R.createElement("path",{d:"M13.6839 10.0507L13.6839 10.0501L13.6725 10.0522C13.5717 10.0706 13.4807 10.1238 13.4151 10.2025C13.3496 10.2811 13.3137 10.3803 13.3137 10.4827C13.3137 10.4827 13.3137 10.4827 13.3137 10.4827V12.2327H11.5637V12.2322L11.5527 12.2332L11.4964 12.2382L11.4964 12.2376L11.485 12.2397C11.3842 12.2581 11.2932 12.3113 11.2276 12.39C11.1621 12.4686 11.1262 12.5678 11.1262 12.6702H11.1257L11.1267 12.6812L11.1317 12.7375L11.1312 12.7375L11.1333 12.7489C11.1517 12.8496 11.2049 12.9407 11.2835 13.0063C11.3622 13.0718 11.4613 13.1077 11.5637 13.1077C11.5637 13.1077 11.5637 13.1077 11.5638 13.1077H13.3137V14.8577H13.3132L13.3142 14.8687L13.3192 14.925L13.3187 14.925L13.3208 14.9364C13.3392 15.0371 13.3924 15.1282 13.471 15.1938L13.5511 15.0977L13.471 15.1938C13.5497 15.2593 13.6489 15.2952 13.7513 15.2952L13.7513 15.2957L13.7623 15.2947L13.8185 15.2897L13.8186 15.2902L13.83 15.2881C13.9307 15.2697 14.0218 15.2165 14.0873 15.1379C14.1529 15.0592 14.1887 14.96 14.1887 14.8577C14.1887 14.8577 14.1887 14.8576 14.1887 14.8576V13.1077H15.9387V13.1082L15.9498 13.1072L16.006 13.1022L16.0061 13.1027L16.0175 13.1006C16.1182 13.0822 16.2093 13.029 16.2748 12.9504C16.3404 12.8717 16.3763 12.7725 16.3762 12.6701L16.3767 12.6701L16.3757 12.6591L16.3707 12.6028L16.3713 12.6028L16.3692 12.5914C16.3507 12.4907 16.2976 12.3996 16.2189 12.3341C16.1403 12.2685 16.0411 12.2326 15.9387 12.2327C15.9387 12.2327 15.9387 12.2327 15.9387 12.2327H14.1887V10.4827H14.1892L14.1882 10.4716L14.1832 10.4153L14.1838 10.4153L14.1817 10.4039C14.1632 10.3032 14.1101 10.2121 14.0314 10.1466C13.9527 10.081 13.8536 10.0451 13.7512 10.0452V10.0447L13.7402 10.0457L13.6839 10.0507Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.25"}));var bu=o=>_(void 0,[o],function*({reactionName:e,message:t}){let r=t.myReactions||[];if(r.includes(e)){yield ReactionRepository.removeReaction("message",t.messageId,e);return}r.length>0&&(yield ReactionRepository.removeReaction("message",t.messageId,r[0])),yield ReactionRepository.addReaction("message",t.messageId,e);});var a9={quickReactionIcon:"Qf",quickReactionIconContainer:"Ar"};var Iu=({pageId:e="*",componentId:t="*",message:o,onSelectReaction:r})=>{let n="message_quick_reaction",{config:i}=A({pageId:e,componentId:t,elementId:n}),{config:a}=Ci(),s=useCallback(()=>{a&&i.reaction&&a.find(l=>l.name===i.reaction)&&bu({reactionName:i.reaction,message:o}),r&&r();},[a,i,o]);return R.createElement("div",{className:a9.quickReactionIconContainer},R.createElement(YH,{className:a9.quickReactionIcon,onClick:s}))};var s9={reactionPickerContainer:"Wf",reactionButton:"u"};var l9=({message:e,onSelectReaction:t})=>{let{config:o}=Ci(),r=n=>{bu({reactionName:n,message:e});};return o?R.createElement("div",{className:s9.reactionPickerContainer},o.map(n=>{var i;return R.createElement("img",{"data-active":(i=e.myReactions)==null?void 0:i.includes(n.name),key:n.name,src:n.image,alt:n.name,className:s9.reactionButton,onClick:()=>{r(n.name),t&&t(n.name);}})})):null};var wu={reactionContainer:"Zf",reactionPickerWrap:"_f",reactionButton:"eb"};var tF=({pageId:e="*",componentId:t="*",message:o,containerRef:r})=>{let [n,i]=useState(!1),[a,s]=useState(!1),[l,d]=useState(!1);R.useState();let g=useRef(null),f=useRef(a);useEffect(()=>{f.current=a;},[a]);let y=useCallback(()=>{if(!f.current)return;let I=setTimeout(()=>{f.current&&i(!0);},500);return ()=>clearTimeout(I)},[]),v=useRef(l);useEffect(()=>{v.current=l;},[l]);let C=useCallback(()=>{setTimeout(()=>{v.current||i(!1);},1e3);},[]),h=useCallback(I=>{g.current&&!g.current.contains(I.target)&&i(!1);},[]),x=()=>{if(!g.current||!(r!=null&&r.current))return "translate(-50%, 0px)";let I=r.current.getBoundingClientRect(),w=g.current.getBoundingClientRect();if(!I||!w)return "translate(-50%, 0px)";Uv(Number(zv("--asc-spacing-s1").replace("rem","")));let T=w.right-I.right,L=I.left-w.left;return T>0?`translate(calc(-50% - ${T}px), 0px)`:L>0?`translate(calc(-50% + ${L}px), 0px)`:"translate(-50%, 0px)"},b=I=>{h(I);},M=()=>{s(!1),d(!1),i(!1);};return useEffect(()=>(document.addEventListener("mousedown",b),document.addEventListener("touchstart",h),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("touchstart",h);}),[]),useEffect(()=>{a?!n&&y():n&&C();},[a,n]),R.createElement("div",{className:wu.reactionContainer},n&&R.createElement("div",{className:wu.reactionPickerWrap,style:{transform:x()},ref:g,onMouseEnter:()=>d(!0),onMouseLeave:()=>{d(!1);}},R.createElement(l9,{message:o,onSelectReaction:M})),R.createElement("div",{className:wu.reactionButton,onMouseEnter:()=>{s(!0);},onMouseLeave:()=>{s(!1);}},R.createElement(Iu,{message:o,onSelectReaction:M,pageId:e,componentId:t})))};var u2={reactionPreviewContainer:"Mr",reactionIconContainer:"c",reactionIcon:"rb",reactionCount:"ab",fallbackIcon:"ob"};var p9=({message:e,onClick:t})=>{let{config:o}=Ci(),r=e.reactions?useMemo(()=>Object.entries(e.reactions).sort((n,i)=>i[1]-n[1]).filter(n=>n[1]>0).slice(0,3).sort((n,i)=>n[1]-i[1]),[e==null?void 0:e.reactions]):[];return e!=null&&e.reactionsCount?R.createElement("div",{className:u2.reactionPreviewContainer,"data-myreaction":(e==null?void 0:e.myReactions)&&!!(e!=null&&e.myReactions.length),onClick:t},R.createElement("div",{className:u2.reactionIconContainer},r.map(n=>{let i=o.find(a=>a.name===n[0]);return R.createElement(R.Fragment,null,i?R.createElement("img",{className:u2.reactionIcon,src:i.image,alt:i.name}):R.createElement(Hm,{className:u2.fallbackIcon,backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-base-shade3")}))})),R.createElement("div",{className:u2.reactionCount},Dm(e.reactionsCount))):null};var Gn={messageItemContainer:"tb",messageItemContainerInner:"Sr",messageBubbleWrap:"ib",messageReaction:"lb",messageDeletedBubble:"sb",messageOptionsWrap:"cb",binIcon:"nb",optionIcon:"db",flagIcon:"mb",timestamp:"pb",reactionListSheet:"gb",reactionListContainer:"hb",reactionListBackdrop:"fb"};var j3e=({pageId:e="*",componentId:t="*",elementId:o="*",message:r,avatarUrl:n,userDisplayName:i,containerRef:a,action:s})=>{let l=J(),d=r.creatorId===l.currentUserId,{isModerator:p}=d2(r.channelId),[u,g]=useState(void 0);return R.createElement(R.Fragment,null,R.createElement(WH,{avatarUrl:n,displayName:i},R.createElement("div",{className:Gn.messageItemContainerInner,"data-reactions":!!r.reactionsCount},r.isDeleted?R.createElement("div",{className:Gn.messageDeletedBubble},R.createElement(hu,{className:Gn.binIcon}),R.createElement("div",null,R.createElement(S.Body,null,"This message was deleted"))):R.createElement("div",{className:Gn.messageBubbleWrap},R.createElement(XH,{message:r}),R.createElement("div",{className:Gn.messageReaction},R.createElement(p9,{message:r,onClick:()=>g(r)})),s&&R.createElement(QH,{containerRef:a,isOwner:d,isModerator:p,action:s,isFlagged:r.flagCount>0}),R.createElement(tF,{message:r,containerRef:a,pageId:e,componentId:t}),r.flagCount>0&&R.createElement(Cu,{className:Gn.flagIcon}),R.createElement("div",{className:Gn.timestamp},dn(r.createdAt).format("HH:mm A"))))),u&&R.createElement(C1,{isOpen:!0,onClose:()=>g(void 0),className:Gn.reactionListSheet},R.createElement(C1.Container,{className:Gn.reactionListContainer},R.createElement(C1.Header,null),R.createElement(C1.Content,null,R.createElement(Fm,{pageId:e,referenceId:u.messageId,referenceType:"message"}))),R.createElement(C1.Backdrop,{className:Gn.reactionListBackdrop})))},Pu=j3e;var u9=({pageId:e="*",componentId:t="*",message:o,containerRef:r,action:n})=>{let i="sender_message_bubble",a=re(o.creatorId),s=se({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return R.createElement(Pu,{message:o,userDisplayName:a==null?void 0:a.displayName,avatarUrl:s,containerRef:r,action:n,pageId:e,componentId:t,elementId:i})};var g9=({pageId:e="*",componentId:t="*",message:o,containerRef:r,action:n})=>{let i="receiver_message_bubble",{user:a}=fr(o.creatorId),s=nt({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return R.createElement(Pu,{pageId:e,componentId:t,elementId:i,message:o,userDisplayName:a==null?void 0:a.displayName,avatarUrl:s,containerRef:r,action:n})};var f9=(r,n)=>_(void 0,[r,n],function*(e,{onSuccess:t,onError:o}){try{yield MessageRepository.deleteMessage(e),t&&t();}catch(i){o&&o(i);}});var y9=(e,t,o)=>_(void 0,null,function*(){try{yield MessageRepository.flagMessage(e),t&&t();}catch(r){o&&o(r);}});var oF=(e,t,o)=>_(void 0,null,function*(){try{yield MessageRepository.unflagMessage(e),t&&t();}catch(r){o&&o(r);}});var h9={icon:"bb"};var v9=createContext({liveChatNotifications:[],liveChatNotificationFunction:{success:()=>{},error:()=>{},show:()=>{}}}),Y3e=3e3,nF=({children:e})=>{let[t,o]=useState([]),r=i=>o&&o(a=>a.filter(s=>s.id!==i)),n=i=>{let a=Date.now();o(s=>[...s,c({id:a},i)]),setTimeout(()=>{r(a);},(i==null?void 0:i.duration)||Y3e);};return R.createElement(v9.Provider,{value:{liveChatNotifications:t,liveChatNotificationFunction:{success:i=>n(E(c({},i),{icon:R.createElement(u0,{className:h9.icon})})),error:i=>n(E(c({},i),{icon:R.createElement(Y1,{className:h9.icon})})),show:i=>n(i)}}},e)},iF=()=>{let{liveChatNotifications:e}=useContext(v9);return e},g2=()=>{let{liveChatNotificationFunction:e}=useContext(v9);return e};var aF=()=>{let e=g2(),{formatMessage:t}=useIntl();return r=>_(void 0,null,function*(){yield navigator.clipboard.writeText(r),e.success({content:t({id:"livechat.notification.copy.message"})});})};var Z1={infiniteScrollContainer:"ub",loadingIndicatorWrap:"vb",loadingIndicator:"xb",infiniteScrollInner:"wb",customStatusContainer:"yb",iconContainer:"kb"};var _u=({pageId:e="*",channel:t,replyMessage:o})=>{let r="message_list",n=J(),i=useRef(null),[a,s]=useState(void 0),{confirm:l}=Re(),d=g2(),p=aF(),{themeStyles:u}=te({pageId:e,componentId:r}),{messages:g,hasMore:f,loadMore:y,isLoading:v,error:C}=Pd({subChannelId:t.channelId,sortBy:"segmentDesc",limit:10,includeDeleted:!0}),h=g,x=b=>{l({title:"Delete this message?",content:"This message will also be removed from your friend\u2019s devices.",cancelText:"Cancel",okText:"Delete",onOk:()=>f9(b,{onError:()=>d.error({content:"Unable to delete message. Please try again."})})});};return useEffect(()=>{let b=()=>{i.current&&s(i.current.clientHeight);},M=new ResizeObserver(b);return i.current&&M.observe(i.current),()=>{i.current&&M.unobserve(i.current);}},[]),C?R.createElement("div",{className:Z1.customStatusContainer,ref:i,style:u},R.createElement("div",{className:Z1.iconContainer},R.createElement(n5,null)),R.createElement(S.Caption,null,"Couldn't load chat")):R.createElement("div",{className:Z1.infiniteScrollContainer,ref:i,style:u},i.current&&R.createElement(WY,{className:Z1.infiniteScrollInner,scrollableTarget:i.current,scrollThreshold:.7,hasMore:f,next:y,loader:v?R.createElement("div",{className:Z1.loadingIndicatorWrap},R.createElement(DH,{className:Z1.loadingIndicator})):null,inverse:!0,dataLength:h.length,height:i.current.clientHeight},h.map((b,M)=>b.creatorId===n.currentUserId?R.createElement(u9,{message:b,action:t.isMuted?void 0:{onReply:()=>o(b),onDelete:()=>x(b.messageId),onCopy:()=>{var I,w;return ((I=b.data)==null?void 0:I.text)&&p((w=b.data)==null?void 0:w.text)}},key:b.messageId,containerRef:i,pageId:e,componentId:r}):R.createElement(g9,{message:b,action:{onReply:()=>o(b),onDelete:()=>x(b.messageId),onCopy:()=>{var I,w;return ((I=b.data)==null?void 0:I.text)&&p((w=b.data)==null?void 0:w.text)},onFlag:()=>y9(b.messageId,()=>d.success({content:"Message reported"}),()=>d.error({content:"This message failed to be reported. Please try again."})),onUnflag:()=>oF(b.messageId,()=>d.success({content:"Message unreported"}),()=>d.error({content:"This message failed to be unreported. Please try again."}))},key:b.messageId,containerRef:i,pageId:e,componentId:r}))))};var i5e=e=>R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},e),R.createElement("path",{d:"M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"})),lF=i5e;var x9={homeIndicatorContainer:"jb",homeIndicator:"zb"};var Tu=()=>R.createElement("div",{className:x9.homeIndicatorContainer},R.createElement("div",{className:x9.homeIndicator}));var xn={sendButton:"Xb",reactionButton:"Yb",sendButtonContainer:"Cb",composeBarContainer:"Ab",optionContainer:"Mb",composeBar:"Sb",composeBarLoading:"Eb",mentionText:"Fb",editorPlaceholder:"Ib",editorContainer:"Er",editorRoot:"Rb",editorParagraph:"Ub",editorContainer__mentionTextInput_item:"Fr",editorLink:"Ir",userMentionItem__item:"C",allMentionItem__item:"A",userMentionItem__avatar:"Bb",allMentionItem__atSign:"Db",userMentionItem__displayName:"Hb",allMentionItem__displayName:"Lb"};var ku=({channelId:e,memberships:t,search:o,limit:r=20,shouldCall:n=!0})=>{let s=dt({fetcher:ChannelRepository.Membership.searchMembers,params:{channelId:e,search:o||"",memberships:t,limit:r,includeDeleted:!1},shouldCall:!!e&&n}),{items:i}=s,a=P(s,["items"]);return c({channelMembers:i},a)};var f5e=e=>{var o,r;let t=(()=>{switch(screen.orientation.type){case"landscape-primary":case"landscape-secondary":return .5;case"portrait-secondary":case"portrait-primary":return .75;default:return .5}})();return e.visualViewport?((o=e.visualViewport)==null?void 0:o.height)*((r=e.visualViewport)==null?void 0:r.scale)/e.screen.height<t:!1},cF=({commandPriority:e,onEnter:t})=>{let[o]=useLexicalComposerContext();return useEffect(()=>{o.registerCommand(KEY_ENTER_COMMAND,r=>{let n=$getSelection();if(!$isRangeSelection(n)||f5e(window))return !1;let i=r;return i.preventDefault(),i.shiftKey?o.dispatchCommand(INSERT_PARAGRAPH_COMMAND,void 0):(t(),!0)},e);},[o,t]),null};function dF({option:e,isSelected:t,onClick:o,onMouseEnter:r}){return R.createElement("li",{key:e.key,tabIndex:-1,"data-is-selected":t,className:Aa.allMentionItem__item,ref:e.setRefElement,role:"option","aria-selected":t,onMouseEnter:r,onClick:o},R.createElement("div",{className:Aa.allMentionItem__atSign},"@"),R.createElement("p",{className:Aa.allMentionItem__displayName},e.data.displayName))}var L5e=200,A5e=e=>{let[t,o]=useState(null),{isModerator:r}=d2(e||void 0),{channelMembers:n}=ku({search:t,channelId:e,memberships:["member"],limit:20}),i=s=>{o(s);};return {suggestions:useMemo(()=>{let s=n.map(({user:l,userId:d})=>({userId:(l==null?void 0:l.userId)||d,displayName:l==null?void 0:l.displayName}));return r&&(t===""||/^al*l*$/i.test(t||""))?[{userId:"all",displayName:"All"},...s]:s},[r,n]),queryString:t,onQueryChange:i}},D5e=[AutoLinkNode,LinkNode,Ui],Su=({pageId:e="*",channel:t,composeAction:{replyMessage:o,mentionMessage:r,clearReplyMessage:n,clearMention:i}})=>{var M;let a="message_composer",s=useRef(null),l=useRef(null),{themeStyles:d,uiReference:p,config:u,accessibilityId:g}=te({pageId:e,componentId:a}),{confirm:f}=Re(),y=g2(),{onQueryChange:v,suggestions:C}=A5e(t.channelId),{mutateAsync:h}=useMutation({mutationFn:I=>MessageRepository.createMessage(I),onSuccess:()=>{var I;(I=l.current)==null||I.update(()=>{$getRoot().clear();}),n&&n();},onError:I=>{let w=I.message,N="Your message wasn't sent. Please try again.";w==="Amity SDK (400308): Text contain blocked word"?N="Your message wasn't sent as it contains a blocked word.":w==="Amity SDK (400309): Data contain link that is not in whitelist"?N="Your message wasn\u2019t sent as it contained a link that\u2019s not allowed.":w==="Amity SDK (400302): User is muted"&&(N="User is muted"),y.error({content:N});}}),x=()=>{if(!t||!l.current)return;let{mentioned:I,mentionees:w,text:N}=il(l.current);if((N==null?void 0:N.trim().length)!==0){if(N.trim().length>(typeof(u==null?void 0:u.message_limit)=="number"?u==null?void 0:u.message_limit:L5e)){f({title:"Unable to send message",content:"Your message is too long. Please shorten your message and try again.",okText:"Ok"});return}h({tags:[],subChannelId:t.channelId,data:{text:N.trim()},dataType:"text",mentionees:w,metadata:{mentioned:I},parentId:(o==null?void 0:o.messageId)||void 0});}},b=al({namespace:p,theme:{root:xn.editorRoot,placeholder:xn.editorPlaceholder,paragraph:xn.editorParagraph,link:xn.editorLink},nodes:D5e});return R.createElement("div",{className:xn.composeBarContainer,"data-qa-anchor":g,style:d},R.createElement("div",{className:xn.composeBar},R.createElement("div",{ref:s,className:xn.optionContainer}),R.createElement("div",{className:xn.editorContainer},R.createElement(LexicalComposer,{initialConfig:b},R.createElement(RichTextPlugin,{contentEditable:R.createElement(ContentEditable,null),placeholder:(M=R.createElement("span",{className:xn.editorPlaceholder},u.placeholder_text))!=null?M:null,ErrorBoundary:S5e}),R.createElement(HistoryPlugin,null),R.createElement(AutoFocusPlugin,null),R.createElement(ll,null),R.createElement(sl,null),R.createElement(EditorRefPlugin,{editorRef:l}),R.createElement(cF,{onEnter:x,commandPriority:COMMAND_PRIORITY_LOW}),R.createElement(ml,{suggestions:C,getSuggestionId:I=>I.userId,onQueryChange:v,$createNode:I=>La({text:`@${I.displayName||""}`,data:I}),menuRenderFn:(I,{options:w,selectedIndex:N,setHighlightedIndex:T,selectOptionAndCleanUp:L})=>!s.current||w.length===0?null:Rv.createPortal(R.createElement(R.Fragment,null,w.map((D,U)=>D.data.userId==="all"?R.createElement(dF,{isSelected:N===U,onClick:()=>{T(U),L(D);},onMouseEnter:()=>{T(U);},key:D.key,option:D}):R.createElement(Da,{isSelected:N===U,onClick:()=>{T(U),L(D);},onMouseEnter:()=>{T(U);},key:D.key,option:D}))),s.current),commandPriority:COMMAND_PRIORITY_HIGH}))),R.createElement("div",{className:xn.sendButtonContainer},R.createElement(lF,{className:xn.sendButton,onClick:()=>x()}))),R.createElement(Tu,null))};var uF=({channelId:e})=>{let r=_n({fetcher:ChannelRepository.getChannel,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return c({channel:t},o)};var yt={composeBarContainer:"Tb",composeBar:"Vb",textInputContainer:"qb",composeBarLoading:"Gb",replyPlaceholderContainer:"Jb",replyAvatar:"Kb",replyProfile:"Nb",replyProfileName:"Ob",replyProfileMessage:"Pb",replyDismiss:"Qb",notificationPosition:"Wb",messageListPlaceholder:"Zb",mutedChannelContainer:"_b",mutedIcon:"eu",commentAltIcon:"ru",banStatePanel:"au"};var O5e=({children:e})=>R.createElement(R.Fragment,null,R.createElement("div",{className:yt.messageListPlaceholder},e),R.createElement("div",{className:yt.composeBarContainer},R.createElement("div",{className:yt.composeBar},R.createElement("div",{className:yt.textInputContainer},R.createElement("div",{className:yt.composeBarLoading},R.createElement(J5,{width:20,height:20}),R.createElement("span",null,R.createElement(S.Body,null,"Loading chat..."))))),R.createElement(Tu,null))),Nu=O5e;var gF=({replyMessage:e,onDismiss:t})=>{var r,n;let o=re(e.creatorId);return o?R.createElement("div",{className:yt.replyPlaceholderContainer},R.createElement("div",{className:yt.replyAvatar},R.createElement(xt,{avatarUrl:(r=o.avatar)==null?void 0:r.fileUrl,defaultImage:R.createElement(cs,null)})),R.createElement("div",{className:yt.replyProfile},R.createElement("div",{className:yt.replyProfileName},`Replying to ${o.displayName}`),R.createElement("div",{className:yt.replyProfileMessage},(n=e.data)==null?void 0:n.text)),R.createElement("div",{className:yt.replyDismiss},R.createElement(R1,{onClick:t,width:"20",height:"20"}))):null};var U5e=({children:e})=>R.createElement("div",{className:yt.messageListPlaceholder},e),fF=U5e;var I9={notifications:"ou",notificationContainer:"tu",appear:"Rr"};var yF=({className:e,content:t,icon:o})=>R.createElement("div",{className:cr(I9.notificationContainer,e)},o,R.createElement(S.Body,null,t)),w9=()=>{let e=iF();return R.createElement("div",{className:I9.notifications},e.map(t=>R.createElement(yF,E(c({},t),{key:t.id}))))};var j5e=e=>R.createElement("svg",c({width:"23",height:"21",viewBox:"0 0 23 21",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M21.7988 17.7605C22.0449 17.9363 22.1152 18.2878 21.9043 18.5339L21.5527 18.9558C21.3418 19.2019 20.9902 19.2722 20.7793 19.0613L-0.244141 2.60815C-0.490234 2.43237 -0.560547 2.08081 -0.349609 1.83472L0.00195312 1.37769C0.212891 1.16675 0.564453 1.09644 0.810547 1.30737L21.7988 17.7605ZM12.5527 7.49487C13.3262 7.91675 13.8887 8.69019 14.0645 9.53394L11.5684 7.60034C11.8496 7.35425 12.2363 7.31909 12.5527 7.49487ZM13.6074 6.15894C13.2207 5.91284 13.1152 5.3855 13.3613 4.99878C13.6074 4.61206 14.1348 4.47144 14.5215 4.71753C16.3848 5.91284 17.5449 7.9519 17.5449 10.1667C17.5449 10.8347 17.4395 11.4324 17.2637 12.03L15.7871 10.8699C15.8223 10.6589 15.8574 10.4128 15.8574 10.1667C15.8574 8.54956 15.0137 7.03784 13.6074 6.15894ZM15.4707 3.31128C15.084 3.06519 14.9785 2.53784 15.2246 2.11597C15.5059 1.72925 16.0332 1.62378 16.4199 1.86987C19.2324 3.73315 20.9199 6.8269 20.9199 10.1667C20.9199 11.6082 20.6035 12.9441 20.041 14.2097L18.6699 13.1199C19.0215 12.2058 19.1973 11.2214 19.1973 10.1667C19.1973 7.42456 17.8262 4.823 15.4707 3.31128ZM9.66992 4.29565V6.08862L7.49023 4.40112L8.22852 3.698C8.36914 3.52222 8.58008 3.41675 8.79102 3.41675C9.24805 3.41675 9.66992 3.76831 9.66992 4.29565ZM7.98242 14.0691V11.1863L9.66992 12.5222V16.073C9.66992 16.6003 9.24805 16.9167 8.79102 16.9167C8.58008 16.9167 8.36914 16.8464 8.22852 16.6707L5.09961 13.5417H1.51367C1.02148 13.5417 0.669922 13.1902 0.669922 12.698V7.6355C0.669922 7.17847 1.02148 6.79175 1.51367 6.79175H2.35742L4.50195 8.47925H2.35742V11.8542H5.76758L7.98242 14.0691Z"})),M9=j5e;var CF={inputTextContainer:"iu",invalid:"lu",disabled:"su",baseInputStyle:"cu",mentionContainer:"nu","live-chat-mention-input":"Ur","live-chat-mention-input__suggestions__list":"du",mentions_mention:"mu",mentions__highlighter:"pu"};var Z5e=e=>R.createElement("svg",c({width:"49",height:"49",viewBox:"0 0 49 49",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("path",{d:"M37.96 7C40.4209 7 42.46 9.03906 42.46 11.5V31.75C42.46 34.2812 40.4209 36.25 37.96 36.25H27.835L19.0459 42.8594C18.835 43 18.6943 43 18.5537 43C18.0615 43 17.71 42.7188 17.71 42.1562V36.25H10.96C8.42871 36.25 6.45996 34.2812 6.45996 31.75V11.5C6.45996 9.03906 8.42871 7 10.96 7H37.96ZM40.21 31.75V11.5C40.21 10.3047 39.1553 9.25 37.96 9.25H10.96C9.69434 9.25 8.70996 10.3047 8.70996 11.5V31.75C8.70996 33.0156 9.69434 34 10.96 34H19.96V39.3438L26.4287 34.4922L27.0615 34H37.96C39.1553 34 40.21 33.0156 40.21 31.75ZM24.46 25.5625C25.374 25.5625 26.1475 26.3359 26.1475 27.25C26.1475 28.2344 25.374 28.9375 24.46 28.9375C23.4756 28.9375 22.7725 28.2344 22.7725 27.25C22.7725 26.3359 23.4756 25.5625 24.46 25.5625ZM23.8271 23.875C23.5459 23.875 23.2646 23.6641 23.2646 23.3828L22.7725 15.5078C22.7725 15.1562 22.9834 14.875 23.335 14.875H25.5146C25.8662 14.875 26.0771 15.1562 26.0771 15.5078L25.585 23.3828C25.585 23.6641 25.3037 23.875 25.0225 23.875H23.8271Z"})),xF=Z5e;var W5e=({pageId:e="*",channel:t})=>{var v;let o=fu(),{isModerator:r}=d2(t.channelId),n=J().currentUserId,{channelMembers:i}=ku({channelId:t.channelId,memberships:["member","banned","muted"]}),a=i.find(C=>C.userId===n),[s,l]=useState(void 0),[d,p]=useState(void 0),[u,g]=useState(0),f=useRef(null),y=useRef(null);return useEffect(()=>{var C,h;(C=y.current)!=null&&C.clientHeight&&((h=y.current)==null?void 0:h.clientHeight)>0&&g(y.current.clientHeight-30);},[(v=y.current)==null?void 0:v.clientHeight]),o?a!=null&&a.isBanned?R.createElement(fF,null,R.createElement("div",{className:yt.banStatePanel},R.createElement(xF,{className:yt.commentAltIcon}),R.createElement(S.Heading,null,"You are banned from chat"),R.createElement(S.Body,null,"You won\u2019t be able to participate in this chat until you\u2019ve been unbanned."))):R.createElement(R.Fragment,null,R.createElement(_u,{channel:t,replyMessage:l,pageId:e}),o&&R.createElement(R.Fragment,null,R.createElement("div",{ref:f,className:CF.mentionContainer}),!r&&t.isMuted?R.createElement("div",{className:yt.mutedChannelContainer},R.createElement(M9,{width:20,height:20,className:yt.mutedIcon}),R.createElement(S.Body,null,"This channel has been set to read-only by the channel moderator")):a!=null&&a.isMuted?R.createElement("div",{className:yt.mutedChannelContainer},R.createElement(M9,{width:20,height:20,className:yt.mutedIcon}),R.createElement(S.Body,null,"You\u2019ve been muted by the channel moderator")):null,s&&R.createElement(gF,{replyMessage:s,onDismiss:()=>l(void 0)}),R.createElement("div",{className:yt.notificationPosition,style:{bottom:u}},R.createElement(w9,null)),R.createElement("div",{ref:y},R.createElement(Su,{pageId:e,disabled:!r&&t.isMuted||(a==null?void 0:a.isMuted),channel:t,suggestionRef:f,composeAction:{replyMessage:s,mentionMessage:d,clearReplyMessage:()=>l(void 0),clearMention:()=>p(void 0)}})))):R.createElement(Nu,null)},IF=W5e;var q5e=({pageId:e="*",channel:t})=>t?R.createElement(IF,{channel:t,pageId:e}):R.createElement(Nu,null),MF=q5e;var _9={messageListHeaderWrap:"gu",liveChat:"hu"};var PF=({channelId:e})=>{let{channel:t}=uF({channelId:e}),o="live_chat",{themeStyles:r}=Ye({pageId:o}),n=useRef(null);return R.createElement(nF,null,R.createElement("div",{className:_9.liveChat,ref:n,style:r},R.createElement("div",{className:_9.messageListHeaderWrap},R.createElement(yu,{channel:t,pageId:o})),R.createElement(MF,{channel:t,pageId:o})))};var Ie={storyPreview_title:"fu",contentWrapper:"bu",storyPreviewWrapper:"uu",storyPreview_description:"vu",storyPreviewContainer:"xu",headerContainer:"wu",progressBar:"Br",progressFill:"yu",userInfo:"ku",storyPreviewTitle:"Dr",nameContainer:"ju",hyperLinkContainer:"zu",mediaContainer:"Hr",media:"Xu",avatarContainer:"Lr",imageFit:"Yu",imageCover:"Cu",headerContent:"Au",userInfoContent:"Mu",shadowOverlay:"Su",pulse:"Tr",skeleton:"n",textSkeleton:"Eu",nameSkeleton:"Fu",timeSkeleton:"Iu"};var Y5e=e=>R.createElement("svg",c({width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),R.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#D9E5FC"}),R.createElement("path",{d:"M19.8462 12C20.7625 12 21.6413 12.356 22.2893 12.9898C22.9373 13.6235 23.3013 14.4831 23.3013 15.3793C23.3013 16.2756 22.9373 17.1351 22.2893 17.7688C21.6413 18.4026 20.7625 18.7586 19.8462 18.7586C18.9298 18.7586 18.051 18.4026 17.403 17.7688C16.755 17.1351 16.391 16.2756 16.391 15.3793C16.391 14.4831 16.755 13.6235 17.403 12.9898C18.051 12.356 18.9298 12 19.8462 12ZM12.9359 14.4138C13.4887 14.4138 14.0021 14.5586 14.4463 14.8193C14.2982 16.2 14.7128 17.571 15.5618 18.6428C15.0682 19.5697 14.081 20.2069 12.9359 20.2069C12.1504 20.2069 11.3972 19.9017 10.8418 19.3585C10.2864 18.8153 9.97436 18.0786 9.97436 17.3103C9.97436 16.5421 10.2864 15.8054 10.8418 15.2622C11.3972 14.719 12.1504 14.4138 12.9359 14.4138ZM26.7564 14.4138C27.5419 14.4138 28.2951 14.719 28.8505 15.2622C29.4059 15.8054 29.7179 16.5421 29.7179 17.3103C29.7179 18.0786 29.4059 18.8153 28.8505 19.3585C28.2951 19.9017 27.5419 20.2069 26.7564 20.2069C25.6113 20.2069 24.6241 19.5697 24.1305 18.6428C24.9795 17.571 25.3941 16.2 25.246 14.8193C25.6903 14.5586 26.2036 14.4138 26.7564 14.4138ZM13.4295 24.3103C13.4295 22.3117 16.3022 20.6897 19.8462 20.6897C23.3901 20.6897 26.2628 22.3117 26.2628 24.3103V26H13.4295V24.3103ZM8 26V24.5517C8 23.2097 9.86577 22.08 12.3929 21.7517C11.8105 22.4083 11.4551 23.3159 11.4551 24.3103V26H8ZM31.6923 26H28.2372V24.3103C28.2372 23.3159 27.8818 22.4083 27.2994 21.7517C29.8265 22.08 31.6923 23.2097 31.6923 24.5517V26Z",fill:"white"})),Bu=Y5e;var _F=({width:e="100%",height:t="100%"})=>R.createElement("div",{className:Ie.storyPreviewWrapper,style:{width:e,height:t}},R.createElement("div",{className:Ie.storyPreviewContainer},R.createElement("div",{className:Ie.shadowOverlay}),R.createElement("div",{className:Ie.headerContainer},R.createElement("div",{className:Ie.headerContent},R.createElement("div",{className:Ie.userInfo},R.createElement("div",{className:Ie.userInfoContent},R.createElement("div",{className:cr(Ie.avatarContainer,Ie.skeleton)}),R.createElement("div",{className:Ie.textSkeleton},R.createElement("div",{className:cr(Ie.nameSkeleton,Ie.skeleton)}),R.createElement("div",{className:cr(Ie.timeSkeleton,Ie.skeleton)})))))),R.createElement("div",{className:Ie.contentWrapper},R.createElement("div",{className:cr(Ie.mediaContainer,Ie.skeleton)}))));var SF=({mediaType:e,hyperLink:t,width:o="100%",height:r="100%",onPlay:n,onPause:i,avatar:a,title:s,duration:l=5e3,isOfficial:d=!0,imageMode:p})=>{var B,$,G,q;let[u,g]=useState(!0),[f,y]=useState(0),[v,C]=useState([]),h=useRef(null),x=useRef(null),[b,M]=useState(!0),[I,w]=useState(!1),N,T=()=>{g(!0),n&&n();},L=()=>{g(!1),i&&i();},D=()=>{(e==null?void 0:e.type)==="video"&&h.current?(h.current.currentTime=0,h.current.play()):(e==null?void 0:e.type)==="image"&&g(!1);},U=()=>{(e==null?void 0:e.type)==="video"&&h.current&&(h.current.currentTime=0,h.current.play(),y(0));},Z=()=>{u?(L(),(e==null?void 0:e.type)==="video"&&h.current&&h.current.pause()):(T(),(e==null?void 0:e.type)==="video"&&h.current&&h.current.play());};return useEffect(()=>{let z=H=>_(void 0,null,function*(){let F=new Image;F.crossOrigin="Anonymous",F.src=H,F.onload=()=>{let Q=new Mce().getPalette(F,2);if(Q){let k=Q.map(V=>`rgb(${V[0]}, ${V[1]}, ${V[2]})`);C(k),M(!1);}},F.onerror=()=>{console.error("Error loading image for color extraction"),C([]),M(!1);};});return e!=null&&e.url&&(e==null?void 0:e.type)==="image"?z(e.url):(C([]),M(!1)),()=>{C([]),M(!0);}},[e==null?void 0:e.url]),useEffect(()=>(u?N=setInterval(()=>{if((e==null?void 0:e.type)==="video"&&h.current){let z=h.current.currentTime,H=h.current.duration,F=z/H*100;y(F),F>=100&&(clearInterval(N),D());}else (e==null?void 0:e.type)==="image"&&I&&y(z=>z>=100?(clearInterval(N),D(),100):z+100/(l/100));},100):clearInterval(N),()=>{clearInterval(N);}),[u,e,l,I]),b?R.createElement(_F,null):R.createElement("div",{className:Ie.storyPreviewWrapper,style:{width:o,height:r}},R.createElement("div",{className:Ie.storyPreviewContainer},R.createElement("div",{className:Ie.headerContainer},R.createElement("div",{className:Ie.progressBar},R.createElement("div",{className:Ie.progressFill,style:{width:`${f}%`}})),R.createElement("div",{className:Ie.headerContent},R.createElement("div",{className:Ie.userInfo},R.createElement("div",{className:Ie.userInfoContent},R.createElement("div",{className:Ie.avatarContainer},R.createElement(xt,{avatarUrl:a,defaultImage:R.createElement(Bu,null)})),R.createElement(S.BodyBold,{className:Ie.storyPreviewTitle},R.createElement("span",{className:Ie.nameContainer},s," ",d&&R.createElement(p1,{fill:"white"})))),(e==null?void 0:e.type)==="video"&&R.createElement("div",{onClick:Z},u?R.createElement(As,{width:24,height:24}):R.createElement(Mo,{width:24,height:24}))))),R.createElement("div",{className:Ie.contentWrapper},R.createElement("div",{className:Ie.mediaContainer,style:{background:`linear-gradient(
|
|
5328
5328
|
180deg,
|
|
5329
5329
|
${v[0]||"#000"} 0%,
|
|
5330
5330
|
${v[1]||"#000"} 100%
|
|
5331
|
-
)`}},(e==null?void 0:e.type)==="video"?R.createElement("video",{ref:h,src:e.url,className:Ie.media,loop:!0,autoPlay:!0,muted:!0,onEnded:U}):R.createElement(R.Fragment,null,!b&&v.length>0&&R.createElement("img",{ref:x,src:e==null?void 0:e.url,alt:"Story",onLoad:()=>w(!0),className:cr(Ie.media,{[Ie.imageFit]:p==="fit",[Ie.imageCover]:p==="fill"})})),R.createElement("div",{className:Ie.shadowOverlay})),R.createElement("div",{className:Ie.hyperLinkContainer},(($=(B=t[0])==null?void 0:B.data)==null?void 0:$.url)&&R.createElement(
|
|
5331
|
+
)`}},(e==null?void 0:e.type)==="video"?R.createElement("video",{ref:h,src:e.url,className:Ie.media,loop:!0,autoPlay:!0,muted:!0,onEnded:U}):R.createElement(R.Fragment,null,!b&&v.length>0&&R.createElement("img",{ref:x,src:e==null?void 0:e.url,alt:"Story",onLoad:()=>w(!0),className:cr(Ie.media,{[Ie.imageFit]:p==="fit",[Ie.imageCover]:p==="fill"})})),R.createElement("div",{className:Ie.shadowOverlay})),R.createElement("div",{className:Ie.hyperLinkContainer},(($=(B=t[0])==null?void 0:B.data)==null?void 0:$.url)&&R.createElement(yi,{href:t[0].data.url.startsWith("http")?t[0].data.url:`https://${t[0].data.url}`,target:"_blank",rel:"noopener noreferrer"},R.createElement(pw,{lines:1},R.createElement("span",null,((q=(G=t[0])==null?void 0:G.data)==null?void 0:q.customText)||t[0].data.url)))))))};var Ge={containerWrapper:"Ru",storyPreviewAvatar:"Uu",storyPreviewContainer:"d",thumbnailMedia:"M",thumbnailInfo:"Bu",userInfo:"Du",storyPreviewTitle:"Hu",nameContainer:"Lu",hyperLinkContainer:"Tu",hyperlink__icon:"Vu",hyperlink:"qu",thumbnailImage:"Gu",imageFit:"Ju",imageCover:"Ku",hyperlinkPosition:"Nu",hyperlinkIcon:"Ou",hyperlinkText:"Pu",header:"Qu",skeleton:"Wu",pulse:"Vr",avatarSkeleton:"Zu",textSkeleton:"_u",nameSkeleton:"e1",timeSkeleton:"r1",skeletonContainer:"a1",shadowOverlay:"o1",fallbackThumbnail:"t1"};var NF=()=>R.createElement("div",{className:cr(Ge.skeletonContainer,Ge.skeleton)},R.createElement("div",{className:Ge.header},R.createElement("div",{className:cr(Ge.avatarSkeleton,Ge.skeleton)}),R.createElement("div",{className:Ge.textSkeleton},R.createElement("div",{className:cr(Ge.nameSkeleton,Ge.skeleton)}),R.createElement("div",{className:cr(Ge.timeSkeleton,Ge.skeleton)}))));var BF=({thumbnailUrl:e,hyperLink:t,avatar:o,title:r,isOfficial:n=!1,onClick:i,imageMode:a="fill"})=>{var v,C,h,x;let[s,l]=useState(""),[d,p]=useState(!1),[u,g]=useState(!0),f=useRef(null);useEffect(()=>{if(g(!0),p(!1),!e){l(""),p(!0),g(!1);return}let b=new Image;return b.crossOrigin="anonymous",b.src=e,b.onload=()=>{if(f.current){let M=new Mce;try{let I=M.getPalette(b,2);if(I){let w=`linear-gradient(
|
|
5332
5332
|
180deg,
|
|
5333
5333
|
rgb(${I[0].join(",")}) 0%,
|
|
5334
5334
|
rgb(${I[1].join(",")}) 100%
|
|
5335
|
-
)`;l(w);}}catch(I){console.error("Error extracting colors:",I),l("");}}g(!1);},b.onerror=()=>{p(!0),g(!1);},()=>{b.onload=null,b.onerror=null;}},[e]);let y=()=>d||!e?R.createElement("div",{className:Ge.fallbackThumbnail},R.createElement(S.Body,null,"No Image Available")):R.createElement(R.Fragment,null,R.createElement("img",{ref:f,src:e,alt:"Story Thumbnail",className:cr(Ge.thumbnailImage,{[Ge.imageFit]:a==="fit",[Ge.imageCover]:a==="fill"}),crossOrigin:"anonymous"}),R.createElement("div",{className:Ge.shadowOverlay}));return u?R.createElement(NF,null):R.createElement("div",{className:Ge.containerWrapper,onClick:i,style:{background:s||"#000"}},R.createElement("div",{className:Ge.storyPreviewContainer},R.createElement("div",{className:Ge.thumbnailMedia},y()),R.createElement("div",{className:Ge.thumbnailInfo},R.createElement("div",{className:Ge.userInfo},R.createElement("div",{className:Ge.storyPreviewAvatar},R.createElement(xt,{avatarUrl:o,defaultImage:R.createElement(Bu,null)})),R.createElement(S.BodyBold,{className:Ge.storyPreviewTitle},R.createElement("span",{className:Ge.nameContainer},R.createElement(pw,{lines:1},R.createElement("span",null,r))," ",n&&R.createElement(p1,{width:12,height:12,fill:"white"}))))),((C=(v=t[0])==null?void 0:v.data)==null?void 0:C.url)&&R.createElement("a",{href:t[0].data.url,className:cr(Ge.hyperlink,Ge.hyperlinkPosition)},R.createElement(bc,{className:Ge.hyperlinkIcon}),R.createElement("span",{className:Ge.hyperlinkText},((x=(h=t[0])==null?void 0:h.data)==null?void 0:x.customText)||t[0].data.url))))};var sue=({type:e,targetId:t})=>{let o="story_page",{AmityStoryViewPageBehavior:r}=bt(),{onBack:n,goToViewStoryPage:i,goToDraftStoryPage:a,onClickCommunity:s}=Be();return e==="communityFeed"?R.createElement(ru,{pageId:o,communityId:t,onBack:n,onClose:l=>s(l),onSwipeDown:l=>s(l),onClickCommunity:l=>s(l),goToDraftStoryPage:(l,d,p,u)=>a(l,d,p,u)}):e==="globalFeed"?R.createElement(nu,{pageId:o,targetId:t,onChangePage:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onClose:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onSwipeDown:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onClickStory:l=>i({storyType:"globalFeed",targetId:l,targetType:"community"}),goToDraftStoryPage:(l,d,p,u)=>a(l,d,p,u),onClickCommunity:l=>s(l)}):null},S9=sue;var Ni={selectStoryTargetPage:"i1",selectStoryTargetPage__topBar:"l1",selectStoryTargetPage__timeline:"s1",selectStoryTargetPage__line:"c1",selectStoryTargetPage__myCommunities__container:"n1",selectStoryTargetPage__myCommunities:"d1",selectStoryTargetPage__communityAvatar:"m1",selectStoryTargetPage__closeButton:"p1",selectStoryTargetPage__title:"g1"};function N9(){let e="select_story_target_page",{themeStyles:t}=Ye({pageId:e}),{onBack:o}=Be(),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}}),{AmityStoryTargetSelectionPage:s}=bt(),{file:l,setFile:d}=pi(),[p,u]=useState(null),[g,f]=useState(null),y=h=>{f(h);},v=h=>{h&&h.length>0&&g&&d(h[0]);},C=r.map(h=>R.createElement(FileTrigger,{key:h.communityId,onSelect:v},R.createElement(O,{onPress:()=>y(h.communityId)},R.createElement("div",{className:Ni.selectStoryTargetPage__myCommunities},R.createElement("div",{className:Ni.selectStoryTargetPage__communityAvatar},R.createElement(jr,{pageId:e,community:h})),R.createElement(da,{pageId:e,community:h}),R.createElement("div",null,h.isOfficial&&R.createElement(S1,null),!h.isPublic&&R.createElement(N1,null))))));return So({onIntersect:()=>{n&&a===!1&&i();},node:p}),useEffect(()=>{var h;l&&((h=s==null?void 0:s.goToStoryCreationPage)==null||h.call(s,{targetId:g,targetType:"community",mediaType:l&&(l!=null&&l.type.includes("image"))?{type:"image",url:URL.createObjectURL(l)}:{type:"video",url:URL.createObjectURL(l)},storyType:"globalFeed"}));},[l]),R.createElement("div",{className:Ni.selectStoryTargetPage,style:t},R.createElement("div",{className:Ni.selectStoryTargetPage__topBar},R.createElement(kr,{imgClassName:Ni.selectStoryTargetPage__closeButton,pageId:e,onPress:o}),R.createElement(F1,{pageId:e,titleClassName:Ni.selectStoryTargetPage__title}),R.createElement("div",null)),R.createElement("div",{className:Ni.selectStoryTargetPage__line}),R.createElement("div",{className:Ni.selectStoryTargetPage__myCommunities},"My Communities"),R.createElement("div",{className:Ni.selectStoryTargetPage__myCommunities__container},C),R.createElement("div",{ref:h=>u(h)}))}var Ei={selectPostTargetPage:"h1",selectPostTargetPage__topBar:"f1",selectPostTargetPage__timeline:"b1",selectPostTargetPage__line:"u1",selectPostTargetPage__myCommunities:"v1",selectPostTargetPage__communityAvatar:"x1",selectPostTargetPage__closeButton:"w1",selectPostTargetPage__title:"y1"};var E9={myTimelineAvatar:"k1",myTimelineAvatar__userAvatar:"j1"};function B9({pageId:e="*",componentId:t="*",userId:o}){let r="my_timeline_avatar",{accessibilityId:n,isExcluded:i}=A({pageId:e,componentId:t,elementId:r});return i?null:R.createElement("div",{className:E9.myTimelineAvatar,"data-qa-anchor":n},R.createElement(jo,{className:E9.myTimelineAvatar__userAvatar,userId:o}))}var HF={myTimelineText:"z1"};function L9({pageId:e="*",componentId:t="*"}){let o="my_timeline_text",{accessibilityId:r,config:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:o});return i?null:R.createElement(S.Body,{className:HF.myTimelineText,style:c({},a),"data-qa-anchor":r},n.text)}function A9(){let e="select_post_target_page",{themeStyles:t}=Ye({pageId:e}),{onBack:o}=Be(),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}}),{AmityPostTargetSelectionPage:s}=bt(),[l,d]=useState(null),{currentUserId:p}=Ae(),{user:u}=fr(p);So({onIntersect:()=>{n&&a===!1&&i();},node:l});let g=r.map(f=>R.createElement("div",{onClick:()=>{var y;(y=s==null?void 0:s.goToPostComposerPage)==null||y.call(s,{targetId:f.communityId,targetType:"community",mode:"create",community:f});},key:f.communityId,className:Ei.selectPostTargetPage__timeline},R.createElement("div",{className:Ei.selectPostTargetPage__communityAvatar},R.createElement(jr,{pageId:e,community:f})),R.createElement(da,{pageId:e,community:f}),R.createElement("div",null,f.isOfficial&&R.createElement(S1,null),!f.isPublic&&R.createElement(N1,null))));return R.createElement("div",{className:Ei.selectPostTargetPage,style:t},R.createElement("div",{className:Ei.selectPostTargetPage__topBar},R.createElement(kr,{imgClassName:Ei.selectPostTargetPage__closeButton,pageId:e,onPress:o}),R.createElement(F1,{pageId:e,titleClassName:Ei.selectPostTargetPage__title}),R.createElement("div",null)),R.createElement(O,{onPress:()=>{var f;(f=s==null?void 0:s.goToPostComposerPage)==null||f.call(s,{mode:"create",targetId:null,targetType:"user",community:void 0});},className:Ei.selectPostTargetPage__timeline},R.createElement(B9,{pageId:e,userId:u==null?void 0:u.userId}),R.createElement(L9,{pageId:e})),R.createElement("div",{className:Ei.selectPostTargetPage__line}),R.createElement("div",{className:Ei.selectPostTargetPage__myCommunities},"My Communities"),g,R.createElement("div",{ref:f=>d(f)}))}var FF={myCommunitiesSearchPage:"X1"};function Fd(e,t){let n=dt({fetcher:CommunityRepository.getCommunities,params:e,shouldCall:t}),{items:o}=n,r=P(n,["items"]);return c({communities:o},r)}function H9(){let e="my_communities_search_page",{themeStyles:t}=Ye({pageId:e}),[o,r]=useState(""),{communities:n,isLoading:i,hasMore:a,loadMore:s}=Fd({displayName:o,limit:20,membership:"member"});return R.createElement("div",{className:FF.myCommunitiesSearchPage,style:t},R.createElement(Qm,{pageId:e,search:l=>r(l)}),o.length>0&&R.createElement(hs,{pageId:e,communityCollection:n,isLoading:i,onLoadMore:()=>{a&&i===!1&&s();}}))}var OF={socialGlobalSearchPage:"Y1",socialGlobalSearchPage__tabs:"C1",socialGlobalSearchPage__postContents:"A1"};var Du={tabsRoot:"M1",tabsList:"S1",tabsTrigger:"qr"};var F9=({tabs:e,activeTab:t,onTabChange:o,pageId:r="*",componentId:n="*",elementId:i="*"})=>{let{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:r,componentId:n,elementId:i});return R.createElement(ks.Root,{style:u,className:Du.tabsRoot,value:t,onValueChange:g=>o(g)},R.createElement(ks.List,{className:Du.tabsList},e.map(g=>R.createElement(ks.Trigger,{value:g.value,className:Du.tabsTrigger},R.createElement(S.Title,null,g.label)))),e.map(g=>R.createElement(ks.Content,{value:g.value},g.content())))};var wue=()=>{let[e,t]=useState(""),[o,r]=useState("community"),n=useMemo(()=>o==="user"&&e.length>0,[o,e]),i=Fd({displayName:e,limit:20},o==="community"&&e.length>0),a=cl({displayName:e,limit:20,enabled:n}),s=useCallback(l=>{t(l);},[t]);return {userCollection:a,communityCollection:i,searchType:o,search:s,searchValue:e,setSearchType:r}};function z9(){let e="social_global_search_page",{themeStyles:t}=Ye({pageId:e}),[o,r]=useState("communities"),{userCollection:n,communityCollection:i,search:a,searchValue:s,setSearchType:l}=wue(),d=[{value:"communities",label:"Communities",content:()=>R.createElement(hs,{pageId:e,communityCollection:i.communities,isLoading:i.isLoading,onLoadMore:()=>{i.hasMore&&i.isLoading===!1&&i.loadMore();}})},{value:"users",label:"Users",content:()=>R.createElement(v5,{pageId:e,userCollection:n.users,isLoading:n.isLoading,onLoadMore:()=>{n.hasMore&&n.isLoading===!1&&n.loadMore();}})}];return R.createElement("div",{className:OF.socialGlobalSearchPage,style:t},R.createElement(Qm,{pageId:e,search:a}),s.length>0&&R.createElement(F9,{pageId:e,tabs:d,activeTab:o,onTabChange:p=>{r(p),l(p==="communities"?"community":"user");}}))}var Qn={postDetailPage:"E1",postDetailPage__container:"Gr",postDetailPage__topBar:"F1",postDetailPage__topBar__title:"I1",postDetailPage__topBar__menuBar:"R1",postDetailPage__backIcon:"U1",postDetailPage__comments__divider:"Jr","skeleton-pulse":"Kr",postDetailPage__reactions_and_comments:"B1",postDetailPage__reactionsBar:"D1",postDetailPage__commentsCount:"H1",postDetailPage__comments:"L1",postDetailPage__divider:"T1",postDetailPage__notMember:"V1"};function U9({id:e,hideTarget:t,category:o}){let r="post_detail_page",{post:n,isLoading:i}=Ii(e),{themeStyles:a}=Ye({pageId:r}),{onBack:s}=Be(),[l,d]=useState(),{setDrawerData:p,removeDrawerData:u}=Wm(),{community:g}=Pt({communityId:(n==null?void 0:n.targetType)==="community"?n.targetId:null});return R.createElement("div",{className:Qn.postDetailPage,style:a},R.createElement("div",{className:Qn.postDetailPage__container},R.createElement("div",null,i?R.createElement(rd,{pageId:r}):n?R.createElement(fn,{pageId:r,post:n,category:o!=null?o:"general",style:"detail",hideTarget:t}):null),R.createElement("div",{className:Qn.postDetailPage__comments__divider,"data-is-loading":i}),R.createElement("div",{className:Qn.postDetailPage__comments},n&&R.createElement(Dc,{referenceId:n.postId,referenceType:"post",onClickReply:f=>d(f)}))),R.createElement("div",{className:Qn.postDetailPage__topBar},R.createElement(wm,{pageId:r,defaultClassName:Qn.postDetailPage__backIcon,onPress:()=>s()}),R.createElement(S.Title,{className:Qn.postDetailPage__topBar__title},"Post"),R.createElement("div",{className:Qn.postDetailPage__topBar__menuBar},R.createElement(Xc,{pageId:r,onClick:()=>p({content:R.createElement(S5,{post:n,onCloseMenu:()=>u(),pageId:r})})}))),(n==null?void 0:n.targetType)==="community"&&!(g!=null&&g.isJoined)?R.createElement("div",null,R.createElement("div",{className:Qn.postDetailPage__divider}),R.createElement(S.Body,{className:Qn.postDetailPage__notMember},"Join community to interact with all posts")):n&&R.createElement(kc,{referenceId:n.postId,referenceType:"post",replyTo:l,onCancelReply:()=>d(void 0),community:g}))}var Hu={communityProfilePage__container:"q1",communityProfilePage__header:"G1",communityProfilePage__content:"J1",communityProfilePage__refreshIndicator:"K1",communityProfilePage__tabContainer:"Nr",sticky:"N1",communityProfilePage__createPostButton:"O1",communityProfilePage__pullToRefresh:"P1",communityProfilePage__pullToRefresh__spinner:"Q1",spin:"W1"};var zo={communityProfileSkeleton__container:"Z1",communityProfileSkeleton__headerImage:"Or",communityProfileSkeleton__content:"_1",communityProfileSkeleton__title:"Pr",communityProfileSkeleton__category__container:"ev",communityProfileSkeleton__category__item:"rv",communityProfileSkeleton__description:"Qr",communityProfileSkeleton__communityInfo__container:"av",communityProfileSkeleton__communityInfo__info:"ov",communityProfileSkeleton__storyTab:"tv",communityProfileSkeleton__storyTab__title:"iv",pulse:"Wr",communityProfileSkeleton__tag:"lv",communityProfileSkeleton__stat:"sv",communityProfileSkeleton__avatar:"cv",communityProfileSkeleton__username:"nv"};var zF=()=>R.createElement("div",{className:zo.communityProfileSkeleton__container},R.createElement("div",{className:zo.communityProfileSkeleton__headerImage}),R.createElement("div",{className:zo.communityProfileSkeleton__content},R.createElement("div",{className:zo.communityProfileSkeleton__title}),R.createElement("div",{className:zo.communityProfileSkeleton__category__container},R.createElement("div",{className:zo.communityProfileSkeleton__category__item}),R.createElement("div",{className:zo.communityProfileSkeleton__category__item}),R.createElement("div",{className:zo.communityProfileSkeleton__category__item})),R.createElement("div",{className:zo.communityProfileSkeleton__description}),R.createElement("div",{className:zo.communityProfileSkeleton__description}),R.createElement("div",{className:zo.communityProfileSkeleton__communityInfo__container},R.createElement("div",{className:zo.communityProfileSkeleton__communityInfo__info}),R.createElement("div",{className:zo.communityProfileSkeleton__communityInfo__info})),R.createElement("div",{className:zo.communityProfileSkeleton__storyTab}),R.createElement("div",{className:zo.communityProfileSkeleton__storyTab__title})));var Fu={emptyPinnedPost__container:"dv",emptyPinnedPost__text:"mv",emptyPinnedPost__icon:"pv"};var V9=({pageId:e="*"})=>{let t="empty_pinned_post",{config:o,accessibilityId:r,isExcluded:n,themeStyles:i}=te({pageId:e,componentId:t});return n?null:R.createElement("div",{"data-qa-anchor":r,className:Fu.emptyPinnedPost__container,style:i},R.createElement(W5,{className:Fu.emptyPinnedPost__icon}),R.createElement(S.Title,{className:Fu.emptyPinnedPost__text},"No pinned post yet"))};var Ou={communityPin__container:"gv",communityPin__feed:"hv"};var j9=({pageId:e="*",communityId:t})=>{let o="community_pin",{accessibilityId:r,themeStyles:n,isExcluded:i}=te({pageId:e,componentId:o});if(i)return null;let{community:a}=Pt({communityId:t,shouldCall:!!t}),{AmityCommunityProfilePageBehavior:s}=bt();ud({communityId:t,level:SubscriptionLevels.POST});let{pinnedPost:l,isLoading:d,refresh:p}=gd({communityId:t}),u=(a==null?void 0:a.isJoined)&&!(a!=null&&a.isPublic);useEffect(()=>{p();},[]);let g=l.filter(h=>h.placement==="announcement"&&l.some(x=>x.placement==="default"&&x.referenceId===h.referenceId)),f=l.filter(h=>h.placement==="default").filter(h=>!g.some(x=>x.referenceId===h.referenceId)),y=l.filter(h=>h.placement==="default"),v=()=>d?R.createElement(fd,null):g&&g.map(({post:h})=>R.createElement(O,{onPress:()=>{var x;(x=s==null?void 0:s.goToPostDetailPage)==null||x.call(s,{postId:h.postId,hideTarget:!0,category:"pin_and_announcement"});},className:Ou.communityPin__feed},R.createElement(fn,{key:h.postId,post:h,category:"pin_and_announcement",style:"feed",hideTarget:!0,onClick:()=>{var x;return (x=s==null?void 0:s.goToPostDetailPage)==null?void 0:x.call(s,{postId:h.postId,hideTarget:!0,category:h.category})},onPostDeleted:()=>p()}))),C=()=>{let h=g.length>0?f:y;return d?R.createElement(fd,null):h.map(({post:x})=>R.createElement(O,{onPress:()=>{var b;(b=s==null?void 0:s.goToPostDetailPage)==null||b.call(s,{postId:x.postId,hideTarget:!0,category:"pin"});},className:Ou.communityPin__feed},R.createElement(fn,{key:x.postId,post:x,category:"pin",style:"feed",hideTarget:!0,onClick:()=>{var b;return (b=s==null?void 0:s.goToPostDetailPage)==null?void 0:b.call(s,{postId:x.postId,hideTarget:!0,category:"pin"})},onPostDeleted:()=>p()})))};return R.createElement("div",{"data-qa-anchor":r,className:Ou.communityPin__container,style:n},u||a!=null&&a.isPublic?l.length>0?R.createElement(R.Fragment,null,v(),C()):R.createElement(V9,null):R.createElement(pd,null))};var UF=({props:e,className:t})=>R.createElement("div",{className:t},R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},e),R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1122 5C11.1122 5.39449 10.7924 5.71429 10.3979 5.71429C10.0035 5.71429 9.68366 5.39449 9.68366 5V0.714286C9.68366 0.319797 10.0035 0 10.3979 0C10.7924 0 11.1122 0.319797 11.1122 0.714286V5ZM8.25509 6.28846C8.59673 6.09122 8.71378 5.65437 8.51654 5.31273L6.37368 1.60119C6.17644 1.25955 5.73959 1.1425 5.39795 1.33975C5.05631 1.53699 4.93926 1.97384 5.1365 2.31548L7.27936 6.02702C7.4766 6.36865 7.91346 6.48571 8.25509 6.28846ZM6.42496 6.88141C6.7666 7.07865 6.88366 7.51551 6.68641 7.85714C6.48917 8.19878 6.05232 8.31583 5.71068 8.11859L1.99914 5.97573C1.6575 5.77849 1.54045 5.34164 1.7377 5C1.93494 4.65836 2.37179 4.54131 2.71343 4.73855L6.42496 6.88141ZM6.11224 10C6.11224 9.60551 5.79244 9.28571 5.39795 9.28571H1.11223C0.717746 9.28571 0.397949 9.60551 0.397949 10C0.397949 10.3945 0.717746 10.7143 1.11224 10.7143H5.39795C5.79244 10.7143 6.11224 10.3945 6.11224 10ZM5.71068 11.8814C6.05232 11.6842 6.48917 11.8012 6.68641 12.1429C6.88366 12.4845 6.7666 12.9213 6.42497 13.1186L2.71343 15.2614C2.37179 15.4587 1.93494 15.3416 1.7377 15C1.54045 14.6584 1.6575 14.2215 1.99914 14.0243L5.71068 11.8814ZM8.25509 13.7115C7.91345 13.5143 7.4766 13.6313 7.27936 13.973L5.1365 17.6845C4.93926 18.0262 5.05631 18.463 5.39795 18.6603C5.73959 18.8575 6.17644 18.7404 6.37368 18.3988L8.51654 14.6873C8.71378 14.3456 8.59673 13.9088 8.25509 13.7115ZM10.3979 14.2857C10.0035 14.2857 9.68366 14.6055 9.68366 15V19.2857C9.68366 19.6802 10.0035 20 10.3979 20C10.7924 20 11.1122 19.6802 11.1122 19.2857V15C11.1122 14.6055 10.7924 14.2857 10.3979 14.2857ZM12.5408 6.28846C12.8824 6.48571 13.3193 6.36865 13.5165 6.02702L15.6594 2.31548C15.8566 1.97384 15.7396 1.53699 15.3979 1.33975C15.0563 1.1425 14.6195 1.25956 14.4222 1.60119L12.2794 5.31273C12.0821 5.65437 12.1992 6.09122 12.5408 6.28846ZM15.0852 8.11859C14.7436 8.31583 14.3067 8.19878 14.1095 7.85714C13.9122 7.51551 14.0293 7.07866 14.3709 6.88141L18.0825 4.73855C18.4241 4.54131 18.861 4.65836 19.0582 5C19.2554 5.34164 19.1384 5.77849 18.7968 5.97573L15.0852 8.11859ZM14.6837 10C14.6837 10.3945 15.0035 10.7143 15.3979 10.7143H19.6837C20.0782 10.7143 20.3979 10.3945 20.3979 10C20.3979 9.60551 20.0782 9.28571 19.6837 9.28571H15.3979C15.0035 9.28571 14.6837 9.60551 14.6837 10ZM14.3709 13.1186C14.0293 12.9213 13.9122 12.4845 14.1095 12.1429C14.3067 11.8012 14.7436 11.6842 15.0852 11.8814L18.7968 14.0243C19.1384 14.2215 19.2554 14.6584 19.0582 15C18.861 15.3416 18.4241 15.4587 18.0825 15.2614L14.3709 13.1186ZM12.5408 13.7115C12.1992 13.9088 12.0821 14.3456 12.2794 14.6873L14.4222 18.3988C14.6195 18.7404 15.0563 18.8575 15.3979 18.6603C15.7396 18.463 15.8566 18.0262 15.6594 17.6845L13.5165 13.973C13.3193 13.6313 12.8824 13.5143 12.5408 13.7115Z",fill:"url(#paint0_angular_1709_10374)"}),R.createElement("defs",null,R.createElement("radialGradient",{id:"paint0_angular_1709_10374",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.3979 10) scale(10)"},R.createElement("stop",{offset:"0.669733",stopColor:"#595F67"}),R.createElement("stop",{offset:"0.716307",stopColor:"#262626",stopOpacity:"0.01"})))));var G9=({communityId:e})=>{let{activeTab:t}=$5(),o="community_profile_page",{themeStyles:r,accessibilityId:n}=Ye({pageId:o}),{community:i}=Pt({communityId:e,shouldCall:!!e}),a=useRef(null),s=useRef(0),[l,d]=useState(0),[p,u]=useState(0),g=()=>{switch(t){case"community_feed":return R.createElement(K5,{pageId:o,communityId:e});case"community_pin":return R.createElement(j9,{pageId:o,communityId:e});default:return null}},f=()=>_(void 0,null,function*(){u(y=>y+1);});return R.createElement("div",{ref:a,"data-qa-anchor":n,className:Hu.communityProfilePage__container,style:r,onDrag:y=>y.stopPropagation(),onTouchStart:y=>{s.current=y.touches[0].clientY;},onTouchMove:y=>{let v=y.touches[0].clientY;s.current>v||d(Math.min(v-s.current,100));},onTouchEnd:y=>{s.current=0,l>=75&&f(),d(0);}},R.createElement("div",{style:{"--asc-pull-to-refresh-height":`${l}px`},className:Hu.communityProfilePage__pullToRefresh},R.createElement(UF,{className:Hu.communityProfilePage__pullToRefresh__spinner})),i?R.createElement(Q5,{community:i}):R.createElement(zF,null),R.createElement("div",{key:p},g()))};
|
|
5335
|
+
)`;l(w);}}catch(I){console.error("Error extracting colors:",I),l("");}}g(!1);},b.onerror=()=>{p(!0),g(!1);},()=>{b.onload=null,b.onerror=null;}},[e]);let y=()=>d||!e?R.createElement("div",{className:Ge.fallbackThumbnail},R.createElement(S.Body,null,"No Image Available")):R.createElement(R.Fragment,null,R.createElement("img",{ref:f,src:e,alt:"Story Thumbnail",className:cr(Ge.thumbnailImage,{[Ge.imageFit]:a==="fit",[Ge.imageCover]:a==="fill"}),crossOrigin:"anonymous"}),R.createElement("div",{className:Ge.shadowOverlay}));return u?R.createElement(NF,null):R.createElement("div",{className:Ge.containerWrapper,onClick:i,style:{background:s||"#000"}},R.createElement("div",{className:Ge.storyPreviewContainer},R.createElement("div",{className:Ge.thumbnailMedia},y()),R.createElement("div",{className:Ge.thumbnailInfo},R.createElement("div",{className:Ge.userInfo},R.createElement("div",{className:Ge.storyPreviewAvatar},R.createElement(xt,{avatarUrl:o,defaultImage:R.createElement(Bu,null)})),R.createElement(S.BodyBold,{className:Ge.storyPreviewTitle},R.createElement("span",{className:Ge.nameContainer},R.createElement(pw,{lines:1},R.createElement("span",null,r))," ",n&&R.createElement(p1,{width:12,height:12,fill:"white"}))))),((C=(v=t[0])==null?void 0:v.data)==null?void 0:C.url)&&R.createElement("a",{href:t[0].data.url,className:cr(Ge.hyperlink,Ge.hyperlinkPosition)},R.createElement(bc,{className:Ge.hyperlinkIcon}),R.createElement("span",{className:Ge.hyperlinkText},((x=(h=t[0])==null?void 0:h.data)==null?void 0:x.customText)||t[0].data.url))))};var sue=({type:e,targetId:t})=>{let o="story_page",{AmityStoryViewPageBehavior:r}=bt(),{onBack:n,goToViewStoryPage:i,goToDraftStoryPage:a,onClickCommunity:s}=Be();return e==="communityFeed"?R.createElement(ru,{pageId:o,communityId:t,onBack:n,onClose:l=>s(l),onSwipeDown:l=>s(l),onClickCommunity:l=>s(l),goToDraftStoryPage:(l,d,p,u)=>a(l,d,p,u)}):e==="globalFeed"?R.createElement(nu,{pageId:o,targetId:t,onChangePage:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onClose:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onSwipeDown:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onClickStory:l=>i({storyType:"globalFeed",targetId:l,targetType:"community"}),goToDraftStoryPage:(l,d,p,u)=>a(l,d,p,u),onClickCommunity:l=>s(l)}):null},S9=sue;var Ei={selectStoryTargetPage:"i1",selectStoryTargetPage__topBar:"l1",selectStoryTargetPage__timeline:"s1",selectStoryTargetPage__line:"c1",selectStoryTargetPage__myCommunities__container:"n1",selectStoryTargetPage__myCommunities:"d1",selectStoryTargetPage__communityAvatar:"m1",selectStoryTargetPage__closeButton:"p1",selectStoryTargetPage__title:"g1"};function N9(){let e="select_story_target_page",{themeStyles:t}=Ye({pageId:e}),{onBack:o}=Be(),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}}),{AmityStoryTargetSelectionPage:s}=bt(),{file:l,setFile:d}=ui(),[p,u]=useState(null),[g,f]=useState(null),y=h=>{f(h);},v=h=>{h&&h.length>0&&g&&d(h[0]);},C=r.map(h=>R.createElement(FileTrigger,{key:h.communityId,onSelect:v},R.createElement(O,{onPress:()=>y(h.communityId)},R.createElement("div",{className:Ei.selectStoryTargetPage__myCommunities},R.createElement("div",{className:Ei.selectStoryTargetPage__communityAvatar},R.createElement(jr,{pageId:e,community:h})),R.createElement(pa,{pageId:e,community:h}),R.createElement("div",null,h.isOfficial&&R.createElement(S1,null),!h.isPublic&&R.createElement(N1,null))))));return So({onIntersect:()=>{n&&a===!1&&i();},node:p}),useEffect(()=>{var h;l&&((h=s==null?void 0:s.goToStoryCreationPage)==null||h.call(s,{targetId:g,targetType:"community",mediaType:l&&(l!=null&&l.type.includes("image"))?{type:"image",url:URL.createObjectURL(l)}:{type:"video",url:URL.createObjectURL(l)},storyType:"globalFeed"}));},[l]),R.createElement("div",{className:Ei.selectStoryTargetPage,style:t},R.createElement("div",{className:Ei.selectStoryTargetPage__topBar},R.createElement(kr,{imgClassName:Ei.selectStoryTargetPage__closeButton,pageId:e,onPress:o}),R.createElement(F1,{pageId:e,titleClassName:Ei.selectStoryTargetPage__title}),R.createElement("div",null)),R.createElement("div",{className:Ei.selectStoryTargetPage__line}),R.createElement("div",{className:Ei.selectStoryTargetPage__myCommunities},"My Communities"),R.createElement("div",{className:Ei.selectStoryTargetPage__myCommunities__container},C),R.createElement("div",{ref:h=>u(h)}))}var Bi={selectPostTargetPage:"h1",selectPostTargetPage__topBar:"f1",selectPostTargetPage__timeline:"b1",selectPostTargetPage__line:"u1",selectPostTargetPage__myCommunities:"v1",selectPostTargetPage__communityAvatar:"x1",selectPostTargetPage__closeButton:"w1",selectPostTargetPage__title:"y1"};var E9={myTimelineAvatar:"k1",myTimelineAvatar__userAvatar:"j1"};function B9({pageId:e="*",componentId:t="*",userId:o}){let r="my_timeline_avatar",{accessibilityId:n,isExcluded:i}=A({pageId:e,componentId:t,elementId:r});return i?null:R.createElement("div",{className:E9.myTimelineAvatar,"data-qa-anchor":n},R.createElement(jo,{className:E9.myTimelineAvatar__userAvatar,userId:o}))}var HF={myTimelineText:"z1"};function L9({pageId:e="*",componentId:t="*"}){let o="my_timeline_text",{accessibilityId:r,config:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:o});return i?null:R.createElement(S.Body,{className:HF.myTimelineText,style:c({},a),"data-qa-anchor":r},n.text)}function A9(){let e="select_post_target_page",{themeStyles:t}=Ye({pageId:e}),{onBack:o}=Be(),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}}),{AmityPostTargetSelectionPage:s}=bt(),[l,d]=useState(null),{currentUserId:p}=Ae(),{user:u}=fr(p);So({onIntersect:()=>{n&&a===!1&&i();},node:l});let g=r.map(f=>R.createElement("div",{onClick:()=>{var y;(y=s==null?void 0:s.goToPostComposerPage)==null||y.call(s,{targetId:f.communityId,targetType:"community",mode:"create",community:f});},key:f.communityId,className:Bi.selectPostTargetPage__timeline},R.createElement("div",{className:Bi.selectPostTargetPage__communityAvatar},R.createElement(jr,{pageId:e,community:f})),R.createElement(pa,{pageId:e,community:f}),R.createElement("div",null,f.isOfficial&&R.createElement(S1,null),!f.isPublic&&R.createElement(N1,null))));return R.createElement("div",{className:Bi.selectPostTargetPage,style:t},R.createElement("div",{className:Bi.selectPostTargetPage__topBar},R.createElement(kr,{imgClassName:Bi.selectPostTargetPage__closeButton,pageId:e,onPress:o}),R.createElement(F1,{pageId:e,titleClassName:Bi.selectPostTargetPage__title}),R.createElement("div",null)),R.createElement(O,{onPress:()=>{var f;(f=s==null?void 0:s.goToPostComposerPage)==null||f.call(s,{mode:"create",targetId:null,targetType:"user",community:void 0});},className:Bi.selectPostTargetPage__timeline},R.createElement(B9,{pageId:e,userId:u==null?void 0:u.userId}),R.createElement(L9,{pageId:e})),R.createElement("div",{className:Bi.selectPostTargetPage__line}),R.createElement("div",{className:Bi.selectPostTargetPage__myCommunities},"My Communities"),g,R.createElement("div",{ref:f=>d(f)}))}var FF={myCommunitiesSearchPage:"X1"};function Fd(e,t){let n=dt({fetcher:CommunityRepository.getCommunities,params:e,shouldCall:t}),{items:o}=n,r=P(n,["items"]);return c({communities:o},r)}function H9(){let e="my_communities_search_page",{themeStyles:t}=Ye({pageId:e}),[o,r]=useState(""),{communities:n,isLoading:i,hasMore:a,loadMore:s}=Fd({displayName:o,limit:20,membership:"member"});return R.createElement("div",{className:FF.myCommunitiesSearchPage,style:t},R.createElement(Qm,{pageId:e,search:l=>r(l)}),o.length>0&&R.createElement(hs,{pageId:e,communityCollection:n,isLoading:i,onLoadMore:()=>{a&&i===!1&&s();}}))}var OF={socialGlobalSearchPage:"Y1",socialGlobalSearchPage__tabs:"C1",socialGlobalSearchPage__postContents:"A1"};var Du={tabsRoot:"M1",tabsList:"S1",tabsTrigger:"qr"};var F9=({tabs:e,activeTab:t,onTabChange:o,pageId:r="*",componentId:n="*",elementId:i="*"})=>{let{accessibilityId:a,config:s,defaultConfig:l,isExcluded:d,uiReference:p,themeStyles:u}=A({pageId:r,componentId:n,elementId:i});return R.createElement(ks.Root,{style:u,className:Du.tabsRoot,value:t,onValueChange:g=>o(g)},R.createElement(ks.List,{className:Du.tabsList},e.map(g=>R.createElement(ks.Trigger,{value:g.value,className:Du.tabsTrigger},R.createElement(S.Title,null,g.label)))),e.map(g=>R.createElement(ks.Content,{value:g.value},g.content())))};var wue=()=>{let[e,t]=useState(""),[o,r]=useState("community"),n=useMemo(()=>o==="user"&&e.length>0,[o,e]),i=Fd({displayName:e,limit:20},o==="community"&&e.length>0),a=cl({displayName:e,limit:20,enabled:n}),s=useCallback(l=>{t(l);},[t]);return {userCollection:a,communityCollection:i,searchType:o,search:s,searchValue:e,setSearchType:r}};function z9(){let e="social_global_search_page",{themeStyles:t}=Ye({pageId:e}),[o,r]=useState("communities"),{userCollection:n,communityCollection:i,search:a,searchValue:s,setSearchType:l}=wue(),d=[{value:"communities",label:"Communities",content:()=>R.createElement(hs,{pageId:e,communityCollection:i.communities,isLoading:i.isLoading,onLoadMore:()=>{i.hasMore&&i.isLoading===!1&&i.loadMore();}})},{value:"users",label:"Users",content:()=>R.createElement(v5,{pageId:e,userCollection:n.users,isLoading:n.isLoading,onLoadMore:()=>{n.hasMore&&n.isLoading===!1&&n.loadMore();}})}];return R.createElement("div",{className:OF.socialGlobalSearchPage,style:t},R.createElement(Qm,{pageId:e,search:a}),s.length>0&&R.createElement(F9,{pageId:e,tabs:d,activeTab:o,onTabChange:p=>{r(p),l(p==="communities"?"community":"user");}}))}var Qn={postDetailPage:"E1",postDetailPage__container:"Gr",postDetailPage__topBar:"F1",postDetailPage__topBar__title:"I1",postDetailPage__topBar__menuBar:"R1",postDetailPage__backIcon:"U1",postDetailPage__comments__divider:"Jr","skeleton-pulse":"Kr",postDetailPage__reactions_and_comments:"B1",postDetailPage__reactionsBar:"D1",postDetailPage__commentsCount:"H1",postDetailPage__comments:"L1",postDetailPage__divider:"T1",postDetailPage__notMember:"V1"};function U9({id:e,hideTarget:t,category:o}){let r="post_detail_page",{post:n,isLoading:i}=wi(e),{themeStyles:a}=Ye({pageId:r}),{onBack:s}=Be(),[l,d]=useState(),{setDrawerData:p,removeDrawerData:u}=Wm(),{community:g}=Pt({communityId:(n==null?void 0:n.targetType)==="community"?n.targetId:null});return R.createElement("div",{className:Qn.postDetailPage,style:a},R.createElement("div",{className:Qn.postDetailPage__container},R.createElement("div",null,i?R.createElement(rd,{pageId:r}):n?R.createElement(fn,{pageId:r,post:n,category:o!=null?o:"general",style:"detail",hideTarget:t}):null),R.createElement("div",{className:Qn.postDetailPage__comments__divider,"data-is-loading":i}),R.createElement("div",{className:Qn.postDetailPage__comments},n&&R.createElement(Dc,{referenceId:n.postId,referenceType:"post",onClickReply:f=>d(f)}))),R.createElement("div",{className:Qn.postDetailPage__topBar},R.createElement(wm,{pageId:r,defaultClassName:Qn.postDetailPage__backIcon,onPress:()=>s()}),R.createElement(S.Title,{className:Qn.postDetailPage__topBar__title},"Post"),R.createElement("div",{className:Qn.postDetailPage__topBar__menuBar},R.createElement(Xc,{pageId:r,onClick:()=>p({content:R.createElement(S5,{post:n,onCloseMenu:()=>u(),pageId:r})})}))),(n==null?void 0:n.targetType)==="community"&&!(g!=null&&g.isJoined)?R.createElement("div",null,R.createElement("div",{className:Qn.postDetailPage__divider}),R.createElement(S.Body,{className:Qn.postDetailPage__notMember},"Join community to interact with all posts")):n&&R.createElement(kc,{referenceId:n.postId,referenceType:"post",replyTo:l,onCancelReply:()=>d(void 0),community:g}))}var Hu={communityProfilePage__container:"q1",communityProfilePage__header:"G1",communityProfilePage__content:"J1",communityProfilePage__refreshIndicator:"K1",communityProfilePage__tabContainer:"Nr",sticky:"N1",communityProfilePage__createPostButton:"O1",communityProfilePage__pullToRefresh:"P1",communityProfilePage__pullToRefresh__spinner:"Q1",spin:"W1"};var zo={communityProfileSkeleton__container:"Z1",communityProfileSkeleton__headerImage:"Or",communityProfileSkeleton__content:"_1",communityProfileSkeleton__title:"Pr",communityProfileSkeleton__category__container:"ev",communityProfileSkeleton__category__item:"rv",communityProfileSkeleton__description:"Qr",communityProfileSkeleton__communityInfo__container:"av",communityProfileSkeleton__communityInfo__info:"ov",communityProfileSkeleton__storyTab:"tv",communityProfileSkeleton__storyTab__title:"iv",pulse:"Wr",communityProfileSkeleton__tag:"lv",communityProfileSkeleton__stat:"sv",communityProfileSkeleton__avatar:"cv",communityProfileSkeleton__username:"nv"};var zF=()=>R.createElement("div",{className:zo.communityProfileSkeleton__container},R.createElement("div",{className:zo.communityProfileSkeleton__headerImage}),R.createElement("div",{className:zo.communityProfileSkeleton__content},R.createElement("div",{className:zo.communityProfileSkeleton__title}),R.createElement("div",{className:zo.communityProfileSkeleton__category__container},R.createElement("div",{className:zo.communityProfileSkeleton__category__item}),R.createElement("div",{className:zo.communityProfileSkeleton__category__item}),R.createElement("div",{className:zo.communityProfileSkeleton__category__item})),R.createElement("div",{className:zo.communityProfileSkeleton__description}),R.createElement("div",{className:zo.communityProfileSkeleton__description}),R.createElement("div",{className:zo.communityProfileSkeleton__communityInfo__container},R.createElement("div",{className:zo.communityProfileSkeleton__communityInfo__info}),R.createElement("div",{className:zo.communityProfileSkeleton__communityInfo__info})),R.createElement("div",{className:zo.communityProfileSkeleton__storyTab}),R.createElement("div",{className:zo.communityProfileSkeleton__storyTab__title})));var Fu={emptyPinnedPost__container:"dv",emptyPinnedPost__text:"mv",emptyPinnedPost__icon:"pv"};var V9=({pageId:e="*"})=>{let t="empty_pinned_post",{config:o,accessibilityId:r,isExcluded:n,themeStyles:i}=te({pageId:e,componentId:t});return n?null:R.createElement("div",{"data-qa-anchor":r,className:Fu.emptyPinnedPost__container,style:i},R.createElement(W5,{className:Fu.emptyPinnedPost__icon}),R.createElement(S.Title,{className:Fu.emptyPinnedPost__text},"No pinned post yet"))};var Ou={communityPin__container:"gv",communityPin__feed:"hv"};var j9=({pageId:e="*",communityId:t})=>{let o="community_pin",{accessibilityId:r,themeStyles:n,isExcluded:i}=te({pageId:e,componentId:o});if(i)return null;let{community:a}=Pt({communityId:t,shouldCall:!!t}),{AmityCommunityProfilePageBehavior:s}=bt();ud({communityId:t,level:SubscriptionLevels.POST});let{pinnedPost:l,isLoading:d,refresh:p}=gd({communityId:t}),u=(a==null?void 0:a.isJoined)&&!(a!=null&&a.isPublic);useEffect(()=>{p();},[]);let g=l.filter(h=>h.placement==="announcement"&&l.some(x=>x.placement==="default"&&x.referenceId===h.referenceId)),f=l.filter(h=>h.placement==="default").filter(h=>!g.some(x=>x.referenceId===h.referenceId)),y=l.filter(h=>h.placement==="default"),v=()=>d?R.createElement(fd,null):g&&g.map(({post:h})=>R.createElement(O,{onPress:()=>{var x;(x=s==null?void 0:s.goToPostDetailPage)==null||x.call(s,{postId:h.postId,hideTarget:!0,category:"pin_and_announcement"});},className:Ou.communityPin__feed},R.createElement(fn,{key:h.postId,post:h,category:"pin_and_announcement",style:"feed",hideTarget:!0,onClick:()=>{var x;return (x=s==null?void 0:s.goToPostDetailPage)==null?void 0:x.call(s,{postId:h.postId,hideTarget:!0,category:h.category})},onPostDeleted:()=>p()}))),C=()=>{let h=g.length>0?f:y;return d?R.createElement(fd,null):h.map(({post:x})=>R.createElement(O,{onPress:()=>{var b;(b=s==null?void 0:s.goToPostDetailPage)==null||b.call(s,{postId:x.postId,hideTarget:!0,category:"pin"});},className:Ou.communityPin__feed},R.createElement(fn,{key:x.postId,post:x,category:"pin",style:"feed",hideTarget:!0,onClick:()=>{var b;return (b=s==null?void 0:s.goToPostDetailPage)==null?void 0:b.call(s,{postId:x.postId,hideTarget:!0,category:"pin"})},onPostDeleted:()=>p()})))};return R.createElement("div",{"data-qa-anchor":r,className:Ou.communityPin__container,style:n},u||a!=null&&a.isPublic?l.length>0?R.createElement(R.Fragment,null,v(),C()):R.createElement(V9,null):R.createElement(pd,null))};var UF=({props:e,className:t})=>R.createElement("div",{className:t},R.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},e),R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1122 5C11.1122 5.39449 10.7924 5.71429 10.3979 5.71429C10.0035 5.71429 9.68366 5.39449 9.68366 5V0.714286C9.68366 0.319797 10.0035 0 10.3979 0C10.7924 0 11.1122 0.319797 11.1122 0.714286V5ZM8.25509 6.28846C8.59673 6.09122 8.71378 5.65437 8.51654 5.31273L6.37368 1.60119C6.17644 1.25955 5.73959 1.1425 5.39795 1.33975C5.05631 1.53699 4.93926 1.97384 5.1365 2.31548L7.27936 6.02702C7.4766 6.36865 7.91346 6.48571 8.25509 6.28846ZM6.42496 6.88141C6.7666 7.07865 6.88366 7.51551 6.68641 7.85714C6.48917 8.19878 6.05232 8.31583 5.71068 8.11859L1.99914 5.97573C1.6575 5.77849 1.54045 5.34164 1.7377 5C1.93494 4.65836 2.37179 4.54131 2.71343 4.73855L6.42496 6.88141ZM6.11224 10C6.11224 9.60551 5.79244 9.28571 5.39795 9.28571H1.11223C0.717746 9.28571 0.397949 9.60551 0.397949 10C0.397949 10.3945 0.717746 10.7143 1.11224 10.7143H5.39795C5.79244 10.7143 6.11224 10.3945 6.11224 10ZM5.71068 11.8814C6.05232 11.6842 6.48917 11.8012 6.68641 12.1429C6.88366 12.4845 6.7666 12.9213 6.42497 13.1186L2.71343 15.2614C2.37179 15.4587 1.93494 15.3416 1.7377 15C1.54045 14.6584 1.6575 14.2215 1.99914 14.0243L5.71068 11.8814ZM8.25509 13.7115C7.91345 13.5143 7.4766 13.6313 7.27936 13.973L5.1365 17.6845C4.93926 18.0262 5.05631 18.463 5.39795 18.6603C5.73959 18.8575 6.17644 18.7404 6.37368 18.3988L8.51654 14.6873C8.71378 14.3456 8.59673 13.9088 8.25509 13.7115ZM10.3979 14.2857C10.0035 14.2857 9.68366 14.6055 9.68366 15V19.2857C9.68366 19.6802 10.0035 20 10.3979 20C10.7924 20 11.1122 19.6802 11.1122 19.2857V15C11.1122 14.6055 10.7924 14.2857 10.3979 14.2857ZM12.5408 6.28846C12.8824 6.48571 13.3193 6.36865 13.5165 6.02702L15.6594 2.31548C15.8566 1.97384 15.7396 1.53699 15.3979 1.33975C15.0563 1.1425 14.6195 1.25956 14.4222 1.60119L12.2794 5.31273C12.0821 5.65437 12.1992 6.09122 12.5408 6.28846ZM15.0852 8.11859C14.7436 8.31583 14.3067 8.19878 14.1095 7.85714C13.9122 7.51551 14.0293 7.07866 14.3709 6.88141L18.0825 4.73855C18.4241 4.54131 18.861 4.65836 19.0582 5C19.2554 5.34164 19.1384 5.77849 18.7968 5.97573L15.0852 8.11859ZM14.6837 10C14.6837 10.3945 15.0035 10.7143 15.3979 10.7143H19.6837C20.0782 10.7143 20.3979 10.3945 20.3979 10C20.3979 9.60551 20.0782 9.28571 19.6837 9.28571H15.3979C15.0035 9.28571 14.6837 9.60551 14.6837 10ZM14.3709 13.1186C14.0293 12.9213 13.9122 12.4845 14.1095 12.1429C14.3067 11.8012 14.7436 11.6842 15.0852 11.8814L18.7968 14.0243C19.1384 14.2215 19.2554 14.6584 19.0582 15C18.861 15.3416 18.4241 15.4587 18.0825 15.2614L14.3709 13.1186ZM12.5408 13.7115C12.1992 13.9088 12.0821 14.3456 12.2794 14.6873L14.4222 18.3988C14.6195 18.7404 15.0563 18.8575 15.3979 18.6603C15.7396 18.463 15.8566 18.0262 15.6594 17.6845L13.5165 13.973C13.3193 13.6313 12.8824 13.5143 12.5408 13.7115Z",fill:"url(#paint0_angular_1709_10374)"}),R.createElement("defs",null,R.createElement("radialGradient",{id:"paint0_angular_1709_10374",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.3979 10) scale(10)"},R.createElement("stop",{offset:"0.669733",stopColor:"#595F67"}),R.createElement("stop",{offset:"0.716307",stopColor:"#262626",stopOpacity:"0.01"})))));var G9=({communityId:e})=>{let{activeTab:t}=$5(),o="community_profile_page",{themeStyles:r,accessibilityId:n}=Ye({pageId:o}),{community:i}=Pt({communityId:e,shouldCall:!!e}),a=useRef(null),s=useRef(0),[l,d]=useState(0),[p,u]=useState(0),g=()=>{switch(t){case"community_feed":return R.createElement(K5,{pageId:o,communityId:e});case"community_pin":return R.createElement(j9,{pageId:o,communityId:e});default:return null}},f=()=>_(void 0,null,function*(){u(y=>y+1);});return R.createElement("div",{ref:a,"data-qa-anchor":n,className:Hu.communityProfilePage__container,style:r,onDrag:y=>y.stopPropagation(),onTouchStart:y=>{s.current=y.touches[0].clientY;},onTouchMove:y=>{let v=y.touches[0].clientY;s.current>v||d(Math.min(v-s.current,100));},onTouchEnd:y=>{s.current=0,l>=75&&f(),d(0);}},R.createElement("div",{style:{"--asc-pull-to-refresh-height":`${l}px`},className:Hu.communityProfilePage__pullToRefresh},R.createElement(UF,{className:Hu.communityProfilePage__pullToRefresh__spinner})),i?R.createElement(Q5,{community:i}):R.createElement(zF,null),R.createElement("div",{key:p},g()))};
|
|
5336
5336
|
|
|
5337
5337
|
export { ge as AmityAvatar, Am as AmityCommentTrayComponent, K5 as AmityCommunityFeedComponent, Q5 as AmityCommunityHeaderComponent, wL as AmityCommunityPinnedPostComponent, G9 as AmityCommunityProfilePage, hs as AmityCommunitySearchResultComponent, p5 as AmityCreatePostMenuComponent, h5 as AmityDetailedMediaAttachmentComponent, Af as AmityDraftStoryPage, Jm as AmityEmptyNewsFeedComponent, F6 as AmityExpandableText, B5 as AmityGlobalFeedComponent, yu as AmityLiveChatHeader, Su as AmityLiveChatMessageComposeBar, _u as AmityLiveChatMessageList, Iu as AmityLiveChatMessageQuickReaction, l9 as AmityLiveChatMessageReactionPicker, p9 as AmityLiveChatMessageReactionPreview, PF as AmityLiveChatPage, y5 as AmityMediaAttachmentComponent, N5 as AmityMyCommunitiesComponent, H9 as AmityMyCommunitiesSearchPage, L5 as AmityNewsFeedComponent, Lg as AmityPostComposerPage, K2 as AmityPostContainer, fn as AmityPostContentComponent, qa as AmityPostDetail, U9 as AmityPostDetailPage, Z6 as AmityPostEngagementBar, A9 as AmityPostTargetSelectionPage, Fm as AmityReactionListComponent, z9 as AmitySocialGlobalSearchPage, rf as AmitySocialHomePage, H5 as AmitySocialHomePageTab, F5 as AmitySocialHomeTopNavigationComponent, SF as AmityStoryPreview, BF as AmityStoryPreviewThumbnail, Um as AmityStoryTabComponent, N9 as AmityStoryTargetSelectionPage, Qm as AmityTopSearchBarComponent, Yf as AmityUIKitManager, $pe as AmityUiKitChat, s1 as AmityUiKitFeed, cY as AmityUiKitProvider, Hde as AmityUiKitSocial, v5 as AmityUserSearchResultComponent, S9 as AmityViewStoryPage, wc as ExplorePage, PH as amityAddChatMembers, _H as amityRemoveChatMembers, X as useAmityNavigation, ol as useAmitySDK, re as useAmityUser };
|