Index: trip-planner-front/node_modules/.cache/babel-webpack/05c6da51d48ef788cdfff55674ac793a.json
===================================================================
--- trip-planner-front/node_modules/.cache/babel-webpack/05c6da51d48ef788cdfff55674ac793a.json	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
+++ trip-planner-front/node_modules/.cache/babel-webpack/05c6da51d48ef788cdfff55674ac793a.json	(revision 76712b2bf7daeb245c9ca388ce322e0b98098d99)
@@ -0,0 +1,1 @@
+{"ast":null,"code":"import { FormControl } from '@angular/forms';\nimport { Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\nimport { City } from '../_models/city';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../_services/city.service\";\nimport * as i2 from \"../_services/location.service\";\nimport * as i3 from \"../_services/region.service\";\nimport * as i4 from \"@angular/forms\";\nimport * as i5 from \"@angular/material/form-field\";\nimport * as i6 from \"@angular/material/input\";\nimport * as i7 from \"@angular/material/autocomplete\";\nimport * as i8 from \"@angular/common\";\nimport * as i9 from \"primeng/button\";\nimport * as i10 from \"@angular/material/core\";\n\nfunction ExploreComponent_mat_option_18_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r5 = i0.ɵɵgetCurrentView();\n\n    i0.ɵɵelementStart(0, \"mat-option\", 15);\n    i0.ɵɵlistener(\"click\", function ExploreComponent_mat_option_18_Template_mat_option_click_0_listener() {\n      i0.ɵɵrestoreView(_r5);\n      const ctx_r4 = i0.ɵɵnextContext();\n      return ctx_r4.onPlaceSelected(ctx_r4.selectedPlace);\n    });\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const option_r3 = ctx.$implicit;\n    i0.ɵɵproperty(\"value\", option_r3);\n    i0.ɵɵadvance(1);\n    i0.ɵɵtextInterpolate1(\" \", option_r3.name, \" \");\n  }\n}\n\nfunction ExploreComponent_li_21_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"li\");\n    i0.ɵɵelementStart(1, \"ol\");\n    i0.ɵɵtext(2);\n    i0.ɵɵelementEnd();\n    i0.ɵɵelementEnd();\n  }\n\n  if (rf & 2) {\n    const f_r6 = ctx.$implicit;\n    i0.ɵɵadvance(2);\n    i0.ɵɵtextInterpolate1(\" \", f_r6.name, \" \");\n  }\n}\n\nexport class ExploreComponent {\n  constructor(cityService, locationService, regionService) {\n    this.cityService = cityService;\n    this.locationService = locationService;\n    this.regionService = regionService;\n    this.loading = [false, false, false, false];\n    this.regions = [];\n    this.filteredOptions = new Observable();\n    this.myControl = new FormControl();\n    this.cityName = '';\n    this.selectedPlace = new City();\n    this.mergedPlaces = [];\n    this.cities = [];\n    this.text = '';\n  }\n\n  ngOnInit() {\n    this.cityService.getAllCities().subscribe(cities => {\n      this.cities = cities;\n    });\n    this.regionService.getAllRegions().subscribe(regions => {\n      this.regions = regions;\n    });\n\n    for (let i = 0; i < this.cities.length; i++) {}\n\n    this.mergedPlaces.push(this.regions);\n    this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), map(value => typeof value === 'string' ? value : value.name), map(name => name ? this._filter(name) : this.cities.slice()));\n  }\n\n  displayFn(city) {\n    return city && city.name ? city.name : '';\n  }\n\n  _filter(name) {\n    const filterValue = name.toLowerCase();\n    return this.cities.filter(option => option.name.toLowerCase().includes(filterValue));\n  }\n\n  load(index) {\n    this.loading[index] = true;\n    setTimeout(() => this.loading[index] = false, 1000);\n    console.log(this.selectedPlace.name);\n  }\n\n  onPlaceSelected(selectedPlace) {\n    console.log(this.selectedPlace.name); // get from view\n  }\n\n}\n\nExploreComponent.ɵfac = function ExploreComponent_Factory(t) {\n  return new (t || ExploreComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.LocationService), i0.ɵɵdirectiveInject(i3.RegionService));\n};\n\nExploreComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n  type: ExploreComponent,\n  selectors: [[\"app-explore\"]],\n  decls: 22,\n  vars: 9,\n  consts: [[\"href\", \"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\", \"rel\", \"stylesheet\", \"integrity\", \"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\", \"crossorigin\", \"anonymous\"], [\"lang\", \"en\"], [\"charset\", \"utf-8\"], [1, \"navbar\", \"navbar-expand-sm\"], [1, \"navbar-brand\"], [1, \"navbar-nav\", \"ml-auto\"], [1, \"nav-item\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\", \"ngModel\", \"ngModelChange\"], [3, \"displayWith\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", \"click\", 4, \"ngFor\", \"ngForOf\"], [\"label\", \"Search\", \"icon\", \"pi pi-search\", \"id\", \"button\", 3, \"loading\", \"click\"], [4, \"ngFor\", \"ngForOf\"], [3, \"value\", \"click\"]],\n  template: function ExploreComponent_Template(rf, ctx) {\n    if (rf & 1) {\n      i0.ɵɵelement(0, \"link\", 0);\n      i0.ɵɵelementStart(1, \"html\", 1);\n      i0.ɵɵelementStart(2, \"head\");\n      i0.ɵɵelement(3, \"meta\", 2);\n      i0.ɵɵelementStart(4, \"title\");\n      i0.ɵɵtext(5, \"Explore\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(6, \"body\");\n      i0.ɵɵelementStart(7, \"header\");\n      i0.ɵɵelementStart(8, \"nav\", 3);\n      i0.ɵɵelementStart(9, \"strong\", 4);\n      i0.ɵɵtext(10, \"Trivia Trip\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(11, \"ul\", 5);\n      i0.ɵɵelementStart(12, \"li\", 6);\n      i0.ɵɵelementStart(13, \"form\", 7);\n      i0.ɵɵelementStart(14, \"mat-form-field\", 8);\n      i0.ɵɵelementStart(15, \"input\", 9);\n      i0.ɵɵlistener(\"ngModelChange\", function ExploreComponent_Template_input_ngModelChange_15_listener($event) {\n        return ctx.selectedPlace = $event;\n      });\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(16, \"mat-autocomplete\", 10, 11);\n      i0.ɵɵtemplate(18, ExploreComponent_mat_option_18_Template, 2, 2, \"mat-option\", 12);\n      i0.ɵɵpipe(19, \"async\");\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementStart(20, \"p-button\", 13);\n      i0.ɵɵlistener(\"click\", function ExploreComponent_Template_p_button_click_20_listener() {\n        return ctx.load(0);\n      });\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n      i0.ɵɵtemplate(21, ExploreComponent_li_21_Template, 3, 1, \"li\", 14);\n      i0.ɵɵelementEnd();\n      i0.ɵɵelementEnd();\n    }\n\n    if (rf & 2) {\n      const _r0 = i0.ɵɵreference(17);\n\n      i0.ɵɵadvance(15);\n      i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0)(\"ngModel\", ctx.selectedPlace);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"displayWith\", ctx.displayFn);\n      i0.ɵɵadvance(2);\n      i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(19, 7, ctx.filteredOptions));\n      i0.ɵɵadvance(2);\n      i0.ɵɵproperty(\"loading\", ctx.loading[0]);\n      i0.ɵɵadvance(1);\n      i0.ɵɵproperty(\"ngForOf\", ctx.mergedPlaces);\n    }\n  },\n  directives: [i4.ɵNgNoValidate, i4.NgControlStatusGroup, i4.NgForm, i5.MatFormField, i6.MatInput, i4.DefaultValueAccessor, i7.MatAutocompleteTrigger, i4.NgControlStatus, i4.FormControlDirective, i7.MatAutocomplete, i8.NgForOf, i9.Button, i10.MatOption],\n  pipes: [i8.AsyncPipe],\n  styles: [\"#button[_ngcontent-%COMP%]{\\r\\n    margin-left: 20px;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImV4cGxvcmUuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLGlCQUFpQjtBQUNyQiIsImZpbGUiOiJleHBsb3JlLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIjYnV0dG9ue1xyXG4gICAgbWFyZ2luLWxlZnQ6IDIwcHg7XHJcbn0iXX0= */\"]\n});","map":{"version":3,"sources":["C:/Users/DELL/Desktop/bachelor-thesis/trip-planner-front/src/app/explore/explore.component.ts"],"names":["FormControl","Observable","map","startWith","City","i0","i1","i2","i3","i4","i5","i6","i7","i8","i9","i10","ExploreComponent_mat_option_18_Template","rf","ctx","_r5","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ExploreComponent_mat_option_18_Template_mat_option_click_0_listener","ɵɵrestoreView","ctx_r4","ɵɵnextContext","onPlaceSelected","selectedPlace","ɵɵtext","ɵɵelementEnd","option_r3","$implicit","ɵɵproperty","ɵɵadvance","ɵɵtextInterpolate1","name","ExploreComponent_li_21_Template","f_r6","ExploreComponent","constructor","cityService","locationService","regionService","loading","regions","filteredOptions","myControl","cityName","mergedPlaces","cities","text","ngOnInit","getAllCities","subscribe","getAllRegions","i","length","push","valueChanges","pipe","value","_filter","slice","displayFn","city","filterValue","toLowerCase","filter","option","includes","load","index","setTimeout","console","log","ɵfac","ExploreComponent_Factory","t","ɵɵdirectiveInject","CityService","LocationService","RegionService","ɵcmp","ɵɵdefineComponent","type","selectors","decls","vars","consts","template","ExploreComponent_Template","ɵɵelement","ExploreComponent_Template_input_ngModelChange_15_listener","$event","ɵɵtemplate","ɵɵpipe","ExploreComponent_Template_p_button_click_20_listener","_r0","ɵɵreference","ɵɵpipeBind1","directives","ɵNgNoValidate","NgControlStatusGroup","NgForm","MatFormField","MatInput","DefaultValueAccessor","MatAutocompleteTrigger","NgControlStatus","FormControlDirective","MatAutocomplete","NgForOf","Button","MatOption","pipes","AsyncPipe","styles"],"mappings":"AAAA,SAASA,WAAT,QAA4B,gBAA5B;AACA,SAASC,UAAT,QAA2B,MAA3B;AACA,SAASC,GAAT,EAAcC,SAAd,QAA+B,gBAA/B;AACA,SAASC,IAAT,QAAqB,iBAArB;AACA,OAAO,KAAKC,EAAZ,MAAoB,eAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,2BAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,+BAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,6BAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,gBAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,8BAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,yBAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,gCAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,iBAApB;AACA,OAAO,KAAKC,EAAZ,MAAoB,gBAApB;AACA,OAAO,KAAKC,GAAZ,MAAqB,wBAArB;;AACA,SAASC,uCAAT,CAAiDC,EAAjD,EAAqDC,GAArD,EAA0D;AAAE,MAAID,EAAE,GAAG,CAAT,EAAY;AACpE,UAAME,GAAG,GAAGd,EAAE,CAACe,gBAAH,EAAZ;;AACAf,IAAAA,EAAE,CAACgB,cAAH,CAAkB,CAAlB,EAAqB,YAArB,EAAmC,EAAnC;AACAhB,IAAAA,EAAE,CAACiB,UAAH,CAAc,OAAd,EAAuB,SAASC,mEAAT,GAA+E;AAAElB,MAAAA,EAAE,CAACmB,aAAH,CAAiBL,GAAjB;AAAuB,YAAMM,MAAM,GAAGpB,EAAE,CAACqB,aAAH,EAAf;AAAmC,aAAOD,MAAM,CAACE,eAAP,CAAuBF,MAAM,CAACG,aAA9B,CAAP;AAAsD,KAAxN;AACAvB,IAAAA,EAAE,CAACwB,MAAH,CAAU,CAAV;AACAxB,IAAAA,EA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ACuG,SAAJ,CAlDlN;AAkDkOC,EAAAA,MAAM,EAAE,CAAC,+WAAD;AAlD1O,CAArB,CAAtC","sourcesContent":["import { FormControl } from '@angular/forms';\r\nimport { Observable } from 'rxjs';\r\nimport { map, startWith } from 'rxjs/operators';\r\nimport { City } from '../_models/city';\r\nimport * as i0 from \"@angular/core\";\r\nimport * as i1 from \"../_services/city.service\";\r\nimport * as i2 from \"../_services/location.service\";\r\nimport * as i3 from \"../_services/region.service\";\r\nimport * as i4 from \"@angular/forms\";\r\nimport * as i5 from \"@angular/material/form-field\";\r\nimport * as i6 from \"@angular/material/input\";\r\nimport * as i7 from \"@angular/material/autocomplete\";\r\nimport * as i8 from \"@angular/common\";\r\nimport * as i9 from \"primeng/button\";\r\nimport * as i10 from \"@angular/material/core\";\r\nfunction ExploreComponent_mat_option_18_Template(rf, ctx) { if (rf & 1) {\r\n    const _r5 = i0.ɵɵgetCurrentView();\r\n    i0.ɵɵelementStart(0, \"mat-option\", 15);\r\n    i0.ɵɵlistener(\"click\", function ExploreComponent_mat_option_18_Template_mat_option_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.onPlaceSelected(ctx_r4.selectedPlace); });\r\n    i0.ɵɵtext(1);\r\n    i0.ɵɵelementEnd();\r\n} if (rf & 2) {\r\n    const option_r3 = ctx.$implicit;\r\n    i0.ɵɵproperty(\"value\", option_r3);\r\n    i0.ɵɵadvance(1);\r\n    i0.ɵɵtextInterpolate1(\" \", option_r3.name, \" \");\r\n} }\r\nfunction ExploreComponent_li_21_Template(rf, ctx) { if (rf & 1) {\r\n    i0.ɵɵelementStart(0, \"li\");\r\n    i0.ɵɵelementStart(1, \"ol\");\r\n    i0.ɵɵtext(2);\r\n    i0.ɵɵelementEnd();\r\n    i0.ɵɵelementEnd();\r\n} if (rf & 2) {\r\n    const f_r6 = ctx.$implicit;\r\n    i0.ɵɵadvance(2);\r\n    i0.ɵɵtextInterpolate1(\" \", f_r6.name, \" \");\r\n} }\r\nexport class ExploreComponent {\r\n    constructor(cityService, locationService, regionService) {\r\n        this.cityService = cityService;\r\n        this.locationService = locationService;\r\n        this.regionService = regionService;\r\n        this.loading = [false, false, false, false];\r\n        this.regions = [];\r\n        this.filteredOptions = new Observable();\r\n        this.myControl = new FormControl();\r\n        this.cityName = '';\r\n        this.selectedPlace = new City();\r\n        this.mergedPlaces = [];\r\n        this.cities = [];\r\n        this.text = '';\r\n    }\r\n    ngOnInit() {\r\n        this.cityService.getAllCities().subscribe(cities => {\r\n            this.cities = cities;\r\n        });\r\n        this.regionService.getAllRegions().subscribe(regions => {\r\n            this.regions = regions;\r\n        });\r\n        for (let i = 0; i < this.cities.length; i++) {\r\n        }\r\n        this.mergedPlaces.push(this.regions);\r\n        this.filteredOptions = this.myControl.valueChanges.pipe(startWith(''), map(value => (typeof value === 'string' ? value : value.name)), map(name => (name ? this._filter(name) : this.cities.slice())));\r\n    }\r\n    displayFn(city) {\r\n        return city && city.name ? city.name : '';\r\n    }\r\n    _filter(name) {\r\n        const filterValue = name.toLowerCase();\r\n        return this.cities.filter(option => option.name.toLowerCase().includes(filterValue));\r\n    }\r\n    load(index) {\r\n        this.loading[index] = true;\r\n        setTimeout(() => this.loading[index] = false, 1000);\r\n        console.log(this.selectedPlace.name);\r\n    }\r\n    onPlaceSelected(selectedPlace) {\r\n        console.log(this.selectedPlace.name); // get from view\r\n    }\r\n}\r\nExploreComponent.ɵfac = function ExploreComponent_Factory(t) { return new (t || ExploreComponent)(i0.ɵɵdirectiveInject(i1.CityService), i0.ɵɵdirectiveInject(i2.LocationService), i0.ɵɵdirectiveInject(i3.RegionService)); };\r\nExploreComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExploreComponent, selectors: [[\"app-explore\"]], decls: 22, vars: 9, consts: [[\"href\", \"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css\", \"rel\", \"stylesheet\", \"integrity\", \"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\", \"crossorigin\", \"anonymous\"], [\"lang\", \"en\"], [\"charset\", \"utf-8\"], [1, \"navbar\", \"navbar-expand-sm\"], [1, \"navbar-brand\"], [1, \"navbar-nav\", \"ml-auto\"], [1, \"nav-item\"], [1, \"example-form\"], [\"appearance\", \"fill\", 1, \"example-full-width\"], [\"type\", \"text\", \"matInput\", \"\", 3, \"formControl\", \"matAutocomplete\", \"ngModel\", \"ngModelChange\"], [3, \"displayWith\"], [\"auto\", \"matAutocomplete\"], [3, \"value\", \"click\", 4, \"ngFor\", \"ngForOf\"], [\"label\", \"Search\", \"icon\", \"pi pi-search\", \"id\", \"button\", 3, \"loading\", \"click\"], [4, \"ngFor\", \"ngForOf\"], [3, \"value\", \"click\"]], template: function ExploreComponent_Template(rf, ctx) { if (rf & 1) {\r\n        i0.ɵɵelement(0, \"link\", 0);\r\n        i0.ɵɵelementStart(1, \"html\", 1);\r\n        i0.ɵɵelementStart(2, \"head\");\r\n        i0.ɵɵelement(3, \"meta\", 2);\r\n        i0.ɵɵelementStart(4, \"title\");\r\n        i0.ɵɵtext(5, \"Explore\");\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementStart(6, \"body\");\r\n        i0.ɵɵelementStart(7, \"header\");\r\n        i0.ɵɵelementStart(8, \"nav\", 3);\r\n        i0.ɵɵelementStart(9, \"strong\", 4);\r\n        i0.ɵɵtext(10, \"Trivia Trip\");\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementStart(11, \"ul\", 5);\r\n        i0.ɵɵelementStart(12, \"li\", 6);\r\n        i0.ɵɵelementStart(13, \"form\", 7);\r\n        i0.ɵɵelementStart(14, \"mat-form-field\", 8);\r\n        i0.ɵɵelementStart(15, \"input\", 9);\r\n        i0.ɵɵlistener(\"ngModelChange\", function ExploreComponent_Template_input_ngModelChange_15_listener($event) { return ctx.selectedPlace = $event; });\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementStart(16, \"mat-autocomplete\", 10, 11);\r\n        i0.ɵɵtemplate(18, ExploreComponent_mat_option_18_Template, 2, 2, \"mat-option\", 12);\r\n        i0.ɵɵpipe(19, \"async\");\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementStart(20, \"p-button\", 13);\r\n        i0.ɵɵlistener(\"click\", function ExploreComponent_Template_p_button_click_20_listener() { return ctx.load(0); });\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵtemplate(21, ExploreComponent_li_21_Template, 3, 1, \"li\", 14);\r\n        i0.ɵɵelementEnd();\r\n        i0.ɵɵelementEnd();\r\n    } if (rf & 2) {\r\n        const _r0 = i0.ɵɵreference(17);\r\n        i0.ɵɵadvance(15);\r\n        i0.ɵɵproperty(\"formControl\", ctx.myControl)(\"matAutocomplete\", _r0)(\"ngModel\", ctx.selectedPlace);\r\n        i0.ɵɵadvance(1);\r\n        i0.ɵɵproperty(\"displayWith\", ctx.displayFn);\r\n        i0.ɵɵadvance(2);\r\n        i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(19, 7, ctx.filteredOptions));\r\n        i0.ɵɵadvance(2);\r\n        i0.ɵɵproperty(\"loading\", ctx.loading[0]);\r\n        i0.ɵɵadvance(1);\r\n        i0.ɵɵproperty(\"ngForOf\", ctx.mergedPlaces);\r\n    } }, directives: [i4.ɵNgNoValidate, i4.NgControlStatusGroup, i4.NgForm, i5.MatFormField, i6.MatInput, i4.DefaultValueAccessor, i7.MatAutocompleteTrigger, i4.NgControlStatus, i4.FormControlDirective, i7.MatAutocomplete, i8.NgForOf, i9.Button, i10.MatOption], pipes: [i8.AsyncPipe], styles: [\"#button[_ngcontent-%COMP%]{\\r\\n    margin-left: 20px;\\r\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImV4cGxvcmUuY29tcG9uZW50LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtJQUNJLGlCQUFpQjtBQUNyQiIsImZpbGUiOiJleHBsb3JlLmNvbXBvbmVudC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIjYnV0dG9ue1xyXG4gICAgbWFyZ2luLWxlZnQ6IDIwcHg7XHJcbn0iXX0= */\"] });\r\n"]},"metadata":{},"sourceType":"module"}
