1"use strict"; 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0b2e6126-c608-51b3-928d-5b23c3bf1f25")}catch(e){}}(); 3(self.webpackChunkclient=self.webpackChunkclient||[]).push([["6150"],{33799(e,s,t){t.d(s,{V:()=>d});var r=t(32841),n=t(38020),i=t(15526),a=t(30495),o=t(38107);class d{constructor(){this.pushNotificationReceivedRequestUri="/messages/delivery",this.pushNotificationDisplayedRequestUri="/messages/open",this.pushNotificationOpenedRequestUri="/messages/click",this.apiHost=new o.m(1)}setHost(e){this.apiHost.next(e)}trackNotificationReceived(e){this.apiHost.toSingle().safeSubscribe(s=>{(0,n.Ay)(...this.buildRequest(s,this.pushNotificationReceivedRequestUri,"POST",null,{messageId:e.messageId}))})}trackNotificationDisplayed(e){this.apiHost.toSingle().safeSubscribe(s=>{(0,n.Ay)(...this.buildRequest(s,this.pushNotificationDisplayedRequestUri,"POST",null,Object.assign({messageId:e.messageId},e.source?{source:e.source}:{})))})}trackNotificationOpened(e){this.apiHost.toSingle().safeSubscribe(s=>{(0,n.Ay)(...this.buildRequest(s,this.pushNotificationOpenedRequestUri,"POST",null,Object.assign({messageId:e.messageId},e.source?{source:e.source}:{})))})}buildUrl(e,s){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=new URLSearchParams("");return null!==t&&Object.keys(t).forEach(e=>{n.append(e,t[e])}),r.format({protocol:"https",hostname:e,pathname:s,search:n.toString()})}buildRequest(e,s){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;return[this.buildUrl(e,s,r),Object.assign({method:t,headers:Object.assign({},{"user-agent":a.jI.shared().augment("user-agent"),"x-facility":a.jI.shared().augment("x-facility"),"content-type":"application/json"},i||{})},n?{body:JSON.stringify(n)}:{})]}}d.shared=(0,i.G)(()=>new d)},23186(e,s,t){t.d(s,{R:()=>O});var r=t(50846),n=t(15526),i=t(38107),a=t(17524),o=t(30131),d=t(75841),u=t(26274),p=t(39971),c=t(79942),l=t(32841),h=t(53940),f=t(36580),g=t(84190),v=t(28138),m=t(2773),b=t(48742),w=t(14316),y=t(26551),S=t(91885),A=t(52372),I=t(49518),j=t(93719),C=e=>Object.assign({},e,{status:e.status.toLowerCase()});class O extends r.Q{constructor(e){super("notifications.winemback.popup",e,()=>this.getPopup()),this.apiHost=new i.m(1),this.userId=e,this.token=I.L.shared(this.userId).data().pipe((0,h.p)(e=>!!e),(0,f.t)(1))}setHost(e){this.apiHost.next(e)}buildUrl(e,s){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=new URLSearchParams("");return null!==t&&Object.keys(t).forEach(e=>{r.append(e,String(t[e]))}),l.format({protocol:"https",hostname:e,pathname:s,search:r.toString()})}sendFetch(e,s){return(0,a.z)([this.apiHost,this.token]).pipe((0,g.n)(t=>{var r,[n,i]=t,a=this.buildUrl(n,e,null==s?void 0:s.query),d=null!=(r=null==s?void 0:s.headers)?r:new Headers;return d.append("Authorization",'External jwt="'+i+'"'),(0,o.H)(fetch(a,{method:null==s?void 0:s.method,headers:d,body:JSON.stringify(null==s?void 0:s.body)}))}),(0,g.n)(e=>{if(401===e.status)throw Error("Unauthorized");return e.ok?(0,o.H)(e.json()).pipe((0,v.T)(e=>S.Q.success(e)),(0,m.W)(e=>(0,d.of)(S.Q.failure(e)))):(0,d.of)(S.Q.failure(e))}),(0,b.l)(e=>e.pipe((0,w.Z)((e,s)=>"Unauthorized"===e.message&&s<3?(I.L.shared(this.userId).refresh(),p.v.just()):(0,u.$)(e)))),(0,m.W)(e=>(0,d.of)(S.Q.failure(e)))).toSingle()}getPopup(){return p.v.defer(()=>y._.shared().language.toSingle().pipe((0,c.Fg)(e=>{var s="/contacts/"+this.userId+"/popup/messages",t=new Headers;return t.append("Accept-Language",e),this.sendFetch(s,{method:"GET",headers:t}).pipe((0,c.vV)(e=>e.isSuccessful?C(e.value):null),(0,c.vV)(e=>({data:e,ttl:0})))})))}dataUpdates(){return j.q.shared(this.userId).messages.pipe((0,h.p)(e=>"popup"===e.channel),(0,v.T)(e=>"deleted"===e.type?null:{messageId:e.message.id,content:e.message.body,minimizedContent:e.message.minimizedBody,event:e.message.event,status:e.message.meta.status.toLowerCase(),expiration:e.message.meta.expiration}),(0,v.T)(e=>({data:e,ttl:0})))}shown(e){return p.v.defer(()=>{var s=this.addOptimisticStateTransformation(()=>null);return this.sendFetch("/contacts/"+this.userId+"/popup/messages/"+e+"/close",{method:"PATCH"}).pipe((0,A.rQ)(s),(0,c.ex)(e=>{e.isSuccessful&&this.setState("DELETED"===e.value.status?null:C(e.value),0)}),(0,c.vV)(()=>void 0))})}}O.shared=(0,n.G)(e=>new O(e))},10519(e,s,t){t.d(s,{m:()=>j});var r=t(89218),n=t(15526),i=t(17524),a=t(91885),o=t(39971),d=t(28138),u=t(15654),p=t(36580),c=t(53940),l=t(86487),h=t(79942),f=t(21433),g=t(92810),v=t(42159),m=t(88263),b=t(13462),w=t(71598),y=t(77252),S=t(46822),A=t(84891),I=t(58245);
3class j extends r.D{constructor(e){super(),this.userId=e,this.payload=w.q.shared(e).payload;var s=(0,i.z)([b.T.shared().winembackPopupExtendedPagesEnabled,l.G.shared().visible,S.c.shared().profileId,A.I.shared().visible]).pipe((0,d.T)(e=>{var[s,t,r,n]=e;return s?t||!!r||n:t}),(0,u.F)(),(0,p.t)({refCount:!0,bufferSize:1}));this.canOffer=(0,i.z)([b.T.shared().winembackPopupEnabled,this.payload,w.q.shared(e).mode,s,f.r.shared().name.pipe((0,c.p)(e=>"winemback-popup"!==e)),g.s.shared(e).canOffer.pipe((0,u.F)()),v.C.shared(e).canOffer.pipe((0,u.F)()),m.Z.shared(e).canOffer.pipe((0,u.F)()),y.J.shared(e).callExists]).pipe((0,d.T)(e=>{var[s,t,r,n,i,a,o,d,u]=e;return s&&!!t&&"default"===r&&n&&!i&&!a&&!o&&!d&&!u}),(0,u.F)(),(0,p.t)({refCount:!0,bufferSize:1}))}accept(){return this.offer.toSingle().pipe((0,h.Fg)(e=>e?"minimized"===e.status?(w.q.shared(this.userId).setMode("minimized"),o.v.just(a.Q.success())):w.q.shared(this.userId).shown(e.messageId).pipe((0,h.vV)(()=>a.Q.success())):o.v.just(a.Q.success())))}postpone(){return(0,I.A)().pipe((0,h.AB)(a.Q.success()))}start(){return this.offer.toSingle().pipe((0,h.Fg)(e=>null===e?this.payload.toSingle().pipe((0,h.vV)(e=>e?a.Q.success(e):a.Q.failure("offer-not-allowed"))):o.v.just(a.Q.failure("offer-not-allowed"))))}}j.shared=(0,n.G)(e=>new j(e))},58245(e,s,t){t.d(s,{A:()=>o,y:()=>a});var r=t(39971),n=t(43751),i=t(79760),a=()=>r.v.defer(()=>(n.Y.shared().get(i.A).actions.addToQueue("winemback-popup",[{props:{},disableManualClose:!0}]),r.v.just())),o=()=>r.v.defer(()=>(n.Y.shared().get(i.A).actions.close("winemback-popup"),r.v.just()))},84891(e,s,t){t.d(s,{I:()=>u});var r=t(98153),n=t(48830),i=t(65052),a=t(15654),o=t(36580),d=t(15526);class u{constructor(){this.visible=new n.c(e=>{var s=()=>e.next(!0),t=()=>e.next(!1);return r.A.states("event.pages.loyalty.opened",s,"event.pages.loyalty.closed",t),()=>{r.A.removeStates("event.pages.loyalty.opened",s,"event.pages.loyalty.closed",t)}}).pipe((0,i.Z)(!1),(0,a.F)(),(0,o.t)({bufferSize:1,refCount:!0}))}}u.shared=(0,d.G)(()=>new u)},14081(e,s,t){t.d(s,{j:()=>S});var r=t(17524),n=t(97156),i=t(85378),a=t(15526),o=t(28138),d=t(84190),u=t(15654),p=t(36580),c=t(56177),l=t(66883),h=t(39971),f=t(79942),g=t(12985),v=t(72319),m=t(91885),b=t(97928),w=t(13462),y=[{preferredGender:!0,preferredAge:!0,recipientGenderPreferences:!0,recipientAgePreferences:!0,nonContacts:!0,presence:!0},{preferredGender:!0,preferredAge:!0,recipientGenderPreferences:!0,recipientAgePreferences:!1,nonContacts:!0,presence:!0},{preferredGender:!0,preferredAge:!1,recipientGenderPreferences:!0,recipientAgePreferences:!1,nonContacts:!0,presence:!0},{preferredGender:!0,preferredAge:!1,recipientGenderPreferences:!0,recipientAgePreferences:!1,nonContacts:!0,presence:!1}];class S{constructor(e){this.userId=e,this.users=(0,r.z)([g.im.shared(e).preferences,i.F.shared(e).cachedProfile.pipe((0,o.T)(e=>e.value)),w.T.shared().chatWithNonContactsRecommendations.freeUsersCount]).pipe((0,d.n)(e=>{var s,[t,r,n]=e,i=(null==r?void 0:r.gender)||v.D,a={preferredGender:t.preferredGender||(0,v.R)(i),preferredMinAge:t.minage,preferredMaxAge:t.maxage,gender:i,clientAge:null==r||null==(s=r.birthday)?void 0:s.age};return this.fetchWithRetry(a,0,n).pipe((0,f.vV)(e=>{var s;return null!=(s=e.value)?s:{previews:[],round:0}})).asObservable()}),(0,u.F)(),(0,p.t)({refCount:!0,bufferSize:1}))}filterOnlineUsers(e){return e.filter(e=>"online"===e.presenceStatus||"onlineViaMobile"===e.presenceStatus||"onlineWithCamera"===e.presenceStatus)}filterNonContacts(e){return 0===e.length?h.v.just([]):(0,r.z)(e.map(e=>b.n.shared(this.userId).userInContacts(e.id).pipe((0,c.s)(1),(0,o.T)(s=>({owner:e,inContacts:s}))))).pipe((0,c.s)(1),(0,o.T)(e=>e.filter(e=>!e.inContacts).map(e=>e.owner))).toSingle()}fetchWithRetry(e,s,t){var r=y[s],i=Object.assign({sort:7,filter:"photos",featuredMembersFilterEnabled:!0},r.preferredGender?{preferredGender:e.preferredGender}:void 0,r.recipientGenderPreferences?{gender:e.gender}:void 0,r.preferredAge&&"number"==typeof e.preferredMinAge?{minAge:e.preferredMinAge}:void 0,r.preferredAge&&"number"==typeof e.preferredMaxAge?{maxAge:e.preferredMaxAge}:void 0,r.presence?{presence:!0}:void 0),a=new n.t(100);return l.G.shared(this.userId).feed(a,i).toSingle().pipe((0,f.Fg)(s=>{var{items:t}=s,n=r.presence?this.filterOnlineUsers(t):t,i=r.recipientAgePreferences?n.filter(s=>(function(e,s){var{minage:t,maxage:r}=e.preferences;return void 0===s||(void 0===t||s>=t)&&(void 0===r||s<=r)})(s,e.clientAge)):n;return r.nonContacts?this.filterNonContacts(i):h.v.just(i)}),(0,f.Fg)(r=>r.length>=t?h.v.just(m.Q.success({previews:r.slice(0,t),round:s+1})):s<y.length-1?this.fetchWithRetry(e,s+1,t):h.v.just(r.length>0?m.Q.success({previews:r,round:s+1}):m.Q.failure("no-users"))),(0,f.ZC)(()=>s<y.length-1?this.fetchWithRetry(e,s+1,t):h.v.just(m.Q.failure("no-users"))))}}S.shared=(0,a.G)(e=>new S(e))},88263(e,s,t){t.d(s,{Z:()=>S});var r=t(75841),n=t(17524),i=t(39971),a=t(91885),o=t(84190),d=t(28138),u=t(15654),p=t(36580),c=t(89218),l=t(66382),h=t(22998),f=t(77252),g=t(15526),v=t
3(79942),m=t(13462),b=t(14081),w="chat-non-contacts-recommendations",y="offered";class S extends c.D{constructor(e){super(),this.userId=e,this.canOffer=m.T.shared().chatWithNonContactsRecommendationsEnabled.pipe((0,o.n)(e=>e?(0,n.z)([f.J.shared(this.userId).status,l.j.shared().chatAttendee,this.wasOffered()]).pipe((0,d.T)(e=>{var[s,t,r]=e;return"idle"===s&&null===t&&!r})):(0,r.of)(!1)),(0,o.n)(e=>e?b.j.shared(this.userId).users.pipe((0,d.T)(e=>e.previews.length>0)):(0,r.of)(!1)),(0,u.F)(),(0,p.t)({refCount:!0,bufferSize:1}))}wasOffered(){return h.w.shared(w,this.userId).load(y).pipe((0,v.vV)(e=>null!=e&&e))}start(){return this.wasOffered().pipe((0,v.Fg)(e=>e?i.v.just(a.Q.failure("offer-not-allowed")):m.T.shared().chatWithNonContactsRecommendations.autoPostpone.toSingle().pipe((0,v.Fg)(e=>h.w.shared(w,this.userId).store(y,!0).pipe((0,v.vV)(()=>a.Q.success({autoPostpone:e})))))))}}S.shared=(0,g.G)(e=>new S(e))},71598(e,s,t){t.d(s,{q:()=>d});var r=t(15526),n=t(23186),i=t(97156),a=t(92453),o=t(36580);class d{constructor(e){this.modeSubject=new i.t("default"),this.mode=this.modeSubject.asObservable(),this.userId=e,this.payload=n.R.shared(e).data().pipe((0,a.M)(e=>{var s;return this.setMode(null!=(s=null==e?void 0:e.status)?s:null)}),(0,o.t)({refCount:!0,bufferSize:1}))}shown(e){return n.R.shared(this.userId).shown(e)}setMode(e){this.modeSubject.next(e)}}d.shared=(0,r.G)(e=>new d(e))}}]); 4//# sourceMappingURL=sourcemaps/6150.f48962e7fc5916a2.js.map 5//# debugId=0b2e6126-c608-51b3-928d-5b23c3bf1f25
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.