
/* >>> file start: profile.js [FB]*/
/*! For license information please see profile.js.LICENSE.txt */
(()=>{var t,e={2833(t){t.exports=function(t,e,r,n){var o=r?r.call(n,t,e):void 0;if(void 0!==o)return!!o;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(e),l=0;l<i.length;l++){var u=i[l];if(!c(u))return!1;var s=t[u],f=e[u];if(!1===(o=r?r.call(n,s,f,u):void 0)||void 0===o&&s!==f)return!1}return!0}},3451(t,e,r){"use strict";r.d(e,{$:()=>o,a:()=>i});var n=r(79056),o=n.default.button.withConfig({displayName:"Button",componentId:"sc-k30yql-0"})(["position:relative;display:inline-block;padding:6px 16px;box-sizing:border-box;border-radius:4px;vertical-align:middle;text-align:center;font:inherit;font-size:14px;line-height:1;white-space:nowrap;cursor:pointer;transition:border-color .2s,background-color .2s,color .2s;"," "," "," "," "," "," "," "," ",""],function(t){return t.$primary?(0,n.css)(["color:#FFFFFF;background-color:#00A3D9;border:1px solid #00A3D9;&:visited{color:#FFFFFF;}&:hover,&:focus{border-color:#00C0FF;background-color:#00C0FF;color:#FFFFFF;}&:active{border-color:#0996C5;background-color:#0996C5;color:#FFFFFF;}"]):(0,n.css)(["color:#333333;background-color:#FFFFFF;border:1px solid #D4DCE0;&:visited{color:#333333;}&:hover,&:focus{border-color:#00A3D9;background-color:#FFFFFF;}&:active{border-color:#D4DCE0;background-color:#F9FAFA;}"])},function(t){return t.$isLoading&&(0,n.css)(["color:transparent;&:hover,&:focus,&:active{color:transparent;}"])},function(t){var e=t.disabled,r=t.$primary;return e&&(0,n.css)(["opacity:.5;cursor:not-allowed;&:hover,&:focus{background-color:",";border-color:",";}"],r?"#00A3D9":"#FFFFFF",r?"#00A3D9":"#D4DCE0")},function(t){return t.$noBorder&&(0,n.css)(["border:1px solid transparent;color:#00A3D9;background-color:transparent;&:hover,&:focus{border-color:#00A3D9;}&:active{border-color:#0996C5;color:#0996C5;}"])},function(t){return t.$hasOutline&&(0,n.css)(["border:1px solid #D4DCE0;color:#333;background-color:transparent;&:hover{border-color:#BDC8CD;background-color:transparent;}&:focus{border-color:#00A3D9;background-color:transparent;}&:active{border-color:#F9FAFA;background-color:transparent;}"])},function(t){return t.$linkType&&(0,n.css)(["padding:0;border:0;background-color:transparent;color:#0099CC;&:hover,&:active,&:focus{color:#0086B3;background-color:transparent;}"])},function(t){var e=t.$size;return{medium:(0,n.css)(["padding:8px 16px;"])}[e]},function(t){return t.$text&&(0,n.css)(["display:flex;align-items:center;justify-content:center;min-height:24px;padding:4px 8px;border:0;border-radius:4px;font-weight:600;letter-spacing:0.24px;color:#2EADDF;text-align:left;background-color:transparent;transition:background-color 0.15s linear;cursor:pointer;&:hover{background-color:rgba(0,0,0,0.08);}&:active{background-color:rgba(0,0,0,0.12);}&:focus{outline:none;}&:focus-visible{outline:2px dashed #2EADDF;outline-offset:2px;}&:disabled{color:rgba(203,218,225,1);pointer-events:none;}"])},function(t){return t.$sizeL&&(0,n.css)(["min-height:32px;padding:8px 16px;"])}),i=n.default.div.withConfig({displayName:"Loader",componentId:"sc-k30yql-1"})(["position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#FFFFFF;svg{display:block;animation:svgrotate .57s linear infinite;}@keyframes svgrotate{100%{transform:rotate(360deg);}}"])},4146(t,e,r){"use strict";var n=r(44363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function l(t){return n.isMemo(t)?a:c[t.$$typeof]||o}c[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[n.Memo]=a;var u=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(m){var o=d(r);o&&o!==m&&t(e,o,n)}var a=s(r);f&&(a=a.concat(f(r)));for(var c=l(e),h=l(r),y=0;y<a.length;++y){var v=a[y];if(!(i[v]||n&&n[v]||h&&h[v]||c&&c[v])){var g=p(r,v);try{u(e,v,g)}catch(t){}}}}return e}},4178(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(96540),o=r(74044);const i=function(t,e){var r=e.anchorEl,i=e.anchorRect,a=e.popoverRef,c=e.recalcPositioning,l=t||{},u=l.anchor,s=l.popover,f=l.window,p=(0,n.useRef)({isFirstRun:!0}),d=(0,o.ZC)(i);(0,n.useLayoutEffect)(function(){var t=new ResizeObserver(function(){p.current.isFirstRun?p.current.isFirstRun=!1:c()});return u&&r&&t.observe(r),s&&t.observe(a.current),function(){t.disconnect()}},[u,s,t,a,c,r,i]),(0,n.useLayoutEffect)(function(){return f?(window.addEventListener("resize",c),function(){window.removeEventListener("resize",c)}):function(){}},[f,c]),(0,n.useLayoutEffect)(function(){u&&i&&d&&(i.width!==d.width||i.height!==d.height||i.x!==d.x||i.y!==d.y)&&c()},[u,i,d,c])}},7723(t,e,r){"use strict";r.d(e,{J:()=>o.A,Y:()=>n.A});var n=r(70373),o=r(31016)},8680(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(96540),o=r(10489),i=r(90764);const a=function(t){var e=t.id,r=(0,n.useRef)(e||(0,o.A)()),a="js--scroll-lock-".concat(r.current);return(0,n.useEffect)(function(){var t=document.body;return t.classList.add(a),function(){t.classList.remove(a)}},[a]),n.createElement(i.k,{$bodyClassName:a})}},8887(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(t){function e(t,n,l,u,p){for(var d,m,h,y,w,E=0,j=0,S=0,O=0,L=0,A=0,F=h=d=0,T=0,M=0,J=0,U=0,R=l.length,$=R-1,G="",z="",B="",q="";T<R;){if(m=l.charCodeAt(T),T===$&&0!==j+O+S+E&&(0!==j&&(m=47===j?10:47),O=S=E=0,R++,$++),0===j+O+S+E){if(T===$&&(0<M&&(G=G.replace(f,"")),0<G.trim().length)){switch(m){case 32:case 9:case 59:case 13:case 10:break;default:G+=l.charAt(T)}m=59}switch(m){case 123:for(d=(G=G.trim()).charCodeAt(0),h=1,U=++T;T<R;){switch(m=l.charCodeAt(T)){case 123:h++;break;case 125:h--;break;case 47:switch(m=l.charCodeAt(T+1)){case 42:case 47:t:{for(F=T+1;F<$;++F)switch(l.charCodeAt(F)){case 47:if(42===m&&42===l.charCodeAt(F-1)&&T+2!==F){T=F+1;break t}break;case 10:if(47===m){T=F+1;break t}}T=F}}break;case 91:m++;case 40:m++;case 34:case 39:for(;T++<$&&l.charCodeAt(T)!==m;);}if(0===h)break;T++}if(h=l.substring(U,T),0===d&&(d=(G=G.replace(s,"").trim()).charCodeAt(0)),64===d){switch(0<M&&(G=G.replace(f,"")),m=G.charCodeAt(1)){case 100:case 109:case 115:case 45:M=n;break;default:M=N}if(U=(h=e(n,M,h,m,p+1)).length,0<I&&(w=c(3,h,M=r(N,G,J),n,_,k,U,m,p,u),G=M.join(""),void 0!==w&&0===(U=(h=w.trim()).length)&&(m=0,h="")),0<U)switch(m){case 115:G=G.replace(x,a);case 100:case 109:case 45:h=G+"{"+h+"}";break;case 107:h=(G=G.replace(v,"$1 $2"))+"{"+h+"}",h=1===P||2===P&&i("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=G+h,112===u&&(z+=h,h="")}else h=""}else h=e(n,r(n,G,J),h,u,p+1);B+=h,h=J=M=F=d=0,G="",m=l.charCodeAt(++T);break;case 125:case 59:if(1<(U=(G=(0<M?G.replace(f,""):G).trim()).length))switch(0===F&&(d=G.charCodeAt(0),45===d||96<d&&123>d)&&(U=(G=G.replace(" ",":")).length),0<I&&void 0!==(w=c(1,G,n,t,_,k,z.length,u,p,u))&&0===(U=(G=w.trim()).length)&&(G="\0\0"),d=G.charCodeAt(0),m=G.charCodeAt(1),d){case 0:break;case 64:if(105===m||99===m){q+=G+l.charAt(T);break}default:58!==G.charCodeAt(U-1)&&(z+=o(G,d,m,G.charCodeAt(2)))}J=M=F=d=0,G="",m=l.charCodeAt(++T)}}switch(m){case 13:case 10:47===j?j=0:0===1+d&&107!==u&&0<G.length&&(M=1,G+="\0"),0<I*D&&c(0,G,n,t,_,k,z.length,u,p,u),k=1,_++;break;case 59:case 125:if(0===j+O+S+E){k++;break}default:switch(k++,y=l.charAt(T),m){case 9:case 32:if(0===O+E+j)switch(L){case 44:case 58:case 9:case 32:y="";break;default:32!==m&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===O+j+E&&(M=J=1,y="\f"+y);break;case 108:if(0===O+j+E+C&&0<F)switch(T-F){case 2:112===L&&58===l.charCodeAt(T-3)&&(C=L);case 8:111===A&&(C=A)}break;case 58:0===O+j+E&&(F=T);break;case 44:0===j+S+O+E&&(M=1,y+="\r");break;case 34:case 39:0===j&&(O=O===m?0:0===O?m:O);break;case 91:0===O+j+S&&E++;break;case 93:0===O+j+S&&E--;break;case 41:0===O+j+E&&S--;break;case 40:0===O+j+E&&(0===d&&(2*L+3*A==533||(d=1)),S++);break;case 64:0===j+S+O+E+F+h&&(h=1);break;case 42:case 47:if(!(0<O+E+S))switch(j){case 0:switch(2*m+3*l.charCodeAt(T+1)){case 235:j=47;break;case 220:U=T,j=42}break;case 42:47===m&&42===L&&U+2!==T&&(33===l.charCodeAt(U+2)&&(z+=l.substring(U,T+1)),y="",j=0)}}0===j&&(G+=y)}A=L,L=m,T++}if(0<(U=z.length)){if(M=n,0<I&&void 0!==(w=c(2,z,M,t,_,k,U,u,p,u))&&0===(z=w).length)return q+z+B;if(z=M.join(",")+"{"+z+"}",0!==P*C){switch(2!==P||i(z,2)||(C=0),C){case 111:z=z.replace(b,":-moz-$1")+z;break;case 112:z=z.replace(g,"::-webkit-input-$1")+z.replace(g,"::-moz-$1")+z.replace(g,":-ms-input-$1")+z}C=0}}return q+z+B}function r(t,e,r){var o=e.trim().split(h);e=o;var i=o.length,a=t.length;switch(a){case 0:case 1:var c=0;for(t=0===a?"":t[0]+" ";c<i;++c)e[c]=n(t,e[c],r).trim();break;default:var l=c=0;for(e=[];c<i;++c)for(var u=0;u<a;++u)e[l++]=n(t[u]+" ",o[c],r).trim()}return e}function n(t,e,r){var n=e.charCodeAt(0);switch(33>n&&(n=(e=e.trim()).charCodeAt(0)),n){case 38:return e.replace(y,"$1"+t.trim());case 58:return t.trim()+e.replace(y,"$1"+t.trim());default:if(0<1*r&&0<e.indexOf("\f"))return e.replace(y,(58===t.charCodeAt(0)?"":"$1")+t.trim())}return t+e}function o(t,e,r,n){var a=t+";",c=2*e+3*r+4*n;if(944===c){t=a.indexOf(":",9)+1;var l=a.substring(t,a.length-1).trim();return l=a.substring(0,t).trim()+l+";",1===P||2===P&&i(l,1)?"-webkit-"+l+l:l}if(0===P||2===P&&!i(a,1))return a;switch(c){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(L,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return d.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(e=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(e)){case 226:l=a.replace(w,"tb");break;case 232:l=a.replace(w,"tb-rl");break;case 220:l=a.replace(w,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(e=(a=t).length-10,c=(l=(33===a.charCodeAt(e)?a.substring(0,e):a).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<c?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(j,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(j,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===O.test(t))return 115===(l=t.substring(t.indexOf(":")+1)).charCodeAt(0)?o(t.replace("stretch","fill-available"),e,r,n).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===r+n&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+a}return a}function i(t,e){var r=t.indexOf(1===e?":":"{"),n=t.substring(0,3!==e?r:10);return r=t.substring(r+1,t.length-1),F(2!==e?n:n.replace(S,"$1"),r,e)}function a(t,e){var r=o(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return r!==e+";"?r.replace(E," or ($1)").substring(4):"("+e+")"}function c(t,e,r,n,o,i,a,c,l,s){for(var f,p=0,d=e;p<I;++p)switch(f=A[p].call(u,t,d,r,n,o,i,a,c,l,s)){case void 0:case!1:case!0:case null:break;default:d=f}if(d!==e)return d}function l(t){return void 0!==(t=t.prefix)&&(F=null,t?"function"!=typeof t?P=1:(P=2,F=t):P=0),l}function u(t,r){var n=t;if(33>n.charCodeAt(0)&&(n=n.trim()),n=[n],0<I){var o=c(-1,r,n,n,_,k,0,0,0,0);void 0!==o&&"string"==typeof o&&(r=o)}var i=e(N,n,r,0,0);return 0<I&&void 0!==(o=c(-2,i,n,n,_,k,i.length,0,0,0))&&(i=o),C=0,k=_=1,i}var s=/^\0+/g,f=/[\0\r\f]/g,p=/: */g,d=/zoo|gra/,m=/([,: ])(transform)/g,h=/,\r+?/g,y=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,g=/::(place)/g,b=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,j=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,O=/stretch|:\s*\w+\-(?:conte|avail)/,L=/([^-])(image-set\()/,k=1,_=1,C=0,P=1,N=[],A=[],I=0,F=null,D=0;return u.use=function t(e){switch(e){case void 0:case null:I=A.length=0;break;default:if("function"==typeof e)A[I++]=e;else if("object"==typeof e)for(var r=0,n=e.length;r<n;++r)t(e[r]);else D=0|!!e}return t},u.set=l,void 0!==t&&l(t),u}},9472(t,e,r){"use strict";r(96540)},10489(t,e,r){"use strict";r.d(e,{A:()=>n});const n=function(){return Date.now().toString(36)+Math.random().toString(36).slice(2)}},13768(t,e,r){"use strict";r.d(e,{D0:()=>c,KB:()=>s,VY:()=>a,wi:()=>u,yY:()=>l});var n=r(79056),o=r(28081),i=r(86951),a=n.default.p.withConfig({displayName:"Description",componentId:"sc-i2y7sb-0"})(["margin:0 0 12px 0;"]),c=(0,n.default)(i.A).withConfig({displayName:"Field",componentId:"sc-i2y7sb-1"})(["width:100%;text-overflow:ellipsis;"]),l=(0,n.default)(o.A).withConfig({displayName:"SaveButton",componentId:"sc-i2y7sb-2"})(["",""],function(t){return t.$isLoading&&(0,n.css)(["& span{opacity:0;}"])}),u=n.default.div.withConfig({displayName:"Footer",componentId:"sc-i2y7sb-3"})(["display:flex;justify-content:space-between;align-items:center;"]),s=n.default.div.withConfig({displayName:"ButtonsWrap",componentId:"sc-i2y7sb-4"})(["display:flex;justify-content:space-between;align-items:center;gap:0.5rem;margin-left:auto;"])},14554(t,e,r){"use strict";r.d(e,{D:()=>n,N:()=>o});var n=r(96540).createContext({}),o=n.Provider},20158(t,e,r){"use strict";r(96540)},20230(t,e,r){"use strict";r.d(e,{d:()=>n});var n=r(79056).default.a.withConfig({displayName:"ButtonAction",componentId:"sc-sle5ki-0"})(["display:inline-flex;align-items:center;height:28px;padding-top:0;padding-bottom:0;white-space:nowrap;text-decoration:none;&:hover{font-family:'ProximaNova',Helvetica,sans-serif;font-size:14px;text-decoration:none;}"])},20339(t,e,r){"use strict";r.d(e,{Y:()=>u,f:()=>l});var n=r(96540),o=r(5338),i=r(61206);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}var l=i.F,u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.targetNode,r=t.initProps,l=void 0===r?{}:r,u=l.targetUserData,s=l.customProps,f=void 0===s?{}:s;if(!e)throw new Error("SubscribeBtn2022:initOnNode:targetNode is not provided");if(!u)throw new Error("SubscribeBtn2022:initOnNode:targetUserData is not provided");e.innerHTML="";var p=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==a(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===a(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({targetUserData:u},f);(0,o.createRoot)(e).render(n.createElement(i.F,p))};LJ.define("LJ.Components.SubscribeBtn2022"),LJ.Components.SubscribeBtn2022.initOnNode=u},22068(t,e,r){"use strict";r.d(e,{Mn:()=>o,c9:()=>a,jZ:()=>i});var n=r(79056),o=n.default.a.withConfig({displayName:"Userhead",componentId:"sc-7u2ddd-0"})(["margin:0 !important;padding:0 !important;border:0 !important;"]),i=n.default.a.withConfig({displayName:"Username",componentId:"sc-7u2ddd-1"})(["text-decoration:none;color:#00A3D9;"]),a=n.default.span.withConfig({displayName:"LjUser",componentId:"sc-7u2ddd-2"})(["position:static !important;display:inline !important;width:auto !important;height:auto !important;margin:0 !important;padding:0 !important;border:0 !important;background:transparent !important;white-space:nowrap !important;font-style:normal !important;","{margin-right:4px !important;}"],o)},22799(t,e){"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,s=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case s:case f:case i:case c:case a:case d:return t;default:switch(t=t&&t.$$typeof){case u:case p:case y:case h:case l:return t;default:return e}}case o:return e}}}function E(t){return x(t)===f}e.AsyncMode=s,e.ConcurrentMode=f,e.ContextConsumer=u,e.ContextProvider=l,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Lazy=y,e.Memo=h,e.Portal=o,e.Profiler=c,e.StrictMode=a,e.Suspense=d,e.isAsyncMode=function(t){return E(t)||x(t)===s},e.isConcurrentMode=E,e.isContextConsumer=function(t){return x(t)===u},e.isContextProvider=function(t){return x(t)===l},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return x(t)===p},e.isFragment=function(t){return x(t)===i},e.isLazy=function(t){return x(t)===y},e.isMemo=function(t){return x(t)===h},e.isPortal=function(t){return x(t)===o},e.isProfiler=function(t){return x(t)===c},e.isStrictMode=function(t){return x(t)===a},e.isSuspense=function(t){return x(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===c||t===a||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===y||t.$$typeof===h||t.$$typeof===l||t.$$typeof===u||t.$$typeof===p||t.$$typeof===g||t.$$typeof===b||t.$$typeof===w||t.$$typeof===v)},e.typeOf=x},24582(t,e,r){"use strict";r.d(e,{FQ:()=>s,aF:()=>a,az:()=>c,hJ:()=>i,nB:()=>l,wi:()=>u});var n=r(79056),o=r(83581),i=(r(32231),n.default.div.withConfig({displayName:"Overlay",componentId:"sc-1jopm0p-0"})(["position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0,0,0,.4);opacity:",";z-index:5000;&::before{position:fixed;top:-1px;left:-1px;width:1px;height:1px;background-color:rgba(255,255,255,0);content:'';}"],function(t){return t.$show?.5:0})),a=n.default.div.withConfig({displayName:"Modal",componentId:"sc-1jopm0p-1"})(['position:relative;max-width:650px;display:flex;align-items:center;min-height:calc(100% - 3.5rem);height:calc(100% - 3.5rem);width:100%;margin:1.75rem auto;padding:1rem;font:400 16px/1 "ProximaNova",Helvetica,sans-serif;letter-spacing:0;color:#15374C;-webkit-font-smoothing:antialiased;pointer-events:none;z-index:5000;']),c=n.default.div.withConfig({displayName:"Box",componentId:"sc-1jopm0p-2"})(["overflow:hidden;position:relative;display:flex;flex-direction:column;width:100%;max-height:min(580px,100%);border-radius:8px;background-color:#fff;box-shadow:0px 2px 6px rgba(0,0,0,0.16),0px 4px 16px rgba(0,0,0,0.12);pointer-events:auto;"]),l=n.default.div.withConfig({displayName:"Body",componentId:"sc-1jopm0p-3"})(["display:flex;flex-direction:column;flex:1 1 auto;padding:0 24px 6px;overflow-y:auto;&:last-child{padding-bottom:16px;}@media ","{padding:0 16px 6px;&:last-child{padding-bottom:16px;}}"," "," .modal--iframe &{padding-right:0;}"],o.j.maxMobileL,function(t){return t.$isBodyScrollable&&"border-bottom: 1px solid #E5EBEE;"},function(t){return t.$bodyScrollTop&&"border-top: 1px solid #E5EBEE;"}),u=n.default.footer.withConfig({displayName:"Footer",componentId:"sc-1jopm0p-4"})(["flex-shrink:0;padding:10px 24px 16px;@media ","{padding:10px 16px 16px;}"],o.j.maxMobileL),s=(n.default.div.withConfig({displayName:"ButtonsRow",componentId:"sc-1jopm0p-5"})(["display:flex;flex-flow:row wrap;justify-content:flex-end;margin:-5px;"]),n.default.div.withConfig({displayName:"ButtonsRowItem",componentId:"sc-1jopm0p-6"})(["padding:5px;"]),n.default.p.withConfig({displayName:"Text",componentId:"sc-1jopm0p-7"})(["margin:0;margin-bottom:0.5rem;"]),n.default.div.withConfig({displayName:"ModalWrapper",componentId:"sc-1jopm0p-8"})(["position:fixed;top:0;left:0;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;z-index:5000;box-sizing:border-box;*{box-sizing:inherit;}&:before{box-sizing:inherit;}&:after{box-sizing:inherit;}.borderTop{border-top:1px solid #E5EBEE;}.borderBottom{border-bottom:1px solid #E5EBEE;}"]))},25439(t,e,r){"use strict";r.d(e,{AM:()=>i,Cl:()=>a,_3:()=>c});var n=r(79056),o=r(69710),i=(0,n.default)(o.A).withConfig({displayName:"Popover",componentId:"sc-1vwzq8j-0"})(["z-index:5000;width:200px;&.basepopup--fix-bug{font:400 14px/1.6 ProximaNova,Helvetica,sans-serif !important;white-space:normal !important;@media (max-width:400px){position:absolute;}}& .basepopup__list{margin:0 -2px;padding:0 2px;}@media (max-width:400px){position:fixed;}"]),a=(n.default.div.withConfig({displayName:"Modal",componentId:"sc-1vwzq8j-1"})(["font:400 16px/1.2 'ProximaNova',Helvetica,sans-serif;letter-spacing:0;color:#333;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-size-adjust:100%;A,BUTTON,LABEL{font:400 16px/1.2 'ProximaNova',Helvetica,sans-serif;border:0;}"]),n.default.div.withConfig({displayName:"ButtonItem",componentId:"sc-1vwzq8j-2"})(["color:",";.basepopup-selector__text{display:flex;align-items:center;svg{display:block;margin-right:4px;}}"],function(t){var e=t.remoteIsPaid,r=t.isPaidItem;return e||!r?"":"#a2a2a2"})),c=n.default.a.withConfig({displayName:"LinkText",componentId:"sc-1vwzq8j-3"})(["border:0 !important;font:inherit;color:inherit !important;text-transform:none !important;text-decoration:none !important;"]);n.default.div.withConfig({displayName:"Footer",componentId:"sc-1vwzq8j-4"})(["text-align:right;"])},26508(t,e,r){"use strict";r.d(e,{n:()=>i});var n=r(79056),o=r(83581),i=n.default.button.withConfig({displayName:"CloseBtn",componentId:"sc-100e668-0"})(["position:absolute;top:12px;right:16px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;margin:0;padding:4px;border:none;border-radius:4px;background:none;transition:background-color 0.15s linear;cursor:pointer;&:hover{background-color:hsl(197deg 8% 10% / 5%);}&:active{background-color:hsl(197deg 8% 10% / 10%);}&:focus{outline:none;}&:focus-visible{outline:2px solid #00a3d9;border-radius:2px;}svg{width:24px;height:24px;fill:#272C2E !important;}@media ","{right:8px;}"],o.j.maxMobileL)},27374(t,e,r){"use strict";r(96540)},28081(t,e,r){"use strict";r.d(e,{A:()=>c});var n=r(96540),o=r(3451),i=["children","type","onClick","isLoading","disabled","primary","sizeL","noBorder","hasOutline","linkType","text","className","size"];function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a.apply(this,arguments)}const c=function(t){var e=t.children,r=t.type,c=void 0===r?"button":r,l=t.onClick,u=t.isLoading,s=t.disabled,f=t.primary,p=t.sizeL,d=t.noBorder,m=t.hasOutline,h=t.linkType,y=t.text,v=t.className,g=t.size,b=void 0===g?"medium":g,w=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,i);return n.createElement(o.$,a({type:c||"button",onClick:l,$isLoading:u,disabled:s,$primary:f,$sizeL:p,$noBorder:d,$hasOutline:m,$linkType:h,$text:y,className:v,$size:b},w),u&&n.createElement(o.a,null,n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"svgicon flaticon flaticon--preloader",width:"14",height:"14"},n.createElement("use",{xlinkHref:"#flaticon--preloader"}))),e)}},31016(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(96540),o=r(92968),i=r(26508);const a=function(t){var e=t.onClick;return n.createElement(i.n,{className:"svgicon flaticon flaticons-v2--cross","aria-label":"Close","aria-required":"true",onClick:e},n.createElement(o.A,{width:"16",height:"16",xlinkHref:"flaticons-v2--cross"}))}},32231(t,e,r){"use strict";r.d(e,{VY:()=>a,Y9:()=>c,hE:()=>i});var n=r(79056),o=r(83581),i=n.default.h2.withConfig({displayName:"Title",componentId:"sc-kjq3xj-0"})(['margin:0 !important;padding:0 !important;font:bold 24px/1.2 "ProximaNova",Helvetica,sans-serif !important;color:#000 !important;',""],function(t){return t.$withCloseBtn&&(0,n.css)(["padding-right:30px !important;"])}),a=n.default.p.withConfig({displayName:"Description",componentId:"sc-kjq3xj-1"})(['margin:8px 0 0 !important;padding:0 !important;font:400 16px/1.2 "ProximaNova",Helvetica,sans-serif !important;color:#333333 !important;']),c=n.default.header.withConfig({displayName:"Header",componentId:"sc-kjq3xj-2"})(["position:relative;flex-shrink:0;margin-bottom:0;padding:16px 24px;@media ","{padding:16px;}"],o.j.maxMobileL)},35849(t,e,r){"use strict";r.d(e,{l8:()=>o.A,mc:()=>n.A});var n=r(4178),o=r(81987);r(40921)},37695(t,e,r){"use strict";r(96540)},38228(t,e,r){"use strict";r.d(e,{DD:()=>o,NM:()=>n,NT:()=>i});var n=[{name:"topStart",edge:"top",align:"start",axis:"x",placement:{x:"alignLeftEdges",y:"above"},arrow:{edge:"bottom",align:"left"}},{name:"top",edge:"top",align:"center",axis:"x",placement:{x:"alignCenters",y:"above"},arrow:{edge:"bottom",align:"center"}},{name:"topEnd",edge:"top",align:"end",axis:"x",placement:{x:"alignRightEdges",y:"above"},arrow:{edge:"bottom",align:"right"}},{name:"bottomStart",edge:"bottom",align:"start",axis:"x",placement:{x:"alignLeftEdges",y:"below"},arrow:{edge:"top",align:"left"}},{name:"bottom",edge:"bottom",align:"center",axis:"x",placement:{x:"alignCenters",y:"below"},arrow:{edge:"top",align:"center"}},{name:"bottomEnd",edge:"bottom",align:"end",axis:"x",placement:{x:"alignRightEdges",y:"below"},arrow:{edge:"top",align:"right"}},{name:"leftStart",edge:"left",align:"start",axis:"y",placement:{x:"left",y:"alignTopEdges"},arrow:{edge:"right",align:"top"}},{name:"left",edge:"left",align:"center",axis:"y",placement:{x:"left",y:"alignCenters"},arrow:{edge:"right",align:"center"}},{name:"leftEnd",edge:"left",align:"end",axis:"y",placement:{x:"left",y:"alignBottomEdges"},arrow:{edge:"right",align:"bottom"}},{name:"rightStart",edge:"right",align:"start",axis:"y",placement:{x:"right",y:"alignTopEdges"},arrow:{edge:"left",align:"top"}},{name:"right",edge:"right",align:"center",axis:"y",placement:{x:"right",y:"alignCenters"},arrow:{edge:"left",align:"center"}},{name:"rightEnd",edge:"right",align:"end",axis:"y",placement:{x:"right",y:"alignBottomEdges"},arrow:{edge:"left",align:"bottom"}}],o=Object.fromEntries(n.map(function(t){return[t.name,t.placement]})),i={placement:o.bottomStart,position:{x:-1e3,y:-1e3},margins:{},overflowFixParams:{enabled:!0,safeEdgePad:25,canUseAltEdge:!0,canUseAltAxis:!0,excludePlacements:[]}}},39316(t,e,r){"use strict";r.d(e,{A:()=>o});var n=/^((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|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)-.*))$/;const o=function(){var t=Object.create(null);return function(e){return void 0===t[e]&&(t[e]=(r=e,n.test(r)||111===r.charCodeAt(0)&&110===r.charCodeAt(1)&&r.charCodeAt(2)<91)),t[e];var r}}()},40457(t,e,r){"use strict";r.d(e,{p:()=>o});var n=r(79056),o=n.default.input.withConfig({displayName:"Input",componentId:"sc-1li98b0-0"})(["height:28px;padding:0 12px;box-sizing:border-box;background-color:#FFFFFF;border:1px solid #D4DCE0;border-radius:4px;vertical-align:middle;font:inherit;font-size:14px;line-height:22px;color:#333333;transition:border-color .2s;&:hover{border-color:#BDC8CD;}&:active{border-color:#0996C5;}&:focus{outline:none;border-color:#00A3D9;}&:disabled{opacity:.5;cursor:not-allowed;}",""],function(t){var e=t.$size;return{medium:(0,n.css)(["height:32px;font-size:14px;"]),large:(0,n.css)(["height:36px;font-size:16px;"])}[e]})},40921(t,e,r){"use strict";r.d(e,{A:()=>s,D:()=>i.D});var n=r(96540),o=r(40961),i=r(83659);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==a(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===a(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const s=function(t){var e,r,a=t.anchorEl,c=t.anchorRect,s=t.popoverRef,f=t.containerRef,p=t.placement,d=t.margins,m=t.overflowFixParams,h=t.withArrow,y=t.positioningGetter,v=(e=(0,n.useState)({arrow:null,position:{x:-1e3,y:-1e3}}),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=v[0],b=v[1],w=(0,n.useRef)(null),x=(0,n.useCallback)(function(){var t;w.current&&cancelAnimationFrame(w.current);var e={anchorRect:c||(null==a?void 0:a.getBoundingClientRect()),objectRect:null===(t=s.current)||void 0===t?void 0:t.getBoundingClientRect()},r="function"==typeof y?y(e):(0,i.o)(l(l({},e),{},{container:null==f?void 0:f.current,placement:p,margins:d,overflowFixParams:m,withArrow:h}));w.current=requestAnimationFrame(function(){(0,o.flushSync)(function(){b(function(t){return t.position.x===r.position.x&&t.position.y===r.position.y?t:r}),w.current=null})})},[a,c,s,f,p,d,m,h,y]);return(0,n.useEffect)(function(){return function(){w.current&&cancelAnimationFrame(w.current)}},[]),[g,x]}},41169(t,e,r){"use strict";var n,o,i,a,c=!(null!==(n=Site.journal)&&void 0!==n&&n.is_friend)&&!(null!==(o=Site.journal)&&void 0!==o&&o.is_subscriber)&&((null===(i=Site.remote)||void 0===i?void 0:i.is_friend)||(null===(a=Site.remote)||void 0===a?void 0:a.is_subscriber));function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==l(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===l(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}LJ.define("LJ.UserRelations");var f=!1,p={},d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).silent,n=s(s({},p[t]||{}),e);p[t]=n,r||LJ.Event.trigger("UserRelations/".concat(t,"/changed"),n)},m=function(t){var e=p[t];return e&&s({},e)};LJ.UserRelations.init=function(){if(!f&&Site.remote){if(Site.journal&&Site.journal.username!==Site.remote.username){var t={isInSubscriptionList:Site.journal.is_subscriber,isInFriendList:Site.journal.is_friend,friendGroupsData:[],isCommunity:Site.journal.is_community,isFollowerOfRemote:c,remoteIsCommunityOwner:"owner"===Site.journal.community_relation,remoteIsCommunityMember:Site.journal.is_community&&Site.journal.is_member,joinRequestPending:Site.journal.is_invite_sent&&Site.journal.is_friend,isBannedInCommunity:Site.journal.is_banned};t.isCommunity&&(t.isInSubscriptionList=Site.journal.is_friend),d(Site.journal.username,t,{silent:!0})}LJ.UserRelations.patch=d,LJ.UserRelations.getUserRelations=m,LJ.Event.on("relations.changed",function(t){var e=t.data,r=t.username,n=e.is_subscriber,o=e.is_friend,i=e.is_member,a=e.is_invite_sent,c=m(r),l={isInSubscriptionList:n,isInFriendList:o,remoteIsCommunityMember:i,joinRequestPending:a&&o,isFollowerOfRemote:!(o||n||!Site.remote.is_friend&&!Site.remote.is_subscriber)};null!=c&&c.isCommunity&&(l.isInSubscriptionList=o),d(r,l)}),f=!0}},r(74536);var h=r(96540),y=r(5338),v=r(92968),g=140;function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function w(){w=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:_(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function g(){}function x(){}var E={};u(E,a,function(){return this});var j=Object.getPrototypeOf,S=j&&j(j(I([])));S&&S!==r&&n.call(S,a)&&(E=S);var O=x.prototype=v.prototype=Object.create(E);function L(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function k(t,e){function r(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==b(s)&&n.call(s,"__await")?e.resolve(s.__await).then(function(t){r("next",t,a,c)},function(t){r("throw",t,a,c)}):e.resolve(s).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,c)})}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function _(e,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(b(e)+" is not iterable")}return g.prototype=x,o(O,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:g,configurable:!0}),g.displayName=u(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,u(t,l,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},L(k.prototype),u(k.prototype,c,function(){return this}),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},L(O),u(O,l,"Generator"),u(O,a,function(){return this}),u(O,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function x(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function E(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){x(i,n,o,a,c,"next",t)}function c(t){x(i,n,o,a,c,"throw",t)}a(void 0)})}}var j=function(){var t=E(w().mark(function t(e){var r,n,o;return w().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.username,n={user:r},t.next=4,LJ.Api.callP("user.get_achievements",n);case 4:return o=t.sent,t.abrupt("return",o);case 6:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),S=function(){var t=E(w().mark(function t(e,r,n){var o,i;return w().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o={journal:e,vgift_id:r,mark:n},t.next=3,LJ.Api.callP("user.achievement_congratulate",o).catch(function(t){LJ.Messages.error(t.message)});case 3:return i=t.sent,t.abrupt("return",i);case 5:case"end":return t.stop()}},t)}));return function(e,r,n){return t.apply(this,arguments)}}(),O=function(){var t=E(w().mark(function t(e){var r,n;return w().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r={vgift_id:e},t.next=3,LJ.Api.callP("user.achievement_levels",r).catch(function(t){LJ.Messages.error(t.message)});case 3:return n=t.sent,t.abrupt("return",n);case 5:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),L=r(28081),k=r(79056),_=(0,k.keyframes)(["0%{background-position:-468px 0;}100%{background-position:468px 0;}"]),C=(0,k.css)(["width:100%;border-radius:4px;background:gray;background:linear-gradient(to right,rgba(130,130,130,0.2) 8%,rgba(130,130,130,0.3) 18%,rgba(130,130,130,0.2) 33%);background-size:920px 425px;animation:"," 4s infinite ease-out;"],_),P=k.default.div.withConfig({displayName:"Card",componentId:"sc-2gadkc-0"})(["display:flex;align-items:center;width:100%;& + &{margin-top:8px;}"]),N=k.default.div.withConfig({displayName:"Image",componentId:"sc-2gadkc-1"})(["",";flex-shrink:0;width:100px;height:100px;margin-right:10px;border-radius:50%;"],C),A=k.default.div.withConfig({displayName:"Content",componentId:"sc-2gadkc-2"})(["display:flex;flex-direction:column;justify-content:center;gap:4px;flex:1;"]),I=k.default.div.withConfig({displayName:"Name",componentId:"sc-2gadkc-3"})(["",";height:20px;"],C),F=k.default.div.withConfig({displayName:"Text",componentId:"sc-2gadkc-4"})(["",";height:40px;"],C),D=k.default.div.withConfig({displayName:"Date",componentId:"sc-2gadkc-5"})(["",";height:16px;"],C),T=k.default.div.withConfig({displayName:"Button",componentId:"sc-2gadkc-6"})(["",";width:70px;height:28px;margin-top:16px;"],C),M=function(){return h.createElement(P,null,h.createElement(N,null),h.createElement(A,null,h.createElement(I,null),h.createElement(F,null),h.createElement(D,null)))},J=function(){return h.createElement(T,null)},U=k.default.dl.withConfig({displayName:"Details",componentId:"sc-a3vroj-0"})(["margin:0;padding:0;text-align:left;"]),R=k.default.div.withConfig({displayName:"Item",componentId:"sc-a3vroj-1"})(["display:flex;align-items:center;& + &{marign-top:20px;}"]),$=k.default.div.withConfig({displayName:"ItemIllustration",componentId:"sc-a3vroj-2"})(["margin-right:10px;flex-shrink:0;color:#333;svg{width:100px;height:100px;color:#E6EFF2;}"]),G=k.default.div.withConfig({displayName:"ItemInfo",componentId:"sc-a3vroj-3"})([""]),z=k.default.dt.withConfig({displayName:"ItemName",componentId:"sc-a3vroj-4"})(["margin:0;padding:0;font-size:16px;line-height:1.2;font-weight:700;color:#333;"]),B=k.default.dd.withConfig({displayName:"ItemText",componentId:"sc-a3vroj-5"})(["margin:0;margin-top:4px;padding:0;font-size:14px;line-height:1.2;font-weight:400;color:#333;"]),q=k.default.time.withConfig({displayName:"ItemDate",componentId:"sc-a3vroj-6"})(["display:block;margin-top:4px;font-size:13px;line-height:1.2;font-weight:400;color:#7A9199;"]),H=k.default.div.withConfig({displayName:"Buttons",componentId:"sc-a3vroj-7"})(["display:flex;align-items:center;justify-content:space-between;gap:8px 16px;&:not(:empty){margin-top:16px;}"]);function Y(t){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(t)}function W(){W=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,a,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=b.prototype=v.prototype=Object.create(w);function S(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Y(s)&&n.call(s,"__await")?e.resolve(s.__await).then(function(t){r("next",t,a,c)},function(t){r("throw",t,a,c)}):e.resolve(s).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,c)})}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Y(e)+" is not iterable")}return g.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(O.prototype),u(O.prototype,c,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(j),u(j,l,"Generator"),u(j,a,function(){return this}),u(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Z(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function V(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||X(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(t,e){if(t){if("string"==typeof t)return K(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(t,e):void 0}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Q=Site.locale.includes("ru")?"ru":"en";const tt=function(t){var e,r=t.achievementData,n=t.handleCloseDetails,o=r.vgift_id,i=r.max_level,a=V((0,h.useState)([]),2),c=a[0],l=a[1],u=V((0,h.useState)(!1),2),s=u[0],f=u[1];return(0,h.useEffect)(function(){var t=function(){var t,e=(t=W().mark(function t(){var e,r;return W().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,f(!0),t.next=4,O(o);case 4:e=t.sent,r=e.levels,l(r),f(!1),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),f(!1);case 13:case"end":return t.stop()}},t,null,[[0,10]])}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){Z(i,n,o,a,c,"next",t)}function c(t){Z(i,n,o,a,c,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}();t()},[o]),s?h.createElement(h.Fragment,null,(e=Array(i),function(t){if(Array.isArray(t))return K(t)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||X(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(t,e){return h.createElement(M,{key:e})}),h.createElement(J,null)):h.createElement(h.Fragment,null,h.createElement(U,null,c.map(function(t){return h.createElement(R,{key:t.vgift_id},h.createElement($,null,t.achieved?h.createElement("img",{src:t.image_small,width:"100",height:"100",alt:t.display}):h.createElement(v.A,{xlinkHref:"flaticons-v2--lock"})),h.createElement(G,null,h.createElement(z,null,t.display),h.createElement(B,null,t.description),t.date?h.createElement(q,{datetime:t.date},LJ.ml("ljcom.userinfo.achievements.congratulate.progress.card.date",{date:moment(t.date).locale(Q).format("MMM DD, YYYY")})):null))})),h.createElement(H,null,h.createElement(L.A,{primary:!0,onClick:n},LJ.ml("ljcom.userinfo.achievements.congratulate.button.close"))))};var et,rt=r(62600),nt=r(52464),ot=r(83659),it=(0,k.default)(L.A).withConfig({displayName:"CongratulateRemove",componentId:"sc-1bwxldm-0"})(["display:flex;align-items:center;padding:4px;font-size:13px;line-height:1;font-weight:600;transition:background-color 0.15s linear;cursor:pointer;"]),at=Site.journal.username===(null===(et=Site.remote)||void 0===et?void 0:et.username),ct=Site.journal.username;const lt=function(t){var e=t.onlyCurrentUserCongratulated,r=t.vgiftId,n=t.toggleCongratulate;return at?LJ.ml("ljcom.userinfo.achievements.congratulate.info.text"):e?h.createElement(it,{type:"button",text:!0,"aria-label":LJ.ml("ljcom.userinfo.achievements.congratulate.button.remove.aria_label"),onClick:function(){return n(ct,r,1)}},LJ.ml("ljcom.userinfo.achievements.congratulate.info.text.congratilated.you",{username:ct})):h.createElement(h.Fragment,null,h.createElement(it,{type:"button",text:!0,"aria-label":LJ.ml("ljcom.userinfo.achievements.congratulate.button.remove.aria_label"),onClick:function(){return n(ct,r,1)}},LJ.ml("ljcom.userinfo.achievements.congratulate.info.text.congratilated.you")),LJ.ml("ljcom.userinfo.achievements.congratulate.info.text.congratilated"))};var ut,st=r(81834),ft=k.default.div.withConfig({displayName:"ImageWrapper",componentId:"sc-ndtudq-0"})([".svgicon{width:auto;height:120px;fill:#E6EFF2;}"]),pt=k.default.img.withConfig({displayName:"Image",componentId:"sc-ndtudq-1"})(["width:140px;height:140px;object-fit:cover;object-position:center;"]),dt=k.default.p.withConfig({displayName:"Description",componentId:"sc-ndtudq-2"})(["margin:10px 0;font-size:14px;line-height:17px;color:",";"],function(t){return t.$isLock?"#7A9199":"#333333"}),mt=k.default.div.withConfig({displayName:"ProgressIndicator",componentId:"sc-ndtudq-3"})(["margin:10px 0;"]),ht=k.default.div.withConfig({displayName:"ProgressIndicatorText",componentId:"sc-ndtudq-4"})(["margin-bottom:4px;font-size:14px;font-weight:400;text-align:center;color:#333333;"]),yt=k.default.div.withConfig({displayName:"ProgressIndicatorRange",componentId:"sc-ndtudq-5"})(["--progress:0;position:relative;width:200px;height:4px;border-radius:6px;background-color:#E6EFF2;box-shadow:0 0 0 1px #E6EFF2;overflow:hidden;&::before{content:'';position:absolute;top:0;left:0;bottom:0;width:var(--progress);border-radius:inherit;background:#1B6785;background:linear-gradient(90deg,rgba(27,103,133,1) 0%,rgba(36,138,178,1) 100%);}"]),vt=k.default.p.withConfig({displayName:"Date",componentId:"sc-ndtudq-6"})(["margin:0 0 16px;text-transform:capitalize;font-size:13px;line-height:16px;color:#7A9199;"]),gt=(0,k.default)(L.A).withConfig({displayName:"CongratulateButton",componentId:"sc-ndtudq-7"})(["display:flex;align-items:center;padding:4px;font-size:13px;line-height:1;font-weight:600;transition:background-color 0.15s linear;cursor:pointer;svg{width:24px;height:24px;margin-left:4px;transform:translateY(-2px);}"]),bt=k.default.div.withConfig({displayName:"CongratulateCount",componentId:"sc-ndtudq-8"})(["margin:0;margin-right:-4px;padding:0 4px;border:0;font-size:13px;line-height:1;font-weight:600;background-color:transparent;"]),wt=k.default.div.withConfig({displayName:"CongratulateInfo",componentId:"sc-ndtudq-9"})(["position:relative;display:flex;align-items:center;margin:0;padding:0;font-size:13px;line-height:1;font-weight:600;color:#333333;svg{width:24px;height:24px;margin-left:4px;transform:translateY(-2px);}"]),xt=k.default.button.withConfig({displayName:"CongratulateInfoCount",componentId:"sc-ndtudq-10"})(["margin:0 4px;padding:0;border:0;font:inherit;color:inherit;background-color:transparent;"]),Et=k.default.div.withConfig({displayName:"Buttons",componentId:"sc-ndtudq-11"})(["display:flex;align-items:center;justify-content:space-between;gap:8px 16px;&:not(:empty){margin-top:16px;}"]),jt=k.default.div.withConfig({displayName:"Popup",componentId:"sc-ndtudq-12"})(["position:absolute;display:flex;flex-direction:column;padding:5px 0 8px;border-radius:4px;text-align:left;background-color:#00303F;z-index:5000;",' a{display:block;padding:4px 8px;font-size:12px;line-height:1.2;font-weight:400;color:#fff;&:hover{text-decoration:underline;}}&::before{content:"";position:absolute;top:-18px;left:-8px;right:-8px;bottom:-8px;cursor:default;z-index:-1;}&::after{content:"";position:absolute;left:50%;width:0;height:0;display:block;border:4px solid transparent;transform:translateX(-50%);'," ","}"],function(t){var e=t.$position;return e&&(0,k.css)(["top:","px;left:","px;"],e.y,e.x)},function(t){return"top"===t.$arrowPosition&&(0,k.css)(["top:-4px;border-top:0;border-bottom-color:#00303F;"])},function(t){return"bottom"===t.$arrowPosition&&(0,k.css)(["bottom:-4px;border-bottom:0;border-top-color:#00303F;"])}),St=(0,k.default)(st.Ay).withConfig({displayName:"Modal",componentId:"sc-ndtudq-13"})(["max-width:500px;"]),Ot=k.default.ul.withConfig({displayName:"ModalWrapper",componentId:"sc-ndtudq-14"})(["display:flex;flex-direction:column;margin:0;padding:0;"]),Lt=k.default.li.withConfig({displayName:"User",componentId:"sc-ndtudq-15"})(["display:flex;align-items:center;gap:8px;padding:8px 0;list-style:none;border-bottom:1px solid #D4DCE0;&:last-child{border:none;}"]),kt=k.default.img.withConfig({displayName:"UserPic",componentId:"sc-ndtudq-16"})(["display:block;width:32px;height:32px;border-radius:4px;object-fit:cover;"]),_t=k.default.button.withConfig({displayName:"MoreButton",componentId:"sc-ndtudq-17"})(["margin:0;padding:4px 8px;font-size:12px;line-height:1.2;border:none;background-color:transparent;cursor:pointer;color:#FFFFFF;&:hover,&:focus{text-decoration:underline;}"]);function Ct(t){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(t)}function Pt(){Pt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,a,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=b.prototype=v.prototype=Object.create(w);function S(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ct(s)&&n.call(s,"__await")?e.resolve(s.__await).then(function(t){r("next",t,a,c)},function(t){r("throw",t,a,c)}):e.resolve(s).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,c)})}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ct(e)+" is not iterable")}return g.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(O.prototype),u(O.prototype,c,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(j),u(j,l,"Generator"),u(j,a,function(){return this}),u(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function At(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==Ct(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==Ct(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Ct(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function It(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function Ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Dt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Tt=Site.locale.includes("ru")?"ru":"en",Mt=encodeURIComponent,Jt=Site.journal.username===(null===(ut=Site.remote)||void 0===ut?void 0:ut.username),Ut=!LJ.get("page.ljold"),Rt=LJ.Support.isMobile(),$t=Site.remote;const Gt=function(t){var e=t.achievementData,r=void 0===e?{}:e,n=t.setAchievementData,o=void 0===n?function(){}:n,i=t.handleShowDetails,a=r.display,c=r.image_large,l=r.description,u=r.achieved,s=r.level,f=r.max_level,p=r.date,d=r.vgift_id,m=r.congratulation,y=m.congratulated,g=m.users,b=Ft((0,h.useState)(!1),2),w=b[0],x=b[1],E=Ft((0,h.useState)(!1),2),j=E[0],O=E[1],k=(0,h.useRef)(null),_=(0,h.useRef)(null),C=Ft((0,h.useState)({x:-1e3,y:-1e3}),2),P=C[0],N=C[1],A=(0,h.useCallback)(function(){var t,e,r=(0,ot.o)({anchorRect:null===(t=_.current)||void 0===t?void 0:t.getBoundingClientRect(),objectRect:null===(e=k.current)||void 0===e?void 0:e.getBoundingClientRect(),placement:ot.D.bottom,margins:{y:4}}).position;N(r)},[]),I={title:Mt(LJ.ml("ljcom.userinfo.achievements.post.title",{name:a})),body:Mt("\n      <img src=".concat(c," />\n      <blockquote>").concat(l,"</blockquote>\n    "))},F=Ut&&!Rt?"".concat(Site.siteroot,"/post?title=").concat(I.title,"&htmlContent=").concat(I.body):"".concat(Site.siteroot,"/update.bml?subject=").concat(I.title,"&event=").concat(I.body),D=0===g.length&&y,T=function(){var t,e=(t=Pt().mark(function t(e,r,n){return Pt().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,S(e,r,n);case 3:if(t.sent){t.next=6;break}return t.abrupt("return");case 6:o(function(t){return t.map(function(t){return t.isActive?At(At({},t),{},{congratulation:At(At({},t.congratulation),{},{congratulated:!t.congratulation.congratulated})}):At({},t)})}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),LJ.Messages.add({type:"error",body:t.t0.message});case 12:case"end":return t.stop()}},t,null,[[0,9]])}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){It(i,n,o,a,c,"next",t)}function c(t){It(i,n,o,a,c,"throw",t)}a(void 0)})});return function(t,r,n){return e.apply(this,arguments)}}();return(0,h.useEffect)(function(){w&&A()},[w,A]),h.createElement(h.Fragment,null,h.createElement(ft,null,u?h.createElement(pt,{src:c,width:"140",height:"140",alt:a}):h.createElement(v.A,{xlinkHref:"flaticon--lock"})),h.createElement(dt,{dangerouslySetInnerHTML:{__html:l},$isLock:!u}),Jt&&f?h.createElement(mt,null,h.createElement(ht,null,LJ.ml("ljcom.userinfo.achievements.congratulate.progress.from",{currentLevel:s,maxLevel:f})),h.createElement(yt,{style:{"--progress":"".concat(100*s/f,"%")}})):null,Jt&&u?h.createElement(vt,null,LJ.ml("ljcom.userinfo.achievements.received_date",{date:moment(p).locale(Tt).format("MMM DD, YYYY")})):null,!$t||Jt||y?null:h.createElement(wt,null,h.createElement(gt,{type:"button",text:!0,"aria-label":LJ.ml("ljcom.userinfo.achievements.congratulate.button.aria_label",{user:Site.journal.username}),onClick:function(){return T(Site.journal.username,d,0)}},LJ.ml("ljcom.userinfo.achievements.congratulate.button.text")),g.length>0&&h.createElement(bt,{ref:_,tabIndex:0,onMouseEnter:function(){return x(!0)},onMouseLeave:function(){return x(!1)}},g.length),h.createElement(v.A,{width:"24",height:"24",xlinkHref:"flaticons-v2--spec-boom"})),y||Jt&&g.length&&!y?h.createElement(wt,null,h.createElement(lt,{onlyCurrentUserCongratulated:D,vgiftId:d,toggleCongratulate:T}),!D&&h.createElement(xt,{ref:_,onMouseEnter:function(){return x(!0)},onMouseLeave:function(){return x(!1)}},g.length),h.createElement(v.A,{width:"24",height:"24",xlinkHref:"flaticons-v2--spec-boom"})):null,w&&h.createElement(rt.Z,null,h.createElement(jt,{$position:P,ref:k,onMouseEnter:function(){return x(!0)},onMouseLeave:function(){return x(!1)}},g.slice(0,5).map(function(t){return h.createElement("a",{href:t.profile_url,key:t.id},t.display_username)}),g.length>5&&h.createElement(_t,{type:"button",onClick:function(){return O(!0)}},LJ.ml("ljcom.userinfo.achievements.congratulate.popup.more",{count:g.length-5})))),Jt&&h.createElement(Et,null,f?h.createElement(L.A,{noBorder:!0,onClick:i},LJ.ml("ljcom.userinfo.achievements.congratulate.button.more")):null,u?h.createElement(L.A,{as:"a",href:F,primary:!0},LJ.ml("ljcom.userinfo.achievements.congratulate.button.share")):null),j&&h.createElement(St,{title:LJ.ml("ljcom.userinfo.achievements.congratulate.modal.title",{count:g.length}),onClose:function(){return O(!1)}},h.createElement(Ot,null,g.map(function(t){return h.createElement(Lt,{key:t.id},h.createElement("a",{href:t.profile_url,target:"_blank"},t.userpic_url&&h.createElement(kt,{src:t.userpic_url,alt:t.display_username})),h.createElement(nt.c,{userData:{username:t.username,displayUsername:t.display_username,journalUrl:t.journal_url,profileUrl:t.profile_url}}))}))))};var zt=(0,k.default)(st.Ay).withConfig({displayName:"Wrapper",componentId:"sc-1l6wbxb-0"})(["max-width:",";text-align:center;"],function(t){return t.$isShowDetails?"540px":"380px"}),Bt=k.default.div.withConfig({displayName:"Body",componentId:"sc-1l6wbxb-1"})(["display:flex;flex-direction:column;align-items:center;"]);function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const Ht=function(t){var e,r,n=t.onClose,o=t.data,i=void 0===o?{}:o,a=t.setData,c=void 0===a?function(){}:a,l=(e=(0,h.useState)(!1),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return qt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qt(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=l[0],s=l[1];return h.createElement(zt,{title:u?LJ.ml("ljcom.userinfo.achievements.congratulate.levels.title"):i.display,onClose:n,$isShowDetails:u},h.createElement(Bt,null,u?h.createElement(tt,{achievementData:i,setDataAchievement:c,handleCloseDetails:function(){return s(!1)}}):h.createElement(Gt,{achievementData:i,setAchievementData:c,handleShowDetails:function(){return s(!0)}})))};var Yt=k.default.div.withConfig({displayName:"Wrapper",componentId:"sc-1z32z2-0"})(["display:inline-flex;svg{display:block;width:",";height:",";animation:svgrotate .57s linear infinite;}@keyframes svgrotate{100%{transform:rotate(360deg);}}"],function(t){var e=t.$size;return"".concat(e,"px")},function(t){var e=t.$size;return"".concat(e,"px")});var Wt,Zt=k.default.div.withConfig({displayName:"Wrapper",componentId:"sc-16m5tup-0"})(["position:relative;display:flex;justify-content:center;align-items:center;gap:10px;margin-bottom:4px;background:#FFFFFF;"]),Vt=(0,k.default)(({className:t,size:e=16})=>h.createElement(Yt,{className:t,$size:e},h.createElement("svg",{viewBox:"0 0 31 31",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h.createElement("g",{fillRule:"evenodd"},h.createElement("path",{d:"M15.5,31 C24.0604136,31 31,24.0604136 31,15.5 C31,6.93958638 24.0604136,0 15.5,0 C6.93958638,0 0,6.93958638 0,15.5 C0,24.0604136 6.93958638,31 15.5,31 Z M15.5,24 C20.1944204,24 24,20.1944204 24,15.5 C24,10.8055796 20.1944204,7 15.5,7 C10.8055796,7 7,10.8055796 7,15.5 C7,20.1944204 10.8055796,24 15.5,24 Z",fill:"#00AFEA"}),h.createElement("path",{d:"M15.7960584,7.00505942 L15.8509795,0.00389541322 C20.1020367,0.0983450811 23.9309467,1.90428116 26.675877,4.7598713 L26.675877,4.7598713 L21.7412314,9.72958246 C20.2508535,8.11838542 18.1443589,7.08544079 15.7960584,7.00505942 Z",fill:"#346B7C"}))))).withConfig({displayName:"SliderLoader",componentId:"sc-16m5tup-1"})(["svg{width:30px;height:30px;}"]),Xt=k.default.button.withConfig({displayName:"SliderNavButton",componentId:"sc-16m5tup-2"})(["display:flex;justify-content:center;align-items:center;margin-bottom:24px;padding:0 16px;height:100px;border:none;border-radius:50%;background:#FFFFFF;text-align:center;cursor:pointer;svg{width:12px;height:60px;fill:#7A9199;transition:fill .2s;}&[disabled]{opacity:0;pointer-events:none;visibility:hidden;}"]),Kt=k.default.ul.withConfig({displayName:"List",componentId:"sc-16m5tup-3"})(["display:flex;gap:40px;width:100%;margin:0;padding:0;overflow-x:auto;list-style:none;"]),Qt=k.default.li.withConfig({displayName:"ListItem",componentId:"sc-16m5tup-4"})([""]),te=k.default.button.withConfig({displayName:"AchievementCard",componentId:"sc-16m5tup-5"})(["display:inline-block;width:100px;margin:0;padding:0;border:0;color:#333333;vertical-align:top;text-align:center;background-color:transparent;cursor:pointer;&:hover{color:#00A3D9;}&:actove{color:#0086B3;}&:focus{outline:none;}&:focus-visible{outline:2px solid #00A3D9;outline-offset:-2px;}"]),ee=k.default.img.withConfig({displayName:"AchievementImage",componentId:"sc-16m5tup-6"})(["width:100px;height:100px;"]),re=(0,k.default)(v.A).withConfig({displayName:"AchievementPlaceholderImage",componentId:"sc-16m5tup-7"})(["width:100px;height:100px;fill:#E6EFF2;"]),ne=k.default.h3.withConfig({displayName:"AchievementName",componentId:"sc-16m5tup-8"})(["margin:0;padding:0;font-size:12px;line-height:1.2;font-weight:400;color:inherit;"]),oe=k.default.h3.withConfig({displayName:"AchievementPlaceholderName",componentId:"sc-16m5tup-9"})(["margin:0;padding:0;font-size:12px;line-height:1.2;font-weight:400;color:#7A9199;"]);function ie(t){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(t)}function ae(){ae=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,a,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=b.prototype=v.prototype=Object.create(w);function S(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==ie(s)&&n.call(s,"__await")?e.resolve(s.__await).then(function(t){r("next",t,a,c)},function(t){r("throw",t,a,c)}):e.resolve(s).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,c)})}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ie(e)+" is not iterable")}return g.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(O.prototype),u(O.prototype,c,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(j),u(j,l,"Generator"),u(j,a,function(){return this}),u(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function ce(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function le(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function ue(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?le(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==ie(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ie(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function se(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return fe(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fe(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var pe=Site.journal.username===(null===(Wt=Site.remote)||void 0===Wt?void 0:Wt.username);const de=function(){var t=se((0,h.useState)([]),2),e=t[0],r=t[1],n=se((0,h.useState)(!1),2),o=n[0],i=n[1],a=se((0,h.useState)(!1),2),c=a[0],l=a[1],u=se((0,h.useState)(!1),2),s=u[0],f=u[1],p=(0,h.useRef)(null),d=se((0,h.useState)({isShow:!1}),2),m=d[0],y=d[1],b=new URLSearchParams(window.location.search).get("vgift_id"),w=function(t){r(function(e){return e.map(function(e){return e.vgift_id===t?ue(ue({},e),{},{isActive:!0}):ue({},e)})}),y({isShow:!0})},x=(0,h.useMemo)(function(){return e.filter(function(t){return t.isActive})[0]},[e]);return(0,h.useEffect)(function(){var t=function(){var t,e=(t=ae().mark(function t(){var e,n;return ae().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,f(!0),t.next=4,j({username:Site.journal.username});case 4:e=t.sent,n=e.achievements,r(n),f(!1),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),f(!1);case 13:case"end":return t.stop()}},t,null,[[0,10]])}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){ce(i,n,o,a,c,"next",t)}function c(t){ce(i,n,o,a,c,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}();t()},[]),(0,h.useEffect)(function(){if(p.current&&e.length){var t=new ResizeObserver(function(){p.current.clientWidth<p.current.scrollWidth&&l(!0)});return t.observe(p.current),function(){t.disconnect()}}},[e.length]),(0,h.useEffect)(function(){if(b&&e.length){var t=e.filter(function(t){return t.vgift_id===b});if(!t.length)return;w(t[0].vgift_id),document.querySelector("#about").scrollIntoView(),window.history.replaceState({},document.title,window.location.pathname)}},[b,e]),s?h.createElement(Zt,null,h.createElement(Vt,null)):h.createElement(Zt,null,h.createElement(Xt,{type:"button",onClick:function(){var t=p.current.scrollLeft;p.current.scroll({left:(Math.trunc(t/g)-1)*g,behavior:"smooth"})},"aria-label":LJ.ml("ljcom.userinfo.achievements.slider.button.left"),disabled:!o},h.createElement(v.A,{xlinkHref:"flaticon--arrow-left"})),h.createElement(Kt,{className:"m-scrollbar",ref:p,onScroll:function(){var t=p.current.lastChild.getBoundingClientRect(),e=t.left,r=t.width,n=p.current.firstChild.getBoundingClientRect().left,o=p.current.getBoundingClientRect(),a=o.left,c=o.width;a+c>=e+r-1?l(!1):a+c<e+r&&(l(!0),a>n?i(!0):n<=a&&i(!1))}},e.filter(function(t){return Boolean(t.achieved)||pe}).map(function(t){return h.createElement(Qt,{key:t.vgift_id},h.createElement(te,{type:"button","aria-label":"".concat(LJ.ml("ljcom.userinfo.achievements.card")," ").concat(t.display),onClick:function(){return w(t.vgift_id)}},t.achieved?h.createElement(h.Fragment,null,h.createElement(ee,{src:t.image_small}),h.createElement(ne,null,t.display)):h.createElement(h.Fragment,null,h.createElement(re,{xlinkHref:"flaticon--lock"}),h.createElement(oe,null,t.display))))})),h.createElement(Xt,{type:"button",onClick:function(){var t=p.current.scrollLeft;p.current.scroll({left:(Math.trunc(t/g)+1)*g,behavior:"smooth"})},"aria-label":LJ.ml("ljcom.userinfo.achievements.slider.button.right"),disabled:!c},h.createElement(v.A,{xlinkHref:"flaticon--arrow-right"})),m.isShow&&h.createElement(Ht,{data:x,setData:r,onClose:function(){y({isShow:!1}),r(function(t){return t.map(function(t){return t.isActive?ue(ue({},t),{},{isActive:!1}):ue({},t)})})}}))};LJ.define("LJ.Profile.Achievements"),LJ.Profile.Achievements.init=function(){LJ.Util.DOM.initPromise.then(function(){var t=document.querySelector("[data-achievements-mount]");t&&(0,y.createRoot)(t).render(h.createElement(de,null))})};var me=r(87202),he=r(20339),ye=r(80074),ve=r(14554),ge=r(69710),be=k.default.div.withConfig({displayName:"Wrapper",componentId:"sc-3oa966-0"})(["position:relative;display:flex;align-items:center;justify-content:flex-start;"]),we=k.default.label.withConfig({displayName:"Slider",componentId:"sc-3oa966-1"})(['box-sizing:border-box;display:block;width:40px;height:24px;padding:1px;border:1px solid #DFE6E8;border-radius:12px;background-color:#F5F7F8;transition:border-width .15s,border-color .15s,background-color .15s;cursor:pointer;&:before{content:"";display:block;width:20px;height:20px;box-shadow:0 0 2px 0 rgb(0 0 0 / 8%),0 4px 8px 0 rgb(0 0 0 / 12%);border-radius:10px;background-color:#fff;transition:margin .2s;}']),xe=k.default.label.withConfig({displayName:"Label",componentId:"sc-3oa966-2"})(["word-break:break-word;font-size:14px;line-height:16px;color:#000000;"," ",""],function(t){return"left"===t.$labelPosition&&(0,k.css)(["order:0;margin-right:12px;"])},function(t){return"right"===t.$labelPosition&&(0,k.css)(["order:1;margin-left:12px;"])}),Ee=k.default.input.withConfig({displayName:"Control",componentId:"sc-3oa966-3"})(["position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;white-space:nowrap;clip-path:inset(100%);clip:rect(0 0 0 0);overflow:hidden;&:checked ~ ","{border-color:transparent;background-color:#00A3D9;}&:checked ~ ","::before{margin-left:16px;}&:hover ~ ","{border-color:#BDC8CD;}&:focus ~ ","{border-color:#00C0FF;}&:checked:hover ~ ",",&:checked:focus ~ ","{border-color:transparent;background-color:#00C0FF;}&:disabled{& ~ *{cursor:not-allowed;}& ~ ","{color:#8c969b;}& ~ ","{border:1px solid #DFE6E8;}&:checked ~ ","{background-color:#d5dde0;cursor:not-allowed;}}"],we,we,we,we,we,we,xe,we,we),je=["onChange","className","label","checked","id","labelPosition","disabled","autoFocus"];function Se(){return Se=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Se.apply(this,arguments)}const Oe=function(t){var e=t.onChange,r=t.className,n=t.label,o=t.checked,i=t.id,a=t.labelPosition,c=void 0===a?"left":a,l=t.disabled,u=t.autoFocus,s=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,je);return h.createElement(be,Se({className:r},s),h.createElement(Ee,{onChange:e,type:"checkbox",id:i,checked:o,disabled:l,autoFocus:u}),n&&h.createElement(xe,{htmlFor:i,$labelPosition:c},n),h.createElement(we,{htmlFor:i,$disabled:l}))};var Le=function(t){var e=t.onChange,r=t.event,n=t.description,o=t.method,i=t.id,a=t.isActive,c=t.isMobile,l=function(t){var n=t.target;e({event:r,method:o,isActive:n.checked})};return h.createElement(h.Fragment,null,!c&&h.createElement("label",{className:"lightcheckbox"},h.createElement("input",{className:"lightcheckbox__input",type:"checkbox",id:i,checked:a,onChange:l}),h.createElement("span",{className:"lightcheckbox__text"},n)),!!c&&h.createElement(Oe,{checked:a,onChange:l,label:n,id:i}))},ke=k.default.ul.withConfig({displayName:"List",componentId:"sc-10wr8u4-0"})(["list-style:none;margin:0;padding:0;",""],function(t){return t.$isMobile&&(0,k.css)(["& li:not(:last-of-type){margin-bottom:15px;}"])}),_e=k.default.li.withConfig({displayName:"ListItem",componentId:"sc-10wr8u4-1"})(["display:flex;align-items:center;flex-wrap:wrap;"]),Ce=(k.default.span.withConfig({displayName:"ItemDescription",componentId:"sc-10wr8u4-2"})(["font-size:14px;line-height:20px;font-weight:400;color:#333333;"]),k.default.span.withConfig({displayName:"PreloaderContainer",componentId:"sc-10wr8u4-3"})(["display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:8px;"]),k.default.div.withConfig({displayName:"ModalFooter",componentId:"sc-10wr8u4-4"})(["display:flex;justify-content:flex-end;"])),Pe=(k.default.button.withConfig({displayName:"Button",componentId:"sc-10wr8u4-5"})(["cursor:pointer;"]),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.onClose,r=t.onSubscriptionChange,n=t.subscriptions,o=t.targetNode,i=t.isGlued,a=LJ.Support.isMobile(),c=n.filter(function(t){return"newEntry"===t.event}).map(function(t){var e=t.event,n=t.method,o=t.description,i=t.isActive,c="".concat(e,"-").concat(n);return h.createElement(_e,{className:"basepopup__item",key:c},h.createElement(Le,{event:e,method:n,description:o,isMobile:a,onChange:r,isActive:i,id:c}))}),l=h.createElement(Ce,null,h.createElement(L.A,{onClick:e,type:"button",primary:!0,sizeL:!0},LJ.ml("notif_dropdown_2022.button")));return h.createElement(h.Fragment,null,!a&&h.createElement(ge.A,{className:(0,ye._)([i&&"basepopup--glued"]),anchorEl:o,placement:i?ge.c.bottomStart:ge.c.bottom,margins:{y:i?0:5},closeOnScroll:!0,withArrow:!i,onClose:e},h.createElement("div",{className:"basepopup__title"},LJ.ml("notif_dropdown_2022.title")),h.createElement(ke,null,c)),!!a&&h.createElement(st.Ay,{title:LJ.ml("notif_dropdown_2022.title"),onClose:e,footer:l,withCloseBtn:!1},h.createElement("div",{className:"basepopup__group"},h.createElement(ke,{$isMobile:a},c))))}),Ne=(0,k.keyframes)(["from{transform:translateY(0);opacity:1;}to{transform:translateY(10px);opacity:0;}"]),Ae=(0,k.default)(ge.A).withConfig({displayName:"Popover",componentId:"sc-128wtuh-0"})(["",""],function(t){var e=t.$animationDuration,r=t.$animationDelay;return(0,k.css)(["animation:"," ","ms linear ","ms forwards;"],Ne,e,r)}),Ie=k.default.button.withConfig({displayName:"CloseButton",componentId:"sc-128wtuh-1"})(["display:inline-flex;.svgicon{width:12px;height:12px;}"]),Fe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.onClose,r=t.targetNode,n=t.isGlued;return(0,h.useEffect)(function(){var t=setTimeout(function(){e()},3500);return function(){clearTimeout(t)}},[e]),h.createElement(Ae,{className:(0,ye._)([n&&"basepopup--glued"]),$animationDuration:500,$animationDelay:3e3,anchorEl:r,placement:n?ge.c.bottomStart:ge.c.bottom,margins:{y:n?0:5},withArrow:!n,onClose:e},h.createElement(Ie,{onClick:e,className:"basepopup__close",type:"button"},h.createElement(v.A,{className:"basepopup__close-icon",xlinkHref:"flaticon--cross-2"})),h.createElement("p",null,LJ.ml("notif_dropdown_tip")))};function De(t){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},De(t)}function Te(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Me(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Te(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==De(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==De(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===De(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Je(){Je=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,a,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=b.prototype=v.prototype=Object.create(w);function S(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==De(s)&&n.call(s,"__await")?e.resolve(s.__await).then(function(t){r("next",t,a,c)},function(t){r("throw",t,a,c)}):e.resolve(s).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,c)})}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(De(e)+" is not iterable")}return g.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(O.prototype),u(O.prototype,c,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(j),u(j,l,"Generator"),u(j,a,function(){return this}),u(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Ue(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function Re(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){Ue(i,n,o,a,c,"next",t)}function c(t){Ue(i,n,o,a,c,"throw",t)}a(void 0)})}}function $e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ge(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ge(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ge(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ze={active:"flaticon--bell-active",inactive:"flaticon--bell"},Be=function t(e){var r=e.targetUsername,n=e.className,o=e.isShown,i=e.text,a=e.theme,c=void 0===a?"light":a,l=e.gluePopups,u=e.id,s=$e((0,h.useState)(o),2),f=s[0],p=s[1],d=(0,h.useState)(function(){return function(t){var e=LJ.Misc.NotifSubs.getUserSubs(t,"newEntry");return[{event:"newEntry",method:"notifCenter",description:LJ.ml("notif_dropdown_2022.notify.in.notif.center"),isActive:null==e?void 0:e.includes("notifCenter"),requestTimeout:null},{event:"newEntry",method:"email",description:LJ.ml("notif_dropdown_2022.notify.in.email"),isActive:null==e?void 0:e.includes("email"),requestTimeout:null}]}(r)}),m=$e(d,2),y=m[0],v=m[1],g=$e((0,h.useState)(null),2),b=g[0],w=g[1],x=$e((0,h.useState)(!1),2),E=x[0],j=x[1],S=$e((0,h.useState)(!1),2),O=S[0],L=S[1],k=(0,h.useRef)(u||"".concat(t.name,":").concat(+new Date)),_=function(){L(!1)},C=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};j(!1);var e={type:"error",body:t.message||LJ.ml("common.something_went_wrong")};LJ.Messages.add(e)};if((0,h.useEffect)(function(){E&&_()},[E]),(0,h.useEffect)(function(){var t=function(t){var e=t.value;if(t.source!==k.current){var r=y.map(function(t){return"newEntry"!==t.event?t:Me(Me({},t),{},{isActive:e.includes(t.method)})});v(r)}};return LJ.Event.on("NotifSubs/".concat(r,"/newEntry/changed"),t),function(){LJ.Event.off("NotifSubs/".concat(r,"/newEntry/changed"),t)}},[y,r]),(0,h.useEffect)(function(){return LJ.Event.on("NotifSubBtn2022.requestShow",function(){p(!0)}),LJ.Event.on("NotifSubBtn2022.requestHide",function(){p(!1)}),function(){LJ.Event.off("NotifSubBtn2022.requestShow"),LJ.Event.off("NotifSubBtn2022.requestHide")}},[]),(0,h.useEffect)(function(){var t=function(){j(!1)};return LJ.Event.on("controlstrip::dropdownHideRequest",t),LJ.Event.on("notificationCenter::dropdownHideRequest",t),function(){LJ.Event.off("controlstrip::dropdownHideRequest",t),LJ.Event.off("notificationCenter::dropdownHideRequest",t)}},[]),(0,h.useEffect)(function(){var t=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).compId===k.current&&L(!0)};return LJ.Event.on("NotifSubBtn2022.notifTip.requestShow",t),function(){LJ.Event.off("NotifSubBtn2022.notifTip.requestShow",t)}},[]),!f)return null;var P=y.some(function(t){return t.isActive}),N=ze[P?"active":"inactive"];return h.createElement(ve.N,{value:c},h.createElement("button",{type:"button","aria-haspopup":"true","aria-expanded":E?"true":"false",ref:function(t){w(t)},onClick:function(){j(function(t){return!t})},className:(0,ye._)(["notification-button",n])},h.createElement("svg",{className:(0,ye._)(["svgicon","flaticon",N])},h.createElement("use",{xlinkHref:"#".concat(N)})),i&&h.createElement("span",null,i)),b&&E&&h.createElement(Pe,{subscriptions:y,onSubscriptionChange:function(t){var e=t.event,n=t.method,o=t.isActive,i=y.find(function(t){return t.event===e&&t.method===n}),a=i.requestTimeout;a&&clearTimeout(a);var c=setTimeout(Re(Je().mark(function t(){var i;return Je().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=o?LJ.Misc.NotifSubs.requestSubNotifAdd:LJ.Misc.NotifSubs.requestSubNotifDelete,t.prev=1,t.next=4,i(e,n,r,{source:k.current});case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),C();case 9:case"end":return t.stop()}},t,null,[[1,6]])})),500),l=y.map(function(t){return t===i?Me(Me({},i),{},{isActive:o,requestTimeout:c}):t});v(l)},onClose:function(){j(!1)},isGlued:l,targetNode:b,targetUsername:r}),b&&O&&h.createElement(Fe,{onClose:_,isGlued:l,targetNode:b}))};function qe(t){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qe(t)}function He(){He=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,a,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=b.prototype=v.prototype=Object.create(w);function S(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==qe(s)&&n.call(s,"__await")?e.resolve(s.__await).then(function(t){r("next",t,a,c)},function(t){r("throw",t,a,c)}):e.resolve(s).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,c)})}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(qe(e)+" is not iterable")}return g.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(O.prototype),u(O.prototype,c,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(j),u(j,l,"Generator"),u(j,a,function(){return this}),u(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Ye(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function We(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ye(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==qe(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===qe(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ye(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Ze(t){return function(t){if(Array.isArray(t))return Ve(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ve(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ve(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ve(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Xe(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}var Ke=!1,Qe=null,tr=function(t){var e=LJ.Misc.NotifSubs.getUserSubs(t),r=[];return null!=e&&e.newEntry||r.push(LJ.Misc.NotifSubs.fetchUserSubs({event:"newEntry",username:t})),Promise.all(r)},er=function(t){LJ.Event.on("UserRelations/".concat(t,"/changed"),function(t){var e=t.isInSubscriptionList,r=t.isInFriendList;e||r?LJ.Event.trigger("NotifSubBtn2022.requestShow"):LJ.Event.trigger("NotifSubBtn2022.requestHide")}),Ke=!0},rr=function(){var t,e=(t=He().mark(function t(e,r){var n,o,i,a,c,l,u,s,f;return He().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Site.journal.username,c=null===(n=LJ.UserRelations)||void 0===n||null===(o=n.getUserRelations)||void 0===o?void 0:o.call(n,a),e&&a&&c){t.next=4;break}return t.abrupt("return");case 4:return Qe||(Qe=tr(a)),t.next=7,Qe;case 7:l=c.isInSubscriptionList,u=c.isInFriendList,s=document.createElement("div"),(i=s.classList).add.apply(i,Ze(e.classList)),f=We({targetUsername:a,isShown:!(!l&&!u),text:e.dataset.text,theme:e.dataset.theme,gluePopups:e.dataset.hasOwnProperty("gluePopups"),className:e.dataset.className||"",id:e.getAttribute("id")},r),e.replaceWith(s),(0,y.createRoot)(s).render(h.createElement(Be,f)),Ke||er(a);case 15:case"end":return t.stop()}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){Xe(i,n,o,a,c,"next",t)}function c(t){Xe(i,n,o,a,c,"throw",t)}a(void 0)})});return function(t,r){return e.apply(this,arguments)}}(),nr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Site.journal){var e=t.targetNode,r=t.initialUserData,n=t.initProps,o=void 0===n?{}:n;if(!e)throw new Error("SubscribeBtn2022:initSubscribeButton2022:targetNode is not provided");var i,a=o.targetUserData,l=void 0===a?r||((i={targetId:Site.journal.id,targetUsername:Site.journal.username,isInSubscriptionList:Site.journal.is_subscriber,isInFriendList:Site.journal.is_friend,friendGroupsData:[],isCommunity:Site.journal.is_community,isFollowerOfRemote:c,remoteIsCommunityOwner:"owner"===Site.journal.community_relation,remoteIsCommunityMember:Site.journal.is_community&&Site.journal.is_member,joinRequestPending:Site.journal.is_invite_sent&&Site.journal.is_friend,isBannedInCommunity:Site.journal.is_banned,isClosedCommunity:"closed"===Site.journal.community_membership,isSyndicated:Site.journal.is_syndicated,isNews:Site.journal.is_news}).isCommunity&&(i.isInSubscriptionList=Site.journal.is_friend),i):a,u={id:e.getAttribute("id")};e.closest(".js--controlstrip")&&(u.theme="dark",u.gluePopups=!0),e.removeAttribute("id"),e.classList.remove("lightbutton","lightbutton--blue"),he.Y({targetNode:e,initProps:{targetUserData:l,customProps:u}})}},or=(k.default.div.withConfig({displayName:"SuccessMsgPadder",componentId:"sc-152dpkr-0"})(["margin:200px auto;text-align:center;"]),k.default.div.withConfig({displayName:"SuccessMsgIcon",componentId:"sc-152dpkr-1"})(["font-size:30px;margin-bottom:25px;"]),(0,k.default)(nt.c).withConfig({displayName:"LjUser",componentId:"sc-152dpkr-2"})(["font-weight:inherit !important;text-transform:inherit !important;"])),ir=k.default.p.withConfig({displayName:"AboveInputHint",componentId:"sc-152dpkr-3"})(["margin:0px 4px 16px 0px;","{margin-left:4px !important;}"],or),ar=k.default.textarea.withConfig({displayName:"Input",componentId:"sc-152dpkr-4"})(['margin:0px 0px 16px;padding:12px 16px;min-height:100px;font:400 16px/1.2 "ProximaNova",Helvetica,sans-serif;background:#F5F7F8;border-radius:2px;resize:none;']),cr=k.default.div.withConfig({displayName:"BtnWrap",componentId:"sc-152dpkr-5"})(["display:flex;justify-content:right;align-items:center;"]),lr=(k.default.a.withConfig({displayName:"CancelButton",componentId:"sc-152dpkr-6"})(["margin-right:20px;font-weight:600;font-size:13px;line-height:16px;"]),k.default.div.withConfig({displayName:"ErrorMessage",componentId:"sc-152dpkr-7"})(["padding:0 8px 8px;font-size:12px;text-align:end;color:#CB1427;"]));function ur(t){return ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ur(t)}function sr(){sr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,a,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=b.prototype=v.prototype=Object.create(w);function S(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==ur(s)&&n.call(s,"__await")?e.resolve(s.__await).then(function(t){r("next",t,a,c)},function(t){r("throw",t,a,c)}):e.resolve(s).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,c)})}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ur(e)+" is not iterable")}return g.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(O.prototype),u(O.prototype,c,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(j),u(j,l,"Generator"),u(j,a,function(){return this}),u(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function fr(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function dr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pr(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==ur(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==ur(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ur(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pr(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function mr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var hr={error:null,message:"",isFetchMessage:!1};function yr(t){var e,r,n=t.isShown,o=t.afterSubmitCb,i=void 0===o?function(){}:o,a=t.handleCloseModal,c=void 0===a?function(){}:a,l=(e=(0,h.useState)(hr),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return mr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mr(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=l[0],s=l[1],f=(0,h.useRef)(null),p=u.message,d=(0,h.useCallback)(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(function(e){return dr(dr({},e),t)})},[]),m=(0,h.useCallback)(function(){d(hr)},[d]);(0,h.useEffect)(function(){n||m(),n&&f.current&&f.current.focus()},[n,m]);var y=function(){var t,e=(t=sr().mark(function t(){var e,r;return sr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(p){t.next=2;break}return t.abrupt("return");case 2:return d({isFetchMessage:!0,error:null}),t.prev=3,t.next=6,LJ.Api.callP("inbox.send_message",{recipients:Site.journal.username,body:p});case 6:m(),d({isFetchMessage:!1}),i(),e={type:"success",body:LJ.ml("send_message_form.successfully_sent")},LJ.Messages.add(e),setTimeout(function(){LJ.Messages.fadeOut(e)},3e3),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(3),d({isFetchMessage:!1,error:Array.isArray(t.t0.data)&&null!==(r=t.t0.data[0])&&void 0!==r&&r.error?t.t0.data[0].error:t.t0.message});case 17:case"end":return t.stop()}},t,null,[[3,14]])}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){fr(i,n,o,a,c,"next",t)}function c(t){fr(i,n,o,a,c,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}();if(!n)return null;var v=h.createElement(h.Fragment,null,h.createElement(ir,null,LJ.ml("send_message_form.send_to_user"),h.createElement(or,{userData:{username:Site.journal.display_username,userheadUrl:Site.journal.userhead_url,displayUsername:Site.journal.display_username,profileUrl:Site.journal.profile_url,journalUrl:Site.journal.journal_url}})),h.createElement(ar,{value:p,className:"lightinput",placeholder:LJ.ml("send_message_form.placeholder"),onChange:function(t){d({message:t.target.value})},onKeyDown:function(t){"Enter"===t.key&&t.ctrlKey&&y()},ref:f}),u.error&&h.createElement(lr,{dangerouslySetInnerHTML:{__html:u.error}})),g=h.createElement(cr,null,h.createElement(L.A,{sizeL:!0,primary:!0,type:"button",onClick:y,disabled:!u.message.length,isLoading:u.isFetchMessage},LJ.ml("send_message_form.submit")));return h.createElement(st.Ay,{title:LJ.ml("send_message_form.title"),onClose:c,footer:g},v)}function vr(t){return vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vr(t)}function gr(){gr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,a,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=b.prototype=v.prototype=Object.create(w);function S(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==vr(s)&&n.call(s,"__await")?e.resolve(s.__await).then(function(t){r("next",t,a,c)},function(t){r("throw",t,a,c)}):e.resolve(s).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,c)})}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(vr(e)+" is not iterable")}return g.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(O.prototype),u(O.prototype,c,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(j),u(j,l,"Generator"),u(j,a,function(){return this}),u(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function br(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}var wr=function(){var t,e=(t=gr().mark(function t(){var e,r,n,o,i;return gr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,LJ.Util.DOM.initPromise;case 2:e=document.querySelector(".js--send-message-btn"),r=document.createElement("div"),document.body.appendChild(r),n={},o=(0,y.createRoot)(r),i=function(){o.render(h.createElement(yr,n))},n={isShown:!1,afterSubmitCb:function(){n.isShown=!1,i()},handleCloseModal:function(){n.isShown=!1,i()}},e&&e.addEventListener("click",function(t){t.preventDefault(),n.isShown=!0,i()});case 10:case"end":return t.stop()}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){br(i,n,o,a,c,"next",t)}function c(t){br(i,n,o,a,c,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}();function xr(t){return xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xr(t)}function Er(){Er=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",h="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,a,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==r&&n.call(E,a)&&(w=E);var j=b.prototype=v.prototype=Object.create(w);function S(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==xr(s)&&n.call(s,"__await")?e.resolve(s.__await).then(function(t){r("next",t,a,c)},function(t){r("throw",t,a,c)}):e.resolve(s).then(function(t){u.value=t,a(u)},function(t){return r("throw",t,a,c)})}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=p;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?h:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=h,n.method="throw",n.arg=u.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(xr(e)+" is not iterable")}return g.prototype=b,o(j,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(O.prototype),u(O.prototype,c,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(j),u(j,l,"Generator"),u(j,a,function(){return this}),u(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function jr(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}var Sr,Or=function(){var t,e=(t=Er().mark(function t(){return Er().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,LJ.Util.DOM.initPromise;case 2:(document.querySelectorAll(".j-user-subscribe-btn")||[]).forEach(function(t){nr({targetNode:t})});case 4:case"end":return t.stop()}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){jr(i,n,o,a,c,"next",t)}function c(t){jr(i,n,o,a,c,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}();LJ.UserRelations.init(),LJ.Misc.NotifSubs.init(),LJ.Profile.Achievements.init(),Or(),(0,me._)(),(Sr=document.querySelectorAll("[data-notif-sub-btn-mount-point]")).length&&Sr.forEach(rr),wr(),LJ.Event.on("relations.changed",function(t){var e=t.action,r=t.username,n=t.source,o=t.data;if("SubscribeBtn2022"===n)if(Site.journal.is_community&&Site.journal.username===r&&["subscribe","unsubscribe","leaveComm"].includes(e))window.location.reload();else if(["subscribe","addToFriends"].includes(e)){var i=o.recommendations;setTimeout(function(){LJ.Event.trigger("SubRecommendModal.requestShow",{recommendations:i})},700)}})},44363(t,e,r){"use strict";t.exports=r(22799)},52464(t,e,r){"use strict";r.d(e,{c:()=>s});var n=r(96540),o=r(80074),i=r(22068);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==a(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===a(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var s=function(t){var e,r=t.className,a=t.linksTarget,l=void 0===a?"_self":a,s=t.noCtxPopup,f=void 0===s||s,p=t.userData,d=p.username,m=p.userheadUrl,h=p.displayName,y=p.displayUsername,v=p.profileUrl,g=p.journalUrl,b=p.journalType,w=p.isInvisible,x=u({as:v?"a":"span",className:"i-ljuser-profile"},v?{href:v,target:l}:{}),E=u({as:g?"a":"span",className:"i-ljuser-username"},g?{href:g,target:l,title:y}:{});return n.createElement(i.c9,{className:(0,o._)(["ljuser","i-ljuser",b&&"i-ljuser-type-".concat(b),w&&"i-ljuser-deleted"].concat((e=f?["i-ljuser-nopopup","noctxpopup"]:[],function(t){if(Array.isArray(t))return c(t)}(e)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[r])),"data-ljuser":d},m&&n.createElement(i.Mn,x,n.createElement("img",{className:"i-ljuser-userhead",src:m})),n.createElement(i.jZ,E,h||y))}},55153(t,e,r){"use strict";r.d(e,{W:()=>o});var n=r(96540),o=function(t,e){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).startImmediately,o=void 0!==r&&r;(0,n.useEffect)(function(){var r=function(r){t.current&&!t.current.contains(r.target)&&e(r)};return o?document.addEventListener("click",r):setTimeout(function(){document.addEventListener("click",r)}),function(){o?document.removeEventListener("click",r):setTimeout(function(){document.removeEventListener("click",r)})}},[t,e,o])}},55998(t,e,r){"use strict";r.d(e,{Z:()=>o});var n=r(96540),o=function(t){var e=(0,n.useRef)();return(0,n.useEffect)(function(){e.current=t},[t]),e.current}},58936(t,e,r){"use strict";r.d(e,{Vw:()=>u,ql:()=>l});var n=r(96540);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),c=new A(n||[]);return a(i,"_invoke",{value:_(t,r,c)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var m="suspendedStart",h="suspendedYield",y="executing",v="completed",g={};function b(){}function w(){}function x(){}var E={};f(E,l,function(){return this});var j=Object.getPrototypeOf,S=j&&j(j(I([])));S&&S!==r&&n.call(S,l)&&(E=S);var O=x.prototype=b.prototype=Object.create(E);function L(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function k(t,e){function r(i,a,c,l){var u=d(t[i],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,c,l)},function(t){r("throw",t,c,l)}):e.resolve(f).then(function(t){s.value=t,c(s)},function(t){return r("throw",t,c,l)})}l(u.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function _(e,r,n){var o=m;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var u=d(e,r,n);if("normal"===u.type){if(o=n.done?v:h,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[l];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(o(e)+" is not iterable")}return w.prototype=x,a(O,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},L(k.prototype),f(k.prototype,u,function(){return this}),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},L(O),f(O,s,"Generator"),f(O,l,function(){return this}),f(O,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}var c=function(){var t,e=(t=i().mark(function t(){var e,r,n,o,a,c,l,u,s,f,p,d,m,h,y=arguments;return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=(e=y.length>0&&void 0!==y[0]?y[0]:{}).reducerState,n=e.targetUserId,o=e.targetUsername,a=e.dispatch,!r.userNameDisplayData.isLoaded){t.next=4;break}return t.abrupt("return");case 4:if(c={fields:{display_username:!0,userhead_url:!0,profile_url:!0,journal_url:!0}},!n){t.next=9;break}c.targetid=n,t.next=14;break;case 9:if(!o){t.next=13;break}c.target=o,t.next=14;break;case 13:throw new Error("user.get target is not provided");case 14:return t.next=16,LJ.Api.callP("user.get",c);case 16:l=t.sent,u=l.user,s=u.username,f=u.display_username,p=u.userhead_url,d=u.profile_url,m=u.journal_url,h=u.id,a({type:"setUserNameDisplayData",value:{isLoaded:!0,username:s,displayUsername:f,userheadUrl:p,profileUrl:d,journalUrl:m,id:h}});case 21:case"end":return t.stop()}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function c(t){a(i,n,o,c,l,"next",t)}function l(t){a(i,n,o,c,l,"throw",t)}c(void 0)})});return function(){return e.apply(this,arguments)}}(),l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.reducerState,r=t.dispatch,n=t.targetUserId,o=t.targetUsername;return{userNameDisplayData:e.userNameDisplayData,savedUserNote:e.savedUserNote,onDropdownUserNoteBtnClick:function(){c({reducerState:e,targetUserId:n,targetUsername:o,dispatch:r}).then(function(){r({type:"showUserNoteModal"})}).catch(function(t){var e=t.message;LJ.Messages.error(LJ.ml("common.something_went_wrong")),console.error("SubscribeBtn2022/userNote/loadUserNameDisplayData: ".concat(e).trim())})},modal:{onClose:function(){r({type:"closeUserNoteModal"})},isShown:e.isUserNoteModalShown}}},u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.targetUserId,r=t.reducerState,o=t.dispatch;(0,n.useEffect)(function(){e&&r.hasShownDropdown&&!r.hasLoadedUserNote&&LJ.Api.callP("user.alias_get",{user_id:e}).then(function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).alias;o({type:"markUserNoteAsLoaded"}),o({type:"setSavedUserNote",value:t})})},[r.hasLoadedUserNote,r.hasShownDropdown,e,o])}},61206(t,e,r){"use strict";r.d(e,{F:()=>d});var n=r(96540),o=r(14554),i=r(85194),a=r(82595),c=r(58936);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==l(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===l(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.targetUserData,r=void 0===e?{}:e,l=t.theme,u=void 0===l?"light":l,p=t.gluePopups,d=t.onSubscribe,m=void 0===d?function(){}:d,h=t.id,y=f((0,n.useReducer)(a.F,a.u),2),v=y[0],g=y[1],b=f((0,n.useState)(r),2),w=b[0],x=b[1],E=f((0,n.useState)({componentId:h||Math.random().toString(36).substr(2,9)}),1)[0],j=r.targetId,S=w.targetUsername,O=w.isInSubscriptionList,L=w.friendGroupsData,k=w.isCommunity,_=E.componentId,C=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.username,n=e.data;if(r===S)if(n.is_invite_sent&&void 0===n.is_friend)x(s(s({},w),{},{joinRequestPending:!0}));else{var o=s(s({},w),{},{isInFriendList:n.is_friend,isInSubscriptionList:n.is_subscriber,remoteIsCommunityOwner:"owner"===(null===(t=Site.journal)||void 0===t?void 0:t.community_relation),remoteIsCommunityMember:n.is_member,joinRequestPending:n.is_invite_sent&&n.is_friend,isFollowerOfRemote:!n.is_friend&&!n.is_subscriber&&(n.is_subscriberof||n.is_friendof)});k&&(o.isInSubscriptionList=n.is_friend),x(o)}},P=function(t){(null==t?void 0:t.message)&&LJ.Messages.error(t.message)};if((0,n.useEffect)(function(){return LJ.Event.on("relations.changed",C),function(){LJ.Event.off("relations.changed",C)}}),(0,c.Vw)({targetUserId:j,reducerState:v,dispatch:g}),!S)return console.warn("SubscribeBtn2022: not enough data for render"),null;var N=function(t){LJ.Track.YM.call({method:"reachGoal",argArr:t})},A={onDropdownShow:function(){g({type:"markDropdownAsShown"})}},I=(0,c.ql)({reducerState:v,dispatch:g,targetUserId:j,targetUsername:S}),F=s(s(s({},A),w),{},{miscData:E,requestRelationActionCb:function(t){if("subscribe"===t){var e={target:S,is_subscriber:1,show_recommendations:!0};k&&delete e.is_subscriber,LJ.Api.callP("relations.addfriend",e).then(function(e){LJ.Event.trigger("relations.changed",{username:S,id:j,data:e,source:"SubscribeBtn2022",sourceCompId:_,action:t}),m()}).catch(P)}if("unsubscribe"===t){var r={target:S,is_subscriber:1};k&&delete r.is_subscriber,LJ.Api.call("relations.removefriend",r).then(function(e){LJ.Event.trigger("relations.changed",{username:S,id:j,data:e,source:"SubscribeBtn2022",sourceCompId:_,action:t})}).fail(P)}if("addToFriends"===t){var n={target:S,show_recommendations:!0};LJ.Api.callP("relations.addfriend",n).then(function(e){LJ.Event.trigger("relations.changed",{username:S,id:j,data:e,source:"SubscribeBtn2022",action:t}),N(["COMPLEX_SUBSCRIBE"])}).catch(P)}"removeFromFriends"===t&&LJ.Api.call("relations.removefriend",{target:S}).then(function(e){LJ.Event.trigger("relations.changed",{username:S,id:j,data:e,source:"SubscribeBtn2022",action:t}),N(["COMPLEX_UNSUBSCRIBE"])}).fail(P),"leaveComm"===t&&LJ.Api.call("relations.leave",{target:S}).then(function(e){LJ.Event.trigger("relations.changed",{username:S,id:j,data:e,source:"SubscribeBtn2022",sourceCompId:_,action:t})}).fail(P),"joinComm"===t&&LJ.Api.callP("relations.join",{target:S}).then(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O?t:LJ.Api.call("relations.join",{target:S}).then(function(e){return s(s({},t),e)})}).then(function(e){e.is_invite_sent&&x(s(s({},w),{},{isJoinRequestSent:!0})),N(["COMMUNITY_JOIN"]),LJ.Event.trigger("relations.changed",{username:S,id:j,data:e,source:"SubscribeBtn2022",action:t})}).catch(P)},requestGroupsDataCb:function(){LJ.Api.call("groups.list",{target:S}).then(function(t){x(s(s({},w),{},{friendGroupsData:t.groups}))})},toggleFriendInGroupCb:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.id,r=t.shouldBeInGroup,n=L.map(function(t){return t.id===e?s(s({},t),{},{selected:r}):t}),o=n.map(function(t){return t.selected?t.id:null}).filter(function(t){return t});LJ.Api.call("groups.update_users",{users:[{username:S,groups:o}]},void 0,{silent:!1}).then(function(){x(s(s({},w),{},{friendGroupsData:n}))}).fail(function(t){P(t)})},gluePopups:p,userNoteProps:I});return n.createElement(o.N,{value:u},n.createElement(i.m,F))}},62600(t,e,r){"use strict";r.d(e,{Z:()=>o}),r(96540);var n=r(40961),o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.children,r=t.mountRef,o=(void 0===r?{}:r).current||document.body;return(0,n.createPortal)(e,o)}},64054(t,e,r){"use strict";r.d(e,{D:()=>i});var n=r(96540),o=r(14554),i=function(){return(0,n.useContext)(o.D)}},65191(t,e,r){"use strict";r.d(e,{hZ:()=>a,nd:()=>c});var n=r(38228);function o(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var a=function(t){return Object.values(n.NM).find(function(e){return e.placement.x===t.x&&e.placement.y===t.y})},c=function(t,e){var r,i,a=e.canUseAltEdge,c=e.canUseAltAxis,l=e.excludePlacements,u=o(function(t){return n.NM.filter(function(e){var r=e.edge,n=e.align;return r===t.edge&&n!==t.align})}(t));return a&&((r=u).push.apply(r,o(function(t){return n.NM.reduce(function(e,r){return t.edge===r.edge||t.axis!==r.axis?e:t.align===r.align?[r].concat(o(e)):[].concat(o(e),[r])},[])}(t))),c&&(i=u).push.apply(i,o(function(t){return n.NM.filter(function(e){return e.axis!==t.axis}).sort(function(t,e){var r=["right","bottom"],n=r.includes(t.edge),o=r.includes(e.edge);return n&&o?0:n?-1:1})}(t)))),null!=l&&l.length&&(u=u.filter(function(t){return!l.some(function(e){return t.placement.x===e.x&&t.placement.y===e.y})})),u}},69710(t,e,r){"use strict";r.d(e,{A:()=>f,c:()=>l.D});var n=r(96540),o=r(40961),i=r(74044),a=r(80074),c=r(35849),l=r(40921),u=r(95618);function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const f=n.forwardRef(function(t,e){var r,f,p=t.className,d=t.children,m=t.anchorEl,h=t.anchorRect,y=t.containerRef,v=t.placement,g=t.margins,b=t.overflowFixParams,w=t.withArrow,x=t.positioningGetter,E=t.updateOnScroll,j=void 0===E?{window:!0}:E,S=t.updateOnResize,O=void 0===S?{window:!0,anchor:!0,popover:!0}:S,L=t.closeOnScroll,k=void 0!==L&&L,_=t.onMouseEnter,C=t.onMouseLeave,P=t.onClose,N=void 0===P?function(){}:P,A=(0,n.useRef)(null),I=(0,i.DP)(),F=(r=(0,l.A)({anchorEl:m,anchorRect:h,popoverRef:A,placement:v,margins:g,overflowFixParams:b,containerRef:y,withArrow:w,positioningGetter:x}),f=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(r,f)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(r,f)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),D=F[0],T=F[1],M=D.arrow,J=D.position;return(0,n.useImperativeHandle)(e,function(){return A.current},[]),(0,i.Wr)(A,N),(0,n.useLayoutEffect)(function(){T()},[]),(0,c.mc)(O,{anchorEl:m,anchorRect:h,popoverRef:A,recalcPositioning:T}),(0,c.l8)(j,{anchorEl:m,popoverRef:A,closeOnScroll:k,recalcPositioning:T,onClose:N}),(0,n.useEffect)(function(){return LJ.Event.on("react::CommonPopover::closeAll",N),function(){LJ.Event.off("react::CommonPopover::closeAll",N)}},[N]),(0,o.createPortal)(n.createElement(u.u,{className:(0,a._)(["basepopup","basepopup--fix-bug","dark"===I&&"basepopup--dark",M&&"basepopup--arrow-".concat(M.edge,"-").concat(M.align),p]),$position:J,ref:A,onMouseEnter:_,onMouseLeave:C},d),(null==y?void 0:y.current)||document.body)})},70373(t,e,r){"use strict";r.d(e,{A:()=>i});var n=r(96540),o=r(32231);const i=function(t){var e=t.children,r=t.title,i=t.description,a=t.withCloseBtn;return n.createElement(o.Y9,null,r&&n.createElement(o.hE,{$withCloseBtn:a},r),i&&n.createElement(o.VY,null,i),e)}},72317(t,e,r){"use strict";r.d(e,{k:()=>l});var n=r(96540),o=r(62600),i=r(80074),a=r(25439),c=function(){};function l(t){var e=t.targetUsername,r=t.isInSubscriptionList,l=void 0!==r&&r,u=t.isInFriendList,s=void 0!==u&&u,f=t.remoteIsCommunityOwner,p=void 0!==f&&f,d=t.isCommunity,m=void 0!==d&&d,h=t.isSyndicated,y=void 0!==h&&h,v=t.friendGroupsData,g=t.requestRelationActionCb,b=t.requestPopupClose,w=void 0===b?c:b,x=t.toggleFriendInGroupCb,E=t.remoteIsCommunityMember,j=t.joinRequestPending,S=t.isBannedInCommunity,O=t.isClosedCommunity,L=t.targetNode,k=t.isGlued,_=t.savedUserNote,C=void 0===_?"":_,P=t.onUserNoteBtnClick,N=void 0===P?function(){}:P,A=LJ.Support.isMobile(),I=(0,n.useRef)(null);(0,n.useEffect)(function(){function t(t){null!=I&&I.current&&!I.current.contains(t.target)&&w()}return A&&(document.body.style.overflow="hidden",setTimeout(function(){document.addEventListener("click",t)})),function(){A&&(document.removeEventListener("click",t),document.querySelectorAll("[data-react-overlay]").length||(document.body.style.overflow=""))}},[]);var F,D=[],T=n.createElement(a.Cl,{onClick:function(){w(),g("addToFriends")},key:"addToFriends",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("common.add_to_friends"))),M=n.createElement(a.Cl,{onClick:function(){w(),g("removeFromFriends")},key:"removeFromFriends",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("common.remove_from_friends"))),J=n.createElement(a.Cl,{remoteIsPaid:Site.remote.is_paid,isPaidItem:!0,onClick:function(){Site.remote.is_paid?(N(),w()):window.open("".concat(Site.siteroot,"/shop/profaccount.bml?ila_campaign=inactive_prof_sign&ila_location=reminder"),"_blank")},key:"changeUserNote",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},!Site.remote.is_paid&&n.createElement("svg",{width:"22",height:"16"},n.createElement("use",{xlinkHref:"#flaticon--pro-outline-gradient"})),C?LJ.ml("subscribe_button_2022.edit_user_note"):LJ.ml("subscribe_button_2022.add_user_note"))),U=n.createElement(a.Cl,{key:"editFriend",className:"basepopup-selector__label"},n.createElement(a._3,{href:"".concat(Site.siteroot,"/friends/add.bml?user=").concat(e),target:"_blank",className:"basepopup-selector__text"},LJ.ml("subscribe_button_2022.subscribe_settings"))),R=n.createElement(a.Cl,{onClick:function(){w(),g("subscribe")},key:"subscribe",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("common.subscribe"))),$=n.createElement(a.Cl,{onClick:function(){w(),g(y?"removeFromFriends":"unsubscribe")},key:"unsubscribe",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("common.unsubscribe"))),G=n.createElement(a.Cl,{onClick:function(){w(),g("joinComm")},key:"joinComm",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("subscribe_button_2022.join_community"))),z=n.createElement(a.Cl,{onClick:function(){w(),g("leaveComm")},key:"leaveComm",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("subscribe_button_2022.leave_community"))),B=n.createElement(a.Cl,{onClick:function(){w()},className:"lightbutton"},LJ.ml("common.close")),q=n.createElement("span",{key:"joinRequestPending",className:"basepopup-selector__label"},n.createElement("div",{className:"basepopup-selector__text"},LJ.ml("subscribe_button_2022.join_request_is_pending"))),H=[];return v.forEach(function(t){H.push(n.createElement("li",{className:"basepopup__item",key:t.id},n.createElement("label",{className:"lightcheckbox"},n.createElement("input",{className:"lightcheckbox__input",type:"checkbox",value:t.id,checked:!!t.selected,onChange:function(){x({id:t.id,shouldBeInGroup:!t.selected})}}),n.createElement("span",{className:"lightcheckbox__text"},t.name))))}),!m&&!y&&(l&&!s?(D.push(T),D.push(J),D.push(U),D.push($)):s&&(D.push(M),D.push(J),D.push(U))),y&&(s&&D.push($),D.push(J),D.push(U)),m&&(!E&&j&&D.push(q),l?(D.push(J),D.push(U),D.push($)):D.push(R),E&&!p?D.push(z):j||S||O||p||D.push(G)),m&&!l||(F=n.createElement("div",{className:"basepopup__group"},n.createElement("div",{className:"basepopup__content"},n.createElement("div",{className:"basepopup__title"},LJ.ml("common.add_to_group")),n.createElement("ul",{className:"basepopup__list m-scrollbar"},H)))),A?n.createElement(o.Z,null,n.createElement("div",{className:"new-modal-backdrop","data-react-overlay":!0}),n.createElement("div",{className:"new-modal new-modal--popup",style:{display:"block"}},n.createElement("div",{className:"new-modal-dialog new-modal-dialog--centered"},n.createElement("div",{className:"new-modal-content js--subscribe-btn-dropdown",ref:I},n.createElement("div",{className:"basepopup__group"},n.createElement("div",{className:"basepopup__content"},n.createElement("div",{className:"basepopup-selector"},D))),F,n.createElement("div",{className:"basepopup__group",style:{textAlign:"right"}},B))))):n.createElement(a.AM,{className:(0,i._)([k&&"basepopup--glued"]),anchorEl:L,margins:{y:k?0:5},overflowFixParams:{safeEdgePad:5,canUseAltAxis:!1},closeOnScroll:!0,onClose:w},n.createElement("div",{className:"basepopup__group"},n.createElement("div",{className:"basepopup__content"},n.createElement("div",{className:"basepopup-selector"},D))),F)}},74044(t,e,r){"use strict";r.d(e,{DP:()=>i.D,Wr:()=>n.W,ZC:()=>o.Z});var n=r(55153),o=r(55998),i=(r(27374),r(64054));r(9472),r(20158),r(37695)},74536(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(){"use strict";r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),c=new A(n||[]);return a(i,"_invoke",{value:_(t,r,c)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var m="suspendedStart",h="suspendedYield",y="executing",v="completed",g={};function b(){}function w(){}function x(){}var E={};f(E,l,function(){return this});var j=Object.getPrototypeOf,S=j&&j(j(I([])));S&&S!==o&&i.call(S,l)&&(E=S);var O=x.prototype=b.prototype=Object.create(E);function L(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function k(e,r){function n(o,a,c,l){var u=d(e[o],e,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,c,l)},function(t){n("throw",t,c,l)}):r.resolve(f).then(function(t){s.value=t,c(s)},function(t){return n("throw",t,c,l)})}l(u.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(i,i):i()}})}function _(t,r,n){var o=m;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var u=d(t,r,n);if("normal"===u.type){if(o=n.done?v:h,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function I(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,a(O,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},n.awrap=function(t){return{__await:t}},L(k.prototype),f(k.prototype,u,function(){return this}),n.AsyncIterator=k,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new k(p(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},L(O),f(O,s,"Generator"),f(O,l,function(){return this}),f(O,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=I,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},n}function n(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise(function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,l,"next",t)}function l(t){n(a,o,i,c,l,"throw",t)}c(void 0)})}}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach(function(e){c(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function c(e,r,n){return(r=function(e){var r=function(e){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function l(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}LJ.define("LJ.Misc.NotifSubs");var s=!1,f={newEntry:"JournalNewEntry"},p={notifCenter:"NotificationCentre",email:"Email"},d=Object.fromEntries(Object.entries(p).map(function(t){var e,r,n=(r=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,r)||l(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0];return[n[1],o]})),m=function(t){return t.map(function(t){return d[t.method]})},h={},y=function(t,e,r){var n,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).source,i=null===(n=h[t])||void 0===n?void 0:n[e];JSON.stringify(i)===JSON.stringify(r)||(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a(a({},h[t]),e);h[t]=r}(t,c({},e,r)),LJ.Event.trigger("NotifSubs/".concat(t,"/").concat(e,"/changed"),{value:r,source:o}))},v=function(t,e){var r=h[t]&&a({},h[t]);return e?(null==r?void 0:r[e])||[]:r},g=function(){var t=o(r().mark(function t(e){var n,o,i,a,c,l;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.event,o=e.eventType,i=e.method,a=e.username,c={event:f[n],target_journal:a,method:p[i]},t.next=4,LJ.Api.callP("subscriptions.".concat(o),c);case 4:return l=t.sent,t.abrupt("return",l);case 6:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}();LJ.Misc.NotifSubs.init=function(){!s&&Site.remote&&(LJ.Misc.NotifSubs.getUserSubs=v,LJ.Misc.NotifSubs.fetchUserSubs=function(){var t=o(r().mark(function t(e){var n,o,i,a,c;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.event,o=e.username,i={event:f[n],target_journal:o},t.next=4,LJ.Api.callP("subscriptions.get",i);case 4:a=t.sent,c=m(a.subscriptions),y(o,n,c);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),LJ.Misc.NotifSubs.requestSubNotifAdd=function(){var t=o(r().mark(function t(n,o,i){var a,c,l=arguments;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=(l.length>3&&void 0!==l[3]?l[3]:{}).source,(c=e(v(i,n))).push(o),y(i,n,c,{source:a}),t.next=7,g({event:n,eventType:"create",method:o,username:i});case 7:case"end":return t.stop()}},t)}));return function(e,r,n){return t.apply(this,arguments)}}(),LJ.Misc.NotifSubs.requestSubNotifDelete=function(){var t=o(r().mark(function t(n,o,i){var a,c,l=arguments;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=(l.length>3&&void 0!==l[3]?l[3]:{}).source,c=(c=e(v(i,n))).filter(function(t){return t!==o}),y(i,n,c,{source:a}),t.next=7,g({event:n,eventType:"delete",method:o,username:i});case 7:case"end":return t.stop()}},t)}));return function(e,r,n){return t.apply(this,arguments)}}(),LJ.Event.on("relations.changed",function(t){var e=t.action,r=t.username;["unsubscribe","removeFromFriends","removeFriend"].includes(e)&&y(r,"newEntry",[])}),s=!0)}},80074(t,e,r){"use strict";r.d(e,{_:()=>n});var n=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(Boolean).join(" ")}},81834(t,e,r){"use strict";r.d(e,{Ay:()=>s});var n=r(96540),o=r(62600),i=r(8680),a=r(7723),c=r(24582);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const s=n.forwardRef(function(t,e){var r=t.className,u=t.children,s=t.title,f=t.description,p=t.extraHeaderContent,d=t.footer,m=t.withCloseBtn,h=void 0===m||m,y=t.withOverlay,v=void 0===y||y,g=t.onClose,b=void 0===g?function(){}:g,w=l((0,n.useState)(!1),2),x=w[0],E=w[1],j=l((0,n.useState)(null),2),S=j[0],O=j[1],L=(0,n.useRef)(null),k=(0,n.useRef)(null);return(0,n.useImperativeHandle)(e,function(){return{elements:{modal:L.current,body:k.current}}}),(0,n.useEffect)(function(){var t=function(t){"Escape"===t.key&&(t.preventDefault(),b({reason:"esc-keydown"}))};return window.addEventListener("keydown",t),function(){window.removeEventListener("keydown",t)}},[b]),(0,n.useLayoutEffect)(function(){var t=new ResizeObserver(function(){k.current&&d&&(k.current.clientHeight<k.current.scrollHeight?E(!0):E(!1))});return t.observe(k.current),function(){t.unobserve(k.current)}},[k,d]),n.createElement(n.Fragment,null,n.createElement(i.A,null),n.createElement(o.Z,null,n.createElement(c.FQ,null,n.createElement(c.hJ,{$show:v,"data-react-overlay":!0,onClick:function(){b({reason:"overlay-click"})}}),n.createElement(c.aF,{className:r,ref:L},n.createElement(c.az,{className:"rfb-components-Modal-box"},n.createElement(a.Y,{title:s,description:f,withCloseBtn:h},p,h&&n.createElement(a.J,{onClick:function(){b({reason:"close-btn-click"})}})),n.createElement(c.nB,{className:"m-scrollbar rfb-components-Modal-body",$bodyScrollTop:S,$isBodyScrollable:x,ref:k,onScroll:function(t){O(t.target.scrollTop)}},u),d&&n.createElement(c.wi,null,d))))))})},81987(t,e,r){"use strict";r.d(e,{A:()=>o});var n=r(96540);const o=function(t,e){var r=e.anchorEl,o=e.popoverRef,i=e.closeOnScroll,a=e.recalcPositioning,c=e.onClose,l=(t||{}).window;(0,n.useLayoutEffect)(function(){if(!l)return function(){};var t=function(t){!o.current||o.current.contains(t.target)||r&&!t.target.contains(r)||(i?c():a())},e={capture:!0,passive:!0};return window.addEventListener("scroll",t,e),function(){window.removeEventListener("scroll",t,e)}},[l,r,o,i,a,c])}},82595(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){var o,i,a;o=t,i=e,a=r[e],(i=function(t){var e=function(t){if("object"!==n(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===n(e)?e:String(e)}(i))in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}r.d(e,{F:()=>c,u:()=>a});var a={hasShownDropdown:!1,hasLoadedUserNote:!1,savedUserNote:null,isUserNoteModalShown:!1,userNameDisplayData:{}},c=function(t,e){switch(e.type){case"markDropdownAsShown":return i(i({},t),{},{hasShownDropdown:!0});case"markUserNoteAsLoaded":return i(i({},t),{},{hasLoadedUserNote:!0});case"showUserNoteModal":return i(i({},t),{},{isUserNoteModalShown:!0});case"closeUserNoteModal":return i(i({},t),{},{isUserNoteModalShown:!1});case"setSavedUserNote":return i(i({},t),{},{savedUserNote:e.value});case"setUserNameDisplayData":return i(i({},t),{},{userNameDisplayData:e.value});default:return console.warn('SubscribeBtn2022: Got unknown action type "'.concat(e.type,'"')),t}}},83581(t,e,r){"use strict";r.d(e,{j:()=>n});var n={maxMobileS:"(max-width: ".concat(320,"px)"),maxMobileM:"(max-width: ".concat(360,"px)"),maxMobileL:"(max-width: ".concat(576,"px)"),maxTabletS:"(max-width: ".concat(768,"px)"),maxTabletM:"(max-width: ".concat(969.9,"px)"),maxLaptopS:"(max-width: ".concat(1024,"px)"),maxLaptopM:"(max-width: ".concat(1440,"px)"),maxDesktopS:"(max-width: ".concat(1920,"px)")}},83659(t,e,r){"use strict";r.d(e,{D:()=>o.DD,o:()=>n.A});var n=r(93988),o=r(38228)},85194(t,e,r){"use strict";r.d(e,{m:()=>d});var n=r(96540),o=r(98476),i=r(72317),a=r(20230);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){return l=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},l.apply(this,arguments)}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==c(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===c(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var p=function(){};function d(t){var e,r,c,u,d=t.onDropdownShow,m=void 0===d?function(){}:d,h=t.isCommunity,y=void 0!==h&&h,v=t.isInSubscriptionList,g=void 0!==v&&v,b=t.isInFriendList,w=void 0!==b&&b,x=t.remoteIsCommunityMember,E=t.isFollowerOfRemote,j=void 0!==E&&E,S=t.remoteIsCommunityOwner,O=void 0!==S&&S,L=t.requestRelationActionCb,k=void 0===L?p:L,_=t.requestGroupsDataCb,C=t.joinRequestPending,P=t.isSyndicated,N=void 0!==P&&P,A=t.isNews,I=void 0!==A&&A,F=t.miscData,D=t.gluePopups,T=t.userNoteProps,M=void 0===T?{}:T,J=M.savedUserNote,U=M.onDropdownUserNoteBtnClick,R=M.modal,$=void 0===R?{}:R,G=(c=(0,n.useState)(!1),u=2,function(t){if(Array.isArray(t))return t}(c)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(c,u)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}(c,u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),z=G[0],B=G[1],q=function(t){B(t),!z&&t&&m()},H=(0,n.useRef)(null);(0,n.useEffect)(function(){LJ.Event.on("controlstrip::dropdownHideRequest",function(){return q(!1)})},[]),(0,n.useEffect)(function(){var t,e=null==H||null===(t=H.current)||void 0===t?void 0:t.dataset;e&&(e.componentId=F.componentId)},[F.componentId]);var Y=!1,W=[];y||(g||w||!N&&!I?g||w||!j?g||w?g&&!w||w&&(N||I)?(e=LJ.ml("subscribe_button_2022.you_are_subscribed"),r=function(){q(!z),z||_()},Y=!0):w&&(e=LJ.ml("subscribe_button_2022.is_in_friend_list"),r=function(){q(!z),z||_()},Y=!0):(e=LJ.ml("common.subscribe"),r=function(){k("subscribe")},W.push("lightbutton--blue")):(e=LJ.ml("subscribe_button_2022.mutual_subscribe"),r=function(){k("subscribe")},W.push("lightbutton--blue")):(e=LJ.ml("common.subscribe"),r=function(){k("addToFriends")},W.push("lightbutton--blue"))),y&&(O?(e=LJ.ml("subscribe_button_2022.you_are_owner"),r=function(){q(!z),z||_()},Y=!0):!x&&C&&w?(e=LJ.ml("subscribe_button_2022.join_request_is_pending"),r=function(){q(!z),z||_()},Y=!0):g||x?g&&!x?(e=LJ.ml("subscribe_button_2022.you_are_subscribed"),r=function(){q(!z),z||_()},Y=!0):x&&(e=LJ.ml("subscribe_button_2022.you_are_member"),r=function(){q(!z),z||_()},Y=!0):(e=LJ.ml("common.subscribe"),r=function(){k("subscribe")},W.push("lightbutton--blue")));var Z=["lightbutton"].concat(W).join(" ");Site.remote||(r=function(){window.setTimeout(LJ.Util.Action.login,0)});var V=s(s({},t),{},{isGlued:D,savedUserNote:J,onUserNoteBtnClick:U});return n.createElement(n.Fragment,null,n.createElement(a.d,{className:Z+(z?" lightbutton--toggle-open":"")+(Y?" lightbutton--toggle":""),href:"#",target:"_self",onClick:function(t){t.preventDefault(),r()},ref:H},e,Y&&n.createElement("svg",{className:"lightbutton__dropdown-icon",width:"16",height:"16"},n.createElement("use",{xlinkHref:"#flaticon--arrow-dropdown"}))),z?n.createElement(i.k,l({},V,{requestPopupClose:function(){q(!1)},targetNode:null==H?void 0:H.current})):null,$.isShown?n.createElement(o.A,{onClose:$.onClose,inputValue:M.savedUserNote||"",userData:M.userNameDisplayData}):null)}},86951(t,e,r){"use strict";r.d(e,{A:()=>c});var n=r(96540),o=r(40457),i=["size"];function a(){return a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a.apply(this,arguments)}const c=n.forwardRef(function(t,e){var r=t.size,c=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,i);return n.createElement(o.p,a({ref:e,$size:r},c))})},87202(t,e,r){"use strict";r.d(e,{_:()=>O});var n=r(96540),o=r(5338),i=r(81834),a=r(79056),c=a.default.h3.withConfig({displayName:"Title",componentId:"sc-v4x63z-0"})(["margin:0;margin-bottom:1rem;font-family:ProximaNova,Helvetica,sans-serif !important;font-size:14px;font-weight:bold;color:#000000;"]),l=a.default.div.withConfig({displayName:"CategoryContainer",componentId:"sc-v4x63z-1"})(["&:not(:last-child){margin-bottom:1.5rem;}"]),u=a.default.div.withConfig({displayName:"UserContainer",componentId:"sc-v4x63z-2"})(["position:relative;display:flex;justify-content:space-between;width:100%;margin:0px;&:not(:last-child){margin-bottom:1rem;}"]),s=a.default.div.withConfig({displayName:"Userpic",componentId:"sc-v4x63z-3"})(["display:flex;flex-direction:column;justify-content:start;align-items:center;flex-shrink:0;margin-right:16px;border-radius:4px;overflow:hidden;img{width:65px;height:65px;border-radius:0px;object-fit:cover;}"]),f=a.default.div.withConfig({displayName:"UserContent",componentId:"sc-v4x63z-4"})(["display:flex;flex:1 1 0%;@media (max-width:480px){flex-direction:column;align-items:flex-start;}"]),p=a.default.div.withConfig({displayName:"SubscribeBtnContainer",componentId:"sc-v4x63z-5"})(["display:flex;align-items:center;margin-left:auto;@media (max-width:480px){margin-top:6px;margin-left:0;}"]),d=a.default.div.withConfig({displayName:"UserDescription",componentId:"sc-v4x63z-6"})(["margin-right:16px;@media (max-width:480px){margin-right:0;}"]),m=a.default.div.withConfig({displayName:"UserDisplayWrapper",componentId:"sc-v4x63z-7"})(["margin-bottom:4px;.i-ljuser{display:flex;flex-wrap:nowrap;}.i-ljuser-userhead{margin-right:4px!important;opacity:1 !important;}.i-ljuser-username{text-decoration:none !important;font-weight:normal !important;color:#00A3D9 !important;&:hover,&:focus{color:#00C0FF !important;}}.i-ljuser-profile{background-image:none !important;}"]),h=a.default.p.withConfig({displayName:"JournalTitle",componentId:"sc-v4x63z-8"})(["font-size:14px;line-height:17px;"]),y=r(20339),v=function(t){var e=t.data,r=void 0===e?{}:e,o=r.name,i=r.users;return n.createElement(l,null,n.createElement(c,null,o),i.map(function(t,e){var r={targetUsername:t.user,targetId:t.userid,isInSubscriptionList:t.is_subscribed,isInFriendList:t.is_friend,friendGroupsData:[],isCommunity:t.is_community,remoteIsCommunityMember:t.is_community&&t.is_member,joinRequestPending:t.is_invite_sent,isBannedInCommunity:t.is_banned,isClosedCommunity:"closed"===t.community_membership};return r.isCommunity&&(r.isInSubscriptionList=t.is_friend),n.createElement(u,{key:"".concat(e,"-").concat(t.userid)},n.createElement(s,null,n.createElement("img",{src:t.userpic,alt:t.user})),n.createElement(f,null,n.createElement(d,null,n.createElement(m,{dangerouslySetInnerHTML:{__html:t.user_display}}),t.journal_title&&n.createElement(h,null,t.journal_title)),n.createElement(p,null,n.createElement(y.f,{targetUserData:r}))))}))};function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==g(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===g(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}LJ.define("LJ.Page.SubRecommendModal");var E={isShown:!1,recommendations:[]},j=function(){var t,e,r=(t=(0,n.useState)(E),e=2,function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return x(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[0],a=r[1];(0,n.useEffect)(function(){return LJ.Page.SubRecommendModal.setState=function(t){a(t)},function(){LJ.Page.SubRecommendModal=null}},[]),(0,n.useEffect)(function(){return LJ.Event.on("SubRecommendModal.requestShow",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o.isShown){var e=t.recommendations;if(0!==(void 0===e?[]:e).length){LJ.Track.YM.call({method:"reachGoal",argArr:["SHOW_FRIENDS_RECOMMENDATIONS"]});var r={isShown:!0};r=w(w({},r),{},{recommendations:t.recommendations}),a(r)}}}),LJ.Page.SubRecommendModal.isMounted=!0,LJ.Event.trigger("SubRecommendModal.mounted"),function(){LJ.Event.off("SubRecommendModal.requestShow")}},[]);var c=o.isShown,l=o.recommendations,u=(0,n.useCallback)(function(){a(E)},[]),s=(0,n.useMemo)(function(){return null!=l&&l.length?l.map(function(t){return n.createElement(v,{data:t,key:t.id})}):null},[c]);return n.createElement(n.Fragment,null,c&&(null==s?void 0:s.length)&&n.createElement(i.Ay,{title:LJ.ml("common.recommended"),description:LJ.ml("common.recommended.description"),onClose:u},n.createElement("div",null,s)))},S=!1,O=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).forceCreateNewModal;if(!S||t){var e=document.createElement("div");e.dataset.subRecommendationModal="",document.body.append(e),(0,o.createRoot)(e).render(n.createElement(j,null)),S=!0}};O()},90764(t,e,r){"use strict";r.d(e,{k:()=>n});var n=(0,r(79056).createGlobalStyle)(["body.","{overflow:hidden;}"],function(t){return t.$bodyClassName})},92968(t,e,r){"use strict";r.d(e,{A:()=>a});var n=r(96540),o=["className","xlinkHref"];function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},i.apply(this,arguments)}const a=(0,n.forwardRef)(function(t,e){var r=t.className,a=void 0===r?"":r,c=t.xlinkHref,l=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,o);return n.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",className:"svgicon ".concat(c," ").concat(a),ref:e},l),n.createElement("use",{xlinkHref:"#".concat(c)}))})},93988(t,e,r){"use strict";r.d(e,{A:()=>u});var n=r(38228),o=r(65191);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach(function(e){var n,o,a;n=t,o=e,a=r[e],(o=function(t){var e=function(t){if("object"!==i(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===i(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}const u=function(t){var e=t.anchorRect,r=t.objectRect,i=t.container,c=t.placement,u=void 0===c?n.NT.placement:c,s=t.margins,f=void 0===s?n.NT.margins:s,p=t.overflowFixParams,d=t.withArrow,m=(0,o.hZ)(u),h={placement:u,position:n.NT.position};if(!m||!e||!r)return h;var y,v=l(l({},n.NT.overflowFixParams),p||{}),g=v.enabled,b=v.safeEdgePad,w=v.canUseAltEdge,x=v.canUseAltAxis,E=v.excludePlacements,j=function(t){var o=LJ.Util.Positioning.RectNearRect.calculateCoords({anchorRect:e,objectRect:r,placement:t,margins:f}),a=o.x,c=o.y;if("number"!=typeof a||"number"!=typeof c||Number.isNaN(a)||Number.isNaN(c))return{placement:t,position:n.NT.position};var l,u,s,p,d={x:a,y:c},m=(l=d.y-b<0,u=d.x+r.width+b>window.innerWidth,s=d.y+r.height+b>window.innerHeight,{x:(p=d.x-b<0)||u,y:l||s,top:l,right:u,bottom:s,left:p});if(i){var h=i.getBoundingClientRect();d.x=d.x+i.scrollLeft-h.x,d.y=d.y+i.scrollTop-h.y}else d.x+=document.scrollingElement.scrollLeft,d.y+=document.scrollingElement.scrollTop;return d.x=Math.round(d.x),d.y=Math.round(d.y),{placement:t,position:d,windowOverflow:m,hasWindowOverflow:m.x||m.y}},S=j(u);if(g&&S.hasWindowOverflow){var O,L,k=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){l=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(l)throw i}}}}((0,o.nd)(m,{canUseAltAxis:x,canUseAltEdge:w,excludePlacements:E}).map(function(t){return t.placement}));try{for(k.s();!(L=k.n()).done;){var _=j(L.value);if(!_.hasWindowOverflow){O=_;break}var C=S.windowOverflow.x&&!_.windowOverflow.x,P=S.windowOverflow.y&&!_.windowOverflow.y;O||!C&&!P||(O=_)}}catch(t){k.e(t)}finally{k.f()}O&&(S=O),S.windowOverflow.left&&(S.position.x=b)}return h={placement:S.placement,position:S.position},d&&(h.arrow=null===(y=(0,o.hZ)(h.placement))||void 0===y?void 0:y.arrow),h}},95618(t,e,r){"use strict";r.d(e,{u:()=>n});var n=r(79056).default.div.attrs(function(t){var e=t.$position;return{style:{transform:"translate(".concat(e.x,"px, ").concat(e.y,"px)")}}}).withConfig({displayName:"Component",componentId:"sc-zvb2mg-0"})(["position:absolute;top:0;left:0;-webkit-font-smoothing:antialiased;z-index:5000;&.basepopup--arrow-left-top::before,&.basepopup--arrow-right-top::before{top:10px;}&.basepopup--arrow-top-right::before,&.basepopup--arrow-bottom-right::before{right:10px;}&.basepopup--arrow-top-left::before,&.basepopup--arrow-bottom-left::before{left:10px;}&.basepopup--arrow-left-bottom::before,&.basepopup--arrow-right-bottom::before{bottom:10px;}&.basepopup--arrow-top-center::before,&.basepopup--arrow-bottom-center::before{transform:rotate(45deg) translateX(-50%);transform-origin:left;margin:0;}"])},98476(t,e,r){"use strict";r.d(e,{A:()=>d});var n=r(96540),o=(r(5338),r(28081)),i=r(81834),a=r(52464),c=r(13768);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach(function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t){if("object"!==l(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===l(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const d=function(t){var e=t.onClose,r=void 0===e?function(){}:e,l=t.inputValue,u=t.userData,p=f((0,n.useState)(l||""),2),d=p[0],m=p[1],h=f((0,n.useState)(!1),2),y=h[0],v=h[1],g=(0,n.useRef)(null),b=function(){window.location.reload()},w=function(t){v(!1),null!=t&&t.code&&null!=t&&t.message&&LJ.Messages.error(t.message)},x=(0,n.useCallback)(function(){v(!0),LJ.Api.callP("user.alias_set",{aliases:[{id:u.id,alias:d}]}).then(b).catch(w)},[d,u]);(0,n.useEffect)(function(){var t=function(t){13===t.which?x():27===t.which&&r()};return window.addEventListener("keydown",t),function(){window.removeEventListener("keydown",t)}},[r,x]),(0,n.useEffect)(function(){g.current.focus()},[]);var E=!!l,j={title:LJ.ml(E?"user_note_modal.title.edit":"user_note_modal.title.add"),description:LJ.ml(E?"user_note_modal.edit_note_for":"user_note_modal.add_note_for")},S=!!d&&d!==l;return n.createElement(i.Ay,{onClose:y?void 0:r,title:j.title,withCloseBtn:!y,footer:n.createElement(c.wi,null,n.createElement(c.KB,null,E&&n.createElement(o.A,{onClick:function(){v(!0),LJ.Api.callP("user.alias_delete",{user_ids:[u.id]}).then(b).catch(w)},disabled:y,sizeL:!0},LJ.ml("common.delete")),n.createElement(c.yY,{onClick:S?x:void 0,disabled:!S||y,$isLoading:y,primary:!0,sizeL:!0},n.createElement("span",null,LJ.ml("common.save")))))},n.createElement(c.VY,null,"".concat(j.description," "),n.createElement(a.c,{userData:s(s({},u),{},{displayUsername:u.username})}),":"),n.createElement(c.D0,{onChange:function(t){m(t.currentTarget.value)},className:"lightinput lightinput--big",value:d,maxLength:400,disabled:y,ref:g,type:"text",size:"large"}))}}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,n),i.exports}n.m=e,t=[],n.O=(e,r,o,i)=>{if(!r){var a=1/0;for(s=0;s<t.length;s++){for(var[r,o,i]=t[s],c=!0,l=0;l<r.length;l++)(!1&i||a>=i)&&Object.keys(n.O).every(t=>n.O[t](r[l]))?r.splice(l--,1):(c=!1,i<a&&(a=i));if(c){t.splice(s--,1);var u=o();void 0!==u&&(e=u)}}return e}i=i||0;for(var s=t.length;s>0&&t[s-1][2]>i;s--)t[s]=t[s-1];t[s]=[r,o,i]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={2202:0,8138:0};n.O.j=e=>0===t[e];var e=(e,r)=>{var o,i,[a,c,l]=r,u=0;if(a.some(e=>0!==t[e])){for(o in c)n.o(c,o)&&(n.m[o]=c[o]);if(l)var s=l(n)}for(e&&e(r);u<a.length;u++)i=a[u],n.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return n.O(s)},r=self.webpackChunkfrontend_bundled=self.webpackChunkfrontend_bundled||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),n.nc=void 0;var o=n.O(void 0,[4035],()=>n(41169));o=n.O(o)})();
/* >>> file end: profile.js [FB]*/

