����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 3.141.107.132 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/public_html/public/client/ |
Upload File : |
{"version":3,"sources":["webpack:///src/common/notifications/notification-subscriptions/notification-subscriptions.service.ts","webpack:///src/common/notifications/notification-subscriptions/notification-subscriptions.component.html","webpack:///src/common/notifications/notification-subscriptions/notification-subscriptions.component.ts","webpack:///src/common/notifications/notification-subscriptions/notification-subscriptions-resolver.service.ts","webpack:///src/common/shared/pagination-widget/pagination-widget.component.html","webpack:///src/common/shared/pagination-widget/pagination-widget.component.ts","webpack:///src/common/notifications/notifications-routing.module.ts","webpack:///src/common/notifications/notification-page/notification-page.component.ts","webpack:///src/common/notifications/notification-page/notification-page.component.html","webpack:///src/common/shared/pagination-widget/pagination-widget.module.ts","webpack:///src/common/notifications/notifications.module.ts"],"names":["NotificationSubscriptionsService","http","userId","this","get","selections","put","$event","stopPropagation","NotificationSubscriptionsComponent","route","api","currentUser","toast","cd","settings","loading$","BehaviorSubject","supportsBrowserNotifications","window","availableChannels","allNotifIds","data","subscribe","subscriptions","available_channels","all_notif_ids","forEach","channelName","Notification","permission","bindToBrowserNotifSubscription","allRowsSelectedFor","clear","select","selected","length","next","payload","getPayload","updateUserSubscriptions","pipe","finalize","open","Object","keys","browser","changed","delay","e","added","removed","markForCheck","requestPermission","then","saveSettings","NotificationSubscriptionsResolverService","router","state","getAll","catchError","navigate","mergeMap","response","of","PaginationWidgetComponent","pageChanged","disabled","numberOfPages","value","last_page","iterator","Array","from","map","n","currentPage","current_page","page","queryParams","replaceUrl","newPage","selectPage","prevPage","nextPage","routes","path","component","NotificationPageComponent","notifications","breakpoints","pagination$","loadPage","snapshot","load","perPage","pagination","markedNotif","find","id","read_at","markAsRead","resolve","permissions","NotificationsRoutingModule","forChild","PaginationWidgetModule","NotificationsModule"],"mappings":"2PAeO,Y,MAAMA,EACT,YAAoBC,GAAA,KAAAA,OAEb,OAAOC,GACV,OAAOC,KAAKF,KAAKG,IAAI,iBAAiBF,mBAGnC,wBAAwBA,EAAgBG,GAC3C,OAAOF,KAAKF,KAAKK,IAAI,iBAAiBJ,kBAAwB,CAACG,gB,6CAR1DL,GAAgC,Y,yBAAhCA,EAAgC,QAAhCA,EAAgC,qBAF7B,S,GAET,G,+HCPa,iBACI,iBAAgC,QAAe,OAC/C,0BAAc,gGAAmD,QAIjE,OACJ,O,sCANoC,gBAElB,gDAA2C,qEAA3C,CAA2C,4D,yBAJjE,QACI,uBAQJ,Q,qBARgC,6C,uCAYhC,iBACI,0BAAc,yCAASO,EAAOC,oBAAhB,CAAkC,wFACf,mCAAwD,QAGzF,OACJ,O,yDAHkB,+DAAgE,4D,yBALtF,iBACI,iBAA+B,QAAgB,OAC/C,uBAOJ,Q,4CATqF,oBAClD,qBACH,6C,yBAhBpC,gBACI,gBACI,gBAAsC,QAAoB,OAC1D,+BAUJ,OACA,sBAUJ,Q,mCAtB8C,2BACxB,uBAWM,yCCK7B,Y,MAAMC,EAQT,YACYC,EACAC,EACAC,EACAC,EACAC,EACDC,GALC,KAAAL,QACA,KAAAC,MACA,KAAAC,cACA,KAAAC,QACA,KAAAC,KACD,KAAAC,WAZJ,KAAAC,SAAW,IAAIC,EAAA,GAAyB,GACxC,KAAAC,6BAAgC,iBAAkBC,OAClD,KAAAC,kBAA8B,GAC9B,KAAAf,WAAsD,GACtD,KAAAgB,YAAwB,GAW/B,WACIlB,KAAKO,MAAMY,KAAKC,UAAWD,IACvBnB,KAAKqB,cAAgBF,EAAKX,IAAIa,cAC9BrB,KAAKiB,kBAAoBE,EAAKX,IAAIc,mBAClCtB,KAAKkB,YAAcC,EAAKX,IAAIe,cAC5BvB,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ACA,EACA,IACA,IACA,IACA,EAGA,IACA,Q,GAGD","file":"x","sourcesContent":["import {Injectable} from '@angular/core';\nimport {AppHttpClient} from '@common/core/http/app-http-client.service';\nimport {BackendResponse} from '@common/core/types/backend-response';\nimport {\n NotificationSubscriptionGroup,\n NotificationSubscriptionsResponse\n} from '@common/notifications/notification-subscriptions/notification-subscription';\n\nexport interface UpdateNotificationSubscriptionsPayload {\n [key: string]: string[];\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NotificationSubscriptionsService {\n constructor(private http: AppHttpClient) {}\n\n public getAll(userId: number): BackendResponse<NotificationSubscriptionsResponse> {\n return this.http.get(`notifications/${userId}/subscriptions`);\n }\n\n public updateUserSubscriptions(userId: number, selections: UpdateNotificationSubscriptionsPayload): BackendResponse<void> {\n return this.http.put(`notifications/${userId}/subscriptions`, {selections});\n }\n}\n","<material-navbar [menuPosition]=\"settings.get('vebto.navbar.defaultPosition')\" class=\"box-shadow\"></material-navbar>\n\n<div class=\"be-container\">\n <form class=\"table material-panel\" (ngSubmit)=\"saveSettings()\">\n <div class=\"setting-group\" *ngFor=\"let group of subscriptions; let first = first\">\n <div class=\"row\">\n <div class=\"name-column strong\" trans>{{group.group_name}}</div>\n <ng-container *ngIf=\"first\">\n <div class=\"channel-column\" *ngFor=\"let channelName of availableChannels\">\n <div class=\"channel-name\" trans>{{channelName}}</div>\n <mat-checkbox (change)=\"$event ? toggleAllRowsFor(channelName) : null\"\n [checked]=\"allRowsSelectedFor(channelName)\"\n [indeterminate]=\"selections[channelName].hasValue() && !allRowsSelectedFor(channelName)\"\n [disabled]=\"channelName === 'browser' && !supportsBrowserNotifications\">\n </mat-checkbox>\n </div>\n </ng-container>\n </div>\n <div class=\"row indent\" *ngFor=\"let setting of group.subscriptions; let last = last\" [class.no-border]=\"last\">\n <div class=\"name-column\" trans>{{setting.name}}</div>\n <div class=\"channel-column\" *ngFor=\"let channelName of availableChannels\">\n <mat-checkbox (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? this.selections[channelName].toggle(setting.notif_id) : null\"\n [checked]=\"selections[channelName].isSelected(setting.notif_id)\"\n [disabled]=\"channelName === 'browser' && !supportsBrowserNotifications\">\n </mat-checkbox>\n </div>\n </div>\n </div>\n\n <button mat-raised-button color=\"accent\" class=\"submit-button\" [disabled]=\"loading$ | async\" trans>Save Settings</button>\n </form>\n</div>\n","import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\nimport {\n NotificationSubscriptionGroup,\n NotificationSubscriptionsResponse\n} from '@common/notifications/notification-subscriptions/notification-subscription';\nimport {\n NotificationSubscriptionsService,\n UpdateNotificationSubscriptionsPayload\n} from '@common/notifications/notification-subscriptions/notification-subscriptions.service';\nimport {CurrentUser} from '@common/auth/current-user';\nimport {Toast} from '@common/core/ui/toast.service';\nimport {BehaviorSubject} from 'rxjs';\nimport {delay, finalize} from 'rxjs/operators';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {Settings} from '@common/core/config/settings.service';\n\n@Component({\n selector: 'notification-subscriptions',\n templateUrl: './notification-subscriptions.component.html',\n styleUrls: ['./notification-subscriptions.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NotificationSubscriptionsComponent implements OnInit {\n public subscriptions: NotificationSubscriptionGroup[];\n public loading$ = new BehaviorSubject<boolean>(false);\n public supportsBrowserNotifications = ('Notification' in window);\n public availableChannels: string[] = [];\n public selections: {[key: string]: SelectionModel<string>} = {};\n public allNotifIds: string[] = [];\n\n constructor(\n private route: ActivatedRoute,\n private api: NotificationSubscriptionsService,\n private currentUser: CurrentUser,\n private toast: Toast,\n private cd: ChangeDetectorRef,\n public settings: Settings,\n ) {}\n\n ngOnInit() {\n this.route.data.subscribe((data: {api: NotificationSubscriptionsResponse}) => {\n this.subscriptions = data.api.subscriptions;\n this.availableChannels = data.api.available_channels;\n this.allNotifIds = data.api.all_notif_ids;\n this.availableChannels.forEach(channelName => {\n this.selections[channelName] = new SelectionModel(true, data.api.selections[channelName]);\n });\n });\n\n if (Notification.permission !== 'granted') {\n this.bindToBrowserNotifSubscription();\n }\n }\n\n public toggleAllRowsFor(channelName: string) {\n this.allRowsSelectedFor(channelName) ?\n this.selections[channelName].clear() :\n this.selections[channelName].select(...this.allNotifIds);\n }\n\n public allRowsSelectedFor(channelName: string): boolean {\n return this.selections[channelName].selected.length === this.allNotifIds.length;\n }\n\n public saveSettings() {\n this.loading$.next(true);\n const payload = this.getPayload();\n this.api.updateUserSubscriptions(this.currentUser.get('id'), payload)\n .pipe(finalize(() => this.loading$.next(false)))\n .subscribe(() => {\n this.toast.open('Notification settings updated.');\n });\n }\n\n private getPayload(): UpdateNotificationSubscriptionsPayload {\n const payload = {};\n Object.keys(this.selections).forEach(channelName => {\n payload[channelName] = this.selections[channelName].selected;\n });\n return payload;\n }\n\n private bindToBrowserNotifSubscription() {\n this.selections.browser.changed\n .pipe(delay(1))\n .subscribe(e => {\n if (e.added.length && !e.removed.length) {\n if (Notification.permission === 'denied') {\n this.toast.open('Notifications blocked. Please enable them for this site from browser settings.');\n this.selections.browser.clear();\n this.cd.markForCheck();\n } else {\n Notification.requestPermission().then(permission => {\n if (permission !== 'granted') {\n this.selections.browser.clear();\n this.cd.markForCheck();\n }\n });\n }\n }\n });\n }\n}\n","import {Injectable} from '@angular/core';\r\nimport {ActivatedRouteSnapshot, Resolve, Router, RouterStateSnapshot} from '@angular/router';\r\nimport {catchError, mergeMap} from 'rxjs/operators';\r\nimport {EMPTY, Observable, of} from 'rxjs';\r\nimport {NotificationSubscriptionsService} from '@common/notifications/notification-subscriptions/notification-subscriptions.service';\r\nimport {CurrentUser} from '@common/auth/current-user';\r\nimport {NotificationSubscriptionsResponse} from '@common/notifications/notification-subscriptions/notification-subscription';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class NotificationSubscriptionsResolverService implements Resolve<Observable<NotificationSubscriptionsResponse>> {\r\n constructor(\r\n private router: Router,\r\n private subscriptions: NotificationSubscriptionsService,\r\n private currentUser: CurrentUser,\r\n ) {}\r\n\r\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<NotificationSubscriptionsResponse> {\r\n return this.subscriptions.getAll(+this.currentUser.get('id')).pipe(\r\n catchError(() => {\r\n this.router.navigate(['/account/settings']);\r\n return EMPTY; //\r\n }),\r\n mergeMap(response => {\r\n if (response) {\r\n return of(response);\r\n } else {\r\n this.router.navigate(['/account/settings']);\r\n return EMPTY;\r\n }\r\n })\r\n );\r\n }\r\n}\r\n","<ul class=\"page-numbers unstyled-list\">\n <li>\n <button type=\"button\" class=\"prev\" [disabled]=\"disabled\" (click)=\"prevPage()\" mat-button trans>Previous</button>\n </li>\n <li *ngFor=\"let page of iterator\">\n <button type=\"button\" class=\"page-number-button\" [disabled]=\"disabled\" [class.active]=\"currentPage === page\" (click)=\"selectPage(page)\" mat-flat-button color=\"gray\">{{page}}</button>\n </li>\n <li>\n <button type=\"button\" class=\"next\" [disabled]=\"disabled\" (click)=\"nextPage()\" mat-button trans>Next</button>\n </li>\n</ul>\n","import {ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output} from '@angular/core';\nimport {PaginationResponse} from '@common/core/types/pagination/pagination-response';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'pagination-widget',\n templateUrl: './pagination-widget.component.html',\n styleUrls: ['./pagination-widget.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PaginationWidgetComponent {\n private numberOfPages: number;\n public iterator: number[];\n public currentPage: number;\n\n @HostBinding('class.hidden') get shouldHide() {\n return this.numberOfPages < 2;\n }\n\n @Output() pageChanged = new EventEmitter<number>();\n\n @Input() disabled = true;\n @Input() set pagination(value: PaginationResponse<any>) {\n if (value) {\n this.numberOfPages = value.last_page > 10 ? 10 : value.last_page;\n if (this.numberOfPages > 1) {\n this.iterator = Array.from(Array(this.numberOfPages).keys()).map(n => n + 1);\n this.currentPage = value.current_page;\n }\n }\n }\n\n constructor(private router: Router) {}\n\n public selectPage(page: number) {\n if (this.currentPage !== page) {\n this.currentPage = page;\n this.pageChanged.next(page);\n this.router.navigate([], {queryParams: {page}, replaceUrl: true});\n }\n }\n\n public nextPage() {\n const newPage = this.currentPage + 1;\n this.selectPage(newPage <= this.numberOfPages ? newPage : this.currentPage);\n }\n\n public prevPage() {\n const newPage = this.currentPage - 1;\n this.selectPage(newPage >= 1 ? newPage : this.currentPage);\n }\n}\n","import {NgModule} from '@angular/core';\nimport {Routes, RouterModule} from '@angular/router';\nimport {NotificationSubscriptionsComponent} from './notification-subscriptions/notification-subscriptions.component';\nimport {NotificationSubscriptionsResolverService} from './notification-subscriptions/notification-subscriptions-resolver.service';\nimport {NotificationPageComponent} from '@common/notifications/notification-page/notification-page.component';\n\n\nconst routes: Routes = [\n {\n path: '',\n component: NotificationPageComponent,\n },\n {\n path: 'settings',\n component: NotificationSubscriptionsComponent,\n resolve: {api: NotificationSubscriptionsResolverService},\n data: {permissions: ['notification.subscribe']},\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class NotificationsRoutingModule {\n}\n","import {Component, OnInit, ChangeDetectionStrategy} from '@angular/core';\nimport {Settings} from '@common/core/config/settings.service';\nimport {NotificationService} from '@common/notifications/notification-list/notification.service';\nimport {BreakpointsService} from '@common/core/ui/breakpoints.service';\nimport {ActivatedRoute} from '@angular/router';\nimport {BehaviorSubject} from 'rxjs';\nimport {PaginationResponse} from '@common/core/types/pagination/pagination-response';\nimport {DatabaseNotification} from '@common/notifications/database-notification';\n\n@Component({\n selector: 'notification-page',\n templateUrl: './notification-page.component.html',\n styleUrls: ['./notification-page.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NotificationPageComponent implements OnInit {\n public pagination$ = new BehaviorSubject<PaginationResponse<DatabaseNotification>>(null);\n\n constructor(\n public settings: Settings,\n public notifications: NotificationService,\n public breakpoints: BreakpointsService,\n private route: ActivatedRoute,\n ) {}\n\n ngOnInit() {\n this.loadPage(this.route.snapshot.queryParams.page || 1);\n }\n\n public loadPage(page: number) {\n this.notifications.load({page, perPage: 25})\n .subscribe(response => {\n this.pagination$.next(response.pagination);\n });\n }\n\n public markAsRead(markedNotif: DatabaseNotification) {\n const notification = this.pagination$.value.data.find(n => n.id === markedNotif.id);\n notification.read_at = markedNotif.read_at;\n }\n}\n","<material-navbar [menuPosition]=\"settings.get('vebto.navbar.defaultPosition')\"></material-navbar>\n<div class=\"be-container\">\n <notification-list [notifications]=\"(pagination$ | async)?.data\" [compact]=\"breakpoints.isMobile$ | async\" (markedAsRead)=\"markAsRead($event)\"></notification-list>\n <pagination-widget [pagination]=\"pagination$ | async\" [disabled]=\"notifications.loading$ | async\" (pageChanged)=\"loadPage($event)\"></pagination-widget>\n</div>\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {PaginationWidgetComponent} from '@common/shared/pagination-widget/pagination-widget.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport {TranslationsModule} from '@common/core/translations/translations.module';\n\n\n@NgModule({\n declarations: [\n PaginationWidgetComponent,\n ],\n imports: [\n CommonModule,\n MatButtonModule,\n TranslationsModule,\n ],\n exports: [\n PaginationWidgetComponent,\n ]\n})\nexport class PaginationWidgetModule {\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NotificationsRoutingModule } from './notifications-routing.module';\nimport { NotificationSubscriptionsComponent } from './notification-subscriptions/notification-subscriptions.component';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { ImageOrIconModule } from '@common/core/ui/image-or-icon/image-or-icon.module';\nimport { NotificationListModule } from '@common/notifications/notification-list/notification-list.module';\nimport { MaterialNavbarModule } from '@common/core/ui/material-navbar/material-navbar.module';\nimport { NotificationPageComponent } from './notification-page/notification-page.component';\nimport {PaginationWidgetModule} from '@common/shared/pagination-widget/pagination-widget.module';\nimport {MatButtonModule} from '@angular/material/button';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\n\n\n@NgModule({\n declarations: [\n NotificationSubscriptionsComponent,\n NotificationPageComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NotificationsRoutingModule,\n MaterialNavbarModule,\n ImageOrIconModule,\n NotificationListModule,\n PaginationWidgetModule,\n\n // material\n MatCheckboxModule,\n MatButtonModule,\n ]\n})\nexport class NotificationsModule {\n}\n"]}