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GAAR,CAAY0G,GAAZ,CADhB","sources":["./src/app/app-routing.module.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/dashboard.component.ts","./src/app/dashboard.component.html","./src/app/menu/menu.component.ts","./src/app/menu/menu.component.html","./src/app/persons/person-detail.component.ts","./src/app/persons/person-detail.component.html","./src/app/persons/person-responses.component.ts","./src/app/pipes/boolean.pipe.ts","./src/app/pipes/godate.pipe.ts","./src/app/pipes/human-interval.pipe.ts","./src/app/pipes/secs.pipe.ts","./src/app/pipes/smalltime.pipe.ts","./src/app/pipes/time.pipe.ts","./src/app/profiles/profile-detail.component.ts","./src/app/profiles/profile-detail.component.html","./src/app/profiles/profiles.component.ts","./src/app/profiles/profiles.component.html","./src/app/programmes/programme-detail.component.ts","./src/app/programmes/programme-detail.component.html","./src/app/programmes/programme-responses.component.ts","./src/app/programmes/programmes.component.ts","./src/app/programmes/programmes.component.html","./src/app/responses/audio.wrapper.ts","./src/app/responses/response-player.component.ts","./src/app/responses/response-player.component.html","./src/app/responses/responses.component.ts","./src/app/responses/responses.component.html","./src/app/services/api.service.ts","./src/app/services/profile.service.ts","./src/app/services/token.interceptor.service.ts","./src/app/services/voxpop.service.ts","./src/app/topics/topic-detail.component.ts","./src/app/topics/topic-detail.component.html","./src/app/topics/topic-responses.component.ts","./src/app/topics/topic-responses.component.html","./src/app/topics/topics.component.ts","./src/app/types/programme.ts","./src/app/types/topic.ts","./src/app/widgets/checkbox.component.ts","./src/app/widgets/element.base.ts","./src/app/widgets/value.accessor.base.ts","./src/app/widgets/voxbtn.ts","./src/environments/environment.ts","./src/main.ts"],"sourcesContent":["/**\n * App Router created by karora on 11/03/17.\n */\nimport { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { DashboardComponent } from './dashboard.component';\nimport { PersonResponsesComponent } from './persons/person-responses.component';\nimport { ProfileDetailComponent } from './profiles/profile-detail.component';\nimport { ProfilesComponent } from './profiles/profiles.component';\nimport { ProgrammeResponsesComponent } from './programmes/programme-responses.component';\nimport { ProgrammesComponent } from './programmes/programmes.component';\nimport { TopicResponsesComponent } from './topics/topic-responses.component';\nimport { TopicsComponent } from './topics/topics.component';\n\nconst routes: Routes = [\n { path: 'review', redirectTo: 'review/dashboard', pathMatch: 'full' },\n { path: 'review/dashboard', component: DashboardComponent },\n { path: 'review/responses/topic/:topicid', component: TopicResponsesComponent },\n { path: 'review/responses/person/:personid', component: PersonResponsesComponent },\n { path: 'review/topic/:topicid', component: TopicResponsesComponent },\n { path: 'review/topics', component: TopicsComponent },\n { path: 'review/wires', component: TopicsComponent },\n { path: 'review/programmes', component: ProgrammesComponent },\n { path: 'review/programme/:programmeid', component: ProgrammeResponsesComponent },\n { path: 'review/profiles', component: ProfilesComponent },\n { path: 'review/profile/:profiletype/:profileid', component: ProfileDetailComponent },\n];\n@NgModule({\n imports: [RouterModule.forRoot(routes, { enableTracing: true, relativeLinkResolution: 'legacy' })],\n exports: [RouterModule]\n})\nexport class AppRoutingModule { }\n","/**\n * VoxPop Review app created by karora on 11/03/17.\n */\nimport {Component, OnInit} from '@angular/core';\nimport {Router} from \"@angular/router\";\nimport {ProfileService} from \"./services/profile.service\";\nimport {UserProfile} from \"./types/user-profile\";\nimport {trigger, state, style, transition, animate} from '@angular/animations';\n\n@Component({\n moduleId: module.id,\n selector: 'voxpop-review',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.css'],\n animations: [\n trigger('slideInOut', [\n state('in', style({\n transform: 'translateX(0%)'\n })),\n state('out', style({\n transform: 'translateX(-100%)'\n })),\n transition('in => out', animate('400ms ease-in-out')),\n transition('out => in', animate('400ms ease-in-out'))\n ]),\n ],\n})\n\nexport class AppComponent implements OnInit {\n private static title = 'VoxPop Review';\n public menuState: string = 'out';\n\n constructor(\n private router: Router,\n private profileService: ProfileService,\n ) {}\n\n ngOnInit(): void {\n try {\n this.profileService.GetProfile().subscribe(\n profile => {\n AppComponent.SetUser(profile);\n },\n );\n } catch (e) {\n console.log(e);\n }\n if (!ProfileService.IsLoggedIn()) {\n let c = document.getElementById(\"content\");\n if (c) {\n c.innerHTML = `

Click here to log in

`;\n }\n } else {\n this.router.events.subscribe(() => {\n this.hideMenu();\n });\n }\n }\n\n public static SetTitle(newTitle: string):void {\n AppComponent.title = newTitle;\n document.getElementById(\"title\").innerText = newTitle;\n }\n\n public static SetUser(profile: UserProfile): void {\n let userShite = document.getElementById(\"username\");\n if (userShite && profile && profile.social.name) {\n try {\n // userShite.getElementsByTagName(\"a\")[0].innerText = profile.social.name;\n } catch(e) {\n userShite.innerText = profile.social.name;\n }\n }\n }\n\n public static zpad(v:any, n: number):string {\n let s: string = '000000000000' + v;\n return s.substring(s.length - n);\n }\n\n toggleMenu(): void {\n this.menuState = this.menuState === 'out' ? 'in' : 'out';\n }\n\n hideMenu(): void {\n this.menuState = 'out';\n }\n}\n","\n\n\n\n","import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n\nimport { AppRoutingModule } from './app-routing.module';\nimport { AppComponent } from './app.component';\nimport { DashboardComponent } from './dashboard.component';\nimport { MenuComponent } from './menu/menu.component';\nimport { PersonDetailComponent } from './persons/person-detail.component';\nimport { PersonResponsesComponent } from './persons/person-responses.component';\nimport { BooleanPipe } from './pipes/boolean.pipe';\nimport { GoDatePipe } from './pipes/godate.pipe';\nimport { HumanIntervalPipe } from './pipes/human-interval.pipe';\nimport { SecsPipe } from './pipes/secs.pipe';\nimport { SmallTimePipe } from './pipes/smalltime.pipe';\nimport { TimePipe } from './pipes/time.pipe';\nimport { ProfileDetailComponent } from './profiles/profile-detail.component';\nimport { ProfilesComponent } from './profiles/profiles.component';\nimport { ProgrammeDetailComponent } from './programmes/programme-detail.component';\nimport { ProgrammeResponsesComponent } from './programmes/programme-responses.component';\nimport { ProgrammesComponent } from './programmes/programmes.component';\nimport { VoxResponsePlayerComponent } from './responses/response-player.component';\nimport { ResponsesComponent } from './responses/responses.component';\nimport { ApiService } from './services/api.service';\nimport { ProfileService } from './services/profile.service';\nimport { TokenInterceptor } from './services/token.interceptor.service';\nimport { VoxPopService } from './services/voxpop.service';\nimport { TopicDetailComponent } from './topics/topic-detail.component';\nimport { TopicResponsesComponent } from './topics/topic-responses.component';\nimport { TopicsComponent } from './topics/topics.component';\nimport { CheckboxComponent } from './widgets/checkbox.component';\nimport { VoxBtn } from './widgets/voxbtn';\n\n@NgModule({\n imports: [\n BrowserModule,\n FormsModule,\n ReactiveFormsModule,\n AppRoutingModule,\n HttpClientModule,\n BrowserAnimationsModule,\n MatFormFieldModule,\n MatSelectModule,\n MatIconModule,\n MatInputModule,\n ],\n declarations: [\n AppComponent,\n MenuComponent,\n DashboardComponent,\n TopicsComponent,\n ProgrammesComponent,\n TopicDetailComponent,\n ResponsesComponent,\n TopicResponsesComponent,\n ProgrammeResponsesComponent,\n ProgrammeDetailComponent,\n VoxResponsePlayerComponent,\n PersonResponsesComponent,\n PersonDetailComponent,\n ProfilesComponent,\n ProfileDetailComponent,\n BooleanPipe,\n GoDatePipe,\n SmallTimePipe,\n SecsPipe,\n HumanIntervalPipe,\n TimePipe,\n CheckboxComponent,\n VoxBtn,\n ],\n providers: [\n { provide: HTTP_INTERCEPTORS, useClass: TokenInterceptor, multi: true },\n ApiService,\n VoxPopService,\n ProfileService,\n { provide: 'Window', useValue: window },\n ],\n bootstrap: [AppComponent],\n})\n\n\nexport class AppModule {\n}\n","/**\n * Dashboard for VoxPop Review created by karora on 25/05/17.\n */\nimport { Component, OnInit } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { TimerObservable } from 'rxjs/observable/TimerObservable';\n\nimport { ProfileService } from './services/profile.service';\n\n@Component({\n moduleId: module.id,\n selector: 'voxpop-dashboard',\n templateUrl: './dashboard.component.html',\n styleUrls: ['./dashboard.component.css'],\n})\n\nexport class DashboardComponent implements OnInit {\n reviewOK = false;\n testValue: boolean = false;\n private timer: Subscription;\n\n constructor(\n // private voxPopService: VoxPopService,\n // private router: Router,\n ) {\n }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) return;\n this.reviewOK = ProfileService.CanReview();\n document.getElementById(\"title\").innerText = 'Dashboard';\n let timer = TimerObservable.create(1000, 300000);\n this.timer = timer.subscribe(t => {\n this.reviewOK = ProfileService.CanReview();\n });\n }\n}\n","
\n

Dashboard

\n \n
\nYou are not an authorised reviewer\n","/**\n * VoxPop menu component created by karora on 20/03/17.\n */\nimport { Component, OnInit } from '@angular/core';\nimport {AppComponent} from \"../app.component\";\nimport {ProfileService} from \"../services/profile.service\";\n\n@Component({\n moduleId: module.id,\n selector: 'top-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['./menu.component.css']\n})\n\nexport class MenuComponent implements OnInit {\n IsLoggedIn = ProfileService.IsLoggedIn;\n CanReview = ProfileService.CanReview;\n CanAdminister = ProfileService.CanAdminister;\n\n constructor() { }\n\n ngOnInit(): void {}\n\n\n}\n","\n","/**\n * Person detail component created by karora on 24/06/17.\n */\nimport { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\n\nimport { AppComponent } from '../app.component';\nimport { ProfileService } from '../services/profile.service';\nimport { VoxPopService } from '../services/voxpop.service';\nimport { Person } from '../types/person';\n\n\n@Component({\n moduleId: module.id,\n selector: 'person-detail',\n templateUrl: './person-detail.component.html',\n styleUrls: ['./person-detail.component.css'],\n providers: [VoxPopService],\n})\n\nexport class PersonDetailComponent implements OnInit {\n CanAdminister = ProfileService.CanAdminister;\n person: Person;\n errorMessage: string;\n personTypes = [\n // { \"person_type_id\": 0, \"person_type_description\": \"Invalid\" },\n { \"person_type_id\": 1, \"person_type_description\": \"Public\" },\n { \"person_type_id\": 2, \"person_type_description\": \"Reporter\" }\n ];\n editable = false;\n\n constructor(\n private voxPopService: VoxPopService,\n private route: ActivatedRoute\n ) { }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) return;\n\n console.log(\"Getting person detail.\");\n this.route.params\n .switchMap((params: Params) => this.voxPopService.getPerson(+params['personid']))\n .subscribe(\n person => this.setPerson(person),\n error => this.errorMessage = error,\n );\n }\n\n setPerson(person: Person) {\n console.log(\"Loaded person \" + person.name + \"(\" + person.id + \")\");\n this.person = person;\n AppComponent.SetTitle(person.name + ' (' + person.id + ')')\n }\n\n setEditing() {\n this.editable = true;\n console.log(\"Editable.\");\n }\n\n cancelChanges() {\n this.editable = false;\n console.log(\"Cancel.\");\n }\n\n saveChanges() {\n console.log(\"Saving changes.\");\n this.voxPopService.updatePerson(this.person);\n this.editable = false;\n }\n\n personTypeDescription(p: Person): string {\n switch (p.person_type_id) {\n case 2: return \"Reporter\"; break;\n default: return \"Public\"; break;\n }\n return p.person_type_description;\n }\n}\n","
\n
\n
{{person.name}}
\n
{{person.location}}
\n \n \n
{{person.guid}}
\n
{{person.score}}
\n
\n \n \n \n \n {{person_type.person_type_description}} \n \n \n \n \n \n \n \n \n \n \n {{personTypeDescription(person)}}\n
\n \n
\n
\n
\n
\n\n
0\">\n
\n

{{person.response_count}} responses

\n
\n
\n\n Loading...\n","/**\n * Topic Responses component created by karora on 26/05/17.\n */\nimport {Component, OnInit} from \"@angular/core\";\nimport {AppComponent} from \"../app.component\";\nimport {ActivatedRoute, Params} from \"@angular/router\";\nimport {ProfileService} from \"../services/profile.service\";\n\n@Component({\n moduleId: module.id,\n selector: 'person-responses',\n template: ``,\n styleUrls: [],\n providers: [],\n})\n\n\nexport class PersonResponsesComponent implements OnInit {\n\n constructor(\n private route: ActivatedRoute,\n ) {\n }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) return;\n\n this.route.params\n .map((params: Params) => AppComponent.SetTitle(\"Person \" + params['personid']));\n }\n\n}\n","/**\n * Created by karora on 12/03/17.\n */\nimport { Pipe, PipeTransform } from '@angular/core';\n/*\n * Format a boolean true/false to Y/N\n */\n@Pipe({name: 'boolean'})\nexport class BooleanPipe implements PipeTransform {\n transform(value: boolean): string {\n return (value ? \"Y\" : \"N\");\n }\n}\n","/**\n * GoDatePipe created by karora on 14/03/17.\n */\nimport { Pipe, PipeTransform } from '@angular/core';\nimport {AppComponent} from \"../app.component\";\n/*\n * Format a stringified ISO8601 date more prettily\n */\n@Pipe({name: 'godate'})\nexport class GoDatePipe implements PipeTransform {\n transform(value: string): string {\n try {\n let d = new Date(value);\n let s: string = AppComponent.zpad(d.getFullYear(), 4) + '-' + AppComponent.zpad(d.getMonth() + 1, 2) + '-' + AppComponent.zpad(d.getDate(), 2);\n s += ' ' + AppComponent.zpad(d.getHours(), 2) + ':' + AppComponent.zpad(d.getMinutes(), 2) + ':' + AppComponent.zpad(d.getSeconds(), 2);\n// console.log(\"value: \" + value + ', s=' + s + \", day=\" + d.getDay());\n// let options = { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' };\n// console.log(d.toLocaleString('ko-KO', options));\n// return d.toISOString().slice(0, 19);\n return s;\n } catch(err) {\n console.debug(err);\n return value;\n }\n }\n}\n","/**\n * humaninterval - Created by karora on 16/03/17.\n */\n\nimport { Pipe, PipeTransform } from '@angular/core';\n/*\n * Format a number of seconds into a Human Readable interval\n */\n@Pipe({name: 'humaninterval'})\nexport class HumanIntervalPipe implements PipeTransform {\n transform(interval: number): string {\n let seconds = interval % 60;\n interval = (interval - seconds) / 60;\n let minutes = interval % 60;\n interval = (interval - minutes) / 60;\n let hours = interval % 24;\n interval = (interval - hours) / 24;\n let days = interval;\n\n let result = '';\n if (days) {\n result += days + 'd';\n if (hours && days < 10) {\n result += hours + 'h';\n }\n } else {\n if (hours) {\n result += hours + 'h';\n }\n if (minutes) {\n result += minutes + 'm';\n }\n if (!hours) {\n result += seconds + 's';\n }\n }\n return result;\n }\n}\n","/**\n * humaninterval - Created by karora on 16/03/17.\n */\nimport { Pipe, PipeTransform } from '@angular/core';\n\n\n/*\n * Format a number of seconds into a MM:SS.ddd\n */\n@Pipe({ name: 'secs' })\nexport class SecsPipe implements PipeTransform {\n transform(interval: number): string {\n if (isNaN(interval)) {\n return \"??.?\";\n }\n if (interval > 900) {\n interval /= 1000;\n }\n let tenths = Math.round(interval * 10);\n let result: string = '' + Math.trunc((tenths + 0.001) / 10);\n result += \".\" + (tenths % 10);\n return result;\n }\n}\n","/**\n * GoDatePipe created by karora on 14/03/17.\n */\nimport { Pipe, PipeTransform } from '@angular/core';\nimport {AppComponent} from \"../app.component\";\n/*\n * Format a stringified ISO8601 date more prettily\n */\n@Pipe({name: 'smalltime'})\nexport class SmallTimePipe implements PipeTransform {\n private static months: string[] = [\n \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"\n ];\n transform(value: string): string {\n try {\n let d = new Date(value);\n let s: string = AppComponent.zpad(d.getHours(), 2) + ':' + AppComponent.zpad(d.getMinutes(), 2) + ', ' + SmallTimePipe.months[d.getMonth()] + ' ' + d.getDate();\n return s;\n } catch(err) {\n console.debug(err);\n return value;\n }\n }\n}\n","/**\n * humaninterval - Created by karora on 16/03/17.\n */\n\nimport { Pipe, PipeTransform } from '@angular/core';\n/*\n * Format a number of seconds into a MM:SS.ddd\n */\n@Pipe({name: 'time'})\nexport class TimePipe implements PipeTransform {\n transform(interval: number): string {\n if (isNaN(interval)) {\n return \"??:??.?\";\n }\n let seconds = interval % 60;\n interval = (interval - seconds) / 60;\n let minutes = interval % 60;\n interval = (interval - minutes) / 60;\n let hours = interval;\n\n let result = '';\n if (hours) {\n if (hours < 10) {\n result += '0'\n }\n result += hours + ':';\n }\n if (minutes < 10) {\n result += '0'\n }\n result += minutes + ':';\n if (seconds < 10) {\n result += '0'\n }\n result += Math.trunc(seconds);\n seconds = Math.round(seconds*10) % 10;\n result += \".\" + seconds;\n return result;\n }\n}\n","/**\n * Profile detail component created by karora on 24/06/17.\n */\nimport 'rxjs/add/operator/switchMap';\n\nimport { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\n\nimport { AppComponent } from '../app.component';\nimport { ProfileService } from '../services/profile.service';\nimport { VoxPopService } from '../services/voxpop.service';\nimport { Programme } from '../types/programme';\nimport { UserProfile } from '../types/user-profile';\n\n\n@Component({\n moduleId: module.id,\n selector: 'profile-detail',\n templateUrl: './profile-detail.component.html',\n styleUrls: ['./profile-detail.component.css'],\n providers: [VoxPopService],\n})\n\nexport class ProfileDetailComponent implements OnInit {\n CanAdminister = ProfileService.CanAdministerAll;\n CanAdministerProgramme = ProfileService.CanAdministerProgramme;\n profile: UserProfile;\n programmes = [];\n errorMessage: string;\n\n constructor(\n private voxPopService: VoxPopService,\n private route: ActivatedRoute,\n ) { }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) return;\n\n this.voxPopService.myActiveProgrammes().subscribe(\n programmes => {\n this.programmes = programmes;\n console.log(\"Programmes: \" + JSON.stringify(programmes, null, 2));\n },\n error => this.errorMessage = error,\n );\n\n console.log(\"Getting profile detail.\");\n this.route.params\n .switchMap((params: Params) => this.voxPopService.getProfile(params['profiletype'], params['profileid']))\n .subscribe(\n profile => this.setProfile(profile),\n error => this.errorMessage = error,\n );\n }\n\n setProfile(profile: UserProfile) {\n console.log(\"Loaded profile \" + profile.social.name + \"(\" + profile.id + \")\");\n if (!profile.programme_rights) {\n profile.programme_rights = >{};\n }\n\n this.profile = profile;\n AppComponent.SetTitle(profile.social.name)\n }\n\n toggleAdminister(pID: number): void {\n let currentUserProfile = ProfileService.CurrentUserProfile();\n if (pID < 1) {\n if (currentUserProfile.id === this.profile.id) {\n alert(\"You can't change your own rights!\")\n return;\n } else {\n if (this.CanAdminister()) {\n this.profile.administer = !this.profile.administer;\n } else {\n alert(\"You do not have global administrator rights!\");\n return;\n }\n }\n } else {\n if (currentUserProfile.id === this.profile.id && !this.CanAdminister()) {\n alert(\"You can't change your own rights!\")\n return;\n } else {\n let rights: string = this.profile.programme_rights[pID];\n let newRights = \"\";\n if (rights && rights.length && rights.indexOf(\"r\") >= 0) {\n newRights = \"r\";\n }\n if (!rights || !rights.length || rights.indexOf(\"A\") < 0) {\n newRights += \"A\"\n }\n this.profile.programme_rights[pID] = newRights;\n }\n }\n this.updateProfile();\n }\n\n toggleReview(pID: number): void {\n let currentUserProfile = ProfileService.CurrentUserProfile();\n if (pID < 1) {\n if (currentUserProfile.id === this.profile.id) {\n alert(\"You can't change your own rights!\")\n return;\n } else {\n if (this.CanAdminister()) {\n this.profile.review = !this.profile.review;\n } else {\n alert(\"You do not have global administrator rights!\");\n return;\n }\n }\n } else {\n if (currentUserProfile.id === this.profile.id && !this.CanAdminister()) {\n alert(\"You can't change your own rights!\")\n return;\n } else {\n let rights: string = this.profile.programme_rights[pID];\n let newRights = \"\";\n if (rights && rights.length && rights.indexOf(\"A\") >= 0) {\n newRights = \"A\";\n }\n if (!rights || !rights.length || rights.indexOf(\"r\") < 0) {\n newRights += \"r\"\n }\n this.profile.programme_rights[pID] = newRights;\n }\n }\n this.updateProfile();\n }\n\n Reviewable(pID: number): boolean {\n let rights: string = this.profile.programme_rights[pID];\n if (rights && rights.length && rights.indexOf(\"r\") >= 0) {\n return true;\n }\n return false;\n }\n\n Adminable(pID: number): boolean {\n if (!this.profile.programme_rights) return false;\n let rights: string = this.profile.programme_rights[pID];\n if (rights && rights.length && rights.indexOf(\"A\") >= 0) {\n return true;\n }\n return false;\n }\n\n ImageSource(type: string, pID: number, prog: Programme): string {\n // console.log(\"Programme: \" + JSON.stringify(prog, null, 2));\n if ((type === \"review\" && this.Reviewable(pID)) || (type === \"admin\" && this.Adminable(pID))) return \"/images/confirm.svg\";\n return \"/images/cancel.svg\";\n }\n\n updateProfile() {\n this.voxPopService.updateProfile(this.profile)\n .subscribe(\n profile => this.setProfile(profile),\n error => this.errorMessage = error,\n );\n }\n}\n","
\n
\n
\n
{{profile.social.name}}
\n
{{profile.social.email}}
\n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n \n Review\n \n \n Admin\n \n \n
\n
\n
\n
\n\n Loading...\n","import { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\n\nimport { ProfileService } from '../services/profile.service';\nimport { VoxPopService } from '../services/voxpop.service';\nimport { UserProfile } from '../types/user-profile';\n\n@Component({\n moduleId: module.id,\n selector: 'profiles',\n templateUrl: './profiles.component.html',\n styleUrls: ['./profiles.component.css'],\n providers: [VoxPopService],\n})\n\n\nexport class ProfilesComponent implements OnInit {\n CanReview = ProfileService.CanReview;\n CanAdminister = ProfileService.CanAdminister;\n adding: boolean = false;\n profiles: UserProfile[];\n allProfiles: UserProfile[];\n errorMessage: any;\n\n constructor(\n private voxPopService: VoxPopService,\n private router: Router,\n ) { }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) return;\n this.getProfiles();\n }\n\n getProfiles(): void {\n this.voxPopService.allProfiles().subscribe(\n profiles => this.updatedProfiles(profiles),\n error => this.errorMessage = error,\n );\n }\n\n private updatedProfiles(newProfiles: UserProfile[]): void {\n this.allProfiles = newProfiles;\n this.profiles = newProfiles;\n }\n\n gotoDetail(profile: UserProfile): void {\n this.router.navigate([`/review/profile/`, profile.type, profile.id]);\n }\n\n addProfile(): void {\n this.adding = true;\n }\n\n closeDetail(): void {\n this.adding = false;\n this.getProfiles();\n }\n\n getColorFor(profile: UserProfile): string {\n if (this.errorMessage) return '#ff8080'; // So editor doesn't make me think this can be static\n if (profile.administer) return '#e0fff0';\n if (profile.review) return '#e0f8f8';\n return '#EEEEEE';\n }\n\n}\n\n","\n
\n
\n
\n
\n {{profile.social.name}}\n {{profile.social.email}}\n \n
review
\n
administer
\n
\n
\n
\n
\nNot an administrator.\n","/**\n * Programme detail component\n */\nimport 'rxjs/add/operator/switchMap';\n\nimport { ChangeDetectorRef, Component, ComponentRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\n\nimport { AppComponent } from '../app.component';\nimport { ProfileService } from '../services/profile.service';\nimport { VoxPopService } from '../services/voxpop.service';\nimport { Programme } from '../types/programme';\n\n\n@Component({\n moduleId: module.id,\n selector: 'programme-detail',\n templateUrl: './programme-detail.component.html',\n styleUrls: ['./programme-detail.component.css'],\n providers: [VoxPopService],\n})\n\nexport class ProgrammeDetailComponent implements OnInit {\n @ViewChild(\"short_name\") short_name: ComponentRef;\n programme: Programme;\n errorMessage: string;\n editable: boolean = false;\n @Input() inserting: any = false;\n @Output() cancelled: EventEmitter = new EventEmitter();\n\n constructor(\n private voxPopService: VoxPopService,\n private route: ActivatedRoute,\n private cdr: ChangeDetectorRef,\n ) { }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) return;\n\n if (this.inserting) {\n this.programme = new Programme();\n this.editable = true;\n } else {\n console.log(\"Getting programme detail.\");\n this.route.params\n .switchMap((params: Params) => this.voxPopService.getProgramme(+params['programmeid']))\n .subscribe(\n programme => this.setProgramme(programme),\n error => this.errorMessage = error,\n );\n\n\n AppComponent.SetTitle(\"Programme \" + this.route.params['programmeid'])\n }\n }\n\n forceValidShortName(f: string, g: string): boolean {\n // console.log(g + \" f: \" + f + \" current: \" + this.programme.short_name);\n let newValue = f.toLowerCase();\n newValue = newValue.replace(/[^a-z0-9_-]/g, '');\n if (newValue === this.programme.short_name) {\n // console.log(g + \" f: \" + f + \" -- forcing change detection... \" + newValue);\n this.programme.short_name = newValue;\n // this.short_name.changeDetectorRef.markForCheck();\n this.cdr.detectChanges();\n return false;\n }\n // console.log(g + \" now: \" + newValue + \" current: \" + this.programme.short_name);\n this.programme.short_name = newValue;\n // this.cdr.detectChanges();\n // try {\n // console.log(this.short_name);\n // } catch (e) {\n // console.log(e);\n // }\n let sn: HTMLInputElement = document.getElementById('short_name');\n sn.value = newValue;\n return true;\n }\n\n setProgramme(programme: Programme) {\n console.log(\"Loaded programme \" + programme.name + \"(\" + programme.id + \")\");\n this.programme = programme;\n AppComponent.SetTitle(programme.name + ' (' + programme.id + ')')\n }\n\n CanAdminister(): boolean {\n if (this.programme.id < 1) {\n return ProfileService.CanAdminister();\n }\n return ProfileService.CanAdministerProgramme(this.programme.id);\n }\n\n GlobalAdmin(): boolean {\n return ProfileService.CanAdministerAll();\n }\n\n cancel(): void {\n this.editable = false;\n this.cancelled.emit(null)\n }\n\n save(): void {\n if (this.programme.active == \"true\") this.programme.active = true;\n if (this.programme.active == \"false\") this.programme.active = false;\n if (this.inserting) {\n console.log(\"Saving programme: \" + this.programme.name + \"(\" + this.programme.id + \")\");\n this.voxPopService.createProgramme(this.programme)\n .subscribe(\n programme => {\n this.setProgramme(programme);\n this.editable = false;\n this.inserting = false\n },\n error => this.errorMessage = error,\n );\n } else {\n this.voxPopService.updateProgramme(this.programme)\n .subscribe(() => this.editable = false);\n }\n }\n\n edit(): void {\n this.editable = true;\n }\n}\n","
\n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n \n
\n \n   \n   \n
\n \n
\n
\n\n
\n \n
\n
\n \n
\n
{{programme.name}}
\n
{{programme.description}}
\n
{{programme.short_name}}
\n
{{programme.url}}
\n \n
{{programme.active}}
\n
\n \n
\n
\n
\n
\n\n
0\">\n
\n

{{programme.response_count}} responses

\n
\n
\n\n Loading...\n","/**\n * Programme Responses component created by karora on 26/05/17.\n */\nimport {Component} from \"@angular/core\";\n\n@Component({\n moduleId: module.id,\n selector: 'programme-responses',\n template: ``,\n styleUrls: [],\n providers: [],\n})\n\n\nexport class ProgrammeResponsesComponent {\n\n constructor(\n ) { }\n\n}\n","import {Component, OnInit} from '@angular/core';\nimport {Router} from '@angular/router';\n\nimport {Programme} from '../types/programme';\nimport {VoxPopService} from '../services/voxpop.service';\nimport {ProfileService} from \"../services/profile.service\";\n\n@Component({\n moduleId: module.id,\n selector: 'programmes',\n templateUrl: './programmes.component.html',\n styleUrls: ['./programmes.component.css'],\n providers: [VoxPopService],\n})\n\n\nexport class ProgrammesComponent implements OnInit {\n CanReview = ProfileService.CanReview;\n CanAdminister = ProfileService.CanAdminister;\n adding: boolean = false;\n programmes: Programme[];\n allProgrammes: Programme[];\n errorMessage: any;\n\n constructor(\n private voxPopService: VoxPopService,\n private router: Router,\n ) { }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) return;\n this.getProgrammes();\n document.getElementById(\"title\").innerText = 'Programmes';\n }\n\n getProgrammes(): void {\n this.voxPopService.activeProgrammes().subscribe(\n programmes => this.updatedProgrammes(programmes),\n error => this.errorMessage = error,\n );\n }\n\n private updatedProgrammes(newProgrammes: Programme[]): void {\n this.allProgrammes = newProgrammes;\n this.programmes = newProgrammes;\n console.log(\"Updated programmes \" + this.programmes.length);\n }\n\n gotoDetail(programme: Programme): void {\n this.router.navigate(['/review/programme/', programme.id]);\n }\n\n addProgramme(): void {\n this.adding = true;\n }\n\n cancelInsert(): void {\n this.adding = false;\n }\n\n getColorFor(programme: Programme): string {\n if (this.errorMessage && programme) return '#ff8080'; // So editor doesn't make me think this can be static\n return '#EEEEEE';\n }\n\n}\n\n","
\n
\n {{programme.id}}\n {{programme.name}}\n {{programme.description}}\n {{programme.url}}\n
\n \n
\nNot a reviewer.\n","/**\n * Created by karora on 29/05/17.\n * @class\n * @description\n * Wrapper for HTML5 audio.\n */\nimport {Injectable} from '@angular/core';\n\n@Injectable()\nexport class AudioAPIWrapper{\n\n private audioElement: HTMLMediaElement;\n\n constructor() {\n this.createAudio();\n }\n createAudio() {\n if(!this.audioElement){\n this.audioElement = new Audio();\n this.audioElement.autoplay = false;\n this.audioElement.preload = 'auto';\n try {\n (this.audioElement).autobuffer = true;\n } catch(e) {\n console.log(e.message);\n }\n }\n }\n\n public Play(){\n try {\n let promise: any = this.audioElement.play();\n if (!!promise) {\n promise.catch(() => {this.audioElement.play();});\n }\n } catch(e) {\n console.log(e.message);\n }\n }\n\n public Pause(){\n this.audioElement.pause();\n }\n\n public Stop(){\n this.audioElement.pause();\n }\n\n public GetDuration(): number {\n return this.audioElement.duration;\n }\n\n public CurrentTime(setPosition: number | null): number {\n if (setPosition) {\n this.audioElement.currentTime = setPosition;\n }\n return this.audioElement.currentTime\n }\n\n public Load(url: string): number{\n this.createAudio();\n this.audioElement.src = url;\n this.audioElement.load();\n this.Pause();\n return this.audioElement.duration;\n }\n\n}\n","/**\n * VoxResponse detail component\n */\nimport 'rxjs/add/observable/interval';\n\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { ProfileService } from '../services/profile.service';\nimport { VoxPopService } from '../services/voxpop.service';\nimport { VoxResponse } from '../types/response';\nimport { AudioAPIWrapper } from './audio.wrapper';\n\nenum State {\n Stopped = 1,\n Playing,\n Paused,\n}\n\n\n@Component({\n moduleId: module.id,\n selector: 'response-player',\n templateUrl: './response-player.component.html',\n styleUrls: ['./response-player.component.css'],\n providers: [VoxPopService],\n})\n\nexport class VoxResponsePlayerComponent implements OnInit {\n @Input() response: VoxResponse;\n @Input() observableResponse: Observable;\n @Output() cancelPlayer: EventEmitter = new EventEmitter();\n @Output() responseChange: EventEmitter = new EventEmitter();\n errorMessage: string;\n private audio: AudioAPIWrapper;\n audioURL: string;\n progressbarWidth: number = 0;\n duration: number;\n position: number;\n currentState: State = State.Stopped;\n positionObserver: Observable;\n lastPosition: number = 0;\n\n constructor(\n private voxPopService: VoxPopService,\n ) { }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) return;\n\n try {\n this.audio = new AudioAPIWrapper();\n } catch (e) {\n console.log(e.message);\n }\n\n this.observableResponse.subscribe(\n (r) => this.setVoxResponse(r),\n );\n console.log(\"So we should be subscribed now...\");\n\n this.setVoxResponse(this.response);\n }\n\n Play() {\n if (this.currentState != State.Playing) try {\n this.audio.Play();\n this.currentState = State.Playing;\n this.startProgress();\n this.positionObserver.subscribe();\n } catch (e) {\n console.log(e.message);\n }\n }\n\n isPlaying(): boolean {\n return this.currentState == State.Playing;\n }\n\n Pause() {\n if (this.currentState == State.Playing) try {\n this.audio.Pause();\n this.currentState = State.Paused;\n } catch (e) {\n console.log(e.message);\n }\n }\n\n Stop() {\n try {\n this.setVoxResponse(this.response);\n } catch (e) {\n console.log(e.message);\n }\n this.currentState = State.Stopped;\n this.positionObserver = null;\n this.lastPosition = 0;\n this.progressbarWidth = 0;\n }\n\n Cancel() {\n this.cancelPlayer.emit(true);\n }\n\n startProgress() {\n let currentPosition: number;\n this.positionObserver = Observable\n .interval(50)\n .map(() => {\n try {\n currentPosition = Math.round(this.audio.CurrentTime(null) * 100) / 100;\n if (!this.duration || isNaN(this.duration)) {\n this.duration = Math.round(this.audio.GetDuration() * 100) / 100;\n }\n if (this.lastPosition != currentPosition) {\n this.lastPosition = currentPosition;\n this.progressbarWidth = (this.lastPosition / this.duration) * 100;\n // console.log(\"Pos: \" + currentPosition + \", percentage: \" + percentage + \", barWidth: \" + this.progressbarWidth);\n }\n } catch (e) {\n console.log(e.message);\n }\n if (this.lastPosition >= this.duration) {\n this.Stop();\n }\n return this.lastPosition / this.duration;\n });\n }\n\n public progressBarPercent(): number {\n // console.log(\"Width: \" + this.progressbarWidth);\n return this.progressbarWidth;\n }\n\n setVoxResponse(response: VoxResponse) {\n if (!response) return;\n console.log(\"Loaded response \" + response.name + \"(\" + response.id + \")\");\n if (!response.corrected_transcript) response.corrected_transcript = response.transcript;\n this.response = response;\n this.audioURL = `/api/private/r/audio/${this.response.id}/opus/${this.response.topic}-${this.response.id}-${this.response.name}.opus`;\n try {\n this.duration = this.audio.Load(this.audioURL);\n this.progressbarWidth = 0;\n if (isNaN(this.duration)) {\n this.duration = this.response.duration;\n this.Pause();\n }\n } catch (e) {\n console.log(e.message);\n }\n }\n\n responseSaved(response: VoxResponse): void {\n console.log(\"Response was saved: \" + response.id);\n this.responseChange.emit(response);\n }\n\n updateTranscript(): void {\n let savedResponse = this.response;\n console.log(\"Saving response: \" + savedResponse.id);\n this.voxPopService.updateResponse(savedResponse).subscribe(\n () => this.responseSaved(savedResponse),\n )\n }\n}\n","
\n \n Save\n
\n
\n
\n \n
\n
\n \n
\n \n
\n \n
\n
\n
\n \n
\n
\n \n \n \n\n
\n
\n at {{lastPosition | secs}}\n of {{duration | secs}}\n seconds\n
\n
\n
\n \n
","/**\n * Responses component created by karora on 26/05/17.\n */\nimport 'rxjs/add/operator/switchMap';\n\nimport { Component, Input, OnInit } from '@angular/core';\nimport { ActivatedRoute, Params, Router } from '@angular/router';\nimport { Observable, Observer } from 'rxjs';\n\nimport { ProfileService } from '../services/profile.service';\nimport { VoxPopService } from '../services/voxpop.service';\nimport { VoxResponse } from '../types/response';\nimport { Topic } from '../types/topic';\n\n@Component({\n moduleId: module.id,\n selector: 'responses',\n templateUrl: './responses.component.html',\n styleUrls: ['./responses.component.css'],\n providers: [VoxPopService],\n})\n\n\nexport class ResponsesComponent implements OnInit {\n allResponses: VoxResponse[];\n topic_id: number;\n programme_id: number;\n person_id: number;\n before: number;\n beforeResponses: number[];\n @Input() topic: Topic;\n private _showAll: boolean = false;\n loading: boolean;\n responses: VoxResponse[];\n currentResponse: VoxResponse;\n currentResponseObservable: Observable;\n emitter: Observer;\n errorMessage: any;\n\n constructor(\n private voxPopService: VoxPopService,\n private route: ActivatedRoute,\n private router: Router,\n ) {\n }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) return;\n this.currentResponseObservable = Observable.create((e: Observer) => this.emitter = e);\n this.loading = true;\n this.refreshResponses();\n }\n\n get showAll(): boolean {\n return this._showAll;\n }\n\n @Input()\n set showAll(show: boolean) {\n this._showAll = show;\n if (this.allResponses) {\n // Refilter the responses we have\n this.gotResponses(this.allResponses);\n }\n }\n\n refreshResponses(): void {\n this.route.params.switchMap((params: Params) => this.getResponses(params))\n .subscribe(\n responses => this.gotResponses(responses),\n error => this.errorMessage = error,\n );\n }\n\n getResponses(params: Params): Observable {\n this.topic_id = +params['topicid'];\n this.programme_id = +params['programmeid'];\n this.person_id = +params['personid'];\n return this.voxPopService.getResponses(this.programme_id, this.topic_id, this.person_id, this.before);\n }\n\n gotResponses(responses: VoxResponse[]) {\n console.log(\"Got \" + responses.length + \" responses, min duration \" + (this.topic && this.topic.min_duration ? this.topic.min_duration : \"???\"));\n this.loading = false;\n this.allResponses = responses;\n if (this._showAll) {\n this.responses = responses;\n } else {\n let filteredResponses: VoxResponse[] = [];\n for (let i = 0; i < responses.length; i++) {\n if (responses[i].transcript == '[No speech detected]') continue;\n if (this.topic && responses[i].duration < this.topic.min_duration) continue;\n filteredResponses.push(responses[i]);\n }\n this.responses = filteredResponses;\n }\n }\n\n\n onSelect(response: VoxResponse): void {\n this.currentResponse = response;\n try {\n this.emitter.next(response);\n } catch (e) {\n console.log(\"Response.onSelect: \" + e.message);\n }\n }\n\n cancelPlayer(cancel: boolean): void {\n this.onSelect(null);\n }\n\n responseUpdated(updated: VoxResponse): void {\n this.currentResponse = updated;\n this.refreshResponses();\n }\n\n publishResponse(response: VoxResponse): void {\n let toPublish = this.currentResponse;\n if (!toPublish || response.id != toPublish.id) {\n toPublish = response;\n }\n toPublish.published = !toPublish.published;\n console.log(\"Publish \" + (toPublish.published ? \"on\" : \"off\") + \" for \" + toPublish.id);\n this.voxPopService.updateResponse(toPublish).subscribe(\n () => this.responseUpdated(toPublish),\n );\n }\n\n personResponses(response: VoxResponse): void {\n this.router.navigate(['/review/responses/person/', response.person_id]);\n }\n\n getColorFor(response: VoxResponse): string {\n if (this.currentResponse === response) return '#f8f8f8';\n if (this.errorMessage) return '#ff8080'; // So editor doesn't make me think this can be static\n return '#EEEEEE';\n }\n\n toggleShowAll(): void {\n this._showAll = !this._showAll;\n this.gotResponses(this.allResponses);\n }\n\n earlier(): void {\n let before: number = 0;\n try {\n before = this.allResponses[this.allResponses.length - 1].id;\n if (!this.beforeResponses) {\n this.beforeResponses = [];\n }\n this.beforeResponses.push(this.allResponses[0].id)\n } catch (err) {\n console.log(err);\n }\n this.before = before;\n this.refreshResponses();\n }\n\n later(): void {\n let before: number = 0;\n try {\n before = this.beforeResponses[this.beforeResponses.length - 1] + 1;\n this.beforeResponses = this.beforeResponses.slice(0, -1);\n } catch (err) { }\n this.before = before;\n this.refreshResponses();\n }\n\n downloadAsCSV(): void {\n let csvData = `\"received\",\"name\",\"location\",\"email\",\"phone\",\"transcript\",\"corrected\"\\n`;\n let responses = this.allResponses;\n for (let i = 0; i < responses.length; i++) {\n let r = responses[i];\n csvData += `\"${r.received}\",\"${r.name}\",\"${r.location}\",\"${r.email}\",\"${r.phone}\",\"${r.transcript}\",\"${r.corrected_transcript}\"\\n`\n }\n\n let hiddenElement = document.createElement('a');\n hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csvData);\n hiddenElement.target = '_blank';\n hiddenElement.download = 'responses.csv';\n hiddenElement.click();\n }\n\n}\n","
\n
Loading...\n
\n\n \n \n
\n \n \n \n \n   \n \n Received\n From\n Secs\n Contact details\n
\n
0; else empty\" id=\"responses\">\n
\n
\n \n \n \n \n \n \n \n \n
\n \n \n \n
\n \n \n \n \n \n \n \n \n
\n \n {{response.received | smalltime}} \n {{response.name}} from {{response.location}} \n {{response.duration | secs}} \n \n {{response.email}} \n , \n {{response.phone}} \n \n
\n {{response.topic_short_name}}: \n
\n \n {{response.corrected_transcript}}\n {{response.transcript}}\n \n
\n
\n
\n  
No responses in range.
 
\n
\n \n
\n
 
 
 
\n
\n \n
\n
","/**\n * ApiService by karora on 22/03/17.\n */\nimport { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';\nimport { Injectable, OnInit } from '@angular/core';\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\n\nimport { ApiResponse } from '../types/apiresponse';\nimport { TokenInterceptor } from './token.interceptor.service';\n\n@Injectable()\nexport class ApiService implements OnInit {\n private static userId: string = null;\n private static baseHeaders: HttpHeaders;\n private static tokenObserver: ReplaySubject;\n\n static readonly APIKey: string = '7596676d-8fed-475f-8588-6188bce4d0c5';\n\n constructor(\n private http: HttpClient,\n ) {\n ApiService.tokenObserver = null;\n try {\n // set token if saved in local storage\n let currentUser = JSON.parse(localStorage.getItem('currentUser'));\n if (currentUser) {\n ApiService.userId = currentUser.userId;\n TokenInterceptor.SetAuthToken(currentUser.token);\n }\n ApiService.baseHeaders = new HttpHeaders({\n 'Content-Type': 'application/json',\n 'API-Key': ApiService.APIKey,\n });\n this.GetToken();\n } catch (e) {\n console.log(e);\n }\n }\n\n ngOnInit(): void {\n try {\n console.log(\"OnInit...\");\n // this.GetToken();\n } catch (e) {\n console.log(e);\n }\n }\n\n public static RequestHeaders(): HttpHeaders {\n // console.log(\"Adding request headers\");\n return ApiService.baseHeaders;\n }\n\n GetToken(): Observable {\n // console.log(\"GetToken...\");\n if (ApiService.tokenObserver == null) {\n console.log(\"Really GetToken...\");\n ApiService.tokenObserver = new ReplaySubject();\n this.http.get(window['apiBaseURL'] + '/auth/token').toPromise().then(\n (jd) => {\n try {\n // console.log(\"handleTokenResponse: \"+JSON.stringify(jd, null, 2));\n if (jd.status === \"success\" && jd.data && jd.data.token) {\n let currentUser: any;\n try {\n currentUser = JSON.parse(localStorage.getItem('currentUser'));\n } catch (e) { }\n if (!currentUser) {\n currentUser = {};\n }\n currentUser.authToken = jd.data.token;\n currentUser.id = jd.data.id;\n localStorage.setItem('currentUser', JSON.stringify(currentUser));\n TokenInterceptor.SetAuthToken(jd.data.token);\n\n ApiService.userId = jd.data.id;\n ApiService.tokenObserver.next(jd);\n }\n } catch (e) {\n console.log(e);\n }\n }\n )\n }\n return ApiService.tokenObserver.asObservable();\n }\n\n\n Get(url: string): Observable {\n console.log(\"Get: \" + url);\n let observer: Subject> = new Subject>();\n try {\n if (TokenInterceptor.AuthTokenValid()) {\n this.getRealURL(observer, url);\n } else {\n this.GetToken().subscribe(\n () => this.getRealURL(observer, url),\n observer.error,\n () => console.log(\"We're done\")\n );\n }\n } catch (e) {\n console.log(\"Get: error: \" + e);\n }\n return observer.asObservable();\n }\n\n getRealURL(observer: Subject, url: string): void {\n // console.log(\"GetRealURL: \" + window['apiBaseURL'] + url);\n try {\n this.http.get(window['apiBaseURL'] + url, { headers: ApiService.RequestHeaders() })\n .subscribe(\n r => ApiService.getNext(r, observer, url),\n error => ApiService.getError(error, observer, url),\n );\n } catch (e) {\n console.log(\"GetRealURL: error: \" + e);\n }\n }\n\n Post(url: string, body: string): Observable {\n // console.log(\"Post: \" + window['apiBaseURL'] + url);\n let observer: Subject = new Subject();\n try {\n this.http.post(window['apiBaseURL'] + url, body, { headers: ApiService.RequestHeaders() })\n .subscribe(\n r => ApiService.getNext(r, observer, url),\n error => ApiService.getError(error, observer, url),\n );\n } catch (e) {\n console.log(\"Post: error: \" + e);\n }\n return observer.asObservable();\n }\n\n static getNext(r: HttpResponse, observer: Subject>, url: string): void {\n console.debug(\"getNext... \" + url);\n observer.next(r);\n }\n\n static getError(err: any, observer: Subject>, url: string): void {\n console.log(\"getError... \" + JSON.stringify(err, null, 2));\n if (err.status == 401) {\n console.log(\"Status: \" + err.statusText);\n TokenInterceptor.Forget();\n ApiService.userId = null;\n ApiService.tokenObserver = null;\n if (url != \"/auth/logout\" && url != \"/auth/login\") {\n new Promise(resolve => setTimeout(resolve, 15000))\n .then(() => {\n window.location.pathname = \"/auth/login\";\n });\n }\n }\n }\n\n static Forget(): void {\n // clear token remove user from local storage to log user out\n TokenInterceptor.Forget();\n localStorage.removeItem('currentUser');\n }\n}\n","/**\n * ProfileService by karora on 20/03/17.\n */\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { SocialProfile } from '../types/social-profile';\nimport { StandardResponse } from '../types/standard-response';\nimport { UserProfile } from '../types/user-profile';\nimport { ApiService } from './api.service';\n\n@Injectable()\nexport class ProfileService {\n private static userProfile = {\n 'id': '',\n 'review': false,\n 'social': {\n 'id': '',\n 'email': '',\n 'verified_email': '',\n 'name': 'unknown',\n 'given_name': '',\n 'family_name': '',\n 'locale': '',\n 'picture': '',\n },\n 'type': 0,\n 'programme_rights': {\n }\n };\n private static programmes = {}\n private static sessionCookie: string;\n\n constructor(private api: ApiService) {\n ProfileService.sessionCookie = ProfileService.getCookieValue(\"VOXSession\");\n // set token if saved in local storage\n try {\n let currentUser = JSON.parse(localStorage.getItem('currentUser'));\n if (currentUser) {\n ProfileService.userProfile = currentUser.profile;\n if (ProfileService.userProfile.programme_rights) {\n ProfileService.programmes = Object.keys(ProfileService.userProfile.programme_rights);\n console.log(\"Got access for programmes: \" + ProfileService.programmes);\n } else {\n console.log(\"programme_rights was null :-(\");\n console.log(JSON.stringify(ProfileService.userProfile, null, 2));\n }\n }\n } catch (e) {\n console.log(\"Error getting stored profile :-(\" + e);\n }\n }\n\n static getCookieValue(a: string): string {\n let b = document.cookie.match('(^|;)\\\\s*' + a + '\\\\s*=\\\\s*([^;]+)');\n return b ? b.pop() : '';\n }\n\n public static IsLoggedIn(): boolean {\n return (window as any).loggedIn === 'youbetcha';\n }\n\n GetProfile(): Observable {\n return this.api.Get('/auth/profile')\n .map(ProfileService.handleProfileResponse);\n }\n\n private static handleProfileResponse(response: StandardResponse): UserProfile {\n try {\n let status = response && response.status;\n if (status === 'success' && response.data) {\n ProfileService.userProfile = response.data;\n let currentUser = JSON.parse(localStorage.getItem('currentUser'));\n currentUser.profile = response.data;\n localStorage.setItem('currentUser', JSON.stringify(currentUser));\n }\n } catch (e) {\n console.log('Error getting user profile :-(');\n }\n return ProfileService.userProfile;\n }\n\n static logout(): void {\n // clear token remove user from local storage to log user out\n (window).LoggedIn = 'nope';\n ApiService.Forget();\n ProfileService.userProfile = null;\n localStorage.removeItem('currentUser');\n }\n\n public static ProgrammeRights(programmeID: string): string {\n if (ProfileService.userProfile.programme_rights && ProfileService.userProfile.programme_rights[programmeID]) {\n return ProfileService.userProfile.programme_rights[programmeID];\n }\n return \"\";\n }\n\n public static CanReview(): boolean {\n try {\n // console.log(\"Profile: \" + JSON.stringify(ProfileService.userProfile, null, 2));\n if (ProfileService.userProfile && ProfileService.userProfile.id) {\n if (ProfileService.userProfile.review || ProfileService.userProfile.administer) return true;\n for (let k of ProfileService.programmes) {\n let rights = ProfileService.ProgrammeRights(k);\n if (rights.indexOf(\"A\") >= 0) return true;\n if (rights.indexOf(\"r\") >= 0) return true;\n }\n }\n } catch (e) {\n console.log(e.message);\n }\n return false;\n }\n\n public static CanAdminister(): boolean {\n try {\n if (ProfileService.userProfile && ProfileService.userProfile.id) {\n if (ProfileService.userProfile.administer) return true;\n for (let k of ProfileService.programmes) {\n let rights = ProfileService.ProgrammeRights(k);\n if (rights.indexOf(\"A\") >= 0) return true;\n }\n }\n } catch (e) {\n console.log(e.message);\n }\n return false;\n }\n\n public static CanAdministerAll(): boolean {\n try {\n if (ProfileService.userProfile && ProfileService.userProfile.id) {\n if (ProfileService.userProfile.administer) return true;\n }\n } catch (e) {\n console.log(e.message);\n }\n return false;\n }\n\n public static CanReviewAll(): boolean {\n try {\n if (ProfileService.userProfile && ProfileService.userProfile.id) {\n if (ProfileService.userProfile.review) return true;\n }\n } catch (e) {\n console.log(e.message);\n }\n return false;\n }\n\n public static CanAdministerProgramme(programmeID: number): boolean {\n try {\n if (ProfileService.userProfile && ProfileService.userProfile.id) {\n if (ProfileService.userProfile.administer) return true;\n let rights = ProfileService.ProgrammeRights(\"\" + programmeID);\n if (rights.indexOf(\"A\") >= 0) return true;\n }\n } catch (e) {\n console.log(e.message);\n }\n return false;\n }\n\n public static CurrentUserProfile(): UserProfile {\n try {\n if (ProfileService.userProfile && ProfileService.userProfile.id) {\n return ProfileService.userProfile;\n }\n } catch (e) {\n console.log(e.message);\n }\n return null;\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpRequest, HttpHandler, HttpEvent, HttpInterceptor\n} from '@angular/common/http';\nimport { Observable } from 'rxjs/Observable';\n\n@Injectable()\n\nexport class TokenInterceptor implements HttpInterceptor {\n private static authToken: string;\n\n static SetAuthToken(newToken: string) {\n TokenInterceptor.authToken = newToken;\n // if (!!newToken)\n // console.log(\"Got token for future requests: \" + TokenInterceptor.authToken);\n }\n\n static AuthTokenValid(): boolean {\n return !!TokenInterceptor.authToken;\n }\n\n static Forget(): void {\n TokenInterceptor.authToken = null;\n }\n\n intercept(request: HttpRequest, next: HttpHandler): Observable> {\n // console.log(\"In token interceptor\");\n if (TokenInterceptor.authToken) {\n // console.log(\"Adding token header to request\");\n request = request.clone({\n setHeaders: {\n Authorization: `Bearer ${TokenInterceptor.authToken}`\n }\n });\n }\n return next.handle(request);\n }\n\n}\n","/**\n * Hub Service by karora on 11/03/17.\n */\nimport 'rxjs/add/operator/catch';\nimport 'rxjs/add/operator/map';\n\nimport { HttpResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable, throwError } from 'rxjs';\n\nimport { Person } from '../types/person';\nimport { Programme } from '../types/programme';\nimport { VoxResponse } from '../types/response';\nimport { Topic } from '../types/topic';\nimport { UserProfile } from '../types/user-profile';\nimport { ApiService } from './api.service';\nimport { ProfileService } from './profile.service';\n\n@Injectable()\nexport class VoxPopService {\n private static baseURL = '/api';\n private static privateURL = VoxPopService.baseURL + '/private';\n private static adminURL = VoxPopService.baseURL + '/admin';\n\n constructor(\n private api: ApiService,\n ) { }\n\n private static getError(error: HttpResponse | any) {\n let errMsg: string;\n const body = error.body.json() || '';\n const err = body.error || JSON.stringify(body);\n errMsg = `${error.status} - ${error.statusText || ''} ${err}`;\n console.error(errMsg);\n return throwError(errMsg);\n }\n\n private static updateError(error: any): Observable {\n if (error.status !== 401) {\n console.log('VoxPop update error:', error);\n }\n let errMsg: string;\n if (error instanceof HttpResponse) {\n const body = error.body.json() || '';\n const err = body.error || JSON.stringify(body);\n errMsg = `${error.status} - ${error.statusText || ''} ${err}`;\n } else {\n errMsg = error.message ? error.message : error.toString();\n }\n console.error(errMsg);\n return throwError(errMsg);\n }\n\n getTopic(topicId: number): Observable {\n console.log('Getting Topic ' + topicId);\n return this.api.Get(`${VoxPopService.privateURL}/t/details/${topicId}`)\n .map(response => response.data as Topic)\n .catch(VoxPopService.getError);\n }\n\n updateTopic(topic: Topic): Observable {\n const url = `${VoxPopService.adminURL}/t/update/${topic.id}`;\n topic.id = Number(topic.id);\n topic.programme_id = Number(topic.programme_id);\n return this.api.Post(url, JSON.stringify(topic))\n .map(() => topic)\n .catch(VoxPopService.updateError);\n }\n\n createTopic(topic: Topic): Observable {\n const url = `${VoxPopService.adminURL}/t/create`;\n topic.programme_id = Number(topic.programme_id);\n return this.api.Post(url, JSON.stringify(topic))\n .map(response => response.data as Topic)\n .catch(VoxPopService.updateError);\n }\n\n\n activeTopics(): Observable {\n console.log('Getting Active Topics ');\n return this.api.Get(`${VoxPopService.privateURL}/t/all`)\n .map(response => response.list as Topic[])\n .catch(VoxPopService.getError);\n }\n\n activeWires(): Observable {\n console.log('Getting Active Wires ');\n return this.api.Get(`${VoxPopService.privateURL}/w/all`)\n .map(response => response.list as Topic[])\n .catch(VoxPopService.getError);\n }\n\n activeProgrammes(): Observable {\n console.log('Getting Active Programmes');\n return this.api.Get(`${VoxPopService.privateURL}/prog/all`)\n .map(response => response.list as Programme[])\n .catch(VoxPopService.getError);\n }\n\n myActiveProgrammes(): Observable {\n console.log('Getting My Active Programmes');\n return this.api.Get(`${VoxPopService.privateURL}/prog/my/active`)\n .map(response => response.list as Programme[])\n .catch(VoxPopService.getError);\n }\n\n myProgrammes(): Observable {\n console.log('Getting My Programmes');\n return this.api.Get(`${VoxPopService.privateURL}/prog/my/all`)\n .map(response => response.list as Programme[])\n .catch(VoxPopService.getError);\n }\n\n getProgramme(programmeId: number): Observable {\n console.log('Getting Programme ' + programmeId);\n return this.api.Get(`${VoxPopService.privateURL}/prog/details/${programmeId}`)\n .map(response => response.data as Programme)\n .catch(VoxPopService.getError);\n }\n\n updateProgramme(programme: Programme): Observable {\n const url = `${VoxPopService.adminURL}/prog/update/${programme.id}`;\n programme.id = Number(programme.id);\n return this.api.Post(url, JSON.stringify(programme))\n .map(() => programme)\n .catch(VoxPopService.updateError);\n }\n\n createProgramme(programme: Programme): Observable {\n const url = `${VoxPopService.adminURL}/prog/create/${programme.id}`;\n return this.api.Post(url, JSON.stringify(programme))\n .map(response => response.data as Programme)\n .catch(VoxPopService.updateError);\n }\n\n updateResponse(response: VoxResponse): Observable {\n const url = `${VoxPopService.privateURL}/r/update/${response.id}`;\n response.id = Number(response.id);\n return this.api.Post(url, JSON.stringify(response))\n .map(() => response)\n .catch(VoxPopService.updateError);\n }\n\n getResponses(programmeId: number, topicId: number, personId: number, beforeResponseId: number): Observable {\n let url = `${VoxPopService.privateURL}/r/my`;\n if (!!topicId) {\n url = `${VoxPopService.privateURL}/r/t/${topicId}`;\n } else if (!!programmeId) {\n url = `${VoxPopService.privateURL}/r/prog/${programmeId}`;\n } else if (!!personId) {\n url = `${VoxPopService.privateURL}/r/p/${personId}`;\n } else if (ProfileService.CanReviewAll()) {\n url = `${VoxPopService.privateURL}/r/all`\n }\n if (!!beforeResponseId) {\n url += `?before=${beforeResponseId}`;\n }\n console.log('Getting responses for: ' + url);\n return this.api.Get(url)\n .map(response => response.list as VoxResponse[])\n .catch(VoxPopService.getError);\n }\n\n getPerson(personId: number): Observable {\n console.log('Getting Person ' + personId);\n return this.api.Get(`${VoxPopService.privateURL}/p/details/${personId}`)\n .map(response => response.data as Person)\n .catch(VoxPopService.getError);\n }\n\n allProfiles(): Observable {\n console.log('Getting Profiles');\n return this.api.Get(`${VoxPopService.adminURL}/profiles/all`)\n .map(response => response.list as UserProfile[])\n .catch(VoxPopService.getError);\n }\n\n getProfile(pType: number, profileId: string): Observable {\n console.log('Getting User Profile ' + profileId);\n return this.api.Get(`${VoxPopService.adminURL}/profile/details/${pType}/${profileId}`)\n .map(response => response.data as UserProfile)\n .catch(VoxPopService.getError);\n }\n\n updateProfile(profile: UserProfile): Observable {\n const url = `${VoxPopService.adminURL}/profile/update/${profile.type}/${profile.id}`;\n return this.api.Post(url, JSON.stringify(profile))\n .map(() => profile)\n .catch(VoxPopService.updateError);\n }\n\n updatePerson(person: Person): Observable {\n const url = `${VoxPopService.adminURL}/person/update/${person.id}`;\n person.person_type_id = Number(person.person_type_id);\n return this.api.Post(url, JSON.stringify(person))\n .map(() => person)\n .catch(VoxPopService.updateError);\n }\n}\n\n\n","/**\n * Topic detail component\n */\nimport 'rxjs/add/operator/switchMap';\n\nimport { Location } from '@angular/common';\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\n\nimport { ProfileService } from '../services/profile.service';\nimport { VoxPopService } from '../services/voxpop.service';\nimport { Programme } from '../types/programme';\nimport { Topic } from '../types/topic';\n\n\n@Component({\n selector: 'topic-detail',\n templateUrl: './topic-detail.component.html',\n styleUrls: ['./topic-detail.component.css'],\n providers: [VoxPopService],\n})\n\nexport class TopicDetailComponent implements OnInit {\n @Input() topic: Topic;\n @Input() programmes: Programme[];\n @Input() inserting: boolean;\n @Input() type_id: number;\n @Output() closeDetail: EventEmitter = new EventEmitter();\n errorMessage: string;\n editable = false;\n private topic_active = false;\n\n constructor(\n private voxPopService: VoxPopService,\n private route: ActivatedRoute,\n private location: Location\n ) { }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) { return; }\n\n if (!this.programmes || this.programmes.length < 1) {\n this.programmes = [{ \"name\": \"-- not set --\" }];\n this.voxPopService.myActiveProgrammes().subscribe(\n programmes => {\n this.programmes = programmes;\n if (this.inserting && this.programmes.length) {\n this.topic.programme_id = this.programmes[0].id;\n }\n },\n error => this.errorMessage = error,\n );\n } else {\n console.log(\"programmes is: \" + this.programmes.length + \" elements, \" + JSON.stringify(this.programmes, null, 2));\n }\n\n if (this.inserting) {\n this.topic = new Topic();\n if (this.programmes.length) {\n this.topic.programme_id = this.programmes[0].id;\n }\n this.editable = true;\n this.topic.type_id = this.type_id;\n } else {\n console.log('Getting topic detail.');\n this.route.params\n .switchMap((params: Params) => this.voxPopService.getTopic(+params['topicid']))\n .subscribe(\n topic => this.setTopic(topic),\n error => this.errorMessage = error,\n );\n }\n }\n\n // ngOnChanges(changes: SimpleChanges) {\n // for (let propName of Object.keys(changes)) {\n // console.log('Property ' + propName + ' changed');\n // // switch (propName) {\n // // case 'inHub':\n // // this.switchHub();\n // // break;\n // // }\n // }\n // }\n\n CanAdminister(): boolean {\n if (this.topic.programme_id < 1) {\n return ProfileService.CanAdminister();\n }\n return ProfileService.CanAdministerProgramme(this.topic.programme_id);\n }\n\n setTopic(topic: Topic) {\n console.log('Loaded topic ' + topic.topic + '(' + topic.id + ')');\n this.topic = topic;\n this.topic_active = topic.active;\n // AppComponent.SetTitle(topic.topic + ' (' + topic.id + ')')\n }\n\n goBack(): void {\n this.location.back();\n }\n\n cancel(): void {\n this.editable = false;\n this.closeDetail.emit(null);\n }\n\n save(): void {\n if (this.topic.active) { this.topic.active = true; }\n if (!this.topic.active) { this.topic.active = false; }\n this.topic.programme_id = Number(this.topic.programme_id);\n this.programmes.forEach(programme => {\n if (programme.id === this.topic.programme_id) {\n this.topic.programme_key = programme.short_name;\n this.topic.programme_name = programme.name;\n }\n });\n\n if (this.inserting) {\n console.log('Creating new topic: ' + this.topic.topic + '(' + this.topic.short_name + ')');\n if (this.topic.active) {\n // This could be better addressed as a trigger\n this.topic.publication_time = new Date();\n this.topic_active = true;\n } else {\n this.topic_active = false;\n }\n this.voxPopService.createTopic(this.topic)\n .subscribe(\n topic => {\n this.setTopic(topic);\n this.editable = false;\n this.inserting = false;\n this.closeDetail.emit(null);\n },\n error => this.errorMessage = error,\n );\n } else {\n if (this.topic.active && !this.topic_active) {\n this.topic.publication_time = new Date();\n this.topic_active = true;\n } else if (!this.topic.active) {\n this.topic_active = false;\n }\n this.voxPopService.updateTopic(this.topic)\n .subscribe(() => this.editable = false);\n }\n }\n\n edit(): void {\n this.editable = true;\n console.log(\"programmes is: \" + JSON.stringify(this.programmes, null, 2));\n }\n\n}\n","
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n \n \n seconds\n
\n
\n \n \n seconds\n
\n
\n \n \n
\n
\n \n 1; else only_one\" class=\"programme_select\">\n \n \n \n {{programmes[0].name}}\n \n
\n
\n \n   \n
\n \n
\n
\n\n
\n \n
\n
\n \n
\n
{{topic.topic}}
\n
{{topic.short_name}}
\n
{{topic.min_duration}}
\n
{{topic.max_duration}}
\n
{{topic.author}}
\n
{{topic.programme_id}} - {{topic.programme_name}}
\n
{{topic.active}}
\n
\n \n
\n
\n
\n
\n\n
0\">\n
\n

{{topic.response_count}} responses

\n
\n
\n\n Loading...\n","/**\n * Topic Responses component created by karora on 26/05/17.\n */\nimport { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\n\nimport { AppComponent } from '../app.component';\nimport { ProfileService } from '../services/profile.service';\nimport { VoxPopService } from '../services/voxpop.service';\nimport { Topic } from '../types/topic';\n\n@Component({\n moduleId: module.id,\n selector: 'topic-responses',\n templateUrl: './topic-responses.component.html',\n styleUrls: ['./topic-responses.component.css'],\n providers: [],\n})\n\n\nexport class TopicResponsesComponent implements OnInit {\n errorMessage: any;\n showAll: boolean = false;\n topic: Topic;\n\n constructor(\n private voxPopService: VoxPopService,\n private route: ActivatedRoute,\n ) {}\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) return;\n\n console.log(\"Getting topic detail.\");\n this.route.params\n .switchMap((params: Params) => this.voxPopService.getTopic(+params['topicid']))\n .subscribe(\n topic => this.setTopic(topic),\n error => this.errorMessage = error,\n );\n }\n\n setTopic(topic: Topic) {\n console.log(\"Loaded topic \" + topic.topic + \"(\" + topic.id + \")\");\n this.topic = topic;\n AppComponent.SetTitle(topic.topic + ' (' + topic.id + ')')\n }\n\n toggleShowAll(): void {\n this.showAll = !this.showAll;\n }\n\n}\n","\n\n\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router, UrlSegment } from '@angular/router';\n\nimport { ProfileService } from '../services/profile.service';\nimport { VoxPopService } from '../services/voxpop.service';\nimport { Programme } from '../types/programme';\nimport { Topic } from '../types/topic';\n\n@Component({\n selector: 'topics',\n template: `
\n
\n {{topic.id}}\n {{topic.topic}}\n {{topic.response_count}}\n {{topic.programme_name}}\n
\n
\n
\n \n \n
\n \n \n \n
\n
\nNot a reviewer.`,\n styleUrls: ['./topics.component.css'],\n providers: [VoxPopService],\n})\n\n\nexport class TopicsComponent implements OnInit {\n CanReview = ProfileService.CanReview;\n CanAdminister = ProfileService.CanAdminister;\n adding = false;\n topics: Topic[];\n programmes: Programme[];\n allTopics: Topic[];\n errorMessage: any;\n topicTypeID = Topic.typeIDTopic;\n\n constructor(\n private voxPopService: VoxPopService,\n private route: ActivatedRoute,\n private router: Router,\n ) { }\n\n ngOnInit(): void {\n if (!ProfileService.IsLoggedIn()) { return; }\n this.voxPopService.myActiveProgrammes().subscribe(\n programmes => this.programmes = programmes,\n error => this.errorMessage = error,\n );\n document.getElementById('title').innerText = 'Topics';\n this.getTopics();\n }\n\n getTopics(): void {\n this.route.url.subscribe((urlSegments: UrlSegment[]) => {\n console.log(urlSegments);\n if (urlSegments.length > 1) {\n switch (urlSegments[1].path) {\n case 'topics':\n document.getElementById('title').innerText = 'Topics';\n this.topicTypeID = Topic.typeIDTopic;\n this.voxPopService.activeTopics().subscribe(\n topics => this.updatedTopics(topics),\n error => this.errorMessage = error,\n );\n break;\n case 'wires':\n document.getElementById('title').innerText = 'Wires';\n this.topicTypeID = Topic.typeIDWire;\n this.voxPopService.activeWires().subscribe(\n topics => this.updatedTopics(topics),\n error => this.errorMessage = error,\n );\n break;\n }\n }\n });\n }\n\n private updatedTopics(newTopics: Topic[]): void {\n this.allTopics = newTopics;\n this.topics = newTopics;\n }\n\n gotoDetail(topic: Topic): void {\n this.router.navigate(['/review/responses/topic/', topic.id]);\n }\n\n addTopic(): void {\n this.adding = true;\n }\n\n closeDetail(): void {\n this.adding = false;\n this.getTopics();\n }\n\n getColorFor(topic: Topic): string {\n if (this.errorMessage) { return '#ff8080'; } // So editor doesn't make me think this can be static\n if (topic.active) { return '#f4f8f8'; }\n return '#EEEEEE';\n }\n\n}\n\n","/**\n * Programme type created by karora on 13/06/17.\n */\nexport class Programme {\n id: number;\n name: string;\n description: string;\n url: string;\n brand_image_id: number;\n active: boolean;\n client_id: number;\n short_name: string;\n}\n","/**\n * Topic structure by karora on 24/05/17.\n */\n\nexport class Topic {\n id: number;\n short_name: string;\n topic: string;\n min_duration: number;\n max_duration: number;\n active: boolean;\n author: string;\n closing_time: Date;\n publication_time: Date;\n image_url: string;\n response_count: number;\n programme_id: number;\n programme_key: string;\n programme_name: string;\n type_id: number;\n\n public static get typeIDTopic(): number {\n return 1;\n }\n public static get typeIDWire(): number {\n return 2;\n }\n\n constructor() {\n this.min_duration = 3;\n this.max_duration = 30;\n this.active = true;\n this.response_count = 0;\n this.programme_id = 1;\n this.publication_time = new Date();\n this.type_id = Topic.typeIDTopic;\n }\n}\n","/**\n * Checkbox component created by karora on 19/06/17.\n */\nimport {Component, Input, ViewChild} from \"@angular/core\";\nimport {NG_VALUE_ACCESSOR, NgModel} from '@angular/forms';\nimport {ElementBase} from \"./element.base\";\n\n@Component({\n moduleId: module.id,\n selector: 'checkbox',\n template:\n`
\n \n
\n \n \n
\n
\n`,\n styles: [`\n.checkbox {\n display: inline-block;\n\twidth: 25px;\n\tmargin: 0;\n\tposition: relative;\n}\n.checkbox label {\n\tcursor: pointer;\n\tposition: absolute;\n\twidth: 25px;\n\theight: 25px;\n\ttop: 0;\n left: 0;\n\tbackground: #eee;\n\tborder:1px solid #ddd;\n}\n.checkbox label:after {\n\topacity: 0.2;\n\tcontent: url(\"/images/unchecked.svg\");\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tbackground: transparent;\n\tborder: none;\n}\n.checkbox label:hover::after {\n\topacity: 0.5;\n}\n.checkbox input[type=checkbox] + label:after {\n\tcolor: black;\n}\n.checkbox input[type=checkbox]:checked + label:after {\n\topacity: 1;\n}\n.checkbox label.checked {\n background: #4070a0;\n}\n.checkbox label.checked:after {\n\tcontent: '';\n\twidth: 12px;\n\theight: 6px;\n\ttop: 5px;\n\tleft: 5px;\n border: 4px solid white;\n\tborder-top: none;\n\tborder-right: none;\n\n\ttransform: rotate(-45deg);\n}\n.container {\n display: inline-block;\n}\n`\n ],\n providers: [\n {provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true}\n ],\n})\n\nexport class CheckboxComponent extends ElementBase {\n @Input() public label: string;\n @Input() public placeholder: string;\n\n @ViewChild(NgModel) model: NgModel;\n\n public identifier: any = `form-checkbox-${identifier++}`;\n\n onClick(v: boolean) {\n this.value = !this.value;\n console.log(\"New valule: \" + this.value + \": \" + v);\n }\n}\n\nlet identifier = 0;\n","import {NgModel} from '@angular/forms';\n\nimport {ValueAccessorBase} from './value.accessor.base';\n\n\nexport abstract class ElementBase extends ValueAccessorBase {\n protected abstract model: NgModel;\n\n}\n","/**\n * Element base class\n */\nimport {ControlValueAccessor} from '@angular/forms';\n\n\nexport class ValueAccessorBase implements ControlValueAccessor {\n private innerValue: T;\n\n private changed = new Array<(value: T) => void>();\n private touched = new Array<() => void>();\n\n get value(): T {\n return this.innerValue;\n }\n\n set value(value: T) {\n if (this.innerValue !== value) {\n this.innerValue = value;\n this.changed.forEach(f => f(value));\n }\n }\n\n touch() {\n this.touched.forEach(f => f());\n }\n\n writeValue(value: T) {\n this.innerValue = value;\n }\n\n registerOnChange(fn: (value: T) => void) {\n this.changed.push(fn);\n }\n\n registerOnTouched(fn: () => void) {\n this.touched.push(fn);\n }\n}\n","/**\n * Button for VoxPop created by karora on 16/06/17.\n */\nimport {Component} from \"@angular/core\";\n\n@Component({\n moduleId: module.id,\n selector: 'voxbtn',\n template: '',\n styles: [\n`.container { color: white; }\n \n.button {\n display: inline-block;\n padding: 0.2em 0.4em;\n border-radius: 0.1em;\n border: 2px solid #3e2723;\n background-color: #6d4c41;\n color: white;\n}\n.button:hover {\n border: 2px solid #1b5e20;\n background-color: #4caf50;\n}\n`],\n providers: [],\n})\n\n\nexport class VoxBtn {\n\n constructor(\n ) { }\n\n}\n","// The file contents for the current environment will overwrite these during build.\n// The build system defaults to the dev environment which uses `environment.ts`, but if you do\n// `ng build --env=prod` then `environment.prod.ts` will be used instead.\n// The list of which env maps to which file can be found in `.angular-cli.json`.\n\nexport const environment = {\n production: true\n};\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.log(err));\n"],"names":["RouterModule","DashboardComponent","PersonResponsesComponent","ProfileDetailComponent","ProfilesComponent","ProgrammeResponsesComponent","ProgrammesComponent","TopicResponsesComponent","TopicsComponent","routes","path","redirectTo","pathMatch","component","AppRoutingModule","forRoot","enableTracing","relativeLinkResolution","imports","exports","ProfileService","trigger","state","style","transition","animate","AppComponent","constructor","router","profileService","ngOnInit","GetProfile","subscribe","profile","SetUser","e","console","log","IsLoggedIn","c","document","getElementById","innerHTML","events","hideMenu","SetTitle","newTitle","title","innerText","userShite","social","name","zpad","v","n","s","substring","length","toggleMenu","menuState","i0","selectors","decls","vars","consts","template","ctx","transform","HTTP_INTERCEPTORS","HttpClientModule","FormsModule","ReactiveFormsModule","MatFormFieldModule","MatIconModule","MatInputModule","MatSelectModule","BrowserModule","BrowserAnimationsModule","MenuComponent","PersonDetailComponent","BooleanPipe","GoDatePipe","HumanIntervalPipe","SecsPipe","SmallTimePipe","TimePipe","ProgrammeDetailComponent","VoxResponsePlayerComponent","ResponsesComponent","ApiService","TokenInterceptor","VoxPopService","TopicDetailComponent","CheckboxComponent","VoxBtn","AppModule","bootstrap","provide","useClass","multi","useValue","window","declarations","TimerObservable","reviewOK","CanReview","timer","create","t","_r1","CanAdminister","_r4","voxPopService","route","params","switchMap","getPerson","person","setPerson","error","errorMessage","id","setEditing","editable","cancelChanges","saveChanges","updatePerson","personTypeDescription","p","person_type_id","person_type_description","features","map","value","pure","d","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","err","debug","interval","seconds","minutes","hours","days","result","isNaN","tenths","Math","round","trunc","months","_r7","CanAdministerAll","CanAdministerProgramme","myActiveProgrammes","programmes","JSON","stringify","getProfile","setProfile","programme_rights","toggleAdminister","pID","currentUserProfile","CurrentUserProfile","alert","administer","rights","newRights","indexOf","updateProfile","toggleReview","review","Reviewable","Adminable","ImageSource","type","prog","getProfiles","allProfiles","profiles","updatedProfiles","newProfiles","gotoDetail","navigate","addProfile","adding","closeDetail","getColorFor","ChangeDetectorRef","ComponentRef","EventEmitter","Programme","ctx_r7","cdr","inserting","programme","getProgramme","setProgramme","forceValidShortName","f","g","newValue","toLowerCase","replace","short_name","detectChanges","sn","GlobalAdmin","cancel","cancelled","emit","save","active","createProgramme","updateProgramme","edit","viewQuery","getProgrammes","activeProgrammes","updatedProgrammes","newProgrammes","allProgrammes","addProgramme","cancelInsert","AudioAPIWrapper","createAudio","audioElement","Audio","autoplay","preload","autobuffer","message","Play","promise","play","catch","Pause","pause","Stop","GetDuration","duration","CurrentTime","setPosition","currentTime","Load","url","src","load","factory","Observable","State","Stopped","audio","observableResponse","r","setVoxResponse","response","currentState","Playing","startProgress","positionObserver","isPlaying","Paused","lastPosition","progressbarWidth","Cancel","cancelPlayer","currentPosition","progressBarPercent","corrected_transcript","transcript","audioURL","topic","responseSaved","responseChange","updateTranscript","savedResponse","updateResponse","inputs","outputs","_r18","_r24","ctx_r12","_r10","currentResponseObservable","emitter","loading","refreshResponses","showAll","_showAll","show","allResponses","gotResponses","getResponses","responses","topic_id","programme_id","person_id","before","min_duration","filteredResponses","i","push","onSelect","currentResponse","next","responseUpdated","updated","publishResponse","toPublish","published","personResponses","toggleShowAll","earlier","beforeResponses","later","slice","downloadAsCSV","csvData","received","location","email","phone","hiddenElement","createElement","href","encodeURI","target","download","click","HttpHeaders","ReplaySubject","Subject","http","tokenObserver","currentUser","parse","localStorage","getItem","userId","SetAuthToken","token","baseHeaders","APIKey","GetToken","RequestHeaders","get","toPromise","then","jd","status","data","authToken","setItem","asObservable","Get","observer","AuthTokenValid","getRealURL","headers","getNext","getError","Post","body","post","statusText","Forget","Promise","resolve","setTimeout","pathname","removeItem","api","sessionCookie","getCookieValue","userProfile","Object","keys","a","b","cookie","match","pop","loggedIn","handleProfileResponse","logout","LoggedIn","ProgrammeRights","programmeID","k","CanReviewAll","HttpRequest","HttpHandler","HttpEvent","newToken","intercept","request","clone","setHeaders","Authorization","handle","HttpResponse","throwError","errMsg","json","updateError","toString","getTopic","topicId","privateURL","updateTopic","adminURL","Number","createTopic","activeTopics","list","activeWires","myProgrammes","programmeId","personId","beforeResponseId","pType","profileId","baseURL","Topic","_r8","type_id","setTopic","topic_active","goBack","back","forEach","programme_key","programme_name","publication_time","ctx_r8","_r9","typeIDTopic","getTopics","urlSegments","topicTypeID","topics","updatedTopics","typeIDWire","newTopics","allTopics","addTopic","max_duration","response_count","NG_VALUE_ACCESSOR","NgModel","ElementBase","identifier","onClick","useExisting","ValueAccessorBase","Array","innerValue","changed","touch","touched","writeValue","registerOnChange","fn","registerOnTouched","environment","production","enableProdMode","__NgCli_bootstrap_1","bootstrapModule"],"sourceRoot":"webpack:///","x_google_ignoreList":[]}