1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6792],{17996:(function(X,C,s){var e,S=s(25303);e={value:!0},C.A=void 0;var A=S(s(25211)),l=s(27343),L=C.A=(0,A.default)((0,l.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown")}),27193:(function(X,C,s){var e,S=s(25303);e={value:!0},C.A=void 0;var A=S(s(25211)),l=s(27343),L=C.A=(0,A.default)((0,l.jsx)("path",{d:"m13 10.17-2.5-2.5V2.25c0-.69.56-1.25 1.25-1.25S13 1.56 13 2.25zm7 2.58v-7.5C20 4.56 19.44 4 18.75 4s-1.25.56-1.25 1.25V11h-1V3.25c0-.69-.56-1.25-1.25-1.25S14 2.56 14 3.25v7.92l6 6zM9.5 4.25C9.5 3.56 8.94 3 8.25 3c-.67 0-1.2.53-1.24 1.18L9.5 6.67zm3.5 5.92-2.5-2.5V2.25c0-.69.56-1.25 1.25-1.25S13 1.56 13 2.25zm7 2.58v-7.5C20 4.56 19.44 4 18.75 4s-1.25.56-1.25 1.25V11h-1V3.25c0-.69-.56-1.25-1.25-1.25S14 2.56 14 3.25v7.92l6 6zM9.5 4.25C9.5 3.56 8.94 3 8.25 3c-.67 0-1.2.53-1.24 1.18L9.5 6.67zm11.69 16.94L2.81 2.81 1.39 4.22l5.63 5.63L7 9.83v4.3c-1.11-.64-2.58-1.47-2.6-1.48-.17-.09-.34-.14-.54-.14-.26 0-.5.09-.7.26-.04.01-1.16 1.11-1.16 1.11l6.8 7.18c.57.6 1.35.94 2.18.94H17c.62 0 1.18-.19 1.65-.52l-.02-.02 1.15 1.15z"}),"DoNotTouch")}),42910:(function(X,C,s){s.d(C,{A:function(){return V}});function e(N,w,D){var Y=-1,F=N.length;w<0&&(w=-w>F?0:F+w),D=D>F?F:D,D<0&&(D+=F),F=w>D?0:D-w>>>0,w>>>=0;for(var P=Array(F);++Y<F;)P[Y]=N[Y+w];return P}var S=e,A=s(57391),l=s(24162),L=Math.ceil,i=Math.max;function _(N,w,D){(D?(0,A.A)(N,w,D):w===void 0)?w=1:w=i((0,l.A)(w),0);var Y=N==null?0:N.length;if(!Y||w<1)return[];for(var F=0,P=0,oe=Array(L(Y/w));F<Y;)oe[P++]=S(N,F,F+=w);return oe}var V=_}),50072:(function(X,C,s){s.d(C,{l:function(){return L}});var e=s(63558),S=s(44209),A=s(15406),l=s(40632);const L=(i,_=!1)=>[{title:e.A.t("profile:basic-information"),data:[{title:e.A.t("profile:ethnicity"),value:i.ethnicity===null?e.A.t("not-specified"):i.ethnicity},{title:e.A.t("profile:marital-status"),value:i.marital_status===null?e.A.t("not-specified"):(0,l.PC)(i.sex)[i.marital_status]?.label},{title:e.A.t("profile:self-description"),value:i.self_description===null?e.A.t("not-specified"):i.self_description}]},{title:e.A.t("profile:religion"),data:[..._?[{title:e.A.t("profile:religion"),value:i.religion===null?e.A.t("not-specified"):(0,l.Gt)()[i.religion].label},{title:e.A.t("profile:islamic-branch"),value:i.islamic_branch===null?e.A.t("not-specified"):(0,l.pV)()[i.islamic_branch].label}]:[],{title:e.A.t("profile:aqidah"),value:i.aqidah===null?e.A.t("not-specified"):(0,l.jJ)()[i.aqidah].label},{title:e.A.t("profile:madhhab"),value:i.madhhab===null?e.A.t("not-specified"):(0,l.ab)()[i.madhhab].label},{title:e.A.t("profile:prayer"),value:i.salah===null?e.A.t("not-specified"):(0,l.QW)()[i.salah].label},{title:e.A.t("profile:fasting"),value:i.sawm===null?e.A.t("not-specified"):l.NQ[i.sawm].label},{title:e.A.t("profile:hajj-and-umrah"),value:i.hajj_umrah===null?e.A.t("not-specified"):(0,l.Ry)(i.sex)[i.hajj_umrah].label},i.sex===A.d6.MALE?null:{title:e.A.t("profile:hijab-wearing"),value:i.hijab_wearing===null?e.A.t("not-specified"):l.St[i.hijab_wearing].label},{title:e.A.t("profile:religious-education"),value:i.religious_education===null?e.A.t("not-specified"):l.W2[i.religious_education].label},{title:e.A.t("profile:religious-practice"),value:i.religious_practice===null?e.A.t("not-specified"):l.lk[i.religious_practice].label},{title:e.A.t("profile:religious-practice-duration"),value:i.religious_practice_duration===null?e.A.t("not-specified"):l.vJ[i.religious_practice_duration].label},{title:e.A.t("profile:religious-educational-institution"),value:i.religious_educational_institution===null?e.A.t("not-specified"):i.religious_educational_institution},{title:e.A.t("profile:religious-knowledge-source"),value:i.religious_knowledge_source===null?e.A.t("not-specified"):i.religious_knowledge_source},{title:e.A.t("profile:holidays-celebration"),value:i.holidays_celebration===null?e.A.t("not-specified"):l.i5[i.holidays_celebration].label},{title:e.A.t("profile:memorized-surah-count"),value:i.memorized_surah_count===null?e.A.t("not-specified"):l.JZ[i.memorized_surah_count].label}
1]},{title:e.A.t("profile:appearance"),data:[{title:e.A.t("profile:height"),value:i.height===null?e.A.t("not-specified"):i.height===-1?e.A.t("profile:height.less-than-one-meter"):e.A.t("profile:height.x-centimeters",{value:i.height.toString()})},{title:e.A.t("profile:weight"),value:i.weight_from===null||i.weight_to===null?e.A.t("not-specified"):e.A.t("profile:weight-from-x-to-y-kilograms",{from:i.weight_from.toString(),to:i.weight_to.toString()})},{title:e.A.t("profile:body-type"),value:i.body_type===null?e.A.t("not-specified"):(0,l.BL)()[i.body_type].label},{title:e.A.t("profile:hair-color"),value:i.hair_color===null?e.A.t("not-specified"):(0,l.FQ)(i.sex,i.hair_color)},{title:e.A.t("profile:eye-color"),value:i.eye_color===null?e.A.t("not-specified"):l.H$[i.eye_color].label},i.sex===A.d6.FEMALE?null:{title:e.A.t("profile:facial-hair"),value:i.facial_hair===null?e.A.t("not-specified"):(0,l.Zr)()[i.facial_hair].label}]},{title:e.A.t("profile:character-and-lifestyle"),data:[{title:e.A.t("profile:hobbies-and-interests"),value:i.hobbies_and_interests===null||i.hobbies_and_interests===""?e.A.t("not-specified"):i.hobbies_and_interests},{title:e.A.t("profile:sport"),value:i.sport===null||i.sport===""?e.A.t("not-specified"):i.sport},{title:e.A.t("profile:sport-exercises-frequency"),value:i.sport_exercises_frequency===null?e.A.t("not-specified"):l.mS[i.sport_exercises_frequency].label},{title:e.A.t("profile:nutrition"),value:i.nutrition===null?e.A.t("not-specified"):l.H8[i.nutrition].label},{title:e.A.t("profile:smoking"),value:i.smoking===null?e.A.t("not-specified"):l.HX[i.smoking].label},{title:e.A.t("profile:alcohol-consumption"),value:i.alcohol_consumption===null?e.A.t("not-specified"):l.U8[i.alcohol_consumption].label}]},{title:e.A.t("profile:job-and-education"),data:[{title:e.A.t("profile:education"),value:i.education===null?e.A.t("not-specified"):(0,l.Pm)()[i.education].label},{title:e.A.t("profile:knowledge-of-languages"),value:i.known_languages.length===0?e.A.t("not-specified"):(0,S.A)(i.known_languages,"name").join(", ")},{title:e.A.t("profile:profession-or-occupation"),value:i.profession_or_occupation===null?e.A.t("not-specified"):i.profession_or_occupation},i.sex===A.d6.FEMALE?null:{title:e.A.t("profile:employment"),value:i.employment===null?e.A.t("not-specified"):(0,l.L9)(i.sex)[i.employment].label},i.sex===A.d6.FEMALE?null:{title:e.A.t("profile:job-title"),value:i.job_title===null?e.A.t("not-specified"):i.job_title},i.sex===A.d6.FEMALE?null:{title:e.A.t("profile:financial-status"),value:i.financial_status===null?e.A.t("not-specified"):(0,l.UC)()[i.financial_status].label}]},{title:i.sex===A.d6.MALE?e.A.t("profile:future-wife"):e.A.t("profile:future-husband"),data:[{title:e.A.t("profile:age"),value:i.future_spouse_age_from===null||i.future_spouse_age_to===null?e.A.t("not-specified"):i.future_spouse_age_from===i.future_spouse_age_to?e.A.t("profile:x-years",{number:i.future_spouse_age_from.toString()}):e.A.t("profile:age-from-x-to-y-years",{from:i.future_spouse_age_from.toString(),to:i.future_spouse_age_to.toString()})},{title:e.A.t("profile:height"),value:(()=>{const V=i.future_spouse_height_from,N=i.future_spouse_height_to;return V===null||N===null?e.A.t("not-specified"):V===N?V===-1?e.A.t("profile:height.less-than-one-meter"):e.A.t("profile:height.x-centimeters",{value:V.toString()}):e.A.t("profile:height.from-x-to-y-centimeters",{from:V===-1?e.A.t("profile:height.less-than-one-meter"):V.toString(),to:N.toString()})})()},{title:e.A.t("profile:weight"),value:i.future_spouse_weight_from===null||i.future_spouse_weight_to===null?e.A.t("not-specified"):e.A.t("profile:weight-from-x-to-y-kilograms",{from:i.future_spouse_weight_from.toString(),to:i.future_spouse_weight_to.toString()})},{title:e.A.t("profile:body-type"),value:i.future_spouse_body_type===null?e.A.t("not-specified"):l.h0[i.future_spouse_body_type].label},{title:e.A.t("profile:aqidah"),value:i.future_spouse_aqidah===null?e.A.t("not-specified"):(0,l.jJ)()[i.future_spouse_aqidah].label},{title:e.A.t("profile:character-traits"),value:i.future_spouse_
1character_traits===null||i.future_spouse_character_traits===""?e.A.t("not-specified"):i.future_spouse_character_traits},{title:i.sex===A.d6.MALE?e.A.t("profile:future-wife.about.title"):e.A.t("profile:future-husband.about.title"),value:i.future_spouse_description===null||i.future_spouse_description===""?e.A.t("not-specified"):i.future_spouse_description},{title:e.A.t("profile:children"),value:i.future_spouse_children===null?e.A.t("not-specified"):l.K4[i.future_spouse_children].label}]},{title:e.A.t("profile:additional-information"),data:[i.sex===A.d6.FEMALE?null:{title:e.A.t("profile:housing-type"),value:i.housing_type===null?e.A.t("not-specified"):(0,l.sv)()[i.housing_type].label},{title:e.A.t("profile:child-count"),value:i.child_count===null?e.A.t("not-specified"):i.child_count===0?e.A.t("profile:no-children"):i.child_count},i.child_count===null||i.child_count===0?null:{title:e.A.t("profile:children-in-household.title"),value:i.children_in_household===null?e.A.t("not-specified"):i.children_in_household===0?e.A.t("profile:children-in-household.no-one"):i.children_in_household},{title:e.A.t("profile:living-with-parents.title"),value:i.living_with_parents===null?e.A.t("not-specified"):l.P9[i.living_with_parents].label},{title:e.A.t("profile:desired-number-of-children"),value:i.desired_number_of_children===null?e.A.t("not-specified"):l.sR[i.desired_number_of_children].label},{title:e.A.t("profile:relocation"),value:i.relocation===null?e.A.t("not-specified"):(0,l.TX)()[i.relocation].label},{title:e.A.t("profile:polygyny"),value:i.polygyny===null?e.A.t("not-specified"):(0,l.uP)(i.sex)[i.polygyny]?.label},{title:e.A.t("profile:children-adoption"),value:i.children_adoption===null?e.A.t("not-specified"):(0,l.ep)()[i.children_adoption].label}]}]}),71642:(function(X,C,s){var e,S=s(25303);e={value:!0},C.A=void 0;var A=S(s(25211)),l=s(27343),L=C.A=(0,A.default)((0,l.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined")}),76792:(function(X,C,s){s.d(C,{ViewProfile:function(){return Qe}});var e=s(94999),S=s(6268),A=s(87201),l=s(61409),L=s(88954),i=s(31076),_=s(1505),V=s(35646),N=s(34303),w=s(87621),D=s(50072),Y=s(71468),F=s(84367),P=s.n(F),oe=s(13432),xe=s(92686),r=s(17007);const de=(0,xe.MA)({"@keyframes gift_button_shimmer":{"0%":{transform:"translateX(-120%) skewX(-20deg)",opacity:0}
1,"20%":{opacity:.55},"50%":{opacity:.65},"80%":{opacity:.45},"100%":{transform:"translateX(240%) skewX(-20deg)",opacity:0}},"@keyframes gift_button_pulse":{"0%":{boxShadow:"0 0 0 0 rgba(46, 125, 223, 0.0)"},"45%":{boxShadow:"0 0 0 8px rgba(46, 125, 223, 0.14)"},"100%":{boxShadow:"0 0 0 0 rgba(46, 125, 223, 0.0)"}},"@keyframes gift_button_pulse_red":{"0%":{boxShadow:"0 0 0 0 rgba(240, 54, 54, 0.0)"},"45%":{boxShadow:"0 0 0 8px rgba(240, 54, 54, 0.14)"},"100%":{boxShadow:"0 0 0 0 rgba(240, 54, 54, 0.0)"}},root:{display:"flex",alignItems:"center",width:"100%",maxWidth:328,height:72,padding:`12px ${r.YK.medium}px`,backgroundColor:r.Tj.white,border:`2px solid ${r.Tj.gray[100]}`,borderRadius:8,transition:"all .25s ease",cursor:"pointer",outline:"none",[r.HP.phoneSmall]:{width:"100%",[r.YG]:r.YK.small,[r.Pi]:r.YK.small}},iconOnlyRoot:{width:56,height:56,maxWidth:"none",padding:0,justifyContent:"center",borderRadius:12},splitWrapper:{display:"flex",width:"100%",maxWidth:328,height:72,position:"relative",borderRadius:8},splitMain:{flex:1,width:"auto",maxWidth:"none",borderTopRightRadius:0,borderBottomRightRadius:0,borderRightWidth:0},attention:{overflow:"hidden",animation:"$gift_button_pulse 2.6s ease-in-out infinite","& $splitMain":{backgroundColor:r.Tj.gray[50]},"& $splitToggle":{backgroundColor:r.Tj.gray[50]},"&::after":{content:'""',position:"absolute",top:0,left:0,width:"45%",height:"100%",background:"linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.65) 50%, transparent 100%)",transform:"translateX(-120%) skewX(-20deg)",animation:"$gift_button_shimmer 2.6s ease-in-out infinite",pointerEvents:"none"}},attention_blue:{"& $splitMain":{backgroundColor:"rgba(0, 133, 222, 0.08)"},"& $splitToggle":{backgroundColor:"rgba(0, 133, 222, 0.08)"}},attention_red:{animation:"$gift_button_pulse_red 2.6s ease-in-out infinite","& $splitMain":{backgroundColor:"rgba(240, 54, 54, 0.08)"},"& $splitToggle":{backgroundColor:"rgba(240, 54, 54, 0.08)"}},splitToggle:{width:56,maxWidth:"none",justifyContent:"center",padding:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderTopWidth:2,borderRightWidth:2,borderBottomWidth:2,borderStyle:"solid",borderColor:r.Tj.gray[300],position:"relative",backgroundColor:r.Tj.gray[50],"&::before":{content:'""',position:"absolute",left:0,top:10,bottom:10,width:1,backgroundColor:r.Tj.gray[200],opacity:.9},"&:hover:not([disabled])":{backgroundColor:r.Tj.gray[100]},"&& .icon":{fill:r.Tj.gray[500],color:r.Tj.gray[500]}},icon:{fontSize:"28px",height:"28px",transition:"all .25s ease"},title:{fontWeight:500,fontSize:18,lineHeight:"24px",transition:"all .25s ease"},subtitle:{fontWeight:500,fontSize:14,lineHeight:"1.1",textAlign:"left",color:`${r.Tj.gray[600]}`,transition:"all .25s ease"},color_primary:{"&:not([disabled])":{borderColor:r.Tj.primary},"&:hover:not([disabled])":{backgroundColor:r.Tj.primary,"& .icon":{fill:r.Tj.white,color:r.Tj.white},"& $title":{color:r.Tj.white},"& $subtitle":{color:r.Tj.white}},"& .icon":{fill:r.Tj.primary,color:r.Tj.primary},"& $title":{color:r.Tj.primary}},color_blue:{"&:not([disabled])":{borderColor:r.Tj.secondary},"&:hover":{borderColor:r.Tj.secondary},"& .icon":{fill:r.Tj.secondary,color:r.Tj.secondary},"& $title":{color:r.Tj.secondary}},color_orange:{"&:hover":{borderColor:r.Tj.orange[100]},"& .icon":{fill:r.Tj.orange[100],color:r.Tj.orange[100]},"& $title":{color:r.Tj.orange[100]}},color_red:{"&:hover":{borderColor:"rgba(240, 54, 54, 1)"},"&$splitToggle:not([disabled])":{backgroundColor:"rgba(240, 54, 54, 0.08)",borderColor:"rgba(240, 54, 54, 1)"},"& .icon":{fill:r.Tj.error,color:r.Tj.error},"& $title":{color:r.Tj.error}},active_red:{borderColor:"rgba(240, 54, 54, 1)",backgroundColor:"rgba(240, 54, 54, 1)","& .icon":{fill:r.Tj.white,color:r.Tj.white}},active_primary:{borderColor:r.Tj.primary,backgroundColor:r.Tj.primary,"& .icon":{fill:r.Tj.white,color:r.Tj.white}},active_blue:{borderColor:r.Tj.secondary,backgroundColor:r.Tj.secondary,"& .icon":{fill:r.Tj.white,color:r.Tj.white}},active_orange:{borderColor:r.Tj.orange[100],backgroundColor:r.Tj.orange[100],"& .icon":{fill:r.Tj.white,color:r.Tj.white}},success:{borderColor:r.Tj.primary,backgroundColor:r.Tj.primary,"& .icon":{fill:r.Tj.white,color:r.Tj.white},"& $title":{color:r.Tj.white},"& $subtitle":{color:r.Tj.white}},disabled:{"&:hover":{borderColor:r.Tj.gray[200]},"& .icon":{fill:r.Tj.gray[200],color:r.Tj.gray[200]},"& $title, & $subtitle":{color:r.Tj.gray[300]}}}),Re=({children:c,title:u,subTitle:t,color:o,onClick:f,disabled:d,active:h,...v})=>{const a=de(),b=P()(a.root,{[a.color_primary]:o==="primary",[a.color_blue]:o==="blue",[a.color_orange]:o==="orange",[a.color_red]:o==="red",[a.active_primary]:h===!0&&o==="primary",[a.active_blue]:h===!0&&o==="blue",[a.active_orange]:h===!0&&o==="orange",[a.active_red]:h===!0&&o==="red",[a.disabled]:d});return e.createElement("button",{type:"button",...v,className:b,onClick:f,disabled:d},e.createElement("div",{className:a.icon},c),e.createElement("div",{className:"d-flex flex-column align-items-start ms-16"},e.createElement("span",{className:a.title},u),t!==void 0&&e.createElement("span",{className:a.subtitle},t)))};var Le=s(17996);const je=({children:c,title:u,subTitle:t,color:o,onMainClick:f,onToggleClick:d,disabled:h,toggleDisabled:v,toggleAriaLabel:a="Open menu",active:b,attention:T})=>{const g=de(),x=P()({[g.color_primary]:o==="primary",[g.color_blue]:o==="blue",[g.color_orange]:o==="orange",[g.color_red]:o==="red"}),p=P()(g.splitWrapper,{[g.attention]:T===!0&&!h,[g.attention_blue]:T===!0&&!h&&o==="blue",[g.attention_red]:T===!0&&!h&&o==="red"}),I=P()(g.root,g.splitMain,x,{[g.active_red]:b===!0&&o==="red",[g.disabled]:h}),M=v??h,O=P()(g.root,g.splitToggle,x,{[g.disabled]:M});return e.createElement("div",{className:p},e.createElement("button",{type:"button",className:I,onClick:f,disabled:h},e.createElement("div",{className:g.icon},c),e.createElement("div",{className:"d-flex flex-column align-items-start ms-16"},e.createElement("span",{className:g.title},u),t!==void 0&&e.createElement("span",{className:g.subtitle},t))),e.createElement("button",{type:"button","aria-label":a,className:O,onClick:d,disabled:M},e.createElement(Le.A,{className:"icon"})))},K=({children:c,ariaLabel:u,color:t,onClick:o,disabled:f,allowClickWhenDisabled:d,active:h,success:v,onMouseEnter:a,onMouseLeave:b,onFocus:T,onBlur:g,...x})=>{const p=de(),I=f===!0&&d===!0,M=P()(p.root,p.iconOnlyRoot,{[p.color_primary]:t==="primary",[p.color_blue]:t==="blue",[p.color_orange]:t==="orange",[p.color_red]:t==="red",[p.active_primary]:h===!0&&t==="primary",[p.active_blue]:h===!0&&t==="blue",[p.active_orange]:h===!0&&t==="orange",[p.active_red]:h===!0&&t==="red",[p.success]:v===!0,[p.disabled]:f});return e.createElement("button",{type:"button",...x,"aria-label":u,"aria-disabled":I?!0:void 0,className:M,onClick:o,disabled:I?!1:f,onMouseEnter:a,onMouseLeave:b,onFocus:T,onBlur:g},e.createElement("div",{className:p.icon},c))};var G=s(54912),Ie=s(27193),Me=s(94962),Q=s(71642),R=s(39741),$=s(73639),Fe=s(13100),Be=s(11659),Pe=s(65054);function Oe(c,u,t,o,f){const[d,h]=e.useState(()=>f&&t?t(c).matches:o?o(c).matches:u);return(0,Fe.A)(()=>{let v=!0;if(!t)return;const a=t(c),b=()=>{v&&h(a.matches)};return b(),a.addListener(b),()=>{v=!1,a.removeListener(b)}},[c,t]),d}const ge=e.useSyncExternalStore;function He(c,u,t,o,f){const d=e.useCallback(()=>u,[u]),h=e.useMemo(()=>
1{if(f&&t)return()=>t(c).matches;if(o!==null){const{matches:T}=o(c);return()=>T}return d},[d,c,o,f,t]),[v,a]=e.useMemo(()=>{if(t===null)return[d,()=>()=>{}];const T=t(c);return[()=>T.matches,g=>(T.addListener(g),()=>{T.removeListener(g)})]},[d,t,c]);return ge(a,v,h)}function De(c,u={}){const t=(0,Pe.A)(),o=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:f=!1,matchMedia:d=o?window.matchMedia:null,ssrMatchMedia:h=null,noSsr:v=!1}=(0,Be.A)({name:"MuiUseMediaQuery",props:u,theme:t});let a=typeof c=="function"?c(t):c;return a=a.replace(/^@media( ?)/m,""),(ge!==void 0?He:Oe)(a,f,d,h,v)}var We=s(38232),be=s(77376),W=s(73528),m={tooltip:"frontend-app-pages-view-profile-Actions-module__tooltip--XeUn4",actionsRoot:"frontend-app-pages-view-profile-Actions-module__actionsRoot--Ker40",iconGrid:"frontend-app-pages-view-profile-Actions-module__iconGrid--SnnYe",iconItem:"frontend-app-pages-view-profile-Actions-module__iconItem--H6GEf",tooltipTarget:"frontend-app-pages-view-profile-Actions-module__tooltipTarget--To8mH",helperLine:"frontend-app-pages-view-profile-Actions-module__helperLine--kGabt",helperLineWithNotice:"frontend-app-pages-view-profile-Actions-module__helperLineWithNotice--RWHv_",previouslySentRequest:"frontend-app-pages-view-profile-Actions-module__previouslySentRequest--f4c8q",tooltipContent:"frontend-app-pages-view-profile-Actions-module__tooltipContent--TeFhX",tooltipTitle:"frontend-app-pages-view-profile-Actions-module__tooltipTitle--o5_bD",tooltipSubTitle:"frontend-app-pages-view-profile-Actions-module__tooltipSubTitle--e5cEP",infoButton:"frontend-app-pages-view-profile-Actions-module__infoButton--PJ0cT"};const ze=({currentUser:c,updateUser:u,user:t})=>{const{t:o}=(0,A.B)(),f=c.subscription?.subscription_plan?.ability_block_users,d=c.subscription?.subscription_plan?.ability_notify_when_user_online,h=(0,Y.wA)(),v=(0,S.W6)(),a=De("(hover: none)"),[b,T]=(0,e.useState)(""),[g,x]=(0,e.useState)(!1),[p,I]=(0,e.useState)(null),[M,O]=(0,e.useState)(null),[ee,te]=(0,e.useState)(null),[ie,ce]=(0,e.useState)(!1),[le,ne]=(0,e.useState)(!1),[ae,re]=(0,e.useState)(!1),U=p??t.is_liked,q=M??t.is_favorite,E=ee??t.notify_when_online_enabled,H=!0,[J,se]=(0,e.useState)(()=>H?t.has_no_subscription?"subscription":"flowers":"subscription"),[we,Ne]=(0,e.useState)(null),fe=H&&J==="flowers";(0,e.useEffect)(()=>{if(!H){se("subscription");return}se(t.has_no_subscription?"subscription":"flowers")},[t.id]);const Je=!!we,Xe=(0,e.useCallback)(n=>{Ne(n.currentTarget)},[]),me=(0,e.useCallback)(()=>Ne(null),[]);(0,e.useEffect)(()=>{p!==null&&t.is_liked===p&&I(null)},[p,t.is_liked]),(0,e.useEffect)(()=>{M!==null&&t.is_favorite===M&&O(null)},[M,t.is_favorite]),(0,e.useEffect)(()=>{ee!==null&&t.notify_when_online_enabled===ee&&te(null)},[ee,t.notify_when_online_enabled]);const Ze=(0,e.useCallback)(async()=>{const n=ENV.prices.chat_request;if(!(!ENV.features.subscriptions&&!confirm(o("profile:chat-requests.confirmation-alert",{amount:n}))))try{await N.A.post(R.F.CHAT_REQUESTS_SEND,{user_id:t.id}),x(!0),l.oR.success(o("profile:chat-requests.send-request.sent")),u()}catch(k){if(x(!1),k.response!==void 0){if(k.response.data.code===R.w.CHAT_REQUEST_PHOTO_REQUIRED){l.oR.info(`${t.name} \u043D\u0435 \u0437\u043D\u0430\u043A\u043E\u043C\u0438\u0442\u0441\u044F \u0441 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F\u043C\u0438 \u0431\u0435\u0437 \u0444\u043E\u0442\u043E. \u0427\u0442\u043E\u0431\u044B \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u043D\u0430\u043A\u043E\u043C\u0441\u0442\u0432\u043E \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0444\u043E\u0442\u043E\u0433\u0440\u0430\u0444\u0438\u0438 \u0432 \u0441\u0432\u043E\u0439 \u043F\u0440\u043E\u0444\u0438\u043B\u044C.`);return}if(k.response.data.code===R.w.INSUFFICIENT_BALANCE){h((0,oe.ZH)());return}if(k.response.data.message!==void 0){l.oR.error(k.response.data.message);return}}l.oR.error(o("error"))}},[t.id,t.name,u,h,o]),et=(0,e.useCallback)(async()=>{const n=ENV.prices.chat_request_acceptance;if(!(!ENV.features.subscriptions&&!confirm(o("profile:chat-requests.acceptance-alert",{amount:n}))))try{await N.A.post(R.F.CHAT_REQUESTS_ACCEPT,{user_id:t.id}),u()}catch(k){if(k.response!==void 0&&k.response.data.message!==void 0){l.oR.error(k.response.data.message);return}l.oR.error(o("error"))}},[t.id,u,o]),tt=(0,e.useCallback)(async()=>
1{if(confirm(o("profile:chat-requests.cancellation-alert")))try{await N.A.post(R.F.CHAT_REQUESTS_CANCEL,{user_id:t.id}),x(!1),u()}catch(n){if(n.response!==void 0&&n.response.data.message!==void 0){l.oR.error(n.response.data.message);return}l.oR.error(o("error"))}},[t.id,u,o]),ot=(0,e.useCallback)(async()=>{if(confirm(o("are-you-sure")))try{await N.A.post(R.F.CHATS_FINISH,{chat_id:t.chat_id}),u()}catch(n){if(n.response!==void 0&&n.response.data.message!==void 0){l.oR.error(n.response.data.message);return}l.oR.error(o("error"))}},[t.chat_id,u,o]),it=(0,e.useCallback)(async()=>{try{if(le)return;const n=q,k=n,ue=k?R.F.FAVORITE_PROFILES_REMOVE:R.F.FAVORITE_PROFILES_ADD;ne(!0),O(!n),await N.A.post(ue,{user_id:t.id}),l.oR.success(o(k?"profile:favorites.removed":"profile:favorites.added")),u()}catch(n){if(O(q),n.response!==void 0&&n.response.data.message!==void 0){l.oR.error(n.response.data.message);return}l.oR.error(o("error"))}finally{ne(!1)}},[le,q,u,o,t.id]),lt=(0,e.useCallback)(async()=>{try{if(ae)return;re(!0),te(!E);const n=await N.A.post(R.F.USERS_NOTIFY_WHEN_ONLINE_TOGGLE,{user_id:t.id});te(!!n.data.enabled),l.oR.success(n.data.enabled?o("profile:notify-when-online.enabled-toast"):o("profile:notify-when-online.disabled-toast")),u()}catch(n){if(te(E),n.response!==void 0&&n.response.data.message!==void 0){l.oR.error(n.response.data.message);return}l.oR.error(o("error"))}finally{re(!1)}},[ae,E,u,o,t.id]),nt=(0,e.useCallback)(async()=>{try{if(ie)return;const n=U,k=n,ue=k?R.F.USERS_REMOVE_LIKE:R.F.USERS_LIKE;ce(!0),I(!n),await N.A.post(ue,{user_id:t.id}),l.oR.success(o(k?"profile:likes.removed":"profile:likes.added")),u()}catch(n){if(I(U),n.response!==void 0&&n.response.data.message!==void 0){l.oR.error(n.response.data.message);return}l.oR.error(o("error"))}finally{ce(!1)}},[U,ie,u,o,t.id]),at=(0,e.useCallback)(async()=>{const n=ENV.prices.gift;if(!ENV.features.subscriptions&&confirm(o("profile:make-gift.confirmation-alert",{amount:n})))try{await N.A.post(R.F.USERS_MAKE_GIFT,{user_id:t.id}),l.oR.success(o("profile:make-gift.success-message"))}catch(k){if(k.response!==void 0){if(k.response.data.code===R.w.INSUFFICIENT_BALANCE){h((0,oe.ZH)());return}if(k.response.data.message!==void 0){l.oR.error(k.response.data.message);return}}l.oR.error(o("error"))}},[h,o,t.id]),Te=(0,e.useCallback)(async()=>{try{const{data:{haveSubscription:n}}=await N.A.post(R.F.SUBSCRIPTIONS_CHECK_USER_HAVE_SUB,{user_id:t.id});if(n&&!confirm(o("profile:make-subscription-gift.replace-confirmation"))){H&&se("flowers");return}const k=new URLSearchParams({user_id:String(t.id)});v.push(`${$.B.SUBSCRIPTIONS}?${k.toString()}`)}catch(n){if(n.response!==void 0&&n.response.data.message!==void 0){l.oR.error(n.response.data.message);return}l.oR.error(o("error"))}},[H,v,se,o,t.id]),rt=(0,e.useMemo)(()=>o(J==="subscription"||!H?"profile:make-subscription-gift.description":"profile:make-flowers-gift"),[H,J,o]),st=(0,e.useCallback)(()=>{if(J==="subscription"){Te();return}(0,L.z5)("flowers-gift");const n=new URLSearchParams({receiver_user_id:String(t.id),receiver_user_name:String(t.name??"")});v.push(`${$.B.GIFTS_SHOP}?${n.toString()}`)},[J,v,Te,t.id,t.name]),Ce=(0,e.useCallback)(n=>()=>{se(n),me()},[me]),ct=(0,e.useCallback)(async()=>{if(ENV.features.subscriptions)try{const{data:n}=await N.A.post(R.F.USERS_TOGGLE_BLOCK,{user_id:t.id});n.success&&(n.result==="unblocked"&&l.oR.success(o("profile:block-user.unblocked-success-message")),n.result==="blocked"&&l.oR.success(o("profile:block-user.blocked-success-message")),u())}catch(n){if(n.response!==void 0&&n.response.data.message!==void 0){l.oR.error(n.response.data.message);return}l.oR.error(o("error"))}},[o,u,t.id]),he=(0,e.useMemo)(()=>t.chat_id===null?null:(0,L.Jv)($.B.CHAT,{id:t.chat_id}),[t.chat_id]),ut=(0,e.useCallback)(()=>{he!==null&&v.push(he)},[v,he]),y=(0,e.useCallback)(n=>{T(n??"")},[]),j=(0,e.useCallback)(()=>{T("")},[]),dt=(0,e.useMemo)(()=>g||t.outgoing_chat_request_id!==null?o("profile:chat-requests.send-request.sent-wait"):"",[g,o,t.outgoing_chat_request_id]),Se=(0,e.useMemo)(()=>t.sent_chat_request_previously?t.incoming_chat_request_id===null&&t.outgoing_chat_request_id===null:!1,[t.incoming_chat_request_id,t.outgoing_chat_request_id,t.sent_chat_request_previously]),z=(n,k)=>k===void 0?n:e.createElement("div",{className:m.tooltipContent},e.createElement("div",{className:m.tooltipTitle},n),e.createElement("div",{className:m.tooltipSubTitle},k));return e.createElement("div",{className:P()("d-flex flex-column",m.actionsRoot)},t.sex!==c.sex&&ENV.features.subscriptions&&!t.you_is_blocked&&e.createElement("div",{className:"mb-16"},e.createElement(je,{color:fe?"red":"blue",title:o("profile:make-subscription-gift"),subTitle:rt,active:fe,attention:!0,onMainClick:st,onToggleClick:Xe,toggleAriaLabel:o("profile:gift-menu.choose-gift-aria")},e.createElement(G.I,{name:fe?"gift-flowers":"gift"})),e.createElement(We.A,{open:Je,anchorEl:we,onClose:me,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},e.createElement(be.A,{selected:J==="subscription",onClick:Ce("subscription")},o("profile:make-subscription-gift.description")),H&&e.createElement(be.A,{selected:J==="flowers",onClick:Ce("flowers")},o("profile:make-flowers-gift")))),t.sex!==c.sex&&!ENV.features.subscriptions&&!t.you_is_blocked&&e.createElement("div",{className:"mb-16"},e.createElement(Re,{color:"blue",title:o("profile:make-gift"),subTitle:o("profile:make-gift.description"),onClick:at},e.createElement(G.I,{name:"gift"}))),e.createElement("div",{className:m.iconGrid},t.sex!==c.sex&&t.chat_id===null&&t.incoming_chat_request_id===null&&t.outgoing_chat_request_id===null&&e.createElement("div",{className:m.iconItem},e.createElement(W.A,{title:z(o("profile:chat-requests.send-request"),o("profile:chat-requests.send-request.subtitle")),enterTouchDelay:0,disableHoverListener:a,disableFocusListener:a,disableTouchListener:a,classes:{tooltip:m.tooltip},arrow:!0},e.createElement("span",{className:m.tooltipTarget},e.createElement(K,{color:"primary",ariaLabel:o("profile:chat-requests.send-request"),onClick:Ze,disabled:t.you_is_blocked||g,success:g,onMouseEnter:()=>y(o("profile:chat-requests.send-request.subtitle")),onMouseLeave:j,onFocus:()=>y(o("profile:chat-requests.send-request.subtitle")),onBlur:j},e.createElement(G.I,{name:"user-chat"})))),a&&e.createElement("button",{type:"button",className:m.infoButton,"aria-label":"Info",onClick:n=>{n.stopPropagation(),y(o("profile:chat-requests.send-request.subtitle"))}},e.createElement(Q.A,{fontSize:"inherit"}))),t.incoming_chat_request_id!==null&&e.createElement("div",{className:m.iconItem},e.createElement(W.A,{title:z(o("profile:chat-requests.accept-request")),enterTouchDelay:0,disableHoverListener:a,disableFocusListener:a,disableTouchListener:a,classes:{tooltip:m.tooltip},arrow:!0},e.createElement("span",{className:m.tooltipTarget},e.createElement(K,{color:"primary",ariaLabel:o("profile:chat-requests.accept-request"),onClick:et,onMouseEnter:()=>y(o("profile:chat-requests.accept-request")),onMouseLeave:j,onFocus:()=>y(o("profile:chat-requests.accept-request")),onBlur:j},e.createElement(G.I,{name:"user-chat"})))),a&&e.createElement("button",{type:"button",className:m.infoButton,"aria-label":"Info",onClick:n=>{n.stopPropagation(),y(o("profile:chat-requests.accept-request"))}},e.createElement(Q.A,{fontSize:"inherit"}))),t.outgoing_chat_request_id!==null&&e.createElement("div",{className:m.iconItem},e.createElement(W.A,{title:z(o("profile:chat-requests.cancel-request")),enterTouchDelay:0,disableHoverListener:a,disableFocusListener:a,disableTouchListener:a,classes:{tooltip:m.tooltip},arrow:!0},e.createElement("span",{className:m.tooltipTarget},e.createElement(K,{color:"primary",ariaLabel:o("profile:chat-requests.cancel-request"),onClick:tt,success:!0,onMouseEnter:()=>y(o("profile:chat-requests.cancel-request")),onMouseLeave:j,onFocus:()=>y(o("profile:chat-requests.cancel-request")),onBlur:j},e.createElement(G.I,{name:"user-chat"})))),a&&e.createElement("button",{type:"button",className:m.infoButton,"aria-label":"Info",onClick:n=>{n.stopPropagation(),y(o("profile:chat-requests.cancel-request"))}},e.createElement(Q.A,{fontSize:"inherit"}))),t.chat_id!==null&&e.createElement("div",{className:m.iconItem},e.createElement(W.A,{title:z(o("profile:go-to-chat")),enterTouchDelay:0,disableHoverListener:a,disableFocusListener:a,disableTouchListener:a,classes:{tooltip:m.tooltip},arrow:!0},e.createElement("span",{className:m.tooltipTarget},e.createElement(K,{color:"primary",ariaLabel:o("profile:go-to-chat"),onClick:ut,onMouseEnter:()=>y(o("profile:go-to-chat")),onMouseLeave:j,onFocus:()=>y(o("profile:go-to-chat")),onBlur:j},e.createElement(G.I,{name:"user-chat"})))),a&&e.createElement("button",{type:"button",className:m.infoButton,"aria-label":"Info",onClick:n=>{n.stopPropagation(),y(o("profile:go-to-chat"))}},e.createElement(Q.A,{fontSize:"inherit"}))),t.chat_id!==null&&e.createElement("div",{className:m.iconItem},e.createElement(W.A,{title:z(o("chat:finish-chat")),enterTouchDelay:0,disableHoverListener:a,disableFocusListener:a,disableTouchListener:a,classes:{tooltip:m.tooltip},arrow:!0},e.createElement("span",{className:m.tooltipTarget},e.createElement(K,{color:"red",ariaLabel:o("chat:finish-chat"),onClick:ot,onMouseEnter:()=>y(o("chat:finish-chat")),onMouseLeave:j,onFocus:()=>y(o("chat:finish-chat")),onBlur:j},e.createElement(G.I,{name:"x-circle-thin"})))),a&&e.createElement("button",{type:"button",className:m.infoButton,"aria-label":"Info",onClick:n=>{n.stopPropagation(),y(o("chat:finish-chat"))}},e.createElement(Q.A,{fontSize:"inherit"}))),t.sex!==c.sex&&e.createElement("div",{className:m.iconItem},e.createElement(W.A,{title:z(o(U?"profile:likes.remove-like":"profile:likes.like-button.label"),o("profile:likes.like-button.subtitle")),enterTouchDelay:0,disableHoverListener:a,disableFocusListener:a,disableTouchListener:a,classes:{tooltip:m.tooltip},arrow:!0},e.createElement("span",{className:m.tooltipTarget},e.createElement(K,{color:"red",ariaLabel:o(U?"profile:likes.remove-like":"profile:likes.like-button.label"),onClick:nt,disabled:t.you_is_blocked&&!U||ie,active:U,"aria-pressed":U,onMouseEnter:()=>y(o("profile:likes.like-button.subtitle")),onMouseLeave:j,onFocus:()=>y(o("profile:likes.like-button.subtitle")),onBlur:j},e.createElement(G.I,{name:"heart"})))),a&&e.createElement("button",{type:"button",className:m.infoButton,"aria-label":"Info",onClick:n=>{n.stopPropagation(),y(o("profile:likes.like-button.subtitle"))}},e.createElement(Q.A,{fontSize:"inherit"}))),t.sex!==c.sex&&e.createElement("div",{className:m.iconItem},e.createElement(W.A,{title:z(o(q?"profile:favorites.remove-from-favorites":"profile:favorites.add-to-favorites"),o("profile:favorites.add-to-favorites.subtitle")),enterTouchDelay:0,disableHoverListener:a,disableFocusListener:a,disableTouchListener:a,classes:{tooltip:m.tooltip},arrow:!0},e.createElement("span",{className:m.tooltipTarget},e.createElement(K,{color:"orange",ariaLabel:o(q?"profile:favorites.remove-from-favorites":"profile:favorites.add-to-favorites"),onClick:it,active:q,"aria-pressed":q,disabled:le||t.you_is_blocked,onMouseEnter:()=>y(o("profile:favorites.add-to-favorites.subtitle")),onMouseLeave:j,onFocus:()=>y(o("profile:favorites.add-to-favorites.subtitle")),onBlur:j},e.createElement(G.I,{name:"star"})))),a&&e.createElement("button",{type:"button",className:m.infoButton,"aria-label":"Info",onClick:n=>{n.stopPropagation(),y(o("profile:favorites.add-to-favorites.subtitle"))}},e.createElement(Q.A,{fontSize:"inherit"}))),t.sex!==c.sex&&ENV.features.subscriptions&&e.createElement("div",{className:m.iconItem},e.createElement(W.A,{title:d||E?z(o("profile:notify-when-online.title"),o("profile:notify-when-online.subt
1itle")):z(o("profile:notify-when-online.title"),o("unavailable-on-current-subscription.description")),enterTouchDelay:0,disableHoverListener:a,disableFocusListener:a,disableTouchListener:a,classes:{tooltip:m.tooltip},arrow:!0},e.createElement("span",{className:m.tooltipTarget},e.createElement(K,{color:"primary",ariaLabel:o("profile:notify-when-online.title"),onClick:lt,active:E,"aria-pressed":E,disabled:!d&&!E||ae||t.you_is_blocked,onMouseEnter:()=>y(o("profile:notify-when-online.subtitle")),onMouseLeave:j,onFocus:()=>y(o("profile:notify-when-online.subtitle")),onBlur:j},e.createElement(G.I,{name:"bell"})))),a&&e.createElement("button",{type:"button",className:m.infoButton,"aria-label":"Info",onClick:n=>{n.stopPropagation(),y(o("profile:notify-when-online.subtitle"))}},e.createElement(Q.A,{fontSize:"inherit"}))),t.sex!==c.sex&&ENV.features.subscriptions&&e.createElement("div",{className:m.iconItem},e.createElement(W.A,{title:f||t.is_blocked?z(t.is_blocked?o("profile:unblock-user.title"):o("profile:block-user.title"),t.is_blocked?o("profile:unblock-user.description"):o("profile:block-user.description")):z(t.is_blocked?o("profile:unblock-user.title"):o("profile:block-user.title"),o("unavailable-on-current-subscription.description")),enterTouchDelay:0,disableHoverListener:a,disableFocusListener:a,disableTouchListener:a,classes:{tooltip:m.tooltip},arrow:!0},e.createElement("span",{className:m.tooltipTarget},e.createElement(K,{color:"red",ariaLabel:t.is_blocked?o("profile:unblock-user.title"):o("profile:block-user.title"),onClick:n=>{if(!f&&!t.is_blocked){l.oR.info(o("unavailable-on-current-subscription.description"));return}ct()},disabled:!f&&!t.is_blocked,allowClickWhenDisabled:!0,active:t.is_blocked,onMouseEnter:()=>y(f||t.is_blocked?t.is_blocked?o("profile:unblock-user.description"):o("profile:block-user.description"):o("unavailable-on-current-subscription.description")),onMouseLeave:j,onFocus:()=>y(f||t.is_blocked?t.is_blocked?o("profile:unblock-user.description"):o("profile:block-user.description"):o("unavailable-on-current-subscription.description")),onBlur:j},t.is_blocked&&e.createElement(Ie.A,{className:"icon"}),!t.is_blocked&&e.createElement(Me.A,{className:"icon"})))),a&&e.createElement("button",{type:"button",className:m.infoButton,"aria-label":"Info",onClick:n=>{n.stopPropagation(),y(f||t.is_blocked?t.is_blocked?o("profile:unblock-user.description"):o("profile:block-user.description"):o("unavailable-on-current-subscription.description"))}},e.createElement(Q.A,{fontSize:"inherit"})))),Se&&e.createElement(_.EY,{className:m.previouslySentRequest,color:"gray"},o("profile:profile-info.previously-sent-request")),e.createElement("div",{className:P()(m.helperLine,Se&&m.helperLineWithNotice),"aria-live":"polite"},dt||b))};var pe=s(14714);const _e=c=>!c.message_text||c.message_text.trim()===""?!1:c.message_moderation_status==="approved"||c.message_moderation_status==="not_required",Ve=c=>{const u=Math.abs(c)%100,t=u%10;return u>10&&u<20?"\u0434\u043D\u0435\u0439":t>1&&t<5?"\u0434\u043D\u044F":t===1?"\u0434\u0435\u043D\u044C":"\u0434\u043D\u0435\u0439"},ve=(c,u,t)=>{if(!c.expires_at||c.is_expired)return null;const f=new Date(c.expires_at).getTime()-Date.now();if(!Number.isFinite(f)||f<=0)return null;const d=Math.ceil(f/(1440*60*1e3));return d<=0?null:d===1?u("profile:gifts.expires_in.tomorrow"):String(t??"").startsWith("ru")?u("profile:gifts.expires_in.days",{days:d,daysWord:Ve(d)}):u("profile:gifts.expires_in.days",{days:d})},Ge=({userId:c})=>{const{t:u,i18n:t}=(0,A.B)(),o=(0,w.iZ)(),f=(0,e.useMemo)(()=>({user_id:c}),[c]),[d,h]=(0,e.useState)(null),{data:v}=(0,w.Gs)(R.F.USERS_GIFTS,{load:c>0,params:f}),a=(0,e.useMemo)(()=>v?.items??[],[v?.items]),b=o?.id??null,T=(0,e.useCallback)(p=>{const I=p.sender_user?.id??null;return b!==null&&(b===c||I!==null&&b===I)},[c,b]),g=(0,e.useCallback)(p=>h(p),[]),x=(0,e.useCallback)(()=>h(null),[]);return a.length===0?null:e.createElement("div",{className:"view-profile__gifts",id:"gifts"},e.createElement("div",{className:"view-profile__section-head mb-16"},u("profile:gifts.title")),e.createElement("div",{className:"view-profile__gifts_grid"},a.map(p=>{const I=T(p),M=ve(p,u,t.language);return e.createElement(_.tu,{key:p.id,padding:"sm",className:"view-profile__gift_card"},e.createElement("div",{className:"view-profile__gift_row view-profile__gift_row_clickable",role:"button",tabIndex:0,onClick:()=>g(p),onKeyDown:O=>{(O?.key==="Enter"||O?.key===" ")&&(O.preventDefault(),g(p))}},e.createElement("div",{className:"view-profile__gift_image"},e.createElement("img",{src:p.gift_product.image_url,alt:""})),e.createElement("div",{className:"view-profile__gift_meta"},e.createElement(_.EY,{bold:!0},p.gift_product.name),I&&e.createElement(e.Fragment,null,e.createElement(_.EY,{className:"mt-4",color:"gray"},u("profile:gifts.from"),":"," ",p.sender_user?e.createElement(pe.N_,{className:"view-profile__gift_sender_link",to:(0,S.tW)($.B.USER,{id:p.sender_user.id}),onClick:O=>O.stopPropagation()}
1,(0,L.K)(p.sender_user.name,t.language)):u("profile:gifts.anonymous")),p.message_moderation_status==="pending"&&p.message_text?e.createElement(_.EY,{className:"mt-8",color:"gray",size:"small"},u("profile:gifts.message.pending")):_e(p)?e.createElement(_.EY,{className:"mt-8",color:"gray",size:"small"},p.message_text):null,e.createElement(_.EY,{className:"mt-4 view-profile__gift_private_notice",color:"gray",size:"small"},u("profile:gifts.private_notice")),M?e.createElement(_.EY,{className:"mt-4 view-profile__gift_expiry_notice",color:"gray",size:"small"},M):null))))})),e.createElement(_.lG,{open:d!==null,onClose:x,overflow:"auto",disableScrollLock:!0},e.createElement(_.HM,{onClose:x},d?.gift_product.name??""),e.createElement(_.Cf,null,d!==null&&e.createElement("div",{className:"view-profile__gift_preview"},e.createElement("div",{className:"view-profile__gift_preview_image"},e.createElement("img",{src:d.gift_product.image_url,alt:""})),T(d)&&e.createElement("div",{className:"mt-12"},(()=>{const p=ve(d,u,t.language);return e.createElement(e.Fragment,null,e.createElement(_.EY,{color:"gray"},u("profile:gifts.from"),":"," ",d.sender_user?e.createElement(pe.N_,{className:"view-profile__gift_sender_link",to:(0,S.tW)($.B.USER,{id:d.sender_user.id}),onClick:I=>I.stopPropagation()},(0,L.K)(d.sender_user.name,t.language)):u("profile:gifts.anonymous")),d.message_moderation_status==="pending"&&d.message_text?e.createElement(_.EY,{className:"mt-8",color:"gray"},u("profile:gifts.message.pending")):_e(d)?e.createElement("div",{className:"view-profile__message mt-12"},e.createElement(_.EY,{className:"view-profile__message-text"},d.message_text)):null,e.createElement(_.EY,{className:"mt-8 view-profile__gift_private_notice",color:"gray",size:"small"},u("profile:gifts.private_notice")),p?e.createElement(_.EY,{className:"mt-4 view-profile__gift_expiry_notice",color:"gray",size:"small"},p):null)})())))))};var $e=s(42910),Ee=s(32051),ye=s(91027),Ae=s(15406);const Ue=({title:c,data:u,hide_customizable:t})=>{u=u.filter(f=>f!==null);const{t:o}=(0,A.B)();return e.createElement(e.Fragment,null,e.createElement("div",{className:"view-profile__section-head mb-16"},c),(0,$e.A)(u,2).map((f,d)=>e.createElement("div",{className:"view-profile__section-table",key:d},e.createElement("div",{className:"d-flex flex-column mb-16",key:f[0].title},e.createElement("div",{className:"view-profile__section-key"},f[0].title),e.createElement("div",{className:"view-profile__section-value"},t&&f[0].value===Ae.iF.PENDING_MODERATION?e.createElement(Ee.A,{size:"small",style:{backgroundColor:"#74b09b",color:"#ffffff"},color:"secondary",icon:e.createElement(ye.A,{style:{fill:"#ffffff"}}),label:o("profile:field-pending-moderation")}):e.createElement(e.Fragment,null,f[0].value))),f[1]!==void 0&&e.createElement("div",{className:"d-flex flex-column mb-16",key:f[1].title},e.createElement("div",{className:"view-profile__section-key"},f[1].title),e.createElement("div",{className:"view-profile__section-value"},t&&f[1].value===Ae.iF.PENDING_MODERATION?e.createElement(Ee.A,{size:"small",style:{backgroundColor:"#74b09b",color:"#ffffff"},icon:e.createElement(ye.A,{style:{fill:"#ffffff"}}),label:o("profile:field-pending-moderation")}):e.createElement(e.Fragment,null,f[1].value))))))};var qe=s(5139),Z=s(69914);const Ye={view_profile_paper:{padding:Z.A.spacing(4),maxWidth:"inherit",[r.HP.phoneLarge]:{[r.jt]:"auto",[r.MJ]:"auto"},[r.HP.phoneMedium]:{padding:Z.A.spacing(2)}},user_card_location:{color:"var(--grey-400)",fontSize:16,fontWeight:"normal",lineHeight:"24px"},user_card_you_is_blocked:{color:"white",backgroundColor:"var(--red)",padding:"2px 8px",borderRadius:"4px",fontSize:16,fontWeight:"normal",lineHeight:"24px",[r.HP.phoneLarge]:{textAlign:"center"}},blockedByUserPage:{padding:Z.A.spacing(3),textAlign:"center"},user_has_no_subscription:{color:"black",backgroundColor:"var(--grey-200)",padding:"2px 8px",borderRadius:"4px",fontSize:16,fontWeight:"normal",lineHeight:"24px",[r.HP.phoneLarge]:{textAlign:"center"}},tooltip:{fontSize:16},passed_school:{fill:"#9e9e9e !important",marginLeft:"4px",marginBottom:"12px"},scam_badge:{marginLeft:10,height:26,minWidth:48,paddingLeft:10,paddingRight:10,borderRadius:8,backgroundColor:Z.A.palette.error.light,color:Z.A.palette.error.main,border:`1px solid ${Z.A.palette.error.main}`,fontSize:12,fontWeight:800,letterSpacing:.4,display:"inline-flex",alignItems:"center",justifyContent:"center",userSelect:"none",cursor:"help"},subscription_icon:{width:48,height:48,objectFit:"contain",marginLeft:"8px",marginBottom:"10px",verticalAlign:"middle",opacity:.95},subscription_under_status:{display:"flex",alignItems:"center",marginTop:"-8px",marginBottom:Z.A.spacing(2)},subscription_under_status_icon:{width:48,height:48,objectFit:"contain",marginLeft:"8px",opacity:.95,boxSizing:"border-box",borderRadius:r.nq.base,backgroundColor:r.Tj.gray[50],border:`1px solid ${r.Tj.gray[100]}`,padding:3},subscription_under_status_text:{color:"var(--grey-400)",fontSize:16,fontWeight:"normal",lineHeight:"24px"}};var B=qe.R.createStyleSheet(Ye).attach();const ke=3,Ke=({mode:c,updateUser:u,user:t})=>{const{t:o,i18n:f}=(0,A.B)(),{hasPermission:d}=(0,w.JT)(),h=(0,w.Ub)("tablet"),v=(0,e.useMemo)(()=>o("profile:scam.badge"),[o]),a=(0,e.useMemo)(()=>o("profile:scam.tooltip"),[o]),b=(0,w.iZ)(),T=t.is_scam&&(b===null||b.id!==t.id),[g,x]=(0,e.useState)(!1),[p,I]=(0,e.useState)(1),[M,O]=(0,e.useState)(!1),ee=(0,e.useCallback)(async()=>{try{await N.A.post(R.F.USERS_PROFILE_VIEWED,{user_id:t.id})}
1catch(E){if(E.response!==void 0&&E.response.data.message!==void 0){l.oR.error(E.response.data.message);return}l.oR.error(o("error"))}O(!0)},[o,t.id]);(0,e.useEffect)(()=>{b!==null&&t.id===b.id||M||c==="user"&&ee()},[b,c,M,ee,t.id]);const te=(0,e.useCallback)((0,V.default)(E=>()=>{t.photos.length!==0&&(I(E),x(!0))}),[t.photos.length]),ie=(0,e.useMemo)(()=>(0,L.QO)(t.birthday),[t]),ce=(0,e.useMemo)(()=>(0,L.K)(t.name,f.language),[t.name,f.language]),le=(0,e.useMemo)(()=>(0,L.p9)(t.country_name,t.locality_name),[t.country_name,t.locality_name]),ne=(0,e.useMemo)(()=>(0,D.l)(t),[t]),ae=(0,e.useMemo)(()=>t.photos.filter(E=>E.is_main)[0]??null,[t.photos]),re=(0,e.useMemo)(()=>{const E=t.photos.filter(H=>!H.is_main);return Object.assign(new Array(ke).fill(null),E.slice(0,ke))},[t.photos]),U=(0,S.tW)($.a.USERS_DETAILS,{id:t.id}),q=o("profile:subscription.label");return e.createElement(e.Fragment,null,e.createElement("div",{className:"view-profile"},e.createElement("div",{className:"view-profile__main-info mb-40"},e.createElement("div",{className:"view-profile__main-block view-profile__photo"},e.createElement("div",{className:"view-profile__avatar",onClick:te(1)},e.createElement(_.eu,{gender:t.sex,shape:"rounded",src:ae?.url??null,bordered:!0}
1),e.createElement(_.i1,{position:"left"},t.photos.length)),e.createElement("div",{className:"view-profile__photo-thumbs"},re.length>0&&re.map((E,H)=>{const J=E===null?`placeholder-${H}`:E.id;return e.createElement("div",{key:J,className:"view-profile__photo-thumb",onClick:te(H+2)},e.createElement(_.eu,{gender:t.sex,src:E?.url??null}))}))),e.createElement("div",{className:"view-profile__main-block"},e.createElement("div",{className:"d-flex align-items-center justify-content-between mb-8"},e.createElement(_.hE,{component:"h4",noMargin:!0},o("name-with-age",{name:ce,age:ie}),t.is_school_passed&&e.createElement("span",{title:o("profile:passed-nikah-school")},e.createElement(_.In,{name:"education-cap",size:16,className:B.classes.passed_school}))),d("view-user-details")&&e.createElement(pe.N_,{className:"view-profile__more-icon",to:U},e.createElement(_.In,{name:"more"}))),T&&e.createElement("div",{className:"d-flex mb-8"},h?e.createElement("span",{className:B.classes.scam_badge,onClick:E=>{E.preventDefault(),E.stopPropagation(),l.oR.info(a)}},v):e.createElement(W.A,{title:a,arrow:!0},e.createElement("span",{className:B.classes.scam_badge},v))),e.createElement("div",{className:"d-flex mb-8"},e.createElement("span",{className:B.classes.user_card_location},le)),t.you_is_blocked&&e.createElement("div",{className:"d-flex mb-8"},e.createElement("span",{className:B.classes.user_card_you_is_blocked},o("errors.user-blocked-you"))),t.has_no_subscription&&e.createElement("div",{className:"d-flex mb-8"},e.createElement(W.A,{title:o("profile:user-has-no-subscription.description"),enterTouchDelay:0,classes:{tooltip:B.classes.tooltip},arrow:!0},e.createElement("span",{className:B.classes.user_has_no_subscription},o("profile:user-has-no-subscription.title")))),e.createElement("div",{className:"d-flex mb-16"},e.createElement(_.fv,{bigText:!0,lastOnlineTime:t.was_online_at,sex:t.sex,status:t.presence_status})),(t.subscription_icon_url||t.subscription_title)&&e.createElement("div",{className:B.classes.subscription_under_status},e.createElement("span",{className:B.classes.subscription_under_status_text},q+(t.subscription_title?`: ${t.subscription_title}`:"")),t.subscription_icon_url?e.createElement(W.A,{title:t.subscription_title??q,arrow:!0},e.createElement("img",{alt:"","aria-hidden":"true","aria-label":t.subscription_title??void 0,className:B.classes.subscription_under_status_icon,loading:"lazy",src:t.subscription_icon_url})):null),t.phone_number!==null&&e.createElement("div",{className:"mb-16",style:{cursor:"pointer",borderBottom:"1px dashed #000",width:"fit-content"},onClick:()=>{navigator.clipboard.writeText(t.phone_number??""),l.oR.success("Copied to clipboard!")}},e.createElement(_.hE,{component:"h6",noMargin:!0},t.phone_number)),t.profile_headline!==null&&t.hide_customizable!==!0&&e.createElement("div",{className:"view-profile__message mb-16"},e.createElement("span",{className:"view-profile__message-text"},t.profile_headline)),c==="user"&&b!==null&&e.createElement(ze,{currentUser:b,updateUser:u,user:t}))),e.createElement("div",{className:"view-profile__sections"},e.createElement(Ge,{userId:t.id}),ne!==null&&ne.map(E=>e.createElement(Ue,{hide_customizable:t.hide_customizable,key:E.title,title:E.title,data:E.data})))),e.createElement(_.$0,{canViewPhoto:t.can_view_photo,initialPhotoIndex:p,handleClose:()=>x(!1),open:g,photos:t.photos}))};var Qe=()=>{const{t:c,i18n:u}=(0,A.B)(),t=(0,w.iZ)(),[o,f]=(0,e.useState)(!1),d=(0,S.W6)(),h=(0,S.W5)(),v=h.path===$.B.USER?"user":"guardian",a=v==="user"?R.F.USERS_PROFILE:R.F.GUARDIAN_PROFILE;(0,e.useEffect)(()=>{f(!1)},[h.params.id]);const{data:b,update:T}=(0,w.Gs)(a,{params:{user_id:parseInt(h.params.id)},onError:(0,e.useCallback)(x=>{const p=x?.response?.data?.message;if(x?.response?.status===403&&p===c("errors.user-blocked-you")){f(!0);return}if(x.response!==void 0&&p!==void 0){d.push(v==="user"?$.B.PROFILE:$.B.GUARDIAN_CHATS),l.oR.error(p);return}l.oR.error(c("error"))},[d,v,c])}),g=(0,e.useMemo)(()=>{if(b===null)return;const x=(0,L.QO)(b.birthday);return c("name-with-age",{name:(0,L.K)(b.name,u.language),age:x})},[b,c,u.language]);return(0,e.useEffect)(()=>{t&&!t.photo_url&&setTimeout(()=>{l.oR.error(c("photo:errors.has-no-main-photo")),d.push($.B.PHOTO)},1e4)},[t,c,d]),o?e.createElement(i.Od,null,e.createElement(_.tu,{className:B.classes.view_profile_paper},e.createElement("div",{className:B.classes.blockedByUserPage}
1,e.createElement("p",{className:B.classes.user_card_you_is_blocked},c("errors.user-blocked-you")),e.createElement(_.$n,{color:"secondary",variant:"outlined",onClick:()=>d.goBack()},c("navigation.back"))))):e.createElement(i.Od,{title:g},e.createElement(_.tu,{className:B.classes.view_profile_paper},b===null&&e.createElement("div",null,"Loading..."),b!==null&&e.createElement(Ke,{mode:v,updateUser:T,user:b})))}}),91027:(function(X,C,s){var e,S=s(25303);e={value:!0},C.A=void 0;var A=S(s(25211)),l=s(27343),L=C.A=(0,A.default)((0,l.jsx)("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9m0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7"}),"Alarm")}),94962:(function(X,C,s){var e,S=s(25303);e={value:!0},C.A=void 0;var A=S(s(25211)),l=s(27343),L=C.A=(0,A.default)((0,l.jsx)("path",{d:"M13 24c-3.26 0-6.19-1.99-7.4-5.02l-3.03-7.61c-.31-.79.43-1.58 1.24-1.32l.79.26c.56.18 1.02.61 1.24 1.16L7.25 15H8V3.25C8 2.56 8.56 2 9.25 2s1.25.56 1.25 1.25V12h1V1.25c0-.69.56-1.25 1.25-1.25S14 .56 14 1.25V12h1V2.75c0-.69.56-1.25 1.25-1.25s1.25.56 1.25 1.25V12h1V5.75c0-.69.56-1.25 1.25-1.25S21 5.06 21 5.75V16c0 4.42-3.58 8-8 8"}),"BackHand")})}]); 2 3//# sourceMappingURL=6792.bc91c2028af7a958d595.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.