{ "version": 3, "sources": ["client/app/modules/help/help.component.ts", "client/app/modules/help/help.component.html"], "sourcesContent": ["import { Component, OnInit, Pipe, PipeTransform } from \"@angular/core\";\nimport { DomSanitizer } from \"@angular/platform-browser\";\nimport { TranslateService } from \"@ngx-translate/core\";\nimport { Observable } from \"rxjs\";\nimport { ROUTE_TRANSITION } from \"../../app.animation\";\nimport { PersonService } from \"../services/person.service\";\nimport { PersonViewModel } from \"../shared/models/personViewModel\";\nimport { AuthService } from \"../shared/services/auth.service\";\n\n@Pipe({ name: \"safe\" })\nexport class SafePipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n transform(url) {\n return this.sanitizer.bypassSecurityTrustResourceUrl(url);\n }\n}\n\n@Component({\n selector: \"elastic-profile\",\n templateUrl: \"./help.component.html\",\n styleUrls: [\"./help.component.scss\"],\n animations: [...ROUTE_TRANSITION],\n})\nexport class HelpComponent implements OnInit {\n isAuthenticated: Observable;\n isDoneLoading: Observable;\n loggedInPerson: PersonViewModel;\n currentSystem: string;\n ticketUrl: string;\n\n constructor(\n public translate: TranslateService,\n private authService: AuthService,\n private sanitizer: DomSanitizer,\n private personService: PersonService,\n ) {\n this.isAuthenticated = this.authService.isAuthenticated$;\n this.isDoneLoading = this.authService.isDoneLoading$;\n }\n\n ngOnInit() {\n this.getLoggedInPerson();\n this.getAllSystems();\n }\n\n openTicket() {\n if (this.ticketUrl)\n window.open(\n this.ticketUrl,\n \"popup\",\n \"width=600,height=600,scrollbars=no,resizable=no\",\n );\n return false;\n }\n\n get identityClaims(): any {\n return this.authService.identityClaims;\n }\n\n trustSrcUrl = function (data) {\n return this.sanitizer.bypassSecurityTrustResourceUrl(data);\n };\n\n getLoggedInPerson() {\n this.personService.getLoggedInPersonDetails().subscribe(async (r) => {\n this.loggedInPerson = r;\n const allSystems = (await this.getAllSystems()) as [any];\n\n if (allSystems && allSystems.length > 0 && this.loggedInPerson) {\n const system = allSystems.find(\n (al) => al.normalizedName === this.identityClaims?.application_system,\n );\n this.currentSystem = system?.name;\n\n this.ticketUrl = `https://ecoonline.info-exchange.com/ePermitsTicketForm?clientsystem=${\n this.currentSystem || \"unspecified\"\n }&&companyname=${\n this.loggedInPerson?.owningCompanyName || \"unspecified\"\n }&&username=${\n this.identityClaims?.preferred_username || \"unspecified\"\n }&&emailaddress=${this.loggedInPerson?.email || \"unspecified\"}&&phone=${\n this.loggedInPerson?.phoneNumber || \"unspecified\"\n }&&mobile=${this.loggedInPerson?.mobileNumber || \"unspecified\"}`;\n }\n });\n }\n\n async getAllSystems() {\n return await this.authService.getAvailableSystems();\n }\n}\n", "\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAuBa;AAvBb;;AAIA;;;;;;;;;;;;AAmBM,IAAO,gBAAP,MAAO,eAAa;MAQf;MACC;MACA;MACA;MAVV;MACA;MACA;MACA;MACA;MAEA,YACS,WACC,aACA,WACA,eAA4B;AAH7B,aAAA,YAAA;AACC,aAAA,cAAA;AACA,aAAA,YAAA;AACA,aAAA,gBAAA;AAER,aAAK,kBAAkB,KAAK,YAAY;AACxC,aAAK,gBAAgB,KAAK,YAAY;MACxC;MAEA,WAAQ;AACN,aAAK,kBAAiB;AACtB,aAAK,cAAa;MACpB;MAEA,aAAU;AACR,YAAI,KAAK;AACP,iBAAO,KACL,KAAK,WACL,SACA,iDAAiD;AAErD,eAAO;MACT;MAEA,IAAI,iBAAc;AAChB,eAAO,KAAK,YAAY;MAC1B;MAEA,cAAc,SAAU,MAAI;AAC1B,eAAO,KAAK,UAAU,+BAA+B,IAAI;MAC3D;MAEA,oBAAiB;AACf,aAAK,cAAc,yBAAwB,EAAG,UAAU,CAAO,MAAK;AAClE,eAAK,iBAAiB;AACtB,gBAAM,aAAc,MAAM,KAAK,cAAa;AAE5C,cAAI,cAAc,WAAW,SAAS,KAAK,KAAK,gBAAgB;AAC9D,kBAAM,SAAS,WAAW,KACxB,CAAC,OAAO,GAAG,mBAAm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