PageSourceSearch

https://app.focusmate.com/chunk-7YLDF3MN.js

js focusmate.com collected 2026-09-24 09:26:51 UTC 19,763 bytes, 2 lines download raw bytes

1import{a as he,b as ke,c as fe}from"./chunk-V5IJQN5E.js";import{b as me,c as ge}from"./chunk-3QLII6IU.js";import{$b as se,Nd as pe,Ob as oe,Pb as ie,Vb as ne,Wb as le,ab as Z,ba as z,ca as A,cd as ce,dd as de,e as G,fb as ee,gb as te,j as J,oe as ue,s as Q}from"./chunk-X3UW4FV3.js";import"./chunk-3KUWIZFM.js";import{Kb as X,hc as re,ic as ae}from"./chunk-QTYJNS4L.js";import{Fb as N,Ga as g,Gb as v,Ib as u,Kb as p,Sc as H,Tb as F,Ue as E,Vb as w,Ve as M,Wa as a,Wb as V,Xa as I,Xc as Y,Yb as b,_b as j,bb as f,db as y,ha as B,jb as P,kc as _,lc as U,m as q,pb as T,rb as x,sd as W,tb as K,ub as R,vb as D,wb as d,xb as s,xc as $,ya as h,yb as r,za as k,zb as C,zc as S}from"./chunk-NFWLLSTH.js";var Pe=i=>({autofocus:!1,"aria-label":i}),_e=(()=>{let l=class l{constructor(e){this.userDateFormattingService=e,this.selected=!1,this.disabled=!1,this.unblocking=!1,this.convertingBlockToSnooze=!1,this.selectedChange=new I,this.unblock=new I,this.convertBlockToSnooze=new I}get lastMetLabel(){return this.userDateFormattingService.generateLastMetString(this.person.mostRecentSession)||"Haven\u2019t met yet"}toggleSelected(){this.disabled||this.selectedChange.emit(!this.selected)}setSelected(e,t){t?.stopPropagation(),!this.disabled&&this.selectedChange.emit(e)}onClickUnblock(e){e.stopPropagation(),!(this.disabled||this.unblocking)&&this.unblock.emit()}onClickConvertBlockToSnooze(){this.disabled||this.convertingBlockToSnooze||this.convertBlockToSnooze.emit()}};l.\u0275fac=function(t){return new(t||l)(f(te))},l.\u0275cmp=y({type:l,selectors:[["fm-blocked-people-list-item"]],inputs:{person:"person",selected:"selected",disabled:"disabled",unblocking:"unblocking",convertingBlockToSnooze:"convertingBlockToSnooze"},outputs:{selectedChange:"selectedChange",unblock:"unblock",convertBlockToSnooze:"convertBlockToSnooze"},decls:12,vars:36,consts:[[1,"w-full","py-2","px-0","flex","justify-between","items-center","rounded-lg","cursor-pointer","focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary",3,"click"],[1,"flex","items-center","min-w-0","gap-2"],[3,"click","onChange","binary","ngModel","ariaLabel","disabled"],[3,"sizePx","avatarLocation"],[1,"flex","flex-col","min-w-0","justify-center","font-inter","leading-[normal]"],[1,"text-16","text-color","font-medium","truncate"],[1,"text-14","text-muted-color","font-normal","truncate"],[1,"flex","justify-end","items-center","gap-1","ml-3",3,"click"],["size","small","severity","secondary","styleClass","aspect-square","icon","pi pi-undo","pTooltip","Unblock","tooltipPosition","top",3,"click","buttonProps","outlined","disabled","loading"],["useOutlinedButtonStyle","true",3,"convertBlockToSnooze","disabled","showViewProfile","showReportProfile","showSeeAvailability","showSnooze","showConvertBlockToSnooze","showUnsnooze","showEditSnooze","showBlock","showUnblock","showAddToFavorites","showRemoveFromFavorites","targetUserFirstName","targetUserDisplayName","targetUserId","targetUserProfileUrl","targetUserPhotoUrl","source"]],template:function(t,o){t&1&&(s(0,"div",0),u("click",function(){return o.toggleSelected()}),s(1,"div",1)(2,"p-checkbox",2),u("click",function(m){return m.stopPropagation()})("onChange",function(m){return o.setSelected(m.checked,m.originalEvent)}),r(),C(3,"fm-avatar",3),s(4,"div",4)(5,"div",5),b(6),r(),s(7,"div",6),b(8),r()()(),s(9,"div",7),u("click",function(m){return m.stopPropagation()}),s(10,"p-button",8),u("click",function(m){return o.onClickUnblock(m)}),r(),s(11,"fm-actions-menu",9),u("convertBlockToSnooze",function(){return o.onClickConvertBlockToSnooze()}),r()()()),t&2&&(w("cursor-not-allowed",o.disabled)("opacity-70",o.disabled),a(2),d("binary",!0)("ngModel",o.selected)("ariaLabel","Select "+o.person.displayName)("disabled",o.disabled),a(),d("sizePx",48)("avatarLocation",o.person.profilePhoto),a(3),j(" ",o.person.displayName," "),a(2),j(" ",o.lastMetLabel," "),a(2),d("buttonProps",U(34,Pe,"Unblock "+o.person.displayName))("outlined",!0)("disabled",o.disabled)("loading",o.unblocking),a(),d("disabled",o.disabled||o.unblocking)("showViewProfile",!0)("showReportProfile",!0)("showSeeAvailability",!1)("showSnooze",!1)("showConvertBlockToSnooze",!0)("showUnsnooze",!1)("showEditSnooze",!1)("showBlock",!1)("showUnblock",!1)("showAddToFavorites",!1)("showRemoveFromFavorites",!1)("targetUserFirstName",o.person.firstName)("targetUserDisplayName",o.person.displayName)("targetUserId",o.person.userId)("targetUserProfileUrl",o.person.profileUrl)("targetUserPhotoUrl",o.person.profilePhoto)("source","blockedListActionMenu"))},dependencies:[pe,M,E,ie,oe,se,Q,G,J,A,z],encapsulation:2,changeDetection:0});let i=l;return i})();var L=()=>({autofocus:!1}),Ie=()=>[1,2,3,4,5,6,7,8],ye=i=>({autofocus:!1,"aria-label":i}),Te=()=>({width:"100%",height:"calc(100% - 56px)"}),xe=()=>({width:"100%",height:"100%"});function we(i,l){return this.getPersonTrackKey(l)}function Ue(i,l){i&1&&(s(0,"div",11)(1,"div",12),C(2,"p-skeleton",13)(3,"p-skeleton",14),s(4,"div",15),C(5,"p-skeleton",16)(6,"p-skeleton",17),r()(),s(7,"div",18),C(8,"p-skeleton",19)(9,"p-skeleton",19),r()())}function ze(i,l){i&1&&(s(0,"div",10),R(1,Ue,10,0,"div",11,K),r()),i&2&&(a(),D(_(0,Ie)))}function Ae(i,l){if(i&1){let n=v();s(0,"div",22)(1,"p-button",27),u("click",function(){h(n);let t=p(2);return k(t.onClickBulkUnblock())}),r(),s(2,"p-button",28),u("click",function(){h(n);let t=p(2);return k(t.onClickConvertBlocksToSnoozes())}),r()()}if(i&2){let n=p(2);a(),d("buttonProps",_(8,L))("outlined",!0)("disabled",n.isActionInProgress())("loading",n.bulkActionInProgress()==="unblock"),a(),d("buttonProps",_(9,L))("outlined",!0)("disabled",n.isActionInProgress())("loading",n.bulkActionInProgress()==="snooze")}}function Ee(i,l){i&1&&N(0)}function Me(i,l){if(i&1&&P(0,Ee,1,0,"ng-container",29),i&2){p(2);let n=F(6);d("ngTemplateOutlet",n)}}function Le(i,l){if(i&1){let n=v();s(0,"fm-blocked-people-list-item",31),u("unblock",function(){let t=h(n).$implicit,o=p(4);return k(o.onClickUnblockPerson(t))})("convertBlockToSnooze",function(){let t=h(n).$implicit,o=p(4);return k(o.onClickConvertBlockToSnooze(t))})("selectedChange",function(t){let o=h(n).$implicit,c=p(4);return k(c.setPersonSelected(o.userId,t))}),r()}if(i&2){let n=l.$implicit,e=p(4);d("person",n)("selected",e.isSelected(n.userId))("disabled",e.isActionInProgress()&&!e.isUnblocking(n.userId))("unblocking",e.isUnblocking(n.userId))("convertingBlockToSnooze",e.isConvertingBlockToSnooze(n.userId))}}function Re(i,l){if(i&1&&R(0,Le,1,5,"fm-blocked-people-list-item",30,we,!0),i&2){let n=l.$implicit;D(n)}}function De(i,l){if(i&1&&(s(0,"p-dataview",25),P(1,Re,2,0,"ng-template",null,1,$),r()),i&2){let n=p(2);d("value",n.people())}}function Ne(i,l){if(i&1){let n=v();s(0,"div",6)(1,"div",20)(2,"p-button",21),u("click",function(){h(n);let t=p();return k(t.toggleCurrentPageSelection())}),r(),T(3,Ae,3,10,"div",22),r(),s(4,"div",23)(5,"p-scrollPanel")(6,"fm-scroll-affordance")(7,"div",24),T(8,Me,1,1,"ng-container")(9,De,3,1,"p-dataview",25),r()()(),s(10,"p-paginator",26),u("onPageChange",function(t){h(n);let o=p();return k(o.onPageChange(t))}),r()()()}if(i&2){let n=p();a(2),d("buttonProps",U(15,ye,n.allCurrentPageSelected()?"Unselect all blocked people on this page":"Select all blocked people on this page"))("outlined",!0)("icon",n.allCurrentPageSelected()?"pi pi-list-check":"pi pi-list")("label",n.hasSelection()?n.selectedCount()+" selected":n.allCurrentPageSelected()?"Unselect all":"Select all")("pTooltip",n.allCurrentPageSelected()?"Unselect all":"Select all")("disabled",n.isActionInProgress()),a(),x(n.hasSelection()?3:-1),a(2),V(_(17,Te)),a(3),x(n.paginatingState()==="loading"?8:9),a(2),d("first",(n.page()-1)*n.pageSize)("showPageLinks",!1)("rows",n.pageSize)("totalRecords",n.peopleCount())("showCurrentPageReport",!0)}}function Fe(i,l){if(i&1){let n=v();s(0,"div",7)(1,"div",32),b(2,"Couldn\u2019t load blocked people."),r(),s(3,"p-button",33),u("click",function(){h(n);let t=p();return k(t.retryLoad())}),r()()}i&2&&(a(3),d("buttonProps",_(2,L))("outlined",!0))}function Ve(i,l){i&1&&(s(0,"div",8),b(1," You haven\u2019t blocked anyone. "),r())}function je(i,l){i&1&&N(0)}function $e(i,l){if(i&1&&(s(0,"div",34)(1,"p-scrollPanel"),P(2,je,1,0,"ng-container",29),r()()),i&2){let n=p(),e=F(6);w("animation-fade-out",n.loadingState()==="replacing"),a(),V(_(5,xe)),a(),d("ngTemplateOutlet",e)}}var wt=(()=>{let l=class l{constructor(e,t,o,c,m,be){this.router=e,this.peopleService=t,this.userRelationshipService=o,this.dialogService=c,this.toastService=m,this.analyticsService=be,this.ngUnsubscribe=new q,this.analyticsSource="blockedList",this.pageSize=100,this.people=g([]),this.peopleCount=g(0),this.page=g(1),this.loadingState=g("initial"),this.paginatingState=g("initial"),this.hasLoadError=g(!1),this.selectedIds=g(new Set),this.bulkActionInProgress=g(null),this.unblockInProgressByUserId=g(new Set),this.convertBlockToSnoozeInProgressByUserId=g(new Set),this.shouldStepBackIfEmptyAfterLoad=!1,this.selectedCount=S(()=>this.selectedIds().size),this.hasSelection=S(()=>this.selectedCount()>0),this.hasRowActionInProgress=S(()=>this.unblockInProgressByUserId().size>0||this.convertBlockToSnoozeInProgressByUserId().size>0),this.isActionInProgress=S(()=>this.bulkActionInProgress()!==null||this.hasRowActionInProgress()),this.isBulkActionInProgress=S(()=>this.bulkActionInProgress()!==null),this.allCurrentPageSelected=S(()=>{let O=this.people();return O.length>0&&O.every(Se=>
1this.selectedIds().has(Se.userId))})}ngOnInit(){this.getBlockedPeople()}onClickClose(){this.router.navigate(["/settings"],{queryParams:{type:"preferences"}})}onPageChange(e){let t=e.first;this.page.set(t?Math.trunc(t/this.pageSize)+1:1),this.clearSelection(),this.getBlockedPeople(!0)}retryLoad(){this.getBlockedPeople()}toggleCurrentPageSelection(){if(!this.isActionInProgress()){if(this.allCurrentPageSelected()){this.logRelationshipClick("unselectAllBlockedPeople",{selectedCount:this.selectedCount()}),this.clearSelection();return}this.logRelationshipClick("selectAllBlockedPeople",{selectedCount:this.people().length}),this.selectedIds.set(new Set(this.people().map(e=>e.userId)))}}setPersonSelected(e,t){this.isActionInProgress()||this.selectedIds.update(o=>{let c=new Set(o);return t?c.add(e):c.delete(e),c})}isSelected(e){return this.selectedIds().has(e)}getPersonTrackKey(e){return e.userId}isUnblocking(e){return this.unblockInProgressByUserId().has(e)}isConvertingBlockToSnooze(e){return this.convertBlockToSnoozeInProgressByUserId().has(e)}onClickUnblockPerson(e){this.isActionInProgress()||this.isUnblocking(e.userId)||this.dialogService.openBlockedRelationshipConfirmDialog({action:"unblock",headerText:"Unblock this person?",modalName:"Unblock User",primaryButtonLabel:"Unblock",onClose:t=>{t&&this.submitSingleUnblock(e)}})}submitSingleUnblock(e){this.logRelationshipClick("confirmUnblock"),this.addUnblockInProgress(e.userId),this.userRelationshipService.unblockUser(e.userId).pipe(B(this.ngUnsubscribe)).subscribe({next:()=>{this.toastService.openSuccessToast(`Unblocked ${e.displayName}`),this.setPersonSelected(e.userId,!1),this.removeUnblockInProgress(e.userId),this.shouldStepBackIfEmptyAfterLoad=!0,this.getBlockedPeople(!0)},error:()=>
1{this.toastService.openErrorToast(`Unable to unblock ${e.displayName}. Please try again.`),this.removeUnblockInProgress(e.userId)}})}onClickConvertBlockToSnooze(e){this.isActionInProgress()||this.isConvertingBlockToSnooze(e.userId)||(this.logRelationshipClick("openConvertBlockToSnoozeDialog"),this.dialogService.openBlockedRelationshipConfirmDialog({action:"snooze",headerText:"Switch to Snooze?",modalName:"Convert Block to Snooze User",primaryButtonLabel:"Snooze",onClose:t=>{t?(this.logRelationshipClick("confirmConvertBlockToSnooze"),this.submitSingleConvertBlockToSnooze(e)):this.logRelationshipClick("cancelConvertBlockToSnooze")}}))}onClickBulkUnblock(){if(!this.hasSelection()||this.isActionInProgress())return;let e=this.selectedCount();this.logRelationshipClick("openBulkUnblockDialog",{selectedCount:e}),this.dialogService.openBlockedRelationshipConfirmDialog({action:"unblock",headerText:"Unblock selected people?",modalName:"Bulk Unblock",primaryButtonLabel:"Unblock",onClose:t=>{t?(this.logRelationshipClick("confirmBulkUnblock",{selectedCount:e}),this.submitBulkAction("unblock")):this.logRelationshipClick("cancelBulkUnblock",{selectedCount:e})}})}onClickConvertBlocksToSnoozes(){if(!this.hasSelection()||this.isActionInProgress())return;let e=this.selectedCount();this.logRelationshipClick("openConvertBlockToSnoozeDialog",{selectedCount:e}),this.dialogService.openBlockedRelationshipConfirmDialog({action:"snooze",headerText:"Switch selected people to Snooze?",modalName:"Bulk Convert to Snooze",primaryButtonLabel:"Snooze",onClose:t=>{t?(this.logRelationshipClick("confirmConvertBlockToSnooze",{selectedCount:e}),this.submitBulkAction("snooze")):this.logRelationshipClick("cancelConvertBlockToSnooze",{selectedCount:e})}})}logRelationshipClick(e,t={}){this.analyticsService.logRelationshipClick(e,this.analyticsSource,t)}getBlockedPeople(e=!1){this.hasLoadError.set(!1),e?this.paginatingState.set("initial"):this.loadingState.set("initial"),this.peopleService.getBlockedPeople(this.page(),this.pageSize).pipe(B(this.ngUnsubscribe)).subscribe({next:t=>this.receivedBlockedPeople(t),error:()=>this.handleLoadError()}),setTimeout(()=>{this.loadingState()==="initial"?this.loadingState.set("loading"):this.paginatingState()==="initial"&&this.paginatingState.set("loading")},100)}receivedBlockedPeople(e){if(this.shouldStepBackIfEmptyAfterLoad&&e.people.length===0&&e.peopleCount>0&&this.page()>1){this.shouldStepBackIfEmptyAfterLoad=!1,this.page.update(t=>t-1),this.getBlockedPeople(!0);return}this.shouldStepBackIfEmptyAfterLoad=!1,this.replaceLoadingContent(()=>{this.peopleCount.set(e.peopleCount),this.people.set([...e.people]),this.clearSelection()})}handleLoadError(){this.hasLoadError.set(!0),this.people.set([]),this.peopleCount.set(0),this.clearSelection(),this.setLoadedStates()}replaceLoadingContent(e){if(this.loadingState()!=="loading"){this.setLoadedStates(),e();return}this.loadingState.set("replacing"),setTimeout(()=>{e(),this.setLoadedStates()},200)}setLoadedStates(){this.loadingState.set("loaded"),this.paginatingState.set("loaded")}clearSelection(){this.selectedIds.set(new Set)}addUnblockInProgress(e){this.unblockInProgressByUserId.update(t=>{let o=new Set(t);return o.add(e),o})}removeUnblockInProgress(e){this.unblockInProgressByUserId.update(t=>{let o=new Set(t);return o.delete(e),o})}addConvertBlockToSnoozeInProgress(e){this.convertBlockToSnoozeInProgressByUserId.update(t=>{let o=new Set(t);return o.add(e),o})}removeConvertBlockToSnoozeInProgress(e){this.convertBlockToSnoozeInProgressByUserId.update(t=>{let o=new Set(t);return o.delete(e),o})}submitSingleConvertBlockToSnooze(e){this.addConvertBlockToSnoozeInProgress(e.userId),this.userRelationshipService.convertBlocksToSnoozes([e.userId]).pipe(B(this.ngUnsubscribe)).subscribe({next:t=>
1{t.processedCount===0?this.toastService.openErrorToast(`Unable to snooze ${e.displayName}. Please try again.`):(this.toastService.openSuccessToast(`Snoozed ${e.displayName} and removed the block.`),this.setPersonSelected(e.userId,!1),this.shouldStepBackIfEmptyAfterLoad=!0,this.getBlockedPeople(!0)),this.removeConvertBlockToSnoozeInProgress(e.userId)},error:()=>{this.toastService.openErrorToast(`Unable to snooze ${e.displayName}. Please try again.`),this.removeConvertBlockToSnoozeInProgress(e.userId)}})}submitBulkAction(e){let t=Array.from(this.selectedIds()),o=t.length;if(o===0)return;this.bulkActionInProgress.set(e),(e==="unblock"?this.userRelationshipService.bulkUnblockUsers(t):this.userRelationshipService.convertBlocksToSnoozes(t)).pipe(B(this.ngUnsubscribe)).subscribe({next:m=>{this.toastService.openSuccessToast(this.getBulkActionSuccessMessage(e,m,o)),this.clearSelection(),this.bulkActionInProgress.set(null),this.shouldStepBackIfEmptyAfterLoad=!0,this.getBlockedPeople(!0)},error:()=>{this.toastService.openErrorToast(this.getBulkActionErrorMessage(e)),this.bulkActionInProgress.set(null)}})}getBulkActionSuccessMessage(e,t,o){if(t.processedCount===0)return"No blocked people changed.";let c=e==="unblock"?"Unblocked":"Snoozed";return t.processedCount<o?`${c} ${t.processedCount} of ${o} selected people.`:t.processedCount===1?`${c} 1 person.`:`${c} ${t.processedCount} people.`}getBulkActionErrorMessage(e){return e==="unblock"?"Unable to unblock selected people. Please try again.":"Unable to snooze selected people. Please try again."}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}};l.\u0275fac=function(t){return new(t||l)(f(W),f(fe),f(ee),f(ue),f(Z),f(X))},l.\u0275cmp=y({type:l,selectors:[["fm-blocked"]],decls:11,vars:4,consts:[["loadingSkeleton",""],["list",""],[1,"flex","flex-col","w-full","h-full","bg-p-content-background","gap-4","p-6","pb-0","bp908:rounded-2xl","bp908:shadow-fm","animation-fade-in"],[1,"flex","justify-between","items-center","w-full"],[1,"w-full","text-left","text-2xl","text-color","font-semibold"],["size","small","severity","secondary","styleClass","aspect-square","icon","pi pi-times",3,"click","buttonProps","outlined"],[1,"flex","flex-col","gap-3","flex-auto","min-h-0"],[1,"flex-auto","min-h-0","flex","flex-col","items-center","justify-center","gap-3","text-center"],[1,"flex-auto","min-h-0","flex","items-center","justify-center","text-base","text-color"],[1,"flex-auto","min-h-0",3,"animation-fade-out"],[1,"w-full"],[1,"w-full","py-2","px-4","flex","justify-between","items-center"],[1,"flex","items-center","min-w-0","gap-2"],["size","18px"],["size","48px"],[1,"flex","flex-col","gap-1"],["height","16px","width","120px"],["height","14px","width","104px"],[1,"flex","justify-end","items-center","gap-1","ml-3"],["size","32px"],[1,"flex","items-center","justify-between","gap-1","sm:gap-2"],["size","small","severity","secondary","tooltipPosition","top",3,"click","buttonProps","outlined","icon","label","pTooltip","disabled"],[1,"flex","shrink-0","items-center","justify-end","gap-1","sm:gap-2"],[1,"flex-auto","min-h-0","animation-fade-in"],[1,"pr-3"],[1,"h-full",3,"value"],["currentPageReportTemplate","{first} to {last} of {totalRecords}",1,"!px-0",3,"onPageChange","first","showPageLinks","rows","totalRecords","showCurrentPageReport"],["size","small","severity","primary","label","Unblock","pTooltip","Unblock all selected people","tooltipPosition","top",3,"click","buttonProps","outlined","disabled","loading"],["size","small","severity","primary","label","Snooze","pTooltip","Convert blocks to snoozes","tooltipPosition","top",3,"click","buttonProps","outlined","disabled","loading"],[4,"ngTemplateOutlet"],[3,"person","selected","disabled","unblocking","convertingBlockToSnooze"],[3,"unblock","convertBlockToSnooze","selectedChange","person","selected","disabled","unblocking","convertingBlockToSnooze"],[1,"text-base","text-color","font-medium"],["severity","secondary","label","Retry",3,"click","buttonProps","outlined"],[1,"flex-auto","min-h-0"]],template:function(t,o){if(t&1){let c=v();s(0,"div",2)(1,"div",3)(2,"div",4),b(3,"Blocked List"),r(),s(4,"p-button",5),u("click",function(){return h(c),k(o.onClickClose())}),r()(),P(5,ze,3,1,"ng-template",null,0,$),T(7,Ne,11,18,"div",6)(8,Fe,4,3,"div",7)(9,Ve,2,0,"div",8)(10,$e,3,6,"div",9),r()}t&2&&(a(4),d("buttonProps",_(3,L))("outlined",!0),a(3),x(o.people().length>0&&!o.hasLoadError()?7:o.hasLoadError()&&o.loadingState()==="loaded"?8:o.loadingState()==="loaded"?9:o.loadingState()==="loading"||o.loadingState()==="replacing"?10:-1))},dependencies:[_e,M,E,Y,H,ke,he,ge,me,le,ne,de,ce,ae,re,A,z],encapsulation:2,changeDetection:0});let i=l;return i})();export{wt as BlockedComponent};
2//# sourceMappingURL=chunk-7YLDF3MN.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.