/*! VERSION | 11.1.0 */"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[7243],{710:(e,t,i)=>{i.d(t,{w:()=>c});var o=i(27378),a=i(4289),n=i(65804),r=i(92644),s=i(99748);let l={root:"TopModelsAwardLabel#zw",award_medium:"TopModelsAwardLabel__award_medium#jW",awardMedium:"TopModelsAwardLabel__award_medium#jW",root_1:"TopModelsAwardLabel_1#dM",root1:"TopModelsAwardLabel_1#dM",root_2:"TopModelsAwardLabel_2#pX",root2:"TopModelsAwardLabel_2#pX",root_3:"TopModelsAwardLabel_3#jv",root3:"TopModelsAwardLabel_3#jv",root_grande:"TopModelsAwardLabel_grande#dl",rootGrande:"TopModelsAwardLabel_grande#dl",strong:"TopModelsAwardLabel__strong#tR",text:"TopModelsAwardLabel__text#kR",number:"TopModelsAwardLabel__number#H3"},d=e=>{switch(e){case 1:return{league:"gold",messageId:"topModels.awardLabel.first"};case 2:return{league:"silver",messageId:"topModels.awardLabel.second"};case 3:return{league:"bronze",messageId:"topModels.awardLabel.third"};default:return{league:"grey",messageId:"topModels.awardLabel.common"}}},c=(0,o.forwardRef)(({position:e,amount:t,size:i="medium",className:c,href:p},m)=>{let{league:u,messageId:h}=d(e),v=(0,s.AK)(c,l.root,l[`root_${i}`],{[l[`root_${e}`]]:[1,2,3].includes(e)}),g=o.createElement(o.Fragment,null,o.createElement(r.Z,{level:0,league:u,size:i,icon:"top"}),"medium"===i?o.createElement("span",{className:l.number},e):o.createElement(n.Z,{messageId:h,className:l.text,parameters:{place:e,amount:t},elements:{strong:o.createElement("span",{className:l.strong}),br:o.createElement("br",null)}}));return"string"==typeof p?o.createElement(a.rU,{to:p,className:v,ref:m},g):o.createElement("div",{className:v,ref:m},g)})},85037:(e,t,i)=>{i.d(t,{m:()=>d});var o=i(47722),a=i(27378),n=i(11850),r=i(29413),s=i(99748);let l=(0,i(98846).n7)({resolved:{},chunkName:()=>"AddToCalendarTooltip",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!i.m[t]},importAsync:()=>i.e(4857).then(i.bind(i,17019)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){return i(this.resolve(e))},resolve:()=>17019},{fallback:void 0,ssr:!1}),d=({children:e,className:t,tooltipPlacement:i,wrapperRef:d,buttonClassName:c,iconClassName:p})=>{let[m,u,h]=(0,n.eW)(),v=(0,a.useRef)(null),g=null!=d?d:v;return(0,a.useEffect)(()=>{l.preload()},[]),a.createElement("div",{className:t},a.createElement("div",{ref:g},a.createElement(o.mI,{className:c,onClick:u},e,a.createElement(r.Z,{className:(0,s.AK)("add-to-calendar-button__icon",p),img:"calendar-add"}))),m&&a.createElement(l,{onClick:h,onClose:u,ref:g,placement:i}))}},71520:(e,t,i)=>{i.d(t,{Lp:()=>n,NP:()=>r,yL:()=>s});var o=i(27378);let a=o.createContext(null),n=({children:e,eventTimeData:t,source:i})=>o.createElement(a.Provider,{value:{eventTimeData:t,source:i}},e),r=()=>{var e;return null===(e=(0,o.useContext)(a))||void 0===e?void 0:e.eventTimeData},s=()=>{var e;return null===(e=(0,o.useContext)(a))||void 0===e?void 0:e.source}},56802:(e,t,i)=>{i.d(t,{R:()=>d});var o=i(27378),a=i(50557),n=i(56322),r=i(99748),s=i(10809),l=i(65797);let d=({tooltipRef:e,onClose:t,isVisible:i,targetId:d,placement:c,absolutePlacement:p,isForcePlacement:m,model:u,buttonLocation:h,onClick:v,shouldMethodsListBeExpanded:g,shouldRenderWithoutPortal:E,portalContainerId:f,screenGutter:_,gap:b})=>{let C=(0,o.useRef)(null);return(0,o.useEffect)(()=>{var e;null==C||null===(e=C.current)||void 0===e||e.updatePosition()},[p,g]),o.createElement(n.Z,{portalContainerId:f,onClick:v,isForcePlacement:m,targetId:d,placement:c,className:(0,r.AK)("notifications-tooltip",{hidden:!i,absolute:p,[`absolute-${p}`]:p}),isForceVisible:!0,isMobileRelative:!1,ref:(0,s.lq)([e,C]),indentation:10,maxWidth:369,shouldRenderWithoutPortal:E,screenGutter:_,gap:b},o.createElement(a.s,null,o.createElement(l.Z,{key:String(u.id)+String(i),model:u,shouldPreserveVerticalPosition:!p,shouldStopPropagation:!0,onClose:t,buttonLocation:h,isVisible:!!i,shouldMethodsListBeExpanded:g})))}},65797:(e,t,i)=>{i.d(t,{Z:()=>et});var o=i(18775),a=i(27378),n=i(48204),r=i(4289),s=i(1961),l=i(59374),d=i(36533),c=i(69353),p=i(36846),m=i(35826),u=i(65804),h=i(29413),v=i(75997),g=i(3034),E=i(99973),f=i(84423),_=i(33440),b=i(99748),C=i(97606),P=i(64696),N=i(58543),A=i(12278),T=i(42339),S=i(68020),w=i(53738),I=i(40347),k=i(83550),R=i(81775),M=i(40650),y=i(70203),L=i(94380),U=i(95654),W=i(30024),Z=i(62203),B=i(34631),O=i(82502);let D=["PushNotificationPopupOnAddedToFavs","PushNotificationPopupProfileButton","PushNotificationPopupSchedule"],H={PushNotificationPopupOnAddedToFavs:"PushNotificationPopupOnAddedToFavs",PushNotificationPopupAfterClickOn_profileButton:"PushNotificationPopupProfileButton",PushNotificationPopupSchedule:"PushNotificationPopupSchedule",PushNotificationPopupOnOfflineViewcamSubscribe:"PushNotificationPopupOnAddedToFavs"};var V=i(89598);let F={root:"PWANotificationTooltipQrCode#Xr",root__compact:"PWANotificationTooltipQrCode__compact#m4",rootCompact:"PWANotificationTooltipQrCode__compact#m4",root__opened:"PWANotificationTooltipQrCode__opened#Ew",rootOpened:"PWANotificationTooltipQrCode__opened#Ew",header:"PWANotificationTooltipQrCode__header#oh",button:"PWANotificationTooltipQrCode__button#ue",buttonIcon:"PWANotificationTooltipQrCode__buttonIcon#TD",buttonContent:"PWANotificationTooltipQrCode__buttonContent#QX",headerWrapper:"PWANotificationTooltipQrCode__headerWrapper#zh",title:"PWANotificationTooltipQrCode__title#z7",description:"PWANotificationTooltipQrCode__description#Yk",logo:"PWANotificationTooltipQrCode__logo#Ge",logo__compact:"PWANotificationTooltipQrCode__logo__compact#bz",logoCompact:"PWANotificationTooltipQrCode__logo__compact#bz",scanText:"PWANotificationTooltipQrCode__scanText#wJ",body:"PWANotificationTooltipQrCode__body#tI",qrCode:"PWANotificationTooltipQrCode__qrCode#NC",chevronIcon:"PWANotificationTooltipQrCode__chevronIcon#Ci"},x=({isCompact:e,className:t})=>{let i=(0,U.C)(Z.hA),{trans:o}=(0,C.QT)();return a.createElement("div",{className:t},a.createElement(B.S,{isShadow:!1,className:(0,b.AK)(F.logo,{[F.logo__compact]:e})}),a.createElement("div",null,a.createElement("div",{className:F.title},o("pwaQrCode.titleUser",{siteName:i})),!e&&a.createElement("div",{className:F.description},o("pwaQrCode.descriptionUser"))))},$=({wasOpened:e})=>{let{trans:t}=(0,C.QT)();return a.createElement("div",{className:F.body},e&&a.createElement(V.D,{className:F.qrCode}),a.createElement("div",{className:F.scanText},t("pwaQrCode.scan")))},K=({className:e,onClick:t})=>{let[i,o]=(0,a.useState)(!1),n=(0,U.C)(e=>!!(0,W.fp)(e,M.dA.WAS_NOTIFICATION_TOOLTIP_PWA_QR_GENERATED)),[r,s]=(0,a.useState)(!1),l=(0,L.T)(),d=(0,a.useRef)(r);d.current=r,(0,a.useEffect)(()=>()=>{d.current&&!y.m.get(M.dA.WAS_NOTIFICATION_TOOLTIP_PWA_QR_GENERATED)&&l((0,I._O)(!0))},[l]);let c=(0,w.Z)(e=>{t(e),s(!0),o(e)});return a.createElement(R.c,{chevronIconClassName:F.chevronIcon,headerClassName:F.headerWrapper,className:(0,b.AK)(F.root,e,{[F.root__compact]:n,[F.root__opened]:i,[F.root__closed]:!i}),onToggle:c,headerContent:a.createElement(x,{className:F.header,isCompact:n}),clickArea:"component"},a.createElement($,{wasOpened:r}))},z=({className:e,onClick:t})=>a.createElement("div",{onClick:()=>{t(!0),f.P4.show(O.s,{})},className:(0,b.AK)(F.root,F.button,e)},a.createElement(x,{className:F.buttonContent}),a.createElement(h.Z,{img:"chevron-right",className:F.buttonIcon})),Q=({className:e,componentLocation:t})=>{let i=(0,L.T)(),o=(0,w.Z)(e=>{if(!e)return;let o=H[t];D.includes(o)&&(E.BROWSER_CAPABILITIES.desktop||E.BROWSER_CAPABILITIES.iPadOS)&&i((0,k.gz)("clickOnPwaBanner",{source:o}))});return E.BROWSER_CAPABILITIES.iPad||E.BROWSER_CAPABILITIES.iPadOS?a.createElement(z,{onClick:o,className:e}):a.createElement(K,{onClick:o,className:e})};var q=i(48344),G=i(65103),j=i(79561),J=i(6035);let X={updateModelSubscription:s.r6,toggleModelNotifications:s.oj,toggleTelegramBot:_.BJ,showIosPushInstructionsConditionally:s.cV};class Y extends a.Component{renderTop(){let{isSubscribed:e}=this.props;return a.createElement("div",{className:"main-settings"},a.createElement("div",{className:"bell"},a.createElement(h.Z,{img:e?"notifications-2":"notifications-off-2"})),a.createElement("span",{className:"notifications-tooltip-title"},this.props.i18n.trans("notificationsTooltip.title")),a.createElement(v.Z,{iconImg:"switcher-ds",size:"medium",className:"main-switcher",theme:"light",isChecked:e,onChange:this.onToggleMainSwitcher}))}renderWarningHintBase(e,t){let{isVisible:i}=this.props,{expandState:o,instanceId:n}=this.state,r=`${n}_${e}`;return a.createElement("span",{id:r,className:"notifications-tooltip-warning-hint"},a.createElement(h.Z,{img:"exclamation-circle"}),i&&"expanded"===o&&a.createElement(g.Z,{maxWidth:250,hideDelay:150,placement:"top",targetId:r,isMobileRelative:!1},t))}renderWarningHint(e,t){let i=`notification-tooltip-${e}-warning`;return this.renderWarningHintBase(i,a.createElement(u.Z,{messageId:`notificationsTooltip.${t}`,elements:{link:a.createElement(r.rU,{to:{pathname:"/notifications",state:{openedSection:e}}})}}))}renderEmail(){let{notifications:e,currentUser:t,isEmailEnabled:i,isUserWithoutEmail:o}=this.props;return a.createElement("div",{className:(0,b.AK)("method","method-email",{"method-disabled":!i||o})},a.createElement("span",null,this.props.i18n.trans("notificationsTooltip.email"),o&&this.renderWarningHintBase("notification-tooltip-email-warning",a.createElement(u.Z,{messageId:"notificationsTooltip.addEmail",elements:{link:a.createElement(r.rU,{to:{pathname:"/settings"}})}})),!o&&!i&&this.renderWarningHint("email","enableEmail")),a.createElement(v.Z,{iconImg:"switcher-ds",theme:"light",className:"method__switcher",isChecked:null!=t&&!!t.isEmailVerified&&e.isEmail,onChange:i?this.toggleSubscription("isEmail"):void 0}))}renderWebPush(){let{notifications:e,currentUser:t,isPushEnabled:i,isWebPushiOSEnabled:o,isWebPushiOSNewBadge:n}=this.props,r=o&&E.BROWSER_CAPABILITIES.iosPwaSupport,s=t?e.isPush:e.isGuestPush;return a.createElement("div",{className:(0,b.AK)("method",{"method-disabled":!i})},a.createElement("span",null,r?a.createElement(a.Fragment,null,this.props.i18n.trans("notificationsTooltip.webPushViaApp"),n&&a.createElement(m.Z,{type:"new-darken",className:"notifications-tooltip-content__badge-new"},this.props.i18n.trans("badges.new"))):this.props.i18n.trans("notificationsTooltip.webPush"),(s||!r)&&a.createElement(d.B,{place:"viewcam",render:e=>this.renderWarningHintBase("notification-tooltip-push-warning",e)})),a.createElement(v.Z,{iconImg:"switcher-ds",theme:"light",isChecked:s,className:"method__switcher",onChange:i?this.toggleSubscription(t?"isPush":"isGuestPush"):void 0}))}renderTelegram(){let{currentUser:e,isTelegramConnected:t,notifications:i}=this.props;if(!e)return null;if(!t){let t=()=>{this.isConnectTelegramClicked=!0};return a.createElement("div",{className:"method method-disabled"},a.createElement(r.rU,{className:"connect-link",to:`/api/front/users/${e.id}/telegram`,target:"_blank",onClick:t},this.props.i18n.trans("notificationsTooltip.connectTelegram")),a.createElement(r.rU,{to:`/api/front/users/${e.id}/telegram`,target:"_blank",onClick:t},a.createElement(v.Z,{iconImg:"switcher-ds",className:"method__switcher",theme:"light",isChecked:!1})))}return a.createElement("div",{className:"method"},a.createElement("span",null,this.props.i18n.trans("notificationsTooltip.telegram")),a.createElement(v.Z,{iconImg:"switcher-ds",className:"method__switcher",theme:"light",isChecked:i.isTelegram,onChange:this.toggleSubscription("isTelegram")}))}renderPlasma(){let{currentUser:e,isPlasmaConnected:t,notifications:i,hasModelPlasma:o,isPlasmaEnabled:n,isRemovingPlasmaUIEnabled:r}=this.props;return e&&o&&!r?t?a.createElement("div",{className:(0,b.AK)("method",{"method-disabled":!n})},a.createElement("span",null,this.props.i18n.trans("notificationsTooltip.plasma"),!n&&this.renderWarningHint("plasma","enablePlasmaNotifications")),a.createElement(v.Z,{iconImg:"switcher-ds",theme:"light",className:"method__switcher",isChecked:i.isPlasma,onChange:n?this.toggleSubscription("isPlasma"):void 0})):a.createElement("div",{className:"method method-disabled",onClick:()=>{this.isConnectPlasmaClicked=!0,f.P4.show(J.K,{openedFrom:E.u$.NOTIFICATIONS_TOOLTIP})}},a.createElement("span",{className:"connect-link"},this.props.i18n.trans("notificationsTooltip.connectPlasma")),a.createElement(v.Z,{iconImg:"switcher-ds",className:"method__switcher",theme:"light",isChecked:!1,onChange:void 0})):null}renderTelegramSocketSubscription(){let e="expanded"===this.state.expandState,{currentUser:t,isVisible:i}=this.props;return t&&i&&e?a.createElement(p.Z,{key:"telegramUpdateEvent",eventsWithCallbacks:[{subscriptionKey:`telegramUpdate#${t.id}`,callback:this.telegramConnectEventHandler}]}):null}clearAnimationTimers(){this.actualHeightRaf&&(cancelAnimationFrame(this.actualHeightRaf),this.actualHeightRaf=null),this.animationEndTimer&&(clearInterval(this.animationEndTimer),this.animationEndTimer=null)}componentDidMount(){(0,P.Z)(this.propsUpdateToActionsMap,{},this.props)}componentDidUpdate(e){(0,P.Z)(this.propsUpdateToActionsMap,e,this.props)}componentWillUnmount(){this.clearAnimationTimers()}render(){let{onClose:e,className:t,isMobile:i,shouldPreserveVerticalPosition:o,isSubscribed:n,shouldMethodsListBeExpanded:r}=this.props;return a.createElement("div",{onClick:this.onWrapperClick,className:(0,b.AK)("notifications-tooltip-content",t,this.state.expandState,{active:n,mobile:i,"preserve-vertical-position":o})},a.createElement("div",{className:"visible-wrapper"},a.createElement("div",{className:"close",onClick:e},a.createElement(h.Z,{size:i?20:14,img:"close-ds"})),this.renderTop(),a.createElement("div",{ref:this.handleMethodsWrapperRef,className:(0,b.AK)("methods-wrapper",{animated:!r})},a.createElement("div",{className:"methods",key:String("collapsed"===this.state.expandState)},a.createElement("span",{className:"methods-title"},this.props.i18n.trans("notificationsTooltip.methodsTitle")),a.createElement("div",null,this.renderEmail(),this.renderWebPush(),this.renderTelegram(),this.renderPlasma()),this.renderPwaApp()))),this.renderTelegramSocketSubscription())}constructor(e){super(e),(0,o._)(this,"actualHeightRaf",null),(0,o._)(this,"animationEndTimer",null),(0,o._)(this,"methodsWrapperRef",{current:null}),(0,o._)(this,"isConnectTelegramClicked",!1),(0,o._)(this,"isConnectPlasmaClicked",!1),(0,o._)(this,"toggleSubscription",e=>t=>{let{model:i,currentUser:o,buttonLocation:a,isUserWithoutEmail:n}=this.props,r="isEmail"===e&&t;("isGuestPush"===e||"isPush"===e)&&t&&this.props.showIosPushInstructionsConditionally(),r&&o&&!o.isEmailVerified&&f.P4.show(l.W,{variant:n?"addEmail":"default"}),this.props.updateModelSubscription({modelId:i.id,[e]:t},i,a)}),(0,o._)(this,"propsUpdateToActionsMap",[{update:"isSubscribed",action:()=>{this.props.isSubscribed&&this.expandMethodsWrapper()}},{update:["isSubscribed","currentUserId","isVisible"],action:()=>{this.isConnectTelegramClicked=!1,this.isConnectPlasmaClicked=!1}},{update:"isTelegramConnected",action:()=>{this.isConnectTelegramClicked&&this.props.isTelegramConnected&&!this.props.notifications.isTelegram&&this.toggleSubscription("isTelegram")(!0),this.isConnectTelegramClicked=!1}},{update:"isPlasmaConnected",action:()=>{this.isConnectPlasmaClicked&&this.props.isPlasmaConnected&&!this.props.notifications.isPlasma&&this.toggleSubscription("isPlasma")(!0),this.isConnectPlasmaClicked=!1}}]),(0,o._)(this,"handleMethodsWrapperRef",e=>{this.methodsWrapperRef.current=e,this.props.shouldMethodsListBeExpanded&&this.expandMethodsWrapper()}),(0,o._)(this,"expandMethodsWrapper",()=>{let e=this.methodsWrapperRef.current;!("collapsed"!==this.state.expandState)&&e&&(this.actualHeightRaf=requestAnimationFrame(()=>{e.style.height=`${e.scrollHeight}px`,this.setState({expandState:"expanding"}),this.animationEndTimer=window.setTimeout(()=>{this.setState({expandState:"expanded"})},500)}))}),(0,o._)(this,"onToggleMainSwitcher",()=>{let{model:e,buttonLocation:t}=this.props;return this.props.toggleModelNotifications({model:e,buttonLocation:t})}),(0,o._)(this,"telegramConnectEventHandler",({isEnabled:e,telegramUsername:t})=>{this.props.toggleTelegramBot(e,t)}),(0,o._)(this,"renderPwaApp",()=>{let{isPWAPromotionActive:e,buttonLocation:t}=this.props;if(!e)return null;let i=E.BROWSER_CAPABILITIES.touch&&!(E.BROWSER_CAPABILITIES.iPad||E.BROWSER_CAPABILITIES.iPadOS);return a.createElement(Q,{componentLocation:t,className:(0,b.AK)("notifications-tooltip-content__pwa",{"media-up-to-m-hidden":i})})}),(0,o._)(this,"onWrapperClick",e=>{this.props.shouldStopPropagation&&e.stopPropagation()}),this.state={expandState:e.isSubscribed?"expanded":"collapsed",instanceId:`notification-tooltip-content_${Date.now()}`}}}let ee=(0,C.GV)(Y),et=(0,n.$j)((e,{model:t})=>{let{personalNotifications:{subscription:i}}=e,o=(0,A.ts)(e);return{currentUser:o,currentUserId:null==o?void 0:o.id,notifications:(0,c.KZ)(e,null==t?void 0:t.id),isSubscribed:(0,c.LW)(e,null==t?void 0:t.id),isTelegramConnected:(0,A.hi)(e),isPlasmaConnected:(0,S.Lw)(e),hasModelPlasma:(0,j.wi)(e),isEmailEnabled:!!(!o||(null==i?void 0:i.isEmail)),isUserWithoutEmail:(0,G.vE)(e),isPushEnabled:!!(!o||(null==i?void 0:i.isPush)),isPlasmaEnabled:!!(!o||(null==i?void 0:i.isPlasma)),isWebPushiOSEnabled:(0,N.rU)(e),isWebPushiOSNewBadge:(0,T.kML)(e),isPWAPromotionActive:(0,q.h)(e),isRemovingPlasmaUIEnabled:(0,T.HwD)(e)}},X)(ee)},36533:(e,t,i)=>{i.d(t,{B:()=>b});var o=i(27378),a=i(4289),n=i(65804),r=i(99973),s=i(84423),l=i(8054),d=i(33440),c=i(94349),p=i(97606),m=i(94380),u=i(95654),h=i(58543),v=i(12278),g=i(52729),E=i(96775),f=i(48368);let _={link_newLine:"PushNotificationWarningText__link_newLine#x2"},b=({render:e=e=>o.createElement(o.Fragment,null,e),place:t})=>{let{trans:i}=(0,p.QT)(),b=(0,m.T)(),C=(0,u.C)(c.nW),P=(0,u.C)(v.M7),N=(0,u.C)(h.rU),A=(0,l.R)(),T=()=>b((0,g.Rl)()),S=()=>s.P4.show(f.q,{});return N&&r.BROWSER_CAPABILITIES.iosPwaSupport?r.BROWSER_CAPABILITIES.isPWA?r.BROWSER_CAPABILITIES.iosPushSupport?"default"===A?e(o.createElement(n.Z,{messageId:"notificationsTooltip.enablePushNotifications",elements:{link:o.createElement("a",{onClick:"viewcam"===t?()=>{P&&!C?b((0,d.Mg)({isPush:!0})):T()}:T})}})):"viewcam"===t&&P&&!C?e(o.createElement(n.Z,{messageId:"notificationsTooltip.enablePushNotificationsForModel",elements:{link:o.createElement(a.rU,{to:{pathname:"/notifications",state:{openedSection:"push"}}})}})):"denied"===A?e(o.createElement(n.Z,{messageId:"notificationsTooltip.pwaBlockedPushInstruction",elements:{link:o.createElement("a",{className:_.link_newLine,onClick:()=>s.P4.show(E.D,{})})}})):null:e(o.createElement(n.Z,{messageId:"notificationsTooltip.enablePushNotifications",elements:{link:o.createElement("a",{onClick:S})}})):e(o.createElement(n.Z,{messageId:"notificationsTooltip.installPwa",elements:{link:o.createElement("a",{onClick:S})}})):"viewcam"===t&&P&&!C?e(o.createElement(n.Z,{messageId:"notificationsTooltip.enableBrowserNotifications",elements:{link:o.createElement(a.rU,{to:{pathname:"/notifications",state:{openedSection:"push"}}})}})):"notifications-page"===t&&"granted"!==A?e(i("notificationsTable.pushDisabledTT")):null}},98233:(e,t,i)=>{i.d(t,{Z:()=>N});var o=i(18775),a=i(27378),n=i(48204),r=i(1961),s=i(56802),l=i(69353),d=i(77382),c=i(11850),p=i(80936),m=i(39120),u=i(99382),h=i(29413),v=i(3034),g=i(99748),E=i(97606),f=i(66483);let _="subscribe-btn",b={toggleModelNotifications:r.oj,showModal:d.K4};class C extends a.Component{render(){let e;let{isSubscribed:t,style:i="default",subscribeCaption:o,subscribedCaption:n,user:r,preventResponsiveCaption:l,size:d="default",isLayoutUpToL:c,isCurrentUserModelOrStudio:p,buttonLocation:E,uiBlocking:{isVisible:f}}=this.props;if(!r.isModel||p)return null;let b="small"===d;return e=t&&!l?n||this.props.i18n.trans("button.subscription.unSubscribe"):o||this.props.i18n.trans("button.subscription.subscribe"),a.createElement(m.Z,{...this.props,propsUpdateToActionsMap:this.propsUpdateToActionsMap},a.createElement(u.ZP,{className:(0,g.AK)("subscribe-button",{subscribed:t}),onClick:this.subscribeButtonClickHandler,size:"default",type:"anchor",style:t?"default":i,id:_,innerRef:this.buttonRef,"aria-label":e},a.createElement(h.Z,{img:t?"notifications-off":"notifications"}),!b&&a.createElement("span",null,e),b&&!f&&a.createElement(v.Z,{placement:"top",targetId:_,isMobileRelative:!1},e)),f&&a.createElement(s.R,{buttonLocation:`PushNotificationPopupAfterClickOn_${E}`,model:r,isForcePlacement:!0,placement:c?"bottom":"left",targetId:_,isVisible:!0,onClose:this.props.uiBlocking.unlockUI}))}constructor(...e){super(...e),(0,o._)(this,"isSubscribeClicked",!1),(0,o._)(this,"buttonRef",a.createRef()),(0,o._)(this,"propsUpdateToActionsMap",[{update:"isSubscribed",action:()=>{this.isSubscribeClicked&&this.props.isSubscribed&&this.buttonRef.current&&!this.props.withoutTooltip&&this.props.uiBlocking.lockUI(),this.isSubscribeClicked=!1}}]),(0,o._)(this,"subscribeButtonClickHandler",()=>{let{user:e,buttonLocation:t,isSubscribed:i}=this.props;this.isSubscribeClicked=!i,this.props.toggleModelNotifications({model:e,buttonLocation:t})})}}let P=(0,E.GV)(C),N=(0,c.xl)((0,p.H)("isLayoutUpToL")((0,n.$j)((e,t)=>{var i;let{auth:{isLoggedIn:o,isLoggingOut:a,currentUser:n},profile:r}=e,{user:s}=t;return{isCurrentUserModelOrStudio:(0,f.ly)(e),currentUser:n,isEmailVerified:null===(i=r.user)||void 0===i?void 0:i.isEmailVerified,isSubscribed:(0,l.LW)(e,s.id),isLoggedIn:o&&!a}},b)(P)))},70104:(e,t,i)=>{i.d(t,{V6:()=>s,Zl:()=>r,ov:()=>n,rS:()=>l,rf:()=>c,to:()=>d});var o=i(80406);let a=e=>e.scheduleInformer,n=(0,o.P1)([a],e=>null==e?void 0:e.isEnabled),r=(0,o.P1)([a],e=>null==e?void 0:e.isLoaded),s=(0,o.P1)([a],e=>null==e?void 0:e.readableOffset),l=(0,o.P1)([a],e=>null==e?void 0:e.timeslots),d=({viewCam:e})=>e.nextBroadcast,c=e=>{let t=d(e);return!!(null==t?void 0:t.day)}},96226:(e,t,i)=>{i.d(t,{R:()=>m});var o=i(27378),a=i(1948),n=i(29413),r=i(99748),s=i(97606),l=i(95654),d=i(71227);let c=e=>({siteRulesLink:o.createElement(a.Z,{href:e,target:"_blank",className:"pre-moderation-note__link"})}),p=(e,{trans:t})=>(i,o)=>i?t(i):e?null==o?void 0:o(c(e)):null,m=e=>{let{messageId:t,renderCompositeTranslationMessage:i,additionalMessageId:a,renderCompositeTranslationAdditionalMessage:c,className:m,type:u="warning",variant:h="adaptive"}=e,v=(0,s.QT)(),g=p((0,l.C)(d.NR),v);return o.createElement("div",{className:(0,r.AK)("pre-moderation-note",`pre-moderation-note--${h}`,`pre-moderation-note--${u}`,m)},o.createElement(n.Z,{img:"warning"===u?"time-pending":"ban",className:"pre-moderation-note__icon",size:27}),o.createElement("div",{className:"pre-moderation-note__text"},o.createElement("span",null,g(t,i),"\xa0"),o.createElement("span",null,g(a,c))))}},61395:(e,t,i)=>{i.d(t,{Z:()=>l});var o=i(27378),a=i(29413),n=i(3034),r=i(95654),s=i(82512);let l=function(){let e=(0,o.useRef)(null);return(0,r.C)(s.JT)?o.createElement("div",{className:"allow-using-content-indicator",ref:e},o.createElement(a.Z,{img:"flag-simple"}),o.createElement(n.Z,{targetRef:e,placement:"bottom"},"Allows using content in promos")):null}},73600:(e,t,i)=>{i.d(t,{A:()=>c});var o=i(27378),a=i(4289),n=i(65804),r=i(3034),s=i(99748),l=i(15921);let d={root:"RatingPositionLabel#e2",position:"RatingPositionLabel__position#qO",logoIcon:"RatingPositionLabel__logoIcon#zV",icon:"RatingPositionLabel__icon#xU",boosted:"RatingPositionLabel__boosted#jF",transparent:"RatingPositionLabel__transparent#bM"},c=({position:e=0,points:t,tooltipText:i="",href:c,className:p,isBoosted:m,isTransparent:u})=>{let h=(0,o.useRef)(null);if(!e)return null;let v=i||o.createElement(o.Fragment,null,o.createElement(l.Z,{img:"stripchat-logo",className:d.logoIcon}),o.createElement(n.Z,{messageId:"bestModels.strippoints",parameters:{points:t},choiceParameter:"points"})),g=o.createElement(o.Fragment,null,o.createElement(l.Z,{img:"best-models",className:d.icon}),o.createElement("div",{className:d.position},e)),E=o.createElement(r.Z,{isMobileRelative:!1,targetRef:h,placement:"top"},v),f=(0,s.AK)(p,d.root,{[d.boosted]:m,[d.transparent]:u});return c?o.createElement(o.Fragment,null,o.createElement(a.rU,{to:c,className:f,ref:h},g),E):o.createElement(o.Fragment,null,o.createElement("div",{className:f,ref:h},g),E)}},98699:(e,t,i)=>{i.d(t,{D:()=>o});let o=(0,i(98846).n7)({resolved:{},chunkName:()=>"UserAlbums",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!i.m[t]},importAsync:()=>Promise.all([i.e(3616),i.e(8846),i.e(4301)]).then(i.bind(i,8206)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){return i(this.resolve(e))},resolve:()=>8206})},69024:(e,t,i)=>{i.d(t,{J:()=>o});let o=(0,i(98846).n7)({resolved:{},chunkName:()=>"videos",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!i.m[t]},importAsync:()=>Promise.all([i.e(3616),i.e(1813),i.e(1961),i.e(5905)]).then(i.bind(i,41133)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){return i(this.resolve(e))},resolve:()=>41133})},99696:(e,t,i)=>{i.d(t,{Z:()=>eO});var o=i(18775),a=i(27378),n=i(48204),r=i(97554),s=i(96226),l=i(36846),d=i(57174),c=i(29413),p=i(85353),m=i(99973),u=i(84423),h=i(99748),v=i(97606),g=i(62512),E=i(12278),f=i(71227),_=i(42339),b=i(7786),C=i(19144);let P=({src:e,poster:t})=>{let i=(0,a.useRef)(null),[o,n]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(m.BROWSER_CAPABILITIES.safari&&i.current){var e,t;let o=null===(t=i.current)||void 0===t?void 0:null===(e=t.children)||void 0===e?void 0:e[0];o instanceof HTMLVideoElement&&(o.controls=!1,o.muted=!0,o.setAttribute("playsinline",""),o.setAttribute("muted",""),o.autoplay=!0,setTimeout(()=>{let e=o.play();e.then&&e.then(()=>{}).catch(()=>{i.current&&(i.current.style.display="none"),n(!0)})},0))}},[]),o?a.createElement("img",{src:e,alt:"Muted Video"}):a.createElement("div",{className:"profile-cover__video-parent",ref:i,dangerouslySetInnerHTML:{__html:` `}})};var N=i(6083),A=i(11850),T=i(61171),S=i(53788),w=i(94380),I=i(95654),k=i(21044),R=i(2894),M=i(98941),y=i(65804),L=i(32465),U=i(81535);let W=({onVerifyClick:e})=>{let[t,i,o]=(0,L.O)(!1);return a.createElement("div",{className:"profile-cover-dropdown__hint"},a.createElement(y.Z,{messageId:"profileCover.hint",elements:{link:a.createElement("a",{onClick:t=>{e(t),i()},className:"user-kyc-photos-panel__verify-link"})}}),t&&a.createElement(U.Q,{onClose:o}))},Z=({canRemove:e,onPhotoUpload:t,onCoverReposition:i,uploadedMediaType:o,isVideoAvailable:n,isCoverReposition:r,isProcessing:s,isComputerVisionForUserPhotosEnabled:l})=>{let{trans:d}=(0,v.QT)(),[p,u,g]=(0,A.eW)(),E=(0,S.v1)(),[f,_]=(0,a.useState)(k.Nq.IMAGE),C=(0,w.T)(),P=(0,I.C)(N.K0)===M.I$.APPROVED,y=(0,a.useRef)(null),L=l&&!P&&!n,U=R.yI.join(", ");return a.createElement("div",{className:(0,h.AK)("profile-cover-dropdown",{"profile-cover-dropdown--new":L})},a.createElement("button",{className:"profile-cover-dropdown__button",type:"button",onClick:u},a.createElement(c.Z,{img:"edit",size:12}),a.createElement("span",null,d("profileCover.editCover"))),a.createElement("form",{className:"hidden"},a.createElement("input",{accept:{image:"image/png,image/jpeg,image/gif",video:U}[f],onChange:e=>{let{files:i}=e.target;if(null==i?void 0:i.length){var o,a;E.emit("profile:Save Cover"),f===k.Nq.IMAGE&&(null==t||t(),C((0,b.mJ)(i[0]))),f===k.Nq.VIDEO&&C((0,b.$x)(i[0])),null==y||null===(a=y.current)||void 0===a||null===(o=a.form)||void 0===o||o.reset()}},ref:y,type:"file"})),p&&a.createElement(T.Z,{className:"profile-cover-dropdown__tooltip",stateValueGetter:()=>p,isMobileViewEnabled:!1,background:"light",position:"left",shadow:!0},L&&a.createElement(W,{onVerifyClick:g}),a.createElement("button",{className:"profile-cover-dropdown__action",type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),_(k.Nq.IMAGE),(null==y?void 0:y.current)&&setTimeout(()=>{var e;return null==y?void 0:null===(e=y.current)||void 0===e?void 0:e.click()},0)}},a.createElement(c.Z,{img:"album",size:14}),d(o===k.Nq.IMAGE?"profileCover.updatePhoto":"profileCover.uploadPhoto")),n&&a.createElement("button",{className:"profile-cover-dropdown__action",type:"button",onClick:e=>{e.stopPropagation(),_(k.Nq.VIDEO),(null==y?void 0:y.current)&&setTimeout(()=>{var e;return null==y?void 0:null===(e=y.current)||void 0===e?void 0:e.click()},0)}},a.createElement(c.Z,{img:"camera",size:14}),d(o===k.Nq.VIDEO?"profileCover.updateVideo":"profileCover.uploadVideo")),e&&m.BROWSER_CAPABILITIES.desktop&&!m.BROWSER_CAPABILITIES.isTablet&&!s&&a.createElement("button",{className:(0,h.AK)("profile-cover-dropdown__action",{"profile-cover-dropdown__action--active":r}),type:"button",onClick:e=>{e.stopPropagation(),i()}},a.createElement(c.Z,{img:"drag-n-drop-vertical",size:14}),d("profileCover.repositionCover")),e&&a.createElement(a.Fragment,null,a.createElement("hr",null),a.createElement("button",{className:"profile-cover-dropdown__action",type:"button",onClick:e=>{e.stopPropagation(),C((0,b._P)())}},a.createElement(c.Z,{img:"trash",size:14}),d("profileCover.removeCover")))))};var B=i(49743),O=i(16421),D=i(15720),H=i(84185),V=i(51299),F=i(65103);let{AVATAR:x}=k.UPDATE_TYPES;class $ extends a.Component{componentDidMount(){let{targetElement:e}=this;e&&(0,g.H0)(this,e,"click",this.showTooltip)}componentWillUnmount(){(0,g.OM)(this)}componentDidUpdate(e){if((0,D.w8)(this.props,e))return;let{hasUserAvatarUpdateSucceeded:t}=this.props,{isDeleteAvatarConfirmationOpen:i,isPhotoUploadPopupOpen:o}=this.state;t&&(i=!1,o=!1),(0,D.Tz)(this,{isDeleteAvatarConfirmationOpen:i,isPhotoUploadPopupOpen:o})}get targetElement(){return this.props.targetId?document.getElementById(this.props.targetId):null}renderSocket(){if(!this.props.isLoggedIn)return null;let{currentUser:e}=this.props;return e?a.createElement(l.Z,{eventsWithCallbacks:[{subscriptionKey:`imageUpload#${e.id}`,callback:this.imageUploadEventHandler}]}):null}render(){var e;let{availableSettings:t,isLoadingAvailableSettings:i,isUpdatingUserAvatar:o,targetId:n,withModerationStatus:r,modelData:s,user:l}=this.props,{isDeleteAvatarConfirmationOpen:d,isPhotoUploadPopupOpen:p,isImageLoading:m,isDropdownVisible:u}=this.state,v=!!(null==l?void 0:null===(e=l.profile)||void 0===e?void 0:e.avatarUrl);return a.createElement("div",{className:"user-avatar-editable"},u&&a.createElement(T.Z,{className:"dropdown-menu",stateValueGetter:()=>u,onClose:()=>this.setDropdownVisible(!1),isMobileViewEnabled:!1,background:"light",position:"bottom",shadow:!0},a.createElement("button",{type:"button",onClick:this.updatePhotoClickHandler,disabled:i,className:"dropdown-menu-item"},a.createElement(c.Z,{img:"photo-2"}),v?this.props.i18n.trans("button.updatePhoto"):this.props.i18n.trans("profileCover.uploadPhoto")),v&&a.createElement("div",{className:"dropdown-menu-item-splitter"},a.createElement("button",{type:"button",onClick:this.deleteAvatarClickHandler},a.createElement(c.Z,{img:"trash"}),this.props.i18n.trans("button.delete")))),p&&a.createElement(V.d,{isInPortal:!0,avatarSettings:null==t?void 0:t.avatar,isPending:i||o,onClose:this.photoUploadPopupCloseHandler,onSave:this.photoUploadPopupSaveHandler}),d&&a.createElement(O.Z,{isInPortal:!0,onConfirm:this.deleteAvatarConfirm,onCancel:this.deleteAvatarCancel,okText:this.props.i18n.trans("button.delete")},a.createElement("p",null,this.props.i18n.trans("profile.deleteAvatar.confirm"))),a.createElement("div",{className:(0,h.AK)("user-info",{"is-pending":i||o})},a.createElement("div",{className:(0,h.AK)("avatar-wrapper",{"is-loading":m})},a.createElement(C.Z,{isAwardBadgeVisible:!0,levelBadgeSize:"big",shouldShowLevelBadge:!0,shouldShowRealLevel:!0,isLoading:m,user:l,modelData:s,withModerationStatus:r}),a.createElement("div",{className:"avatar-upload",id:n},a.createElement(c.Z,{img:"photo-3"})))),this.renderSocket())}constructor(e){super(e),(0,o._)(this,"setDropdownVisible",e=>{this.setState({isDropdownVisible:e})}),(0,o._)(this,"showTooltip",e=>{e.stopPropagation();let{isImageLoading:t,isDropdownVisible:i}=this.state,o=this.targetElement;!t&&o&&e.currentTarget.id===o.id&&this.setState({isDropdownVisible:!i})}),(0,o._)(this,"imageUploadEventHandler",({name:e})=>{e===m.Wh.FULL&&this.setState({isImageLoading:!1})}),(0,o._)(this,"updatePhotoClickHandler",()=>{this.setDropdownVisible(!1),this.props.updatePrepare(x),this.setState({isPhotoUploadPopupOpen:!0})}),(0,o._)(this,"photoUploadPopupCloseHandler",()=>{this.setState({isPhotoUploadPopupOpen:!1})}),(0,o._)(this,"photoUploadPopupSaveHandler",e=>{this.setState({isImageLoading:!0}),this.props.updateProfile({avatar:e},x,{isMultipart:!0}).then(()=>{this.props.eventBus.emit("profile:Save Avatar"),this.setState({isImageLoading:!1})})}),(0,o._)(this,"deleteAvatarClickHandler",()=>{this.setDropdownVisible(!1),this.setState({isDeleteAvatarConfirmationOpen:!0})}),(0,o._)(this,"deleteAvatarConfirm",()=>{this.props.updateProfile({avatar:null},x,{notifications:{success:this.props.i18n.trans("profile.deleteAvatar.success")}})}),(0,o._)(this,"deleteAvatarCancel",()=>{this.setState({isDeleteAvatarConfirmationOpen:!1})}),this.state={isDeleteAvatarConfirmationOpen:!1,isPhotoUploadPopupOpen:!1,isDropdownVisible:!1,isImageLoading:!1}}}let K=(0,v.GV)($),z=(0,S.p1)(K),Q={updatePrepare:H.Fh,updateProfile:H.ck},q=(0,n.$j)(e=>{let{availableSettings:{data:t,isPending:i}}=e;return{availableSettings:t,currentUser:(0,E.ts)(e),hasUserAvatarUpdateSucceeded:(0,F.rg)(e,x),isLoggedIn:(0,E.Cg)(e),isLoadingAvailableSettings:i,isUpdatingUserAvatar:(0,F.fc)(e,x)}},Q)(z);var G=i(98233),j=i(98568),J=i(243),X=i(17459),Y=i(99382),ee=i(3034),et=i(40580),ei=i(6818);class eo extends a.Component{render(){let{currentUser:e,isInFavorites:t,isLoggedIn:i,user:o,customContent:n,style:r="default",size:s="default"}=this.props,l=!i||!(null==e?void 0:e.isModel)&&!(null==e?void 0:e.isStudio);if(!(o.isModel&&l))return null;let d="small"===s,p=a.createElement(c.Z,{img:"heart-fill"}),m=this.props.i18n.trans(t?"button.removeFromFavorites":"button.addToFavorites"),u="favorite-btn";return a.createElement(Y.ZP,{onClick:this.clickHandler,size:"default",style:r,className:(0,h.AK)("favorite-button",{favorited:t}),id:u,"aria-label":m},"large"===s&&p,d?p:a.createElement("span",null,n||m),d&&a.createElement(ee.Z,{placement:"top",targetId:u,isMobileRelative:!1},m))}constructor(...e){super(...e),(0,o._)(this,"clickHandler",()=>{let{user:e}=this.props;this.props.toggleFavorite(e)})}}let ea=(0,v.GV)(eo),en={toggleFavorite:et.ZN},er=(0,n.$j)((e,t)=>{let{auth:{currentUser:i,isLoggedIn:o,isLoggingOut:a}}=e,{user:n}=t;return{currentUser:i,isInFavorites:(0,ei.D9)(e,n.id),isLoggedIn:o&&!a}},en)(ea);var es=i(53902),el=i(20436),ed=i(93223),ec=i(46607);let ep=(0,n.$j)((e,t)=>{let{user:i}=t;return{isViewCamPage:(0,J.mT)(e),isBanned:(0,ec.r0)(e,i.id),isGeoBanned:(0,ec.mp)(e,i.id),isMoreVisibleReportButtonEnabled:(0,_.TWc)(e),isDSAReportModelContentMessageAvailable:(0,f.PO)(e)}})(({isViewCamPage:e,user:t,isBanned:i,isGeoBanned:o,isMoreVisibleReportButtonEnabled:n,isDSAReportModelContentMessageAvailable:s})=>{let{isModel:l}=t,d=l?"small":"default",c=!t.isDeleted&&!(i||o)&&!t.isBlocked,p=(0,I.C)(e=>(0,f.W2)(e,t));return c?a.createElement("div",{className:(0,h.AK)("action-buttons user-action-buttons",{user:!l})},a.createElement("div",{className:"action-buttons-container"},a.createElement(j.Z,{source:"profileControlPanel"}),a.createElement(er,{user:t,style:"outline",size:"small"}),a.createElement(G.Z,{key:null==t?void 0:t.id,buttonLocation:"profileButton",user:t,style:"outline",size:"small"}),a.createElement("div",{className:"splitter"}),a.createElement(es.Z,{user:t,style:"outline",size:d}),a.createElement(ed.Z,{user:t,toolTipId:"user-actions-send-pm",shouldOpen:e?"privateTab":"chat",style:"outline",size:d}),a.createElement(X.l,{recipient:t}),l&&a.createElement(r.Z,{className:(0,h.AK)("user-action-buttons__model-additional-menu--margins",!n&&"user-action-buttons__model-additional-menu"),isReportHidden:s,shouldSwitchToNextModelOnNotInterested:!0,report:{source:"profile"},variant:"profile",model:t}),p&&a.createElement(el.f,{source:"profile",className:"user-action-buttons__report-btn model-additional-menu__button",reportedUser:t,reportType:t.isModel?"model":"user",iconSize:"medium",isTextHidden:!0,shouldHideTooltipTriangle:!0,tooltipPosition:"top-start"}))):null});var em=i(13160),eu=i(4852),eh=i(710),ev=i(95366),eg=i(21769),eE=i(73600),ef=i(56322),e_=i(62663),eb=i(62203),eC=i(77602);let eP=({size:e=16})=>a.createElement("div",{className:"flirting-icon"},a.createElement(c.Z,{img:"candy",size:e}),a.createElement("div",{className:"flirting-icon__text"},"Flirting"));var eN=i(1948);let eA=({name:e,link:t})=>a.createElement(eN.Z,{className:"xh-porn-star-button",href:t,target:"_blank",rel:"noopener noreferrer"},a.createElement("span",{className:"pornstar-label"},a.createElement(c.Z,{img:"star",className:"star-full pornstar-star",fill:"currentColor",height:12,width:12}),"Pornstar"),a.createElement("span",{className:"pornstar-name"},e));var eT=i(7474),eS=i(40686),ew=i(82512),eI=i(66483),ek=i(5132);let eR=(0,a.memo)(e=>{var t,i;let{trans:o}=(0,v.QT)(),n=(0,a.useRef)(null),{isNonNudeWL:r,isProfileAvailable:s,contestTop:l,user:d,xHamsterPornStarLinkData:c,shouldShowRealLevel:p,isMediaPage:m,isFlirtingModeEnabled:u,modelData:h}=e,{isLayoutMoreThanL:g}=(0,e_.do)("isLayoutMoreThanL"),E=(0,I.C)(eC.C1),f=(0,I.C)(_.H5U),b=(0,I.C)(e=>(0,_.flF)(e,E)),C=(null==h?void 0:h.contestGender)||"",P=(0,eg.wH)(ev.WIV,C)?ev.WIV[C]:E,N=d.isModel&&s?{to:`/${d.username}`}:null,A=!r&&l&&!!l.position&&Number(l.position)<=Math.max(100,b),T=u&&(null==h?void 0:h.isNonNude),{userRanking:S}=d,w=null!==(t=null==S?void 0:S.realLevel)&&void 0!==t?t:null==S?void 0:S.level,k=null!==(i=null==S?void 0:S.realLeague)&&void 0!==i?i:null==S?void 0:S.league,R=(null==l?void 0:l.continent)?`/top/${P}/${eu.F.CURRENT_MONTH}-${em.Hx[l.continent]}`:`/top/${P}/${eu.F.CURRENT_MONTH}`;return a.createElement("div",{className:"username-panel"},g&&a.createElement("div",{className:"username-panel__status-icons"},a.createElement(ek.Z,{isUltimateIconTooltipVisible:!0,levelBadgeSize:"regular",isUltimateIconVisible:!0,user:d})),a.createElement("div",{className:"username-panel__content"},a.createElement(m?"span":"h2",{className:"username-panel__title"},!g&&a.createElement(ek.Z,{isUltimateIconTooltipVisible:!0,levelBadgeSize:"regular",isUltimateIconVisible:!0,user:d}),a.createElement(eT.Z,{shouldShowRealLevel:p,isLevelStatusVisible:!0,placeId:"user-info",className:"username-panel__name",user:d,link:N,hideIcons:!0}),d.isModel&&a.createElement("div",{className:"username-panel__icons"},T&&a.createElement(eP,null),f&&A&&l.position&&a.createElement(a.Fragment,null,a.createElement(eh.w,{ref:n,position:l.position,href:R}),a.createElement(ef.Z,{targetRef:n,isMobileRelative:!1,placement:"top",isForceVisible:!1},o("profile.contestTooltip"))),!f&&A&&a.createElement(eE.A,{tooltipText:o("profile.contestTooltip"),href:R,position:l.position,points:l.points||0,className:"username-panel__position"}))),d.isModel&&c&&a.createElement("div",{className:"username-panel__subtitle"},a.createElement(eA,c)),!d.isModel&&!d.isStudio&&a.createElement("div",{className:"username-panel__subtitle"},a.createElement("span",{className:"username-panel__ranking"},o(`userLevels.leagues.${k}`,{color:o(`userLevels.leaguesColor.${k}`)})," | ",o("userLevels.levelNumber",{level:null!=w?w:"?"})))))}),eM=(0,n.$j)((e,t)=>{let{user:i,modelData:o}=t;return{xHamsterPornStarLinkData:(null==o?void 0:o.isPornStar)?(0,ew.Lz)(e,i.id):null,contestTop:(0,eI.bh)(e,i.id),isMediaPage:(0,J.HK)(e),isNonNudeWL:(0,eb.Km)(e),isFlirtingModeEnabled:(0,_.VgH)(e),isOwnProfile:(0,eS.nf)(e)}})(eR);var ey=i(2811),eL=i(32284),eU=i(61132);let eW={saveCoverSettings:b.sd};class eZ extends a.PureComponent{componentDidMount(){(0,g.H0)(this,window,"mousemove",this.onDrag),(0,g.H0)(this,window,"mouseup",this.onDragEnd)}componentWillUnmount(){(0,g.OM)(this)}static getDerivedStateFromProps(e,t){var i,o,a,n,r,s;let{user:l,editable:d}=e;return d&&(null==l?void 0:null===(i=l.profile)||void 0===i?void 0:i.avatarUrl)&&t.avatarUrl!==(null==l?void 0:null===(o=l.profile)||void 0===o?void 0:o.avatarUrl)&&t.isFirstRender?{avatarUrl:null==l?void 0:null===(s=l.profile)||void 0===s?void 0:s.avatarUrl,isFirstRender:!1}:d&&(null==l?void 0:null===(a=l.profile)||void 0===a?void 0:a.avatarUrl)&&t.avatarUrl!==(null==l?void 0:null===(n=l.profile)||void 0===n?void 0:n.avatarUrl)&&!t.isFirstRender?{isAvatarLoading:!0,avatarUrl:null==l?void 0:null===(r=l.profile)||void 0===r?void 0:r.avatarUrl}:null}getIsHiddenByAgeVerification(){let{needVerifyAge:e,user:t,currentUserId:i}=this.props;return e&&t.id!==i}renderSocket(){let{editable:e,user:t}=this.props,{isAvatarLoading:i,isPhotoCoverLoading:o}=this.state,n=[];return e&&n.push(a.createElement(l.Z,{key:"videoEvent",events:[`introsUpdated#${t.id}`]})),i&&n.push(a.createElement(l.Z,{key:"avatarEvent",eventsWithCallbacks:[{subscriptionKey:`imageUpload#${t.id}`,callback:this.avatarUploadEventHandler}]})),o&&n.push(a.createElement(l.Z,{key:"imageEvent",eventsWithCallbacks:[{subscriptionKey:`imageUpload#${t.id}`,callback:this.imageCoverUploadEventHandler}]})),n}renderPreModerationNote(){return a.createElement(s.R,{messageId:"preModeration.backgroundNotReviewed",additionalMessageId:"preModeration.notReviewedAdditional",className:"profile-cover__pre-moderation-note"})}render(){var e,t;let{editable:i,user:o,isProfileAvailable:n,hasCover:s,userCoverPreview:l,isModel:p,isUnderPreModeration:m,shouldHidePhotosUploadForUsers:u,isMoreVisibleReportButtonEnabled:v,isNewFlow:g,isLive:E,modelData:f,currentUserIsModel:_,currentUserId:b,isDSAReportModelContentMessageAvailable:P}=this.props,N=E?`/${o.username}`:(0,eL.jC)(o),{isCoverReposition:A,isChanging:T,currentPosition:S,initalPosition:w,isPhotoCoverLoading:I}=this.state,k=this.getIsHiddenByAgeVerification(),R=A?w:l.heightShift,M=s&&!I&&!k,y=o.id===b,L=null!==(t=null==f?void 0:f.avatarUrlOriginal)&&void 0!==t?t:null===(e=o.profile)||void 0===e?void 0:e.avatarUrlOriginal,U=s&&!l.isProcessing&&!A&&(!u||g)&&!k;return a.createElement(a.Fragment,null,M&&m&&(!u||g)&&this.renderPreModerationNote(),a.createElement("div",{className:"profile-cover"},U&&a.createElement("div",{className:"profile-cover__fullscreen-button",onClick:this.handleFullscreenClick},a.createElement(c.Z,{img:"fullscreen-on",size:28})),a.createElement("div",{className:"profile-cover__media"},a.createElement("div",{className:(0,h.AK)("profile-cover__media-container",{"has-cover":s&&!l.isProcessing&&(!u||g),processing:l.isProcessing}),onClick:this.handleFullscreenClick,onMouseDown:this.handleDragStart,onDrag:e=>e.preventDefault(),onDragStart:e=>e.preventDefault(),style:{"--intro-height-shift":`100% ${T?S:R}%`}},A&&a.createElement(a.Fragment,null,a.createElement("div",{className:"profile-cover__reposition-indicator"},a.createElement(c.Z,{img:"drag-reposition",size:26}),this.props.i18n.trans("profileCover.dragToReposition")),a.createElement("div",{className:"profile-cover__reposition-actions"},a.createElement("div",{className:"profile-cover__reposition-description"},this.props.i18n.trans("profileCover.dragDescription")),a.createElement(d.ZP,{style:"white-outline",onClick:this.handleResetCoverPosition},this.props.i18n.trans("button.cancel")),a.createElement(d.ZP,{style:"apply",onClick:this.handleSaveCoverPosition},this.props.i18n.trans("button.save")))),M&&(!u||g)?this.renderCoverMedia():this.renderCoverPlaceholder())),i&&!A&&(!u||g)&&a.createElement(Z,{canRemove:s,onPhotoUpload:this.handlePhotoUpload,onCoverReposition:this.handleCoverReposition,uploadedMediaType:l.type,isVideoAvailable:p,isCoverReposition:A,isProcessing:!!(null==l?void 0:l.isProcessing),isComputerVisionForUserPhotosEnabled:g}),a.createElement("div",{className:"profile-cover__info"},a.createElement("div",{className:"left-wrapper"},a.createElement("div",{className:"profile-cover__avatar-wrapper"},i?a.createElement(q,{targetId:"avatar-editable-wrapper",withModerationStatus:!0,user:o,modelData:f}):a.createElement(C.Z,{onClick:this.handleAvatarClick,className:(0,h.AK)({"avatar--clickable":L}),modelData:f,showLiveBadge:!0,isAwardBadgeVisible:!0,profileUrl:N,levelBadgeSize:"big",shouldShowLevelBadge:!0,user:o,withModerationStatus:!0})),a.createElement(eM,{user:o,modelData:f,isProfileAvailable:n,shouldShowRealLevel:!!i})),o.isModel&&!v&&a.createElement(r.Z,{model:o,report:{source:"profile"},className:"profile-cover__model-additional-menu",variant:"profile",isReportHidden:P}),!i&&a.createElement(ep,{user:o}),_&&y&&a.createElement(eU.w,{isProfilePlace:!0})),this.renderSocket()))}constructor(e){super(e),(0,o._)(this,"handlePhotoUpload",()=>{this.setState({isPhotoCoverLoading:!0})}),(0,o._)(this,"handleCoverReposition",()=>{let{userCoverPreview:{heightShift:e}}=this.props;this.setState({isCoverReposition:!0,initalPosition:e,currentPosition:e})}),(0,o._)(this,"handleDragStart",e=>{let{isCoverReposition:t}=this.state;t&&(e.stopPropagation(),this.setState({isChanging:!0,startPosition:e.pageY}))}),(0,o._)(this,"onDrag",e=>{let{isChanging:t,startPosition:i,initalPosition:o,isCoverReposition:a}=this.state;if(a&&(e.stopPropagation(),t)){let t=o-Math.round((e.pageY-i)/364*100);t>=0&&t<=100&&this.setState({currentPosition:t})}}),(0,o._)(this,"onDragEnd",e=>{let{currentPosition:t,isCoverReposition:i}=this.state;i&&(e.stopPropagation(),this.setState({isChanging:!1,initalPosition:t}))}),(0,o._)(this,"handleSaveCoverPosition",()=>{let{currentPosition:e}=this.state;this.setState({isCoverReposition:!1}),this.props.saveCoverSettings({heightShift:e})}),(0,o._)(this,"handleResetCoverPosition",()=>{let{userCoverPreview:{heightShift:e}}=this.props;this.setState({isCoverReposition:!1,initalPosition:e,currentPosition:e})}),(0,o._)(this,"handleFullscreenClick",()=>{let{user:e,hasCover:t,userCoverPreview:i,shouldHidePhotosUploadForUsers:o,isNewFlow:a,needVerifyAge:n,isReportAvatarsBackgroundPanelsEnabled:r,userCover:s}=this.props,{isCoverReposition:l}=this.state;if(l||o&&!a||n)return;let{type:d,src:c,duration:p,id:m,isXConverter:h}=s;if(d&&c&&m&&t&&!i.isProcessing){let t="image"===s.type?{type:"image",src:c}:{duration:null!=p?p:void 0,muted:!0,type:"video",src:c,playerType:h?"hls":"native"};u.P4.show(B.q,{contentUser:e,contentId:m,contentType:"intro",isReportButtonHidden:!r,...t})}}),(0,o._)(this,"renderCoverPlaceholder",()=>{var e,t;let{user:i,editable:o,userCoverPreview:n,shouldHidePhotosUploadForUsers:r,isNewFlow:s}=this.props,{isAvatarLoading:l,isPhotoCoverLoading:d}=this.state,c=null;return c=!(null===(e=i.profile)||void 0===e?void 0:e.avatarUrl)||l||r&&!s||this.getIsHiddenByAgeVerification()?a.createElement("div",{className:"pattern-image"}):a.createElement("img",{className:"blured-image",src:null===(t=i.profile)||void 0===t?void 0:t.avatarUrl,alt:""}),a.createElement(a.Fragment,null,c,o&&l||(d||n.isProcessing)&&a.createElement("div",{className:"media-processing"},a.createElement(p.Z,{size:48}),a.createElement("div",{className:"loader-text"},this.props.i18n.trans("profileCover.videoProcessing"))))}),(0,o._)(this,"renderCoverMedia",()=>{let{userCoverPreview:e}=this.props,{isPhotoCoverLoading:t}=this.state;return e.isProcessing||t?a.createElement(a.Fragment,null,this.renderCoverPlaceholder()):e.type===k.Nq.VIDEO&&e.src&&e.preview?a.createElement(P,{src:e.src,poster:e.preview}):e.type===k.Nq.IMAGE&&e.src?a.createElement("img",{src:e.src,alt:""}):null}),(0,o._)(this,"avatarUploadEventHandler",({name:e})=>{e===m.Wh.FULL&&this.setState({isAvatarLoading:!1})}),(0,o._)(this,"imageCoverUploadEventHandler",({fileName:e})=>{let{userCoverPreview:t}=this.props;e===(null==t?void 0:t.src)&&this.setState({isPhotoCoverLoading:!1,isCoverReposition:!!(m.BROWSER_CAPABILITIES.desktop&&!m.BROWSER_CAPABILITIES.isTablet),initalPosition:t.heightShift})}),(0,o._)(this,"handleAvatarClick",()=>{var e,t;let{modelData:i,user:o,isReportAvatarsBackgroundPanelsEnabled:a}=this.props,n=null!==(t=null==i?void 0:i.avatarUrlOriginal)&&void 0!==t?t:null===(e=o.profile)||void 0===e?void 0:e.avatarUrlOriginal;if(!n)return;let r={contentUser:o,contentId:o.id,contentType:"avatar",isReportButtonHidden:!a};u.P4.show(B.q,{...r,type:"image",src:n})}),this.state={isAvatarLoading:!1,isCoverReposition:!1,isPhotoCoverLoading:!1,avatarUrl:null,isChanging:!1,isFirstRender:!0,startPosition:0,initalPosition:50,currentPosition:0}}}let eB=(0,v.GV)(eZ),eO=(0,n.$j)((e,t)=>{var i;let{user:{isModel:o,id:a,userRanking:n},isComputerVisionForUserPhotosEnabled:r,editable:s}=t,l=!s||r&&(null==n?void 0:n.realLeague)&&"grey"!==n.realLeague;return{isUnderPreModeration:(0,ey.sB)(e,a),userCoverPreview:(0,ey.Mo)(e),hasCover:(0,ey.st)(e),isModel:(0,F.GS)(e),shouldHidePhotosUploadForUsers:!o,isMoreVisibleReportButtonEnabled:(0,_.TWc)(e),needVerifyAge:(0,f.m5)(e),currentUserId:(0,E.rc)(e),currentUserIsModel:null===(i=(0,E.ts)(e))||void 0===i?void 0:i.isModel,isNewFlow:l,isDSAReportModelContentMessageAvailable:(0,f.PO)(e),isReportAvatarsBackgroundPanelsEnabled:(0,_.wIK)(e),userCover:(0,ey.uM)(e)}},eW)(eB)},39709:(e,t,i)=>{i.d(t,{l:()=>r});var o=i(27378),a=i(4289),n=i(23865);let r=({className:e,menuItems:t})=>{let i=t.findIndex(e=>e.isActive());return o.createElement("div",{className:`profile-navigation header-sub ${e}`},o.createElement("div",{className:"widescreen-container navigation-container"},o.createElement(n.Z,{className:"nav-left",activeIndex:i},t.map(({key:e,label:t,to:i,isActive:n,count:r})=>o.createElement(a.OL,{key:e,className:"navbar-item",to:i,isActive:n},r?o.createElement(o.Fragment,null,t,o.createElement("span",{className:"header-sub-item-count"},r)):t)))))}},51299:(e,t,i)=>{i.d(t,{d:()=>a});var o=i(27378);let a=(0,i(98846).n7)({resolved:{},chunkName:()=>"users",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!i.m[t]},importAsync:()=>Promise.all([i.e(8734),i.e(2681)]).then(i.bind(i,83249)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){return i(this.resolve(e))},resolve:()=>83249},{fallback:o.createElement(o.Fragment,null)})},81535:(e,t,i)=>{i.d(t,{Q:()=>o});let o=(0,i(98846).n7)({resolved:{},chunkName:()=>"user-wizard",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!i.m[t]},importAsync:()=>Promise.all([i.e(7782),i.e(9064)]).then(i.bind(i,46322)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){return i(this.resolve(e))},resolve:()=>46322})},2811:(e,t,i)=>{i.d(t,{Gq:()=>p,Mo:()=>d,_6:()=>l,sB:()=>u,st:()=>m,uM:()=>c});var o=i(80406),a=i(12278),n=i(21044);let r=e=>{var t,i,o,a,r,s,l,d,c,p,m,u,h,v,g;return(null===(t=e.userCover)||void 0===t?void 0:t.type)===n.Nq.VIDEO?(null===(c=e.userCover)||void 0===c?void 0:null===(d=c.previews)||void 0===d?void 0:d["720p"])||(null===(m=e.userCover)||void 0===m?void 0:null===(p=m.previews)||void 0===p?void 0:p["480p"])||(null===(h=e.userCover)||void 0===h?void 0:null===(u=h.previews)||void 0===u?void 0:u["360p"])||(null===(g=e.userCover)||void 0===g?void 0:null===(v=g.previews)||void 0===v?void 0:v["240p"]):(null===(o=e.userCover)||void 0===o?void 0:null===(i=o.thumbs)||void 0===i?void 0:i.thumb)||(null===(r=e.userCover)||void 0===r?void 0:null===(a=r.thumbs)||void 0===a?void 0:a.thumbTablet)||(null===(l=e.userCover)||void 0===l?void 0:null===(s=l.thumbs)||void 0===s?void 0:s.thumbPhone)},s=e=>{var t,i,o,a,n,r,s,l;return(null===(i=e.userCover)||void 0===i?void 0:null===(t=i.trailers)||void 0===t?void 0:t["720p"])||(null===(a=e.userCover)||void 0===a?void 0:null===(o=a.trailers)||void 0===o?void 0:o["480p"])||(null===(r=e.userCover)||void 0===r?void 0:null===(n=r.trailers)||void 0===n?void 0:n["360p"])||(null===(l=e.userCover)||void 0===l?void 0:null===(s=l.trailers)||void 0===s?void 0:s["240p"])},l=({userCover:e})=>{var t,i;return(null==e?void 0:null===(t=e.settings)||void 0===t?void 0:t.heightShift)!==void 0?null==e?void 0:null===(i=e.settings)||void 0===i?void 0:i.heightShift:n.lM},d=e=>{var t,i,o,a,d;return(null===(t=e.userCover)||void 0===t?void 0:t.type)===n.Nq.VIDEO?{type:null===(i=e.userCover)||void 0===i?void 0:i.type,src:s(e),preview:r(e),heightShift:l(e),isProcessing:null===(o=e.userCover)||void 0===o?void 0:o.isProcessing}:{type:null===(a=e.userCover)||void 0===a?void 0:a.type,src:null===(d=e.userCover)||void 0===d?void 0:d.src,heightShift:l(e)}},c=e=>e.userCover,p=e=>{var t,i;return(null===(t=e.userCover)||void 0===t?void 0:t.type)===n.Nq.IMAGE?null===(i=e.userCover)||void 0===i?void 0:i.src:null},m=e=>{var t;return!!(null===(t=e.userCover)||void 0===t?void 0:t.type)},u=(0,o.P1)([(e,t)=>t,a.rc,e=>{var t;return null===(t=e.userCover)||void 0===t?void 0:t.isUnderPreModeration}],(e,t,i)=>e===t&&i)}}]);